agentleFS
exbaldexbald/skills/create-agentic-spec/SKILL.md

create-agentic-spec

Skill1 starsChanged 7 months agoMITView on GitHub

Use when a feature should be built by a team of AI agents in Orca rather than by one session, when planning an Orca orchestration run (coordinator, worker agents, child worktrees), when deciding which models act as PM, coder, reviewer or QA, or when the user says "create agentic spec", "agentic team", "orca orchestration", "fan out workers" or "split this across agents".

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 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.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not for a one-file change (do it yourself), or for work outside Orca (use autonomous-spec-runs or create-spec).

    line 15
  2. Very specific:

    Ground: Read the code the feature touches and note file:line evidence.

    line 32
  3. Very specific:

    Pick the team: Run python3 scripts/team_facts.py --hours <expected run length>, then follow references/roster.md.

    line 33
  4. Very specific:

    Run the spec critic (references/run-loop.md, Spec critique) and fix every finding.

    line 37
  5. Very specific:

    Commit the spec to the feature branch.

    line 38
  6. Very specific:

    Never assign an agent whose meter team_facts.py marks EXHAUSTED.

    line 45
  7. Very specific:

    Every coder gets its own child worktree, which you create and base-check before its agent starts (run-loop.md 2a).

    line 62
  8. Distinctive:

    After two failed attempts at a task, move it up a tier or fix the spec.

    line 66
  9. Very specific:

    Check master before every dispatch and every push: git fetch, the behind count, git merge-tree.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Create agentic spec

You are the PM and the coordinator. Workers on the models best suited to each job do the work, and every worker is untrusted: the spec constrains it, you verify it, and a reviewer from another model family plus the GitHub bot check everything before it ships.

Violating the letter of these rules is violating their spirit.

When to use

  • A feature with two or more separable pieces of work, in a repo registered in Orca, with orchestration enabled (Orca Settings → Experimental).
  • Not for a one-file change (do it yourself), or for work outside Orca (use autonomous-spec-runs or create-spec).
  • Expect real overhead. One run of 7 tasks in 3 waves (about 600 lines) took about 7 hours from spec to merge, with about 22 worker dispatches and 9 bot reviews, while master moved three times. With fewer than about three tasks, one session with create-spec is usually faster.

REQUIRED BACKGROUND: autonomous-spec-runs for task anatomy, stop conditions and "the transcript is not evidence". Orca's own guide governs the lifecycle (authority, waits, settlement, release, recovery): run orca skills get orchestration --full before the first orca command and follow it. This skill adds the team, the spec and the gates.

Roles

RoleWhoDoesNever
PM / coordinatoryougrounding, team, spec, dispatch, verification, merges, pushes, bot loop, reportedit feature code; it dispatches fixes
Spec criticread-only workerfinds every place a literal-minded agent would guess or could go wrongedit the spec
Coderone worker per task, own child worktreeone task file; commits only its listed filespush, merge, edit outside its list
Reviewerread-only worker, other family than the codersreviews each wave's merged diff, files findings by severityedit code
QAworker, other family than the codersproves every acceptance criterion in the running app, with evidencefix what it finds

Workflow

  1. Ground. Read the code the feature touches and note file:line evidence. Ask the user only for decisions no agent may invent; record each in requirements.md.
  2. Pick the team. Run python3 scripts/team_facts.py --hours <expected run length>, then follow references/roster.md. Write team.md. If the script reports the roster STALE, refresh the roster or get the user's explicit OK to use it as is.
  3. Write the spec in specs/<feature>/ from references/templates.md. Then:
    • python3 scripts/spec_guard.py lint specs/<feature> must report 0 errors.
    • Probe every code block a task must copy. Write it to its target path in a scratch child worktree, run the repo's typecheck and lint there, then revert with git checkout. The critic reads but never compiles. On one run it missed an import-order rule and a React ref read during render, and the probe caught both.
    • Run the spec critic (references/run-loop.md, Spec critique) and fix every finding.
    • Commit the spec to the feature branch. Child worktrees only see committed files, and the spec plus run-state.md is the state a new coordinator resumes from.
  4. Confirm. Show the user team.md and the wave table. Launch on their go, unless they already asked you to run it.
  5. Run wave by wave with references/run-loop.md, starting with its "Known Orca sharp edges". With the bot on, run references/review-loop.md after every push.
  6. Report per task: outcome, evidence, merge commit. Then the bot status and anything open. Never merge the PR: the merge belongs to the human. The one exception is a user who explicitly hands you the merge; then follow references/run-loop.md, Ship. With the bot off, you open no PR; the user does.

