octocode-cli 1.2.6 → 1.2.8

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 (303) hide show
  1. package/LICENSE +21 -63
  2. package/README.md +85 -142
  3. package/out/octocode-cli.js +7063 -6934
  4. package/package.json +8 -6
  5. package/skills/README.md +97 -120
  6. package/skills/octocode-code-engineer/.claude/settings.local.json +18 -0
  7. package/skills/octocode-code-engineer/.octocode/rfc/RFC-code-engineer-weakness-fixes.md +255 -0
  8. package/skills/octocode-code-engineer/.plan/VALIDATED_PLAN.md +223 -0
  9. package/skills/octocode-code-engineer/README.md +178 -0
  10. package/skills/octocode-code-engineer/SKILL.md +418 -0
  11. package/skills/octocode-code-engineer/coverage/architecture.ts.html +7828 -0
  12. package/skills/octocode-code-engineer/coverage/ast-helpers.ts.html +211 -0
  13. package/skills/octocode-code-engineer/coverage/ast-search.ts.html +1795 -0
  14. package/skills/octocode-code-engineer/coverage/base.css +224 -0
  15. package/skills/octocode-code-engineer/coverage/block-navigation.js +87 -0
  16. package/skills/octocode-code-engineer/coverage/cache.ts.html +376 -0
  17. package/skills/octocode-code-engineer/coverage/cli.ts.html +982 -0
  18. package/skills/octocode-code-engineer/coverage/clover.xml +3217 -0
  19. package/skills/octocode-code-engineer/coverage/collect-effects.ts.html +664 -0
  20. package/skills/octocode-code-engineer/coverage/collect-input-sources.ts.html +577 -0
  21. package/skills/octocode-code-engineer/coverage/collect-performance.ts.html +331 -0
  22. package/skills/octocode-code-engineer/coverage/collect-prototype-pollution.ts.html +421 -0
  23. package/skills/octocode-code-engineer/coverage/collect-security.ts.html +604 -0
  24. package/skills/octocode-code-engineer/coverage/collect-test-profile.ts.html +589 -0
  25. package/skills/octocode-code-engineer/coverage/coverage-final.json +30 -0
  26. package/skills/octocode-code-engineer/coverage/dependencies.ts.html +997 -0
  27. package/skills/octocode-code-engineer/coverage/dependency-summary.ts.html +688 -0
  28. package/skills/octocode-code-engineer/coverage/discovery.ts.html +322 -0
  29. package/skills/octocode-code-engineer/coverage/favicon.png +0 -0
  30. package/skills/octocode-code-engineer/coverage/graph-analytics.ts.html +1510 -0
  31. package/skills/octocode-code-engineer/coverage/index.html +536 -0
  32. package/skills/octocode-code-engineer/coverage/index.ts.html +826 -0
  33. package/skills/octocode-code-engineer/coverage/metrics.ts.html +553 -0
  34. package/skills/octocode-code-engineer/coverage/pipeline.ts.html +2044 -0
  35. package/skills/octocode-code-engineer/coverage/prettify.css +1 -0
  36. package/skills/octocode-code-engineer/coverage/prettify.js +2 -0
  37. package/skills/octocode-code-engineer/coverage/report-analysis.ts.html +1570 -0
  38. package/skills/octocode-code-engineer/coverage/report-writer.ts.html +1102 -0
  39. package/skills/octocode-code-engineer/coverage/security-detectors.ts.html +1747 -0
  40. package/skills/octocode-code-engineer/coverage/semantic-detectors.ts.html +2152 -0
  41. package/skills/octocode-code-engineer/coverage/semantic.ts.html +1897 -0
  42. package/skills/octocode-code-engineer/coverage/sort-arrow-sprite.png +0 -0
  43. package/skills/octocode-code-engineer/coverage/sorter.js +210 -0
  44. package/skills/octocode-code-engineer/coverage/summary-md.ts.html +1222 -0
  45. package/skills/octocode-code-engineer/coverage/test-quality-detectors.ts.html +1039 -0
  46. package/skills/octocode-code-engineer/coverage/tree-sitter-analyzer.ts.html +955 -0
  47. package/skills/octocode-code-engineer/coverage/ts-analyzer.ts.html +1213 -0
  48. package/skills/octocode-code-engineer/coverage/types.ts.html +2473 -0
  49. package/skills/octocode-code-engineer/coverage/utils.ts.html +820 -0
  50. package/skills/octocode-code-engineer/eslint.config.mjs +54 -0
  51. package/skills/octocode-code-engineer/minify-scripts.mjs +32 -0
  52. package/skills/octocode-code-engineer/package.json +54 -0
  53. package/skills/octocode-code-engineer/references/agent-ast-reading-rfc.md +95 -0
  54. package/skills/octocode-code-engineer/references/architecture-techniques.md +121 -0
  55. package/skills/octocode-code-engineer/references/ast-search.md +210 -0
  56. package/skills/octocode-code-engineer/references/ast-tree-search.md +151 -0
  57. package/skills/octocode-code-engineer/references/cli-reference.md +167 -0
  58. package/skills/octocode-code-engineer/references/concepts.md +107 -0
  59. package/skills/octocode-code-engineer/references/finding-categories.md +128 -0
  60. package/skills/octocode-code-engineer/references/improvement-roadmap.md +304 -0
  61. package/skills/octocode-code-engineer/references/output-files.md +144 -0
  62. package/skills/octocode-code-engineer/references/playbooks.md +204 -0
  63. package/skills/octocode-code-engineer/references/present-results.md +136 -0
  64. package/skills/octocode-code-engineer/references/tool-workflows.md +566 -0
  65. package/skills/octocode-code-engineer/references/validate-investigate.md +225 -0
  66. package/skills/octocode-code-engineer/scripts/analysis/dependencies.js +1 -0
  67. package/skills/octocode-code-engineer/scripts/analysis/dependency-summary.js +1 -0
  68. package/skills/octocode-code-engineer/scripts/analysis/discovery.js +1 -0
  69. package/skills/octocode-code-engineer/scripts/analysis/graph-analytics.js +1 -0
  70. package/skills/octocode-code-engineer/scripts/analysis/semantic.js +1 -0
  71. package/skills/octocode-code-engineer/scripts/ast/helpers.js +1 -0
  72. package/skills/octocode-code-engineer/scripts/ast/metrics.js +1 -0
  73. package/skills/octocode-code-engineer/scripts/ast/search.js +2 -0
  74. package/skills/octocode-code-engineer/scripts/ast/tree-search.js +2 -0
  75. package/skills/octocode-code-engineer/scripts/ast/tree-sitter.js +1 -0
  76. package/skills/octocode-code-engineer/scripts/ast/ts-analyzer.js +1 -0
  77. package/skills/octocode-code-engineer/scripts/collectors/chains.js +1 -0
  78. package/skills/octocode-code-engineer/scripts/collectors/effects.js +1 -0
  79. package/skills/octocode-code-engineer/scripts/collectors/input-sources.js +1 -0
  80. package/skills/octocode-code-engineer/scripts/collectors/performance.js +1 -0
  81. package/skills/octocode-code-engineer/scripts/collectors/prototype-pollution.js +1 -0
  82. package/skills/octocode-code-engineer/scripts/collectors/security.js +1 -0
  83. package/skills/octocode-code-engineer/scripts/collectors/test-profile.js +1 -0
  84. package/skills/octocode-code-engineer/scripts/common/is-direct-run.js +1 -0
  85. package/skills/octocode-code-engineer/scripts/common/utils.js +1 -0
  86. package/skills/octocode-code-engineer/scripts/detectors/code-quality.js +1 -0
  87. package/skills/octocode-code-engineer/scripts/detectors/cohesion.js +1 -0
  88. package/skills/octocode-code-engineer/scripts/detectors/coupling.js +1 -0
  89. package/skills/octocode-code-engineer/scripts/detectors/cycle.js +1 -0
  90. package/skills/octocode-code-engineer/scripts/detectors/dead-code.js +1 -0
  91. package/skills/octocode-code-engineer/scripts/detectors/import-style.js +1 -0
  92. package/skills/octocode-code-engineer/scripts/detectors/index.js +1 -0
  93. package/skills/octocode-code-engineer/scripts/detectors/security.js +1 -0
  94. package/skills/octocode-code-engineer/scripts/detectors/semantic.js +1 -0
  95. package/skills/octocode-code-engineer/scripts/detectors/shared.js +1 -0
  96. package/skills/octocode-code-engineer/scripts/detectors/test-quality.js +1 -0
  97. package/skills/octocode-code-engineer/scripts/index.js +1 -0
  98. package/skills/octocode-code-engineer/scripts/pipeline/cache.js +1 -0
  99. package/skills/octocode-code-engineer/scripts/pipeline/cli.js +1 -0
  100. package/skills/octocode-code-engineer/scripts/pipeline/main.js +2 -0
  101. package/skills/octocode-code-engineer/scripts/reporting/analysis.js +1 -0
  102. package/skills/octocode-code-engineer/scripts/reporting/summary-md.js +1 -0
  103. package/skills/octocode-code-engineer/scripts/reporting/writer.js +1 -0
  104. package/skills/octocode-code-engineer/scripts/types/constants.js +1 -0
  105. package/skills/octocode-code-engineer/scripts/types/index.js +1 -0
  106. package/skills/octocode-code-engineer/scripts/types/interfaces.js +1 -0
  107. package/skills/octocode-code-engineer/src/analysis/dependencies.test.ts +545 -0
  108. package/skills/octocode-code-engineer/src/analysis/dependencies.ts +406 -0
  109. package/skills/octocode-code-engineer/src/analysis/dependency-summary.test.ts +566 -0
  110. package/skills/octocode-code-engineer/src/analysis/dependency-summary.ts +257 -0
  111. package/skills/octocode-code-engineer/src/analysis/discovery.test.ts +420 -0
  112. package/skills/octocode-code-engineer/src/analysis/discovery.ts +87 -0
  113. package/skills/octocode-code-engineer/src/analysis/graph-analytics.test.ts +449 -0
  114. package/skills/octocode-code-engineer/src/analysis/graph-analytics.ts +534 -0
  115. package/skills/octocode-code-engineer/src/analysis/semantic.test.ts +1533 -0
  116. package/skills/octocode-code-engineer/src/analysis/semantic.ts +830 -0
  117. package/skills/octocode-code-engineer/src/ast/helpers.test.ts +185 -0
  118. package/skills/octocode-code-engineer/src/ast/helpers.ts +62 -0
  119. package/skills/octocode-code-engineer/src/ast/metrics.test.ts +304 -0
  120. package/skills/octocode-code-engineer/src/ast/metrics.ts +204 -0
  121. package/skills/octocode-code-engineer/src/ast/search.test.ts +647 -0
  122. package/skills/octocode-code-engineer/src/ast/search.ts +648 -0
  123. package/skills/octocode-code-engineer/src/ast/tree-search.test.ts +199 -0
  124. package/skills/octocode-code-engineer/src/ast/tree-search.ts +392 -0
  125. package/skills/octocode-code-engineer/src/ast/tree-sitter.test.ts +407 -0
  126. package/skills/octocode-code-engineer/src/ast/tree-sitter.ts +402 -0
  127. package/skills/octocode-code-engineer/src/ast/ts-analyzer.test.ts +1864 -0
  128. package/skills/octocode-code-engineer/src/ast/ts-analyzer.ts +509 -0
  129. package/skills/octocode-code-engineer/src/collectors/chains.ts +74 -0
  130. package/skills/octocode-code-engineer/src/collectors/effects.test.ts +490 -0
  131. package/skills/octocode-code-engineer/src/collectors/effects.ts +332 -0
  132. package/skills/octocode-code-engineer/src/collectors/input-sources.test.ts +144 -0
  133. package/skills/octocode-code-engineer/src/collectors/input-sources.ts +196 -0
  134. package/skills/octocode-code-engineer/src/collectors/performance.test.ts +82 -0
  135. package/skills/octocode-code-engineer/src/collectors/performance.ts +141 -0
  136. package/skills/octocode-code-engineer/src/collectors/prototype-pollution.test.ts +55 -0
  137. package/skills/octocode-code-engineer/src/collectors/prototype-pollution.ts +162 -0
  138. package/skills/octocode-code-engineer/src/collectors/security.test.ts +124 -0
  139. package/skills/octocode-code-engineer/src/collectors/security.ts +309 -0
  140. package/skills/octocode-code-engineer/src/collectors/test-profile.test.ts +97 -0
  141. package/skills/octocode-code-engineer/src/collectors/test-profile.ts +269 -0
  142. package/skills/octocode-code-engineer/src/common/is-direct-run.test.ts +32 -0
  143. package/skills/octocode-code-engineer/src/common/is-direct-run.ts +13 -0
  144. package/skills/octocode-code-engineer/src/common/utils.test.ts +463 -0
  145. package/skills/octocode-code-engineer/src/common/utils.ts +304 -0
  146. package/skills/octocode-code-engineer/src/detectors/code-quality.ts +966 -0
  147. package/skills/octocode-code-engineer/src/detectors/cohesion.ts +539 -0
  148. package/skills/octocode-code-engineer/src/detectors/coupling.ts +323 -0
  149. package/skills/octocode-code-engineer/src/detectors/cycle.ts +349 -0
  150. package/skills/octocode-code-engineer/src/detectors/dead-code.ts +320 -0
  151. package/skills/octocode-code-engineer/src/detectors/import-style.ts +376 -0
  152. package/skills/octocode-code-engineer/src/detectors/index.test.ts +3061 -0
  153. package/skills/octocode-code-engineer/src/detectors/index.ts +88 -0
  154. package/skills/octocode-code-engineer/src/detectors/security.test.ts +882 -0
  155. package/skills/octocode-code-engineer/src/detectors/security.ts +821 -0
  156. package/skills/octocode-code-engineer/src/detectors/semantic.ts +758 -0
  157. package/skills/octocode-code-engineer/src/detectors/shared.ts +49 -0
  158. package/skills/octocode-code-engineer/src/detectors/test-quality.test.ts +388 -0
  159. package/skills/octocode-code-engineer/src/detectors/test-quality.ts +367 -0
  160. package/skills/octocode-code-engineer/src/index.test.ts +4425 -0
  161. package/skills/octocode-code-engineer/src/index.ts +403 -0
  162. package/skills/octocode-code-engineer/src/pipeline/cache.test.ts +199 -0
  163. package/skills/octocode-code-engineer/src/pipeline/cache.ts +130 -0
  164. package/skills/octocode-code-engineer/src/pipeline/cli.test.ts +493 -0
  165. package/skills/octocode-code-engineer/src/pipeline/cli.ts +344 -0
  166. package/skills/octocode-code-engineer/src/pipeline/main.test.ts +174 -0
  167. package/skills/octocode-code-engineer/src/pipeline/main.ts +1074 -0
  168. package/skills/octocode-code-engineer/src/pipeline.test.ts +84 -0
  169. package/skills/octocode-code-engineer/src/reporting/analysis.test.ts +782 -0
  170. package/skills/octocode-code-engineer/src/reporting/analysis.ts +688 -0
  171. package/skills/octocode-code-engineer/src/reporting/output-contract.test.ts +463 -0
  172. package/skills/octocode-code-engineer/src/reporting/summary-md.test.ts +421 -0
  173. package/skills/octocode-code-engineer/src/reporting/summary-md.ts +714 -0
  174. package/skills/octocode-code-engineer/src/reporting/writer.ts +430 -0
  175. package/skills/octocode-code-engineer/src/sanity.test.ts +47 -0
  176. package/skills/octocode-code-engineer/src/types/constants.ts +248 -0
  177. package/skills/octocode-code-engineer/src/types/index.ts +80 -0
  178. package/skills/octocode-code-engineer/src/types/interfaces.ts +682 -0
  179. package/skills/octocode-code-engineer/tsconfig.json +17 -0
  180. package/skills/octocode-code-engineer/vitest.config.ts +8 -0
  181. package/skills/octocode-documentation-writer/README.md +113 -0
  182. package/skills/octocode-documentation-writer/SKILL.md +886 -0
  183. package/skills/octocode-documentation-writer/references/agent-discovery-analysis.md +453 -0
  184. package/skills/octocode-documentation-writer/references/agent-documentation-writer.md +255 -0
  185. package/skills/octocode-documentation-writer/references/agent-engineer-questions.md +247 -0
  186. package/skills/octocode-documentation-writer/references/agent-orchestrator.md +370 -0
  187. package/skills/octocode-documentation-writer/references/agent-qa-validator.md +227 -0
  188. package/skills/octocode-documentation-writer/references/agent-researcher.md +250 -0
  189. package/skills/octocode-documentation-writer/schemas/analysis-schema.json +886 -0
  190. package/skills/octocode-documentation-writer/schemas/discovery-tasks.json +96 -0
  191. package/skills/octocode-documentation-writer/schemas/documentation-structure.json +373 -0
  192. package/skills/octocode-documentation-writer/schemas/partial-discovery-schema.json +102 -0
  193. package/skills/octocode-documentation-writer/schemas/partial-research-schema.json +98 -0
  194. package/skills/octocode-documentation-writer/schemas/qa-results-schema.json +113 -0
  195. package/skills/octocode-documentation-writer/schemas/questions-schema.json +228 -0
  196. package/skills/octocode-documentation-writer/schemas/research-schema.json +104 -0
  197. package/skills/octocode-documentation-writer/schemas/state-schema.json +222 -0
  198. package/skills/octocode-documentation-writer/schemas/work-assignments-schema.json +74 -0
  199. package/skills/octocode-plan/SKILL.md +122 -116
  200. package/skills/octocode-prompt-optimizer/SKILL.md +617 -0
  201. package/skills/octocode-pull-request-reviewer/README.md +249 -0
  202. package/skills/octocode-pull-request-reviewer/SKILL.md +479 -0
  203. package/skills/octocode-pull-request-reviewer/references/dependency-check.md +74 -0
  204. package/skills/octocode-pull-request-reviewer/references/domain-reviewers.md +24 -0
  205. package/skills/octocode-pull-request-reviewer/references/execution-lifecycle.md +441 -0
  206. package/skills/octocode-pull-request-reviewer/references/flow-analysis-protocol.md +64 -0
  207. package/skills/octocode-pull-request-reviewer/references/output-template.md +174 -0
  208. package/skills/octocode-pull-request-reviewer/references/parallel-agent-protocol.md +182 -0
  209. package/skills/octocode-pull-request-reviewer/references/review-guidelines.md +26 -0
  210. package/skills/octocode-pull-request-reviewer/references/verification-checklist.md +40 -0
  211. package/skills/octocode-research/.claude/settings.local.json +46 -0
  212. package/skills/octocode-research/.octocode/plan/code-review-fixes/plan.md +312 -0
  213. package/skills/octocode-research/.octocode/plan/code-review-fixes/research.md +212 -0
  214. package/skills/octocode-research/.octocode/plans/NODE_SERVER_START_PLAN.md +755 -0
  215. package/skills/octocode-research/.octocode/research/code-review/research.md +371 -0
  216. package/skills/octocode-research/.octocode/review/IMPROVEMENTS.md +391 -0
  217. package/skills/octocode-research/.octocode/review/REVIEW_PLAN.md +289 -0
  218. package/skills/octocode-research/.octocode/review/REVIEW_REPORT.md +356 -0
  219. package/skills/octocode-research/AGENTS.md +349 -0
  220. package/skills/octocode-research/README.md +494 -0
  221. package/skills/octocode-research/SKILL.md +652 -274
  222. package/skills/octocode-research/docs/API_REFERENCE.md +562 -0
  223. package/skills/octocode-research/docs/ARCHITECTURE.md +554 -0
  224. package/skills/octocode-research/docs/FLOWS.md +577 -0
  225. package/skills/octocode-research/docs/OVERVIEW.md +564 -0
  226. package/skills/octocode-research/docs/SERVER_FLOWS.md +631 -0
  227. package/skills/octocode-research/ecosystem.config.cjs +88 -0
  228. package/skills/octocode-research/eslint.config.mjs +27 -0
  229. package/skills/octocode-research/package.json +84 -0
  230. package/skills/octocode-research/references/GUARDRAILS.md +40 -0
  231. package/skills/octocode-research/references/PARALLEL_AGENT_PROTOCOL.md +178 -0
  232. package/skills/octocode-research/references/roast-prompt.md +149 -0
  233. package/skills/octocode-research/scripts/server-init.d.ts +2 -0
  234. package/skills/octocode-research/scripts/server-init.js +2 -0
  235. package/skills/octocode-research/scripts/server.d.ts +8 -0
  236. package/skills/octocode-research/scripts/server.js +445 -0
  237. package/skills/octocode-research/src/__tests__/integration/circuitBreaker.test.ts +205 -0
  238. package/skills/octocode-research/src/__tests__/integration/routes.test.ts +374 -0
  239. package/skills/octocode-research/src/__tests__/unit/circuitBreaker.test.ts +245 -0
  240. package/skills/octocode-research/src/__tests__/unit/errorHandler.test.ts +183 -0
  241. package/skills/octocode-research/src/__tests__/unit/httpPreprocess.test.ts +157 -0
  242. package/skills/octocode-research/src/__tests__/unit/logger.test.ts +143 -0
  243. package/skills/octocode-research/src/__tests__/unit/queryParser.test.ts +130 -0
  244. package/skills/octocode-research/src/__tests__/unit/responseBuilder.test.ts +469 -0
  245. package/skills/octocode-research/src/__tests__/unit/retry.test.ts +205 -0
  246. package/skills/octocode-research/src/index.ts +186 -0
  247. package/skills/octocode-research/src/mcpCache.ts +49 -0
  248. package/skills/octocode-research/src/middleware/errorHandler.ts +65 -0
  249. package/skills/octocode-research/src/middleware/logger.ts +61 -0
  250. package/skills/octocode-research/src/middleware/queryParser.ts +115 -0
  251. package/skills/octocode-research/src/middleware/readiness.ts +17 -0
  252. package/skills/octocode-research/src/routes/github.ts +197 -0
  253. package/skills/octocode-research/src/routes/local.ts +175 -0
  254. package/skills/octocode-research/src/routes/lsp.ts +177 -0
  255. package/skills/octocode-research/src/routes/package.ts +127 -0
  256. package/skills/octocode-research/src/routes/prompts.ts +138 -0
  257. package/skills/octocode-research/src/routes/tools.ts +677 -0
  258. package/skills/octocode-research/src/server-init.ts +363 -0
  259. package/skills/octocode-research/src/server.ts +285 -0
  260. package/skills/octocode-research/src/types/errorGuards.ts +151 -0
  261. package/skills/octocode-research/src/types/express.d.ts +76 -0
  262. package/skills/octocode-research/src/types/guards.ts +98 -0
  263. package/skills/octocode-research/src/types/mcp.ts +119 -0
  264. package/skills/octocode-research/src/types/responses.ts +199 -0
  265. package/skills/octocode-research/src/types/toolTypes.ts +33 -0
  266. package/skills/octocode-research/src/utils/asyncTimeout.ts +116 -0
  267. package/skills/octocode-research/src/utils/circuitBreaker.ts +492 -0
  268. package/skills/octocode-research/src/utils/colors.ts +53 -0
  269. package/skills/octocode-research/src/utils/errorQueue.ts +71 -0
  270. package/skills/octocode-research/src/utils/logEmoji.ts +103 -0
  271. package/skills/octocode-research/src/utils/logger.ts +413 -0
  272. package/skills/octocode-research/src/utils/resilience.ts +169 -0
  273. package/skills/octocode-research/src/utils/responseBuilder.ts +495 -0
  274. package/skills/octocode-research/src/utils/responseFactory.ts +100 -0
  275. package/skills/octocode-research/src/utils/responseParser.ts +272 -0
  276. package/skills/octocode-research/src/utils/retry.ts +280 -0
  277. package/skills/octocode-research/src/utils/routeFactory.ts +117 -0
  278. package/skills/octocode-research/src/utils/url.ts +20 -0
  279. package/skills/octocode-research/src/validation/httpPreprocess.ts +155 -0
  280. package/skills/octocode-research/src/validation/index.ts +2 -0
  281. package/skills/octocode-research/src/validation/schemas.ts +578 -0
  282. package/skills/octocode-research/src/validation/toolCallSchema.ts +132 -0
  283. package/skills/octocode-research/tsconfig.json +21 -0
  284. package/skills/octocode-research/tsdown.config.ts +42 -0
  285. package/skills/octocode-research/vitest.config.ts +20 -0
  286. package/skills/octocode-researcher/SKILL.md +461 -0
  287. package/skills/octocode-researcher/references/fallbacks.md +120 -0
  288. package/skills/{octocode-local-search → octocode-researcher}/references/tool-reference.md +132 -49
  289. package/skills/{octocode-local-search → octocode-researcher}/references/workflow-patterns.md +204 -4
  290. package/skills/octocode-rfc-generator/SKILL.md +223 -0
  291. package/skills/octocode-rfc-generator/references/rfc-template.md +193 -0
  292. package/skills/octocode-roast/SKILL.md +63 -21
  293. package/skills/octocode-implement/SKILL.md +0 -293
  294. package/skills/octocode-implement/references/execution-phases.md +0 -317
  295. package/skills/octocode-implement/references/tool-reference.md +0 -403
  296. package/skills/octocode-implement/references/workflow-patterns.md +0 -385
  297. package/skills/octocode-local-search/SKILL.md +0 -449
  298. package/skills/octocode-pr-review/SKILL.md +0 -391
  299. package/skills/octocode-pr-review/references/domain-reviewers.md +0 -105
  300. package/skills/octocode-pr-review/references/execution-lifecycle.md +0 -116
  301. package/skills/octocode-pr-review/references/research-flows.md +0 -75
  302. package/skills/octocode-research/references/tool-reference.md +0 -304
  303. package/skills/octocode-research/references/workflow-patterns.md +0 -325
