nitm-ai-dev-toolkit 4.0.0 → 5.0.1

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.
Files changed (256) hide show
  1. package/CHANGELOG.md +83 -1
  2. package/README.md +87 -11
  3. package/bin/cli.js +721 -84
  4. package/bin/factory-archive.js +71 -0
  5. package/bin/factory-prune.js +79 -0
  6. package/bin/factory-watch.js +509 -0
  7. package/package.json +1 -1
  8. package/src/monorepo/.agents/skills/factory/SKILL.md +643 -0
  9. package/src/monorepo/.claude/agents/admin-portal.agent.md +1 -1
  10. package/src/monorepo/.claude/agents/api-specialist.agent.md +1 -1
  11. package/src/monorepo/.claude/agents/backend-architect.agent.md +1 -1
  12. package/src/monorepo/.claude/agents/documenter.agent.md +1 -1
  13. package/src/monorepo/.claude/agents/factory-approver.agent.md +12 -0
  14. package/src/monorepo/.claude/agents/factory-builder.agent.md +12 -0
  15. package/src/monorepo/.claude/agents/factory-reviewer-code.agent.md +12 -0
  16. package/src/monorepo/.claude/agents/factory-reviewer-security.agent.md +12 -0
  17. package/src/monorepo/.claude/agents/factory-reviewer-ui.agent.md +12 -0
  18. package/src/monorepo/.claude/agents/factory-reviewer-ux.agent.md +12 -0
  19. package/src/monorepo/.claude/agents/factory-spec-writer.agent.md +12 -0
  20. package/src/monorepo/.claude/agents/feature-builder.agent.md +1 -1
  21. package/src/monorepo/.claude/agents/frontend-developer.agent.md +1 -1
  22. package/src/monorepo/.claude/agents/green.agent.md +1 -1
  23. package/src/monorepo/.claude/agents/implementer.agent.md +1 -1
  24. package/src/monorepo/.claude/agents/planner.agent.md +1 -1
  25. package/src/monorepo/.claude/agents/red.agent.md +1 -1
  26. package/src/monorepo/.claude/agents/refactor.agent.md +1 -1
  27. package/src/monorepo/.claude/agents/researcher.agent.md +1 -1
  28. package/src/monorepo/.claude/agents/reviewer.agent.md +1 -1
  29. package/src/monorepo/.claude/agents/tdd.agent.md +1 -1
  30. package/src/monorepo/.claude/agents-snippets/factory-approver.md +72 -0
  31. package/src/monorepo/.claude/agents-snippets/factory-builder.md +101 -0
  32. package/src/monorepo/.claude/agents-snippets/factory-reviewer-code.md +57 -0
  33. package/src/monorepo/.claude/agents-snippets/factory-reviewer-security.md +48 -0
  34. package/src/monorepo/.claude/agents-snippets/factory-reviewer-ui.md +64 -0
  35. package/src/monorepo/.claude/agents-snippets/factory-reviewer-ux.md +64 -0
  36. package/src/monorepo/.claude/agents-snippets/factory-spec-writer.md +119 -0
  37. package/src/monorepo/.claude/agents-snippets/feature-builder.md +1 -1
  38. package/src/monorepo/.claude/commands/assign-tasks.md +1 -0
  39. package/src/monorepo/.claude/commands/factory.md +24 -0
  40. package/src/monorepo/.claude/commands/ponytail-review.md +1 -1
  41. package/src/monorepo/.claude/prompt-snippets/assign-tasks.md +16 -2
  42. package/src/monorepo/.claude/prompt-snippets/bootstrap-patch.md +31 -24
  43. package/src/monorepo/.claude/prompt-snippets/bootstrap-upgrade.md +12 -13
  44. package/src/monorepo/.claude/prompt-snippets/bootstrap.md +30 -21
  45. package/src/monorepo/.claude/prompt-snippets/factory.md +20 -0
  46. package/src/monorepo/.claude/prompt-snippets/implement-feature.md +4 -2
  47. package/src/monorepo/.claude/prompt-snippets/tasks.md +49 -87
  48. package/src/monorepo/.claude/rules-snippets/documentation.md +8 -6
  49. package/src/monorepo/.claude/rules-snippets/subagent-workflow.md +2 -2
  50. package/src/monorepo/.cursor/agents/factory-approver.agent.md +11 -0
  51. package/src/monorepo/.cursor/agents/factory-builder.agent.md +11 -0
  52. package/src/monorepo/.cursor/agents/factory-reviewer-code.agent.md +11 -0
  53. package/src/monorepo/.cursor/agents/factory-reviewer-security.agent.md +11 -0
  54. package/src/monorepo/.cursor/agents/factory-reviewer-ui.agent.md +11 -0
  55. package/src/monorepo/.cursor/agents/factory-reviewer-ux.agent.md +11 -0
  56. package/src/monorepo/.cursor/agents/factory-spec-writer.agent.md +11 -0
  57. package/src/monorepo/.cursor/commands/factory.md +24 -0
  58. package/src/monorepo/.github/agents/factory-approver.agent.md +11 -0
  59. package/src/monorepo/.github/agents/factory-builder.agent.md +11 -0
  60. package/src/monorepo/.github/agents/factory-reviewer-code.agent.md +11 -0
  61. package/src/monorepo/.github/agents/factory-reviewer-security.agent.md +11 -0
  62. package/src/monorepo/.github/agents/factory-reviewer-ui.agent.md +11 -0
  63. package/src/monorepo/.github/agents/factory-reviewer-ux.agent.md +11 -0
  64. package/src/monorepo/.github/agents/factory-spec-writer.agent.md +11 -0
  65. package/src/monorepo/.github/prompts/factory.prompt.md +25 -0
  66. package/src/monorepo/.opencode/agents/admin-portal.md +1 -1
  67. package/src/monorepo/.opencode/agents/api-specialist.md +1 -1
  68. package/src/monorepo/.opencode/agents/backend-architect.md +1 -1
  69. package/src/monorepo/.opencode/agents/documenter.md +1 -1
  70. package/src/monorepo/.opencode/agents/factory-approver.md +20 -0
  71. package/src/monorepo/.opencode/agents/factory-builder.md +20 -0
  72. package/src/monorepo/.opencode/agents/factory-reviewer-code.md +20 -0
  73. package/src/monorepo/.opencode/agents/factory-reviewer-security.md +20 -0
  74. package/src/monorepo/.opencode/agents/factory-reviewer-ui.md +20 -0
  75. package/src/monorepo/.opencode/agents/factory-reviewer-ux.md +20 -0
  76. package/src/monorepo/.opencode/agents/factory-spec-writer.md +20 -0
  77. package/src/monorepo/.opencode/agents/feature-builder.md +1 -1
  78. package/src/monorepo/.opencode/agents/frontend-developer.md +1 -1
  79. package/src/monorepo/.opencode/agents/green.md +1 -1
  80. package/src/monorepo/.opencode/agents/implementer.md +1 -1
  81. package/src/monorepo/.opencode/agents/planner.md +1 -1
  82. package/src/monorepo/.opencode/agents/red.md +1 -1
  83. package/src/monorepo/.opencode/agents/refactor.md +1 -1
  84. package/src/monorepo/.opencode/agents/researcher.md +1 -1
  85. package/src/monorepo/.opencode/agents/reviewer.md +1 -1
  86. package/src/monorepo/.opencode/agents/tdd.md +1 -1
  87. package/src/monorepo/.opencode/commands/assign-tasks.md +1 -1
  88. package/src/monorepo/.opencode/commands/bootstrap-patch.md +1 -1
  89. package/src/monorepo/.opencode/commands/bootstrap-upgrade.md +1 -1
  90. package/src/monorepo/.opencode/commands/bootstrap.md +1 -1
  91. package/src/monorepo/.opencode/commands/commit-push.md +1 -1
  92. package/src/monorepo/.opencode/commands/constitution.md +1 -1
  93. package/src/monorepo/.opencode/commands/create-skill.md +1 -1
  94. package/src/monorepo/.opencode/commands/factory.md +29 -0
  95. package/src/monorepo/.opencode/commands/implement-feature.md +1 -1
  96. package/src/monorepo/.opencode/commands/implement-fixes.md +1 -1
  97. package/src/monorepo/.opencode/commands/implement.md +1 -1
  98. package/src/monorepo/.opencode/commands/plan.md +1 -1
  99. package/src/monorepo/.opencode/commands/playwright-test.md +1 -1
  100. package/src/monorepo/.opencode/commands/ponytail-audit.md +1 -1
  101. package/src/monorepo/.opencode/commands/ponytail-debt.md +1 -1
  102. package/src/monorepo/.opencode/commands/ponytail-gain.md +1 -1
  103. package/src/monorepo/.opencode/commands/ponytail-help.md +1 -1
  104. package/src/monorepo/.opencode/commands/ponytail-review.md +1 -1
  105. package/src/monorepo/.opencode/commands/ponytail.md +1 -1
  106. package/src/monorepo/.opencode/commands/release-notes.md +1 -1
  107. package/src/monorepo/.opencode/commands/review-pr.md +1 -1
  108. package/src/monorepo/.opencode/commands/review.md +1 -1
  109. package/src/monorepo/.opencode/commands/specify.md +1 -1
  110. package/src/monorepo/.opencode/commands/tasks.md +1 -1
  111. package/src/monorepo/.opencode/opencode.jsonc +1 -2
  112. package/src/monorepo/.opencode/rules/agent-conduct.md +1 -1
  113. package/src/monorepo/.opencode/rules/api-server.md +1 -1
  114. package/src/monorepo/.opencode/rules/coding-standards.md +1 -1
  115. package/src/monorepo/.opencode/rules/component-structure.md +1 -1
  116. package/src/monorepo/.opencode/rules/core-libraries.md +1 -1
  117. package/src/monorepo/.opencode/rules/environment-tooling.md +1 -1
  118. package/src/monorepo/.opencode/rules/logging-comments.md +1 -1
  119. package/src/monorepo/.opencode/rules/logging.md +1 -1
  120. package/src/monorepo/.opencode/rules/prisma-migrations.md +1 -1
  121. package/src/monorepo/.opencode/rules/project-context.md +1 -1
  122. package/src/monorepo/.opencode/rules/server-client-separation.md +1 -1
  123. package/src/monorepo/.opencode/rules/subagent-workflow.md +1 -1
  124. package/src/monorepo/.opencode/rules/testing-quality.md +1 -1
  125. package/src/monorepo/.opencode/rules/ui-accessibility.md +1 -1
  126. package/src/monorepo/.opencode/rules/version-control.md +1 -1
  127. package/src/monorepo/.opencode/rules/what-to-avoid.md +1 -1
  128. package/src/monorepo/AGENTS.md +25 -4
  129. package/src/monorepo/README.md +10 -4
  130. package/src/monorepo/factory/README.md +219 -0
  131. package/src/monorepo/factory/_gitignore +5 -0
  132. package/src/monorepo/factory/worktree-bootstrap.md +32 -0
  133. package/src/repo/.agents/skills/factory/SKILL.md +643 -0
  134. package/src/repo/.claude/agents/admin-portal.agent.md +1 -1
  135. package/src/repo/.claude/agents/api-specialist.agent.md +1 -1
  136. package/src/repo/.claude/agents/backend-architect.agent.md +1 -1
  137. package/src/repo/.claude/agents/documenter.agent.md +1 -1
  138. package/src/repo/.claude/agents/factory-approver.agent.md +12 -0
  139. package/src/repo/.claude/agents/factory-builder.agent.md +12 -0
  140. package/src/repo/.claude/agents/factory-reviewer-code.agent.md +12 -0
  141. package/src/repo/.claude/agents/factory-reviewer-security.agent.md +12 -0
  142. package/src/repo/.claude/agents/factory-reviewer-ui.agent.md +12 -0
  143. package/src/repo/.claude/agents/factory-reviewer-ux.agent.md +12 -0
  144. package/src/repo/.claude/agents/factory-spec-writer.agent.md +12 -0
  145. package/src/repo/.claude/agents/feature-builder.agent.md +1 -1
  146. package/src/repo/.claude/agents/frontend-developer.agent.md +1 -1
  147. package/src/repo/.claude/agents/green.agent.md +1 -1
  148. package/src/repo/.claude/agents/implementer.agent.md +1 -1
  149. package/src/repo/.claude/agents/planner.agent.md +1 -1
  150. package/src/repo/.claude/agents/red.agent.md +1 -1
  151. package/src/repo/.claude/agents/refactor.agent.md +1 -1
  152. package/src/repo/.claude/agents/researcher.agent.md +1 -1
  153. package/src/repo/.claude/agents/reviewer.agent.md +1 -1
  154. package/src/repo/.claude/agents/tdd.agent.md +1 -1
  155. package/src/repo/.claude/agents-snippets/factory-approver.md +72 -0
  156. package/src/repo/.claude/agents-snippets/factory-builder.md +100 -0
  157. package/src/repo/.claude/agents-snippets/factory-reviewer-code.md +57 -0
  158. package/src/repo/.claude/agents-snippets/factory-reviewer-security.md +48 -0
  159. package/src/repo/.claude/agents-snippets/factory-reviewer-ui.md +64 -0
  160. package/src/repo/.claude/agents-snippets/factory-reviewer-ux.md +64 -0
  161. package/src/repo/.claude/agents-snippets/factory-spec-writer.md +117 -0
  162. package/src/repo/.claude/agents-snippets/feature-builder.md +1 -1
  163. package/src/repo/.claude/commands/assign-tasks.md +1 -0
  164. package/src/repo/.claude/commands/factory.md +24 -0
  165. package/src/repo/.claude/commands/ponytail-review.md +1 -1
  166. package/src/repo/.claude/prompt-snippets/assign-tasks.md +16 -2
  167. package/src/repo/.claude/prompt-snippets/bootstrap-patch.md +31 -24
  168. package/src/repo/.claude/prompt-snippets/bootstrap-upgrade.md +16 -16
  169. package/src/repo/.claude/prompt-snippets/bootstrap.md +38 -28
  170. package/src/repo/.claude/prompt-snippets/factory.md +20 -0
  171. package/src/repo/.claude/prompt-snippets/implement-feature.md +4 -2
  172. package/src/repo/.claude/prompt-snippets/tasks.md +49 -112
  173. package/src/repo/.claude/rules-snippets/subagent-workflow.md +2 -2
  174. package/src/repo/.cursor/agents/factory-approver.agent.md +11 -0
  175. package/src/repo/.cursor/agents/factory-builder.agent.md +11 -0
  176. package/src/repo/.cursor/agents/factory-reviewer-code.agent.md +11 -0
  177. package/src/repo/.cursor/agents/factory-reviewer-security.agent.md +11 -0
  178. package/src/repo/.cursor/agents/factory-reviewer-ui.agent.md +11 -0
  179. package/src/repo/.cursor/agents/factory-reviewer-ux.agent.md +11 -0
  180. package/src/repo/.cursor/agents/factory-spec-writer.agent.md +11 -0
  181. package/src/repo/.cursor/commands/factory.md +24 -0
  182. package/src/repo/.github/agents/factory-approver.agent.md +11 -0
  183. package/src/repo/.github/agents/factory-builder.agent.md +11 -0
  184. package/src/repo/.github/agents/factory-reviewer-code.agent.md +11 -0
  185. package/src/repo/.github/agents/factory-reviewer-security.agent.md +11 -0
  186. package/src/repo/.github/agents/factory-reviewer-ui.agent.md +11 -0
  187. package/src/repo/.github/agents/factory-reviewer-ux.agent.md +11 -0
  188. package/src/repo/.github/agents/factory-spec-writer.agent.md +11 -0
  189. package/src/repo/.github/prompts/factory.prompt.md +25 -0
  190. package/src/repo/.opencode/agents/admin-portal.md +1 -1
  191. package/src/repo/.opencode/agents/api-specialist.md +1 -1
  192. package/src/repo/.opencode/agents/backend-architect.md +1 -1
  193. package/src/repo/.opencode/agents/documenter.md +1 -1
  194. package/src/repo/.opencode/agents/factory-approver.md +20 -0
  195. package/src/repo/.opencode/agents/factory-builder.md +20 -0
  196. package/src/repo/.opencode/agents/factory-reviewer-code.md +20 -0
  197. package/src/repo/.opencode/agents/factory-reviewer-security.md +20 -0
  198. package/src/repo/.opencode/agents/factory-reviewer-ui.md +20 -0
  199. package/src/repo/.opencode/agents/factory-reviewer-ux.md +20 -0
  200. package/src/repo/.opencode/agents/factory-spec-writer.md +20 -0
  201. package/src/repo/.opencode/agents/feature-builder.md +1 -1
  202. package/src/repo/.opencode/agents/frontend-developer.md +1 -1
  203. package/src/repo/.opencode/agents/green.md +1 -1
  204. package/src/repo/.opencode/agents/implementer.md +1 -1
  205. package/src/repo/.opencode/agents/planner.md +1 -1
  206. package/src/repo/.opencode/agents/red.md +1 -1
  207. package/src/repo/.opencode/agents/refactor.md +1 -1
  208. package/src/repo/.opencode/agents/researcher.md +1 -1
  209. package/src/repo/.opencode/agents/reviewer.md +1 -1
  210. package/src/repo/.opencode/agents/tdd.md +1 -1
  211. package/src/repo/.opencode/commands/assign-tasks.md +1 -1
  212. package/src/repo/.opencode/commands/bootstrap-patch.md +1 -1
  213. package/src/repo/.opencode/commands/bootstrap-upgrade.md +1 -1
  214. package/src/repo/.opencode/commands/bootstrap.md +1 -1
  215. package/src/repo/.opencode/commands/commit-push.md +1 -1
  216. package/src/repo/.opencode/commands/constitution.md +1 -1
  217. package/src/repo/.opencode/commands/create-skill.md +1 -1
  218. package/src/repo/.opencode/commands/factory.md +29 -0
  219. package/src/repo/.opencode/commands/implement-feature.md +1 -1
  220. package/src/repo/.opencode/commands/implement-fixes.md +1 -1
  221. package/src/repo/.opencode/commands/implement.md +1 -1
  222. package/src/repo/.opencode/commands/plan.md +1 -1
  223. package/src/repo/.opencode/commands/playwright-test.md +1 -1
  224. package/src/repo/.opencode/commands/ponytail-audit.md +1 -1
  225. package/src/repo/.opencode/commands/ponytail-debt.md +1 -1
  226. package/src/repo/.opencode/commands/ponytail-gain.md +1 -1
  227. package/src/repo/.opencode/commands/ponytail-help.md +1 -1
  228. package/src/repo/.opencode/commands/ponytail-review.md +1 -1
  229. package/src/repo/.opencode/commands/ponytail.md +1 -1
  230. package/src/repo/.opencode/commands/release-notes.md +1 -1
  231. package/src/repo/.opencode/commands/review-pr.md +1 -1
  232. package/src/repo/.opencode/commands/review.md +1 -1
  233. package/src/repo/.opencode/commands/specify.md +1 -1
  234. package/src/repo/.opencode/commands/tasks.md +1 -1
  235. package/src/repo/.opencode/opencode.jsonc +1 -2
  236. package/src/repo/.opencode/rules/agent-conduct.md +1 -1
  237. package/src/repo/.opencode/rules/api-server.md +1 -1
  238. package/src/repo/.opencode/rules/coding-standards.md +1 -1
  239. package/src/repo/.opencode/rules/component-structure.md +1 -1
  240. package/src/repo/.opencode/rules/core-libraries.md +1 -1
  241. package/src/repo/.opencode/rules/environment-tooling.md +1 -1
  242. package/src/repo/.opencode/rules/logging-comments.md +1 -1
  243. package/src/repo/.opencode/rules/logging.md +1 -1
  244. package/src/repo/.opencode/rules/prisma-migrations.md +1 -1
  245. package/src/repo/.opencode/rules/project-context.md +1 -1
  246. package/src/repo/.opencode/rules/server-client-separation.md +1 -1
  247. package/src/repo/.opencode/rules/subagent-workflow.md +1 -1
  248. package/src/repo/.opencode/rules/testing-quality.md +1 -1
  249. package/src/repo/.opencode/rules/ui-accessibility.md +1 -1
  250. package/src/repo/.opencode/rules/version-control.md +1 -1
  251. package/src/repo/.opencode/rules/what-to-avoid.md +1 -1
  252. package/src/repo/AGENTS.md +22 -4
  253. package/src/repo/README.md +10 -4
  254. package/src/repo/factory/README.md +213 -0
  255. package/src/repo/factory/_gitignore +5 -0
  256. package/src/repo/factory/worktree-bootstrap.md +32 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - `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.
13
+ - Added `test/opencode-wrappers.test.js` to verify explicit "Read and follow" instructions in OpenCode wrappers.
14
+ - Factory configuration now supports `{{FACTORY_FEATURE_PATHS}}` and `{{MERGE_MODE}}` (`local` or `push-mr`), per-workspace tests during monorepo merges, and `factory/worktree-bootstrap.md`.
15
+
16
+ ### Changed
17
+
18
+ - `bootstrap-patch` resolves versions from `.toolkit-version`, tries `npm pack` with a no-`v` git-tag fallback, and gates supported OpenCode versions without a hard-coded major.
19
+ - OpenCode wrappers replace bare `@.claude/` imports with explicit "Read and follow" instructions. Config `instructions` loading is runtime-dependent; wrappers no longer rely on it.
20
+ - Legacy heading-style `tasks.md` assigns one ticket per heading without rewriting the file; task numbering starts at T1, and `implement-feature` ticks tasks only under the current heading.
21
+ - CLI supports `--dry-run`, persisted file selection, exact-version upgrades (refusing `latest`), conditional `BOOTSTRAP.md` rewrites with backups, and toolkit version/manifest tracking.
22
+ - The template no longer registers the Ponytail OpenCode plugin (`@dietrichgebert/ponytail`); the operator installs it globally. Bootstrap may check for it and tell the operator to install it globally, but never adds it to project config.
23
+ - `ponytail-review` permits `git diff`, `git status`, and `git show`. Document its Claude hooks as plugin-only.
24
+ - Backfilled 4.0.1 and 3.0.x release notes.
25
+
26
+ ### Fixed
27
+
28
+ - Removed stale "publishing not executed" and "4.x" wording.
29
+
30
+ ## [5.0.0]
31
+
32
+ ### Breaking
33
+
34
+ - `/tasks` now writes a slim `tasks.md`: one checklist line per task (checkbox, ID, short description, optional `[P]`, optional ` — <ticket key>`). Details stay in `spec.md` and `plan.md`. `/assign-tasks` and `/implement-feature` read the slim lines and write ticket keys back after the em dash. Existing `tasks.md` files are not rewritten; re-run `/tasks` on a feature to convert one.
35
+ - `upgrade` no longer overwrites your files. It used to run `install --force`. It now adds missing files and keeps existing ones (`patch` semantics), then re-emits the bootstrap handoff. Overwriting needs an explicit `upgrade --force`, which prints a warning first. Scripts that relied on `upgrade` to refresh templates must add `--force`.
36
+
37
+ ### Added
38
+
39
+ - Factory pipeline (opt-in): `/factory <request>` takes a feature through intake, spec gate, plan gate, build, parallel lens reviews, approval, and local merge, with subcommands `start`, `approve`, `rework`, `status`, and `watch`. Nothing runs until `/factory` is invoked. Job state lives in `factory/jobs/`, which is git-ignored. Entry points ship for Claude Code, GitHub Copilot, Cursor, and OpenCode; Codex uses the orchestrator skill `.agents/skills/factory/SKILL.md`.
40
+ - Factory gates and intake: intake reads `AGENTS.md`, related features in `docs/features/`, and the code it touches, asks at most five glaring questions, and saves the answers to `intake.md`. Every job stops at `awaiting-spec` and `awaiting-plan` in every approval mode, and nothing is ticketed or built before the operator confirms the plan. Change requests are saved as `spec-<k>.md` or `plan-<k>.md`.
41
+ - Factory feature folders and tracking: each job belongs to `docs/features/<KEY>-<slug>/` (or `docs/features/<slug>/` before a ticket exists). `job.json` records `feature_dir`, `issue_key`, `size`, `tracking`, and `worktree`. Large work with a documented tracker creates tickets through `/assign-tasks`, writes their keys onto `tasks.md`, and moves them through In Progress, In Review, and Done. Done only follows `/factory approve`.
42
+ - Factory builds run in a git worktree on `factory/<id>`. `--in-place` builds in the main checkout instead, and only from a clean default branch with no other in-place job open. The builder writes `qa.md` with suggested checks, printed before approval; it never gates anything.
43
+ - Factory agents: `factory-spec-writer`, `factory-builder`, `factory-reviewer-code`, `factory-reviewer-security`, `factory-reviewer-ux`, `factory-reviewer-ui`, and `factory-approver`, with shared snippets in `.claude/agents-snippets/`. Their OpenCode wrappers use native V2 `permissions`.
44
+ - `factory/` template folder (README, `_gitignore`) installed by default. CLI `factory status` (one-shot table) and `factory watch` (live view) are read-only over `factory/jobs/*/job.json`; `abandoned` jobs are shown as closed.
45
+ - Factory `/factory archive [--all] [--dry-run]` moves closed jobs (`merged` or `abandoned`) from `factory/jobs/` to `factory/archive/`. By default only jobs last updated more than 7 days ago move. `--all` moves every closed job, and open jobs never move. CLI `factory archive` makes the same moves. `/factory archive` also asks before deleting an archived abandoned job's branch and worktree, and never pushes. Archived jobs are not resumable (`/factory start` says they are closed), and their ids count toward job numbering until a prune removes them.
46
+ - Factory `/factory prune [--all] [--abandoned] [--dry-run]` permanently deletes closed jobs from `factory/jobs/` and `factory/archive/`. By default only `merged` jobs are deleted, and only those last updated more than 7 days ago. `--all` drops the age limit for merged jobs. `--abandoned` also deletes `abandoned` jobs under the same age rule. Without it, abandoned jobs are kept and counted, and the flow offers to rerun with `--abandoned`. It lists the candidates, asks once in chat, and deletes only after a yes. When abandoned jobs are pruned, it then asks, per abandoned branch, whether to delete the branch and its worktree, as archive does. Open jobs and `docs/features/` are never touched. `/factory archive` keeps its selection: merged and abandoned. CLI `factory prune` lists by default and deletes with `--yes`; `--abandoned` is accepted only by `factory prune`.
47
+ - Link checks in `test/links.test.js`: every relative markdown link and `@path` import in `src/repo` and `src/monorepo` must resolve, and so must every scoped install (each `--env` × layout).
48
+
49
+ ### Changed
50
+
51
+ - Factory dashboard: `factory status` and `factory watch` hide closed jobs by default and print `N closed jobs hidden (--all to show)`. `--all` shows closed jobs and archived ones.
52
+ - Scoped installs (`--env`) also copy `.agents/skills/`, `.claude/agents-snippets/`, `.claude/prompt-snippets/`, `.claude/rules-snippets/`, and `factory/`, the shared references every harness's wrappers use.
53
+ - Templates named `_gitignore` install as `.gitignore`, because npm drops `.gitignore` files from packages.
54
+ - Releases publish through npm trusted publishing (OIDC, with provenance) from `.github/workflows/publish.yml`, which now also does the auto patch bump and tag (`auto-patch-tag.yml` removed). The `NPM_TOKEN` secret is no longer used.
55
+
56
+ ### Fixed
57
+
58
+ - Scoped Cursor, Copilot, and OpenCode installs no longer leave dangling links: `.claude/rules-snippets/` is now shared by every scope, since Cursor rules link there.
59
+ - Scoped installs share only `.agents/skills/`, so Claude/Codex ambient rules in `.agents/rules/` no longer appear in Cursor, Copilot, or OpenCode installs.
60
+ - `doctor` placeholder scan matches names with digits (for example `{{DB2_HOST}}`), skips `templates/` blank forms, and ignores runtime-only placeholders (`ISSUE_ID`, `ISSUE_KEY`, `FEATURE_NAME`, `NAME`), so a bootstrapped project can report clean.
61
+ - `.cursor/rules/orient-to-recent-work.mdc` skill link now resolves (`../` → `../../`).
62
+
63
+ ## [4.0.1] - 2026-10-20
64
+
65
+ ### Changed
66
+
67
+ - Updated the package version for the patch release.
68
+
69
+ ## [4.0.0]
70
+
10
71
  ### Migration
11
72
 
12
73
  - Toolkit v4 / package 4.0.0 requires native OpenCode V2 for OpenCode use; oh-my-opencode-slim >=3.0.0 requires OpenCode >=2.0.7. Native host config uses plural maps, ordered permissions, skill directories, and `mcp.servers`. Back up V1 (converted files are incompatible with it), preserve user/global settings and Slim's separate strict schema, leave the external starter unchanged, and activate on the next run/restart. Config `instructions` are ignored, ambient `AGENTS.md` works, `@refs` require explicit reads, and `request.body.temperature` is preserved but not currently sent by the runner. Preserve `lsp: true`; use project checks, not unavailable V2 LSP tools. Plugin/runtime integration is untested; publishing has not been executed.
@@ -93,6 +154,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
93
154
  - Comprehensive template review fixes: corrected `CLAUDE.md` `@import` paths (`prompt-snippets` → `rules-snippets`); fixed broken `../.agents/` skill links in `src/repo/AGENTS.md` and `src/monorepo/AGENTS.md`; updated README bundled-skills count to 32 and added `bkt-cli`/`glab-cli` rows; synced truncated monorepo rules-snippets (`agent-conduct`, `subagent-workflow`, `coding-standards`, `core-libraries`) to repo; converted inlined Cursor commands (`review-pr`, `review`, `commit-push`) to thin wrappers; aligned monorepo agent `tools:` names to Claude Code standard; fixed root `.opencode/commands` snippet imports; added missing `testing.md` rule and `component-structure.md` snippet; removed remaining `composition-api-component-structure` stale files
94
155
  - Agent tool permissions corrected across repo and monorepo templates: Planner gained write + terminal (Copilot `edit`/`runInTerminal`/`terminalLastCommand`, OpenCode `edit: allow, bash: allow`, Claude `Bash(*)`); Documenter gained `Edit` + `Bash(*)` and OpenCode `edit: allow, bash: allow`; Researcher (Claude) lost `Write` (read-only); Reviewer (Claude) lost `Write` and OpenCode gained `bash: allow` (read + terminal). Added Agent Tool & Permission Calibration step to both `bootstrap.md` files
95
156
 
157
+ ## [3.0.x]
158
+
159
+ 3.0.0 is not on npm; use git tag `3.0.0` (`git clone --depth 1 --branch 3.0.0 …`) or npm 3.0.15+ as a merge base.
160
+
161
+ ### Added
162
+
163
+ - **3.0.0 (2026-06-09):** Shared Claude/Copilot instructions, prompt snippets, and expanded agent workflows.
164
+ - **3.0.2 (2026-06-10):** `gh-cli` skill with PR review-thread resolution.
165
+ - **3.0.7 (2026-06-22):** Ponytail skill bundle, template parity improvements, documentation pre-commit check, and `orient-to-recent-work` skill.
166
+ - **3.0.13 (2026-07-10):** `bkt-cli` and `glab-cli` skills.
167
+ - **3.0.15 (2026-07-11):** npm package and zero-dependency CLI for install, patch, upgrade, doctor, and starter setup; CLI tests and CI.
168
+ - **3.0.23 (2026-09-30):** Codex added to default bootstrap.
169
+
170
+ ### Changed
171
+
172
+ - **3.0.1–3.0.6 (2026-06-09–2026-06-12):** Aligned shared prompts/rules and command wrappers; improved OpenCode bootstrap validation, argument hints, placeholder conventions, template consistency, and agent guidance.
173
+ - **3.0.8–3.0.14 (2026-07-06–2026-07-10):** Refined OpenCode/Cursor commands and agent templates; corrected CLI skill guidance, references, and cross-tool template consistency.
174
+ - **3.0.18 (2026-07-11):** Allowed manual npm publishing through workflow dispatch.
175
+ - **3.0.19–3.0.23 (2026-07-13–2026-09-30):** Improved release automation and PR-thread guidance; migrated OpenCode config to `.jsonc` and prevented plugin config overwrite.
176
+
96
177
  ## [0.1.0] - 2026-01-26
97
178
 
98
179
  ### Added
@@ -118,5 +199,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
118
199
  - Documentation structure templates (`docs/features/`, `docs/fixes/`)
119
200
  - Monthly fix log template
120
201
 
121
- [Unreleased]: https://github.com/ninjasitm/ai-assisted-dev-toolkit/compare/v0.1.0...HEAD
202
+ [Unreleased]: https://github.com/ninjasitm/ai-assisted-dev-toolkit/compare/v4.0.0...HEAD
203
+ [4.0.0]: https://github.com/ninjasitm/ai-assisted-dev-toolkit/compare/v3.0.23...v4.0.0
122
204
  [0.1.0]: https://github.com/ninjasitm/ai-assisted-dev-toolkit/releases/tag/v0.1.0
package/README.md CHANGED
@@ -36,6 +36,7 @@ This repository serves as a **template source** for AI development instructions
36
36
  │ │ │ ├── rules/ # Agent behavior rules (ponytail, etc.)
37
37
  │ │ │ └── skills/ # Bundled skills (TDD, debugging, etc.)
38
38
  │ │ ├── docs/ # Documentation structure templates
39
+ │ │ ├── factory/ # Opt-in factory pipeline (README, .gitignore)
39
40
  │ │ ├── templates/ # Reusable document templates
40
41
  │ │ ├── AGENTS.md # AI agent context template
41
42
  │ │ └── README.md # Project README template
@@ -59,13 +60,14 @@ This repository serves as a **template source** for AI development instructions
59
60
  │ ├── apps/ # App-specific templates
60
61
  │ ├── packages/ # Package-specific templates
61
62
  │ ├── docs/ # Documentation structure templates
63
+ │ ├── factory/ # Opt-in factory pipeline (README, .gitignore)
62
64
  │ ├── templates/ # Reusable document templates
63
65
  │ └── AGENTS.md # Monorepo agent context
64
66
  │
65
67
  ├── .cursor/ # This toolkit's own Cursor config
66
68
  ├── .github/ # This toolkit's own GitHub config
67
69
  ├── .opencode/ # This toolkit's own OpenCode config
68
- │ └── plugins/ # Other local OpenCode plugins (Ponytail uses upstream)
70
+ │ └── plugins/ # Other local OpenCode plugins (Ponytail is installed globally)
69
71
  ├── hooks/ # Claude Code / Copilot activation hooks (ponytail, etc.)
70
72
  └── AGENTS.md # This toolkit's agent context
71
73
  ```
@@ -172,20 +174,41 @@ npx nitm-ai-dev-toolkit patch
172
174
  # Inspect the install: missing files and unresolved placeholders
173
175
  npx nitm-ai-dev-toolkit doctor
174
176
 
175
- # Upgrade to the latest published version
177
+ # Upgrade to the latest published version: adds missing files and keeps your existing ones
176
178
  npx nitm-ai-dev-toolkit upgrade
177
179
 
180
+ # Also overwrite existing files with the latest templates (back up customisations first)
181
+ npx nitm-ai-dev-toolkit upgrade --force
182
+
183
+ # Preview install/patch/upgrade without writing (exits 1 on conflicts)
184
+ npx nitm-ai-dev-toolkit patch --dry-run
185
+
186
+ # Limit to some harnesses or features (saved to .nitm/toolkit.json; --exclude "" clears it)
187
+ npx nitm-ai-dev-toolkit patch --exclude copilot,cursor
188
+ npx nitm-ai-dev-toolkit patch --only claude,gh-cli
189
+
190
+ # Pin an exact version (resolved and printed before anything runs)
191
+ npx nitm-ai-dev-toolkit upgrade 5.0.1
192
+ npx nitm-ai-dev-toolkit upgrade nitm-ai-dev-toolkit@5.0.1
193
+ npx nitm-ai-dev-toolkit upgrade --version 5.0.1 --dry-run
194
+
178
195
  # Scaffold the oh-my-opencode-slim starter (delegates to `npx nitm-opencode-starter install`)
179
196
  npx nitm-ai-dev-toolkit omo-slim-starter install
180
197
  ```
181
198
 
199
+ - **`--dry-run`** (install, patch, upgrade) lists adds, overwrites, skips, conflicts and the state files it would write, and writes nothing. Install and patch exit 1 if there are conflicts. `upgrade --dry-run` runs the pinned version's own dry run, so the target must be **5.0.1 or later**.
200
+ - **`--exclude` / `--only`** take comma-separated groups. Harnesses: `claude`, `codex`, `copilot`, `cursor`, `opencode`. Features: `factory`, `prisma`, `bkt-cli`, `gh-cli`, `glab-cli`, `acli`, `linear-cli`. Shared files (AGENTS.md, `docs/`, `hooks/`, shared skills and snippets) are never excluded. The selection is saved to `.nitm/toolkit.json` and used by later install, patch and doctor runs; `--exclude ""` clears it.
201
+ - **`upgrade <version>`**, **`upgrade nitm-ai-dev-toolkit@<version>`** and **`--version <version>`** pin an exact version. `latest`, dist-tags and version ranges are refused. Without a version, the latest published release is used.
202
+ - **State files:** install, patch and upgrade write `.toolkit-version` (the installed package version) and `.nitm/manifest.json` (hashes of the files the toolkit wrote). `doctor` reports a `.toolkit-version` that differs from the package version, and lists stale toolkit files it recognises. It only reports them; it never deletes anything.
203
+ - **`.nitm/BOOTSTRAP.md`** is rewritten only when its content differs. The previous copy is first saved to `.nitm/backups/`.
204
+
182
205
  After `install`, ask your AI agent to read and follow `.nitm/BOOTSTRAP.md`. Harnesses that supply a toolkit `/bootstrap` wrapper can also use it; **Codex has no native toolkit `/bootstrap` command**. Use `doctor` to verify the result.
183
206
 
184
207
  ### Native OpenCode V2 (toolkit 4.0.0)
185
208
 
186
- Toolkit v4 requires **OpenCode V2 (major >=2)** for OpenCode use; **oh-my-opencode-slim >=3.0.0** requires **OpenCode >=2.0.7**. All repo/monorepo bootstrap, patch, and upgrade flows run `opencode --version` before changes, accepting an optional leading `v`. V1 must stop before OpenCode customization/migration or marking toolkit 4.0.0: upgrade OpenCode or remain on toolkit 3.x. A missing CLI or unparseable version stops OpenCode steps and version marking until the user confirms/installs a supported version. Confirm harness use from runtime evidence or ask; scaffold directories are not proof. Other-harness-only setup is unaffected.
209
+ Toolkit 4.0.0 and later require **OpenCode V2 (major >=2)** for OpenCode use; **oh-my-opencode-slim >=3.0.0** requires **OpenCode >=2.0.7**. All repo/monorepo bootstrap, patch, and upgrade flows run `opencode --version` before changes, accepting an optional leading `v`. V1 must stop before OpenCode customization/migration or marking toolkit 4.0.0: upgrade OpenCode or remain on toolkit 3.x. A missing CLI or unparseable version stops OpenCode steps and version marking until the user confirms/installs a supported version. Confirm harness use from runtime evidence or ask; scaffold directories are not proof. Other-harness-only setup is unaffected.
187
210
 
188
- Publishing 4.0.0 has not been executed. The external `nitm-opencode-starter` is a separate package, not automatically upgraded.
211
+ The external `nitm-opencode-starter` is a separate package, not automatically upgraded.
189
212
 
190
213
  With user approval, merge this reproducible registration without replacing user/global plugins:
191
214
 
@@ -193,9 +216,9 @@ With user approval, merge this reproducible registration without replacing user/
193
216
  { "plugins": ["oh-my-opencode-slim@3.0.0"] }
194
217
  ```
195
218
 
196
- The toolkit root deliberately omits `plugins` to inherit user/global registrations; its existing upstream Ponytail registration is unchanged. Both target templates register the author's native V2 package `@dietrichgebert/ponytail@4.12.0` in their local `plugins` arrays, alongside `opencode-mem` and `@tarquinen/opencode-dcp@latest`; `opentmux` remains commented as V1-only. The local `ponytail.mjs` files are removed from the toolkit root and both templates; no local API port or bridge replaces them.
219
+ The toolkit root deliberately omits `plugins` to inherit user/global registrations. Both target templates register `opencode-mem` and `@tarquinen/opencode-dcp@latest` in their local `plugins` arrays; `opentmux` remains commented as V1-only. The OpenCode Ponytail plugin (`@dietrichgebert/ponytail`) is installed globally by the operator; neither the toolkit root nor the templates register it. The local `ponytail.mjs` files are removed from the toolkit root and both templates; no local API port or bridge replaces them.
197
220
 
198
- For existing targets, back up and obtain approval before removing only known obsolete toolkit `.opencode/plugins/ponytail.js`, `.mjs`, or `.ts` copies. Preserve unrelated local plugins; merge/deduplicate upstream package registration locally where appropriate, without editing or overwriting global plugins. Native local plugins are discovered automatically, so do not register them twice. Slim's separate strict schema keeps its own `prompt`, `permission`, and `variant`: do not host-migrate plugin-owned fields. The root's no-`plugins` policy is specific to this toolkit repository, not target templates.
221
+ For existing targets, back up and obtain approval before removing only known obsolete toolkit `.opencode/plugins/ponytail.js`, `.mjs`, or `.ts` copies. Preserve unrelated local plugins. Never add the Ponytail plugin to project config; if it is not installed globally, tell the operator to install it globally, without editing or overwriting global plugins. Native local plugins are discovered automatically. Slim's separate strict schema keeps its own `prompt`, `permission`, and `variant`: do not host-migrate plugin-owned fields. The root's no-`plugins` policy is specific to this toolkit repository, not target templates.
199
222
 
200
223
  | Setting | Native V2 form |
201
224
  | --- | --- |
@@ -208,13 +231,13 @@ For existing targets, back up and obtain approval before removing only known obs
208
231
 
209
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.
210
233
 
211
- **Runtime limits:** config `instructions` entries are accepted but not loaded; ambient `AGENTS.md` works. `@refs` are ordinary text, not automatic attachments: agents must read referenced snippets explicitly. `request.body.temperature` remains in config, but the current runner does not send it. 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.
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. `request.body.temperature` remains in config, but the current runner does not send it. 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.
212
235
 
213
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.
214
237
 
215
238
  ### Native Codex
216
239
 
217
- - `--env codex` includes `.codex/`, `.agents/`, and shared context, plus `.github/instructions/` and `.claude/rules-snippets/` solely to supply the standards linked from `AGENTS.md` and those standards' wrapper source content. It does not install other harness command, agent, or config directories. These reference files neither establish Copilot/Claude use nor load automatically as Codex rules; other harness scopes are unchanged.
240
+ - `--env codex` includes `.codex/`, `.agents/`, and shared context, plus `.github/instructions/` solely to supply the standards linked from `AGENTS.md`. The shared `.claude/rules-snippets/` standards are installed in every scope, so those standards' wrapper source content is present too. It does not install other harness command, agent, or config directories. These reference files neither establish Copilot/Claude use nor load automatically as Codex rules; other harness scopes are unchanged.
218
241
  - Codex reads `AGENTS.md` and discovers `.agents/skills/*/SKILL.md` natively. Monorepos can use more-specific nested `AGENTS.md` files for app/package guidance. Linked standards are references to read as needed, not automatically loaded Claude/Copilot rules.
219
242
  - The optional `.codex/config.toml` is deliberately comment-only: it preserves the user's inherited defaults. Codex loads project config only after the user explicitly trusts the project; the toolkit does not grant trust or set model/provider, approval, sandbox, security, or feature overrides.
220
243
  - For manual copies without `.nitm/`, provide `.claude/prompt-snippets/bootstrap.md` to Codex directly. For incremental AI-guided merges, provide `.claude/prompt-snippets/bootstrap-patch.md` as a task document; the CLI `patch` command only adds missing files.
@@ -238,6 +261,7 @@ Templates use `{{PLACEHOLDER}}` syntax for values you need to customize. The boo
238
261
  | `{{PACKAGE_MANAGER}}` | Package manager | `npm`, `composer`, `dotnet`, `pip`, `bundler`, `go`, `cargo`, `maven` |
239
262
  | `{{FILE_EXTENSION}}` | File extension | `ts`, `php`, `cs`, `py`, `rb`, `go`, `rs`, `java` |
240
263
  | `{{DEV_PORT}}` | Development server port | `3000`, `8000`, `5000` |
264
+ | `{{DEV_PORT_FLAG}}` | Flag or env var that sets the dev port | `--port 3000`, `PORT=3000` |
241
265
  | `{{DEPLOY_PLATFORM}}` | Deployment target | `Vercel`, `AWS`, `Azure`, `Heroku` |
242
266
  | `{{DATABASE}}` | Database/ORM | `Prisma`, `Eloquent`, `EF Core`, `SQLAlchemy`, `ActiveRecord` |
243
267
  | `{{TEST_FRAMEWORK}}` | Testing framework | `Vitest`, `PHPUnit`, `xUnit`, `pytest`, `RSpec`, `JUnit` |
@@ -260,6 +284,7 @@ Templates use `{{PLACEHOLDER}}` syntax for values you need to customize. The boo
260
284
  | Placeholder | Description | Example |
261
285
  | --------------------- | -------------------- | --------------------------------------------------- |
262
286
  | `{{INSTALL_COMMAND}}` | Install dependencies | `npm install`, `composer install`, `dotnet restore` |
287
+ | `{{SETUP_COMMAND}}` | Install command | `npm install`, `composer install`, `dotnet restore` |
263
288
  | `{{DEV_COMMAND}}` | Run dev server | `npm run dev`, `php artisan serve`, `dotnet watch` |
264
289
  | `{{BUILD_COMMAND}}` | Build for production | `npm run build`, `dotnet publish` |
265
290
  | `{{TEST_COMMAND}}` | Run tests | `npm test`, `./vendor/bin/phpunit`, `dotnet test` |
@@ -291,6 +316,19 @@ Templates use `{{PLACEHOLDER}}` syntax for values you need to customize. The boo
291
316
  | `{{APP_3}}` | Third app name | `web`, `marketing`, `landing` |
292
317
  | `{{PROJECT_STRUCTURE}}` | Full project structure | (Generated tree diagram) |
293
318
 
319
+ ### Factory Placeholders
320
+
321
+ Used by the opt-in factory (`.agents/skills/factory/SKILL.md` and `.claude/agents-snippets/factory-*.md`).
322
+
323
+ | Placeholder | Description | Example |
324
+ | --------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ |
325
+ | `{{DEFAULT_BRANCH}}` | Branch factory jobs start from and merge into | `main`, `master` |
326
+ | `{{FACTORY_PORT_BASE}}` | Base dev-server port. Job `n` uses `base + 10n` for the builder, `+1` for ux, and `+2` for ui | `5100` |
327
+ | `{{APPROVAL_MODE}}` | `human` stops at `awaiting-human`; `auto` merges on approval | `human`, `auto` |
328
+ | `{{FACTORY_REVIEW_LENSES}}` | Review lenses to run. `ux` and `ui` need browser tooling | `code, security` |
329
+ | `{{FACTORY_FEATURE_PATHS}}` | Comma-separated feature documentation paths; repo default is `docs/features`, monorepo default is `apps/*/docs/features, docs/features` | `docs/features` |
330
+ | `{{MERGE_MODE}}` | `local` merges locally (default); `push-mr` pushes and opens a merge request | `local`, `push-mr` |
331
+
294
332
  ## Supported Ecosystems
295
333
 
296
334
  The bootstrap command supports the following language ecosystems:
@@ -616,6 +654,43 @@ The bundled skills complement custom agents:
616
654
  - **`writing-plans`** — Creating the plans that Feature Builder and TDD agents execute
617
655
  - **`test-driven-development`** — The TDD methodology that Red/Green/Refactor agents implement
618
656
 
657
+ ## Factory (opt-in, v5)
658
+
659
+ The factory is an opt-in pipeline for feature-sized work. One orchestrator takes a feature through spec → plan gate → build → review → approve → merge. Each job belongs to a feature folder, `docs/features/<KEY>-<slug>/` (or `docs/features/<slug>/` before a ticket exists), which holds `spec.md` and, for large work, a slim `tasks.md`. Job state lives under `factory/jobs/<NNN-slug>/`, and each job builds in its own git worktree on branch `factory/<id>` (or in place on the job's branch, when you ask for `--in-place`).
660
+
661
+ It runs alongside Feature Builder and TDD and does not replace them. Nothing runs until you invoke `/factory`. Quick fixes stay direct.
662
+
663
+ - **Agents:** `factory-spec-writer`, `factory-builder`, `factory-reviewer-code`, `factory-reviewer-security`, `factory-reviewer-ux`, `factory-reviewer-ui`, and `factory-approver`. Wrappers ship for Claude Code, GitHub Copilot, Cursor, and OpenCode. Codex uses the orchestrator skill only.
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
+
666
+ | Command | What it does |
667
+ | --- | --- |
668
+ | `/factory <feature request>` | Intake: reads the project and the features it touches, asks only the glaring questions, then asks you to continue or change the answers. Nothing is created before you continue |
669
+ | `/factory start <KEY \| slug \| job-id>` | Pick up an existing feature folder by ticket key or slug, or resume its open job (for example one waiting at a gate). Add `--in-place` only for a new job |
670
+ | `/factory approve <job-id>` | Merge a job waiting for you (`awaiting-human` or `needs-human`); on a `merged` job, move its tickets to Done |
671
+ | `/factory rework <job-id> <note>` | Restart the builder with your note and a fresh retry budget |
672
+ | `/factory status [--all]` | Summarize open jobs (read-only). Closed jobs are hidden unless `--all` |
673
+ | `/factory watch [--all]` | Show the status table here, then print the command to run the live view in your terminal (read-only). Closed jobs are hidden unless `--all` |
674
+ | `/factory archive [--all] [--dry-run]` | Move closed jobs (`merged` or `abandoned`) from `factory/jobs/` to `factory/archive/`. By default only jobs not updated for 7 days move. `--dry-run` moves nothing. Open jobs never move |
675
+ | `/factory prune [--all] [--abandoned] [--dry-run]` | Permanently delete closed jobs from `factory/jobs/` and `factory/archive/`, after one confirmation. By default only `merged` jobs (same 7-day age rule as archive; `--all` drops the age limit). `--abandoned` also deletes `abandoned` jobs. Open jobs and `docs/features/` are never touched |
676
+
677
+ **Two gates are mandatory.** Every job stops at `awaiting-spec` after the spec, and at `awaiting-plan` after the plan. At the spec gate you confirm the spec or request changes. At the plan gate you review the tasks, the size, the tracking proposal, and the build mode, then confirm or request changes. Leave either gate for later with `/factory start <job-id>`. Nothing is ticketed or built before you confirm the plan.
678
+
679
+ **The builder also writes `qa.md`.** It lists how to run the feature, numbered manual checks tied to the acceptance criteria, and what the automated tests do not cover. The orchestrator shows it before approval as suggested checks. It is not a gate.
680
+
681
+ **The approval gate is on by default.** With `{{APPROVAL_MODE}}` set to `human`, an approved job stops at `awaiting-human` until you run `/factory approve <job-id>`. Set `{{APPROVAL_MODE}}` to `auto` to merge on approval instead. The approver still escalates changes to auth, payments, migrations, and similar high-risk areas. Merges are local, and the factory never pushes.
682
+
683
+ Check jobs from a terminal:
684
+
685
+ ```bash
686
+ npx nitm-ai-dev-toolkit factory status [--all] # one-shot table of open jobs (--all: closed too)
687
+ npx nitm-ai-dev-toolkit factory watch [--all] # live view: ↑/↓ to select, Enter to open, q to quit
688
+ npx nitm-ai-dev-toolkit factory archive [--all] [--dry-run] # move closed jobs to factory/archive/
689
+ npx nitm-ai-dev-toolkit factory prune [--all] [--abandoned] [--dry-run] # list merged jobs to delete; add --yes to delete them
690
+ ```
691
+
692
+ `status` and `watch` read `factory/jobs/*/job.json`, write nothing, and hide closed jobs unless `--all` is passed. `archive` moves closed jobs and touches no git state. `prune` permanently deletes merged jobs from both folders, after you confirm. Pass `--abandoned` to delete abandoned jobs too. Neither touches open jobs or `docs/features/`. The factory's placeholders are listed under [Factory Placeholders](#factory-placeholders).
693
+
619
694
  ## AI Agent Skills
620
695
 
621
696
  Enhance your AI agents with specialized capabilities using the **Agent Skills** open format. Skills are folders of instructions, scripts, and resources that agents can discover and use to perform tasks more accurately and efficiently.
@@ -693,7 +768,7 @@ Skills are installed to `{.cursor|.agents|.github}/skills/` and automatically av
693
768
 
694
769
  ### Bundled Universal Skills
695
770
 
696
- This toolkit includes **32 pre-installed universal skills** in the `.agents/skills/` folder. These skills are copied automatically when you set up your project and require **no additional installation**.
771
+ This toolkit includes **33 pre-installed universal skills** in the `.agents/skills/` folder. These skills are copied automatically when you set up your project and require **no additional installation**.
697
772
 
698
773
  | Skill | Description |
699
774
  | ---------------------------------- | ---------------------------------------------------------------------------------------------------- |
@@ -702,6 +777,7 @@ This toolkit includes **32 pre-installed universal skills** in the `.agents/skil
702
777
  | **verification-before-completion** | Quality checks before claiming work is done. Evidence before assertions, always. |