Team rules

  • Never assign an agent whose meter team_facts.py marks EXHAUSTED. Your own meter counts: if it will not last the run, say so before launching.
  • The reviewer and QA come from a different model family than every coder whose work they check. Pick the reviewer first and route coders around its family. The GitHub bot does not count towards this: it can be quota-blocked, slow or down.
  • PM work (decomposition, judgement calls, acceptance) stays with you. Never hand it to a worker, least of all a weaker model.
  • Task files never name a model. Routing lives in team.md, keyed by tier, so a task can be rerouted without rewriting it.
  • Record in team.md whether the GitHub review bot is on. Off means no PR and no bot loop, never fewer internal checks.

Spec rules: write for the weakest agent on the roster

  • One task is one worker and one concern, sized at one to three hours. It is self-contained: no "see the conversation", no relayed decisions, no waiting for another running worker.
  • Each task lists the exact files it may modify and create. Any other file means stop and ask.
  • A contract two tasks share (types, function names, routes, columns, error codes, env vars) is written verbatim in the spec, or built by a task in an earlier wave. Never "task A writes it first and task B waits for it".
  • Shared and generated files (schema, migrations, manifests and lockfiles, barrel or registry files, i18n catalogs) belong to exactly one task per wave.
  • Verification is literal commands with expected results: typecheck, lint, and the unit tests for the task's own files.
  • Shared runtime (dev-server port, test database, the e2e suite) is used only by you and QA, after a merge, and coders never start it. The exception is a repo whose Orca setup scripts give each worktree its own database and port; that isolation belongs in a companion env-isolation setup, not in this skill.

Run rules

  1. Every coder gets its own child worktree, which you create and base-check before its agent starts (run-loop.md 2a). Orca's --worktree new-child currently branches from the wrong base. Read-only workers use --worktree current, and only while no coder edits it.
  2. Workers never push, merge, rebase or git add -A. You are the only integrator.
  3. A worker_done is a claim. Accept it only after spec_guard.py diff passes and you have rerun every Verification command in the child worktree yourself. Write both results into run-state.md.
  4. After a wave merges: full gates on the merged branch, then the reviewer, then fix tasks for P1/P2 findings, then push. With the bot on, its review of that exact HEAD must be clean before the next wave starts. review-loop.md defines clean, both mid-run and on the final head.
  5. After two failed attempts at a task, move it up a tier or fix the spec. Orca fails a task after its third failed attempt; never route around that.
  6. Check master before every dispatch and every push: git fetch, the behind count, git merge-tree. If it moved, follow run-loop.md, Master moved, before anything else. A conflicting PR runs no CI and no bot.

Red flags: stop and correct course

ThoughtReality
"The GitHub bot is another family, so a same-family internal review is fine"The bot may be blocked or down, and then nothing independent ever read the code. Choose a reviewer from another family.
"These tasks don't overlap, --worktree current is quicker"Workers share one git index (index.lock), and half-written files fail each other's typecheck. Each coder gets a child worktree.
"The worker says the tests pass"That is a claim. Run the diff check and the commands yourself.
"One push at the end saves bot reviews"Then the bot sees one huge diff, and mistakes in the foundation surface after everything is built on top. Push and review per wave.
"The spec can stay uncommitted"Child worktrees cannot read it, and a crash loses the plan.
"Task B can poll for task A's file"That is a race between live workers. Freeze the contract in the spec or an earlier wave.
"A cheap model can make the judgement calls while I coordinate"Judgement is PM work, and it stays with you.
"The user wants it running in 15 minutes, so skip the critic, review or verification"Speed comes from running workers in parallel, not from removing gates.
"The bot is off, so the internal review can go too"With the bot off, the internal reviewer is the only independent check. It always runs.
"--worktree new-child starts the worker from my branch"Not at the moment (Orca #21316): it branches from the repo's default branch. Create the child yourself and check its base.
"The bot hasn't reviewed in 20 minutes, it must be slow"Check gh pr view --json mergeable first: a CONFLICTING PR runs no workflows at all. Then check whether the shared runners are just queued (gh run list).
"Master only moved docs, so I'll push now and merge later"A conflict blocks CI and the bot, and a migration clash breaks the deploy. Merge master, rerun the gates, then push.
"I'll renumber our migration to the next free slot"A renamed migration keeps a stale snapshot, and the next generate re-adds the other branch's columns. Regenerate on top of master's snapshot.

Common mistakes

  • Naming the model inside a task "so it plays to its strengths". Routing belongs in team.md; tasks must survive a reroute.
  • Trusting a bot verdict left on an earlier commit. Match the review's commit_id to HEAD.
  • Starting wave N+1 before wave N is merged, or without checking each child's base. Every child must contain the merged work; git merge-base --is-ancestor proves it.
  • Answering a worker's question in chat only. Write the answer into the task file and commit it, so a retry sees it.
  • Leaving settled workers unreleased. Reuse, retain or release each one, as Orca's guide requires.
  • Starting a check --wait waiter with & inside a foreground command. The waiter dies with that shell. Run it as the harness's background task.
  • Changing a team role because the user asked "why X instead of Y?". That is a question. Show the current routing and the trade-off, and change team.md only after they confirm.

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.