thanh-kit 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/.ck.json +60 -0
- package/templates/.ckignore +27 -0
- package/templates/.mcp.json.example +23 -0
- package/templates/agents/brainstormer.md +18 -2
- package/templates/agents/code-reviewer.md +122 -142
- package/templates/agents/code-simplifier.md +50 -100
- package/templates/agents/debugger.md +27 -11
- package/templates/agents/docs-manager.md +100 -38
- package/templates/agents/fullstack-developer.md +15 -3
- package/templates/agents/git-manager.md +11 -386
- package/templates/agents/journal-writer.md +13 -8
- package/templates/agents/mcp-manager.md +21 -6
- package/templates/agents/planner.md +24 -8
- package/templates/agents/project-manager.md +17 -121
- package/templates/agents/researcher.md +22 -7
- package/templates/agents/tester.md +23 -7
- package/templates/agents/ui-ux-designer.md +23 -14
- package/templates/{commands → command-archive}/ask.md +5 -5
- package/templates/{commands → command-archive}/ck-help.md +18 -2
- package/templates/command-archive/docs/init.md +38 -0
- package/templates/command-archive/docs/summarize.md +22 -0
- package/templates/command-archive/docs/update.md +76 -0
- package/templates/command-archive/journal.md +18 -0
- package/templates/{commands → command-archive}/kanban.md +5 -7
- package/templates/{commands → command-archive}/plan/archive.md +2 -2
- package/templates/command-archive/plan/red-team.md +200 -0
- package/templates/command-archive/plan/validate.md +188 -0
- package/templates/command-archive/preview.md +283 -0
- package/templates/command-archive/review/codebase/parallel.md +122 -0
- package/templates/{commands → command-archive}/test/ui.md +3 -3
- package/templates/{commands → command-archive}/use-mcp.md +6 -2
- package/templates/command-archive/worktree.md +109 -0
- package/templates/hooks/__tests__/ck-config-utils.test.cjs +557 -0
- package/templates/hooks/__tests__/descriptive-name.test.cjs +292 -0
- package/templates/hooks/__tests__/dev-rules-reminder.test.cjs +336 -0
- package/templates/hooks/__tests__/integration/path-resolution.test.cjs +319 -0
- package/templates/hooks/__tests__/privacy-block.test.cjs +273 -0
- package/templates/hooks/__tests__/session-init.test.cjs +308 -0
- package/templates/hooks/__tests__/skill-dedup.test.cjs +527 -0
- package/templates/hooks/__tests__/subagent-init.test.cjs +622 -0
- package/templates/hooks/__tests__/task-completed-handler.test.cjs +246 -0
- package/templates/hooks/__tests__/team-context-inject.test.cjs +804 -0
- package/templates/hooks/__tests__/teammate-idle-handler.test.cjs +254 -0
- package/templates/hooks/cook-after-plan-reminder.cjs +72 -0
- package/templates/hooks/descriptive-name.cjs +47 -0
- package/templates/hooks/dev-rules-reminder.cjs +37 -214
- package/templates/hooks/lib/__tests__/README.md +240 -0
- package/templates/hooks/lib/__tests__/ck-config-utils.test.cjs +613 -1
- package/templates/hooks/lib/__tests__/context-builder.test.cjs +468 -0
- package/templates/hooks/lib/__tests__/project-detector.test.cjs +754 -0
- package/templates/hooks/lib/__tests__/statusline-integration.test.cjs +678 -0
- package/templates/hooks/lib/__tests__/statusline.test.cjs +689 -0
- package/templates/hooks/lib/ck-config-utils.cjs +146 -21
- package/templates/hooks/lib/colors.cjs +95 -0
- package/templates/hooks/lib/config-counter.cjs +103 -0
- package/templates/hooks/lib/context-builder.cjs +616 -0
- package/templates/hooks/lib/git-info-cache.cjs +143 -0
- package/templates/hooks/lib/hook-logger.cjs +92 -0
- package/templates/hooks/lib/privacy-checker.cjs +297 -0
- package/templates/hooks/lib/project-detector.cjs +474 -0
- package/templates/hooks/lib/scout-checker.cjs +263 -0
- package/templates/hooks/lib/transcript-parser.cjs +181 -0
- package/templates/hooks/notifications/discord_notify.sh +17 -4
- package/templates/hooks/notifications/docs/discord-hook-setup.md +26 -10
- package/templates/hooks/notifications/docs/telegram-hook-setup.md +24 -6
- package/templates/hooks/notifications/notify.cjs +0 -0
- package/templates/hooks/notifications/send-discord.sh +0 -0
- package/templates/hooks/notifications/telegram_notify.sh +17 -4
- package/templates/hooks/post-edit-simplify-reminder.cjs +156 -0
- package/templates/hooks/privacy-block.cjs +97 -188
- package/templates/hooks/scout-block/broad-pattern-detector.cjs +4 -6
- package/templates/hooks/scout-block/error-formatter.cjs +0 -0
- package/templates/hooks/scout-block/path-extractor.cjs +102 -13
- package/templates/hooks/scout-block/pattern-matcher.cjs +16 -1
- package/templates/hooks/scout-block/tests/{test-broad-pattern-detector.js → test-broad-pattern-detector.cjs} +1 -61
- package/templates/hooks/scout-block/tests/{test-build-command-allowlist.js → test-build-command-allowlist.cjs} +1 -1
- package/templates/hooks/scout-block/tests/{test-error-formatter.js → test-error-formatter.cjs} +1 -1
- package/templates/hooks/scout-block/tests/{test-full-flow-edge-cases.js → test-full-flow-edge-cases.cjs} +1 -1
- package/templates/hooks/scout-block/tests/{test-monorepo-scenarios.js → test-monorepo-scenarios.cjs} +1 -1
- package/templates/hooks/scout-block/tests/{test-path-extractor.js → test-path-extractor.cjs} +1 -1
- package/templates/hooks/scout-block/tests/{test-pattern-matcher.js → test-pattern-matcher.cjs} +1 -1
- package/templates/hooks/scout-block.cjs +100 -87
- package/templates/hooks/session-init.cjs +197 -330
- package/templates/hooks/skill-dedup.cjs +268 -0
- package/templates/hooks/subagent-init.cjs +75 -22
- package/templates/hooks/task-completed-handler.cjs +118 -0
- package/templates/hooks/team-context-inject.cjs +176 -0
- package/templates/hooks/teammate-idle-handler.cjs +121 -0
- package/templates/hooks/tests/scout-block/broad-pattern-detector.test.cjs +231 -0
- package/templates/hooks/tests/scout-block/fixtures/ckignore-custom.txt +6 -0
- package/templates/hooks/tests/scout-block/fixtures/ckignore-default.txt +13 -0
- package/templates/hooks/tests/scout-block/fixtures/ckignore-negation.txt +8 -0
- package/templates/hooks/tests/scout-block/path-extractor.test.cjs +527 -0
- package/templates/hooks/tests/scout-block/pattern-matcher.test.cjs +293 -0
- package/templates/hooks/tests/scout-block/scout-checker.test.cjs +741 -0
- package/templates/hooks/tests/{test-ckignore.js → test-ckignore.cjs} +0 -0
- package/templates/hooks/tests/{test-modularization-hook.js → test-modularization-hook.cjs} +0 -0
- package/templates/hooks/tests/{test-privacy-block.js → test-privacy-block.cjs} +1 -1
- package/templates/hooks/tests/test-scout-block.cjs +315 -0
- package/templates/hooks/usage-context-awareness.cjs +179 -0
- package/templates/metadata.json +104 -0
- package/templates/{workflows → rules}/development-rules.md +12 -53
- package/templates/rules/orchestration-protocol.md +43 -0
- package/templates/{workflows → rules}/primary-workflow.md +16 -4
- package/templates/rules/team-coordination-rules.md +90 -0
- package/templates/schemas/ck-config.schema.json +381 -0
- package/templates/scripts/README.md +94 -198
- package/templates/scripts/ck-help.py +19 -855
- package/templates/scripts/commands_data.yaml +3 -621
- package/templates/scripts/fix-shebang-permissions.sh +50 -0
- package/templates/scripts/generate_catalogs.py +37 -8
- package/templates/scripts/resolve_env.py +0 -0
- package/templates/scripts/scan_commands.py +14 -96
- package/templates/scripts/scan_skills.py +59 -19
- package/templates/scripts/set-active-plan.cjs +8 -3
- package/templates/scripts/skills_data.yaml +2 -596
- package/templates/scripts/test-ck-help.py +15 -0
- package/templates/scripts/test_ck_help.py +139 -0
- package/templates/scripts/test_ck_help_integration.py +72 -0
- package/templates/scripts/validate-docs.cjs +342 -0
- package/templates/scripts/win_compat.py +0 -0
- package/templates/scripts/worktree.cjs +4 -652
- package/templates/scripts/worktree.test.cjs +5 -330
- package/templates/settings.json +104 -239
- package/templates/skills/README.md +95 -255
- package/templates/skills/THIRD_PARTY_NOTICES.md +405 -0
- package/templates/skills/agent-browser/SKILL.md +294 -0
- package/templates/skills/agent-browser/references/.gitkeep +0 -0
- package/templates/skills/agent-browser/references/agent-browser-vs-chrome-devtools.md +112 -0
- package/templates/skills/agent-browser/references/browserbase-cloud-setup.md +161 -0
- package/templates/skills/ai-artist/SKILL.md +103 -56
- package/templates/skills/ai-artist/data/awesome-prompts.csv +3592 -0
- package/templates/skills/ai-artist/data/lighting.csv +19 -0
- package/templates/skills/ai-artist/data/nano-banana-templates.csv +17 -0
- package/templates/skills/ai-artist/data/platforms.csv +11 -0
- package/templates/skills/ai-artist/data/styles.csv +26 -0
- package/templates/skills/ai-artist/data/techniques.csv +19 -0
- package/templates/skills/ai-artist/data/use-cases.csv +16 -0
- package/templates/skills/ai-artist/references/awesome-nano-banana-pro-prompts.md +8575 -0
- package/templates/skills/ai-artist/references/nano-banana.md +78 -1
- package/templates/skills/ai-artist/references/validation-workflow.md +117 -0
- package/templates/skills/ai-artist/scripts/core.py +197 -0
- package/templates/skills/ai-artist/scripts/extract_prompts.py +102 -0
- package/templates/skills/ai-artist/scripts/generate.py +370 -0
- package/templates/skills/ai-artist/scripts/search.py +147 -0
- package/templates/skills/ai-multimodal/SKILL.md +4 -3
- package/templates/skills/ai-multimodal/scripts/check_setup.py +12 -2
- package/templates/skills/ai-multimodal/scripts/document_converter.py +0 -0
- package/templates/skills/ai-multimodal/scripts/gemini_batch_process.py +3 -2
- package/templates/skills/ai-multimodal/scripts/media_optimizer.py +0 -0
- package/templates/skills/ask/SKILL.md +58 -0
- package/templates/skills/backend-development/SKILL.md +3 -2
- package/templates/skills/better-auth/SKILL.md +3 -2
- package/templates/skills/better-auth/scripts/better_auth_init.py +3 -3
- package/templates/skills/bootstrap/SKILL.md +101 -0
- package/templates/skills/bootstrap/references/shared-phases.md +59 -0
- package/templates/skills/bootstrap/references/workflow-auto.md +52 -0
- package/templates/skills/bootstrap/references/workflow-fast.md +50 -0
- package/templates/skills/bootstrap/references/workflow-full.md +60 -0
- package/templates/skills/bootstrap/references/workflow-parallel.md +59 -0
- package/templates/{commands/brainstorm.md → skills/brainstorm/SKILL.md} +21 -18
- package/templates/skills/chrome-devtools/SKILL.md +221 -68
- package/templates/skills/chrome-devtools/scripts/README.md +18 -0
- package/templates/skills/chrome-devtools/scripts/__tests__/error-handling.test.js +102 -0
- package/templates/skills/chrome-devtools/scripts/aria-snapshot.js +2 -1
- package/templates/skills/chrome-devtools/scripts/click.js +2 -1
- package/templates/skills/chrome-devtools/scripts/connect-chrome.js +146 -0
- package/templates/skills/chrome-devtools/scripts/console.js +3 -1
- package/templates/skills/chrome-devtools/scripts/evaluate.js +6 -3
- package/templates/skills/chrome-devtools/scripts/fill.js +2 -1
- package/templates/skills/chrome-devtools/scripts/import-cookies.js +205 -0
- package/templates/skills/chrome-devtools/scripts/inject-auth.js +2 -1
- package/templates/skills/chrome-devtools/scripts/install-deps.sh +0 -0
- package/templates/skills/chrome-devtools/scripts/install.sh +0 -0
- package/templates/skills/chrome-devtools/scripts/lib/browser.js +60 -4
- package/templates/skills/chrome-devtools/scripts/navigate.js +86 -2
- package/templates/skills/chrome-devtools/scripts/network.js +3 -1
- package/templates/skills/chrome-devtools/scripts/performance.js +3 -1
- package/templates/skills/chrome-devtools/scripts/screenshot.js +2 -1
- package/templates/skills/chrome-devtools/scripts/select-ref.js +2 -1
- package/templates/skills/chrome-devtools/scripts/snapshot.js +2 -1
- package/templates/skills/chrome-devtools/scripts/ws-debug.js +44 -0
- package/templates/skills/chrome-devtools/scripts/ws-full-debug.js +107 -0
- package/templates/skills/ck-help/SKILL.md +102 -0
- package/templates/skills/ck-help/scripts/ck-help.py +1321 -0
- package/templates/skills/ck-help/scripts/commands_data.yaml +3 -0
- package/templates/skills/ck-help/scripts/skills_data.yaml +593 -0
- package/templates/skills/code-review/SKILL.md +97 -93
- package/templates/skills/code-review/references/code-review-reception.md +113 -209
- package/templates/skills/code-review/references/codebase-scan-workflow.md +29 -0
- package/templates/skills/code-review/references/edge-case-scouting.md +119 -0
- package/templates/skills/code-review/references/parallel-review-workflow.md +69 -0
- package/templates/skills/code-review/references/requesting-code-review.md +115 -104
- package/templates/skills/code-review/references/task-management-reviews.md +140 -0
- package/templates/skills/code-review/references/verification-before-completion.md +138 -138
- package/templates/skills/coding-level/SKILL.md +56 -0
- package/templates/skills/common/README.md +120 -0
- package/templates/skills/common/api_key_helper.py +411 -0
- package/templates/skills/common/api_key_rotator.py +248 -0
- package/templates/skills/context-engineering/SKILL.md +108 -0
- package/templates/skills/context-engineering/references/context-compression.md +84 -0
- package/templates/skills/context-engineering/references/context-degradation.md +93 -0
- package/templates/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/templates/skills/context-engineering/references/context-optimization.md +82 -0
- package/templates/skills/context-engineering/references/evaluation.md +89 -0
- package/templates/skills/context-engineering/references/memory-systems.md +88 -0
- package/templates/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/templates/skills/context-engineering/references/project-development.md +97 -0
- package/templates/skills/context-engineering/references/runtime-awareness.md +202 -0
- package/templates/skills/context-engineering/references/tool-design.md +86 -0
- package/templates/skills/context-engineering/scripts/compression_evaluator.py +349 -0
- package/templates/skills/context-engineering/scripts/context_analyzer.py +317 -0
- package/templates/skills/context-engineering/scripts/tests/test_edge_cases.py +246 -0
- package/templates/skills/cook/README.md +86 -0
- package/templates/skills/cook/SKILL.md +113 -0
- package/templates/skills/cook/references/intent-detection.md +101 -0
- package/templates/skills/cook/references/review-cycle.md +75 -0
- package/templates/skills/cook/references/subagent-patterns.md +75 -0
- package/templates/skills/cook/references/workflow-steps.md +172 -0
- package/templates/skills/copywriting/SKILL.md +94 -0
- package/templates/skills/copywriting/references/copy-formulas.md +150 -0
- package/templates/skills/copywriting/references/cta-patterns.md +168 -0
- package/templates/skills/copywriting/references/email-copy.md +193 -0
- package/templates/skills/copywriting/references/headline-templates.md +140 -0
- package/templates/skills/copywriting/references/landing-page-copy.md +175 -0
- package/templates/skills/copywriting/references/power-words.md +189 -0
- package/templates/skills/copywriting/references/social-media-copy.md +222 -0
- package/templates/skills/copywriting/references/workflow-cro.md +83 -0
- package/templates/skills/copywriting/references/workflow-enhance.md +32 -0
- package/templates/skills/copywriting/references/workflow-fast.md +29 -0
- package/templates/skills/copywriting/references/workflow-good.md +39 -0
- package/templates/skills/copywriting/references/writing-styles.md +247 -0
- package/templates/skills/copywriting/scripts/extract-writing-styles.py +308 -0
- package/templates/skills/copywriting/templates/copy-brief.md +49 -0
- package/templates/skills/databases/SKILL.md +7 -155
- package/templates/skills/databases/analytics.md +198 -0
- package/templates/skills/databases/db-design.md +188 -0
- package/templates/skills/databases/incremental-etl.md +213 -0
- package/templates/skills/databases/scripts/db_backup.py +0 -0
- package/templates/skills/databases/scripts/db_migrate.py +3 -2
- package/templates/skills/databases/scripts/db_performance_check.py +3 -2
- package/templates/skills/databases/stacks/bigquery.md +231 -0
- package/templates/skills/databases/stacks/d1_cloudflare.md +137 -0
- package/templates/skills/databases/stacks/mysql.md +216 -0
- package/templates/skills/databases/stacks/postgres.md +235 -0
- package/templates/skills/databases/stacks/sqlite.md +244 -0
- package/templates/skills/databases/transactional.md +176 -0
- package/templates/skills/debug/SKILL.md +121 -0
- package/templates/skills/debug/references/frontend-verification.md +103 -0
- package/templates/skills/debug/references/investigation-methodology.md +101 -0
- package/templates/skills/debug/references/log-and-ci-analysis.md +97 -0
- package/templates/skills/debug/references/performance-diagnostics.md +113 -0
- package/templates/skills/debug/references/reporting-standards.md +122 -0
- package/templates/skills/debug/references/task-management-debugging.md +155 -0
- package/templates/skills/devops/SKILL.md +65 -253
- package/templates/skills/devops/references/kubernetes-basics.md +99 -0
- package/templates/skills/devops/references/kubernetes-helm-advanced.md +75 -0
- package/templates/skills/devops/references/kubernetes-helm.md +81 -0
- package/templates/skills/devops/references/kubernetes-kubectl.md +74 -0
- package/templates/skills/devops/references/kubernetes-security-advanced.md +98 -0
- package/templates/skills/devops/references/kubernetes-security.md +95 -0
- package/templates/skills/devops/references/kubernetes-troubleshooting-advanced.md +74 -0
- package/templates/skills/devops/references/kubernetes-troubleshooting.md +49 -0
- package/templates/skills/devops/references/kubernetes-workflows-advanced.md +75 -0
- package/templates/skills/devops/references/kubernetes-workflows.md +78 -0
- package/templates/skills/devops/scripts/cloudflare_deploy.py +0 -0
- package/templates/skills/devops/scripts/docker_optimize.py +3 -2
- package/templates/skills/docs/SKILL.md +55 -0
- package/templates/skills/docs/references/init-workflow.md +32 -0
- package/templates/skills/docs/references/summarize-workflow.md +18 -0
- package/templates/skills/docs/references/update-workflow.md +59 -0
- package/templates/skills/docs-seeker/SKILL.md +3 -2
- package/templates/skills/docs-seeker/scripts/analyze-llms-txt.js +0 -0
- package/templates/skills/docs-seeker/scripts/detect-topic.js +0 -0
- package/templates/skills/docs-seeker/scripts/fetch-docs.js +0 -0
- package/templates/skills/docs-seeker/scripts/tests/run-tests.js +0 -0
- package/templates/skills/docs-seeker/scripts/tests/test-analyze-llms.js +0 -0
- package/templates/skills/docs-seeker/scripts/tests/test-detect-topic.js +0 -0
- package/templates/skills/docs-seeker/scripts/tests/test-fetch-docs.js +0 -0
- package/templates/skills/docs-seeker/scripts/utils/env-loader.js +0 -0
- package/templates/skills/document-skills/docx/SKILL.md +2 -2
- package/templates/skills/document-skills/docx/ooxml/scripts/pack.py +0 -0
- package/templates/skills/document-skills/docx/ooxml/scripts/unpack.py +0 -0
- package/templates/skills/document-skills/docx/ooxml/scripts/validate.py +0 -0
- package/templates/skills/document-skills/docx/scripts/document.py +0 -0
- package/templates/skills/document-skills/docx/scripts/utilities.py +0 -0
- package/templates/skills/document-skills/pdf/SKILL.md +2 -2
- package/templates/skills/document-skills/pptx/SKILL.md +2 -2
- package/templates/skills/document-skills/pptx/ooxml/scripts/pack.py +0 -0
- package/templates/skills/document-skills/pptx/ooxml/scripts/unpack.py +0 -0
- package/templates/skills/document-skills/pptx/ooxml/scripts/validate.py +0 -0
- package/templates/skills/document-skills/pptx/scripts/inventory.py +0 -0
- package/templates/skills/document-skills/pptx/scripts/rearrange.py +0 -0
- package/templates/skills/document-skills/pptx/scripts/replace.py +0 -0
- package/templates/skills/document-skills/pptx/scripts/thumbnail.py +0 -0
- package/templates/skills/document-skills/xlsx/SKILL.md +2 -2
- package/templates/skills/document-skills/xlsx/recalc.py +3 -2
- package/templates/skills/find-skills/SKILL.md +134 -0
- package/templates/skills/fix/SKILL.md +111 -0
- package/templates/skills/fix/references/complexity-assessment.md +72 -0
- package/templates/skills/fix/references/mode-selection.md +46 -0
- package/templates/skills/fix/references/parallel-exploration.md +100 -0
- package/templates/skills/fix/references/review-cycle.md +77 -0
- package/templates/skills/fix/references/skill-activation-matrix.md +78 -0
- package/templates/skills/fix/references/task-orchestration.md +103 -0
- package/templates/skills/fix/references/workflow-ci.md +28 -0
- package/templates/skills/fix/references/workflow-deep.md +122 -0
- package/templates/skills/fix/references/workflow-logs.md +72 -0
- package/templates/skills/fix/references/workflow-quick.md +59 -0
- package/templates/skills/fix/references/workflow-standard.md +111 -0
- package/templates/skills/fix/references/workflow-test.md +75 -0
- package/templates/skills/fix/references/workflow-types.md +33 -0
- package/templates/skills/fix/references/workflow-ui.md +75 -0
- package/templates/skills/frontend-design/SKILL.md +78 -91
- package/templates/skills/frontend-design/references/ai-multimodal-overview.md +6 -6
- package/templates/skills/frontend-design/references/animejs.md +395 -395
- package/templates/skills/frontend-design/references/asset-generation.md +4 -4
- package/templates/skills/frontend-design/references/visual-analysis-overview.md +1 -1
- package/templates/skills/frontend-design/references/workflow-3d.md +102 -0
- package/templates/skills/frontend-design/references/workflow-describe.md +87 -0
- package/templates/skills/frontend-design/references/workflow-immersive.md +87 -0
- package/templates/skills/frontend-design/references/workflow-quick.md +57 -0
- package/templates/skills/frontend-design/references/workflow-screenshot.md +63 -0
- package/templates/skills/frontend-design/references/workflow-video.md +74 -0
- package/templates/skills/frontend-development/SKILL.md +4 -3
- package/templates/skills/git/SKILL.md +114 -0
- package/templates/skills/git/references/branch-management.md +88 -0
- package/templates/skills/git/references/commit-standards.md +46 -0
- package/templates/skills/git/references/gh-cli-guide.md +109 -0
- package/templates/skills/git/references/safety-protocols.md +69 -0
- package/templates/skills/git/references/workflow-commit.md +58 -0
- package/templates/skills/git/references/workflow-merge.md +48 -0
- package/templates/skills/git/references/workflow-pr.md +58 -0
- package/templates/skills/git/references/workflow-push.md +52 -0
- package/templates/skills/gkg/SKILL.md +91 -0
- package/templates/skills/gkg/references/cli-commands.md +106 -0
- package/templates/skills/gkg/references/http-api.md +102 -0
- package/templates/skills/gkg/references/language-support.md +57 -0
- package/templates/skills/gkg/references/mcp-tools.md +99 -0
- package/templates/skills/google-adk-python/SKILL.md +91 -195
- package/templates/skills/google-adk-python/references/agent-types-and-architecture.md +128 -0
- package/templates/skills/google-adk-python/references/callbacks-plugins-observability.md +117 -0
- package/templates/skills/google-adk-python/references/deployment-cloud-run-vertex-gke.md +138 -0
- package/templates/skills/google-adk-python/references/evaluation-testing-cli.md +112 -0
- package/templates/skills/google-adk-python/references/multi-agent-and-a2a-protocol.md +145 -0
- package/templates/skills/google-adk-python/references/sessions-state-memory-artifacts.md +131 -0
- package/templates/skills/google-adk-python/references/tools-and-mcp-integration.md +146 -0
- package/templates/skills/install.ps1 +130 -26
- package/templates/skills/install.sh +383 -63
- package/templates/{commands/journal.md → skills/journal/SKILL.md} +5 -1
- package/templates/skills/kanban/SKILL.md +99 -0
- package/templates/skills/markdown-novel-viewer/SKILL.md +314 -0
- package/templates/skills/markdown-novel-viewer/assets/directory-browser.css +215 -0
- package/templates/skills/markdown-novel-viewer/assets/favicon.png +0 -0
- package/templates/skills/markdown-novel-viewer/assets/novel-theme.css +16 -0
- package/templates/skills/markdown-novel-viewer/assets/reader.js +838 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-base.css +54 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-components.css +180 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-content.css +176 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-header.css +217 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-mermaid.css +153 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-overlays.css +202 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-responsive.css +285 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-sidebar.css +359 -0
- package/templates/skills/markdown-novel-viewer/assets/styles/novel-theme-variables.css +56 -0
- package/templates/skills/markdown-novel-viewer/assets/template.html +149 -0
- package/templates/skills/markdown-novel-viewer/bun.lock +38 -0
- package/templates/skills/markdown-novel-viewer/package.json +15 -0
- package/templates/skills/markdown-novel-viewer/scripts/lib/http-server.cjs +434 -0
- package/templates/skills/markdown-novel-viewer/scripts/lib/markdown-renderer.cjs +335 -0
- package/templates/skills/markdown-novel-viewer/scripts/lib/plan-navigator.cjs +571 -0
- package/templates/skills/markdown-novel-viewer/scripts/lib/port-finder.cjs +48 -0
- package/templates/skills/markdown-novel-viewer/scripts/lib/process-mgr.cjs +150 -0
- package/templates/skills/markdown-novel-viewer/scripts/server.cjs +411 -0
- package/templates/skills/markdown-novel-viewer/scripts/tests/server.test.cjs +283 -0
- package/templates/skills/markdown-novel-viewer/tests/dashboard-assets.test.cjs +340 -0
- package/templates/skills/markdown-novel-viewer/tests/dashboard-renderer.test.cjs +404 -0
- package/templates/skills/markdown-novel-viewer/tests/http-server.test.cjs +271 -0
- package/templates/skills/markdown-novel-viewer/tests/run-tests.cjs +51 -0
- package/templates/skills/markdown-novel-viewer/tests/test-framework.cjs +154 -0
- package/templates/skills/markdown-novel-viewer/tests/verify-xss.cjs +90 -0
- package/templates/skills/mcp-builder/SKILL.md +3 -2
- package/templates/skills/mcp-builder/scripts/evaluation.py +9 -1
- package/templates/skills/mcp-management/SKILL.md +8 -7
- package/templates/skills/mcp-management/references/gemini-cli-integration.md +16 -10
- package/templates/skills/mcp-management/scripts/cli.ts +0 -0
- package/templates/skills/mcp-management/scripts/dist/analyze-tools.js +0 -0
- package/templates/skills/mcp-management/scripts/dist/cli.js +0 -0
- package/templates/skills/mcp-management/scripts/dist/mcp-client.js +0 -0
- package/templates/skills/mcp-management/scripts/mcp-client.ts +0 -0
- package/templates/skills/media-processing/SKILL.md +3 -2
- package/templates/skills/media-processing/scripts/batch-remove-background.sh +0 -0
- package/templates/skills/media-processing/scripts/batch_resize.py +0 -0
- package/templates/skills/media-processing/scripts/media_convert.py +0 -0
- package/templates/skills/media-processing/scripts/remove-background.sh +0 -0
- package/templates/skills/media-processing/scripts/remove-bg-node.js +0 -0
- package/templates/skills/media-processing/scripts/tests/test_batch_resize.py +0 -0
- package/templates/skills/media-processing/scripts/tests/test_media_convert.py +0 -0
- package/templates/skills/media-processing/scripts/tests/test_video_optimize.py +0 -0
- package/templates/skills/media-processing/scripts/video_optimize.py +0 -0
- package/templates/skills/mermaidjs-v11/SKILL.md +116 -0
- package/templates/skills/mermaidjs-v11/references/cli-usage.md +228 -0
- package/templates/skills/mermaidjs-v11/references/configuration.md +232 -0
- package/templates/skills/mermaidjs-v11/references/diagram-types.md +315 -0
- package/templates/skills/mermaidjs-v11/references/examples.md +344 -0
- package/templates/skills/mermaidjs-v11/references/integration.md +310 -0
- package/templates/skills/mintlify/SKILL.md +121 -0
- package/templates/skills/mintlify/references/ai-features-and-integrations-reference.md +756 -0
- package/templates/skills/mintlify/references/api-documentation-components-reference.md +873 -0
- package/templates/skills/mintlify/references/deployment-and-continuous-integration-reference.md +674 -0
- package/templates/skills/mintlify/references/docs-json-configuration-reference.md +724 -0
- package/templates/skills/mintlify/references/mdx-components-reference.md +551 -0
- package/templates/skills/mintlify/references/navigation-structure-and-organization-reference.md +775 -0
- package/templates/skills/mobile-development/SKILL.md +3 -2
- package/templates/skills/payment-integration/README.md +44 -12
- package/templates/skills/payment-integration/SKILL.md +82 -97
- package/templates/skills/payment-integration/references/creem/api.md +139 -0
- package/templates/skills/payment-integration/references/creem/checkouts.md +99 -0
- package/templates/skills/payment-integration/references/creem/licensing.md +136 -0
- package/templates/skills/payment-integration/references/creem/overview.md +65 -0
- package/templates/skills/payment-integration/references/creem/sdk.md +161 -0
- package/templates/skills/payment-integration/references/creem/subscriptions.md +129 -0
- package/templates/skills/payment-integration/references/creem/webhooks.md +120 -0
- package/templates/skills/payment-integration/references/implementation-workflows.md +43 -0
- package/templates/skills/payment-integration/references/multi-provider-order-management-patterns.md +821 -0
- package/templates/skills/payment-integration/references/paddle/api.md +116 -0
- package/templates/skills/payment-integration/references/paddle/best-practices.md +130 -0
- package/templates/skills/payment-integration/references/paddle/overview.md +57 -0
- package/templates/skills/payment-integration/references/paddle/paddle-js.md +106 -0
- package/templates/skills/payment-integration/references/paddle/sdk.md +131 -0
- package/templates/skills/payment-integration/references/paddle/subscriptions.md +118 -0
- package/templates/skills/payment-integration/references/paddle/webhooks.md +112 -0
- package/templates/skills/payment-integration/references/polar/best-practices.md +781 -361
- package/templates/skills/payment-integration/references/sepay/best-practices.md +870 -268
- package/templates/skills/payment-integration/references/stripe/stripe-best-practices.md +32 -0
- package/templates/skills/payment-integration/references/stripe/stripe-cli.md +148 -0
- package/templates/skills/payment-integration/references/stripe/stripe-js.md +116 -0
- package/templates/skills/payment-integration/references/stripe/stripe-sdks.md +84 -0
- package/templates/skills/payment-integration/references/stripe/stripe-upgrade.md +175 -0
- package/templates/skills/payment-integration/scripts/checkout-helper.js +0 -0
- package/templates/skills/payment-integration/scripts/polar-webhook-verify.js +0 -0
- package/templates/skills/payment-integration/scripts/sepay-webhook-verify.js +0 -0
- package/templates/skills/payment-integration/scripts/test-scripts.js +0 -0
- package/templates/skills/plan/SKILL.md +137 -0
- package/templates/skills/plan/references/archive-workflow.md +53 -0
- package/templates/skills/{planning → plan}/references/codebase-understanding.md +1 -1
- package/templates/skills/{planning → plan}/references/output-standards.md +15 -1
- package/templates/skills/{planning → plan}/references/plan-organization.md +12 -19
- package/templates/skills/plan/references/red-team-personas.md +69 -0
- package/templates/skills/plan/references/red-team-workflow.md +77 -0
- package/templates/skills/{planning → plan}/references/research-phase.md +2 -2
- package/templates/skills/plan/references/task-management.md +132 -0
- package/templates/skills/plan/references/validate-question-framework.md +80 -0
- package/templates/skills/plan/references/validate-workflow.md +65 -0
- package/templates/skills/plan/references/workflow-modes.md +145 -0
- package/templates/skills/plans-kanban/SKILL.md +167 -0
- package/templates/skills/plans-kanban/assets/dashboard-template.html +119 -0
- package/templates/skills/plans-kanban/assets/dashboard.css +1594 -0
- package/templates/skills/plans-kanban/assets/dashboard.js +596 -0
- package/templates/skills/plans-kanban/assets/favicon.png +0 -0
- package/templates/skills/plans-kanban/package.json +13 -0
- package/templates/skills/plans-kanban/scripts/lib/dashboard-renderer.cjs +884 -0
- package/templates/skills/plans-kanban/scripts/lib/http-server.cjs +310 -0
- package/templates/skills/plans-kanban/scripts/lib/plan-metadata-extractor.cjs +489 -0
- package/templates/skills/plans-kanban/scripts/lib/plan-parser.cjs +175 -0
- package/templates/skills/plans-kanban/scripts/lib/plan-scanner.cjs +272 -0
- package/templates/skills/plans-kanban/scripts/lib/port-finder.cjs +48 -0
- package/templates/skills/plans-kanban/scripts/lib/process-mgr.cjs +128 -0
- package/templates/skills/plans-kanban/scripts/server.cjs +260 -0
- package/templates/skills/preview/SKILL.md +75 -0
- package/templates/skills/preview/references/generation-modes.md +95 -0
- package/templates/skills/preview/references/view-mode.md +42 -0
- package/templates/skills/problem-solving/SKILL.md +3 -2
- package/templates/skills/project-management/SKILL.md +122 -0
- package/templates/skills/project-management/references/documentation-triggers.md +60 -0
- package/templates/skills/project-management/references/hydration-workflow.md +85 -0
- package/templates/skills/project-management/references/progress-tracking.md +96 -0
- package/templates/skills/project-management/references/reporting-patterns.md +94 -0
- package/templates/skills/project-management/references/task-operations.md +85 -0
- package/templates/skills/react-best-practices/AGENTS.md +2249 -0
- package/templates/skills/react-best-practices/README.md +123 -0
- package/templates/skills/react-best-practices/SKILL.md +122 -0
- package/templates/skills/react-best-practices/metadata.json +15 -0
- package/templates/skills/react-best-practices/rules/_sections.md +46 -0
- package/templates/skills/react-best-practices/rules/_template.md +28 -0
- package/templates/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/templates/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/templates/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/templates/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/templates/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/templates/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/templates/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/templates/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/templates/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/templates/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/templates/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/templates/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/templates/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/templates/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/templates/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/templates/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/templates/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/templates/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/templates/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/templates/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/templates/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/templates/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/templates/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/templates/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/templates/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/templates/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/templates/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/templates/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/templates/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/templates/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/templates/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/templates/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/templates/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/templates/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/templates/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/templates/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/templates/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/templates/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/templates/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/templates/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/templates/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/templates/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/templates/skills/react-best-practices/rules/server-cache-react.md +26 -0
- package/templates/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
- package/templates/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/templates/skills/remotion/SKILL.md +44 -0
- package/templates/skills/remotion/rules/3d.md +86 -0
- package/templates/skills/remotion/rules/animations.md +29 -0
- package/templates/skills/remotion/rules/assets/charts-bar-chart.tsx +173 -0
- package/templates/skills/remotion/rules/assets/text-animations-typewriter.tsx +100 -0
- package/templates/skills/remotion/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/templates/skills/remotion/rules/assets.md +78 -0
- package/templates/skills/remotion/rules/audio.md +172 -0
- package/templates/skills/remotion/rules/calculate-metadata.md +104 -0
- package/templates/skills/remotion/rules/can-decode.md +75 -0
- package/templates/skills/remotion/rules/charts.md +58 -0
- package/templates/skills/remotion/rules/compositions.md +146 -0
- package/templates/skills/remotion/rules/display-captions.md +126 -0
- package/templates/skills/remotion/rules/extract-frames.md +229 -0
- package/templates/skills/remotion/rules/fonts.md +152 -0
- package/templates/skills/remotion/rules/get-audio-duration.md +58 -0
- package/templates/skills/remotion/rules/get-video-dimensions.md +68 -0
- package/templates/skills/remotion/rules/get-video-duration.md +58 -0
- package/templates/skills/remotion/rules/gifs.md +138 -0
- package/templates/skills/remotion/rules/images.md +130 -0
- package/templates/skills/remotion/rules/import-srt-captions.md +67 -0
- package/templates/skills/remotion/rules/lottie.md +68 -0
- package/templates/skills/remotion/rules/measuring-dom-nodes.md +35 -0
- package/templates/skills/remotion/rules/measuring-text.md +143 -0
- package/templates/skills/remotion/rules/sequencing.md +106 -0
- package/templates/skills/remotion/rules/tailwind.md +11 -0
- package/templates/skills/remotion/rules/text-animations.md +20 -0
- package/templates/skills/remotion/rules/timing.md +179 -0
- package/templates/skills/remotion/rules/transcribe-captions.md +19 -0
- package/templates/skills/remotion/rules/transitions.md +122 -0
- package/templates/skills/remotion/rules/trimming.md +53 -0
- package/templates/skills/remotion/rules/videos.md +171 -0
- package/templates/skills/repomix/SKILL.md +3 -2
- package/templates/skills/repomix/scripts/repomix_batch.py +0 -0
- package/templates/skills/research/SKILL.md +9 -6
- package/templates/skills/scout/SKILL.md +89 -0
- package/templates/skills/scout/references/external-scouting.md +140 -0
- package/templates/skills/scout/references/internal-scouting.md +119 -0
- package/templates/skills/scout/references/task-management-scouting.md +125 -0
- package/templates/skills/sequential-thinking/SKILL.md +3 -2
- package/templates/skills/sequential-thinking/scripts/format-thought.js +0 -0
- package/templates/skills/sequential-thinking/scripts/process-thought.js +0 -0
- package/templates/skills/shader/SKILL.md +113 -0
- package/templates/skills/shader/references/glsl-cellular-voronoi-worley-noise-patterns.md +142 -0
- package/templates/skills/shader/references/glsl-colors-rgb-hsb-gradients-mixing-color-spaces.md +143 -0
- package/templates/skills/shader/references/glsl-fbm-fractional-brownian-motion-turbulence-octaves.md +146 -0
- package/templates/skills/shader/references/glsl-fundamentals-data-types-vectors-precision-coordinates.md +104 -0
- package/templates/skills/shader/references/glsl-noise-random-perlin-simplex-cellular-voronoi.md +115 -0
- package/templates/skills/shader/references/glsl-pattern-symmetry-truchet-domain-warping.md +134 -0
- package/templates/skills/shader/references/glsl-patterns-tiling-fract-matrices-transformations.md +133 -0
- package/templates/skills/shader/references/glsl-procedural-textures-clouds-marble-wood-terrain.md +144 -0
- package/templates/skills/shader/references/glsl-shader-builtin-functions-complete-api-reference.md +112 -0
- package/templates/skills/shader/references/glsl-shapes-polygon-star-polar-sdf-combinations.md +124 -0
- package/templates/skills/shader/references/glsl-shapes-sdf-circles-rectangles-polar-distance-fields.md +106 -0
- package/templates/skills/shader/references/glsl-shaping-functions-step-smoothstep-curves-interpolation.md +141 -0
- package/templates/skills/shopify/SKILL.md +3 -2
- package/templates/skills/shopify/scripts/shopify_init.py +5 -5
- package/templates/skills/skill-creator/SKILL.md +91 -238
- package/templates/skills/skill-creator/references/benchmark-optimization-guide.md +86 -0
- package/templates/skills/skill-creator/references/distribution-guide.md +79 -0
- package/templates/skills/skill-creator/references/mcp-skills-integration.md +71 -0
- package/templates/skills/skill-creator/references/metadata-quality-criteria.md +76 -0
- package/templates/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -0
- package/templates/skills/skill-creator/references/plugin-marketplace-overview.md +89 -0
- package/templates/skills/skill-creator/references/plugin-marketplace-schema.md +93 -0
- package/templates/skills/skill-creator/references/plugin-marketplace-sources.md +103 -0
- package/templates/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -0
- package/templates/skills/skill-creator/references/script-quality-criteria.md +106 -0
- package/templates/skills/skill-creator/references/skill-anatomy-and-requirements.md +76 -0
- package/templates/skills/skill-creator/references/skill-creation-workflow.md +95 -0
- package/templates/skills/skill-creator/references/skill-design-patterns.md +75 -0
- package/templates/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -0
- package/templates/skills/skill-creator/references/structure-organization-criteria.md +114 -0
- package/templates/skills/skill-creator/references/testing-and-iteration.md +78 -0
- package/templates/skills/skill-creator/references/token-efficiency-criteria.md +74 -0
- package/templates/skills/skill-creator/references/troubleshooting-guide.md +80 -0
- package/templates/skills/skill-creator/references/validation-checklist.md +83 -0
- package/templates/skills/skill-creator/references/writing-effective-instructions.md +88 -0
- package/templates/skills/skill-creator/references/yaml-frontmatter-reference.md +91 -0
- package/templates/skills/skill-creator/scripts/debug.zip +0 -0
- package/templates/skills/skill-creator/scripts/encoding_utils.py +36 -0
- package/templates/skills/skill-creator/scripts/init_skill.py +9 -4
- package/templates/skills/skill-creator/scripts/package_skill.py +5 -0
- package/templates/skills/skill-creator/scripts/quick_validate.py +6 -2
- package/templates/skills/tanstack/SKILL.md +141 -0
- package/templates/skills/tanstack/references/tanstack-ai.md +97 -0
- package/templates/skills/tanstack/references/tanstack-form.md +125 -0
- package/templates/skills/tanstack/references/tanstack-start.md +100 -0
- package/templates/skills/team/SKILL.md +285 -0
- package/templates/skills/team/references/agent-teams-controls-and-modes.md +107 -0
- package/templates/skills/team/references/agent-teams-examples-and-best-practices.md +182 -0
- package/templates/skills/team/references/agent-teams-official-docs.md +175 -0
- package/templates/skills/template-skill/SKILL.md +1 -1
- package/templates/skills/test/SKILL.md +109 -0
- package/templates/skills/test/references/report-format.md +58 -0
- package/templates/skills/test/references/test-execution-workflow.md +103 -0
- package/templates/skills/test/references/ui-testing-workflow.md +65 -0
- package/templates/skills/threejs/SKILL.md +106 -53
- package/templates/skills/threejs/data/api-reference.csv +61 -0
- package/templates/skills/threejs/data/categories.csv +14 -0
- package/templates/skills/threejs/data/examples-all.csv +557 -0
- package/templates/skills/threejs/data/use-cases.csv +21 -0
- package/templates/skills/threejs/references/00-fundamentals.md +487 -0
- package/templates/skills/threejs/references/11-materials-advanced.md +1 -1
- package/templates/skills/threejs/references/11-materials.md +519 -0
- package/templates/skills/threejs/references/17-shader.md +641 -0
- package/templates/skills/threejs/references/18-geometry.md +547 -0
- package/templates/skills/threejs/scripts/core.py +236 -0
- package/templates/skills/threejs/scripts/extract_examples.py +688 -0
- package/templates/skills/threejs/scripts/generate_csv_from_json.py +135 -0
- package/templates/skills/threejs/scripts/search.py +77 -0
- package/templates/skills/ui-styling/SKILL.md +3 -2
- package/templates/skills/ui-styling/scripts/shadcn_add.py +0 -0
- package/templates/skills/ui-styling/scripts/tailwind_config_gen.py +1 -1
- package/templates/skills/ui-ux-pro-max/SKILL.md +69 -32
- package/templates/skills/ui-ux-pro-max/data/charts.csv +25 -25
- package/templates/skills/ui-ux-pro-max/data/colors.csv +96 -96
- package/templates/skills/ui-ux-pro-max/data/landing.csv +30 -30
- package/templates/skills/ui-ux-pro-max/data/products.csv +96 -96
- package/templates/skills/ui-ux-pro-max/data/prompts.csv +20 -20
- package/templates/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -53
- package/templates/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -56
- package/templates/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -53
- package/templates/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -52
- package/templates/skills/ui-ux-pro-max/data/stacks/react.csv +54 -54
- package/templates/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -54
- package/templates/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -51
- package/templates/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -50
- package/templates/skills/ui-ux-pro-max/data/styles.csv +58 -58
- package/templates/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/templates/skills/ui-ux-pro-max/data/ux-guidelines.csv +99 -99
- package/templates/skills/ui-ux-pro-max/scripts/design_system.py +494 -0
- package/templates/skills/ui-ux-pro-max/scripts/search.py +84 -61
- package/templates/skills/use-mcp/SKILL.md +42 -0
- package/templates/skills/watzup/SKILL.md +12 -0
- package/templates/skills/web-design-guidelines/SKILL.md +36 -0
- package/templates/skills/web-frameworks/SKILL.md +4 -3
- package/templates/skills/web-frameworks/scripts/nextjs_init.py +13 -13
- package/templates/skills/web-frameworks/scripts/turborepo_migrate.py +0 -0
- package/templates/skills/web-testing/SKILL.md +97 -0
- package/templates/skills/web-testing/references/accessibility-testing.md +84 -0
- package/templates/skills/web-testing/references/api-testing.md +78 -0
- package/templates/skills/web-testing/references/ci-cd-testing-workflows.md +121 -0
- package/templates/skills/web-testing/references/component-testing.md +94 -0
- package/templates/skills/web-testing/references/contract-testing.md +146 -0
- package/templates/skills/web-testing/references/cross-browser-checklist.md +72 -0
- package/templates/skills/web-testing/references/database-testing.md +139 -0
- package/templates/skills/web-testing/references/e2e-testing-playwright.md +119 -0
- package/templates/skills/web-testing/references/functional-testing-checklist.md +88 -0
- package/templates/skills/web-testing/references/interactive-testing-patterns.md +89 -0
- package/templates/skills/web-testing/references/load-testing-k6.md +93 -0
- package/templates/skills/web-testing/references/mobile-gesture-testing.md +85 -0
- package/templates/skills/web-testing/references/performance-core-web-vitals.md +124 -0
- package/templates/skills/web-testing/references/playwright-component-testing.md +115 -0
- package/templates/skills/web-testing/references/pre-release-checklist.md +75 -0
- package/templates/skills/web-testing/references/security-checklists.md +81 -0
- package/templates/skills/web-testing/references/security-testing-overview.md +92 -0
- package/templates/skills/web-testing/references/shadow-dom-testing.md +70 -0
- package/templates/skills/web-testing/references/test-data-management.md +131 -0
- package/templates/skills/web-testing/references/test-flakiness-mitigation.md +86 -0
- package/templates/skills/web-testing/references/testing-pyramid-strategy.md +76 -0
- package/templates/skills/web-testing/references/unit-integration-testing.md +138 -0
- package/templates/skills/web-testing/references/visual-regression.md +92 -0
- package/templates/skills/web-testing/references/vulnerability-payloads.md +93 -0
- package/templates/skills/web-testing/scripts/analyze-test-results.js +280 -0
- package/templates/skills/web-testing/scripts/init-playwright.js +233 -0
- package/templates/skills/worktree/SKILL.md +96 -0
- package/templates/skills/worktree/scripts/worktree.cjs +916 -0
- package/templates/skills/worktree/scripts/worktree.test.cjs +792 -0
- package/templates/statusline.cjs +477 -244
- package/templates/statusline.ps1 +0 -1
- package/templates/statusline.sh +0 -1
- package/templates/agents/README.md +0 -172
- package/templates/agents/copywriter.md +0 -113
- package/templates/agents/database-admin.md +0 -97
- package/templates/agents/scout-external.md +0 -146
- package/templates/agents/scout.md +0 -260
- package/templates/commands/README.md +0 -251
- package/templates/commands/bootstrap/auto/fast.md +0 -111
- package/templates/commands/bootstrap/auto/parallel.md +0 -66
- package/templates/commands/bootstrap/auto.md +0 -115
- package/templates/commands/bootstrap.md +0 -137
- package/templates/commands/build.md +0 -39
- package/templates/commands/checkpoint.md +0 -156
- package/templates/commands/code/auto.md +0 -170
- package/templates/commands/code/no-test.md +0 -158
- package/templates/commands/code/parallel.md +0 -55
- package/templates/commands/code-simplifier.md +0 -71
- package/templates/commands/code.md +0 -176
- package/templates/commands/compact.md +0 -57
- package/templates/commands/content/cro.md +0 -43
- package/templates/commands/content/enhance.md +0 -14
- package/templates/commands/content/fast.md +0 -13
- package/templates/commands/content/good.md +0 -16
- package/templates/commands/context.md +0 -48
- package/templates/commands/cook/auto/fast.md +0 -26
- package/templates/commands/cook/auto/parallel.md +0 -49
- package/templates/commands/cook/auto.md +0 -15
- package/templates/commands/cook/fast.md +0 -47
- package/templates/commands/cook/hard.md +0 -80
- package/templates/commands/cook/parallel.md +0 -90
- package/templates/commands/cook.md +0 -105
- package/templates/commands/create-feature.md +0 -48
- package/templates/commands/db-migrate.md +0 -52
- package/templates/commands/debug.md +0 -13
- package/templates/commands/design/3d.md +0 -83
- package/templates/commands/design/describe.md +0 -23
- package/templates/commands/design/fast.md +0 -31
- package/templates/commands/design/good.md +0 -35
- package/templates/commands/design/screenshot.md +0 -34
- package/templates/commands/design/video.md +0 -34
- package/templates/commands/docs/init.md +0 -39
- package/templates/commands/docs/summarize.md +0 -31
- package/templates/commands/docs/update.md +0 -57
- package/templates/commands/feature.md +0 -62
- package/templates/commands/fix/ci.md +0 -17
- package/templates/commands/fix/fast.md +0 -19
- package/templates/commands/fix/hard.md +0 -39
- package/templates/commands/fix/logs.md +0 -26
- package/templates/commands/fix/parallel.md +0 -54
- package/templates/commands/fix/test.md +0 -20
- package/templates/commands/fix/types.md +0 -9
- package/templates/commands/fix/ui.md +0 -48
- package/templates/commands/fix-issue.md +0 -177
- package/templates/commands/fix.md +0 -43
- package/templates/commands/generate-dto.md +0 -67
- package/templates/commands/git/cm.md +0 -5
- package/templates/commands/git/cp.md +0 -4
- package/templates/commands/git/merge.md +0 -40
- package/templates/commands/git/pr.md +0 -48
- package/templates/commands/integrate/polar.md +0 -28
- package/templates/commands/integrate/sepay.md +0 -28
- package/templates/commands/investigate.md +0 -324
- package/templates/commands/lint.md +0 -47
- package/templates/commands/migration.md +0 -111
- package/templates/commands/performance.md +0 -110
- package/templates/commands/plan/ci.md +0 -33
- package/templates/commands/plan/cro.md +0 -69
- package/templates/commands/plan/fast.md +0 -86
- package/templates/commands/plan/hard.md +0 -103
- package/templates/commands/plan/parallel.md +0 -152
- package/templates/commands/plan/preview.md +0 -40
- package/templates/commands/plan/two.md +0 -52
- package/templates/commands/plan/validate.md +0 -132
- package/templates/commands/plan.md +0 -36
- package/templates/commands/pr.md +0 -49
- package/templates/commands/preview.md +0 -87
- package/templates/commands/release-notes.md +0 -144
- package/templates/commands/review/post-task.md +0 -157
- package/templates/commands/review-changes.md +0 -46
- package/templates/commands/review.md +0 -56
- package/templates/commands/scout/ext.md +0 -35
- package/templates/commands/scout.md +0 -283
- package/templates/commands/security.md +0 -119
- package/templates/commands/skill/add.md +0 -36
- package/templates/commands/skill/create.md +0 -29
- package/templates/commands/skill/fix-logs.md +0 -22
- package/templates/commands/skill/optimize/auto.md +0 -25
- package/templates/commands/skill/optimize.md +0 -34
- package/templates/commands/skill/plan.md +0 -45
- package/templates/commands/worktree.md +0 -126
- package/templates/hooks/.python-cache.json +0 -1
- package/templates/hooks/README.md +0 -246
- package/templates/hooks/backend-csharp-context.cjs +0 -223
- package/templates/hooks/design-system-context.cjs +0 -185
- package/templates/hooks/frontend-typescript-context.cjs +0 -233
- package/templates/hooks/lib/ck-paths.cjs +0 -110
- package/templates/hooks/lib/context-tracker.cjs +0 -335
- package/templates/hooks/notify-waiting.js +0 -117
- package/templates/hooks/post-edit-prettier.cjs +0 -189
- package/templates/hooks/post-task-review.cjs +0 -142
- package/templates/hooks/scss-styling-context.cjs +0 -213
- package/templates/hooks/session-end.cjs +0 -35
- package/templates/hooks/tests/test-context-tracker.cjs +0 -454
- package/templates/hooks/tests/test-scout-block.js +0 -163
- package/templates/hooks/workflow-router.cjs +0 -326
- package/templates/hooks/write-compact-marker.cjs +0 -159
- package/templates/memory/session-log.md +0 -186
- package/templates/router/README.md +0 -294
- package/templates/router/agents-guide.md +0 -38
- package/templates/router/commands-guide.md +0 -122
- package/templates/router/decision-flow.md +0 -92
- package/templates/router/skills-guide.md +0 -127
- package/templates/router/workflows-guide.md +0 -68
- package/templates/scripts/__pycache__/win_compat.cpython-312.pyc +0 -0
- package/templates/scripts/plan-preview.cjs +0 -921
- package/templates/skills/arch-cross-service-integration/SKILL.md +0 -48
- package/templates/skills/arch-performance-optimization/SKILL.md +0 -306
- package/templates/skills/arch-security-review/SKILL.md +0 -344
- package/templates/skills/branch-comparison/SKILL.md +0 -150
- package/templates/skills/bug-diagnosis/SKILL.md +0 -309
- package/templates/skills/claude-code/references/advanced-features.md +0 -399
- package/templates/skills/claude-code/references/agent-skills.md +0 -399
- package/templates/skills/claude-code/references/api-reference.md +0 -498
- package/templates/skills/claude-code/references/best-practices.md +0 -447
- package/templates/skills/claude-code/references/cicd-integration.md +0 -428
- package/templates/skills/claude-code/references/common-workflows.md +0 -119
- package/templates/skills/claude-code/references/configuration.md +0 -480
- package/templates/skills/claude-code/references/enterprise-features.md +0 -472
- package/templates/skills/claude-code/references/getting-started.md +0 -252
- package/templates/skills/claude-code/references/hooks-and-plugins.md +0 -444
- package/templates/skills/claude-code/references/hooks-comprehensive.md +0 -622
- package/templates/skills/claude-code/references/ide-integration.md +0 -316
- package/templates/skills/claude-code/references/mcp-integration.md +0 -386
- package/templates/skills/claude-code/references/slash-commands.md +0 -489
- package/templates/skills/claude-code/references/troubleshooting.md +0 -456
- package/templates/skills/claude-code/skill.md +0 -60
- package/templates/skills/debugging/SKILL.md +0 -84
- package/templates/skills/developer-growth-analysis/SKILL.md +0 -322
- package/templates/skills/documentation/SKILL.md +0 -134
- package/templates/skills/domain-name-brainstormer/SKILL.md +0 -212
- package/templates/skills/dual-pass-review/SKILL.md +0 -249
- package/templates/skills/feature-docs/SKILL.md +0 -294
- package/templates/skills/feature-implementation/SKILL.md +0 -262
- package/templates/skills/feature-investigation/SKILL.md +0 -346
- package/templates/skills/frontend-design-pro/SKILL.md +0 -58
- package/templates/skills/package-upgrade/SKILL.md +0 -189
- package/templates/skills/plan-analysis/SKILL.md +0 -191
- package/templates/skills/planning/SKILL.md +0 -115
- package/templates/skills/planning-with-files/SKILL.md +0 -160
- package/templates/skills/planning-with-files/examples.md +0 -202
- package/templates/skills/planning-with-files/reference.md +0 -110
- package/templates/skills/project-index/SKILL.md +0 -97
- package/templates/skills/project-index/scripts/scan-structure.js +0 -417
- package/templates/skills/project-index/scripts/scan_structure.py +0 -450
- package/templates/skills/readme-improvement/SKILL.md +0 -177
- package/templates/skills/skill-share/SKILL.md +0 -80
- package/templates/skills/tasks-code-review/SKILL.md +0 -298
- package/templates/skills/tasks-documentation/SKILL.md +0 -328
- package/templates/skills/tasks-spec-update/SKILL.md +0 -318
- package/templates/skills/tasks-test-generation/SKILL.md +0 -433
- package/templates/skills/test-generation/SKILL.md +0 -203
- package/templates/skills/webapp-testing/LICENSE.txt +0 -202
- package/templates/skills/webapp-testing/SKILL.md +0 -96
- package/templates/skills/webapp-testing/examples/console_logging.py +0 -35
- package/templates/skills/webapp-testing/examples/element_discovery.py +0 -40
- package/templates/skills/webapp-testing/examples/static_html_automation.py +0 -33
- package/templates/skills/webapp-testing/scripts/with_server.py +0 -106
- package/templates/workflows/README.md +0 -241
- package/templates/workflows/orchestration-protocol.md +0 -16
- /package/templates/{commands → command-archive}/coding-level.md +0 -0
- /package/templates/{commands → command-archive}/review/codebase.md +0 -0
- /package/templates/{commands → command-archive}/test.md +0 -0
- /package/templates/{commands → command-archive}/watzup.md +0 -0
- /package/templates/hooks/scout-block/vendor/{ignore.js → ignore.cjs} +0 -0
- /package/templates/{workflows → rules}/documentation-management.md +0 -0
- /package/templates/skills/{debugging → debug}/references/defense-in-depth.md +0 -0
- /package/templates/skills/{debugging → debug}/references/root-cause-tracing.md +0 -0
- /package/templates/skills/{debugging → debug}/references/systematic-debugging.md +0 -0
- /package/templates/skills/{debugging → debug}/references/verification.md +0 -0
- /package/templates/skills/{debugging → debug}/scripts/find-polluter.sh +0 -0
- /package/templates/skills/{debugging → debug}/scripts/find-polluter.test.md +0 -0
- /package/templates/skills/{planning → plan}/references/solution-design.md +0 -0
|
@@ -0,0 +1,884 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Renderer
|
|
3
|
+
* Generates HTML for the enhanced plans dashboard view with glassmorphism design
|
|
4
|
+
*
|
|
5
|
+
* @module dashboard-renderer
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const {
|
|
11
|
+
generateTimelineStats,
|
|
12
|
+
generateActivityHeatmap
|
|
13
|
+
} = require('./plan-metadata-extractor.cjs');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Escape HTML special characters to prevent XSS
|
|
17
|
+
* @param {string} str - String to escape
|
|
18
|
+
* @returns {string} - Escaped string
|
|
19
|
+
*/
|
|
20
|
+
function escapeHtml(str) {
|
|
21
|
+
if (!str) return '';
|
|
22
|
+
return String(str)
|
|
23
|
+
.replace(/&/g, '&')
|
|
24
|
+
.replace(/</g, '<')
|
|
25
|
+
.replace(/>/g, '>')
|
|
26
|
+
.replace(/"/g, '"')
|
|
27
|
+
.replace(/'/g, ''');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Truncate text to specified length with ellipsis
|
|
32
|
+
* @param {string} text - Text to truncate
|
|
33
|
+
* @param {number} maxLen - Maximum length
|
|
34
|
+
* @returns {string} - Truncated text
|
|
35
|
+
*/
|
|
36
|
+
function truncate(text, maxLen = 100) {
|
|
37
|
+
if (!text) return '';
|
|
38
|
+
if (text.length <= maxLen) return text;
|
|
39
|
+
return text.slice(0, maxLen - 3).trim() + '...';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Get priority color class based on priority level
|
|
44
|
+
* @param {string} priority - Priority string (P1/P2/P3 or High/Medium/Low)
|
|
45
|
+
* @returns {string} - CSS class name
|
|
46
|
+
*/
|
|
47
|
+
function getPriorityColorClass(priority) {
|
|
48
|
+
if (!priority) return '';
|
|
49
|
+
const p = String(priority).toUpperCase();
|
|
50
|
+
if (p === 'P1' || p === 'HIGH' || p === 'CRITICAL') return 'priority-high';
|
|
51
|
+
if (p === 'P2' || p === 'MEDIUM' || p === 'NORMAL') return 'priority-medium';
|
|
52
|
+
if (p === 'P3' || p === 'LOW') return 'priority-low';
|
|
53
|
+
return '';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Format date for display
|
|
58
|
+
* @param {string} isoDate - ISO date string
|
|
59
|
+
* @returns {string} - Formatted date
|
|
60
|
+
*/
|
|
61
|
+
function formatDate(isoDate) {
|
|
62
|
+
if (!isoDate) return '';
|
|
63
|
+
const date = new Date(isoDate);
|
|
64
|
+
return date.toLocaleDateString('en-US', {
|
|
65
|
+
month: 'short',
|
|
66
|
+
day: 'numeric',
|
|
67
|
+
year: 'numeric'
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Format relative time (e.g., "2 days ago")
|
|
73
|
+
* @param {string} isoDate - ISO date string
|
|
74
|
+
* @returns {string} - Relative time string
|
|
75
|
+
*/
|
|
76
|
+
function formatRelativeTime(isoDate) {
|
|
77
|
+
if (!isoDate) return '';
|
|
78
|
+
const date = new Date(isoDate);
|
|
79
|
+
const now = new Date();
|
|
80
|
+
const diffMs = now - date;
|
|
81
|
+
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
|
82
|
+
|
|
83
|
+
if (diffDays === 0) return 'Today';
|
|
84
|
+
if (diffDays === 1) return 'Yesterday';
|
|
85
|
+
if (diffDays < 7) return `${diffDays} days ago`;
|
|
86
|
+
if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
|
|
87
|
+
if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
|
|
88
|
+
return `${Math.floor(diffDays / 365)} years ago`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Get human-readable status label
|
|
93
|
+
* @param {string} status - Status code
|
|
94
|
+
* @returns {string} - Human-readable label
|
|
95
|
+
*/
|
|
96
|
+
function getStatusLabel(status) {
|
|
97
|
+
const labels = {
|
|
98
|
+
'completed': 'Completed',
|
|
99
|
+
'complete': 'Completed',
|
|
100
|
+
'in-progress': 'In Progress',
|
|
101
|
+
'in-review': 'In Review',
|
|
102
|
+
'cancelled': 'Cancelled',
|
|
103
|
+
'pending': 'Pending'
|
|
104
|
+
};
|
|
105
|
+
return labels[status] || 'Pending';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Generate SVG progress ring (kept for backward compatibility but hidden in new design)
|
|
110
|
+
* @param {number} progress - Progress percentage (0-100)
|
|
111
|
+
* @returns {string} - SVG HTML
|
|
112
|
+
*/
|
|
113
|
+
function generateProgressRing(progress) {
|
|
114
|
+
// Hidden in new minimal design - kept for compatibility
|
|
115
|
+
return '';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Generate simple progress bar (monochrome design)
|
|
120
|
+
* @param {{total: number, completed: number, inProgress: number, pending: number}} phases
|
|
121
|
+
* @returns {string} - Progress bar HTML
|
|
122
|
+
*/
|
|
123
|
+
function generateProgressBar(phases) {
|
|
124
|
+
const total = phases.total || 1;
|
|
125
|
+
const completedPct = ((phases.completed / total) * 100).toFixed(1);
|
|
126
|
+
const inProgressPct = ((phases.inProgress / total) * 100).toFixed(1);
|
|
127
|
+
|
|
128
|
+
return `
|
|
129
|
+
<div class="progress-bar" role="progressbar"
|
|
130
|
+
aria-valuenow="${phases.completed}" aria-valuemin="0" aria-valuemax="${total}"
|
|
131
|
+
aria-label="Progress: ${phases.completed} of ${total} phases completed">
|
|
132
|
+
<div class="bar-segment completed" style="width: ${completedPct}%"></div>
|
|
133
|
+
<div class="bar-segment in-progress" style="width: ${inProgressPct}%"></div>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="phase-count"><strong>${phases.completed}</strong> of ${total} phases</div>
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Generate status counts HTML (hidden in minimal design)
|
|
141
|
+
* @param {{completed: number, inProgress: number, pending: number}} phases
|
|
142
|
+
* @returns {string} - Status counts HTML
|
|
143
|
+
*/
|
|
144
|
+
function generateStatusCounts(phases) {
|
|
145
|
+
// Hidden in minimal design
|
|
146
|
+
return '';
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Generate status badge HTML (simplified for monochrome design)
|
|
151
|
+
* @param {string} status - Status string
|
|
152
|
+
* @returns {string} - Status badge HTML
|
|
153
|
+
*/
|
|
154
|
+
function generateStatusBadge(status) {
|
|
155
|
+
const statusClass = (status || 'pending').replace(/\s+/g, '-');
|
|
156
|
+
// Simplified labels for minimal design
|
|
157
|
+
const labels = {
|
|
158
|
+
'completed': 'Done',
|
|
159
|
+
'complete': 'Done',
|
|
160
|
+
'in-progress': 'Active',
|
|
161
|
+
'pending': 'Pending'
|
|
162
|
+
};
|
|
163
|
+
const label = labels[statusClass] || 'Pending';
|
|
164
|
+
return `<span class="status-badge ${statusClass}">${label}</span>`;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Generate meta tags HTML for plan card (duration, effort, priority, issue, tags)
|
|
169
|
+
* @param {Object} plan - Plan metadata
|
|
170
|
+
* @returns {string} - Meta tags HTML
|
|
171
|
+
*/
|
|
172
|
+
function generateCardMeta(plan) {
|
|
173
|
+
const metaTags = [];
|
|
174
|
+
|
|
175
|
+
// Duration tag
|
|
176
|
+
if (plan.durationFormatted) {
|
|
177
|
+
const icon = '<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>';
|
|
178
|
+
metaTags.push(`<span class="meta-tag duration" title="Duration">${icon} ${escapeHtml(plan.durationFormatted)}</span>`);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Effort tag
|
|
182
|
+
if (plan.totalEffortFormatted) {
|
|
183
|
+
metaTags.push(`<span class="meta-tag effort" title="Estimated effort"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg> ${escapeHtml(plan.totalEffortFormatted)}</span>`);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Priority tag with color class
|
|
187
|
+
if (plan.priority) {
|
|
188
|
+
const priorityColorClass = getPriorityColorClass(plan.priority);
|
|
189
|
+
metaTags.push(`<span class="meta-tag priority ${priorityColorClass}" title="Priority">${escapeHtml(plan.priority)}</span>`);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Issue tag - clickable link to GitHub (uses branch to derive repo, falls back to claudekit)
|
|
193
|
+
if (plan.issue) {
|
|
194
|
+
// TODO: Make repo configurable via project settings
|
|
195
|
+
const issueUrl = `https://github.com/claudekit/claudekit/issues/${plan.issue}`;
|
|
196
|
+
metaTags.push(`<a href="${issueUrl}" target="_blank" rel="noopener" class="meta-tag issue" title="Issue #${plan.issue}"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg> #${plan.issue}</a>`);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (metaTags.length === 0) return '';
|
|
200
|
+
return `<div class="card-meta">${metaTags.join('')}</div>`;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Generate tags pills HTML
|
|
205
|
+
* @param {Array<string>} tags - Array of tag strings
|
|
206
|
+
* @param {number} maxVisible - Maximum visible tags (default 3)
|
|
207
|
+
* @returns {string} - Tags HTML
|
|
208
|
+
*/
|
|
209
|
+
function generateTagsPills(tags, maxVisible = 3) {
|
|
210
|
+
if (!tags || !Array.isArray(tags) || tags.length === 0) return '';
|
|
211
|
+
|
|
212
|
+
const visibleTags = tags.slice(0, maxVisible);
|
|
213
|
+
const hiddenCount = tags.length - maxVisible;
|
|
214
|
+
|
|
215
|
+
let html = '<div class="card-tags">';
|
|
216
|
+
html += visibleTags.map(tag =>
|
|
217
|
+
`<span class="tag-pill">${escapeHtml(tag)}</span>`
|
|
218
|
+
).join('');
|
|
219
|
+
|
|
220
|
+
if (hiddenCount > 0) {
|
|
221
|
+
html += `<span class="tag-pill tag-more">+${hiddenCount}</span>`;
|
|
222
|
+
}
|
|
223
|
+
html += '</div>';
|
|
224
|
+
|
|
225
|
+
return html;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Generate HTML for a single plan card (minimal design with rich metadata)
|
|
230
|
+
* @param {Object} plan - Plan metadata
|
|
231
|
+
* @returns {string} - Card HTML
|
|
232
|
+
*/
|
|
233
|
+
function generatePlanCard(plan) {
|
|
234
|
+
const statusClass = (plan.status || 'pending').replace(/\s+/g, '-');
|
|
235
|
+
const name = escapeHtml(plan.name);
|
|
236
|
+
const relativeTime = formatRelativeTime(plan.lastModified);
|
|
237
|
+
const cardMeta = generateCardMeta(plan);
|
|
238
|
+
|
|
239
|
+
// Description section (truncated)
|
|
240
|
+
const descriptionHtml = plan.description
|
|
241
|
+
? `<p class="card-description">${escapeHtml(truncate(plan.description, 100))}</p>`
|
|
242
|
+
: '';
|
|
243
|
+
|
|
244
|
+
// Tags pills
|
|
245
|
+
const tagsHtml = generateTagsPills(plan.tags);
|
|
246
|
+
|
|
247
|
+
return `
|
|
248
|
+
<article class="plan-card" data-status="${statusClass}" data-id="${escapeHtml(plan.id)}" tabindex="0"
|
|
249
|
+
data-created="${plan.createdDate || ''}" data-duration="${plan.durationDays || 0}"
|
|
250
|
+
data-effort="${plan.totalEffortHours || 0}" data-priority="${plan.priority || ''}">
|
|
251
|
+
<header class="card-header">
|
|
252
|
+
<div class="card-header-content">
|
|
253
|
+
<h2 class="plan-name">${name}</h2>
|
|
254
|
+
<div class="plan-date">
|
|
255
|
+
<time datetime="${plan.lastModified}">${relativeTime}</time>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
${generateStatusBadge(statusClass)}
|
|
259
|
+
</header>
|
|
260
|
+
<div class="card-body">
|
|
261
|
+
${descriptionHtml}
|
|
262
|
+
${generateProgressBar(plan.phases)}
|
|
263
|
+
${cardMeta}
|
|
264
|
+
${tagsHtml}
|
|
265
|
+
</div>
|
|
266
|
+
<footer class="card-footer">
|
|
267
|
+
<div class="phases-summary">${plan.phases.total} phases total</div>
|
|
268
|
+
<a href="/view?file=${encodeURIComponent(plan.path)}" class="view-btn">
|
|
269
|
+
View
|
|
270
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
271
|
+
<path d="M5 12h14M12 5l7 7-7 7"/>
|
|
272
|
+
</svg>
|
|
273
|
+
</a>
|
|
274
|
+
</footer>
|
|
275
|
+
</article>
|
|
276
|
+
`;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Auto-stack plans into layers to avoid overlap (like Google Calendar)
|
|
281
|
+
* Uses actual plan duration for in-progress items instead of extending to today
|
|
282
|
+
* @param {Array} plans - Plans with createdDate and durationDays
|
|
283
|
+
* @param {Date} rangeStart - Start of visible range
|
|
284
|
+
* @param {Date} rangeEnd - End of visible range
|
|
285
|
+
* @returns {Array} - Plans with layer assignments
|
|
286
|
+
*/
|
|
287
|
+
function assignLayers(plans, rangeStart, rangeEnd) {
|
|
288
|
+
const rangeDays = Math.ceil((rangeEnd - rangeStart) / (1000 * 60 * 60 * 24));
|
|
289
|
+
const now = new Date();
|
|
290
|
+
const layers = []; // Each layer tracks occupied day ranges
|
|
291
|
+
|
|
292
|
+
// Filter to plans with dates, then sort by start date
|
|
293
|
+
const sorted = [...plans]
|
|
294
|
+
.filter(p => p.createdDate)
|
|
295
|
+
.sort((a, b) => new Date(a.createdDate) - new Date(b.createdDate));
|
|
296
|
+
|
|
297
|
+
// Filter to plans within visible range
|
|
298
|
+
const visible = sorted.filter(plan => {
|
|
299
|
+
const startDate = new Date(plan.createdDate);
|
|
300
|
+
const endDate = plan.completedDate
|
|
301
|
+
? new Date(plan.completedDate)
|
|
302
|
+
: new Date(startDate.getTime() + (plan.durationDays || 1) * 24 * 60 * 60 * 1000);
|
|
303
|
+
return endDate >= rangeStart && startDate <= rangeEnd;
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
return visible.map(plan => {
|
|
307
|
+
const startDate = new Date(plan.createdDate);
|
|
308
|
+
// Determine end date based on status
|
|
309
|
+
let endDate;
|
|
310
|
+
if (plan.completedDate) {
|
|
311
|
+
endDate = new Date(plan.completedDate);
|
|
312
|
+
} else if (plan.status === 'completed') {
|
|
313
|
+
// Completed without explicit date: use lastModified or cap at today
|
|
314
|
+
endDate = plan.lastModified ? new Date(plan.lastModified) : now;
|
|
315
|
+
} else {
|
|
316
|
+
// In-progress/pending: use duration from start
|
|
317
|
+
endDate = new Date(startDate.getTime() + Math.max(1, plan.durationDays || 1) * 24 * 60 * 60 * 1000);
|
|
318
|
+
}
|
|
319
|
+
// Completed plans can't extend past today
|
|
320
|
+
if (plan.status === 'completed' && endDate > now) {
|
|
321
|
+
endDate = now;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Calculate position as percentage (clamp to range)
|
|
325
|
+
const startDay = Math.max(0, Math.ceil((startDate - rangeStart) / (1000 * 60 * 60 * 24)));
|
|
326
|
+
const endDay = Math.min(rangeDays, Math.ceil((endDate - rangeStart) / (1000 * 60 * 60 * 24)));
|
|
327
|
+
|
|
328
|
+
// Ensure minimum visible width (2 days)
|
|
329
|
+
const adjustedEndDay = Math.max(startDay + 2, endDay);
|
|
330
|
+
const leftPct = (startDay / rangeDays) * 100;
|
|
331
|
+
const widthPct = Math.min(100 - leftPct, Math.max(4, ((adjustedEndDay - startDay) / rangeDays) * 100));
|
|
332
|
+
|
|
333
|
+
// Find first layer without overlap (greedy algorithm)
|
|
334
|
+
let layer = 0;
|
|
335
|
+
let foundSlot = false;
|
|
336
|
+
for (let i = 0; i < layers.length; i++) {
|
|
337
|
+
const hasOverlap = layers[i].some(range =>
|
|
338
|
+
!(adjustedEndDay <= range.start || startDay >= range.end)
|
|
339
|
+
);
|
|
340
|
+
if (!hasOverlap) {
|
|
341
|
+
layer = i;
|
|
342
|
+
foundSlot = true;
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
if (!foundSlot) {
|
|
347
|
+
layer = layers.length;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Add to layer
|
|
351
|
+
if (!layers[layer]) layers[layer] = [];
|
|
352
|
+
layers[layer].push({ start: startDay, end: adjustedEndDay });
|
|
353
|
+
|
|
354
|
+
return { ...plan, layer, leftPct, widthPct, startDay, endDay: adjustedEndDay };
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Generate timeline section HTML with Layered Gantt
|
|
360
|
+
* @param {Array} plans - Array of plan metadata objects
|
|
361
|
+
* @returns {string} - Timeline section HTML
|
|
362
|
+
*/
|
|
363
|
+
function generateTimelineSection(plans) {
|
|
364
|
+
if (!plans || plans.length === 0) return '';
|
|
365
|
+
|
|
366
|
+
const stats = generateTimelineStats(plans);
|
|
367
|
+
|
|
368
|
+
// Calculate date range (last 3 weeks to now + 1 week)
|
|
369
|
+
const now = new Date();
|
|
370
|
+
const rangeStart = new Date(now.getTime() - 21 * 24 * 60 * 60 * 1000);
|
|
371
|
+
const rangeEnd = new Date(now.getTime() + 7 * 24 * 60 * 60 * 1000);
|
|
372
|
+
const rangeDays = Math.ceil((rangeEnd - rangeStart) / (1000 * 60 * 60 * 24));
|
|
373
|
+
|
|
374
|
+
// Generate date axis labels (7 markers)
|
|
375
|
+
const axisLabels = [];
|
|
376
|
+
for (let i = 0; i < 7; i++) {
|
|
377
|
+
const date = new Date(rangeStart.getTime() + (i * rangeDays / 6) * 24 * 60 * 60 * 1000);
|
|
378
|
+
const isToday = date.toDateString() === now.toDateString();
|
|
379
|
+
axisLabels.push({
|
|
380
|
+
label: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }),
|
|
381
|
+
isToday
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const axisHtml = axisLabels.map(a =>
|
|
386
|
+
`<span class="gantt-axis-label${a.isToday ? ' today' : ''}">${a.label}</span>`
|
|
387
|
+
).join('');
|
|
388
|
+
|
|
389
|
+
// Calculate today marker position
|
|
390
|
+
const todayPct = ((now - rangeStart) / (rangeEnd - rangeStart)) * 100;
|
|
391
|
+
|
|
392
|
+
// Auto-stack plans into layers
|
|
393
|
+
const layeredPlans = assignLayers(plans, rangeStart, rangeEnd);
|
|
394
|
+
const maxLayer = layeredPlans.length > 0 ? Math.max(...layeredPlans.map(p => p.layer), 0) : 0;
|
|
395
|
+
// Compact layout: 22px per layer (bar 18px + 4px gap), no max cap
|
|
396
|
+
const trackHeight = Math.max(60, (maxLayer + 1) * 22 + 12);
|
|
397
|
+
|
|
398
|
+
// Generate gantt bars
|
|
399
|
+
const barsHtml = layeredPlans.map(plan => {
|
|
400
|
+
const statusClass = plan.status === 'completed' ? 'completed'
|
|
401
|
+
: plan.status === 'in-progress' ? 'in-progress' : 'pending';
|
|
402
|
+
const top = plan.layer * 22 + 6;
|
|
403
|
+
const statusIcon = plan.status === 'completed' ? '✓' : plan.status === 'in-progress' ? '◐' : '○';
|
|
404
|
+
|
|
405
|
+
return `
|
|
406
|
+
<a href="/view?file=${encodeURIComponent(plan.path)}" class="gantt-bar ${statusClass}"
|
|
407
|
+
style="left: ${plan.leftPct.toFixed(1)}%; width: ${plan.widthPct.toFixed(1)}%; top: ${top}px;"
|
|
408
|
+
data-id="${escapeHtml(plan.id)}">
|
|
409
|
+
<span class="gantt-bar-label">${escapeHtml(plan.name)}</span>
|
|
410
|
+
<span class="gantt-bar-status">${statusIcon}</span>
|
|
411
|
+
<div class="gantt-tooltip">
|
|
412
|
+
<div class="gantt-tooltip-title">${escapeHtml(plan.name)}</div>
|
|
413
|
+
<div class="gantt-tooltip-meta">
|
|
414
|
+
<span>${plan.durationFormatted || 'Today'}</span>
|
|
415
|
+
<span>${plan.phases.completed}/${plan.phases.total} phases</span>
|
|
416
|
+
${plan.totalEffortFormatted ? `<span>${plan.totalEffortFormatted}</span>` : ''}
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
</a>
|
|
420
|
+
`;
|
|
421
|
+
}).join('');
|
|
422
|
+
|
|
423
|
+
// Summary counts
|
|
424
|
+
const completedCount = plans.filter(p => p.status === 'completed').length;
|
|
425
|
+
const activeCount = plans.filter(p => p.status === 'in-progress').length;
|
|
426
|
+
const pendingCount = plans.filter(p => p.status === 'pending').length;
|
|
427
|
+
|
|
428
|
+
return `
|
|
429
|
+
<section class="timeline-section" aria-label="Project timeline">
|
|
430
|
+
<div class="timeline-header">
|
|
431
|
+
<h2 class="timeline-title">Timeline</h2>
|
|
432
|
+
<div class="timeline-stats">
|
|
433
|
+
<div class="timeline-stat">
|
|
434
|
+
<span>Avg:</span>
|
|
435
|
+
<strong>${stats.avgDurationDays}d</strong>
|
|
436
|
+
</div>
|
|
437
|
+
<div class="timeline-stat">
|
|
438
|
+
<span>Effort:</span>
|
|
439
|
+
<strong>${stats.totalEffortHours.toFixed(0)}h</strong>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
<div class="gantt-container">
|
|
444
|
+
<div class="gantt-axis">${axisHtml}</div>
|
|
445
|
+
<div class="gantt-track" style="height: ${trackHeight}px;">
|
|
446
|
+
<div class="gantt-today-marker" style="left: ${todayPct.toFixed(1)}%;"></div>
|
|
447
|
+
${barsHtml}
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
<div class="timeline-summary">
|
|
451
|
+
<div class="timeline-summary-item">
|
|
452
|
+
<span class="timeline-summary-dot completed"></span>
|
|
453
|
+
<span>${completedCount} done</span>
|
|
454
|
+
</div>
|
|
455
|
+
<div class="timeline-summary-item">
|
|
456
|
+
<span class="timeline-summary-dot in-progress"></span>
|
|
457
|
+
<span>${activeCount} active</span>
|
|
458
|
+
</div>
|
|
459
|
+
<div class="timeline-summary-item">
|
|
460
|
+
<span class="timeline-summary-dot pending"></span>
|
|
461
|
+
<span>${pendingCount} pending</span>
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
</section>
|
|
465
|
+
`;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Generate empty state HTML with animated icon
|
|
470
|
+
* @returns {string} - Empty state HTML
|
|
471
|
+
*/
|
|
472
|
+
function generateEmptyState() {
|
|
473
|
+
return `
|
|
474
|
+
<div class="empty-state" hidden>
|
|
475
|
+
<div class="empty-icon" aria-hidden="true">
|
|
476
|
+
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
477
|
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
|
|
478
|
+
<polyline points="14 2 14 8 20 8"/>
|
|
479
|
+
<line x1="16" y1="13" x2="8" y2="13"/>
|
|
480
|
+
<line x1="16" y1="17" x2="8" y2="17"/>
|
|
481
|
+
<polyline points="10 9 9 9 8 9"/>
|
|
482
|
+
</svg>
|
|
483
|
+
</div>
|
|
484
|
+
<h2>No plans found</h2>
|
|
485
|
+
<p>Create a plan directory with a plan.md file to get started with tracking your projects.</p>
|
|
486
|
+
</div>
|
|
487
|
+
`;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Generate plans grid HTML
|
|
492
|
+
* @param {Array} plans - Array of plan metadata objects
|
|
493
|
+
* @returns {string} - Grid HTML
|
|
494
|
+
*/
|
|
495
|
+
function generatePlansGrid(plans) {
|
|
496
|
+
if (!plans || plans.length === 0) {
|
|
497
|
+
return '';
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
return plans.map(generatePlanCard).join('\n');
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Status column configuration for kanban board
|
|
505
|
+
*/
|
|
506
|
+
const STATUS_COLUMNS = [
|
|
507
|
+
{ id: 'pending', label: 'Pending', color: 'pending' },
|
|
508
|
+
{ id: 'in-progress', label: 'In Progress', color: 'in-progress' },
|
|
509
|
+
{ id: 'in-review', label: 'In Review', color: 'in-review' },
|
|
510
|
+
{ id: 'completed', label: 'Done', color: 'completed' },
|
|
511
|
+
{ id: 'cancelled', label: 'Cancelled', color: 'cancelled' }
|
|
512
|
+
];
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Generate kanban card HTML for a single plan (enhanced with details)
|
|
516
|
+
* @param {Object} plan - Plan metadata
|
|
517
|
+
* @returns {string} - Card HTML
|
|
518
|
+
*/
|
|
519
|
+
function generateKanbanCard(plan) {
|
|
520
|
+
const progressPct = Math.round(plan.progress || 0);
|
|
521
|
+
const dateStr = formatRelativeTime(plan.lastModified);
|
|
522
|
+
|
|
523
|
+
// Priority badge
|
|
524
|
+
let priorityHtml = '';
|
|
525
|
+
if (plan.priority) {
|
|
526
|
+
const priorityColorClass = getPriorityColorClass(plan.priority);
|
|
527
|
+
if (priorityColorClass) {
|
|
528
|
+
priorityHtml = `<span class="kanban-card-priority ${priorityColorClass}">${escapeHtml(plan.priority)}</span>`;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// Description (truncated)
|
|
533
|
+
let descriptionHtml = '';
|
|
534
|
+
if (plan.description) {
|
|
535
|
+
descriptionHtml = `<p class="kanban-card-description">${escapeHtml(truncate(plan.description, 80))}</p>`;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Tags (max 3 visible)
|
|
539
|
+
let tagsHtml = '';
|
|
540
|
+
if (plan.tags && Array.isArray(plan.tags) && plan.tags.length > 0) {
|
|
541
|
+
const visibleTags = plan.tags.slice(0, 3);
|
|
542
|
+
const hiddenCount = plan.tags.length - 3;
|
|
543
|
+
tagsHtml = '<div class="kanban-card-tags">';
|
|
544
|
+
tagsHtml += visibleTags.map(tag => `<span class="kanban-card-tag">${escapeHtml(tag)}</span>`).join('');
|
|
545
|
+
if (hiddenCount > 0) {
|
|
546
|
+
tagsHtml += `<span class="kanban-card-tag tag-more">+${hiddenCount}</span>`;
|
|
547
|
+
}
|
|
548
|
+
tagsHtml += '</div>';
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// Footer with effort and phases
|
|
552
|
+
let footerHtml = '';
|
|
553
|
+
const effortHtml = plan.totalEffortFormatted
|
|
554
|
+
? `<span class="kanban-card-effort"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>${escapeHtml(plan.totalEffortFormatted)}</span>`
|
|
555
|
+
: '';
|
|
556
|
+
const phasesHtml = plan.phases && plan.phases.total
|
|
557
|
+
? `<span class="kanban-card-phases">${plan.phases.total} phases</span>`
|
|
558
|
+
: '';
|
|
559
|
+
if (effortHtml || phasesHtml) {
|
|
560
|
+
footerHtml = `<div class="kanban-card-footer">${effortHtml}${phasesHtml}</div>`;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return `
|
|
564
|
+
<a href="/view?file=${encodeURIComponent(plan.path)}" class="kanban-card" data-id="${escapeHtml(plan.id)}">
|
|
565
|
+
<div class="kanban-card-header">
|
|
566
|
+
<h4 class="kanban-card-title">${escapeHtml(plan.name)}</h4>
|
|
567
|
+
${priorityHtml}
|
|
568
|
+
</div>
|
|
569
|
+
${descriptionHtml}
|
|
570
|
+
<div class="kanban-card-meta">
|
|
571
|
+
<div class="kanban-card-progress">
|
|
572
|
+
<div class="kanban-card-progress-bar">
|
|
573
|
+
<div class="kanban-card-progress-fill" style="width: ${progressPct}%"></div>
|
|
574
|
+
</div>
|
|
575
|
+
<span>${progressPct}%</span>
|
|
576
|
+
</div>
|
|
577
|
+
<span class="kanban-card-date">${dateStr}</span>
|
|
578
|
+
</div>
|
|
579
|
+
${tagsHtml}
|
|
580
|
+
${footerHtml}
|
|
581
|
+
</a>
|
|
582
|
+
`;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Generate kanban board columns HTML
|
|
587
|
+
* @param {Array} plans - Array of plan metadata objects
|
|
588
|
+
* @returns {string} - Kanban columns HTML
|
|
589
|
+
*/
|
|
590
|
+
function generateKanbanColumns(plans) {
|
|
591
|
+
if (!plans || plans.length === 0) {
|
|
592
|
+
// Return empty columns structure
|
|
593
|
+
return STATUS_COLUMNS.map(col => `
|
|
594
|
+
<div class="kanban-column" data-status="${col.id}">
|
|
595
|
+
<div class="kanban-column-header">
|
|
596
|
+
<div class="kanban-column-title">
|
|
597
|
+
<span class="kanban-status-dot ${col.color}"></span>
|
|
598
|
+
<span>${col.label}</span>
|
|
599
|
+
</div>
|
|
600
|
+
<span class="kanban-column-count">0</span>
|
|
601
|
+
</div>
|
|
602
|
+
<div class="kanban-cards">
|
|
603
|
+
<div class="kanban-empty">
|
|
604
|
+
<svg class="kanban-empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
605
|
+
<rect x="3" y="3" width="18" height="18" rx="2"/>
|
|
606
|
+
<path d="M9 9h6M9 13h6M9 17h4"/>
|
|
607
|
+
</svg>
|
|
608
|
+
<span>No plans</span>
|
|
609
|
+
</div>
|
|
610
|
+
</div>
|
|
611
|
+
</div>
|
|
612
|
+
`).join('');
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// Group plans by status
|
|
616
|
+
const grouped = {};
|
|
617
|
+
STATUS_COLUMNS.forEach(col => {
|
|
618
|
+
grouped[col.id] = [];
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
plans.forEach(plan => {
|
|
622
|
+
const status = plan.status || 'pending';
|
|
623
|
+
if (grouped[status]) {
|
|
624
|
+
grouped[status].push(plan);
|
|
625
|
+
} else {
|
|
626
|
+
grouped['pending'].push(plan);
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
// Generate column HTML
|
|
631
|
+
return STATUS_COLUMNS.map(col => {
|
|
632
|
+
const columnPlans = grouped[col.id];
|
|
633
|
+
const cardsHtml = columnPlans.length > 0
|
|
634
|
+
? columnPlans.map(generateKanbanCard).join('')
|
|
635
|
+
: `<div class="kanban-empty">
|
|
636
|
+
<svg class="kanban-empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
637
|
+
<rect x="3" y="3" width="18" height="18" rx="2"/>
|
|
638
|
+
<path d="M9 9h6M9 13h6M9 17h4"/>
|
|
639
|
+
</svg>
|
|
640
|
+
<span>No plans</span>
|
|
641
|
+
</div>`;
|
|
642
|
+
|
|
643
|
+
return `
|
|
644
|
+
<div class="kanban-column" data-status="${col.id}">
|
|
645
|
+
<div class="kanban-column-header">
|
|
646
|
+
<div class="kanban-column-title">
|
|
647
|
+
<span class="kanban-status-dot ${col.color}"></span>
|
|
648
|
+
<span>${col.label}</span>
|
|
649
|
+
</div>
|
|
650
|
+
<span class="kanban-column-count">${columnPlans.length}</span>
|
|
651
|
+
</div>
|
|
652
|
+
<div class="kanban-cards">
|
|
653
|
+
${cardsHtml}
|
|
654
|
+
</div>
|
|
655
|
+
</div>
|
|
656
|
+
`;
|
|
657
|
+
}).join('');
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Calculate statistics from plans array
|
|
662
|
+
* @param {Array} plans - Array of plan metadata objects
|
|
663
|
+
* @returns {Object} - Statistics object
|
|
664
|
+
*/
|
|
665
|
+
function calculateStats(plans) {
|
|
666
|
+
const stats = {
|
|
667
|
+
total: plans.length,
|
|
668
|
+
completed: 0,
|
|
669
|
+
inProgress: 0,
|
|
670
|
+
pending: 0
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
plans.forEach(plan => {
|
|
674
|
+
const status = (plan.status || 'pending').replace(/\s+/g, '-');
|
|
675
|
+
if (status === 'completed' || status === 'complete') {
|
|
676
|
+
stats.completed++;
|
|
677
|
+
} else if (status === 'in-progress') {
|
|
678
|
+
stats.inProgress++;
|
|
679
|
+
} else {
|
|
680
|
+
stats.pending++;
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
return stats;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Render complete dashboard HTML
|
|
689
|
+
* @param {Array} plans - Array of plan metadata objects
|
|
690
|
+
* @param {Object} options - Render options
|
|
691
|
+
* @param {string} options.assetsDir - Assets directory path
|
|
692
|
+
* @param {string} options.plansDir - Plans directory path
|
|
693
|
+
* @returns {string} - Complete HTML page
|
|
694
|
+
*/
|
|
695
|
+
function renderDashboard(plans, options = {}) {
|
|
696
|
+
const { assetsDir } = options;
|
|
697
|
+
|
|
698
|
+
// Load template
|
|
699
|
+
const templatePath = path.join(assetsDir, 'dashboard-template.html');
|
|
700
|
+
let template;
|
|
701
|
+
|
|
702
|
+
try {
|
|
703
|
+
template = fs.readFileSync(templatePath, 'utf8');
|
|
704
|
+
} catch (err) {
|
|
705
|
+
// Fallback inline template if file not found
|
|
706
|
+
template = getInlineTemplate();
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// Calculate statistics
|
|
710
|
+
const stats = calculateStats(plans);
|
|
711
|
+
|
|
712
|
+
// Generate cards
|
|
713
|
+
const plansGrid = generatePlansGrid(plans);
|
|
714
|
+
const planCount = plans.length;
|
|
715
|
+
|
|
716
|
+
// Generate timeline section
|
|
717
|
+
const timelineSection = generateTimelineSection(plans);
|
|
718
|
+
|
|
719
|
+
// Generate kanban columns
|
|
720
|
+
const kanbanColumns = generateKanbanColumns(plans);
|
|
721
|
+
|
|
722
|
+
// Generate JSON for client-side filtering (include rich metadata)
|
|
723
|
+
const plansJson = JSON.stringify(plans.map(p => ({
|
|
724
|
+
id: p.id,
|
|
725
|
+
name: p.name,
|
|
726
|
+
status: p.status,
|
|
727
|
+
progress: p.progress,
|
|
728
|
+
lastModified: p.lastModified,
|
|
729
|
+
phasesTotal: p.phases.total,
|
|
730
|
+
path: p.path, // Required for kanban card links
|
|
731
|
+
// Rich metadata
|
|
732
|
+
createdDate: p.createdDate,
|
|
733
|
+
completedDate: p.completedDate,
|
|
734
|
+
durationDays: p.durationDays,
|
|
735
|
+
durationFormatted: p.durationFormatted,
|
|
736
|
+
totalEffortHours: p.totalEffortHours,
|
|
737
|
+
totalEffortFormatted: p.totalEffortFormatted,
|
|
738
|
+
priority: p.priority,
|
|
739
|
+
issue: p.issue,
|
|
740
|
+
branch: p.branch,
|
|
741
|
+
// New frontmatter fields
|
|
742
|
+
description: p.description,
|
|
743
|
+
tags: p.tags || [],
|
|
744
|
+
assignee: p.assignee
|
|
745
|
+
})));
|
|
746
|
+
|
|
747
|
+
// Replace placeholders
|
|
748
|
+
template = template
|
|
749
|
+
.replace(/\{\{plans-grid\}\}/g, plansGrid)
|
|
750
|
+
.replace(/\{\{kanban-columns\}\}/g, kanbanColumns)
|
|
751
|
+
.replace(/\{\{plan-count\}\}/g, String(planCount))
|
|
752
|
+
.replace(/\{\{plans-json\}\}/g, plansJson)
|
|
753
|
+
.replace(/\{\{empty-state\}\}/g, generateEmptyState())
|
|
754
|
+
.replace(/\{\{timeline-section\}\}/g, timelineSection)
|
|
755
|
+
.replace(/\{\{has-plans\}\}/g, plans.length > 0 ? 'plans-loaded' : '')
|
|
756
|
+
.replace(/\{\{stat-total\}\}/g, String(stats.total))
|
|
757
|
+
.replace(/\{\{stat-completed\}\}/g, String(stats.completed))
|
|
758
|
+
.replace(/\{\{stat-in-progress\}\}/g, String(stats.inProgress))
|
|
759
|
+
.replace(/\{\{stat-pending\}\}/g, String(stats.pending));
|
|
760
|
+
|
|
761
|
+
return template;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Get inline fallback template
|
|
766
|
+
* @returns {string} - Inline HTML template
|
|
767
|
+
*/
|
|
768
|
+
function getInlineTemplate() {
|
|
769
|
+
return `<!DOCTYPE html>
|
|
770
|
+
<html lang="en" data-theme="light">
|
|
771
|
+
<head>
|
|
772
|
+
<meta charset="UTF-8">
|
|
773
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
774
|
+
<title>Plans Dashboard</title>
|
|
775
|
+
<link rel="icon" type="image/png" href="/assets/favicon.png">
|
|
776
|
+
<link rel="stylesheet" href="/assets/novel-theme.css">
|
|
777
|
+
<link rel="stylesheet" href="/assets/dashboard.css">
|
|
778
|
+
</head>
|
|
779
|
+
<body class="dashboard-view {{has-plans}}">
|
|
780
|
+
<header class="dashboard-header">
|
|
781
|
+
<div class="header-left">
|
|
782
|
+
<h1>Plans Dashboard</h1>
|
|
783
|
+
</div>
|
|
784
|
+
<div class="header-right">
|
|
785
|
+
<button id="theme-toggle" class="icon-btn" aria-label="Toggle theme">
|
|
786
|
+
<svg class="sun-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
787
|
+
<circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
|
|
788
|
+
</svg>
|
|
789
|
+
<svg class="moon-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
790
|
+
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
|
|
791
|
+
</svg>
|
|
792
|
+
</button>
|
|
793
|
+
</div>
|
|
794
|
+
</header>
|
|
795
|
+
|
|
796
|
+
<main role="main" aria-label="Plans Dashboard">
|
|
797
|
+
<section class="stats-hero" aria-label="Plan statistics">
|
|
798
|
+
<div class="stat-card total">
|
|
799
|
+
<div class="stat-icon">📋</div>
|
|
800
|
+
<div class="stat-value">{{stat-total}}</div>
|
|
801
|
+
<div class="stat-label">Total Plans</div>
|
|
802
|
+
</div>
|
|
803
|
+
<div class="stat-card completed">
|
|
804
|
+
<div class="stat-icon">✅</div>
|
|
805
|
+
<div class="stat-value">{{stat-completed}}</div>
|
|
806
|
+
<div class="stat-label">Completed</div>
|
|
807
|
+
</div>
|
|
808
|
+
<div class="stat-card in-progress">
|
|
809
|
+
<div class="stat-icon">🔄</div>
|
|
810
|
+
<div class="stat-value">{{stat-in-progress}}</div>
|
|
811
|
+
<div class="stat-label">In Progress</div>
|
|
812
|
+
</div>
|
|
813
|
+
<div class="stat-card pending">
|
|
814
|
+
<div class="stat-icon">⏳</div>
|
|
815
|
+
<div class="stat-value">{{stat-pending}}</div>
|
|
816
|
+
<div class="stat-label">Pending</div>
|
|
817
|
+
</div>
|
|
818
|
+
</section>
|
|
819
|
+
|
|
820
|
+
<div class="dashboard-controls">
|
|
821
|
+
<div class="search-box">
|
|
822
|
+
<svg class="search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
823
|
+
<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/>
|
|
824
|
+
</svg>
|
|
825
|
+
<input type="search" id="plan-search" placeholder="Search plans..." aria-label="Search plans">
|
|
826
|
+
</div>
|
|
827
|
+
|
|
828
|
+
<select id="sort-select" aria-label="Sort plans by">
|
|
829
|
+
<option value="date-desc">Newest First</option>
|
|
830
|
+
<option value="date-asc">Oldest First</option>
|
|
831
|
+
<option value="name-asc">Name A-Z</option>
|
|
832
|
+
<option value="name-desc">Name Z-A</option>
|
|
833
|
+
<option value="progress-desc">Most Progress</option>
|
|
834
|
+
<option value="progress-asc">Least Progress</option>
|
|
835
|
+
</select>
|
|
836
|
+
|
|
837
|
+
<div class="filter-pills" role="group" aria-label="Filter by status">
|
|
838
|
+
<button class="filter-pill active" data-filter="all" aria-pressed="true">All</button>
|
|
839
|
+
<button class="filter-pill" data-filter="completed" aria-pressed="false">Completed</button>
|
|
840
|
+
<button class="filter-pill" data-filter="in-progress" aria-pressed="false">In Progress</button>
|
|
841
|
+
<button class="filter-pill" data-filter="pending" aria-pressed="false">Pending</button>
|
|
842
|
+
</div>
|
|
843
|
+
|
|
844
|
+
<div role="status" aria-live="polite" class="result-count">
|
|
845
|
+
Showing <strong>{{plan-count}}</strong> plans
|
|
846
|
+
</div>
|
|
847
|
+
</div>
|
|
848
|
+
|
|
849
|
+
<section class="plans-grid" aria-label="Plans list">
|
|
850
|
+
{{plans-grid}}
|
|
851
|
+
</section>
|
|
852
|
+
|
|
853
|
+
{{empty-state}}
|
|
854
|
+
</main>
|
|
855
|
+
|
|
856
|
+
<script>window.__plans = {{plans-json}};</script>
|
|
857
|
+
<script src="/assets/dashboard.js"></script>
|
|
858
|
+
</body>
|
|
859
|
+
</html>`;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
module.exports = {
|
|
863
|
+
renderDashboard,
|
|
864
|
+
generatePlanCard,
|
|
865
|
+
generateCardMeta,
|
|
866
|
+
generateTagsPills,
|
|
867
|
+
generateProgressRing,
|
|
868
|
+
generateProgressBar,
|
|
869
|
+
generateStatusCounts,
|
|
870
|
+
generateStatusBadge,
|
|
871
|
+
generateTimelineSection,
|
|
872
|
+
generateEmptyState,
|
|
873
|
+
generatePlansGrid,
|
|
874
|
+
generateKanbanColumns,
|
|
875
|
+
generateKanbanCard,
|
|
876
|
+
calculateStats,
|
|
877
|
+
escapeHtml,
|
|
878
|
+
truncate,
|
|
879
|
+
formatDate,
|
|
880
|
+
formatRelativeTime,
|
|
881
|
+
getStatusLabel,
|
|
882
|
+
getPriorityColorClass,
|
|
883
|
+
STATUS_COLUMNS
|
|
884
|
+
};
|