nitm-ai-dev-toolkit 3.0.23 → 5.0.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.
Files changed (187) hide show
  1. package/CHANGELOG.md +44 -3
  2. package/README.md +93 -6
  3. package/bin/cli.js +155 -25
  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 +593 -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/factory.md +24 -0
  39. package/src/monorepo/.claude/commands/ponytail-audit.md +4 -6
  40. package/src/monorepo/.claude/commands/ponytail-debt.md +3 -5
  41. package/src/monorepo/.claude/commands/ponytail-gain.md +2 -4
  42. package/src/monorepo/.claude/commands/ponytail-help.md +2 -4
  43. package/src/monorepo/.claude/commands/ponytail-review.md +3 -5
  44. package/src/monorepo/.claude/commands/ponytail.md +3 -5
  45. package/src/monorepo/.claude/prompt-snippets/assign-tasks.md +6 -2
  46. package/src/monorepo/.claude/prompt-snippets/bootstrap-patch.md +32 -17
  47. package/src/monorepo/.claude/prompt-snippets/bootstrap-upgrade.md +76 -51
  48. package/src/monorepo/.claude/prompt-snippets/bootstrap.md +57 -29
  49. package/src/monorepo/.claude/prompt-snippets/factory.md +20 -0
  50. package/src/monorepo/.claude/prompt-snippets/implement-feature.md +2 -2
  51. package/src/monorepo/.claude/prompt-snippets/tasks.md +49 -87
  52. package/src/monorepo/.claude/rules-snippets/documentation.md +8 -6
  53. package/src/monorepo/.cursor/agents/factory-approver.agent.md +11 -0
  54. package/src/monorepo/.cursor/agents/factory-builder.agent.md +11 -0
  55. package/src/monorepo/.cursor/agents/factory-reviewer-code.agent.md +11 -0
  56. package/src/monorepo/.cursor/agents/factory-reviewer-security.agent.md +11 -0
  57. package/src/monorepo/.cursor/agents/factory-reviewer-ui.agent.md +11 -0
  58. package/src/monorepo/.cursor/agents/factory-reviewer-ux.agent.md +11 -0
  59. package/src/monorepo/.cursor/agents/factory-spec-writer.agent.md +11 -0
  60. package/src/monorepo/.cursor/commands/factory.md +24 -0
  61. package/src/monorepo/.github/agents/factory-approver.agent.md +11 -0
  62. package/src/monorepo/.github/agents/factory-builder.agent.md +11 -0
  63. package/src/monorepo/.github/agents/factory-reviewer-code.agent.md +11 -0
  64. package/src/monorepo/.github/agents/factory-reviewer-security.agent.md +11 -0
  65. package/src/monorepo/.github/agents/factory-reviewer-ui.agent.md +11 -0
  66. package/src/monorepo/.github/agents/factory-reviewer-ux.agent.md +11 -0
  67. package/src/monorepo/.github/agents/factory-spec-writer.agent.md +11 -0
  68. package/src/monorepo/.github/prompts/factory.prompt.md +25 -0
  69. package/src/monorepo/.github/prompts/review-staged.prompt.md +1 -1
  70. package/src/monorepo/.opencode/agents/admin-portal.md +10 -4
  71. package/src/monorepo/.opencode/agents/api-specialist.md +10 -4
  72. package/src/monorepo/.opencode/agents/backend-architect.md +10 -4
  73. package/src/monorepo/.opencode/agents/documenter.md +10 -4
  74. package/src/monorepo/.opencode/agents/factory-approver.md +20 -0
  75. package/src/monorepo/.opencode/agents/factory-builder.md +20 -0
  76. package/src/monorepo/.opencode/agents/factory-reviewer-code.md +20 -0
  77. package/src/monorepo/.opencode/agents/factory-reviewer-security.md +20 -0
  78. package/src/monorepo/.opencode/agents/factory-reviewer-ui.md +20 -0
  79. package/src/monorepo/.opencode/agents/factory-reviewer-ux.md +20 -0
  80. package/src/monorepo/.opencode/agents/factory-spec-writer.md +20 -0
  81. package/src/monorepo/.opencode/agents/feature-builder.md +13 -5
  82. package/src/monorepo/.opencode/agents/frontend-developer.md +10 -4
  83. package/src/monorepo/.opencode/agents/green.md +10 -4
  84. package/src/monorepo/.opencode/agents/implementer.md +10 -4
  85. package/src/monorepo/.opencode/agents/planner.md +10 -4
  86. package/src/monorepo/.opencode/agents/red.md +10 -4
  87. package/src/monorepo/.opencode/agents/refactor.md +10 -4
  88. package/src/monorepo/.opencode/agents/researcher.md +10 -4
  89. package/src/monorepo/.opencode/agents/reviewer.md +10 -4
  90. package/src/monorepo/.opencode/agents/tdd.md +13 -5
  91. package/src/monorepo/.opencode/commands/factory.md +29 -0
  92. package/src/monorepo/.opencode/opencode.jsonc +8 -10
  93. package/src/monorepo/AGENTS.md +30 -1
  94. package/src/monorepo/CLAUDE.md +1 -1
  95. package/src/monorepo/README.md +20 -0
  96. package/src/monorepo/factory/README.md +194 -0
  97. package/src/monorepo/factory/_gitignore +5 -0
  98. package/src/repo/.agents/skills/factory/SKILL.md +593 -0
  99. package/src/repo/.claude/agents/admin-portal.agent.md +1 -1
  100. package/src/repo/.claude/agents/api-specialist.agent.md +1 -1
  101. package/src/repo/.claude/agents/backend-architect.agent.md +1 -1
  102. package/src/repo/.claude/agents/documenter.agent.md +2 -2
  103. package/src/repo/.claude/agents/factory-approver.agent.md +12 -0
  104. package/src/repo/.claude/agents/factory-builder.agent.md +12 -0
  105. package/src/repo/.claude/agents/factory-reviewer-code.agent.md +12 -0
  106. package/src/repo/.claude/agents/factory-reviewer-security.agent.md +12 -0
  107. package/src/repo/.claude/agents/factory-reviewer-ui.agent.md +12 -0
  108. package/src/repo/.claude/agents/factory-reviewer-ux.agent.md +12 -0
  109. package/src/repo/.claude/agents/factory-spec-writer.agent.md +12 -0
  110. package/src/repo/.claude/agents/feature-builder.agent.md +1 -1
  111. package/src/repo/.claude/agents/frontend-developer.agent.md +1 -1
  112. package/src/repo/.claude/agents/green.agent.md +1 -1
  113. package/src/repo/.claude/agents/implementer.agent.md +1 -1
  114. package/src/repo/.claude/agents/planner.agent.md +2 -2
  115. package/src/repo/.claude/agents/red.agent.md +1 -1
  116. package/src/repo/.claude/agents/refactor.agent.md +1 -1
  117. package/src/repo/.claude/agents/researcher.agent.md +2 -2
  118. package/src/repo/.claude/agents/reviewer.agent.md +2 -2
  119. package/src/repo/.claude/agents/tdd.agent.md +1 -1
  120. package/src/repo/.claude/agents-snippets/factory-approver.md +72 -0
  121. package/src/repo/.claude/agents-snippets/factory-builder.md +100 -0
  122. package/src/repo/.claude/agents-snippets/factory-reviewer-code.md +57 -0
  123. package/src/repo/.claude/agents-snippets/factory-reviewer-security.md +48 -0
  124. package/src/repo/.claude/agents-snippets/factory-reviewer-ui.md +64 -0
  125. package/src/repo/.claude/agents-snippets/factory-reviewer-ux.md +64 -0
  126. package/src/repo/.claude/agents-snippets/factory-spec-writer.md +117 -0
  127. package/src/repo/.claude/agents-snippets/feature-builder.md +1 -1
  128. package/src/repo/.claude/commands/factory.md +24 -0
  129. package/src/repo/.claude/commands/ponytail-audit.md +4 -6
  130. package/src/repo/.claude/commands/ponytail-debt.md +3 -5
  131. package/src/repo/.claude/commands/ponytail-gain.md +2 -4
  132. package/src/repo/.claude/commands/ponytail-help.md +2 -4
  133. package/src/repo/.claude/commands/ponytail-review.md +3 -5
  134. package/src/repo/.claude/commands/ponytail.md +3 -5
  135. package/src/repo/.claude/prompt-snippets/assign-tasks.md +6 -2
  136. package/src/repo/.claude/prompt-snippets/bootstrap-patch.md +32 -17
  137. package/src/repo/.claude/prompt-snippets/bootstrap-upgrade.md +87 -77
  138. package/src/repo/.claude/prompt-snippets/bootstrap.md +71 -74
  139. package/src/repo/.claude/prompt-snippets/factory.md +20 -0
  140. package/src/repo/.claude/prompt-snippets/implement-feature.md +2 -2
  141. package/src/repo/.claude/prompt-snippets/tasks.md +49 -112
  142. package/src/repo/.cursor/agents/factory-approver.agent.md +11 -0
  143. package/src/repo/.cursor/agents/factory-builder.agent.md +11 -0
  144. package/src/repo/.cursor/agents/factory-reviewer-code.agent.md +11 -0
  145. package/src/repo/.cursor/agents/factory-reviewer-security.agent.md +11 -0
  146. package/src/repo/.cursor/agents/factory-reviewer-ui.agent.md +11 -0
  147. package/src/repo/.cursor/agents/factory-reviewer-ux.agent.md +11 -0
  148. package/src/repo/.cursor/agents/factory-spec-writer.agent.md +11 -0
  149. package/src/repo/.cursor/commands/factory.md +24 -0
  150. package/src/repo/.github/agents/factory-approver.agent.md +11 -0
  151. package/src/repo/.github/agents/factory-builder.agent.md +11 -0
  152. package/src/repo/.github/agents/factory-reviewer-code.agent.md +11 -0
  153. package/src/repo/.github/agents/factory-reviewer-security.agent.md +11 -0
  154. package/src/repo/.github/agents/factory-reviewer-ui.agent.md +11 -0
  155. package/src/repo/.github/agents/factory-reviewer-ux.agent.md +11 -0
  156. package/src/repo/.github/agents/factory-spec-writer.agent.md +11 -0
  157. package/src/repo/.github/prompts/factory.prompt.md +25 -0
  158. package/src/repo/.opencode/agents/admin-portal.md +10 -4
  159. package/src/repo/.opencode/agents/api-specialist.md +10 -4
  160. package/src/repo/.opencode/agents/backend-architect.md +10 -4
  161. package/src/repo/.opencode/agents/documenter.md +10 -4
  162. package/src/repo/.opencode/agents/factory-approver.md +20 -0
  163. package/src/repo/.opencode/agents/factory-builder.md +20 -0
  164. package/src/repo/.opencode/agents/factory-reviewer-code.md +20 -0
  165. package/src/repo/.opencode/agents/factory-reviewer-security.md +20 -0
  166. package/src/repo/.opencode/agents/factory-reviewer-ui.md +20 -0
  167. package/src/repo/.opencode/agents/factory-reviewer-ux.md +20 -0
  168. package/src/repo/.opencode/agents/factory-spec-writer.md +20 -0
  169. package/src/repo/.opencode/agents/feature-builder.md +13 -5
  170. package/src/repo/.opencode/agents/frontend-developer.md +10 -4
  171. package/src/repo/.opencode/agents/green.md +10 -4
  172. package/src/repo/.opencode/agents/implementer.md +10 -4
  173. package/src/repo/.opencode/agents/planner.md +10 -4
  174. package/src/repo/.opencode/agents/red.md +10 -4
  175. package/src/repo/.opencode/agents/refactor.md +10 -4
  176. package/src/repo/.opencode/agents/researcher.md +10 -4
  177. package/src/repo/.opencode/agents/reviewer.md +10 -4
  178. package/src/repo/.opencode/agents/tdd.md +13 -5
  179. package/src/repo/.opencode/commands/factory.md +29 -0
  180. package/src/repo/.opencode/opencode.jsonc +8 -10
  181. package/src/repo/AGENTS.md +27 -1
  182. package/src/repo/CLAUDE.md +1 -1
  183. package/src/repo/README.md +20 -0
  184. package/src/repo/factory/README.md +194 -0
  185. package/src/repo/factory/_gitignore +5 -0
  186. package/src/monorepo/.opencode/plugins/ponytail.mjs +0 -93
  187. package/src/repo/.opencode/plugins/ponytail.mjs +0 -93
