@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
@@ -308,7 +308,7 @@ FOCUS AREA:
308
308
  ```javascript
309
309
  Task({
310
310
  description: "Feature analysis: pipeline-variables",
311
- subagent_type: "general",
311
+ subagent_type: "general-purpose",
312
312
  prompt: "<сгенерированный промпт выше>"
313
313
  })
314
314
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: feature-dev
3
- description: "7-phase feature development workflow: requirements → design → implement → test → review → fix → PR. Full cycle from idea or GitHub issue to merge-ready PR. Confirms requirements and design with user before autonomous execution."
3
+ description: "Use when taking a feature from idea or GitHub issue all the way to a merge-ready PR in one guided workflow."
4
4
  triggers:
5
5
  - "/feature-dev"
6
6
  - "Develop feature"
@@ -9,12 +9,18 @@ triggers:
9
9
  - "Feature from scratch"
10
10
  metadata:
11
11
  author: "MrCipherSmith"
12
- version: "1.0.0"
12
+ version: "2.0.0"
13
13
  category: "workflow"
14
14
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
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 interactive feature development sessions only.
21
+ Proceed directly with your assigned task.
22
+ </SUBAGENT-STOP>
23
+
18
24
  # Feature Development (7-Phase)
19
25
 
20
26
  End-to-end feature development workflow from idea to merge-ready PR.
@@ -25,66 +31,104 @@ End-to-end feature development workflow from idea to merge-ready PR.
25
31
  - `/feature-dev #<issue>` — start from a GitHub issue
26
32
  - `/feature-dev --resume` — resume interrupted feature-dev (checks for existing worktree/branch)
27
33
 
28
- ## 7-Phase Architecture
34
+ ## 8-Phase Architecture
35
+
36
+ > **Rules always loaded:** `tdd-workflow.mdc`, `implementation-doc-mandate.mdc`, `error-handling.mdc`
37
+ > **Sub-agents used:** `tests-creator` (before implement), `code-verifier` (after implement)
38
+
39
+ ### Phase 1: REQUIREMENTS + SPEC
29
40
 
30
- ### Phase 1: REQUIREMENTS
31
41
  1. Parse input (description or GitHub issue via `gh issue view`)
32
42
  2. Clarify ambiguities — ask the user up to 3 questions max
33
- 3. Produce a brief spec:
43
+ 3. Produce the **Implementation Spec** (per `implementation-doc-mandate.mdc`):
34
44
  - **What**: feature description in 2-3 sentences
35
45
  - **Why**: user value / business reason
36
46
  - **Scope**: what's in, what's explicitly out
37
47
  - **Acceptance criteria**: testable bullet points
38
- 4. **Get user confirmation before proceeding**
48
+ - **Approach**: which files will change, key design decisions
49
+ - **Test strategy**: framework, which scenarios will be covered
50
+ 4. **Save spec** to `.feature-spec.md` in project root (add to .gitignore if not already)
51
+ 5. **Get user confirmation before proceeding**
39
52
 
40
53
  ### Phase 2: DESIGN
54
+
41
55
  1. Research the codebase:
42
56
  - Find related modules via search tools
43
57
  - Read neighboring implementations for patterns
44
- - Check existing tests for testing conventions
58
+ - **Detect test framework** (package.json, existing test files) — needed for tests-creator
45
59
  2. Produce implementation plan:
46
60
  - Files to create/modify (with brief description of changes)
47
61
  - Dependencies or packages needed
48
62
  - Data model changes if any
49
63
  - Estimated complexity: S / M / L
50
- 3. **Get user confirmation on the plan**
64
+ 3. Load relevant rules from `.metaproject/rules/core/` based on what will be built:
65
+ - Always: `tdd-workflow.mdc`, `error-handling.mdc`, `solid-principles.mdc`
66
+ - API/service code: `api-contracts.mdc`, `clean-architecture.mdc`
67
+ - Database: `database-patterns.mdc`
68
+ - Async: `async-patterns.mdc`
69
+ - Security-sensitive: `security-baseline.mdc`
70
+ 4. **Get user confirmation on the plan**
51
71
 
52
72
  ### Phase 3: PREPARE
