octocode-cli 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -35
- package/out/octocode-cli.js +36 -11719
- package/package.json +36 -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 +499 -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,37 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: octocode-research
|
|
3
|
-
description:
|
|
3
|
+
description: Use when the user asks to "research code", "how does X work", "where is Y defined", "who calls Z", "trace code flow", "find usages", "explore this library", "understand the codebase", or needs deep code exploration with HTTP-based tool orchestration. For direct MCP tool research without the HTTP server, use octocode-researcher instead.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Octocode Research Skill
|
|
7
7
|
|
|
8
8
|
<identity_mission>
|
|
9
|
-
|
|
9
|
+
Expert technical investigator for deep-dive code exploration, repository analysis, and implementation planning. You do not assume; you explore. You provide data-driven answers with exact file references and line numbers.
|
|
10
10
|
</identity_mission>
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
## Overview
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### When to Use / When NOT to Use
|
|
17
|
+
|
|
18
|
+
| Use This Skill | Use `octocode-researcher` Instead |
|
|
19
|
+
|---|---|
|
|
20
|
+
| Multi-step research requiring planning | Quick single-tool lookups |
|
|
21
|
+
| Parallel domain exploration | Already have MCP tools and need one answer |
|
|
22
|
+
| Need session management & checkpoints | Simple "where is X defined?" |
|
|
23
|
+
| HTTP server orchestration needed | Direct MCP tool access is sufficient |
|
|
17
24
|
|
|
18
|
-
|
|
25
|
+
### Execution Flow
|
|
19
26
|
|
|
20
27
|
```
|
|
21
|
-
SEQUENTIAL PHASES:
|
|
22
28
|
Phase 1 → Phase 2 → Phase 2.5 → Phase 3 → Phase 4 → Phase 5
|
|
23
29
|
(INIT) (CONTEXT) (FAST-PATH) (PLAN) (RESEARCH) (OUTPUT)
|
|
24
30
|
│ ↑
|
|
25
31
|
└── simple lookup ─────┘
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
├── Self-Check Protocol - Run after EVERY action
|
|
29
|
-
└── Global Constraints - ALWAYS apply
|
|
33
|
+
Cross-cutting: Self-Check after EVERY action. Global Constraints ALWAYS apply.
|
|
30
34
|
```
|
|
31
35
|
|
|
36
|
+
Each phase MUST complete before the next. Skipping phases is FORBIDDEN (except fast-path bypass of Phase 3).
|
|
37
|
+
|
|
32
38
|
### MCP Direct Mode
|
|
33
39
|
|
|
34
|
-
If
|
|
40
|
+
If `octocode-mcp` is available as an MCP server, use MCP tools directly for Phase 4 (research execution) instead of HTTP calls. **Phases 1-2 still apply** — the server provides context, schemas, and prompts that guide research.
|
|
35
41
|
|
|
36
42
|
### Phase Transitions
|
|
37
43
|
|
|
@@ -44,45 +50,20 @@ If you already have `octocode-mcp` installed as an MCP server, use the octocode
|
|
|
44
50
|
| Phase 3 | Phase 4 | User approves plan |
|
|
45
51
|
| Phase 4 | Phase 5 | Research complete (see completion gate) |
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| Transition | Trigger |
|
|
50
|
-
|------------|---------|
|
|
51
|
-
| RESEARCH → CHECKPOINT | When context becomes heavy or research is extensive |
|
|
52
|
-
| CHECKPOINT → RESEARCH | After saving, continue with compressed context |
|
|
53
|
-
| OUTPUT → PLAN/RESEARCH | If user says "continue researching" |
|
|
54
|
-
|
|
55
|
-
**CRITICAL REMINDER: Run Self-Check after each action to verify you're on track.**
|
|
56
|
-
|
|
57
|
-
Each phase MUST complete before proceeding to the next. **FORBIDDEN**: Skipping phases without explicit fast-path qualification.
|
|
53
|
+
For checkpoint/resume state transitions, see [`references/SESSION_MANAGEMENT.md`](references/SESSION_MANAGEMENT.md).
|
|
58
54
|
|
|
59
55
|
---
|
|
60
56
|
|
|
61
57
|
## MCP Discovery
|
|
62
58
|
|
|
63
59
|
<mcp_discovery>
|
|
64
|
-
Before starting,
|
|
65
|
-
|
|
66
|
-
**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
**If Octocode MCP is not installed**:
|
|
73
|
-
> Suggest: "Install Octocode MCP for deeper research:
|
|
74
|
-
> ```json
|
|
75
|
-
> {
|
|
76
|
-
> "mcpServers": {
|
|
77
|
-
> "octocode": {
|
|
78
|
-
> "command": "npx",
|
|
79
|
-
> "args": ["-y", "octocode-mcp"],
|
|
80
|
-
> "env": {"ENABLE_LOCAL": "true"}
|
|
81
|
-
> }
|
|
82
|
-
> }
|
|
83
|
-
> }
|
|
84
|
-
> ```
|
|
85
|
-
> Then restart your editor."
|
|
60
|
+
Before starting, check if `octocode-mcp` is available as an MCP server (look for `localSearchCode`, `lspGotoDefinition`, `githubSearchCode`, `packageSearch`).
|
|
61
|
+
|
|
62
|
+
- **MCP exists but local tools empty**: Suggest adding `ENABLE_LOCAL=true` to config.
|
|
63
|
+
- **MCP not installed**: Suggest:
|
|
64
|
+
```json
|
|
65
|
+
{ "mcpServers": { "octocode": { "command": "npx", "args": ["-y", "octocode-mcp"], "env": {"ENABLE_LOCAL": "true"} } } }
|
|
66
|
+
```
|
|
86
67
|
|
|
87
68
|
Proceed with whatever tools are available — do not block on setup.
|
|
88
69
|
</mcp_discovery>
|
|
@@ -94,80 +75,69 @@ Proceed with whatever tools are available — do not block on setup.
|
|
|
94
75
|
### Server Configuration
|
|
95
76
|
|
|
96
77
|
<server>
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
HTTP server at `http://localhost:1987` by default.
|
|
79
|
+
|
|
80
|
+
**Environment variables** (both server and init respect these):
|
|
81
|
+
|
|
82
|
+
| Variable | Default | Description |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `OCTOCODE_RESEARCH_PORT` | `1987` | Server port (takes priority) |
|
|
85
|
+
| `OCTOCODE_PORT` | `1987` | Fallback port |
|
|
86
|
+
| `OCTOCODE_RESEARCH_HOST` | `localhost` | Server host |
|
|
87
|
+
|
|
88
|
+
**Lifecycle**: The server runs as a **detached daemon**. `server-init` spawns it, confirms health, and exits. Multiple agents/IDEs share one instance. The server self-terminates after 30 minutes idle. PID file: `~/.octocode/research-server-{PORT}.pid`.
|
|
99
89
|
</server>
|
|
100
90
|
|
|
101
91
|
### Available Routes
|
|
102
92
|
|
|
103
|
-
<server_routes>
|
|
104
|
-
|
|
105
93
|
| Method | Route | Description |
|
|
106
94
|
|--------|-------|-------------|
|
|
107
|
-
| GET | `/
|
|
95
|
+
| GET | `/health` | Server health, uptime, circuit states, memory |
|
|
96
|
+
| GET | `/tools/initContext` | **Load first!** System prompt + all tool schemas |
|
|
97
|
+
| GET | `/tools/list` | List all tools (concise) |
|
|
98
|
+
| GET | `/tools/info` | List all tools with full details |
|
|
99
|
+
| GET | `/tools/info/:toolName` | Get specific tool schema |
|
|
100
|
+
| GET | `/tools/metadata` | Raw MCP metadata (instructions, tool/prompt counts, base schema flag) — advanced |
|
|
101
|
+
| GET | `/tools/schemas` | All tool schemas |
|
|
102
|
+
| GET | `/tools/system` | System prompt only |
|
|
103
|
+
| POST | `/tools/call/:toolName` | Execute a tool (JSON body: `{ queries: [...] }`) |
|
|
104
|
+
| GET | `/prompts/list` | List all prompts |
|
|
108
105
|
| GET | `/prompts/info/:promptName` | Get prompt content and arguments |
|
|
109
|
-
| POST | `/tools/call/:toolName` | Execute a tool (JSON body with queries array) |
|
|
110
106
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
### Initialization Process
|
|
107
|
+
### Initialization
|
|
114
108
|
|
|
115
109
|
<server_init_gate>
|
|
116
110
|
**HALT. Server MUST be running before ANY other action.**
|
|
117
111
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Run from the skill's base directory (provided in system message as "Base directory for this skill: ..."):
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
cd <SKILL_BASE_DIRECTORY> && npm run server-init
|
|
124
|
-
```
|
|
112
|
+
Run from the skill's base directory (provided in system message, or the directory containing this SKILL.md):
|
|
125
113
|
|
|
126
|
-
**Example**: If system message says `Base directory for this skill: /path/to/skill`, run:
|
|
127
114
|
```bash
|
|
128
|
-
cd
|
|
115
|
+
cd <SKILL_BASE_DIRECTORY> && npm start
|
|
129
116
|
```
|
|
130
117
|
|
|
131
|
-
#### Output Interpretation
|
|
132
|
-
|
|
133
118
|
| Output | Meaning | Action |
|
|
134
119
|
|--------|---------|--------|
|
|
135
|
-
| `ok` | Server
|
|
136
|
-
| `
|
|
137
|
-
|
|
138
|
-
The script handles health checks, startup, and waiting automatically with mutex lock.
|
|
120
|
+
| `ok` (stays alive) | Server started — init owns lifecycle | **PROCEED** to Phase 2 |
|
|
121
|
+
| `ok` (exits) | Server already running | **PROCEED** to Phase 2 |
|
|
122
|
+
| `ERROR: ...` | Server failed | **STOP.** Report to user |
|
|
139
123
|
|
|
140
|
-
|
|
141
|
-
- Any tool calls to localhost:1987 or research tools
|
|
124
|
+
**FORBIDDEN**: Any tool calls until server returns "ok".
|
|
142
125
|
|
|
143
|
-
|
|
144
|
-
- Checking "Base directory for this skill" in system message
|
|
145
|
-
- Running `server-init` command
|
|
146
|
-
- Troubleshooting commands (lsof, kill)
|
|
126
|
+
> **503 during init:** `/tools/*` and `/prompts/*` return `503 SERVER_INITIALIZING` until the MCP cache is ready (~1–3s after the HTTP listener starts). `npm start` handles this automatically by polling `/health`. If starting the server directly (`node scripts/server.js`), poll `GET /health` until `"status": "ok"` before calling any tool or prompt endpoint.
|
|
147
127
|
|
|
148
128
|
#### Troubleshooting
|
|
149
129
|
|
|
150
|
-
| Problem |
|
|
151
|
-
|
|
152
|
-
| `Missing script:
|
|
153
|
-
| Health check fails |
|
|
154
|
-
| Port
|
|
130
|
+
| Problem | Solution |
|
|
131
|
+
|---------|----------|
|
|
132
|
+
| `Missing script: start` | Wrong directory — check skill base path |
|
|
133
|
+
| Health check fails | Wait, retry: `curl http://localhost:1987/health` |
|
|
134
|
+
| Port in use (orphan) | `lsof -sTCP:LISTEN -ti :1987` then `kill <PID>` |
|
|
135
|
+
| Init process still running | Normal — do NOT kill it |
|
|
155
136
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
On failure, retry a few times with reasonable delays. If retries are exhausted, **STOP** and report to user.
|
|
159
|
-
|
|
160
|
-
**FORBIDDEN**: Retrying indefinitely without timeout.
|
|
161
|
-
**FORBIDDEN**: Proceeding after retries exhausted.
|
|
162
|
-
|
|
163
|
-
**→ PROCEED TO PHASE 2 ONLY AFTER SERVER RETURNS "ok"**
|
|
137
|
+
On failure, retry a few times with delays. If exhausted, **STOP** and report.
|
|
164
138
|
</server_init_gate>
|
|
165
139
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<server_maintenance>
|
|
169
|
-
App logs with rotation at `~/.octocode/logs/` (errors.log, tools.log).
|
|
170
|
-
</server_maintenance>
|
|
140
|
+
Logs at `~/.octocode/logs/` (errors.log, tools.log).
|
|
171
141
|
|
|
172
142
|
---
|
|
173
143
|
|
|
@@ -176,65 +146,19 @@ App logs with rotation at `~/.octocode/logs/` (errors.log, tools.log).
|
|
|
176
146
|
<context_gate>
|
|
177
147
|
**STOP. DO NOT call any research tools yet.**
|
|
178
148
|
|
|
179
|
-
###
|
|
180
|
-
- [ ] Server returned "ok" in Phase 1
|
|
181
|
-
|
|
182
|
-
### Context Loading Checklist (MANDATORY - Complete ALL steps)
|
|
183
|
-
|
|
184
|
-
| # | Step | Command | Output to User |
|
|
185
|
-
|---|------|---------|----------------|
|
|
186
|
-
| 1 | Load context | `curl http://localhost:1987/tools/initContext` (or your configured host/port) | "Context loaded" |
|
|
187
|
-
| 2 | Choose prompt | Match user intent → prompt table below | "Using `{prompt}` prompt for this research" |
|
|
188
|
-
| 3 | Load prompt | `curl http://localhost:1987/prompts/info/{prompt}` (or your configured host/port) | - |
|
|
189
|
-
| 4 | Confirm ready | Read & understand prompt instructions | "Ready to plan research" |
|
|
190
|
-
|
|
191
|
-
### FORBIDDEN Until Context Loaded
|
|
192
|
-
- Any research tools
|
|
193
|
-
|
|
194
|
-
### ALLOWED During Context Loading
|
|
195
|
-
- `curl` commands to localhost:1987
|
|
196
|
-
- Text output to user
|
|
197
|
-
- Reading tool schemas
|
|
198
|
-
</context_gate>
|
|
199
|
-
|
|
200
|
-
### Understanding Tool Schemas
|
|
201
|
-
|
|
202
|
-
<context_understanding>
|
|
203
|
-
**CRITICAL: STOP after loading context. The tools teach themselves - learn from them.**
|
|
149
|
+
### Context Loading Checklist
|
|
204
150
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
151
|
+
| # | Step | Command |
|
|
152
|
+
|---|------|---------|
|
|
153
|
+
| 1 | Load context | `curl http://localhost:1987/tools/initContext` |
|
|
154
|
+
| 2 | Choose prompt | Match user intent → prompt table below |
|
|
155
|
+
| 3 | Load prompt | `curl http://localhost:1987/prompts/info/{prompt}` |
|
|
156
|
+
| 4 | Confirm | Verbalize: "Context loaded. I understand the schemas and will think on best research approach" |
|
|
209
157
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
1. **Read the description** - What does this tool ACTUALLY do?
|
|
213
|
-
2. **Check required fields** - What MUST be provided? (missing = error)
|
|
214
|
-
3. **Check types & constraints** - enums, min/max, patterns
|
|
215
|
-
4. **Check defaults** - What happens if optional fields omitted?
|
|
216
|
-
|
|
217
|
-
#### Parameter Discipline
|
|
218
|
-
|
|
219
|
-
<parameter_rules>
|
|
220
|
-
**CRITICAL - These are NON-NEGOTIABLE:**
|
|
221
|
-
- **NEVER** invent values for required parameters
|
|
222
|
-
- **NEVER** use placeholders or guessed values
|
|
223
|
-
- **IF** required value unknown → **THEN** use another tool to find it first
|
|
224
|
-
</parameter_rules>
|
|
225
|
-
|
|
226
|
-
#### Verification (REQUIRED)
|
|
227
|
-
|
|
228
|
-
After loading, you MUST verbalize:
|
|
229
|
-
> "Context loaded. I understand the schemas and will think on best research approach"
|
|
230
|
-
|
|
231
|
-
**FORBIDDEN**: Proceeding without this verbalization.
|
|
232
|
-
</context_understanding>
|
|
158
|
+
**In MCP Direct Mode**: You still MUST load context (step 1) and prompt (step 3) from the HTTP server. Only Phase 4 tool execution switches to MCP.
|
|
233
159
|
|
|
234
160
|
### Prompt Selection
|
|
235
161
|
|
|
236
|
-
<prompt_selection>
|
|
237
|
-
|
|
238
162
|
| PromptName | When to Use |
|
|
239
163
|
|------------|-------------|
|
|
240
164
|
| `research` | External libraries, GitHub repos, packages |
|
|
@@ -243,341 +167,138 @@ After loading, you MUST verbalize:
|
|
|
243
167
|
| `plan` | Bug fixes, features, refactors |
|
|
244
168
|
| `roast` | Poetic code roasting (load `references/roast-prompt.md`) |
|
|
245
169
|
|
|
246
|
-
**REQUIRED**:
|
|
247
|
-
> "I'm using the `{promptName}` prompt because [reason]"
|
|
170
|
+
**REQUIRED**: Tell user which prompt: "I'm using `{promptName}` because [reason]"
|
|
248
171
|
|
|
249
|
-
|
|
250
|
-
</prompt_selection>
|
|
172
|
+
### Schema Understanding
|
|
251
173
|
|
|
252
|
-
|
|
253
|
-
|
|
174
|
+
The `initContext` response contains system prompt, tool schemas, and quick reference. Before ANY tool call:
|
|
175
|
+
1. Read the description — what does this tool do?
|
|
176
|
+
2. Check required fields — what MUST be provided?
|
|
177
|
+
3. Check types & constraints — enums, min/max, patterns
|
|
178
|
+
4. Check defaults — what if optional fields omitted?
|
|
254
179
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
180
|
+
**NEVER** invent values for required parameters. If unknown, use another tool to find it first.
|
|
181
|
+
</context_gate>
|
|
182
|
+
|
|
183
|
+
<context_complete_gate>
|
|
184
|
+
Verify before proceeding:
|
|
185
|
+
- [ ] Context loaded? Tool schemas understood?
|
|
186
|
+
- [ ] Told user which prompt?
|
|
187
|
+
- [ ] Verbalized confirmation?
|
|
259
188
|
|
|
260
|
-
**
|
|
261
|
-
**IF ALL checkboxes checked → PROCEED to Phase 2.5 (Fast-Path Evaluation)**
|
|
189
|
+
**ALL checked → Phase 2.5. ANY unchecked → complete first.**
|
|
262
190
|
</context_complete_gate>
|
|
263
191
|
|
|
264
192
|
---
|
|
265
193
|
|
|
266
194
|
## Phase 2.5: Fast-Path Evaluation
|
|
267
195
|
|
|
268
|
-
**CRITICAL: Evaluate BEFORE creating a plan. This saves time for simple queries.**
|
|
269
|
-
|
|
270
|
-
### Fast-Path Decision
|
|
271
|
-
|
|
272
196
|
<fast_path_gate>
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
#### Criteria (ALL must be TRUE for fast-path)
|
|
276
|
-
|
|
277
|
-
| Criteria | Check | Examples |
|
|
278
|
-
|----------|-------|----------|
|
|
279
|
-
| Single-point lookup | "Where is X defined?", "What is X?", "Show me Y" | ✓ "Where is formatDate?" ✗ "How does auth flow work?" |
|
|
280
|
-
| One file/location expected | NOT cross-repository, NOT multi-subsystem | ✓ Same repo, same service ✗ Tracing calls across services |
|
|
281
|
-
| Few tool calls needed | Search → Read OR Search → LSP → Done | ✓ Find definition ✗ Trace full execution path |
|
|
282
|
-
| Target is unambiguous | Symbol is unique, no version/language ambiguity | ✓ Clear target ✗ Overloaded names, multiple versions |
|
|
197
|
+
Evaluate BEFORE creating a plan.
|
|
283
198
|
|
|
284
|
-
|
|
199
|
+
**ALL must be TRUE for fast-path:**
|
|
285
200
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
201
|
+
| Criteria | ✓ Example | ✗ Example |
|
|
202
|
+
|----------|-----------|-----------|
|
|
203
|
+
| Single-point lookup | "Where is formatDate?" | "How does auth flow work?" |
|
|
204
|
+
| One file/location expected | Same repo, same service | Cross-repo tracing |
|
|
205
|
+
| Few tool calls (≤3) | Search → LSP → Done | Full execution path trace |
|
|
206
|
+
| Unambiguous target | Unique symbol | Overloaded names |
|
|
290
207
|
|
|
291
|
-
**
|
|
292
|
-
|
|
293
|
-
2. **PROCEED** to Phase 3 (Planning)
|
|
208
|
+
**ALL TRUE** → Tell user "Simple lookup, proceeding directly" → Skip to Phase 4
|
|
209
|
+
**ANY FALSE** → Tell user "This requires planning" → Phase 3
|
|
294
210
|
</fast_path_gate>
|
|
295
211
|
|
|
296
|
-
### Examples
|
|
297
|
-
|
|
298
|
-
#### Qualifies for Fast-Path (ALL criteria TRUE)
|
|
299
|
-
- "Where is `formatDate` defined in this repo?" → Search → LSP goto → Done
|
|
300
|
-
- "What does the `validateEmail` function do?" → Search → Read → Done
|
|
301
|
-
- "Show me the User model" → Search → Read → Done
|
|
302
|
-
|
|
303
|
-
#### Requires Full Planning (ANY criterion FALSE)
|
|
304
|
-
- "How does React useState flow work?" → Needs PLAN (traces multiple files)
|
|
305
|
-
- "How does authentication flow work?" → Needs PLAN (multi-file)
|
|
306
|
-
- "Compare React vs Vue state management" → Needs PLAN (multiple domains)
|
|
307
|
-
|
|
308
212
|
---
|
|
309
213
|
|
|
310
214
|
## Phase 3: Planning
|
|
311
215
|
|
|
312
216
|
<plan_gate>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
#### Pre-Conditions
|
|
316
|
-
- [ ] Context loaded (`/tools/initContext`)
|
|
317
|
-
- [ ] User intent identified
|
|
318
|
-
- [ ] Fast-path evaluated (criteria checked)
|
|
217
|
+
**STOP. No research tools until plan approved.**
|
|
319
218
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
**REQUIRED**: Use your TaskCreate tool (or runtime equivalent, e.g., `TodoWrite`).
|
|
325
|
-
3. **Evaluate Parallelization**:
|
|
326
|
-
- **IF** multiple independent domains → **MUST** spawn parallel Task agents.
|
|
327
|
-
- **IF** single domain → Sequential execution.
|
|
328
|
-
4. **Share Plan**: Present the plan to the user in this EXACT format:
|
|
219
|
+
1. **Identify domains** to explore
|
|
220
|
+
2. **Create tasks** via `TodoWrite`
|
|
221
|
+
3. **Evaluate parallelization**: multiple independent domains → MUST spawn parallel agents
|
|
222
|
+
4. **Present plan** to user:
|
|
329
223
|
|
|
330
224
|
```markdown
|
|
331
225
|
## Research Plan
|
|
332
|
-
**Goal:** [
|
|
226
|
+
**Goal:** [question]
|
|
333
227
|
**Strategy:** [Sequential / Parallel]
|
|
334
228
|
**Steps:**
|
|
335
|
-
1. [Tool] → [
|
|
336
|
-
2. [Tool] → [
|
|
337
|
-
|
|
338
|
-
**Estimated scope:** [files/repos to explore]
|
|
229
|
+
1. [Tool] → [Goal]
|
|
230
|
+
2. [Tool] → [Goal]
|
|
231
|
+
**Estimated scope:** [files/repos]
|
|
339
232
|
|
|
340
233
|
Proceed? (yes/no)
|
|
341
234
|
```
|
|
342
235
|
|
|
343
|
-
**
|
|
344
|
-
|
|
345
|
-
#### FORBIDDEN Until Plan Approved
|
|
346
|
-
- Any research tools
|
|
347
|
-
|
|
348
|
-
#### ALLOWED During Planning
|
|
349
|
-
- `TaskCreate`/`TaskUpdate` (or runtime equivalent, e.g., `TodoWrite`)
|
|
350
|
-
- `AskUserQuestion` (to confirm)
|
|
351
|
-
- Text output (to present plan)
|
|
352
|
-
|
|
353
|
-
#### Gate Verification
|
|
354
|
-
|
|
355
|
-
**HALT. Verify before proceeding:**
|
|
356
|
-
- [ ] Plan tasks created via `TaskCreate`?
|
|
357
|
-
- [ ] Plan presented to user in EXACT format above?
|
|
358
|
-
- [ ] Parallelization strategy selected?
|
|
359
|
-
- [ ] **User approval obtained?** (said "yes", "go", "proceed", or similar)
|
|
360
|
-
|
|
361
|
-
**WAIT for user response. DO NOT proceed without explicit approval.**
|
|
362
|
-
|
|
363
|
-
**IF user approves → PROCEED to Phase 4 (Research)**
|
|
364
|
-
**IF user requests changes → Modify plan and re-present**
|
|
365
|
-
**IF user rejects → Ask for clarification**
|
|
236
|
+
**WAIT for user approval.** Modify if requested, clarify if rejected.
|
|
366
237
|
</plan_gate>
|
|
367
238
|
|
|
368
|
-
### Parallel Execution
|
|
239
|
+
### Parallel Execution
|
|
369
240
|
|
|
370
|
-
|
|
371
|
-
**CRITICAL: Multiple independent domains → MUST spawn Task agents in parallel**
|
|
241
|
+
Multiple independent domains (different repos, services, runtimes) → **MUST spawn parallel Task agents**. Same repo across files = sequential.
|
|
372
242
|
|
|
373
|
-
|
|
374
|
-
|-----------|--------|
|
|
375
|
-
| Single question, single domain | Sequential OK |
|
|
376
|
-
| Multiple domains / repos / subsystems | **MUST use Parallel Task agents** |
|
|
377
|
-
|
|
378
|
-
```
|
|
379
|
-
Task(subagent_type="Explore", model="opus", prompt="Domain A: [goal]")
|
|
380
|
-
Task(subagent_type="Explore", model="opus", prompt="Domain B: [goal]")
|
|
381
|
-
→ Merge findings
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
**FORBIDDEN**: Sequential execution when multiple independent domains are identified.
|
|
385
|
-
</parallel_decision>
|
|
386
|
-
|
|
387
|
-
### Domain Classification
|
|
388
|
-
|
|
389
|
-
<domain_definition>
|
|
390
|
-
**What counts as a "domain"?**
|
|
391
|
-
|
|
392
|
-
| Separate Domains (→ Parallel) | Same Domain (→ Sequential) |
|
|
393
|
-
|-------------------------------|----------------------------|
|
|
394
|
-
| Different repositories (react vs vue) | Same repo, different files |
|
|
395
|
-
| Different services (auth-service vs payment-service) | Same service, different modules |
|
|
396
|
-
| Different languages/runtimes (frontend JS vs backend Python) | Same language, different packages |
|
|
397
|
-
| Different owners (facebook/react vs vuejs/vue) | Same owner, related repos |
|
|
398
|
-
| Unrelated subsystems (logging vs caching) | Related layers (API → DB) |
|
|
399
|
-
|
|
400
|
-
#### Classification Examples
|
|
401
|
-
|
|
402
|
-
**Parallel** (multiple domains):
|
|
403
|
-
> "Compare how React and Vue handle state"
|
|
404
|
-
> → Domain A: React state (facebook/react)
|
|
405
|
-
> → Domain B: Vue state (vuejs/vue)
|
|
406
|
-
|
|
407
|
-
**Sequential** (single domain):
|
|
408
|
-
> "How does React useState flow from export to reconciler?"
|
|
409
|
-
> → Same repo (facebook/react), tracing through files
|
|
410
|
-
> → Files are connected, not independent
|
|
411
|
-
|
|
412
|
-
**Parallel** (multiple domains):
|
|
413
|
-
> "How does our auth service communicate with the user service?"
|
|
414
|
-
> → Domain A: auth-service repo
|
|
415
|
-
> → Domain B: user-service repo
|
|
416
|
-
</domain_definition>
|
|
417
|
-
|
|
418
|
-
### Agent Selection
|
|
419
|
-
|
|
420
|
-
<agent_selection>
|
|
421
|
-
**Agent & Model Selection** (model is suggestion - use most suitable):
|
|
422
|
-
|
|
423
|
-
| Task Type | Agent | Suggested Model |
|
|
424
|
-
|-----------|-------|-----------------|
|
|
425
|
-
| Deep exploration | `Explore` | `opus` |
|
|
426
|
-
| Quick lookup | `Explore` | `haiku` |
|
|
427
|
-
|
|
428
|
-
Agent capabilities are defined by the tools loaded in context.
|
|
429
|
-
</agent_selection>
|
|
430
|
-
|
|
431
|
-
### Parallel Agent Protocol
|
|
432
|
-
|
|
433
|
-
→ See [`references/PARALLEL_AGENT_PROTOCOL.md`](references/PARALLEL_AGENT_PROTOCOL.md)
|
|
243
|
+
→ See [`references/PARALLEL_AGENT_PROTOCOL.md`](references/PARALLEL_AGENT_PROTOCOL.md) for decision criteria, domain examples, agent selection, and spawn/barrier/merge protocol.
|
|
434
244
|
|
|
435
245
|
---
|
|
436
246
|
|
|
437
247
|
## Phase 4: Research Execution
|
|
438
248
|
|
|
439
249
|
<research_gate>
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
- [ ] Plan presented to user?
|
|
444
|
-
- [ ] Tasks created and tracked?
|
|
445
|
-
- [ ] Parallel strategy evaluated?
|
|
446
|
-
- [ ] **User approved the plan?**
|
|
250
|
+
**Verify entry conditions:**
|
|
251
|
+
- From PLAN: Plan presented, tasks created, user approved?
|
|
252
|
+
- From FAST-PATH: Told user "simple lookup", context loaded?
|
|
447
253
|
|
|
448
|
-
|
|
449
|
-
- [ ] Told user "simple lookup, proceeding directly"?
|
|
450
|
-
- [ ] Context was loaded?
|
|
451
|
-
|
|
452
|
-
**IF ANY pre-condition not met → STOP. Go back to appropriate phase.**
|
|
453
|
-
**IF ALL pre-conditions met → PROCEED with research.**
|
|
254
|
+
If any unmet → go back to appropriate phase.
|
|
454
255
|
</research_gate>
|
|
455
256
|
|
|
456
|
-
###
|
|
457
|
-
|
|
458
|
-
<research_loop>
|
|
459
|
-
**CRITICAL: Follow this loop for EVERY research action:**
|
|
257
|
+
### Research Loop
|
|
460
258
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
259
|
+
For EVERY research action:
|
|
260
|
+
1. **Execute** tool with required params (`mainResearchGoal`, `researchGoal`, `reasoning`)
|
|
261
|
+
2. **Read response** — check `hints` FIRST
|
|
262
|
+
3. **Verbalize hints** — tell user what they suggest
|
|
263
|
+
4. **Follow hints** — they guide the next action
|
|
465
264
|
5. **Iterate** until goal achieved
|
|
466
265
|
|
|
467
|
-
**FORBIDDEN**: Ignoring hints in tool responses.
|
|
468
|
-
**FORBIDDEN**: Proceeding without verbalizing hints.
|
|
469
|
-
</research_loop>
|
|
470
|
-
|
|
471
|
-
### Hint Handling
|
|
472
|
-
|
|
473
|
-
<hint_handling>
|
|
474
|
-
**MANDATORY: You MUST understand hints and think how they can help with research.**
|
|
475
|
-
|
|
476
266
|
| Hint Type | Action |
|
|
477
267
|
|-----------|--------|
|
|
478
|
-
| Next tool suggestion |
|
|
268
|
+
| Next tool suggestion | Use the recommended tool |
|
|
479
269
|
| Pagination | Fetch next page if needed |
|
|
480
270
|
| Refinement needed | Narrow the search |
|
|
481
271
|
| Error guidance | Recover as indicated |
|
|
482
272
|
|
|
483
|
-
**FORBIDDEN**: Ignoring hints.
|
|
484
|
-
**FORBIDDEN**: Using a different tool than hints suggest (unless you explain why).
|
|
485
|
-
</hint_handling>
|
|
486
|
-
|
|
487
|
-
### Thought Process
|
|
488
|
-
|
|
489
|
-
<thought_process>
|
|
490
|
-
**CRITICAL: Follow this reasoning pattern:**
|
|
491
|
-
|
|
492
|
-
- **Stop & Understand**: Clearly identify user intent. **IF unclear → STOP and ASK.**
|
|
493
|
-
- **Think Before Acting**: Verify context (what do I know? what is missing?). Does this step serve the `mainResearchGoal`?
|
|
494
|
-
- **Plan**: Think through steps thoroughly. Understand tool connections.
|
|
495
|
-
- **Transparent Reasoning**: Share your plan, reasoning ("why"), and discoveries with the user.
|
|
496
|
-
- **Adherence**: Follow prompt instructions. Include required research params (see Global Constraints).
|
|
497
|
-
- **Data-driven**: Follow tool schemas and hints (see Phase 2 Parameter Rules).
|
|
498
|
-
- **Stuck or Unsure?**: **IF** looping, hitting dead ends, or path is ambiguous → **STOP and ASK the user**.
|
|
499
|
-
</thought_process>
|
|
500
|
-
|
|
501
273
|
### Error Recovery
|
|
502
274
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
|
507
|
-
|
|
508
|
-
|
|
|
509
|
-
|
|
|
510
|
-
| Rate limit | **IF** rate limited → **THEN** back off, batch fewer queries |
|
|
511
|
-
| Dead end | **IF** dead end → **THEN** backtrack, try alternate approach |
|
|
512
|
-
| Looping | **IF** stuck on same tool repeatedly → **THEN STOP** → re-read hints → ask user |
|
|
275
|
+
| Error | Recovery |
|
|
276
|
+
|-------|----------|
|
|
277
|
+
| Empty results | Broaden pattern, try semantic variants |
|
|
278
|
+
| Timeout | Reduce scope/depth |
|
|
279
|
+
| Rate limit | Back off, batch fewer queries |
|
|
280
|
+
| Dead end | Backtrack, alternate approach |
|
|
281
|
+
| Looping | **STOP** → re-read hints → ask user |
|
|
513
282
|
|
|
514
|
-
|
|
515
|
-
</error_recovery>
|
|
283
|
+
If stuck and not progressing → **STOP and ask user.**
|
|
516
284
|
|
|
517
285
|
### Context Management
|
|
518
286
|
|
|
519
|
-
|
|
520
|
-
**Rule: Checkpoint when context becomes heavy or research is extensive.** Save to `.octocode/research/{session-id}/checkpoint-{N}.md`
|
|
521
|
-
|
|
522
|
-
#### Checkpoint Content
|
|
523
|
-
Save: goal, key findings (file:line), open questions, next steps. Tell user: "Created checkpoint."
|
|
524
|
-
|
|
525
|
-
#### Session Files
|
|
526
|
-
```
|
|
527
|
-
.octocode/research/{session-id}/
|
|
528
|
-
├── session.json # {id, state, mainResearchGoal}
|
|
529
|
-
├── checkpoint-*.md # Checkpoints
|
|
530
|
-
├── domain-*.md # Parallel agent outputs
|
|
531
|
-
└── research.md # Final output
|
|
532
|
-
```
|
|
533
|
-
|
|
534
|
-
#### Resume
|
|
535
|
-
If `session.json` exists with state ≠ DONE → Ask user: "Resume from last checkpoint?" → Yes: load & continue, No: fresh start.
|
|
536
|
-
|
|
537
|
-
#### What to Keep/Discard After Checkpoint
|
|
538
|
-
|
|
539
|
-
| KEEP | DISCARD |
|
|
540
|
-
|------|---------|
|
|
541
|
-
| File:line refs | Full tool JSON |
|
|
542
|
-
| Key findings | Intermediate results |
|
|
543
|
-
| Brief code snippets | Verbose hints |
|
|
544
|
-
</context_management>
|
|
287
|
+
Checkpoint when context becomes heavy. See [`references/SESSION_MANAGEMENT.md`](references/SESSION_MANAGEMENT.md) for checkpoint protocol, directory structure, and resume logic.
|
|
545
288
|
|
|
546
289
|
### Research Completion
|
|
547
290
|
|
|
548
291
|
<research_complete_gate>
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
#### Completion Triggers (ANY one triggers OUTPUT)
|
|
552
|
-
|
|
553
|
-
| Trigger | Evidence | Action |
|
|
554
|
-
|---------|----------|--------|
|
|
555
|
-
| Goal achieved | Answer found with file:line refs | → PROCEED to Phase 5 |
|
|
556
|
-
| Stuck (exhausted) | Multiple recovery attempts failed | → PROCEED to Phase 5 (note gaps) |
|
|
557
|
-
| User satisfied | User says "enough" or "looks good" | → PROCEED to Phase 5 |
|
|
558
|
-
| Scope complete | All planned domains/files explored | → PROCEED to Phase 5 |
|
|
559
|
-
|
|
560
|
-
#### Trigger Precedence (if multiple fire simultaneously)
|
|
561
|
-
|
|
562
|
-
| Priority | Trigger | Reason |
|
|
563
|
-
|----------|---------|--------|
|
|
564
|
-
| 1 (highest) | Goal achieved | Mission complete, no need to continue |
|
|
565
|
-
| 2 | User satisfied | User input overrides scope checks |
|
|
566
|
-
| 3 | Scope complete | Planned work done |
|
|
567
|
-
| 4 (lowest) | Stuck (exhausted) | Fallback when blocked; note gaps in output |
|
|
568
|
-
|
|
569
|
-
**FORBIDDEN**: Ending research arbitrarily without a trigger.
|
|
570
|
-
**FORBIDDEN**: Proceeding to OUTPUT without file:line evidence.
|
|
571
|
-
|
|
572
|
-
#### Pre-Output Checklist
|
|
292
|
+
ANY trigger → proceed to Phase 5:
|
|
573
293
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
294
|
+
| Trigger | Priority |
|
|
295
|
+
|---------|----------|
|
|
296
|
+
| Goal achieved (with file:line refs) | 1 (highest) |
|
|
297
|
+
| User satisfied | 2 |
|
|
298
|
+
| Scope complete | 3 |
|
|
299
|
+
| Stuck/exhausted | 4 (note gaps) |
|
|
578
300
|
|
|
579
|
-
|
|
580
|
-
**IF ANY unchecked → Complete missing items first**
|
|
301
|
+
Pre-output: completion trigger identified? Findings have file:line? Checkpoints saved? Tasks marked complete?
|
|
581
302
|
</research_complete_gate>
|
|
582
303
|
|
|
583
304
|
---
|
|
@@ -585,124 +306,74 @@ If `session.json` exists with state ≠ DONE → Ask user: "Resume from last che
|
|
|
585
306
|
## Phase 5: Output
|
|
586
307
|
|
|
587
308
|
<output_gate>
|
|
588
|
-
### STOP. Verify entry conditions and ensure output quality.
|
|
589
309
|
|
|
590
|
-
|
|
310
|
+
### Required Response Structure
|
|
591
311
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
**IF parallel agents were spawned:**
|
|
597
|
-
- [ ] All domain-*.md files read and incorporated?
|
|
598
|
-
- [ ] Merge gate completed? (see `references/PARALLEL_AGENT_PROTOCOL.md`)
|
|
599
|
-
- [ ] Conflicts resolved or user acknowledged?
|
|
600
|
-
|
|
601
|
-
**IF ANY entry condition not met → RETURN to Phase 4 (Research) or complete merge.**
|
|
312
|
+
1. **TL;DR**: Clear summary (few sentences). If stuck, prefix with "[INCOMPLETE]".
|
|
313
|
+
2. **Details**: In-depth analysis with evidence.
|
|
314
|
+
3. **References**: ALL code citations with proper format.
|
|
315
|
+
4. **Next Step**: Ask one of: "Create a research doc?" / "Continue researching [area]?" / "Any clarifications?"
|
|
602
316
|
|
|
603
|
-
|
|
317
|
+
All four sections are REQUIRED. Never end silently.
|
|
604
318
|
|
|
605
|
-
|
|
606
|
-
2. **Details**: In-depth analysis with evidence.
|
|
607
|
-
3. **References**: ALL code citations with proper format (see below).
|
|
608
|
-
4. **Next Step**: **REQUIRED** question (see below).
|
|
319
|
+
### Reference Format
|
|
609
320
|
|
|
610
|
-
|
|
321
|
+
| Type | Format | Example |
|
|
322
|
+
|------|--------|---------|
|
|
323
|
+
| GitHub/External | Full URL with lines | `https://github.com/facebook/react/blob/main/src/ReactHooks.js#L66-L69` |
|
|
324
|
+
| Local | `path:line` | `src/components/Button.tsx:42` |
|
|
325
|
+
| Range | `path:start-end` | `src/utils/auth.ts:15-28` |
|
|
611
326
|
|
|
612
|
-
|
|
327
|
+
GitHub references MUST use full URLs (clickable). Line numbers REQUIRED on all references.
|
|
613
328
|
|
|
614
|
-
|
|
329
|
+
### If Stuck
|
|
615
330
|
|
|
616
331
|
| Section | Adaptation |
|
|
617
332
|
|---------|------------|
|
|
618
|
-
|
|
|
619
|
-
|
|
|
620
|
-
|
|
|
621
|
-
|
|
|
622
|
-
|
|
623
|
-
**Example Stuck TL;DR**: "[INCOMPLETE] Traced authentication flow to `auth/middleware.ts:42`, but token validation logic at `auth/jwt.ts:88-120` uses external service not accessible."
|
|
624
|
-
|
|
625
|
-
#### Reference Format (MUST follow EXACTLY)
|
|
626
|
-
|
|
627
|
-
| Research Type | Format | Example |
|
|
628
|
-
|--------------|--------|---------|
|
|
629
|
-
| **GitHub/External** | Full URL with line numbers | `https://github.com/facebook/react/blob/main/packages/react/src/ReactHooks.js#L66-L69` |
|
|
630
|
-
| **Local codebase** | `path:line` format | `src/components/Button.tsx:42` |
|
|
631
|
-
| **Multiple lines** | Range notation | `src/utils/auth.ts:15-28` |
|
|
333
|
+
| TL;DR | "[INCOMPLETE] Investigated X, but Y unclear due to Z" |
|
|
334
|
+
| Details | Attempts made, blockers, partial findings with file:line |
|
|
335
|
+
| References | All files explored, even if inconclusive |
|
|
336
|
+
| Next Step | "Continue researching [blocked area]?" or "Need clarification on [X]?" |
|
|
632
337
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
**FORBIDDEN**: Relative GitHub paths without full URL.
|
|
636
|
-
**FORBIDDEN**: Missing line numbers in references.
|
|
637
|
-
|
|
638
|
-
#### Next Step Question (MANDATORY)
|
|
639
|
-
|
|
640
|
-
You **MUST** end the session by asking ONE of these:
|
|
641
|
-
- "Create a research doc?" (Save to `.octocode/research/{session}/research.md`)
|
|
642
|
-
- "Continue researching [specific area]?"
|
|
643
|
-
- "Any clarifications needed?"
|
|
644
|
-
|
|
645
|
-
**FORBIDDEN**: Ending silently without a question.
|
|
646
|
-
**FORBIDDEN**: Ending with just "Let me know if you need anything else."
|
|
647
|
-
|
|
648
|
-
#### Gate Verification
|
|
649
|
-
|
|
650
|
-
**HALT. Before sending output, verify:**
|
|
651
|
-
- [ ] TL;DR included?
|
|
652
|
-
- [ ] Details with evidence included?
|
|
653
|
-
- [ ] ALL references have proper format?
|
|
654
|
-
- [ ] Next step question included?
|
|
655
|
-
|
|
656
|
-
**IF ANY checkbox unchecked → Add the missing element before sending.**
|
|
338
|
+
Verify before sending: TL;DR? Details? References formatted? Next step question?
|
|
657
339
|
</output_gate>
|
|
658
340
|
|
|
659
341
|
---
|
|
660
342
|
|
|
661
|
-
## Cross-Cutting: Self-Check
|
|
343
|
+
## Cross-Cutting: Self-Check & Constraints
|
|
662
344
|
|
|
663
345
|
<agent_self_check>
|
|
664
|
-
**After each tool call
|
|
665
|
-
**
|
|
666
|
-
**If stuck:** STOP and ask user.
|
|
346
|
+
**After each tool call**: Hints followed? On track? Task progress updated?
|
|
347
|
+
**If stuck**: STOP and ask user.
|
|
667
348
|
|
|
668
|
-
**Phase gates
|
|
349
|
+
**Phase gates**: Server "ok" → Context + prompt stated → Fast-path evaluated → Plan approved → Research (follow hints) → Checkpoint when needed → Output (TL;DR + refs + question)
|
|
669
350
|
|
|
670
351
|
**Multi-domain?** → See `references/PARALLEL_AGENT_PROTOCOL.md`
|
|
671
352
|
</agent_self_check>
|
|
672
353
|
|
|
673
|
-
---
|
|
674
|
-
|
|
675
|
-
## Reference: Global Constraints
|
|
676
|
-
|
|
677
354
|
<global_constraints>
|
|
678
|
-
### Core Principles
|
|
355
|
+
### Core Principles
|
|
679
356
|
|
|
680
|
-
1. **
|
|
681
|
-
2. **
|
|
682
|
-
3. **
|
|
683
|
-
4. **
|
|
357
|
+
1. **Understand before acting** — read tool schemas from context before calling
|
|
358
|
+
2. **Follow hints** — tool responses guide next actions
|
|
359
|
+
3. **Be data-driven** — follow schemas, never guess parameter values
|
|
360
|
+
4. **If value unknown** — find it first with another tool
|
|
684
361
|
|
|
685
|
-
### Research Params (
|
|
362
|
+
### Required Research Params (EVERY tool call)
|
|
686
363
|
|
|
687
364
|
| Parameter | Description |
|
|
688
365
|
|-----------|-------------|
|
|
689
366
|
| `mainResearchGoal` | Overall objective |
|
|
690
|
-
| `researchGoal` | This
|
|
367
|
+
| `researchGoal` | This step's goal |
|
|
691
368
|
| `reasoning` | Why this tool/params |
|
|
692
369
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
### Execution Rules
|
|
696
|
-
|
|
697
|
-
See Phase 3 for parallel execution strategy.
|
|
698
|
-
|
|
699
|
-
### Output Standards
|
|
700
|
-
|
|
701
|
-
See Phase 5 (Output Gate) for reference formats.
|
|
370
|
+
Tool calls without all three parameters are FORBIDDEN.
|
|
702
371
|
</global_constraints>
|
|
703
372
|
|
|
704
373
|
---
|
|
705
374
|
|
|
706
375
|
## Additional Resources
|
|
707
376
|
|
|
708
|
-
- **`references/GUARDRAILS.md`**
|
|
377
|
+
- **`references/GUARDRAILS.md`** — Security, trust levels, limits, integrity rules
|
|
378
|
+
- **`references/PARALLEL_AGENT_PROTOCOL.md`** — When to parallelize, domain examples, spawn/barrier/merge protocol
|
|
379
|
+
- **`references/SESSION_MANAGEMENT.md`** — Checkpoint protocol, session directory, resume logic
|