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.
- package/LICENSE +21 -63
- package/README.md +85 -142
- package/out/octocode-cli.js +7063 -6934
- package/package.json +8 -6
- package/skills/README.md +97 -120
- package/skills/octocode-code-engineer/.claude/settings.local.json +18 -0
- package/skills/octocode-code-engineer/.octocode/rfc/RFC-code-engineer-weakness-fixes.md +255 -0
- package/skills/octocode-code-engineer/.plan/VALIDATED_PLAN.md +223 -0
- package/skills/octocode-code-engineer/README.md +178 -0
- package/skills/octocode-code-engineer/SKILL.md +418 -0
- package/skills/octocode-code-engineer/coverage/architecture.ts.html +7828 -0
- package/skills/octocode-code-engineer/coverage/ast-helpers.ts.html +211 -0
- package/skills/octocode-code-engineer/coverage/ast-search.ts.html +1795 -0
- package/skills/octocode-code-engineer/coverage/base.css +224 -0
- package/skills/octocode-code-engineer/coverage/block-navigation.js +87 -0
- package/skills/octocode-code-engineer/coverage/cache.ts.html +376 -0
- package/skills/octocode-code-engineer/coverage/cli.ts.html +982 -0
- package/skills/octocode-code-engineer/coverage/clover.xml +3217 -0
- package/skills/octocode-code-engineer/coverage/collect-effects.ts.html +664 -0
- package/skills/octocode-code-engineer/coverage/collect-input-sources.ts.html +577 -0
- package/skills/octocode-code-engineer/coverage/collect-performance.ts.html +331 -0
- package/skills/octocode-code-engineer/coverage/collect-prototype-pollution.ts.html +421 -0
- package/skills/octocode-code-engineer/coverage/collect-security.ts.html +604 -0
- package/skills/octocode-code-engineer/coverage/collect-test-profile.ts.html +589 -0
- package/skills/octocode-code-engineer/coverage/coverage-final.json +30 -0
- package/skills/octocode-code-engineer/coverage/dependencies.ts.html +997 -0
- package/skills/octocode-code-engineer/coverage/dependency-summary.ts.html +688 -0
- package/skills/octocode-code-engineer/coverage/discovery.ts.html +322 -0
- package/skills/octocode-code-engineer/coverage/favicon.png +0 -0
- package/skills/octocode-code-engineer/coverage/graph-analytics.ts.html +1510 -0
- package/skills/octocode-code-engineer/coverage/index.html +536 -0
- package/skills/octocode-code-engineer/coverage/index.ts.html +826 -0
- package/skills/octocode-code-engineer/coverage/metrics.ts.html +553 -0
- package/skills/octocode-code-engineer/coverage/pipeline.ts.html +2044 -0
- package/skills/octocode-code-engineer/coverage/prettify.css +1 -0
- package/skills/octocode-code-engineer/coverage/prettify.js +2 -0
- package/skills/octocode-code-engineer/coverage/report-analysis.ts.html +1570 -0
- package/skills/octocode-code-engineer/coverage/report-writer.ts.html +1102 -0
- package/skills/octocode-code-engineer/coverage/security-detectors.ts.html +1747 -0
- package/skills/octocode-code-engineer/coverage/semantic-detectors.ts.html +2152 -0
- package/skills/octocode-code-engineer/coverage/semantic.ts.html +1897 -0
- package/skills/octocode-code-engineer/coverage/sort-arrow-sprite.png +0 -0
- package/skills/octocode-code-engineer/coverage/sorter.js +210 -0
- package/skills/octocode-code-engineer/coverage/summary-md.ts.html +1222 -0
- package/skills/octocode-code-engineer/coverage/test-quality-detectors.ts.html +1039 -0
- package/skills/octocode-code-engineer/coverage/tree-sitter-analyzer.ts.html +955 -0
- package/skills/octocode-code-engineer/coverage/ts-analyzer.ts.html +1213 -0
- package/skills/octocode-code-engineer/coverage/types.ts.html +2473 -0
- package/skills/octocode-code-engineer/coverage/utils.ts.html +820 -0
- package/skills/octocode-code-engineer/eslint.config.mjs +54 -0
- package/skills/octocode-code-engineer/minify-scripts.mjs +32 -0
- package/skills/octocode-code-engineer/package.json +54 -0
- package/skills/octocode-code-engineer/references/agent-ast-reading-rfc.md +95 -0
- package/skills/octocode-code-engineer/references/architecture-techniques.md +121 -0
- package/skills/octocode-code-engineer/references/ast-search.md +210 -0
- package/skills/octocode-code-engineer/references/ast-tree-search.md +151 -0
- package/skills/octocode-code-engineer/references/cli-reference.md +167 -0
- package/skills/octocode-code-engineer/references/concepts.md +107 -0
- package/skills/octocode-code-engineer/references/finding-categories.md +128 -0
- package/skills/octocode-code-engineer/references/improvement-roadmap.md +304 -0
- package/skills/octocode-code-engineer/references/output-files.md +144 -0
- package/skills/octocode-code-engineer/references/playbooks.md +204 -0
- package/skills/octocode-code-engineer/references/present-results.md +136 -0
- package/skills/octocode-code-engineer/references/tool-workflows.md +566 -0
- package/skills/octocode-code-engineer/references/validate-investigate.md +225 -0
- package/skills/octocode-code-engineer/scripts/analysis/dependencies.js +1 -0
- package/skills/octocode-code-engineer/scripts/analysis/dependency-summary.js +1 -0
- package/skills/octocode-code-engineer/scripts/analysis/discovery.js +1 -0
- package/skills/octocode-code-engineer/scripts/analysis/graph-analytics.js +1 -0
- package/skills/octocode-code-engineer/scripts/analysis/semantic.js +1 -0
- package/skills/octocode-code-engineer/scripts/ast/helpers.js +1 -0
- package/skills/octocode-code-engineer/scripts/ast/metrics.js +1 -0
- package/skills/octocode-code-engineer/scripts/ast/search.js +2 -0
- package/skills/octocode-code-engineer/scripts/ast/tree-search.js +2 -0
- package/skills/octocode-code-engineer/scripts/ast/tree-sitter.js +1 -0
- package/skills/octocode-code-engineer/scripts/ast/ts-analyzer.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/chains.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/effects.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/input-sources.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/performance.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/prototype-pollution.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/security.js +1 -0
- package/skills/octocode-code-engineer/scripts/collectors/test-profile.js +1 -0
- package/skills/octocode-code-engineer/scripts/common/is-direct-run.js +1 -0
- package/skills/octocode-code-engineer/scripts/common/utils.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/code-quality.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/cohesion.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/coupling.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/cycle.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/dead-code.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/import-style.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/index.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/security.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/semantic.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/shared.js +1 -0
- package/skills/octocode-code-engineer/scripts/detectors/test-quality.js +1 -0
- package/skills/octocode-code-engineer/scripts/index.js +1 -0
- package/skills/octocode-code-engineer/scripts/pipeline/cache.js +1 -0
- package/skills/octocode-code-engineer/scripts/pipeline/cli.js +1 -0
- package/skills/octocode-code-engineer/scripts/pipeline/main.js +2 -0
- package/skills/octocode-code-engineer/scripts/reporting/analysis.js +1 -0
- package/skills/octocode-code-engineer/scripts/reporting/summary-md.js +1 -0
- package/skills/octocode-code-engineer/scripts/reporting/writer.js +1 -0
- package/skills/octocode-code-engineer/scripts/types/constants.js +1 -0
- package/skills/octocode-code-engineer/scripts/types/index.js +1 -0
- package/skills/octocode-code-engineer/scripts/types/interfaces.js +1 -0
- package/skills/octocode-code-engineer/src/analysis/dependencies.test.ts +545 -0
- package/skills/octocode-code-engineer/src/analysis/dependencies.ts +406 -0
- package/skills/octocode-code-engineer/src/analysis/dependency-summary.test.ts +566 -0
- package/skills/octocode-code-engineer/src/analysis/dependency-summary.ts +257 -0
- package/skills/octocode-code-engineer/src/analysis/discovery.test.ts +420 -0
- package/skills/octocode-code-engineer/src/analysis/discovery.ts +87 -0
- package/skills/octocode-code-engineer/src/analysis/graph-analytics.test.ts +449 -0
- package/skills/octocode-code-engineer/src/analysis/graph-analytics.ts +534 -0
- package/skills/octocode-code-engineer/src/analysis/semantic.test.ts +1533 -0
- package/skills/octocode-code-engineer/src/analysis/semantic.ts +830 -0
- package/skills/octocode-code-engineer/src/ast/helpers.test.ts +185 -0
- package/skills/octocode-code-engineer/src/ast/helpers.ts +62 -0
- package/skills/octocode-code-engineer/src/ast/metrics.test.ts +304 -0
- package/skills/octocode-code-engineer/src/ast/metrics.ts +204 -0
- package/skills/octocode-code-engineer/src/ast/search.test.ts +647 -0
- package/skills/octocode-code-engineer/src/ast/search.ts +648 -0
- package/skills/octocode-code-engineer/src/ast/tree-search.test.ts +199 -0
- package/skills/octocode-code-engineer/src/ast/tree-search.ts +392 -0
- package/skills/octocode-code-engineer/src/ast/tree-sitter.test.ts +407 -0
- package/skills/octocode-code-engineer/src/ast/tree-sitter.ts +402 -0
- package/skills/octocode-code-engineer/src/ast/ts-analyzer.test.ts +1864 -0
- package/skills/octocode-code-engineer/src/ast/ts-analyzer.ts +509 -0
- package/skills/octocode-code-engineer/src/collectors/chains.ts +74 -0
- package/skills/octocode-code-engineer/src/collectors/effects.test.ts +490 -0
- package/skills/octocode-code-engineer/src/collectors/effects.ts +332 -0
- package/skills/octocode-code-engineer/src/collectors/input-sources.test.ts +144 -0
- package/skills/octocode-code-engineer/src/collectors/input-sources.ts +196 -0
- package/skills/octocode-code-engineer/src/collectors/performance.test.ts +82 -0
- package/skills/octocode-code-engineer/src/collectors/performance.ts +141 -0
- package/skills/octocode-code-engineer/src/collectors/prototype-pollution.test.ts +55 -0
- package/skills/octocode-code-engineer/src/collectors/prototype-pollution.ts +162 -0
- package/skills/octocode-code-engineer/src/collectors/security.test.ts +124 -0
- package/skills/octocode-code-engineer/src/collectors/security.ts +309 -0
- package/skills/octocode-code-engineer/src/collectors/test-profile.test.ts +97 -0
- package/skills/octocode-code-engineer/src/collectors/test-profile.ts +269 -0
- package/skills/octocode-code-engineer/src/common/is-direct-run.test.ts +32 -0
- package/skills/octocode-code-engineer/src/common/is-direct-run.ts +13 -0
- package/skills/octocode-code-engineer/src/common/utils.test.ts +463 -0
- package/skills/octocode-code-engineer/src/common/utils.ts +304 -0
- package/skills/octocode-code-engineer/src/detectors/code-quality.ts +966 -0
- package/skills/octocode-code-engineer/src/detectors/cohesion.ts +539 -0
- package/skills/octocode-code-engineer/src/detectors/coupling.ts +323 -0
- package/skills/octocode-code-engineer/src/detectors/cycle.ts +349 -0
- package/skills/octocode-code-engineer/src/detectors/dead-code.ts +320 -0
- package/skills/octocode-code-engineer/src/detectors/import-style.ts +376 -0
- package/skills/octocode-code-engineer/src/detectors/index.test.ts +3061 -0
- package/skills/octocode-code-engineer/src/detectors/index.ts +88 -0
- package/skills/octocode-code-engineer/src/detectors/security.test.ts +882 -0
- package/skills/octocode-code-engineer/src/detectors/security.ts +821 -0
- package/skills/octocode-code-engineer/src/detectors/semantic.ts +758 -0
- package/skills/octocode-code-engineer/src/detectors/shared.ts +49 -0
- package/skills/octocode-code-engineer/src/detectors/test-quality.test.ts +388 -0
- package/skills/octocode-code-engineer/src/detectors/test-quality.ts +367 -0
- package/skills/octocode-code-engineer/src/index.test.ts +4425 -0
- package/skills/octocode-code-engineer/src/index.ts +403 -0
- package/skills/octocode-code-engineer/src/pipeline/cache.test.ts +199 -0
- package/skills/octocode-code-engineer/src/pipeline/cache.ts +130 -0
- package/skills/octocode-code-engineer/src/pipeline/cli.test.ts +493 -0
- package/skills/octocode-code-engineer/src/pipeline/cli.ts +344 -0
- package/skills/octocode-code-engineer/src/pipeline/main.test.ts +174 -0
- package/skills/octocode-code-engineer/src/pipeline/main.ts +1074 -0
- package/skills/octocode-code-engineer/src/pipeline.test.ts +84 -0
- package/skills/octocode-code-engineer/src/reporting/analysis.test.ts +782 -0
- package/skills/octocode-code-engineer/src/reporting/analysis.ts +688 -0
- package/skills/octocode-code-engineer/src/reporting/output-contract.test.ts +463 -0
- package/skills/octocode-code-engineer/src/reporting/summary-md.test.ts +421 -0
- package/skills/octocode-code-engineer/src/reporting/summary-md.ts +714 -0
- package/skills/octocode-code-engineer/src/reporting/writer.ts +430 -0
- package/skills/octocode-code-engineer/src/sanity.test.ts +47 -0
- package/skills/octocode-code-engineer/src/types/constants.ts +248 -0
- package/skills/octocode-code-engineer/src/types/index.ts +80 -0
- package/skills/octocode-code-engineer/src/types/interfaces.ts +682 -0
- package/skills/octocode-code-engineer/tsconfig.json +17 -0
- package/skills/octocode-code-engineer/vitest.config.ts +8 -0
- package/skills/octocode-documentation-writer/README.md +113 -0
- package/skills/octocode-documentation-writer/SKILL.md +886 -0
- package/skills/octocode-documentation-writer/references/agent-discovery-analysis.md +453 -0
- package/skills/octocode-documentation-writer/references/agent-documentation-writer.md +255 -0
- package/skills/octocode-documentation-writer/references/agent-engineer-questions.md +247 -0
- package/skills/octocode-documentation-writer/references/agent-orchestrator.md +370 -0
- package/skills/octocode-documentation-writer/references/agent-qa-validator.md +227 -0
- package/skills/octocode-documentation-writer/references/agent-researcher.md +250 -0
- package/skills/octocode-documentation-writer/schemas/analysis-schema.json +886 -0
- package/skills/octocode-documentation-writer/schemas/discovery-tasks.json +96 -0
- package/skills/octocode-documentation-writer/schemas/documentation-structure.json +373 -0
- package/skills/octocode-documentation-writer/schemas/partial-discovery-schema.json +102 -0
- package/skills/octocode-documentation-writer/schemas/partial-research-schema.json +98 -0
- package/skills/octocode-documentation-writer/schemas/qa-results-schema.json +113 -0
- package/skills/octocode-documentation-writer/schemas/questions-schema.json +228 -0
- package/skills/octocode-documentation-writer/schemas/research-schema.json +104 -0
- package/skills/octocode-documentation-writer/schemas/state-schema.json +222 -0
- package/skills/octocode-documentation-writer/schemas/work-assignments-schema.json +74 -0
- package/skills/octocode-plan/SKILL.md +122 -116
- package/skills/octocode-prompt-optimizer/SKILL.md +617 -0
- package/skills/octocode-pull-request-reviewer/README.md +249 -0
- package/skills/octocode-pull-request-reviewer/SKILL.md +479 -0
- package/skills/octocode-pull-request-reviewer/references/dependency-check.md +74 -0
- package/skills/octocode-pull-request-reviewer/references/domain-reviewers.md +24 -0
- package/skills/octocode-pull-request-reviewer/references/execution-lifecycle.md +441 -0
- package/skills/octocode-pull-request-reviewer/references/flow-analysis-protocol.md +64 -0
- package/skills/octocode-pull-request-reviewer/references/output-template.md +174 -0
- package/skills/octocode-pull-request-reviewer/references/parallel-agent-protocol.md +182 -0
- package/skills/octocode-pull-request-reviewer/references/review-guidelines.md +26 -0
- package/skills/octocode-pull-request-reviewer/references/verification-checklist.md +40 -0
- package/skills/octocode-research/.claude/settings.local.json +46 -0
- package/skills/octocode-research/.octocode/plan/code-review-fixes/plan.md +312 -0
- package/skills/octocode-research/.octocode/plan/code-review-fixes/research.md +212 -0
- package/skills/octocode-research/.octocode/plans/NODE_SERVER_START_PLAN.md +755 -0
- package/skills/octocode-research/.octocode/research/code-review/research.md +371 -0
- package/skills/octocode-research/.octocode/review/IMPROVEMENTS.md +391 -0
- package/skills/octocode-research/.octocode/review/REVIEW_PLAN.md +289 -0
- package/skills/octocode-research/.octocode/review/REVIEW_REPORT.md +356 -0
- package/skills/octocode-research/AGENTS.md +349 -0
- package/skills/octocode-research/README.md +494 -0
- package/skills/octocode-research/SKILL.md +652 -274
- package/skills/octocode-research/docs/API_REFERENCE.md +562 -0
- package/skills/octocode-research/docs/ARCHITECTURE.md +554 -0
- package/skills/octocode-research/docs/FLOWS.md +577 -0
- package/skills/octocode-research/docs/OVERVIEW.md +564 -0
- package/skills/octocode-research/docs/SERVER_FLOWS.md +631 -0
- package/skills/octocode-research/ecosystem.config.cjs +88 -0
- package/skills/octocode-research/eslint.config.mjs +27 -0
- package/skills/octocode-research/package.json +84 -0
- package/skills/octocode-research/references/GUARDRAILS.md +40 -0
- package/skills/octocode-research/references/PARALLEL_AGENT_PROTOCOL.md +178 -0
- package/skills/octocode-research/references/roast-prompt.md +149 -0
- package/skills/octocode-research/scripts/server-init.d.ts +2 -0
- package/skills/octocode-research/scripts/server-init.js +2 -0
- package/skills/octocode-research/scripts/server.d.ts +8 -0
- package/skills/octocode-research/scripts/server.js +445 -0
- package/skills/octocode-research/src/__tests__/integration/circuitBreaker.test.ts +205 -0
- package/skills/octocode-research/src/__tests__/integration/routes.test.ts +374 -0
- package/skills/octocode-research/src/__tests__/unit/circuitBreaker.test.ts +245 -0
- package/skills/octocode-research/src/__tests__/unit/errorHandler.test.ts +183 -0
- package/skills/octocode-research/src/__tests__/unit/httpPreprocess.test.ts +157 -0
- package/skills/octocode-research/src/__tests__/unit/logger.test.ts +143 -0
- package/skills/octocode-research/src/__tests__/unit/queryParser.test.ts +130 -0
- package/skills/octocode-research/src/__tests__/unit/responseBuilder.test.ts +469 -0
- package/skills/octocode-research/src/__tests__/unit/retry.test.ts +205 -0
- package/skills/octocode-research/src/index.ts +186 -0
- package/skills/octocode-research/src/mcpCache.ts +49 -0
- package/skills/octocode-research/src/middleware/errorHandler.ts +65 -0
- package/skills/octocode-research/src/middleware/logger.ts +61 -0
- package/skills/octocode-research/src/middleware/queryParser.ts +115 -0
- package/skills/octocode-research/src/middleware/readiness.ts +17 -0
- package/skills/octocode-research/src/routes/github.ts +197 -0
- package/skills/octocode-research/src/routes/local.ts +175 -0
- package/skills/octocode-research/src/routes/lsp.ts +177 -0
- package/skills/octocode-research/src/routes/package.ts +127 -0
- package/skills/octocode-research/src/routes/prompts.ts +138 -0
- package/skills/octocode-research/src/routes/tools.ts +677 -0
- package/skills/octocode-research/src/server-init.ts +363 -0
- package/skills/octocode-research/src/server.ts +285 -0
- package/skills/octocode-research/src/types/errorGuards.ts +151 -0
- package/skills/octocode-research/src/types/express.d.ts +76 -0
- package/skills/octocode-research/src/types/guards.ts +98 -0
- package/skills/octocode-research/src/types/mcp.ts +119 -0
- package/skills/octocode-research/src/types/responses.ts +199 -0
- package/skills/octocode-research/src/types/toolTypes.ts +33 -0
- package/skills/octocode-research/src/utils/asyncTimeout.ts +116 -0
- package/skills/octocode-research/src/utils/circuitBreaker.ts +492 -0
- package/skills/octocode-research/src/utils/colors.ts +53 -0
- package/skills/octocode-research/src/utils/errorQueue.ts +71 -0
- package/skills/octocode-research/src/utils/logEmoji.ts +103 -0
- package/skills/octocode-research/src/utils/logger.ts +413 -0
- package/skills/octocode-research/src/utils/resilience.ts +169 -0
- package/skills/octocode-research/src/utils/responseBuilder.ts +495 -0
- package/skills/octocode-research/src/utils/responseFactory.ts +100 -0
- package/skills/octocode-research/src/utils/responseParser.ts +272 -0
- package/skills/octocode-research/src/utils/retry.ts +280 -0
- package/skills/octocode-research/src/utils/routeFactory.ts +117 -0
- package/skills/octocode-research/src/utils/url.ts +20 -0
- package/skills/octocode-research/src/validation/httpPreprocess.ts +155 -0
- package/skills/octocode-research/src/validation/index.ts +2 -0
- package/skills/octocode-research/src/validation/schemas.ts +578 -0
- package/skills/octocode-research/src/validation/toolCallSchema.ts +132 -0
- package/skills/octocode-research/tsconfig.json +21 -0
- package/skills/octocode-research/tsdown.config.ts +42 -0
- package/skills/octocode-research/vitest.config.ts +20 -0
- package/skills/octocode-researcher/SKILL.md +461 -0
- package/skills/octocode-researcher/references/fallbacks.md +120 -0
- package/skills/{octocode-local-search → octocode-researcher}/references/tool-reference.md +132 -49
- package/skills/{octocode-local-search → octocode-researcher}/references/workflow-patterns.md +204 -4
- package/skills/octocode-rfc-generator/SKILL.md +223 -0
- package/skills/octocode-rfc-generator/references/rfc-template.md +193 -0
- package/skills/octocode-roast/SKILL.md +63 -21
- package/skills/octocode-implement/SKILL.md +0 -293
- package/skills/octocode-implement/references/execution-phases.md +0 -317
- package/skills/octocode-implement/references/tool-reference.md +0 -403
- package/skills/octocode-implement/references/workflow-patterns.md +0 -385
- package/skills/octocode-local-search/SKILL.md +0 -449
- package/skills/octocode-pr-review/SKILL.md +0 -391
- package/skills/octocode-pr-review/references/domain-reviewers.md +0 -105
- package/skills/octocode-pr-review/references/execution-lifecycle.md +0 -116
- package/skills/octocode-pr-review/references/research-flows.md +0 -75
- package/skills/octocode-research/references/tool-reference.md +0 -304
- 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:
|
|
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
|
-
**
|
|
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
|
-
**
|
|
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. **
|
|
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
|
|
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**:
|
|
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
|
|
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
|
|
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 |
|
|
287
|
-
| `nuclear` |
|
|
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
|
|
352
|
+
This file needs aggressive triage before anyone adds more behavior.
|
|
314
353
|
|
|
315
|
-
Recommendation:
|
|
316
|
-
I'm not even roasting anymore. I'm
|
|
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
|
-
- [ ]
|
|
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. **
|
|
361
|
-
4. **
|
|
362
|
-
5. **
|
|
363
|
-
6. **
|
|
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
|
|
378
|
-
2. Use
|
|
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
|
|
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)
|