coord-shape
Skill0 starsChanged 47 days agoApache-2.0View on GitHub
Create a properly shaped coord task by interviewing the user with grill-me first, then writing the task with structured plan, acceptance test, subtasks, and dependencies. Use when the user asks to shape, plan, or create a non-trivial coord task and the scope is not already crisp.
In this repository20 other files it gives its agents.
- coord-archive-indexSkill
- coord-assignSkill
- coord-auditSkill
- coord-checkSkill
- coord-dirtySkill
- coord-discardSkill
- coord-helpSkill
- coord-initSkill
- coord-loop-doctorSkill
- coord-promoteSkill
- coord-refineSkill
- coord-requeueSkill
- coord-reviewSkill
- coord-shape-reviewSkill
- coord-splitSkill
- coord-statusSkill
- coord-tokensSkill
- coord-unblockerSkill
- merge-to-mainSkill
- rebase-to-mainSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 3 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
If the request has no concrete target (file/path, route/screen, component/symbol, command, PR/branch/commit, task id, or explicit single …
- Very specific: line 38
Use the six fields from scope-brief — scope, mode, stop rule, verification, output, next route — as the shaping input.
- Distinctive: line 39
If more than one surface remains, shape a dependent task chain instead of one runnable task.
- Very specific: line 48
Should this use the default Codex route, explicit Claude assignment, explicit review, or --brainstorm?
- Very specific: line 50
If the user wants to skip grilling for a tiny task, create it directly with coord new only after the outcome, acceptance, and routing are …
- Distinctive: line 57
If net-positive: what existing complexity (env vars, configs, abstractions, feature flags, helper layers) gets retired as part of this work?
- Distinctive: line 78
If a related active task exists with the same outcome, surface it instead of creating a duplicate.
- Very specific: line 81
Write the subtask block from the grill answers to /tmp/coord-subtasks-<slug>.txt before calling coord new.
- Very specific: line 101
Never write YAML-style subtasks such as - title: ....
- Very specific: line 102
Write the acceptance criteria to /tmp/coord-acceptance-<slug>.txt.
- Very specific: line 103
Call coord new with --task, --complexity, --kind, --scope, optional --assigned/--agents, --depends_on, and …
- Very specific: line 106
Do not add roles.architect for normal work.
- Very specific: line 108
If the title or tags match money|auth|security|destructive|trading|rca|migration, coord-review requires complexity of at least complex and …
- Very specific: line 109
Use batch/multi-agent task chains only for independent lanes.
- Very specific: line 127
Run this step for any task that removes code paths — kind: code-cut, kind: refactor that drops files, or kind: code-fix whose scope deletes …
- Very specific: line 158
If it returns objections, fix them via coord update and re-run.
- Very specific: line 166
If codex CLI is unavailable: the skill warns and skips.
- Very specific: line 170
If coord-review fails here: fix and re-run — but do NOT re-run shape-review on the same content.
- Very specific: line 173
Run python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" next-subtask <id> and confirm it returns S1.
≈ “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.
Files
Goal: avoid creating broad runnable tasks or thin shaping stubs. The shaping bar in ${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files.md requires plan, acceptance test, parseable subtasks, and dependencies — fill them through coord update so the next agent can execute without rediscovering intent. Defaults for complexity, reasoning effort, models, and decomposition live in ${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files-reference.md — apply those when filling grill answers into the task.
Review findings are tasks, not edits. When any review tool (codex-loop, ultrareview, integrated review, review-security, review-code, etc.) returns findings, the default response is to TRIAGE them into a tasks/findings/<date>-<topic>.md document and SHAPE the ones worth fixing into new coord tasks via this skill. Inline fixes in the same session bypass the shaping bar (acceptance criteria, scope limits, non-negotiables, max_turns) and are the dominant compounding mode of additive bias. Single trivial one-line typo fixes may land inline; anything else requires shaping. See ${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/agent-workflow-policy.md § "Review Findings Are Tasks, Not Edits" for the cross-agent commitment.
When multi-agent (Codex + Claude) is the right shape
Multi-agent coord (roles.architect, roles.reviewer, or shape-review on top of Codex implementation) has TWO distinct values, and they should be separated when deciding task shape:
- Quality via cross-agent review. A second model catches what the first missed. This is genuinely valuable for high-risk surfaces (auth, money, security, migrations, destructive ops, more than one repo), genuinely ambiguous designs, and decisions that change global workflow.
- Audit trail and decision persistence across sessions. The coord task file holds plan, subtasks, findings, token_log, and the diff trail — visible from any session, surviving context window resets, queryable later. This is the user's stated primary reason for reaching for multi-agent.
These two values are NOT the same need. Audit trail does not require multiple tasks, multiple agents, or shape-review. A single coord task with rich subtasks, structured findings, and the standard token_log already gives full persistence and visibility. Splitting one feature across N tasks does NOT improve the audit trail; it fragments context (separate workers lose conversation history and make conflicting implicit decisions) and inflates token spend for the same end result.
Apply these defaults when shaping:
- Need audit trail, not extra quality: shape ONE coord task with 2-5 subtasks. Use
assigned: codex(orassigned: claude) and skiproles.reviewer. The task file carries the audit trail; no shape-review needed for simple single-file/single-feature work. - Need both audit trail AND quality: shape ONE coord task with
roles.reviewerto get the post-task review pass, OR pair withcoord-shape-reviewonly if the spec has cross-subtask interface contracts that mechanical review can't catch. - High-risk surface OR genuinely ambiguous design: full Codex+Claude review-rounds chain is justified. This is the exception, not the default.
Per ${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/agent-workflow-policy.md § "Two-Agent Loop Bias and Mitigation": prefer fewer tasks with rich subtask tracking over many tasks with thin tracking. The audit trail is preserved either way; the over-engineering cost only appears when you fragment.
Project-root preflight:
- Resolve the canonical project checkout before duplicate checks,
coordcommands, task-file writes, git staging, commits, or pushes:COORD_MAIN=$("${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord-project-root") && cd "$COORD_MAIN" - This is required when the skill is invoked from a sibling task worktree; shaped coord tasks belong to the main checkout that the launchd worker reads.
Workflow:
- Apply the broad-ask gate.
- If the request has no concrete target (file/path, route/screen, component/symbol, command, PR/branch/commit, task id, or explicit single surface), run
scope-brieffirst. - Use the six fields from
scope-brief— scope, mode, stop rule, verification, output, next route — as the shaping input. - If more than one surface remains, shape a dependent task chain instead of one runnable task.
- If the request has no concrete target (file/path, route/screen, component/symbol, command, PR/branch/commit, task id, or explicit single surface), run
Interview the user with grill-me.
- Invoke the
grill-meskill with the user's rough request as the topic. - Drive it until you can answer all of:
- What is the single main outcome?
- What is the final verification path (one acceptance test or
verify_commandsset)? - What 2–5 subtasks each fit one agent round and cover one major surface?
- What other active tasks does this depend on (
depends_on)? - Should this use the default Codex route, explicit Claude assignment, explicit review, or
--brainstorm? complexity(trivial/simple/complex) andkind(design/refactor/code-fix/code-cut/smoke-test/docs/review/sql-diagnostic)?
- If the user wants to skip grilling for a tiny task, create it directly with
coord newonly after the outcome, acceptance, and routing are crisp.
Mandatory subtraction questions — ask these BEFORE writing the task body. Additive bias is the dominant compounding failure mode (see
${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/agent-workflow-policy.md§ "Subtraction as the Opening Move"). Every shaped task must extract explicit answers to all four:- What existing code, if deleted, would make this change unnecessary or smaller?
- What becomes orphaned, redundant, or dead code after this lands?
- Net LOC delta target — is this task net-negative, net-zero, or net-positive? Give a band (e.g.
-800 to -1200for a cut,+50 to +200for a feature). - If net-positive: what existing complexity (env vars, configs, abstractions, feature flags, helper layers) gets retired as part of this work? If nothing, why not?
Record the four answers, in that order, as four numbered or bulleted items under a
### Subtraction analysissub-heading inside the plan file passed to--set-plan=@(see the plan-file heading rule in step 5). Include the question or a short label with each answer. Derive answers from repository evidence when the user has authorized autonomous shaping; ask only for decisions that cannot be inferred. Do not leave placeholders. The third answer must contain a numeric band such as+50 to +200,0 to 0, or-800 to -1200, also written toscope_budget.net_loc_delta_target(see step 5). The third answer is also the input that decides whetherkind: code-cutis the right shape (net-negative band → code-cut, see${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files-reference.md§ "kind").Subtask sizing. A subtask is one agent round at a natural file/module boundary: not a whole feature, and not a single bullet. Reject your own draft if any of these hold:
- Body has more than one paragraph, more than ~6 lines of prose, or describes more than one local smoke check.
- Title contains "and" joining two concrete actions ("Implement X and wire Y", "Build component and tests"). Split it.
- Touches more than ~3 files or more than one directory at a different surface (e.g. backend + frontend + docs in one subtask).
- Bundles implementation with verification ("Add feature X and run the full test suite", "Build component and capture screenshots"). Verification is its own subtask, or — if it needs simulator/browser/API rigging — its own dependent task.
- Bundles design/spec work with implementation. A spec is its own subtask or its own dependent task; the coder must not infer the design while building.
- Bundles refactor + new behavior in one subtask. Land the refactor first, then the new behavior.
When a draft subtask fails these checks on genuinely larger work (see the counter-rule below), prefer splitting into a dependent task chain rather than stretching to a 6th subtask. 5 chained narrow tasks executes more reliably than one task with 5 fat subtasks, because each task closes independently, accumulates its own findings, and benefits from the review-once-at-end gate. The chain shape (spec → component → integration → wiring → verify) is the natural shape of any non-trivial change; do not collapse it into one runnable task.
Counter-rule against over-fragmentation. The above split-into-chain preference applies to genuinely larger work — multi-day scope, parallel lanes, or dependency graphs that would block a single worker. It does NOT apply to small features. Per
${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/agent-workflow-policy.md§ "Two-Agent Loop Bias and Mitigation", rule 4: a feature owned by one person, fitting one PR, completing in under one day belongs in ONE coord task with 2-5 subtasks — not a chain of N tasks. Before splitting into a chain, ask: "would a single developer ship this in one PR?" If yes, it's one task. If the answer is no because of independent surfaces that can ship separately, then a chain is right. Token spend on shape-review across N tasks is real; do not pay it to satisfy a decomposition aesthetic.- Invoke the
- Check for duplicates, overlaps, and missing dependencies.
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" list --search="<key words>" --format=ids- Also scan recently-completed tasks in the archive (
coord listdoes not read it; done tasks are archived on close): list the newest files in thearchive_dirfromcoord paths --json(e.g.ls -t <archive_dir> | head -10), or use thecoord-archive-indexskill for keyword search. - For every active or recent task whose scope overlaps the new task's scope (same files, same surface), explicitly ask the user: "should this depend on
<id>?" Add via--depends_on=<id>if yes. - Tasks that should chain (audit → spec → rebuild → cleanup) often get created without
depends_on, breaking the precondition graph and hiding deferred items from the next agent. When in doubt, add the dependency — it's cheap to remove and expensive to retrofit after the fact. - If a related active task exists with the same outcome, surface it instead of creating a duplicate.
- Prepare and create the task.
- Write the subtask block from the grill answers to
/tmp/coord-subtasks-<slug>.txtbefore callingcoord new. Each subtask must use this exact checkbox template and carrycomplexity:,model_claude:, andmodel_codex:metadata. Multi-subtask tasks also carry deterministic handoff file paths so the worker never improvises about location:- [ ] **S1: Title** complexity: simple model_claude: sonnet model_codex: gpt-5.6-sol One focused body paragraph with the work boundary and local smoke check. Writes handoff: `.coord/handoffs/<task-id>/S1.md` listing files committed, exports added, decisions, gotchas (see task-files-reference.md for shape). Handoff to S2: <one sentence naming the specific signature, file, decision, or invariant S2 needs to start without re-discovering it>. - [ ] **S2: Title** (shown as the final subtask — omit the `Handoff to S3` line on the last subtask only) complexity: simple model_claude: sonnet model_codex: gpt-5.6-sol One focused body paragraph with the work boundary and local smoke check. Reads handoff: `.coord/handoffs/<task-id>/S1.md`. Writes handoff: `.coord/handoffs/<task-id>/S2.md`. - The
<task-id>placeholder in the Writes/Reads handoff lines is substituted with the actual id aftercoord newreturns it. The worker treats these paths as authoritative — no scanning the task file for handoff blocks. Handoff files are committed alongside the subtask's code changes. Every subtask writes a handoff file (no exemption for S1 or the final subtask); only the final subtask omits theHandoff to S<N+1>line because there is no next subtask. TheHandoff to S<N+1>sentence is the shaper's job — only the shaper has the cross-subtask picture, so the worker for S<N>never has to guess what S<N+1> needs. - Subtask sizing per
${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/agent-workflow-policy.md§ "Two-Agent Loop Bias and Mitigation" rule 4 + 6: prefer 2-5 subtasks each grouping 2-3 related concerns at a natural file/module boundary, not many one-bullet subtasks. The handoff file is the compression layer between cold-start subtask workers. - Never write YAML-style subtasks such as
- title: ...;coordrejects them. - Write the acceptance criteria to
/tmp/coord-acceptance-<slug>.txt. - Call
coord newwith--task,--complexity,--kind,--scope, optional--assigned/--agents,--depends_on, and--set-subtasks=@/tmp/coord-subtasks-<slug>.txt. kindselection from the subtraction analysis. The third grill question (net LOC band) is the input. A net-negative band (e.g.-500 to -1500) →--kind=code-cut. A net-zero band on existing surfaces →--kind=refactor. A net-positive band →--kind=code-fixfor narrow bug-touching work, or other supported kind. Do not retrofitcode-cuton legacy tasks; it must be set explicitly when the band is net-negative.code-cuttemplate injection. When shaping with--kind=code-cut, the plan must contain the verbatim subtraction-discipline block from${COORD_TOOLS:-$HOME/Projects/coord-wright}/templates/code-cut.md, with{target_low}and{target_high_added}substituted from thescope_budget.net_loc_delta_targetband (see step 5). Write the substituted block into the plan file you pass to--set-plan=@, so the worker reads it as part of the plan body, demoting its## Non-negotiablesheading to###(step 5 heading rule). Do not otherwise paraphrase or compress — the literal text is the contract.- Do not add
roles.architectfor normal work. Architecture should already be captured by the shaping interview, subtasks, anddepends_onchain. Addroles.revieweronly when independent review is explicitly required, and addroles.architectonly when a design handoff must run after queueing. - Escalate to Claude+Codex review only when the task changes global workflow, security/auth/trading/money behavior, destructive operations, or more than one repo.
- If the title or tags match
money|auth|security|destructive|trading|rca|migration,coord-reviewrequirescomplexityof at leastcomplexand--review_rounds_max=2or higher (enforced at runtime: a reviewer rejection that reaches the cap parks the task on hold inneeds-brainstorming; without the field there is no cap). - Use batch/multi-agent task chains only for independent lanes. Each lane must have one surface, one output, and one verification path; merge with
review-integrate. - For unclear scope after grilling, use
--brainstorm; brainstorm tasks do not require--set-subtasksat creation.
- Write the subtask block from the grill answers to
Fill the remaining shaping fields immediately.
- Plan-file heading rule.
--set-planreplaces only the text under## Plan; any##line in the plan file becomes a sibling section, and every later--set-planrerun appends another copy of it (coord-reviewstill passes). Start the plan file with prose and use###for every sub-heading (### Subtraction analysis,### Non-negotiables — SUBTRACTION DISCIPLINE,### Orphan candidates after this cut,### Findings for follow-up). Rerun--set-plan=@only with the full plan file. coord update <id> --set-plan=@<file>— plan derived from grill answers (forkind: code-cut, the plan file must contain the verbatim non-negotiables block from${COORD_TOOLS:-$HOME/Projects/coord-wright}/templates/code-cut.mdwith{target_low}and{target_high_added}substituted)coord update <id> --set-acceptance-test=@<file>— final verification pathcoord update <id> --acceptance=@/tmp/coord-acceptance-<slug>.txt(one item per line; a single-line value is split on commas) — populate frontmatteracceptance:list (the handoff renderer needs this; body-only acceptance passescoord-reviewbut produces a hollow handoff card)coord update <id> --verify-commands=@<file>(one command per line, so commas inside a command survive) — machine-runnable verification commands. The worker re-runs them after any closing round; each must exit 0 and leave the worktree unchanged, or the task is demoted toreview-failed.coord update <id> --scope="path1,path2"— populate frontmatterscope:(NEVER pass shell brace-expansion like{a,b}/; coord parses comma-separated lists, not shell globs at the shell)coord update <id> --scope-creates="path1,path2"— subset ofscope:entries that this task creates; exempts them from preflight existence checkscoord update <id> --depends_on=<csv>if any dependencies surfacedcoord update <id> --scope-budget-loc="<band>"— write the net LOC delta band from the third grill question (e.g.'-800 to -1200'for a cut,'+50 to +200'for a feature). The CLI defaultsabort_if_exceeded_by_pct=50; override with--scope-budget-abort-pct=<n>when the budget needs a tighter or looser fuse. Required bycoord-reviewfor every shaped task, including0 to 0for work with no file growth. See${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files-reference.md§scope_budget.
The shaped task must also include an empty
### Findings for follow-upsub-heading at the end of the plan file passed to--set-plan. This gives the coder a clear destination for cuts/issues spotted in flight, preserving the "do not fix it, write it down" half of the subtraction-discipline non-negotiables. Cheap to add at shape time; preserves the discipline at run time.- Plan-file heading rule.
Scan for orphan candidates (when the task deletes or shrinks existing surfaces).
Run this step for any task that removes code paths —
kind: code-cut,kind: refactorthat drops files, orkind: code-fixwhose scope deletes a module. Skip it for pure-additive features.For each file/symbol in
--scopethat this task will delete or shrink, search the project for non-test callers. The exact grep depends on the project's primary language; common patterns:# TypeScript / TSX for f in <files in task scope>; do rg "from.*${f%.ts}" --type ts --type tsx -l | grep -v test done # Python for mod in <modules in task scope>; do rg "^(from|import) +${mod%.py}\b" --type py -l | grep -v test done # Generic (symbol lookup) rg --no-heading "<symbol-or-route>" -l | grep -v -E '(test|spec|__mocks__|fixtures)'Anything with zero non-test callers after the planned cut becomes an orphan candidate. Write them under a
### Orphan candidates after this cutsub-heading in the plan file, then reruncoord update --set-plan=@with the full file.For each orphan candidate, the shaper picks one of three resolutions and records it inline:
- Widen this task to include the orphan in
--scopeand the subtraction analysis. Best when the orphan is small, on the same surface, and naturally falls in the same cut. - Split into a follow-up code-cut task chained via
--depends_on. Best when the orphan is on a different surface or large enough to justify its own scope/budget. - Leave with rationale ("orphan retained because:
<reason>"). Best when the surface is intentionally preserved (public API, scheduled for a later cut, etc.). Record the reason — silent leaves are forbidden.
With orphan-candidates visible at shape time, the shaper either merges scope deliberately or splits precisely, instead of one subtask silently absorbing another's scope during the build.
- Widen this task to include the orphan in
- Run coord-review (mechanical preflight).
- Invoke the
coord-reviewskill with the task id. - If it returns objections, fix them via
coord updateand re-run. - Continue once
coord-reviewexits 0 (LGTM).
- Invoke the
- Run coord-shape-review (semantic loop) for non-trivial tasks.
- Invoke the
coord-shape-reviewskill with the task id. This catches semantic shape defects that the mechanicalcoord-reviewmisses: interface contract mismatches between subtasks and acrossdepends_ontasks, missing frontmatter the worker consumes (acceptance:/verify_commands:), acceptance↔subtask contradictions, non-negotiable↔design contradictions, fast-path/dry-run contradictions, malformedscope:lists, AND credential/secret leakage in committed task text. - Skip rules: the skill auto-skips when
complexity: trivialAND ≤1 subtask AND nodepends_onAND no reviewer/architect roles AND no high-risk keywords AND no design refs. Trust the skill's own gate. - Apply fixes via
coord update(--scope,--scope-creates,--acceptance,--verify-commands,--set-plan=@,--set-acceptance-test=@,--set-subtasks=@). Never hand-edit the task file. - Each subtask body has a hard limit of ~900 characters compact (title + body, whitespace-collapsed). If a fix bloats a subtask past that, split it or trim.
- If
codexCLI is unavailable: the skill warns and skips; proceed to step 9 anyway. Do not fail the shaping pass for missing tooling.
- Invoke the
- Re-run coord-review (final invariant).
- Semantic fixes from step 8 (especially
--set-subtasks=@and--set-plan=@) can in principle regress a mechanical gate — a new subtask body the parser can't read, a plan that drops a required field, an acceptance list shape the validator rejects. Re-runcoord-reviewand confirm exit 0 before reporting. - If
coord-reviewfails here: fix and re-run — but do NOT re-run shape-review on the same content. The semantic checks already converged; only the mechanical re-validation matters at this stage.
- Semantic fixes from step 8 (especially
- Show the user.
- Run
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" next-subtask <id>and confirm it returnsS1. If it does not, fix the subtask block before reporting the task. python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" show <id> --compactand report the id.
Notes:
- Source of truth for task shape:
${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files.md. - For trivial code fixes the user wants done now, skip this skill and do the work inline, or create a narrow fully shaped Codex task only when the user explicitly wants it queued.
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
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.