53
- 1. Create a feature branch: `git checkout -b feat/<name>`
54
- 2. If large feature, consider `git worktree add` for isolation
55
- 3. Install any new dependencies
56
-
57
- ### Phase 4: IMPLEMENT
58
- 1. Implement changes file by file, following the plan
59
- 2. Follow existing code patterns discovered in Phase 2
60
- 3. After each logical chunk, run available checks:
61
- - Lint: `npm run lint` or equivalent
62
- - Type-check: `npx tsc --noEmit` or equivalent
63
- - Fix issues immediately before moving on
64
-
65
- ### Phase 5: TEST
66
- 1. Write tests matching the project's testing patterns
67
- 2. Unit tests for new functions/modules
68
- 3. Integration tests for API/data flow changes
69
- 4. Run full test suite
70
- 5. Fix failing tests (max 3 attempts per test)
71
-
72
- ### Phase 6: REVIEW (Self)
73
+
74
+ 1. Create a feature branch: `wt switch -c feat/<name>`
75
+ 2. Install any new dependencies
76
+
77
+ ### Phase 4: TESTS-CREATOR (TDD — RED phase)
78
+
79
+ **Run before writing any implementation code.**
80
+
81
+ 1. For each group of acceptance criteria, invoke `tests-creator`:
82
+ - Input: acceptance criteria from Phase 1 spec + target files from Phase 2 plan
83
+ - tests-creator detects framework and generates failing test stubs
84
+ - tests-creator commits the stubs and verifies RED state
85
+ 2. Confirm test stubs are in place and failing before proceeding to Phase 5
86
+
87
+ ### Phase 5: IMPLEMENT (TDD — GREEN phase)
88
+
89
+ 1. Implement changes file by file, following the plan from Phase 2
90
+ 2. Goal: make the failing tests from Phase 4 GREEN
91
+ 3. Follow existing code patterns and loaded rules
92
+ 4. After each file group, run quick inline check: `npx tsc --noEmit` (type errors only)
93
+ 5. Commit with conventional message after each logical chunk
94
+
95
+ ### Phase 6: VERIFY (code-verifier gate)
96
+
97
+ Run `code-verifier` on the full diff:
98
+
99
+ ```
100
+ Invoke: skills/orchestration/code-verifier/SKILL.md
101
+ Input: codebase_path=<project_root>, scope=changed, base_branch=<base>
102
+ ```
103
+
104
+ - `gate: PASS` → proceed to Phase 7
105
+ - `gate: FAIL` → fix findings, re-run code-verifier (max 2 cycles)
106
+ - Still FAIL after 2 cycles → report blocker to user, stop
107
+
108
+ ### Phase 7: REVIEW (Self)
109
+
73
110
  1. Launch the `review-orchestrator` skill on own changes
74
111
  2. Or run a focused self-review:
75
112
  - `git diff main...HEAD` — review the full diff
76
113
  - Check for: TODOs left behind, console.logs, hardcoded values
77
- - Verify all acceptance criteria from Phase 1
114
+ - Verify all acceptance criteria from Phase 1 spec
78
115
  3. Fix any findings (max 2 review-fix cycles)
116
+ 4. Re-run `code-verifier` after any fixes
117
+
118
+ ### Phase 8: DELIVER + CHANGE REPORT
79
119
 
80
- ### Phase 7: DELIVER
81
- 1. Final checks: lint + type-check + tests all pass
82
- 2. Commit with conventional message: `feat(<scope>): <description>`
83
- 3. Push branch
84
- 4. Create PR:
120
+ 1. Push branch
121
+ 2. Create PR:
85
122
  - Link to issue if applicable
86
- - Include acceptance criteria as checklist
87
- - Add test plan
123
+ - Include acceptance criteria checklist
124
+ - Add test plan and code-verifier results
125
+ 3. **Produce Change Report** (per `implementation-doc-mandate.mdc`):
126
+ - Files created/modified with descriptions
127
+ - Test count and results
128
+ - code-verifier gate result
129
+ - Acceptance criteria checklist (checked off)
130
+ - Commits list
131
+ 4. Print Change Report to user
88
132
  5. Report PR URL to user
89
133
 
90
134
  ## Status Updates
@@ -97,9 +141,25 @@ At each phase transition, report progress:
97
141
 
98
142
  ## Rules
