@mrciphersmith/keryx 0.2.9

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 (297) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +351 -0
  3. package/dist/cli.js +48427 -0
  4. package/dist/proxy-worker.js +381 -0
  5. package/package.json +63 -0
  6. package/src/gdgraph/affected.test.ts +100 -0
  7. package/src/gdgraph/affected.ts +135 -0
  8. package/src/gdgraph/build-integrity.test.ts +193 -0
  9. package/src/gdgraph/build-lang.test.ts +399 -0
  10. package/src/gdgraph/build.test.ts +120 -0
  11. package/src/gdgraph/build.ts +804 -0
  12. package/src/gdgraph/config.test.ts +47 -0
  13. package/src/gdgraph/config.ts +113 -0
  14. package/src/gdgraph/core-sources.test.ts +99 -0
  15. package/src/gdgraph/core-sources.ts +20 -0
  16. package/src/gdgraph/enrich.ts +79 -0
  17. package/src/gdgraph/fallback.test.ts +153 -0
  18. package/src/gdgraph/find.test.ts +78 -0
  19. package/src/gdgraph/find.ts +107 -0
  20. package/src/gdgraph/pagerank.ts +129 -0
  21. package/src/gdgraph/path.test.ts +56 -0
  22. package/src/gdgraph/path.ts +112 -0
  23. package/src/gdgraph/query.ts +133 -0
  24. package/src/gdgraph/repomap.test.ts +110 -0
  25. package/src/gdgraph/repomap.ts +193 -0
  26. package/src/gdgraph/service.test.ts +59 -0
  27. package/src/gdgraph/service.ts +51 -0
  28. package/src/gdgraph/staleness.ts +20 -0
  29. package/src/gdgraph/symbol.test.ts +89 -0
  30. package/src/gdgraph/symbol.ts +123 -0
  31. package/src/gdgraph/symbols-capability.test.ts +41 -0
  32. package/src/gdgraph/symbols-capability.ts +49 -0
  33. package/src/gdgraph/target.ts +56 -0
  34. package/src/gdgraph/treesitter/adapter.test.ts +249 -0
  35. package/src/gdgraph/treesitter/adapter.ts +213 -0
  36. package/src/gdgraph/treesitter/extract.test.ts +278 -0
  37. package/src/gdgraph/treesitter/extract.ts +389 -0
  38. package/src/gdgraph/treesitter/grammars.ts +110 -0
  39. package/src/gdgraph/treesitter/no-treesitter-import.test.ts +51 -0
  40. package/src/gdgraph/treesitter/resolve-calls.test.ts +38 -0
  41. package/src/gdgraph/types.ts +63 -0
  42. package/src/gdskills/bundled/rules/core/api-contracts.mdc +148 -0
  43. package/src/gdskills/bundled/rules/core/async-patterns.mdc +185 -0
  44. package/src/gdskills/bundled/rules/core/clean-architecture.mdc +163 -0
  45. package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +49 -0
  46. package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +48 -0
  47. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +54 -0
  48. package/src/gdskills/bundled/rules/core/commit-message-formatting.mdc +25 -0
  49. package/src/gdskills/bundled/rules/core/database-patterns.mdc +162 -0
  50. package/src/gdskills/bundled/rules/core/documentation-management.mdc +106 -0
  51. package/src/gdskills/bundled/rules/core/error-handling.mdc +163 -0
  52. package/src/gdskills/bundled/rules/core/execution-metrics.md +99 -0
  53. package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +40 -0
  54. package/src/gdskills/bundled/rules/core/git-rules.mdc +37 -0
  55. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +198 -0
  56. package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +149 -0
  57. package/src/gdskills/bundled/rules/core/implementation-plans.mdc +58 -0
  58. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +221 -0
  59. package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +561 -0
  60. package/src/gdskills/bundled/rules/core/model-selection.mdc +53 -0
  61. package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +50 -0
  62. package/src/gdskills/bundled/rules/core/playwright-testing.mdc +321 -0
  63. package/src/gdskills/bundled/rules/core/requirements-management.mdc +35 -0
  64. package/src/gdskills/bundled/rules/core/requirements-package-standard.mdc +103 -0
  65. package/src/gdskills/bundled/rules/core/review-agent-profile.mdc +49 -0
  66. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +44 -0
  67. package/src/gdskills/bundled/rules/core/rule-management-workflow.mdc +62 -0
  68. package/src/gdskills/bundled/rules/core/security-baseline.mdc +155 -0
  69. package/src/gdskills/bundled/rules/core/shared-definitions.mdc +79 -0
  70. package/src/gdskills/bundled/rules/core/skill-lifecycle.mdc +55 -0
  71. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +88 -0
  72. package/src/gdskills/bundled/rules/core/solid-principles.mdc +149 -0
  73. package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +36 -0
  74. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +107 -0
  75. package/src/gdskills/bundled/rules/core/subagent-status-protocol.md +169 -0
  76. package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +96 -0
  77. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +47 -0
  78. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +55 -0
  79. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +352 -0
  80. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +39 -0
  81. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +29 -0
  82. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +567 -0
  83. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +567 -0
  84. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +655 -0
  85. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +567 -0
  86. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +567 -0
  87. package/src/gdskills/bundled/skills/orchestration/context-collector/input-contract.schema.json +134 -0
  88. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +183 -0
  89. package/src/gdskills/bundled/skills/orchestration/context-collector/output-contract.schema.json +208 -0
  90. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +1412 -0
  91. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +1412 -0
  92. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.detail.md +735 -0
  93. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +468 -0
  94. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +1412 -0
  95. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +1412 -0
  96. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.md +62 -0
  97. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.template.md +79 -0
  98. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/input-contract.schema.json +247 -0
  99. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +362 -0
  100. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/output-contract.schema.json +87 -0
  101. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +105 -0
  102. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +105 -0
  103. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +165 -0
  104. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +379 -0
  105. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +33 -0
  106. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/output-contract.schema.json +41 -0
  107. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +307 -0
  108. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +307 -0
  109. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +373 -0
  110. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +307 -0
  111. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +307 -0
  112. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/input-contract.schema.json +130 -0
  113. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/issue-request.template.md +50 -0
  114. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +155 -0
  115. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/output-contract.schema.json +61 -0
  116. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +365 -0
  117. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +365 -0
  118. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +373 -0
  119. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +365 -0
  120. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +365 -0
  121. package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +55 -0
  122. package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +58 -0
  123. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1701 -0
  124. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1701 -0
  125. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1734 -0
  126. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1701 -0
  127. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1701 -0
  128. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +188 -0
  129. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +179 -0
  130. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +103 -0
  131. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/state.schema.json +164 -0
  132. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +395 -0
  133. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +395 -0
  134. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +556 -0
  135. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +395 -0
  136. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +395 -0
  137. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +204 -0
  138. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +206 -0
  139. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +51 -0
  140. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +111 -0
  141. package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +163 -0
  142. package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +161 -0
  143. package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +128 -0
  144. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +321 -0
  145. package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +166 -0
  146. package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +253 -0
  147. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +46 -0
  148. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +90 -0
  149. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +90 -0
  150. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +90 -0
  151. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +33 -0
  152. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +33 -0
  153. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +190 -0
  154. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +142 -0
  155. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/input-contract.schema.json +31 -0
  156. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/output-contract.schema.json +31 -0
  157. package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +80 -0
  158. package/src/gdskills/bundled/skills/planning/docpack-review/input-contract.schema.json +20 -0
  159. package/src/gdskills/bundled/skills/planning/docpack-review/output-contract.schema.json +36 -0
  160. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +181 -0
  161. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +181 -0
  162. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +187 -0
  163. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +94 -0
  164. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +99 -0
  165. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +99 -0
  166. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +105 -0
  167. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +33 -0
  168. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +33 -0
  169. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +237 -0
  170. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +33 -0
  171. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +33 -0
  172. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +190 -0
  173. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +193 -0
  174. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +193 -0
  175. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +193 -0
  176. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +193 -0
  177. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +193 -0
  178. package/src/gdskills/bundled/skills/planning/prd-creator/input-contract.schema.json +63 -0
  179. package/src/gdskills/bundled/skills/planning/prd-creator/output-contract.schema.json +175 -0
  180. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +31 -0
  181. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +31 -0
  182. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +153 -0
  183. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +32 -0
  184. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +32 -0
  185. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +166 -0
  186. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +44 -0
  187. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +44 -0
  188. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +243 -0
  189. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +43 -0
  190. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +43 -0
  191. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +193 -0
  192. package/src/gdskills/bundled/skills/platform/agent-entrypoint-distiller/SKILL.md +47 -0
  193. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +87 -0
  194. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +87 -0
  195. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +87 -0
  196. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +100 -0
  197. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +100 -0
  198. package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +100 -0
  199. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +45 -0
  200. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +84 -0
  201. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +84 -0
  202. package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +84 -0
  203. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +66 -0
  204. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +66 -0
  205. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +66 -0
  206. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +40 -0
  207. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +66 -0
  208. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +66 -0
  209. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +66 -0
  210. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +45 -0
  211. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +81 -0
  212. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +81 -0
  213. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +81 -0
  214. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +42 -0
  215. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +70 -0
  216. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +70 -0
  217. package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +70 -0
  218. package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +103 -0
  219. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +48 -0
  220. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +83 -0
  221. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +83 -0
  222. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +83 -0
  223. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +75 -0
  224. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +75 -0
  225. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +75 -0
  226. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +364 -0
  227. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +295 -0
  228. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +378 -0
  229. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +364 -0
  230. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +38 -0
  231. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/input-contract.schema.json +53 -0
  232. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/output-contract.schema.json +46 -0
  233. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +52 -0
  234. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +52 -0
  235. package/src/gdskills/bundled/skills/quality/push/SKILL.md +52 -0
  236. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +40 -0
  237. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +61 -0
  238. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +61 -0
  239. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +61 -0
  240. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +30 -0
  241. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +75 -0
  242. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +75 -0
  243. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +75 -0
  244. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +64 -0
  245. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +74 -0
  246. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +339 -0
  247. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +48 -0
  248. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +44 -0
  249. package/src/gdskills/bundled/skills/quality/tests-creator/input-contract.schema.json +121 -0
  250. package/src/gdskills/bundled/skills/quality/tests-creator/output-contract.schema.json +127 -0
  251. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +204 -0
  252. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +204 -0
  253. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +203 -0
  254. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +204 -0
  255. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +204 -0
  256. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +209 -0
  257. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +209 -0
  258. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +208 -0
  259. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +209 -0
  260. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +209 -0
  261. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +263 -0
  262. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +263 -0
  263. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +258 -0
  264. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +263 -0
  265. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +263 -0
  266. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +175 -0
  267. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +175 -0
  268. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +168 -0
  269. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +175 -0
  270. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +175 -0
  271. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +360 -0
  272. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +337 -0
  273. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +477 -0
  274. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +93 -0
  275. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +119 -0
  276. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +595 -0
  277. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +144 -0
  278. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +519 -0
  279. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +323 -0
  280. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +927 -0
  281. package/src/gdskills/bundled/skills/review/review-orchestrator/input-contract.schema.json +153 -0
  282. package/src/gdskills/bundled/skills/review/review-orchestrator/output-contract.schema.json +77 -0
  283. package/src/gdskills/bundled/skills/review/review-orchestrator/review-context.schema.json +389 -0
  284. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +189 -0
  285. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +241 -0
  286. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +344 -0
  287. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +327 -0
  288. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +348 -0
  289. package/src/gdskills/bundled/skills/review/review-strict/SKILL.md +328 -0
  290. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +343 -0
  291. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +134 -0
  292. package/src/gdskills/bundled/skills/shared/git-merge-base.md +33 -0
  293. package/src/gdskills/contracts/agent-event.schema.json +32 -0
  294. package/src/gdskills/contracts/orchestrator-state.schema.json +58 -0
  295. package/src/gdskills/contracts/review-finding.schema.json +59 -0
  296. package/src/gdskills/contracts/subagent-dispatch.schema.json +123 -0
  297. package/src/gdskills/contracts/subagent-result.schema.json +136 -0
