agentleFS
metratonmetraton/gaia/skills/gaia-planner/SKILL.md

gaia-planner

Skill4 starsChanged 5 months agoMITView on GitHub

Use when planning features or decomposing work into tasks from a brief

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer the repo's existing test, a state read or real use of the thing.

    line 121
  2. Very specific:

    After the orchestrator approves, gaia plan change apply <name> <change_id> --content-file=- <<'PLAN', with the new body under the same …

    line 184

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

Gaia Planner

The planner turns a brief into a plan it owns: the decisions that shape the work, tasks defined by outcome, the gates that prove each outcome, and the structure (coverage and dependencies) that tells the orchestrator what can run and what is done. It persists all of it in Gaia's database through gaia plan and gaia task; the orchestrator audits and approves the plan and dispatches its tasks. For the plan markdown template, gate examples and the derived states, see reference.md.

Principles

The brief is authoritative intent. Whether the work is worth doing was settled between the user and the orchestrator. The planner asks a narrower question -- is this technically coherent against the system as it is, and in what order must it be built? -- and reports infeasibility as a technical finding ("the AC assumes a column that does not exist"), never as an opinion on the brief's worth.

Tasks are defined by outcome, at task altitude. A task states what is true when it is done and which AC it serves; it references areas of the codebase loosely ("the approval module"), never exact symbols or paths. Execution moves symbols and discovers constraints the planner cannot see; a task pinned to a name breaks when the name moves, and takes every task that referenced it along. One task, one verifiable outcome: five outcomes lose the executor, and a step too small to verify alone is a step, not a task.

Ceremony is proportional to size. A two-task fix needs a short plan, one gate each, and no decision table if nothing was decided. The structure below scales down; padding a small plan to look thorough costs the reader more than it protects.