99
143
 
100
- - ALWAYS get user confirmation after Phase 1 (requirements) and Phase 2 (design)
101
- - Phases 4-6 are autonomous — no user interaction needed
144
+ - ALWAYS get user confirmation after Phase 1 (requirements + spec) and Phase 2 (design)
145
+ - Phases 4-7 are autonomous — no user interaction needed
102
146
  - If stuck for >3 attempts on any step, report the blocker and ask user
103
- - NEVER skip Phase 5 (testing) even if user says "skip tests"
104
- - NEVER commit broken code (lint/type-check must pass)
105
- - Keep commits atomic: one commit per logical change, not one giant commit
147
+ - NEVER skip Phase 4 (tests-creator) even if user says "skip tests" — this is TDD, not optional testing
148
+ - NEVER skip Phase 6 (code-verifier) — it is the quality gate, not a suggestion
149
+ - NEVER commit broken code (code-verifier gate must pass before PR)
150
+ - Keep commits atomic: one commit per logical chunk, not one giant commit
151
+ - ALWAYS produce the Change Report in Phase 8 — even if the PR was not created
152
+
153
+ ## Red Flags — Stop and re-read this skill if you are thinking:
154
+
155
+ | Rationalization | Why it's wrong |
156
+ |---|---|
157
+ | "Requirements are clear enough, I'll skip the design phase" | Skipping design means discovering mismatches after code is written, not before |
158
+ | "The user already approved this approach verbally, no need to document" | Undocumented approval is invisible to reviewers and future agents; it doesn't exist |
159
+ | "Tests can be written after — implementation first to check if the approach works" | Writing tests after implementation makes you test what you built, not what was required |
160
+ | "This phase isn't needed for such a straightforward feature" | Every skipped phase is a deferred bug report |
161
+ | "I understand the requirements, confirmation is just a formality" | The confirmation step exists to catch the gap between what you understood and what was meant |
162
+
163
+ **IRON LAW 1: NEVER START IMPLEMENTING BEFORE THE SPEC IS WRITTEN AND CONFIRMED.**
164
+ **IRON LAW 2: NEVER WRITE IMPLEMENTATION CODE BEFORE TESTS-CREATOR HAS GENERATED FAILING STUBS.**
165
+ **IRON LAW 3: NEVER DELIVER WITHOUT A PASSING CODE-VERIFIER GATE AND A CHANGE REPORT.**
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: feature-dev
3
- description: "7-phase feature development workflow: requirements → design → implement → test → review → fix → PR. Full cycle from idea or GitHub issue to merge-ready PR. Confirms requirements and design with user before autonomous execution."
3
+ description: "Use when taking a feature from idea or GitHub issue all the way to a merge-ready PR in one guided workflow."
4
4
  triggers:
5
5
  - "/feature-dev"
6
6
  - "Develop feature"
@@ -9,12 +9,18 @@ triggers:
9
9
  - "Feature from scratch"
10
10
  metadata:
11
11
  author: "MrCipherSmith"
12
- version: "1.0.0"
12
+ version: "2.0.0"
13
13
  category: "workflow"
14
14
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
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 interactive feature development sessions only.
21
+ Proceed directly with your assigned task.
22
+ </SUBAGENT-STOP>
23
+
18
24
  # Feature Development (7-Phase)
19
25
 
20
26
  End-to-end feature development workflow from idea to merge-ready PR.
@@ -25,66 +31,104 @@ End-to-end feature development workflow from idea to merge-ready PR.
25
31
  - `/feature-dev #<issue>` — start from a GitHub issue
26
32
  - `/feature-dev --resume` — resume interrupted feature-dev (checks for existing worktree/branch)
27
33
 
28
- ## 7-Phase Architecture
34
+ ## 8-Phase Architecture
35
+
36
+ > **Rules always loaded:** `tdd-workflow.mdc`, `implementation-doc-mandate.mdc`, `error-handling.mdc`
37
+ > **Sub-agents used:** `tests-creator` (before implement), `code-verifier` (after implement)
38
+
39
+ ### Phase 1: REQUIREMENTS + SPEC
29
40
 
30
- ### Phase 1: REQUIREMENTS
31
41
  1. Parse input (description or GitHub issue via `gh issue view`)
