@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,6 +1,6 @@
1
1
  ---
2
2
  name: interview
3
- description: "Critical requirements interviewer: asks targeted clarifying questions one-by-one before expensive operations. Identifies uncertainty zones, provides answer options, adapts follow-ups based on responses. Can trigger mini-brainstorm on ambiguous points. Use before implementation, design, or migration to gather precise context."
3
+ description: "Use before implementation, design, or migration when requirements are unclear and targeted clarifying questions are needed to gather precise context."
4
4
  triggers:
5
5
  - "/interview"
6
6
  - "Interview"
@@ -16,6 +16,12 @@ metadata:
16
16
  license: "MIT"
17
17
  ---
18
18
 
19
+ <SUBAGENT-STOP>
20
+ If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
21
+ This skill is for orchestrators and interactive session-level routing only.
22
+ Proceed directly with your assigned task.
23
+ </SUBAGENT-STOP>
24
+
19
25
  # Interview
20
26
 
21
27
  Critical requirements interviewer that asks targeted clarifying questions before expensive operations begin. The goal is to eliminate ambiguity and gather precise context so downstream skills (job-orchestrator, feature-dev, prd-creator) produce accurate results.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: interviewer
3
- description: "Critical requirements interviewer that gathers precise context before complex tasks. Asks one focused question at a time (with A/B/C options where applicable). Skips questions already answered by provided context. Can be called by other skills as a sub-agent or directly by the user. Outputs structured context for the calling skill."
3
+ description: "Use when requirements are ambiguous and precise clarification is needed before proceeding with a complex task."
4
4
  triggers:
5
5
  - "Interview me"
6
6
  - "Ask me questions"
@@ -15,6 +15,12 @@ metadata:
15
15
  license: "MIT"
16
16
  ---
17
17
 
18
+ <SUBAGENT-STOP>
19
+ If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
20
+ This skill is for orchestrators and interactive session-level routing only.
21
+ Proceed directly with your assigned task.
22
+ </SUBAGENT-STOP>
23
+
18
24
  # Interviewer
19
25
 
20
26
  ## Purpose
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: interviewer
3
- description: "Critical requirements interviewer that gathers precise context before complex tasks. Asks one focused question at a time (with A/B/C options where applicable). Skips questions already answered by provided context. Can be called by other skills as a sub-agent or directly by the user. Outputs structured context for the calling skill."
3
+ description: "Use when requirements are ambiguous and precise clarification is needed before proceeding with a complex task."
4
4
  triggers:
5
5
  - "Interview me"
6
6
  - "Ask me questions"
@@ -15,6 +15,12 @@ metadata:
15
15
  license: "MIT"
16
16
  ---
17
17
 
18
+ <SUBAGENT-STOP>
19
+ If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
20
+ This skill is for orchestrators and interactive session-level routing only.
21
+ Proceed directly with your assigned task.
22
+ </SUBAGENT-STOP>
23
+
18
24
  # Interviewer
19
25
 
20
26
  ## Purpose
@@ -1,18 +1,15 @@
1
1
  ---
2
- name: gproject-patterns-researcher
3
- description: "Researches per-technology best practices and defines architecture patterns that become binding PRD constraints. Use when: dispatched by gproject-orchestrator Phase 3."
4
- triggers:
5
- - "gproject-patterns-researcher: research patterns"
6
- - "Dispatched by gproject-orchestrator Phase 3"
2
+ name: patterns-researcher
3
+ description: >
4
+ Researches best practices per technology in the chosen stack and defines
5
+ application architecture patterns. Produces constraints that PRD must follow.
6
+ Use when: dispatched by gproject-orchestrator Phase 3.
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-patterns-researcher
17
14
 
18
15
  ## Purpose
@@ -31,3 +28,212 @@ and architectural decisions for each technology. The output becomes a set of
31
28
  | 4 | NEVER copy-paste generic "best practices" — every recommendation must be contextualized to THIS project |
32
29
  | 5 | Output MUST be structured as checkable constraints, not prose advice |
33
30
  | 6 | Existing project patterns (task_in_project) take precedence unless they're antipatterns |