@@ -0,0 +1,556 @@
1
+ ---
2
+ name: task-implementer
3
+ description: "Use when implementing a single decomposed task from issue-analyzer end-to-end, or executing autonomous code changes from a JSON task object."
4
+ triggers:
5
+ - "Implement task"
6
+ - "Execute task scenario"
7
+ - "Code this task"
8
+ - "Run task-implementer"
9
+ - "Implement issue task"
10
+ metadata:
11
+ author: "MrCipherSmith"
12
+ version: "1.2.0"
13
+ category: "implementation"
14
+ agent_worthy: true
15
+ license: "MIT"
16
+ compatibility: "cursor,codex,zed,opencode"
17
+ ---
18
+
19
+ # Task Implementer
20
+
21
+ ## Purpose
22
+
23
+ Receives a single atomic task (JSON task object from `issue-analyzer`) and implements it end-to-end. Designed to run autonomously as a sub-agent — no user interaction required. Commits its changes to a shared feature branch managed by the orchestrator.
24
+
25
+ **Input:** JSON task object + workspace context (branch, codebase path, issue number)
26
+ **Output:** JSON result object with implementation status, files modified, verification results
27
+
28
+ ## When to Use
29
+
30
+ - Orchestrator dispatches a task from `issue-analyzer` decomposition
31
+ - Implementing a single atomic code change (new component, store change, API fix, etc.)
32
+ - Fixing review findings dispatched back by orchestrator (`task_type: "fix"`)
33
+
34
+ ## Architecture: 6 Phases
35
+
36
+ ```
37
+ Phase 1: RECEIVE → Parse task input, validate, set up context
38
+ Phase 2: RESEARCH → Deep-read target files, understand module patterns
39
+ Phase 3: PLAN → Decide implementation approach, list file changes
40
+ Phase 4: IMPLEMENT → Write code, tests, stories
41
+ Phase 5: VERIFY → Run lint, type-check, tests
42
+ Phase 6: REPORT → Write result file + emit compact STATUS response
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Workflow
48
+
49
+ ```
50
+ Task Implementer Progress:
51
+ - [ ] Phase 1: Receive and parse task input
52
+ - [ ] Phase 2: Research target files and module patterns
53
+ - [ ] Phase 3: Plan implementation approach
54
+ - [ ] Phase 4: Implement code changes
55
+ - [ ] Phase 5: Verify (lint, type-check, test)
56
+ - [ ] Phase 6: Report results
57
+ ```
58
+
59
+ ### Phase 1: RECEIVE
60
+
61
+ Parse the incoming task and validate all required fields.
62
+
63
+ **1.1 Extract from JSON task object:**
64
+
65
+ ```
66
+ TASK: (from JSON object passed by orchestrator)
67
+ task_id: string, e.g. "task-1"
68
+ task_name: string, e.g. "Add validation to form"
69
+ task_type: string: ui_component|store_logic|service_api|refactoring|fix|mixed
70
+ complexity: string: low|medium|high
71
+ dependencies: array of task_id strings (already satisfied — orchestrator ensures order)
72
+ description: string: what to implement
73
+ target_files: array of file path strings
74
+ acceptance_criteria: array of criterion strings
75
+ context: string: code context, types, signatures
76
+ existing_tests: array of file path strings (may be empty)
77
+ existing_stories: array of file path strings (may be empty)
78
+ module_patterns: string: how similar code is written in this module
79
+ test_case_specs: optional — provided by tests-creator (RED-phase test stubs already committed)
80
+ ```
81
+
82
+ **1.2 Extract from workspace context:**
83
+
84
+ ```
85
+ WORKSPACE:
86
+ codebase_path: absolute path to the repository
87
+ branch: feature branch to work on (already checked out by orchestrator)
88
+ issue_number: GitHub issue number (for commit messages)
89
+ issue_title: issue title (for commit messages)
90
+ ```
91
+
92
+ **1.3 For fix tasks (dispatched from review loop):**
93
+
94
+ ```
95
+ FIX_CONTEXT:
96
+ review_feedback: structured findings from reviewer (file, line, severity, message)
97
+ original_task_id: the task that introduced the issue
98
+ iteration: fix iteration number (1 or 2)
99
+ ```
100
+
101
+ **1.4 Validate:**
102
+ ```
103
+ ASSERT task_id IS NOT EMPTY → otherwise ABORT("Missing task_id")
104
+ ASSERT task_type IN valid_types → otherwise ABORT("Invalid task_type")
105
+ ASSERT target_files IS NOT EMPTY → otherwise ABORT("No target files")
106
+ ASSERT codebase_path EXISTS → otherwise ABORT("Codebase path not found")
107
+ ASSERT branch IS NOT EMPTY → otherwise ABORT("Wrong branch checked out")
108
+ ```
109
+
110
+ **1.5 TDD Check (if `test_case_specs` is present):**
111
+
112
+ If the task object contains `test_case_specs` (provided by `tests-creator`):
113
+ 1. Read each test file listed in `test_case_specs.test_files`
114
+ 2. Run the tests using `test_case_specs.run_command` — confirm they FAIL
115
+ 3. If tests pass already → report `DONE_WITH_CONCERNS` (tests may not be testing the right thing)
116
+ 4. Note: **implementation goal is to make these tests GREEN** — do not rewrite or delete them
117
+
118
+ If `test_case_specs` is absent:
119
+ - The task was not pre-processed by `tests-creator`
120
+ - Write tests as part of Phase 4 (standard mode) following `tdd-workflow.mdc`
121
+
122
+ ### Phase 2: RESEARCH
123
+
124
+ Deep-read the target files and surrounding module to understand patterns.
125
+
126
+ **2.0 Read job context (if available):**
127
+
128
+ If the orchestrator provided `JOB_NAME` and `CONTEXT_PATH`:
129
+ - Read `CONTEXT_PATH` (e.g., `<JOBS_ROOT>/<job-name>/ai/context.md`)
130
+ - Extract relevant sections: library docs, codebase patterns, conventions, best practices
131
+ - Use this context throughout Phase 2-4 to guide implementation decisions
132
+ - If the file does not exist, proceed without it — context is optional
133
+
134
+ **2.0b Verify the project-skill covering the target (see `rules/core/skill-lifecycle.mdc`):**
135
+
136
+ Before you rely on a project-skill's guidance, confirm it still matches the code:
137
+ - `keryx skills route <target_file>` — find the project-skill for this module/entity (if any).
138
+ - If one exists: `keryx skills verify <module>/<skill>` — classifies it `fresh | stale | needs-review | blocked`.
139
+ - If it is **not `fresh`**: do not follow it blindly. Verify each claim against the code you read in Phase 2, and note the drift in `notes` (Phase 6.1) so the orchestrator can trigger `skills learn`.
140
+ - If no skill exists for a non-trivial module you had to reverse-engineer, note that too — it's a candidate for `skills create`.
141
+
142
+ This step is read-only and inline; do not spawn a subagent for it.
143
+
144
+ **2.1 Read all target files:**
145
+ - Read each file from `target_files` in full
146
+ - If a file does not exist yet, note it as "new file to create"
147
+ - Read the `context` field for additional type/signature info
148
+
149
+ **2.2 Read existing tests and stories:**
150
+ - If `existing_tests` is not "none" — read each test file
151
+ - If `existing_stories` is not "none" — read each story file
152
+ - Understand existing test patterns (describe/it structure, mocks, fixtures)
153
+
154
+ **2.3 Read module neighbors:**
155
+ - List sibling files in the same directory as each target file
156
+ - Read 2-3 similar files to understand module patterns (naming, exports, structure)
157
+ - Pay attention to:
158
+ - Import aliases used (e.g., `@components`, `@utils`)
159
+ - Export patterns (named vs default)
160
+ - TypeScript patterns (interfaces vs types, generics usage)
161
+ - Component patterns (observer wrapping, props interface naming)
162
+ - Store patterns (makeObservable(this), explicit decorators, private fields before public fields, thin public @action.bound UI actions, non-mutating public helpers, private API methods, runInAction inside private mutation blocks after await)
163
+
164
+ **2.4 Load relevant rules (from `module_patterns` or by detection):**
165
+
166
+ Based on what you're implementing, load and follow the relevant project rules.
167
+
168
+ **Always load (all task types):**
169
+ - `tdd-workflow.mdc` — red-green-refactor, STATUS: DONE requires passing tests
170
+ - `error-handling.mdc` — Result pattern, no silent failures
171
+ - `solid-principles.mdc` — SRP, OCP, DIP (load for any task that creates new classes/services)
172
+
173
+ **Load by task type:**
174
+
175
+ | Task Type | Additional Rules |
176
+ |-----------|---------------|
177
+ | `ui_component` | `code-style-patterns.mdc`, `frontend-assistant.mdc`, `storybook-guidelines.mdc` |
178
+ | `store_logic` | `code-style-patterns.mdc`, `mobx-store-template.mdc` |
179
+ | `service_api` | `code-style-patterns.mdc`, `nestjs-dto.mdc`, `api-contracts.mdc` |
180
+ | `fix` | Rules based on the files being fixed; always `error-handling.mdc` |
181
+ | `mixed` | All applicable rules above |
182
+
183
+ **Load when detected:**
184
+ - Database/ORM files touched → `database-patterns.mdc`
185
+ - Auth, API keys, user input → `security-baseline.mdc`
186
+ - `async`/`await` or queue code → `async-patterns.mdc`
187
+ - New architectural layers or modules → `clean-architecture.mdc`
188
+
189
+ Rules are located at:
190
+ - OpenCode: `.metaproject/rules/core/<rule>.mdc`
191
+ - Cursor: `.cursor/rules/core/<rule>.mdc`
192
+ - Codex: `.metaproject/rules/core/<rule>.mdc`
193
+
194
+ **Output of Phase 2:** Mental model of the implementation:
195
+ ```
196
+ RESEARCH_SUMMARY:
197
+ target_files_status: [{path, exists: bool, line_count, key_exports}]
198
+ test_pattern: <describe structure, assertion style>
199
+ story_pattern: <Meta/StoryObj, args pattern>
200
+ module_conventions: <naming, imports, exports, TS patterns>
201
+ relevant_rules_loaded: [<rule names>]
202
+ ```
203
+
204
+ ### Phase 3: PLAN
205
+
206
+ Decide the implementation approach. Self-validate — no orchestrator approval needed.
207
+
208
+ **3.1 Create change plan:**
209
+
210
+ For each file to modify or create, plan:
211
+ ```
212
+ CHANGE_PLAN:
213
+ - file: <path>
214
+ action: create | modify | delete
215
+ changes:
216
+ - <description of what to add/change/remove>
217
+ - <description of types/interfaces needed>
218
+ rationale: <why this change is needed>
219
+ ```
220
+
221
+ **3.2 Determine required outputs based on task_type:**
222
+
223
+ | Task Type | Code | Unit Test | Story | Screenshot Test |
224
+ |-----------|------|-----------|-------|-----------------|
225
+ | `ui_component` | Yes | Optional | Yes | Yes (if visual) |
226
+ | `store_logic` | Yes | Yes | No | No |
227
+ | `service_api` | Yes | Yes | No | No |
228
+ | `refactoring` | Yes | Verify existing pass | No | No |
229
+ | `fix` | Yes | Regression test | No | No |
230
+ | `mixed` | Yes | Per layer | Per UI component | Per visual change |
231
+
232
+ **3.3 Self-validation checklist:**
233
+ - [ ] All acceptance criteria are addressable with this plan
234
+ - [ ] No files outside the task's scope are being modified
235
+ - [ ] Changes follow the 3-layer architecture (Service → Store → Component)
236
+ - [ ] TypeScript types are planned (no `any`, proper interfaces)
237
+ - [ ] Imports use project path aliases
238
+ - [ ] Plan is consistent with `module_patterns`
239
+
240
+ ### Phase 4: IMPLEMENT
241
+
242
+ Execute the change plan. Write production-quality code.
243
+
244
+ **4.0 TDD Mode Selection:**
245
+
246
+ - **TDD Mode** (when `test_case_specs` is present): tests already exist and are RED. Skip to writing implementation code that makes them GREEN. Do NOT write new tests — only write code that satisfies the existing stubs.
247
+ - **Standard Mode** (no `test_case_specs`): write tests first (per `tdd-workflow.mdc`), then implementation.
248
+
249
+ **4.1 Implementation order (Standard Mode):**
250
+ 1. Types and interfaces first (shared types, DTOs)
251
+ 2. Write failing tests for each acceptance criterion (RED)
252
+ 3. Service/API layer implementation (make service tests GREEN)
253
+ 4. Store/logic layer implementation (make store tests GREEN)
254
+ 5. Component/UI layer implementation (make component tests GREEN)
255
+ 6. Stories (if needed)
256
+
257
+ **4.1 Implementation order (TDD Mode — test_case_specs provided):**
258
+ 1. Read all test stubs from `test_case_specs.test_files`
259
+ 2. Understand the expected API shape from test assertions
260
+ 3. Implement types/interfaces to satisfy test imports
261
+ 4. Implement code layer by layer until all tests are GREEN
262
+ 5. Stories (if needed)
263
+
264
+ **4.2 Code standards (always follow):**
265
+ - TypeScript strict mode — no `any`, no `as` casts unless justified
266
+ - Use project path aliases for imports (`@components/...`, `@utils/...`)
267
+ - React components: `observer()` wrapping for MobX, named function components
268
+ - MobX stores: `makeObservable(this)` in constructor with explicit decorators, member order `private fields → public fields → constructor → public methods → private methods`, thin public `@action.bound` UI methods, non-mutating public helpers without actions, private API/IO methods, and `runInAction()` in private mutation blocks after every `await`
269
+ - Naming: PascalCase for components/types, camelCase for functions/variables, kebab-case for files
270
+ - Follow existing module patterns discovered in Phase 2
271
+
272
+ **4.3 Test standards:**
273
+ - Unit tests: Vitest with `describe`/`it`, `@testing-library/react` for components
274
+ - Use `data-testid` for test selectors
275
+ - Follow AAA pattern (Arrange, Act, Assert)
276
+ - Mock external dependencies, not internal module logic
277
+
278
+ **4.4 Story standards:**
279
+ - `Meta` + `StoryObj` pattern
280
+ - `args`-based variants
281
+ - `fn()` for action callbacks
282
+ - Cover: default state, edge cases, error states
283
+
284
+ **4.5 Commit after implementation:**
285
+
286
+ Create a conventional commit with the changes:
287
+ ```bash
288
+ git add <modified files>
289
+ git commit -m "<type>(<scope>): <description>
290
+
291
+ refs #<issue_number>
292
+ task: <task_id>"
293
+ ```
294
+
295
+ Commit type mapping:
296
+ | Task Type | Commit Type |
297
+ |-----------|-------------|
298
+ | `ui_component` | `feat` |
299
+ | `store_logic` | `feat` |
300
+ | `service_api` | `feat` |
301
+ | `refactoring` | `refactor` |
302
+ | `fix` | `fix` |
303
+ | `mixed` | `feat` (or `fix` if bug-related) |
304
+
305
+ ### Phase 5: VERIFY
306
+
307
+ Run verification checks appropriate to the task type.
308
+
309
+ **5.1 Always run:**
310
+ ```bash
311
+ npm run lint # ESLint (errors only)
312
+ npm run type-check # tsc --noEmit
313
+ ```
314
+
315
+ **5.2 Run if tests exist:**
316
+ ```bash
317
+ npm test # Vitest run
318
+ ```
319
+
320
+ If tests were created or modified, ensure they pass.
321
+
322
+ **5.3 Run if stories were created (optional, only if build is available):**
323
+ ```bash
324
+ npm run build-storybook # Verify stories compile
325
+ ```
326
+
327
+ **5.4 Handle failures:**
328
+
329
+ | Failure | Action |
330
+ |---------|--------|
331
+ | Lint errors | Fix automatically using `npm run lint:fix:changed`, re-run lint |
332
+ | Type errors | Fix the type errors in code, re-commit |
333
+ | Test failures | Fix failing tests, re-commit |
334
+ | Story build failure | Fix story code, re-commit |
335
+
336
+ Maximum 3 self-fix attempts per verification step.
337
+ **ROLLBACK POLICY**: If implementation fatally fails (e.g. tests still failing after 3 attempts or unresolvable compilation errors), you MUST run `git reset --hard` to clean the worktree before reporting the failure in Phase 6, unless explicitly instructed to leave it dirty.
338
+
339
+ **5.5 Re-commit fixes if any:**
340
+ ```bash
341
+ git add <fixed files>
342
+ git commit -m "fix(<scope>): resolve lint/type/test issues
343
+
344
+ refs #<issue_number>
345
+ task: <task_id>"
346
+ ```
347
+
348
+ ### Phase 6: REPORT
349
+
350
+ Write the full result to a file, then emit a compact STATUS response to the orchestrator.
351
+
352
+ **6.1 Write result file (when `JOB_NAME` is provided):**
353
+
354
+ If the orchestrator provided `JOB_NAME` in the workspace context:
355
+ ```bash
356
+ mkdir -p <JOBS_ROOT>/<JOB_NAME>/results
357
+ ```
358
+ Write full JSON to `<JOBS_ROOT>/<JOB_NAME>/results/<task_id>.json`:
359
+ ```json
360
+ {
361
+ "task_id": "<task_id>",
362
+ "task_name": "<task_name>",
363
+ "task_type": "<task_type>",
364
+ "status": "<success|partial|failed>",
365
+ "description": "<what was implemented>",
366
+ "files_modified": ["src/path/file.ts"],
367
+ "files_created": ["src/path/newfile.ts"],
368
+ "files_deleted": [],
369
+ "commits": ["abc1234", "def5678"],
370
+ "lint_result": "<pass|N errors: details>",
371
+ "type_check_result": "<pass|N errors: details>",
372
+ "test_result": "<pass|N passed, M failed: details|skipped>",
373
+ "story_result": "<pass|build error: details|not applicable>",
374
+ "acceptance_criteria_met": "<all|partial: list of unmet criteria|none>",
375
+ "skill_drift": "<none | stale: <module>/<skill> — <what diverged> | missing: <module> should have a project-skill>",
376
+ "notes": "<any warnings, blockers, or additional context>"
377
+ }
378
+ ```
379
+
380
+ Set `skill_drift` from Phase 2.0b: if the project-skill you used was not `fresh`, or the code you wrote diverged from what a skill documents, name the skill and the divergence. The orchestrator uses this to decide whether to trigger `skills learn` (do NOT run `learn` yourself — it is a mutating step the orchestrator dispatches; see `rules/core/skill-lifecycle.mdc`).
381
+
382
+ If `JOB_NAME` is not provided, skip the file write.
383
+
384
+ **6.2 Emit compact STATUS response:**
385
+
386
+ Return a compact STATUS response following `rules/core/subagent-status-protocol.md`.
387
+ **Do NOT include the full JSON block inline** — the orchestrator reads the result file when it needs details.
388
+ The inline response must contain only: STATUS line + Completed bullets + Files changed + Verification summary.
389
+
390
+ **Status classification:**
391
+ - `success` → `STATUS: DONE`
392
+ - `partial` → `STATUS: DONE_WITH_CONCERNS`
393
+ - `failed` → `STATUS: BLOCKED`
394
+
395
+ ---
396
+
397
+ ## Automation Settings
398
+
399
+ This skill is designed to run fully autonomously. The following settings control behavior:
400
+
401
+ | Setting | Default | Options | Description |
402
+ |---------|---------|---------|-------------|
403
+ | `auto_commit` | `true` | true/false | Automatically commit changes |
404
+ | `verify_lint` | `true` | true/false | Run ESLint after implementation |
405
+ | `verify_types` | `true` | true/false | Run type-check after implementation |
406
+ | `verify_tests` | `true` | true/false | Run tests after implementation |
407
+ | `verify_stories` | `false` | true/false | Build storybook to verify stories |
408
+ | `max_self_fix_attempts` | `3` | 1-5 | Max attempts to fix verification failures |
409
+ | `commit_message_style` | `conventional` | `conventional` | Commit format |
410
+
411
+ ---
412
+
413
+ ## Error Handling
414
+
415
+ | Error | Action |
416
+ |-------|--------|
417
+ | Target file not found (expected to exist) | ABORT with error — dependency task may not have run |
418
+ | Branch mismatch | ABORT — orchestrator must fix branch |
419
+ | Lint fails after max attempts | Report as `partial`, include error details |
420
+ | Type-check fails after max attempts | Report as `partial`, include error details |
421
+ | Tests fail after max attempts | Report as `partial`, include failing test details |
422
+ | Git commit fails (pre-commit hook) | Fix lint-staged issues, retry commit |
423
+ | Acceptance criteria unclear | Implement best interpretation, note in report |
424
+
425
+ ---
426
+
427
+ ## Rules of Engagement
428
+
429
+ 1. **DO NOT** ask the user any questions. All input comes from the task Scenario and workspace context.
430
+ 2. **DO NOT** modify files outside the task's target scope unless absolutely necessary (e.g., shared type file).
431
+ 3. **DO** follow the project's existing code patterns discovered in Phase 2.
432
+ 4. **DO** write TypeScript-strict code — no `any`, no untyped functions.
433
+ 5. **DO** use project path aliases (`@components`, `@utils`, etc.) for imports.
434
+ 6. **DO** wrap React components with `observer()` when they access MobX stores.
435
+ 7. **DO** use `runInAction()` after every `await` in MobX actions.
436
+ 8. **DO** commit with conventional commit format referencing the issue number.
437
+ 9. **DO** verify your work before reporting.
438
+ 10. Return the JSON result object as your **final message** to the orchestrator.
439
+
440
+ ---
441
+
442
+ ## Red Flags — Stop and re-read this skill if you are thinking:
443
+
444
+ | Rationalization | Why it's wrong |
445
+ |---|---|
446
+ | "I'll implement first and verify acceptance criteria later" | Implementing without criteria means you might build the wrong thing correctly |
447
+ | "This is a small change, I don't need to read the context document" | Context documents exist because the task description alone is incomplete by design |
448
+ | "The task description is clear, I don't need to read related files first" | Module patterns and conventions only emerge from reading the actual files, not the description |
449
+ | "I'll report DONE and note the skipped tests as a concern" | Skipped verification is a failed verification — partial is not done |
450
+ | "I understand how this module works from previous tasks" | Each task targets a specific slice; read the files fresh to catch state that has changed |
451
+
452
+ **IRON LAW: READ ALL SPECIFIED FILES AND THE CONTEXT DOCUMENT BEFORE WRITING A SINGLE LINE OF CODE.**
453
+
454
+ ---
455
+
456
+ ## Reporting Results
457
+
458
+ **Rule:** `rules/core/subagent-status-protocol.md`
459
+
460
+ Every final response to the orchestrator MUST begin with `STATUS: <STATUS>`. The full JSON result object is written to a file in Phase 6.1 — the inline response contains only the compact STATUS format. No JSON in the response body.
461
+
462
+ ### Iron Law
463
+
464
+ **STATUS LINE IS MANDATORY — ORCHESTRATOR CANNOT INTERPRET FREE TEXT**
465
+
466
+ ### When to use each status
467
+
468
+ | Status | Use when |
469
+ |--------|----------|
470
+ | `DONE` | All acceptance criteria met, all verifications pass (or pass after self-fix) |
471
+ | `DONE_WITH_CONCERNS` | Task complete but: criteria required interpretation, workaround was used, unexpected discovery, verification passed with warnings |
472
+ | `BLOCKED` | Unresolvable blocker: required file missing after checking, unresolvable type errors after 3 attempts, branch conflict needing orchestrator action |
473
+ | `NEEDS_CONTEXT` | Task input is incomplete: `target_files` empty, `acceptance_criteria` uses undefined terms, `context` field missing required types |
474
+
475
+ ### Correct final response format
476
+
477
+ ```
478
+ STATUS: DONE
479
+
480
+ ## Completed
481
+ - Added validation logic to PipelineStep component
482
+ - Created unit tests covering all 4 acceptance criteria
483
+ - Committed 2 conventional commits
484
+
485
+ ## Files changed
486
+ - src/components/PipelineStep.tsx — added validateStep() method
487
+ - src/components/PipelineStep.test.tsx — new test file, 14 tests
488
+
489
+ ## Verification
490
+ - lint: pass
491
+ - type-check: pass
492
+ - tests: 14 passed, 0 failed
493
+
494
+ Result file: <JOBS_ROOT>/<job-name>/results/task-1.json
495
+ ```
496
+
497
+ For `DONE_WITH_CONCERNS`:
498
+
499
+ ```
500
+ STATUS: DONE_WITH_CONCERNS
501
+
502
+ ## Completed
503
+ - Implemented feature as described
504
+
505
+ ## Files changed
506
+ - src/services/auth.ts — updated token refresh logic
507
+
508
+ ## Verification
509
+ - lint: pass
510
+ - type-check: pass
511
+ - tests: 8 passed, 0 failed
512
+
513
+ ## Concerns for orchestrator
514
+ - The acceptance criterion "support legacy tokens" was ambiguous — implemented support for both v1 and v2 token formats. If only v2 is needed, the v1 branch can be removed.
515
+
516
+ Result file: <JOBS_ROOT>/<job-name>/results/task-2.json
517
+ ```
518
+
519
+ For `BLOCKED`:
520
+
521
+ ```
522
+ STATUS: BLOCKED
523
+
524
+ ## Reason
525
+ src/types/pipeline.ts does not exist and is listed as a dependency. Cannot implement the store layer without the type definitions.
526
+
527
+ ## What I need from orchestrator
528
+ Run task-1 (which creates pipeline.ts) before re-dispatching this task, or provide the type definitions directly.
529
+
530
+ ## Work completed so far
531
+ - (nothing — blocked before implementation could start)
532
+ ```
533
+
534
+ See `rules/core/subagent-status-protocol.md` for full format specification and all four status types.
535
+
536
+ ---
537
+
538
+ ## Job Context Awareness
539
+
540
+ When dispatched by `job-orchestrator`, the prompt MAY include:
541
+
542
+ ```
543
+ JOB_NAME: <job-name>
544
+ CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
545
+ ```
546
+
547
+ If provided, read the context document at the start of Phase 2 (RESEARCH) before reading target files. The context document contains:
548
+ - Library documentation and API references relevant to the task
549
+ - Codebase patterns and conventions discovered during analysis
550
+ - Best practices for the specific libraries and frameworks in use
551
+
552
+ Use this context to:
553
+ - Follow established patterns and conventions
554
+ - Use correct API signatures for libraries
555
+ - Avoid anti-patterns documented in the context
556
+ - Make implementation decisions consistent with the project style