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,662 @@
|
|
|
1
|
+
# 常见工作流模式
|
|
2
|
+
|
|
3
|
+
> 学习如何组合命令完成复杂任务,提升开发效率
|
|
4
|
+
|
|
5
|
+
## 🎯 什么是工作流?
|
|
6
|
+
|
|
7
|
+
工作流是**一系列命令的组合**,用于完成特定的开发目标。Claude DMS3 提供了多种工作流模式,覆盖从规划到测试的完整开发周期。
|
|
8
|
+
|
|
9
|
+
**核心概念**:
|
|
10
|
+
- **工作流(Workflow)**:一组相关任务的集合
|
|
11
|
+
- **任务(Task)**:独立的工作单元,有明确的输入和输出
|
|
12
|
+
- **Session**:工作流的执行实例,记录所有任务状态
|
|
13
|
+
- **上下文(Context)**:任务执行所需的代码、文档、配置等信息
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 💡 Pattern 0: 头脑风暴(从0到1的第一步)
|
|
18
|
+
|
|
19
|
+
**⚠️ 重要**:这是**从0到1开发的起点**!在开始编码之前,通过多角色头脑风暴明确需求、技术选型和架构决策。
|
|
20
|
+
|
|
21
|
+
**适用场景**:
|
|
22
|
+
- 全新项目启动,需求和技术方案不明确
|
|
23
|
+
- 重大功能开发,涉及多个技术领域和权衡
|
|
24
|
+
- 架构决策,需要多角色视角分析
|
|
25
|
+
|
|
26
|
+
**流程**:话题分析 → 角色选择 → 角色问答 → 冲突解决 → 生成指导文档
|
|
27
|
+
|
|
28
|
+
### 模式 A:交互式头脑风暴(推荐)
|
|
29
|
+
|
|
30
|
+
**特点**:通过问答交互,逐步明确需求和决策
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# 步骤 1:启动头脑风暴
|
|
34
|
+
/workflow:brainstorm:artifacts "
|
|
35
|
+
GOAL: 实现实时协作编辑平台
|
|
36
|
+
SCOPE: 支持100+用户同时在线,低延迟(<100ms),冲突自动解决
|
|
37
|
+
CONTEXT: MVP阶段,3个月上线,团队5人(2前端+2后端+1全栈)
|
|
38
|
+
" --count 3
|
|
39
|
+
|
|
40
|
+
# 系统输出 Phase 0:自动收集项目上下文
|
|
41
|
+
# ✅ 分析现有代码库结构
|
|
42
|
+
# ✅ 加载相关文档
|
|
43
|
+
# ✅ 识别技术栈和依赖
|
|
44
|
+
|
|
45
|
+
# 系统输出 Phase 1:意图分析(2-4个问题)
|
|
46
|
+
# 【问题1 - 核心挑战】实时协作的主要技术挑战?
|
|
47
|
+
# a) 实时数据同步
|
|
48
|
+
# b) 可扩展性架构
|
|
49
|
+
# c) 冲突解决机制
|
|
50
|
+
# 【问题2 - 优先级】MVP阶段最关注?
|
|
51
|
+
# a) 功能完整性
|
|
52
|
+
# b) 用户体验
|
|
53
|
+
# c) 系统稳定性
|
|
54
|
+
# 请回答 (格式: 1a 2c):
|
|
55
|
+
|
|
56
|
+
# 用户输入:1c 2b
|
|
57
|
+
|
|
58
|
+
# 系统输出 Phase 2:角色选择(推荐 count+2 个角色)
|
|
59
|
+
# 【角色选择】请选择 3 个角色参与头脑风暴
|
|
60
|
+
# a) system-architect (系统架构师) - 实时同步架构设计
|
|
61
|
+
# b) ui-designer (UI设计师) - 协作界面用户体验
|
|
62
|
+
# c) product-manager (产品经理) - 功能优先级决策
|
|
63
|
+
# d) data-architect (数据架构师) - 数据同步模型设计
|
|
64
|
+
# e) ux-expert (UX专家) - 多用户协作交互流程
|
|
65
|
+
# 请输入选择 (格式: 2acd 或 2a 2c 2d):
|
|
66
|
+
|
|
67
|
+
# 用户输入:2acd
|
|
68
|
+
|
|
69
|
+
# 系统输出 Phase 3:角色问题(每个角色 3-4 个问题)
|
|
70
|
+
# ===== system-architect 问题 =====
|
|
71
|
+
# 【问题1】100+ 用户实时状态同步方案?
|
|
72
|
+
# a) Event Sourcing - 完整事件历史,易于回溯
|
|
73
|
+
# b) 集中式状态管理 - 简单直接,适合MVP
|
|
74
|
+
# c) CRDT - 自动冲突解决,分布式友好
|
|
75
|
+
# 【问题2】低延迟通信协议选择?
|
|
76
|
+
# ...
|
|
77
|
+
# 请回答:
|
|
78
|
+
|
|
79
|
+
# 用户输入:1c 2a 3b 4c
|
|
80
|
+
|
|
81
|
+
# 系统输出 Phase 4:冲突检测和解决
|
|
82
|
+
# 【冲突1】CRDT 与 UI 回滚期望冲突
|
|
83
|
+
# Background: system-architect 选择 CRDT,但 ui-designer 期望回滚UI
|
|
84
|
+
# a) 采用 CRDT,显示合并状态
|
|
85
|
+
# b) 切换到 OT 算法支持回滚
|
|
86
|
+
# c) 混合方案:CRDT + 本地撤销栈
|
|
87
|
+
# ...
|
|
88
|
+
|
|
89
|
+
# 系统输出 Phase 5:生成指导文档
|
|
90
|
+
# ✅ 生成 guidance-specification.md
|
|
91
|
+
# ✅ 记录所有决策和理由
|
|
92
|
+
# ✅ 标注冲突解决方案
|
|
93
|
+
# 📁 文件位置:.workflow/WFS-realtime-collab/.brainstorming/guidance-specification.md
|
|
94
|
+
|
|
95
|
+
# 步骤 2:查看生成的指导文档
|
|
96
|
+
cat .workflow/WFS-*//.brainstorming/guidance-specification.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 模式 B:自动并行头脑风暴(快速)
|
|
100
|
+
|
|
101
|
+
**特点**:自动选择角色,并行执行,快速生成多角色分析
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# 步骤 1:一键启动并行头脑风暴
|
|
105
|
+
/workflow:brainstorm:auto-parallel "
|
|
106
|
+
GOAL: 实现支付处理模块
|
|
107
|
+
SCOPE: 支持微信/支付宝/银行卡,日交易10万笔,99.99%可用性
|
|
108
|
+
CONTEXT: 金融合规要求,PCI DSS认证,风控系统集成
|
|
109
|
+
" --count 4
|
|
110
|
+
|
|
111
|
+
# 系统输出:
|
|
112
|
+
# ✅ Phase 0: 收集项目上下文
|
|
113
|
+
# ✅ Phase 1-2: artifacts 交互式框架生成
|
|
114
|
+
# ⏳ Phase 3: 4个角色并行分析
|
|
115
|
+
# - system-architect → 分析中...
|
|
116
|
+
# - data-architect → 分析中...
|
|
117
|
+
# - product-manager → 分析中...
|
|
118
|
+
# - subject-matter-expert → 分析中...
|
|
119
|
+
# ✅ Phase 4: synthesis 综合分析
|
|
120
|
+
# 📁 输出文件:
|
|
121
|
+
# - .brainstorming/guidance-specification.md (框架)
|
|
122
|
+
# - system-architect/analysis.md
|
|
123
|
+
# - data-architect/analysis.md
|
|
124
|
+
# - product-manager/analysis.md
|
|
125
|
+
# - subject-matter-expert/analysis.md
|
|
126
|
+
# - synthesis/final-recommendations.md
|
|
127
|
+
|
|
128
|
+
# 步骤 2:查看综合建议
|
|
129
|
+
cat .workflow/WFS-*//.brainstorming/synthesis/final-recommendations.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 模式 C:单角色深度分析(特定领域)
|
|
133
|
+
|
|
134
|
+
**特点**:针对特定领域问题,调用单个角色深度分析
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# 系统架构分析
|
|
138
|
+
/workflow:brainstorm:system-architect "API 网关架构设计,支持10万QPS,微服务集成"
|
|
139
|
+
|
|
140
|
+
# UI 设计分析
|
|
141
|
+
/workflow:brainstorm:ui-designer "管理后台界面设计,复杂数据展示,操作效率优先"
|
|
142
|
+
|
|
143
|
+
# 数据架构分析
|
|
144
|
+
/workflow:brainstorm:data-architect "分布式数据存储方案,MySQL+Redis+ES 组合"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 关键点
|
|
148
|
+
|
|
149
|
+
1. **Phase 0 自动上下文收集**:
|
|
150
|
+
- 自动分析现有代码库、文档、技术栈
|
|
151
|
+
- 识别潜在冲突和集成点
|
|
152
|
+
- 为后续问题生成提供上下文
|
|
153
|
+
|
|
154
|
+
2. **动态问题生成**:
|
|
155
|
+
- 基于话题关键词和项目上下文生成问题
|
|
156
|
+
- 不使用预定义模板
|
|
157
|
+
- 问题直接针对你的具体场景
|
|
158
|
+
|
|
159
|
+
3. **智能角色推荐**:
|
|
160
|
+
- 基于话题分析推荐最相关的角色
|
|
161
|
+
- 推荐 count+2 个角色供选择
|
|
162
|
+
- 每个角色都有基于话题的推荐理由
|
|
163
|
+
|
|
164
|
+
4. **输出物**:
|
|
165
|
+
- `guidance-specification.md` - 确认的指导规范(决策、理由、集成点)
|
|
166
|
+
- `{role}/analysis.md` - 各角色详细分析(仅 auto-parallel 模式)
|
|
167
|
+
- `synthesis/final-recommendations.md` - 综合建议(仅 auto-parallel 模式)
|
|
168
|
+
|
|
169
|
+
5. **下一步**:
|
|
170
|
+
- 头脑风暴完成后,使用 `/workflow:plan` 基于指导文档生成实施计划
|
|
171
|
+
- 指导文档作为规划和实现的权威参考
|
|
172
|
+
|
|
173
|
+
### 使用场景对比
|
|
174
|
+
|
|
175
|
+
| 场景 | 推荐模式 | 原因 |
|
|
176
|
+
|------|---------|------|
|
|
177
|
+
| 全新项目启动 | 交互式 (artifacts) | 需要充分澄清需求和约束 |
|
|
178
|
+
| 重大架构决策 | 交互式 (artifacts) | 需要深入讨论权衡 |
|
|
179
|
+
| 快速原型验证 | 自动并行 (auto-parallel) | 快速获得多角色建议 |
|
|
180
|
+
| 特定技术问题 | 单角色 (specific role) | 专注某个领域深度分析 |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 📋 Pattern 1: 规划→执行(最常用)
|
|
185
|
+
|
|
186
|
+
**适用场景**:实现新功能、新模块
|
|
187
|
+
|
|
188
|
+
**流程**:规划 → 执行 → 查看状态
|
|
189
|
+
|
|
190
|
+
### 完整示例
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# 步骤 1:规划任务
|
|
194
|
+
/workflow:plan --agent "实现用户认证模块"
|
|
195
|
+
|
|
196
|
+
# 系统输出:
|
|
197
|
+
# ✅ 规划完成
|
|
198
|
+
# 📁 Session: WFS-20251106-123456
|
|
199
|
+
# 📋 生成 5 个任务
|
|
200
|
+
|
|
201
|
+
# 步骤 2:执行任务
|
|
202
|
+
/workflow:execute
|
|
203
|
+
|
|
204
|
+
# 系统输出:
|
|
205
|
+
# ⏳ 执行 task-001-user-model...
|
|
206
|
+
# ✅ task-001 完成
|
|
207
|
+
# ⏳ 执行 task-002-login-api...
|
|
208
|
+
# ...
|
|
209
|
+
|
|
210
|
+
# 步骤 3:查看状态
|
|
211
|
+
/workflow:status
|
|
212
|
+
|
|
213
|
+
# 系统输出:
|
|
214
|
+
# Session: WFS-20251106-123456
|
|
215
|
+
# Total: 5 | Completed: 5 | Pending: 0
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**关键点**:
|
|
219
|
+
- `--agent` 参数使用 AI 生成更详细的计划
|
|
220
|
+
- 系统自动发现最新 session,无需手动指定
|
|
221
|
+
- 所有任务按依赖顺序自动执行
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## 🧪 Pattern 2: TDD测试驱动开发
|
|
226
|
+
|
|
227
|
+
**适用场景**:需要高质量代码和测试覆盖
|
|
228
|
+
|
|
229
|
+
**流程**:TDD规划 → 执行(红→绿→重构)→ 验证
|
|
230
|
+
|
|
231
|
+
### 完整示例
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# 步骤 1:TDD 规划
|
|
235
|
+
/workflow:tdd-plan --agent "实现购物车功能"
|
|
236
|
+
|
|
237
|
+
# 系统输出:
|
|
238
|
+
# ✅ TDD 任务链生成
|
|
239
|
+
# 📋 Red-Green-Refactor 周期:
|
|
240
|
+
# - task-001-cart-tests (RED)
|
|
241
|
+
# - task-002-cart-implement (GREEN)
|
|
242
|
+
# - task-003-cart-refactor (REFACTOR)
|
|
243
|
+
|
|
244
|
+
# 步骤 2:执行 TDD 周期
|
|
245
|
+
/workflow:execute
|
|
246
|
+
|
|
247
|
+
# 系统会自动:
|
|
248
|
+
# 1. 生成失败的测试(RED)
|
|
249
|
+
# 2. 实现代码让测试通过(GREEN)
|
|
250
|
+
# 3. 重构代码(REFACTOR)
|
|
251
|
+
|
|
252
|
+
# 步骤 3:验证 TDD 合规性
|
|
253
|
+
/workflow:tdd-verify
|
|
254
|
+
|
|
255
|
+
# 系统输出:
|
|
256
|
+
# ✅ TDD 周期完整
|
|
257
|
+
# ✅ 测试覆盖率: 95%
|
|
258
|
+
# ✅ Red-Green-Refactor 合规
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**关键点**:
|
|
262
|
+
- TDD 模式自动生成测试优先的任务链
|
|
263
|
+
- 每个任务有依赖关系,确保正确的顺序
|
|
264
|
+
- 验证命令检查 TDD 合规性
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## 🔄 Pattern 3: 测试生成
|
|
269
|
+
|
|
270
|
+
**适用场景**:已有代码,需要生成测试
|
|
271
|
+
|
|
272
|
+
**流程**:分析代码 → 生成测试策略 → 执行测试生成
|
|
273
|
+
|
|
274
|
+
### 完整示例
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# 步骤 1:实现功能(已完成)
|
|
278
|
+
# 假设已经完成实现,session 为 WFS-20251106-123456
|
|
279
|
+
|
|
280
|
+
# 步骤 2:生成测试
|
|
281
|
+
/workflow:test-gen WFS-20251106-123456
|
|
282
|
+
|
|
283
|
+
# 系统输出:
|
|
284
|
+
# ✅ 分析实现代码
|
|
285
|
+
# ✅ 生成测试策略
|
|
286
|
+
# 📋 创建测试任务:WFS-test-20251106-789
|
|
287
|
+
|
|
288
|
+
# 步骤 3:执行测试生成
|
|
289
|
+
/workflow:test-cycle-execute --resume-session WFS-test-20251106-789
|
|
290
|
+
|
|
291
|
+
# 系统输出:
|
|
292
|
+
# ⏳ 生成测试用例...
|
|
293
|
+
# ⏳ 执行测试...
|
|
294
|
+
# ❌ 3 tests failed
|
|
295
|
+
# ⏳ 修复失败测试...
|
|
296
|
+
# ✅ All tests passed
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**关键点**:
|
|
300
|
+
- `test-gen` 分析现有代码生成测试
|
|
301
|
+
- `test-cycle-execute` 自动生成→测试→修复循环
|
|
302
|
+
- 最多迭代 N 次直到所有测试通过
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 🎨 Pattern 4: UI 设计工作流
|
|
307
|
+
|
|
308
|
+
**适用场景**:基于设计稿或现有网站实现 UI
|
|
309
|
+
|
|
310
|
+
**流程**:提取样式 → 提取布局 → 生成原型 → 更新
|
|
311
|
+
|
|
312
|
+
### 完整示例
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
# 步骤 1:提取设计样式
|
|
316
|
+
/workflow:ui-design:style-extract \
|
|
317
|
+
--images "design/*.png" \
|
|
318
|
+
--mode imitate \
|
|
319
|
+
--variants 3
|
|
320
|
+
|
|
321
|
+
# 系统输出:
|
|
322
|
+
# ✅ 提取颜色系统
|
|
323
|
+
# ✅ 提取字体系统
|
|
324
|
+
# ✅ 生成 3 个样式变体
|
|
325
|
+
|
|
326
|
+
# 步骤 2:提取页面布局
|
|
327
|
+
/workflow:ui-design:layout-extract \
|
|
328
|
+
--urls "https://example.com/dashboard" \
|
|
329
|
+
--device-type responsive
|
|
330
|
+
|
|
331
|
+
# 系统输出:
|
|
332
|
+
# ✅ 提取布局结构
|
|
333
|
+
# ✅ 识别组件层次
|
|
334
|
+
# ✅ 生成响应式布局
|
|
335
|
+
|
|
336
|
+
# 步骤 3:生成 UI 原型
|
|
337
|
+
/workflow:ui-design:generate \
|
|
338
|
+
--style-variants 2 \
|
|
339
|
+
--layout-variants 2
|
|
340
|
+
|
|
341
|
+
# 系统输出:
|
|
342
|
+
# ✅ 生成 4 个原型组合
|
|
343
|
+
# 📁 输出:.workflow/ui-design/prototypes/
|
|
344
|
+
|
|
345
|
+
# 步骤 4:更新最终版本
|
|
346
|
+
/workflow:ui-design:update \
|
|
347
|
+
--session ui-session-id \
|
|
348
|
+
--selected-prototypes "proto-1,proto-3"
|
|
349
|
+
|
|
350
|
+
# 系统输出:
|
|
351
|
+
# ✅ 应用最终设计系统
|
|
352
|
+
# ✅ 更新所有原型
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
**关键点**:
|
|
356
|
+
- 支持从图片或 URL 提取设计
|
|
357
|
+
- 可生成多个变体供选择
|
|
358
|
+
- 最终更新使用确定的设计系统
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## 🔍 Pattern 5: 代码分析→重构
|
|
363
|
+
|
|
364
|
+
**适用场景**:优化现有代码,提高可维护性
|
|
365
|
+
|
|
366
|
+
**流程**:分析现状 → 制定计划 → 执行重构 → 生成测试
|
|
367
|
+
|
|
368
|
+
### 完整示例
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
# 步骤 1:分析代码质量
|
|
372
|
+
/cli:analyze --tool gemini --cd src/auth \
|
|
373
|
+
"评估认证模块的代码质量、可维护性和潜在问题"
|
|
374
|
+
|
|
375
|
+
# 系统输出:
|
|
376
|
+
# ✅ 识别 3 个设计问题
|
|
377
|
+
# ✅ 发现 5 个性能瓶颈
|
|
378
|
+
# ✅ 建议 7 项改进
|
|
379
|
+
|
|
380
|
+
# 步骤 2:制定重构计划
|
|
381
|
+
/cli:mode:plan --tool gemini --cd src/auth \
|
|
382
|
+
"基于上述分析,制定认证模块重构方案"
|
|
383
|
+
|
|
384
|
+
# 系统输出:
|
|
385
|
+
# ✅ 重构计划生成
|
|
386
|
+
# 📋 包含 8 个重构任务
|
|
387
|
+
|
|
388
|
+
# 步骤 3:执行重构
|
|
389
|
+
/cli:execute --tool codex \
|
|
390
|
+
"按照重构计划执行认证模块重构"
|
|
391
|
+
|
|
392
|
+
# 步骤 4:生成测试确保正确性
|
|
393
|
+
/workflow:test-gen WFS-refactor-session-id
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
**关键点**:
|
|
397
|
+
- Gemini 用于分析和规划(理解)
|
|
398
|
+
- Codex 用于执行实现(重构)
|
|
399
|
+
- 重构后必须生成测试验证
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## 📚 Pattern 6: 文档生成
|
|
404
|
+
|
|
405
|
+
**适用场景**:为项目或模块生成文档
|
|
406
|
+
|
|
407
|
+
**流程**:分析代码 → 生成文档 → 更新索引
|
|
408
|
+
|
|
409
|
+
### 完整示例
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# 方式 1:为单个模块生成文档
|
|
413
|
+
/memory:docs src/auth --tool gemini --mode full
|
|
414
|
+
|
|
415
|
+
# 系统输出:
|
|
416
|
+
# ✅ 分析模块结构
|
|
417
|
+
# ✅ 生成 CLAUDE.md
|
|
418
|
+
# ✅ 生成 API 文档
|
|
419
|
+
# ✅ 生成使用指南
|
|
420
|
+
|
|
421
|
+
# 方式 2:更新所有模块文档
|
|
422
|
+
/memory:update-full --tool gemini
|
|
423
|
+
|
|
424
|
+
# 系统输出:
|
|
425
|
+
# ⏳ 按层级更新文档...
|
|
426
|
+
# ✅ Layer 3: 12 modules updated
|
|
427
|
+
# ✅ Layer 2: 5 modules updated
|
|
428
|
+
# ✅ Layer 1: 2 modules updated
|
|
429
|
+
|
|
430
|
+
# 方式 3:只更新修改过的模块
|
|
431
|
+
/memory:update-related --tool gemini
|
|
432
|
+
|
|
433
|
+
# 系统输出:
|
|
434
|
+
# ✅ 检测 git 变更
|
|
435
|
+
# ✅ 更新 3 个相关模块
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**关键点**:
|
|
439
|
+
- `--mode full` 生成完整文档
|
|
440
|
+
- `update-full` 适用于初始化或大规模更新
|
|
441
|
+
- `update-related` 适用于日常增量更新
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## 🔄 Pattern 7: 恢复和继续
|
|
446
|
+
|
|
447
|
+
**适用场景**:中断后继续工作,或修复失败的任务
|
|
448
|
+
|
|
449
|
+
**流程**:查看状态 → 恢复 session → 继续执行
|
|
450
|
+
|
|
451
|
+
### 完整示例
|
|
452
|
+
|
|
453
|
+
```bash
|
|
454
|
+
# 步骤 1:查看所有 session
|
|
455
|
+
/workflow:status
|
|
456
|
+
|
|
457
|
+
# 系统输出:
|
|
458
|
+
# Session: WFS-20251106-123456 (5/10 completed)
|
|
459
|
+
# Session: WFS-20251105-234567 (10/10 completed)
|
|
460
|
+
|
|
461
|
+
# 步骤 2:恢复特定 session
|
|
462
|
+
/workflow:resume WFS-20251106-123456
|
|
463
|
+
|
|
464
|
+
# 系统输出:
|
|
465
|
+
# ✅ Session 恢复
|
|
466
|
+
# 📋 5/10 tasks completed
|
|
467
|
+
# ⏳ 待执行: task-006, task-007, ...
|
|
468
|
+
|
|
469
|
+
# 步骤 3:继续执行
|
|
470
|
+
/workflow:execute --resume-session WFS-20251106-123456
|
|
471
|
+
|
|
472
|
+
# 系统输出:
|
|
473
|
+
# ⏳ 继续执行 task-006...
|
|
474
|
+
# ✅ task-006 完成
|
|
475
|
+
# ...
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
**关键点**:
|
|
479
|
+
- 所有 session 状态都被保存
|
|
480
|
+
- 可以随时恢复中断的工作流
|
|
481
|
+
- 恢复时自动分析进度和待办任务
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## 🎯 Pattern 8: 快速实现(Codex YOLO)
|
|
486
|
+
|
|
487
|
+
**适用场景**:快速实现简单功能,跳过规划
|
|
488
|
+
|
|
489
|
+
**流程**:直接执行 → 完成
|
|
490
|
+
|
|
491
|
+
### 完整示例
|
|
492
|
+
|
|
493
|
+
```bash
|
|
494
|
+
# 一键实现功能
|
|
495
|
+
/cli:codex-execute --verify-git \
|
|
496
|
+
"实现用户头像上传功能:
|
|
497
|
+
- 支持 jpg/png 格式
|
|
498
|
+
- 自动裁剪为 200x200
|
|
499
|
+
- 压缩到 100KB 以下
|
|
500
|
+
- 上传到 OSS
|
|
501
|
+
"
|
|
502
|
+
|
|
503
|
+
# 系统输出:
|
|
504
|
+
# ⏳ 分析需求...
|
|
505
|
+
# ⏳ 生成代码...
|
|
506
|
+
# ⏳ 集成现有代码...
|
|
507
|
+
# ✅ 功能实现完成
|
|
508
|
+
# 📁 修改文件:
|
|
509
|
+
# - src/api/upload.ts
|
|
510
|
+
# - src/utils/image.ts
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**关键点**:
|
|
514
|
+
- 适合简单、独立的功能
|
|
515
|
+
- `--verify-git` 确保 git 状态干净
|
|
516
|
+
- 自动分析需求并完整实现
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
## 🤝 Pattern 9: 多工具协作
|
|
521
|
+
|
|
522
|
+
**适用场景**:复杂任务需要多个 AI 工具配合
|
|
523
|
+
|
|
524
|
+
**流程**:Gemini 分析 → Gemini/Qwen 规划 → Codex 实现
|
|
525
|
+
|
|
526
|
+
### 完整示例
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
# 步骤 1:Gemini 深度分析
|
|
530
|
+
/cli:analyze --tool gemini \
|
|
531
|
+
"分析支付模块的安全性和性能问题"
|
|
532
|
+
|
|
533
|
+
# 步骤 2:多工具讨论方案
|
|
534
|
+
/cli:discuss-plan --topic "支付模块重构方案" --rounds 3
|
|
535
|
+
|
|
536
|
+
# 系统输出:
|
|
537
|
+
# Round 1:
|
|
538
|
+
# Gemini: 建议方案 A(关注安全)
|
|
539
|
+
# Codex: 建议方案 B(关注性能)
|
|
540
|
+
# Round 2:
|
|
541
|
+
# Gemini: 综合分析...
|
|
542
|
+
# Codex: 技术实现评估...
|
|
543
|
+
# Round 3:
|
|
544
|
+
# 最终方案: 方案 C(安全+性能)
|
|
545
|
+
|
|
546
|
+
# 步骤 3:Codex 执行实现
|
|
547
|
+
/cli:execute --tool codex "按照方案 C 重构支付模块"
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
**关键点**:
|
|
551
|
+
- `discuss-plan` 让多个 AI 讨论方案
|
|
552
|
+
- 每个工具贡献自己的专长
|
|
553
|
+
- 最终选择综合最优方案
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## 📊 工作流选择指南
|
|
558
|
+
|
|
559
|
+
**核心区分**:从0到1 vs 功能新增
|
|
560
|
+
- **从0到1**:全新项目、新产品、重大架构决策 → **必须头脑风暴**
|
|
561
|
+
- **功能新增**:已有项目中添加功能 → **可直接规划**
|
|
562
|
+
|
|
563
|
+
```mermaid
|
|
564
|
+
graph TD
|
|
565
|
+
A[我要做什么?] --> B{项目阶段?}
|
|
566
|
+
|
|
567
|
+
B -->|从0到1<br/>全新项目/产品| Z[💡头脑风暴<br/>必经阶段]
|
|
568
|
+
B -->|功能新增<br/>已有项目| C{任务类型?}
|
|
569
|
+
|
|
570
|
+
Z --> Z1[/workflow:brainstorm:artifacts<br/>或<br/>/workflow:brainstorm:auto-parallel]
|
|
571
|
+
Z1 --> Z2[⬇️ 生成指导文档]
|
|
572
|
+
Z2 --> C
|
|
573
|
+
|
|
574
|
+
C -->|新功能| D[规划→执行]
|
|
575
|
+
C -->|需要测试| E{代码是否存在?}
|
|
576
|
+
C -->|UI开发| F[UI设计工作流]
|
|
577
|
+
C -->|代码优化| G[分析→重构]
|
|
578
|
+
C -->|生成文档| H[文档生成]
|
|
579
|
+
C -->|快速实现| I[Codex YOLO]
|
|
580
|
+
|
|
581
|
+
E -->|不存在| J[TDD工作流]
|
|
582
|
+
E -->|已存在| K[测试生成]
|
|
583
|
+
|
|
584
|
+
D --> L[/workflow:plan<br/>↓<br/>/workflow:execute]
|
|
585
|
+
J --> M[/workflow:tdd-plan<br/>↓<br/>/workflow:execute]
|
|
586
|
+
K --> N[/workflow:test-gen<br/>↓<br/>/workflow:test-cycle-execute]
|
|
587
|
+
F --> O[/workflow:ui-design:*]
|
|
588
|
+
G --> P[/cli:analyze<br/>↓<br/>/cli:mode:plan<br/>↓<br/>/cli:execute]
|
|
589
|
+
H --> Q[/memory:docs]
|
|
590
|
+
I --> R[/cli:codex-execute]
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
**说明**:
|
|
594
|
+
- **从0到1场景**:创业项目、新产品线、系统重构 → 头脑风暴明确方向后再规划
|
|
595
|
+
- **功能新增场景**:现有系统添加模块、优化现有功能 → 直接进入规划或分析
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## 💡 最佳实践
|
|
600
|
+
|
|
601
|
+
### ✅ 推荐做法
|
|
602
|
+
|
|
603
|
+
1. **复杂任务使用完整工作流**
|
|
604
|
+
```bash
|
|
605
|
+
/workflow:plan → /workflow:execute → /workflow:test-gen
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
2. **简单任务使用 Codex YOLO**
|
|
609
|
+
```bash
|
|
610
|
+
/cli:codex-execute "快速实现xxx"
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
3. **重要代码使用 TDD**
|
|
614
|
+
```bash
|
|
615
|
+
/workflow:tdd-plan → /workflow:execute → /workflow:tdd-verify
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
4. **定期更新文档**
|
|
619
|
+
```bash
|
|
620
|
+
/memory:update-related # 每次提交前
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
5. **善用恢复功能**
|
|
624
|
+
```bash
|
|
625
|
+
/workflow:status → /workflow:resume
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
### ❌ 避免做法
|
|
631
|
+
|
|
632
|
+
1. **⚠️ 不要在从0到1场景跳过头脑风暴**
|
|
633
|
+
- ❌ 全新项目直接 `/workflow:plan`
|
|
634
|
+
- ✅ 先 `/workflow:brainstorm:artifacts` 明确方向再规划
|
|
635
|
+
|
|
636
|
+
2. **不要跳过规划直接执行复杂任务**
|
|
637
|
+
- ❌ 直接 `/cli:execute` 实现复杂功能
|
|
638
|
+
- ✅ 先 `/workflow:plan` 再 `/workflow:execute`
|
|
639
|
+
|
|
640
|
+
3. **不要忽略测试**
|
|
641
|
+
- ❌ 实现完成后不生成测试
|
|
642
|
+
- ✅ 使用 `/workflow:test-gen` 生成测试
|
|
643
|
+
|
|
644
|
+
4. **不要遗忘文档**
|
|
645
|
+
- ❌ 代码实现后忘记更新文档
|
|
646
|
+
- ✅ 使用 `/memory:update-related` 自动更新
|
|
647
|
+
|
|
648
|
+
---
|
|
649
|
+
|
|
650
|
+
## 🔗 相关资源
|
|
651
|
+
|
|
652
|
+
- **快速入门**:[Getting Started](getting-started.md) - 5分钟上手
|
|
653
|
+
- **CLI 工具**:[CLI Tools Guide](cli-tools-guide.md) - Gemini/Qwen/Codex 详解
|
|
654
|
+
- **UI设计工作流**:[UI Design Workflow Guide](ui-design-workflow-guide.md) - UI设计完整指南
|
|
655
|
+
- **问题排查**:[Troubleshooting](troubleshooting.md) - 常见问题解决
|
|
656
|
+
- **完整命令列表**:查看 `index/all-commands.json`
|
|
657
|
+
|
|
658
|
+
---
|
|
659
|
+
|
|
660
|
+
**最后更新**: 2025-11-06
|
|
661
|
+
|
|
662
|
+
记住:选择合适的工作流模式,事半功倍!不确定用哪个?使用 `ccw` 询问 Command Guide!
|