@mrciphersmith/keryx 0.2.72 → 0.2.74

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 (144) hide show
  1. package/dist/cli.js +33409 -32626
  2. package/package.json +2 -2
  3. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +1 -1
  4. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +1 -1
  5. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +1 -1
  6. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +214 -0
  7. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +326 -20
  8. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +320 -22
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +326 -12
  10. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +333 -9
  11. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +92 -4
  12. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +92 -4
  13. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +92 -4
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +92 -4
  15. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +1 -1
  16. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +154 -1098
  17. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +154 -1098
  18. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +154 -1098
  19. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +154 -1098
  20. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +1 -1
  21. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +101 -41
  22. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +101 -41
  23. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +48 -1
  24. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +70 -4
  25. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +115 -49
  26. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +115 -49
  27. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +115 -49
  28. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +115 -49
  29. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  30. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +15 -6
  31. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +15 -6
  32. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +15 -6
  33. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +15 -6
  34. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1 -1
  35. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1 -1
  36. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  37. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1 -1
  38. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1 -1
  39. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +300 -55
  40. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +300 -55
  41. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +120 -37
  42. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +300 -55
  43. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +300 -55
  44. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +56 -14
  45. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +50 -23
  46. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +6 -2
  47. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +18 -12
  48. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  49. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  50. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +169 -10
  51. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +169 -10
  52. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +1 -1
  53. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +7 -1
  54. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +7 -1
  55. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +7 -1
  56. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +7 -1
  57. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +216 -10
  58. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +216 -10
  59. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +1 -1
  60. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +169 -10
  61. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +169 -10
  62. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +1 -1
  63. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +2 -2
  64. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +2 -2
  65. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +2 -2
  66. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +2 -2
  67. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +134 -10
  68. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +134 -10
  69. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +1 -1
  70. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +146 -10
  71. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +146 -10
  72. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +1 -1
  73. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +211 -10
  74. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +211 -10
  75. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +1 -1
  76. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +162 -10
  77. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +162 -10
  78. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +1 -1
  79. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
  80. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
  81. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
  82. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
  83. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
  84. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
  85. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
  86. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
  87. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
  88. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
  89. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
  90. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
  91. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
  92. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
  93. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
  94. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
  95. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
  96. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
  97. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +15 -1
  98. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +248 -165
  99. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +15 -1
  100. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +359 -19
  101. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
  102. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
  103. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
  104. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
  105. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
  106. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
  107. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +299 -24
  108. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +296 -31
  109. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +309 -18
  110. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +312 -17
  111. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +29 -30
  112. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +29 -30
  113. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +29 -30
  114. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +29 -30
  115. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +21 -30
  116. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +21 -30
  117. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +21 -30
  118. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +21 -30
  119. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +19 -23
  120. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +19 -23
  121. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +19 -23
  122. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +19 -23
  123. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +17 -24
  124. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +17 -24
  125. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +17 -24
  126. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +17 -24
  127. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +33 -1
  128. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +217 -0
  129. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +26 -0
  130. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +320 -5
  131. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +644 -113
  132. package/src/gdskills/bundled/skills/review/review-pr-feedback/input-contract.schema.json +79 -0
  133. package/src/gdskills/bundled/skills/review/review-pr-feedback/output-contract.schema.json +375 -0
  134. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +111 -1
  135. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +25 -1
  136. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +0 -46
  137. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +0 -94
  138. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +0 -45
  139. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +0 -40
  140. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +0 -45
  141. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +0 -42
  142. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +0 -48
  143. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +0 -40
  144. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +0 -30
@@ -1,18 +1,15 @@
1
1
  ---
2
- name: gproject-spec-writer
3
- description: "Generates PRD or Implementation Plan constrained by upstream decisions, architecture, and best practices. Use when: dispatched by gproject-orchestrator Phase 4."
4
- triggers:
5
- - "gproject-spec-writer: write PRD"
6
- - "Dispatched by gproject-orchestrator Phase 4"
2
+ name: spec-writer
3
+ description: >
4
+ Generates PRD or Implementation Plan constrained by decisions registry,
5
+ architecture doc, and best practices. Does NOT invent new architectural decisions.
6
+ Use when: dispatched by gproject-orchestrator Phase 4.
7
+ NOT for: direct user invocation.
7
8
  metadata:
8
- author: "MrCipherSmith"
9
- version: "1.0.0"
10
- category: "planning"
9
+ version: 1.0.0
11
10
  compatible_harnesses: "cursor,codex,zed,opencode"
12
- license: "MIT"
13
11
  ---
14
12
 
15
-
16
13
  # gproject-spec-writer
17
14
 
18
15
  ## Purpose
@@ -42,3 +39,207 @@ into actionable requirements and user stories.
42
39
  | User story without acceptance criteria | Untestable requirement | STOP → add criteria or flag as incomplete |
43
40
  | Feature that contradicts a non-goal | Scope creep | STOP → remove or flag as conflict |
44
41
  | Technical spec section with no BP constraint reference | Unconstrained decision | STOP → find applicable constraint or flag gap |
42
+
43
+ ---
44
+
45
+ ## Input Contract
46
+
47
+ ```yaml
48
+ task: "Generate PRD / Implementation Plan"
49
+ mode: "new_project" | "task_in_project"
50
+ input_artifacts:
51
+ - .metaproject/jobs/<job>/artifacts/problem-statement.md
52
+ - .metaproject/jobs/<job>/artifacts/architecture.md
53
+ - .metaproject/jobs/<job>/artifacts/tech-bestpractices.md
54
+ - .metaproject/jobs/<job>/decisions.md
55
+ decisions_so_far: <all decisions from D1 through D_arch_pattern>
56
+ ```
57
+
58
+ ## Output Contract
59
+
60
+ ```yaml
61
+ status: "DONE" | "DONE_WITH_CONCERNS" | "BLOCKED"
62
+ summary: "<3-5 sentences: document type, user story count, key scope decisions>"
63
+ new_decisions: {} # PRD does NOT add architectural decisions
64
+ concerns: ["<if DONE_WITH_CONCERNS — gaps or ambiguities found>"]
65
+ artifact_path: ".metaproject/jobs/<job>/artifacts/prd.md"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Workflow
71
+
72
+ ### Step 1: Validate Inputs
73
+
74
+ Before writing anything, verify:
75
+ - [ ] All referenced decisions exist in decisions.md
76
+ - [ ] No contradictions between problem-statement and architecture
77
+ - [ ] Best practices constraints are internally consistent
78
+ - [ ] Scope (goals + non-goals) is clear
79
+
80
+ If validation fails → return `STATUS: BLOCKED` with specific issues.
81
+
82
+ ### Step 2: Determine Document Type
83
+
84
+ ```
85
+ IF mode == "new_project":
86
+ → Write full PRD (template A below)
87
+ ELSE IF mode == "task_in_project":
88
+ → Write Implementation Plan (template B below)
89
+ ```
90
+
91
+ ### Step 3: Write User Stories
92
+
93
+ For each goal in problem-statement.md, generate user stories:
94
+
95
+ Format:
96
+ ```
97
+ ### US-<NNN>: <Title>
98
+ **As a** <user type from D_target_users>
99
+ **I want to** <action>
100
+ **So that** <benefit tied to goal G_N>
101
+
102
+ **Acceptance Criteria:**
103
+ - [ ] <specific, testable criterion>
104
+ - [ ] <specific, testable criterion>
105
+ - [ ] <specific, testable criterion>
106
+
107
+ **Technical Notes:**
108
+ - Constraint ref: <reference to tech-bestpractices.md constraint>
109
+ - Architecture ref: <reference to architecture.md section>
110
+
111
+ **Priority:** P0 (must-have) | P1 (should-have) | P2 (nice-to-have)
112
+ ```
113
+
114
+ Prioritization rules:
115
+ - **P0**: directly solves a core problem (P1/P2 in problem-statement)
116
+ - **P1**: supports a goal but not critical for launch
117
+ - **P2**: enhances experience, can be deferred
118
+
119
+ ### Step 4: Write Document
120
+
121
+ #### Template A: Full PRD (new_project)
122
+
123
+ ```markdown
124
+ # PRD: <Project Name>
125
+
126
+ ## Document Metadata
127
+ - **Based on**: problem-statement.md, architecture.md, tech-bestpractices.md
128
+ - **Decisions referenced**: <list of D_* IDs>
129
+ - **Generated by**: gproject-spec-writer v1.0.0
130
+
131
+ ## Executive Summary
132
+ <2-3 paragraphs: what, why, for whom, high-level how>
133
+
134
+ ## Goals & Success Metrics
135
+ <from problem-statement.md — reference, don't duplicate>
136
+ | Goal ID | Goal | Success Metric | Target |
137
+ |---------|------|---------------|--------|
138
+ | G1 | <goal> | <metric> | <target> |
139
+
140
+ ## Non-Goals
141
+ <from problem-statement.md — reference explicitly>
142
+
143
+ ## Technical Foundation
144
+ **Stack**: <from stack-decision.md — summarize, don't duplicate>
145
+ **Architecture**: <from architecture.md — summarize>
146
+ **Key Constraints**: <from tech-bestpractices.md — list MUST constraints>
147
+
148
+ ## User Stories
149
+
150
+ ### Epic 1: <Epic Name>
151
+ <Group of related user stories>
152
+
153
+ #### US-001: <Title>
154
+ ...
155
+
156
+ ### Epic 2: <Epic Name>
157
+ ...
158
+
159
+ ## Data Model (High-Level)
160
+ <Key entities and relationships — aligned with DB constraints from BP>
161
+
162
+ ## API Surface (High-Level)
163
+ <Key endpoints/operations — aligned with API constraints from BP>
164
+
165
+ ## Security Requirements
166
+ <Aligned with security constraints from BP>
167
+
168
+ ## Testing Requirements
169
+ <Aligned with testing constraints from BP — reference test pyramid targets>
170
+
171
+ ## Out of Scope
172
+ <Explicit reference to non-goals + any additional scope exclusions>
173
+
174
+ ## Open Questions
175
+ <Any remaining ambiguities — flagged for orchestrator>
176
+
177
+ ## Traceability Matrix
178
+ | User Story | Goal | Problem | BP Constraint | Architecture Section |
179
+ |-----------|------|---------|---------------|---------------------|
180
+ | US-001 | G1 | P1 | Frontend.MUST.1 | Layer: API |
181
+ | US-002 | G1 | P1 | Backend.MUST.3 | Layer: Service |
182
+ ```
183
+
184
+ #### Template B: Implementation Plan (task_in_project)
185
+
186
+ ```markdown
187
+ # Implementation Plan: <Task Name>
188
+
189
+ ## Document Metadata
190
+ - **Based on**: discovery-brief.md, architecture.md, tech-bestpractices.md
191
+ - **Existing project context**: ai/context.md
192
+ - **Decisions referenced**: <list of D_* IDs>
193
+
194
+ ## Summary
195
+ <What needs to be done, why, and how it fits into existing architecture>
196
+
197
+ ## Impact Analysis
198
+ ### Files Affected
199
+ | File/Module | Change Type | Risk |
200
+ |------------|------------|------|
201
+ | <path> | modify / create / delete | low / medium / high |
202
+
203
+ ### Dependencies
204
+ - <component X depends on this change>
205
+ - <this change requires Y to be done first>
206
+
207
+ ## Implementation Steps
208
+
209
+ ### Step 1: <Title>
210
+ **What**: <specific change>
211
+ **Where**: <file paths>
212
+ **Pattern to follow**: <reference existing project patterns>
213
+ **BP constraint**: <reference tech-bestpractices.md>
214
+ **Acceptance criteria**:
215
+ - [ ] <testable criterion>
216
+
217
+ ### Step 2: ...
218
+
219
+ ## Testing Plan
220
+ <Aligned with testing constraints — what tests to write, what coverage>
221
+
222
+ ## Migration / Rollback Plan (if applicable)
223
+ <How to roll back if something goes wrong>
224
+
225
+ ## Traceability Matrix
226
+ | Step | Goal | BP Constraint | Existing Pattern |
227
+ |------|------|---------------|-----------------|
228
+ | Step 1 | G1 | Backend.MUST.2 | existing-service.ts pattern |
229
+ ```
230
+
231
+ ### Step 5: Self-Validate
232
+
233
+ Before returning, check:
234
+ - [ ] Every user story traces to a goal
235
+ - [ ] No features from non-goals list
236
+ - [ ] Every technical note references a BP constraint
237
+ - [ ] All acceptance criteria are testable (no "should work well")
238
+ - [ ] Traceability matrix is complete
239
+
240
+ If self-validation finds issues → fix them. If unfixable → return `DONE_WITH_CONCERNS`.
241
+
242
+ ### Step 6: Return Summary
243
+
244
+ Compact summary: document type, total user stories / steps,
245
+ P0 count, any concerns or gaps found during self-validation.
@@ -1,18 +1,15 @@
1
1
  ---
2
- name: gproject-spec-writer
3
- description: "Generates PRD or Implementation Plan constrained by upstream decisions, architecture, and best practices. Use when: dispatched by gproject-orchestrator Phase 4."
4
- triggers:
5
- - "gproject-spec-writer: write PRD"
6
- - "Dispatched by gproject-orchestrator Phase 4"
2
+ name: spec-writer
3
+ description: >
4
+ Generates PRD or Implementation Plan constrained by decisions registry,
5
+ architecture doc, and best practices. Does NOT invent new architectural decisions.
6
+ Use when: dispatched by gproject-orchestrator Phase 4.
7
+ NOT for: direct user invocation.
7
8
  metadata:
8
- author: "MrCipherSmith"
9
- version: "1.0.0"
10
- category: "planning"
9
+ version: 1.0.0
11
10
  compatible_harnesses: "cursor,codex,zed,opencode"
12
- license: "MIT"
13
11
  ---
14
12
 
15
-
16
13
  # gproject-spec-writer
17
14
 
18
15
  ## Purpose
@@ -42,3 +39,207 @@ into actionable requirements and user stories.
42
39
  | User story without acceptance criteria | Untestable requirement | STOP → add criteria or flag as incomplete |
43
40
  | Feature that contradicts a non-goal | Scope creep | STOP → remove or flag as conflict |
44
41
  | Technical spec section with no BP constraint reference | Unconstrained decision | STOP → find applicable constraint or flag gap |
42
+
43
+ ---
44
+
45
+ ## Input Contract
46
+
47
+ ```yaml
48
+ task: "Generate PRD / Implementation Plan"
49
+ mode: "new_project" | "task_in_project"
50
+ input_artifacts:
51
+ - .metaproject/jobs/<job>/artifacts/problem-statement.md
52
+ - .metaproject/jobs/<job>/artifacts/architecture.md
53
+ - .metaproject/jobs/<job>/artifacts/tech-bestpractices.md
54
+ - .metaproject/jobs/<job>/decisions.md
55
+ decisions_so_far: <all decisions from D1 through D_arch_pattern>
56
+ ```
57
+
58
+ ## Output Contract
59
+
60
+ ```yaml
61
+ status: "DONE" | "DONE_WITH_CONCERNS" | "BLOCKED"
62
+ summary: "<3-5 sentences: document type, user story count, key scope decisions>"
63
+ new_decisions: {} # PRD does NOT add architectural decisions
64
+ concerns: ["<if DONE_WITH_CONCERNS — gaps or ambiguities found>"]
65
+ artifact_path: ".metaproject/jobs/<job>/artifacts/prd.md"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Workflow
71
+
72
+ ### Step 1: Validate Inputs
73
+
74
+ Before writing anything, verify:
75
+ - [ ] All referenced decisions exist in decisions.md
76
+ - [ ] No contradictions between problem-statement and architecture
77
+ - [ ] Best practices constraints are internally consistent
78
+ - [ ] Scope (goals + non-goals) is clear
79
+
80
+ If validation fails → return `STATUS: BLOCKED` with specific issues.
81
+
82
+ ### Step 2: Determine Document Type
83
+
84
+ ```
85
+ IF mode == "new_project":
86
+ → Write full PRD (template A below)
87
+ ELSE IF mode == "task_in_project":
88
+ → Write Implementation Plan (template B below)
89
+ ```
90
+
91
+ ### Step 3: Write User Stories
92
+
93
+ For each goal in problem-statement.md, generate user stories:
94
+
95
+ Format:
96
+ ```
97
+ ### US-<NNN>: <Title>
98
+ **As a** <user type from D_target_users>
99
+ **I want to** <action>
100
+ **So that** <benefit tied to goal G_N>
101
+
102
+ **Acceptance Criteria:**
103
+ - [ ] <specific, testable criterion>
104
+ - [ ] <specific, testable criterion>
105
+ - [ ] <specific, testable criterion>
106
+
107
+ **Technical Notes:**
108
+ - Constraint ref: <reference to tech-bestpractices.md constraint>
109
+ - Architecture ref: <reference to architecture.md section>
110
+
111
+ **Priority:** P0 (must-have) | P1 (should-have) | P2 (nice-to-have)
112
+ ```
113
+
114
+ Prioritization rules:
115
+ - **P0**: directly solves a core problem (P1/P2 in problem-statement)
116
+ - **P1**: supports a goal but not critical for launch
117
+ - **P2**: enhances experience, can be deferred
118
+
119
+ ### Step 4: Write Document
120
+
121
+ #### Template A: Full PRD (new_project)
122
+
123
+ ```markdown
124
+ # PRD: <Project Name>
125
+
126
+ ## Document Metadata
127
+ - **Based on**: problem-statement.md, architecture.md, tech-bestpractices.md
128
+ - **Decisions referenced**: <list of D_* IDs>
129
+ - **Generated by**: gproject-spec-writer v1.0.0
130
+
131
+ ## Executive Summary
132
+ <2-3 paragraphs: what, why, for whom, high-level how>
133
+
134
+ ## Goals & Success Metrics
135
+ <from problem-statement.md — reference, don't duplicate>
136
+ | Goal ID | Goal | Success Metric | Target |
137
+ |---------|------|---------------|--------|
138
+ | G1 | <goal> | <metric> | <target> |
139
+
140
+ ## Non-Goals
141
+ <from problem-statement.md — reference explicitly>
142
+
143
+ ## Technical Foundation
144
+ **Stack**: <from stack-decision.md — summarize, don't duplicate>
145
+ **Architecture**: <from architecture.md — summarize>
146
+ **Key Constraints**: <from tech-bestpractices.md — list MUST constraints>
147
+
148
+ ## User Stories
149
+
150
+ ### Epic 1: <Epic Name>
151
+ <Group of related user stories>
152
+
153
+ #### US-001: <Title>
154
+ ...
155
+
156
+ ### Epic 2: <Epic Name>
157
+ ...
158
+
159
+ ## Data Model (High-Level)
160
+ <Key entities and relationships — aligned with DB constraints from BP>
161
+
162
+ ## API Surface (High-Level)
163
+ <Key endpoints/operations — aligned with API constraints from BP>
164
+
165
+ ## Security Requirements
166
+ <Aligned with security constraints from BP>
167
+
168
+ ## Testing Requirements
169
+ <Aligned with testing constraints from BP — reference test pyramid targets>
170
+
171
+ ## Out of Scope
172
+ <Explicit reference to non-goals + any additional scope exclusions>
173
+
174
+ ## Open Questions
175
+ <Any remaining ambiguities — flagged for orchestrator>
176
+
177
+ ## Traceability Matrix
178
+ | User Story | Goal | Problem | BP Constraint | Architecture Section |
179
+ |-----------|------|---------|---------------|---------------------|
180
+ | US-001 | G1 | P1 | Frontend.MUST.1 | Layer: API |
181
+ | US-002 | G1 | P1 | Backend.MUST.3 | Layer: Service |
182
+ ```
183
+
184
+ #### Template B: Implementation Plan (task_in_project)
185
+
186
+ ```markdown
187
+ # Implementation Plan: <Task Name>
188
+
189
+ ## Document Metadata
190
+ - **Based on**: discovery-brief.md, architecture.md, tech-bestpractices.md
191
+ - **Existing project context**: ai/context.md
192
+ - **Decisions referenced**: <list of D_* IDs>
193
+
194
+ ## Summary
195
+ <What needs to be done, why, and how it fits into existing architecture>
196
+
197
+ ## Impact Analysis
198
+ ### Files Affected
199
+ | File/Module | Change Type | Risk |
200
+ |------------|------------|------|
201
+ | <path> | modify / create / delete | low / medium / high |
202
+
203
+ ### Dependencies
204
+ - <component X depends on this change>
205
+ - <this change requires Y to be done first>
206
+
207
+ ## Implementation Steps
208
+
209
+ ### Step 1: <Title>
210
+ **What**: <specific change>
211
+ **Where**: <file paths>
212
+ **Pattern to follow**: <reference existing project patterns>
213
+ **BP constraint**: <reference tech-bestpractices.md>
214
+ **Acceptance criteria**:
215
+ - [ ] <testable criterion>
216
+
217
+ ### Step 2: ...
218
+
219
+ ## Testing Plan
220
+ <Aligned with testing constraints — what tests to write, what coverage>
221
+
222
+ ## Migration / Rollback Plan (if applicable)
223
+ <How to roll back if something goes wrong>
224
+
225
+ ## Traceability Matrix
226
+ | Step | Goal | BP Constraint | Existing Pattern |
227
+ |------|------|---------------|-----------------|
228
+ | Step 1 | G1 | Backend.MUST.2 | existing-service.ts pattern |
229
+ ```
230
+
231
+ ### Step 5: Self-Validate
232
+
233
+ Before returning, check:
234
+ - [ ] Every user story traces to a goal
235
+ - [ ] No features from non-goals list
236
+ - [ ] Every technical note references a BP constraint
237
+ - [ ] All acceptance criteria are testable (no "should work well")
238
+ - [ ] Traceability matrix is complete
239
+
240
+ If self-validation finds issues → fix them. If unfixable → return `DONE_WITH_CONCERNS`.
241
+
242
+ ### Step 6: Return Summary
243
+
244
+ Compact summary: document type, total user stories / steps,
245
+ P0 count, any concerns or gaps found during self-validation.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: gproject-spec-writer
2
+ name: spec-writer
3
3
  description: >
