octocode-cli 1.2.8 → 1.2.10
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/README.md +45 -38
- package/out/octocode-cli.js +73 -11763
- package/package.json +35 -36
- package/skills/README.md +42 -114
- package/skills/{octocode-code-engineer → octocode-engineer}/.claude/settings.local.json +2 -1
- package/skills/octocode-engineer/README.md +99 -0
- package/skills/octocode-engineer/SKILL.md +413 -0
- package/skills/octocode-engineer/build.mjs +29 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/eslint.config.mjs +3 -13
- package/skills/{octocode-code-engineer → octocode-engineer}/package.json +28 -27
- package/skills/octocode-engineer/references/ast-reference.md +166 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/references/cli-reference.md +80 -6
- package/skills/octocode-engineer/references/externals.md +86 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/references/output-files.md +46 -6
- package/skills/octocode-engineer/references/quality-indicators.md +202 -0
- package/skills/octocode-engineer/references/tool-workflows.md +298 -0
- package/skills/octocode-engineer/references/validation-playbooks.md +99 -0
- package/skills/octocode-engineer/scripts/ast/search.js +45 -0
- package/skills/octocode-engineer/scripts/ast/tree-search.js +27 -0
- package/skills/octocode-engineer/scripts/index.js +173 -0
- package/skills/octocode-engineer/scripts/run.js +179 -0
- package/skills/octocode-engineer/src/analysis/dependencies.ts +378 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/discovery.test.ts +57 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/discovery.ts +43 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/search.test.ts +113 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/search.ts +64 -1
- package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/tree-sitter.test.ts +118 -2
- package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/tree-sitter.ts +65 -3
- package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/ts-analyzer.test.ts +281 -1
- package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/ts-analyzer.ts +173 -3
- package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/security.test.ts +73 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/security.ts +62 -4
- package/skills/octocode-engineer/src/detector-gating.test.ts +59 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/code-quality.ts +342 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/index.ts +8 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/index.test.ts +565 -11
- package/skills/octocode-engineer/src/index.ts +468 -0
- package/skills/octocode-engineer/src/pipeline/affected.test.ts +147 -0
- package/skills/octocode-engineer/src/pipeline/affected.ts +68 -0
- package/skills/octocode-engineer/src/pipeline/baseline.test.ts +276 -0
- package/skills/octocode-engineer/src/pipeline/baseline.ts +76 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline/cli.test.ts +300 -53
- package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline/cli.ts +180 -36
- package/skills/octocode-engineer/src/pipeline/config-loader.test.ts +264 -0
- package/skills/octocode-engineer/src/pipeline/config-loader.ts +109 -0
- package/skills/octocode-engineer/src/pipeline/create-options.ts +55 -0
- package/skills/octocode-engineer/src/pipeline/health-score.test.ts +65 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline/main.ts +130 -17
- package/skills/octocode-engineer/src/pipeline/progress.ts +51 -0
- package/skills/octocode-engineer/src/pipeline/reporters.test.ts +155 -0
- package/skills/octocode-engineer/src/pipeline/reporters.ts +64 -0
- package/skills/octocode-engineer/src/reporting/graph-features.test.ts +279 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/reporting/output-contract.test.ts +6 -0
- package/skills/octocode-engineer/src/reporting/summary-md.test.ts +1066 -0
- package/skills/octocode-engineer/src/reporting/summary-md.ts +1604 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/reporting/writer.ts +136 -13
- package/skills/octocode-engineer/src/run.ts +78 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/sanity.test.ts +1 -1
- package/skills/octocode-engineer/src/types/analysis.ts +25 -0
- package/skills/octocode-engineer/src/types/collectors.ts +134 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/types/constants.ts +75 -41
- package/skills/octocode-engineer/src/types/core.ts +203 -0
- package/skills/octocode-engineer/src/types/dependency.ts +215 -0
- package/skills/octocode-engineer/src/types/file-entry.ts +108 -0
- package/skills/octocode-engineer/src/types/findings.ts +105 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/src/types/index.ts +60 -30
- package/skills/octocode-engineer/src/types/tree-sitter.ts +38 -0
- package/skills/{octocode-code-engineer → octocode-engineer}/tsconfig.json +1 -0
- package/skills/octocode-research/.octocode/scan/.cache/analysis-cache.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/architecture.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/ast-trees.txt +5566 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/code-quality.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/dead-code.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/file-inventory.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/findings.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/graph.md +189 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/security.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/summary.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-32-27-073Z/summary.md +265 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/architecture.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/ast-trees.txt +5555 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/code-quality.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/dead-code.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/file-inventory.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/findings.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/graph.md +190 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/security.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/summary.json +1 -0
- package/skills/octocode-research/.octocode/scan/2026-03-22T10-40-10-469Z/summary.md +265 -0
- package/skills/octocode-research/CHANGELOG.md +60 -0
- package/skills/octocode-research/README.md +102 -388
- package/skills/octocode-research/SKILL.md +169 -498
- package/skills/octocode-research/package.json +19 -31
- package/skills/octocode-research/references/PARALLEL_AGENT_PROTOCOL.md +19 -0
- package/skills/octocode-research/references/SESSION_MANAGEMENT.md +38 -0
- package/skills/octocode-research/scripts/server-init.js +1 -1
- package/skills/octocode-research/scripts/server.d.ts +2 -1
- package/skills/octocode-research/scripts/server.js +329 -233
- package/skills/octocode-research/src/__tests__/integration/promptsRoutes.test.ts +180 -0
- package/skills/octocode-research/src/__tests__/integration/serverHttp.test.ts +221 -0
- package/skills/octocode-research/src/__tests__/integration/serverLifecycle.test.ts +194 -0
- package/skills/octocode-research/src/__tests__/integration/toolsRoutes.test.ts +501 -0
- package/skills/octocode-research/src/__tests__/unit/readiness.test.ts +61 -0
- package/skills/octocode-research/src/__tests__/unit/resilience.test.ts +192 -0
- package/skills/octocode-research/src/__tests__/unit/responseFactory.test.ts +172 -0
- package/skills/octocode-research/src/__tests__/unit/responseParser.test.ts +288 -0
- package/skills/octocode-research/src/__tests__/unit/schemas.test.ts +509 -0
- package/skills/octocode-research/src/index.ts +4 -124
- package/skills/octocode-research/src/middleware/queryParser.ts +0 -26
- package/skills/octocode-research/src/routes/lsp.ts +58 -59
- package/skills/octocode-research/src/routes/package.ts +35 -65
- package/skills/octocode-research/src/routes/prompts.ts +3 -3
- package/skills/octocode-research/src/routes/tools.ts +8 -20
- package/skills/octocode-research/src/server-init.ts +30 -237
- package/skills/octocode-research/src/server.ts +50 -23
- package/skills/octocode-research/src/types/errorGuards.ts +9 -80
- package/skills/octocode-research/src/types/guards.ts +0 -28
- package/skills/octocode-research/src/types/mcp.ts +11 -66
- package/skills/octocode-research/src/types/responses.ts +11 -129
- package/skills/octocode-research/src/utils/circuitBreaker.ts +0 -21
- package/skills/octocode-research/src/utils/logger.ts +1 -97
- package/skills/octocode-research/src/utils/resilience.ts +2 -12
- package/skills/octocode-research/src/utils/responseFactory.ts +0 -42
- package/skills/octocode-research/src/utils/responseParser.ts +3 -25
- package/skills/octocode-research/src/utils/retry.ts +0 -63
- package/skills/octocode-research/src/utils/routeFactory.ts +1 -1
- package/skills/octocode-research/src/validation/httpPreprocess.ts +0 -3
- package/skills/octocode-research/src/validation/index.ts +0 -1
- package/skills/octocode-research/src/validation/schemas.ts +0 -63
- package/skills/octocode-research/src/validation/toolCallSchema.ts +3 -3
- package/skills/octocode-research/tsdown.config.ts +4 -0
- package/skills/octocode-research/vitest.config.ts +3 -0
- package/skills/octocode-code-engineer/.plan/VALIDATED_PLAN.md +0 -223
- package/skills/octocode-code-engineer/README.md +0 -178
- package/skills/octocode-code-engineer/SKILL.md +0 -418
- package/skills/octocode-code-engineer/minify-scripts.mjs +0 -32
- package/skills/octocode-code-engineer/references/agent-ast-reading-rfc.md +0 -95
- package/skills/octocode-code-engineer/references/architecture-techniques.md +0 -121
- package/skills/octocode-code-engineer/references/ast-search.md +0 -210
- package/skills/octocode-code-engineer/references/ast-tree-search.md +0 -151
- package/skills/octocode-code-engineer/references/concepts.md +0 -107
- package/skills/octocode-code-engineer/references/finding-categories.md +0 -128
- package/skills/octocode-code-engineer/references/improvement-roadmap.md +0 -304
- package/skills/octocode-code-engineer/references/playbooks.md +0 -204
- package/skills/octocode-code-engineer/references/present-results.md +0 -136
- package/skills/octocode-code-engineer/references/tool-workflows.md +0 -566
- package/skills/octocode-code-engineer/references/validate-investigate.md +0 -225
- package/skills/octocode-code-engineer/scripts/analysis/dependencies.js +0 -1
- package/skills/octocode-code-engineer/scripts/analysis/dependency-summary.js +0 -1
- package/skills/octocode-code-engineer/scripts/analysis/discovery.js +0 -1
- package/skills/octocode-code-engineer/scripts/analysis/graph-analytics.js +0 -1
- package/skills/octocode-code-engineer/scripts/analysis/semantic.js +0 -1
- package/skills/octocode-code-engineer/scripts/ast/helpers.js +0 -1
- package/skills/octocode-code-engineer/scripts/ast/metrics.js +0 -1
- package/skills/octocode-code-engineer/scripts/ast/search.js +0 -2
- package/skills/octocode-code-engineer/scripts/ast/tree-search.js +0 -2
- package/skills/octocode-code-engineer/scripts/ast/tree-sitter.js +0 -1
- package/skills/octocode-code-engineer/scripts/ast/ts-analyzer.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/chains.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/effects.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/input-sources.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/performance.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/prototype-pollution.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/security.js +0 -1
- package/skills/octocode-code-engineer/scripts/collectors/test-profile.js +0 -1
- package/skills/octocode-code-engineer/scripts/common/is-direct-run.js +0 -1
- package/skills/octocode-code-engineer/scripts/common/utils.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/code-quality.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/cohesion.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/coupling.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/cycle.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/dead-code.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/import-style.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/index.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/security.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/semantic.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/shared.js +0 -1
- package/skills/octocode-code-engineer/scripts/detectors/test-quality.js +0 -1
- package/skills/octocode-code-engineer/scripts/index.js +0 -1
- package/skills/octocode-code-engineer/scripts/pipeline/cache.js +0 -1
- package/skills/octocode-code-engineer/scripts/pipeline/cli.js +0 -1
- package/skills/octocode-code-engineer/scripts/pipeline/main.js +0 -2
- package/skills/octocode-code-engineer/scripts/reporting/analysis.js +0 -1
- package/skills/octocode-code-engineer/scripts/reporting/summary-md.js +0 -1
- package/skills/octocode-code-engineer/scripts/reporting/writer.js +0 -1
- package/skills/octocode-code-engineer/scripts/types/constants.js +0 -1
- package/skills/octocode-code-engineer/scripts/types/index.js +0 -1
- package/skills/octocode-code-engineer/scripts/types/interfaces.js +0 -1
- package/skills/octocode-code-engineer/src/analysis/dependencies.ts +0 -406
- package/skills/octocode-code-engineer/src/index.ts +0 -403
- package/skills/octocode-code-engineer/src/reporting/summary-md.test.ts +0 -421
- package/skills/octocode-code-engineer/src/reporting/summary-md.ts +0 -714
- package/skills/octocode-code-engineer/src/types/interfaces.ts +0 -682
- package/skills/octocode-research/src/types/toolTypes.ts +0 -33
- package/skills/octocode-research/src/utils/logEmoji.ts +0 -103
- /package/skills/{octocode-code-engineer → octocode-engineer}/.octocode/rfc/RFC-code-engineer-weakness-fixes.md +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/architecture.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/ast-helpers.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/ast-search.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/base.css +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/block-navigation.js +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/cache.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/cli.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/clover.xml +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/collect-effects.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/collect-input-sources.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/collect-performance.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/collect-prototype-pollution.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/collect-security.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/collect-test-profile.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/coverage-final.json +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/dependencies.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/dependency-summary.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/discovery.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/favicon.png +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/graph-analytics.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/index.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/index.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/metrics.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/pipeline.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/prettify.css +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/prettify.js +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/report-analysis.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/report-writer.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/security-detectors.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/semantic-detectors.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/semantic.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/sort-arrow-sprite.png +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/sorter.js +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/summary-md.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/test-quality-detectors.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/tree-sitter-analyzer.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/ts-analyzer.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/types.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/coverage/utils.ts.html +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/dependencies.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/dependency-summary.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/dependency-summary.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/graph-analytics.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/graph-analytics.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/semantic.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/analysis/semantic.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/helpers.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/helpers.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/metrics.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/metrics.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/tree-search.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/ast/tree-search.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/chains.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/effects.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/effects.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/input-sources.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/input-sources.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/performance.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/performance.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/prototype-pollution.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/prototype-pollution.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/test-profile.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/collectors/test-profile.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/common/is-direct-run.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/common/is-direct-run.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/common/utils.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/common/utils.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/cohesion.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/coupling.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/cycle.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/dead-code.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/import-style.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/index.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/security.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/security.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/semantic.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/shared.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/test-quality.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/detectors/test-quality.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline/cache.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline/cache.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline/main.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/pipeline.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/reporting/analysis.test.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/src/reporting/analysis.ts +0 -0
- /package/skills/{octocode-code-engineer → octocode-engineer}/vitest.config.ts +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<img src="https://github.com/bgauryy/octocode-mcp/raw/main/packages/octocode-mcp/assets/logo_white.png" width="400px" alt="Octocode Logo">
|
|
3
3
|
|
|
4
|
-
<h1>
|
|
4
|
+
<h1>Octocode Research Skill</h1>
|
|
5
5
|
|
|
6
|
-
<p
|
|
7
|
-
<p>Zero-config MCP tools • Intent-driven workflows • Smart discovery</p>
|
|
6
|
+
<p>HTTP server wrapping 13 Octocode MCP tools with intent-based prompt selection</p>
|
|
8
7
|
|
|
9
8
|
[](https://agentskills.io/what-are-skills)
|
|
10
9
|
[](https://github.com/bgauryy/octocode-mcp/blob/main/LICENSE)
|
|
@@ -14,353 +13,152 @@
|
|
|
14
13
|
|
|
15
14
|
---
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
Unified HTTP interface for local filesystem, LSP, GitHub, and package registry tools. The agent sends a question, the server selects a prompt, and tool responses include hints that guide the next call.
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
- **Too many tools** — Which one do I use? In what order?
|
|
21
|
-
- **No context** — Tools work in isolation, losing research continuity
|
|
22
|
-
- **Manual orchestration** — You have to chain tools yourself
|
|
23
|
-
- **Different APIs** — Local, GitHub, LSP tools all work differently
|
|
24
|
-
|
|
25
|
-
## The Solution
|
|
26
|
-
|
|
27
|
-
**Octocode Research** gives your agent:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
31
|
-
│ 🎯 Intent Detection → 📋 Auto-Select Prompt → 🔧 Smart Tool Chaining │
|
|
32
|
-
│ │
|
|
33
|
-
│ "How does React research GitHub + LSP │
|
|
34
|
-
│ useState work?" ──────────────────► tool chain │
|
|
35
|
-
│ │
|
|
36
|
-
│ "Review PR #123" reviewPR Diff analysis │
|
|
37
|
-
│ ──────────────────► + code review │
|
|
38
|
-
│ │
|
|
39
|
-
│ "Trace auth flow research_local LSP semantic │
|
|
40
|
-
│ in our app" ──────────────────► analysis │
|
|
41
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
42
|
-
```
|
|
18
|
+
https://github.com/user-attachments/assets/d1260dbc-e7b6-4bec-909f-232ebee91ce9
|
|
43
19
|
|
|
20
|
+
---
|
|
44
21
|
|
|
22
|
+
## Why a Server?
|
|
45
23
|
|
|
46
|
-
|
|
24
|
+
The server is not just a pass-through — it provides a persistent runtime layer that makes research faster and more reliable:
|
|
47
25
|
|
|
26
|
+
| Capability | What it does |
|
|
27
|
+
|---|---|
|
|
28
|
+
| **MCP Cache** | Loads tool metadata, schemas, and system prompt once at startup. Every request reads from memory instead of re-initializing the MCP client. |
|
|
29
|
+
| **Circuit Breakers** | Per-service circuits (GitHub search, GitHub content, LSP navigation, LSP hierarchy, local, package) stop cascading failures. An open circuit fails fast instead of waiting for timeouts. |
|
|
30
|
+
| **Retry + Backoff** | Transient errors (rate limits, LSP cold starts, busy files) retry automatically with exponential backoff before surfacing to the agent. |
|
|
31
|
+
| **Request Timeout** | Every tool call is wrapped with a hard timeout (30–60s) to prevent hangs from blocking the agent. |
|
|
32
|
+
| **Detached Daemon** | The server runs as a detached process — no client owns it. Multiple agents/IDEs share one server instance. A PID file at `~/.octocode/research-server-{PORT}.pid` enables explicit stop. |
|
|
33
|
+
| **Idle Self-Stop** | After 30 minutes of inactivity the server exits on its own, freeing memory. The next `server-init` call spawns a fresh instance. |
|
|
34
|
+
| **Session Telemetry** | Tracks tool calls, repos accessed, and error rates per session for diagnostics (de-identified, opt-out with `LOG=false`). |
|
|
35
|
+
| **Readiness Gate** | Routes return **503** during MCP init (~1–3s), so agents never get partial data. `npm start` polls until ready. |
|
|
48
36
|
|
|
49
37
|
---
|
|
50
38
|
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
### Installation
|
|
39
|
+
## Quick Start
|
|
54
40
|
|
|
55
41
|
```bash
|
|
56
42
|
npx add-skill https://github.com/bgauryy/octocode-mcp/tree/main/skills/octocode-research
|
|
57
43
|
```
|
|
58
44
|
|
|
59
|
-
>
|
|
60
|
-
> See [Authentication Setup](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/AUTHENTICATION_SETUP.md) in the main README.
|
|
45
|
+
> Requires GitHub auth. See [Authentication Setup](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/AUTHENTICATION_SETUP.md).
|
|
61
46
|
|
|
62
|
-
|
|
47
|
+
Or manually:
|
|
63
48
|
|
|
64
49
|
```bash
|
|
65
50
|
cd skills/octocode-research
|
|
66
51
|
npm install && npm start
|
|
67
|
-
|
|
68
|
-
> By default the server listens on `localhost:1987`. You can override this with:
|
|
69
|
-
> - `OCTOCODE_RESEARCH_HOST` (default: `localhost`)
|
|
70
|
-
> - `OCTOCODE_RESEARCH_PORT` (default: `1987`)
|
|
71
|
-
|
|
72
|
-
# Verify it's running (defaults to localhost:1987)
|
|
73
52
|
curl http://localhost:1987/health
|
|
74
53
|
```
|
|
75
54
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## ✨ Key Features
|
|
79
|
-
|
|
80
|
-
### 1. All MCP Tools Work Out of the Box
|
|
81
|
-
|
|
82
|
-
No configuration. No token setup. Just ask your question.
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
86
|
-
│ 13 TOOLS • ONE INTERFACE │
|
|
87
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
88
|
-
│ │
|
|
89
|
-
│ LOCAL TOOLS LSP TOOLS EXTERNAL TOOLS │
|
|
90
|
-
│ ──────────── ───────── ────────────── │
|
|
91
|
-
│ localSearchCode lspGotoDefinition githubSearchCode │
|
|
92
|
-
│ localGetFileContent lspFindReferences githubGetFileContent │
|
|
93
|
-
│ localFindFiles lspCallHierarchy githubViewRepoStructure │
|
|
94
|
-
│ localViewStructure githubSearchRepositories │
|
|
95
|
-
│ githubSearchPullRequests │
|
|
96
|
-
│ packageSearch │
|
|
97
|
-
│ │
|
|
98
|
-
│ ────────────────────────────────────────────────────────────────────── │
|
|
99
|
-
│ All tools: POST /tools/call/:toolName { "queries": [...] } │
|
|
100
|
-
│ │
|
|
101
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### 2. Smart Tool & Prompt Discovery
|
|
105
|
-
|
|
106
|
-
Your agent discovers what's available at runtime:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
# List available tools
|
|
110
|
-
GET /tools/list
|
|
111
|
-
|
|
112
|
-
# Get tool schema BEFORE calling (required!)
|
|
113
|
-
GET /tools/info/localSearchCode
|
|
114
|
-
|
|
115
|
-
# List available prompts
|
|
116
|
-
GET /prompts/list
|
|
117
|
-
|
|
118
|
-
# Get prompt content by intent
|
|
119
|
-
GET /prompts/info/research
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 3. Intent-Driven Prompt Selection
|
|
123
|
-
|
|
124
|
-
The skill auto-selects the right workflow based on your question:
|
|
125
|
-
|
|
126
|
-
| Your Intent | Auto-Selected Prompt | What Happens |
|
|
127
|
-
|-------------|---------------------|--------------|
|
|
128
|
-
| *"How does React useState work?"* | `research` | GitHub repo exploration, source code analysis |
|
|
129
|
-
| *"Trace the auth flow in our app"* | `research_local` | LSP-powered semantic analysis, call hierarchies |
|
|
130
|
-
| *"Review PR #123"* | `reviewPR` | Diff analysis, code review, change impact |
|
|
131
|
-
| *"Plan adding caching to the API"* | `plan` | Architecture design, implementation steps |
|
|
132
|
-
|
|
133
|
-
### 4. Production-Ready Resilience
|
|
134
|
-
|
|
135
|
-
Built-in protection against failures:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
┌──────────────────────────────────────────────────────────────────┐
|
|
139
|
-
│ RESILIENCE PATTERNS │
|
|
140
|
-
├──────────────────────────────────────────────────────────────────┤
|
|
141
|
-
│ │
|
|
142
|
-
│ CIRCUIT BREAKER RETRY + BACKOFF THROTTLING │
|
|
143
|
-
│ ─────────────── ─────────────── ────────── │
|
|
144
|
-
│ │
|
|
145
|
-
│ CLOSED ──► OPEN Attempt 1 ────► 50 req/min │
|
|
146
|
-
│ │ │ wait 1s then gradual │
|
|
147
|
-
│ │ [timeout] Attempt 2 ────► slowdown │
|
|
148
|
-
│ │ │ wait 3s │
|
|
149
|
-
│ ▼ ▼ Attempt 3 ────► │
|
|
150
|
-
│ HALF-OPEN ◄─┘ success/fail │
|
|
151
|
-
│ │
|
|
152
|
-
│ Per-service configs: GitHub: 3 attempts, 30s max │
|
|
153
|
-
│ GitHub: 60s timeout LSP: 3 attempts, 5s max │
|
|
154
|
-
│ LSP: 10s timeout Local: 2 attempts, 1s max │
|
|
155
|
-
│ │
|
|
156
|
-
└──────────────────────────────────────────────────────────────────┘
|
|
157
|
-
```
|
|
55
|
+
Override defaults with `OCTOCODE_RESEARCH_HOST` / `OCTOCODE_RESEARCH_PORT`.
|
|
158
56
|
|
|
159
57
|
---
|
|
160
58
|
|
|
161
|
-
##
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
165
|
-
│ OCTOCODE RESEARCH FLOW │
|
|
166
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
167
|
-
|
|
168
|
-
USER QUESTION ANSWER
|
|
169
|
-
│ ▲
|
|
170
|
-
▼ │
|
|
171
|
-
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
172
|
-
│ │ │ │ │ │ │ │
|
|
173
|
-
│ 1. INIT │───►│ 2. CONTEXT │───►│ 3. PLAN │───►│ 4. RESEARCH │
|
|
174
|
-
│ │ │ │ │ │ │ │
|
|
175
|
-
│ Health │ │ System │ │ Create │ │ Execute │
|
|
176
|
-
│ check │ │ prompt │ │ research │ │ tool │
|
|
177
|
-
│ /health │ │ /tools/ │ │ plan with │ │ chains │
|
|
178
|
-
│ │ │ system │ │ tasks │ │ │
|
|
179
|
-
│ │ │ │ │ │ │ Follow │
|
|
180
|
-
│ │ │ Select │ │ │ │ hints │
|
|
181
|
-
│ │ │ prompt by │ │ │ │ │
|
|
182
|
-
│ │ │ intent │ │ │ │ Iterate │
|
|
183
|
-
│ │ │ /prompts/ │ │ │ │ │
|
|
184
|
-
│ │ │ info/:name │ │ │ │ │
|
|
185
|
-
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Phase 1: INIT
|
|
190
|
-
```bash
|
|
191
|
-
# Check server is ready
|
|
192
|
-
curl http://localhost:1987/health
|
|
193
|
-
# → {"status":"ok","port":1987,"uptime":123,...}
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### Phase 2: CONTEXT
|
|
197
|
-
```bash
|
|
198
|
-
# Load system prompt (ALWAYS FIRST)
|
|
199
|
-
curl http://localhost:1987/tools/system
|
|
59
|
+
## Prompt Selection
|
|
200
60
|
|
|
201
|
-
|
|
202
|
-
curl http://localhost:1987/prompts/info/research
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Phase 3: PLAN
|
|
206
|
-
- Analyze user's question
|
|
207
|
-
- Create research plan with tasks
|
|
208
|
-
- Determine which tools to use
|
|
61
|
+
The server picks a prompt based on what the agent asks:
|
|
209
62
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
"queries": [{
|
|
217
|
-
"mainResearchGoal": "Understand authentication flow",
|
|
218
|
-
"researchGoal": "Find auth middleware location",
|
|
219
|
-
"reasoning": "Need to locate entry point before tracing",
|
|
220
|
-
"pattern": "authenticate",
|
|
221
|
-
"path": "/Users/me/project/src"
|
|
222
|
-
}]
|
|
223
|
-
}'
|
|
224
|
-
```
|
|
63
|
+
| Question | Prompt | Scope |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| "How does React useState work?" | `research` | GitHub repos, packages |
|
|
66
|
+
| "Trace auth flow in our app" | `research_local` | Local codebase via LSP |
|
|
67
|
+
| "Review PR #123" | `reviewPR` | Diff + code review |
|
|
68
|
+
| "Plan adding caching" | `plan` | Architecture + steps |
|
|
225
69
|
|
|
226
70
|
---
|
|
227
71
|
|
|
228
|
-
##
|
|
72
|
+
## API
|
|
229
73
|
|
|
230
|
-
### Discovery
|
|
74
|
+
### Discovery
|
|
231
75
|
|
|
232
|
-
|
|
233
|
-
|--------|----------|-------------|
|
|
234
|
-
| `GET` | `/health` | Server health, memory, circuit states |
|
|
235
|
-
| `GET` | `/tools/list` | List all tools (concise) |
|
|
236
|
-
| `GET` | `/tools/info/:toolName` | **Get tool schema (call BEFORE using!)** |
|
|
237
|
-
| `GET` | `/tools/system` | **System prompt (load FIRST!)** |
|
|
238
|
-
| `GET` | `/prompts/list` | List all prompts |
|
|
239
|
-
| `GET` | `/prompts/info/:promptName` | Get prompt content |
|
|
240
|
-
|
|
241
|
-
### Execution Endpoint
|
|
76
|
+
**Load order:** Call **`GET /tools/initContext`** first — it returns the system prompt and all tool JSON Schemas in one response. Use **`GET /tools/system`** when you only need the instructions.
|
|
242
77
|
|
|
243
78
|
| Method | Endpoint | Description |
|
|
244
|
-
|
|
245
|
-
| `
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
All
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `GET` | `/health` | Health, uptime, memory, circuit breaker states |
|
|
81
|
+
| `GET` | `/tools/initContext` | **Load first** — system prompt + all tool schemas |
|
|
82
|
+
| `GET` | `/tools/system` | System instructions only |
|
|
83
|
+
| `GET` | `/tools/list` | All 13 tools (concise) |
|
|
84
|
+
| `GET` | `/tools/info` | All tools with full descriptions |
|
|
85
|
+
| `GET` | `/tools/info/:toolName` | One tool — JSON Schema + description + hints |
|
|
86
|
+
| `GET` | `/tools/metadata` | Raw metadata: instruction summary, tool/prompt counts |
|
|
87
|
+
| `GET` | `/tools/schemas` | All tool JSON Schemas (bulk) |
|
|
88
|
+
| `GET` | `/prompts/list` | All 7 prompts |
|
|
89
|
+
| `GET` | `/prompts/info/:promptName` | Prompt content and arguments |
|
|
90
|
+
|
|
91
|
+
### Execution
|
|
92
|
+
|
|
93
|
+
**`POST /tools/call/:toolName`** — every tool uses this single endpoint.
|
|
250
94
|
|
|
251
95
|
```json
|
|
252
96
|
{
|
|
253
97
|
"queries": [{
|
|
254
|
-
"
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
|
|
98
|
+
"id": "unique-query-id",
|
|
99
|
+
"mainResearchGoal": "Overall objective",
|
|
100
|
+
"researchGoal": "This query's goal",
|
|
101
|
+
"reasoning": "Why this approach"
|
|
258
102
|
}]
|
|
259
103
|
}
|
|
260
104
|
```
|
|
261
105
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
{
|
|
266
|
-
"tool": "localSearchCode",
|
|
267
|
-
"success": true,
|
|
268
|
-
"data": { /* tool results */ },
|
|
269
|
-
"hints": [
|
|
270
|
-
"Use lineHint for LSP tools",
|
|
271
|
-
"Consider narrowing search with path filter"
|
|
272
|
-
],
|
|
273
|
-
"research": {
|
|
274
|
-
"mainResearchGoal": "...",
|
|
275
|
-
"researchGoal": "...",
|
|
276
|
-
"reasoning": "..."
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
> **Critical**: Every response includes `hints` — **always read and follow them** for optimal research flow!
|
|
106
|
+
- `id` is required on every query (alphanumeric, dots, underscores, dashes).
|
|
107
|
+
- `mainResearchGoal` is required for GitHub/package tools; local/LSP tools need `researchGoal` + `reasoning`.
|
|
108
|
+
- Up to **3 queries** per request (bulk). Responses include `hints` — follow them.
|
|
282
109
|
|
|
283
110
|
---
|
|
284
111
|
|
|
285
|
-
##
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
|
290
|
-
|
|
291
|
-
| `
|
|
292
|
-
| `
|
|
293
|
-
| `
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
|
298
|
-
|
|
299
|
-
| `
|
|
300
|
-
| `
|
|
301
|
-
| `
|
|
302
|
-
| `localViewStructure` | Directory tree | "What's in this folder?" |
|
|
303
|
-
|
|
304
|
-
### GitHub Tools (External)
|
|
305
|
-
|
|
306
|
-
| Tool | Purpose | Use When |
|
|
307
|
-
|------|---------|----------|
|
|
308
|
-
| `githubSearchCode` | Search code in repos | "Find X in React repo" |
|
|
309
|
-
| `githubGetFileContent` | Read file from repo | "Show React's useState" |
|
|
310
|
-
| `githubViewRepoStructure` | View repo tree | "What's in facebook/react?" |
|
|
311
|
-
| `githubSearchRepositories` | Search repos | "Find auth libraries" |
|
|
312
|
-
| `githubSearchPullRequests` | Search PRs | "Find PR that added X" |
|
|
313
|
-
|
|
314
|
-
### Package Tools
|
|
315
|
-
|
|
316
|
-
| Tool | Purpose | Use When |
|
|
317
|
-
|------|---------|----------|
|
|
318
|
-
| `packageSearch` | Search npm/PyPI | "Find the lodash package" |
|
|
112
|
+
## Tools
|
|
113
|
+
|
|
114
|
+
| Tool | Category | What it does |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| `localSearchCode` | Local | Ripgrep code search |
|
|
117
|
+
| `localGetFileContent` | Local | Read file content |
|
|
118
|
+
| `localFindFiles` | Local | Find files by pattern/metadata |
|
|
119
|
+
| `localViewStructure` | Local | Directory tree |
|
|
120
|
+
| `lspGotoDefinition` | LSP | Jump to definition |
|
|
121
|
+
| `lspFindReferences` | LSP | All usages of a symbol |
|
|
122
|
+
| `lspCallHierarchy` | LSP | Incoming/outgoing calls |
|
|
123
|
+
| `githubSearchCode` | GitHub | Search code across repos |
|
|
124
|
+
| `githubGetFileContent` | GitHub | Read file from repo |
|
|
125
|
+
| `githubViewRepoStructure` | GitHub | Repo directory tree |
|
|
126
|
+
| `githubSearchRepositories` | GitHub | Search repos |
|
|
127
|
+
| `githubSearchPullRequests` | GitHub | Search PRs |
|
|
128
|
+
| `packageSearch` | Package | npm / PyPI lookup |
|
|
319
129
|
|
|
320
130
|
---
|
|
321
131
|
|
|
322
|
-
##
|
|
132
|
+
## Example
|
|
133
|
+
|
|
134
|
+
Find where React defines `useState`, then read it:
|
|
323
135
|
|
|
324
136
|
```bash
|
|
325
|
-
# 1. Search for useState in React repo
|
|
326
137
|
curl -X POST http://localhost:1987/tools/call/githubSearchCode \
|
|
327
138
|
-H "Content-Type: application/json" \
|
|
328
139
|
-d '{
|
|
329
140
|
"queries": [{
|
|
141
|
+
"id": "find-useState",
|
|
330
142
|
"mainResearchGoal": "Understand React useState implementation",
|
|
331
|
-
"researchGoal": "Find useState source
|
|
332
|
-
"reasoning": "
|
|
143
|
+
"researchGoal": "Find useState source location",
|
|
144
|
+
"reasoning": "Locate the hook definition first",
|
|
333
145
|
"owner": "facebook",
|
|
334
146
|
"repo": "react",
|
|
335
147
|
"keywordsToSearch": ["useState", "function"],
|
|
336
148
|
"match": "file"
|
|
337
149
|
}]
|
|
338
150
|
}'
|
|
151
|
+
```
|
|
339
152
|
|
|
340
|
-
|
|
341
|
-
curl -X POST http://localhost:1987/tools/call/githubViewRepoStructure \
|
|
342
|
-
-H "Content-Type: application/json" \
|
|
343
|
-
-d '{
|
|
344
|
-
"queries": [{
|
|
345
|
-
"mainResearchGoal": "Understand React useState implementation",
|
|
346
|
-
"researchGoal": "Find packages directory structure",
|
|
347
|
-
"reasoning": "Hooks likely in react-reconciler or react package",
|
|
348
|
-
"owner": "facebook",
|
|
349
|
-
"repo": "react",
|
|
350
|
-
"branch": "main",
|
|
351
|
-
"path": "packages/react/src",
|
|
352
|
-
"depth": 2
|
|
353
|
-
}]
|
|
354
|
-
}'
|
|
355
|
-
|
|
356
|
-
# 3. Read the implementation file
|
|
153
|
+
```bash
|
|
357
154
|
curl -X POST http://localhost:1987/tools/call/githubGetFileContent \
|
|
358
155
|
-H "Content-Type: application/json" \
|
|
359
156
|
-d '{
|
|
360
157
|
"queries": [{
|
|
158
|
+
"id": "read-useState",
|
|
361
159
|
"mainResearchGoal": "Understand React useState implementation",
|
|
362
|
-
"researchGoal": "Read useState
|
|
363
|
-
"reasoning": "Found location,
|
|
160
|
+
"researchGoal": "Read useState source",
|
|
161
|
+
"reasoning": "Found location, reading implementation",
|
|
364
162
|
"owner": "facebook",
|
|
365
163
|
"repo": "react",
|
|
366
164
|
"path": "packages/react/src/ReactHooks.js",
|
|
@@ -371,124 +169,40 @@ curl -X POST http://localhost:1987/tools/call/githubGetFileContent \
|
|
|
371
169
|
|
|
372
170
|
---
|
|
373
171
|
|
|
374
|
-
##
|
|
375
|
-
|
|
376
|
-
```
|
|
377
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
378
|
-
│ AGENT (Claude, GPT, etc.) │
|
|
379
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
380
|
-
│
|
|
381
|
-
▼
|
|
382
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
383
|
-
│ OCTOCODE RESEARCH SERVER (:1987) │
|
|
384
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
385
|
-
│ │
|
|
386
|
-
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────────────────────┐ │
|
|
387
|
-
│ │ PROMPTS │ │ TOOLS │ │ SYSTEM CONTEXT │ │
|
|
388
|
-
│ │ │ │ │ │ │ │
|
|
389
|
-
│ │ research │ │ GitHub API │ │ Decision guides │ │
|
|
390
|
-
│ │ research_ │ │ Local FS │ │ Tool chaining rules │ │
|
|
391
|
-
│ │ local │ │ LSP Server │ │ Error recovery │ │
|
|
392
|
-
│ │ reviewPR │ │ Package APIs │ │ Best practices │ │
|
|
393
|
-
│ │ plan │ │ │ │ │ │
|
|
394
|
-
│ └───────────────┘ └───────────────┘ └───────────────────────────────┘ │
|
|
395
|
-
│ │
|
|
396
|
-
│ ┌───────────────────────────────────────────────────────────────────────┐ │
|
|
397
|
-
│ │ RESILIENCE LAYER │ │
|
|
398
|
-
│ │ Circuit Breaker • Retry + Backoff • Throttling • Error Queue │ │
|
|
399
|
-
│ └───────────────────────────────────────────────────────────────────────┘ │
|
|
400
|
-
│ │
|
|
401
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
402
|
-
│
|
|
403
|
-
┌───────────────────────┼───────────────────────┐
|
|
404
|
-
▼ ▼ ▼
|
|
405
|
-
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
406
|
-
│ Your │ │ GitHub │ │ npm/PyPI │
|
|
407
|
-
│ Codebase │ │ Repos │ │ Registry │
|
|
408
|
-
└──────────┘ └──────────┘ └──────────┘
|
|
409
|
-
```
|
|
172
|
+
## Resilience
|
|
410
173
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
## 📊 Bulk Queries
|
|
414
|
-
|
|
415
|
-
Execute up to 3 queries in parallel:
|
|
416
|
-
|
|
417
|
-
```bash
|
|
418
|
-
curl -X POST http://localhost:1987/tools/call/localSearchCode \
|
|
419
|
-
-H "Content-Type: application/json" \
|
|
420
|
-
-d '{
|
|
421
|
-
"queries": [
|
|
422
|
-
{
|
|
423
|
-
"mainResearchGoal": "Understand state management",
|
|
424
|
-
"researchGoal": "Find useState usages",
|
|
425
|
-
"reasoning": "Compare with useReducer",
|
|
426
|
-
"pattern": "useState",
|
|
427
|
-
"path": "/project/src"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"mainResearchGoal": "Understand state management",
|
|
431
|
-
"researchGoal": "Find useReducer usages",
|
|
432
|
-
"reasoning": "Compare with useState",
|
|
433
|
-
"pattern": "useReducer",
|
|
434
|
-
"path": "/project/src"
|
|
435
|
-
}
|
|
436
|
-
]
|
|
437
|
-
}'
|
|
438
|
-
```
|
|
174
|
+
Per-service circuit breakers with retry and backoff:
|
|
439
175
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
],
|
|
450
|
-
"hints": {
|
|
451
|
-
"hasResults": ["Use lineHint for LSP follow-up"],
|
|
452
|
-
"empty": ["Try broader pattern"]
|
|
453
|
-
},
|
|
454
|
-
"counts": { "total": 2, "hasResults": 2, "empty": 0, "error": 0 }
|
|
455
|
-
}
|
|
456
|
-
```
|
|
176
|
+
| Circuit | Failure Threshold | Reset Timeout | Retries | Max Backoff |
|
|
177
|
+
|---|---|---|---|---|
|
|
178
|
+
| `github:search` | 2 | 60s | 3 | 30s |
|
|
179
|
+
| `github:content` | 3 | 30s | 3 | 30s |
|
|
180
|
+
| `github:pulls` | 2 | 60s | 3 | 30s |
|
|
181
|
+
| `lsp:navigation` | 3 | 10s | 3 | 5s |
|
|
182
|
+
| `lsp:hierarchy` | 2 | 15s | 3 | 5s |
|
|
183
|
+
| `local` | 5 | 5s | 2 | 1s |
|
|
184
|
+
| `package` | 3 | 45s | 3 | 15s |
|
|
457
185
|
|
|
458
186
|
---
|
|
459
187
|
|
|
460
|
-
##
|
|
188
|
+
## Privacy
|
|
461
189
|
|
|
462
|
-
|
|
463
|
-
- Command usage counts
|
|
464
|
-
- Error rates
|
|
465
|
-
- **Never** source code, env vars, or PII
|
|
190
|
+
Collects de-identified telemetry (usage counts, error rates). Never collects source code, env vars, or PII. Opt out: `export LOG=false`. Local logs at `~/.octocode/logs/` are not uploaded.
|
|
466
191
|
|
|
467
|
-
|
|
468
|
-
```bash
|
|
469
|
-
export LOG=false
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
Local logs stored at `~/.octocode/logs/` for your debugging — **never uploaded**.
|
|
473
|
-
|
|
474
|
-
See [Privacy Policy](https://github.com/bgauryy/octocode-mcp/blob/main/PRIVACY.md) and [Terms](https://github.com/bgauryy/octocode-mcp/blob/main/TERMS.md).
|
|
192
|
+
[Privacy Policy](https://github.com/bgauryy/octocode-mcp/blob/main/PRIVACY.md) · [Terms](https://github.com/bgauryy/octocode-mcp/blob/main/TERMS.md)
|
|
475
193
|
|
|
476
194
|
---
|
|
477
195
|
|
|
478
|
-
##
|
|
196
|
+
## Docs
|
|
479
197
|
|
|
480
198
|
| Document | Description |
|
|
481
|
-
|
|
199
|
+
|---|---|
|
|
482
200
|
| [SKILL.md](./SKILL.md) | Agent workflow guide |
|
|
483
|
-
| [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) |
|
|
484
|
-
| [docs/API_REFERENCE.md](./docs/API_REFERENCE.md) |
|
|
201
|
+
| [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) | Architecture |
|
|
202
|
+
| [docs/API_REFERENCE.md](./docs/API_REFERENCE.md) | Full API reference |
|
|
485
203
|
| [docs/FLOWS.md](./docs/FLOWS.md) | Request flow diagrams |
|
|
486
|
-
| [
|
|
204
|
+
| [Troubleshooting](https://github.com/bgauryy/octocode-mcp/blob/main/docs/TROUBLESHOOTING.md) | Common issues |
|
|
487
205
|
|
|
488
206
|
---
|
|
489
207
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
MIT License © 2026 Octocode
|
|
493
|
-
|
|
494
|
-
See [LICENSE](https://github.com/bgauryy/octocode-mcp/blob/main/LICENSE) for details.
|
|
208
|
+
MIT © 2026 Octocode — [LICENSE](https://github.com/bgauryy/octocode-mcp/blob/main/LICENSE)
|