claude-code-workflow 6.1.4 → 6.2.2
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/.claude/CLAUDE.md +10 -0
- package/.claude/agents/action-planning-agent.md +857 -778
- package/.claude/agents/cli-execution-agent.md +266 -269
- package/.claude/agents/cli-explore-agent.md +2 -2
- package/.claude/agents/cli-lite-planning-agent.md +142 -92
- package/.claude/agents/cli-planning-agent.md +4 -4
- package/.claude/agents/code-developer.md +7 -6
- package/.claude/agents/conceptual-planning-agent.md +2 -2
- package/.claude/agents/context-search-agent.md +31 -32
- package/.claude/agents/doc-generator.md +4 -4
- package/.claude/agents/memory-bridge.md +93 -93
- package/.claude/agents/test-context-search-agent.md +8 -7
- package/.claude/agents/test-fix-agent.md +7 -6
- package/.claude/commands/clean.md +516 -0
- package/.claude/commands/memory/compact.md +383 -0
- package/.claude/commands/memory/docs-full-cli.md +471 -471
- package/.claude/commands/memory/docs-related-cli.md +386 -386
- package/.claude/commands/memory/docs.md +615 -615
- package/.claude/commands/memory/load.md +5 -5
- package/.claude/commands/memory/tech-research-rules.md +310 -0
- package/.claude/commands/memory/update-full.md +332 -332
- package/.claude/commands/memory/workflow-skill-memory.md +4 -4
- package/.claude/commands/task/create.md +151 -151
- package/.claude/commands/version.md +254 -254
- package/.claude/commands/workflow/brainstorm/api-designer.md +587 -585
- package/.claude/commands/workflow/brainstorm/artifacts.md +1 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +443 -443
- package/.claude/commands/workflow/brainstorm/data-architect.md +220 -220
- package/.claude/commands/workflow/brainstorm/product-manager.md +200 -200
- package/.claude/commands/workflow/brainstorm/product-owner.md +200 -200
- package/.claude/commands/workflow/brainstorm/scrum-master.md +200 -200
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +200 -200
- package/.claude/commands/workflow/brainstorm/system-architect.md +389 -387
- package/.claude/commands/workflow/brainstorm/ui-designer.md +221 -221
- package/.claude/commands/workflow/brainstorm/ux-expert.md +221 -221
- package/.claude/commands/workflow/debug.md +321 -0
- package/.claude/commands/workflow/execute.md +13 -0
- package/.claude/commands/workflow/init.md +165 -164
- package/.claude/commands/workflow/lite-execute.md +119 -13
- package/.claude/commands/workflow/lite-fix.md +623 -621
- package/.claude/commands/workflow/lite-plan.md +610 -592
- package/.claude/commands/workflow/plan.md +5 -5
- package/.claude/commands/workflow/review-module-cycle.md +2 -0
- package/.claude/commands/workflow/review-session-cycle.md +2 -0
- package/.claude/commands/workflow/review.md +297 -291
- package/.claude/commands/workflow/session/complete.md +153 -500
- package/.claude/commands/workflow/session/list.md +95 -95
- package/.claude/commands/workflow/session/resume.md +60 -60
- package/.claude/commands/workflow/session/start.md +199 -199
- package/.claude/commands/workflow/tdd-plan.md +3 -3
- package/.claude/commands/workflow/tdd-verify.md +23 -9
- package/.claude/commands/workflow/test-cycle-execute.md +2 -0
- package/.claude/commands/workflow/test-fix-gen.md +699 -699
- package/.claude/commands/workflow/tools/conflict-resolution.md +104 -18
- package/.claude/commands/workflow/tools/context-gather.md +436 -434
- package/.claude/commands/workflow/tools/task-generate-agent.md +490 -291
- package/.claude/commands/workflow/tools/task-generate-tdd.md +18 -10
- package/.claude/commands/workflow/tools/test-concept-enhanced.md +2 -1
- package/.claude/commands/workflow/tools/test-context-gather.md +1 -0
- package/.claude/commands/workflow/tools/test-task-generate.md +1 -0
- package/.claude/commands/workflow/ui-design/import-from-code.md +9 -6
- package/.claude/skills/command-guide/SKILL.md +5 -5
- package/.claude/skills/command-guide/index/all-commands.json +1 -1
- package/.claude/skills/command-guide/index/by-category.json +1 -1
- package/.claude/skills/command-guide/index/by-use-case.json +1 -1
- package/.claude/skills/command-guide/reference/agents/action-planning-agent.md +857 -778
- package/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +266 -269
- package/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +2 -2
- package/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md +142 -92
- package/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +4 -4
- package/.claude/skills/command-guide/reference/agents/code-developer.md +7 -6
- package/.claude/skills/command-guide/reference/agents/conceptual-planning-agent.md +2 -2
- package/.claude/skills/command-guide/reference/agents/context-search-agent.md +31 -32
- package/.claude/skills/command-guide/reference/agents/doc-generator.md +4 -4
- package/.claude/skills/command-guide/reference/agents/memory-bridge.md +93 -93
- package/.claude/skills/command-guide/reference/agents/test-context-search-agent.md +8 -7
- package/.claude/skills/command-guide/reference/agents/test-fix-agent.md +7 -6
- package/.claude/skills/command-guide/reference/commands/memory/docs-full-cli.md +471 -471
- package/.claude/skills/command-guide/reference/commands/memory/docs-related-cli.md +386 -386
- package/.claude/skills/command-guide/reference/commands/memory/docs.md +17 -16
- package/.claude/skills/command-guide/reference/commands/memory/load.md +5 -5
- package/.claude/skills/command-guide/reference/commands/memory/tech-research.md +194 -357
- package/.claude/skills/command-guide/reference/commands/memory/update-full.md +332 -332
- package/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md +4 -4
- package/.claude/skills/command-guide/reference/commands/task/create.md +151 -151
- package/.claude/skills/command-guide/reference/commands/version.md +254 -254
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/api-designer.md +585 -585
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/auto-parallel.md +443 -443
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/data-architect.md +220 -220
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-manager.md +200 -200
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-owner.md +200 -200
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/scrum-master.md +200 -200
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/subject-matter-expert.md +200 -200
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/system-architect.md +387 -387
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ui-designer.md +221 -221
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ux-expert.md +221 -221
- package/.claude/skills/command-guide/reference/commands/workflow/execute.md +25 -20
- package/.claude/skills/command-guide/reference/commands/workflow/init.md +164 -164
- package/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +748 -686
- package/.claude/skills/command-guide/reference/commands/workflow/lite-fix.md +664 -621
- package/.claude/skills/command-guide/reference/commands/workflow/lite-plan.md +645 -592
- package/.claude/skills/command-guide/reference/commands/workflow/plan.md +5 -5
- package/.claude/skills/command-guide/reference/commands/workflow/review.md +25 -18
- package/.claude/skills/command-guide/reference/commands/workflow/session/complete.md +547 -500
- package/.claude/skills/command-guide/reference/commands/workflow/session/list.md +45 -27
- package/.claude/skills/command-guide/reference/commands/workflow/session/resume.md +35 -19
- package/.claude/skills/command-guide/reference/commands/workflow/session/start.md +90 -33
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-plan.md +3 -3
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md +23 -9
- package/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +699 -699
- package/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +103 -17
- package/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +434 -434
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +487 -291
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +17 -10
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +1 -1
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +6 -6
- package/.claude/workflows/chinese-response.md +38 -0
- package/.claude/workflows/cli-templates/prompts/rules/rule-api.txt +122 -0
- package/.claude/workflows/cli-templates/prompts/rules/rule-components.txt +122 -0
- package/.claude/workflows/cli-templates/prompts/rules/rule-config.txt +89 -0
- package/.claude/workflows/cli-templates/prompts/rules/rule-core.txt +60 -0
- package/.claude/workflows/cli-templates/prompts/rules/rule-patterns.txt +70 -0
- package/.claude/workflows/cli-templates/prompts/rules/rule-testing.txt +81 -0
- package/.claude/workflows/cli-templates/prompts/rules/tech-rules-agent-prompt.txt +89 -0
- package/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt +131 -131
- package/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt +5 -9
- package/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt +5 -9
- package/.claude/workflows/cli-templates/protocols/analysis-protocol.md +112 -0
- package/.claude/workflows/cli-templates/protocols/write-protocol.md +201 -0
- package/.claude/workflows/cli-templates/schemas/conflict-resolution-schema.json +137 -0
- package/.claude/workflows/cli-templates/schemas/debug-log-json-schema.json +127 -0
- package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +25 -0
- package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +25 -0
- package/.claude/workflows/cli-tools-usage.md +526 -0
- package/{CLAUDE.md → .claude/workflows/coding-philosophy.md} +24 -45
- package/.claude/workflows/context-tools.md +84 -0
- package/.claude/workflows/file-modification.md +64 -0
- package/.claude/workflows/tool-strategy.md +216 -79
- package/.claude/workflows/windows-platform.md +16 -0
- package/.claude/workflows/workflow-architecture.md +942 -942
- package/.codex/AGENTS.md +63 -330
- package/.codex/prompts/debug.md +318 -0
- package/.codex/prompts/execute.md +273 -0
- package/.codex/prompts/lite-execute.md +164 -0
- package/.codex/prompts/lite-plan.md +469 -0
- package/.codex/prompts.zip +0 -0
- package/.gemini/GEMINI.md +25 -164
- package/.qwen/QWEN.md +0 -139
- package/README.md +29 -9
- package/ccw/README.md +30 -6
- package/ccw/bin/ccw-mcp.js +7 -0
- package/ccw/bin/ccw.js +9 -9
- package/ccw/package.json +65 -47
- package/ccw/src/.workflow/.cli-history/history.db +0 -0
- package/ccw/src/.workflow/.cli-history/history.db-shm +0 -0
- package/ccw/src/.workflow/.cli-history/history.db-wal +0 -0
- package/ccw/src/cli.ts +244 -0
- package/ccw/src/commands/cli.ts +740 -0
- package/ccw/src/commands/core-memory.ts +770 -0
- package/ccw/src/commands/hook.ts +315 -0
- package/ccw/src/commands/install.ts +519 -0
- package/ccw/src/commands/{list.js → list.ts} +1 -1
- package/ccw/src/commands/memory.ts +1090 -0
- package/ccw/src/commands/{serve.js → serve.ts} +14 -5
- package/ccw/src/commands/session-path-resolver.ts +372 -0
- package/ccw/src/commands/session.ts +1141 -0
- package/ccw/src/commands/{stop.js → stop.ts} +16 -6
- package/ccw/src/commands/tool.ts +201 -0
- package/ccw/src/commands/{uninstall.js → uninstall.ts} +89 -40
- package/ccw/src/commands/{upgrade.js → upgrade.ts} +68 -23
- package/ccw/src/commands/{view.js → view.ts} +22 -8
- package/ccw/src/config/storage-paths.ts +670 -0
- package/ccw/src/core/cache-manager.ts +294 -0
- package/ccw/src/core/claude-freshness.ts +319 -0
- package/ccw/src/core/core-memory-store.ts +1528 -0
- package/ccw/src/core/{dashboard-generator-patch.js → dashboard-generator-patch.ts} +18 -0
- package/ccw/src/core/{dashboard-generator.js → dashboard-generator.ts} +69 -12
- package/ccw/src/core/data-aggregator.ts +584 -0
- package/ccw/src/core/history-importer.ts +625 -0
- package/ccw/src/core/{lite-scanner.js → lite-scanner-complete.ts} +162 -66
- package/ccw/src/core/lite-scanner.ts +469 -0
- package/ccw/src/core/{manifest.js → manifest.ts} +104 -34
- package/ccw/src/core/memory-embedder-bridge.ts +262 -0
- package/ccw/src/core/memory-store.ts +978 -0
- package/ccw/src/core/routes/ccw-routes.ts +96 -0
- package/ccw/src/core/routes/claude-routes.ts +1183 -0
- package/ccw/src/core/routes/cli-routes.ts +561 -0
- package/ccw/src/core/routes/codexlens-routes.ts +806 -0
- package/ccw/src/core/routes/core-memory-routes.ts +605 -0
- package/ccw/src/core/routes/files-routes.ts +428 -0
- package/ccw/src/core/routes/graph-routes.md +164 -0
- package/ccw/src/core/routes/graph-routes.ts +626 -0
- package/ccw/src/core/routes/help-routes.ts +308 -0
- package/ccw/src/core/routes/hooks-routes.ts +405 -0
- package/ccw/src/core/routes/mcp-routes.ts +1271 -0
- package/ccw/src/core/routes/mcp-routes.ts.backup +550 -0
- package/ccw/src/core/routes/mcp-templates-db.ts +268 -0
- package/ccw/src/core/routes/memory-routes.ts +1206 -0
- package/ccw/src/core/routes/rules-routes.ts +526 -0
- package/ccw/src/core/routes/session-routes.ts +467 -0
- package/ccw/src/core/routes/skills-routes.ts +599 -0
- package/ccw/src/core/routes/status-routes.ts +57 -0
- package/ccw/src/core/routes/system-routes.ts +427 -0
- package/ccw/src/core/server.ts +431 -0
- package/ccw/src/core/session-clustering-service.ts +1258 -0
- package/ccw/src/core/session-scanner.ts +283 -0
- package/ccw/src/core/websocket.ts +190 -0
- package/ccw/src/{index.js → index.ts} +1 -0
- package/ccw/src/mcp-server/index.ts +186 -0
- package/ccw/src/templates/assets/css/github-dark.min.css +10 -0
- package/ccw/src/templates/assets/css/github.min.css +10 -0
- package/ccw/src/templates/assets/js/cytoscape.min.js +32 -0
- package/ccw/src/templates/assets/js/d3.min.js +2 -0
- package/ccw/src/templates/assets/js/highlight.min.js +1244 -0
- package/ccw/src/templates/assets/js/lucide.min.js +12 -0
- package/ccw/src/templates/assets/js/marked.min.js +69 -0
- package/ccw/src/templates/assets/js/tailwind.js +83 -0
- package/ccw/src/templates/dashboard-css/01-base.css +11 -0
- package/ccw/src/templates/dashboard-css/02-session.css +22 -0
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +10 -0
- package/ccw/src/templates/dashboard-css/06-cards.css +10 -4
- package/ccw/src/templates/dashboard-css/07-managers.css +1178 -7
- package/ccw/src/templates/dashboard-css/09-explorer.css +23 -12
- package/ccw/src/templates/dashboard-css/10-cli-status.css +337 -0
- package/ccw/src/templates/dashboard-css/11-cli-history.css +271 -0
- package/ccw/src/templates/dashboard-css/12-cli-legacy.css +796 -0
- package/ccw/src/templates/dashboard-css/13-cli-ccw.css +199 -0
- package/ccw/src/templates/dashboard-css/14-cli-modals.css +258 -0
- package/ccw/src/templates/dashboard-css/15-cli-endpoints.css +305 -0
- package/ccw/src/templates/dashboard-css/16-cli-session.css +241 -0
- package/ccw/src/templates/dashboard-css/17-cli-conversation.css +283 -0
- package/ccw/src/templates/dashboard-css/18-cli-settings.css +160 -0
- package/ccw/src/templates/dashboard-css/19-cli-native-session.css +496 -0
- package/ccw/src/templates/dashboard-css/20-cli-taskqueue.css +188 -0
- package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +310 -0
- package/ccw/src/templates/dashboard-css/22-cli-semantic.css +240 -0
- package/ccw/src/templates/dashboard-css/23-memory.css +2390 -0
- package/ccw/src/templates/dashboard-css/24-prompt-history.css +1089 -0
- package/ccw/src/templates/dashboard-css/25-skills-rules.css +326 -0
- package/ccw/src/templates/dashboard-css/26-claude-manager.css +908 -0
- package/ccw/src/templates/dashboard-css/27-graph-explorer.css +1678 -0
- package/ccw/src/templates/dashboard-css/28-mcp-manager.css +748 -0
- package/ccw/src/templates/dashboard-css/29-help.css +264 -0
- package/ccw/src/templates/dashboard-css/30-core-memory.css +1700 -0
- package/ccw/src/templates/dashboard-js/api.js +162 -142
- package/ccw/src/templates/dashboard-js/components/carousel.js +4 -4
- package/ccw/src/templates/dashboard-js/components/cli-history.js +876 -0
- package/ccw/src/templates/dashboard-js/components/cli-status.js +978 -0
- package/ccw/src/templates/dashboard-js/components/global-notifications.js +508 -219
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +1277 -282
- package/ccw/src/templates/dashboard-js/components/index-manager.js +302 -0
- package/ccw/src/templates/dashboard-js/components/mcp-manager.js +718 -27
- package/ccw/src/templates/dashboard-js/components/modals.js +66 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +80 -12
- package/ccw/src/templates/dashboard-js/components/notifications.js +758 -194
- package/ccw/src/templates/dashboard-js/components/storage-manager.js +478 -0
- package/ccw/src/templates/dashboard-js/components/tabs-other.js +157 -6
- package/ccw/src/templates/dashboard-js/components/task-queue-sidebar.js +716 -0
- package/ccw/src/templates/dashboard-js/help-i18n.js +272 -0
- package/ccw/src/templates/dashboard-js/i18n.js +2807 -0
- package/ccw/src/templates/dashboard-js/main.js +15 -0
- package/ccw/src/templates/dashboard-js/state.js +243 -42
- package/ccw/src/templates/dashboard-js/utils.js +47 -1
- package/ccw/src/templates/dashboard-js/views/claude-manager.js +912 -0
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +2272 -0
- package/ccw/src/templates/dashboard-js/views/codexlens-manager.js +964 -0
- package/ccw/src/templates/dashboard-js/views/core-memory-clusters.js +503 -0
- package/ccw/src/templates/dashboard-js/views/core-memory.js +782 -0
- package/ccw/src/templates/dashboard-js/views/explorer.js +888 -852
- package/ccw/src/templates/dashboard-js/views/graph-explorer.js +1157 -0
- package/ccw/src/templates/dashboard-js/views/help.js +856 -0
- package/ccw/src/templates/dashboard-js/views/history.js +337 -0
- package/ccw/src/templates/dashboard-js/views/home.js +61 -15
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +311 -43
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +204 -28
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2187 -411
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js.backup +1729 -0
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js.new +928 -0
- package/ccw/src/templates/dashboard-js/views/memory.js +1221 -0
- package/ccw/src/templates/dashboard-js/views/prompt-history.js +713 -0
- package/ccw/src/templates/dashboard-js/views/rules-manager.js +828 -0
- package/ccw/src/templates/dashboard-js/views/session-detail.js +54 -53
- package/ccw/src/templates/dashboard-js/views/skills-manager.js +819 -0
- package/ccw/src/templates/dashboard.html +185 -85
- package/ccw/src/templates/hooks-config-example.json +60 -0
- package/ccw/src/tools/classify-folders.ts +245 -0
- package/ccw/src/tools/cli-config-manager.ts +268 -0
- package/ccw/src/tools/cli-executor.ts +2014 -0
- package/ccw/src/tools/cli-history-store.ts +1195 -0
- package/ccw/src/tools/codex-lens.ts +1141 -0
- package/ccw/src/tools/{convert-tokens-to-css.js → convert-tokens-to-css.ts} +73 -23
- package/ccw/src/tools/core-memory.ts +444 -0
- package/ccw/src/tools/detect-changed-modules.ts +325 -0
- package/ccw/src/tools/{discover-design-files.js → discover-design-files.ts} +74 -24
- package/ccw/src/tools/edit-file.ts +568 -0
- package/ccw/src/tools/{generate-module-docs.js → generate-module-docs.ts} +207 -185
- package/ccw/src/tools/{get-modules-by-depth.js → get-modules-by-depth.ts} +120 -79
- package/ccw/src/tools/index.ts +370 -0
- package/ccw/src/tools/native-session-discovery.ts +795 -0
- package/ccw/src/tools/notifier.ts +129 -0
- package/ccw/src/tools/read-file.ts +410 -0
- package/ccw/src/tools/resume-strategy.ts +345 -0
- package/ccw/src/tools/session-content-parser.ts +619 -0
- package/ccw/src/tools/session-manager.ts +1026 -0
- package/ccw/src/tools/smart-context.ts +228 -0
- package/ccw/src/tools/smart-search.ts +2065 -0
- package/ccw/src/tools/smart-search.ts.backup +1233 -0
- package/ccw/src/tools/storage-manager.ts +455 -0
- package/ccw/src/tools/write-file.ts +222 -0
- package/ccw/src/types/config.ts +11 -0
- package/ccw/src/types/index.ts +3 -0
- package/ccw/src/types/session.ts +25 -0
- package/ccw/src/types/tool.ts +41 -0
- package/ccw/src/utils/{browser-launcher.js → browser-launcher.ts} +10 -8
- package/ccw/src/utils/file-utils.ts +48 -0
- package/ccw/src/utils/{path-resolver.js → path-resolver.ts} +114 -78
- package/ccw/src/utils/path-validator.ts +153 -0
- package/ccw/src/utils/{ui.js → ui.ts} +32 -25
- package/codex-lens/pyproject.toml +48 -0
- package/codex-lens/src/codexlens/.workflow/.cli-history/history.db +0 -0
- package/codex-lens/src/codexlens/__init__.py +28 -0
- package/codex-lens/src/codexlens/__main__.py +14 -0
- package/codex-lens/src/codexlens/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/__main__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/config.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/entities.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/__pycache__/errors.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__init__.py +27 -0
- package/codex-lens/src/codexlens/cli/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/commands.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/embedding_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/model_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/__pycache__/output.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/cli/commands.py +1931 -0
- package/codex-lens/src/codexlens/cli/embedding_manager.py +620 -0
- package/codex-lens/src/codexlens/cli/model_manager.py +289 -0
- package/codex-lens/src/codexlens/cli/output.py +124 -0
- package/codex-lens/src/codexlens/config.py +201 -0
- package/codex-lens/src/codexlens/entities.py +121 -0
- package/codex-lens/src/codexlens/errors.py +55 -0
- package/codex-lens/src/codexlens/indexing/README.md +77 -0
- package/codex-lens/src/codexlens/indexing/__init__.py +4 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/__pycache__/symbol_extractor.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/indexing/symbol_extractor.py +243 -0
- package/codex-lens/src/codexlens/parsers/__init__.py +8 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/encoding.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/factory.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/tokenizer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/__pycache__/treesitter_parser.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/parsers/encoding.py +202 -0
- package/codex-lens/src/codexlens/parsers/factory.py +256 -0
- package/codex-lens/src/codexlens/parsers/tokenizer.py +98 -0
- package/codex-lens/src/codexlens/parsers/treesitter_parser.py +335 -0
- package/codex-lens/src/codexlens/search/__init__.py +15 -0
- package/codex-lens/src/codexlens/search/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/chain_search.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/enrichment.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/hybrid_search.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/query_parser.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/search/chain_search.py +647 -0
- package/codex-lens/src/codexlens/search/enrichment.py +150 -0
- package/codex-lens/src/codexlens/search/hybrid_search.py +313 -0
- package/codex-lens/src/codexlens/search/query_parser.py +242 -0
- package/codex-lens/src/codexlens/search/ranking.py +274 -0
- package/codex-lens/src/codexlens/semantic/__init__.py +39 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/ann_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/chunker.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/code_extractor.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/embedder.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/graph_analyzer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/llm_enhancer.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/semantic/ann_index.py +414 -0
- package/codex-lens/src/codexlens/semantic/chunker.py +448 -0
- package/codex-lens/src/codexlens/semantic/code_extractor.py +274 -0
- package/codex-lens/src/codexlens/semantic/embedder.py +185 -0
- package/codex-lens/src/codexlens/semantic/vector_store.py +955 -0
- package/codex-lens/src/codexlens/storage/__init__.py +29 -0
- package/codex-lens/src/codexlens/storage/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/dir_index.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/file_cache.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/index_tree.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/migration_manager.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/path_mapper.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_store.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/__pycache__/sqlite_utils.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/dir_index.py +1850 -0
- package/codex-lens/src/codexlens/storage/file_cache.py +32 -0
- package/codex-lens/src/codexlens/storage/index_tree.py +776 -0
- package/codex-lens/src/codexlens/storage/migration_manager.py +154 -0
- package/codex-lens/src/codexlens/storage/migrations/__init__.py +1 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_001_normalize_keywords.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_002_add_token_metadata.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_003_code_relationships.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_004_dual_fts.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/__pycache__/migration_005_cleanup_unused_fields.cpython-313.pyc +0 -0
- package/codex-lens/src/codexlens/storage/migrations/migration_001_normalize_keywords.py +123 -0
- package/codex-lens/src/codexlens/storage/migrations/migration_002_add_token_metadata.py +48 -0
- package/codex-lens/src/codexlens/storage/migrations/migration_004_dual_fts.py +232 -0
- package/codex-lens/src/codexlens/storage/migrations/migration_005_cleanup_unused_fields.py +196 -0
- package/codex-lens/src/codexlens/storage/path_mapper.py +274 -0
- package/codex-lens/src/codexlens/storage/registry.py +670 -0
- package/codex-lens/src/codexlens/storage/sqlite_store.py +576 -0
- package/codex-lens/src/codexlens/storage/sqlite_utils.py +64 -0
- package/package.json +4 -1
- package/.claude/commands/memory/tech-research.md +0 -477
- package/.claude/scripts/classify-folders.sh +0 -39
- package/.claude/scripts/convert_tokens_to_css.sh +0 -229
- package/.claude/scripts/detect_changed_modules.sh +0 -161
- package/.claude/scripts/discover-design-files.sh +0 -87
- package/.claude/scripts/extract-animations.js +0 -243
- package/.claude/scripts/extract-computed-styles.js +0 -118
- package/.claude/scripts/extract-layout-structure.js +0 -411
- package/.claude/scripts/generate_module_docs.sh +0 -717
- package/.claude/scripts/get_modules_by_depth.sh +0 -170
- package/.claude/scripts/ui-generate-preview.sh +0 -395
- package/.claude/scripts/ui-instantiate-prototypes.sh +0 -815
- package/.claude/scripts/update_module_claude.sh +0 -337
- package/.claude/workflows/context-search-strategy.md +0 -77
- package/.claude/workflows/intelligent-tools-strategy.md +0 -662
- package/ccw/src/cli.js +0 -119
- package/ccw/src/commands/install.js +0 -324
- package/ccw/src/commands/tool.js +0 -138
- package/ccw/src/core/data-aggregator.js +0 -409
- package/ccw/src/core/server.js +0 -2063
- package/ccw/src/core/session-scanner.js +0 -235
- package/ccw/src/tools/classify-folders.js +0 -204
- package/ccw/src/tools/detect-changed-modules.js +0 -288
- package/ccw/src/tools/edit-file.js +0 -266
- package/ccw/src/tools/index.js +0 -176
- package/ccw/src/utils/file-utils.js +0 -48
|
@@ -1,140 +1,117 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cli-lite-planning-agent
|
|
3
3
|
description: |
|
|
4
|
-
|
|
4
|
+
Generic planning agent for lite-plan and lite-fix workflows. Generates structured plan JSON based on provided schema reference.
|
|
5
5
|
|
|
6
6
|
Core capabilities:
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- Multi-angle
|
|
7
|
+
- Schema-driven output (plan-json-schema or fix-plan-json-schema)
|
|
8
|
+
- Task decomposition with dependency analysis
|
|
9
|
+
- CLI execution ID assignment for fork/merge strategies
|
|
10
|
+
- Multi-angle context integration (explorations or diagnoses)
|
|
11
11
|
color: cyan
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
You are a
|
|
14
|
+
You are a generic planning agent that generates structured plan JSON for lite workflows. Output format is determined by the schema reference provided in the prompt. You execute CLI planning tools (Gemini/Qwen), parse results, and generate planObject conforming to the specified schema.
|
|
15
15
|
|
|
16
|
-
## Output Schema
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
## Input Context
|
|
19
18
|
|
|
20
|
-
**planObject Structure**:
|
|
21
19
|
```javascript
|
|
22
20
|
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
execution_order: [{ phase, tasks, type }],
|
|
28
|
-
exit_conditions: { success, failure }
|
|
29
|
-
},
|
|
30
|
-
focus_paths: string[], // Affected files (aggregated)
|
|
31
|
-
estimated_time: string,
|
|
32
|
-
recommended_execution: "Agent" | "Codex",
|
|
33
|
-
complexity: "Low" | "Medium" | "High",
|
|
34
|
-
_metadata: { timestamp, source, planning_mode, exploration_angles, duration_seconds }
|
|
35
|
-
}
|
|
36
|
-
```
|
|
21
|
+
// Required
|
|
22
|
+
task_description: string, // Task or bug description
|
|
23
|
+
schema_path: string, // Schema reference path (plan-json-schema or fix-plan-json-schema)
|
|
24
|
+
session: { id, folder, artifacts },
|
|
37
25
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
target: string, // function:lineRange
|
|
49
|
-
change: string
|
|
50
|
-
}],
|
|
51
|
-
implementation: string[], // 2-7 actionable steps
|
|
52
|
-
reference: { // Pattern guidance (optional)
|
|
53
|
-
pattern: string,
|
|
54
|
-
files: string[],
|
|
55
|
-
examples: string
|
|
56
|
-
},
|
|
57
|
-
acceptance: string[], // 1-4 quantified criteria
|
|
58
|
-
depends_on: string[] // Task IDs: ["T1", "T2"]
|
|
26
|
+
// Context (one of these based on workflow)
|
|
27
|
+
explorationsContext: { [angle]: ExplorationResult } | null, // From lite-plan
|
|
28
|
+
diagnosesContext: { [angle]: DiagnosisResult } | null, // From lite-fix
|
|
29
|
+
contextAngles: string[], // Exploration or diagnosis angles
|
|
30
|
+
|
|
31
|
+
// Optional
|
|
32
|
+
clarificationContext: { [question]: answer } | null,
|
|
33
|
+
complexity: "Low" | "Medium" | "High", // For lite-plan
|
|
34
|
+
severity: "Low" | "Medium" | "High" | "Critical", // For lite-fix
|
|
35
|
+
cli_config: { tool, template, timeout, fallback }
|
|
59
36
|
}
|
|
60
37
|
```
|
|
61
38
|
|
|
62
|
-
##
|
|
39
|
+
## Schema-Driven Output
|
|
40
|
+
|
|
41
|
+
**CRITICAL**: Read the schema reference first to determine output structure:
|
|
42
|
+
- `plan-json-schema.json` → Implementation plan with `approach`, `complexity`
|
|
43
|
+
- `fix-plan-json-schema.json` → Fix plan with `root_cause`, `severity`, `risk_level`
|
|
63
44
|
|
|
64
45
|
```javascript
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
complexity: "Low" | "Medium" | "High",
|
|
71
|
-
cli_config: { tool, template, timeout, fallback },
|
|
72
|
-
session: { id, folder, artifacts }
|
|
73
|
-
}
|
|
46
|
+
// Step 1: Always read schema first
|
|
47
|
+
const schema = Bash(`cat ${schema_path}`)
|
|
48
|
+
|
|
49
|
+
// Step 2: Generate plan conforming to schema
|
|
50
|
+
const planObject = generatePlanFromSchema(schema, context)
|
|
74
51
|
```
|
|
75
52
|
|
|
76
53
|
## Execution Flow
|
|
77
54
|
|
|
78
55
|
```
|
|
79
|
-
Phase 1:
|
|
80
|
-
├─
|
|
56
|
+
Phase 1: Schema & Context Loading
|
|
57
|
+
├─ Read schema reference (plan-json-schema or fix-plan-json-schema)
|
|
58
|
+
├─ Aggregate multi-angle context (explorations or diagnoses)
|
|
59
|
+
└─ Determine output structure from schema
|
|
60
|
+
|
|
61
|
+
Phase 2: CLI Execution
|
|
81
62
|
├─ Construct CLI command with planning template
|
|
82
63
|
├─ Execute Gemini (fallback: Qwen → degraded mode)
|
|
83
64
|
└─ Timeout: 60 minutes
|
|
84
65
|
|
|
85
|
-
Phase
|
|
86
|
-
├─ Parse CLI output sections
|
|
66
|
+
Phase 3: Parsing & Enhancement
|
|
67
|
+
├─ Parse CLI output sections
|
|
87
68
|
├─ Validate and enhance task objects
|
|
88
|
-
└─ Infer missing fields from
|
|
69
|
+
└─ Infer missing fields from context
|
|
89
70
|
|
|
90
|
-
Phase
|
|
91
|
-
├─ Build planObject
|
|
92
|
-
├─
|
|
93
|
-
├─
|
|
94
|
-
└─ Return to orchestrator
|
|
71
|
+
Phase 4: planObject Generation
|
|
72
|
+
├─ Build planObject conforming to schema
|
|
73
|
+
├─ Assign CLI execution IDs and strategies
|
|
74
|
+
├─ Generate flow_control from depends_on
|
|
75
|
+
└─ Return to orchestrator
|
|
95
76
|
```
|
|
96
77
|
|
|
97
78
|
## CLI Command Template
|
|
98
79
|
|
|
99
80
|
```bash
|
|
100
|
-
|
|
101
|
-
PURPOSE: Generate
|
|
81
|
+
ccw cli -p "
|
|
82
|
+
PURPOSE: Generate plan for {task_description}
|
|
102
83
|
TASK:
|
|
103
|
-
• Analyze
|
|
104
|
-
• Break down into
|
|
105
|
-
• Identify
|
|
84
|
+
• Analyze task/bug description and context
|
|
85
|
+
• Break down into tasks following schema structure
|
|
86
|
+
• Identify dependencies and execution phases
|
|
106
87
|
MODE: analysis
|
|
107
|
-
CONTEXT: @**/* | Memory: {
|
|
88
|
+
CONTEXT: @**/* | Memory: {context_summary}
|
|
108
89
|
EXPECTED:
|
|
109
|
-
##
|
|
90
|
+
## Summary
|
|
110
91
|
[overview]
|
|
111
92
|
|
|
112
|
-
## High-Level Approach
|
|
113
|
-
[strategy]
|
|
114
|
-
|
|
115
93
|
## Task Breakdown
|
|
116
|
-
### T1: [Title]
|
|
117
|
-
**
|
|
94
|
+
### T1: [Title] (or FIX1 for fix-plan)
|
|
95
|
+
**Scope**: [module/feature path]
|
|
118
96
|
**Action**: [type]
|
|
119
97
|
**Description**: [what]
|
|
120
98
|
**Modification Points**: - [file]: [target] - [change]
|
|
121
99
|
**Implementation**: 1. [step]
|
|
122
|
-
**
|
|
123
|
-
**Acceptance**: - [quantified criterion]
|
|
100
|
+
**Acceptance/Verification**: - [quantified criterion]
|
|
124
101
|
**Depends On**: []
|
|
125
102
|
|
|
126
103
|
## Flow Control
|
|
127
104
|
**Execution Order**: - Phase parallel-1: [T1, T2] (independent)
|
|
128
|
-
**Exit Conditions**: - Success: [condition] - Failure: [condition]
|
|
129
105
|
|
|
130
106
|
## Time Estimate
|
|
131
107
|
**Total**: [time]
|
|
132
108
|
|
|
133
109
|
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/02-breakdown-task-steps.txt) |
|
|
134
|
-
-
|
|
135
|
-
-
|
|
110
|
+
- Follow schema structure from {schema_path}
|
|
111
|
+
- Acceptance/verification must be quantified
|
|
112
|
+
- Dependencies use task IDs
|
|
136
113
|
- analysis=READ-ONLY
|
|
137
|
-
"
|
|
114
|
+
" --tool {cli_tool} --mode analysis --cd {project_root}
|
|
138
115
|
```
|
|
139
116
|
|
|
140
117
|
## Core Functions
|
|
@@ -279,6 +256,51 @@ function inferFile(task, ctx) {
|
|
|
279
256
|
}
|
|
280
257
|
```
|
|
281
258
|
|
|
259
|
+
### CLI Execution ID Assignment (MANDATORY)
|
|
260
|
+
|
|
261
|
+
```javascript
|
|
262
|
+
function assignCliExecutionIds(tasks, sessionId) {
|
|
263
|
+
const taskMap = new Map(tasks.map(t => [t.id, t]))
|
|
264
|
+
const childCount = new Map()
|
|
265
|
+
|
|
266
|
+
// Count children for each task
|
|
267
|
+
tasks.forEach(task => {
|
|
268
|
+
(task.depends_on || []).forEach(depId => {
|
|
269
|
+
childCount.set(depId, (childCount.get(depId) || 0) + 1)
|
|
270
|
+
})
|
|
271
|
+
})
|
|
272
|
+
|
|
273
|
+
tasks.forEach(task => {
|
|
274
|
+
task.cli_execution_id = `${sessionId}-${task.id}`
|
|
275
|
+
const deps = task.depends_on || []
|
|
276
|
+
|
|
277
|
+
if (deps.length === 0) {
|
|
278
|
+
task.cli_execution = { strategy: "new" }
|
|
279
|
+
} else if (deps.length === 1) {
|
|
280
|
+
const parent = taskMap.get(deps[0])
|
|
281
|
+
const parentChildCount = childCount.get(deps[0]) || 0
|
|
282
|
+
task.cli_execution = parentChildCount === 1
|
|
283
|
+
? { strategy: "resume", resume_from: parent.cli_execution_id }
|
|
284
|
+
: { strategy: "fork", resume_from: parent.cli_execution_id }
|
|
285
|
+
} else {
|
|
286
|
+
task.cli_execution = {
|
|
287
|
+
strategy: "merge_fork",
|
|
288
|
+
merge_from: deps.map(depId => taskMap.get(depId).cli_execution_id)
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
})
|
|
292
|
+
return tasks
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Strategy Rules**:
|
|
297
|
+
| depends_on | Parent Children | Strategy | CLI Command |
|
|
298
|
+
|------------|-----------------|----------|-------------|
|
|
299
|
+
| [] | - | `new` | `--id {cli_execution_id}` |
|
|
300
|
+
| [T1] | 1 | `resume` | `--resume {resume_from}` |
|
|
301
|
+
| [T1] | >1 | `fork` | `--resume {resume_from} --id {cli_execution_id}` |
|
|
302
|
+
| [T1,T2] | - | `merge_fork` | `--resume {ids.join(',')} --id {cli_execution_id}` |
|
|
303
|
+
|
|
282
304
|
### Flow Control Inference
|
|
283
305
|
|
|
284
306
|
```javascript
|
|
@@ -303,21 +325,44 @@ function inferFlowControl(tasks) {
|
|
|
303
325
|
### planObject Generation
|
|
304
326
|
|
|
305
327
|
```javascript
|
|
306
|
-
function generatePlanObject(parsed, enrichedContext, input) {
|
|
328
|
+
function generatePlanObject(parsed, enrichedContext, input, schemaType) {
|
|
307
329
|
const tasks = validateAndEnhanceTasks(parsed.raw_tasks, enrichedContext)
|
|
330
|
+
assignCliExecutionIds(tasks, input.session.id) // MANDATORY: Assign CLI execution IDs
|
|
308
331
|
const flow_control = parsed.flow_control?.execution_order?.length > 0 ? parsed.flow_control : inferFlowControl(tasks)
|
|
309
|
-
const focus_paths = [...new Set(tasks.flatMap(t => [t.file, ...t.modification_points.map(m => m.file)]).filter(Boolean))]
|
|
332
|
+
const focus_paths = [...new Set(tasks.flatMap(t => [t.file || t.scope, ...t.modification_points.map(m => m.file)]).filter(Boolean))]
|
|
310
333
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
334
|
+
// Base fields (common to both schemas)
|
|
335
|
+
const base = {
|
|
336
|
+
summary: parsed.summary || `Plan for: ${input.task_description.slice(0, 100)}`,
|
|
314
337
|
tasks,
|
|
315
338
|
flow_control,
|
|
316
339
|
focus_paths,
|
|
317
340
|
estimated_time: parsed.time_estimate || `${tasks.length * 30} minutes`,
|
|
318
|
-
recommended_execution: input.complexity === "Low" ? "Agent" : "Codex",
|
|
319
|
-
|
|
320
|
-
|
|
341
|
+
recommended_execution: (input.complexity === "Low" || input.severity === "Low") ? "Agent" : "Codex",
|
|
342
|
+
_metadata: {
|
|
343
|
+
timestamp: new Date().toISOString(),
|
|
344
|
+
source: "cli-lite-planning-agent",
|
|
345
|
+
planning_mode: "agent-based",
|
|
346
|
+
context_angles: input.contextAngles || [],
|
|
347
|
+
duration_seconds: Math.round((Date.now() - startTime) / 1000)
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Schema-specific fields
|
|
352
|
+
if (schemaType === 'fix-plan') {
|
|
353
|
+
return {
|
|
354
|
+
...base,
|
|
355
|
+
root_cause: parsed.root_cause || "Root cause from diagnosis",
|
|
356
|
+
strategy: parsed.strategy || "comprehensive_fix",
|
|
357
|
+
severity: input.severity || "Medium",
|
|
358
|
+
risk_level: parsed.risk_level || "medium"
|
|
359
|
+
}
|
|
360
|
+
} else {
|
|
361
|
+
return {
|
|
362
|
+
...base,
|
|
363
|
+
approach: parsed.approach || "Step-by-step implementation",
|
|
364
|
+
complexity: input.complexity || "Medium"
|
|
365
|
+
}
|
|
321
366
|
}
|
|
322
367
|
}
|
|
323
368
|
```
|
|
@@ -383,9 +428,12 @@ function validateTask(task) {
|
|
|
383
428
|
## Key Reminders
|
|
384
429
|
|
|
385
430
|
**ALWAYS**:
|
|
386
|
-
-
|
|
431
|
+
- **Read schema first** to determine output structure
|
|
432
|
+
- Generate task IDs (T1/T2 for plan, FIX1/FIX2 for fix-plan)
|
|
387
433
|
- Include depends_on (even if empty [])
|
|
388
|
-
-
|
|
434
|
+
- **Assign cli_execution_id** (`{sessionId}-{taskId}`)
|
|
435
|
+
- **Compute cli_execution strategy** based on depends_on
|
|
436
|
+
- Quantify acceptance/verification criteria
|
|
389
437
|
- Generate flow_control from dependencies
|
|
390
438
|
- Handle CLI errors with fallback chain
|
|
391
439
|
|
|
@@ -394,3 +442,5 @@ function validateTask(task) {
|
|
|
394
442
|
- Use vague acceptance criteria
|
|
395
443
|
- Create circular dependencies
|
|
396
444
|
- Skip task validation
|
|
445
|
+
- **Skip CLI execution ID assignment**
|
|
446
|
+
- **Ignore schema structure**
|
|
@@ -107,7 +107,7 @@ Phase 3: Task JSON Generation
|
|
|
107
107
|
|
|
108
108
|
**Template-Based Command Construction with Test Layer Awareness**:
|
|
109
109
|
```bash
|
|
110
|
-
|
|
110
|
+
ccw cli -p "
|
|
111
111
|
PURPOSE: Analyze {test_type} test failures and generate fix strategy for iteration {iteration}
|
|
112
112
|
TASK:
|
|
113
113
|
• Review {failed_tests.length} {test_type} test failures: [{test_names}]
|
|
@@ -134,7 +134,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/{template}) |
|
|
|
134
134
|
- Consider previous iteration failures
|
|
135
135
|
- Validate fix doesn't introduce new vulnerabilities
|
|
136
136
|
- analysis=READ-ONLY
|
|
137
|
-
" {
|
|
137
|
+
" --tool {cli_tool} --mode analysis --cd {project_root} --timeout {timeout_value}
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
**Layer-Specific Guidance Injection**:
|
|
@@ -527,9 +527,9 @@ See: `.process/iteration-{iteration}-cli-output.txt`
|
|
|
527
527
|
1. **Detect test_type**: "integration" → Apply integration-specific diagnosis
|
|
528
528
|
2. **Execute CLI**:
|
|
529
529
|
```bash
|
|
530
|
-
|
|
530
|
+
ccw cli -p "PURPOSE: Analyze integration test failure...
|
|
531
531
|
TASK: Examine component interactions, data flow, interface contracts...
|
|
532
|
-
RULES: Analyze full call stack and data flow across components"
|
|
532
|
+
RULES: Analyze full call stack and data flow across components" --tool gemini --mode analysis
|
|
533
533
|
```
|
|
534
534
|
3. **Parse Output**: Extract RCA, 修复建议, 验证建议 sections
|
|
535
535
|
4. **Generate Task JSON** (IMPL-fix-1.json):
|
|
@@ -34,10 +34,11 @@ You are a code execution specialist focused on implementing high-quality, produc
|
|
|
34
34
|
- **context-package.json** (when available in workflow tasks)
|
|
35
35
|
|
|
36
36
|
**Context Package** :
|
|
37
|
-
`context-package.json` provides artifact paths -
|
|
37
|
+
`context-package.json` provides artifact paths - read using Read tool or ccw session:
|
|
38
38
|
```bash
|
|
39
|
-
# Get
|
|
40
|
-
|
|
39
|
+
# Get context package content from session using Read tool
|
|
40
|
+
Read(.workflow/active/${SESSION_ID}/.process/context-package.json)
|
|
41
|
+
# Returns parsed JSON with brainstorm_artifacts, focus_paths, etc.
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
**Pre-Analysis: Smart Tech Stack Loading**:
|
|
@@ -121,9 +122,9 @@ When task JSON contains `flow_control.implementation_approach` array:
|
|
|
121
122
|
- If `command` field present, execute it; otherwise use agent capabilities
|
|
122
123
|
|
|
123
124
|
**CLI Command Execution (CLI Execute Mode)**:
|
|
124
|
-
When step contains `command` field with Codex CLI, execute via
|
|
125
|
-
- First task (`depends_on: []`): `
|
|
126
|
-
- Subsequent tasks (has `depends_on`):
|
|
125
|
+
When step contains `command` field with Codex CLI, execute via CCW CLI. For Codex resume:
|
|
126
|
+
- First task (`depends_on: []`): `ccw cli -p "..." --tool codex --mode write --cd [path]`
|
|
127
|
+
- Subsequent tasks (has `depends_on`): Use CCW CLI with resume context to maintain session
|
|
127
128
|
|
|
128
129
|
**Test-Driven Development**:
|
|
129
130
|
- Write tests first (red → green → refactor)
|
|
@@ -109,7 +109,7 @@ This agent processes **simplified inline [FLOW_CONTROL]** format from brainstorm
|
|
|
109
109
|
|
|
110
110
|
3. **load_session_metadata**
|
|
111
111
|
- Action: Load session metadata
|
|
112
|
-
- Command:
|
|
112
|
+
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
|
|
113
113
|
- Output: session_metadata
|
|
114
114
|
```
|
|
115
115
|
|
|
@@ -155,7 +155,7 @@ When called, you receive:
|
|
|
155
155
|
- **User Context**: Specific requirements, constraints, and expectations from user discussion
|
|
156
156
|
- **Output Location**: Directory path for generated analysis files
|
|
157
157
|
- **Role Hint** (optional): Suggested role or role selection guidance
|
|
158
|
-
- **context-package.json** (CCW Workflow): Artifact paths catalog -
|
|
158
|
+
- **context-package.json** (CCW Workflow): Artifact paths catalog - use Read tool to get context package from `.workflow/active/{session}/.process/context-package.json`
|
|
159
159
|
- **ASSIGNED_ROLE** (optional): Specific role assignment
|
|
160
160
|
- **ANALYSIS_DIMENSIONS** (optional): Role-specific analysis dimensions
|
|
161
161
|
|
|
@@ -44,19 +44,19 @@ You are a context discovery specialist focused on gathering relevant project inf
|
|
|
44
44
|
**Use**: Unfamiliar APIs/libraries/patterns
|
|
45
45
|
|
|
46
46
|
### 3. Existing Code Discovery
|
|
47
|
-
**Primary (
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
47
|
+
**Primary (CCW CodexLens MCP)**:
|
|
48
|
+
- `mcp__ccw-tools__codex_lens(action="init", path=".")` - Initialize index for directory
|
|
49
|
+
- `mcp__ccw-tools__codex_lens(action="search", query="pattern", path=".")` - Content search (requires query)
|
|
50
|
+
- `mcp__ccw-tools__codex_lens(action="search_files", query="pattern")` - File name search, returns paths only (requires query)
|
|
51
|
+
- `mcp__ccw-tools__codex_lens(action="symbol", file="path")` - Extract all symbols from file (no query, returns functions/classes/variables)
|
|
52
|
+
- `mcp__ccw-tools__codex_lens(action="update", files=[...])` - Update index for specific files
|
|
53
53
|
|
|
54
54
|
**Fallback (CLI)**:
|
|
55
55
|
- `rg` (ripgrep) - Fast content search
|
|
56
56
|
- `find` - File discovery
|
|
57
57
|
- `Grep` - Pattern matching
|
|
58
58
|
|
|
59
|
-
**Priority**:
|
|
59
|
+
**Priority**: CodexLens MCP > ripgrep > find > grep
|
|
60
60
|
|
|
61
61
|
## Simplified Execution Process (3 Phases)
|
|
62
62
|
|
|
@@ -77,9 +77,8 @@ if (file_exists(contextPackagePath)) {
|
|
|
77
77
|
|
|
78
78
|
**1.2 Foundation Setup**:
|
|
79
79
|
```javascript
|
|
80
|
-
// 1. Initialize
|
|
81
|
-
|
|
82
|
-
mcp__code-index__refresh_index()
|
|
80
|
+
// 1. Initialize CodexLens (if available)
|
|
81
|
+
mcp__ccw-tools__codex_lens({ action: "init", path: "." })
|
|
83
82
|
|
|
84
83
|
// 2. Project Structure
|
|
85
84
|
bash(ccw tool exec get_modules_by_depth '{}')
|
|
@@ -212,18 +211,18 @@ mcp__exa__web_search_exa({
|
|
|
212
211
|
|
|
213
212
|
**Layer 1: File Pattern Discovery**
|
|
214
213
|
```javascript
|
|
215
|
-
// Primary:
|
|
216
|
-
const files =
|
|
214
|
+
// Primary: CodexLens MCP
|
|
215
|
+
const files = mcp__ccw-tools__codex_lens({ action: "search_files", query: "*{keyword}*" })
|
|
217
216
|
// Fallback: find . -iname "*{keyword}*" -type f
|
|
218
217
|
```
|
|
219
218
|
|
|
220
219
|
**Layer 2: Content Search**
|
|
221
220
|
```javascript
|
|
222
|
-
// Primary:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
221
|
+
// Primary: CodexLens MCP
|
|
222
|
+
mcp__ccw-tools__codex_lens({
|
|
223
|
+
action: "search",
|
|
224
|
+
query: "{keyword}",
|
|
225
|
+
path: "."
|
|
227
226
|
})
|
|
228
227
|
// Fallback: rg "{keyword}" -t ts --files-with-matches
|
|
229
228
|
```
|
|
@@ -231,11 +230,10 @@ mcp__code-index__search_code_advanced({
|
|
|
231
230
|
**Layer 3: Semantic Patterns**
|
|
232
231
|
```javascript
|
|
233
232
|
// Find definitions (class, interface, function)
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
context_lines: 2
|
|
233
|
+
mcp__ccw-tools__codex_lens({
|
|
234
|
+
action: "search",
|
|
235
|
+
query: "^(export )?(class|interface|type|function) .*{keyword}",
|
|
236
|
+
path: "."
|
|
239
237
|
})
|
|
240
238
|
```
|
|
241
239
|
|
|
@@ -243,21 +241,22 @@ mcp__code-index__search_code_advanced({
|
|
|
243
241
|
```javascript
|
|
244
242
|
// Get file summaries for imports/exports
|
|
245
243
|
for (const file of discovered_files) {
|
|
246
|
-
const summary =
|
|
247
|
-
// summary: {
|
|
244
|
+
const summary = mcp__ccw-tools__codex_lens({ action: "symbol", file: file })
|
|
245
|
+
// summary: {symbols: [{name, type, line}]}
|
|
248
246
|
}
|
|
249
247
|
```
|
|
250
248
|
|
|
251
249
|
**Layer 5: Config & Tests**
|
|
252
250
|
```javascript
|
|
253
251
|
// Config files
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
mcp__ccw-tools__codex_lens({ action: "search_files", query: "*.config.*" })
|
|
253
|
+
mcp__ccw-tools__codex_lens({ action: "search_files", query: "package.json" })
|
|
256
254
|
|
|
257
255
|
// Tests
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
mcp__ccw-tools__codex_lens({
|
|
257
|
+
action: "search",
|
|
258
|
+
query: "(describe|it|test).*{keyword}",
|
|
259
|
+
path: "."
|
|
261
260
|
})
|
|
262
261
|
```
|
|
263
262
|
|
|
@@ -560,14 +559,14 @@ Output: .workflow/session/{session}/.process/context-package.json
|
|
|
560
559
|
- Expose sensitive data (credentials, keys)
|
|
561
560
|
- Exceed file limits (50 total)
|
|
562
561
|
- Include binaries/generated files
|
|
563
|
-
- Use ripgrep if
|
|
562
|
+
- Use ripgrep if CodexLens available
|
|
564
563
|
|
|
565
564
|
**ALWAYS**:
|
|
566
|
-
- Initialize
|
|
565
|
+
- Initialize CodexLens in Phase 0
|
|
567
566
|
- Execute get_modules_by_depth.sh
|
|
568
567
|
- Load CLAUDE.md/README.md (unless in memory)
|
|
569
568
|
- Execute all 3 discovery tracks
|
|
570
|
-
- Use
|
|
569
|
+
- Use CodexLens MCP as primary
|
|
571
570
|
- Fallback to ripgrep only when needed
|
|
572
571
|
- Use Exa for unfamiliar APIs
|
|
573
572
|
- Apply multi-factor scoring
|
|
@@ -61,9 +61,9 @@ The agent supports **two execution modes** based on task JSON's `meta.cli_execut
|
|
|
61
61
|
|
|
62
62
|
**Step 2** (CLI execution):
|
|
63
63
|
- Agent substitutes [target_folders] into command
|
|
64
|
-
- Agent executes CLI command via
|
|
64
|
+
- Agent executes CLI command via CCW:
|
|
65
65
|
```bash
|
|
66
|
-
|
|
66
|
+
ccw cli -p "
|
|
67
67
|
PURPOSE: Generate module documentation
|
|
68
68
|
TASK: Create API.md and README.md for each module
|
|
69
69
|
MODE: write
|
|
@@ -71,7 +71,7 @@ The agent supports **two execution modes** based on task JSON's `meta.cli_execut
|
|
|
71
71
|
./src/modules/api|code|code:3|dirs:0
|
|
72
72
|
EXPECTED: Documentation files in .workflow/docs/my_project/src/modules/
|
|
73
73
|
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt) | Mirror source structure
|
|
74
|
-
"
|
|
74
|
+
" --tool gemini --mode write --cd src/modules
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
4. **CLI Execution** (Gemini CLI):
|
|
@@ -216,7 +216,7 @@ Before completion, verify:
|
|
|
216
216
|
{
|
|
217
217
|
"step": "analyze_module_structure",
|
|
218
218
|
"action": "Deep analysis of module structure and API",
|
|
219
|
-
"command": "
|
|
219
|
+
"command": "ccw cli -p \"PURPOSE: Document module comprehensively\nTASK: Extract module purpose, architecture, public API, dependencies\nMODE: analysis\nCONTEXT: @**/* System: [system_context]\nEXPECTED: Complete module analysis for documentation\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\" --tool gemini --mode analysis --cd src/auth",
|
|
220
220
|
"output_to": "module_analysis",
|
|
221
221
|
"on_error": "fail"
|
|
222
222
|
}
|