4
4
  Generates PRD or Implementation Plan constrained by decisions registry,
5
5
  architecture doc, and best practices. Does NOT invent new architectural decisions.
@@ -1,18 +1,15 @@
1
1
  ---
2
- name: gproject-stack-advisor
3
- description: "Determines project level (MVP/pet/startup/production) and recommends optimal technology stack with trade-off analysis. Use when: dispatched by gproject-orchestrator Phase 2."
4
- triggers:
5
- - "gproject-stack-advisor: select stack"
6
- - "Dispatched by gproject-orchestrator Phase 2"
2
+ name: stack-advisor
3
+ description: >
4
+ Determines project level (MVP/pet/startup/production) and recommends optimal
5
+ technology stack with trade-off analysis.
6
+ Use when: dispatched by gproject-orchestrator Phase 2.
7
+ NOT for: direct user invocation.
7
8
  metadata:
8
- author: "MrCipherSmith"
9
- version: "1.0.0"
10
- category: "planning"
9
+ version: 1.0.0
11
10
  compatible_harnesses: "cursor,codex,zed,opencode"
12
- license: "MIT"
13
11
  ---
14
12
 
15
-
16
13
  # gproject-stack-advisor
17
14
 
18
15
  ## Purpose
@@ -41,3 +38,158 @@ with trade-offs — not "use React because it's popular" but "use React because
41
38
  | Ignoring team skills in rationale | Tech-driven not people-driven | Re-evaluate with team factor |
