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,223 @@
|
|
|
1
|
+
# Validated Improvement Plan: octocode-local-code-quality
|
|
2
|
+
|
|
3
|
+
> All claims validated against real codebase (packages/octocode-mcp: 1036 findings, 25 active categories)
|
|
4
|
+
|
|
5
|
+
## Validation Summary
|
|
6
|
+
|
|
7
|
+
| Claim | Verdict | Evidence |
|
|
8
|
+
|-------|---------|----------|
|
|
9
|
+
| `dead-export` ≈ `semantic-dead-export` | **MERGE** | Semantic is strict subset: 19 overlap, 23 AST false-positives cleared, 0 semantic-only |
|
|
10
|
+
| `dead-file` ≈ `orphan-module` | **MERGE** | Identical condition (zero inbound + zero outbound). `dead-file` capped at 20 roots, `orphan-module` checks all files. `dead-file` has 0 findings vs `unreachable-module`'s 30 |
|
|
11
|
+
| `type-hierarchy-depth` ≈ `deep-override-chain` | **KEEP SEPARATE** | Different dimensions: structural depth (class inheritance) vs behavioral depth (method override). Can fire independently |
|
|
12
|
+
| `orphan-module` ≈ `orphan-implementation` | **KEEP SEPARATE** | Different granularity: file-level (zero edges) vs class-level (exported class with no external refs). Complementary |
|
|
13
|
+
| `unsafe-any` ≈ proposed `type-assertion-escape` | **KEEP BOTH** | `unsafe-any` counts `any` type annotations (file-level, 0 findings). `type-assertion-escape` catches `as any`/`as unknown as T`/`!` patterns (line-level). Different signals |
|
|
14
|
+
|
|
15
|
+
## Phase 1: Merges (46 → 44 categories)
|
|
16
|
+
|
|
17
|
+
### 1A. Merge `dead-file` into `orphan-module`
|
|
18
|
+
|
|
19
|
+
**Why**: Identical detection logic. `dead-file` iterates `dependencySummary.roots.slice(0, 20)` (capped!), checks zero inbound + zero outbound. `orphan-module` iterates ALL `dependencyState.files`, checks same condition. `dead-file` = weaker subset.
|
|
20
|
+
|
|
21
|
+
**How**:
|
|
22
|
+
- Remove `detectDeadFiles` from `architecture.ts`
|
|
23
|
+
- Remove call from `buildIssueCatalog` in `index.ts`
|
|
24
|
+
- Remove `'dead-file'` from `PILLAR_CATEGORIES['dead-code']`
|
|
25
|
+
- Add `tags: ['previously-dead-file']` to orphan-module findings where file is a root
|
|
26
|
+
- Update tests, SKILL.md, README.md
|
|
27
|
+
|
|
28
|
+
**Risk**: None — orphan-module already catches everything dead-file would catch.
|
|
29
|
+
|
|
30
|
+
### 1B. Merge `semantic-dead-export` into `dead-export`
|
|
31
|
+
|
|
32
|
+
**Why**: Same concept, semantic version has fewer false positives (23 fewer on our codebase). When `--semantic` is active, both fire on the same file:symbol pairs, creating noise.
|
|
33
|
+
|
|
34
|
+
**How**:
|
|
35
|
+
- When `--semantic` is ON: use TypeChecker `findReferences` in `detectDeadExports` instead of import-string matching. Add `lspHints` to findings. Emit as `dead-export` (not `semantic-dead-export`).
|
|
36
|
+
- When `--semantic` is OFF: use current AST import-string matching (unchanged).
|
|
37
|
+
- Remove `detectSemanticDeadExports` from `semantic-detectors.ts`
|
|
38
|
+
- Remove `'semantic-dead-export'` from `PILLAR_CATEGORIES['architecture']` and `SEMANTIC_CATEGORIES`
|
|
39
|
+
- Add `semanticProfiles` parameter to `detectDeadExports`
|
|
40
|
+
- Update tests
|
|
41
|
+
|
|
42
|
+
**Risk**: Low — semantic mode produces strictly fewer findings (higher precision). Consumers filtering by `category: 'dead-export'` continue to work.
|
|
43
|
+
|
|
44
|
+
**Result**: 46 - 2 = **44 categories**
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Phase 2: New Features for Coding Agents (44 → 51 categories)
|
|
49
|
+
|
|
50
|
+
Ranked by **agent value × implementation ease**. Each feature validated with working PoC.
|
|
51
|
+
|
|
52
|
+
### 2A. `type-assertion-escape` (AST-only, NO --semantic needed)
|
|
53
|
+
|
|
54
|
+
**Pillar**: code-quality
|
|
55
|
+
**Signal**: `as any`, `as unknown as T`, non-null assertion `!`
|
|
56
|
+
**Agent value**: Tells agent exactly WHERE type safety is bypassed and WHAT pattern to fix. Auto-fixable in many cases.
|
|
57
|
+
**PoC result**: Detected all 3 patterns in test file with exact line numbers.
|
|
58
|
+
|
|
59
|
+
**Detection logic** (pure AST):
|
|
60
|
+
```
|
|
61
|
+
ts.isAsExpression(node) && node.type === 'any' → as-any
|
|
62
|
+
ts.isAsExpression(node.expression) && inner === 'unknown' → double-assertion
|
|
63
|
+
ts.isNonNullExpression(node) → non-null-assertion
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Effort**: Small — add to `ts-analyzer.ts` or `architecture.ts` AST walk, collect per-file, emit findings.
|
|
67
|
+
|
|
68
|
+
### 2B. `shotgun-surgery` (Semantic, needs --semantic)
|
|
69
|
+
|
|
70
|
+
**Pillar**: architecture
|
|
71
|
+
**Signal**: Exported symbol referenced from ≥N unique files (default: 8). Changing it forces edits across many modules.
|
|
72
|
+
**Agent value**: Critical for safe refactoring — agent knows "touching this symbol requires updating N files".
|
|
73
|
+
**PoC result**: `spawnWithTimeout` → 5 files, `buildChildProcessEnv` → 5 files (real codebase).
|
|
74
|
+
|
|
75
|
+
**Detection logic**:
|
|
76
|
+
- Already have `referenceCountByExport` in `SemanticProfile`
|
|
77
|
+
- Need to extend to store **unique file count** (not just total ref count)
|
|
78
|
+
- Add `ExportRefInfo.uniqueFiles: number`
|
|
79
|
+
- Threshold: default 8 (configurable via `--shotgun-threshold N`)
|
|
80
|
+
|
|
81
|
+
**Effort**: Small — extend `ExportRefInfo`, modify `analyzeSemanticProfile` to track unique files, add detector.
|
|
82
|
+
|
|
83
|
+
### 2C. `promise-misuse` (AST-only for async-without-await, Semantic for unhandled)
|
|
84
|
+
|
|
85
|
+
**Pillar**: code-quality
|
|
86
|
+
**Signal**: Two sub-patterns:
|
|
87
|
+
1. `async` function with no `await` in body → remove `async` or add missing `await`
|
|
88
|
+
2. Unhandled promise (call to async function without `await`/`.catch()`) → needs TypeChecker for return type
|
|
89
|
+
|
|
90
|
+
**Agent value**: Common bug class. Agent can auto-fix: remove unnecessary `async`, or add missing `await`.
|
|
91
|
+
**PoC result**: Correctly detected `async-without-await` on test file.
|
|
92
|
+
|
|
93
|
+
**Detection logic**:
|
|
94
|
+
- Sub-pattern 1 (AST): Walk function nodes with `AsyncKeyword`, check body for `AwaitExpression`.
|
|
95
|
+
- Sub-pattern 2 (Semantic): Walk `ExpressionStatement > CallExpression`, use TypeChecker to check if return type is `Promise<T>`, check if not `await`ed or `.then()`/`.catch()`ed.
|
|
96
|
+
|
|
97
|
+
**Effort**: Medium — AST part is small, semantic part needs TypeChecker return type resolution.
|
|
98
|
+
|
|
99
|
+
### 2D. `move-to-caller` (Semantic, needs --semantic)
|
|
100
|
+
|
|
101
|
+
**Pillar**: architecture
|
|
102
|
+
**Signal**: Exported function/class used by exactly 1 file externally. The export exists only to serve one consumer → inline it.
|
|
103
|
+
**Agent value**: Direct refactoring instruction — "move this code into its only consumer".
|
|
104
|
+
|
|
105
|
+
**Detection logic**:
|
|
106
|
+
- Already have `referenceCountByExport` with file tracking
|
|
107
|
+
- Filter: exports where unique referencing files == 1 (excluding test files)
|
|
108
|
+
- Exclude: entrypoints, re-exports, default exports
|
|
109
|
+
|
|
110
|
+
**Effort**: Trivial — data already exists, just add detector function.
|
|
111
|
+
|
|
112
|
+
### 2E. `leaky-abstraction` (Semantic, needs --semantic)
|
|
113
|
+
|
|
114
|
+
**Pillar**: architecture
|
|
115
|
+
**Signal**: Exported function returns or accepts a type that is defined in an internal (non-exported or internal-module) file.
|
|
116
|
+
**Agent value**: Tells agent "this public API leaks an implementation detail". Agent can inline the type or promote it to the public API.
|
|
117
|
+
**PoC result**: `getConfig() returns InternalConfig from internal.ts [LEAKY]` correctly detected.
|
|
118
|
+
|
|
119
|
+
**Detection logic**:
|
|
120
|
+
- For each exported function, get signature via `checker.getSignatureFromDeclaration`
|
|
121
|
+
- Get return type and param types
|
|
122
|
+
- Check if the type's declaration is in a different file AND that file is not a shared/types module
|
|
123
|
+
- Flag when public function exposes types from internal modules
|
|
124
|
+
|
|
125
|
+
**Effort**: Medium — needs TypeChecker type provenance resolution per exported function.
|
|
126
|
+
|
|
127
|
+
### 2F. `narrowable-type` (Semantic, needs --semantic)
|
|
128
|
+
|
|
129
|
+
**Pillar**: code-quality
|
|
130
|
+
**Signal**: Function parameter typed broadly (`string | number`, `any`, `unknown`) but ALL call sites pass a narrower type (e.g., always `string`).
|
|
131
|
+
**Agent value**: Agent can safely narrow the parameter type. Enables more precise TypeScript checking downstream.
|
|
132
|
+
**PoC result**: `process(data: string | number | boolean)` → all callers pass `"hello"`, `"world"` (string literals). Narrowable to `string`.
|
|
133
|
+
|
|
134
|
+
**Detection logic**:
|
|
135
|
+
- For each exported function with union/any/unknown params
|
|
136
|
+
- Use `findReferences` to find all call sites
|
|
137
|
+
- At each call site, use `checker.getTypeAtLocation(callExpr.arguments[i])`
|
|
138
|
+
- If all arg types are assignable to a narrower type → flag
|
|
139
|
+
|
|
140
|
+
**Effort**: High — need call-site argument type collection, union narrowing logic.
|
|
141
|
+
|
|
142
|
+
### 2G. `missing-error-boundary` (AST-only, NO --semantic needed)
|
|
143
|
+
|
|
144
|
+
**Pillar**: code-quality
|
|
145
|
+
**Signal**: Async function with `await` expressions but no enclosing `try`-`catch`.
|
|
146
|
+
**Agent value**: Tells agent "this async code has no error handling". Agent can wrap in try-catch.
|
|
147
|
+
**PoC result**: `riskyChain: 2 awaits, NO try-catch [UNPROTECTED]` correctly detected.
|
|
148
|
+
|
|
149
|
+
**Detection logic** (pure AST):
|
|
150
|
+
- Walk async function bodies
|
|
151
|
+
- Count `AwaitExpression` nodes (skip nested functions)
|
|
152
|
+
- Check for `TryStatement` in the same scope
|
|
153
|
+
- Flag if await count > 0 and no try-catch
|
|
154
|
+
|
|
155
|
+
**Effort**: Small — pure AST walk, similar pattern to empty-catch detection.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Phase 3: De-duplication Guards
|
|
160
|
+
|
|
161
|
+
### 3A. `orphan-implementation` → exclude files flagged as `orphan-module`
|
|
162
|
+
|
|
163
|
+
When both fire on the same file, it's noise. If the whole file is orphaned, the class-level finding adds nothing.
|
|
164
|
+
|
|
165
|
+
### 3B. `dead-export` (with semantic) → suppress AST `dead-export` for same symbol
|
|
166
|
+
|
|
167
|
+
When `--semantic` is on and both engines run, emit only the semantic-precision finding for each symbol. Already handled by merge in 1B.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Impact Summary
|
|
172
|
+
|
|
173
|
+
| Phase | Categories | Net Change |
|
|
174
|
+
|-------|-----------|------------|
|
|
175
|
+
| Current | 46 | — |
|
|
176
|
+
| Phase 1 (merges) | 44 | -2 |
|
|
177
|
+
| Phase 2 (new features) | 51 | +7 |
|
|
178
|
+
| **Final** | **51** | **+5 net** |
|
|
179
|
+
|
|
180
|
+
### New categories by pillar:
|
|
181
|
+
|
|
182
|
+
| Pillar | New | Categories |
|
|
183
|
+
|--------|-----|-----------|
|
|
184
|
+
| architecture | 3 | `shotgun-surgery`, `move-to-caller`, `leaky-abstraction` |
|
|
185
|
+
| code-quality | 4 | `type-assertion-escape`, `promise-misuse`, `narrowable-type`, `missing-error-boundary` |
|
|
186
|
+
|
|
187
|
+
### Agent refactoring capability matrix:
|
|
188
|
+
|
|
189
|
+
| Category | Agent can auto-fix? | Requires --semantic? | LSP validation? |
|
|
190
|
+
|----------|-------------------|--------------------|-----------------|
|
|
191
|
+
| `type-assertion-escape` | Yes (suggest `unknown` + guard) | No | No |
|
|
192
|
+
| `shotgun-surgery` | No (awareness only) | Yes | `lspFindReferences` |
|
|
193
|
+
| `promise-misuse` | Yes (add/remove `async`/`await`) | Partial | No |
|
|
194
|
+
| `move-to-caller` | Yes (inline function) | Yes | `lspFindReferences` |
|
|
195
|
+
| `leaky-abstraction` | Yes (promote type to public) | Yes | `lspGotoDefinition` |
|
|
196
|
+
| `narrowable-type` | Yes (narrow param type) | Yes | `lspCallHierarchy` |
|
|
197
|
+
| `missing-error-boundary` | Yes (wrap in try-catch) | No | No |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Implementation Order
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Phase 1A: Merge dead-file → orphan-module [30 min]
|
|
205
|
+
Phase 1B: Merge semantic-dead-export → dead-export [1 hr]
|
|
206
|
+
Phase 2A: type-assertion-escape (AST) [45 min]
|
|
207
|
+
Phase 2G: missing-error-boundary (AST) [45 min]
|
|
208
|
+
Phase 2C: promise-misuse (AST + Semantic) [1 hr]
|
|
209
|
+
Phase 2B: shotgun-surgery (Semantic) [1 hr]
|
|
210
|
+
Phase 2D: move-to-caller (Semantic) [30 min]
|
|
211
|
+
Phase 2E: leaky-abstraction (Semantic) [1.5 hr]
|
|
212
|
+
Phase 2F: narrowable-type (Semantic) [2 hr]
|
|
213
|
+
Phase 3: De-dup guards [30 min]
|
|
214
|
+
Total: ~9.5 hrs
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Dropped from Original Proposal (with reasons)
|
|
218
|
+
|
|
219
|
+
| Feature | Why Dropped |
|
|
220
|
+
|---------|-------------|
|
|
221
|
+
| `dead-branch` | Only literal `true`/`false` detectable via AST. Const-fold needs TypeChecker. Constraint solving too complex. Low real-world hit rate. |
|
|
222
|
+
| `extract-function` | Requires variable scope analysis (live-in/live-out per block). High false-positive risk. Revisit when flow graph available. |
|
|
223
|
+
| `divergent-change` | Needs git blame/history integration. Out of scope for static analysis. |
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://github.com/bgauryy/octocode-mcp/raw/main/packages/octocode-mcp/assets/logo_white.png" width="400px" alt="Octocode Logo">
|
|
3
|
+
|
|
4
|
+
<h1>Octocode Code Engineer</h1>
|
|
5
|
+
|
|
6
|
+
<p><strong>AI agent skill — code with full codebase awareness</strong></p>
|
|
7
|
+
<p>Architecture · Quality · Smart Coding · Security · Refactoring · Reviews · Testing</p>
|
|
8
|
+
|
|
9
|
+
[](https://agentskills.io/what-are-skills)
|
|
10
|
+
[](https://github.com/bgauryy/octocode-mcp/blob/main/LICENSE)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## What Is This
|
|
17
|
+
|
|
18
|
+
An AI agent skill that makes your coding agent **understand the codebase while it works** — not just when you ask for a review. It powers every engineering task: exploring unfamiliar code, writing features with blast radius awareness, refactoring safely, checking architecture, auditing quality, and more.
|
|
19
|
+
|
|
20
|
+
Unlike `tsc`, ESLint, or tests that check local correctness, this skill answers: **what's the blast radius? where should this code live? who calls this? is this safe to change?**
|
|
21
|
+
|
|
22
|
+
It combines a **CLI scanner** (dependency graph + AST + semantic analysis), an **AST engine** (`@ast-grep/napi` with 16 structural presets), and **Octocode MCP local/LSP tools** (search, go-to-definition, find-references, call-hierarchy) into one platform that integrates into your coding workflow — not a separate review step.
|
|
23
|
+
|
|
24
|
+
Just ask your AI agent — it uses this skill automatically for any engineering task.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## What It Can Do
|
|
29
|
+
|
|
30
|
+
The skill has four modes that compose together. The agent picks the right one based on your request.
|
|
31
|
+
|
|
32
|
+
### Understand & Navigate
|
|
33
|
+
|
|
34
|
+
| Capability | Ask the agent | What happens |
|
|
35
|
+
|-----------|--------------|-------------|
|
|
36
|
+
| **Codebase Exploration** | "how does X work", "explore this module" | Structure → Search → Fetch with LSP semantic tracing |
|
|
37
|
+
| **Pre-Implementation Check** | "where should this live", "before I build X" | Layout → existing patterns → dependency map → safe location |
|
|
38
|
+
|
|
39
|
+
### Build & Change
|
|
40
|
+
|
|
41
|
+
| Capability | Ask the agent | What happens |
|
|
42
|
+
|-----------|--------------|-------------|
|
|
43
|
+
| **Smart Coding** | "implement this", "add feature", "fix this bug" | Pre-check (blast radius, consumers, coupling) → code → verify |
|
|
44
|
+
| **Refactoring Planning** | "plan this refactor", "safe to rename" | Impact analysis → test/prod split → decomposition candidates |
|
|
45
|
+
|
|
46
|
+
### Analyze & Improve
|
|
47
|
+
|
|
48
|
+
| Capability | Ask the agent | What happens |
|
|
49
|
+
|-----------|--------------|-------------|
|
|
50
|
+
| **Architecture Analysis** | "check architecture", "find cycles" | Dependency graph, cycles, SCC clusters, coupling hotspots, chokepoints |
|
|
51
|
+
| **Quality Audit** | "audit code", "scan for problems" | Scan → validate → present → plan fixes → apply → verify |
|
|
52
|
+
| **Code Quality Review** | "review this module", "is this code good" | AST smell sweep + complexity + dead code + maintainability |
|
|
53
|
+
| **Code Review** | "review impact of changes" | Change impact → architecture delta → new issues → test coverage |
|
|
54
|
+
| **Test Strategy** | "test coverage gaps", "what needs testing" | Coverage mapping + test quality + critical untested code |
|
|
55
|
+
| **Security Analysis** | "security review", "find vulnerabilities" | AST sink patterns + LSP taint tracing + sanitizer detection |
|
|
56
|
+
| **Dependency Health** | "unused deps", "import analysis" | Dead-code scan + reference counting + import mapping |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Setup
|
|
61
|
+
|
|
62
|
+
### Octocode MCP (recommended)
|
|
63
|
+
|
|
64
|
+
For full power — the agent scans, then confirms findings with LSP-powered semantic tools:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"octocode": {
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"type": "stdio",
|
|
72
|
+
"args": [
|
|
73
|
+
"octocode-mcp@latest"
|
|
74
|
+
],
|
|
75
|
+
"env": {
|
|
76
|
+
"ENABLE_LOCAL": "true"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`ENABLE_LOCAL: true` unlocks local search, file content, directory structure, and LSP tools (go-to-definition, find-references, call-hierarchy) that the agent uses to validate findings against live code.
|
|
84
|
+
|
|
85
|
+
> **Without Octocode MCP**, the skill still works in CLI-only mode with AST structural search. Octocode MCP adds semantic precision.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## How It Works
|
|
90
|
+
|
|
91
|
+
Three analysis layers work together in every mode:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
CLI Scanner (graph + AST + semantic) → broad hypotheses with file:line
|
|
95
|
+
AST Engine (16 presets, structural proof) → zero false-positive pattern detection
|
|
96
|
+
Octocode MCP (local search + LSP) → semantic validation against live code
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**When exploring** — the agent chains them as a research funnel:
|
|
100
|
+
```
|
|
101
|
+
STRUCTURE → SEARCH → FETCH (see shape → find it → read evidence)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**When coding** — the agent wraps every change:
|
|
105
|
+
```
|
|
106
|
+
Pre-check: blast radius → consumer map → architecture safety
|
|
107
|
+
Code: implement the change
|
|
108
|
+
Verify: re-scan → check references → lint + test + build
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**When auditing** — the agent validates before presenting:
|
|
112
|
+
```
|
|
113
|
+
Scan → Triage → Validate each finding with LSP → Present with evidence
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## What It Detects
|
|
119
|
+
|
|
120
|
+
**76+ detection categories** across 7 pillars:
|
|
121
|
+
|
|
122
|
+
| Pillar | Categories | Highlights |
|
|
123
|
+
|--------|-----------|------------|
|
|
124
|
+
| **Architecture** | 22 | Cycles, coupling, SCC clusters, chokepoints, layer violations, orphan/unreachable modules, boundary chatter, startup risk |
|
|
125
|
+
| **Code Quality** | 21 | Complexity, god modules/functions, duplicates, maintainability, `any` usage, empty catches, promise misuse |
|
|
126
|
+
| **Performance** | 5 | Await-in-loop, sync I/O, uncleared timers, listener leaks, unbounded collections |
|
|
127
|
+
| **Security** | 9 | Secrets, eval, SQL injection, prototype pollution, path traversal, command injection, unvalidated input |
|
|
128
|
+
| **Dead Code** | 11 | Dead exports, dead re-exports, unused deps, boundary violations, barrel explosion |
|
|
129
|
+
| **Test Quality** | 8 | Low assertions, excessive mocks, shared mutable state, missing cleanup, focused tests |
|
|
130
|
+
| **Semantic** | +8 | Unused parameters, over-abstraction, DIP violations, shotgun surgery (requires `--semantic`) |
|
|
131
|
+
|
|
132
|
+
Especially strong for **agentic/MCP repos**: catches prompt-to-path, prompt-to-command, tool boundary leaks.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## What You Get
|
|
137
|
+
|
|
138
|
+
- **Health scores** per pillar with letter grades
|
|
139
|
+
- **Prioritized findings** with severity, confidence, `file:line` evidence, impact, and suggested fixes
|
|
140
|
+
- **Architecture graph** (Mermaid dependency visualization)
|
|
141
|
+
- **lspHints** on each finding — so the agent can confirm with Octocode MCP before presenting as fact
|
|
142
|
+
- **Smart output** — category-diverse truncation, chain dedup, computed remediation, architecture heuristics
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Performance
|
|
147
|
+
|
|
148
|
+
| Metric | Value |
|
|
149
|
+
|--------|-------|
|
|
150
|
+
| Cold scan (400-file monorepo) | ~3s |
|
|
151
|
+
| Cold scan + `--semantic` | ~5-8s |
|
|
152
|
+
| Cached scan (no changes) | <1s |
|
|
153
|
+
|
|
154
|
+
Incremental caching stores per-file AST results. Unchanged files skip re-parsing.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## When to Use / When Not
|
|
159
|
+
|
|
160
|
+
**Use when:**
|
|
161
|
+
- Writing code and want the agent to check blast radius before changing things
|
|
162
|
+
- Exploring unfamiliar code — "how does X work?", "where should this live?"
|
|
163
|
+
- Implementing features with impact awareness (consumers, coupling, test coverage)
|
|
164
|
+
- Planning a refactor and need safety analysis
|
|
165
|
+
- Architecture, quality, or security review needed
|
|
166
|
+
- Finding dead code, coverage gaps, or dependency issues
|
|
167
|
+
|
|
168
|
+
**Don't use for:**
|
|
169
|
+
- Syntax errors → `tsc`
|
|
170
|
+
- Style enforcement → ESLint / Prettier
|
|
171
|
+
- Runtime debugging → tests / debugger
|
|
172
|
+
- Deep taint analysis / SCA → Semgrep or dedicated tools
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT License © 2026 Octocode — see [LICENSE](https://github.com/bgauryy/octocode-mcp/blob/main/LICENSE).
|