32
42
  2. Clarify ambiguities — ask the user up to 3 questions max
33
- 3. Produce a brief spec:
43
+ 3. Produce the **Implementation Spec** (per `implementation-doc-mandate.mdc`):
34
44
  - **What**: feature description in 2-3 sentences
35
45
  - **Why**: user value / business reason
36
46
  - **Scope**: what's in, what's explicitly out
37
47
  - **Acceptance criteria**: testable bullet points
38
- 4. **Get user confirmation before proceeding**
48
+ - **Approach**: which files will change, key design decisions
49
+ - **Test strategy**: framework, which scenarios will be covered
50
+ 4. **Save spec** to `.feature-spec.md` in project root (add to .gitignore if not already)
51
+ 5. **Get user confirmation before proceeding**
39
52
 
40
53
  ### Phase 2: DESIGN
54
+
41
55
  1. Research the codebase:
42
56
  - Find related modules via search tools
43
57
  - Read neighboring implementations for patterns
44
- - Check existing tests for testing conventions
58
+ - **Detect test framework** (package.json, existing test files) — needed for tests-creator
45
59
  2. Produce implementation plan:
46
60
  - Files to create/modify (with brief description of changes)
47
61
  - Dependencies or packages needed
48
62
  - Data model changes if any
49
63
  - Estimated complexity: S / M / L
50
- 3. **Get user confirmation on the plan**
64
+ 3. Load relevant rules from `.metaproject/rules/core/` based on what will be built:
65
+ - Always: `tdd-workflow.mdc`, `error-handling.mdc`, `solid-principles.mdc`
66
+ - API/service code: `api-contracts.mdc`, `clean-architecture.mdc`
67
+ - Database: `database-patterns.mdc`
68
+ - Async: `async-patterns.mdc`
69
+ - Security-sensitive: `security-baseline.mdc`
70
+ 4. **Get user confirmation on the plan**
51
71
 
52
72
  ### Phase 3: PREPARE
53
- 1. Create a feature branch: `git checkout -b feat/<name>`
54
- 2. If large feature, consider `git worktree add` for isolation
55
- 3. Install any new dependencies
56
-
57
- ### Phase 4: IMPLEMENT
58
- 1. Implement changes file by file, following the plan
59
- 2. Follow existing code patterns discovered in Phase 2
60
- 3. After each logical chunk, run available checks:
61
- - Lint: `npm run lint` or equivalent
62
- - Type-check: `npx tsc --noEmit` or equivalent
63
- - Fix issues immediately before moving on
64
-
65
- ### Phase 5: TEST
66
- 1. Write tests matching the project's testing patterns
67
- 2. Unit tests for new functions/modules
68
- 3. Integration tests for API/data flow changes
69
- 4. Run full test suite
70
- 5. Fix failing tests (max 3 attempts per test)
71
-
72
- ### Phase 6: REVIEW (Self)
73
+
74
+ 1. Create a feature branch: `wt switch -c feat/<name>`
75
+ 2. Install any new dependencies
76
+
77
+ ### Phase 4: TESTS-CREATOR (TDD — RED phase)
78
+
79
+ **Run before writing any implementation code.**
80
+
81
+ 1. For each group of acceptance criteria, invoke `tests-creator`:
82
+ - Input: acceptance criteria from Phase 1 spec + target files from Phase 2 plan
83
+ - tests-creator detects framework and generates failing test stubs
84
+ - tests-creator commits the stubs and verifies RED state
85
+ 2. Confirm test stubs are in place and failing before proceeding to Phase 5
86
+
87
+ ### Phase 5: IMPLEMENT (TDD — GREEN phase)
88
+
89
+ 1. Implement changes file by file, following the plan from Phase 2
90
+ 2. Goal: make the failing tests from Phase 4 GREEN
91
+ 3. Follow existing code patterns and loaded rules
92
+ 4. After each file group, run quick inline check: `npx tsc --noEmit` (type errors only)
93
+ 5. Commit with conventional message after each logical chunk
94
+
95
+ ### Phase 6: VERIFY (code-verifier gate)
96
+
97
+ Run `code-verifier` on the full diff:
98
+
99
+ ```
100
+ Invoke: skills/orchestration/code-verifier/SKILL.md
101
+ Input: codebase_path=<project_root>, scope=changed, base_branch=<base>
102
+ ```
103
+
104
+ - `gate: PASS` → proceed to Phase 7
105
+ - `gate: FAIL` → fix findings, re-run code-verifier (max 2 cycles)
106
+ - Still FAIL after 2 cycles → report blocker to user, stop
107
+
108
+ ### Phase 7: REVIEW (Self)
109
+
73
110
  1. Launch the `review-orchestrator` skill on own changes
74
111
  2. Or run a focused self-review:
75
112
  - `git diff main...HEAD` — review the full diff
76
113
  - Check for: TODOs left behind, console.logs, hardcoded values
77
- - Verify all acceptance criteria from Phase 1
114
+ - Verify all acceptance criteria from Phase 1 spec
78
115
  3. Fix any findings (max 2 review-fix cycles)
116
+ 4. Re-run `code-verifier` after any fixes
117
+
118
+ ### Phase 8: DELIVER + CHANGE REPORT
79
119
 
80
- ### Phase 7: DELIVER
81
- 1. Final checks: lint + type-check + tests all pass
82
- 2. Commit with conventional message: `feat(<scope>): <description>`
83
- 3. Push branch
84
- 4. Create PR:
120
+ 1. Push branch
121
+ 2. Create PR:
85
122
  - Link to issue if applicable
86
- - Include acceptance criteria as checklist
87
- - Add test plan
123
+ - Include acceptance criteria checklist
124
+ - Add test plan and code-verifier results
125
+ 3. **Produce Change Report** (per `implementation-doc-mandate.mdc`):
126
+ - Files created/modified with descriptions
127
+ - Test count and results
128
+ - code-verifier gate result
129
+ - Acceptance criteria checklist (checked off)
130
+ - Commits list
131
+ 4. Print Change Report to user
88
132
  5. Report PR URL to user
89
133
 
90
134
  ## Status Updates
@@ -97,9 +141,25 @@ At each phase transition, report progress:
97
141
 
98
142
  ## Rules
99
143
 
100
- - ALWAYS get user confirmation after Phase 1 (requirements) and Phase 2 (design)
101
- - Phases 4-6 are autonomous — no user interaction needed
144
+ - ALWAYS get user confirmation after Phase 1 (requirements + spec) and Phase 2 (design)
145
+ - Phases 4-7 are autonomous — no user interaction needed
102
146
  - If stuck for >3 attempts on any step, report the blocker and ask user
103
- - NEVER skip Phase 5 (testing) even if user says "skip tests"
104
- - NEVER commit broken code (lint/type-check must pass)
105
- - Keep commits atomic: one commit per logical change, not one giant commit
147
+ - NEVER skip Phase 4 (tests-creator) even if user says "skip tests" — this is TDD, not optional testing
148
+ - NEVER skip Phase 6 (code-verifier) — it is the quality gate, not a suggestion
149
+ - NEVER commit broken code (code-verifier gate must pass before PR)
150
+ - Keep commits atomic: one commit per logical chunk, not one giant commit
151
+ - ALWAYS produce the Change Report in Phase 8 — even if the PR was not created
152
+
153
+ ## Red Flags — Stop and re-read this skill if you are thinking:
154
+
155
+ | Rationalization | Why it's wrong |
156
+ |---|---|
157
+ | "Requirements are clear enough, I'll skip the design phase" | Skipping design means discovering mismatches after code is written, not before |
158
+ | "The user already approved this approach verbally, no need to document" | Undocumented approval is invisible to reviewers and future agents; it doesn't exist |
159
+ | "Tests can be written after — implementation first to check if the approach works" | Writing tests after implementation makes you test what you built, not what was required |
160
+ | "This phase isn't needed for such a straightforward feature" | Every skipped phase is a deferred bug report |
161
+ | "I understand the requirements, confirmation is just a formality" | The confirmation step exists to catch the gap between what you understood and what was meant |
162
+
163
+ **IRON LAW 1: NEVER START IMPLEMENTING BEFORE THE SPEC IS WRITTEN AND CONFIRMED.**
164
+ **IRON LAW 2: NEVER WRITE IMPLEMENTATION CODE BEFORE TESTS-CREATOR HAS GENERATED FAILING STUBS.**
165
+ **IRON LAW 3: NEVER DELIVER WITHOUT A PASSING CODE-VERIFIER GATE AND A CHANGE REPORT.**
@@ -12,7 +12,7 @@ triggers:
12
12
  - "managed implementation"