42
39
  | No alternative considered | Confirmation bias | Research at least 1 alternative per choice |
43
40
  | Recommending bleeding-edge for production | Risk ignorance | Flag maturity concern |
41
+
42
+ ---
43
+
44
+ ## Input Contract
45
+
46
+ ```yaml
47
+ task: "Select project level and technology stack"
48
+ input_artifacts:
49
+ - .metaproject/jobs/<job>/artifacts/problem-statement.md
50
+ decisions_so_far:
51
+ D_core_problems: [...]
52
+ D_goals: [...]
53
+ D_non_goals: [...]
54
+ D_target_users: "..."
55
+ D_scale_estimate: "..."
56
+ # For task_in_project:
57
+ D_existing_stack: "<if detected by context-collector>"
58
+ ```
59
+
60
+ ## Output Contract
61
+
62
+ ```yaml
63
+ status: "DONE" | "NEEDS_CONTEXT"
64
+ summary: "<3-5 sentences: level chosen, stack chosen, key trade-off>"
65
+ new_decisions:
66
+ D_level: "mvp | pet | startup | production"
67
+ D_frontend: "<framework + version>"
68
+ D_backend: "<framework + version>"
69
+ D_database: "<DB + version>"
70
+ D_cache: "<if needed>"
71
+ D_queue: "<if needed>"
72
+ D_auth: "<approach>"
73
+ D_deploy: "<strategy>"
74
+ D_infra: "<approach>"
75
+ artifact_path: ".metaproject/jobs/<job>/artifacts/stack-decision.md"
76
+ next_phase_needs:
77
+ - "Per-technology best practices research"
78
+ - "Architecture pattern selection"
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Workflow
84
+
85
+ ### Step 1: Determine Project Level
86
+
87
+ Evaluate against criteria matrix:
88
+
89
+ | Factor | MVP | Pet/Learning | Startup | Production |
90
+ |--------|-----|-------------|---------|------------|
91
+ | Users | <100 | 1 (self) | 100-10K | 10K+ |
92
+ | Team | 1 person | 1 person | 2-5 | 5+ |
93
+ | Lifespan | weeks | indefinite | months-years | years |
94
+ | Budget | minimal | zero | seed/limited | funded |
95
+ | Uptime SLA | none | none | 99% | 99.9%+ |
96
+ | Data sensitivity | low | low | medium | high |
97
+ | Compliance | none | none | basic | regulated |
98
+
99
+ The level determines complexity ceiling:
100
+ - **MVP**: max simplicity, monolith, single deploy target, minimal infra
101
+ - **Pet**: developer experience priority, learning-friendly stack
102
+ - **Startup**: balance of speed and scalability, ready for growth
103
+ - **Production**: reliability, security, observability, scalability first
104
+
105
+ ### Step 2: Evaluate Stack Options
106
+
107
+ For each layer, evaluate 2-3 options against project-specific criteria:
108
+
109
+ **Evaluation criteria** (weight varies by project level):
110
+ 1. **Problem fit** — does it solve our specific problems well?
111
+ 2. **Team match** — does the team know it? Learning curve?
112
+ 3. **Ecosystem** — libraries, tools, community for our use case
113
+ 4. **Scalability ceiling** — will it handle our target scale?
114
+ 5. **Velocity** — how fast can we ship with it?
115
+ 6. **Cost** — licensing, hosting, operational cost
116
+ 7. **Maturity** — production-proven? Active maintenance?
117
+ 8. **Integration** — works well with other chosen components?
118
+
119
+ ### Step 3: Web Research (Best Practices)
120
+
121
+ For the shortlisted stack, research:
122
+ - Current best practices (2024-2025 sources preferred)
123
+ - Common pitfalls and antipatterns
124
+ - Production case studies at similar scale
125
+ - Performance benchmarks relevant to our use case
126
+
127
+ ### Step 4: task_in_project Mode Adjustments
128
+
129
+ If mode is task_in_project:
130
+ - Start from existing stack (detected by context-collector)
131
+ - Only recommend NEW technologies if:
132
+ - Existing stack cannot solve the specific problem
133
+ - New tech integrates cleanly with existing stack
134
+ - Learning overhead is justified by benefit
135
+ - Flag any technology additions clearly as "NEW — requires team learning"
136
+
137
+ ### Step 5: Write Stack Decision
138
+
139
+ Write `artifacts/stack-decision.md`:
140
+
141
+ ```markdown
142
+ # Stack Decision: <Project/Task Name>
143
+
144
+ ## Project Level: <LEVEL>
145
+ **Rationale**: <why this level, based on constraints>
146
+
147
+ ## Technology Stack
148
+
149
+ ### Frontend: <Choice>
150
+ **Version**: <specific>
151
+ **Rationale**: <tied to project constraints>
152
+ **Alternative considered**: <what and why rejected>
153
+ **Key libraries**: <essential deps>
154
+
155
+ ### Backend: <Choice>
156
+ **Version**: <specific>
157
+ **Rationale**: <tied to project constraints>
158
+ **Alternative considered**: <what and why rejected>
159
+ **Key libraries**: <essential deps>
160
+
161
+ ### Database: <Choice>
162
+ ...
163
+
164
+ ### Infrastructure & Deploy: <Choice>
165
+ ...
166
+
167
+ ### Additional Services (if any)
168
+ - Cache: <if needed, with rationale>
169
+ - Queue: <if needed, with rationale>
170
+ - Search: <if needed, with rationale>
171
+
172
+ ## Stack Compatibility Matrix
173
+ | Component | Integrates With | Integration Quality |
174
+ |-----------|----------------|-------------------|
175
+ | <A> | <B> | proven / good / experimental |
176
+
177
+ ## Trade-offs Accepted
178
+ | Trade-off | What We Gain | What We Give Up |
179
+ |-----------|-------------|-----------------|
180
+ | <choice> | <benefit> | <cost> |
181
+
182
+ ## Complexity Budget
183
+ **Total new technologies**: <count>
184
+ **Team learning required**: <list what's new>
185
+ **Estimated ramp-up**: <time>
186
+
187
+ ## Risk Assessment
188
+ | Risk | Probability | Impact | Mitigation |
189
+ |------|------------|--------|------------|
190
+ | <risk> | <H/M/L> | <H/M/L> | <plan> |
191
+ ```
192
+
193
+ ### Step 6: Return Summary
194
+
195
+ Compact summary: level + core stack (one line) + biggest trade-off + confidence.