@@ -1,5 +1,7 @@
1
1
  You are helping to break down a feature into actionable tasks.
2
2
 
3
+ `tasks.md` is a checklist only. Acceptance criteria live in `spec.md`; approach, files, and effort live in `plan.md`. Do not repeat them here.
4
+
3
5
  ## Your Task
4
6
 
5
7
  1. **Load context**:
@@ -7,102 +9,62 @@ You are helping to break down a feature into actionable tasks.
7
9
  - Read the plan in `apps/{{APP_NAME}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/plan.md` (if exists)
8
10
  - Review `AGENTS.md` for project patterns
9
11
 
10
- 2. **Break down into tasks** (aim for 3-7 total tasks):
11
- - **Setup**: Dependencies, configuration, scaffolding (combine into 1 task)
12
- - **Core**: Main implementation tasks (group by component/feature area)
13
- - **Tests**: Unit and integration tests (1 task per component)
14
- - **Polish**: Documentation, cleanup, optimization (combine into 1 task)
15
-
16
- 3. **Task Consolidation Rules** (CRITICAL):
17
- - **Group related work**: Combine tasks that touch the same files or feature area
18
- - **Merge small tasks**: Tasks under 2 hours should be combined with related work
19
- - **Limit total tasks**: Target 3-7 tasks total; never exceed 10 for any feature
20
- - **Avoid over-granularity**: "Create model + migration + factory" = 1 task, not 3
21
- - **Bundle by outcome**: Group by what gets delivered, not individual steps
22
-
23
- 4. **Complexity-Based Task Sizing**:
24
-
25
- | Complexity | Task Count | Subtask Limit |
26
- | ------------------- | ---------- | ----------------- |
27
- | Simple (< 4 hours) | 2-3 tasks | 0 subtasks |
28
- | Medium (4-16 hours) | 3-5 tasks | 2-4 per task max |
29
- | Complex (16-40 hrs) | 5-8 tasks | 3-6 per task max |
30
- | Large (40+ hours) | 8-12 tasks | 5-10 per task max |
31
-
32
- 5. **Task ordering rules**:
12
+ 2. **Break down into tasks** (aim for 3-7 total; never exceed 10):
13
+ - **Setup**: dependencies, configuration, scaffolding (combine into 1 task)
14
+ - **Core**: main implementation, grouped by component or feature area
15
+ - **Tests**: unit and integration tests (1 task per component)
16
+ - **Polish**: documentation, cleanup, optimization (combine into 1 task)
17
+
18
+ 3. **Consolidation rules** (CRITICAL):
19
+ - **Group related work**: combine tasks that touch the same files or feature area
20
+ - **Merge small tasks**: anything under 2 hours folds into related work
21
+ - **Bundle by outcome**: group by what gets delivered, not individual steps
22
+ - **Keep each task inside one app**. Cross-app work: shared package task first, then app tasks
23
+
24
+ 4. **Create the task list** at `apps/{{APP_NAME}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/tasks.md`:
25
+
26
+ ```markdown
27
+ # Tasks: {{ISSUE_ID}}-{{FEATURE_NAME}}
28
+
29
+ - [ ] T1 Setup: dependencies and configuration
30
+ - [ ] T2 Models, services, and endpoints for sessions
31
+ - [ ] T3 Session tests [P]
32
+ - [ ] T4 Docs and cleanup
33
+ ```
34
+
35
+ Each task is one line:
36
+ - **Checkbox** `- [ ]`. Tick to `- [x]` once the task is implemented and reviewed.
37
+ - **ID** `T<n>`, sequential, in dependency order.
38
+ - **Description**: short and deliverable-focused (what ships, not how). No file lists, effort, or acceptance criteria.
39
+ - **`[P]`** only when the task can run in parallel (different files, no shared state). Omit otherwise.
40
+ - **` — <ticket key>`** appended after an em dash once a ticket exists. Written by `/assign-tasks`; never added before the ticket is created.
41
+ - **Sub-bullets** only when a task truly needs them (rare).
42
+
43
+ 5. **Task ordering**:
33
44
  - Setup before implementation
