@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,165 @@
1
+ ---
2
+ name: feature-dev
3
+ description: "Use when taking a feature from idea or GitHub issue all the way to a merge-ready PR in one guided workflow."
4
+ triggers:
5
+ - "/feature-dev"
6
+ - "Develop feature"
7
+ - "Build feature"
8
+ - "Implement feature"
9
+ - "Feature from scratch"
10
+ metadata:
11
+ author: "MrCipherSmith"
12
+ version: "2.0.0"
13
+ category: "workflow"
14
+ license: "MIT"
15
+ compatibility: "cursor,codex,zed,opencode,claude"
16
+ ---
17
+
18
+ <SUBAGENT-STOP>
19
+ If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
20
+ This skill is for interactive feature development sessions only.
21
+ Proceed directly with your assigned task.
22
+ </SUBAGENT-STOP>
23
+
24
+ # Feature Development (7-Phase)
25
+
26
+ End-to-end feature development workflow from idea to merge-ready PR.
27
+
28
+ ## Arguments
29
+
30
+ - `/feature-dev <description>` — start from a text description
31
+ - `/feature-dev #<issue>` — start from a GitHub issue
32
+ - `/feature-dev --resume` — resume interrupted feature-dev (checks for existing worktree/branch)
33
+
34
+ ## 8-Phase Architecture
35
+
36
+ > **Rules always loaded:** `tdd-workflow.mdc`, `implementation-doc-mandate.mdc`, `error-handling.mdc`
37
+ > **Sub-agents used:** `tests-creator` (before implement), `code-verifier` (after implement)
38
+
39
+ ### Phase 1: REQUIREMENTS + SPEC
40
+
41
+ 1. Parse input (description or GitHub issue via `gh issue view`)
42
+ 2. Clarify ambiguities — ask the user up to 3 questions max
43
+ 3. Produce the **Implementation Spec** (per `implementation-doc-mandate.mdc`):
44
+ - **What**: feature description in 2-3 sentences
45
+ - **Why**: user value / business reason
46
+ - **Scope**: what's in, what's explicitly out
47
+ - **Acceptance criteria**: testable bullet points
48
+ - **Approach**: which files will change, key design decisions
49
+ - **Test strategy**: framework, which scenarios will be covered
50
+ 4. **Save spec** to `.feature-spec.md` in project root (add to .gitignore if not already)
51
+ 5. **Get user confirmation before proceeding**
52
+
53
+ ### Phase 2: DESIGN
54
+
55
+ 1. Research the codebase:
56
+ - Find related modules via search tools
57
+ - Read neighboring implementations for patterns
58
+ - **Detect test framework** (package.json, existing test files) — needed for tests-creator
59
+ 2. Produce implementation plan:
60
+ - Files to create/modify (with brief description of changes)
61
+ - Dependencies or packages needed
62
+ - Data model changes if any
63
+ - Estimated complexity: S / M / L
64
+ 3. Load relevant rules from `.metaproject/rules/core/` based on what will be built:
65
+ - Always: `tdd-workflow.mdc`, `error-handling.mdc`, `solid-principles.mdc`
66
+ - API/service code: `api-contracts.mdc`, `clean-architecture.mdc`
67
+ - Database: `database-patterns.mdc`
68
+ - Async: `async-patterns.mdc`
69
+ - Security-sensitive: `security-baseline.mdc`
70
+ 4. **Get user confirmation on the plan**
71
+
72
+ ### Phase 3: PREPARE
73
+
74
+ 1. Create a feature branch: `wt switch -c feat/<name>`
75
+ 2. Install any new dependencies
76
+
77
+ ### Phase 4: TESTS-CREATOR (TDD — RED phase)
78
+
79
+ **Run before writing any implementation code.**
80
+
81
+ 1. For each group of acceptance criteria, invoke `tests-creator`:
82
+ - Input: acceptance criteria from Phase 1 spec + target files from Phase 2 plan
83
+ - tests-creator detects framework and generates failing test stubs
84
+ - tests-creator commits the stubs and verifies RED state
85
+ 2. Confirm test stubs are in place and failing before proceeding to Phase 5
86
+
87
+ ### Phase 5: IMPLEMENT (TDD — GREEN phase)
88
+
89
+ 1. Implement changes file by file, following the plan from Phase 2
90
+ 2. Goal: make the failing tests from Phase 4 GREEN
91
+ 3. Follow existing code patterns and loaded rules
92
+ 4. After each file group, run quick inline check: `npx tsc --noEmit` (type errors only)
93
+ 5. Commit with conventional message after each logical chunk
94
+
95
+ ### Phase 6: VERIFY (code-verifier gate)
96
+
97
+ Run `code-verifier` on the full diff:
98
+
99
+ ```
100
+ Invoke: skills/code-verifier/SKILL.md
101
+ Input: codebase_path=<project_root>, scope=changed, base_branch=<base>
102
+ ```
103
+
104
+ - `gate: PASS` → proceed to Phase 7
105
+ - `gate: FAIL` → fix findings, re-run code-verifier (max 2 cycles)
106
+ - Still FAIL after 2 cycles → report blocker to user, stop
107
+
108
+ ### Phase 7: REVIEW (Self)
109
+
110
+ 1. Launch `code-review` skill on own changes (if available)
111
+ 2. Or run a focused self-review:
112
+ - `git diff main...HEAD` — review the full diff
113
+ - Check for: TODOs left behind, console.logs, hardcoded values
114
+ - Verify all acceptance criteria from Phase 1 spec
115
+ 3. Fix any findings (max 2 review-fix cycles)
116
+ 4. Re-run `code-verifier` after any fixes
117
+
118
+ ### Phase 8: DELIVER + CHANGE REPORT
119
+
120
+ 1. Push branch
121
+ 2. Create PR:
122
+ - Link to issue if applicable
123
+ - Include acceptance criteria checklist
124
+ - Add test plan and code-verifier results
125
+ 3. **Produce Change Report** (per `implementation-doc-mandate.mdc`):
126
+ - Files created/modified with descriptions
127
+ - Test count and results
128
+ - code-verifier gate result
129
+ - Acceptance criteria checklist (checked off)
130
+ - Commits list
131
+ 4. Print Change Report to user
132
+ 5. Report PR URL to user
133
+
134
+ ## Status Updates
135
+
136
+ At each phase transition, report progress:
137
+ ```
138
+ ✅ Phase 1: Requirements confirmed
139
+ 🔄 Phase 2: Designing implementation...
140
+ ```
141
+
142
+ ## Rules
143
+
144
+ - ALWAYS get user confirmation after Phase 1 (requirements + spec) and Phase 2 (design)
145
+ - Phases 4-7 are autonomous — no user interaction needed
146
+ - If stuck for >3 attempts on any step, report the blocker and ask user
147
+ - NEVER skip Phase 4 (tests-creator) even if user says "skip tests" — this is TDD, not optional testing
148
+ - NEVER skip Phase 6 (code-verifier) — it is the quality gate, not a suggestion
149
+ - NEVER commit broken code (code-verifier gate must pass before PR)
150
+ - Keep commits atomic: one commit per logical chunk, not one giant commit
151
+ - ALWAYS produce the Change Report in Phase 8 — even if the PR was not created
152
+
153
+ ## Red Flags — Stop and re-read this skill if you are thinking:
154
+
155
+ | Rationalization | Why it's wrong |
156
+ |---|---|
157
+ | "Requirements are clear enough, I'll skip the design phase" | Skipping design means discovering mismatches after code is written, not before |
158
+ | "The user already approved this approach verbally, no need to document" | Undocumented approval is invisible to reviewers and future agents; it doesn't exist |
159
+ | "Tests can be written after — implementation first to check if the approach works" | Writing tests after implementation makes you test what you built, not what was required |
160
+ | "This phase isn't needed for such a straightforward feature" | Every skipped phase is a deferred bug report |
161
+ | "I understand the requirements, confirmation is just a formality" | The confirmation step exists to catch the gap between what you understood and what was meant |
162
+
163
+ **IRON LAW 1: NEVER START IMPLEMENTING BEFORE THE SPEC IS WRITTEN AND CONFIRMED.**
164
+ **IRON LAW 2: NEVER WRITE IMPLEMENTATION CODE BEFORE TESTS-CREATOR HAS GENERATED FAILING STUBS.**
165
+ **IRON LAW 3: NEVER DELIVER WITHOUT A PASSING CODE-VERIFIER GATE AND A CHANGE REPORT.**
@@ -0,0 +1,379 @@
1
+ ---
2
+ name: flow-orchestrator
3
+ description: "Use when Task Manager is enabled and a non-trivial feature, issue, or story should be driven through keryx flow from initialization to a user-selected completion, verified handoff, or open state."
4
+ triggers:
5
+ - "создай flow"
6
+ - "создай фло"
7
+ - "заведи стори"
8
+ - "implement with flow"
9
+ - "issue to flow"
10
+ - "task manager orchestration"
11
+ - "flow orchestration"
12
+ - "managed implementation"
13
+ metadata:
14
+ author: "MrCipherSmith"
15
+ version: "1.2.0"
16
+ category: "orchestration"
17
+ license: "MIT"
18
+ compatibility: "cursor,codex,zed,opencode,claude"
19
+ ---
20
+
21
+ # Flow Orchestrator
22
+
23
+ ## Purpose
24
+
25
+ Flow Orchestrator is the Task Manager-aware implementation orchestrator.
26
+ It wraps the existing gdskills pipeline with `keryx flow` state.
27
+
28
+ Use this skill instead of `job-orchestrator` when the user wants a managed
29
+ story/issue lifecycle with frozen acceptance criteria, task state, an explicit
30
+ completion choice, Code Health, and a durable flow package in
31
+ `.metaproject/flows/`.
32
+
33
+ Do not modify `job-orchestrator` or `task-implementer` behavior. They remain
34
+ usable without Task Manager. This skill coordinates them through flow state.
35
+
36
+ ## Hard Preconditions
37
+
38
+ 1. Read `.metaproject/index.md` and `.metaproject/metaproject.json`.
39
+ 2. Confirm Task Manager is enabled:
40
+ - `.metaproject/metaproject.json` must contain `modules.tasks.enabled: true`;
41
+ - `.metaproject/skills/flow/SKILL.md` should exist.
42
+ 3. If Task Manager is not enabled, stop and tell the user to run:
43
+
44
+ ```bash
45
+ keryx update
46
+ ```
47
+
48
+ or initialize with the Task Manager module enabled. Do not emulate flow state by
49
+ hand.
50
+
51
+ ## Source Of Truth
52
+
53
+ Flow state lives in `.metaproject/flows/<flow-id>/`.
54
+
55
+ CLI-owned files:
56
+
57
+ - `flow.json` - never edit by hand.
58
+ - status transitions - only through `keryx flow ...`.
59
+ - task status - only through `keryx flow task done ...`.
60
+ - frozen acceptance criteria changes - only through
61
+ `keryx flow ac update <id> --reason "<why>"`.
62
+
63
+ Agent-editable files:
64
+
65
+ - `description.md`
66
+ - `context.md`
67
+ - `plan.md`
68
+ - `tasks.md` for task definitions only
69
+ - `journal.md`
70
+
71
+ ## Lifecycle
72
+
73
+ ```mermaid
74
+ flowchart TD
75
+ A["User issue / feature request"] --> B["flow-orchestrator"]
76
+ B --> C["keryx flow init"]
77
+ C --> D["flow-init context enrichment"]
78
+ D --> E["freeze AC + start flow"]
79
+ E --> F["dispatch tests-creator / task-implementer"]
80
+ F --> G["code-verifier + review-orchestrator"]
81
+ G --> H{"All tasks, checks, review OK?"}
82
+ H -- "no" --> F
83
+ H -- "yes" --> I{"Ask user how to finish"}
84
+ I -- "draft PR" --> J["create or confirm draft PR"]
85
+ J --> K["keryx flow implemented --pr"]
86
+ K --> L["confirm AC evidence"]
87
+ L --> M["keryx flow complete"]
88
+ I -- "verified handoff" --> N["report completion; keep flow in-progress"]
89
+ I -- "keep open" --> O["journal next steps; keep flow in-progress"]
90
+ ```
91
+
92
+ ## Phase 0: Route And Resume
93
+
94
+ 1. Run `keryx flow list`.
95
+ 2. If an active flow obviously matches the user request, use it.
96
+ 3. If multiple active flows could match, ask one concise question.
97
+ 4. If no flow exists and the request is multi-step, create one:
98
+
99
+ ```bash
100
+ keryx flow init --issue <url>
101
+ ```
102
+
103
+ or:
104
+
105
+ ```bash
106
+ keryx flow init --title "<short formalized problem>"
107
+ ```
108
+
109
+ 5. Run `keryx flow status <id>` and read the flow package.
110
+
111
+ ## Phase 1: Initialize The Flow Package
112
+
113
+ Use `.metaproject/skills/flow/init.md` as the local flow-init procedure.
114
+
115
+ Required context sources:
116
+
117
+ - gdgraph for impacted files and dependency relationships;
118
+ - gdctx for compact command/search/diff output;
119
+ - gdwiki for architecture, domain rules, business behavior and decisions;
120
+ - memory for lessons learned, repeated failures and historical constraints;
121
+ - health/testing reports for baseline risk.
122
+
123
+ Required rules:
124
+
125
+ - `.metaproject/rules/core/requirements-management.mdc`
126
+ - `.metaproject/rules/core/implementation-plans.mdc`
127
+ - `.metaproject/rules/core/subagent-context-construction.md`
128
+ - `.metaproject/rules/core/subagent-status-protocol.md`
129
+ - `.metaproject/rules/core/tdd-workflow.mdc`
130
+ - `.metaproject/rules/core/code-style-patterns.mdc`
131
+ - `.metaproject/rules/core/error-handling.mdc`
132
+ - `.metaproject/rules/core/implementation-doc-mandate.mdc`
133
+ - `.metaproject/rules/core/execution-metrics.md`
134
+
135
+ Execution metrics (opt-in): when a USER runs this orchestrator directly, at the
136
+ start ask "Collect execution statistics for this run? (yes/no)" per
137
+ `rules/core/execution-metrics.md`. If yes, append the `## Execution Metrics`
138
+ section at the end and save it under the flow dir (`<flow-dir>/metrics/`). Never
139
+ ask or emit it when dispatched as a subagent.
140
+
141
+ Write or update:
142
+
143
+ - `description.md` - problem, expected outcome, out of scope;
144
+ - `context.md` - compact links and findings, not raw dumps;
145
+ - `plan.md` - chosen approach and trade-offs;
146
+ - `tasks.md` - task definitions grouped by context, test, implement, review, docs;
147
+ - `acceptance-criteria.md` - verifiable `ACn` criteria.
148
+
149
+ ### A verification step in the plan is a task, not a sentence
150
+
151
+ Every check the plan says must happen before the work is accepted - run the
152
+ thing end to end, confirm two components agree, exercise the path no test
153
+ covers - is added with `keryx flow task add` and closed with
154
+ `keryx flow task done`. Prose in `plan.md` blocks nothing, and an
155
+ orchestrator that wrote the step is the same one deciding whether to run it.
156
+
157
+ The failure this prevents is specific and has happened: a plan listed
158
+ "confirm both components agree on the same input" as step 5, the
159
+ implementation shipped without it, and review found that the two did not
160
+ agree at all - the change could not work in production. The check had been
161
+ identified correctly and then skipped, because nothing made skipping it
162
+ visible.
163
+
164
+ Tasks are the mechanism that already exists for this: `flow complete` gates
165
+ on them, so an unrun verification step keeps the flow open instead of being
166
+ quietly dropped.
167
+
168
+ Then freeze and start:
169
+
170
+ ```bash
171
+ keryx flow freeze <id>
172
+ keryx flow start <id>
173
+ ```
174
+
175
+ ## Phase 2: Execute Tasks
176
+
177
+ Use existing gdskills as workers. Do not duplicate their internal workflows.
178
+
179
+ Recommended worker routing:
180
+
181
+ | Flow task kind | Worker skill |
182
+ |---|---|
183
+ | `context` | `context-collector` |
184
+ | `test` | `tests-creator` or `test-gen` |
185
+ | `implement` | `task-implementer` |
186
+ | `review` | `review-orchestrator` |
187
+ | `docs` | `job-documenter`, `prd-creator`, or documentation-specific project skill |
188
+
189
+ ### Worker communication is schema-governed
190
+
191
+ Workers do not inherit session state; every dispatch is constructed explicitly
192
+ (`.metaproject/rules/core/subagent-context-construction.md`). Each dispatch is a
193
+ `subagent-dispatch` object
194
+ (`.metaproject/core/gdskills/contracts/subagent-dispatch.schema.json`) and each
195
+ worker reply is a `subagent-result` object
196
+ (`.metaproject/core/gdskills/contracts/subagent-result.schema.json`) whose first
197
+ line is `STATUS: <status>`
198
+ (`.metaproject/rules/core/subagent-status-protocol.md`).
199
+
200
+ Dispatch payload, bound to the flow (map `target_skill` from the routing table):
201
+
202
+ ```json
203
+ {
204
+ "contract_version": "1.0.0",
205
+ "run_id": "<flow-id>",
206
+ "dispatch_id": "<flow-id>-<Tn>",
207
+ "orchestrator": "flow-orchestrator",
208
+ "target_skill": "task-implementer",
209
+ "task": { "title": "<Tn title>", "description": "<what to do>", "intent": "implement" },
210
+ "acceptance_criteria": ["<the frozen ACn lines this task must satisfy>"],
211
+ "context_refs": [
212
+ { "path": ".metaproject/flows/<dir>/context.md", "kind": "context", "exists": true },
213
+ { "path": ".metaproject/flows/<dir>/plan.md", "kind": "plan", "exists": true },
214
+ { "path": ".metaproject/flows/<dir>/acceptance-criteria.md", "kind": "custom", "exists": true }
215
+ ],
216
+ "files_to_read": ["<only files gdgraph/gdctx narrowed to>"],
217
+ "constraints": [
218
+ "Never edit flow.json.",
219
+ "Never edit frozen acceptance criteria.",
220
+ "Return a subagent-result; first line must be STATUS:."
221
+ ],
222
+ "allowed_actions": ["read", "write", "run-command", "git"],
223
+ "output_contract": { "schema": "subagent-result", "artifact_path": ".metaproject/flows/<dir>/journal.md" },
224
+ "budget": { "max_output_tokens": null },
225
+ "provenance": { "created_at": "<iso-utc>", "created_by": "flow-orchestrator" }
226
+ }
227
+ ```
228
+
229
+ After a worker succeeds, the flow-orchestrator marks task progress:
230
+
231
+ ```bash
232
+ keryx flow task done <id> <Tn>
233
+ ```
234
+
235
+ If new work is discovered:
236
+
237
+ ```bash
238
+ keryx flow task add <id> --title "<task>" --kind <kind>
239
+ ```
240
+
241
+ ### Interpreting worker results (STATUS protocol)
242
+
243
+ Read the worker's `STATUS:` line first; never infer the outcome from prose. A
244
+ reply with no `STATUS:` line is treated as `NEEDS_CONTEXT` — re-request one
245
+ properly formatted `subagent-result`.
246
+
247
+ | Worker `status` | flow-orchestrator action |
248
+ |---|---|
249
+ | `DONE` | Accept. `keryx flow task done <id> <Tn>`. Continue. |
250
+ | `DONE_WITH_CONCERNS` | Accept, record every concern in `journal.md`, decide continue vs. add a fix task, then `flow task done`. Never silently drop concerns. |
251
+ | `NEEDS_CONTEXT` | Do not fail. Enrich `context_refs`/`files_to_read` from gdgraph/gdctx/wiki/memory, then re-dispatch the same `dispatch_id`. |
252
+ | `BLOCKED` | `keryx flow block <id> --reason "<worker reason>"`; resolve or escalate one concise question, then `flow unblock` and re-dispatch. |
253
+ | `FAILED` | Retry once with the same dispatch. If it fails again, block the flow and surface the error to the user. |
254
+
255
+ Carry `run_id`/`dispatch_id` across retries so the flow journal stays traceable.
256
+
257
+ ## Phase 3: Verification And Review
258
+
259
+ Before accepting implementation:
260
+
261
+ 1. Run focused tests for touched scope.
262
+ 2. Run `code-verifier`.
263
+ 3. Run `keryx health run` when Code Health is enabled.
264
+ 4. Run `review-orchestrator` with relevant domains.
265
+ 5. If findings require code changes, dispatch fix work through `task-implementer`
266
+ and record the fix task in the flow.
267
+ 6. Close the skill-learning loop (see `rules/core/skill-lifecycle.mdc`). Collect
268
+ the `skill_drift` fields from task-implementer results and the
269
+ `## Skill Learning` block from review-orchestrator. For each flagged
270
+ project-skill, dispatch a subagent — on a cheaper / non-flagship model if one
271
+ is available (`.metaproject/scripts/detect-models.sh`; see
272
+ `rules/core/model-selection.mdc`), otherwise the session model — to run
273
+ `keryx skills learn --from-review <report> --skill <m>/<s>` and return the
274
+ proposal. Then read the proposal and `skills learn apply` it, or discard it.
275
+ Never apply unread; never put `learn` in a hook.
276
+
277
+ The implementer never self-accepts. Only flow-orchestrator decides whether the
278
+ flow can move to `implemented`. Record any applied skill updates in the
279
+ completion report.
280
+
281
+ ## Phase 4: Completion Choice
282
+
283
+ When tasks, verification and review are complete:
284
+
285
+ 1. Stop before creating a PR or changing the flow to `implemented`.
286
+ 2. Ask the user how to finish. Do not infer that every flow needs a PR:
287
+
288
+ ```text
289
+ How should this flow end?
290
+
291
+ A) Create a draft PR and complete the managed flow
292
+ B) Finish with a verified handoff and no PR
293
+ C) Keep the flow open for more work
294
+
295
+ > pick a letter (no default; wait for the user)
296
+ ```
297
+
298
+ 3. Follow the selected outcome:
299
+
300
+ - **A - Draft PR:** create or confirm a draft PR in the author's name, then
301
+ record it through the CLI:
302
+
303
+ ```bash
304
+ keryx flow implemented <id> --pr <draft-pr-url>
305
+ ```
306
+
307
+ - **B - Verified handoff without PR:** do not create a PR and do not run
308
+ `keryx flow implemented` or `keryx flow complete`. Produce the completion
309
+ report with verification and acceptance-criteria evidence, record that the
310
+ implementation work is finished, and leave the Task Manager flow
311
+ `in-progress`. Explain that the current CLI requires a recorded PR before it
312
+ can transition the flow to `done`.
313
+ - **C - Keep open:** record remaining or deferred work in `journal.md`, report
314
+ the current verification state, and leave the flow `in-progress` for resume.
315
+
316
+ Only continue to Phase 5 after the user selects A and the draft PR is recorded.
317
+
318
+ ## Phase 5: Complete The Flow
319
+
320
+ Use `.metaproject/skills/flow/complete.md`.
321
+
322
+ For every acceptance criterion, verify evidence and confirm:
323
+
324
+ ```bash
325
+ keryx flow ac confirm <id> ACn --note "<evidence>"
326
+ ```
327
+
328
+ Then run:
329
+
330
+ ```bash
331
+ keryx flow complete <id>
332
+ ```
333
+
334
+ If gates fail, the CLI returns the flow to `in-progress`. Add a journal note,
335
+ create fix tasks, and repeat Phase 2.
336
+
337
+ ## Completion Report
338
+
339
+ Finish with:
340
+
341
+ - flow id and final status;
342
+ - selected completion outcome;
343
+ - PR URL when a PR was created;
344
+ - tasks completed;
345
+ - acceptance criteria evidence summary;
346
+ - verification/review results;
347
+ - unresolved risks or blocked gates.
348
+
349
+ For a verified handoff without PR, distinguish "implementation work finished"
350
+ from Task Manager status `done`: report the flow as `in-progress` and explain
351
+ why it was intentionally not transitioned.
352
+
353
+ ## Contracts
354
+
355
+ flow-orchestrator communicates through explicit schemas, not free prose:
356
+
357
+ | Direction | Schema |
358
+ |---|---|
359
+ | Skill input | `skills/gdskills/orchestration/flow-orchestrator/input-contract.schema.json` |
360
+ | Skill output | `skills/gdskills/orchestration/flow-orchestrator/output-contract.schema.json` |
361
+ | Worker dispatch | `core/gdskills/contracts/subagent-dispatch.schema.json` |
362
+ | Worker result | `core/gdskills/contracts/subagent-result.schema.json` |
363
+ | Durable flow state | `.metaproject/flows/<id>/flow.json` (CLI-owned; never agent-written) |
364
+
365
+ Validate a concrete worker message before trusting it:
366
+
367
+ ```bash
368
+ keryx skills contracts validate <file> --schema subagent-dispatch
369
+ keryx skills contracts validate <file> --schema subagent-result
370
+ ```
371
+
372
+ ## Boundaries
373
+
374
+ - Do not replace `job-orchestrator`. This is the Task Manager variant.
375
+ - Do not bypass the flow CLI for state changes.
376
+ - Do not let `task-implementer` edit `flow.json`, frozen AC, or decide
377
+ completion.
378
+ - Do not read broad source trees when gdgraph/gdctx/wiki/memory can first
379
+ narrow context.
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://keryx.local/schemas/flow-orchestrator/input-contract.schema.json",
4
+ "title": "FlowOrchestratorInput",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["request"],
8
+ "properties": {
9
+ "request": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "User request, issue URL, feature description, or active flow instruction."
13
+ },
14
+ "flow_id": {
15
+ "type": "string",
16
+ "description": "Optional existing flow id, slug, or directory name."
17
+ },
18
+ "issue_url": {
19
+ "type": "string",
20
+ "description": "Optional GitHub issue URL used to initialize a new flow."
21
+ },
22
+ "mode": {
23
+ "type": "string",
24
+ "enum": ["init", "execute", "complete", "resume", "auto"],
25
+ "default": "auto"
26
+ },
27
+ "constraints": {
28
+ "type": "array",
29
+ "items": { "type": "string" },
30
+ "default": []
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://keryx.local/schemas/flow-orchestrator/output-contract.schema.json",
4
+ "title": "FlowOrchestratorOutput",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["status", "flow_id", "summary"],
8
+ "properties": {
9
+ "status": {
10
+ "type": "string",
11
+ "enum": ["initialized", "in_progress", "implemented", "done", "blocked", "failed"]
12
+ },
13
+ "flow_id": {
14
+ "type": "string"
15
+ },
16
+ "flow_dir": {
17
+ "type": "string"
18
+ },
19
+ "pr_url": {
20
+ "type": ["string", "null"]
21
+ },
22
+ "completed_tasks": {
23
+ "type": "array",
24
+ "items": { "type": "string" },
25
+ "default": []
26
+ },
27
+ "verification": {
28
+ "type": "array",
29
+ "items": { "type": "string" },
30
+ "default": []
31
+ },
32
+ "risks": {
33
+ "type": "array",
34
+ "items": { "type": "string" },
35
+ "default": []
36
+ },
37
+ "summary": {
38
+ "type": "string"
39
+ }
40
+ }
41
+ }