13
13
  metadata:
14
14
  author: "MrCipherSmith"
15
- version: "1.3.0"
15
+ version: "1.4.0"
16
16
  category: "orchestration"
17
17
  compatible_harnesses: "cursor,codex,zed,opencode,claude"
18
18
  license: "MIT"
@@ -418,12 +418,59 @@ How should this flow end?
418
418
  Preserve the base branch recorded during initialization. Do not mark the
419
419
  flow implemented or complete before the PR is merged into that branch.
420
420
 
421
+ ### A dispatched run answers the question from its input
422
+
423
+ The choice above is the USER's, and a subagent has no user to ask. When this
424
+ skill is dispatched by another skill the answer arrives in the input, and asking
425
+ anyway is how a dispatched run stalls forever on a prompt nobody will read.
426
+
427
+ Read it from the **typed fields**, and validate them first:
428
+
429
+ ```bash
430
+ keryx skills contracts validate <dispatch.json> --schema flow-orchestrator-input
431
+ ```
432
+
433
+ `base_branch`, `completion_outcome` and `operator_confirmed` are properties of
434
+ that contract, not constraint strings. The distinction is the whole point:
435
+ nothing parses `constraints[]`, so a load-bearing value misspelled there is
436
+ dropped in silence and the run merges wherever it resolved a base on its own.
437
+ `constraints[]` carries advisory scope and policy — never a merge target.
438
+
439
+ `completion_outcome` is **required** by the contract, so an absent one is a
440
+ refused dispatch rather than a question. That is deliberate: the previous rule
441
+ here said "ask", prescribed fourteen lines after this section says asking is how
442
+ a dispatched run stalls on a prompt nobody reads — and it left the
443
+ `create-pr-and-merge` conditional reachable-around by simply omitting the field.
444
+ A dispatched run that cannot name its outcome returns **BLOCKED** naming the
445
+ missing field. Only an interactive run asks. Record in `journal.md` which field
446
+ answered it and who is behind it.
447
+
448
+ | Input | Obey it as |
449
+ |---|---|
450
+ | `base_branch` | Cut the flow branch from **that** branch and merge back into it. Never substitute the repository default: a fix aimed at a pull request's own branch has to land inside that pull request, and the default branch is a different review. Absent, resolve the base yourself and record what you resolved. |
451
+ | `completion_outcome: create-pr-and-merge` | Skip the Completion Choice question, run the PR review/fix loop, merge into `base_branch`, complete the flow. |
452
+ | `operator_confirmed` | The human decision behind an outward-facing completion. See the row below for when its absence is a refusal. |
453
+ | `review: the caller owns the reply on #<n>` | Pass it through to every `review-orchestrator` dispatch. Reviews of **this flow's own** PR reply as normal — that is a separate conversation. What the round must not do is answer `#<n>`, which the caller is already answering. |
454
+ | `attempt budget: at most <n> attempts` | A numeric ceiling BELOW your own bound is obeyed. One at or above it is not — the bound is yours, and the paragraph under this table says why. |
455
+ | `completion: <anything>` as a constraint STRING | **Not an outcome. Refuse it and ask for the typed field.** `constraints[]` is parsed by nothing, so a completion arriving there is never read at all. Such a dispatch is now refused for the missing `completion_outcome` rather than silently accepted — but the refusal is the contract's, not this row's, and a row telling you to honour the string would be a documented bypass of the fence in the file that owns it. |
456
+
457
+ A constraint that would raise this skill's own attempt budget is **not** obeyed.
458
+ The three-attempt bound and the `keryx review loop` repetition check are this
459
+ skill's, they are evidence-backed, and a caller asking for "loop until clean" gets
460
+ the bound plus an escalation — never an unbounded loop.
461
+
421
462
  ### PR review/fix loop
422
463
 
423
464
  1. Run the relevant `review-orchestrator` checks against the PR and current
424
465
  branch state.
425
466
  2. If findings or required check failures remain, create or update a flow fix
