coord-init
Skill0 starsChanged 47 days agoApache-2.0View on GitHub
Create or populate a project's AGENTS.md by scanning the repo and interviewing the user. Use when registering a new project with CoordWright or when AGENTS.md is missing the standard structure.
- Commits and pushes
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-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
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use those signals to prefill your proposed answers so the user only confirms or corrects — never ask an open "tell me about your project" …
- Distinctive: line 30
Wait for the user's answer.
- Distinctive: line 47
Wait for the user's answer.
- Distinctive: line 114
If an existing AGENTS.md already has user-edited sections, leave those untouched and only fill in the missing sections.
- Distinctive: line 125
Do not ask for further confirmation before writing.
≈ “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
You are creating the AGENTS.md for this project. If a file already exists, treat any present section as the user's confirmed content unless the user asks to rewrite it. If no file exists, generate one from scratch using the three interview answers below plus the constant sections defined in "Write the result".
Project-root preflight:
- Resolve the canonical project checkout before scanning, editing, staging, committing, or pushing:
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; project bootstrap policy belongs in the main checkout.
Before you ask anything: scan the repo root for signals: top-level directories, language/build manifests and test targets, migration directories, container files, and notable domain dependencies (broker, payment, messaging SDKs).
Use those signals to prefill your proposed answers so the user only confirms or corrects — never ask an open "tell me about your project" prompt.
Q1 — What This Repo Is
State what you detected, then propose one paragraph. The example below is illustrative (a trading project); match the shape, not the content:
"I see: FastAPI backend with
ibapi(IBKR trading), Alembic migrations, Postgres, React frontend with Playwright, aworker/process, and ademo/directory.Proposed: An automated stock-trading control room: a FastAPI backend that submits orders to Interactive Brokers, a worker process that runs a strategy lifecycle, a React operator UI for approvals and monitoring, and a Postgres-backed event store with Alembic migrations.
Confirm, or edit?"
Wait for the user's answer. Record their final paragraph as the "What This Repo Is" content.
Q2 — Repo Map
List the top-level directories you found (excluding hidden dirs, node_modules, __pycache__, dist/build dirs). Propose one bullet per directory with a short description inferred from its contents. Illustrative example:
"Proposed Repo Map:
backend/— FastAPI app, Alembic migrations, unit testsfrontend/— React + Playwright e2eworker/— background strategy executordemo/— standalone demo with no live API dependencydocs/— project docs and coordination notesConfirm, edit, or drop any entries?"
Wait for the user's answer.
Q3 — Validation
Propose the validation commands based on what you detected:
- Python project with
pytest→cd backend && pytest(or wherever tests live) - Node/npm with Playwright →
npm run build && npm run test:e2e - Maven →
mvn -q test - Makefile with test target →
make test - Healthz endpoint pattern detected → include
curl --fail <url>
Illustrative example:
"Proposed Validation:
- Backend:
cd backend && pytest- Frontend:
cd frontend && npm run build && npm run test:e2e- Post-deploy:
curl --fail http://127.0.0.1:8000/api/v1/system/healthzConfirm, edit, or add steps?"
Wait for the user's answer.
Write the result
Once all three answers are confirmed, write AGENTS.md with this structure:
# <project> Agent Guide
This file is the repo-local guide for coding agents working in `<project>`.
## What This Repo Is
<Q1 paragraph>
## Companion Context
- [README.md](README.md) — human quickstart
- [CLAUDE.md](CLAUDE.md) — pointer to this file (`@AGENTS.md`)
Shared coord protocol is loaded automatically by the global trigger when coord work is in scope. For coord behavior, use `${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/coordination.md`, `${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/codex-coordination.md`, and `${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files.md`. For shared workflow policy (broad-ask gate, dual-agent escalation, markdown artifact rules), use `${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/agent-workflow-policy.md` and `${COORD_TOOLS:-$HOME/Projects/coord-wright}/docs/task-files-reference.md`.
## Project-Specific Rules
- For broad requests, use `scope-brief` first. If the ask has no concrete target (file, route, artifact, command, task id, or explicit single surface), do not call review/implementation specialists yet; shape a narrow request, then route.
- For review requests with a known surface, start with `review-code`, `review-ui`, or `review-security`; load narrower skills only when that surface is confirmed.
<!-- TODO: add project-specific domain rules here as they emerge. Run coord-refine after week 4 to populate high-risk shaping, reasoning baseline overrides, and model selection. -->
## Repo Map
<Q2 bullets>
## Validation
<Q3 commands>
## Documentation Maintenance
- Update [README.md](README.md) when the human quickstart changes.
- Update this AGENTS.md when project-specific rules, repo map, or validation expectations change.If an existing AGENTS.md already has user-edited sections, leave those untouched and only fill in the missing sections. Always preserve the broad-ask gate exactly once.
Also ensure CLAUDE.md exists and contains @AGENTS.md so Claude Code loads this guide. If CLAUDE.md is absent, create it with that single line.
After writing:
- Validate — scan the written file and confirm: all major headings present, shared broad-ask gate present exactly once, no
<Q1>/<Q2>/<Q3>placeholders remaining. - Stage and commit —
git add AGENTS.md CLAUDE.md, then commit with messagedocs: populate AGENTS.md via coord-init. Pass via heredoc. Append trailerCo-Authored-By: coord-bot <noreply@coord.local>. - Push —
git push. Stop on non-zero. - Report — one line: "AGENTS.md written — 3 sections populated, shared broad-ask gate installed, project-specific policy left for coord-refine. Committed and pushed."
Do not ask for further confirmation before writing. The user has already confirmed each section.
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.

