@mrciphersmith/keryx 0.4.27 → 0.4.29

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