claude-code-workflow 7.2.28 → 7.2.30
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/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json +2 -2
- package/.ccw/workflows/cli-templates/schemas/task-schema.json +14 -7
- package/.claude/agents/action-planning-agent.md +7 -4
- package/.claude/agents/cli-explore-agent.md +77 -63
- package/.claude/agents/cli-lite-planning-agent.md +11 -10
- package/.claude/agents/issue-plan-agent.md +421 -426
- package/.claude/commands/workflow/spec/setup.md +1 -1
- package/.claude/skills/ccw-chain/SKILL.md +119 -0
- package/.claude/skills/ccw-chain/chains/ccw-cycle.json +21 -0
- package/.claude/skills/ccw-chain/chains/ccw-exploration.json +47 -0
- package/.claude/skills/ccw-chain/chains/ccw-issue.json +33 -0
- package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +57 -0
- package/.claude/skills/ccw-chain/chains/ccw-main.json +52 -0
- package/.claude/skills/ccw-chain/chains/ccw-standard.json +39 -0
- package/.claude/skills/ccw-chain/chains/ccw-team.json +10 -0
- package/.claude/skills/ccw-chain/chains/ccw-with-file.json +31 -0
- package/.claude/skills/ccw-chain/phases/analyze-with-file.md +788 -0
- package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +408 -0
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +207 -0
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +567 -0
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +748 -0
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +827 -0
- package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +482 -0
- package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +639 -0
- package/.claude/skills/ccw-chain/phases/debug-with-file.md +656 -0
- package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +936 -0
- package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +720 -0
- package/.claude/skills/ccw-chain/phases/issue-discover.md +483 -0
- package/.claude/skills/ccw-chain/phases/issue-execute.md +629 -0
- package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +382 -0
- package/.claude/skills/ccw-chain/phases/issue-plan.md +343 -0
- package/.claude/skills/ccw-chain/phases/issue-queue.md +464 -0
- package/.claude/skills/ccw-chain/phases/refactor-cycle.md +852 -0
- package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +132 -0
- package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +760 -0
- package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +764 -0
- package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +775 -0
- package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +544 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +338 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +404 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +257 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +274 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +184 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +248 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +178 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +144 -0
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +480 -0
- package/.claude/skills/ccw-chain/phases/team-planex.md +123 -0
- package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +678 -0
- package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +870 -0
- package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +625 -0
- package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +215 -0
- package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +616 -0
- package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +424 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +466 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +99 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +338 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +422 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +440 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +395 -0
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +594 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +527 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +57 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +407 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +172 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +473 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +189 -0
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +635 -0
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +482 -0
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +60 -0
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +493 -0
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +150 -0
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +346 -0
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +538 -0
- package/.claude/skills/ccw-chain/specs/auto-mode.md +47 -0
- package/.claude/skills/ccw-chain/specs/intent-patterns.md +60 -0
- package/.claude/skills/chain-loader/SKILL.md +78 -0
- package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -0
- package/.claude/skills/chain-loader/phases/02-design-graph.md +73 -0
- package/.claude/skills/chain-loader/phases/03-generate-validate.md +75 -0
- package/.claude/skills/chain-loader/specs/chain-schema.md +99 -0
- package/.claude/skills/chain-loader/specs/design-patterns.md +99 -0
- package/.claude/skills/chain-loader/templates/chain-json.md +63 -0
- package/.claude/skills/review-cycle/phases/review-module.md +764 -764
- package/.claude/skills/review-cycle/phases/review-session.md +775 -775
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -422
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +395 -395
- package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +407 -407
- package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -426
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +493 -493
- package/.codex/skills/brainstorm/SKILL.md +3 -3
- package/.codex/skills/clean/SKILL.md +3 -3
- package/.codex/skills/issue-discover/SKILL.md +13 -13
- package/.codex/skills/issue-discover/phases/02-discover.md +4 -4
- package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +3 -3
- package/.codex/skills/parallel-dev-cycle/SKILL.md +4 -4
- package/.codex/skills/parallel-dev-cycle/phases/02-agent-execution.md +6 -6
- package/.codex/skills/parallel-dev-cycle/phases/03-result-aggregation.md +10 -10
- package/.codex/skills/review-cycle/SKILL.md +10 -10
- package/.codex/skills/review-cycle/phases/02-parallel-review.md +6 -6
- package/.codex/skills/review-cycle/phases/04-iterative-deep-dive.md +4 -4
- package/.codex/skills/review-cycle/phases/07-fix-parallel-planning.md +4 -4
- package/.codex/skills/review-cycle/phases/08-fix-execution.md +2 -2
- package/.codex/skills/roadmap-with-file/SKILL.md +14 -14
- package/.codex/skills/spec-generator/README.md +1 -1
- package/.codex/skills/spec-generator/SKILL.md +184 -88
- package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +4 -7
- package/.codex/skills/spec-generator/phases/01-discovery.md +30 -11
- package/.codex/skills/spec-generator/phases/02-product-brief.md +2 -5
- package/.codex/skills/spec-generator/phases/03-requirements.md +4 -6
- package/.codex/skills/spec-generator/phases/04-architecture.md +4 -6
- package/.codex/skills/spec-generator/phases/05-epics-stories.md +4 -6
- package/.codex/skills/spec-generator/phases/06-5-auto-fix.md +4 -5
- package/.codex/skills/spec-generator/phases/06-readiness-check.md +8 -8
- package/.codex/skills/spec-generator/phases/07-issue-export.md +2 -2
- package/.codex/skills/spec-setup/SKILL.md +4 -4
- package/.codex/skills/workflow-plan/SKILL.md +6 -6
- package/.codex/skills/workflow-tdd-plan/SKILL.md +5 -5
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +19 -19
- package/.codex/skills/workflow-test-fix-cycle/phases/01-test-fix-gen.md +5 -5
- package/.codex/skills/workflow-test-fix-cycle/phases/02-test-cycle-execute.md +5 -5
- package/README.md +14 -0
- package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.js +0 -23
- package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
- package/ccw/dist/tools/chain-loader.d.ts +10 -0
- package/ccw/dist/tools/chain-loader.d.ts.map +1 -0
- package/ccw/dist/tools/chain-loader.js +642 -0
- package/ccw/dist/tools/chain-loader.js.map +1 -0
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +2 -0
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/json-builder.js +20 -0
- package/ccw/dist/tools/json-builder.js.map +1 -1
- package/ccw/dist/types/chain-types.d.ts +72 -0
- package/ccw/dist/types/chain-types.d.ts.map +1 -0
- package/ccw/dist/types/chain-types.js +5 -0
- package/ccw/dist/types/chain-types.js.map +1 -0
- package/ccw/frontend/dist/assets/{AlertDialog-BjP1ydDR.js → AlertDialog-exlTDW81.js} +3 -3
- package/ccw/frontend/dist/assets/{AlertDialog-BjP1ydDR.js.map → AlertDialog-exlTDW81.js.map} +1 -1
- package/ccw/frontend/dist/assets/{AnalysisPage-CAX3xqMf.js → AnalysisPage-cgV9LfAI.js} +2 -2
- package/ccw/frontend/dist/assets/{AnalysisPage-CAX3xqMf.js.map → AnalysisPage-cgV9LfAI.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ApiSettingsPage-CtWlmztq.js → ApiSettingsPage-Dk5jJdWt.js} +2 -2
- package/ccw/frontend/dist/assets/{ApiSettingsPage-CtWlmztq.js.map → ApiSettingsPage-Dk5jJdWt.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliModeToggle-hR4a-eLX.js → CliModeToggle-Be9xsPiv.js} +2 -2
- package/ccw/frontend/dist/assets/{CliModeToggle-hR4a-eLX.js.map → CliModeToggle-Be9xsPiv.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliSessionSharePage-DzNPkFN9.js → CliSessionSharePage-Bh9jBtPI.js} +2 -2
- package/ccw/frontend/dist/assets/{CliSessionSharePage-DzNPkFN9.js.map → CliSessionSharePage-Bh9jBtPI.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliViewerPage-BPEGN4TT.js → CliViewerPage-BrE-oyEq.js} +2 -2
- package/ccw/frontend/dist/assets/{CliViewerPage-BPEGN4TT.js.map → CliViewerPage-BrE-oyEq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CodexLensPage-Cf0r2RHY.js → CodexLensPage-Cd3nrC93.js} +2 -2
- package/ccw/frontend/dist/assets/{CodexLensPage-Cf0r2RHY.js.map → CodexLensPage-Cd3nrC93.js.map} +1 -1
- package/ccw/frontend/dist/assets/{Collapsible-DEm1rJ4h.js → Collapsible-DXFl3VKF.js} +2 -2
- package/ccw/frontend/dist/assets/{Collapsible-DEm1rJ4h.js.map → Collapsible-DXFl3VKF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CommandsManagerPage-BpeWw8HO.js → CommandsManagerPage-IV8zpjgX.js} +2 -2
- package/ccw/frontend/dist/assets/{CommandsManagerPage-BpeWw8HO.js.map → CommandsManagerPage-IV8zpjgX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{DeepWikiPage-BEsmh2vF.js → DeepWikiPage-CpDxtmRX.js} +2 -2
- package/ccw/frontend/dist/assets/{DeepWikiPage-BEsmh2vF.js.map → DeepWikiPage-CpDxtmRX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{EndpointsPage-B30SFdtU.js → EndpointsPage-BchjWe7s.js} +2 -2
- package/ccw/frontend/dist/assets/{EndpointsPage-B30SFdtU.js.map → EndpointsPage-BchjWe7s.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ExplorerPage-BVvMpg1O.js → ExplorerPage-CbWvaJ0y.js} +2 -2
- package/ccw/frontend/dist/assets/{ExplorerPage-BVvMpg1O.js.map → ExplorerPage-CbWvaJ0y.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FixSessionPage-CL73dHbh.js → FixSessionPage-YMjVRiCk.js} +2 -2
- package/ccw/frontend/dist/assets/{FixSessionPage-CL73dHbh.js.map → FixSessionPage-YMjVRiCk.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-BL-28lMZ.js → FloatingFileBrowser-JW2ehYY_.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-BL-28lMZ.js.map → FloatingFileBrowser-JW2ehYY_.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingPanel-BzZDciHZ.js → FloatingPanel-BtqzqDVq.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingPanel-BzZDciHZ.js.map → FloatingPanel-BtqzqDVq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{GraphExplorerPage-CDp6-d8P.js → GraphExplorerPage-BsJL_W4d.js} +3 -3
- package/ccw/frontend/dist/assets/{GraphExplorerPage-CDp6-d8P.js.map → GraphExplorerPage-BsJL_W4d.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HistoryPage-fZY_7O9n.js → HistoryPage-BuWpQ7k5.js} +2 -2
- package/ccw/frontend/dist/assets/{HistoryPage-fZY_7O9n.js.map → HistoryPage-BuWpQ7k5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HookManagerPage-4LJeC9bq.js → HookManagerPage-D0BtMIWy.js} +2 -2
- package/ccw/frontend/dist/assets/{HookManagerPage-4LJeC9bq.js.map → HookManagerPage-D0BtMIWy.js.map} +1 -1
- package/ccw/frontend/dist/assets/{InstallationsPage-Bpigrbhw.js → InstallationsPage-C7dwsAKG.js} +2 -2
- package/ccw/frontend/dist/assets/{InstallationsPage-Bpigrbhw.js.map → InstallationsPage-C7dwsAKG.js.map} +1 -1
- package/ccw/frontend/dist/assets/{IssueHubPage-BP0zJc1R.js → IssueHubPage-D0nCNaeB.js} +2 -2
- package/ccw/frontend/dist/assets/{IssueHubPage-BP0zJc1R.js.map → IssueHubPage-D0nCNaeB.js.map} +1 -1
- package/ccw/frontend/dist/assets/{LiteTasksPage-CSt2oVKQ.js → LiteTasksPage-B5c2Kb9r.js} +3 -3
- package/ccw/frontend/dist/assets/{LiteTasksPage-CSt2oVKQ.js.map → LiteTasksPage-B5c2Kb9r.js.map} +1 -1
- package/ccw/frontend/dist/assets/{McpManagerPage-B-xaMA0w.js → McpManagerPage-C-S5CehM.js} +2 -2
- package/ccw/frontend/dist/assets/{McpManagerPage-B-xaMA0w.js.map → McpManagerPage-C-S5CehM.js.map} +1 -1
- package/ccw/frontend/dist/assets/{MemoryPage-CJqo_7DY.js → MemoryPage-P_B0JVUQ.js} +2 -2
- package/ccw/frontend/dist/assets/{MemoryPage-CJqo_7DY.js.map → MemoryPage-P_B0JVUQ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{NotFoundPage-ibZeQA-Y.js → NotFoundPage-S4Jn9LUE.js} +2 -2
- package/ccw/frontend/dist/assets/{NotFoundPage-ibZeQA-Y.js.map → NotFoundPage-S4Jn9LUE.js.map} +1 -1
- package/ccw/frontend/dist/assets/{OrchestratorPage-DgJ4ctPQ.js → OrchestratorPage-C2Zlr7AC.js} +2 -2
- package/ccw/frontend/dist/assets/{OrchestratorPage-DgJ4ctPQ.js.map → OrchestratorPage-C2Zlr7AC.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-Cit0Yq0D.js → ProjectOverviewPage-CMVfz8s5.js} +2 -2
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-Cit0Yq0D.js.map → ProjectOverviewPage-CMVfz8s5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{PromptHistoryPage-Ce1HDIK0.js → PromptHistoryPage-YEMjFARX.js} +3 -3
- package/ccw/frontend/dist/assets/{PromptHistoryPage-Ce1HDIK0.js.map → PromptHistoryPage-YEMjFARX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ReviewSessionPage-J1KikNrk.js → ReviewSessionPage-DnTm55nG.js} +2 -2
- package/ccw/frontend/dist/assets/{ReviewSessionPage-J1KikNrk.js.map → ReviewSessionPage-DnTm55nG.js.map} +1 -1
- package/ccw/frontend/dist/assets/{RulesManagerPage-CdBjTmth.js → RulesManagerPage-CUwebtO2.js} +2 -2
- package/ccw/frontend/dist/assets/{RulesManagerPage-CdBjTmth.js.map → RulesManagerPage-CUwebtO2.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionDetailPage-B9ZK7LvX.js → SessionDetailPage-0qyH1Z5P.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionDetailPage-B9ZK7LvX.js.map → SessionDetailPage-0qyH1Z5P.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionsPage-CW_nS5UR.js → SessionsPage-BpgP4087.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionsPage-CW_nS5UR.js.map → SessionsPage-BpgP4087.js.map} +1 -1
- package/ccw/frontend/dist/assets/SettingsPage-C3SJajeT.js +150 -0
- package/ccw/frontend/dist/assets/SettingsPage-C3SJajeT.js.map +1 -0
- package/ccw/frontend/dist/assets/SkillsManagerPage-vD9PTsmy.js +7 -0
- package/ccw/frontend/dist/assets/SkillsManagerPage-vD9PTsmy.js.map +1 -0
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-DJpi9XQL.js → SpecsSettingsPage-DT-yTVkD.js} +4 -4
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-DJpi9XQL.js.map → SpecsSettingsPage-DT-yTVkD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{Switch-Ac6Ov7uy.js → Switch-CYSPdqWk.js} +2 -2
- package/ccw/frontend/dist/assets/{Switch-Ac6Ov7uy.js.map → Switch-CYSPdqWk.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TabsNavigation-DZAAspqR.js → TabsNavigation-CPh6Zor1.js} +2 -2
- package/ccw/frontend/dist/assets/{TabsNavigation-DZAAspqR.js.map → TabsNavigation-CPh6Zor1.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TaskDrawer-BJkwfhIZ.js → TaskDrawer-Ds-8830B.js} +2 -2
- package/ccw/frontend/dist/assets/{TaskDrawer-BJkwfhIZ.js.map → TaskDrawer-Ds-8830B.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TeamPage-BJgjxBgb.js → TeamPage-CJODUxBk.js} +2 -2
- package/ccw/frontend/dist/assets/{TeamPage-BJgjxBgb.js.map → TeamPage-CJODUxBk.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-D1WekoOy.js → TerminalDashboardPage-Cn3fGUuO.js} +3 -3
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-D1WekoOy.js.map → TerminalDashboardPage-Cn3fGUuO.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-DxemgIhF.js → archive-CjwVpw6k.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-DxemgIhF.js.map → archive-CjwVpw6k.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-restore-CjS83f1V.js → archive-restore-2vZa9Ic3.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-restore-CjS83f1V.js.map → archive-restore-2vZa9Ic3.js.map} +1 -1
- package/ccw/frontend/dist/assets/{arrow-right-B5PUcn8I.js → arrow-right-CUU5XDgT.js} +2 -2
- package/ccw/frontend/dist/assets/{arrow-right-B5PUcn8I.js.map → arrow-right-CUU5XDgT.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bookmark-plus-DCc9aPbb.js → bookmark-plus-Cc3nKRZ5.js} +2 -2
- package/ccw/frontend/dist/assets/{bookmark-plus-DCc9aPbb.js.map → bookmark-plus-Cc3nKRZ5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bot-DOwFtzak.js → bot-BwpSRDUa.js} +2 -2
- package/ccw/frontend/dist/assets/{bot-DOwFtzak.js.map → bot-BwpSRDUa.js.map} +1 -1
- package/ccw/frontend/dist/assets/{braces-96qH3aFh.js → braces-DBzUW1XC.js} +2 -2
- package/ccw/frontend/dist/assets/{braces-96qH3aFh.js.map → braces-DBzUW1XC.js.map} +1 -1
- package/ccw/frontend/dist/assets/{circle-stop-CCxSuil1.js → circle-stop-CGNNsjvE.js} +2 -2
- package/ccw/frontend/dist/assets/{circle-stop-CCxSuil1.js.map → circle-stop-CGNNsjvE.js.map} +1 -1
- package/ccw/frontend/dist/assets/{cpu-CZNSJFdq.js → cpu-D27G86Ul.js} +2 -2
- package/ccw/frontend/dist/assets/{cpu-CZNSJFdq.js.map → cpu-D27G86Ul.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ellipsis-vertical-h8xtvw2_.js → ellipsis-vertical-C1Ij47Yz.js} +2 -2
- package/ccw/frontend/dist/assets/{ellipsis-vertical-h8xtvw2_.js.map → ellipsis-vertical-C1Ij47Yz.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-D3NY0bm6.js → eye-C6MOB7Au.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-D3NY0bm6.js.map → eye-C6MOB7Au.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-off-Cy2vkc8p.js → eye-off-BxfBlZ26.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-off-Cy2vkc8p.js.map → eye-off-BxfBlZ26.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-json-Bzq3U1Mx.js → file-json-NI237wA-.js} +2 -2
- package/ccw/frontend/dist/assets/{file-json-Bzq3U1Mx.js.map → file-json-NI237wA-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-text-DwuwPDPi.js → file-text-Byn2_2v6.js} +2 -2
- package/ccw/frontend/dist/assets/{file-text-DwuwPDPi.js.map → file-text-Byn2_2v6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{filter-q9g-bknU.js → filter-D-7PhZjx.js} +2 -2
- package/ccw/frontend/dist/assets/{filter-q9g-bknU.js.map → filter-D-7PhZjx.js.map} +1 -1
- package/ccw/frontend/dist/assets/{folder-CL6vb42J.js → folder-BoAsK_FL.js} +2 -2
- package/ccw/frontend/dist/assets/{folder-CL6vb42J.js.map → folder-BoAsK_FL.js.map} +1 -1
- package/ccw/frontend/dist/assets/{gauge-BkrcQBly.js → gauge-DCSxJIS4.js} +2 -2
- package/ccw/frontend/dist/assets/{gauge-BkrcQBly.js.map → gauge-DCSxJIS4.js.map} +1 -1
- package/ccw/frontend/dist/assets/{globe-BQbwyNeV.js → globe-CHS3prza.js} +2 -2
- package/ccw/frontend/dist/assets/{globe-BQbwyNeV.js.map → globe-CHS3prza.js.map} +1 -1
- package/ccw/frontend/dist/assets/{grid-3x3-x5_7DrN7.js → grid-3x3-D7K35U7S.js} +2 -2
- package/ccw/frontend/dist/assets/{grid-3x3-x5_7DrN7.js.map → grid-3x3-D7K35U7S.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hard-drive-DTyWXwzf.js → hard-drive-eq9xE07G.js} +2 -2
- package/ccw/frontend/dist/assets/{hard-drive-DTyWXwzf.js.map → hard-drive-eq9xE07G.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hash-80O0kJO7.js → hash-C1DMpBua.js} +2 -2
- package/ccw/frontend/dist/assets/{hash-80O0kJO7.js.map → hash-C1DMpBua.js.map} +1 -1
- package/ccw/frontend/dist/assets/{history-DDlN2Bwa.js → history-Di5SBCY-.js} +2 -2
- package/ccw/frontend/dist/assets/{history-DDlN2Bwa.js.map → history-Di5SBCY-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-mbeo62f8.js → index--_R7COnA.js} +2 -2
- package/ccw/frontend/dist/assets/{index-mbeo62f8.js.map → index--_R7COnA.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-rLgoBCfV.js → index-BUol9HDD.js} +3 -3
- package/ccw/frontend/dist/assets/{index-rLgoBCfV.js.map → index-BUol9HDD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-Bs80iCX0.js → index-CT9oykfw.js} +2 -2
- package/ccw/frontend/dist/assets/{index-Bs80iCX0.js.map → index-CT9oykfw.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-B9A3Hnrk.js → index-Ddwvf87H.js} +2 -2
- package/ccw/frontend/dist/assets/{index-B9A3Hnrk.js.map → index-Ddwvf87H.js.map} +1 -1
- package/ccw/frontend/dist/assets/{layout-grid-C1niOWJx.js → layout-grid-LiX0qZbN.js} +2 -2
- package/ccw/frontend/dist/assets/{layout-grid-C1niOWJx.js.map → layout-grid-LiX0qZbN.js.map} +1 -1
- package/ccw/frontend/dist/assets/{lightbulb-BTmI7SUg.js → lightbulb-CL3DVEwb.js} +2 -2
- package/ccw/frontend/dist/assets/{lightbulb-BTmI7SUg.js.map → lightbulb-CL3DVEwb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-2-CB9HKeuZ.js → link-2-CC5cFeq6.js} +2 -2
- package/ccw/frontend/dist/assets/{link-2-CB9HKeuZ.js.map → link-2-CC5cFeq6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-koEYiemK.js → link-ngFQ9bs0.js} +2 -2
- package/ccw/frontend/dist/assets/{link-koEYiemK.js.map → link-ngFQ9bs0.js.map} +1 -1
- package/ccw/frontend/dist/assets/{list-v2_GaLdC.js → list-BEU6I0KK.js} +2 -2
- package/ccw/frontend/dist/assets/{list-v2_GaLdC.js.map → list-BEU6I0KK.js.map} +1 -1
- package/ccw/frontend/dist/assets/{map-pin-BQNfAqG_.js → map-pin-BWZdLA6y.js} +2 -2
- package/ccw/frontend/dist/assets/{map-pin-BQNfAqG_.js.map → map-pin-BWZdLA6y.js.map} +1 -1
- package/ccw/frontend/dist/assets/{messages-square-Dzq5LGg9.js → messages-square-K6_Chm7n.js} +2 -2
- package/ccw/frontend/dist/assets/{messages-square-Dzq5LGg9.js.map → messages-square-K6_Chm7n.js.map} +1 -1
- package/ccw/frontend/dist/assets/{minimize-2-CtkoJXcz.js → minimize-2-CWkphauf.js} +2 -2
- package/ccw/frontend/dist/assets/{minimize-2-CtkoJXcz.js.map → minimize-2-CWkphauf.js.map} +1 -1
- package/ccw/frontend/dist/assets/{package-CH3smL37.js → package-DrNgkamn.js} +2 -2
- package/ccw/frontend/dist/assets/{package-CH3smL37.js.map → package-DrNgkamn.js.map} +1 -1
- package/ccw/frontend/dist/assets/{plug-CZ0aL_yF.js → plug-CMo3sw5_.js} +2 -2
- package/ccw/frontend/dist/assets/{plug-CZ0aL_yF.js.map → plug-CMo3sw5_.js.map} +1 -1
- package/ccw/frontend/dist/assets/{power-F2A_J4l6.js → power-DppNTW5e.js} +2 -2
- package/ccw/frontend/dist/assets/{power-F2A_J4l6.js.map → power-DppNTW5e.js.map} +1 -1
- package/ccw/frontend/dist/assets/{save-Byxot0YU.js → save-CD8aPMbZ.js} +2 -2
- package/ccw/frontend/dist/assets/{save-Byxot0YU.js.map → save-CD8aPMbZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{send-JjqhUkpw.js → send-B4z90fQD.js} +2 -2
- package/ccw/frontend/dist/assets/{send-JjqhUkpw.js.map → send-B4z90fQD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{settings-2--SuN9rAt.js → settings-2-CAKRU_QC.js} +2 -2
- package/ccw/frontend/dist/assets/{settings-2--SuN9rAt.js.map → settings-2-CAKRU_QC.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-check-big-BbngGB2h.js → square-check-big-KhI3HrzX.js} +2 -2
- package/ccw/frontend/dist/assets/{square-check-big-BbngGB2h.js.map → square-check-big-KhI3HrzX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-pen-CgrHgZSl.js → square-pen-BtdGIpuq.js} +2 -2
- package/ccw/frontend/dist/assets/{square-pen-CgrHgZSl.js.map → square-pen-BtdGIpuq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{star-BU3TQr7Z.js → star-ZoBUkXoD.js} +2 -2
- package/ccw/frontend/dist/assets/{star-BU3TQr7Z.js.map → star-ZoBUkXoD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{style-CKs7nnn3.js → style-CltxQP-P.js} +2 -2
- package/ccw/frontend/dist/assets/{style-CKs7nnn3.js.map → style-CltxQP-P.js.map} +1 -1
- package/ccw/frontend/dist/assets/{target-DW5tsDW6.js → target-C32OUSGf.js} +2 -2
- package/ccw/frontend/dist/assets/{target-DW5tsDW6.js.map → target-C32OUSGf.js.map} +1 -1
- package/ccw/frontend/dist/assets/{test-tube-BHm7w3ON.js → test-tube-0IxoyAVZ.js} +2 -2
- package/ccw/frontend/dist/assets/{test-tube-BHm7w3ON.js.map → test-tube-0IxoyAVZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{upload-DYR7PWwt.js → upload-4eKCkyBn.js} +2 -2
- package/ccw/frontend/dist/assets/{upload-DYR7PWwt.js.map → upload-4eKCkyBn.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useApiSettings-D0TVgQD_.js → useApiSettings-zLTUWqhi.js} +2 -2
- package/ccw/frontend/dist/assets/{useApiSettings-D0TVgQD_.js.map → useApiSettings-zLTUWqhi.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCli-DfY8mAP8.js → useCli-BtN2vpOX.js} +2 -2
- package/ccw/frontend/dist/assets/{useCli-DfY8mAP8.js.map → useCli-BtN2vpOX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCommands-CGusDp0F.js → useCommands-_spj49qL.js} +2 -2
- package/ccw/frontend/dist/assets/{useCommands-CGusDp0F.js.map → useCommands-_spj49qL.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useDebounce-CIwh0fF1.js → useDebounce-Bm9KFZvd.js} +2 -2
- package/ccw/frontend/dist/assets/{useDebounce-CIwh0fF1.js.map → useDebounce-Bm9KFZvd.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useFileExplorer-FMyFv39K.js → useFileExplorer-DOmpm6v9.js} +2 -2
- package/ccw/frontend/dist/assets/{useFileExplorer-FMyFv39K.js.map → useFileExplorer-DOmpm6v9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useLocale-B2qhsoTb.js → useLocale-D2rj4rea.js} +2 -2
- package/ccw/frontend/dist/assets/{useLocale-B2qhsoTb.js.map → useLocale-D2rj4rea.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSkills-cxKXMBm3.js → useSkills-OskEpomF.js} +3 -3
- package/ccw/frontend/dist/assets/{useSkills-cxKXMBm3.js.map → useSkills-OskEpomF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSystemSettings-B-xUT_z-.js → useSystemSettings-BjMgsNSF.js} +2 -2
- package/ccw/frontend/dist/assets/{useSystemSettings-B-xUT_z-.js.map → useSystemSettings-BjMgsNSF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{wand-sparkles-DZV_3lPr.js → wand-sparkles-CLhyYWa7.js} +2 -2
- package/ccw/frontend/dist/assets/{wand-sparkles-DZV_3lPr.js.map → wand-sparkles-CLhyYWa7.js.map} +1 -1
- package/ccw/frontend/dist/index.html +1 -1
- package/ccw/scripts/prepublish-clean.mjs +0 -1
- package/package.json +1 -3
- package/ccw/frontend/dist/assets/SettingsPage-B2PYzSoO.js +0 -150
- package/ccw/frontend/dist/assets/SettingsPage-B2PYzSoO.js.map +0 -1
- package/ccw/frontend/dist/assets/SkillsManagerPage-CTnWrrwp.js +0 -7
- package/ccw/frontend/dist/assets/SkillsManagerPage-CTnWrrwp.js.map +0 -1
- package/ccw-litellm/README.md +0 -180
- package/ccw-litellm/pyproject.toml +0 -35
- package/ccw-litellm/src/ccw_litellm/__init__.py +0 -47
- package/ccw-litellm/src/ccw_litellm/cli.py +0 -108
- package/ccw-litellm/src/ccw_litellm/clients/__init__.py +0 -12
- package/ccw-litellm/src/ccw_litellm/clients/litellm_embedder.py +0 -270
- package/ccw-litellm/src/ccw_litellm/clients/litellm_llm.py +0 -198
- package/ccw-litellm/src/ccw_litellm/config/__init__.py +0 -22
- package/ccw-litellm/src/ccw_litellm/config/loader.py +0 -343
- package/ccw-litellm/src/ccw_litellm/config/models.py +0 -162
- package/ccw-litellm/src/ccw_litellm/interfaces/__init__.py +0 -14
- package/ccw-litellm/src/ccw_litellm/interfaces/embedder.py +0 -52
- package/ccw-litellm/src/ccw_litellm/interfaces/llm.py +0 -45
|
@@ -1,407 +1,407 @@
|
|
|
1
|
-
# Phase 2: Context Gathering
|
|
2
|
-
|
|
3
|
-
Gather project context and analyze codebase via context-search-agent with parallel exploration for TDD planning.
|
|
4
|
-
|
|
5
|
-
## Objective
|
|
6
|
-
|
|
7
|
-
- Gather project context using context-search-agent
|
|
8
|
-
- Identify critical files, architecture patterns, and constraints
|
|
9
|
-
- Detect conflict risk level for Phase 4 decision
|
|
10
|
-
- Update planning-notes.md with findings
|
|
11
|
-
|
|
12
|
-
## Core Philosophy
|
|
13
|
-
|
|
14
|
-
- **Agent Delegation**: Delegate all discovery to `context-search-agent` for autonomous execution
|
|
15
|
-
- **Detection-First**: Check for existing context-package before executing
|
|
16
|
-
- **Plan Mode**: Full comprehensive analysis (vs lightweight brainstorm mode)
|
|
17
|
-
- **Standardized Output**: Generate `.workflow/active/{session}/.process/context-package.json`
|
|
18
|
-
|
|
19
|
-
## Execution
|
|
20
|
-
|
|
21
|
-
### Step 2.1: Context-Package Detection
|
|
22
|
-
|
|
23
|
-
**Execute First** - Check if valid package already exists:
|
|
24
|
-
|
|
25
|
-
```javascript
|
|
26
|
-
const contextPackagePath = `.workflow/active/${sessionId}/.process/context-package.json`;
|
|
27
|
-
|
|
28
|
-
if (file_exists(contextPackagePath)) {
|
|
29
|
-
const existing = Read(contextPackagePath);
|
|
30
|
-
|
|
31
|
-
// Validate package belongs to current session
|
|
32
|
-
if (existing?.metadata?.session_id === sessionId) {
|
|
33
|
-
console.log("Valid context-package found for session:", sessionId);
|
|
34
|
-
console.log("Stats:", existing.statistics);
|
|
35
|
-
console.log("Conflict Risk:", existing.conflict_detection.risk_level);
|
|
36
|
-
// Skip execution, store variables and proceed to Step 2.5
|
|
37
|
-
contextPath = contextPackagePath;
|
|
38
|
-
conflictRisk = existing.conflict_detection.risk_level;
|
|
39
|
-
return; // Early exit - skip Steps 2.2-2.4
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Step 2.2: Complexity Assessment & Parallel Explore
|
|
45
|
-
|
|
46
|
-
**Only execute if Step 2.1 finds no valid package**
|
|
47
|
-
|
|
48
|
-
```javascript
|
|
49
|
-
// 2.2.1 Complexity Assessment
|
|
50
|
-
function analyzeTaskComplexity(taskDescription) {
|
|
51
|
-
const text = taskDescription.toLowerCase();
|
|
52
|
-
if (/architect|refactor|restructure|modular|cross-module/.test(text)) return 'High';
|
|
53
|
-
if (/multiple|several|integrate|migrate|extend/.test(text)) return 'Medium';
|
|
54
|
-
return 'Low';
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const ANGLE_PRESETS = {
|
|
58
|
-
architecture: ['architecture', 'dependencies', 'modularity', 'integration-points'],
|
|
59
|
-
security: ['security', 'auth-patterns', 'dataflow', 'validation'],
|
|
60
|
-
performance: ['performance', 'bottlenecks', 'caching', 'data-access'],
|
|
61
|
-
bugfix: ['error-handling', 'dataflow', 'state-management', 'edge-cases'],
|
|
62
|
-
feature: ['patterns', 'integration-points', 'testing', 'dependencies'],
|
|
63
|
-
refactor: ['architecture', 'patterns', 'dependencies', 'testing']
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
function selectAngles(taskDescription, complexity) {
|
|
67
|
-
const text = taskDescription.toLowerCase();
|
|
68
|
-
let preset = 'feature';
|
|
69
|
-
if (/refactor|architect|restructure/.test(text)) preset = 'architecture';
|
|
70
|
-
else if (/security|auth|permission/.test(text)) preset = 'security';
|
|
71
|
-
else if (/performance|slow|optimi/.test(text)) preset = 'performance';
|
|
72
|
-
else if (/fix|bug|error|issue/.test(text)) preset = 'bugfix';
|
|
73
|
-
|
|
74
|
-
const count = complexity === 'High' ? 4 : (complexity === 'Medium' ? 3 : 1);
|
|
75
|
-
return ANGLE_PRESETS[preset].slice(0, count);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const complexity = analyzeTaskComplexity(task_description);
|
|
79
|
-
const selectedAngles = selectAngles(task_description, complexity);
|
|
80
|
-
const sessionFolder = `.workflow/active/${sessionId}/.process`;
|
|
81
|
-
|
|
82
|
-
// 2.2.2 Launch Parallel Explore Agents
|
|
83
|
-
const explorationTasks = selectedAngles.map((angle, index) =>
|
|
84
|
-
Task(
|
|
85
|
-
subagent_type="cli-explore-agent",
|
|
86
|
-
run_in_background=false,
|
|
87
|
-
description=`Explore: ${angle}`,
|
|
88
|
-
prompt=`
|
|
89
|
-
## Task Objective
|
|
90
|
-
Execute **${angle}** exploration for TDD task planning context. Analyze codebase from this specific angle to discover relevant structure, patterns, and constraints.
|
|
91
|
-
|
|
92
|
-
## Assigned Context
|
|
93
|
-
- **Exploration Angle**: ${angle}
|
|
94
|
-
- **Task Description**: ${task_description}
|
|
95
|
-
- **Session ID**: ${sessionId}
|
|
96
|
-
- **Exploration Index**: ${index + 1} of ${selectedAngles.length}
|
|
97
|
-
- **Output File**: ${sessionFolder}/exploration-${angle}.json
|
|
98
|
-
|
|
99
|
-
## MANDATORY FIRST STEPS (Execute by Agent)
|
|
100
|
-
1. Run: ccw tool exec get_modules_by_depth '{}' (project structure)
|
|
101
|
-
2. Run: rg -l "{keyword_from_task}" --type ts (locate relevant files)
|
|
102
|
-
3. Execute: ccw
|
|
103
|
-
|
|
104
|
-
## Exploration Strategy (${angle} focus)
|
|
105
|
-
|
|
106
|
-
**Step 1: Structural Scan** (Bash)
|
|
107
|
-
- get_modules_by_depth.sh -> identify modules related to ${angle}
|
|
108
|
-
- find/rg -> locate files relevant to ${angle} aspect
|
|
109
|
-
- Analyze imports/dependencies from ${angle} perspective
|
|
110
|
-
|
|
111
|
-
**Step 2: Semantic Analysis** (Gemini CLI)
|
|
112
|
-
- How does existing code handle ${angle} concerns?
|
|
113
|
-
- What patterns are used for ${angle}?
|
|
114
|
-
- Where would new code integrate from ${angle} viewpoint?
|
|
115
|
-
|
|
116
|
-
**Step 3: Write Output**
|
|
117
|
-
- Consolidate ${angle} findings into JSON
|
|
118
|
-
- Identify ${angle}-specific clarification needs
|
|
119
|
-
|
|
120
|
-
## Expected Output
|
|
121
|
-
|
|
122
|
-
**File**: ${sessionFolder}/exploration-${angle}.json
|
|
123
|
-
|
|
124
|
-
**Schema Reference**:
|
|
125
|
-
|
|
126
|
-
**Required Fields** (all ${angle} focused):
|
|
127
|
-
- project_structure: Modules/architecture relevant to ${angle}
|
|
128
|
-
- relevant_files: Files affected from ${angle} perspective
|
|
129
|
-
**MANDATORY**: Every file MUST use structured object format with ALL required fields:
|
|
130
|
-
[{path: "src/file.ts", relevance: 0.85, rationale: "Contains AuthService.login()", role: "modify_target", discovery_source: "bash-scan", key_symbols: ["AuthService", "login"]}]
|
|
131
|
-
- **rationale** (required): Specific selection basis tied to ${angle} topic (>10 chars, not generic)
|
|
132
|
-
- **role** (required): modify_target|dependency|pattern_reference|test_target|type_definition|integration_point|config|context_only
|
|
133
|
-
- **discovery_source** (recommended): bash-scan|cli-analysis|ace-search|dependency-trace|manual
|
|
134
|
-
- **key_symbols** (recommended): Key functions/classes/types in the file relevant to the task
|
|
135
|
-
- Scores: 0.7+ high priority, 0.5-0.7 medium, <0.5 low
|
|
136
|
-
- patterns: ${angle}-related patterns to follow
|
|
137
|
-
- dependencies: Dependencies relevant to ${angle}
|
|
138
|
-
- integration_points: Where to integrate from ${angle} viewpoint (include file:line locations)
|
|
139
|
-
- constraints: ${angle}-specific limitations/conventions
|
|
140
|
-
- clarification_needs: ${angle}-related ambiguities (options array + recommended index)
|
|
141
|
-
- _metadata.exploration_angle: "${angle}"
|
|
142
|
-
|
|
143
|
-
## Success Criteria
|
|
144
|
-
- [ ] Schema
|
|
145
|
-
- [ ] get_modules_by_depth.sh executed
|
|
146
|
-
- [ ] At least 3 relevant files identified with ${angle} rationale
|
|
147
|
-
- [ ] Patterns are actionable (code examples, not generic advice)
|
|
148
|
-
- [ ] Integration points include file:line locations
|
|
149
|
-
- [ ] Constraints are project-specific to ${angle}
|
|
150
|
-
- [ ] JSON output follows schema exactly
|
|
151
|
-
- [ ] clarification_needs includes options + recommended
|
|
152
|
-
|
|
153
|
-
## Output
|
|
154
|
-
Write: ${sessionFolder}/exploration-${angle}.json
|
|
155
|
-
Return: 2-3 sentence summary of ${angle} findings
|
|
156
|
-
`
|
|
157
|
-
)
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
// 2.2.3 Generate Manifest after all complete
|
|
161
|
-
const explorationFiles = bash(`find ${sessionFolder} -name "exploration-*.json" -type f`).split('\n').filter(f => f.trim());
|
|
162
|
-
const explorationManifest = {
|
|
163
|
-
session_id: sessionId,
|
|
164
|
-
task_description,
|
|
165
|
-
timestamp: new Date().toISOString(),
|
|
166
|
-
complexity,
|
|
167
|
-
exploration_count: selectedAngles.length,
|
|
168
|
-
angles_explored: selectedAngles,
|
|
169
|
-
explorations: explorationFiles.map(file => {
|
|
170
|
-
const data = JSON.parse(Read(file));
|
|
171
|
-
return { angle: data._metadata.exploration_angle, file: file.split('/').pop(), path: file, index: data._metadata.exploration_index };
|
|
172
|
-
})
|
|
173
|
-
};
|
|
174
|
-
Write(`${sessionFolder}/explorations-manifest.json`, JSON.stringify(explorationManifest, null, 2));
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Step 2.3: Invoke Context-Search Agent
|
|
178
|
-
|
|
179
|
-
**Only execute after Step 2.2 completes**
|
|
180
|
-
|
|
181
|
-
```javascript
|
|
182
|
-
// Load user intent from planning-notes.md (from Phase 1)
|
|
183
|
-
const planningNotesPath = `.workflow/active/${sessionId}/planning-notes.md`;
|
|
184
|
-
let userIntent = { goal: task_description, key_constraints: "None specified" };
|
|
185
|
-
|
|
186
|
-
if (file_exists(planningNotesPath)) {
|
|
187
|
-
const notesContent = Read(planningNotesPath);
|
|
188
|
-
const goalMatch = notesContent.match(/\*\*GOAL\*\*:\s*(.+)/);
|
|
189
|
-
const constraintsMatch = notesContent.match(/\*\*KEY_CONSTRAINTS\*\*:\s*(.+)/);
|
|
190
|
-
if (goalMatch) userIntent.goal = goalMatch[1].trim();
|
|
191
|
-
if (constraintsMatch) userIntent.key_constraints = constraintsMatch[1].trim();
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
Task(
|
|
195
|
-
subagent_type="context-search-agent",
|
|
196
|
-
run_in_background=false,
|
|
197
|
-
description="Gather comprehensive context for TDD plan",
|
|
198
|
-
prompt=`
|
|
199
|
-
## Execution Mode
|
|
200
|
-
**PLAN MODE** (Comprehensive) - Full Phase 1-3 execution with priority sorting
|
|
201
|
-
|
|
202
|
-
## Session Information
|
|
203
|
-
- **Session ID**: ${sessionId}
|
|
204
|
-
- **Task Description**: ${task_description}
|
|
205
|
-
- **Output Path**: .workflow/${sessionId}/.process/context-package.json
|
|
206
|
-
|
|
207
|
-
## User Intent (from Phase 1 - Planning Notes)
|
|
208
|
-
**GOAL**: ${userIntent.goal}
|
|
209
|
-
**KEY_CONSTRAINTS**: ${userIntent.key_constraints}
|
|
210
|
-
|
|
211
|
-
This is the PRIMARY context source - all subsequent analysis must align with user intent.
|
|
212
|
-
|
|
213
|
-
## Exploration Input (from Step 2.2)
|
|
214
|
-
- **Manifest**: ${sessionFolder}/explorations-manifest.json
|
|
215
|
-
- **Exploration Count**: ${explorationManifest.exploration_count}
|
|
216
|
-
- **Angles**: ${explorationManifest.angles_explored.join(', ')}
|
|
217
|
-
- **Complexity**: ${complexity}
|
|
218
|
-
|
|
219
|
-
## Mission
|
|
220
|
-
Execute complete context-search-agent workflow for TDD implementation planning:
|
|
221
|
-
|
|
222
|
-
### Phase 1: Initialization & Pre-Analysis
|
|
223
|
-
1. **Project State Loading**:
|
|
224
|
-
- Run: \`ccw spec load --category execution\` to load project context, tech stack, and guidelines.
|
|
225
|
-
- Run: \`ccw spec load --category test\` to load test framework conventions, coverage targets, and fixtures.
|
|
226
|
-
- If files don't exist, proceed with fresh analysis.
|
|
227
|
-
2. **Detection**: Check for existing context-package (early exit if valid)
|
|
228
|
-
3. **Foundation**: Initialize CodexLens, get project structure, load docs
|
|
229
|
-
4. **Analysis**: Extract keywords, determine scope, classify complexity
|
|
230
|
-
|
|
231
|
-
### Phase 2: Multi-Source Context Discovery
|
|
232
|
-
Execute all discovery tracks (WITH USER INTENT INTEGRATION):
|
|
233
|
-
- **Track -1**: User Intent & Priority Foundation (EXECUTE FIRST)
|
|
234
|
-
- Load user intent (GOAL, KEY_CONSTRAINTS) from session input
|
|
235
|
-
- Map user requirements to codebase entities (files, modules, patterns)
|
|
236
|
-
- Establish baseline priority scores based on user goal alignment
|
|
237
|
-
- Output: user_intent_mapping.json with preliminary priority scores
|
|
238
|
-
|
|
239
|
-
- **Track 0**: Exploration Synthesis (load explorations-manifest.json, prioritize critical_files, deduplicate patterns/integration_points)
|
|
240
|
-
- **Track 1**: Historical archive analysis (query manifest.json for lessons learned)
|
|
241
|
-
- **Track 2**: Reference documentation (CLAUDE.md, architecture docs)
|
|
242
|
-
- **Track 3**: Web examples (use Exa MCP for unfamiliar tech/APIs)
|
|
243
|
-
- **Track 4**: Codebase analysis (5-layer discovery: files, content, patterns, deps, config/tests)
|
|
244
|
-
|
|
245
|
-
### Phase 3: Synthesis, Assessment & Packaging
|
|
246
|
-
1. Apply relevance scoring and build dependency graph
|
|
247
|
-
2. **Synthesize 5-source data**: Merge findings from all sources
|
|
248
|
-
- Priority order: User Intent > Archive > Docs > Exploration > Code > Web
|
|
249
|
-
- **Prioritize the context from project-tech.json** for architecture and tech stack
|
|
250
|
-
3. **Context Priority Sorting**:
|
|
251
|
-
a. Combine scores from Track -1 (user intent alignment) + relevance scores + exploration critical_files
|
|
252
|
-
b. Classify files into priority tiers:
|
|
253
|
-
- **Critical** (score >= 0.85): Directly mentioned in user goal OR exploration critical_files
|
|
254
|
-
- **High** (0.70-0.84): Key dependencies, patterns required for goal
|
|
255
|
-
- **Medium** (0.50-0.69): Supporting files, indirect dependencies
|
|
256
|
-
- **Low** (< 0.50): Contextual awareness only
|
|
257
|
-
c. Generate dependency_order: Based on dependency graph + user goal sequence
|
|
258
|
-
d. Document sorting_rationale: Explain prioritization logic
|
|
259
|
-
4. **Populate project_context**: Directly use the overview from project-tech.json
|
|
260
|
-
5. **Populate project_guidelines**: Load from specs/*.md
|
|
261
|
-
6. Integrate brainstorm artifacts (if .brainstorming/ exists, read content)
|
|
262
|
-
7. Perform conflict detection with risk assessment
|
|
263
|
-
8. **Inject historical conflicts** from archive analysis into conflict_detection
|
|
264
|
-
9. **Generate prioritized_context section**:
|
|
265
|
-
{
|
|
266
|
-
"prioritized_context": {
|
|
267
|
-
"user_intent": { "goal": "...", "scope": "...", "key_constraints": ["..."] },
|
|
268
|
-
"priority_tiers": {
|
|
269
|
-
"critical": [{ "path": "...", "relevance": 0.95, "rationale": "..." }],
|
|
270
|
-
"high": [...], "medium": [...], "low": [...]
|
|
271
|
-
},
|
|
272
|
-
"dependency_order": ["module1", "module2", "module3"],
|
|
273
|
-
"sorting_rationale": "Based on user goal alignment, exploration critical files, and dependency graph"
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
10. Generate and validate context-package.json with prioritized_context field
|
|
277
|
-
|
|
278
|
-
## Output Requirements
|
|
279
|
-
Complete context-package.json with:
|
|
280
|
-
- **metadata**: task_description, keywords, complexity, tech_stack, session_id
|
|
281
|
-
- **project_context**: description, technology_stack, architecture, key_components (from project-tech.json)
|
|
282
|
-
- **project_guidelines**: {conventions, constraints, quality_rules, learnings} (from specs/*.md)
|
|
283
|
-
- **assets**: {documentation[], source_code[], config[], tests[]} with relevance scores
|
|
284
|
-
- **dependencies**: {internal[], external[]} with dependency graph
|
|
285
|
-
- **brainstorm_artifacts**: {guidance_specification, role_analyses[], synthesis_output} with content
|
|
286
|
-
- **conflict_detection**: {risk_level, risk_factors, affected_modules[], mitigation_strategy, historical_conflicts[]}
|
|
287
|
-
- **exploration_results**: {manifest_path, exploration_count, angles, explorations[], aggregated_insights}
|
|
288
|
-
- **prioritized_context**: {user_intent, priority_tiers{critical, high, medium, low}, dependency_order[], sorting_rationale}
|
|
289
|
-
|
|
290
|
-
## Quality Validation
|
|
291
|
-
Before completion verify:
|
|
292
|
-
- [ ] Valid JSON format with all required fields
|
|
293
|
-
- [ ] File relevance accuracy >80%
|
|
294
|
-
- [ ] Dependency graph complete (max 2 transitive levels)
|
|
295
|
-
- [ ] Conflict risk level calculated correctly
|
|
296
|
-
- [ ] No sensitive data exposed
|
|
297
|
-
- [ ] Total files <= 50 (prioritize high-relevance)
|
|
298
|
-
|
|
299
|
-
## Planning Notes Record (REQUIRED)
|
|
300
|
-
After completing context-package.json, append to planning-notes.md:
|
|
301
|
-
|
|
302
|
-
**File**: .workflow/active/${sessionId}/planning-notes.md
|
|
303
|
-
**Location**: Under "## Context Findings (Phase 2)" section
|
|
304
|
-
**Format**:
|
|
305
|
-
### [Context-Search Agent] YYYY-MM-DD
|
|
306
|
-
- **Note**: [Brief summary of key findings]
|
|
307
|
-
|
|
308
|
-
Execute autonomously following agent documentation.
|
|
309
|
-
Report completion with statistics.
|
|
310
|
-
`
|
|
311
|
-
)
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### Step 2.4: Output Verification
|
|
315
|
-
|
|
316
|
-
After agent completes, verify output:
|
|
317
|
-
|
|
318
|
-
```javascript
|
|
319
|
-
// Verify file was created
|
|
320
|
-
const outputPath = `.workflow/active/${sessionId}/.process/context-package.json`;
|
|
321
|
-
if (!file_exists(outputPath)) {
|
|
322
|
-
throw new Error("Agent failed to generate context-package.json");
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// Store variables for subsequent phases
|
|
326
|
-
contextPath = outputPath;
|
|
327
|
-
|
|
328
|
-
// Verify exploration_results included
|
|
329
|
-
const pkg = JSON.parse(Read(outputPath));
|
|
330
|
-
if (pkg.exploration_results?.exploration_count > 0) {
|
|
331
|
-
console.log(`Exploration results aggregated: ${pkg.exploration_results.exploration_count} angles`);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
conflictRisk = pkg.conflict_detection?.risk_level || 'low';
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### TodoWrite Update (Phase 2 in progress - tasks attached)
|
|
338
|
-
|
|
339
|
-
```json
|
|
340
|
-
[
|
|
341
|
-
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
|
342
|
-
{"content": "Phase 2: Context Gathering", "status": "in_progress", "activeForm": "Executing context gathering"},
|
|
343
|
-
{"content": " -> Analyze codebase structure", "status": "in_progress", "activeForm": "Analyzing codebase structure"},
|
|
344
|
-
{"content": " -> Identify integration points", "status": "pending", "activeForm": "Identifying integration points"},
|
|
345
|
-
{"content": " -> Generate context package", "status": "pending", "activeForm": "Generating context package"},
|
|
346
|
-
{"content": "Phase 3: Test Coverage Analysis", "status": "pending", "activeForm": "Executing test coverage analysis"},
|
|
347
|
-
{"content": "Phase 5: TDD Task Generation", "status": "pending", "activeForm": "Executing TDD task generation"},
|
|
348
|
-
{"content": "Phase 6: TDD Structure Validation", "status": "pending", "activeForm": "Validating TDD structure"}
|
|
349
|
-
]
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
### TodoWrite Update (Phase 2 completed - tasks collapsed)
|
|
353
|
-
|
|
354
|
-
```json
|
|
355
|
-
[
|
|
356
|
-
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
|
357
|
-
{"content": "Phase 2: Context Gathering", "status": "completed", "activeForm": "Executing context gathering"},
|
|
358
|
-
{"content": "Phase 3: Test Coverage Analysis", "status": "pending", "activeForm": "Executing test coverage analysis"},
|
|
359
|
-
{"content": "Phase 5: TDD Task Generation", "status": "pending", "activeForm": "Executing TDD task generation"},
|
|
360
|
-
{"content": "Phase 6: TDD Structure Validation", "status": "pending", "activeForm": "Validating TDD structure"}
|
|
361
|
-
]
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
### Step 2.5: Update Planning Notes
|
|
365
|
-
|
|
366
|
-
After context gathering completes, update planning-notes.md with findings:
|
|
367
|
-
|
|
368
|
-
```javascript
|
|
369
|
-
// Read context-package to extract key findings
|
|
370
|
-
const contextPackage = JSON.parse(Read(contextPath))
|
|
371
|
-
const conflictRisk = contextPackage.conflict_detection?.risk_level || 'low'
|
|
372
|
-
const criticalFiles = (contextPackage.exploration_results?.aggregated_insights?.critical_files || [])
|
|
373
|
-
.slice(0, 5).map(f => f.path)
|
|
374
|
-
const archPatterns = contextPackage.project_context?.architecture_patterns || []
|
|
375
|
-
const constraints = contextPackage.exploration_results?.aggregated_insights?.constraints || []
|
|
376
|
-
|
|
377
|
-
// Append Phase 2 findings to planning-notes.md
|
|
378
|
-
Edit(planningNotesPath, {
|
|
379
|
-
old: '## Context Findings (Phase 2)\n(To be filled by context-gather)',
|
|
380
|
-
new: `## Context Findings (Phase 2)
|
|
381
|
-
|
|
382
|
-
- **CRITICAL_FILES**: ${criticalFiles.join(', ') || 'None identified'}
|
|
383
|
-
- **ARCHITECTURE**: ${archPatterns.join(', ') || 'Not detected'}
|
|
384
|
-
- **CONFLICT_RISK**: ${conflictRisk}
|
|
385
|
-
- **CONSTRAINTS**: ${constraints.length > 0 ? constraints.join('; ') : 'None'}`
|
|
386
|
-
})
|
|
387
|
-
|
|
388
|
-
// Append Phase 2 constraints to consolidated list
|
|
389
|
-
Edit(planningNotesPath, {
|
|
390
|
-
old: '## Consolidated Constraints (Phase 4 Input)',
|
|
391
|
-
new: `## Consolidated Constraints (Phase 4 Input)
|
|
392
|
-
${constraints.map((c, i) => `${i + 2}. [Context] ${c}`).join('\n')}`
|
|
393
|
-
})
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
**Auto-Continue**: Return to user showing Phase 2 results, then auto-continue to Phase 3.
|
|
397
|
-
|
|
398
|
-
## Output
|
|
399
|
-
|
|
400
|
-
- **Variable**: `contextPath` (path to context-package.json)
|
|
401
|
-
- **Variable**: `conflictRisk` (none/low/medium/high)
|
|
402
|
-
- **File**: `context-package.json`
|
|
403
|
-
- **TodoWrite**: Mark Phase 2 completed, determine Phase 3 or Phase 4
|
|
404
|
-
|
|
405
|
-
## Next Phase
|
|
406
|
-
|
|
407
|
-
Return to orchestrator. Orchestrator continues to [Phase 3: Test Coverage Analysis](03-test-coverage-analysis.md).
|
|
1
|
+
# Phase 2: Context Gathering
|
|
2
|
+
|
|
3
|
+
Gather project context and analyze codebase via context-search-agent with parallel exploration for TDD planning.
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
- Gather project context using context-search-agent
|
|
8
|
+
- Identify critical files, architecture patterns, and constraints
|
|
9
|
+
- Detect conflict risk level for Phase 4 decision
|
|
10
|
+
- Update planning-notes.md with findings
|
|
11
|
+
|
|
12
|
+
## Core Philosophy
|
|
13
|
+
|
|
14
|
+
- **Agent Delegation**: Delegate all discovery to `context-search-agent` for autonomous execution
|
|
15
|
+
- **Detection-First**: Check for existing context-package before executing
|
|
16
|
+
- **Plan Mode**: Full comprehensive analysis (vs lightweight brainstorm mode)
|
|
17
|
+
- **Standardized Output**: Generate `.workflow/active/{session}/.process/context-package.json`
|
|
18
|
+
|
|
19
|
+
## Execution
|
|
20
|
+
|
|
21
|
+
### Step 2.1: Context-Package Detection
|
|
22
|
+
|
|
23
|
+
**Execute First** - Check if valid package already exists:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
const contextPackagePath = `.workflow/active/${sessionId}/.process/context-package.json`;
|
|
27
|
+
|
|
28
|
+
if (file_exists(contextPackagePath)) {
|
|
29
|
+
const existing = Read(contextPackagePath);
|
|
30
|
+
|
|
31
|
+
// Validate package belongs to current session
|
|
32
|
+
if (existing?.metadata?.session_id === sessionId) {
|
|
33
|
+
console.log("Valid context-package found for session:", sessionId);
|
|
34
|
+
console.log("Stats:", existing.statistics);
|
|
35
|
+
console.log("Conflict Risk:", existing.conflict_detection.risk_level);
|
|
36
|
+
// Skip execution, store variables and proceed to Step 2.5
|
|
37
|
+
contextPath = contextPackagePath;
|
|
38
|
+
conflictRisk = existing.conflict_detection.risk_level;
|
|
39
|
+
return; // Early exit - skip Steps 2.2-2.4
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Step 2.2: Complexity Assessment & Parallel Explore
|
|
45
|
+
|
|
46
|
+
**Only execute if Step 2.1 finds no valid package**
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
// 2.2.1 Complexity Assessment
|
|
50
|
+
function analyzeTaskComplexity(taskDescription) {
|
|
51
|
+
const text = taskDescription.toLowerCase();
|
|
52
|
+
if (/architect|refactor|restructure|modular|cross-module/.test(text)) return 'High';
|
|
53
|
+
if (/multiple|several|integrate|migrate|extend/.test(text)) return 'Medium';
|
|
54
|
+
return 'Low';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const ANGLE_PRESETS = {
|
|
58
|
+
architecture: ['architecture', 'dependencies', 'modularity', 'integration-points'],
|
|
59
|
+
security: ['security', 'auth-patterns', 'dataflow', 'validation'],
|
|
60
|
+
performance: ['performance', 'bottlenecks', 'caching', 'data-access'],
|
|
61
|
+
bugfix: ['error-handling', 'dataflow', 'state-management', 'edge-cases'],
|
|
62
|
+
feature: ['patterns', 'integration-points', 'testing', 'dependencies'],
|
|
63
|
+
refactor: ['architecture', 'patterns', 'dependencies', 'testing']
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function selectAngles(taskDescription, complexity) {
|
|
67
|
+
const text = taskDescription.toLowerCase();
|
|
68
|
+
let preset = 'feature';
|
|
69
|
+
if (/refactor|architect|restructure/.test(text)) preset = 'architecture';
|
|
70
|
+
else if (/security|auth|permission/.test(text)) preset = 'security';
|
|
71
|
+
else if (/performance|slow|optimi/.test(text)) preset = 'performance';
|
|
72
|
+
else if (/fix|bug|error|issue/.test(text)) preset = 'bugfix';
|
|
73
|
+
|
|
74
|
+
const count = complexity === 'High' ? 4 : (complexity === 'Medium' ? 3 : 1);
|
|
75
|
+
return ANGLE_PRESETS[preset].slice(0, count);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const complexity = analyzeTaskComplexity(task_description);
|
|
79
|
+
const selectedAngles = selectAngles(task_description, complexity);
|
|
80
|
+
const sessionFolder = `.workflow/active/${sessionId}/.process`;
|
|
81
|
+
|
|
82
|
+
// 2.2.2 Launch Parallel Explore Agents
|
|
83
|
+
const explorationTasks = selectedAngles.map((angle, index) =>
|
|
84
|
+
Task(
|
|
85
|
+
subagent_type="cli-explore-agent",
|
|
86
|
+
run_in_background=false,
|
|
87
|
+
description=`Explore: ${angle}`,
|
|
88
|
+
prompt=`
|
|
89
|
+
## Task Objective
|
|
90
|
+
Execute **${angle}** exploration for TDD task planning context. Analyze codebase from this specific angle to discover relevant structure, patterns, and constraints.
|
|
91
|
+
|
|
92
|
+
## Assigned Context
|
|
93
|
+
- **Exploration Angle**: ${angle}
|
|
94
|
+
- **Task Description**: ${task_description}
|
|
95
|
+
- **Session ID**: ${sessionId}
|
|
96
|
+
- **Exploration Index**: ${index + 1} of ${selectedAngles.length}
|
|
97
|
+
- **Output File**: ${sessionFolder}/exploration-${angle}.json
|
|
98
|
+
|
|
99
|
+
## MANDATORY FIRST STEPS (Execute by Agent)
|
|
100
|
+
1. Run: ccw tool exec get_modules_by_depth '{}' (project structure)
|
|
101
|
+
2. Run: rg -l "{keyword_from_task}" --type ts (locate relevant files)
|
|
102
|
+
3. Execute: cat ~/.ccw/workflows/cli-templates/schemas/explore-json-schema.json (get output schema reference)
|
|
103
|
+
|
|
104
|
+
## Exploration Strategy (${angle} focus)
|
|
105
|
+
|
|
106
|
+
**Step 1: Structural Scan** (Bash)
|
|
107
|
+
- get_modules_by_depth.sh -> identify modules related to ${angle}
|
|
108
|
+
- find/rg -> locate files relevant to ${angle} aspect
|
|
109
|
+
- Analyze imports/dependencies from ${angle} perspective
|
|
110
|
+
|
|
111
|
+
**Step 2: Semantic Analysis** (Gemini CLI)
|
|
112
|
+
- How does existing code handle ${angle} concerns?
|
|
113
|
+
- What patterns are used for ${angle}?
|
|
114
|
+
- Where would new code integrate from ${angle} viewpoint?
|
|
115
|
+
|
|
116
|
+
**Step 3: Write Output**
|
|
117
|
+
- Consolidate ${angle} findings into JSON
|
|
118
|
+
- Identify ${angle}-specific clarification needs
|
|
119
|
+
|
|
120
|
+
## Expected Output
|
|
121
|
+
|
|
122
|
+
**File**: ${sessionFolder}/exploration-${angle}.json
|
|
123
|
+
|
|
124
|
+
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 3, follow schema exactly
|
|
125
|
+
|
|
126
|
+
**Required Fields** (all ${angle} focused):
|
|
127
|
+
- project_structure: Modules/architecture relevant to ${angle}
|
|
128
|
+
- relevant_files: Files affected from ${angle} perspective
|
|
129
|
+
**MANDATORY**: Every file MUST use structured object format with ALL required fields:
|
|
130
|
+
[{path: "src/file.ts", relevance: 0.85, rationale: "Contains AuthService.login()", role: "modify_target", discovery_source: "bash-scan", key_symbols: ["AuthService", "login"]}]
|
|
131
|
+
- **rationale** (required): Specific selection basis tied to ${angle} topic (>10 chars, not generic)
|
|
132
|
+
- **role** (required): modify_target|dependency|pattern_reference|test_target|type_definition|integration_point|config|context_only
|
|
133
|
+
- **discovery_source** (recommended): bash-scan|cli-analysis|ace-search|dependency-trace|manual
|
|
134
|
+
- **key_symbols** (recommended): Key functions/classes/types in the file relevant to the task
|
|
135
|
+
- Scores: 0.7+ high priority, 0.5-0.7 medium, <0.5 low
|
|
136
|
+
- patterns: ${angle}-related patterns to follow
|
|
137
|
+
- dependencies: Dependencies relevant to ${angle}
|
|
138
|
+
- integration_points: Where to integrate from ${angle} viewpoint (include file:line locations)
|
|
139
|
+
- constraints: ${angle}-specific limitations/conventions
|
|
140
|
+
- clarification_needs: ${angle}-related ambiguities (options array + recommended index)
|
|
141
|
+
- _metadata.exploration_angle: "${angle}"
|
|
142
|
+
|
|
143
|
+
## Success Criteria
|
|
144
|
+
- [ ] Schema obtained via cat explore-json-schema.json
|
|
145
|
+
- [ ] get_modules_by_depth.sh executed
|
|
146
|
+
- [ ] At least 3 relevant files identified with ${angle} rationale
|
|
147
|
+
- [ ] Patterns are actionable (code examples, not generic advice)
|
|
148
|
+
- [ ] Integration points include file:line locations
|
|
149
|
+
- [ ] Constraints are project-specific to ${angle}
|
|
150
|
+
- [ ] JSON output follows schema exactly
|
|
151
|
+
- [ ] clarification_needs includes options + recommended
|
|
152
|
+
|
|
153
|
+
## Output
|
|
154
|
+
Write: ${sessionFolder}/exploration-${angle}.json
|
|
155
|
+
Return: 2-3 sentence summary of ${angle} findings
|
|
156
|
+
`
|
|
157
|
+
)
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
// 2.2.3 Generate Manifest after all complete
|
|
161
|
+
const explorationFiles = bash(`find ${sessionFolder} -name "exploration-*.json" -type f`).split('\n').filter(f => f.trim());
|
|
162
|
+
const explorationManifest = {
|
|
163
|
+
session_id: sessionId,
|
|
164
|
+
task_description,
|
|
165
|
+
timestamp: new Date().toISOString(),
|
|
166
|
+
complexity,
|
|
167
|
+
exploration_count: selectedAngles.length,
|
|
168
|
+
angles_explored: selectedAngles,
|
|
169
|
+
explorations: explorationFiles.map(file => {
|
|
170
|
+
const data = JSON.parse(Read(file));
|
|
171
|
+
return { angle: data._metadata.exploration_angle, file: file.split('/').pop(), path: file, index: data._metadata.exploration_index };
|
|
172
|
+
})
|
|
173
|
+
};
|
|
174
|
+
Write(`${sessionFolder}/explorations-manifest.json`, JSON.stringify(explorationManifest, null, 2));
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Step 2.3: Invoke Context-Search Agent
|
|
178
|
+
|
|
179
|
+
**Only execute after Step 2.2 completes**
|
|
180
|
+
|
|
181
|
+
```javascript
|
|
182
|
+
// Load user intent from planning-notes.md (from Phase 1)
|
|
183
|
+
const planningNotesPath = `.workflow/active/${sessionId}/planning-notes.md`;
|
|
184
|
+
let userIntent = { goal: task_description, key_constraints: "None specified" };
|
|
185
|
+
|
|
186
|
+
if (file_exists(planningNotesPath)) {
|
|
187
|
+
const notesContent = Read(planningNotesPath);
|
|
188
|
+
const goalMatch = notesContent.match(/\*\*GOAL\*\*:\s*(.+)/);
|
|
189
|
+
const constraintsMatch = notesContent.match(/\*\*KEY_CONSTRAINTS\*\*:\s*(.+)/);
|
|
190
|
+
if (goalMatch) userIntent.goal = goalMatch[1].trim();
|
|
191
|
+
if (constraintsMatch) userIntent.key_constraints = constraintsMatch[1].trim();
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
Task(
|
|
195
|
+
subagent_type="context-search-agent",
|
|
196
|
+
run_in_background=false,
|
|
197
|
+
description="Gather comprehensive context for TDD plan",
|
|
198
|
+
prompt=`
|
|
199
|
+
## Execution Mode
|
|
200
|
+
**PLAN MODE** (Comprehensive) - Full Phase 1-3 execution with priority sorting
|
|
201
|
+
|
|
202
|
+
## Session Information
|
|
203
|
+
- **Session ID**: ${sessionId}
|
|
204
|
+
- **Task Description**: ${task_description}
|
|
205
|
+
- **Output Path**: .workflow/${sessionId}/.process/context-package.json
|
|
206
|
+
|
|
207
|
+
## User Intent (from Phase 1 - Planning Notes)
|
|
208
|
+
**GOAL**: ${userIntent.goal}
|
|
209
|
+
**KEY_CONSTRAINTS**: ${userIntent.key_constraints}
|
|
210
|
+
|
|
211
|
+
This is the PRIMARY context source - all subsequent analysis must align with user intent.
|
|
212
|
+
|
|
213
|
+
## Exploration Input (from Step 2.2)
|
|
214
|
+
- **Manifest**: ${sessionFolder}/explorations-manifest.json
|
|
215
|
+
- **Exploration Count**: ${explorationManifest.exploration_count}
|
|
216
|
+
- **Angles**: ${explorationManifest.angles_explored.join(', ')}
|
|
217
|
+
- **Complexity**: ${complexity}
|
|
218
|
+
|
|
219
|
+
## Mission
|
|
220
|
+
Execute complete context-search-agent workflow for TDD implementation planning:
|
|
221
|
+
|
|
222
|
+
### Phase 1: Initialization & Pre-Analysis
|
|
223
|
+
1. **Project State Loading**:
|
|
224
|
+
- Run: \`ccw spec load --category execution\` to load project context, tech stack, and guidelines.
|
|
225
|
+
- Run: \`ccw spec load --category test\` to load test framework conventions, coverage targets, and fixtures.
|
|
226
|
+
- If files don't exist, proceed with fresh analysis.
|
|
227
|
+
2. **Detection**: Check for existing context-package (early exit if valid)
|
|
228
|
+
3. **Foundation**: Initialize CodexLens, get project structure, load docs
|
|
229
|
+
4. **Analysis**: Extract keywords, determine scope, classify complexity
|
|
230
|
+
|
|
231
|
+
### Phase 2: Multi-Source Context Discovery
|
|
232
|
+
Execute all discovery tracks (WITH USER INTENT INTEGRATION):
|
|
233
|
+
- **Track -1**: User Intent & Priority Foundation (EXECUTE FIRST)
|
|
234
|
+
- Load user intent (GOAL, KEY_CONSTRAINTS) from session input
|
|
235
|
+
- Map user requirements to codebase entities (files, modules, patterns)
|
|
236
|
+
- Establish baseline priority scores based on user goal alignment
|
|
237
|
+
- Output: user_intent_mapping.json with preliminary priority scores
|
|
238
|
+
|
|
239
|
+
- **Track 0**: Exploration Synthesis (load explorations-manifest.json, prioritize critical_files, deduplicate patterns/integration_points)
|
|
240
|
+
- **Track 1**: Historical archive analysis (query manifest.json for lessons learned)
|
|
241
|
+
- **Track 2**: Reference documentation (CLAUDE.md, architecture docs)
|
|
242
|
+
- **Track 3**: Web examples (use Exa MCP for unfamiliar tech/APIs)
|
|
243
|
+
- **Track 4**: Codebase analysis (5-layer discovery: files, content, patterns, deps, config/tests)
|
|
244
|
+
|
|
245
|
+
### Phase 3: Synthesis, Assessment & Packaging
|
|
246
|
+
1. Apply relevance scoring and build dependency graph
|
|
247
|
+
2. **Synthesize 5-source data**: Merge findings from all sources
|
|
248
|
+
- Priority order: User Intent > Archive > Docs > Exploration > Code > Web
|
|
249
|
+
- **Prioritize the context from project-tech.json** for architecture and tech stack
|
|
250
|
+
3. **Context Priority Sorting**:
|
|
251
|
+
a. Combine scores from Track -1 (user intent alignment) + relevance scores + exploration critical_files
|
|
252
|
+
b. Classify files into priority tiers:
|
|
253
|
+
- **Critical** (score >= 0.85): Directly mentioned in user goal OR exploration critical_files
|
|
254
|
+
- **High** (0.70-0.84): Key dependencies, patterns required for goal
|
|
255
|
+
- **Medium** (0.50-0.69): Supporting files, indirect dependencies
|
|
256
|
+
- **Low** (< 0.50): Contextual awareness only
|
|
257
|
+
c. Generate dependency_order: Based on dependency graph + user goal sequence
|
|
258
|
+
d. Document sorting_rationale: Explain prioritization logic
|
|
259
|
+
4. **Populate project_context**: Directly use the overview from project-tech.json
|
|
260
|
+
5. **Populate project_guidelines**: Load from specs/*.md
|
|
261
|
+
6. Integrate brainstorm artifacts (if .brainstorming/ exists, read content)
|
|
262
|
+
7. Perform conflict detection with risk assessment
|
|
263
|
+
8. **Inject historical conflicts** from archive analysis into conflict_detection
|
|
264
|
+
9. **Generate prioritized_context section**:
|
|
265
|
+
{
|
|
266
|
+
"prioritized_context": {
|
|
267
|
+
"user_intent": { "goal": "...", "scope": "...", "key_constraints": ["..."] },
|
|
268
|
+
"priority_tiers": {
|
|
269
|
+
"critical": [{ "path": "...", "relevance": 0.95, "rationale": "..." }],
|
|
270
|
+
"high": [...], "medium": [...], "low": [...]
|
|
271
|
+
},
|
|
272
|
+
"dependency_order": ["module1", "module2", "module3"],
|
|
273
|
+
"sorting_rationale": "Based on user goal alignment, exploration critical files, and dependency graph"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
10. Generate and validate context-package.json with prioritized_context field
|
|
277
|
+
|
|
278
|
+
## Output Requirements
|
|
279
|
+
Complete context-package.json with:
|
|
280
|
+
- **metadata**: task_description, keywords, complexity, tech_stack, session_id
|
|
281
|
+
- **project_context**: description, technology_stack, architecture, key_components (from project-tech.json)
|
|
282
|
+
- **project_guidelines**: {conventions, constraints, quality_rules, learnings} (from specs/*.md)
|
|
283
|
+
- **assets**: {documentation[], source_code[], config[], tests[]} with relevance scores
|
|
284
|
+
- **dependencies**: {internal[], external[]} with dependency graph
|
|
285
|
+
- **brainstorm_artifacts**: {guidance_specification, role_analyses[], synthesis_output} with content
|
|
286
|
+
- **conflict_detection**: {risk_level, risk_factors, affected_modules[], mitigation_strategy, historical_conflicts[]}
|
|
287
|
+
- **exploration_results**: {manifest_path, exploration_count, angles, explorations[], aggregated_insights}
|
|
288
|
+
- **prioritized_context**: {user_intent, priority_tiers{critical, high, medium, low}, dependency_order[], sorting_rationale}
|
|
289
|
+
|
|
290
|
+
## Quality Validation
|
|
291
|
+
Before completion verify:
|
|
292
|
+
- [ ] Valid JSON format with all required fields
|
|
293
|
+
- [ ] File relevance accuracy >80%
|
|
294
|
+
- [ ] Dependency graph complete (max 2 transitive levels)
|
|
295
|
+
- [ ] Conflict risk level calculated correctly
|
|
296
|
+
- [ ] No sensitive data exposed
|
|
297
|
+
- [ ] Total files <= 50 (prioritize high-relevance)
|
|
298
|
+
|
|
299
|
+
## Planning Notes Record (REQUIRED)
|
|
300
|
+
After completing context-package.json, append to planning-notes.md:
|
|
301
|
+
|
|
302
|
+
**File**: .workflow/active/${sessionId}/planning-notes.md
|
|
303
|
+
**Location**: Under "## Context Findings (Phase 2)" section
|
|
304
|
+
**Format**:
|
|
305
|
+
### [Context-Search Agent] YYYY-MM-DD
|
|
306
|
+
- **Note**: [Brief summary of key findings]
|
|
307
|
+
|
|
308
|
+
Execute autonomously following agent documentation.
|
|
309
|
+
Report completion with statistics.
|
|
310
|
+
`
|
|
311
|
+
)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Step 2.4: Output Verification
|
|
315
|
+
|
|
316
|
+
After agent completes, verify output:
|
|
317
|
+
|
|
318
|
+
```javascript
|
|
319
|
+
// Verify file was created
|
|
320
|
+
const outputPath = `.workflow/active/${sessionId}/.process/context-package.json`;
|
|
321
|
+
if (!file_exists(outputPath)) {
|
|
322
|
+
throw new Error("Agent failed to generate context-package.json");
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Store variables for subsequent phases
|
|
326
|
+
contextPath = outputPath;
|
|
327
|
+
|
|
328
|
+
// Verify exploration_results included
|
|
329
|
+
const pkg = JSON.parse(Read(outputPath));
|
|
330
|
+
if (pkg.exploration_results?.exploration_count > 0) {
|
|
331
|
+
console.log(`Exploration results aggregated: ${pkg.exploration_results.exploration_count} angles`);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
conflictRisk = pkg.conflict_detection?.risk_level || 'low';
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### TodoWrite Update (Phase 2 in progress - tasks attached)
|
|
338
|
+
|
|
339
|
+
```json
|
|
340
|
+
[
|
|
341
|
+
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
|
342
|
+
{"content": "Phase 2: Context Gathering", "status": "in_progress", "activeForm": "Executing context gathering"},
|
|
343
|
+
{"content": " -> Analyze codebase structure", "status": "in_progress", "activeForm": "Analyzing codebase structure"},
|
|
344
|
+
{"content": " -> Identify integration points", "status": "pending", "activeForm": "Identifying integration points"},
|
|
345
|
+
{"content": " -> Generate context package", "status": "pending", "activeForm": "Generating context package"},
|
|
346
|
+
{"content": "Phase 3: Test Coverage Analysis", "status": "pending", "activeForm": "Executing test coverage analysis"},
|
|
347
|
+
{"content": "Phase 5: TDD Task Generation", "status": "pending", "activeForm": "Executing TDD task generation"},
|
|
348
|
+
{"content": "Phase 6: TDD Structure Validation", "status": "pending", "activeForm": "Validating TDD structure"}
|
|
349
|
+
]
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### TodoWrite Update (Phase 2 completed - tasks collapsed)
|
|
353
|
+
|
|
354
|
+
```json
|
|
355
|
+
[
|
|
356
|
+
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
|
357
|
+
{"content": "Phase 2: Context Gathering", "status": "completed", "activeForm": "Executing context gathering"},
|
|
358
|
+
{"content": "Phase 3: Test Coverage Analysis", "status": "pending", "activeForm": "Executing test coverage analysis"},
|
|
359
|
+
{"content": "Phase 5: TDD Task Generation", "status": "pending", "activeForm": "Executing TDD task generation"},
|
|
360
|
+
{"content": "Phase 6: TDD Structure Validation", "status": "pending", "activeForm": "Validating TDD structure"}
|
|
361
|
+
]
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Step 2.5: Update Planning Notes
|
|
365
|
+
|
|
366
|
+
After context gathering completes, update planning-notes.md with findings:
|
|
367
|
+
|
|
368
|
+
```javascript
|
|
369
|
+
// Read context-package to extract key findings
|
|
370
|
+
const contextPackage = JSON.parse(Read(contextPath))
|
|
371
|
+
const conflictRisk = contextPackage.conflict_detection?.risk_level || 'low'
|
|
372
|
+
const criticalFiles = (contextPackage.exploration_results?.aggregated_insights?.critical_files || [])
|
|
373
|
+
.slice(0, 5).map(f => f.path)
|
|
374
|
+
const archPatterns = contextPackage.project_context?.architecture_patterns || []
|
|
375
|
+
const constraints = contextPackage.exploration_results?.aggregated_insights?.constraints || []
|
|
376
|
+
|
|
377
|
+
// Append Phase 2 findings to planning-notes.md
|
|
378
|
+
Edit(planningNotesPath, {
|
|
379
|
+
old: '## Context Findings (Phase 2)\n(To be filled by context-gather)',
|
|
380
|
+
new: `## Context Findings (Phase 2)
|
|
381
|
+
|
|
382
|
+
- **CRITICAL_FILES**: ${criticalFiles.join(', ') || 'None identified'}
|
|
383
|
+
- **ARCHITECTURE**: ${archPatterns.join(', ') || 'Not detected'}
|
|
384
|
+
- **CONFLICT_RISK**: ${conflictRisk}
|
|
385
|
+
- **CONSTRAINTS**: ${constraints.length > 0 ? constraints.join('; ') : 'None'}`
|
|
386
|
+
})
|
|
387
|
+
|
|
388
|
+
// Append Phase 2 constraints to consolidated list
|
|
389
|
+
Edit(planningNotesPath, {
|
|
390
|
+
old: '## Consolidated Constraints (Phase 4 Input)',
|
|
391
|
+
new: `## Consolidated Constraints (Phase 4 Input)
|
|
392
|
+
${constraints.map((c, i) => `${i + 2}. [Context] ${c}`).join('\n')}`
|
|
393
|
+
})
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
**Auto-Continue**: Return to user showing Phase 2 results, then auto-continue to Phase 3.
|
|
397
|
+
|
|
398
|
+
## Output
|
|
399
|
+
|
|
400
|
+
- **Variable**: `contextPath` (path to context-package.json)
|
|
401
|
+
- **Variable**: `conflictRisk` (none/low/medium/high)
|
|
402
|
+
- **File**: `context-package.json`
|
|
403
|
+
- **TodoWrite**: Mark Phase 2 completed, determine Phase 3 or Phase 4
|
|
404
|
+
|
|
405
|
+
## Next Phase
|
|
406
|
+
|
|
407
|
+
Return to orchestrator. Orchestrator continues to [Phase 3: Test Coverage Analysis](03-test-coverage-analysis.md).
|