claude-code-workflow 6.0.0
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/agents/action-planning-agent.md +778 -0
- package/.claude/agents/cli-execution-agent.md +270 -0
- package/.claude/agents/cli-explore-agent.md +182 -0
- package/.claude/agents/cli-lite-planning-agent.md +396 -0
- package/.claude/agents/cli-planning-agent.md +558 -0
- package/.claude/agents/code-developer.md +310 -0
- package/.claude/agents/conceptual-planning-agent.md +308 -0
- package/.claude/agents/context-search-agent.md +582 -0
- package/.claude/agents/doc-generator.md +330 -0
- package/.claude/agents/memory-bridge.md +94 -0
- package/.claude/agents/test-context-search-agent.md +399 -0
- package/.claude/agents/test-fix-agent.md +343 -0
- package/.claude/agents/ui-design-agent.md +593 -0
- package/.claude/agents/universal-executor.md +131 -0
- package/.claude/commands/cli/cli-init.md +440 -0
- package/.claude/commands/enhance-prompt.md +93 -0
- package/.claude/commands/memory/code-map-memory.md +687 -0
- package/.claude/commands/memory/docs-full-cli.md +471 -0
- package/.claude/commands/memory/docs-related-cli.md +386 -0
- package/.claude/commands/memory/docs.md +615 -0
- package/.claude/commands/memory/load-skill-memory.md +182 -0
- package/.claude/commands/memory/load.md +240 -0
- package/.claude/commands/memory/skill-memory.md +525 -0
- package/.claude/commands/memory/style-skill-memory.md +396 -0
- package/.claude/commands/memory/tech-research.md +477 -0
- package/.claude/commands/memory/update-full.md +332 -0
- package/.claude/commands/memory/update-related.md +332 -0
- package/.claude/commands/memory/workflow-skill-memory.md +517 -0
- package/.claude/commands/task/breakdown.md +204 -0
- package/.claude/commands/task/create.md +152 -0
- package/.claude/commands/task/execute.md +270 -0
- package/.claude/commands/task/replan.md +437 -0
- package/.claude/commands/version.md +254 -0
- package/.claude/commands/workflow/action-plan-verify.md +447 -0
- package/.claude/commands/workflow/brainstorm/api-designer.md +585 -0
- package/.claude/commands/workflow/brainstorm/artifacts.md +452 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +443 -0
- package/.claude/commands/workflow/brainstorm/data-architect.md +220 -0
- package/.claude/commands/workflow/brainstorm/product-manager.md +200 -0
- package/.claude/commands/workflow/brainstorm/product-owner.md +200 -0
- package/.claude/commands/workflow/brainstorm/scrum-master.md +200 -0
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
- package/.claude/commands/workflow/brainstorm/synthesis.md +398 -0
- package/.claude/commands/workflow/brainstorm/system-architect.md +387 -0
- package/.claude/commands/workflow/brainstorm/ui-designer.md +221 -0
- package/.claude/commands/workflow/brainstorm/ux-expert.md +221 -0
- package/.claude/commands/workflow/execute.md +460 -0
- package/.claude/commands/workflow/init.md +164 -0
- package/.claude/commands/workflow/lite-execute.md +686 -0
- package/.claude/commands/workflow/lite-fix.md +621 -0
- package/.claude/commands/workflow/lite-plan.md +592 -0
- package/.claude/commands/workflow/plan.md +551 -0
- package/.claude/commands/workflow/replan.md +515 -0
- package/.claude/commands/workflow/review-fix.md +646 -0
- package/.claude/commands/workflow/review-module-cycle.md +795 -0
- package/.claude/commands/workflow/review-session-cycle.md +805 -0
- package/.claude/commands/workflow/review.md +291 -0
- package/.claude/commands/workflow/session/complete.md +500 -0
- package/.claude/commands/workflow/session/list.md +96 -0
- package/.claude/commands/workflow/session/resume.md +61 -0
- package/.claude/commands/workflow/session/start.md +200 -0
- package/.claude/commands/workflow/status.md +352 -0
- package/.claude/commands/workflow/tdd-plan.md +460 -0
- package/.claude/commands/workflow/tdd-verify.md +386 -0
- package/.claude/commands/workflow/test-cycle-execute.md +498 -0
- package/.claude/commands/workflow/test-fix-gen.md +699 -0
- package/.claude/commands/workflow/test-gen.md +529 -0
- package/.claude/commands/workflow/tools/conflict-resolution.md +680 -0
- package/.claude/commands/workflow/tools/context-gather.md +434 -0
- package/.claude/commands/workflow/tools/task-generate-agent.md +291 -0
- package/.claude/commands/workflow/tools/task-generate-tdd.md +518 -0
- package/.claude/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
- package/.claude/commands/workflow/tools/test-concept-enhanced.md +163 -0
- package/.claude/commands/workflow/tools/test-context-gather.md +235 -0
- package/.claude/commands/workflow/tools/test-task-generate.md +256 -0
- package/.claude/commands/workflow/ui-design/animation-extract.md +1150 -0
- package/.claude/commands/workflow/ui-design/codify-style.md +652 -0
- package/.claude/commands/workflow/ui-design/design-sync.md +454 -0
- package/.claude/commands/workflow/ui-design/explore-auto.md +678 -0
- package/.claude/commands/workflow/ui-design/generate.md +504 -0
- package/.claude/commands/workflow/ui-design/imitate-auto.md +745 -0
- package/.claude/commands/workflow/ui-design/import-from-code.md +537 -0
- package/.claude/commands/workflow/ui-design/layout-extract.md +788 -0
- package/.claude/commands/workflow/ui-design/reference-page-generator.md +356 -0
- package/.claude/commands/workflow/ui-design/style-extract.md +773 -0
- package/.claude/scripts/classify-folders.sh +35 -0
- package/.claude/scripts/convert_tokens_to_css.sh +225 -0
- package/.claude/scripts/detect_changed_modules.sh +157 -0
- package/.claude/scripts/discover-design-files.sh +83 -0
- package/.claude/scripts/extract-animations.js +243 -0
- package/.claude/scripts/extract-computed-styles.js +118 -0
- package/.claude/scripts/extract-layout-structure.js +411 -0
- package/.claude/scripts/generate_module_docs.sh +713 -0
- package/.claude/scripts/get_modules_by_depth.sh +166 -0
- package/.claude/scripts/ui-generate-preview.sh +391 -0
- package/.claude/scripts/ui-instantiate-prototypes.sh +811 -0
- package/.claude/scripts/update_module_claude.sh +333 -0
- package/.claude/skills/command-guide/SKILL.md +388 -0
- package/.claude/skills/command-guide/UPDATE-GUIDELINE.md +592 -0
- package/.claude/skills/command-guide/guides/cli-tools-guide.md +410 -0
- package/.claude/skills/command-guide/guides/examples.md +537 -0
- package/.claude/skills/command-guide/guides/getting-started.md +242 -0
- package/.claude/skills/command-guide/guides/implementation-details.md +1010 -0
- package/.claude/skills/command-guide/guides/index-structure.md +326 -0
- package/.claude/skills/command-guide/guides/troubleshooting.md +92 -0
- package/.claude/skills/command-guide/guides/ui-design-workflow-guide.md +316 -0
- package/.claude/skills/command-guide/guides/workflow-patterns.md +662 -0
- package/.claude/skills/command-guide/index/all-commands.json +783 -0
- package/.claude/skills/command-guide/index/by-category.json +811 -0
- package/.claude/skills/command-guide/index/by-use-case.json +797 -0
- package/.claude/skills/command-guide/index/command-relationships.json +307 -0
- package/.claude/skills/command-guide/index/essential-commands.json +123 -0
- package/.claude/skills/command-guide/reference/agents/action-planning-agent.md +722 -0
- package/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +270 -0
- package/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +182 -0
- package/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md +396 -0
- package/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +558 -0
- package/.claude/skills/command-guide/reference/agents/code-developer.md +310 -0
- package/.claude/skills/command-guide/reference/agents/conceptual-planning-agent.md +328 -0
- package/.claude/skills/command-guide/reference/agents/context-search-agent.md +577 -0
- package/.claude/skills/command-guide/reference/agents/doc-generator.md +330 -0
- package/.claude/skills/command-guide/reference/agents/memory-bridge.md +94 -0
- package/.claude/skills/command-guide/reference/agents/test-context-search-agent.md +399 -0
- package/.claude/skills/command-guide/reference/agents/test-fix-agent.md +343 -0
- package/.claude/skills/command-guide/reference/agents/ui-design-agent.md +593 -0
- package/.claude/skills/command-guide/reference/agents/universal-executor.md +131 -0
- package/.claude/skills/command-guide/reference/commands/cli/cli-init.md +440 -0
- package/.claude/skills/command-guide/reference/commands/enhance-prompt.md +93 -0
- package/.claude/skills/command-guide/reference/commands/memory/code-map-memory.md +687 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs-full-cli.md +471 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs-related-cli.md +386 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs.md +610 -0
- package/.claude/skills/command-guide/reference/commands/memory/load-skill-memory.md +182 -0
- package/.claude/skills/command-guide/reference/commands/memory/load.md +240 -0
- package/.claude/skills/command-guide/reference/commands/memory/skill-memory.md +525 -0
- package/.claude/skills/command-guide/reference/commands/memory/style-skill-memory.md +396 -0
- package/.claude/skills/command-guide/reference/commands/memory/tech-research.md +477 -0
- package/.claude/skills/command-guide/reference/commands/memory/update-full.md +332 -0
- package/.claude/skills/command-guide/reference/commands/memory/update-related.md +332 -0
- package/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md +517 -0
- package/.claude/skills/command-guide/reference/commands/task/breakdown.md +204 -0
- package/.claude/skills/command-guide/reference/commands/task/create.md +152 -0
- package/.claude/skills/command-guide/reference/commands/task/execute.md +270 -0
- package/.claude/skills/command-guide/reference/commands/task/replan.md +437 -0
- package/.claude/skills/command-guide/reference/commands/version.md +254 -0
- package/.claude/skills/command-guide/reference/commands/workflow/action-plan-verify.md +447 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/api-designer.md +585 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/artifacts.md +604 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/auto-parallel.md +466 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/data-architect.md +220 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-manager.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-owner.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/scrum-master.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/synthesis.md +496 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/system-architect.md +387 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ui-designer.md +221 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ux-expert.md +221 -0
- package/.claude/skills/command-guide/reference/commands/workflow/execute.md +460 -0
- package/.claude/skills/command-guide/reference/commands/workflow/init.md +164 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +634 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-fix.md +602 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-plan.md +582 -0
- package/.claude/skills/command-guide/reference/commands/workflow/plan.md +551 -0
- package/.claude/skills/command-guide/reference/commands/workflow/replan.md +515 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-fix.md +646 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-module-cycle.md +795 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-session-cycle.md +805 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review.md +291 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/complete.md +500 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/list.md +96 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/resume.md +61 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/start.md +180 -0
- package/.claude/skills/command-guide/reference/commands/workflow/status.md +352 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-plan.md +460 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md +386 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md +498 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +699 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-gen.md +529 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +680 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +434 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +151 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +518 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +163 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md +235 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md +256 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/animation-extract.md +1150 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/codify-style.md +652 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/design-sync.md +454 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/explore-auto.md +678 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/generate.md +504 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md +745 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +537 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/layout-extract.md +788 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/reference-page-generator.md +356 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/style-extract.md +773 -0
- package/.claude/skills/command-guide/scripts/analyze_commands.py +502 -0
- package/.claude/skills/command-guide/scripts/update-index.sh +130 -0
- package/.claude/skills/command-guide/templates/issue-bug.md +104 -0
- package/.claude/skills/command-guide/templates/issue-diagnosis.md +275 -0
- package/.claude/skills/command-guide/templates/issue-feature.md +97 -0
- package/.claude/skills/command-guide/templates/issue-question.md +141 -0
- package/.claude/skills/prompt-enhancer/SKILL.md +124 -0
- package/.claude/workflows/_template-compare-matrix.html +692 -0
- package/.claude/workflows/cli-templates/fix-plan-template.json +75 -0
- package/.claude/workflows/cli-templates/fix-progress-template.json +48 -0
- package/.claude/workflows/cli-templates/memory/style-skill-memory/skill-md-template.md +299 -0
- package/.claude/workflows/cli-templates/planning-roles/data-architect.md +120 -0
- package/.claude/workflows/cli-templates/planning-roles/product-manager.md +119 -0
- package/.claude/workflows/cli-templates/planning-roles/product-owner.md +261 -0
- package/.claude/workflows/cli-templates/planning-roles/scrum-master.md +186 -0
- package/.claude/workflows/cli-templates/planning-roles/subject-matter-expert.md +281 -0
- package/.claude/workflows/cli-templates/planning-roles/synthesis-role.md +414 -0
- package/.claude/workflows/cli-templates/planning-roles/system-architect.md +106 -0
- package/.claude/workflows/cli-templates/planning-roles/test-strategist.md +124 -0
- package/.claude/workflows/cli-templates/planning-roles/ui-designer.md +379 -0
- package/.claude/workflows/cli-templates/planning-roles/ux-expert.md +240 -0
- package/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt +127 -0
- package/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt +115 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt +37 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-technical-document.txt +33 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-review-architecture.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-review-code-quality.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-analyze-performance.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-assess-security-risks.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-review-quality-standards.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/development/02-generate-tests.txt +70 -0
- package/.claude/workflows/cli-templates/prompts/development/02-implement-component-ui.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/development/02-implement-feature.txt +58 -0
- package/.claude/workflows/cli-templates/prompts/development/02-refactor-codebase.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/development/03-debug-runtime-issues.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/documentation/api.txt +15 -0
- package/.claude/workflows/cli-templates/prompts/documentation/folder-navigation.txt +27 -0
- package/.claude/workflows/cli-templates/prompts/documentation/module-readme.txt +49 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-architecture.txt +41 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-examples.txt +35 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-readme.txt +35 -0
- package/.claude/workflows/cli-templates/prompts/memory/02-document-module-structure.txt +165 -0
- package/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt +109 -0
- package/.claude/workflows/cli-templates/prompts/planning/02-breakdown-task-steps.txt +30 -0
- package/.claude/workflows/cli-templates/prompts/planning/02-design-component-spec.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/planning/03-evaluate-concept-feasibility.txt +127 -0
- package/.claude/workflows/cli-templates/prompts/planning/03-plan-migration-strategy.txt +30 -0
- package/.claude/workflows/cli-templates/prompts/tech/tech-module-format.txt +359 -0
- package/.claude/workflows/cli-templates/prompts/tech/tech-skill-index.txt +185 -0
- package/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt +179 -0
- package/.claude/workflows/cli-templates/prompts/universal/00-universal-creative-style.txt +95 -0
- package/.claude/workflows/cli-templates/prompts/universal/00-universal-rigorous-style.txt +92 -0
- package/.claude/workflows/cli-templates/prompts/verification/codex-technical.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/verification/cross-validation.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/verification/gemini-strategic.txt +27 -0
- package/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt +224 -0
- package/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt +176 -0
- package/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt +131 -0
- package/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt +286 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-aggregation.txt +172 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt +98 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-index.txt +224 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt +98 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-sessions-timeline.txt +53 -0
- package/.claude/workflows/cli-templates/prompts/workflow/task-json-agent-mode.txt +123 -0
- package/.claude/workflows/cli-templates/prompts/workflow/task-json-cli-mode.txt +182 -0
- package/.claude/workflows/cli-templates/schemas/diagnosis-json-schema.json +234 -0
- package/.claude/workflows/cli-templates/schemas/explore-json-schema.json +124 -0
- package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +273 -0
- package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +219 -0
- package/.claude/workflows/cli-templates/schemas/project-json-schema.json +221 -0
- package/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json +82 -0
- package/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json +51 -0
- package/.claude/workflows/cli-templates/tech-stacks/go-dev.md +91 -0
- package/.claude/workflows/cli-templates/tech-stacks/java-dev.md +107 -0
- package/.claude/workflows/cli-templates/tech-stacks/javascript-dev.md +58 -0
- package/.claude/workflows/cli-templates/tech-stacks/python-dev.md +79 -0
- package/.claude/workflows/cli-templates/tech-stacks/react-dev.md +103 -0
- package/.claude/workflows/cli-templates/tech-stacks/typescript-dev.md +83 -0
- package/.claude/workflows/cli-templates/ui-design/systems/animation-tokens.json +247 -0
- package/.claude/workflows/cli-templates/ui-design/systems/design-tokens.json +342 -0
- package/.claude/workflows/cli-templates/ui-design/systems/layout-templates.json +145 -0
- package/.claude/workflows/context-search-strategy.md +77 -0
- package/.claude/workflows/intelligent-tools-strategy.md +662 -0
- package/.claude/workflows/review-directory-specification.md +336 -0
- package/.claude/workflows/task-core.md +214 -0
- package/.claude/workflows/tool-strategy.md +71 -0
- package/.claude/workflows/workflow-architecture.md +942 -0
- package/.codex/AGENTS.md +330 -0
- package/.gemini/GEMINI.md +164 -0
- package/.qwen/QWEN.md +164 -0
- package/CLAUDE.md +91 -0
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/ccw/README.md +121 -0
- package/ccw/bin/ccw.js +10 -0
- package/ccw/src/cli.js +100 -0
- package/ccw/src/commands/install.js +324 -0
- package/ccw/src/commands/list.js +37 -0
- package/ccw/src/commands/serve.js +67 -0
- package/ccw/src/commands/uninstall.js +238 -0
- package/ccw/src/commands/upgrade.js +307 -0
- package/ccw/src/commands/view.js +14 -0
- package/ccw/src/core/dashboard-generator-patch.js +29 -0
- package/ccw/src/core/dashboard-generator.js +667 -0
- package/ccw/src/core/data-aggregator.js +409 -0
- package/ccw/src/core/lite-scanner.js +290 -0
- package/ccw/src/core/manifest.js +201 -0
- package/ccw/src/core/server.js +1327 -0
- package/ccw/src/core/server.js.bak +385 -0
- package/ccw/src/core/server_original.bak +385 -0
- package/ccw/src/core/session-scanner.js +235 -0
- package/ccw/src/index.js +9 -0
- package/ccw/src/templates/dashboard-js/api.js +200 -0
- package/ccw/src/templates/dashboard-js/components/_conflict_tab.js +112 -0
- package/ccw/src/templates/dashboard-js/components/_exp_helpers.js +54 -0
- package/ccw/src/templates/dashboard-js/components/_review_tab.js +640 -0
- package/ccw/src/templates/dashboard-js/components/carousel.js +398 -0
- package/ccw/src/templates/dashboard-js/components/flowchart.js +493 -0
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +273 -0
- package/ccw/src/templates/dashboard-js/components/mcp-manager.js +506 -0
- package/ccw/src/templates/dashboard-js/components/modals.js +260 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +239 -0
- package/ccw/src/templates/dashboard-js/components/notifications.js +194 -0
- package/ccw/src/templates/dashboard-js/components/sidebar.js +31 -0
- package/ccw/src/templates/dashboard-js/components/tabs-context.js +1093 -0
- package/ccw/src/templates/dashboard-js/components/tabs-other.js +273 -0
- package/ccw/src/templates/dashboard-js/components/task-drawer-core.js +477 -0
- package/ccw/src/templates/dashboard-js/components/task-drawer-renderers.js +447 -0
- package/ccw/src/templates/dashboard-js/components/theme.js +21 -0
- package/ccw/src/templates/dashboard-js/main.js +57 -0
- package/ccw/src/templates/dashboard-js/state.js +37 -0
- package/ccw/src/templates/dashboard-js/utils.js +153 -0
- package/ccw/src/templates/dashboard-js/views/fix-session.js +180 -0
- package/ccw/src/templates/dashboard-js/views/home.js +193 -0
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +387 -0
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +390 -0
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +271 -0
- package/ccw/src/templates/dashboard-js/views/project-overview.js +246 -0
- package/ccw/src/templates/dashboard-js/views/review-session.js +711 -0
- package/ccw/src/templates/dashboard-js/views/session-detail.js +770 -0
- package/ccw/src/templates/dashboard.css +7660 -0
- package/ccw/src/templates/dashboard.html +630 -0
- package/ccw/src/templates/dashboard_tailwind.html +42 -0
- package/ccw/src/templates/dashboard_test.html +37 -0
- package/ccw/src/templates/review-cycle-dashboard.html +1930 -0
- package/ccw/src/templates/tailwind-base.css +212 -0
- package/ccw/src/templates/workflow-dashboard.html +401 -0
- package/ccw/src/utils/browser-launcher.js +49 -0
- package/ccw/src/utils/file-utils.js +48 -0
- package/ccw/src/utils/path-resolver.js +279 -0
- package/ccw/src/utils/ui.js +148 -0
- package/package.json +66 -0
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Analyze all command files and generate index files for command-guide skill.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import json
|
|
9
|
+
import shutil
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from collections import defaultdict
|
|
12
|
+
from typing import Dict, List, Any
|
|
13
|
+
|
|
14
|
+
# Base paths
|
|
15
|
+
BASE_DIR = Path("D:/Claude_dms3/.claude")
|
|
16
|
+
COMMANDS_DIR = BASE_DIR / "commands"
|
|
17
|
+
AGENTS_DIR = BASE_DIR / "agents"
|
|
18
|
+
SKILL_DIR = BASE_DIR / "skills" / "command-guide"
|
|
19
|
+
REFERENCE_DIR = SKILL_DIR / "reference"
|
|
20
|
+
INDEX_DIR = SKILL_DIR / "index"
|
|
21
|
+
|
|
22
|
+
def parse_frontmatter(content: str) -> Dict[str, Any]:
|
|
23
|
+
"""Extract YAML frontmatter from markdown content."""
|
|
24
|
+
frontmatter = {}
|
|
25
|
+
if content.startswith('---'):
|
|
26
|
+
lines = content.split('\n')
|
|
27
|
+
in_frontmatter = False
|
|
28
|
+
for i, line in enumerate(lines[1:], 1):
|
|
29
|
+
if line.strip() == '---':
|
|
30
|
+
break
|
|
31
|
+
if ':' in line:
|
|
32
|
+
key, value = line.split(':', 1)
|
|
33
|
+
frontmatter[key.strip()] = value.strip().strip('"')
|
|
34
|
+
return frontmatter
|
|
35
|
+
|
|
36
|
+
def categorize_command(file_path: Path) -> tuple:
|
|
37
|
+
"""Determine category and subcategory from file path."""
|
|
38
|
+
parts = file_path.relative_to(COMMANDS_DIR).parts
|
|
39
|
+
|
|
40
|
+
if len(parts) == 1:
|
|
41
|
+
return "general", None
|
|
42
|
+
|
|
43
|
+
category = parts[0] # cli, memory, task, workflow
|
|
44
|
+
subcategory = parts[1].replace('.md', '') if len(parts) > 2 else None
|
|
45
|
+
|
|
46
|
+
return category, subcategory
|
|
47
|
+
|
|
48
|
+
def determine_usage_scenario(name: str, description: str, category: str) -> str:
|
|
49
|
+
"""Determine primary usage scenario for command."""
|
|
50
|
+
name_lower = name.lower()
|
|
51
|
+
desc_lower = description.lower()
|
|
52
|
+
|
|
53
|
+
# Planning indicators
|
|
54
|
+
if any(word in name_lower for word in ['plan', 'design', 'breakdown', 'brainstorm']):
|
|
55
|
+
return "planning"
|
|
56
|
+
|
|
57
|
+
# Implementation indicators
|
|
58
|
+
if any(word in name_lower for word in ['implement', 'execute', 'generate', 'create', 'write']):
|
|
59
|
+
return "implementation"
|
|
60
|
+
|
|
61
|
+
# Testing indicators
|
|
62
|
+
if any(word in name_lower for word in ['test', 'tdd', 'verify', 'coverage']):
|
|
63
|
+
return "testing"
|
|
64
|
+
|
|
65
|
+
# Documentation indicators
|
|
66
|
+
if any(word in name_lower for word in ['docs', 'documentation', 'memory']):
|
|
67
|
+
return "documentation"
|
|
68
|
+
|
|
69
|
+
# Session management indicators
|
|
70
|
+
if any(word in name_lower for word in ['session', 'resume', 'status', 'complete']):
|
|
71
|
+
return "session-management"
|
|
72
|
+
|
|
73
|
+
# Analysis indicators
|
|
74
|
+
if any(word in name_lower for word in ['analyze', 'review', 'diagnosis']):
|
|
75
|
+
return "analysis"
|
|
76
|
+
|
|
77
|
+
return "general"
|
|
78
|
+
|
|
79
|
+
def determine_difficulty(name: str, description: str, category: str) -> str:
|
|
80
|
+
"""Determine difficulty level."""
|
|
81
|
+
name_lower = name.lower()
|
|
82
|
+
|
|
83
|
+
# Beginner commands
|
|
84
|
+
beginner_keywords = ['status', 'list', 'chat', 'analyze', 'version']
|
|
85
|
+
if any(word in name_lower for word in beginner_keywords):
|
|
86
|
+
return "Beginner"
|
|
87
|
+
|
|
88
|
+
# Advanced commands
|
|
89
|
+
advanced_keywords = ['tdd', 'conflict', 'agent', 'auto-parallel', 'coverage', 'synthesis']
|
|
90
|
+
if any(word in name_lower for word in advanced_keywords):
|
|
91
|
+
return "Advanced"
|
|
92
|
+
|
|
93
|
+
# Intermediate by default
|
|
94
|
+
return "Intermediate"
|
|
95
|
+
|
|
96
|
+
def analyze_command_file(file_path: Path) -> Dict[str, Any]:
|
|
97
|
+
"""Analyze a single command file and extract metadata."""
|
|
98
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
99
|
+
content = f.read()
|
|
100
|
+
|
|
101
|
+
# Parse frontmatter
|
|
102
|
+
frontmatter = parse_frontmatter(content)
|
|
103
|
+
|
|
104
|
+
# Extract data
|
|
105
|
+
name = frontmatter.get('name', file_path.stem)
|
|
106
|
+
description = frontmatter.get('description', '')
|
|
107
|
+
argument_hint = frontmatter.get('argument-hint', '')
|
|
108
|
+
|
|
109
|
+
# Determine categorization
|
|
110
|
+
category, subcategory = categorize_command(file_path)
|
|
111
|
+
usage_scenario = determine_usage_scenario(name, description, category)
|
|
112
|
+
difficulty = determine_difficulty(name, description, category)
|
|
113
|
+
|
|
114
|
+
# Build relative path
|
|
115
|
+
rel_path = str(file_path.relative_to(COMMANDS_DIR)).replace('\\', '/')
|
|
116
|
+
|
|
117
|
+
# Build full command name from frontmatter name or construct it
|
|
118
|
+
# If name already contains colons (e.g., "workflow:status"), use it directly
|
|
119
|
+
if ':' in name:
|
|
120
|
+
command_name = f"/{name}"
|
|
121
|
+
elif category == "general":
|
|
122
|
+
command_name = f"/{name}"
|
|
123
|
+
else:
|
|
124
|
+
# For subcategorized commands, build the full path
|
|
125
|
+
if subcategory:
|
|
126
|
+
command_name = f"/{category}:{subcategory}:{name}"
|
|
127
|
+
else:
|
|
128
|
+
command_name = f"/{category}:{name}"
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
"name": name,
|
|
132
|
+
"command": command_name,
|
|
133
|
+
"description": description,
|
|
134
|
+
"arguments": argument_hint,
|
|
135
|
+
"category": category,
|
|
136
|
+
"subcategory": subcategory,
|
|
137
|
+
"usage_scenario": usage_scenario,
|
|
138
|
+
"difficulty": difficulty,
|
|
139
|
+
"file_path": rel_path
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
def build_command_relationships() -> Dict[str, Any]:
|
|
143
|
+
"""Build command relationship mappings."""
|
|
144
|
+
relationships = {
|
|
145
|
+
# Workflow planning commands
|
|
146
|
+
"workflow:plan": {
|
|
147
|
+
"calls_internally": [
|
|
148
|
+
"workflow:session:start",
|
|
149
|
+
"workflow:tools:context-gather",
|
|
150
|
+
"workflow:tools:conflict-resolution",
|
|
151
|
+
"workflow:tools:task-generate-agent"
|
|
152
|
+
],
|
|
153
|
+
"next_steps": ["workflow:action-plan-verify", "workflow:status", "workflow:execute"],
|
|
154
|
+
"alternatives": ["workflow:tdd-plan"],
|
|
155
|
+
"prerequisites": []
|
|
156
|
+
},
|
|
157
|
+
"workflow:tdd-plan": {
|
|
158
|
+
"calls_internally": [
|
|
159
|
+
"workflow:session:start",
|
|
160
|
+
"workflow:tools:context-gather",
|
|
161
|
+
"workflow:tools:task-generate-tdd"
|
|
162
|
+
],
|
|
163
|
+
"next_steps": ["workflow:tdd-verify", "workflow:status", "workflow:execute"],
|
|
164
|
+
"alternatives": ["workflow:plan"],
|
|
165
|
+
"prerequisites": []
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
# Execution commands
|
|
169
|
+
"workflow:execute": {
|
|
170
|
+
"prerequisites": ["workflow:plan", "workflow:tdd-plan"],
|
|
171
|
+
"related": ["workflow:status", "workflow:resume"],
|
|
172
|
+
"next_steps": ["workflow:review", "workflow:tdd-verify"]
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
# Verification commands
|
|
176
|
+
"workflow:action-plan-verify": {
|
|
177
|
+
"prerequisites": ["workflow:plan"],
|
|
178
|
+
"next_steps": ["workflow:execute"],
|
|
179
|
+
"related": ["workflow:status"]
|
|
180
|
+
},
|
|
181
|
+
"workflow:tdd-verify": {
|
|
182
|
+
"prerequisites": ["workflow:execute"],
|
|
183
|
+
"related": ["workflow:tools:tdd-coverage-analysis"]
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
# Session management
|
|
187
|
+
"workflow:session:start": {
|
|
188
|
+
"next_steps": ["workflow:plan", "workflow:execute"],
|
|
189
|
+
"related": ["workflow:session:list", "workflow:session:resume"]
|
|
190
|
+
},
|
|
191
|
+
"workflow:session:resume": {
|
|
192
|
+
"alternatives": ["workflow:resume"],
|
|
193
|
+
"related": ["workflow:session:list", "workflow:status"]
|
|
194
|
+
},
|
|
195
|
+
"workflow:resume": {
|
|
196
|
+
"alternatives": ["workflow:session:resume"],
|
|
197
|
+
"related": ["workflow:status"]
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
# Task management
|
|
201
|
+
"task:create": {
|
|
202
|
+
"next_steps": ["task:execute"],
|
|
203
|
+
"related": ["task:breakdown"]
|
|
204
|
+
},
|
|
205
|
+
"task:breakdown": {
|
|
206
|
+
"next_steps": ["task:execute"],
|
|
207
|
+
"related": ["task:create"]
|
|
208
|
+
},
|
|
209
|
+
"task:replan": {
|
|
210
|
+
"prerequisites": ["workflow:plan"],
|
|
211
|
+
"related": ["workflow:action-plan-verify"]
|
|
212
|
+
},
|
|
213
|
+
"task:execute": {
|
|
214
|
+
"prerequisites": ["task:create", "task:breakdown", "workflow:plan"],
|
|
215
|
+
"related": ["workflow:status"]
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
# Memory/Documentation
|
|
219
|
+
"memory:docs": {
|
|
220
|
+
"calls_internally": [
|
|
221
|
+
"workflow:session:start",
|
|
222
|
+
"workflow:tools:context-gather"
|
|
223
|
+
],
|
|
224
|
+
"next_steps": ["workflow:execute"]
|
|
225
|
+
},
|
|
226
|
+
"memory:skill-memory": {
|
|
227
|
+
"next_steps": ["workflow:plan", "cli:analyze"],
|
|
228
|
+
"related": ["memory:load-skill-memory"]
|
|
229
|
+
},
|
|
230
|
+
"memory:workflow-skill-memory": {
|
|
231
|
+
"related": ["memory:skill-memory"],
|
|
232
|
+
"next_steps": ["workflow:plan"]
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
# CLI modes
|
|
236
|
+
"cli:execute": {
|
|
237
|
+
"alternatives": ["cli:codex-execute"],
|
|
238
|
+
"related": ["cli:analyze", "cli:chat"]
|
|
239
|
+
},
|
|
240
|
+
"cli:analyze": {
|
|
241
|
+
"related": ["cli:chat", "cli:mode:code-analysis"],
|
|
242
|
+
"next_steps": ["cli:execute"]
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
# Brainstorming
|
|
246
|
+
"workflow:brainstorm:artifacts": {
|
|
247
|
+
"next_steps": ["workflow:brainstorm:synthesis", "workflow:plan"],
|
|
248
|
+
"related": ["workflow:brainstorm:auto-parallel"]
|
|
249
|
+
},
|
|
250
|
+
"workflow:brainstorm:synthesis": {
|
|
251
|
+
"prerequisites": ["workflow:brainstorm:artifacts"],
|
|
252
|
+
"next_steps": ["workflow:plan"]
|
|
253
|
+
},
|
|
254
|
+
"workflow:brainstorm:auto-parallel": {
|
|
255
|
+
"next_steps": ["workflow:brainstorm:synthesis", "workflow:plan"],
|
|
256
|
+
"related": ["workflow:brainstorm:artifacts"]
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
# Test workflows
|
|
260
|
+
"workflow:test-gen": {
|
|
261
|
+
"prerequisites": ["workflow:execute"],
|
|
262
|
+
"next_steps": ["workflow:test-cycle-execute"]
|
|
263
|
+
},
|
|
264
|
+
"workflow:test-fix-gen": {
|
|
265
|
+
"alternatives": ["workflow:test-gen"],
|
|
266
|
+
"next_steps": ["workflow:test-cycle-execute"]
|
|
267
|
+
},
|
|
268
|
+
"workflow:test-cycle-execute": {
|
|
269
|
+
"prerequisites": ["workflow:test-gen", "workflow:test-fix-gen"],
|
|
270
|
+
"related": ["workflow:tdd-verify"]
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
# UI Design workflows
|
|
274
|
+
"workflow:ui-design:explore-auto": {
|
|
275
|
+
"calls_internally": ["workflow:ui-design:capture", "workflow:ui-design:style-extract", "workflow:ui-design:layout-extract"],
|
|
276
|
+
"next_steps": ["workflow:ui-design:generate"]
|
|
277
|
+
},
|
|
278
|
+
"workflow:ui-design:imitate-auto": {
|
|
279
|
+
"calls_internally": ["workflow:ui-design:capture"],
|
|
280
|
+
"next_steps": ["workflow:ui-design:generate"]
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
# Lite workflows
|
|
284
|
+
"workflow:lite-plan": {
|
|
285
|
+
"calls_internally": ["workflow:lite-execute"],
|
|
286
|
+
"next_steps": ["workflow:lite-execute", "workflow:status"],
|
|
287
|
+
"alternatives": ["workflow:plan"],
|
|
288
|
+
"prerequisites": []
|
|
289
|
+
},
|
|
290
|
+
"workflow:lite-fix": {
|
|
291
|
+
"next_steps": ["workflow:lite-execute", "workflow:status"],
|
|
292
|
+
"alternatives": ["workflow:lite-plan"],
|
|
293
|
+
"related": ["workflow:test-cycle-execute"]
|
|
294
|
+
},
|
|
295
|
+
"workflow:lite-execute": {
|
|
296
|
+
"prerequisites": ["workflow:lite-plan", "workflow:lite-fix"],
|
|
297
|
+
"related": ["workflow:execute", "workflow:status"]
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
# Review cycle workflows
|
|
301
|
+
"workflow:review-module-cycle": {
|
|
302
|
+
"next_steps": ["workflow:review-fix"],
|
|
303
|
+
"related": ["workflow:review-session-cycle", "workflow:review"]
|
|
304
|
+
},
|
|
305
|
+
"workflow:review-session-cycle": {
|
|
306
|
+
"prerequisites": ["workflow:execute"],
|
|
307
|
+
"next_steps": ["workflow:review-fix"],
|
|
308
|
+
"related": ["workflow:review-module-cycle", "workflow:review"]
|
|
309
|
+
},
|
|
310
|
+
"workflow:review-fix": {
|
|
311
|
+
"prerequisites": ["workflow:review-module-cycle", "workflow:review-session-cycle"],
|
|
312
|
+
"related": ["workflow:test-cycle-execute"]
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
return relationships
|
|
317
|
+
|
|
318
|
+
def sync_reference_directory():
|
|
319
|
+
"""Sync reference directory with source directories."""
|
|
320
|
+
print("\n=== Syncing Reference Directory ===")
|
|
321
|
+
|
|
322
|
+
# Step 1: Delete all files in reference directory
|
|
323
|
+
if REFERENCE_DIR.exists():
|
|
324
|
+
print(f"Deleting existing reference directory: {REFERENCE_DIR}")
|
|
325
|
+
shutil.rmtree(REFERENCE_DIR)
|
|
326
|
+
|
|
327
|
+
# Step 2: Create reference directory structure
|
|
328
|
+
REFERENCE_DIR.mkdir(parents=True, exist_ok=True)
|
|
329
|
+
print(f"Created reference directory: {REFERENCE_DIR}")
|
|
330
|
+
|
|
331
|
+
# Step 3: Copy agents directory
|
|
332
|
+
agents_target = REFERENCE_DIR / "agents"
|
|
333
|
+
if AGENTS_DIR.exists():
|
|
334
|
+
print(f"Copying {AGENTS_DIR} -> {agents_target}")
|
|
335
|
+
shutil.copytree(AGENTS_DIR, agents_target)
|
|
336
|
+
agent_files = list(agents_target.rglob("*.md"))
|
|
337
|
+
print(f" Copied {len(agent_files)} agent files")
|
|
338
|
+
else:
|
|
339
|
+
print(f" WARNING: Source directory not found: {AGENTS_DIR}")
|
|
340
|
+
|
|
341
|
+
# Step 4: Copy commands directory
|
|
342
|
+
commands_target = REFERENCE_DIR / "commands"
|
|
343
|
+
if COMMANDS_DIR.exists():
|
|
344
|
+
print(f"Copying {COMMANDS_DIR} -> {commands_target}")
|
|
345
|
+
shutil.copytree(COMMANDS_DIR, commands_target)
|
|
346
|
+
command_files = list(commands_target.rglob("*.md"))
|
|
347
|
+
print(f" Copied {len(command_files)} command files")
|
|
348
|
+
else:
|
|
349
|
+
print(f" WARNING: Source directory not found: {COMMANDS_DIR}")
|
|
350
|
+
|
|
351
|
+
print("Reference directory sync completed\n")
|
|
352
|
+
|
|
353
|
+
def identify_essential_commands(all_commands: List[Dict]) -> List[Dict]:
|
|
354
|
+
"""Identify the most essential commands for beginners."""
|
|
355
|
+
# Essential command names (14 most important) - use full command paths
|
|
356
|
+
essential_names = [
|
|
357
|
+
"workflow:lite-plan",
|
|
358
|
+
"workflow:lite-fix",
|
|
359
|
+
"workflow:plan",
|
|
360
|
+
"workflow:execute",
|
|
361
|
+
"workflow:status",
|
|
362
|
+
"workflow:session:start",
|
|
363
|
+
"workflow:review-session-cycle",
|
|
364
|
+
"cli:analyze",
|
|
365
|
+
"cli:chat",
|
|
366
|
+
"memory:docs",
|
|
367
|
+
"workflow:brainstorm:artifacts",
|
|
368
|
+
"workflow:action-plan-verify",
|
|
369
|
+
"workflow:resume",
|
|
370
|
+
"version"
|
|
371
|
+
]
|
|
372
|
+
|
|
373
|
+
essential = []
|
|
374
|
+
for cmd in all_commands:
|
|
375
|
+
# Check command name without leading slash
|
|
376
|
+
cmd_name = cmd['command'].lstrip('/')
|
|
377
|
+
if cmd_name in essential_names:
|
|
378
|
+
essential.append(cmd)
|
|
379
|
+
|
|
380
|
+
# Sort by order in essential_names
|
|
381
|
+
essential.sort(key=lambda x: essential_names.index(x['command'].lstrip('/')))
|
|
382
|
+
|
|
383
|
+
return essential[:14] # Limit to 14
|
|
384
|
+
|
|
385
|
+
def main():
|
|
386
|
+
"""Main analysis function."""
|
|
387
|
+
import sys
|
|
388
|
+
import io
|
|
389
|
+
|
|
390
|
+
# Fix Windows console encoding
|
|
391
|
+
if sys.platform == 'win32':
|
|
392
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
393
|
+
|
|
394
|
+
print("=== Command Guide Index Rebuild ===\n")
|
|
395
|
+
|
|
396
|
+
# Step 1: Sync reference directory
|
|
397
|
+
sync_reference_directory()
|
|
398
|
+
|
|
399
|
+
# Step 2: Analyze command files
|
|
400
|
+
print("=== Analyzing Command Files ===")
|
|
401
|
+
|
|
402
|
+
# Find all command files
|
|
403
|
+
command_files = list(COMMANDS_DIR.rglob("*.md"))
|
|
404
|
+
print(f"Found {len(command_files)} command files")
|
|
405
|
+
|
|
406
|
+
# Analyze each command
|
|
407
|
+
all_commands = []
|
|
408
|
+
for cmd_file in sorted(command_files):
|
|
409
|
+
try:
|
|
410
|
+
metadata = analyze_command_file(cmd_file)
|
|
411
|
+
all_commands.append(metadata)
|
|
412
|
+
print(f" OK {metadata['command']}")
|
|
413
|
+
except Exception as e:
|
|
414
|
+
print(f" ERROR analyzing {cmd_file}: {e}")
|
|
415
|
+
|
|
416
|
+
print(f"\nAnalyzed {len(all_commands)} commands")
|
|
417
|
+
|
|
418
|
+
# Generate index files
|
|
419
|
+
INDEX_DIR.mkdir(parents=True, exist_ok=True)
|
|
420
|
+
|
|
421
|
+
# 1. all-commands.json
|
|
422
|
+
all_commands_path = INDEX_DIR / "all-commands.json"
|
|
423
|
+
with open(all_commands_path, 'w', encoding='utf-8') as f:
|
|
424
|
+
json.dump(all_commands, f, indent=2, ensure_ascii=False)
|
|
425
|
+
print(f"\nOK Generated {all_commands_path} ({os.path.getsize(all_commands_path)} bytes)")
|
|
426
|
+
|
|
427
|
+
# 2. by-category.json
|
|
428
|
+
by_category = defaultdict(lambda: defaultdict(list))
|
|
429
|
+
for cmd in all_commands:
|
|
430
|
+
cat = cmd['category']
|
|
431
|
+
subcat = cmd['subcategory'] or '_root'
|
|
432
|
+
by_category[cat][subcat].append(cmd)
|
|
433
|
+
|
|
434
|
+
by_category_path = INDEX_DIR / "by-category.json"
|
|
435
|
+
with open(by_category_path, 'w', encoding='utf-8') as f:
|
|
436
|
+
json.dump(dict(by_category), f, indent=2, ensure_ascii=False)
|
|
437
|
+
print(f"OK Generated {by_category_path} ({os.path.getsize(by_category_path)} bytes)")
|
|
438
|
+
|
|
439
|
+
# 3. by-use-case.json
|
|
440
|
+
by_use_case = defaultdict(list)
|
|
441
|
+
for cmd in all_commands:
|
|
442
|
+
by_use_case[cmd['usage_scenario']].append(cmd)
|
|
443
|
+
|
|
444
|
+
by_use_case_path = INDEX_DIR / "by-use-case.json"
|
|
445
|
+
with open(by_use_case_path, 'w', encoding='utf-8') as f:
|
|
446
|
+
json.dump(dict(by_use_case), f, indent=2, ensure_ascii=False)
|
|
447
|
+
print(f"OK Generated {by_use_case_path} ({os.path.getsize(by_use_case_path)} bytes)")
|
|
448
|
+
|
|
449
|
+
# 4. essential-commands.json
|
|
450
|
+
essential = identify_essential_commands(all_commands)
|
|
451
|
+
essential_path = INDEX_DIR / "essential-commands.json"
|
|
452
|
+
with open(essential_path, 'w', encoding='utf-8') as f:
|
|
453
|
+
json.dump(essential, f, indent=2, ensure_ascii=False)
|
|
454
|
+
print(f"OK Generated {essential_path} ({os.path.getsize(essential_path)} bytes)")
|
|
455
|
+
|
|
456
|
+
# 5. command-relationships.json
|
|
457
|
+
relationships = build_command_relationships()
|
|
458
|
+
relationships_path = INDEX_DIR / "command-relationships.json"
|
|
459
|
+
with open(relationships_path, 'w', encoding='utf-8') as f:
|
|
460
|
+
json.dump(relationships, f, indent=2, ensure_ascii=False)
|
|
461
|
+
print(f"OK Generated {relationships_path} ({os.path.getsize(relationships_path)} bytes)")
|
|
462
|
+
|
|
463
|
+
# Print summary statistics
|
|
464
|
+
print("\n=== Summary Statistics ===")
|
|
465
|
+
|
|
466
|
+
# Reference directory statistics
|
|
467
|
+
if REFERENCE_DIR.exists():
|
|
468
|
+
ref_agents = list((REFERENCE_DIR / "agents").rglob("*.md")) if (REFERENCE_DIR / "agents").exists() else []
|
|
469
|
+
ref_commands = list((REFERENCE_DIR / "commands").rglob("*.md")) if (REFERENCE_DIR / "commands").exists() else []
|
|
470
|
+
print(f"\nReference directory:")
|
|
471
|
+
print(f" Agents: {len(ref_agents)} files")
|
|
472
|
+
print(f" Commands: {len(ref_commands)} files")
|
|
473
|
+
print(f" Total: {len(ref_agents) + len(ref_commands)} files")
|
|
474
|
+
|
|
475
|
+
print(f"\nTotal commands indexed: {len(all_commands)}")
|
|
476
|
+
print(f"\nBy category:")
|
|
477
|
+
for cat in sorted(by_category.keys()):
|
|
478
|
+
total = sum(len(cmds) for cmds in by_category[cat].values())
|
|
479
|
+
print(f" {cat}: {total}")
|
|
480
|
+
for subcat in sorted(by_category[cat].keys()):
|
|
481
|
+
if subcat != '_root':
|
|
482
|
+
print(f" - {subcat}: {len(by_category[cat][subcat])}")
|
|
483
|
+
|
|
484
|
+
print(f"\nBy usage scenario:")
|
|
485
|
+
for scenario in sorted(by_use_case.keys()):
|
|
486
|
+
print(f" {scenario}: {len(by_use_case[scenario])}")
|
|
487
|
+
|
|
488
|
+
print(f"\nBy difficulty:")
|
|
489
|
+
difficulty_counts = defaultdict(int)
|
|
490
|
+
for cmd in all_commands:
|
|
491
|
+
difficulty_counts[cmd['difficulty']] += 1
|
|
492
|
+
for difficulty in ['Beginner', 'Intermediate', 'Advanced']:
|
|
493
|
+
print(f" {difficulty}: {difficulty_counts[difficulty]}")
|
|
494
|
+
|
|
495
|
+
print(f"\nEssential commands: {len(essential)}")
|
|
496
|
+
|
|
497
|
+
print("\n=== Index Rebuild Complete ===")
|
|
498
|
+
print(f"Reference: {REFERENCE_DIR}")
|
|
499
|
+
print(f"Index: {INDEX_DIR}")
|
|
500
|
+
|
|
501
|
+
if __name__ == '__main__':
|
|
502
|
+
main()
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
##############################################################################
|
|
4
|
+
# 命令索引更新脚本
|
|
5
|
+
# 用途: 维护者使用此脚本重新生成命令索引文件
|
|
6
|
+
# 使用: bash update-index.sh
|
|
7
|
+
##############################################################################
|
|
8
|
+
|
|
9
|
+
set -e # 遇到错误立即退出
|
|
10
|
+
|
|
11
|
+
# 颜色输出
|
|
12
|
+
RED='\033[0;31m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
NC='\033[0m' # No Color
|
|
16
|
+
|
|
17
|
+
# 获取脚本所在目录
|
|
18
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
19
|
+
SKILL_DIR="$(dirname "$SCRIPT_DIR")"
|
|
20
|
+
COMMANDS_DIR="$(dirname "$(dirname "$SKILL_DIR")")/commands"
|
|
21
|
+
INDEX_DIR="$SKILL_DIR/index"
|
|
22
|
+
|
|
23
|
+
echo -e "${GREEN}=== 命令索引更新工具 ===${NC}"
|
|
24
|
+
echo ""
|
|
25
|
+
echo "技能目录: $SKILL_DIR"
|
|
26
|
+
echo "命令目录: $COMMANDS_DIR"
|
|
27
|
+
echo "索引目录: $INDEX_DIR"
|
|
28
|
+
echo ""
|
|
29
|
+
|
|
30
|
+
# 检查命令目录是否存在
|
|
31
|
+
if [ ! -d "$COMMANDS_DIR" ]; then
|
|
32
|
+
echo -e "${RED}错误: 命令目录不存在: $COMMANDS_DIR${NC}"
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# 检查 gemini 是否可用
|
|
37
|
+
if ! command -v gemini &> /dev/null; then
|
|
38
|
+
echo -e "${RED}错误: gemini 命令未找到${NC}"
|
|
39
|
+
echo "请确保 gemini CLI 工具已安装并在 PATH 中"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# 统计命令文件数量
|
|
44
|
+
COMMAND_COUNT=$(find "$COMMANDS_DIR" -name "*.md" -type f | wc -l)
|
|
45
|
+
echo -e "${YELLOW}发现 $COMMAND_COUNT 个命令文件${NC}"
|
|
46
|
+
echo ""
|
|
47
|
+
|
|
48
|
+
# 备份现有索引(如果存在)
|
|
49
|
+
if [ -d "$INDEX_DIR" ] && [ "$(ls -A $INDEX_DIR)" ]; then
|
|
50
|
+
BACKUP_DIR="$INDEX_DIR/.backup-$(date +%Y%m%d-%H%M%S)"
|
|
51
|
+
echo -e "${YELLOW}备份现有索引到: $BACKUP_DIR${NC}"
|
|
52
|
+
mkdir -p "$BACKUP_DIR"
|
|
53
|
+
cp "$INDEX_DIR"/*.json "$BACKUP_DIR/" 2>/dev/null || true
|
|
54
|
+
echo ""
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# 确保索引目录存在
|
|
58
|
+
mkdir -p "$INDEX_DIR"
|
|
59
|
+
|
|
60
|
+
echo -e "${GREEN}开始生成索引...${NC}"
|
|
61
|
+
echo ""
|
|
62
|
+
|
|
63
|
+
# 使用 gemini 生成索引
|
|
64
|
+
cd "$COMMANDS_DIR" && gemini -p "
|
|
65
|
+
PURPOSE: 解析所有命令文件(约 $COMMAND_COUNT 个)并重新生成结构化命令索引
|
|
66
|
+
TASK:
|
|
67
|
+
• 扫描所有 .md 命令文件(包括子目录)
|
|
68
|
+
• 提取每个命令的元数据:name, description, arguments, category, subcategory
|
|
69
|
+
• 分析命令的使用场景和难度等级(初级/中级/高级)
|
|
70
|
+
• 识别命令之间的关联关系(通常一起使用的命令、前置依赖、后续推荐)
|
|
71
|
+
• 识别10-15个最常用的核心命令
|
|
72
|
+
• 按使用场景分类(planning/implementation/testing/documentation/session-management)
|
|
73
|
+
• 生成5个 JSON 索引文件到 $INDEX_DIR 目录
|
|
74
|
+
MODE: write
|
|
75
|
+
CONTEXT: @**/*.md | Memory: 命令分为4大类:workflow, cli, memory, task,需要理解每个命令的实际用途来生成准确的索引
|
|
76
|
+
EXPECTED: 生成5个规范的 JSON 文件:
|
|
77
|
+
1. all-commands.json - 包含所有命令的完整信息数组
|
|
78
|
+
2. by-category.json - 按 category/subcategory 层级组织
|
|
79
|
+
3. by-use-case.json - 按使用场景(planning/implementation/testing等)组织
|
|
80
|
+
4. essential-commands.json - 核心命令列表(10-15个)
|
|
81
|
+
5. command-relationships.json - 命令关联关系图(command -> related_commands数组)
|
|
82
|
+
每个命令对象包含:name, description, arguments, category, subcategory, usage_scenario, difficulty, file_path
|
|
83
|
+
RULES: 保持一致的数据结构,JSON格式严格遵循规范,确保所有命令都被包含 | write=CREATE
|
|
84
|
+
" -m gemini-2.5-flash --approval-mode yolo
|
|
85
|
+
|
|
86
|
+
# 检查生成结果
|
|
87
|
+
if [ $? -eq 0 ]; then
|
|
88
|
+
echo ""
|
|
89
|
+
echo -e "${GREEN}✓ 索引生成成功!${NC}"
|
|
90
|
+
echo ""
|
|
91
|
+
echo "生成的索引文件:"
|
|
92
|
+
ls -lh "$INDEX_DIR"/*.json
|
|
93
|
+
echo ""
|
|
94
|
+
|
|
95
|
+
# 验证文件
|
|
96
|
+
echo -e "${YELLOW}验证索引文件...${NC}"
|
|
97
|
+
REQUIRED_FILES=("all-commands.json" "by-category.json" "by-use-case.json" "essential-commands.json" "command-relationships.json")
|
|
98
|
+
ALL_EXIST=true
|
|
99
|
+
|
|
100
|
+
for file in "${REQUIRED_FILES[@]}"; do
|
|
101
|
+
if [ -f "$INDEX_DIR/$file" ]; then
|
|
102
|
+
echo -e "${GREEN}✓${NC} $file"
|
|
103
|
+
else
|
|
104
|
+
echo -e "${RED}✗${NC} $file (缺失)"
|
|
105
|
+
ALL_EXIST=false
|
|
106
|
+
fi
|
|
107
|
+
done
|
|
108
|
+
|
|
109
|
+
echo ""
|
|
110
|
+
|
|
111
|
+
if [ "$ALL_EXIST" = true ]; then
|
|
112
|
+
echo -e "${GREEN}=== 索引更新完成!===${NC}"
|
|
113
|
+
echo ""
|
|
114
|
+
echo "后续步骤:"
|
|
115
|
+
echo "1. 验证生成的索引内容是否正确"
|
|
116
|
+
echo "2. 提交更新: git add .claude/skills/command-guide/index/"
|
|
117
|
+
echo "3. 创建提交: git commit -m \"docs: 更新命令索引\""
|
|
118
|
+
echo "4. 推送更新: git push"
|
|
119
|
+
echo ""
|
|
120
|
+
echo "团队成员执行 'git pull' 后将自动获取最新索引"
|
|
121
|
+
else
|
|
122
|
+
echo -e "${RED}=== 索引更新不完整,请检查错误 ===${NC}"
|
|
123
|
+
exit 1
|
|
124
|
+
fi
|
|
125
|
+
else
|
|
126
|
+
echo ""
|
|
127
|
+
echo -e "${RED}✗ 索引生成失败${NC}"
|
|
128
|
+
echo "请检查 gemini 输出的错误信息"
|
|
129
|
+
exit 1
|
|
130
|
+
fi
|