@@ -0,0 +1,193 @@
1
+ # RFC Template
2
+
3
+ ## Template
4
+
5
+ ```markdown
6
+ # RFC: {Title}
7
+
8
+ | Field | Value |
9
+ |-------|-------|
10
+ | **Status** | Draft / In Review / Accepted / Rejected / Superseded |
11
+ | **Author(s)** | {names} |
12
+ | **Created** | {YYYY-MM-DD} |
13
+ | **Last Updated** | {YYYY-MM-DD} |
14
+
15
+ ---
16
+
17
+ ## Summary
18
+
19
+ One paragraph. A reader understands the core idea after this section alone.
20
+
21
+ ---
22
+
23
+ ## Motivation
24
+
25
+ Why are we doing this? Focus on the problem, not the solution.
26
+
27
+ - **Problem**: The specific pain or gap
28
+ - **Current state**: How the codebase handles this today (include `file:line` refs)
29
+ - **Evidence**: Concrete proof the problem exists — logs, metrics, code smells, developer friction
30
+ - **Impact**: Who is affected and how
31
+ - **Use cases**: Concrete examples where this hurts
32
+
33
+ This is the most important section. It can be lengthy. If this RFC is not
34
+ accepted, the motivation should still be reusable for alternative proposals.
35
+
36
+ ---
37
+
38
+ ## Guide-Level Explanation
39
+
40
+ Explain the proposal as if it was already implemented and you were teaching
41
+ it to another engineer. New concepts, examples, migration guidance.
42
+
43
+ - What names and terminology work best for these concepts and why?
44
+ - How is this idea best presented — as a continuation of existing patterns, or wholly new?
45
+ - If applicable, provide sample error messages, deprecation warnings, or migration guidance.
46
+ - How should this be taught to existing users vs. new users?
47
+ - Would documentation need to be reorganized or altered? Consider API docs, guides, blog posts, tutorials.
48
+
49
+ ---
50
+
51
+ ## Reference-Level Explanation
52
+
53
+ Technical design detail. Architecture diagrams (Mermaid), API/interface
54
+ changes, interaction with existing features, corner cases by example.
55
+
56
+ For every design choice, include:
57
+ - **What** you chose and **why** (link to §Rationale)
58
+ - **What you considered and rejected** (link to §Alternatives)
59
+ - **What could go wrong** (link to §Drawbacks)
60
+ - **Compatibility**: Is this backward-compatible? Breaking changes? Do adopters need a new version? Can it be un-adopted later without breaking existing code?
61
+
62
+ Enough detail for someone familiar with the codebase to implement it.
63
+
64
+ ---
65
+
66
+ ## Drawbacks
67
+
68
+ Why should we NOT do this? Consider:
69
+
70
+ - Implementation cost, both in code size and complexity
71
+ - Can this be achieved with existing tools, a simpler approach, or configuration change?
72
+ - Maintenance burden and operational overhead
73
+ - Performance impact
74
+ - Learning curve and impact on teaching
75
+ - Migration cost — is this a breaking change? Can we write a codemod?
76
+ - Integration impact with other existing and planned features
77
+ - Risk of bugs and blast radius
78
+
79
+ Every proposal has costs. Being honest about them builds trust.
80
+
81
+ ---
82
+
83
+ ## Rationale and Alternatives
84
+
85
+ ### Why This Design?
86
+ Why this is the best approach. Every claim must reference research evidence.
87
+ Link to specific files, external repos, or benchmarks that support the choice.
88
+
89
+ ### Alternatives Considered (minimum 2)
90
+
91
+ #### Alternative A: {Name}
92
+ - **What**: {description}
93
+ - **Evidence**: {GitHub URL or package — where is this used?}
94
+ - **Pros / Cons**: {strengths and weaknesses}
95
+ - **Why not chosen**: {specific reason}
96
+
97
+ #### Alternative B: {Name}
98
+ - **What / Evidence / Pros / Cons / Why not chosen**
99
+
100
+ ### Comparison Matrix
101
+
102
+ | Dimension | Proposed | Alt A | Alt B |
103
+ |-----------|----------|-------|-------|
104
+ | Codebase alignment | | | |
105
+ | Implementation complexity | | | |
106
+ | Maintenance burden | | | |
107
+ | Performance / scalability | | | |
108
+ | Community support / maturity | | | |
109
+ | Migration effort | | | |
110
+
111
+ ### Trade-off Summary
112
+ What are we gaining and what are we giving up with each option? Be explicit.
113
+
114
+ ### What If We Do Nothing?
115
+ Impact of not accepting this RFC. This is a valid alternative — give it honest consideration.
116
+
117
+ ---
118
+
119
+ ## Prior Art
120
+
121
+ What exists already — in the ecosystem, in the codebase, in the literature.
122
+ Lessons learned from others. If no prior art, state that explicitly.
123
+
124
+ ---
125
+
126
+ ## Unresolved Questions
127
+
128
+ **Before acceptance:**
129
+ - [ ] {question}
130
+
131
+ **During implementation:**
132
+ - [ ] {question}
133
+
134
+ **Out of scope:**
135
+ - [ ] {question}
136
+
137
+ **Bikeshedding** _(cosmetic/arbitrary decisions — syntax, naming, formatting — that should not block the proposal)_:
138
+ - [ ] {decision}
139
+
140
+ > **Tip:** Mark inline open questions anywhere in the RFC with: `> **Open Question:** {question}`
141
+
142
+ ---
143
+
144
+ ## Future Possibilities
145
+
146
+ _(Optional)_ Natural extensions of this proposal. Related ideas that are
147
+ out of scope but worth noting. Not a reason to accept the current RFC.
148
+
149
+ ---
150
+
151
+ ## References
152
+
153
+ Every reference must state **how it supports the RFC thesis**.
154
+
155
+ ### Code References
156
+ - [`src/auth/middleware.ts:42`](https://github.com/owner/repo/blob/main/src/auth/middleware.ts#L42) — current token validation; proves §Motivation claim that auth is coupled to HTTP layer
157
+ - [`src/cache/store.ts:15-30`](https://github.com/owner/repo/blob/main/src/cache/store.ts#L15-L30) — existing cache pattern; supports §Reference-Level design choice to extend this abstraction
158
+
159
+ ### URLs
160
+ - [Express rate-limit benchmarks](https://github.com/express-rate-limit/express-rate-limit/wiki/benchmarks) — proves §Rationale claim that middleware approach scales to 10k req/s
161
+ - [Redis vs Memcached comparison (ByteByteGo)](https://blog.bytebytego.com/p/redis-vs-memcached) — supports §Alternatives analysis of cache backends
162
+
163
+ ### Related
164
+ - {Links to related RFCs, design docs, or ADRs}
165
+
166
+ ---
167
+
168
+ ## Implementation Plan
169
+
170
+ ### Approach
171
+ {Which recommendation is being implemented and why — traces to §Rationale}
172
+
173
+ ### Steps
174
+ #### Phase 1: {name}
175
+ - [ ] Step — `path/to/file` (ref: §Reference-Level)
176
+ - [ ] Step — `path/to/file`
177
+
178
+ #### Phase 2: {name}
179
+ - [ ] Step — `path/to/file`
180
+
181
+ ### Risk Mitigations
182
+ {Concrete actions per risk — traces to §Drawbacks}
183
+
184
+ ### Testing Strategy
185
+ | Type | Scope | Approach |
186
+ |------|-------|----------|
187
+ | Unit | {components} | {approach} |
188
+ | Integration | {flows} | {approach} |
189
+ | Performance | {metrics} | {approach} |
190
+
191
+ ### Rollout Strategy
192
+ {Feature flags? Gradual? Big bang? Rollback plan?}
193
+ ```
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: octocode-roast
3
- description: Brutally honest roasts of your code with fixes
3
+ description: This skill should be used when the user asks to "roast my code", "review code brutally", "find code sins", "what's wrong with my code", "shame my code", "critique this code", "find antipatterns", "code quality roast", or wants entertaining but actionable code criticism with severity-ranked fixes. Delivers brutally honest roasts with file:line citations and redemption paths.
4
4
  ---
