Skip to content

shinpr/galley

Repository files navigation

Galley blueprint

Galley

Claude Code Codex CLI Agent Skills CI GitHub Release License: MIT

Galley is a local runtime for supervised AI coding tasks.

It runs Claude Code or Codex in a git worktree, records evidence for each attempt, and asks a supervisor model to accept, retry, or escalate the result before the work is treated as done.

Galley is for tasks where the output should be inspectable later: the request, scope, checks, diffs, and supervisor verdict stay on disk.

Quick Start

Use the Galley skill to set up each repository. It installs or verifies the CLI, prepares repository profiles, drafts valid task YAML, and queues tasks only after approval.

Claude Code:

/plugin marketplace add shinpr/galley
/plugin install galley@galley-tools
/reload-plugins
/galley:galley Set up Galley for this repository.

Codex:

codex plugin marketplace add shinpr/galley

Then start or return to Codex, open the plugin picker, install Galley, and ask the skill to set up the repository:

/plugins
$galley Set up Galley for this repository.

First Task

After setup, start with a small, reviewable task in an existing repository.

Claude Code:

/galley:galley Create a Galley task for a small bug fix or test improvement in this repository. Use the repository's normal checks, keep the scope narrow, and queue it after I approve.

Codex:

$galley Create a Galley task for a small bug fix or test improvement in this repository. Use the repository's normal checks, keep the scope narrow, and queue it after I approve.

The skill will inspect the repository, draft a task file, show the acceptance criteria and execution settings, and ask before queueing it.

Skill Workflow

The Galley plugin packages one Agent Skill for Claude Code and Codex. The skill is the recommended path for setup and task authoring because it handles the pieces that are easy to get wrong by hand:

  • repository setup, CLI checks, and profile paths
  • task YAML drafting and validation
  • quality and environment profile authoring
  • queueing only after explicit approval
  • failed-run diagnosis and requeue guidance

For skills-compatible clients that do not use the Claude or Codex plugin manifests, copy or symlink this directory into the client's skill path:

plugins/galley/skills/galley/

The standalone skill still expects the galley CLI on PATH. Some workflows also use claude, codex, gh, and python3.

Why Galley

Interactive AI coding sessions work well for short tasks. They get harder to trust when the work becomes asynchronous, long-running, or review-heavy.

  • Asynchronous execution with review: run coding work away from the main checkout, then gate completion through a supervisor verdict.
  • Git-visible changes: executor work happens in a managed worktree, so normal git review still applies.
  • Structured evidence: every run records command plans, executor output, git status, diffs, and supervisor results under the workflow root.
  • Retry and escalation: tasks can retry while the loop budget remains, then escalate with recorded context when human judgment is needed.
  • Repository-specific policy: profiles describe expected checks, command names, network and secrets policy, PR behavior, and cleanup rules.
  • Optional PR handoff: accepted work can be committed, pushed, opened as a PR, and requeued from trusted PR comments.

How It Works

task YAML
    |
    | galley task queue
    v
queued task
    |
    | daemon claims task
    v
isolated git worktree
    |
    | Claude Code or Codex implements
    v
run evidence + git diff
    |
    | supervisor review
    +--> accepted ---------> done or PR opened
    +--> needs revision ---> retry while budget remains
    +--> needs review -----> failed for human review
    +--> hard stop --------> failed

Core Concepts

  • Task YAML: trusted local input describing the goal, acceptance criteria, scope, executor, verification, worktree, and PR behavior. See docs/task-yaml.md.
  • Quality profile: optional repository expectations for required checks, review dimensions, evidence, and pass policy. See docs/profiles.md.
  • Environment profile: optional repository defaults for command names, executor choice, local constraints, PR behavior, and cleanup policy. See docs/profiles.md.
  • Executor: Claude Code or Codex backend that implements the task. New tasks use environment.yaml executor.default_cli when configured, otherwise Codex.
  • Supervisor: Claude or Codex backend that reviews the result against acceptance criteria, required checks, and recorded evidence.
  • Worktree: isolated git checkout used for AFK execution so the source repository stays clean.
  • Evidence: files under runs/<run-id>/ that make each attempt auditable after the fact.

Manual CLI Installation

Most users should start with the skill. Install the binary manually when scripting setup or debugging the CLI outside the skill workflow.

curl -fsSL https://raw.githubusercontent.com/shinpr/galley/main/scripts/install.sh | sh

Or use Go directly:

go install github.com/shinpr/galley/cmd/galley@latest

Installing only the binary does not create repository profiles or start a daemon for a project. After manual installation, run the setup skill for the repository you want Galley to manage.

Useful direct checks:

galley --help
galley daemon status --output json
galley daemon run --once

Safety and Trust

Galley treats task YAML as trusted local execution input. A user or process that can write task YAML can choose the goal, scope, reference files, branch, worktree, and verification guidance used by the executor and supervisor.

Run Galley only for repositories and task authors you trust. Keep secrets out of task-accessible files, use worktrees and scope.forbidden_paths, and keep normal git review in the loop. PR comment requeueing is accepted only from the recorded PR author.

See SECURITY.md for reporting and operational trust boundaries.

Documentation

  • Task YAML: task fields, starter template, permissions, input files, worktree paths, and acceptance skeleton preflight.
  • Profiles: quality and environment profile fields with examples.
  • Operations: daemon commands, queue layout, task commands, operational notes, and development checks.
  • Supervision: supervisor verdicts, retry behavior, executor selection, and evidence expectations.
  • PR automation: accepted-task commits, PR creation, PR comment requeueing, and worktree cleanup.

Development

The examples/ directory is for Galley checkout development and CI validation. Normal users should prefer ~/.galley tasks created by the plugin skill.

go test ./...
go build ./cmd/galley
./scripts/smoke-local.sh

For local development and release notes, see CONTRIBUTING.md and CHANGELOG.md.

License

Galley is released under the MIT License. See LICENSE.

About

Local-first orchestration runtime for supervised AI-assisted repository automation.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors