@mrciphersmith/keryx 0.2.98 → 0.2.100

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 +4605 -2695
  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,330 +0,0 @@
1
- ---
2
- name: code-verifier
3
- model_tier: light
4
- description: "Use when running a full quality gate after implementation — lint, type-check, tests, and import validation. Mandatory step in job-orchestrator after task-implementer and after fix iterations. Use standalone when you need a structured verification report."
5
- triggers:
6
- - "Run verification"
7
- - "Quality gate"
8
- - "Check code quality"
9
- - "Run lint and tests"
10
- - "Verify implementation"
11
- - "Run checks"
12
- metadata:
13
- author: "MrCipherSmith"
14
- version: "1.0.0"
15
- category: "orchestration"
16
- agent_worthy: true
17
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
18
- license: "MIT"
19
- ---
20
-
21
- # Code Verifier
22
-
23
- ## Purpose
24
-
25
- Runs the full quality gate for a project: lint, type-check, tests, and import validation. Provides a structured, parseable result that the orchestrator uses to decide whether to proceed or trigger a fix loop.
26
-
27
- **Distinct from `task-implementer` Phase 5:** task-implementer does inline self-verification during implementation. `code-verifier` is an independent gate that runs after all tasks in a wave are complete — giving a clean, consolidated view of the whole diff, not per-task.
28
-
29
- **Input:** Codebase path + worktree path + scope (changed files or full project)
30
- **Output:** `VERIFICATION_RESULT` structured report — gate status (pass/fail), per-check results, actionable findings
31
-
32
- ## When to Use
33
-
34
- - Dispatched by `job-orchestrator` after each task-implementer wave (mandatory)
35
- - Dispatched by `job-orchestrator` after each fix iteration
36
- - Run standalone: "verify my code", "run quality gate", "/code-verifier"
37
- - Any time you need a reproducible, structured view of project health
38
-
39
- ## Architecture: 4 Phases
40
-
41
- ```
42
- Phase 1: DETECT → Auto-detect stack, tooling, commands
43
- Phase 2: RUN → Execute lint → type-check → tests → import-check
44
- Phase 3: ANALYZE → Parse outputs, classify findings by severity
45
- Phase 4: REPORT → Emit VERIFICATION_RESULT
46
- ```
47
-
48
- ---
49
-
50
- ## Workflow
51
-
52
- ```
53
- Code Verifier Progress:
54
- - [ ] Phase 1: Detect stack and tooling
55
- - [ ] Phase 2: Run verification checks
56
- - [ ] Phase 3: Analyze and classify findings
57
- - [ ] Phase 4: Report results
58
- ```
59
-
60
- ---
61
-
62
- ### Phase 1: DETECT
63
-
64
- Determine scope. Stack and tool discovery is delegated to `keryx health run`
65
- and `keryx test run` — do NOT hand-roll package-manager or
66
- lint/type-check/test tool detection here.
67
-
68
- **1.1 Determine scope:**
69
-
70
- ```
71
- IF scope = "changed" (default when dispatched by orchestrator):
72
- FILES = git diff --name-only <base_branch>...HEAD
73
- Pass --changed to keryx health run and keryx test run below.
74
-
75
- IF scope = "full":
76
- Run all checks on the full project (omit --changed).
77
- ```
78
-
79
- **1.2 Checks used:**
80
-
81
- | Check | Command |
82
- |---|---|
83
- | Lint + type-check | `keryx health run --changed --source eslint,typescript` (drop `--changed` for full scope) |
84
- | Tests | `keryx test run --changed --strict` (drop `--changed` for full scope) |
85
- | Circular imports | the project's own package-manager runner + `madge --circular --extensions ts,tsx src/`, if `madge` is a devDependency — optional; not covered by `keryx health run` / `keryx test run` |
86
-
87
- `src/health/sources/eslint.ts` and `src/health/sources/typescript.ts` resolve
88
- the real lint/type-check invocation for the project; `src/testing/service.ts`
89
- detects `bun` / `pnpm` / `yarn` / `npm` from the lockfile and builds the test
90
- invocation from the project's own test script. Do NOT hard-code a package
91
- manager, linter, type-checker, or test binary here — that is the if-chain
92
- these commands already resolve. On a project with no keryx health/testing
93
- config, fall back to the project's own configured lint/type-check/test
94
- command (discovered from its `package.json` scripts or equivalent, not a
95
- hardcoded tool).
96
-
97
- **Output of Phase 1:**
98
- ```
99
- TOOLING:
100
- checks_available: [lint+type-check, tests, circular-imports]
101
- checks_skipped: [<reason>]
102
- scope: changed | full
103
- changed_files: [<paths>]
104
- ```
105
-
106
- ---
107
-
108
- ### Phase 2: RUN
109
-
110
- Execute each available check. Capture full output.
111
-
112
- **Execution order:** lint+type-check → tests → import-check
113
-
114
- **Do NOT abort early** — run all checks even if one fails. The orchestrator needs the complete picture.
115
-
116
- **2.1 Lint + type-check:**
117
- ```bash
118
- keryx health run --changed --source eslint,typescript
119
- # OR, full scope:
120
- keryx health run --source eslint,typescript
121
- ```
122
-
123
- Read the result with `keryx health status` (or the report path the command
124
- prints). Capture:
125
- - Gate status (pass/fail) per source
126
- - Number of errors and warnings
127
- - Per-finding: file, line, column, rule/TS code, message
128
-
129
- **2.2 Tests:**
130
- ```bash
131
- keryx test run --changed --strict
132
- # OR, full scope:
133
- keryx test run --strict
134
- ```
135
-
136
- Capture:
137
- - Report status / exit code
138
- - Tests passed / failed / skipped counts
139
- - Per-failure: test name, file, error message, stack (first 5 lines)
140
-
141
- **2.3 Circular import check (if madge available):**
142
- ```bash
143
- <pm> exec madge --circular --extensions ts,tsx src/ 2>&1
144
- ```
145
- `<pm>` is the project's own package-manager runner for devDependency
146
- binaries (`pnpm exec`, `yarn`, or the npm-based equivalent), resolved the
147
- same way `keryx test run` resolves it from the lockfile — not hardcoded.
148
-
149
- Capture:
150
- - Exit code
151
- - List of circular chains (if any)
152
-
153
- ---
154
-
155
- ### Phase 3: ANALYZE
156
-
157
- Parse raw outputs into structured findings. Classify by severity.
158
-
159
- **3.1 Severity classification:**
160
-
161
- | Finding | Severity |
162
- |---|---|
163
- | Type error | CRITICAL |
164
- | Test failure | CRITICAL |
165
- | ESLint error (not warning) | HIGH |
166
- | Circular import | HIGH |
167
- | ESLint warning | LOW |
168
- | Skipped test | INFO |
169
-
170
- **3.2 Gate decision:**
171
-
172
- ```
173
- GATE = PASS
174
- IF any CRITICAL findings → GATE = FAIL (blocks proceed)
175
- IF any HIGH findings → GATE = FAIL (blocks proceed)
176
- IF only LOW/INFO findings → GATE = PASS_WITH_WARNINGS
177
- ```
178
-
179
- **3.3 Actionable finding format:**
180
-
181
- Each finding must include enough context for `task-implementer` (fix mode) to resolve it without re-reading the full output:
182
-
183
- ```
184
- {
185
- severity: CRITICAL | HIGH | LOW | INFO,
186
- check: lint | type-check | test | circular-import,
187
- file: <path>,
188
- line: <N> | null,
189
- column: <N> | null,
190
- rule: <ESLint rule or TS error code> | null,
191
- message: <error text>,
192
- suggestion: <optional fix hint>
193
- }
194
- ```
195
-
196
- ---
197
-
198
- ### Phase 4: REPORT
199
-
200
- Emit the structured `VERIFICATION_RESULT` as the final message.
201
-
202
- ```
203
- VERIFICATION_RESULT:
204
- gate: PASS | PASS_WITH_WARNINGS | FAIL
205
- scope: changed | full
206
-
207
- checks:
208
- lint:
209
- status: pass | fail | skipped
210
- errors: <N>
211
- warnings: <N>
212
- command_used: "<command>"
213
-
214
- type_check:
215
- status: pass | fail | skipped
216
- errors: <N>
217
- command_used: "<command>"
218
-
219
- tests:
220
- status: pass | fail | skipped
221
- passed: <N>
222
- failed: <N>
223
- skipped: <N>
224
- command_used: "<command>"
225
-
226
- circular_imports:
227
- status: pass | fail | skipped
228
- cycles: <N>
229
-
230
- findings:
231
- - severity: CRITICAL
232
- check: type-check
233
- file: src/services/UserService.ts
234
- line: 42
235
- rule: TS2345
236
- message: "Argument of type 'string' is not assignable to parameter of type 'number'"
237
- - severity: HIGH
238
- check: lint
239
- file: src/components/Form.tsx
240
- line: 18
241
- rule: "no-unused-vars"
242
- message: "'value' is defined but never used"
243
-
244
- summary: "<1-2 sentence human-readable summary>"
245
- ```
246
-
247
- **STATUS reporting:**
248
-
249
- ```
250
- STATUS: DONE — gate PASS or PASS_WITH_WARNINGS, report follows
251
- STATUS: DONE_WITH_CONCERNS — PASS_WITH_WARNINGS with notable warnings
252
- STATUS: BLOCKED — could not run checks (missing tooling, wrong directory)
253
- ```
254
-
255
- > If `gate: FAIL` → STATUS is still `DONE` (the gate result, not the skill's execution). The orchestrator reads `gate: FAIL` and decides to trigger fix.
256
-
257
- ---
258
-
259
- ## Integration with job-orchestrator
260
-
261
- The orchestrator dispatches `code-verifier` at two points:
262
-
263
- **After task-implementer wave (pre-review gate):**
264
- ```
265
- code-verifier:
266
- codebase_path: <worktree_path>
267
- scope: changed
268
- base_branch: <base_branch from JOB_STATE>
269
- → If gate: FAIL → dispatch fix tasks → re-run code-verifier
270
- → If gate: PASS → proceed to review
271
- ```
272
-
273
- **After fix iterations (post-fix gate):**
274
- ```
275
- code-verifier:
276
- codebase_path: <worktree_path>
277
- scope: changed
278
- → If gate still FAIL after 3 iterations → report as BLOCKED, skip to report
279
- → If gate: PASS → proceed to report
280
- ```
281
-
282
- **The orchestrator's internal "checks" step (2.8) is replaced by `code-verifier` dispatch.**
283
-
284
- ---
285
-
286
- ## Standalone Usage
287
-
288
- ```bash
289
- # Run on current directory, changed files only
290
- /code-verifier
291
-
292
- # Run on specific project
293
- /code-verifier --path /path/to/project
294
-
295
- # Full project scan (not just changed files)
296
- /code-verifier --scope full
297
- ```
298
-
299
- ---
300
-
301
- ## Automation Settings
302
-
303
- | Setting | Default | Options | Description |
304
- |---------|---------|---------|-------------|
305
- | `scope` | `changed` | `changed` / `full` | Limit checks to changed files or run full project |
306
- | `fail_on_warnings` | `false` | true/false | Treat ESLint warnings as gate failures |
307
- | `include_circular` | `true` | true/false | Run circular import detection if madge available |
308
- | `max_findings_reported` | `20` | 1-100 | Cap findings in report to avoid overflow |
309
-
310
- ---
311
-
312
- ## Error Handling
313
-
314
- | Error | Action |
315
- |---|---|
316
- | Check command not found | Mark check as `skipped`, continue others |
317
- | Wrong working directory | ABORT with `STATUS: BLOCKED` and directory hint |
318
- | Command times out (>120s) | Mark check as `skipped (timeout)`, continue |
319
- | Zero checks available | `STATUS: BLOCKED` — cannot verify without any tooling |
320
- | Circular import tool missing | Skip silently (not installed in all projects) |
321
-
322
- ---
323
-
324
- ## Rules of Engagement
325
-
326
- 1. **Run ALL checks** — never abort after first failure. The orchestrator needs the full picture.
327
- 2. **Do NOT modify files** — this is read-only verification.
328
- 3. **Scope to changed files** by default — full scans are slow and produce noise.
329
- 4. **Be specific** in findings — include file, line, rule, message. Vague "lint failed" is not actionable.
330
- 5. Return `VERIFICATION_RESULT` as the **final message** to the orchestrator.
@@ -1,330 +0,0 @@
1
- ---
2
- name: code-verifier
3
- model_tier: light
4
- description: "Use when running a full quality gate after implementation — lint, type-check, tests, and import validation. Mandatory step in job-orchestrator after task-implementer and after fix iterations. Use standalone when you need a structured verification report."
5
- triggers:
6
- - "Run verification"
7
- - "Quality gate"
8
- - "Check code quality"
9
- - "Run lint and tests"
10
- - "Verify implementation"
11
- - "Run checks"
12
- metadata:
13
- author: "MrCipherSmith"
14
- version: "1.0.0"
15
- category: "orchestration"
16
- agent_worthy: true
17
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
18
- license: "MIT"
19
- ---
20
-
21
- # Code Verifier
22
-
23
- ## Purpose
24
-
25
- Runs the full quality gate for a project: lint, type-check, tests, and import validation. Provides a structured, parseable result that the orchestrator uses to decide whether to proceed or trigger a fix loop.
26
-
27
- **Distinct from `task-implementer` Phase 5:** task-implementer does inline self-verification during implementation. `code-verifier` is an independent gate that runs after all tasks in a wave are complete — giving a clean, consolidated view of the whole diff, not per-task.
28
-
29
- **Input:** Codebase path + worktree path + scope (changed files or full project)
30
- **Output:** `VERIFICATION_RESULT` structured report — gate status (pass/fail), per-check results, actionable findings
31
-
32
- ## When to Use
33
-
34
- - Dispatched by `job-orchestrator` after each task-implementer wave (mandatory)
35
- - Dispatched by `job-orchestrator` after each fix iteration
36
- - Run standalone: "verify my code", "run quality gate", "/code-verifier"
37
- - Any time you need a reproducible, structured view of project health
38
-
39
- ## Architecture: 4 Phases
40
-
41
- ```
42
- Phase 1: DETECT → Auto-detect stack, tooling, commands
43
- Phase 2: RUN → Execute lint → type-check → tests → import-check
44
- Phase 3: ANALYZE → Parse outputs, classify findings by severity
45
- Phase 4: REPORT → Emit VERIFICATION_RESULT
46
- ```
47
-
48
- ---
49
-
50
- ## Workflow
51
-
52
- ```
53
- Code Verifier Progress:
54
- - [ ] Phase 1: Detect stack and tooling
55
- - [ ] Phase 2: Run verification checks
56
- - [ ] Phase 3: Analyze and classify findings
57
- - [ ] Phase 4: Report results
58
- ```
59
-
60
- ---
61
-
62
- ### Phase 1: DETECT
63
-
64
- Determine scope. Stack and tool discovery is delegated to `keryx health run`
65
- and `keryx test run` — do NOT hand-roll package-manager or
66
- lint/type-check/test tool detection here.
67
-
68
- **1.1 Determine scope:**
69
-
70
- ```
71
- IF scope = "changed" (default when dispatched by orchestrator):
72
- FILES = git diff --name-only <base_branch>...HEAD
73
- Pass --changed to keryx health run and keryx test run below.
74
-
75
- IF scope = "full":
76
- Run all checks on the full project (omit --changed).
77
- ```
78
-
79
- **1.2 Checks used:**
80
-
81
- | Check | Command |
82
- |---|---|
83
- | Lint + type-check | `keryx health run --changed --source eslint,typescript` (drop `--changed` for full scope) |
84
- | Tests | `keryx test run --changed --strict` (drop `--changed` for full scope) |
85
- | Circular imports | the project's own package-manager runner + `madge --circular --extensions ts,tsx src/`, if `madge` is a devDependency — optional; not covered by `keryx health run` / `keryx test run` |
86
-
87
- `src/health/sources/eslint.ts` and `src/health/sources/typescript.ts` resolve
88
- the real lint/type-check invocation for the project; `src/testing/service.ts`
89
- detects `bun` / `pnpm` / `yarn` / `npm` from the lockfile and builds the test
90
- invocation from the project's own test script. Do NOT hard-code a package
91
- manager, linter, type-checker, or test binary here — that is the if-chain
92
- these commands already resolve. On a project with no keryx health/testing
93
- config, fall back to the project's own configured lint/type-check/test
94
- command (discovered from its `package.json` scripts or equivalent, not a
95
- hardcoded tool).
96
-
97
- **Output of Phase 1:**
98
- ```
99
- TOOLING:
100
- checks_available: [lint+type-check, tests, circular-imports]
101
- checks_skipped: [<reason>]
102
- scope: changed | full
103
- changed_files: [<paths>]
104
- ```
105
-
106
- ---
107
-
108
- ### Phase 2: RUN
109
-
110
- Execute each available check. Capture full output.
111
-
112
- **Execution order:** lint+type-check → tests → import-check
113
-
114
- **Do NOT abort early** — run all checks even if one fails. The orchestrator needs the complete picture.
115
-
116
- **2.1 Lint + type-check:**
117
- ```bash
118
- keryx health run --changed --source eslint,typescript
119
- # OR, full scope:
120
- keryx health run --source eslint,typescript
121
- ```
122
-
123
- Read the result with `keryx health status` (or the report path the command
124
- prints). Capture:
125
- - Gate status (pass/fail) per source
126
- - Number of errors and warnings
127
- - Per-finding: file, line, column, rule/TS code, message
128
-
129
- **2.2 Tests:**
130
- ```bash
131
- keryx test run --changed --strict
132
- # OR, full scope:
133
- keryx test run --strict
134
- ```
135
-
136
- Capture:
137
- - Report status / exit code
138
- - Tests passed / failed / skipped counts
139
- - Per-failure: test name, file, error message, stack (first 5 lines)
140
-
141
- **2.3 Circular import check (if madge available):**
142
- ```bash
143
- <pm> exec madge --circular --extensions ts,tsx src/ 2>&1
144
- ```
145
- `<pm>` is the project's own package-manager runner for devDependency
146
- binaries (`pnpm exec`, `yarn`, or the npm-based equivalent), resolved the
147
- same way `keryx test run` resolves it from the lockfile — not hardcoded.
148
-
149
- Capture:
150
- - Exit code
151
- - List of circular chains (if any)
152
-
153
- ---
154
-
155
- ### Phase 3: ANALYZE
156
-
157
- Parse raw outputs into structured findings. Classify by severity.
158
-
159
- **3.1 Severity classification:**
160
-
161
- | Finding | Severity |
162
- |---|---|
163
- | Type error | CRITICAL |
164
- | Test failure | CRITICAL |
165
- | ESLint error (not warning) | HIGH |
166
- | Circular import | HIGH |
167
- | ESLint warning | LOW |
168
- | Skipped test | INFO |
169
-
170
- **3.2 Gate decision:**
171
-
172
- ```
173
- GATE = PASS
174
- IF any CRITICAL findings → GATE = FAIL (blocks proceed)
175
- IF any HIGH findings → GATE = FAIL (blocks proceed)
176
- IF only LOW/INFO findings → GATE = PASS_WITH_WARNINGS
177
- ```
178
-
179
- **3.3 Actionable finding format:**
180
-
181
- Each finding must include enough context for `task-implementer` (fix mode) to resolve it without re-reading the full output:
182
-
183
- ```
184
- {
185
- severity: CRITICAL | HIGH | LOW | INFO,
186
- check: lint | type-check | test | circular-import,
187
- file: <path>,
188
- line: <N> | null,
189
- column: <N> | null,
190
- rule: <ESLint rule or TS error code> | null,
191
- message: <error text>,
192
- suggestion: <optional fix hint>
193
- }
194
- ```
195
-
196
- ---
197
-
198
- ### Phase 4: REPORT
199
-
200
- Emit the structured `VERIFICATION_RESULT` as the final message.
201
-
202
- ```
203
- VERIFICATION_RESULT:
204
- gate: PASS | PASS_WITH_WARNINGS | FAIL
205
- scope: changed | full
206
-
207
- checks:
208
- lint:
209
- status: pass | fail | skipped
210
- errors: <N>
211
- warnings: <N>
212
- command_used: "<command>"
213
-
214
- type_check:
215
- status: pass | fail | skipped
216
- errors: <N>
217
- command_used: "<command>"
218
-
219
- tests:
220
- status: pass | fail | skipped
221
- passed: <N>
222
- failed: <N>
223
- skipped: <N>
224
- command_used: "<command>"
225
-
226
- circular_imports:
227
- status: pass | fail | skipped
228
- cycles: <N>
229
-
230
- findings:
231
- - severity: CRITICAL
232
- check: type-check
233
- file: src/services/UserService.ts
234
- line: 42
235
- rule: TS2345
236
- message: "Argument of type 'string' is not assignable to parameter of type 'number'"
237
- - severity: HIGH
238
- check: lint
239
- file: src/components/Form.tsx
240
- line: 18
241
- rule: "no-unused-vars"
242
- message: "'value' is defined but never used"
243
-
244
- summary: "<1-2 sentence human-readable summary>"
245
- ```
246
-
247
- **STATUS reporting:**
248
-
249
- ```
250
- STATUS: DONE — gate PASS or PASS_WITH_WARNINGS, report follows
251
- STATUS: DONE_WITH_CONCERNS — PASS_WITH_WARNINGS with notable warnings
252
- STATUS: BLOCKED — could not run checks (missing tooling, wrong directory)
253
- ```
254
-
255
- > If `gate: FAIL` → STATUS is still `DONE` (the gate result, not the skill's execution). The orchestrator reads `gate: FAIL` and decides to trigger fix.
256
-
257
- ---
258
-
259
- ## Integration with job-orchestrator
260
-
261
- The orchestrator dispatches `code-verifier` at two points:
262
-
263
- **After task-implementer wave (pre-review gate):**
264
- ```
265
- code-verifier:
266
- codebase_path: <worktree_path>
267
- scope: changed
268
- base_branch: <base_branch from JOB_STATE>
269
- → If gate: FAIL → dispatch fix tasks → re-run code-verifier
270
- → If gate: PASS → proceed to review
271
- ```
272
-
273
- **After fix iterations (post-fix gate):**
274
- ```
275
- code-verifier:
276
- codebase_path: <worktree_path>
277
- scope: changed
278
- → If gate still FAIL after 3 iterations → report as BLOCKED, skip to report
279
- → If gate: PASS → proceed to report
280
- ```
281
-
282
- **The orchestrator's internal "checks" step (2.8) is replaced by `code-verifier` dispatch.**
283
-
284
- ---
285
-
286
- ## Standalone Usage
287
-
288
- ```bash
289
- # Run on current directory, changed files only
290
- /code-verifier
291
-
292
- # Run on specific project
293
- /code-verifier --path /path/to/project
294
-
295
- # Full project scan (not just changed files)
296
- /code-verifier --scope full
297
- ```
298
-
299
- ---
300
-
301
- ## Automation Settings
302
-
303
- | Setting | Default | Options | Description |
304
- |---------|---------|---------|-------------|
305
- | `scope` | `changed` | `changed` / `full` | Limit checks to changed files or run full project |
306
- | `fail_on_warnings` | `false` | true/false | Treat ESLint warnings as gate failures |
307
- | `include_circular` | `true` | true/false | Run circular import detection if madge available |
308
- | `max_findings_reported` | `20` | 1-100 | Cap findings in report to avoid overflow |
309
-
310
- ---
311
-
312
- ## Error Handling
313
-
314
- | Error | Action |
315
- |---|---|
316
- | Check command not found | Mark check as `skipped`, continue others |
317
- | Wrong working directory | ABORT with `STATUS: BLOCKED` and directory hint |
318
- | Command times out (>120s) | Mark check as `skipped (timeout)`, continue |
319
- | Zero checks available | `STATUS: BLOCKED` — cannot verify without any tooling |
320
- | Circular import tool missing | Skip silently (not installed in all projects) |
321
-
322
- ---
323
-
324
- ## Rules of Engagement
325
-
326
- 1. **Run ALL checks** — never abort after first failure. The orchestrator needs the full picture.
327
- 2. **Do NOT modify files** — this is read-only verification.
328
- 3. **Scope to changed files** by default — full scans are slow and produce noise.
329
- 4. **Be specific** in findings — include file, line, rule, message. Vague "lint failed" is not actionable.
330
- 5. Return `VERIFICATION_RESULT` as the **final message** to the orchestrator.