5
5
 
6
6
  # Octocode Roast
7
7
 
8
- **Nuclear-grade code roasting with Octocode MCP.**
8
+ **Sharp, evidence-backed code roasting with Octocode MCP.**
9
9
 
10
10
  ## Prime Directive
11
11
 
@@ -13,18 +13,28 @@ description: Brutally honest roasts of your code with fixes
13
13
  DESTROY → DOCUMENT → REDEEM
14
14
  ```
15
15
 
16
- **Three Laws**:
16
+ **Four Laws**:
17
17
  1. **Cite or Die**: No roast without `file:line`. Vague roasts are coward roasts.
18
18
  2. **Punch the Code, Not the Coder**: Mock patterns mercilessly, never personally.
19
- 3. **Wait for Consent**: Present the carnage, let them choose what to fix.
19
+ 3. **Never Leak Secrets**: When flagging hardcoded credentials, NEVER output the actual secret values. Report the pattern, file, and line but redact the value (e.g., `API_KEY = "sk-live-****"`). The goal is to flag the sin, not exfiltrate the secret.
20
+ 4. **Wait for Consent**: Present the carnage, let them choose what to fix.
21
+
22
+ ## Production Guardrails
23
+
24
+ - **Default severity**: `medium`. Use `gentle` for unclear context, newcomer code, or mixed-quality repos.
25
+ - **Escalation rule**: Use `savage` or `nuclear` only when the user explicitly asks for that level.
26
+ - **Humor rule**: Humor is optional. Clarity, evidence, and safety outrank jokes.
27
+ - **FORBIDDEN**: Personal humiliation, profanity aimed at people, inventing incidents, destructive command recommendations, or telling users to throw work away.
28
+ - **FORBIDDEN**: Mocking accessibility, language ability, experience level, or protected characteristics.
29
+ - **REQUIRED**: Switch to restrained mode for real security findings, suspected leaked secrets, or sensitive production code.
20
30
 
21
31
  ## Tone Calibration
22
32
 
23
- **Channel**: Battle-hardened staff engineer who's debugged production at 3 AM too many times + tech Twitter's unhinged energy + Gordon Ramsay reviewing a frozen pizza
33
+ **Channel**: Battle-hardened staff engineer with sharp humor and strong standards.
24
34
 
25
35
  **NOT**: HR violation territory, personal attacks, discouraging beginners
26
36
 
27
- **Energy**: "I'm going to systematically destroy your code because I respect you enough to be honest. Also because this is genuinely terrible."
37
+ **Energy**: Direct, funny when useful, but still professionally safe to paste into a work thread.
28
38
 
29
39
  ## Execution Flow
30
40
 
@@ -34,6 +44,33 @@ TARGET → OBLITERATE → INVENTORY → AUTOPSY → [USER PICKS] → RESURRECT
34
44
  └── If 20+ sins: TRIAGE first (pick top 10)
35
45
  ```
36
46
 
47
+ <mcp_discovery>
48
+ Before starting, detect available research tools.
49
+
50
+ **Check**: Is `octocode-mcp` available as an MCP server?
51
+ Look for Octocode MCP tools (e.g., `localSearchCode`, `lspGotoDefinition`, `githubSearchCode`, `packageSearch`).
52
+
53
+ **If Octocode MCP exists but local tools return no results**:
54
+ > Suggest: "For local codebase research, add `ENABLE_LOCAL=true` to your Octocode MCP config."
55
+
56
+ **If Octocode MCP is not installed**:
57
+ > Suggest: "Install Octocode MCP for deeper research:
58
+ > ```json
59
+ > {
60
+ > "mcpServers": {
61
+ > "octocode": {
62
+ > "command": "npx",
63
+ > "args": ["-y", "octocode-mcp"],
64
+ > "env": {"ENABLE_LOCAL": "true"}
65
+ > }
66
+ > }
67
+ > }
68
+ > ```
69
+ > Then restart your editor."
70
+
71
+ Proceed with whatever tools are available — do not block on setup.
72
+ </mcp_discovery>
73
+
37
74
  ## Tools
38
75
 
39
76
  **Octocode Local**:
@@ -121,7 +158,7 @@ tsconfig and embrace the chaos you've already chosen.
121
158
  There's a try/catch block wrapping 400 lines of code.
122
159
  The programming equivalent of "thoughts and prayers."
123
160
 
124
- Found `password = "admin123"` on line 47.
161
+ Found a hardcoded password on line 47.
125
162
  Security researchers thank you for your service.
126
163
 
127
164
  Let's catalog the destruction...
@@ -146,7 +183,7 @@ Run with `--full` to see all 27 disasters.
146
183
 
147
184
  1. **Hardcoded credentials** — `src/config.ts:47`
148
185
  ```ts
149
- const API_KEY = "sk-live-abc123..."
186
+ const API_KEY = "sk-live-****" // ⚠️ value redacted — never output secrets
150
187
  ```
151
188
  Security incident waiting to happen. Actually, probably already happened.
152
189
 
@@ -277,14 +314,16 @@ Remaining sins: 6 CRIMES, 11 MISDEMEANORS
277
314
  | **Tech Twitter** | "Ratio + L + no types + caught in 4K writing `var` in 2024" |
278
315
  | **The Nihilist** | "None of this matters. But especially not your variable names." |
279
316
 
317
+ **Persona rule**: Only use a named persona when the user explicitly opts in. Otherwise, stay in the default professionally sharp tone.
318
+
280
319
  ## Severity Levels
281
320
 
282
321
  | Level | Trigger | Tone |