426
467
  task, dispatch `task-implementer`, push the fix, and run review again.
468
+
469
+ **The threshold is `minor`.** The loop exits when the round reports zero
470
+ findings at `blocker`, `major` or `minor`; `info` does not hold it. State the
471
+ remaining `info` findings in the completion report rather than fixing them
472
+ under a loop that was not opened for them. A caller may lower the threshold in
473
+ `constraints`; it cannot raise it to merge over a `minor`.
427
474
  3. Allow at most **three** review/fix attempts for the current approach. Count
428
475
  an attempt when review/check results are available, including a clean result,
429
476
  and record it with `keryx flow task attempt <id> <Tn> --outcome ...` so the
@@ -4,7 +4,10 @@
4
4
  "title": "FlowOrchestratorInput",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["request"],
7
+ "required": [
8
+ "request",
9
+ "completion_outcome"
10
+ ],
8
11
  "properties": {
9
12
  "request": {
10
13
  "type": "string",
@@ -21,13 +24,76 @@
21
24
  },
22
25
  "mode": {
23
26
  "type": "string",
24
- "enum": ["init", "execute", "complete", "resume", "auto"],
27
+ "enum": [
28
+ "init",
29
+ "execute",
30
+ "complete",
31
+ "resume",
32
+ "auto"
33
+ ],
25
34
  "default": "auto"
26
35
  },
27
36
  "constraints": {
28
37
  "type": "array",
29
- "items": { "type": "string" },
30
- "default": []
38
+ "items": {
39
+ "type": "string"
40
+ },
41
+ "default": [],
42
+ "description": "Advisory scope and policy for this run, one per string. Anything that decides where the work LANDS belongs in a typed property above, not here: nothing parses this array, so a misspelled constraint is silently dropped."
43
+ },
44
+ "base_branch": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "description": "The branch the flow branch is cut from and merged back into. Typed rather than left to a constraint string because this is the field that decides WHERE the work lands: a fix aimed at a pull request's own head branch that merges to the repository default instead is a change nobody reviewed, reported as success. Absent, the orchestrator resolves the base itself and records it."
48
+ },
49
+ "completion_outcome": {
50
+ "type": "string",
51
+ "enum": [
52
+ "create-pr-and-merge",
53
+ "verified-handoff",
54
+ "keep-open"
55
+ ],
56
+ "description": "Answers the Phase 4 Completion Choice for a dispatched run, which has no user to ask. REQUIRED: an absent outcome used to mean 'ask', prescribed by the same section that says asking is how a dispatched run stalls on a prompt nobody reads \u2014 and it left the create-pr-and-merge conditional below unreachable by simply omitting the field. A dispatch that cannot name its outcome is BLOCKED, not questioned."
57
+ },
58
+ "operator_confirmed": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": [
62
+ "confirmed_by",
63
+ "confirmed_at",
64
+ "plan_digest"
65
+ ],
66
+ "description": "The human decision behind an outward-facing completion. Required by callers whose work merges third-party content \u2014 see review-pr-feedback --fix. What `plan_digest` is worth is stated on the field itself; do not infer a replay defence from its presence here.",
67
+ "properties": {
68
+ "confirmed_by": {
69
+ "type": "string",
70
+ "minLength": 1
71
+ },
72
+ "confirmed_at": {
73
+ "type": "string",
74
+ "minLength": 1
75
+ },
76
+ "plan_digest": {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "description": "A record of WHICH plan the human said they read \u2014 not a control. Nothing in this tree computes or verifies a digest, and the schema constrains it only to a non-empty string, so an agent composing the dispatch chooses the value and a plan mutated after approval carries the same one. `operator_confirmed`'s PRESENCE is enforced; this field's VALUE is not. Making it a control means hashing the rendered plan and having the receiver recompute over what it got."
80
+ }
81
+ }
82
+ }
83
+ },
84
+ "if": {
85
+ "required": [
86
+ "completion_outcome"
87
+ ],
88
+ "properties": {
89
+ "completion_outcome": {
90
+ "const": "create-pr-and-merge"
91
+ }
31
92
  }
93
+ },
94
+ "then": {
95
+ "required": [
96
+ "operator_confirmed"
97
+ ]
32
98
  }
33
99
  }