nitm-ai-dev-toolkit 5.0.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +4 -4
- package/bin/cli.js +38 -1
- package/package.json +1 -1
- package/src/monorepo/.agents/skills/factory/SKILL.md +48 -32
- package/src/monorepo/{.claude/agents-snippets/factory-approver.md → .agents/skills/factory/roles/approve.md} +3 -3
- package/src/monorepo/{.claude/agents-snippets/factory-builder.md → .agents/skills/factory/roles/build.md} +3 -3
- package/src/monorepo/{.claude/agents-snippets/factory-reviewer-code.md → .agents/skills/factory/roles/review-code.md} +5 -5
- package/src/{repo/.claude/agents-snippets/factory-reviewer-security.md → monorepo/.agents/skills/factory/roles/review-security.md} +4 -4
- package/src/monorepo/{.claude/agents-snippets/factory-reviewer-ui.md → .agents/skills/factory/roles/review-ui.md} +6 -6
- package/src/monorepo/{.claude/agents-snippets/factory-reviewer-ux.md → .agents/skills/factory/roles/review-ux.md} +6 -6
- package/src/monorepo/{.claude/agents-snippets/factory-spec-writer.md → .agents/skills/factory/roles/spec.md} +2 -2
- package/src/monorepo/.claude/agents/implementer.agent.md +1 -1
- package/src/monorepo/.claude/agents/planner.agent.md +1 -1
- package/src/monorepo/.claude/agents/reviewer.agent.md +1 -1
- package/src/monorepo/.claude/commands/factory.md +8 -8
- package/src/monorepo/.claude/prompt-snippets/bootstrap-patch.md +2 -2
- package/src/monorepo/.claude/prompt-snippets/bootstrap-upgrade.md +2 -2
- package/src/monorepo/.claude/prompt-snippets/bootstrap.md +2 -2
- package/src/monorepo/.claude/prompt-snippets/factory.md +2 -2
- package/src/monorepo/.cursor/commands/factory.md +8 -8
- package/src/monorepo/.github/prompts/factory.prompt.md +8 -8
- package/src/monorepo/.opencode/agents/admin-portal.md +0 -3
- package/src/monorepo/.opencode/agents/api-specialist.md +0 -3
- package/src/monorepo/.opencode/agents/backend-architect.md +0 -3
- package/src/monorepo/.opencode/agents/documenter.md +0 -3
- package/src/monorepo/.opencode/agents/feature-builder.md +0 -3
- package/src/monorepo/.opencode/agents/frontend-developer.md +0 -3
- package/src/monorepo/.opencode/agents/green.md +0 -3
- package/src/monorepo/.opencode/agents/implementer.md +0 -3
- package/src/monorepo/.opencode/agents/planner.md +0 -3
- package/src/monorepo/.opencode/agents/red.md +0 -3
- package/src/monorepo/.opencode/agents/refactor.md +0 -3
- package/src/monorepo/.opencode/agents/researcher.md +0 -3
- package/src/monorepo/.opencode/agents/reviewer.md +0 -3
- package/src/monorepo/.opencode/agents/tdd.md +0 -3
- package/src/monorepo/.opencode/commands/factory.md +9 -9
- package/src/monorepo/AGENTS.md +3 -3
- package/src/monorepo/README.md +2 -2
- package/src/monorepo/factory/README.md +12 -10
- package/src/repo/.agents/skills/factory/SKILL.md +48 -32
- package/src/repo/{.claude/agents-snippets/factory-approver.md → .agents/skills/factory/roles/approve.md} +3 -3
- package/src/repo/{.claude/agents-snippets/factory-builder.md → .agents/skills/factory/roles/build.md} +3 -3
- package/src/repo/{.claude/agents-snippets/factory-reviewer-code.md → .agents/skills/factory/roles/review-code.md} +5 -5
- package/src/{monorepo/.claude/agents-snippets/factory-reviewer-security.md → repo/.agents/skills/factory/roles/review-security.md} +4 -4
- package/src/repo/{.claude/agents-snippets/factory-reviewer-ui.md → .agents/skills/factory/roles/review-ui.md} +6 -6
- package/src/repo/{.claude/agents-snippets/factory-reviewer-ux.md → .agents/skills/factory/roles/review-ux.md} +6 -6
- package/src/repo/{.claude/agents-snippets/factory-spec-writer.md → .agents/skills/factory/roles/spec.md} +2 -2
- package/src/repo/.claude/agents/implementer.agent.md +1 -1
- package/src/repo/.claude/agents/planner.agent.md +1 -1
- package/src/repo/.claude/agents/reviewer.agent.md +1 -1
- package/src/repo/.claude/commands/factory.md +8 -8
- package/src/repo/.claude/prompt-snippets/bootstrap-patch.md +2 -2
- package/src/repo/.claude/prompt-snippets/bootstrap-upgrade.md +2 -2
- package/src/repo/.claude/prompt-snippets/bootstrap.md +2 -2
- package/src/repo/.claude/prompt-snippets/factory.md +2 -2
- package/src/repo/.cursor/commands/factory.md +8 -8
- package/src/repo/.github/prompts/factory.prompt.md +8 -8
- package/src/repo/.opencode/agents/admin-portal.md +0 -3
- package/src/repo/.opencode/agents/api-specialist.md +0 -3
- package/src/repo/.opencode/agents/backend-architect.md +0 -3
- package/src/repo/.opencode/agents/documenter.md +0 -3
- package/src/repo/.opencode/agents/feature-builder.md +0 -3
- package/src/repo/.opencode/agents/frontend-developer.md +0 -3
- package/src/repo/.opencode/agents/green.md +0 -3
- package/src/repo/.opencode/agents/implementer.md +0 -3
- package/src/repo/.opencode/agents/planner.md +0 -3
- package/src/repo/.opencode/agents/red.md +0 -3
- package/src/repo/.opencode/agents/refactor.md +0 -3
- package/src/repo/.opencode/agents/researcher.md +0 -3
- package/src/repo/.opencode/agents/reviewer.md +0 -3
- package/src/repo/.opencode/agents/tdd.md +0 -3
- package/src/repo/.opencode/commands/factory.md +9 -9
- package/src/repo/AGENTS.md +3 -3
- package/src/repo/README.md +2 -2
- package/src/repo/factory/README.md +12 -10
- package/src/monorepo/.claude/agents/factory-approver.agent.md +0 -12
- package/src/monorepo/.claude/agents/factory-builder.agent.md +0 -12
- package/src/monorepo/.claude/agents/factory-reviewer-code.agent.md +0 -12
- package/src/monorepo/.claude/agents/factory-reviewer-security.agent.md +0 -12
- package/src/monorepo/.claude/agents/factory-reviewer-ui.agent.md +0 -12
- package/src/monorepo/.claude/agents/factory-reviewer-ux.agent.md +0 -12
- package/src/monorepo/.claude/agents/factory-spec-writer.agent.md +0 -12
- package/src/monorepo/.cursor/agents/factory-approver.agent.md +0 -11
- package/src/monorepo/.cursor/agents/factory-builder.agent.md +0 -11
- package/src/monorepo/.cursor/agents/factory-reviewer-code.agent.md +0 -11
- package/src/monorepo/.cursor/agents/factory-reviewer-security.agent.md +0 -11
- package/src/monorepo/.cursor/agents/factory-reviewer-ui.agent.md +0 -11
- package/src/monorepo/.cursor/agents/factory-reviewer-ux.agent.md +0 -11
- package/src/monorepo/.cursor/agents/factory-spec-writer.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-approver.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-builder.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-reviewer-code.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-reviewer-security.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-reviewer-ui.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-reviewer-ux.agent.md +0 -11
- package/src/monorepo/.github/agents/factory-spec-writer.agent.md +0 -11
- package/src/monorepo/.opencode/agents/factory-approver.md +0 -20
- package/src/monorepo/.opencode/agents/factory-builder.md +0 -20
- package/src/monorepo/.opencode/agents/factory-reviewer-code.md +0 -20
- package/src/monorepo/.opencode/agents/factory-reviewer-security.md +0 -20
- package/src/monorepo/.opencode/agents/factory-reviewer-ui.md +0 -20
- package/src/monorepo/.opencode/agents/factory-reviewer-ux.md +0 -20
- package/src/monorepo/.opencode/agents/factory-spec-writer.md +0 -20
- package/src/repo/.claude/agents/factory-approver.agent.md +0 -12
- package/src/repo/.claude/agents/factory-builder.agent.md +0 -12
- package/src/repo/.claude/agents/factory-reviewer-code.agent.md +0 -12
- package/src/repo/.claude/agents/factory-reviewer-security.agent.md +0 -12
- package/src/repo/.claude/agents/factory-reviewer-ui.agent.md +0 -12
- package/src/repo/.claude/agents/factory-reviewer-ux.agent.md +0 -12
- package/src/repo/.claude/agents/factory-spec-writer.agent.md +0 -12
- package/src/repo/.cursor/agents/factory-approver.agent.md +0 -11
- package/src/repo/.cursor/agents/factory-builder.agent.md +0 -11
- package/src/repo/.cursor/agents/factory-reviewer-code.agent.md +0 -11
- package/src/repo/.cursor/agents/factory-reviewer-security.agent.md +0 -11
- package/src/repo/.cursor/agents/factory-reviewer-ui.agent.md +0 -11
- package/src/repo/.cursor/agents/factory-reviewer-ux.agent.md +0 -11
- package/src/repo/.cursor/agents/factory-spec-writer.agent.md +0 -11
- package/src/repo/.github/agents/factory-approver.agent.md +0 -11
- package/src/repo/.github/agents/factory-builder.agent.md +0 -11
- package/src/repo/.github/agents/factory-reviewer-code.agent.md +0 -11
- package/src/repo/.github/agents/factory-reviewer-security.agent.md +0 -11
- package/src/repo/.github/agents/factory-reviewer-ui.agent.md +0 -11
- package/src/repo/.github/agents/factory-reviewer-ux.agent.md +0 -11
- package/src/repo/.github/agents/factory-spec-writer.agent.md +0 -11
- package/src/repo/.opencode/agents/factory-approver.md +0 -20
- package/src/repo/.opencode/agents/factory-builder.md +0 -20
- package/src/repo/.opencode/agents/factory-reviewer-code.md +0 -20
- package/src/repo/.opencode/agents/factory-reviewer-security.md +0 -20
- package/src/repo/.opencode/agents/factory-reviewer-ui.md +0 -20
- package/src/repo/.opencode/agents/factory-reviewer-ux.md +0 -20
- package/src/repo/.opencode/agents/factory-spec-writer.md +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [5.1.0] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Factory runs on the native `planner`, `implementer`, and `reviewer` agents instead of seven `factory-*` agents. Each role's Factory rules (outputs, evidence, verdict format, escalation triggers) moved into role briefs in `.agents/skills/factory/roles/`. Reviewers and the approver return their report, and the orchestrator saves it as `round-<N>/review-<lens>.md` or `decision.md`. The gates, verdicts, approval rules, and rework flow are unchanged.
|
|
15
|
+
- `doctor` lists the removed `factory-*` files as stale toolkit files (matched by path and content hash) and never deletes them. The OpenCode `factory-*` agents also match their 5.0.0 hashes, not only 5.0.1.
|
|
16
|
+
- Factory dispatch states that the role brief overrides the dispatched agent's default output format and file-writing rules, and the reply's first line follows the brief.
|
|
17
|
+
- The Claude `planner` agent gets `Glob` and `Bash(*)` (plan mode deletes a stale `tasks.md`); `implementer` and `reviewer` get `Glob`.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- The seven `factory-*` agents (spec writer, builder, code, security, ux, and ui reviewers, approver) and their `.claude/agents-snippets/` prompts, from `.claude/agents/`, `.cursor/agents/`, `.github/agents/`, `.opencode/agents/`, and `.claude/agents-snippets/` in both templates.
|
|
22
|
+
- `request.body.temperature` from every OpenCode agent file, and the AGENTS.md guidance that set it. The current OpenCode runner does not send it.
|
|
23
|
+
|
|
24
|
+
### Migration
|
|
25
|
+
|
|
26
|
+
- Run `patch` in each installed project, then run `doctor`. It lists the old `factory-*` files as stale. Check each listed file, then delete it by hand. Doctor does not delete anything.
|
|
27
|
+
|
|
28
|
+
## [5.0.1] - 2026-10-21
|
|
29
|
+
|
|
10
30
|
### Added
|
|
11
31
|
|
|
12
32
|
- `patch --dry-run`, persisted `--exclude`/`--only` selections in `.nitm/toolkit.json`, version pinning for `upgrade <version>`/`--version`, and `.toolkit-version` plus `.nitm/manifest.json` state tracking. `doctor` now reports version mismatches, stale files without deleting them, and supports a placeholder allowlist.
|
package/README.md
CHANGED
|
@@ -222,7 +222,7 @@ For existing targets, back up and obtain approval before removing only known obs
|
|
|
222
222
|
|
|
223
223
|
| Setting | Native V2 form |
|
|
224
224
|
| --- | --- |
|
|
225
|
-
| Agents | `agents`, JSON `system` (Markdown body for file agents),
|
|
225
|
+
| Agents | `agents`, JSON `system` (Markdown body for file agents), model `provider/model#variant` |
|
|
226
226
|
| Permissions | Ordered `permissions` with `action`, `resource`, `effect`; `shell`/`subagent` actions; last match wins |
|
|
227
227
|
| Commands | `commands`; delegated commands use `subagent` |
|
|
228
228
|
| Plugins | `plugins`; options use `{ "package": "…", "options": {} }` |
|
|
@@ -231,7 +231,7 @@ For existing targets, back up and obtain approval before removing only known obs
|
|
|
231
231
|
|
|
232
232
|
Follow official V2 [migration](https://opencode.ai/v2/docs/migrate-v1), [config](https://opencode.ai/v2/docs/config), [agents](https://opencode.ai/v2/docs/agents), and [plugins](https://opencode.ai/v2/docs/build/plugins) docs. The published `https://opencode.ai/config.json` schema may describe V1; it is not native V2 validation authority.
|
|
233
233
|
|
|
234
|
-
**Runtime limits:** Ambient `AGENTS.md` works. Config `instructions` entries load only when the runtime injects them (OpenChamber does; other hosts may not), so do not rely on them: write explicit "Read and follow" wrappers regardless. `@refs` are ordinary text, not automatic attachments: agents must read referenced snippets explicitly.
|
|
234
|
+
**Runtime limits:** Ambient `AGENTS.md` works. Config `instructions` entries load only when the runtime injects them (OpenChamber does; other hosts may not), so do not rely on them: write explicit "Read and follow" wrappers regardless. `@refs` are ordinary text, not automatic attachments: agents must read referenced snippets explicitly. Do not set a temperature; the current runner does not send one. Plugin/runtime integration has not been tested. Preserve `lsp: true`, but V2 currently exposes no LSP tools or diagnostics: use project lint/typecheck/compiler commands.
|
|
235
235
|
|
|
236
236
|
`--env opencode` includes minimal shared references for wrappers and AGENTS-linked standards without activating other harnesses. Merge, don't clobber: back up V1, preserve models/providers and user/global plugins, and ask before changes. Native-converted files are **incompatible with V1**. Activate on the next run/restart, then check behavior with the installed V2 runtime. `doctor` checks scaffold files/placeholders, not runtime behavior; do not substitute a V1 API/schema fetch or claim checks that were not run.
|
|
237
237
|
|
|
@@ -318,7 +318,7 @@ Templates use `{{PLACEHOLDER}}` syntax for values you need to customize. The boo
|
|
|
318
318
|
|
|
319
319
|
### Factory Placeholders
|
|
320
320
|
|
|
321
|
-
Used by the opt-in factory (`.agents/skills/factory/SKILL.md` and `.
|
|
321
|
+
Used by the opt-in factory (`.agents/skills/factory/SKILL.md` and `.agents/skills/factory/roles/*.md`).
|
|
322
322
|
|
|
323
323
|
| Placeholder | Description | Example |
|
|
324
324
|
| --------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ |
|
|
@@ -660,7 +660,7 @@ The factory is an opt-in pipeline for feature-sized work. One orchestrator takes
|
|
|
660
660
|
|
|
661
661
|
It runs alongside Feature Builder and TDD and does not replace them. Nothing runs until you invoke `/factory`. Quick fixes stay direct.
|
|
662
662
|
|
|
663
|
-
- **Agents:** `
|
|
663
|
+
- **Agents:** `planner` (spec and plan), `implementer` (build, repair, and rework), and `reviewer` (the code, security, ux, and ui lenses, and approval, each in the mode its dispatch names). The native agents ship for Claude Code, GitHub Copilot, Cursor, and OpenCode. Each role's Factory rules are in `.agents/skills/factory/roles/`. Codex runs those briefs directly.
|
|
664
664
|
- **Setup and reference:** [`src/repo/factory/README.md`](src/repo/factory/README.md) (the monorepo copy is in `src/monorepo/factory/`). The installer copies `factory/` into your project.
|
|
665
665
|
|
|
666
666
|
| Command | What it does |
|
package/bin/cli.js
CHANGED
|
@@ -76,6 +76,43 @@ const HARNESS_OWNED = {
|
|
|
76
76
|
// test/data/ponytail-3.0.23.mjs.fixture holds that exact content.
|
|
77
77
|
const KNOWN_HISTORICAL = {
|
|
78
78
|
'.opencode/plugins/ponytail.mjs': ['3ca6fe6e560da71109af7e40ed04ca47aa22219e4c9edf674bf895acadce8605'],
|
|
79
|
+
// factory-* agents and their snippets, removed in 5.1.0 (repo and monorepo versions of each file).
|
|
80
|
+
// The .opencode/agents entries also carry the 5.0.0 hash (5.0.1 changed them).
|
|
81
|
+
'.claude/agents/factory-spec-writer.agent.md': ['7d12cd197d71cd52d31d4e17f756abd984c012c786cff8c23465b637e2c1cb30'],
|
|
82
|
+
'.cursor/agents/factory-spec-writer.agent.md': ['03c70de3a9b570972ff14e5dcd946b22948fb216e075452df46ccd4f4bd457cf'],
|
|
83
|
+
'.github/agents/factory-spec-writer.agent.md': ['76f87fe65a7a552f4645d67b375c464943fe2d92bcbfac4a91d8880cb726b4b2'],
|
|
84
|
+
'.opencode/agents/factory-spec-writer.md': ['591ba39990f2037f0093b2aaf5a178c269c5b4d723a8dcf61a6a3cbb350ce1cc', '2c778565cbe80f0d610e886f2c150ad9a6478a60c8e7653eb7ece8fe1b7d85d7'],
|
|
85
|
+
'.claude/agents-snippets/factory-spec-writer.md': ['cdb34e0195981008c0962df78bcdbe2c53e04ef930e0d1d456e02162d4553528', '4644730e83f4ae5eb7b5b8b78021cb9cd9db81bdbc32fcfb745251a8326343b0'],
|
|
86
|
+
'.claude/agents/factory-builder.agent.md': ['8cc3434f6ee7e1a24098f15428f0810bfe0421288992b1bf4783d4304e0ee999'],
|
|
87
|
+
'.cursor/agents/factory-builder.agent.md': ['4e14b4588baf99bc98437bf85ce3fc67bf94a30fa0243c7e7cf67c716e75a852'],
|
|
88
|
+
'.github/agents/factory-builder.agent.md': ['1f7998713df8f5163ea231ce37103cd8be5f757ffa8b8145888dbc889a202807'],
|
|
89
|
+
'.opencode/agents/factory-builder.md': ['d35fde702d4e8f3876f5f3bbe3b1dd5c16b0f20b375a9b6c6ad0508e0a8b773e', '87e2d9bcc4b4bb387782e202c8b26a8c0a5ca63d86a3f1f0b018698f7fc56a6c'],
|
|
90
|
+
'.claude/agents-snippets/factory-builder.md': ['08b757399ebb72b57df279cd47a9a681e285e9615151bc6354b58ceab12f45a3', '5526e25aee44ebcce73c868a65ad61221b63575466eb25f05c1f98cce5c1c36b'],
|
|
91
|
+
'.claude/agents/factory-reviewer-code.agent.md': ['b61ff8ec33b5f0fc9890046e15d6e0886d45e9a472602e75d362537a4ef8f181'],
|
|
92
|
+
'.cursor/agents/factory-reviewer-code.agent.md': ['303e314cdeb6637e6d76adc257a65095a14ff7b578f7dc8e653ccb804ce1c4ea'],
|
|
93
|
+
'.github/agents/factory-reviewer-code.agent.md': ['cd729889637f543d79d4daf9e09df07633ff66835c0412dddb5443a729bdd278'],
|
|
94
|
+
'.opencode/agents/factory-reviewer-code.md': ['bbe16860782736a8389dfb94647dfc4fb0cae1ad46617d34f4e896df29d73489', '681c93ed0432c93898f8f53f9ff78b13e6bb618f9bf8c3f0e6fb2b9083afa05e'],
|
|
95
|
+
'.claude/agents-snippets/factory-reviewer-code.md': ['92a1726bdec0d94222b08654fa8db481e1710163fd06f439019ab737bdae55c8', '44097bf782912e34eb1d0946cb9ed42be8753fea13036db8edcbb9524b7be8b2'],
|
|
96
|
+
'.claude/agents/factory-reviewer-security.agent.md': ['7685bb4a2433c7069bdf6f48b7264f46febfe905cd0a8315dd7cefeae2d77add'],
|
|
97
|
+
'.cursor/agents/factory-reviewer-security.agent.md': ['8bfce3dfbaab8d4a9d7d2b9ec2fd067214028bd8578a53af3ae0933898b0cb2e'],
|
|
98
|
+
'.github/agents/factory-reviewer-security.agent.md': ['96f0e8697dabb0567b67426214809de870e06df30c1058a4753ac3bf13cff456'],
|
|
99
|
+
'.opencode/agents/factory-reviewer-security.md': ['55895e193aec20ffcb42a7c12553116f777c91db97e107f240ab15db0d85a7c0', '9302937a79f89c703c6fdb60cfbd65985cd00e52e580786d3be0a4fe8e8ae213'],
|
|
100
|
+
'.claude/agents-snippets/factory-reviewer-security.md': ['8a4c5a411e47d5b1e50b18d40d177e931cc6bf20a96dfb4286a39719f863b37d'],
|
|
101
|
+
'.claude/agents/factory-reviewer-ux.agent.md': ['4ff8769a04fcfee2214243b5f1099e69f8fefc8760261321c1cbeb9ab796cb85'],
|
|
102
|
+
'.cursor/agents/factory-reviewer-ux.agent.md': ['00155aabea522cfa0f20a2c03d194e374958130ec8fc8bb88210ab6f2185fcfa'],
|
|
103
|
+
'.github/agents/factory-reviewer-ux.agent.md': ['2965a81ebf7d455e07c9270fc5066480e34c8168c552d0fab6602b826caaed8d'],
|
|
104
|
+
'.opencode/agents/factory-reviewer-ux.md': ['7175b4b5ca713a8b15c0909c84eb2bb6e29630ffeb90157f9e2df9b6a62a6649', 'c192cc5f1dffcfa8879a3d9ede7270e1098fa25dcd2f989627b217edc4b9446d'],
|
|
105
|
+
'.claude/agents-snippets/factory-reviewer-ux.md': ['a16b188d275f3fba1527b3ef510f61ea3bada11594488720146a8560b17efb98', '6e114305e5d18b284d7f9ececa6b64d6f06c5a272ec2651dcdaea74e81e95554'],
|
|
106
|
+
'.claude/agents/factory-reviewer-ui.agent.md': ['1107289a1429c795a7c9a8c16426692ca62593483c0ff8b6863a96de166f1cfc'],
|
|
107
|
+
'.cursor/agents/factory-reviewer-ui.agent.md': ['388b66c8368d642ccbdcb35c55a0c994d510d85b9c04b3f926806d0c1bf824de'],
|
|
108
|
+
'.github/agents/factory-reviewer-ui.agent.md': ['97aed62c6716fa96834985704dc0e34850842cbd92ceaa987acd70f42769e3dc'],
|
|
109
|
+
'.opencode/agents/factory-reviewer-ui.md': ['b1e1a5544df1cdd54fedf0a65fd54007600e29ec54a423055858780b363c6d60', 'f93c2410ac2a9d3b358ac21085dd1804e111981b8d24495c411ba06dd6aa5495'],
|
|
110
|
+
'.claude/agents-snippets/factory-reviewer-ui.md': ['7399863904241ab875cfb7862c683b1135eb4f8027a4a422e377b016007f7bf5', '0142ec37dc2306320d613b58505c31852c02f502b80c6070ff72b5eb77d8b2e1'],
|
|
111
|
+
'.claude/agents/factory-approver.agent.md': ['2de2420de55a72268f24672a92a4df0d78e133b14a9ccf62ab4e2b0b8f1c090c'],
|
|
112
|
+
'.cursor/agents/factory-approver.agent.md': ['5bc3df10f0784804bcd54fe4a3de60c6116c55d34eb85bc5be0f1417613bc25c'],
|
|
113
|
+
'.github/agents/factory-approver.agent.md': ['2a061b34802eb9b5396b76d139bbea5dd21dd89b3e5af06cf09c53c7f6897d94'],
|
|
114
|
+
'.opencode/agents/factory-approver.md': ['62dbfb689025bf79a2e8f86f7a5afb52a73e07e677ff384d26301d494c3ba21f', '35b3b45950ae1a36ebd8e8b7d46d8499ed427a138d422457a72de2f98c891b0c'],
|
|
115
|
+
'.claude/agents-snippets/factory-approver.md': ['cacf515a661d25120824d38a81ef2a5753c3bfc5fce8732728cbdd394dda6857'],
|
|
79
116
|
};
|
|
80
117
|
|
|
81
118
|
// First release with --dry-run, --exclude and --only. `upgrade` refuses a dry run below it (older
|
|
@@ -185,7 +222,7 @@ function harnessOf(rel) {
|
|
|
185
222
|
}
|
|
186
223
|
|
|
187
224
|
// Feature groups a file belongs to: a path segment or its file stem equals the group name
|
|
188
|
-
// (factory/, .agents/skills/gh-cli/, prisma-migrations.md
|
|
225
|
+
// (factory/, .agents/skills/gh-cli/, prisma-migrations.md).
|
|
189
226
|
function featuresOf(rel) {
|
|
190
227
|
const n = path.normalize(rel);
|
|
191
228
|
const segments = n.split(path.sep).map((s) => s.replace(/^\./, ''));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitm-ai-dev-toolkit",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Scaffold AI agent config (Cursor, GitHub Copilot, Claude Code, OpenCode, Codex) into any repo, then hand off to your AI agent to finish setup.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nitm-ai-dev-toolkit": "bin/cli.js"
|
|
@@ -5,7 +5,7 @@ description: Opt-in software factory for feature-sized work. Runs one job throug
|
|
|
5
5
|
|
|
6
6
|
# Factory (orchestrator)
|
|
7
7
|
|
|
8
|
-
One orchestrator session runs a feature through intake → spec → plan → build → review → approve → merge. Agents get their context from files and
|
|
8
|
+
One orchestrator session runs a feature through intake → spec → plan → build → review → approve → merge. Agents get their context from files. Builders and spec writers write their own files; reviewers and the approver return their report, and you save it (see Subagent dispatch). You are the orchestrator: you ask the intake questions, dispatch agents, read their files, rewrite `job.json`, run the gates with the operator, handle tickets, and run the merge. You never write code, specs, plans, reviews, or `qa.md` yourself. Exceptions: you write `intake.md` from the operator's answers, `spec-<k>.md` and `plan-<k>.md` from the operator's change requests, `tasks.md` ticket keys, the feature folder rename and copy, the feature docs commit on the job branch, worktree and branch removal, the moves and branch deletions in Archive, the review files and `decision.md` from the reviewers' and approver's replies (see Subagent dispatch), and `decision.md` with `ESCALATE` when retries run out, `merge-conflict.md` on a merge conflict, `bootstrap.md` on a failed worktree bootstrap step, the push and merge request in `push-mr` mode (see Merge procedure), and `rework-<k>.md` from the user's note.
|
|
9
9
|
|
|
10
10
|
The factory is opt-in and sits alongside Feature Builder and TDD. Nothing runs unless the user invokes `/factory`.
|
|
11
11
|
|
|
@@ -187,13 +187,13 @@ Resume by stage:
|
|
|
187
187
|
|
|
188
188
|
| Stage | Resume action |
|
|
189
189
|
| --- | --- |
|
|
190
|
-
| `spec` | Rerun `
|
|
190
|
+
| `spec` | Rerun `planner` in spec mode (brief `roles/spec.md`), then show the spec gate |
|
|
191
191
|
| `awaiting-spec` | Show the spec gate |
|
|
192
|
-
| `plan` | Rerun `
|
|
192
|
+
| `plan` | Rerun `planner` in plan mode (brief `roles/spec.md`), then show the plan gate |
|
|
193
193
|
| `awaiting-plan` | Show the plan gate |
|
|
194
|
-
| `build` | Rerun `
|
|
194
|
+
| `build` | Rerun `implementer` (brief `roles/build.md`) in the mode the files call for: rework if a `rework-<k>.md` is newer than `build.md`, repair if the last review round has `CHANGES`, otherwise build |
|
|
195
195
|
| `review` | Rerun the review round `round` |
|
|
196
|
-
| `approve` | Rerun `
|
|
196
|
+
| `approve` | Rerun the approval (`reviewer` in approval mode, brief `roles/approve.md`) |
|
|
197
197
|
| `awaiting-human` | Print the approver's rationale, the suggested checks from `qa.md` (see QA guidance), and the `/factory approve` command |
|
|
198
198
|
| `needs-human`, `failed_stage` `spec` | Rerun the spec stage (see Spec), then show the spec gate |
|
|
199
199
|
| `needs-human`, `failed_stage` `plan` | Rerun the plan stage (see Plan), then show the plan gate |
|
|
@@ -216,7 +216,7 @@ A job with no work started (stage before `build`, so no build has begun and no `
|
|
|
216
216
|
|
|
217
217
|
## Spec
|
|
218
218
|
|
|
219
|
-
Set stage `spec`. Dispatch `
|
|
219
|
+
Set stage `spec`. Dispatch `planner` in spec mode (brief `roles/spec.md`) with the paths block, the feature request, and the feature folder. It writes `spec.md`. If `intake.md` is in the paths block, the spec writer reads it, and the operator's answers win over the request text where they conflict. Wait for `spec.md` (see Harness notes). Set stage `awaiting-spec` and show the spec gate.
|
|
220
220
|
|
|
221
221
|
## Spec gate (mandatory)
|
|
222
222
|
|
|
@@ -232,13 +232,13 @@ Then ask in chat, as a numbered choice:
|
|
|
232
232
|
Handle the answer:
|
|
233
233
|
|
|
234
234
|
- **Confirm** → continue to Plan. If decision items are still open, do not continue: list them and ask again.
|
|
235
|
-
- **Request changes:** write the operator's text verbatim to `spec-<k>.md` in the job folder (`k` = next free index). Set stage `spec`, rerun `
|
|
235
|
+
- **Request changes:** write the operator's text verbatim to `spec-<k>.md` in the job folder (`k` = next free index). Set stage `spec`, rerun `planner` in spec mode (brief `roles/spec.md`) with the paths block and `spec-<k>.md`. It updates `spec.md`. Set stage `awaiting-spec` and show the gate again. The spec writer records each answered decision as `[DECIDED] <answer>`.
|
|
236
236
|
|
|
237
237
|
If the session ends at this gate, `/factory start <job-id|slug|KEY>` shows it again (see Start).
|
|
238
238
|
|
|
239
239
|
## Plan
|
|
240
240
|
|
|
241
|
-
Set stage `plan`. Dispatch `
|
|
241
|
+
Set stage `plan`. Dispatch `planner` in plan mode (brief `roles/spec.md`) with the paths block, and `plan-<k>.md` when a plan change request is pending. It writes `plan.md` in the feature folder, and `tasks.md` for large work (or removes a stale `tasks.md` when the plan is small). It does not change `spec.md`.
|
|
242
242
|
|
|
243
243
|
Read the `**Size:**` line of `plan.md`:
|
|
244
244
|
|
|
@@ -270,7 +270,7 @@ Then ask in chat, as a numbered choice:
|
|
|
270
270
|
Handle the answer:
|
|
271
271
|
|
|
272
272
|
- **Confirm** with size known → continue to Tracking. If size is still `unclear`, ask again.
|
|
273
|
-
- **Request changes:** write the operator's text verbatim to `plan-<k>.md` (`k` = next free index). Set stage `plan`, rerun `
|
|
273
|
+
- **Request changes:** write the operator's text verbatim to `plan-<k>.md` (`k` = next free index). Set stage `plan`, rerun `planner` in plan mode (brief `roles/spec.md`) with the paths block and `plan-<k>.md`. Show the gate again. If the change touches the spec itself, send it through the spec gate instead: write it to `spec-<k>.md`, rerun spec mode, show the spec gate, then plan again.
|
|
274
274
|
- **Change size only:** the operator's answer to choice 3 sets `size` in `job.json`. The plan does not change.
|
|
275
275
|
- **Change tracking only:** update `tracking` in `job.json`. Do not rerun the spec writer.
|
|
276
276
|
- **Change build mode only:** update `worktree` in `job.json`. Do not rerun the spec writer. In-place is checked when the build starts (see In-place mode).
|
|
@@ -360,28 +360,28 @@ PATHS
|
|
|
360
360
|
- Ports: builder <p>, ux <p+1>, ui <p+2>
|
|
361
361
|
```
|
|
362
362
|
|
|
363
|
-
Agents read their inputs and write their
|
|
363
|
+
Agents read their inputs by these absolute paths. Builders and spec writers write their output files there; reviewers and the approver return their report instead (see Subagent dispatch). The spec-writer works in the main-checkout feature folder. Reviewers and the approver read the spec and plan there. The builder reads them there and ticks `tasks.md` in the build location's copy. Reviewers read `qa.md` at the paths block's `qa.md` line, for context only.
|
|
364
364
|
|
|
365
365
|
## Loop
|
|
366
366
|
|
|
367
367
|
Let `N` be the current round, starting at `1` for a new job.
|
|
368
368
|
|
|
369
|
-
1. **Spec.** Dispatch `
|
|
369
|
+
1. **Spec.** Dispatch `planner` in spec mode (brief `roles/spec.md`) (see Spec).
|
|
370
370
|
2. **Spec gate.** Show the gate and wait for the operator's confirmation (see Spec gate). Do not continue until the operator confirms.
|
|
371
|
-
3. **Plan.** Dispatch `
|
|
371
|
+
3. **Plan.** Dispatch `planner` in plan mode (brief `roles/spec.md`) (see Plan). Set stage `awaiting-plan`.
|
|
372
372
|
4. **Plan gate.** Show the gate and wait for the operator's confirmation (see Plan gate). Do not continue until the operator confirms.
|
|
373
373
|
5. **Tracking and build location.** Run Tracking if `tracking` is `tracked`. Create the build location: the worktree and its copy of the feature docs (see Worktree), or the in-place branch (see In-place mode). Set `worktree_path` if a worktree was made. Set stage `build`. Move any tracked tickets to In Progress (see Ticket lifecycle).
|
|
374
|
-
6. **Build.** Dispatch `
|
|
374
|
+
6. **Build.** Dispatch `implementer` (brief `roles/build.md`) in build mode. Wait (see Harness notes), then read the first line of `build.md`:
|
|
375
375
|
- `STATUS: READY` → continue.
|
|
376
376
|
- `STATUS: BLOCKED` → stage `needs-human`. Tell the user the reason from `build.md`. Stop.
|
|
377
377
|
- Anything else → treat as BLOCKED with reason "builder wrote no valid status".
|
|
378
378
|
7. **Review round N.** Set stage `review`, `round` to `N`, and every configured lens to `pending` in `reviews`. Move tracked tickets to In Review. Dispatch the lenses from `{{FACTORY_REVIEW_LENSES}}` in two stages, each with the paths block:
|
|
379
|
-
- **Stage A:** `code` → `
|
|
380
|
-
- **Stage B:** `ux` → `
|
|
379
|
+
- **Stage A:** `code` → `reviewer` (brief `roles/review-code.md`) and `security` → `reviewer`, in fresh context (brief `roles/review-security.md`). Dispatch both in one parallel batch (one message with multiple agent calls) when the harness can.
|
|
380
|
+
- **Stage B:** `ux` → `reviewer` (brief `roles/review-ux.md`) and `ui` → `reviewer` (brief `roles/review-ui.md`), the browser lenses. Start them only after every stage A review is written. The code reviewer's build runs in the shared build location and would clobber the browser lenses' dev servers. The two browser lenses use separate ports and may run in parallel with each other.
|
|
381
381
|
|
|
382
382
|
If the harness cannot dispatch in parallel, run the lenses one at a time, in the order above.
|
|
383
383
|
|
|
384
|
-
Wait for every `round-N/review-<lens>.md` (see Harness notes). Each must have a first line `VERDICT: PASS` or `VERDICT: CHANGES`. A reviewer
|
|
384
|
+
Wait for every reviewer's reply, and save each as `round-N/review-<lens>.md` (see Harness notes). Each must have a first line `VERDICT: PASS` or `VERDICT: CHANGES`. A reviewer whose reply has no valid first line is re-dispatched alone, once. If it still fails, stage `needs-human`. Never resume the builder during a review round. Update `reviews` from the verdicts.
|
|
385
385
|
8. **Verdicts.** Check in this order:
|
|
386
386
|
- Any blocking item titled `Not verified:`, from any lens: no repair. Stage `needs-human`. Tell the user the `Not verified` items. Stop.
|
|
387
387
|
- Any `CHANGES`, and the cycle has used fewer than 3 review rounds: run a builder repair (below) with `Round` set to `N`, the round just reviewed. Then set `N` to `N + 1` and go to step 7.
|
|
@@ -389,14 +389,14 @@ Let `N` be the current round, starting at `1` for a new job.
|
|
|
389
389
|
- All `PASS`: go to step 9.
|
|
390
390
|
|
|
391
391
|
A review cycle is the rounds since the job started, or since the latest `rework-<k>.md` (see Rework). "Third review round of the cycle" means two repairs have already been made in this cycle. The rework note records where its cycle starts.
|
|
392
|
-
9. **Approve.** Set stage `approve`. Dispatch `
|
|
392
|
+
9. **Approve.** Set stage `approve`. Dispatch `reviewer` in approval mode (brief `roles/approve.md`, fresh context) with the paths block. Wait for the approver's reply and save it as `decision.md` (see Harness notes). Its first line must be `APPROVE` or `ESCALATE`. If the line is missing or invalid, re-dispatch once, then stage `needs-human`.
|
|
393
393
|
- `ESCALATE` → stage `needs-human`. Tell the user the rationale. Stop.
|
|
394
394
|
- `APPROVE` and `{{APPROVAL_MODE}}` is exactly `auto` → run the merge procedure.
|
|
395
395
|
- `APPROVE` otherwise: stage `awaiting-human`. Print the suggested checks (see QA guidance). Tell the user to run `/factory approve <id>` after reviewing the branch. Stop. Any value other than exactly `auto` is treated as `human`.
|
|
396
396
|
|
|
397
397
|
### Repair
|
|
398
398
|
|
|
399
|
-
Dispatch `
|
|
399
|
+
Dispatch `implementer` (brief `roles/build.md`) in repair mode with the paths block, where `Round` is the round just reviewed (the `N` from step 7, before it increments). It reads `spec.md`, `plan.md`, `build.md`, and `round-<Round>/review-*.md`. It must address every `CHANGES` item or justify it in `build.md`. It also rewrites `qa.md`. Wait for `build.md` (see Harness notes) and check its first line again (step 6 rules).
|
|
400
400
|
|
|
401
401
|
### Builder continuity
|
|
402
402
|
|
|
@@ -410,7 +410,7 @@ Either way the builder runs only between reviews, never during one.
|
|
|
410
410
|
### Failures
|
|
411
411
|
|
|
412
412
|
- Missing or unreadable `AGENTS.md` commands → stop and ask the user to add them. Do not guess commands.
|
|
413
|
-
- An agent that finishes without its expected file → re-dispatch that agent once, then `needs-human`. For a spec or plan agent, set `failed_stage` to `spec` or `plan` with it.
|
|
413
|
+
- An agent that finishes without its expected output (a file, or for a reviewer or the approver, a reply with a valid first line) → re-dispatch that agent once, then `needs-human`. For a spec or plan agent, set `failed_stage` to `spec` or `plan` with it.
|
|
414
414
|
- An agent that times out is not re-dispatched (see Harness notes).
|
|
415
415
|
|
|
416
416
|
## Ticket lifecycle
|
|
@@ -447,7 +447,7 @@ Rules:
|
|
|
447
447
|
<the user's note, verbatim>
|
|
448
448
|
```
|
|
449
449
|
|
|
450
|
-
4. Set `round` to `N`, stage `build`. Move tracked tickets to In Progress. For an in-place job, switch the main checkout to `factory/<id>` if needed (see In-place mode). For a worktree job, rerun the bootstrap first (see Worktree bootstrap); a failed step stops the rework the way it stops a build. Dispatch a fresh `
|
|
450
|
+
4. Set `round` to `N`, stage `build`. Move tracked tickets to In Progress. For an in-place job, switch the main checkout to `factory/<id>` if needed (see In-place mode). For a worktree job, rerun the bootstrap first (see Worktree bootstrap); a failed step stops the rework the way it stops a build. Dispatch a fresh `implementer` (brief `roles/build.md`) in rework mode. It reads the latest `rework-<k>.md` and rewrites `qa.md`. Wait for it. Then continue from step 6's status check on `build.md` (do not dispatch the builder again), and run review round `N` from step 7.
|
|
451
451
|
|
|
452
452
|
The new cycle starts with a fresh repair budget. Old rounds and reviews are kept, not overwritten.
|
|
453
453
|
|
|
@@ -600,30 +600,46 @@ The age rule is the same as Archive: by default only jobs whose `updatedAt` is m
|
|
|
600
600
|
|
|
601
601
|
## Subagent dispatch
|
|
602
602
|
|
|
603
|
-
Dispatch with the paths block first, then the task line, then the files to read. The task line names the mode when the agent has one (spec or plan for the spec writer; build, repair, or rework for the builder
|
|
603
|
+
Dispatch with the paths block first, then the task line, then the role brief and the files to read. The task line names the mode when the agent has one (spec or plan for the spec writer; build, repair, or rework for the builder; the lens for a reviewer; approval for the approver).
|
|
604
604
|
|
|
605
|
-
|
|
605
|
+
Factory adds no agents of its own. Each role runs on a native agent (`planner`, `implementer`, or `reviewer`), and the Factory rules for that role (outputs, evidence, verdict format, escalation triggers) live in its brief in this skill's `roles/` folder. Every dispatch tells the agent to read the matching brief first. The role brief overrides the dispatched agent's default output format and file-writing rules, and the first line of the reply must follow the brief.
|
|
606
606
|
|
|
607
|
-
|
|
|
607
|
+
| Role | Native agent | Task line | Brief | Fresh context | Output |
|
|
608
|
+
| --- | --- | --- | --- | --- | --- |
|
|
609
|
+
| Spec writer | `planner` | `spec` or `plan` mode | `roles/spec.md` | no | writes `spec.md`, or `plan.md` and `tasks.md` |
|
|
610
|
+
| Builder | `implementer` | `build`, `repair`, or `rework` mode | `roles/build.md` | no | writes `build.md` and `qa.md` |
|
|
611
|
+
| Code reviewer | `reviewer` | lens `code` | `roles/review-code.md` | no | returns its review |
|
|
612
|
+
| Security reviewer | `reviewer` | lens `security` | `roles/review-security.md` | yes | returns its review |
|
|
613
|
+
| UX reviewer | `reviewer` | lens `ux` | `roles/review-ux.md` | no | returns its review |
|
|
614
|
+
| UI reviewer | `reviewer` | lens `ui` | `roles/review-ui.md` | no | returns its review |
|
|
615
|
+
| Approver | `reviewer` | `approval` mode | `roles/approve.md` | yes | returns its decision |
|
|
616
|
+
|
|
617
|
+
Reviewers and the approver return their report in their final reply and do not write files. You save the reply: the review as `round-<N>/review-<lens>.md`, the decision as `decision.md`. The first line of the reply is the verdict or decision, and that is what you check.
|
|
618
|
+
|
|
619
|
+
Each harness dispatches the native agent by name:
|
|
620
|
+
|
|
621
|
+
| Harness | How to dispatch | Entry point |
|
|
608
622
|
| --- | --- | --- |
|
|
609
|
-
| Claude Code |
|
|
610
|
-
| GitHub Copilot |
|
|
611
|
-
| Cursor | `.cursor/agents
|
|
612
|
-
| OpenCode | `.opencode/agents
|
|
613
|
-
| Codex | none | this skill |
|
|
623
|
+
| Claude Code | the Agent tool, naming the agent | `.claude/commands/factory.md` |
|
|
624
|
+
| GitHub Copilot | the `agent` tool, naming the agent | `.github/prompts/factory.prompt.md` |
|
|
625
|
+
| Cursor | the agent by name from `.cursor/agents` | `.cursor/commands/factory.md` |
|
|
626
|
+
| OpenCode | the agent by name from `.opencode/agents` | `.opencode/commands/factory.md` |
|
|
627
|
+
| Codex | none: run the brief directly | this skill |
|
|
628
|
+
|
|
629
|
+
Codex has no agent files. Run each role brief directly, as a delegated or fresh session, passing the paths block first. If the harness gives you one session only, use single-session mode (see Harness notes).
|
|
614
630
|
|
|
615
|
-
|
|
631
|
+
In OpenCode with the Slim plugin, `oracle` (security or approval) and `designer` (ux or ui) are optional alternatives to the native agents. Use them only if you have configured them as edit-denied reviewers. The native agents above are the default.
|
|
616
632
|
|
|
617
|
-
|
|
633
|
+
Copilot may show a display name in its agent list; pick the agent with the name above.
|
|
618
634
|
|
|
619
635
|
## Harness notes
|
|
620
636
|
|
|
621
|
-
The loop is the same in every harness. Use a parallel lens batch where the harness offers one, otherwise run the lenses in order. If dispatch is background-only, poll each expected file for a valid first line until the timeout, then apply Failures. Builder resume is under Builder continuity;
|
|
637
|
+
The loop is the same in every harness. Use a parallel lens batch where the harness offers one, otherwise run the lenses in order. If dispatch is background-only, poll each expected file for a valid first line until the timeout, then apply Failures. A reviewer or approver reply arrives as its result; check its first line the same way. Builder resume is under Builder continuity; agent names are under Subagent dispatch.
|
|
622
638
|
|
|
623
639
|
- **Timeout.** The default is 15 minutes per agent. The operator can set another value for one run by saying so in the request, for example `timeout 30 min`.
|
|
624
640
|
- **A timed-out agent is never re-dispatched.** It may still be running, and a second run could write the same file. Stage `needs-human` with the reason "`<agent>` timed out after `<N>` min; it may still be running". For a spec or plan agent, also set `failed_stage`. Tell the operator to check the job folder and the build location, and to confirm the agent has stopped, before `/factory start` or `/factory rework`.
|
|
625
641
|
|
|
626
|
-
**Single-session mode (Codex).** Codex has no
|
|
642
|
+
**Single-session mode (Codex).** Codex has no agent files, so one session plays every role. The orchestrator switches roles one at a time. For each role it reads only that role's brief and input files, writes only that role's output (a reviewer or the approver returns its report, and you save it), and keeps the same write boundaries. The rule "never write code" applies per role: as orchestrator it writes only orchestrator files, and it writes code only as the builder, and only in the build location. Lenses run in order (stage A, then stage B). The security reviewer judges the diff, not the builder's account. A timed-out role is handled as above; a role that ends without its file is re-run once, then `needs-human`.
|
|
627
643
|
|
|
628
644
|
## Limits
|
|
629
645
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Approver
|
|
2
2
|
|
|
3
|
-
You decide whether a job goes to merge or to a human. You are the approval gate of the [factory](
|
|
3
|
+
You decide whether a job goes to merge or to a human. You are the approval gate of the [factory](../SKILL.md) pipeline. You work from the paths block the orchestrator gives you. You decide; you do not merge, fix, or re-review.
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ You decide whether a job goes to merge or to a human. You are the approval gate
|
|
|
32
32
|
|
|
33
33
|
## Output
|
|
34
34
|
|
|
35
|
-
You write
|
|
35
|
+
You do not write files. Your final reply is the decision, and the orchestrator saves it as `<job folder>/decision.md`, so start the reply with the decision line. Use this skeleton:
|
|
36
36
|
|
|
37
37
|
```markdown
|
|
38
38
|
APPROVE
|
|
@@ -66,7 +66,7 @@ The first line must be exactly `APPROVE` or `ESCALATE`, followed by the rational
|
|
|
66
66
|
|
|
67
67
|
- When in doubt, `ESCALATE`. A wrong escalation costs one human click. A wrong approval can ship a security or data problem.
|
|
68
68
|
- An `ESCALATE` rationale names the trigger or the failed step, so the human can decide quickly.
|
|
69
|
-
- Do not edit code, reviews, `build.md`, `job.json`, `tasks.md`, or any
|
|
69
|
+
- Do not edit code, reviews, `build.md`, `job.json`, `tasks.md`, or any other file.
|
|
70
70
|
- Do not merge, push, or change branches.
|
|
71
71
|
- Do not transition tickets. The orchestrator owns ticket status, and the approver never touches the tracker.
|
|
72
72
|
- `qa.md` is not a gate. Do not count its checks in the decision, and do not escalate because it is missing.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Builder
|
|
2
2
|
|
|
3
|
-
You build one job's feature inside its build location. You are one agent in the [factory](
|
|
3
|
+
You build one job's feature inside its build location. You are one agent in the [factory](../SKILL.md) pipeline. You work from the paths block the orchestrator gives you.
|
|
4
4
|
|
|
5
5
|
## Modes
|
|
6
6
|
|
|
@@ -30,9 +30,9 @@ The orchestrator tells you which mode you are in:
|
|
|
30
30
|
|
|
31
31
|
## Method
|
|
32
32
|
|
|
33
|
-
Follow the [test-driven development](
|
|
33
|
+
Follow the [test-driven development](../../test-driven-development/SKILL.md) skill: write a failing test, watch it fail, write the minimal code, watch it pass, then refactor. Keep the diff as small as the spec allows, per [ponytail](../../ponytail/SKILL.md).
|
|
34
34
|
|
|
35
|
-
Before you claim any acceptance criterion is met, follow [verification before completion](
|
|
35
|
+
Before you claim any acceptance criterion is met, follow [verification before completion](../../verification-before-completion/SKILL.md): run the check and record the command and its result as evidence.
|
|
36
36
|
|
|
37
37
|
## Output
|
|
38
38
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Reviewer: Code
|
|
2
2
|
|
|
3
|
-
You review one round of a job's branch for correctness, simplicity, reuse, conventions, and docs, and you run the project's checks. You are the `code` lens of the [factory](
|
|
3
|
+
You review one round of a job's branch for correctness, simplicity, reuse, conventions, and docs, and you run the project's checks. You are the `code` lens of the [factory](../SKILL.md) pipeline. You work from the paths block the orchestrator gives you.
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
|
|
@@ -16,17 +16,17 @@ Run each command the project documents in `AGENTS.md` from the build location: t
|
|
|
16
16
|
|
|
17
17
|
## Review
|
|
18
18
|
|
|
19
|
-
Use the [requesting code review](
|
|
19
|
+
Use the [requesting code review](../../requesting-code-review/SKILL.md) checklist for process. Then cover:
|
|
20
20
|
|
|
21
21
|
- **Correctness:** logic, edge cases, error handling at boundaries, every acceptance criterion in `spec.md` covered by a test or check.
|
|
22
|
-
- **Simplicity:** use the [ponytail-review](
|
|
22
|
+
- **Simplicity:** use the [ponytail-review](../../ponytail-review/SKILL.md) lens. Flag reinvented standard library, speculative abstractions, and dead flexibility.
|
|
23
23
|
- **Reuse:** the change should extend existing utilities rather than duplicate them.
|
|
24
24
|
- **Conventions:** the project's `AGENTS.md`, the `AGENTS.md` of each affected app or package, and `.claude/rules-snippets/` standards.
|
|
25
25
|
- **Docs:** documentation the project's `AGENTS.md` requires for this kind of change, in the affected app's docs folder for per-app work.
|
|
26
26
|
|
|
27
27
|
## Output
|
|
28
28
|
|
|
29
|
-
You write
|
|
29
|
+
You do not write files. Your final reply is the report, and the orchestrator saves it as `<job folder>/round-<N>/review-code.md`, so start the reply with the verdict line. Use this skeleton:
|
|
30
30
|
|
|
31
31
|
```markdown
|
|
32
32
|
VERDICT: PASS
|
|
@@ -54,4 +54,4 @@ The first line must be exactly `VERDICT: PASS` or `VERDICT: CHANGES`.
|
|
|
54
54
|
- `CHANGES` needs at least one blocking item. Each blocking item is specific (file and line), actionable, and about correctness, a failing check, a missing acceptance criterion, or a clear convention break.
|
|
55
55
|
- Taste goes under non-blocking notes. Taste never blocks a PASS.
|
|
56
56
|
- A failing test, lint, or build command is a blocking item unless the failure is in code the branch does not touch and is shown on the default branch too.
|
|
57
|
-
- Do not edit code, tests, or any file
|
|
57
|
+
- Do not edit code, tests, or any file. Do not fix problems yourself.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Reviewer: Security
|
|
2
2
|
|
|
3
|
-
You audit one round of a job's branch for security problems. You are the `security` lens of the [factory](
|
|
3
|
+
You audit one round of a job's branch for security problems. You are the `security` lens of the [factory](../SKILL.md) pipeline. You run in a fresh context, so judge the diff itself, not the builder's story. You work from the paths block the orchestrator gives you.
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ You audit one round of a job's branch for security problems. You are the `securi
|
|
|
11
11
|
|
|
12
12
|
## Method
|
|
13
13
|
|
|
14
|
-
Apply the [security reviewer](
|
|
14
|
+
Apply the [security reviewer](../../security-reviewer/SKILL.md) skill to the diff. Use its OWASP Top 10 checklist and its dispatch template's "what to check" guidance. Limit the audit to what the diff changes or exposes, not the whole codebase.
|
|
15
15
|
|
|
16
16
|
Pay particular attention to: input validation at trust boundaries, injection (SQL, command, template, XSS), authentication and authorization checks on new routes, secrets or tokens in code or logs, data exposure in responses and logs, and file handling.
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ Do not run exploits against any real service. A local test that demonstrates a f
|
|
|
19
19
|
|
|
20
20
|
## Output
|
|
21
21
|
|
|
22
|
-
You write
|
|
22
|
+
You do not write files. Your final reply is the report, and the orchestrator saves it as `<job folder>/round-<N>/review-security.md`, so start the reply with the verdict line. Use this skeleton:
|
|
23
23
|
|
|
24
24
|
```markdown
|
|
25
25
|
VERDICT: PASS
|
|
@@ -45,4 +45,4 @@ The first line must be exactly `VERDICT: PASS` or `VERDICT: CHANGES`.
|
|
|
45
45
|
|
|
46
46
|
- `CHANGES` needs at least one blocking item, and every blocking item names a concrete exploit path. Theoretical concerns go under non-blocking notes.
|
|
47
47
|
- A PASS means you checked the diff and found no exploitable issue. It does not mean the code is perfect. Say what you checked.
|
|
48
|
-
- Do not edit code or any file
|
|
48
|
+
- Do not edit code or any file.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Reviewer: UI
|
|
2
2
|
|
|
3
|
-
You look at a job's feature running in the build location and review the visual design: consistency with the existing design system, spacing, typography, contrast, and responsive layout. You are the `ui` lens of the [factory](
|
|
3
|
+
You look at a job's feature running in the build location and review the visual design: consistency with the existing design system, spacing, typography, contrast, and responsive layout. You are the `ui` lens of the [factory](../SKILL.md) pipeline. You work from the paths block the orchestrator gives you.
|
|
4
4
|
|
|
5
5
|
## Safety rules (absolute)
|
|
6
6
|
|
|
@@ -20,18 +20,18 @@ You look at a job's feature running in the build location and review the visual
|
|
|
20
20
|
|
|
21
21
|
## Method
|
|
22
22
|
|
|
23
|
-
1. If the feature has no visual surface,
|
|
24
|
-
2. Start the affected app's dev server from the build location on the ui port, using the filtered dev command and the port flag or env var that `AGENTS.md` documents. If `AGENTS.md` documents none, do not guess and do not use `PORT`. Skip the browser checks, record `Not verified: dev server port` as a blocking item, and
|
|
23
|
+
1. If the feature has no visual surface, report a PASS with the note "No visual change in spec". Stop there.
|
|
24
|
+
2. Start the affected app's dev server from the build location on the ui port, using the filtered dev command and the port flag or env var that `AGENTS.md` documents. If `AGENTS.md` documents none, do not guess and do not use `PORT`. Skip the browser checks, record `Not verified: dev server port` as a blocking item, and finish the review. Stop the server if you started one.
|
|
25
25
|
3. Open each affected view with a browser tool. This lens needs a browser tool available to the harness (for example a browser MCP server). Without one, nothing is verified. Check:
|
|
26
26
|
- **Consistency:** the same components, tokens, and patterns the rest of the app uses. A new one-off style is a blocking item.
|
|
27
27
|
- **Spacing and typography:** follows the project's scale. No arbitrary values where a token exists.
|
|
28
|
-
- **Contrast:** text and interactive elements meet WCAG AA contrast. Follow [UI accessibility](
|
|
28
|
+
- **Contrast:** text and interactive elements meet WCAG AA contrast. Follow [UI accessibility](../../../../.claude/rules-snippets/ui-accessibility.md).
|
|
29
29
|
- **Responsive:** the layout holds at a narrow and a wide viewport. No overflow, no clipped controls.
|
|
30
30
|
4. If the browser tooling is not available, or a view cannot be reached safely, say so for each item. Do not guess what the page looks like.
|
|
31
31
|
|
|
32
32
|
## Output
|
|
33
33
|
|
|
34
|
-
You write
|
|
34
|
+
You do not write files. Your final reply is the report, and the orchestrator saves it as `<job folder>/round-<N>/review-ui.md`, so start the reply with the verdict line. Use this skeleton:
|
|
35
35
|
|
|
36
36
|
```markdown
|
|
37
37
|
VERDICT: PASS
|
|
@@ -61,4 +61,4 @@ The first line must be exactly `VERDICT: PASS` or `VERDICT: CHANGES`.
|
|
|
61
61
|
- `CHANGES` needs at least one blocking item that is specific and actionable.
|
|
62
62
|
- If something the spec requires was **not verified**, the verdict is `CHANGES` with a blocking item titled `Not verified: <what>`. Do not give a PASS you did not earn. The orchestrator sends the job straight to `needs-human` with no repair, because a builder cannot fix missing verification.
|
|
63
63
|
- Taste goes under non-blocking notes.
|
|
64
|
-
- Do not edit code or any file
|
|
64
|
+
- Do not edit code or any file.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Reviewer: UX
|
|
2
2
|
|
|
3
|
-
You look at a job's feature running in the build location and review the user experience: flows, states, copy, accessibility, and mobile. You are the `ux` lens of the [factory](
|
|
3
|
+
You look at a job's feature running in the build location and review the user experience: flows, states, copy, accessibility, and mobile. You are the `ux` lens of the [factory](../SKILL.md) pipeline. You work from the paths block the orchestrator gives you.
|
|
4
4
|
|
|
5
5
|
## Safety rules (absolute)
|
|
6
6
|
|
|
@@ -19,19 +19,19 @@ You look at a job's feature running in the build location and review the user ex
|
|
|
19
19
|
|
|
20
20
|
## Method
|
|
21
21
|
|
|
22
|
-
1. If the feature has no user-facing surface,
|
|
23
|
-
2. Start the affected app's dev server from the build location on the ux port, using the filtered dev command and the port flag or env var that `AGENTS.md` documents. If `AGENTS.md` documents none, do not guess and do not use `PORT`. Skip the browser checks, record `Not verified: dev server port` as a blocking item, and
|
|
22
|
+
1. If the feature has no user-facing surface, report a PASS with the note "No user-facing change in spec". Stop there.
|
|
23
|
+
2. Start the affected app's dev server from the build location on the ux port, using the filtered dev command and the port flag or env var that `AGENTS.md` documents. If `AGENTS.md` documents none, do not guess and do not use `PORT`. Skip the browser checks, record `Not verified: dev server port` as a blocking item, and finish the review. Stop the server if you started one.
|
|
24
24
|
3. Open each affected page or flow with a browser tool. This lens needs a browser tool available to the harness (for example a browser MCP server). Without one, nothing is verified. Check:
|
|
25
25
|
- **Flows:** each user flow in `spec.md` completes, read-only or on seeded data.
|
|
26
26
|
- **States:** empty, loading, and error states, not only the happy path.
|
|
27
27
|
- **Copy:** clear, consistent with the rest of the app, no placeholder text.
|
|
28
|
-
- **Accessibility:** keyboard reachable, labels present, focus visible. Follow [UI accessibility](
|
|
28
|
+
- **Accessibility:** keyboard reachable, labels present, focus visible. Follow [UI accessibility](../../../../.claude/rules-snippets/ui-accessibility.md).
|
|
29
29
|
- **Mobile:** the flow works at a narrow viewport.
|
|
30
30
|
4. If the browser tooling is not available, or a flow cannot be reached safely, say so for each item. Do not guess what the page looks like.
|
|
31
31
|
|
|
32
32
|
## Output
|
|
33
33
|
|
|
34
|
-
You write
|
|
34
|
+
You do not write files. Your final reply is the report, and the orchestrator saves it as `<job folder>/round-<N>/review-ux.md`, so start the reply with the verdict line. Use this skeleton:
|
|
35
35
|
|
|
36
36
|
```markdown
|
|
37
37
|
VERDICT: PASS
|
|
@@ -61,4 +61,4 @@ The first line must be exactly `VERDICT: PASS` or `VERDICT: CHANGES`.
|
|
|
61
61
|
- `CHANGES` needs at least one blocking item that is specific and actionable.
|
|
62
62
|
- If something the spec requires was **not verified**, the verdict is `CHANGES` with a blocking item titled `Not verified: <what>`. Do not give a PASS you did not earn. The orchestrator sends the job straight to `needs-human` with no repair, because a builder cannot fix missing verification.
|
|
63
63
|
- Taste goes under non-blocking notes.
|
|
64
|
-
- Do not edit code or any file
|
|
64
|
+
- Do not edit code or any file.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Factory Spec Writer
|
|
2
2
|
|
|
3
|
-
You turn a feature request into a testable spec, and then into a plan. You are one agent in the [factory](
|
|
3
|
+
You turn a feature request into a testable spec, and then into a plan. You are one agent in the [factory](../SKILL.md) pipeline. You work from the paths block the orchestrator gives you. The task line names your mode: **spec** or **plan**.
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Read these, in this order:
|
|
|
10
10
|
2. The project's `AGENTS.md` (conventions and commands).
|
|
11
11
|
3. The existing code the feature touches. Inspect it. Do not write a spec or plan from the request alone.
|
|
12
12
|
4. The `AGENTS.md` of each affected app or package, for its patterns and commands.
|
|
13
|
-
5. [Feature spec template](
|
|
13
|
+
5. [Feature spec template](../../../../templates/feature-spec.template.md) for the section structure.
|
|
14
14
|
6. Any existing `spec.md`, `plan.md`, and `tasks.md` in the feature folder, and the change note the orchestrator gave you (`spec-<k>.md` in spec mode, `plan-<k>.md` in plan mode). Update them, do not start over blind.
|
|
15
15
|
7. `intake.md` in the job folder, if the paths block lists it: the operator's answers to the intake questions. They clarify the request and win over the request text where they conflict.
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implementer
|
|
3
3
|
description: "Implement code changes for a specific task. Follow TDD, write tests alongside code, and self-review before reporting completion."
|
|
4
|
-
tools: ["Read", "Grep", "Write", "Edit", "Bash(*)"]
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Write", "Edit", "Bash(*)"]
|
|
5
5
|
user-invocable: false
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: planner
|
|
3
3
|
description: "Break down feature requests into implementation tasks. Read specifications, analyze codebase patterns, and produce structured plans with dependencies."
|
|
4
|
-
tools: ["Read", "Grep", "Write", "Bash(*)"]
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Write", "Bash(*)"]
|
|
5
5
|
user-invocable: false
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: "Review code changes for correctness, code quality, security, and adherence to project patterns. Provide actionable feedback with specific file and line references. Use immediately after writing or modifying code, or as a quality gate in orchestrated workflows."
|
|
4
|
-
tools: ["Read", "Grep", "Bash(*)"]
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Bash(*)"]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Reviewer Agent
|