specweave
AGENTS.md164 starsChanged 13 months agoMITView on GitHub
This is the source of the specweave npm package: a CLI plus a Claude Code plugin that plans work as increments (spec.md + ledger.jsonl) and hands it between AI tools. This file is for anyone changing SpecWeave itself; the file SpecWeave writes into user projects is src/templates/AGENTS.md.template. From GitHub alone, no local tag push: run Release & Publish on develop from the Actions tab, or gh workflow run release.yml --ref develop -f version_type=patch (or -f version=X.Y.Z). It bumps package.json, the…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- sw-autoSkill
- sw-brainstormSkill
- sw-doneSkill
- sw-doSkill
- sw-handoffSkill
- sw-incrementSkill
- sw-jevSkill
- sw-projectSkill
- sw-reviewSkill
- sw-syncSkill
- sw-teamSkill
The file
We split this AGENTS.md 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
- Distinctive: line 27
Keep files under 1,500 lines.
- Very specific: line 28
Default branch is develop.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
SpecWeave (this repository)
This is the source of the specweave npm package: a CLI plus a Claude Code plugin that plans work as increments (spec.md + ledger.jsonl) and hands it between AI tools. This file is for anyone changing SpecWeave itself; the file SpecWeave writes into user projects is src/templates/AGENTS.md.template.
Layout
| Path | What it is |
bin/specweave.js | Commander entry; each command lazily imports dist/src/cli/commands/<name>.js |
src/cli/commands/ | One file per CLI command |
src/core/tasks/ | Task parser, ledger.jsonl fold, task board, verify, AC derivation |
src/core/session/ | pickup, handoff (doc, Git capture, --push, secret scrub) |
src/core/increment/ | Increment creation, metadata, status transitions |
src/core/hooks/handlers/ | Claude Code hook handlers, reached through plugins/specweave/hooks/run.mjs |
src/sync/, src/integrations/ | GitHub, Jira and ADO sync (opt-in, only on specweave sync) |
src/templates/ | What init and update write into user projects |
skills/sw-* | The one skill source for every tool; npm run generate:skills writes the plugin copies in plugins/specweave/skills/ (never edit those) |
docs-site/ | spec-weave.com (Docusaurus); deploys from develop |
Work here
- Node 22.
npm ci, thennpm run build(tsc, dashboard, plugin copies). The CLI runs fromdist/, so rebuild before trying a command:node bin/specweave.js <cmd>. - Tests:
npm run test:unitis what CI runs (tests/unit/**). Co-locatedsrc/**/*.test.tsfiles are not in CI; run them withnpx vitest run src/<path>when you touch that code, and put new tests undertests/unit/. - Typecheck with
npx tsc --noEmit -p .before pushing. - Adding or renaming a CLI command or option: regenerate completions with
node scripts/completions/generate.mjs. initrefuses to run inside the system temp directory; use a scratch folder elsewhere to try it.- Keep files under 1,500 lines. Prefer deleting code to adapting it.
- Default branch is
develop. PRs targetdevelop.
Releasing
From GitHub alone, no local tag push: run Release & Publish on develop from the Actions tab, or gh workflow run release.yml --ref develop -f version_type=patch (or -f version=X.Y.Z). It bumps package.json, the plugin and marketplace manifests and the CHANGELOG (an ## [Unreleased] section becomes the entry; without one, the commits since the last tag are listed), commits Release X.Y.Z to develop, tags vX.Y.Z and publishes to npm through GitHub OIDC trusted publishing. Tick dry_run to bump, build and pack without pushing or publishing. If the publish fails after the push, run it again with version set to that version.
Pushing a vX.Y.Z tag still works: bump with npm run release:patch (or :minor, :major), merge to develop, tag that commit. The workflow checks the tag against package.json and publishes the same way. No local npm token is needed or used.
Project notes
- Increment state lives only in
ledger.jsonl. Never write derived state (checkboxes, board tables) back into markdown; a legacytasks.mdis read, and rewritten only byspecweave task render --write. - Hooks must stay fast and offline: no network, no Git in SessionStart, and a hook error must never block the user's tool.
- Changing an increment's status never calls a tracker. Only
specweave sync pushand the explicit close-on-complete setting do.
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.