703
778
  | **writing-plans** | Creating clear implementation plans before coding. |
704
779
  | **executing-plans** | Following through on implementation plans systematically. |
780
+ | **factory** | Opt-in spec-to-merge feature pipeline with review lenses and an approval gate. |
705
781
  | **requesting-code-review** | Best practices for requesting code reviews from teammates. |
706
782
  | **receiving-code-review** | Responding constructively to review feedback. |
707
783
  | **brainstorming** | Structured ideation and problem-solving sessions. |
@@ -732,7 +808,7 @@ This toolkit includes **32 pre-installed universal skills** in the `.agents/skil
732
808
 
733
809
  **These skills are ready to use immediately after copying the templates.** No `npx -y skills add -a <agent> <owner/repo> --skill '*' --agent github-copilot cursor` commands needed.
734
810
 
735
- The **ponytail** skill bundle is an integrated optional skill set from [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) that adds YAGNI/stdlib/native/one-line/minimum discipline to your AI agents. It includes 6 skills, 6 commands, 7 activation hooks, and ambient agent rules. OpenCode uses the author's upstream `@dietrichgebert/ponytail@4.12.0` package, not a bundled local plugin. See [native setup](#native-opencode-v2-toolkit-400); scaffolding alone does not establish activation.
811
+ The **ponytail** skill bundle is an integrated optional skill set from [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) that adds YAGNI/stdlib/native/one-line/minimum discipline to your AI agents. It includes 6 skills, 6 commands, 7 activation hooks, and ambient agent rules. OpenCode uses the author's upstream `@dietrichgebert/ponytail` package, installed globally by the operator, not a bundled local plugin. See [native setup](#native-opencode-v2-toolkit-400); scaffolding alone does not establish activation. The Claude Code hooks in `hooks/*.json` use `${CLAUDE_PLUGIN_ROOT}` and are plugin-only: they fire only when installed through the Ponytail plugin, not from project settings.
736
812
 
737
813
  ### Additional Recommended Skills
738
814
 
@@ -893,7 +969,7 @@ After copying templates and installing additional skills, your project will have
893
969
  │ └── SKILL.md
894
970
  ├── verification-before-completion/
895
971
  │ └── SKILL.md
896
- └── ... (32 skills total)
972
+ └── ... (33 skills total)
897
973
 
898
974
  .cursor/ # or .github/ for GitHub Copilot
899
975
  ├── rules/ # IDE behavior rules (from this toolkit)