@mrciphersmith/keryx 0.4.27 → 0.4.28

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 (87) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +105165 -104989
  3. package/dist/core.js +21 -197
  4. package/dist/keryx-general-worker-entry.js +22 -201
  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 +3 -26
  8. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
  9. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
  10. package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
  11. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
  12. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +7 -10
  13. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
  15. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  16. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
  17. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  18. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
  19. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
  20. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
  21. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
  22. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
  23. package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
  24. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
  25. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
  26. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -7
  27. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +22 -22
  28. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +15 -15
  29. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
  30. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +7 -7
  31. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +2 -2
  32. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +34 -30
  33. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +2 -2
  34. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +64 -135
  35. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -4
  36. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
  37. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
  38. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
  39. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
  40. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
  41. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
  42. package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
  43. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +3 -5
  44. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +14 -15
  45. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +14 -13
  46. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +11 -11
  47. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
  48. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
  49. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  50. package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
  51. package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
  52. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
  53. package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
  54. package/src/gdskills/contracts/review-finding.schema.json +2 -2
  55. package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
  56. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
  57. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
  58. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
  59. package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
  60. package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
  61. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
  62. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
  63. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
  64. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
  65. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
  66. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
  67. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
  68. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
  69. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
  70. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
  71. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
  72. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
  73. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
  74. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
  75. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
  76. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
  77. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
  78. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
  79. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
  80. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
  81. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
  82. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
  83. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
  84. package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
  85. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
  86. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
  87. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
