@mrciphersmith/keryx 0.2.98 → 0.2.99

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 (182) hide show
  1. package/dist/cli.js +4057 -2510
  2. package/dist/core.js +39 -1
  3. package/package.json +1 -1
  4. package/src/gdskills/bundled/rules/core/cli-interface-design.mdc +237 -0
  5. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +116 -0
  6. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +101 -11
  7. package/src/gdskills/bundled/rules/core/subagent-status-protocol.md +9 -2
  8. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +42 -5
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +19 -3
  10. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +20 -4
  11. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +32 -9
  12. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +18 -4
  13. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +21 -5
  14. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +4 -4
  15. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  16. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +42 -2
  17. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +23 -9
  18. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +33 -31
  19. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +32 -1
  20. package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +16 -0
  21. package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +16 -0
  22. package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +16 -0
  23. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +17 -0
  24. package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +16 -0
  25. package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +16 -0
  26. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +28 -3
  27. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +17 -0
  28. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +17 -0
  29. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +17 -0
  30. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +32 -2
  31. package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +14 -2
  32. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +29 -7
  33. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +32 -6
  34. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +16 -0
  35. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +16 -0
  36. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +16 -0
  37. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +17 -0
  38. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +17 -0
  39. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +17 -0
  40. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +20 -3
  41. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +16 -0
  42. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +16 -0
  43. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +16 -0
  44. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +16 -0
  45. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +16 -0
  46. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +16 -0
  47. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +4 -0
  48. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +4 -0
  49. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +4 -0
  50. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +4 -0
  51. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +4 -0
  52. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +4 -0
  53. package/src/gdskills/bundled/skills/platform/agent-entrypoint-distiller/SKILL.md +31 -4
  54. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +26 -2
  55. package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +28 -3
  56. package/src/gdskills/bundled/skills/quality/api-truth/SKILL.md +226 -0
  57. package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +24 -4
  58. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +24 -3
  59. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +24 -3
  60. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +25 -4
  61. package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +26 -3
  62. package/src/gdskills/bundled/skills/quality/deprecation-path/SKILL.md +268 -0
  63. package/src/gdskills/bundled/skills/quality/fresh-eyes/SKILL.md +190 -0
  64. package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +24 -3
  65. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +29 -8
  66. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +24 -4
  67. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +25 -2
  68. package/src/gdskills/bundled/skills/quality/push/SKILL.md +24 -3
  69. package/src/gdskills/bundled/skills/quality/root-cause/SKILL.md +204 -0
  70. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +25 -4
  71. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +24 -3
  72. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +17 -2
  73. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +40 -5
  74. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +41 -1
  75. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +44 -2
  76. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +44 -4
  77. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +3 -3
  78. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +2 -3
  79. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +4 -4
  80. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +36 -2
  81. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +37 -3
  82. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +2 -4
  83. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +36 -2
  84. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +3 -5
  85. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +23 -2
  86. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +3 -3
  87. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +9 -29
  88. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +9 -9
  89. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +3 -2
  90. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +33 -2
  91. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +4 -2
  92. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +2 -2
  93. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +40 -2
  94. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +1 -1
  95. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +0 -330
  96. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +0 -330
  97. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +0 -330
  98. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +0 -330
  99. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +0 -655
  100. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +0 -655
  101. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +0 -655
  102. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +0 -655
  103. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +0 -424
  104. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +0 -424
  105. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +0 -424
  106. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +0 -424
  107. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +0 -163
  108. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +0 -163
  109. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +0 -373
  110. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +0 -373
  111. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +0 -373
  112. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +0 -373
  113. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +0 -374
  114. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +0 -374
  115. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +0 -374
  116. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +0 -374
  117. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +0 -2232
  118. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +0 -2232
  119. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +0 -2232
  120. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +0 -2232
  121. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +0 -668
  122. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +0 -668
  123. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +0 -668
  124. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +0 -668
  125. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +0 -90
  126. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +0 -90
  127. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +0 -187
  128. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +0 -187
  129. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +0 -105
  130. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +0 -105
  131. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +0 -193
  132. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +0 -193
  133. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +0 -193
  134. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +0 -193
  135. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +0 -87
  136. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +0 -87
  137. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +0 -100
  138. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +0 -100
  139. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +0 -84
  140. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +0 -84
  141. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +0 -66
  142. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +0 -66
  143. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +0 -66
  144. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +0 -66
  145. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +0 -81
  146. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +0 -81
  147. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +0 -70
  148. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +0 -70
  149. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +0 -83
  150. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +0 -83
  151. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +0 -75
  152. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +0 -75
  153. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +0 -378
  154. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +0 -378
  155. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +0 -378
  156. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +0 -378
  157. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +0 -52
  158. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +0 -52
  159. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +0 -108
  160. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +0 -108
  161. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +0 -80
  162. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +0 -80
  163. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +0 -345
  164. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +0 -345
  165. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +0 -345
  166. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +0 -345
  167. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +0 -203
  168. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +0 -203
  169. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +0 -203
  170. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +0 -203
  171. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +0 -243
  172. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +0 -243
  173. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +0 -243
  174. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +0 -243
  175. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +0 -259
  176. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +0 -259
  177. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +0 -259
  178. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +0 -259
  179. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +0 -168
  180. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +0 -168
  181. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +0 -168
  182. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +0 -168
@@ -1,345 +0,0 @@
1
- ---
2
- name: tests-creator
3
- description: "Use when writing test cases BEFORE implementation — converts acceptance criteria into failing test stubs that task-implementer will make pass. Mandatory step in the TDD pipeline between issue-analyzer and task-implementer."
4
- triggers:
5
- - "Create tests"
6
- - "Write tests first"
7
- - "Generate test specs"
8
- - "Tests before implementation"
9
- - "TDD test stubs"
10
- - "Convert criteria to tests"
11
- metadata:
12
- author: "MrCipherSmith"
13
- version: "1.0.0"
14
- category: "quality"
15
- agent_worthy: true
16
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
17
- license: "MIT"
18
- ---
19
-
20
- # Tests Creator
21
-
22
- ## Purpose
23
-
24
- Converts acceptance criteria (from `issue-analyzer` or manual input) into concrete, failing test stubs **before any implementation code is written**. Enforces the RED phase of TDD.
25
-
26
- **Input:** Task object with `acceptance_criteria` + codebase path + test framework info
27
- **Output:** Ready-to-run test files with failing test stubs + `test_case_specs` block for `task-implementer`
28
-
29
- ## When to Use
30
-
31
- - Between `issue-analyzer` and `task-implementer` in the TDD pipeline
32
- - Orchestrator needs test specs before dispatching implementation
33
- - User wants to review test expectations before code is written
34
- - Acceptance criteria need to be translated into executable specifications
35
-
36
- ## Architecture: 4 Phases
37
-
38
- ```
39
- Phase 1: DETECT → Identify test framework, conventions, fixture patterns
40
- Phase 2: ANALYZE → Map acceptance criteria to test scenarios
41
- Phase 3: GENERATE → Write failing test stubs with correct framework syntax
42
- Phase 4: REPORT → Emit test_case_specs for task-implementer consumption
43
- ```
44
-
45
- ---
46
-
47
- ## Workflow
48
-
49
- ```
50
- Tests Creator Progress:
51
- - [ ] Phase 1: Detect test framework and conventions
52
- - [ ] Phase 2: Map acceptance criteria to test scenarios
53
- - [ ] Phase 3: Generate failing test stubs
54
- - [ ] Phase 4: Report test_case_specs
55
- ```
56
-
57
- ---
58
-
59
- ### Phase 1: DETECT
60
-
61
- Identify the test framework and conventions used in the project.
62
-
63
- **1.1 Detect framework:**
64
-
65
- ```bash
66
- keryx test analyze
67
- ```
68
-
69
- Discovers the framework, test scripts, config files, and existing test file
70
- paths in one pass — do NOT `cat`/`grep` `package.json`, `ls` config globs, or
71
- `find` for test files; that is exactly what `keryx test analyze` already
72
- walks the project for. Read the result compactly:
73
-
74
- ```bash
75
- keryx ctx read .metaproject/data/testing/context.md
76
- ```
77
-
78
- On a project with no keryx testing config, fall back to the project's own
79
- configured way of finding its test framework and existing tests (discovered,
80
- not a hardcoded `cat`/`ls`/`find` invocation).
81
-
82
- **1.2 Read 2-3 existing test files** (from the `context.md` test file list) to understand:
83
- - Import style (`import { describe, it, expect } from 'vitest'` vs global)
84
- - Test file location (co-located `*.test.ts` vs `__tests__/` directory)
85
- - Describe/it/test nesting patterns
86
- - Common assertion patterns (`expect(x).toBe(y)` vs `assert.equal(x, y)`)
87
- - Mock patterns (`vi.fn()` vs `jest.fn()` vs manual mocks)
88
- - Fixture/factory patterns (how test data is created)
89
- - Before/after hook usage
90
-
91
- **1.3 Identify test file naming:**
92
- - Pattern: `<component>.test.ts`, `<service>.spec.ts`, `test_<module>.py`, etc.
93
- - Location: co-located with source or in `__tests__`/`tests/` directory
94
-
95
- **Output of Phase 1:**
96
- ```
97
- TEST_ENV:
98
- framework: vitest | jest | bun:test | mocha | pytest | go_test
99
- import_style: esm | cjs | global
100
- file_pattern: "*.test.ts" | "*.spec.ts" | "test_*.py"
101
- file_location: co-located | __tests__ | tests/
102
- assertion_style: expect | assert | chai
103
- mock_library: vi | jest | sinon | unittest.mock
104
- fixture_pattern: <description of how test data is created>
105
- ```
106
-
107
- ---
108
-
109
- ### Phase 2: ANALYZE
110
-
111
- Map each acceptance criterion to one or more test scenarios.
112
-
113
- **2.1 Parse acceptance criteria:**
114
-
115
- For each criterion, determine:
116
- - **Happy path**: when everything works correctly
117
- - **Edge cases**: boundary values, empty inputs, maximum values
118
- - **Error paths**: invalid input, missing data, permission denied, external failure
119
-
120
- **2.2 Criterion-to-scenario mapping:**
121
-
122
- | Criterion Type | Test Scenarios to Generate |
123
- |---|---|
124
- | "User can X" | happy path: user can X; error: user cannot X when [condition] |
125
- | "System returns Y when Z" | given Z → returns Y; given not-Z → does not return Y |
126
- | "Field is required" | valid data passes; missing field fails with error |
127
- | "Value must be between A and B" | A passes; B passes; A-1 fails; B+1 fails |
128
- | "X must not happen" | verify X does not happen under [conditions] |
129
- | "Async operation completes" | resolves with expected value; rejects on failure |
130
-
131
- **2.3 Group scenarios by test file:**
132
-
133
- Group related scenarios into test files matching the target_files from the task:
134
- - Service test → test the service class methods
135
- - Component test → test component rendering and interactions
136
- - Integration test → test the full flow
137
-
138
- **Output of Phase 2:**
139
- ```
140
- TEST_PLAN:
141
- - test_file: <path>
142
- target_module: <source file being tested>
143
- scenarios:
144
- - id: test-1
145
- criterion: <which acceptance criterion>
146
- description: <what to test>
147
- type: happy_path | edge_case | error_path
148
- setup: <what to arrange>
149
- action: <what to call/render/trigger>
150
- assertion: <what to expect>
151
- ```
152
-
153
- ---
154
-
155
- ### Phase 3: GENERATE
156
-
157
- Write the actual test files with failing stubs.
158
-
159
- **3.1 Test file structure:**
160
-
161
- ```typescript
162
- // Template for TypeScript (vitest/jest)
163
- import { describe, it, expect, vi, beforeEach } from 'vitest';
164
- // import the module under test — may not exist yet, that is expected
165
- import { <ModuleUnderTest> } from '<relative path>';
166
-
167
- describe('<ModuleUnderTest>', () => {
168
- // Acceptance criterion: <criterion text>
169
- describe('<group name>', () => {
170
- it('<should do X when Y>', async () => {
171
- // Arrange
172
- const <fixture> = <test data>;
173
-
174
- // Act
175
- const result = await <action>;
176
-
177
- // Assert
178
- expect(result).<assertion>;
179
- });
180
-
181
- it('<should fail when Z>', async () => {
182
- // Arrange
183
- const <invalid fixture> = <invalid data>;
184
-
185
- // Act & Assert
186
- await expect(<action with invalid data>).rejects.toThrow(<error type>);
187
- });
188
- });
189
- });
190
- ```
191
-
192
- **3.2 Failing stubs (RED phase):**
193
-
194
- The generated tests MUST:
195
- - Import the module under test (file may not exist yet — that is fine)
196
- - Have meaningful test descriptions
197
- - Have placeholder assertions that will FAIL until implementation:
198
- ```typescript
199
- // Use todo() for unimplemented tests
200
- it.todo('<test description>');
201
-
202
- // OR use a stub assertion that fails
203
- it('<test description>', () => {
204
- expect(true).toBe(false); // RED: remove this when implementing
205
- });
206
- ```
207
- - OR use proper assertions calling the future API (will fail with "module not found" or "function is not a function")
208
-
209
- **3.3 Preferred approach — forward-declared tests:**
210
-
211
- Write tests that call the actual future API with real assertions. They will fail because the module doesn't exist yet:
212
-
213
- ```typescript
214
- // This file will fail to compile/run until task-implementer creates:
215
- // src/services/UserValidator.ts with a validate() method
216
- import { UserValidator } from '../services/UserValidator';
217
-
218
- describe('UserValidator', () => {
219
- it('should accept valid email address', () => {
220
- const validator = new UserValidator();
221
- expect(validator.validate({ email: 'user@example.com' })).toEqual({ valid: true });
222
- });
223
-
224
- it('should reject email without @ symbol', () => {
225
- const validator = new UserValidator();
226
- expect(validator.validate({ email: 'not-an-email' })).toEqual({
227
- valid: false,
228
- errors: [{ field: 'email', message: 'Invalid email format' }],
229
- });
230
- });
231
- });
232
- ```
233
-
234
- **3.4 Commit the test files:**
235
-
236
- ```bash
237
- git add <test files>
238
- git commit -m "test(<scope>): add failing test stubs for <task description>
239
-
240
- RED phase — tests will pass after implementation
241
- refs #<issue_number>"
242
- ```
243
-
244
- ---
245
-
246
- ### Phase 4: REPORT
247
-
248
- Emit the `test_case_specs` block for consumption by `task-implementer`.
249
-
250
- **Output structure:**
251
-
252
- ```
253
- TEST_CASE_SPECS:
254
- framework: <vitest|jest|pytest|...>
255
- test_files:
256
- - path: <test file path>
257
- target_module: <source file to implement>
258
- test_count: <N>
259
- tests:
260
- - id: test-1
261
- description: <it description>
262
- criterion: <which acceptance criterion>
263
- type: happy_path | edge_case | error_path
264
- status: written # test file exists, test is RED
265
-
266
- run_command: "<command to run just these tests>"
267
- expected_result: "all failing (RED phase)"
268
- notes: "<any test design decisions or assumptions>"
269
- ```
270
-
271
- **STATUS reporting:**
272
-
273
- ```
274
- STATUS: DONE
275
- tests_written: <N>
276
- test_files: [<list of paths>]
277
- all_criteria_covered: true | false (with explanation)
278
- ```
279
-
280
- ---
281
-
282
- ## Integration with Task Implementer
283
-
284
- When `task-implementer` receives a task that includes `test_case_specs`:
285
-
286
- 1. Read the test files (already committed as RED)
287
- 2. Run the tests — confirm they FAIL
288
- 3. Implement code until all tests are GREEN
289
- 4. Commit the implementation
290
- 5. Re-run tests — confirm GREEN
291
- 6. Report SUCCESS
292
-
293
- This ensures the TDD cycle is maintained end-to-end.
294
-
295
- ---
296
-
297
- ## Automation Settings
298
-
299
- | Setting | Default | Options | Description |
300
- |---------|---------|---------|-------------|
301
- | `commit_test_stubs` | `true` | true/false | Commit the test files after generation |
302
- | `verify_red` | `true` | true/false | Run tests to confirm they fail before reporting |
303
- | `stub_style` | `forward_declared` | `forward_declared` / `todo` | How to write failing stubs |
304
- | `include_edge_cases` | `true` | true/false | Generate edge case tests in addition to happy path |
305
- | `max_tests_per_criterion` | `3` | 1-5 | Max test cases per acceptance criterion |
306
-
307
- ---
308
-
309
- ## Error Handling
310
-
311
- | Error | Action |
312
- |-------|--------|
313
- | No acceptance criteria provided | Derive from task description — log warning |
314
- | Test framework not detected | Ask via output, default to vitest for TypeScript |
315
- | Test file already exists | Read existing tests, add new stubs without overwriting |
316
- | Module path unknown | Use placeholder path, note in test_case_specs |
317
- | Verify-red fails (tests pass before implementation) | This means the test is wrong — fix the assertion or report as concern |
318
-
319
- ---
320
-
321
- ## Rules of Engagement
322
-
323
- 1. **DO NOT** write any implementation code. This skill only writes test files.
324
- 2. **DO NOT** write tests that pass without implementation — RED means failing.
325
- 3. **DO** write tests that describe WHAT the code should do, not HOW.
326
- 4. **DO** cover every acceptance criterion with at least one test.
327
- 5. **DO** follow the project's existing test conventions (discovered in Phase 1).
328
- 6. **DO** commit the test files before reporting.
329
- 7. Return `TEST_CASE_SPECS` as the final message to the orchestrator/caller.
330
-
331
- ---
332
-
333
- ## Job Context Awareness
334
-
335
- When dispatched by `job-orchestrator`:
336
-
337
- ```
338
- JOB_NAME: <job-name>
339
- CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
340
- ```
341
-
342
- If provided, read the context document to understand:
343
- - Which test frameworks are in use
344
- - Testing conventions and patterns from the codebase
345
- - Mock/stub strategies documented in the project
@@ -1,345 +0,0 @@
1
- ---
2
- name: tests-creator
3
- description: "Use when writing test cases BEFORE implementation — converts acceptance criteria into failing test stubs that task-implementer will make pass. Mandatory step in the TDD pipeline between issue-analyzer and task-implementer."
4
- triggers:
5
- - "Create tests"
6
- - "Write tests first"
7
- - "Generate test specs"
8
- - "Tests before implementation"
9
- - "TDD test stubs"
10
- - "Convert criteria to tests"
11
- metadata:
12
- author: "MrCipherSmith"
13
- version: "1.0.0"
14
- category: "quality"
15
- agent_worthy: true
16
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
17
- license: "MIT"
18
- ---
19
-
20
- # Tests Creator
21
-
22
- ## Purpose
23
-
24
- Converts acceptance criteria (from `issue-analyzer` or manual input) into concrete, failing test stubs **before any implementation code is written**. Enforces the RED phase of TDD.
25
-
26
- **Input:** Task object with `acceptance_criteria` + codebase path + test framework info
27
- **Output:** Ready-to-run test files with failing test stubs + `test_case_specs` block for `task-implementer`
28
-
29
- ## When to Use
30
-
31
- - Between `issue-analyzer` and `task-implementer` in the TDD pipeline
32
- - Orchestrator needs test specs before dispatching implementation
33
- - User wants to review test expectations before code is written
34
- - Acceptance criteria need to be translated into executable specifications
35
-
36
- ## Architecture: 4 Phases
37
-
38
- ```
39
- Phase 1: DETECT → Identify test framework, conventions, fixture patterns
40
- Phase 2: ANALYZE → Map acceptance criteria to test scenarios
41
- Phase 3: GENERATE → Write failing test stubs with correct framework syntax
42
- Phase 4: REPORT → Emit test_case_specs for task-implementer consumption
43
- ```
44
-
45
- ---
46
-
47
- ## Workflow
48
-
49
- ```
50
- Tests Creator Progress:
51
- - [ ] Phase 1: Detect test framework and conventions
52
- - [ ] Phase 2: Map acceptance criteria to test scenarios
53
- - [ ] Phase 3: Generate failing test stubs
54
- - [ ] Phase 4: Report test_case_specs
55
- ```
56
-
57
- ---
58
-
59
- ### Phase 1: DETECT
60
-
61
- Identify the test framework and conventions used in the project.
62
-
63
- **1.1 Detect framework:**
64
-
65
- ```bash
66
- keryx test analyze
67
- ```
68
-
69
- Discovers the framework, test scripts, config files, and existing test file
70
- paths in one pass — do NOT `cat`/`grep` `package.json`, `ls` config globs, or
71
- `find` for test files; that is exactly what `keryx test analyze` already
72
- walks the project for. Read the result compactly:
73
-
74
- ```bash
75
- keryx ctx read .metaproject/data/testing/context.md
76
- ```
77
-
78
- On a project with no keryx testing config, fall back to the project's own
79
- configured way of finding its test framework and existing tests (discovered,
80
- not a hardcoded `cat`/`ls`/`find` invocation).
81
-
82
- **1.2 Read 2-3 existing test files** (from the `context.md` test file list) to understand:
83
- - Import style (`import { describe, it, expect } from 'vitest'` vs global)
84
- - Test file location (co-located `*.test.ts` vs `__tests__/` directory)
85
- - Describe/it/test nesting patterns
86
- - Common assertion patterns (`expect(x).toBe(y)` vs `assert.equal(x, y)`)
87
- - Mock patterns (`vi.fn()` vs `jest.fn()` vs manual mocks)
88
- - Fixture/factory patterns (how test data is created)
89
- - Before/after hook usage
90
-
91
- **1.3 Identify test file naming:**
92
- - Pattern: `<component>.test.ts`, `<service>.spec.ts`, `test_<module>.py`, etc.
93
- - Location: co-located with source or in `__tests__`/`tests/` directory
94
-
95
- **Output of Phase 1:**
96
- ```
97
- TEST_ENV:
98
- framework: vitest | jest | bun:test | mocha | pytest | go_test
99
- import_style: esm | cjs | global
100
- file_pattern: "*.test.ts" | "*.spec.ts" | "test_*.py"
101
- file_location: co-located | __tests__ | tests/
102
- assertion_style: expect | assert | chai
103
- mock_library: vi | jest | sinon | unittest.mock
104
- fixture_pattern: <description of how test data is created>
105
- ```
106
-
107
- ---
108
-
109
- ### Phase 2: ANALYZE
110
-
111
- Map each acceptance criterion to one or more test scenarios.
112
-
113
- **2.1 Parse acceptance criteria:**
114
-
115
- For each criterion, determine:
116
- - **Happy path**: when everything works correctly
117
- - **Edge cases**: boundary values, empty inputs, maximum values
118
- - **Error paths**: invalid input, missing data, permission denied, external failure
119
-
120
- **2.2 Criterion-to-scenario mapping:**
121
-
122
- | Criterion Type | Test Scenarios to Generate |
123
- |---|---|
124
- | "User can X" | happy path: user can X; error: user cannot X when [condition] |
125
- | "System returns Y when Z" | given Z → returns Y; given not-Z → does not return Y |
126
- | "Field is required" | valid data passes; missing field fails with error |
127
- | "Value must be between A and B" | A passes; B passes; A-1 fails; B+1 fails |
128
- | "X must not happen" | verify X does not happen under [conditions] |
129
- | "Async operation completes" | resolves with expected value; rejects on failure |
130
-
131
- **2.3 Group scenarios by test file:**
132
-
133
- Group related scenarios into test files matching the target_files from the task:
134
- - Service test → test the service class methods
135
- - Component test → test component rendering and interactions
136
- - Integration test → test the full flow
137
-
138
- **Output of Phase 2:**
139
- ```
140
- TEST_PLAN:
141
- - test_file: <path>
142
- target_module: <source file being tested>
143
- scenarios:
144
- - id: test-1
145
- criterion: <which acceptance criterion>
146
- description: <what to test>
147
- type: happy_path | edge_case | error_path
148
- setup: <what to arrange>
149
- action: <what to call/render/trigger>
150
- assertion: <what to expect>
151
- ```
152
-
153
- ---
154
-
155
- ### Phase 3: GENERATE
156
-
157
- Write the actual test files with failing stubs.
158
-
159
- **3.1 Test file structure:**
160
-
161
- ```typescript
162
- // Template for TypeScript (vitest/jest)
163
- import { describe, it, expect, vi, beforeEach } from 'vitest';
164
- // import the module under test — may not exist yet, that is expected
165
- import { <ModuleUnderTest> } from '<relative path>';
166
-
167
- describe('<ModuleUnderTest>', () => {
168
- // Acceptance criterion: <criterion text>
169
- describe('<group name>', () => {
170
- it('<should do X when Y>', async () => {
171
- // Arrange
172
- const <fixture> = <test data>;
173
-
174
- // Act
175
- const result = await <action>;
176
-
177
- // Assert
178
- expect(result).<assertion>;
179
- });
180
-
181
- it('<should fail when Z>', async () => {
182
- // Arrange
183
- const <invalid fixture> = <invalid data>;
184
-
185
- // Act & Assert
186
- await expect(<action with invalid data>).rejects.toThrow(<error type>);
187
- });
188
- });
189
- });
190
- ```
191
-
192
- **3.2 Failing stubs (RED phase):**
193
-
194
- The generated tests MUST:
195
- - Import the module under test (file may not exist yet — that is fine)
196
- - Have meaningful test descriptions
197
- - Have placeholder assertions that will FAIL until implementation:
198
- ```typescript
199
- // Use todo() for unimplemented tests
200
- it.todo('<test description>');
201
-
202
- // OR use a stub assertion that fails
203
- it('<test description>', () => {
204
- expect(true).toBe(false); // RED: remove this when implementing
205
- });
206
- ```
207
- - OR use proper assertions calling the future API (will fail with "module not found" or "function is not a function")
208
-
209
- **3.3 Preferred approach — forward-declared tests:**
210
-
211
- Write tests that call the actual future API with real assertions. They will fail because the module doesn't exist yet:
212
-
213
- ```typescript
214
- // This file will fail to compile/run until task-implementer creates:
215
- // src/services/UserValidator.ts with a validate() method
216
- import { UserValidator } from '../services/UserValidator';
217
-
218
- describe('UserValidator', () => {
219
- it('should accept valid email address', () => {
220
- const validator = new UserValidator();
221
- expect(validator.validate({ email: 'user@example.com' })).toEqual({ valid: true });
222
- });
223
-
224
- it('should reject email without @ symbol', () => {
225
- const validator = new UserValidator();
226
- expect(validator.validate({ email: 'not-an-email' })).toEqual({
227
- valid: false,
228
- errors: [{ field: 'email', message: 'Invalid email format' }],
229
- });
230
- });
231
- });
232
- ```
233
-
234
- **3.4 Commit the test files:**
235
-
236
- ```bash
237
- git add <test files>
238
- git commit -m "test(<scope>): add failing test stubs for <task description>
239
-
240
- RED phase — tests will pass after implementation
241
- refs #<issue_number>"
242
- ```
243
-
244
- ---
245
-
246
- ### Phase 4: REPORT
247
-
248
- Emit the `test_case_specs` block for consumption by `task-implementer`.
249
-
250
- **Output structure:**
251
-
252
- ```
253
- TEST_CASE_SPECS:
254
- framework: <vitest|jest|pytest|...>
255
- test_files:
256
- - path: <test file path>
257
- target_module: <source file to implement>
258
- test_count: <N>
259
- tests:
260
- - id: test-1
261
- description: <it description>
262
- criterion: <which acceptance criterion>
263
- type: happy_path | edge_case | error_path
264
- status: written # test file exists, test is RED
265
-
266
- run_command: "<command to run just these tests>"
267
- expected_result: "all failing (RED phase)"
268
- notes: "<any test design decisions or assumptions>"
269
- ```
270
-
271
- **STATUS reporting:**
272
-
273
- ```
274
- STATUS: DONE
275
- tests_written: <N>
276
- test_files: [<list of paths>]
277
- all_criteria_covered: true | false (with explanation)
278
- ```
279
-
280
- ---
281
-
282
- ## Integration with Task Implementer
283
-
284
- When `task-implementer` receives a task that includes `test_case_specs`:
285
-
286
- 1. Read the test files (already committed as RED)
287
- 2. Run the tests — confirm they FAIL
288
- 3. Implement code until all tests are GREEN
289
- 4. Commit the implementation
290
- 5. Re-run tests — confirm GREEN
291
- 6. Report SUCCESS
292
-
293
- This ensures the TDD cycle is maintained end-to-end.
294
-
295
- ---
296
-
297
- ## Automation Settings
298
-
299
- | Setting | Default | Options | Description |
300
- |---------|---------|---------|-------------|
301
- | `commit_test_stubs` | `true` | true/false | Commit the test files after generation |
302
- | `verify_red` | `true` | true/false | Run tests to confirm they fail before reporting |
303
- | `stub_style` | `forward_declared` | `forward_declared` / `todo` | How to write failing stubs |
304
- | `include_edge_cases` | `true` | true/false | Generate edge case tests in addition to happy path |
305
- | `max_tests_per_criterion` | `3` | 1-5 | Max test cases per acceptance criterion |
306
-
307
- ---
308
-
309
- ## Error Handling
310
-
311
- | Error | Action |
312
- |-------|--------|
313
- | No acceptance criteria provided | Derive from task description — log warning |
314
- | Test framework not detected | Ask via output, default to vitest for TypeScript |
315
- | Test file already exists | Read existing tests, add new stubs without overwriting |
316
- | Module path unknown | Use placeholder path, note in test_case_specs |
317
- | Verify-red fails (tests pass before implementation) | This means the test is wrong — fix the assertion or report as concern |
318
-
319
- ---
320
-
321
- ## Rules of Engagement
322
-
323
- 1. **DO NOT** write any implementation code. This skill only writes test files.
324
- 2. **DO NOT** write tests that pass without implementation — RED means failing.
325
- 3. **DO** write tests that describe WHAT the code should do, not HOW.
326
- 4. **DO** cover every acceptance criterion with at least one test.
327
- 5. **DO** follow the project's existing test conventions (discovered in Phase 1).
328
- 6. **DO** commit the test files before reporting.
329
- 7. Return `TEST_CASE_SPECS` as the final message to the orchestrator/caller.
330
-
331
- ---
332
-
333
- ## Job Context Awareness
334
-
335
- When dispatched by `job-orchestrator`:
336
-
337
- ```
338
- JOB_NAME: <job-name>
339
- CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
340
- ```
341
-
342
- If provided, read the context document to understand:
343
- - Which test frameworks are in use
344
- - Testing conventions and patterns from the codebase
345
- - Mock/stub strategies documented in the project