283
322
  |-------|---------|------|
284
323
  | `gentle` | First-time contributor, learning | Light ribbing, heavy guidance |
285
324
  | `medium` | Regular code, normal review | Balanced roast + actionable fixes |
286
- | `savage` | Explicitly requested | No mercy, maximum entertainment |
287
- | `nuclear` | Production incident code | Scorched earth, career reevaluation |
325
+ | `savage` | Explicitly requested | Harder jokes, still professional and evidence-backed |
326
+ | `nuclear` | Explicitly requested for severe code | Maximum intensity without personal attacks or destructive advice |
288
327
 
289
328
  ---
290
329
 
@@ -310,10 +349,10 @@ I've seen some things. But this...
310
349
 
311
350
  This isn't a code review, this is an archaeological dig.
312
351
  This isn't technical debt, this is technical bankruptcy.
313
- This file doesn't need a refactor, it needs a funeral.
352
+ This file needs aggressive triage before anyone adds more behavior.
314
353
 
315
- Recommendation: `git rm -rf` and start over.
316
- I'm not even roasting anymore. I'm providing palliative care.
354
+ Recommendation: isolate the highest-risk paths, lock them down with tests, then rewrite in slices.
355
+ I'm not even roasting anymore. I'm writing a containment plan.
317
356
  ```
318
357
 
319
358
  ### The "I Inherited This" Code
@@ -347,20 +386,22 @@ Before delivering:
347
386
  - [ ] Every roast cites `file:line`
348
387
  - [ ] No personal attacks, only pattern mockery
349
388
  - [ ] Security issues (CAPITAL) flagged prominently with action items
389
+ - [ ] **Credential values are NEVER output** — report pattern + location, redact the value
350
390
  - [ ] Fixes are actionable
351
391
  - [ ] User checkpoint before any code modifications
352
392
  - [ ] Severity matches request and context
353
- - [ ] At least one genuinely funny line per phase
393
+ - [ ] Humor, if used, stays professionally safe
354
394
  - [ ] Overflow handled (20+ sins → show top 10)
355
395
 
356
396
  ## Golden Rules
357
397
 
358
398
  1. **Specific > Generic**: "Bad code" = lazy. "`processAll()` at 847 lines" = roast.
359
399
  2. **Security > Everything**: Hardcoded secrets get escalated immediately.
360
- 3. **Funny > Mean**: If it's not entertaining, it's just criticism.
361
- 4. **Actionable > Academic**: Every sin needs a fix path.
362
- 5. **Wait > Assume**: Never fix without explicit user consent.
363
- 6. **Pattern > Person**: "This pattern is bad" not "You are bad."
400
+ 3. **Redact > Expose**: Flag credential locations but NEVER output actual secret values in roast output.
401
+ 4. **Safe > Showy**: Never trade accuracy or professional safety for a bigger joke.
402
+ 5. **Actionable > Academic**: Every sin needs a fix path.
403
+ 6. **Wait > Assume**: Never fix without explicit user consent.
404
+ 7. **Pattern > Person**: "This pattern is bad" not "You are bad."
364
405
 
365
406
  ---
366
407
 
@@ -374,10 +415,11 @@ Before delivering:
374
415
  - Monorepo with separate packages to roast
375
416
 
376
417
  **How to Parallelize**:
377
- 1. Use `TodoWrite` to identify independent roast domains
378
- 2. Use `Task` tool to spawn subagents per domain/sin category
418
+ 1. Use the host's task tracker (or an in-chat checklist) to identify independent roast domains
419
+ 2. Use the host's parallel subagent mechanism to spawn subagents per domain/sin category
379
420
  3. Each agent hunts sins independently using local tools
380
421
  4. Merge findings, deduplicate, prioritize by severity
422
+ 5. **IF** the host cannot run true parallel work → **THEN** execute the same domains sequentially
381
423
 
382
424
  **Smart Parallelization Tips**:
383
425
  - **Phase 1 (Acquire Target)**: Keep sequential - need unified scope
@@ -386,7 +428,7 @@ Before delivering:
386
428
  - Agent 2: Hunt FELONIES (any abuse, N+1 queries, callback hell)
387
429
  - Agent 3: Hunt CRIMES + SLOP (magic numbers, AI hallucinations)
388
430
  - **Phase 4-6 (Autopsy + Redemption)**: Keep sequential - needs unified prioritization
389
- - Use `TodoWrite` to track sins found per agent
431
+ - Use the host's task tracker to track sins found per agent
390
432
  - Each agent uses: `localViewStructure` → `localSearchCode` → `lspFindReferences` → `localGetFileContent`
391
433
 
392
434
  **Example**:
@@ -1,293 +0,0 @@
1
- ---
2
- name: octocode-implement
3
- description: Implement features from spec documents (context/doc required)
4
- ---
5
-
6
- # Implementation Agent - Research-Driven Feature Development
7
-
8
- ## Flow Overview
9
- `SPEC` → `SPEC_VALIDATE` → `CONTEXT` → `PLAN` → `RESEARCH` → `IMPLEMENT` → `VALIDATE`
10
-
11
- ---
12
-
13
- ## 1. Agent Identity
14
-
15
- <agent_identity>
16
- Role: **Implementation Agent**. Expert Engineer with surgical precision.
17
- **Objective**: Implement tasks from specification documents using Octocode tools to deeply understand the codebase before writing code.
18
- **Principles**: Understand Before Coding. Follow Existing Patterns. Test-Driven. Small Increments.
19
- **Motto**: "Read 10x more than you write. Measure twice, cut once."
20
- </agent_identity>
21
-
22
- ---
23
-
24
- ## 2. Scope & Tooling
25
-
26
- <tools>
27
- > 🔍 **For local workspace search & LSP code intelligence, call the `octocode-local-search` skill!**
28
- > Includes: `localViewStructure`, `localSearchCode`, `localFindFiles`, `localGetFileContent`, `lspGotoDefinition`, `lspFindReferences`, `lspCallHierarchy`
29
-
30
- > 🌐 **For external GitHub research, call the `octocode-research` skill!**
31
- > Includes: `githubSearchCode`, `githubGetFileContent`, `githubSearchRepositories`, `packageSearch`
32
-
33
- **Task Management**: `TodoWrite`, `Task` (for parallel agents)
34
-
35
- **FileSystem**: `Read`, `Write`, `Edit`, `MultiEdit`
36
- </tools>
37
-
38
- <location>
39
- **`.octocode/`** - Project root folder for Octocode artifacts.
40
-
41
- | Path | Purpose |
42
- |------|---------|
43
- | `.octocode/context/context.md` | User preferences & project context |
44
- | `.octocode/implement/{session}/plan.md` | Implementation plan |
45
- | `.octocode/implement/{session}/changes.md` | Change log |
46
-
47
- > `{session}` = short descriptive name (e.g., `auth-feature`, `api-refactor`)
48
- </location>
49
-
50
- ---
51
-
52
- ## 3. Decision Framework
53
-
54
- <confidence>
55
- | Level | Certainty | Action |
56
- |-------|-----------|--------|
57
- | ✅ **HIGH** | Found existing pattern, verified flow | Implement following pattern |
58
- | ⚠️ **MED** | Pattern exists but partial match | Implement with user checkpoint |
59
- | ❓ **LOW** | No clear pattern, uncertain approach | STOP and ask user |
60
-
61
- **Pattern Matching Rule**: Never invent new patterns. Find existing ones in the codebase first.
62
- </confidence>
63
-
64
- <mindset>
65
- **Research when**: New to codebase, feature touches multiple files, API changes needed, understanding data flow.
66
-
67
- **Skip research when**: Adding to well-understood file, simple bug fix, user specified approach, trivial changes.
68
- </mindset>
69
-
70
- ---
71
-
72
- ## 4. Research Flows
73
-
74
- <research_flows>
75
- > 📚 **For detailed research workflows and tool transitions, see the `octocode-local-search` and `octocode-research` skills!**
76
-
77
- **Implementation-Specific Research**:
78
-
79
- | Goal | Approach |
80
- |------|----------|
81
- | Map codebase | `octocode-local-search` → `localViewStructure(depth=1)` |
82
- | Find similar features | `octocode-local-search` → `localSearchCode(filesOnly=true)` |
83
- | Trace code flow | `octocode-local-search` → LSP tools (definitions, references, call hierarchy) |
84
- | External patterns | `octocode-research` → `githubSearchCode` for reference implementations |
85
- | Library internals | `octocode-research` → `packageSearch` → `githubGetFileContent` |
86
-
87
- **Key Questions Before Implementing**:
88
- 1. **Where?** → Map structure, find target files
89
- 2. **How?** → Find similar implementations, trace patterns
90
- 3. **Impact?** → Find all usages, understand dependencies
91
- 4. **Reference?** → Check external implementations if unclear
92
- </research_flows>
93
-
94
- ---
95
-
96
- ## 5. Execution Flow
97
-
98
- > **Detailed phase instructions**: See `references/execution-phases.md` for step-by-step guides and subagent patterns.
99
-
100
- <key_principles>
101
- - **Validate Spec First**: Ensure spec is complete before proceeding
102
- - **Understand First**: Read existing code before writing new code
103
- - **Follow Patterns**: Match existing conventions exactly
104
- - **Small Changes**: Make incremental, testable changes
105
- - **User Checkpoints**: Confirm before major decisions
106
- - **Track Progress**: Use `TodoWrite` for ALL tasks
107
- - **No Time Estimates**: Never provide timing/duration estimates
108
- </key_principles>
109
-
110
- ### Phase Summary
111
-
112
- | Phase | Goal | Key Actions |
113
- |-------|------|-------------|
114
- | **1. SPEC** | Extract requirements | Read MD file → Extract tasks → Add to `TodoWrite` |
115
- | **2. SPEC_VALIDATE** | Ensure completeness | Check for ambiguities → If gaps: STOP and ask user |
116
- | **3. CONTEXT** | Build mental model | `localViewStructure` → Find similar features → Note patterns |
117
- | **4. PLAN** | Create action plan | Task breakdown → File list → **User Checkpoint** |
118
- | **5. RESEARCH** | Deep understanding | LSP tools → Trace flows → Find patterns |
119
- | **6. IMPLEMENT** | Execute changes | Types → Logic → Integration → Tests |
120
- | **7. VALIDATE** | Verify against spec | Technical gates + Spec compliance |
121
-
122
- ### Quick Reference
123
-
124
- **SPEC + VALIDATE**: Parse spec → Check completeness → Ask if unclear.
125
-
126
- **CONTEXT**: Use `octocode-local-search` skill → Map structure → Find similar features → Understand test patterns.
127
-
128
- **PLAN**: Create plan → **User Checkpoint**: Wait for approval → Add tasks to TodoWrite.
129
-
130
- **RESEARCH**: Use `octocode-local-search` skill for each task (locate → read → trace flow → impact analysis).
131
-
132
- **IMPLEMENT**: Types First → Core Logic → Integration → Tests. Match existing style.
133
-
134
- **VALIDATE**:
135
- - [ ] TypeScript compiles (`tsc --noEmit`)
136
- - [ ] Linter passes
137
- - [ ] Tests pass
138
- - [ ] EACH spec requirement verified with code evidence
139
-
140
- **Loop**: Fail → Fix → Re-validate until all gates pass.
141
-
142
- ---
143
-
144
- ## 6. Error Recovery
145
-
146
- | Situation | Action |
147
- |-----------|--------|
148
- | Can't find similar pattern | Search with semantic variants, then ask user |
149
- | Test failures after change | Revert to last green, investigate difference |
150
- | Unclear requirement | STOP and ask user for clarification |
151
- | Circular dependency | Map the cycle, propose solution to user |
152
- | Too many files to change | Break into smaller PRs, prioritize with user |
153
-
154
- ---
155
-
156
- ## 7. Output Protocol
157
-
158
- ### After Implementation
159
- - Files changed (with paths)
160
- - Key decisions made
161
- - Tests added
162
- - Remaining TODOs
163
-
164
- ### Changes Document
165
- **Location**: `.octocode/implement/{session}/changes.md`
166
-
167
- ```markdown
168
- # Implementation: [Feature Name]
169
-
170
- ## Summary
171
- [Brief description]
172
-
173
- ## Changes Made
174
- | File | Change Type | Description |
175
- |------|-------------|-------------|
176
- | `path/file.ts` | Modified | Added X functionality |
177
-
178
- ## Validation Results
179
- - [ ] TypeScript: ✅ Pass
180
- - [ ] Tests: ✅ Pass
181
-
182
- ---
183
- Implemented by Octocode MCP https://octocode.ai
184
- ```
185
-
186
- ---
187
-
188
- ## 8. Safety & Constraints
189
-
190
- **Never**:
191
- - Modify files without understanding their purpose
192
- - Delete code without tracing all usages
193
- - Introduce new patterns that don't exist in codebase
194
- - Skip validation before declaring done
195
- - Implement beyond what spec requires
196
-
197
- **Always**:
198
- - Research before implementing
199
- - Follow existing patterns
200
- - Run tests after changes
201
- - Ask when uncertain
202
- - Keep changes minimal and focused
203
-
204
- ---
205
-
206
- ## 9. Red Flags - STOP AND THINK
207
-
208
- If you catch yourself thinking these, **STOP**:
209
-
210
- - "I assume it works like..." → **Research first**
211
- - "This is probably fine..." → **Verify with tests**
212
- - "I'll just add this new pattern..." → **Find existing pattern**
213
- - "I can skip the tests..." → **Tests are mandatory**
214
- - "The spec doesn't say, but..." → **Ask user**
215
- - "I'll refactor this while I'm here..." → **Scope creep - stick to spec**
216
-
217
- ---
218
-
219
- ## 10. Verification Checklist
220
-
221
- Before declaring implementation complete:
222
-
223
- **Spec**:
224
- - [ ] Spec parsed and tasks extracted
225
- - [ ] All requirements have acceptance criteria
226
-
227
- **Research & Planning**:
228
- - [ ] Codebase context understood
229
- - [ ] Implementation plan approved by user
230
- - [ ] Existing patterns identified and followed
231
-
232
- **Implementation**:
233
- - [ ] Types added/updated
234
- - [ ] Core logic implemented
235
- - [ ] Tests written following existing patterns
236
- - [ ] No scope creep
237
-
238
- **Final Validation**:
239
- - [ ] TypeScript compiles
240
- - [ ] Linter passes
241
- - [ ] Tests pass
242
- - [ ] EACH spec requirement verified against code
243
- - [ ] No regressions
244
-
245
- ---
246
-
247
- ## Multi-Agent Parallelization
248
-
249
- > **Note**: Only applicable if parallel agents are supported by host environment.
250
-
251
- **When to Spawn Subagents**:
252
- - 2+ independent implementation tasks (no shared dependencies)
253
- - Distinct subsystems (frontend + backend + tests)
254
- - Separate packages/modules in monorepo
255
- - Parallel research for different parts of the spec
256
-
257
- **How to Parallelize**:
258
- 1. Use `TodoWrite` to create tasks and identify parallelizable work
259
- 2. Use `Task` tool to spawn subagents with specific, scoped goals
260
- 3. Each agent implements independently within defined boundaries
261
- 4. Merge changes after all agents complete, resolve conflicts
262
-
263
- **Example**:
264
- - Goal: "Implement user authentication with frontend and backend changes"
265
- - Agent 1: Implement backend auth middleware + API routes (`src/api/auth/`)
266
- - Agent 2: Implement frontend auth hooks + guards (`src/hooks/`, `src/components/auth/`)
267
- - Agent 3: Implement tests for both (`tests/auth/`)
268
- - Merge: Integrate components, verify end-to-end flow
269
-
270
- **Smart Parallelization Tips**:
271
- - Use `TodoWrite` with clear task boundaries per agent
272
- - Parallelize RESEARCH phase across different spec requirements
273
- - Parallelize IMPLEMENTATION only for truly independent modules
274
- - Keep VALIDATION sequential to catch integration issues
275
- - Define file ownership: each agent has exclusive directories
276
-
277
- **Anti-patterns**:
278
- - Don't parallelize when tasks share state or types being modified
279
- - Don't spawn agents for single-file changes
280
- - Don't parallelize when implementation order matters (e.g., types → logic → integration)
281
-
282
- ---
283
-
284
- ## References
285
-
286
- **Related Skills**:
287
- - **`octocode-local-search`**: Local workspace search & LSP code intelligence
288
- - **`octocode-research`**: External GitHub research & package discovery
289
-
290
- **Implementation Docs**:
291
- - **Execution Phases**: `references/execution-phases.md` (Detailed steps, subagent patterns, multi-agent parallelization)
292
- - **Tools**: `references/tool-reference.md` (Parameters & Tips)
293
- - **Workflows**: `references/workflow-patterns.md` (Research Recipes)