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,667 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'fs';
|
|
2
|
+
import { join, dirname } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = dirname(__filename);
|
|
7
|
+
|
|
8
|
+
// Bundled template paths
|
|
9
|
+
const UNIFIED_TEMPLATE = join(__dirname, '../templates/dashboard.html');
|
|
10
|
+
const JS_FILE = join(__dirname, '../templates/dashboard.js');
|
|
11
|
+
const CSS_FILE = join(__dirname, '../templates/dashboard.css');
|
|
12
|
+
const WORKFLOW_TEMPLATE = join(__dirname, '../templates/workflow-dashboard.html');
|
|
13
|
+
const REVIEW_TEMPLATE = join(__dirname, '../templates/review-cycle-dashboard.html');
|
|
14
|
+
|
|
15
|
+
const MODULE_FILES = [
|
|
16
|
+
'utils.js',
|
|
17
|
+
'state.js',
|
|
18
|
+
'api.js',
|
|
19
|
+
'components/theme.js',
|
|
20
|
+
'components/modals.js',
|
|
21
|
+
'components/navigation.js',
|
|
22
|
+
'components/sidebar.js',
|
|
23
|
+
'components/tabs-context.js',
|
|
24
|
+
'components/tabs-other.js',
|
|
25
|
+
'components/task-drawer-core.js',
|
|
26
|
+
'components/task-drawer-renderers.js',
|
|
27
|
+
'components/flowchart.js',
|
|
28
|
+
'views/home.js',
|
|
29
|
+
'views/project-overview.js',
|
|
30
|
+
'views/session-detail.js',
|
|
31
|
+
'views/review-session.js',
|
|
32
|
+
'views/lite-tasks.js',
|
|
33
|
+
'views/fix-session.js',
|
|
34
|
+
'main.js'
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Generate dashboard HTML from aggregated data
|
|
39
|
+
* Uses bundled templates from ccw package
|
|
40
|
+
* @param {Object} data - Aggregated dashboard data
|
|
41
|
+
* @returns {Promise<string>} - Generated HTML
|
|
42
|
+
*/
|
|
43
|
+
export async function generateDashboard(data) {
|
|
44
|
+
// Use new unified template (with sidebar layout)
|
|
45
|
+
if (existsSync(UNIFIED_TEMPLATE)) {
|
|
46
|
+
return generateFromUnifiedTemplate(data);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Fallback to legacy workflow template
|
|
50
|
+
if (existsSync(WORKFLOW_TEMPLATE)) {
|
|
51
|
+
return generateFromBundledTemplate(data, WORKFLOW_TEMPLATE);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Fallback to inline dashboard if templates missing
|
|
55
|
+
return generateInlineDashboard(data);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Generate dashboard using unified template (new sidebar layout)
|
|
60
|
+
* @param {Object} data - Dashboard data
|
|
61
|
+
* @returns {string} - Generated HTML
|
|
62
|
+
*/
|
|
63
|
+
function generateFromUnifiedTemplate(data) {
|
|
64
|
+
let html = readFileSync(UNIFIED_TEMPLATE, 'utf8');
|
|
65
|
+
|
|
66
|
+
// Read CSS file
|
|
67
|
+
let cssContent = existsSync(CSS_FILE) ? readFileSync(CSS_FILE, 'utf8') : '';
|
|
68
|
+
|
|
69
|
+
// Read JS content
|
|
70
|
+
let jsContent = '';
|
|
71
|
+
const moduleBase = join(__dirname, '../templates/dashboard-js');
|
|
72
|
+
|
|
73
|
+
if (existsSync(moduleBase)) {
|
|
74
|
+
jsContent = MODULE_FILES.map(file => {
|
|
75
|
+
const filePath = join(moduleBase, file);
|
|
76
|
+
return existsSync(filePath) ? readFileSync(filePath, 'utf8') : '';
|
|
77
|
+
}).join('\n\n');
|
|
78
|
+
} else if (existsSync(JS_FILE)) {
|
|
79
|
+
jsContent = readFileSync(JS_FILE, 'utf8');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Prepare complete workflow data
|
|
83
|
+
const workflowData = {
|
|
84
|
+
generatedAt: data.generatedAt || new Date().toISOString(),
|
|
85
|
+
activeSessions: data.activeSessions || [],
|
|
86
|
+
archivedSessions: data.archivedSessions || [],
|
|
87
|
+
liteTasks: data.liteTasks || { litePlan: [], liteFix: [] },
|
|
88
|
+
reviewData: data.reviewData || { dimensions: {} },
|
|
89
|
+
statistics: data.statistics || {
|
|
90
|
+
totalSessions: 0,
|
|
91
|
+
activeSessions: 0,
|
|
92
|
+
totalTasks: 0,
|
|
93
|
+
completedTasks: 0,
|
|
94
|
+
litePlanCount: 0,
|
|
95
|
+
liteFixCount: 0
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Get project path and recent paths
|
|
100
|
+
const projectPath = data.projectPath || process.cwd();
|
|
101
|
+
const recentPaths = data.recentPaths || [projectPath];
|
|
102
|
+
|
|
103
|
+
// Replace JS placeholders with actual data
|
|
104
|
+
jsContent = jsContent.replace('{{WORKFLOW_DATA}}', JSON.stringify(workflowData, null, 2));
|
|
105
|
+
jsContent = jsContent.replace(/\{\{PROJECT_PATH\}\}/g, projectPath.replace(/\\/g, '/'));
|
|
106
|
+
jsContent = jsContent.replace('{{RECENT_PATHS}}', JSON.stringify(recentPaths));
|
|
107
|
+
|
|
108
|
+
// Inject JS and CSS into HTML template
|
|
109
|
+
html = html.replace('{{JS_CONTENT}}', jsContent);
|
|
110
|
+
html = html.replace('{{CSS_CONTENT}}', cssContent);
|
|
111
|
+
|
|
112
|
+
// Also replace any remaining placeholders in HTML
|
|
113
|
+
html = html.replace(/\{\{PROJECT_PATH\}\}/g, projectPath.replace(/\\/g, '/'));
|
|
114
|
+
|
|
115
|
+
return html;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Generate dashboard using bundled template
|
|
120
|
+
* @param {Object} data - Dashboard data
|
|
121
|
+
* @param {string} templatePath - Path to workflow-dashboard.html
|
|
122
|
+
* @returns {string} - Generated HTML
|
|
123
|
+
*/
|
|
124
|
+
function generateFromBundledTemplate(data, templatePath) {
|
|
125
|
+
let html = readFileSync(templatePath, 'utf8');
|
|
126
|
+
|
|
127
|
+
// Prepare workflow data for injection
|
|
128
|
+
const workflowData = {
|
|
129
|
+
activeSessions: data.activeSessions,
|
|
130
|
+
archivedSessions: data.archivedSessions
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// Inject workflow data
|
|
134
|
+
html = html.replace('{{WORKFLOW_DATA}}', JSON.stringify(workflowData, null, 2));
|
|
135
|
+
|
|
136
|
+
// If we have review data, add a review tab
|
|
137
|
+
if (data.reviewData && data.reviewData.totalFindings > 0) {
|
|
138
|
+
html = injectReviewTab(html, data.reviewData);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return html;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Inject review tab into existing dashboard
|
|
146
|
+
* @param {string} html - Base dashboard HTML
|
|
147
|
+
* @param {Object} reviewData - Review data to display
|
|
148
|
+
* @returns {string} - Modified HTML with review tab
|
|
149
|
+
*/
|
|
150
|
+
function injectReviewTab(html, reviewData) {
|
|
151
|
+
// Add review tab button in header controls
|
|
152
|
+
const tabButtonHtml = `
|
|
153
|
+
<button class="btn" data-tab="reviews" id="reviewTabBtn">Reviews (${reviewData.totalFindings})</button>
|
|
154
|
+
`;
|
|
155
|
+
|
|
156
|
+
// Insert after filter-group
|
|
157
|
+
html = html.replace(
|
|
158
|
+
'</div>\n </div>\n </header>',
|
|
159
|
+
`</div>
|
|
160
|
+
<div class="filter-group" style="margin-left: auto;">
|
|
161
|
+
${tabButtonHtml}
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</header>`
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
// Add review section before closing container
|
|
168
|
+
const reviewSectionHtml = generateReviewSection(reviewData);
|
|
169
|
+
|
|
170
|
+
html = html.replace(
|
|
171
|
+
'</div>\n\n <button class="theme-toggle"',
|
|
172
|
+
`</div>
|
|
173
|
+
|
|
174
|
+
${reviewSectionHtml}
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<button class="theme-toggle"`
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
// Add review tab JavaScript
|
|
181
|
+
const reviewScript = generateReviewScript(reviewData);
|
|
182
|
+
html = html.replace('</script>', `\n${reviewScript}\n</script>`);
|
|
183
|
+
|
|
184
|
+
return html;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Generate review section HTML
|
|
189
|
+
* @param {Object} reviewData - Review data
|
|
190
|
+
* @returns {string} - HTML for review section
|
|
191
|
+
*/
|
|
192
|
+
function generateReviewSection(reviewData) {
|
|
193
|
+
const severityBars = Object.entries(reviewData.severityDistribution)
|
|
194
|
+
.map(([severity, count]) => {
|
|
195
|
+
const colors = {
|
|
196
|
+
critical: '#c53030',
|
|
197
|
+
high: '#f56565',
|
|
198
|
+
medium: '#ed8936',
|
|
199
|
+
low: '#48bb78'
|
|
200
|
+
};
|
|
201
|
+
const percent = reviewData.totalFindings > 0
|
|
202
|
+
? Math.round((count / reviewData.totalFindings) * 100)
|
|
203
|
+
: 0;
|
|
204
|
+
return `
|
|
205
|
+
<div class="severity-bar-item">
|
|
206
|
+
<span class="severity-label">${severity}</span>
|
|
207
|
+
<div class="severity-bar">
|
|
208
|
+
<div class="severity-fill" style="width: ${percent}%; background-color: ${colors[severity]}"></div>
|
|
209
|
+
</div>
|
|
210
|
+
<span class="severity-count">${count}</span>
|
|
211
|
+
</div>
|
|
212
|
+
`;
|
|
213
|
+
}).join('');
|
|
214
|
+
|
|
215
|
+
const dimensionCards = Object.entries(reviewData.dimensionSummary)
|
|
216
|
+
.map(([name, info]) => `
|
|
217
|
+
<div class="dimension-card">
|
|
218
|
+
<div class="dimension-name">${name}</div>
|
|
219
|
+
<div class="dimension-count">${info.count} findings</div>
|
|
220
|
+
</div>
|
|
221
|
+
`).join('');
|
|
222
|
+
|
|
223
|
+
return `
|
|
224
|
+
<div class="section" id="reviewSectionContainer" style="display: none;">
|
|
225
|
+
<div class="section-header">
|
|
226
|
+
<h2 class="section-title">Code Review Findings</h2>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<div class="review-stats">
|
|
230
|
+
<div class="stat-card">
|
|
231
|
+
<div class="stat-value" style="color: #c53030;">${reviewData.severityDistribution.critical}</div>
|
|
232
|
+
<div class="stat-label">Critical</div>
|
|
233
|
+
</div>
|
|
234
|
+
<div class="stat-card">
|
|
235
|
+
<div class="stat-value" style="color: #f56565;">${reviewData.severityDistribution.high}</div>
|
|
236
|
+
<div class="stat-label">High</div>
|
|
237
|
+
</div>
|
|
238
|
+
<div class="stat-card">
|
|
239
|
+
<div class="stat-value" style="color: #ed8936;">${reviewData.severityDistribution.medium}</div>
|
|
240
|
+
<div class="stat-label">Medium</div>
|
|
241
|
+
</div>
|
|
242
|
+
<div class="stat-card">
|
|
243
|
+
<div class="stat-value" style="color: #48bb78;">${reviewData.severityDistribution.low}</div>
|
|
244
|
+
<div class="stat-label">Low</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<div class="severity-distribution">
|
|
249
|
+
<h3 style="margin-bottom: 15px; color: var(--text-secondary);">Severity Distribution</h3>
|
|
250
|
+
${severityBars}
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<div class="dimensions-grid" style="margin-top: 30px;">
|
|
254
|
+
<h3 style="margin-bottom: 15px; color: var(--text-secondary);">By Dimension</h3>
|
|
255
|
+
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px;">
|
|
256
|
+
${dimensionCards}
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<style>
|
|
261
|
+
.review-stats {
|
|
262
|
+
display: grid;
|
|
263
|
+
grid-template-columns: repeat(4, 1fr);
|
|
264
|
+
gap: 20px;
|
|
265
|
+
margin-bottom: 30px;
|
|
266
|
+
}
|
|
267
|
+
.severity-distribution {
|
|
268
|
+
background: var(--bg-card);
|
|
269
|
+
padding: 20px;
|
|
270
|
+
border-radius: 8px;
|
|
271
|
+
box-shadow: var(--shadow);
|
|
272
|
+
}
|
|
273
|
+
.severity-bar-item {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: 10px;
|
|
277
|
+
margin-bottom: 10px;
|
|
278
|
+
}
|
|
279
|
+
.severity-label {
|
|
280
|
+
width: 80px;
|
|
281
|
+
text-transform: capitalize;
|
|
282
|
+
font-size: 0.9rem;
|
|
283
|
+
}
|
|
284
|
+
.severity-bar {
|
|
285
|
+
flex: 1;
|
|
286
|
+
height: 20px;
|
|
287
|
+
background: var(--bg-primary);
|
|
288
|
+
border-radius: 4px;
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
}
|
|
291
|
+
.severity-fill {
|
|
292
|
+
height: 100%;
|
|
293
|
+
transition: width 0.3s;
|
|
294
|
+
}
|
|
295
|
+
.severity-count {
|
|
296
|
+
width: 40px;
|
|
297
|
+
text-align: right;
|
|
298
|
+
font-weight: bold;
|
|
299
|
+
}
|
|
300
|
+
.dimension-card {
|
|
301
|
+
background: var(--bg-card);
|
|
302
|
+
padding: 15px;
|
|
303
|
+
border-radius: 8px;
|
|
304
|
+
box-shadow: var(--shadow);
|
|
305
|
+
}
|
|
306
|
+
.dimension-name {
|
|
307
|
+
font-weight: 600;
|
|
308
|
+
text-transform: capitalize;
|
|
309
|
+
margin-bottom: 5px;
|
|
310
|
+
}
|
|
311
|
+
.dimension-count {
|
|
312
|
+
color: var(--text-secondary);
|
|
313
|
+
font-size: 0.9rem;
|
|
314
|
+
}
|
|
315
|
+
@media (max-width: 768px) {
|
|
316
|
+
.review-stats {
|
|
317
|
+
grid-template-columns: repeat(2, 1fr);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
</style>
|
|
321
|
+
</div>
|
|
322
|
+
`;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Generate JavaScript for review tab functionality
|
|
327
|
+
* @param {Object} reviewData - Review data
|
|
328
|
+
* @returns {string} - JavaScript code
|
|
329
|
+
*/
|
|
330
|
+
function generateReviewScript(reviewData) {
|
|
331
|
+
return `
|
|
332
|
+
// Review tab functionality
|
|
333
|
+
const reviewTabBtn = document.getElementById('reviewTabBtn');
|
|
334
|
+
const reviewSection = document.getElementById('reviewSectionContainer');
|
|
335
|
+
const activeSectionContainer = document.getElementById('activeSectionContainer');
|
|
336
|
+
const archivedSectionContainer = document.getElementById('archivedSectionContainer');
|
|
337
|
+
|
|
338
|
+
if (reviewTabBtn) {
|
|
339
|
+
reviewTabBtn.addEventListener('click', () => {
|
|
340
|
+
const isActive = reviewTabBtn.classList.contains('active');
|
|
341
|
+
|
|
342
|
+
// Toggle review section
|
|
343
|
+
if (isActive) {
|
|
344
|
+
// Hide reviews, show workflow
|
|
345
|
+
reviewTabBtn.classList.remove('active');
|
|
346
|
+
reviewSection.style.display = 'none';
|
|
347
|
+
activeSectionContainer.style.display = 'block';
|
|
348
|
+
archivedSectionContainer.style.display = 'block';
|
|
349
|
+
} else {
|
|
350
|
+
// Show reviews, hide workflow
|
|
351
|
+
reviewTabBtn.classList.add('active');
|
|
352
|
+
reviewSection.style.display = 'block';
|
|
353
|
+
activeSectionContainer.style.display = 'none';
|
|
354
|
+
archivedSectionContainer.style.display = 'none';
|
|
355
|
+
|
|
356
|
+
// Reset filter buttons
|
|
357
|
+
document.querySelectorAll('[data-filter]').forEach(b => b.classList.remove('active'));
|
|
358
|
+
document.querySelector('[data-filter="all"]').classList.add('active');
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
`;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Generate inline dashboard HTML (fallback if bundled templates missing)
|
|
367
|
+
* @param {Object} data - Dashboard data
|
|
368
|
+
* @returns {string}
|
|
369
|
+
*/
|
|
370
|
+
function generateInlineDashboard(data) {
|
|
371
|
+
const stats = data.statistics;
|
|
372
|
+
const hasReviews = data.reviewData && data.reviewData.totalFindings > 0;
|
|
373
|
+
|
|
374
|
+
return `<!DOCTYPE html>
|
|
375
|
+
<html lang="en">
|
|
376
|
+
<head>
|
|
377
|
+
<meta charset="UTF-8">
|
|
378
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
379
|
+
<title>CCW Dashboard</title>
|
|
380
|
+
<style>
|
|
381
|
+
:root {
|
|
382
|
+
--bg-primary: #f5f7fa;
|
|
383
|
+
--bg-secondary: #ffffff;
|
|
384
|
+
--bg-card: #ffffff;
|
|
385
|
+
--text-primary: #1a202c;
|
|
386
|
+
--text-secondary: #718096;
|
|
387
|
+
--border-color: #e2e8f0;
|
|
388
|
+
--accent-color: #4299e1;
|
|
389
|
+
--success-color: #48bb78;
|
|
390
|
+
--warning-color: #ed8936;
|
|
391
|
+
--danger-color: #f56565;
|
|
392
|
+
--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
|
|
393
|
+
}
|
|
394
|
+
[data-theme="dark"] {
|
|
395
|
+
--bg-primary: #1a202c;
|
|
396
|
+
--bg-secondary: #2d3748;
|
|
397
|
+
--bg-card: #2d3748;
|
|
398
|
+
--text-primary: #f7fafc;
|
|
399
|
+
--text-secondary: #a0aec0;
|
|
400
|
+
--border-color: #4a5568;
|
|
401
|
+
}
|
|
402
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
403
|
+
body {
|
|
404
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
405
|
+
background: var(--bg-primary);
|
|
406
|
+
color: var(--text-primary);
|
|
407
|
+
line-height: 1.6;
|
|
408
|
+
}
|
|
409
|
+
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
|
|
410
|
+
header {
|
|
411
|
+
background: var(--bg-secondary);
|
|
412
|
+
padding: 20px;
|
|
413
|
+
border-radius: 8px;
|
|
414
|
+
box-shadow: var(--shadow);
|
|
415
|
+
margin-bottom: 30px;
|
|
416
|
+
}
|
|
417
|
+
h1 { font-size: 2rem; color: var(--accent-color); margin-bottom: 10px; }
|
|
418
|
+
.stats-grid {
|
|
419
|
+
display: grid;
|
|
420
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
421
|
+
gap: 20px;
|
|
422
|
+
margin-bottom: 30px;
|
|
423
|
+
}
|
|
424
|
+
.stat-card {
|
|
425
|
+
background: var(--bg-card);
|
|
426
|
+
padding: 20px;
|
|
427
|
+
border-radius: 8px;
|
|
428
|
+
box-shadow: var(--shadow);
|
|
429
|
+
}
|
|
430
|
+
.stat-value { font-size: 2rem; font-weight: bold; color: var(--accent-color); }
|
|
431
|
+
.stat-label { color: var(--text-secondary); font-size: 0.9rem; }
|
|
432
|
+
.section { margin-bottom: 40px; }
|
|
433
|
+
.section-title { font-size: 1.5rem; margin-bottom: 20px; }
|
|
434
|
+
.sessions-grid {
|
|
435
|
+
display: grid;
|
|
436
|
+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
437
|
+
gap: 20px;
|
|
438
|
+
}
|
|
439
|
+
.session-card {
|
|
440
|
+
background: var(--bg-card);
|
|
441
|
+
padding: 20px;
|
|
442
|
+
border-radius: 8px;
|
|
443
|
+
box-shadow: var(--shadow);
|
|
444
|
+
}
|
|
445
|
+
.session-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
|
|
446
|
+
.session-meta { color: var(--text-secondary); font-size: 0.9rem; }
|
|
447
|
+
.progress-bar {
|
|
448
|
+
width: 100%;
|
|
449
|
+
height: 8px;
|
|
450
|
+
background: var(--bg-primary);
|
|
451
|
+
border-radius: 4px;
|
|
452
|
+
margin: 15px 0;
|
|
453
|
+
overflow: hidden;
|
|
454
|
+
}
|
|
455
|
+
.progress-fill {
|
|
456
|
+
height: 100%;
|
|
457
|
+
background: linear-gradient(90deg, var(--accent-color), var(--success-color));
|
|
458
|
+
}
|
|
459
|
+
.task-item {
|
|
460
|
+
display: flex;
|
|
461
|
+
align-items: center;
|
|
462
|
+
padding: 10px;
|
|
463
|
+
margin-bottom: 8px;
|
|
464
|
+
background: var(--bg-primary);
|
|
465
|
+
border-radius: 6px;
|
|
466
|
+
border-left: 3px solid var(--border-color);
|
|
467
|
+
}
|
|
468
|
+
.task-item.completed { border-left-color: var(--success-color); opacity: 0.8; }
|
|
469
|
+
.task-item.in_progress { border-left-color: var(--warning-color); }
|
|
470
|
+
.task-title { flex: 1; font-size: 0.9rem; }
|
|
471
|
+
.task-id { font-size: 0.75rem; color: var(--text-secondary); font-family: monospace; }
|
|
472
|
+
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
|
|
473
|
+
.tabs { display: flex; gap: 10px; margin-top: 15px; }
|
|
474
|
+
.tab-btn {
|
|
475
|
+
padding: 10px 20px;
|
|
476
|
+
border: 1px solid var(--border-color);
|
|
477
|
+
border-radius: 6px;
|
|
478
|
+
background: var(--bg-card);
|
|
479
|
+
color: var(--text-primary);
|
|
480
|
+
cursor: pointer;
|
|
481
|
+
}
|
|
482
|
+
.tab-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }
|
|
483
|
+
.theme-toggle {
|
|
484
|
+
position: fixed;
|
|
485
|
+
bottom: 30px;
|
|
486
|
+
right: 30px;
|
|
487
|
+
width: 50px;
|
|
488
|
+
height: 50px;
|
|
489
|
+
border-radius: 50%;
|
|
490
|
+
background: var(--accent-color);
|
|
491
|
+
color: white;
|
|
492
|
+
border: none;
|
|
493
|
+
cursor: pointer;
|
|
494
|
+
font-size: 1.5rem;
|
|
495
|
+
box-shadow: var(--shadow);
|
|
496
|
+
}
|
|
497
|
+
</style>
|
|
498
|
+
</head>
|
|
499
|
+
<body>
|
|
500
|
+
<div class="container">
|
|
501
|
+
<header>
|
|
502
|
+
<h1>CCW Dashboard</h1>
|
|
503
|
+
<p style="color: var(--text-secondary);">Workflow Sessions and Reviews</p>
|
|
504
|
+
<div class="tabs">
|
|
505
|
+
<button class="tab-btn active" data-tab="workflow">Workflow</button>
|
|
506
|
+
${hasReviews ? '<button class="tab-btn" data-tab="reviews">Reviews</button>' : ''}
|
|
507
|
+
</div>
|
|
508
|
+
</header>
|
|
509
|
+
|
|
510
|
+
<div id="workflowTab">
|
|
511
|
+
<div class="stats-grid">
|
|
512
|
+
<div class="stat-card">
|
|
513
|
+
<div class="stat-value">${stats.totalSessions}</div>
|
|
514
|
+
<div class="stat-label">Total Sessions</div>
|
|
515
|
+
</div>
|
|
516
|
+
<div class="stat-card">
|
|
517
|
+
<div class="stat-value">${stats.activeSessions}</div>
|
|
518
|
+
<div class="stat-label">Active Sessions</div>
|
|
519
|
+
</div>
|
|
520
|
+
<div class="stat-card">
|
|
521
|
+
<div class="stat-value">${stats.totalTasks}</div>
|
|
522
|
+
<div class="stat-label">Total Tasks</div>
|
|
523
|
+
</div>
|
|
524
|
+
<div class="stat-card">
|
|
525
|
+
<div class="stat-value">${stats.completedTasks}</div>
|
|
526
|
+
<div class="stat-label">Completed Tasks</div>
|
|
527
|
+
</div>
|
|
528
|
+
</div>
|
|
529
|
+
|
|
530
|
+
<div class="section">
|
|
531
|
+
<h2 class="section-title">Active Sessions</h2>
|
|
532
|
+
<div class="sessions-grid" id="activeSessions">
|
|
533
|
+
${data.activeSessions.length === 0
|
|
534
|
+
? '<div class="empty-state">No active sessions</div>'
|
|
535
|
+
: data.activeSessions.map(s => renderSessionCard(s, true)).join('')}
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
|
|
539
|
+
<div class="section">
|
|
540
|
+
<h2 class="section-title">Archived Sessions</h2>
|
|
541
|
+
<div class="sessions-grid" id="archivedSessions">
|
|
542
|
+
${data.archivedSessions.length === 0
|
|
543
|
+
? '<div class="empty-state">No archived sessions</div>'
|
|
544
|
+
: data.archivedSessions.map(s => renderSessionCard(s, false)).join('')}
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
</div>
|
|
548
|
+
|
|
549
|
+
${hasReviews ? renderReviewTab(data.reviewData) : ''}
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
<button class="theme-toggle" onclick="toggleTheme()">🌙</button>
|
|
553
|
+
|
|
554
|
+
<script>
|
|
555
|
+
function toggleTheme() {
|
|
556
|
+
const html = document.documentElement;
|
|
557
|
+
const current = html.getAttribute('data-theme');
|
|
558
|
+
const next = current === 'dark' ? 'light' : 'dark';
|
|
559
|
+
html.setAttribute('data-theme', next);
|
|
560
|
+
localStorage.setItem('theme', next);
|
|
561
|
+
document.querySelector('.theme-toggle').textContent = next === 'dark' ? '☀️' : '🌙';
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// Initialize theme
|
|
565
|
+
const savedTheme = localStorage.getItem('theme') || 'light';
|
|
566
|
+
document.documentElement.setAttribute('data-theme', savedTheme);
|
|
567
|
+
document.querySelector('.theme-toggle').textContent = savedTheme === 'dark' ? '☀️' : '🌙';
|
|
568
|
+
|
|
569
|
+
// Tab switching
|
|
570
|
+
document.querySelectorAll('.tab-btn').forEach(btn => {
|
|
571
|
+
btn.addEventListener('click', () => {
|
|
572
|
+
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
|
|
573
|
+
btn.classList.add('active');
|
|
574
|
+
|
|
575
|
+
const tab = btn.dataset.tab;
|
|
576
|
+
document.getElementById('workflowTab').style.display = tab === 'workflow' ? 'block' : 'none';
|
|
577
|
+
const reviewTab = document.getElementById('reviewsTab');
|
|
578
|
+
if (reviewTab) reviewTab.style.display = tab === 'reviews' ? 'block' : 'none';
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
</script>
|
|
582
|
+
</body>
|
|
583
|
+
</html>`;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Render a session card
|
|
588
|
+
* @param {Object} session - Session data
|
|
589
|
+
* @param {boolean} isActive - Whether session is active
|
|
590
|
+
* @returns {string} - HTML string
|
|
591
|
+
*/
|
|
592
|
+
function renderSessionCard(session, isActive) {
|
|
593
|
+
const completedTasks = isActive
|
|
594
|
+
? session.tasks.filter(t => t.status === 'completed').length
|
|
595
|
+
: session.taskCount;
|
|
596
|
+
const totalTasks = isActive ? session.tasks.length : session.taskCount;
|
|
597
|
+
const progress = totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;
|
|
598
|
+
|
|
599
|
+
const tasksHtml = isActive && session.tasks.length > 0
|
|
600
|
+
? session.tasks.map(t => `
|
|
601
|
+
<div class="task-item ${t.status}">
|
|
602
|
+
<div class="task-title">${t.title}</div>
|
|
603
|
+
<span class="task-id">${t.task_id}</span>
|
|
604
|
+
</div>
|
|
605
|
+
`).join('')
|
|
606
|
+
: '';
|
|
607
|
+
|
|
608
|
+
return `
|
|
609
|
+
<div class="session-card">
|
|
610
|
+
<div class="session-title">${session.session_id}</div>
|
|
611
|
+
<div class="session-meta">
|
|
612
|
+
${session.project ? `<div>${session.project}</div>` : ''}
|
|
613
|
+
<div>${session.created_at} | ${completedTasks}/${totalTasks} tasks</div>
|
|
614
|
+
</div>
|
|
615
|
+
${totalTasks > 0 ? `
|
|
616
|
+
<div class="progress-bar">
|
|
617
|
+
<div class="progress-fill" style="width: ${progress}%"></div>
|
|
618
|
+
</div>
|
|
619
|
+
` : ''}
|
|
620
|
+
${tasksHtml}
|
|
621
|
+
</div>
|
|
622
|
+
`;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Render review tab HTML
|
|
627
|
+
* @param {Object} reviewData - Review data
|
|
628
|
+
* @returns {string} - HTML string
|
|
629
|
+
*/
|
|
630
|
+
function renderReviewTab(reviewData) {
|
|
631
|
+
const { severityDistribution, dimensionSummary } = reviewData;
|
|
632
|
+
|
|
633
|
+
return `
|
|
634
|
+
<div id="reviewsTab" style="display: none;">
|
|
635
|
+
<div class="stats-grid">
|
|
636
|
+
<div class="stat-card">
|
|
637
|
+
<div class="stat-value" style="color: #c53030;">${severityDistribution.critical}</div>
|
|
638
|
+
<div class="stat-label">Critical</div>
|
|
639
|
+
</div>
|
|
640
|
+
<div class="stat-card">
|
|
641
|
+
<div class="stat-value" style="color: #f56565;">${severityDistribution.high}</div>
|
|
642
|
+
<div class="stat-label">High</div>
|
|
643
|
+
</div>
|
|
644
|
+
<div class="stat-card">
|
|
645
|
+
<div class="stat-value" style="color: #ed8936;">${severityDistribution.medium}</div>
|
|
646
|
+
<div class="stat-label">Medium</div>
|
|
647
|
+
</div>
|
|
648
|
+
<div class="stat-card">
|
|
649
|
+
<div class="stat-value" style="color: #48bb78;">${severityDistribution.low}</div>
|
|
650
|
+
<div class="stat-label">Low</div>
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
|
|
654
|
+
<div class="section">
|
|
655
|
+
<h2 class="section-title">Findings by Dimension</h2>
|
|
656
|
+
<div class="sessions-grid">
|
|
657
|
+
${Object.entries(dimensionSummary).map(([name, info]) => `
|
|
658
|
+
<div class="session-card">
|
|
659
|
+
<div class="session-title" style="text-transform: capitalize;">${name}</div>
|
|
660
|
+
<div class="session-meta">${info.count} findings</div>
|
|
661
|
+
</div>
|
|
662
|
+
`).join('')}
|
|
663
|
+
</div>
|
|
664
|
+
</div>
|
|
665
|
+
</div>
|
|
666
|
+
`;
|
|
667
|
+
}
|