agentleFS
ghvinashvilighvinashvili/specagent/.claude/skills/run-stage/SKILL.md

run-stage

Skill7 starsChanged 16 days agoApache-2.0View on GitHub

Launch one stage of a run as a role session with its stored assignment. Use when the manager starts the next stage or an ad-hoc one.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read what the stage builds on: the brief.

    line 13
  2. Distinctive:

    Leave nothing out because the type's instruction covers it.

    line 15
  3. Distinctive:

    Read the draft as the session will: with only this text, the brief and its instruction, would a capable agent do the job as well as it can …

    line 17
  4. Very specific:

    Update HANDOFF.md with the handoff skill.

    line 24
  5. Very specific:

    Never paste prompt.md into the conversation, never start a session with claude yourself (only harness launch does.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Run a stage

Arguments: $0 = run id, $1 = stage id.

  1. uv run harness status --run $0 --stage $1 prints ready, or no_assignment for a stage that has none yet. If it prints blocked-by:<stage> or locked, stop and tell the human.
  2. Write the assignment, unless the stage has one. A role session is a subagent in everything but the way it is started: it knows its type's instruction and the brief, and nothing of what you know about this run. Write for it exactly what you would write into the prompt of a subagent you were about to send to do this job, and then give that text to the role session instead.
    • Read what the stage builds on: the brief; the outputs of the stages it depends on (stages/<dep>/output/, and result.json with its open_questions); the human's decisions and answered escalations.
    • Copy templates/stage-assignment.md to <runs root>/$0/assignments/drafts/$1.md and fill it. Goal: who uses the output next and what they must be able to do with it without asking. Known: what is settled or ruled out. Deliver: every deliverable and how exact it has to be, down to the level of detail at which the next session decides nothing itself. Prove: what is shown by running it or by opening the source (the trial, the probes, the commands, the inputs at the edges, the check before finishing). Hard parts: where a quick answer would look right and be wrong in this run. Done when: what makes the stage finished.
    • Leave nothing out because the type's instruction covers it. The instruction says how the type works in any run; the assignment says what this run needs, as exactly as you know it.
    • Do not cut the material: the harness chooses it by script at launch (the stage's inputs, the brief's material, every place the stage's texts cite as path:line with the piece that holds it, the short files they name, what matches the brief) and gives it in the session's cached system prompt. Write every place you know as path:line where the assignment needs it. Use the optional Material only for a piece that no text of the stage points to. uv run harness material --run $0 --stage $1 shows the choice without a model, for when the human asks.
    • Read the draft as the session will: with only this text, the brief and its instruction, would a capable agent do the job as well as it can be done? Whatever the answer rests on that you know and did not write, write.
    • For a reviewing type (verifier, critic, validator, test-verifier, comparator, judge) the assignment names nothing its row in docs/roles/need-to-know.yaml hides: not who made the work, not what another reviewer found, not the budget, not a model.
    • uv run harness assign --run $0 --stage $1 stores the draft. thin_assignment names what is missing: write it and store again. The shards of a parallel: per_task stage share one assignment.
  3. uv run harness material --run $0 --stage $1 shows what the session will have. does_not_fit must be empty: split the stage or narrow the assignment, launch refuses it otherwise. For every file under not_text (an image, a PDF) the assignment says what the session has to look for in it.
  4. uv run harness launch --run $0 --stage $1 prints one JSON line with session_id and job_id (bg mode; the session id is the one Claude Code assigned to the background session, read back from claude agents) or checkpointed/print_failed with the exit code and stderr (print mode; the gate runs at the next poll); for a parallel: per_task stage it splits the planner's tasks.json and prints one entry per shard in launched[] (--shard N relaunches a single shard). If it prints no_assignment, go back to step 2. If it prints config_changed, stop and tell the human (just refreeze after their review). If it prints already_launched, the unit exists: use the resume-stage skill and never launch it again. If it prints in_rework, the unit answers a loop: use the resume-stage skill with --rework. Run exactly this command: it is listed in sandbox.excludedCommands, so the session it starts is not created inside the sandbox.
  5. claude agents --json --all --cwd ${CLAUDE_PROJECT_DIR} must show a row whose sessionId equals each printed session_id (bg mode; a finished print unit has no row). If a row is missing, run uv run harness poll --run $0 and follow its actions; never launch the unit again.
  6. Start uv run harness watch --run $0 as a background command (Bash with run_in_background). It stays in the terminal's task list while the role sessions work, prints every status change, and ends when the run needs you: a gate passed, a question was filed, a unit stopped. Its output is the list of actions, the same one harness poll prints. Do not poll in a loop yourself. The status line shows every running role session in the meantime.
  7. Update HANDOFF.md with the handoff skill.
  8. Reply to the human in two lines: what was launched, and that you will come back when the watcher ends.

Never paste prompt.md into the conversation, never start a session with claude yourself (only harness launch does; claude agents is read-only), never launch a stage whose dependencies have not passed their gate, and never launch a stage on the brief alone.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.