31
+
32
+ ---
33
+
34
+ ## Input Contract
35
+
36
+ ```yaml
37
+ task: "Research per-technology patterns and define application architecture"
38
+ input_artifacts:
39
+ - .metaproject/jobs/<job>/artifacts/stack-decision.md
40
+ - .metaproject/jobs/<job>/artifacts/problem-statement.md
41
+ decisions_so_far:
42
+ D_level: "..."
43
+ D_frontend: "..."
44
+ D_backend: "..."
45
+ D_database: "..."
46
+ D_deploy: "..."
47
+ # All stack decisions
48
+ ```
49
+
50
+ ## Output Contract
51
+
52
+ ```yaml
53
+ status: "DONE" | "NEEDS_CONTEXT"
54
+ summary: "<3-5 sentences: architecture pattern, key per-tech decisions, constraint count>"
55
+ new_decisions:
56
+ D_arch_pattern: "<e.g., Clean Architecture, Feature-Sliced, MVC>"
57
+ D_api_style: "<REST | GraphQL | tRPC | gRPC>"
58
+ D_state_management: "<approach>"
59
+ D_auth_pattern: "<JWT | session | OAuth flow>"
60
+ D_testing_strategy: "<unit + integration + e2e split>"
61
+ D_error_handling: "<pattern>"
62
+ D_logging_observability: "<approach>"
63
+ artifact_path: ".metaproject/jobs/<job>/artifacts/architecture.md"
64
+ additional_artifacts:
65
+ - ".metaproject/jobs/<job>/artifacts/tech-bestpractices.md"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Workflow
71
+
72
+ ### Step 1: Define Application Architecture
73
+
74
+ Based on project level and stack, select architecture pattern:
75
+
76
+ | Level | Typical Pattern | Why |
77
+ |-------|---------------|-----|
78
+ | MVP | Simple layered (routes → services → DB) | Minimum indirection, fast to build |
79
+ | Pet | Feature-based modules | Good learning structure |
80
+ | Startup | Clean Architecture / Hexagonal | Testable, scalable when team grows |
81
+ | Production | DDD + CQRS where justified | Complex domain needs it |
82
+
83
+ Document the pattern with:
84
+ - Layer diagram (which layers, what goes where)
85
+ - Dependency direction (who imports whom)
86
+ - Module/feature structure (how to organize code)
87
+ - Cross-cutting concerns (logging, auth, error handling)
88
+
89
+ ### Step 2: Per-Technology Research
90
+
91
+ For EACH technology in the stack, research and document:
92
+
93
+ #### Frontend (e.g., Next.js)
94
+ - Project structure pattern (App Router conventions, feature folders)
95
+ - Component patterns (Server vs Client components, composition)
96
+ - State management pattern (chosen approach + why)
97
+ - Data fetching pattern (Server Actions, SWR, React Query)
98
+ - Styling approach (Tailwind, CSS Modules, styled-components)
99
+ - Form handling pattern
100
+ - Error boundary strategy
101
+ - Testing approach (unit: Vitest, e2e: Playwright)
102
+
103
+ #### Backend (e.g., NestJS)
104
+ - Module structure pattern
105
+ - DTO and validation approach
106
+ - Service layer patterns
107
+ - Repository / data access pattern
108
+ - Error handling (exception filters, typed errors)
109
+ - Authentication and authorization pattern
110
+ - API versioning strategy
111
+ - Testing approach (unit + integration)
112
+
113
+ #### Database (e.g., PostgreSQL)
114
+ - Schema design approach (normalized vs denormalized for use case)
115
+ - Migration strategy and tooling
116
+ - Indexing guidelines for expected queries
117
+ - Connection pooling approach
118
+ - Backup and recovery (if production level)
119
+
120
+ #### Infrastructure (e.g., Docker)
121
+ - Container structure (multi-stage builds, compose setup)
122
+ - Environment management (dev/staging/prod)
123
+ - CI/CD pipeline pattern
124
+ - Monitoring and logging stack
125
+
126
+ ### Step 3: Define API Contract Style
127
+
128
+ Based on project needs:
129
+ - REST: resource-based, OpenAPI spec, versioning scheme
130
+ - GraphQL: schema-first vs code-first, resolver patterns
131
+ - tRPC: shared types, router structure
132
+ - gRPC: proto file organization, service boundaries
133
+
134
+ ### Step 4: Cross-Cutting Patterns
135
+
136
+ Define patterns that span all layers:
137
+ - **Authentication flow**: complete auth pattern (signup, login, token refresh, logout)
138
+ - **Authorization**: RBAC, ABAC, or simple role checks
139
+ - **Error handling**: typed errors, error codes, user-facing messages
140
+ - **Logging**: structured logging format, log levels, sensitive data masking
141
+ - **Validation**: where validation happens (API layer, domain layer, both)
142
+ - **Testing**: test pyramid ratios for this project level
143
+
144
+ ### Step 5: Write Architecture Doc
145
+
146
+ Write `artifacts/architecture.md`:
147
+
148
+ ```markdown
149
+ # Architecture: <Project/Task Name>
150
+
151
+ ## Architecture Pattern: <Pattern Name>
152
+ **Rationale**: <why this pattern for this project>
153
+ **Alternative considered**: <pattern and why rejected>
154
+
155
+ ## Layer Diagram
156
+ <describe layers and dependencies>
157
+
158
+ ## Module Structure
159
+ <how code is organized — by feature, by layer, hybrid>
160
+
161
+ ## Component Interaction
162
+ <how layers communicate — direct calls, events, DTOs>
163
+
164
+ ## Cross-Cutting Concerns
165
+ ### Authentication: <pattern>
166
+ ### Error Handling: <pattern>
167
+ ### Logging: <pattern>
168
+ ### Validation: <pattern>
169
+
170
+ ## Key Architecture Decisions
171
+ | Decision | Choice | Rationale | Alternative |
172
+ |----------|--------|-----------|-------------|
173
+ | <decision> | <choice> | <why> | <what else> |
174
+ ```
175
+
176
+ ### Step 6: Write Best Practices Constraints
177
+
178
+ Write `artifacts/tech-bestpractices.md` — this is the **constraint document**
179
+ that PRD writer must follow:
180
+
181
+ ```markdown
182
+ # Technical Best Practices & Constraints
183
+
184
+ ## How to Use This Document
185
+ Every requirement in the PRD MUST be compatible with these constraints.
186
+ The consistency-checker (Phase 5) validates PRD against these rules.
187
+
188
+ ## Frontend Constraints (<technology>)
189
+ ### MUST
190
+ - [ ] <constraint 1 — e.g., "Use Server Components by default, Client only when needed">
191
+ - [ ] <constraint 2>
192
+ ### MUST NOT
193
+ - [ ] <antipattern 1 — e.g., "Do not use getServerSideProps in App Router">
194
+ - [ ] <antipattern 2>
195
+ ### SHOULD
196
+ - [ ] <recommendation 1>
197
+
198
+ ## Backend Constraints (<technology>)
199
+ ### MUST
200
+ - [ ] ...
201
+ ### MUST NOT
202
+ - [ ] ...
203
+ ### SHOULD
204
+ - [ ] ...
205
+
206
+ ## Database Constraints (<technology>)
207
+ ### MUST
208
+ - [ ] ...
209
+ ### MUST NOT
210
+ - [ ] ...
211
+
212
+ ## API Constraints
213
+ ### MUST
214
+ - [ ] ...
215
+
216
+ ## Infrastructure Constraints
217
+ ### MUST
218
+ - [ ] ...
219
+
220
+ ## Testing Constraints
221
+ ### MUST
222
+ - [ ] <e.g., "Every API endpoint must have integration test">
223
+ - [ ] <e.g., "Critical user flows must have e2e tests">
224
+ ### Test Pyramid Target
225
+ - Unit: <X>%
226
+ - Integration: <Y>%
227
+ - E2E: <Z>%
228
+
229
+ ## Security Constraints
230
+ ### MUST
231
+ - [ ] ...
232
+ ### MUST NOT
233
+ - [ ] ...
234
+ ```
235
+
236
+ ### Step 7: Return Summary
237
+
238
+ Compact summary: architecture pattern, number of constraints defined,
239
+ key per-tech decisions, any concerns about pattern compatibility.
@@ -1,18 +1,15 @@
1
1
  ---
2
- name: gproject-patterns-researcher
3
- description: "Researches per-technology best practices and defines architecture patterns that become binding PRD constraints. Use when: dispatched by gproject-orchestrator Phase 3."
4
- triggers:
5
- - "gproject-patterns-researcher: research patterns"
6
- - "Dispatched by gproject-orchestrator Phase 3"
2
+ name: patterns-researcher
3
+ description: >
4
+ Researches best practices per technology in the chosen stack and defines
5
+ application architecture patterns. Produces constraints that PRD must follow.
6
+ Use when: dispatched by gproject-orchestrator Phase 3.
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-patterns-researcher
17
14
 
18
15
  ## Purpose
@@ -31,3 +28,212 @@ and architectural decisions for each technology. The output becomes a set of
31
28
  | 4 | NEVER copy-paste generic "best practices" — every recommendation must be contextualized to THIS project |
32
29
  | 5 | Output MUST be structured as checkable constraints, not prose advice |
33
30
  | 6 | Existing project patterns (task_in_project) take precedence unless they're antipatterns |
31
+
32
+ ---
33
+
34
+ ## Input Contract
35
+
36
+ ```yaml
37
+ task: "Research per-technology patterns and define application architecture"
38
+ input_artifacts:
39
+ - .metaproject/jobs/<job>/artifacts/stack-decision.md
40
+ - .metaproject/jobs/<job>/artifacts/problem-statement.md
41
+ decisions_so_far:
42
+ D_level: "..."
43
+ D_frontend: "..."
44
+ D_backend: "..."
45
+ D_database: "..."
46
+ D_deploy: "..."
47
+ # All stack decisions
48
+ ```
49
+
50
+ ## Output Contract
51
+
52
+ ```yaml
53
+ status: "DONE" | "NEEDS_CONTEXT"
54
+ summary: "<3-5 sentences: architecture pattern, key per-tech decisions, constraint count>"
55
+ new_decisions:
56
+ D_arch_pattern: "<e.g., Clean Architecture, Feature-Sliced, MVC>"
57
+ D_api_style: "<REST | GraphQL | tRPC | gRPC>"
58
+ D_state_management: "<approach>"
59
+ D_auth_pattern: "<JWT | session | OAuth flow>"
60
+ D_testing_strategy: "<unit + integration + e2e split>"
61
+ D_error_handling: "<pattern>"
62
+ D_logging_observability: "<approach>"
63
+ artifact_path: ".metaproject/jobs/<job>/artifacts/architecture.md"
64
+ additional_artifacts:
65
+ - ".metaproject/jobs/<job>/artifacts/tech-bestpractices.md"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Workflow
71
+
72
+ ### Step 1: Define Application Architecture
73
+
74
+ Based on project level and stack, select architecture pattern:
75
+
76
+ | Level | Typical Pattern | Why |
77
+ |-------|---------------|-----|
78
+ | MVP | Simple layered (routes → services → DB) | Minimum indirection, fast to build |
79
+ | Pet | Feature-based modules | Good learning structure |
80
+ | Startup | Clean Architecture / Hexagonal | Testable, scalable when team grows |
81
+ | Production | DDD + CQRS where justified | Complex domain needs it |
82
+
83
+ Document the pattern with:
84
+ - Layer diagram (which layers, what goes where)
85
+ - Dependency direction (who imports whom)
86
+ - Module/feature structure (how to organize code)
87
+ - Cross-cutting concerns (logging, auth, error handling)
88
+
89
+ ### Step 2: Per-Technology Research
90
+
91
+ For EACH technology in the stack, research and document:
92
+
93
+ #### Frontend (e.g., Next.js)
94
+ - Project structure pattern (App Router conventions, feature folders)
95
+ - Component patterns (Server vs Client components, composition)
96
+ - State management pattern (chosen approach + why)
97
+ - Data fetching pattern (Server Actions, SWR, React Query)
98
+ - Styling approach (Tailwind, CSS Modules, styled-components)
99
+ - Form handling pattern
100
+ - Error boundary strategy
101
+ - Testing approach (unit: Vitest, e2e: Playwright)
102
+
103
+ #### Backend (e.g., NestJS)
104
+ - Module structure pattern
105
+ - DTO and validation approach
106
+ - Service layer patterns
107
+ - Repository / data access pattern
108
+ - Error handling (exception filters, typed errors)
109
+ - Authentication and authorization pattern
110
+ - API versioning strategy
111
+ - Testing approach (unit + integration)
112
+
113
+ #### Database (e.g., PostgreSQL)
114
+ - Schema design approach (normalized vs denormalized for use case)
115
+ - Migration strategy and tooling
116
+ - Indexing guidelines for expected queries
117
+ - Connection pooling approach
118
+ - Backup and recovery (if production level)
119
+
120
+ #### Infrastructure (e.g., Docker)
121
+ - Container structure (multi-stage builds, compose setup)
122
+ - Environment management (dev/staging/prod)
123
+ - CI/CD pipeline pattern
124
+ - Monitoring and logging stack
125
+
126
+ ### Step 3: Define API Contract Style
127
+
128
+ Based on project needs:
129
+ - REST: resource-based, OpenAPI spec, versioning scheme
130
+ - GraphQL: schema-first vs code-first, resolver patterns
131
+ - tRPC: shared types, router structure
132
+ - gRPC: proto file organization, service boundaries
133
+
134
+ ### Step 4: Cross-Cutting Patterns
135
+
136
+ Define patterns that span all layers:
137
+ - **Authentication flow**: complete auth pattern (signup, login, token refresh, logout)
138
+ - **Authorization**: RBAC, ABAC, or simple role checks
139
+ - **Error handling**: typed errors, error codes, user-facing messages
140
+ - **Logging**: structured logging format, log levels, sensitive data masking
141
+ - **Validation**: where validation happens (API layer, domain layer, both)
142
+ - **Testing**: test pyramid ratios for this project level
143
+
144
+ ### Step 5: Write Architecture Doc
145
+
146
+ Write `artifacts/architecture.md`:
147
+
148
+ ```markdown
149
+ # Architecture: <Project/Task Name>
150
+
151
+ ## Architecture Pattern: <Pattern Name>
152
+ **Rationale**: <why this pattern for this project>
153
+ **Alternative considered**: <pattern and why rejected>
154
+
155
+ ## Layer Diagram
156
+ <describe layers and dependencies>
157
+
158
+ ## Module Structure
159
+ <how code is organized — by feature, by layer, hybrid>
160
+
161
+ ## Component Interaction
162
+ <how layers communicate — direct calls, events, DTOs>
163
+
164
+ ## Cross-Cutting Concerns
165
+ ### Authentication: <pattern>
166
+ ### Error Handling: <pattern>
167
+ ### Logging: <pattern>
168
+ ### Validation: <pattern>
169
+
170
+ ## Key Architecture Decisions
171
+ | Decision | Choice | Rationale | Alternative |
172
+ |----------|--------|-----------|-------------|
173
+ | <decision> | <choice> | <why> | <what else> |
174
+ ```
175
+
176
+ ### Step 6: Write Best Practices Constraints
177
+
178
+ Write `artifacts/tech-bestpractices.md` — this is the **constraint document**
179
+ that PRD writer must follow:
180
+
181
+ ```markdown
182
+ # Technical Best Practices & Constraints
183
+
184
+ ## How to Use This Document
185
+ Every requirement in the PRD MUST be compatible with these constraints.
186
+ The consistency-checker (Phase 5) validates PRD against these rules.
187
+
188
+ ## Frontend Constraints (<technology>)
189
+ ### MUST
190
+ - [ ] <constraint 1 — e.g., "Use Server Components by default, Client only when needed">
191
+ - [ ] <constraint 2>
192
+ ### MUST NOT
193
+ - [ ] <antipattern 1 — e.g., "Do not use getServerSideProps in App Router">
194
+ - [ ] <antipattern 2>
195
+ ### SHOULD
196
+ - [ ] <recommendation 1>
197
+
198
+ ## Backend Constraints (<technology>)
199
+ ### MUST
200
+ - [ ] ...
201
+ ### MUST NOT
202
+ - [ ] ...
203
+ ### SHOULD
204
+ - [ ] ...
205
+
206
+ ## Database Constraints (<technology>)
207
+ ### MUST
208
+ - [ ] ...
209
+ ### MUST NOT
210
+ - [ ] ...
211
+
212
+ ## API Constraints
213
+ ### MUST
214
+ - [ ] ...
215
+
216
+ ## Infrastructure Constraints
217
+ ### MUST
218
+ - [ ] ...
219
+
220
+ ## Testing Constraints
221
+ ### MUST
222
+ - [ ] <e.g., "Every API endpoint must have integration test">
223
+ - [ ] <e.g., "Critical user flows must have e2e tests">
224
+ ### Test Pyramid Target
225
+ - Unit: <X>%
226
+ - Integration: <Y>%
227
+ - E2E: <Z>%
228
+
229
+ ## Security Constraints
230
+ ### MUST
231
+ - [ ] ...
232
+ ### MUST NOT
233
+ - [ ] ...
234
+ ```
235
+
236
+ ### Step 7: Return Summary
237
+
238
+ Compact summary: architecture pattern, number of constraints defined,
239
+ key per-tech decisions, any concerns about pattern compatibility.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: gproject-patterns-researcher
2
+ name: patterns-researcher
3
3
  description: >
4
4
  Researches best practices per technology in the chosen stack and defines
5
5
  application architecture patterns. Produces constraints that PRD must follow.