@@ -1,170 +0,0 @@
1
- ---
2
- name: problem-definer
3
- description: >
4
- Defines core problems, goals, non-goals, and success metrics from discovery data.
5
- Use when: dispatched by gproject-orchestrator Phase 1.
6
- NOT for: direct user invocation.
7
- triggers:
8
- - "define problem"
9
- - "goals non-goals"
10
- - "success metrics"
11
- metadata:
12
- version: 1.0.0
13
- ---
14
-
15
- # gproject-problem-definer
16
-
17
- ## Purpose
18
-
19
- Transform raw discovery data into a crisp problem statement with measurable goals.
20
- This phase answers: "Why are we doing this?" and "How will we know we succeeded?"
21
-
22
- ## Iron Laws
23
-
24
- | # | Law |
25
- |---|-----|
26
- | 1 | Every goal MUST have a measurable success metric |
27
- | 2 | Non-goals are as important as goals — list at least 3 |
28
- | 3 | Problems MUST be stated from the USER's perspective, not technical |
29
- | 4 | NEVER introduce solutions in the problem statement |
30
- | 5 | If discovery brief has low confidence areas, flag them — don't paper over |
31
-
32
- ## Red Flags
33
-
34
- Stop and re-read this skill if you are thinking:
35
-
36
- | Rationalization | Rebuttal |
37
- |---|---|
38
- | "'Improve onboarding' is a real goal — the metric can come later." | Iron Law 1: every goal carries a measurable success metric, here. Phase 5 checks each user story against a goal's metric; a goal without one passes every check by being uncheckable. |
39
- | "The obvious fix is a dashboard, so the problem is 'users have no dashboard'." | Iron Law 4: no solutions in the problem statement. A problem phrased as a missing solution pre-decides the PRD, and the stack and architecture phases then optimise for the wrong thing with nothing to notice. |
40
- | "Non-goals are filler — two obvious ones are enough." | Iron Law 2 sets a floor of three, and non-goals are the only part of this document that stops scope growth later. The useful ones are the plausible features you are deliberately not building, not the absurd ones. |
41
- | "The discovery brief was thin on this area, but I can reason my way to the goal." | Iron Law 5: flag low-confidence areas. Reasoning over a gap produces a goal that reads as firm as the evidenced ones, and no later phase can tell them apart. |
42
- | "This problem is really about the database schema, which is the true root cause." | Iron Law 3: problems are stated from the user's perspective. A technical root cause belongs in the architecture phase; stated here it becomes the thing success is measured against, instead of what the user experiences. |
43
-
44
- ---
45
-
46
- ## Input Contract
47
-
48
- ```yaml
49
- task: "Define core problems and goals"
50
- input_artifacts:
51
- - .metaproject/jobs/<job>/artifacts/discovery-brief.md
52
- decisions_so_far:
53
- D_mode: "..."
54
- D_domain: "..."
55
- D_audience: "..."
56
- D_scale_estimate: "..."
57
- ```
58
-
59
- ## Output Contract
60
-
61
- ```yaml
62
- status: "DONE" | "NEEDS_CONTEXT"
63
- summary: "<3-5 sentences: core problem, primary goal, key constraint>"
64
- new_decisions:
65
- D_core_problems: ["<problem 1>", "<problem 2>"]
66
- D_goals: ["<goal 1 + metric>", "<goal 2 + metric>"]
67
- D_non_goals: ["<non-goal 1>", "<non-goal 2>", "<non-goal 3>"]
68
- D_success_metrics: ["<metric 1>", "<metric 2>"]
69
- D_target_users: "<primary persona>"
70
- artifact_path: ".metaproject/jobs/<job>/artifacts/problem-statement.md"
71
- ```
72
-
73
- ---
74
-
75
- ## Workflow
76
-
77
- ### Step 1: Extract Problems
78
-
79
- From discovery brief, identify:
80
- - What pain points do target users have?
81
- - What's broken / missing / inefficient?
82
- - What opportunity exists?
83
-
84
- Frame each problem as: "**[User type]** cannot / struggles to **[action]** because **[reason]**, which results in **[consequence]**."
85
-
86
- ### Step 2: Define Goals (SMART)
87
-
88
- For each problem, define a goal:
89
- - **Specific** — exactly what will change
90
- - **Measurable** — quantifiable success metric
91
- - **Achievable** — realistic given constraints
92
- - **Relevant** — tied to a real problem
93
- - **Time-bound** — when to evaluate (if applicable)
94
-
95
- ### Step 3: Define Non-Goals (Critical)
96
-
97
- Explicitly state what this project will NOT do. This prevents scope creep
98
- and aligns expectations. Common categories:
99
- - Features explicitly excluded from scope
100
- - User segments not targeted
101
- - Performance levels not targeted (e.g., "not optimized for 1M+ users")
102
- - Platforms not supported
103
- - Integrations not included
104
-
105
- ### Step 4: Define Success Metrics
106
-
107
- For each goal, define how to measure success:
108
- - Quantitative metrics (response time, conversion rate, error rate)
109
- - Qualitative metrics (user satisfaction, NPS)
110
- - Leading indicators (usage frequency, feature adoption)
111
-
112
- ### Step 5: Write Problem Statement
113
-
114
- Write `artifacts/problem-statement.md`:
115
-
116
- ```markdown
117
- # Problem Statement: <Project/Task Name>
118
-
119
- ## Core Problems
120
- ### P1: <Problem Title>
121
- <User type> cannot <action> because <reason>, resulting in <consequence>.
122
- **Impact**: <high/medium/low>
123
- **Evidence**: <from discovery brief>
124
-
125
- ### P2: ...
126
-
127
- ## Goals
128
- ### G1: <Goal Title>
129
- **Statement**: <SMART goal>
130
- **Success Metric**: <measurable metric>
131
- **Target**: <specific target value>
132
- **Measured by**: <how and when>
133
-
134
- ### G2: ...
135
-
136
- ## Non-Goals
137
- ### NG1: <Non-Goal>
138
- **Why excluded**: <rationale>
139
-
140
- ### NG2: ...
141
- ### NG3: ...
142
-
143
- ## Target Users
144
- ### Primary Persona
145
- - **Who**: <description>
146
- - **Core need**: <what they need most>
147
- - **Current solution**: <how they solve it today>
148
-
149
- ### Secondary Persona (if applicable)
150
- - ...
151
-
152
- ## Success Criteria
153
- | Metric | Current State | Target | Measurement Method |
154
- |--------|--------------|--------|-------------------|
155
- | <metric> | <baseline or N/A> | <target> | <how to measure> |
156
-
157
- ## Assumptions & Risks
158
- | Assumption | Risk if Wrong | Mitigation |
159
- |-----------|--------------|------------|
160
- | <assumption> | <impact> | <what to do> |
161
-
162
- ## Scope Boundary
163
- **In scope**: <brief list>
164
- **Out of scope**: <brief list referencing non-goals>
165
- ```
166
-
167
- ### Step 6: Return Summary
168
-
169
- Return compact summary to orchestrator: core problem in one sentence,
170
- primary goal in one sentence, biggest risk, confidence level.
@@ -1,184 +0,0 @@
1
- ---
2
- name: project-discovery
3
- description: >
4
- Collects and structures initial project information from multiple sources.
5
- Use when: dispatched by gproject-orchestrator Phase 0.
6
- NOT for: direct user invocation — always called through orchestrator.
7
- triggers:
8
- - "project discovery"
9
- - "discover project"
10
- - "initial analysis"
11
- metadata:
12
- version: 1.0.0
13
- compatible_harnesses: "cursor,codex,zed,opencode"
14
- ---
15
-
16
- # gproject-discovery
17
-
18
- ## Purpose
19
-
20
- Gather raw project information from all available sources, structure it into
21
- a unified discovery brief. This is the foundation — every downstream decision
22
- depends on the quality of discovery.
23
-
24
- ## Iron Laws
25
-
26
- | # | Law |
27
- |---|-----|
28
- | 1 | NEVER assume information not explicitly provided or discovered |
29
- | 2 | ALWAYS distinguish facts from assumptions — label each |
30
- | 3 | If a critical area has no data, return NEEDS_CONTEXT — don't fill gaps with guesses |
31
- | 4 | Web research MUST cite sources |
32
- | 5 | Codebase analysis MUST reference actual file paths |
33
-
34
- ## Red Flags
35
-
36
- Stop and re-read this skill if you are thinking:
37
-
38
- | Rationalization | Rebuttal |
39
- |---|---|
40
- | "The domain is obvious from the request, so `D_domain` is safe to fill in." | Iron Law 1 and 2: an inference is an assumption and must be labelled one. `D_domain` is a decision every later phase treats as settled — an unlabelled guess here becomes a stack choice in Phase 2 nobody re-examines. |
41
- | "One area has no data, but the rest is solid — I'll note the gap and return `DONE`." | Iron Law 3: a critical area with no data is `NEEDS_CONTEXT` with a concrete A/B/C/D question. A gap recorded as a note is read by the next phase as something already handled. |
42
- | "I recognise this framework's layout, so I can describe the codebase without opening files." | Iron Law 5 requires actual file paths. A described layout that does not match the repository misdirects every phase that follows, and nothing downstream reads the code again to catch it. |
43
- | "The best-practice claim is common knowledge, so a citation is ceremony." | Iron Law 4: web research cites sources. Uncited common knowledge is where a stale convention enters the brief and survives to the architecture document as a constraint. |
44
- | "The user already explained this in the request — restating it in the brief is redundant." | The brief is the only artifact Phase 1 receives; the original request is not passed along. Anything left out of it is lost to the entire pipeline. |
45
-
46
- ---
47
-
48
- ## Input Contract
49
-
50
- ```yaml
51
- task: "Collect project discovery data"
52
- mode: "new_project" | "task_in_project"
53
- user_input: "<original user request text>"
54
- uploaded_docs: [<file paths if any>]
55
- repo_path: "<path if task_in_project>"
56
- interview_results: "<from interview skill, if already run>"
57
- ```
58
-
59
- ## Output Contract
60
-
61
- ```yaml
62
- status: "DONE" | "NEEDS_CONTEXT"
63
- summary: "<3-5 sentences: what was found, key gaps, confidence level>"
64
- new_decisions:
65
- D_mode: "new_project | task_in_project"
66
- D_domain: "<business domain>"
67
- D_audience: "<target users>"
68
- D_scale_estimate: "<rough scale: personal/team/startup/enterprise>"
69
- artifact_path: ".metaproject/jobs/<job>/artifacts/discovery-brief.md"
70
- ```
71
-
72
- If NEEDS_CONTEXT:
73
- ```yaml
74
- status: "NEEDS_CONTEXT"
75
- questions:
76
- - id: "Q1"
77
- text: "<question>"
78
- options:
79
- A: "<option>"
80
- B: "<option>"
81
- C: "<option>"
82
- D: "<option>"
83
- why: "<why this matters for downstream phases>"
84
- ```
85
-
86
- ---
87
-
88
- ## Workflow
89
-
90
- ### Step 1: Parse User Input
91
-
92
- Extract from the user's original request:
93
- - What they want to build/implement
94
- - Any constraints mentioned (budget, timeline, team size)
95
- - Any technical preferences mentioned
96
- - Target audience / users mentioned
97
-
98
- ### Step 2: Source-Specific Collection
99
-
100
- #### Mode: new_project
101
-
102
- 1. **User input analysis** — extract all explicit and implied requirements
103
- 2. **Uploaded documents** — parse any attached files (briefs, notes, mockups, transcripts)
104
- 3. **Web research** — search for:
105
- - Similar products / competitors (max 5)
106
- - Market context and trends
107
- - Common technical approaches for this type of project
108
- 4. **Gap identification** — list what's missing for confident decision-making
109
-
110
- #### Mode: task_in_project
111
-
112
- 1. **User input analysis** — extract the specific task/feature request
113
- 2. **Codebase scan** (via context-collector) — gather:
114
- - Project structure (directories, key files)
115
- - Technology stack (package.json, requirements.txt, Dockerfile, etc.)
116
- - Architecture patterns in use
117
- - Existing documentation (README, docs/, ADRs)
118
- - Related code areas (files likely affected by this task)
119
- 3. **Existing docs** — parse project documentation for context
120
- 4. **Web research** — best practices for the specific task within the detected stack
121
- 5. **Gap identification** — what's unclear about the existing codebase or requirements
122
-
123
- ### Step 3: Structure Discovery Brief
124
-
125
- Write `artifacts/discovery-brief.md` with this structure:
126
-
127
- ```markdown
128
- # Discovery Brief: <Project/Task Name>
129
-
130
- ## Source Summary
131
- - User input: <what was provided>
132
- - Documents analyzed: <list>
133
- - Codebase scanned: <yes/no, scope>
134
- - Web research: <topics covered>
135
-
136
- ## Project/Task Description
137
- <Clear 2-3 paragraph description of what needs to be built/done>
138
-
139
- ## Key Facts (confirmed)
140
- - <fact 1> [source: user input / document / codebase]
141
- - <fact 2> [source: ...]
142
-
143
- ## Assumptions (need validation)
144
- - <assumption 1> — confidence: high/medium/low
145
- - <assumption 2> — confidence: ...
146
-
147
- ## Stakeholders & Users
148
- - Primary users: <who>
149
- - Secondary users: <who>
150
- - Stakeholders: <who decides>
151
-
152
- ## Existing Context (task_in_project only)
153
- - Tech stack: <detected>
154
- - Architecture: <detected patterns>
155
- - Related components: <list with file paths>
156
- - Existing patterns to follow: <list>
157
-
158
- ## Competitive / Market Context (new_project only)
159
- - Similar products: <list with brief notes>
160
- - Differentiators mentioned: <list>
161
- - Market trends: <relevant>
162
-
163
- ## Constraints Identified
164
- - Budget: <if mentioned>
165
- - Timeline: <if mentioned>
166
- - Team: <size, skills if mentioned>
167
- - Technical: <any mentioned constraints>
168
-
169
- ## Open Questions
170
- - <question 1> — impacts: <which downstream decisions>
171
- - <question 2> — impacts: ...
172
-
173
- ## Confidence Assessment
174
- - Overall completeness: <high/medium/low>
175
- - Areas needing more data: <list>
176
- ```
177
-
178
- ### Step 4: Return Summary to Orchestrator
179
-
180
- Compose compact summary (3-5 sentences) covering:
181
- - What the project/task is about
182
- - Key constraints discovered
183
- - Confidence level
184
- - Critical gaps that need resolution
@@ -1,184 +0,0 @@
1
- ---
2
- name: project-discovery
3
- description: >
4
- Collects and structures initial project information from multiple sources.
5
- Use when: dispatched by gproject-orchestrator Phase 0.
6
- NOT for: direct user invocation — always called through orchestrator.
7
- triggers:
8
- - "project discovery"
9
- - "discover project"
10
- - "initial analysis"
11
- metadata:
12
- version: 1.0.0
13
- compatible_harnesses: "cursor,codex,zed,opencode"
14
- ---
15
-
16
- # gproject-discovery
17
-
18
- ## Purpose
19
-
20
- Gather raw project information from all available sources, structure it into
21
- a unified discovery brief. This is the foundation — every downstream decision
22
- depends on the quality of discovery.
23
-
24
- ## Iron Laws
25
-
26
- | # | Law |
27
- |---|-----|
28
- | 1 | NEVER assume information not explicitly provided or discovered |
29
- | 2 | ALWAYS distinguish facts from assumptions — label each |
30
- | 3 | If a critical area has no data, return NEEDS_CONTEXT — don't fill gaps with guesses |
31
- | 4 | Web research MUST cite sources |
32
- | 5 | Codebase analysis MUST reference actual file paths |
33
-
34
- ## Red Flags
35
-
36
- Stop and re-read this skill if you are thinking:
37
-
38
- | Rationalization | Rebuttal |
39
- |---|---|
40
- | "The domain is obvious from the request, so `D_domain` is safe to fill in." | Iron Law 1 and 2: an inference is an assumption and must be labelled one. `D_domain` is a decision every later phase treats as settled — an unlabelled guess here becomes a stack choice in Phase 2 nobody re-examines. |
41
- | "One area has no data, but the rest is solid — I'll note the gap and return `DONE`." | Iron Law 3: a critical area with no data is `NEEDS_CONTEXT` with a concrete A/B/C/D question. A gap recorded as a note is read by the next phase as something already handled. |
42
- | "I recognise this framework's layout, so I can describe the codebase without opening files." | Iron Law 5 requires actual file paths. A described layout that does not match the repository misdirects every phase that follows, and nothing downstream reads the code again to catch it. |
43
- | "The best-practice claim is common knowledge, so a citation is ceremony." | Iron Law 4: web research cites sources. Uncited common knowledge is where a stale convention enters the brief and survives to the architecture document as a constraint. |
44
- | "The user already explained this in the request — restating it in the brief is redundant." | The brief is the only artifact Phase 1 receives; the original request is not passed along. Anything left out of it is lost to the entire pipeline. |
45
-
46
- ---
47
-
48
- ## Input Contract
49
-
50
- ```yaml
51
- task: "Collect project discovery data"
52
- mode: "new_project" | "task_in_project"
53
- user_input: "<original user request text>"
54
- uploaded_docs: [<file paths if any>]
55
- repo_path: "<path if task_in_project>"
56
- interview_results: "<from interview skill, if already run>"
57
- ```
58
-
59
- ## Output Contract
60
-
61
- ```yaml
62
- status: "DONE" | "NEEDS_CONTEXT"
63
- summary: "<3-5 sentences: what was found, key gaps, confidence level>"
64
- new_decisions:
65
- D_mode: "new_project | task_in_project"
66
- D_domain: "<business domain>"
67
- D_audience: "<target users>"
68
- D_scale_estimate: "<rough scale: personal/team/startup/enterprise>"
69
- artifact_path: ".metaproject/jobs/<job>/artifacts/discovery-brief.md"
70
- ```
71
-
72
- If NEEDS_CONTEXT:
73
- ```yaml
74
- status: "NEEDS_CONTEXT"
75
- questions:
76
- - id: "Q1"
77
- text: "<question>"
78
- options:
79
- A: "<option>"
80
- B: "<option>"
81
- C: "<option>"
82
- D: "<option>"
83
- why: "<why this matters for downstream phases>"
84
- ```
85
-
86
- ---
87
-
88
- ## Workflow
89
-
90
- ### Step 1: Parse User Input
91
-
92
- Extract from the user's original request:
93
- - What they want to build/implement
94
- - Any constraints mentioned (budget, timeline, team size)
95
- - Any technical preferences mentioned
96
- - Target audience / users mentioned
97
-
98
- ### Step 2: Source-Specific Collection
99
-
100
- #### Mode: new_project
101
-
102
- 1. **User input analysis** — extract all explicit and implied requirements
103
- 2. **Uploaded documents** — parse any attached files (briefs, notes, mockups, transcripts)
104
- 3. **Web research** — search for:
105
- - Similar products / competitors (max 5)
106
- - Market context and trends
107
- - Common technical approaches for this type of project
108
- 4. **Gap identification** — list what's missing for confident decision-making
109
-
110
- #### Mode: task_in_project
111
-
112
- 1. **User input analysis** — extract the specific task/feature request
113
- 2. **Codebase scan** (via context-collector) — gather:
114
- - Project structure (directories, key files)
115
- - Technology stack (package.json, requirements.txt, Dockerfile, etc.)
116
- - Architecture patterns in use
117
- - Existing documentation (README, docs/, ADRs)
118
- - Related code areas (files likely affected by this task)
119
- 3. **Existing docs** — parse project documentation for context
120
- 4. **Web research** — best practices for the specific task within the detected stack
121
- 5. **Gap identification** — what's unclear about the existing codebase or requirements
122
-
123
- ### Step 3: Structure Discovery Brief
124
-
125
- Write `artifacts/discovery-brief.md` with this structure:
126
-
127
- ```markdown
128
- # Discovery Brief: <Project/Task Name>
129
-
130
- ## Source Summary
131
- - User input: <what was provided>
132
- - Documents analyzed: <list>
133
- - Codebase scanned: <yes/no, scope>
134
- - Web research: <topics covered>
135
-
136
- ## Project/Task Description
137
- <Clear 2-3 paragraph description of what needs to be built/done>
138
-
139
- ## Key Facts (confirmed)
140
- - <fact 1> [source: user input / document / codebase]
141
- - <fact 2> [source: ...]
142
-
143
- ## Assumptions (need validation)
144
- - <assumption 1> — confidence: high/medium/low
145
- - <assumption 2> — confidence: ...
146
-
147
- ## Stakeholders & Users
148
- - Primary users: <who>
149
- - Secondary users: <who>
150
- - Stakeholders: <who decides>
151
-
152
- ## Existing Context (task_in_project only)
153
- - Tech stack: <detected>
154
- - Architecture: <detected patterns>
155
- - Related components: <list with file paths>
156
- - Existing patterns to follow: <list>
157
-
158
- ## Competitive / Market Context (new_project only)
159
- - Similar products: <list with brief notes>
160
- - Differentiators mentioned: <list>
161
- - Market trends: <relevant>
162
-
163
- ## Constraints Identified
164
- - Budget: <if mentioned>
165
- - Timeline: <if mentioned>
166
- - Team: <size, skills if mentioned>
167
- - Technical: <any mentioned constraints>
168
-
169
- ## Open Questions
170
- - <question 1> — impacts: <which downstream decisions>
171
- - <question 2> — impacts: ...
172
-
173
- ## Confidence Assessment
174
- - Overall completeness: <high/medium/low>
175
- - Areas needing more data: <list>
176
- ```
177
-
178
- ### Step 4: Return Summary to Orchestrator
179
-
180
- Compose compact summary (3-5 sentences) covering:
181
- - What the project/task is about
182
- - Key constraints discovered
183
- - Confidence level
184
- - Critical gaps that need resolution