34
45
  - Tests before or alongside code (TDD)
35
46
  - Core features before integrations
36
- - Mark parallelizable tasks with [P]
37
-
38
- 6. **Create task list**:
39
- - Output to `apps/{{APP_NAME}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/tasks.md`
40
- - Each task should be specific and actionable
41
- - Include file paths where relevant
42
-
43
- ## Task Template
44
-
45
- ```markdown
46
- # Tasks: {{FEATURE_NAME}}
47
-
48
- **Complexity**: Simple | Medium | Complex
49
- **Estimated Total**: X hours
50
- **Task Count**: X tasks
51
-
52
- ## T001: Setup & Configuration
53
-
54
- - Install dependencies and configure environment
55
- - Create file structure and scaffolding
56
- - **Files**: `package.json`, `{{CONFIG_DIR}}/*`
57
-
58
- ## T002: Core Implementation - [Feature Area]
47
+ - Polish last
48
+ - Tasks touching the same files run sequentially and are never `[P]`
59
49
 
60
- - Implement [feature part] including models, services, and controllers
61
- - **Files**: `{{SRC_DIR}}/models/*`, `{{SRC_DIR}}/services/*`
62
- - **Subtasks** (only if complex):
63
- - Model and database layer
64
- - Business logic and services
65
- - API/Controller layer
66
-
67
- ## T003 [P]: Testing
68
-
69
- - Add unit and integration tests for all components
70
- - **Files**: `{{TEST_DIR}}/*`
71
-
72
- ## T004: Polish & Documentation
73
-
74
- - Update documentation, error handling, and cleanup
75
- - **Files**: `README.md`, `docs/*`
76
- ```
50
+ 6. **Report**: tasks file path, task count, number of `[P]` tasks, and the consolidation note ("Combined X items into Y tasks"). Next step: `/implement-feature`, or `/assign-tasks` to create tickets.
77
51
 
78
52
  ## Anti-Patterns to Avoid
79
53
 
80
- ❌ **Don't create separate tasks for**:
81
-
82
- - Each individual file in a feature
83
- - "Create X" then "Configure X" then "Test X" (combine them)
84
- - Minor changes that take < 30 minutes
85
- - Obvious steps like "commit code" or "run linter"
86
-
87
- ✅ **Do combine into single tasks**:
88
-
89
- - All model/migration/factory work for an entity
90
- - Related API endpoints that share logic
91
- - All configuration and environment setup
92
- - Documentation updates across multiple files
93
-
94
- ## Notes
54
+ ❌ One task per file in a feature
55
+ ❌ "Create X" then "Configure X" then "Test X"
56
+ ❌ Minor changes under 30 minutes, or obvious steps like "commit code" or "run linter"
95
57
 
96
- - [P] indicates tasks that can run in parallel
97
- - Tasks affecting the same file should be sequential
98
- - Each task should be completable independently
99
- - **Quality over quantity**: Fewer, well-defined tasks beat many granular ones
58
+ ✅ All model, migration, and factory work for an entity
59
+ ✅ Related API endpoints that share logic
60
+ ✅ All configuration and environment setup
61
+ ✅ Documentation updates across multiple files
100
62
 
101
63
  ## Orchestrator Dispatch Guide
102
64
 
103
- When this task list is used by `/implement-feature` or `/implement`:
65
+ When this list is used by `/implement-feature` or `/implement`:
104
66
 
105
- - **Parallel [P] tasks**: Dispatch one subagent per `[P]` task concurrently using `dispatching-parallel-agents` skill
106
- - **Sequential tasks**: Execute in dependency order, one subagent per task using `subagent-driven-development` skill
107
- - **Domain routing**: Match each task to the appropriate specialist agent (Backend Architect, Frontend Developer, API Specialist, etc.)
108
- - **Review gate**: Every task must pass a Reviewer agent before being marked complete
67
+ - **`[P]` tasks**: dispatch one subagent per task concurrently, using `dispatching-parallel-agents`
68
+ - **Other tasks**: execute in dependency order, one subagent per task, using `subagent-driven-development`
69
+ - **Domain routing**: match each task to a specialist (Backend Architect, Frontend Developer, API Specialist, etc.)
70
+ - **Review gate**: every task passes a Reviewer before it is ticked `[x]`
@@ -8,13 +8,15 @@ This monorepo uses a **distributed documentation strategy** where app-specific d
8
8
 
9
9
  **App-specific documentation** must live in respective app folders:
10
10
 
11
- - **{{APP_1}} Features** → `apps/{{APP_1}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/`
12
- - **{{APP_2}} Features** → `apps/{{APP_2}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/`
11
+ - **{{APP_1}} Features** → `apps/{{APP_1}}/docs/features/<feature>/`
12
+ - **{{APP_2}} Features** → `apps/{{APP_2}}/docs/features/<feature>/`
13
13
  - **{{APP_1}} Fixes** → `apps/{{APP_1}}/docs/fixes/`
14
14
  - **{{APP_2}} Fixes** → `apps/{{APP_2}}/docs/fixes/`
15
15
  - **Shared Package Features** → `packages/{{PACKAGE_NAME}}/docs/features/`
16
16
  - **Shared Package Fixes** → `packages/{{PACKAGE_NAME}}/docs/fixes/`
17
17
 
18
+ **Factory features are root-scoped.** The factory pipeline runs from the monorepo root, so features it runs live at root `docs/features/<feature>/` (for example `docs/features/PROJ-1234-onboarding/`). Other features stay in their app or package folder as listed above. `<feature>` is the per-run feature folder name: `<KEY>-<slug>`, or `<slug>` when there is no ticket.
19
+
18
20
  **Root `docs/` folder** is ONLY for monorepo-wide documentation:
19
21
 
20
22
  - Architecture decisions affecting multiple apps (`docs/architecture/`)
@@ -81,12 +83,12 @@ If the monorepo includes a documentation app (e.g., Docus, Nuxt Content, Docusau
81
83
 
82
84
  Each app maintains its own feature documentation:
83
85
 
84
- **Location:** `apps/{{APP_NAME}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/`
86
+ **Location:** `apps/{{APP_NAME}}/docs/features/<feature>/`
85
87
 
86
88
  **Required Files:**
87
89
 
88
90
  ```
89
- apps/{{APP_1}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/
91
+ apps/{{APP_1}}/docs/features/<feature>/
90
92
  ├── spec.md # Functional specification
91
93
  ├── plan.md # Implementation plan
92
94
  └── [optional] # Code examples, component diagrams
@@ -160,8 +162,8 @@ Before running `git commit`, verify ALL items that apply to your change:
160
162
 
161
163
  **All changes:**
162
164
 
163
- - [ ] **Features**: `docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/spec.md` exists and reflects the current implementation
164
- - [ ] **Features**: `docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/plan.md` is updated if scope changed
165
+ - [ ] **Features**: `docs/features/<feature>/spec.md` exists and reflects the current implementation
166
+ - [ ] **Features**: `docs/features/<feature>/plan.md` is updated if scope changed
165
167
  - [ ] **Fixes**: Entry added to `apps/{{APP_NAME}}/docs/fixes/{{YYYY-MM}}.md` (or complex fix folder created)
166
168
  - [ ] **Breaking changes**: `CHANGELOG.md` updated
167
169
  - [ ] **Architectural decisions**: ADR created in `docs/architecture/` if a significant choice was made
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Decide whether a factory job is approved for merge or escalated to a human, checking history, final diff, a spot-checked criterion, a dry-run merge, and escalation triggers."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Approver Agent
8
+
9
+ Decide whether a factory job is approved for merge or escalated to a human.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-approver.md](../../.claude/agents-snippets/factory-approver.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Build a factory job's feature inside its git worktree, following TDD, and log results in build.md."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Builder Agent
8
+
9
+ Build a factory job's feature inside its git worktree, following TDD, and log results in build.md.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-builder.md](../../.claude/agents-snippets/factory-builder.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Review a factory job's branch for correctness, simplicity, reuse, conventions, and docs, and run the project's checks."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Reviewer (Code) Agent
8
+
9
+ Review a factory job's branch for correctness, simplicity, reuse, conventions, and docs, and run the project's checks.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-code.md](../../.claude/agents-snippets/factory-reviewer-code.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Audit a factory job's branch diff for security problems in a fresh context."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Reviewer (Security) Agent
8
+
9
+ Audit a factory job's branch diff for security problems in a fresh context.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-security.md](../../.claude/agents-snippets/factory-reviewer-security.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Review a factory job's feature at its build location for design-system consistency, spacing, typography, contrast, and responsive layout, without signing in or writing to real services."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Reviewer (UI) Agent
8
+
9
+ Review a factory job's feature at its build location for design-system consistency, spacing, typography, contrast, and responsive layout, without signing in or writing to real services.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-ui.md](../../.claude/agents-snippets/factory-reviewer-ui.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Review a factory job's feature at its build location for flows, states, copy, accessibility, and mobile, without signing in or writing to real services."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Reviewer (UX) Agent
8
+
9
+ Review a factory job's feature at its build location for flows, states, copy, accessibility, and mobile, without signing in or writing to real services.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-ux.md](../../.claude/agents-snippets/factory-reviewer-ux.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Write a testable spec.md for a factory job from a feature request, after inspecting the real code."
3
+ globs:
4
+ alwaysApply: agent
5
+ ---
6
+
7
+ # Factory Spec Writer Agent
8
+
9
+ Write a testable spec.md for a factory job from a feature request, after inspecting the real code.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-spec-writer.md](../../.claude/agents-snippets/factory-spec-writer.md)
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: "Run an opt-in factory job: intake, spec and plan gates, build in a worktree or in place, reviews, approval, local merge"
3
+ argument-hint: "[--in-place] <feature request> | start [--in-place] <request | KEY | slug | job-id> | approve <job-id> | rework <job-id> <note> | abandon <job-id> | status [--all] | watch [--all] | archive [--all] [--dry-run] | prune [--all] [--abandoned] [--dry-run]"
4
+ ---
5
+
6
+ # Factory
7
+
8
+ ## Agent Dispatch
9
+
10
+ > **Run in the main session.** The orchestrator dispatches these agents; they cannot dispatch others.
11
+
12
+ | Agent | When to use |
13
+ |-------|-------------|
14
+ | `factory-spec-writer` | Spec stage (`spec` mode) writes `spec.md`; plan stage (`plan` mode) writes `plan.md` and `tasks.md` |
15
+ | `factory-builder` | Build, repair, and rework: writes `build.md` in the job folder; its code goes in the build location |
16
+ | `factory-reviewer-code` | Review round, `code` lens |
17
+ | `factory-reviewer-security` | Review round, `security` lens |
18
+ | `factory-reviewer-ux` | Review round, `ux` lens (opt-in) |
19
+ | `factory-reviewer-ui` | Review round, `ui` lens (opt-in) |
20
+ | `factory-approver` | Approval gate: writes `decision.md` |
21
+
22
+ Dispatch each agent by its kebab-case name, as in the first column. Copilot may show a display name; pick the agent with that name.
23
+
24
+ **CRITICAL: READ:** [.claude/prompt-snippets/factory.md](../../.claude/prompt-snippets/factory.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Approver
3
+ description: "Decide whether a factory job is approved for merge or escalated to a human, checking history, final diff, a spot-checked criterion, a dry-run merge, and escalation triggers. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Approver Agent
8
+
9
+ Decide whether a factory job is approved for merge or escalated to a human.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-approver.md](../../.claude/agents-snippets/factory-approver.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Builder
3
+ description: "Build a factory job's feature inside its git worktree, following TDD, and log results in build.md. Runs in build, repair, or rework mode. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Builder Agent
8
+
9
+ Build a factory job's feature inside its git worktree, following TDD, and log results in build.md.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-builder.md](../../.claude/agents-snippets/factory-builder.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Reviewer Code
3
+ description: "Review a factory job's branch for correctness, simplicity, reuse, conventions, and docs, and run the project's checks. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Reviewer (Code) Agent
8
+
9
+ Review a factory job's branch for correctness, simplicity, reuse, conventions, and docs, and run the project's checks.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-code.md](../../.claude/agents-snippets/factory-reviewer-code.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Reviewer Security
3
+ description: "Audit a factory job's branch diff for security problems in a fresh context. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Reviewer (Security) Agent
8
+
9
+ Audit a factory job's branch diff for security problems in a fresh context.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-security.md](../../.claude/agents-snippets/factory-reviewer-security.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Reviewer UI
3
+ description: "Review a factory job's feature at its build location for design-system consistency, spacing, typography, contrast, and responsive layout, without signing in or writing to real services. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Reviewer (UI) Agent
8
+
9
+ Review a factory job's feature at its build location for design-system consistency, spacing, typography, contrast, and responsive layout, without signing in or writing to real services.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-ui.md](../../.claude/agents-snippets/factory-reviewer-ui.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Reviewer UX
3
+ description: "Review a factory job's feature at its build location for flows, states, copy, accessibility, and mobile, without signing in or writing to real services. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Reviewer (UX) Agent
8
+
9
+ Review a factory job's feature at its build location for flows, states, copy, accessibility, and mobile, without signing in or writing to real services.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-reviewer-ux.md](../../.claude/agents-snippets/factory-reviewer-ux.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Factory Spec Writer
3
+ description: "Write a testable spec.md for a factory job from a feature request, after inspecting the real code. Dispatched by the factory orchestrator."
4
+ tools: ["read", "search", "edit", "runInTerminal", "terminalLastCommand"]
5
+ ---
6
+
7
+ # Factory Spec Writer Agent
8
+
9
+ Write a testable spec.md for a factory job from a feature request, after inspecting the real code.
10
+
11
+ **CRITICAL: READ:** [.claude/agents-snippets/factory-spec-writer.md](../../.claude/agents-snippets/factory-spec-writer.md)
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: "Run an opt-in factory job: intake, spec and plan gates, build in a worktree or in place, reviews, approval, local merge"
3
+ tools: ["agent", "edit", "search", "read", "runInTerminal", "terminalLastCommand"]
4
+ argument-hint: "[--in-place] <feature request> | start [--in-place] <request | KEY | slug | job-id> | approve <job-id> | rework <job-id> <note> | abandon <job-id> | status [--all] | watch [--all] | archive [--all] [--dry-run] | prune [--all] [--abandoned] [--dry-run]"
5
+ ---
6
+
7
+ # Factory
8
+
9
+ ## Agent Dispatch
10
+
11
+ > **Run in the main session.** The orchestrator dispatches these agents; they cannot dispatch others.
12
+
13
+ | Agent | When to use |
14
+ |-------|-------------|
15
+ | `factory-spec-writer` | Spec stage (`spec` mode) writes `spec.md`; plan stage (`plan` mode) writes `plan.md` and `tasks.md` |
16
+ | `factory-builder` | Build, repair, and rework: writes `build.md` in the job folder; its code goes in the build location |
17
+ | `factory-reviewer-code` | Review round, `code` lens |
18
+ | `factory-reviewer-security` | Review round, `security` lens |
19
+ | `factory-reviewer-ux` | Review round, `ux` lens (opt-in) |
20
+ | `factory-reviewer-ui` | Review round, `ui` lens (opt-in) |
21
+ | `factory-approver` | Approval gate: writes `decision.md` |
22
+
23
+ Dispatch each agent by its kebab-case name, as in the first column. Copilot may show a display name; pick the agent with that name.
24
+
25
+ **CRITICAL: READ:** [.claude/prompt-snippets/factory.md](../../.claude/prompt-snippets/factory.md).
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Review currently staged files before committing
2
+ description: Review staged files with detailed code review
3
3
  tools: ["read", "search"]
4
4
  argument-hint: "no arguments required"
5
5
  ---
@@ -1,10 +1,16 @@
1
1
  ---
2
2
  description: "Build administrator portals with RBAC, system dashboards, reporting, analytics, and operational tooling. Specializes in admin frameworks and monitoring ecosystem tools."
3
3
  mode: subagent
4
- temperature: 0.1
5
- permission:
6
- edit: allow
7
- bash: allow
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
8
14
  ---
9
15
 
10
16
  # Admin Portal Specialist
@@ -1,10 +1,16 @@
1
1
  ---
2
2
  description: "Design and implement API architecture, documentation, and developer experience. Use for REST design, GraphQL, OpenAPI specs, SDK generation, API versioning, and integration patterns."
3
3
  mode: subagent
4
- temperature: 0.1
5
- permission:
6
- edit: allow
7
- bash: allow
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
8
14
  ---
9
15
 
10
16
  # API Specialist
@@ -1,10 +1,16 @@
1
1
  ---
2
2
  description: "Design APIs, databases, and server-side architecture. Use for scalable backend systems, data modeling, caching strategies, system design, and infrastructure decisions."
3
3
  mode: subagent
4
- temperature: 0.1
5
- permission:
6
- edit: allow
7
- bash: allow
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
8
14
  ---
9
15
 
10
16
  # Backend Architect
@@ -1,10 +1,16 @@
1
1
  ---
2
2
  description: "Analyze codebases and create comprehensive documentation. Use for AGENTS.md, README files, API docs, architecture documentation, and onboarding guides."
3
3
  mode: subagent
4
- temperature: 0.1
5
- permission:
6
- edit: allow
7
- bash: allow
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
8
14
  ---
9
15
 
10
16
  # Documenter
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: "Decide whether a factory job is approved for merge or escalated to a human, checking history, final diff, a spot-checked criterion, a dry-run merge, and escalation triggers. Dispatched by the factory orchestrator."
3
+ mode: subagent
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
14
+ ---
15
+
16
+ # Factory Approver Agent
17
+
18
+ Decide whether a factory job is approved for merge or escalated to a human.
19
+
20
+ @.claude/agents-snippets/factory-approver.md
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: "Build a factory job's feature inside its git worktree, following TDD, and log results in build.md. Runs in build, repair, or rework mode. Dispatched by the factory orchestrator."
3
+ mode: subagent
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
14
+ ---
15
+
16
+ # Factory Builder Agent
17
+
18
+ Build a factory job's feature inside its git worktree, following TDD, and log results in build.md.
19
+
20
+ @.claude/agents-snippets/factory-builder.md
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: "Review a factory job's branch for correctness, simplicity, reuse, conventions, and docs, and run the project's checks. Dispatched by the factory orchestrator."
3
+ mode: subagent
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
14
+ ---
15
+
16
+ # Factory Reviewer (Code) Agent
17
+
18
+ Review a factory job's branch for correctness, simplicity, reuse, conventions, and docs, and run the project's checks.
19
+
20
+ @.claude/agents-snippets/factory-reviewer-code.md
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: "Audit a factory job's branch diff for security problems in a fresh context. Dispatched by the factory orchestrator."
3
+ mode: subagent
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
14
+ ---
15
+
16
+ # Factory Reviewer (Security) Agent
17
+
18
+ Audit a factory job's branch diff for security problems in a fresh context.
19
+
20
+ @.claude/agents-snippets/factory-reviewer-security.md
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: "Review a factory job's feature at its build location for design-system consistency, spacing, typography, contrast, and responsive layout, without signing in or writing to real services. Dispatched by the factory orchestrator."
3
+ mode: subagent
4
+ request:
5
+ body:
6
+ temperature: 0.1
7
+ permissions:
8
+ - action: edit
9
+ resource: "*"
10
+ effect: allow
11
+ - action: shell
12
+ resource: "*"
13
+ effect: allow
14
+ ---
15
+
16
+ # Factory Reviewer (UI) Agent
17
+
18
+ Review a factory job's feature at its build location for design-system consistency, spacing, typography, contrast, and responsive layout, without signing in or writing to real services.
19
+
20
+ @.claude/agents-snippets/factory-reviewer-ui.md