@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,655 @@
1
+ ---
2
+ name: context-collector
3
+ description: "Use when a job needs a unified context document — gathering docs, libraries, and references for sub-agents before execution."
4
+ triggers:
5
+ - "Collect context"
6
+ - "Build context"
7
+ - "Gather context"
8
+ - "Update context"
9
+ - "Refresh context"
10
+ - "Context for job"
11
+ - "Research context"
12
+ metadata:
13
+ author: "MrCipherSmith"
14
+ version: "1.1.0"
15
+ category: "context"
16
+ agent_worthy: true
17
+ license: "MIT"
18
+ compatibility: "cursor,codex,zed,opencode"
19
+ ---
20
+
21
+ <SUBAGENT-STOP>
22
+ If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
23
+ This skill is for orchestrators and interactive session-level routing only.
24
+ Proceed directly with your assigned task.
25
+ </SUBAGENT-STOP>
26
+
27
+ # Context Collector
28
+
29
+ ## Purpose
30
+
31
+ Collects and maintains a **unified context document** for a job. The context document is a curated, focused summary that all sub-agents can reference — it eliminates redundant research and ensures consistent understanding of the task across the entire job pipeline.
32
+
33
+ **Key responsibilities:**
34
+ 1. Gather relevant local documentation (`docs/`, `jobs/`, `rules/core/`)
35
+ 2. Identify libraries, patterns, and references used in the task area
36
+ 3. Fetch external documentation (library docs, API references, best practices) via web
37
+ 4. Extract and summarize only what is relevant to the specific task
38
+ 5. Assemble everything into a single `context.md` document
39
+ 6. Keep the context document up-to-date as the job evolves (version-tracked updates)
40
+
41
+ **Input:** Task description + job name + project path (from orchestrator or user)
42
+ **Output:** `context.md` document in `.metaproject/jobs/<job-name>/ai/` and `.metaproject/jobs/<job-name>/man/`, documented via `job-documenter`
43
+
44
+ ## When to Use
45
+
46
+ - Called by `job-orchestrator` as an early plan step (after analysis, before implementation)
47
+ - Called directly by user when they need a research/context document for a task
48
+ - Called again during a job when additional context is needed (e.g., new library discovered during implementation)
49
+ - When any sub-agent reports missing context or encounters unfamiliar patterns
50
+
51
+ ## Architecture: 5 Phases
52
+
53
+ ```
54
+ Phase 1: RECEIVE -> Parse input, determine scope and focus areas
55
+ Phase 2: LOCAL -> Scan local docs, jobs, rules, codebase for relevant context
56
+ Phase 3: EXTERNAL -> Fetch external docs for libraries, APIs, best practices
57
+ Phase 4: SYNTHESIZE -> Merge all findings into a single context document
58
+ Phase 5: DOCUMENT -> Save via job-documenter, return result
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Input Contract
64
+
65
+ ### When called by orchestrator:
66
+
67
+ ```
68
+ ACTION: collect | update
69
+ JOB_NAME: <kebab-case job folder name>
70
+ JOBS_ROOT: <JOBS_ROOT>
71
+ PROJECT_DIR: <absolute path to project directory>
72
+
73
+ DATA:
74
+ TASK_DESCRIPTION: <what the job is about — from issue, user request, or analysis>
75
+ FOCUS_AREAS: <optional — specific areas to focus on, e.g. "MobX stores", "pipeline validation">
76
+ ANALYSIS_RESULT: <optional — output from issue-analyzer, if available>
77
+ KNOWN_LIBRARIES: <optional — libraries already identified>
78
+ UPDATE_REASON: <required for ACTION=update — why context needs refreshing>
79
+ ```
80
+
81
+ ### When called directly by user:
82
+
83
+ The agent should ask for:
84
+ 1. **What is the task?** — description of what needs to be done
85
+ 2. **Project directory** — which project to analyze
86
+ 3. **Job name** — if context should be saved to a job folder (optional for standalone use)
87
+ 4. **Focus areas** — any specific libraries, patterns, or areas to prioritize
88
+
89
+ ---
90
+
91
+ ## Phase 1: RECEIVE
92
+
93
+ ### 1.1 Parse Input
94
+
95
+ Extract the scope from the input:
96
+
97
+ ```
98
+ SCOPE:
99
+ task_description: <what we're building/fixing/analyzing>
100
+ focus_areas: [<specific areas to research>]
101
+ project_dir: <project path>
102
+ job_name: <job folder name, if any>
103
+ action: collect | update
104
+ analysis_available: <bool — was analysis result provided?>
105
+ ```
106
+
107
+ ### 1.2 Determine Research Targets
108
+
109
+ From the task description and focus areas, build a research plan:
110
+
111
+ ```
112
+ RESEARCH_PLAN:
113
+ local_targets:
114
+ - docs: [<relevant doc topics to look for>]
115
+ - rules: [<relevant rules to check>]
116
+ - jobs: [<previous related jobs to reference>]
117
+ - code: [<codebase areas to examine for patterns>]
118
+ external_targets:
119
+ - libraries: [<npm packages / libraries to document>]
120
+ - apis: [<API references to fetch>]
121
+ - best_practices: [<patterns / approaches to research>]
122
+ ```
123
+
124
+ ### 1.3 For ACTION=update
125
+
126
+ If this is an update:
127
+ 1. Read the existing `context.md` from `.metaproject/jobs/<JOB_NAME>/ai/context.md`
128
+ 2. Identify what sections need refreshing based on UPDATE_REASON
129
+ 3. Preserve unchanged sections, only update/add relevant ones
130
+ 4. Increment version in metadata
131
+
132
+ ---
133
+
134
+ ## Phase 2: LOCAL
135
+
136
+ Scan local sources for relevant context. Be selective — only include what is directly relevant to the task.
137
+
138
+ ### 2.1 Documentation (`<DOCS_ROOT>/`)
139
+
140
+ ```
141
+ 1. List available docs:
142
+ - Glob: docs/**/*.md
143
+
144
+ 2. For each doc, check title and first 20 lines for relevance to task_description
145
+
146
+ 3. For relevant docs:
147
+ - Read full content
148
+ - Extract: key decisions, constraints, architecture patterns, requirements
149
+ - Summarize: 3-5 bullet points per doc, only task-relevant info
150
+ ```
151
+
152
+ ### 2.2 Previous Jobs (`<JOBS_ROOT>/`)
153
+
154
+ ```
155
+ 1. List existing job folders:
156
+ - Read each jobs/*/README.md — check if related to current task
157
+
158
+ 2. For related jobs:
159
+ - Read their context.md (if exists) — reuse applicable context
160
+ - Read their analysis.md — extract relevant patterns or decisions
161
+ - Note: "Previous job <name> addressed <related topic>"
162
+ ```
163
+
164
+ ### 2.3 Rules (`<PROJECT_DIR>/rules/core/` or repo rules path)
165
+
166
+ ```
167
+ 1. Based on focus_areas and task_description, identify applicable rules:
168
+
169
+ | Focus Area | Relevant Rules |
170
+ |------------|---------------|
171
+ | React components | code-style-patterns.mdc, frontend-assistant.mdc, storybook-guidelines.mdc |
172
+ | MobX stores | code-style-patterns.mdc, mobx-store-template.mdc |
173
+ | API / DTOs | nestjs-dto.mdc, code-style-patterns.mdc, api-contracts.mdc |
174
+ | Testing | playwright-testing.mdc, storybook-guidelines.mdc, tdd-workflow.mdc |
175
+ | General code | code-style-patterns.mdc, frontend-assistant.mdc |
176
+ | TDD / test-first | tdd-workflow.mdc |
177
+ | Architecture / layers | clean-architecture.mdc, solid-principles.mdc |
178
+ | Error handling | error-handling.mdc |
179
+ | Database / ORM | database-patterns.mdc |
180
+ | Security | security-baseline.mdc |
181
+ | Async code | async-patterns.mdc |
182
+
183
+ 2. Read each applicable rule
184
+ 3. Extract: specific conventions, required patterns, prohibited practices
185
+ 4. Summarize: only the rules that directly apply to this task
186
+ ```
187
+
188
+ ### 2.4 Codebase Patterns (`PROJECT_DIR`)
189
+
190
+ ```
191
+ 1. Based on analysis_result (if available) or focus_areas:
192
+ - Identify 2-3 files that are similar to what we're building/changing
193
+ - Read them to extract patterns:
194
+ * Import conventions (aliases, ordering)
195
+ * Component structure (observer wrapping, props naming)
196
+ * Store patterns (makeObservable(this), explicit decorators, thin @action.bound public actions, private API/IO methods, runInAction)
197
+ * Test patterns (describe/it, mocks, fixtures)
198
+ * File naming and organization
199
+
200
+ 2. Summarize as "Codebase Conventions":
201
+ - How similar code is structured in this project
202
+ - Key patterns to follow for consistency
203
+ ```
204
+
205
+ ### 2.5 Test Framework Detection (`PROJECT_DIR`)
206
+
207
+ Always detect the test framework — `tests-creator` and `task-implementer` both need this.
208
+
209
+ ```
210
+ 1. Read package.json:
211
+ - Check "dependencies" and "devDependencies" for:
212
+ vitest, jest, @jest/*, mocha, jasmine, bun:test, pytest, go test
213
+
214
+ 2. Check for config files:
215
+ - vitest.config.ts / vitest.config.js
216
+ - jest.config.ts / jest.config.js
217
+ - .mocharc.* / mocha.opts
218
+
219
+ 3. Read 2-3 existing test files (*.test.ts, *.spec.ts, test_*.py):
220
+ - Import style (global vs explicit import)
221
+ - Describe/it/test nesting depth
222
+ - Assertion style (expect().toBe vs assert.equal)
223
+ - Mock library (vi.fn / jest.fn / sinon)
224
+ - Fixture patterns (factories, builders, inline data)
225
+ - Test file location convention (co-located vs __tests__/)
226
+
227
+ 4. Summarize as "Test Framework Context":
228
+ framework: <vitest|jest|bun:test|mocha|pytest>
229
+ import_style: esm | cjs | global
230
+ file_pattern: "*.test.ts" | "*.spec.ts"
231
+ file_location: co-located | __tests__ | tests/
232
+ mock_library: vi | jest | sinon
233
+ run_command: "bun test" | "npx vitest run" | "npm test"
234
+ example_test_file: <path to a representative test>
235
+ ```
236
+
237
+ ### 2.6 Greptile Codebase Context (when available)
238
+
239
+ Greptile indexes the full repository and stores codebase-level context. If Greptile MCP is available in the session, query it as an additional local source — it can surface cross-file patterns that a manual scan would miss.
240
+
241
+ ```
242
+ 1. Try fetching stored custom context:
243
+ mcp__greptile__get_custom_context({})
244
+ or
245
+ mcp__greptile__search_custom_context({ query: "<task_description>" })
246
+
247
+ 2. If Greptile context is returned:
248
+ - Extract: documented patterns, known exceptions, team conventions
249
+ - Note: "Source: Greptile codebase index"
250
+
251
+ 3. Check for relevant past review comments (signals about recurring issues):
252
+ mcp__greptile__search_greptile_comments({ query: "<focus_area>", limit: 5 })
253
+ - Extract recurring findings → add to "Known Issues / Watch Areas" section
254
+
255
+ 4. If Greptile MCP is not available or returns empty: skip silently, proceed normally.
256
+ ```
257
+
258
+ Greptile context is additive — it supplements local context, never replaces it.
259
+
260
+ **Output of Phase 2:**
261
+ ```
262
+ LOCAL_CONTEXT:
263
+ docs_summary: [{source, key_points: [string]}]
264
+ related_jobs: [{job_name, relevance, key_findings}]
265
+ applicable_rules: [{rule, key_conventions: [string]}]
266
+ codebase_patterns: [{area, patterns: [string], example_files: [path]}]
267
+ test_framework: {framework, import_style, file_pattern, file_location, mock_library, run_command, example_test_file}
268
+ greptile_context: {available: bool, patterns: [string], known_issues: [string]}
269
+ ```
270
+
271
+ ---
272
+
273
+ ## Phase 3: EXTERNAL
274
+
275
+ Fetch external documentation for identified libraries, APIs, and best practices.
276
+
277
+ ### 3.1 Identify External Targets
278
+
279
+ From the task description, analysis result, and codebase examination:
280
+
281
+ ```
282
+ 1. Scan package.json in PROJECT_DIR for dependencies
283
+ 2. Cross-reference with focus_areas and affected files
284
+ 3. Build external research list:
285
+
286
+ EXTERNAL_TARGETS:
287
+ libraries:
288
+ - name: <package name>
289
+ reason: <why this library is relevant>
290
+ docs_url: <official docs URL, if known>
291
+ best_practices:
292
+ - topic: <e.g., "MobX computed vs autorun", "React memoization patterns">
293
+ reason: <why this is relevant to the task>
294
+ ```
295
+
296
+ ### 3.2 Fetch Library Documentation
297
+
298
+ For each identified library:
299
+
300
+ ```
301
+ 1. Try fetching official documentation:
302
+ - Use WebFetch to get the library's docs page
303
+ - Focus on: API reference for the specific features we need
304
+ - Skip: installation guides, getting started (unless relevant)
305
+
306
+ 2. Extract only task-relevant sections:
307
+ - API methods/hooks we'll use
308
+ - Configuration options that apply
309
+ - Known gotchas or migration notes
310
+ - TypeScript types and interfaces
311
+
312
+ 3. Summarize: 5-10 bullet points per library
313
+ - Function signatures we'll use
314
+ - Required patterns (e.g., cleanup, error handling)
315
+ - Version-specific behavior if applicable
316
+ ```
317
+
318
+ ### 3.3 Fetch Best Practices
319
+
320
+ For each identified best practice topic:
321
+
322
+ ```
323
+ 1. Search for authoritative sources:
324
+ - Official docs of the framework/library
325
+ - Well-known pattern documentation (e.g., MobX official guides)
326
+
327
+ 2. Extract actionable practices:
328
+ - DO / DON'T patterns
329
+ - Performance considerations
330
+ - Common pitfalls to avoid
331
+
332
+ 3. Summarize: 3-5 bullet points per topic, with code examples where helpful
333
+ ```
334
+
335
+ ### 3.4 Rate and Filter
336
+
337
+ Not all fetched content is equally useful. Rate each finding:
338
+
339
+ ```
340
+ For each external finding:
341
+ relevance: HIGH | MEDIUM | LOW
342
+ - HIGH: Directly answers a question about our implementation
343
+ - MEDIUM: Provides useful background or alternative approaches
344
+ - LOW: Tangentially related, might be useful later
345
+
346
+ Include only HIGH and MEDIUM findings in the context document.
347
+ ```
348
+
349
+ **Output of Phase 3:**
350
+ ```
351
+ EXTERNAL_CONTEXT:
352
+ libraries: [{name, version, key_apis: [string], gotchas: [string], docs_url}]
353
+ best_practices: [{topic, dos: [string], donts: [string], examples: [string]}]
354
+ references: [{url, title, relevance, summary}]
355
+ ```
356
+
357
+ ---
358
+
359
+ ## Phase 4: SYNTHESIZE
360
+
361
+ Merge all findings into a single, focused context document.
362
+
363
+ ### 4.1 Context Document Structure
364
+
365
+ ```markdown
366
+ # Context: <Job Title / Task Description>
367
+
368
+ ## Task Overview
369
+ <2-3 sentences: what we're doing and why>
370
+
371
+ ## Key Decisions & Constraints
372
+ <!-- From docs, rules, and previous jobs -->
373
+ - <decision or constraint 1>
374
+ - <decision or constraint 2>
375
+ - ...
376
+
377
+ ## Applicable Rules & Conventions
378
+ <!-- From rules/core/ — only task-relevant extracts -->
379
+
380
+ ### Code Style
381
+ - <convention 1>
382
+ - <convention 2>
383
+
384
+ ### Architecture Patterns
385
+ - <pattern 1>
386
+ - <pattern 2>
387
+
388
+ ### Testing Requirements
389
+ - <requirement 1>
390
+ - <requirement 2>
391
+
392
+ ## Codebase Patterns
393
+ <!-- How similar code is written in this project -->
394
+
395
+ ### File Structure
396
+ - <pattern>
397
+
398
+ ### Component Patterns
399
+ - <pattern with brief code example>
400
+
401
+ ### Store Patterns
402
+ - <pattern with brief code example>
403
+
404
+ ## Libraries & APIs
405
+ <!-- External library documentation relevant to this task -->
406
+
407
+ ### <Library Name> (v<version>)
408
+ - **Relevant APIs:** <list>
409
+ - **Key patterns:**
410
+ - <pattern>
411
+ - **Gotchas:**
412
+ - <gotcha>
413
+
414
+ ### <Another Library>
415
+ - ...
416
+
417
+ ## Best Practices
418
+ <!-- Researched best practices for the specific patterns we're using -->
419
+
420
+ ### <Topic>
421
+ - DO: <practice>
422
+ - DON'T: <anti-pattern>
423
+ - Example:
424
+ ```typescript
425
+ // brief code example if helpful
426
+ ```
427
+
428
+ ## References
429
+ <!-- Links to source documentation -->
430
+ | Source | URL | Relevance |
431
+ |--------|-----|-----------|
432
+ | <title> | <url> | <HIGH/MEDIUM> |
433
+
434
+ ## Previous Related Work
435
+ <!-- From previous jobs, if any -->
436
+ - <Job name>: <what was learned, what to reuse>
437
+
438
+ ---
439
+
440
+ <!-- Document Metadata -->
441
+ | Key | Value |
442
+ |-----|-------|
443
+ | Created | <ISO 8601 UTC timestamp> |
444
+ | Updated | <ISO 8601 UTC timestamp> |
445
+ | Agent | context-collector |
446
+ | Task | <task description> |
447
+ | Job | <JOB_NAME> |
448
+ | Version | 1.0 |
449
+ | Status | final |
450
+ ```
451
+
452
+ ### 4.2 Quality Criteria
453
+
454
+ Before finalizing, validate the context document:
455
+
456
+ - [ ] Every section is directly relevant to the task — no padding
457
+ - [ ] Code examples are minimal but illustrative
458
+ - [ ] Library documentation covers the specific APIs we need, not generic overviews
459
+ - [ ] Rules and conventions are actionable (DO/DON'T format)
460
+ - [ ] References are linked and accessible
461
+ - [ ] Total document length is reasonable (aim for 200-500 lines, not 1000+)
462
+ - [ ] No duplicate information across sections
463
+
464
+ ### 4.3 For ACTION=update
465
+
466
+ When updating an existing context:
467
+
468
+ 1. Read existing `context.md`
469
+ 2. Identify sections affected by UPDATE_REASON
470
+ 3. Research only the new/changed areas (Phases 2-3, scoped)
471
+ 4. Merge new findings into existing document:
472
+ - Update affected sections in place
473
+ - Add new sections if needed
474
+ - Do NOT remove existing sections unless explicitly outdated
475
+ 5. Increment Version in metadata (e.g., `1.0` -> `1.1`)
476
+ 6. Update the `Updated` timestamp
477
+ 7. Add update note to metadata or end of document:
478
+ ```
479
+ ## Update Log
480
+ - v1.1 (<timestamp>): Added <library> documentation per <reason>. Agent: context-collector.
481
+ - v1.0 (<timestamp>): Initial context. Agent: context-collector.
482
+ ```
483
+
484
+ ---
485
+
486
+ ## Phase 5: DOCUMENT
487
+
488
+ Save the context document and notify orchestrator.
489
+
490
+ ### 5.1 Save via job-documenter (when running within a job)
491
+
492
+ If JOB_NAME is provided, dispatch `job-documenter`:
493
+
494
+ ```
495
+ ACTION: add-document
496
+ JOB_NAME: <JOB_NAME>
497
+ JOBS_ROOT: <JOBS_ROOT>
498
+
499
+ DATA:
500
+ DOC_TYPE: context
501
+ TARGET: both
502
+ TITLE: Context — <task description short>
503
+ CONTENT: <full context document>
504
+ AGENT: context-collector
505
+ TASK: Collect context for <task description>
506
+ VERSION: <1.0 for new, incremented for update>
507
+ DOC_STATUS: final
508
+ ```
509
+
510
+ For ACTION=update, use the same flow — `job-documenter` will overwrite the existing `context.md`.
511
+
512
+ ### 5.2 Save directly (when running standalone without a job)
513
+
514
+ If no JOB_NAME is provided:
515
+ - Write context to `<DOCS_ROOT>/context/<descriptive-slug>.md`
516
+ - Include full metadata block
517
+
518
+ ## Reporting Results
519
+
520
+ Every final response to the orchestrator MUST begin with the status line:
521
+
522
+ ```
523
+ STATUS: DONE
524
+
525
+ ## Context collected
526
+ [summary of what was gathered]
527
+
528
+ ## CONTEXT_RESULT
529
+ [the full result block]
530
+ ```
531
+
532
+ Use `STATUS: DONE_WITH_CONCERNS` if context is partial. Use `STATUS: BLOCKED` if access fails.
533
+
534
+ **IRON LAW: THE FIRST LINE OF YOUR FINAL RESPONSE IS ALWAYS "STATUS: <STATUS>". THE CONTEXT_RESULT BLOCK FOLLOWS AFTER.**
535
+
536
+ ### 5.3 Return Result
537
+
538
+ ```
539
+ CONTEXT_RESULT:
540
+ action: collect | update
541
+ status: success | error
542
+ job_name: <JOB_NAME or null>
543
+ context_path: <path to context.md>
544
+ version: <document version>
545
+ sections:
546
+ local_sources: <count of local sources used>
547
+ external_sources: <count of external sources fetched>
548
+ rules_applied: <count of rules extracted>
549
+ libraries_documented: <count of libraries documented>
550
+ summary: <2-3 sentence summary of what context was collected>
551
+ error_details: <if status is error>
552
+ ```
553
+
554
+ ---
555
+
556
+ ## Error Handling
557
+
558
+ | Error | Action |
559
+ |-------|--------|
560
+ | Job folder doesn't exist | If orchestrator call — ABORT, orchestrator must init job first. If user call — offer to create. |
561
+ | External URL fetch fails | Skip that source, note as "unavailable" in References, continue with remaining sources |
562
+ | No relevant local docs found | Proceed with external only, note "No local documentation found for this topic" |
563
+ | No relevant external docs found | Proceed with local only, note "External documentation not found — manual research may be needed" |
564
+ | Context document too large (>500 lines) | Aggressively summarize, move detailed info to separate `ai/context-details.md` |
565
+ | package.json not found | Skip library identification from deps, rely on focus_areas and analysis |
566
+
567
+ ---
568
+
569
+ ## Update Protocol
570
+
571
+ The context-collector is designed to be called **multiple times** during a job:
572
+
573
+ ### When to trigger an update
574
+
575
+ | Trigger | Who Calls | What Happens |
576
+ |---------|-----------|--------------|
577
+ | New library discovered during implementation | Orchestrator or task-implementer (via orchestrator) | ACTION=update with FOCUS_AREAS=<new library> |
578
+ | Review finding suggests different pattern | Orchestrator after review step | ACTION=update with UPDATE_REASON=<review finding> |
579
+ | Sub-agent reports insufficient context | Orchestrator | ACTION=update with UPDATE_REASON=<what's missing> |
580
+ | User requests context refresh | User directly | ACTION=update with UPDATE_REASON=<user request> |
581
+
582
+ ### Update flow
583
+
584
+ ```
585
+ 1. Read existing context.md
586
+ 2. Parse UPDATE_REASON to determine scope
587
+ 3. Run Phases 2-3 (LOCAL + EXTERNAL) with narrowed scope
588
+ 4. Merge new findings into existing document (Phase 4.3)
589
+ 5. Save updated document (Phase 5) with incremented version
590
+ 6. Return CONTEXT_RESULT with updated section counts
591
+ ```
592
+
593
+ ---
594
+
595
+ ## Prompt Template for Orchestrator
596
+
597
+ When the orchestrator dispatches this skill as a sub-agent:
598
+
599
+ ```
600
+ You are the context-collector agent. Your task is to research and build
601
+ a context document for the current job.
602
+
603
+ Load the skill from: skills/context-collector/SKILL.md
604
+
605
+ ACTION: collect
606
+ JOB_NAME: <job-name>
607
+ JOBS_ROOT: <JOBS_ROOT>
608
+ PROJECT_DIR: <project path>
609
+
610
+ DATA:
611
+ TASK_DESCRIPTION: <description from issue or user>
612
+ FOCUS_AREAS: <areas to research>
613
+ ANALYSIS_RESULT: <output from issue-analyzer, if available>
614
+ KNOWN_LIBRARIES: <libraries already identified>
615
+
616
+ Execute all phases and return a CONTEXT_RESULT block.
617
+ ```
618
+
619
+ For updates:
620
+
621
+ ```
622
+ You are the context-collector agent. Your task is to update the existing
623
+ context document for this job.
624
+
625
+ Load the skill from: skills/context-collector/SKILL.md
626
+
627
+ ACTION: update
628
+ JOB_NAME: <job-name>
629
+ JOBS_ROOT: <JOBS_ROOT>
630
+ PROJECT_DIR: <project path>
631
+
632
+ DATA:
633
+ TASK_DESCRIPTION: <original task description>
634
+ UPDATE_REASON: <why context needs updating>
635
+ FOCUS_AREAS: <new areas to research>
636
+
637
+ Execute update flow and return a CONTEXT_RESULT block.
638
+ ```
639
+
640
+ ---
641
+
642
+ ## Rules of Engagement
643
+
644
+ 1. **DO** focus on relevance — every line in the context document should help with the specific task.
645
+ 2. **DO** include actionable information — patterns, conventions, API signatures, gotchas.
646
+ 3. **DO** version-track every update with timestamp, version increment, and agent attribution.
647
+ 4. **DO** preserve existing sections during updates unless they are explicitly outdated.
648
+ 5. **DO** include code examples where they clarify a pattern (keep them minimal).
649
+ 6. **DO** cross-reference with previous jobs to avoid rediscovering the same patterns.
650
+ 7. **DO** return structured CONTEXT_RESULT for every action.
651
+ 8. **DO NOT** include generic or obvious information (e.g., "React is a UI library").
652
+ 9. **DO NOT** exceed ~500 lines in context.md — be aggressive with summarization.
653
+ 10. **DO NOT** fetch external docs for standard well-known patterns already covered by project rules.
654
+ 11. **DO NOT** modify any project files — this is a read + research + write-to-jobs skill only.
655
+ 12. **DO NOT** skip the metadata block and update log — they are mandatory for version tracking.