coord-check
Skill0 starsChanged 47 days agoApache-2.0View on GitHub
Check the configured coord task directory for tasks assigned to this agent and work on them. Use at the start of any coordinated work session.
In this repository20 other files it gives its agents.
- coord-archive-indexSkill
- coord-assignSkill
- coord-auditSkill
- coord-dirtySkill
- coord-discardSkill
- coord-helpSkill
- coord-initSkill
- coord-loop-doctorSkill
- coord-promoteSkill
- coord-refineSkill
- coord-requeueSkill
- coord-reviewSkill
- coord-shape-reviewSkill
- coord-shapeSkill
- 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
28 rules. About 0 are common, 3 are distinctive, and 25 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.
25
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Default is one. On Codex, all collapses to one because the codex exec process exits after each round.
- Very specific: line 30
If pwd -P is not exactly $COORD_MAIN, stop and report: coord-check is main-checkout only.
- Very specific: line 32
Do not cd "$COORD_MAIN" and continue from a sibling task worktree.
- Distinctive: line 38
Prefer the resolved handoff packet.
- Very specific: line 39
If startup already includes Active task id: and ## Resolved handoff packet, treat that as authoritative.
- Very specific: line 43
If MODE=id: use $ARGUMENTS as <id> directly.
- Very specific: line 45
Read changes_file from coord paths --json.
- Very specific: line 48
If pickup reports no runnable task for ${AGENT_ROLE}, list blocked tasks with python3 …
- Distinctive: line 51
Read the handoff packet, task Rules, prior findings, open issues, and Lessons learned.
- Distinctive: line 52
Read repo-local guidance in AGENTS.md.
- Very specific: line 53
If COORD_WRAPPER_TOKENS is unset, capture token baseline before any other coord work: BASELINE=$(bash …
- Very specific: line 56
Check subtask routing: python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" next-subtask <id>
- Very specific: line 57
If a current S<n> subtask is returned, work only that subtask in this round and remember the label for the token-log entry.
- Very specific: line 58
Do the scoped work, write findings to "${COORD_AGENT_FINDING_FILE:-/tmp/${AGENT_ROLE}-finding-<id>.txt}", then update the task via coord …
- Very specific: line 61
Commit agent code edits before the final status update: After scoped work and the finding file are ready, but before the status-changing …
- Very specific: line 66
Check the round_role field in the pickup payload first (values: coder, reviewer, architect.
- Very specific: line 72
If next-subtask returns an S<n> (subtasks remain — rare under review-once-at-end, but defensive): coord update <id> --status=pending …
- Very specific: line 73
If next-subtask returns no remaining work: coord update <id> --status=review-passed (no --force.
- Very specific: line 79
If the round had a resolved S<n> subtask, always pass --complete-subtask=S<n> on the success update so the [ ] flips to [x].
- Very specific: line 84
Before running the resolved success command, invoke coord-commit-agent.sh as described above so code edits are committed before the …
- Very specific: line 85
Follow the resolved codex_execution_policy.success_update.command for every Codex round.
- Very specific: line 88
If the resolved handoff packet does not include codex_execution_policy.success_update, stop and report the missing policy instead of …
- Very specific: line 93
Never edit coord task files directly.
- Very specific: line 94
Follow the shared status and review-loop rules in task-files.md.
- Very specific: line 95
Do not force round caps manually.
- Very specific: line 96
Do not invent reviewer or architect handoffs.
- Very specific: line 97
If output is long, show the head and tail with a [...
- Very specific: line 98
Do not run raw git commit.
≈ “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
Entry point for the shared coord loop.
Runtime identity: determine your agent role before any other step. If you are Claude, AGENT_ROLE=claude. If you are Codex, AGENT_ROLE=codex. All status, token, and queue commands below use $AGENT_ROLE as a placeholder — substitute it literally.
Mode (parse $ARGUMENTS before any other step):
- `` (empty) or
one→MODE=one: execute exactly one round, then stop. all→MODE=all: loop rounds until pickup returnsskip, orCOORD_CHECK_MAX_ROUNDS(default 5) is reached.<task-id>(e.g.2026-05-17-my-task) →MODE=id: skip discovery; use that id directly, one round.
Default is one. On Codex, all collapses to one because the codex exec process exits after each round; queue multiple /coord-check invocations externally for multi-round Codex work.
Source of truth:
AGENTS.md${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/architecture.md${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files.md${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/claude-coordination.md${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/codex-coordination.md
Project-root preflight:
- Resolve the canonical project checkout before any pickup or update:
COORD_MAIN=$("${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord-project-root") - If
pwd -Pis not exactly$COORD_MAIN, stop and report:coord-check is main-checkout only; current directory is <cwd>, main checkout is <COORD_MAIN>. Use the launchd worker or start a main-checkout session for coord pickup. - Do not
cd "$COORD_MAIN"and continue from a sibling task worktree. Slot sessions may create, inspect, or administer coord tasks through the other coord skills, but they must not pick up runnable work or mutate active task state through/coord-check.
Workflow:
Loop control (MODE=all only): initialise ROUNDS_COMPLETED=0. After step 4 completes, increment ROUNDS_COMPLETED. If pickup returned skip during this round, exit and report Completed $ROUNDS_COMPLETED round(s); queue empty. If ROUNDS_COMPLETED has reached COORD_CHECK_MAX_ROUNDS (default 5), exit and report Stopped at round cap ($ROUNDS_COMPLETED rounds); re-run /coord-check all to continue. Otherwise go back to step 1. For MODE=one or MODE=id, run steps 1–4 once and stop.
- Prefer the resolved handoff packet.
- If startup already includes
Active task id:and## Resolved handoff packet, treat that as authoritative. - Context ladder:
show <id> --compact-> targeted file or section reads -> fullshow <id>only when a specific missing detail still blocks progress.
- If startup already includes
- Discovery path when no handoff packet was injected.
- If
MODE=id: use$ARGUMENTSas<id>directly; runshow <id> --handoffand skip precheck. Readround_rolefrom the read-onlycoord pickup --task-id=<id> --assigned=${AGENT_ROLE}JSON; if it returnsskip, treatstatus: needs-reviewasreviewer, otherwisecoder. - Otherwise: run
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" precheck --assigned=${AGENT_ROLE} - Read
changes_filefromcoord paths --json; if it exists, read it for recent diff context. - Resolve pickup:
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" pickup --assigned=${AGENT_ROLE} - On a returned task id, start with
show <id> --handoff, thenshow <id> --compact, then fullshow <id>only if a specific missing detail still blocks the work. - If pickup reports no runnable task for ${AGENT_ROLE}, list blocked tasks with
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" list --status=needs-brainstormingand report them.
- If
- Work the active task.
- Read the handoff packet, task Rules, prior findings, open issues, and Lessons learned.
- Read repo-local guidance in
AGENTS.md. UseCLAUDE.mdas supplementary context when present. - If
COORD_WRAPPER_TOKENSis unset, capture token baseline before any other coord work:BASELINE=$(bash "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord-tokens.sh" --agent=${AGENT_ROLE} --count 2>/dev/null || echo 0). Save it for step 4. IfCOORD_WRAPPER_TOKENSis set, skip this; the wrapper owns token capture. - Mark in progress (coder / architect rounds only):
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" update <id> --status=${AGENT_ROLE}-working. Skip this for reviewer rounds —needs-review → ${AGENT_ROLE}-workingis not inVALID_TRANSITIONSand will exit 3. Reviewer rounds stay atneeds-reviewuntil the finalreview-passed/review-failed/pendingtransition in step 4. - Capture the pre-agent git status immediately (after marking in progress for coder/architect, or at this point for reviewer rounds that skipped the mark). If the wrapper already provided
COORD_BASE_GIT_STATUS_FILE, reuse it; otherwise create the manual sidecar and saveBASE_GIT_STATUS_FILEfor step 4:BASE_GIT_STATUS_FILE="${COORD_BASE_GIT_STATUS_FILE:-.coord/work-base-<id>.txt}"; mkdir -p "$(dirname "$BASE_GIT_STATUS_FILE")"; if [[ -z "${COORD_BASE_GIT_STATUS_FILE:-}" ]] && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then git status --porcelain --untracked-files=all > "$BASE_GIT_STATUS_FILE"; elif [[ -z "${COORD_BASE_GIT_STATUS_FILE:-}" ]]; then : > "$BASE_GIT_STATUS_FILE"; fi - Check subtask routing:
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" next-subtask <id> - If a current
S<n>subtask is returned, work only that subtask in this round and remember the label for the token-log entry. - Do the scoped work, write findings to
"${COORD_AGENT_FINDING_FILE:-/tmp/${AGENT_ROLE}-finding-<id>.txt}", then update the task viacoord update.
- Finish or hand off.
- Commit agent code edits before the final status update. After scoped work and the finding file are ready, but before the status-changing
coord update, run:COORD_TASK_ID=<id> COORD_AGENT=${AGENT_ROLE} COORD_BASE_GIT_STATUS_FILE="${COORD_BASE_GIT_STATUS_FILE:-${BASE_GIT_STATUS_FILE:?missing base status file}}" bash "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord-commit-agent.sh". If the helper exits non-zero, stop before the final status update and report that uncommitted work remains for human recovery. - Token capture. If
COORD_WRAPPER_TOKENSis set, do not callcoord-tokens.shand do not pass--add-tokens-*; the launchd wrapper owns token capture and avoids duplicate rows. IfCOORD_WRAPPER_TOKENSis unset, capture and report tokens on the finalcoord updateof the round only — the call that changes status. For the reviewer 2-step pattern (append finding, then set status), the status call is the final one; do NOT attach token flags to the finding-only call.coord-tokens.sh --since="$BASELINE"returns cumulative usage since the baseline, so attaching it to both calls double-counts.- If
AGENT_ROLE=claudeandCOORD_WRAPPER_TOKENSis unset: before the final status update, run:TOKENS=$(bash "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord-tokens.sh" --agent=claude --since="$BASELINE" 2>/dev/null || echo 0). Pass--add-tokens-claude="$TOKENS"to the final update, and label the row's Stage column via--subtask: pass--subtask=S<n>for a subtask coder round,--subtask=reviewfor a reviewer round,--subtask=archfor an architect round, and omit--subtaskfor a coder round with no subtask. - If
AGENT_ROLE=codexandCOORD_WRAPPER_TOKENSis unset: before the final status update, run:TOKENS=$(bash "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord-tokens.sh" --agent=codex --since="$BASELINE" 2>/dev/null || echo 0). Pass--add-tokens-codex="$TOKENS"to the final update, and label the row's Stage column via--subtask: pass--subtask=S<n>for a subtask coder round,--subtask=reviewfor a reviewer round,--subtask=archfor an architect round, and omit--subtaskfor a coder round with no subtask.
- If
- If
AGENT_ROLE=claude:- Check the
round_rolefield in the pickup payload first (values:coder,reviewer,architect; forMODE=idsee step 2). - For every Claude role below, invoke
coord-commit-agent.shbefore the final status update. Reviewer rounds still append the finding first; the helper runs between that finding append and the status update. round_role=reviewer(Claude is the explicit designated reviewer):- Always append your finding first, then set status — two separate
coord updatecalls. Write the finding with--append-claude-findingbefore running the status update. If the turn cap hits between the two steps, the worker can auto-recover from an approved finding; it cannot recover from a missing one. - Before the status update, check remaining subtasks:
python3 "${COORD_TOOLS:-$HOME/Projects/coord-wright}/bin/coord" next-subtask <id>. - Review passes:
- If
next-subtaskreturns anS<n>(subtasks remain — rare under review-once-at-end, but defensive):coord update <id> --status=pending --assigned=<coder>to advance the chain instead of closing. - If
next-subtaskreturns no remaining work:coord update <id> --status=review-passed(no--force; the close gate verifies every subtask is[x]).
- If
- Review fails → first
coord update <id> --append-claude-finding "Outcome: REJECT. Root cause: ...", thencoord update <id> --status=review-failed. Include aRoot cause:line in the finding. - Scope and YAGNI check (owned by the reviewer, not the coder). Compute the task's actual net LOC (
git diff --numstat <baseline>..HEAD -- <scope paths>) and compare it withscope_budget.net_loc_delta_targetwhen present. The number alone is never the verdict for a positive band: overshoot with a plausible reason in the coder findings and clean code is APPROVE with a one-linescope: actual +N vs target <band>note. REJECT on bloat, using the list inagent-workflow-policy.md§ "YAGNI / KISS During Implementation": speculative abstractions, unused configuration, defensive wrappers, tests for out-of-scope code, duplicated helpers, half-finished paths. A negative band (code-cut,refactor) is a hard criterion: net LOC above the band's upper bound is REJECT unless the finding explains exactly which cut was impossible. - Do not pass
--forceon--status=review-passed.--forceis a human escape hatch (cancel a stuck task), not a normal review handoff. The CLI refuses to close while any[ ]subtask remains — that refusal is the safety net.
- Always append your finding first, then set status — two separate
round_role=architect: this should only occur for explicit architect roles. Persist executable subtasks or a concrete plan, then hand to Codex with--status=pending --assigned=codex.round_role=coder:- If the round had a resolved
S<n>subtask, always pass--complete-subtask=S<n>on the success update so the[ ]flips to[x]. Write the subtask'sWrites handoff:file (.coord/handoffs/<id>/S<n>.md) first: the update exits 3 while it is missing. - Subtasks remain after this one:
--status=pending --assigned=<self>(advance to the next subtask). Skip review until the chain ends. - Last subtask done and
roles.revieweris set:--status=needs-review --assigned=<reviewer>. - Last subtask done and no reviewer:
--status=review-passed(no--force).
- If the round had a resolved
- Check the
- If
AGENT_ROLE=codex:- Before running the resolved success command, invoke
coord-commit-agent.shas described above so code edits are committed before the task-file status update. - Follow the resolved
codex_execution_policy.success_update.commandfor every Codex round. It is authoritative for coder, reviewer, architect, subtask, and full-task transitions. - Replace
@<file>in that command with"${COORD_AGENT_FINDING_FILE:-/tmp/codex-finding-<id>.txt}". Preserve an already-resolved finding path in the command. - Under launchd (
COORD_WRAPPER_TOKENSset), do not add--add-tokens-codexor--subtaskfor the token row. Token capture for wrapper-run Codex rounds is the worker's job (it parses real numbers from stdout and labels them with the current subtask). In a manual/coord-checksession (COORD_WRAPPER_TOKENSunset), add the--add-tokens-codex="$TOKENS"and token-stage--subtask=...flags described above to the final status update. The--complete-subtask=S<n>argument already in the resolved success command is unrelated to token rows — keep it as written. - If the resolved handoff packet does not include
codex_execution_policy.success_update, stop and report the missing policy instead of guessing a handoff.
- Before running the resolved success command, invoke
- Never use
status=review,status=review-passed, orstatus=review-faileddirectly. These are internal coord transient states —review-passedandreview-failedare command aliases (run viacoord update --status=review-passed), not status values you write.reviewis not a valid status at all.
- Commit agent code edits before the final status update. After scoped work and the finding file are ready, but before the status-changing
Rules:
- Never edit coord task files directly; use
coord update. - Follow the shared status and review-loop rules in
task-files.md; useneeds-brainstormingwhen appropriate. - Do not force round caps manually. If
coordescalates toneeds-brainstorming, stop there and report it. - Do not invent reviewer or architect handoffs. Follow explicit
rolesand the resolved pickup policy. - If output is long, show the head and tail with a
[... N lines truncated ...]marker and always keep FAIL/WARN lines. - Do not run raw
git commit; callbin/coord-commit-agent.shas described above so agent code edits are committed before the finalcoord update, and letcoord updateown task-file commits.
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.