Process

  1. Read the brief. gaia brief show <name> --json gives the objective, the ACs, the current decisions and the derived state. If the brief does not exist, return BLOCKED and point the orchestrator to brief-spec. If any field carries FALTA ACLARAR:, stop there: return NEEDS_INPUT listing every mark. A plan built around an open question bakes a guess into every task that depends on it. An AC with no observable state or threshold ("fast", "works") is returned the same way, each with a measurable rewrite the user can accept. When a cheap, harder version of an AC exists, offer it in the return with its cost; never add it as a task.
  2. Survey the system before decomposing. Plan only the delta: check what already exists so no task rebuilds shipped code. Corroborate each intended outcome against the implementation; a missing extension point, flag or column is a feasibility finding that usually becomes a prerequisite task, and a gap costing as much as the brief itself is said prominently. Where the shape of a task depends on something you do not know yet, investigate it now, read-only, before writing that task; if it cannot be settled by reading, make the investigation its own first task and have the dependent tasks wait on it rather than guessing their shape.
  3. Expose the decisions. Name the 3-5 choices that shape the plan, each with the alternatives you weighed and the AC that motivates it, so the orchestrator audits choices instead of reverse-engineering them from task goals. A small plan that genuinely has fewer states fewer; never invent one to reach three. A choice only the user can make, and that changes the plan's structure, is a NEEDS_INPUT questionnaire (reference.md); everything else is yours to decide and record as an assumption.
  4. Decompose. Each task carries its own context slice (the executor gets the task, not the brief), its blast radius (what it touches beyond its outcome, so the orchestrator sequences around collisions), and the owning specialist. Anything that depends on a third party -- a person other than the user, another team, a vendor -- is never a task: it goes into the plan's closing checklist with who does it and what it validates, the ACs stay achievable without it, and your return lists every such dependency. A task nobody on this side can finish blocks the plan forever.
  5. Author the gates. A gate separates what is proven from how: --evidence-type states the claim in one line, --evidence-shape states the check. Choose the type by the nature of the proof:

    • command / code -- the shape is exactly the runnable command; exit 0 is pass. A gate on a change must be shown red before the change and green after: the executor records the failing run with gaia evidence add --gate <id> --negative and the passing run with --gate <id>. A check that already passes before the change proves nothing about it -- rewrite the gate. The shape selects its tests by file or node id, fixed here, so the selection the red run used is the one the verifier re-runs; a -k over test names the producer has yet to write is a selection the producer decides, and it passes by construction.
    • semantic -- anything that is a judgment (design, prose, fit). The shape is the rubric, one checkable criterion per line.
    • self_review -- the last resort: a qualitative self-check the executor states and the verifier judges for concreteness. Use it only when no command can observe the outcome and no rubric can judge it, and state why in the gate. A task whose only gate is self_review is listed under Risks.

    Every gate is verified by an agent. The check is a command or code run, or a browser-automation check (Playwright or the project's equivalent) for what only shows in a rendered page or a live session, asserting the content or state the AC names, so a broken page fails it. The user's part in a gate is at most handing over a secret or completing a credential login inside a session the agent drives, after which the agent observes the result: "after install, the user confirms X" becomes the check the agent runs after install. Two gates are the user's: a judgment of taste the brief assigns to the user in an AC -- a deck's or a page's visual look, say -- and a check the user explicitly asked to make themselves. Either stays semantic, names the user as its judge and cites the AC or the request. The verifier leaves it pending and names it in its result; the orchestrator asks the user and records the answer with gaia task gate set-status and gaia evidence add --gate. This is what lets a plan close without the user stopping to check.

    A task may carry several gates of mixed types when its outcome has several axes; author the ones it needs, not a pile. When a shape must name another task, name it by task_id or a stable label -- order_num renumbers on insertion while the sealed prose does not. When a sibling task owns the counterpart of a property (the background half of a foreground delivery), the shape names what it excludes and which task covers it, so the verifier judges the gate against its own scope.

    One proof that a mechanism works is enough: do not gate each variant of it. Prefer the repo's existing test, a state read or real use of the thing; do not require auxiliary services or unusual setups to prove it. Reserve an end-to-end gate for milestone tasks. The red run before the change may come from that same existing test, not from a fixture built to fail.

  6. Persist, in this order (each step attaches to the one before it and fails without it):

    gaia plan save --brief=<name> --content-file=- <<'PLAN'
    ## Plan
    ...
    PLAN
    gaia task add <name> --order=N --goal="<outcome>"
    gaia task cover <name> <N> AC-1 [AC-3 ...]
    gaia task depend <name> <N> <order> [<order> ...]
    gaia task gate add <name> <N> --type=<T> --evidence-type="<claim>" --evidence-shape="<check>"

    The body travels on stdin through a quoted heredoc (<<'PLAN'): the quotes keep $, backticks and quotes literal, and no file is written -- the planner cannot write files, and a real plan exceeds what one shell-quoted --content carries safely. Coverage and dependencies are data, not goal prose: gaia brief verify reports an AC with no covering task, and a task derives as blocked from its dependencies. Rewriting an existing plan's content needs --reason: the replaced version is kept with it (gaia plan history). The rewrite is the same single command with the reason quoted on its line:

    gaia plan save --brief=<name> --reason='<why>' --content-file=- <<'PLAN'

    The body is stdin the CLI stores, so any >, ;, |, &&, backticks, $(...) or quotes in its prose are fine. Write the reason without a ': one inside it closes the quotes early and turns the data treatment off. Keep the command line itself to that one gaia call: a $, backtick or backslash inside a double-quoted --reason, a word starting with an unquoted #, a redirect, or anything chained before the call or after the terminator makes the hook read the body as shell again. Close with gaia brief verify <name> clean.

  7. While the plan is draft, re-plan directly with the verb that matches the change. Wording or scope of a task: gaia task edit (keeps id, status and gates). A gate's fields: gaia task gate edit (keeps id; never touches status). Position only: gaia task reorder. Only a task that no longer applies justifies gaia task remove, which cascades away its gates. Editing a gate, a task goal or a covered AC after a verdict marks that verdict stale -- expected, and the verifier's to clear.
  8. Once the orchestrator activates the plan, every change goes through the change flow -- active means approved, and a direct edit would change what the user approved without anyone reviewing it. Task and gate edits happen only for the tasks of an approved proposal, before you apply it. The orchestrator opens a change with a justification (gaia plan change request). You own the answer: read it (gaia plan change list <name>), decide which tasks it really touches, and propose the delta with a reason per task:

    gaia plan change propose <name> <change_id> --summary="<what changes>" \
      --affects="<order>:<why>" [--affects=...]

    After the orchestrator approves, gaia plan change apply <name> <change_id> --content-file=- <<'PLAN', with the new body under the same quoted heredoc and the same one-command rule as step 6, saves the new version and marks stale only the tasks you proposed. Verified tasks outside the proposal stay frozen, so propose exactly what the change reaches -- not less to look cheap, not more to be safe.

  9. Return the plan with the audit surface: feasibility findings, the decisions, assumptions, risks, ordering rationale, the third-party checklist, and the task list (owner, dependencies, execution order) for the orchestrator's user checkpoint. The planner never dispatches.

Anti-Patterns

  • Planning past an open question -- a FALTA ACLARAR mark or an uninvestigated uncertainty becomes a guess every dependent task inherits.
  • Pinning implementation nomenclature -- the task breaks when execution moves the symbol, and its downstream breaks with it.
  • Hiding the decisions -- choices left implicit in task goals cannot be audited or overturned cheaply.
  • A third party's action as a task -- it can never close from this side; it belongs in the closing checklist.
  • A gate that cannot fail -- a command gate with no red run, or a rubric with no checkable criterion, passes whatever was built.
  • Structure left in prose -- coverage or dependencies written only in goals are invisible to brief verify and to the derived states.
  • Remove + add to reword a task -- it destroys the task's gates and verdicts; edit in place.
  • Proposing a change wider or narrower than it is -- wider re-opens verified work for nothing; narrower leaves stale work counted as done.
  • Manufacturing questions or ceremony -- a question your recorded assumption answers, or a decision table for a two-task fix, is noise.

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.