cokit-cli 1.0.9 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +32 -32
- package/README.FLOW.md +237 -237
- package/README.md +142 -92
- package/agents/brainstormer.agent.md +71 -71
- package/agents/code-reviewer.agent.md +136 -136
- package/agents/code-simplifier.agent.md +43 -0
- package/agents/debugger.agent.md +128 -128
- package/agents/docs-manager.agent.md +121 -121
- package/agents/fullstack-developer.agent.md +52 -0
- package/agents/git-manager.agent.md +390 -390
- package/agents/planner.agent.md +94 -94
- package/agents/researcher.agent.md +31 -32
- package/agents/scout.agent.md +107 -107
- package/agents/tester.agent.md +117 -117
- package/agents/ui-ux-designer.agent.md +57 -0
- package/bin/cokit.js +4 -4
- package/collections/ck-core.collection.yml +28 -28
- package/collections/ck-development-rules.collection.yml +18 -18
- package/collections/ck-documentation.collection.yml +14 -14
- package/collections/ck-git-workflow.collection.yml +12 -12
- package/collections/ck-orchestration.collection.yml +16 -16
- package/docs/README.md +75 -108
- package/docs/code-standards.md +68 -0
- package/docs/codebase-summary.md +263 -0
- package/docs/cokit-commands-usage-guide.md +138 -0
- package/docs/cokit-comprehensive-mapping-guide.md +361 -374
- package/docs/cokit-slides.md +212 -222
- package/docs/cokit-sync-and-maintenance-guide.md +414 -0
- package/docs/cokit-team-presentation.md +356 -378
- package/docs/copilot-processing-flow.md +215 -212
- package/docs/guide-next-steps-speckit-cokit-implementation.md +187 -0
- package/docs/migration-guide.md +133 -133
- package/docs/project-overview-pdr.md +45 -0
- package/docs/project-roadmap.md +308 -280
- package/docs/system-architecture.md +81 -0
- package/instructions/ck-backend.instructions.md +48 -48
- package/instructions/ck-development.instructions.md +54 -54
- package/instructions/ck-frontend.instructions.md +44 -44
- package/instructions/ck-research.instructions.md +167 -167
- package/instructions/ck-testing.instructions.md +36 -36
- package/package.json +71 -42
- package/prompts/ck-ask.prompt.md +67 -57
- package/prompts/ck-bootstrap.prompt.md +141 -136
- package/prompts/ck-brainstorm.prompt.md +87 -105
- package/prompts/ck-cook.prompt.md +96 -97
- package/prompts/ck-debug.prompt.md +115 -14
- package/prompts/ck-docs.prompt.md +102 -51
- package/prompts/ck-fix-ci.prompt.md +46 -0
- package/prompts/ck-fix-fast.prompt.md +44 -0
- package/prompts/ck-fix-hard.prompt.md +60 -0
- package/prompts/ck-fix-logs.prompt.md +53 -0
- package/prompts/ck-fix-test.prompt.md +47 -0
- package/prompts/ck-fix-types.prompt.md +29 -0
- package/prompts/ck-fix-ui.prompt.md +50 -0
- package/prompts/ck-fix.prompt.md +50 -44
- package/prompts/ck-git.prompt.md +104 -79
- package/{templates/repo/.github/prompts/ck-ck-help.prompt.md → prompts/ck-help.prompt.md} +142 -112
- package/prompts/ck-journal.prompt.md +19 -0
- package/prompts/ck-plan-fast.prompt.md +106 -0
- package/prompts/ck-plan-hard.prompt.md +133 -0
- package/prompts/ck-plan-validate.prompt.md +209 -0
- package/prompts/ck-plan.prompt.md +75 -80
- package/prompts/ck-preview.prompt.md +77 -0
- package/{templates/repo/.github/prompts/ck-review-codebase.prompt.md → prompts/ck-review.prompt.md} +58 -44
- package/prompts/ck-scout.prompt.md +85 -25
- package/prompts/ck-simplify.prompt.md +46 -0
- package/prompts/ck-spec-analyze.prompt.md +201 -0
- package/prompts/ck-spec-checklist.prompt.md +308 -0
- package/prompts/ck-spec-clarify.prompt.md +190 -0
- package/prompts/ck-spec-constitution.prompt.md +92 -0
- package/prompts/ck-spec-implement.prompt.md +157 -0
- package/prompts/ck-spec-plan.prompt.md +95 -0
- package/prompts/ck-spec-specify.prompt.md +260 -0
- package/prompts/ck-spec-tasks.prompt.md +181 -0
- package/prompts/ck-test.prompt.md +21 -10
- package/prompts/ck-watzup.prompt.md +21 -0
- package/skills/INSTALLATION.md +311 -0
- package/skills/README.md +112 -0
- package/skills/THIRD_PARTY_NOTICES.md +405 -0
- package/skills/agent-browser/SKILL.md +291 -0
- package/skills/agent-browser/references/.gitkeep +0 -0
- package/skills/agent-browser/references/browserbase-cloud-setup.md +161 -0
- package/skills/agent_skills_spec.md +55 -0
- package/skills/{ck-backend-development → backend-development}/SKILL.md +94 -96
- package/skills/{ck-backend-development → backend-development}/references/backend-api-design.md +697 -495
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-architecture.md +454 -454
- package/skills/{ck-backend-development → backend-development}/references/backend-authentication.md +433 -338
- package/skills/{ck-backend-development → backend-development}/references/backend-code-quality.md +659 -659
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-debugging.md +904 -904
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-devops.md +494 -494
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-mindset.md +387 -387
- package/skills/{ck-backend-development → backend-development}/references/backend-performance.md +397 -397
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-security.md +340 -290
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-technologies.md +300 -290
- package/{templates/repo/.github/skills/ck-backend-development → skills/backend-development}/references/backend-testing.md +484 -561
- package/skills/brainstorm/SKILL.md +74 -0
- package/skills/{ck-code-review → code-review}/SKILL.md +143 -143
- package/skills/{ck-code-review → code-review}/references/code-review-reception.md +1 -1
- package/skills/{ck-code-review → code-review}/references/requesting-code-review.md +7 -7
- package/skills/common/README.md +120 -0
- package/skills/common/api_key_helper.py +411 -0
- package/skills/common/api_key_rotator.py +248 -0
- package/skills/context-engineering/SKILL.md +106 -0
- package/skills/context-engineering/references/context-compression.md +84 -0
- package/skills/context-engineering/references/context-degradation.md +93 -0
- package/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/skills/context-engineering/references/context-optimization.md +82 -0
- package/skills/context-engineering/references/evaluation.md +89 -0
- package/skills/context-engineering/references/memory-systems.md +88 -0
- package/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/skills/context-engineering/references/project-development.md +97 -0
- package/skills/context-engineering/references/runtime-awareness.md +202 -0
- package/skills/context-engineering/references/tool-design.md +86 -0
- package/skills/context-engineering/scripts/compression_evaluator.py +349 -0
- package/skills/context-engineering/scripts/context_analyzer.py +317 -0
- package/skills/cook/README.md +86 -0
- package/skills/cook/SKILL.md +93 -0
- package/skills/cook/references/agent-patterns.md +75 -0
- package/skills/cook/references/intent-detection.md +101 -0
- package/skills/cook/references/review-cycle.md +75 -0
- package/skills/cook/references/workflow-steps.md +140 -0
- package/skills/databases/SKILL.md +111 -0
- package/skills/databases/analytics.md +198 -0
- package/skills/databases/db-design.md +188 -0
- package/skills/databases/incremental-etl.md +213 -0
- package/skills/databases/references/mongodb-aggregation.md +447 -0
- package/skills/databases/references/mongodb-atlas.md +465 -0
- package/skills/databases/references/mongodb-crud.md +408 -0
- package/skills/databases/references/mongodb-indexing.md +442 -0
- package/skills/databases/references/postgresql-administration.md +594 -0
- package/skills/databases/references/postgresql-performance.md +527 -0
- package/skills/databases/references/postgresql-psql-cli.md +467 -0
- package/skills/databases/references/postgresql-queries.md +475 -0
- package/skills/databases/scripts/db_backup.py +502 -0
- package/skills/databases/scripts/db_migrate.py +426 -0
- package/skills/databases/scripts/db_performance_check.py +457 -0
- package/skills/databases/scripts/requirements.txt +20 -0
- package/skills/databases/stacks/bigquery.md +231 -0
- package/skills/databases/stacks/d1_cloudflare.md +137 -0
- package/skills/databases/stacks/mysql.md +216 -0
- package/skills/databases/stacks/postgres.md +235 -0
- package/skills/databases/stacks/sqlite.md +244 -0
- package/skills/databases/transactional.md +176 -0
- package/{templates/repo/.github/skills/ck-debugging → skills/debug}/SKILL.md +83 -82
- package/{templates/repo/.github/skills/ck-debugging → skills/debug}/references/defense-in-depth.md +124 -124
- package/skills/{ck-debugging → debug}/references/root-cause-tracing.md +122 -122
- package/{templates/repo/.github/skills/ck-debugging → skills/debug}/references/systematic-debugging.md +102 -102
- package/skills/{ck-debugging → debug}/references/verification.md +123 -123
- package/{templates/repo/.github/skills/ck-debugging → skills/debug}/scripts/find-polluter.sh +63 -63
- package/{templates/repo/.github/skills/ck-debugging → skills/debug}/scripts/find-polluter.test.md +102 -102
- package/skills/devops/.env.example +76 -0
- package/skills/devops/SKILL.md +102 -0
- package/skills/devops/references/browser-rendering.md +305 -0
- package/skills/devops/references/cloudflare-d1-kv.md +123 -0
- package/skills/devops/references/cloudflare-platform.md +271 -0
- package/skills/devops/references/cloudflare-r2-storage.md +280 -0
- package/skills/devops/references/cloudflare-workers-advanced.md +312 -0
- package/skills/devops/references/cloudflare-workers-apis.md +309 -0
- package/skills/devops/references/cloudflare-workers-basics.md +418 -0
- package/skills/devops/references/docker-basics.md +297 -0
- package/skills/devops/references/docker-compose.md +292 -0
- package/skills/devops/references/gcloud-platform.md +297 -0
- package/skills/devops/references/gcloud-services.md +304 -0
- package/skills/devops/references/kubernetes-basics.md +99 -0
- package/skills/devops/references/kubernetes-helm-advanced.md +75 -0
- package/skills/devops/references/kubernetes-helm.md +81 -0
- package/skills/devops/references/kubernetes-kubectl.md +74 -0
- package/skills/devops/references/kubernetes-security-advanced.md +98 -0
- package/skills/devops/references/kubernetes-security.md +95 -0
- package/skills/devops/references/kubernetes-troubleshooting-advanced.md +74 -0
- package/skills/devops/references/kubernetes-troubleshooting.md +49 -0
- package/skills/devops/references/kubernetes-workflows-advanced.md +75 -0
- package/skills/devops/references/kubernetes-workflows.md +78 -0
- package/skills/devops/scripts/cloudflare_deploy.py +269 -0
- package/skills/devops/scripts/docker_optimize.py +332 -0
- package/skills/devops/scripts/requirements.txt +20 -0
- package/skills/docs-seeker/.env.example +15 -0
- package/skills/docs-seeker/SKILL.md +96 -0
- package/skills/docs-seeker/package.json +25 -0
- package/skills/docs-seeker/references/advanced.md +79 -0
- package/skills/docs-seeker/references/context7-patterns.md +64 -0
- package/skills/docs-seeker/references/errors.md +68 -0
- package/skills/docs-seeker/scripts/analyze-llms-txt.js +211 -0
- package/skills/docs-seeker/scripts/detect-topic.js +172 -0
- package/skills/docs-seeker/scripts/fetch-docs.js +214 -0
- package/skills/docs-seeker/scripts/utils/env-loader.js +94 -0
- package/skills/docs-seeker/workflows/library-search.md +86 -0
- package/skills/docs-seeker/workflows/repo-analysis.md +91 -0
- package/skills/docs-seeker/workflows/topic-search.md +77 -0
- package/skills/fix/SKILL.md +100 -0
- package/skills/fix/references/complexity-assessment.md +61 -0
- package/skills/fix/references/mode-selection.md +30 -0
- package/skills/fix/references/parallel-exploration.md +77 -0
- package/skills/fix/references/review-cycle.md +77 -0
- package/skills/fix/references/skill-activation-matrix.md +65 -0
- package/skills/fix/references/workflow-ci.md +28 -0
- package/skills/fix/references/workflow-deep.md +91 -0
- package/skills/fix/references/workflow-logs.md +36 -0
- package/skills/fix/references/workflow-quick.md +59 -0
- package/skills/fix/references/workflow-standard.md +86 -0
- package/skills/fix/references/workflow-test.md +36 -0
- package/skills/fix/references/workflow-types.md +33 -0
- package/skills/fix/references/workflow-ui.md +34 -0
- package/skills/frontend-design/SKILL.md +74 -0
- package/skills/frontend-design/references/analysis-best-practices.md +80 -0
- package/skills/frontend-design/references/analysis-prompts.md +141 -0
- package/skills/frontend-design/references/analysis-techniques.md +118 -0
- package/skills/frontend-design/references/animejs.md +396 -0
- package/skills/frontend-design/references/asset-generation.md +161 -0
- package/skills/frontend-design/references/design-extraction-overview.md +71 -0
- package/skills/frontend-design/references/extraction-best-practices.md +141 -0
- package/skills/frontend-design/references/extraction-output-templates.md +162 -0
- package/skills/frontend-design/references/extraction-prompts.md +127 -0
- package/skills/frontend-design/references/technical-accessibility.md +119 -0
- package/skills/frontend-design/references/technical-best-practices.md +97 -0
- package/skills/frontend-design/references/technical-optimization.md +44 -0
- package/skills/frontend-design/references/technical-overview.md +90 -0
- package/skills/frontend-design/references/technical-workflows.md +150 -0
- package/skills/frontend-design/references/visual-analysis-overview.md +95 -0
- package/skills/frontend-design/references/workflow-describe.md +86 -0
- package/skills/frontend-design/references/workflow-quick.md +54 -0
- package/skills/frontend-design/references/workflow-screenshot.md +62 -0
- package/skills/git/SKILL.md +99 -0
- package/skills/git/references/branch-management.md +88 -0
- package/skills/git/references/commit-standards.md +46 -0
- package/skills/git/references/gh-cli-guide.md +109 -0
- package/skills/git/references/safety-protocols.md +69 -0
- package/skills/git/references/workflow-commit.md +58 -0
- package/skills/git/references/workflow-merge.md +48 -0
- package/skills/git/references/workflow-pr.md +58 -0
- package/skills/git/references/workflow-push.md +52 -0
- package/skills/install.ps1 +1247 -0
- package/skills/install.sh +1300 -0
- package/skills/mcp-management/README.md +219 -0
- package/skills/mcp-management/SKILL.md +209 -0
- package/skills/mcp-management/assets/tools.json +3146 -0
- package/skills/mcp-management/references/configuration.md +114 -0
- package/skills/mcp-management/references/gemini-cli-integration.md +221 -0
- package/skills/mcp-management/references/mcp-protocol.md +116 -0
- package/skills/mcp-management/scripts/.env.example +10 -0
- package/skills/mcp-management/scripts/cli.ts +195 -0
- package/skills/mcp-management/scripts/dist/analyze-tools.js +70 -0
- package/skills/mcp-management/scripts/dist/cli.js +160 -0
- package/skills/mcp-management/scripts/dist/mcp-client.js +183 -0
- package/skills/mcp-management/scripts/mcp-client.ts +230 -0
- package/skills/mcp-management/scripts/package.json +20 -0
- package/skills/mcp-management/scripts/tsconfig.json +15 -0
- package/skills/mermaidjs-v11/SKILL.md +115 -0
- package/skills/mermaidjs-v11/references/cli-usage.md +228 -0
- package/skills/mermaidjs-v11/references/configuration.md +232 -0
- package/skills/mermaidjs-v11/references/diagram-types.md +315 -0
- package/skills/mermaidjs-v11/references/examples.md +344 -0
- package/skills/mermaidjs-v11/references/integration.md +310 -0
- package/skills/{ck-planning → planning}/SKILL.md +131 -112
- package/{templates/repo/.github/skills/ck-planning → skills/planning}/references/codebase-understanding.md +62 -62
- package/skills/{ck-planning → planning}/references/output-standards.md +141 -127
- package/{templates/repo/.github/skills/ck-planning → skills/planning}/references/plan-organization.md +160 -150
- package/skills/{ck-planning → planning}/references/research-phase.md +49 -49
- package/{templates/repo/.github/skills/ck-planning → skills/planning}/references/solution-design.md +63 -63
- package/skills/{ck-problem-solving → problem-solving}/SKILL.md +95 -95
- package/{templates/repo/.github/skills/ck-problem-solving → skills/problem-solving}/references/attribution.md +69 -69
- package/skills/{ck-problem-solving → problem-solving}/references/collision-zone-thinking.md +79 -79
- package/{templates/repo/.github/skills/ck-problem-solving → skills/problem-solving}/references/inversion-exercise.md +91 -91
- package/skills/{ck-problem-solving → problem-solving}/references/meta-pattern-recognition.md +87 -87
- package/skills/{ck-problem-solving → problem-solving}/references/scale-game.md +95 -95
- package/skills/{ck-problem-solving → problem-solving}/references/simplification-cascades.md +80 -80
- package/{templates/repo/.github/skills/ck-problem-solving → skills/problem-solving}/references/when-stuck.md +72 -72
- package/skills/repomix/SKILL.md +247 -0
- package/skills/repomix/references/configuration.md +211 -0
- package/skills/repomix/references/usage-patterns.md +232 -0
- package/skills/repomix/scripts/README.md +179 -0
- package/skills/repomix/scripts/repomix_batch.py +455 -0
- package/skills/repomix/scripts/repos.example.json +15 -0
- package/skills/repomix/scripts/requirements.txt +15 -0
- package/skills/research/SKILL.md +169 -0
- package/skills/scout/SKILL.md +78 -0
- package/skills/scout/references/external-scouting.md +140 -0
- package/skills/scout/references/internal-scouting.md +119 -0
- package/skills/{ck-sequential-thinking → sequential-thinking}/.env.example +8 -8
- package/skills/{ck-sequential-thinking → sequential-thinking}/README.md +183 -183
- package/{templates/repo/.github/skills/ck-sequential-thinking → skills/sequential-thinking}/SKILL.md +92 -92
- package/skills/{ck-sequential-thinking → sequential-thinking}/package.json +31 -31
- package/{templates/repo/.github/skills/ck-sequential-thinking → skills/sequential-thinking}/references/advanced-strategies.md +79 -79
- package/{templates/repo/.github/skills/ck-sequential-thinking → skills/sequential-thinking}/references/advanced-techniques.md +76 -76
- package/{templates/repo/.github/skills/ck-sequential-thinking → skills/sequential-thinking}/references/core-patterns.md +95 -95
- package/skills/{ck-sequential-thinking → sequential-thinking}/references/examples-api.md +88 -88
- package/skills/{ck-sequential-thinking → sequential-thinking}/references/examples-architecture.md +94 -94
- package/skills/{ck-sequential-thinking → sequential-thinking}/references/examples-debug.md +90 -90
- package/skills/{ck-sequential-thinking → sequential-thinking}/scripts/format-thought.js +159 -159
- package/{templates/repo/.github/skills/ck-sequential-thinking → skills/sequential-thinking}/scripts/process-thought.js +236 -236
- package/skills/ui-styling/LICENSE.txt +202 -0
- package/skills/ui-styling/SKILL.md +319 -0
- package/skills/ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/ui-styling/references/canvas-design-system.md +320 -0
- package/skills/ui-styling/references/shadcn-accessibility.md +471 -0
- package/skills/ui-styling/references/shadcn-components.md +424 -0
- package/skills/ui-styling/references/shadcn-theming.md +373 -0
- package/skills/ui-styling/references/tailwind-customization.md +483 -0
- package/skills/ui-styling/references/tailwind-responsive.md +382 -0
- package/skills/ui-styling/references/tailwind-utilities.md +455 -0
- package/skills/ui-styling/scripts/requirements.txt +17 -0
- package/skills/ui-styling/scripts/shadcn_add.py +292 -0
- package/skills/ui-styling/scripts/tailwind_config_gen.py +456 -0
- package/skills/web-testing/SKILL.md +94 -0
- package/skills/web-testing/references/accessibility-testing.md +84 -0
- package/skills/web-testing/references/api-testing.md +78 -0
- package/skills/web-testing/references/ci-cd-testing-workflows.md +121 -0
- package/skills/web-testing/references/component-testing.md +94 -0
- package/skills/web-testing/references/contract-testing.md +146 -0
- package/skills/web-testing/references/cross-browser-checklist.md +72 -0
- package/skills/web-testing/references/database-testing.md +139 -0
- package/skills/web-testing/references/e2e-testing-playwright.md +119 -0
- package/skills/web-testing/references/functional-testing-checklist.md +88 -0
- package/skills/web-testing/references/interactive-testing-patterns.md +89 -0
- package/skills/web-testing/references/load-testing-k6.md +93 -0
- package/skills/web-testing/references/mobile-gesture-testing.md +85 -0
- package/skills/web-testing/references/performance-core-web-vitals.md +124 -0
- package/skills/web-testing/references/playwright-component-testing.md +115 -0
- package/skills/web-testing/references/pre-release-checklist.md +75 -0
- package/skills/web-testing/references/security-checklists.md +81 -0
- package/skills/web-testing/references/security-testing-overview.md +92 -0
- package/skills/web-testing/references/shadow-dom-testing.md +70 -0
- package/skills/web-testing/references/test-data-management.md +131 -0
- package/skills/web-testing/references/test-flakiness-mitigation.md +86 -0
- package/skills/web-testing/references/testing-pyramid-strategy.md +76 -0
- package/skills/web-testing/references/unit-integration-testing.md +138 -0
- package/skills/web-testing/references/visual-regression.md +92 -0
- package/skills/web-testing/references/vulnerability-payloads.md +93 -0
- package/skills/web-testing/scripts/analyze-test-results.js +280 -0
- package/skills/web-testing/scripts/init-playwright.js +233 -0
- package/src/commands/add.js +93 -93
- package/src/commands/doctor.js +117 -117
- package/src/commands/init.js +183 -183
- package/src/commands/list.js +91 -91
- package/src/commands/update.js +22 -22
- package/src/index.js +35 -35
- package/src/utils/colors.js +14 -14
- package/src/utils/copy.js +122 -122
- package/src/utils/paths.js +66 -66
- package/src/utils/update-checker.js +126 -126
- package/templates/repo/.github/AGENTS.md +103 -55
- package/templates/repo/.github/agents/brainstormer.agent.md +71 -71
- package/templates/repo/.github/agents/code-reviewer.agent.md +136 -136
- package/templates/repo/.github/agents/code-simplifier.agent.md +43 -0
- package/templates/repo/.github/agents/debugger.agent.md +128 -128
- package/templates/repo/.github/agents/docs-manager.agent.md +121 -121
- package/templates/repo/.github/agents/fullstack-developer.agent.md +52 -0
- package/templates/repo/.github/agents/git-manager.agent.md +390 -390
- package/templates/repo/.github/agents/planner.agent.md +94 -94
- package/templates/repo/.github/agents/researcher.agent.md +31 -32
- package/templates/repo/.github/agents/scout.agent.md +107 -107
- package/templates/repo/.github/agents/tester.agent.md +117 -117
- package/templates/repo/.github/agents/ui-ux-designer.agent.md +57 -0
- package/templates/repo/.github/collections/ck-core.collection.yml +28 -28
- package/templates/repo/.github/collections/ck-development-rules.collection.yml +18 -18
- package/templates/repo/.github/collections/ck-documentation.collection.yml +14 -14
- package/templates/repo/.github/collections/ck-git-workflow.collection.yml +12 -12
- package/templates/repo/.github/collections/ck-orchestration.collection.yml +16 -16
- package/templates/repo/.github/instructions/ck-backend.instructions.md +48 -48
- package/templates/repo/.github/instructions/ck-development.instructions.md +54 -54
- package/templates/repo/.github/instructions/ck-frontend.instructions.md +44 -44
- package/templates/repo/.github/instructions/ck-research.instructions.md +167 -167
- package/templates/repo/.github/instructions/ck-testing.instructions.md +36 -36
- package/templates/repo/.github/prompts/ck-ask.prompt.md +67 -57
- package/templates/repo/.github/prompts/ck-bootstrap.prompt.md +141 -136
- package/templates/repo/.github/prompts/ck-brainstorm.prompt.md +87 -105
- package/templates/repo/.github/prompts/ck-cook.prompt.md +96 -97
- package/templates/repo/.github/prompts/ck-debug.prompt.md +115 -14
- package/templates/repo/.github/prompts/ck-docs.prompt.md +102 -51
- package/templates/repo/.github/prompts/ck-fix-ci.prompt.md +46 -0
- package/templates/repo/.github/prompts/ck-fix-fast.prompt.md +44 -0
- package/templates/repo/.github/prompts/ck-fix-hard.prompt.md +60 -0
- package/templates/repo/.github/prompts/ck-fix-logs.prompt.md +53 -0
- package/templates/repo/.github/prompts/ck-fix-test.prompt.md +47 -0
- package/templates/repo/.github/prompts/ck-fix-types.prompt.md +29 -0
- package/templates/repo/.github/prompts/ck-fix-ui.prompt.md +50 -0
- package/templates/repo/.github/prompts/ck-fix.prompt.md +50 -44
- package/templates/repo/.github/prompts/ck-git.prompt.md +104 -79
- package/{prompts/ck-ck-help.prompt.md → templates/repo/.github/prompts/ck-help.prompt.md} +142 -112
- package/templates/repo/.github/prompts/ck-journal.prompt.md +19 -0
- package/templates/repo/.github/prompts/ck-plan-fast.prompt.md +106 -0
- package/templates/repo/.github/prompts/ck-plan-hard.prompt.md +133 -0
- package/templates/repo/.github/prompts/ck-plan-validate.prompt.md +209 -0
- package/templates/repo/.github/prompts/ck-plan.prompt.md +75 -80
- package/templates/repo/.github/prompts/ck-preview.prompt.md +77 -0
- package/{prompts/ck-review-codebase.prompt.md → templates/repo/.github/prompts/ck-review.prompt.md} +58 -44
- package/templates/repo/.github/prompts/ck-scout.prompt.md +85 -25
- package/templates/repo/.github/prompts/ck-simplify.prompt.md +46 -0
- package/templates/repo/.github/prompts/ck-spec-analyze.prompt.md +201 -0
- package/templates/repo/.github/prompts/ck-spec-checklist.prompt.md +308 -0
- package/templates/repo/.github/prompts/ck-spec-clarify.prompt.md +190 -0
- package/templates/repo/.github/prompts/ck-spec-constitution.prompt.md +92 -0
- package/templates/repo/.github/prompts/ck-spec-implement.prompt.md +157 -0
- package/templates/repo/.github/prompts/ck-spec-plan.prompt.md +95 -0
- package/templates/repo/.github/prompts/ck-spec-specify.prompt.md +260 -0
- package/templates/repo/.github/prompts/ck-spec-tasks.prompt.md +181 -0
- package/templates/repo/.github/prompts/ck-test.prompt.md +21 -10
- package/templates/repo/.github/prompts/ck-watzup.prompt.md +21 -0
- package/templates/repo/.github/skills/INSTALLATION.md +311 -0
- package/templates/repo/.github/skills/README.md +112 -0
- package/templates/repo/.github/skills/THIRD_PARTY_NOTICES.md +405 -0
- package/templates/repo/.github/skills/agent-browser/SKILL.md +291 -0
- package/templates/repo/.github/skills/agent-browser/references/.gitkeep +0 -0
- package/templates/repo/.github/skills/agent-browser/references/browserbase-cloud-setup.md +161 -0
- package/templates/repo/.github/skills/agent_skills_spec.md +55 -0
- package/templates/repo/.github/skills/{ck-backend-development → backend-development}/SKILL.md +94 -96
- package/templates/repo/.github/skills/{ck-backend-development → backend-development}/references/backend-api-design.md +697 -495
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-architecture.md +454 -454
- package/templates/repo/.github/skills/{ck-backend-development → backend-development}/references/backend-authentication.md +433 -338
- package/templates/repo/.github/skills/{ck-backend-development → backend-development}/references/backend-code-quality.md +659 -659
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-debugging.md +904 -904
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-devops.md +494 -494
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-mindset.md +387 -387
- package/templates/repo/.github/skills/{ck-backend-development → backend-development}/references/backend-performance.md +397 -397
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-security.md +340 -290
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-technologies.md +300 -290
- package/{skills/ck-backend-development → templates/repo/.github/skills/backend-development}/references/backend-testing.md +484 -561
- package/templates/repo/.github/skills/brainstorm/SKILL.md +74 -0
- package/templates/repo/.github/skills/{ck-code-review → code-review}/SKILL.md +143 -143
- package/templates/repo/.github/skills/{ck-code-review → code-review}/references/code-review-reception.md +208 -208
- package/templates/repo/.github/skills/{ck-code-review → code-review}/references/requesting-code-review.md +104 -104
- package/templates/repo/.github/skills/{ck-code-review → code-review}/references/verification-before-completion.md +138 -138
- package/templates/repo/.github/skills/common/README.md +120 -0
- package/templates/repo/.github/skills/common/api_key_helper.py +411 -0
- package/templates/repo/.github/skills/common/api_key_rotator.py +248 -0
- package/templates/repo/.github/skills/context-engineering/SKILL.md +106 -0
- package/templates/repo/.github/skills/context-engineering/references/context-compression.md +84 -0
- package/templates/repo/.github/skills/context-engineering/references/context-degradation.md +93 -0
- package/templates/repo/.github/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/templates/repo/.github/skills/context-engineering/references/context-optimization.md +82 -0
- package/templates/repo/.github/skills/context-engineering/references/evaluation.md +89 -0
- package/templates/repo/.github/skills/context-engineering/references/memory-systems.md +88 -0
- package/templates/repo/.github/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/templates/repo/.github/skills/context-engineering/references/project-development.md +97 -0
- package/templates/repo/.github/skills/context-engineering/references/runtime-awareness.md +202 -0
- package/templates/repo/.github/skills/context-engineering/references/tool-design.md +86 -0
- package/templates/repo/.github/skills/context-engineering/scripts/compression_evaluator.py +349 -0
- package/templates/repo/.github/skills/context-engineering/scripts/context_analyzer.py +317 -0
- package/templates/repo/.github/skills/cook/README.md +86 -0
- package/templates/repo/.github/skills/cook/SKILL.md +93 -0
- package/templates/repo/.github/skills/cook/references/agent-patterns.md +75 -0
- package/templates/repo/.github/skills/cook/references/intent-detection.md +101 -0
- package/templates/repo/.github/skills/cook/references/review-cycle.md +75 -0
- package/templates/repo/.github/skills/cook/references/workflow-steps.md +140 -0
- package/templates/repo/.github/skills/databases/SKILL.md +111 -0
- package/templates/repo/.github/skills/databases/analytics.md +198 -0
- package/templates/repo/.github/skills/databases/db-design.md +188 -0
- package/templates/repo/.github/skills/databases/incremental-etl.md +213 -0
- package/templates/repo/.github/skills/databases/references/mongodb-aggregation.md +447 -0
- package/templates/repo/.github/skills/databases/references/mongodb-atlas.md +465 -0
- package/templates/repo/.github/skills/databases/references/mongodb-crud.md +408 -0
- package/templates/repo/.github/skills/databases/references/mongodb-indexing.md +442 -0
- package/templates/repo/.github/skills/databases/references/postgresql-administration.md +594 -0
- package/templates/repo/.github/skills/databases/references/postgresql-performance.md +527 -0
- package/templates/repo/.github/skills/databases/references/postgresql-psql-cli.md +467 -0
- package/templates/repo/.github/skills/databases/references/postgresql-queries.md +475 -0
- package/templates/repo/.github/skills/databases/scripts/db_backup.py +502 -0
- package/templates/repo/.github/skills/databases/scripts/db_migrate.py +426 -0
- package/templates/repo/.github/skills/databases/scripts/db_performance_check.py +457 -0
- package/templates/repo/.github/skills/databases/scripts/requirements.txt +20 -0
- package/templates/repo/.github/skills/databases/stacks/bigquery.md +231 -0
- package/templates/repo/.github/skills/databases/stacks/d1_cloudflare.md +137 -0
- package/templates/repo/.github/skills/databases/stacks/mysql.md +216 -0
- package/templates/repo/.github/skills/databases/stacks/postgres.md +235 -0
- package/templates/repo/.github/skills/databases/stacks/sqlite.md +244 -0
- package/templates/repo/.github/skills/databases/transactional.md +176 -0
- package/{skills/ck-debugging → templates/repo/.github/skills/debug}/SKILL.md +83 -82
- package/{skills/ck-debugging → templates/repo/.github/skills/debug}/references/defense-in-depth.md +124 -124
- package/templates/repo/.github/skills/{ck-debugging → debug}/references/root-cause-tracing.md +122 -122
- package/{skills/ck-debugging → templates/repo/.github/skills/debug}/references/systematic-debugging.md +102 -102
- package/templates/repo/.github/skills/{ck-debugging → debug}/references/verification.md +123 -123
- package/{skills/ck-debugging → templates/repo/.github/skills/debug}/scripts/find-polluter.sh +63 -63
- package/{skills/ck-debugging → templates/repo/.github/skills/debug}/scripts/find-polluter.test.md +102 -102
- package/templates/repo/.github/skills/devops/.env.example +76 -0
- package/templates/repo/.github/skills/devops/SKILL.md +102 -0
- package/templates/repo/.github/skills/devops/references/browser-rendering.md +305 -0
- package/templates/repo/.github/skills/devops/references/cloudflare-d1-kv.md +123 -0
- package/templates/repo/.github/skills/devops/references/cloudflare-platform.md +271 -0
- package/templates/repo/.github/skills/devops/references/cloudflare-r2-storage.md +280 -0
- package/templates/repo/.github/skills/devops/references/cloudflare-workers-advanced.md +312 -0
- package/templates/repo/.github/skills/devops/references/cloudflare-workers-apis.md +309 -0
- package/templates/repo/.github/skills/devops/references/cloudflare-workers-basics.md +418 -0
- package/templates/repo/.github/skills/devops/references/docker-basics.md +297 -0
- package/templates/repo/.github/skills/devops/references/docker-compose.md +292 -0
- package/templates/repo/.github/skills/devops/references/gcloud-platform.md +297 -0
- package/templates/repo/.github/skills/devops/references/gcloud-services.md +304 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-basics.md +99 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-helm-advanced.md +75 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-helm.md +81 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-kubectl.md +74 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-security-advanced.md +98 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-security.md +95 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-troubleshooting-advanced.md +74 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-troubleshooting.md +49 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-workflows-advanced.md +75 -0
- package/templates/repo/.github/skills/devops/references/kubernetes-workflows.md +78 -0
- package/templates/repo/.github/skills/devops/scripts/cloudflare_deploy.py +269 -0
- package/templates/repo/.github/skills/devops/scripts/docker_optimize.py +332 -0
- package/templates/repo/.github/skills/devops/scripts/requirements.txt +20 -0
- package/templates/repo/.github/skills/docs-seeker/.env.example +15 -0
- package/templates/repo/.github/skills/docs-seeker/SKILL.md +96 -0
- package/templates/repo/.github/skills/docs-seeker/package.json +25 -0
- package/templates/repo/.github/skills/docs-seeker/references/advanced.md +79 -0
- package/templates/repo/.github/skills/docs-seeker/references/context7-patterns.md +64 -0
- package/templates/repo/.github/skills/docs-seeker/references/errors.md +68 -0
- package/templates/repo/.github/skills/docs-seeker/scripts/analyze-llms-txt.js +211 -0
- package/templates/repo/.github/skills/docs-seeker/scripts/detect-topic.js +172 -0
- package/templates/repo/.github/skills/docs-seeker/scripts/fetch-docs.js +214 -0
- package/templates/repo/.github/skills/docs-seeker/scripts/utils/env-loader.js +94 -0
- package/templates/repo/.github/skills/docs-seeker/workflows/library-search.md +86 -0
- package/templates/repo/.github/skills/docs-seeker/workflows/repo-analysis.md +91 -0
- package/templates/repo/.github/skills/docs-seeker/workflows/topic-search.md +77 -0
- package/templates/repo/.github/skills/fix/SKILL.md +100 -0
- package/templates/repo/.github/skills/fix/references/complexity-assessment.md +61 -0
- package/templates/repo/.github/skills/fix/references/mode-selection.md +30 -0
- package/templates/repo/.github/skills/fix/references/parallel-exploration.md +77 -0
- package/templates/repo/.github/skills/fix/references/review-cycle.md +77 -0
- package/templates/repo/.github/skills/fix/references/skill-activation-matrix.md +65 -0
- package/templates/repo/.github/skills/fix/references/workflow-ci.md +28 -0
- package/templates/repo/.github/skills/fix/references/workflow-deep.md +91 -0
- package/templates/repo/.github/skills/fix/references/workflow-logs.md +36 -0
- package/templates/repo/.github/skills/fix/references/workflow-quick.md +59 -0
- package/templates/repo/.github/skills/fix/references/workflow-standard.md +86 -0
- package/templates/repo/.github/skills/fix/references/workflow-test.md +36 -0
- package/templates/repo/.github/skills/fix/references/workflow-types.md +33 -0
- package/templates/repo/.github/skills/fix/references/workflow-ui.md +34 -0
- package/templates/repo/.github/skills/frontend-design/SKILL.md +74 -0
- package/templates/repo/.github/skills/frontend-design/references/analysis-best-practices.md +80 -0
- package/templates/repo/.github/skills/frontend-design/references/analysis-prompts.md +141 -0
- package/templates/repo/.github/skills/frontend-design/references/analysis-techniques.md +118 -0
- package/templates/repo/.github/skills/frontend-design/references/animejs.md +396 -0
- package/templates/repo/.github/skills/frontend-design/references/asset-generation.md +161 -0
- package/templates/repo/.github/skills/frontend-design/references/design-extraction-overview.md +71 -0
- package/templates/repo/.github/skills/frontend-design/references/extraction-best-practices.md +141 -0
- package/templates/repo/.github/skills/frontend-design/references/extraction-output-templates.md +162 -0
- package/templates/repo/.github/skills/frontend-design/references/extraction-prompts.md +127 -0
- package/templates/repo/.github/skills/frontend-design/references/technical-accessibility.md +119 -0
- package/templates/repo/.github/skills/frontend-design/references/technical-best-practices.md +97 -0
- package/templates/repo/.github/skills/frontend-design/references/technical-optimization.md +44 -0
- package/templates/repo/.github/skills/frontend-design/references/technical-overview.md +90 -0
- package/templates/repo/.github/skills/frontend-design/references/technical-workflows.md +150 -0
- package/templates/repo/.github/skills/frontend-design/references/visual-analysis-overview.md +95 -0
- package/templates/repo/.github/skills/frontend-design/references/workflow-describe.md +86 -0
- package/templates/repo/.github/skills/frontend-design/references/workflow-quick.md +54 -0
- package/templates/repo/.github/skills/frontend-design/references/workflow-screenshot.md +62 -0
- package/templates/repo/.github/skills/git/SKILL.md +99 -0
- package/templates/repo/.github/skills/git/references/branch-management.md +88 -0
- package/templates/repo/.github/skills/git/references/commit-standards.md +46 -0
- package/templates/repo/.github/skills/git/references/gh-cli-guide.md +109 -0
- package/templates/repo/.github/skills/git/references/safety-protocols.md +69 -0
- package/templates/repo/.github/skills/git/references/workflow-commit.md +58 -0
- package/templates/repo/.github/skills/git/references/workflow-merge.md +48 -0
- package/templates/repo/.github/skills/git/references/workflow-pr.md +58 -0
- package/templates/repo/.github/skills/git/references/workflow-push.md +52 -0
- package/templates/repo/.github/skills/install.ps1 +1247 -0
- package/templates/repo/.github/skills/install.sh +1300 -0
- package/templates/repo/.github/skills/mcp-management/README.md +219 -0
- package/templates/repo/.github/skills/mcp-management/SKILL.md +209 -0
- package/templates/repo/.github/skills/mcp-management/assets/tools.json +3146 -0
- package/templates/repo/.github/skills/mcp-management/references/configuration.md +114 -0
- package/templates/repo/.github/skills/mcp-management/references/gemini-cli-integration.md +221 -0
- package/templates/repo/.github/skills/mcp-management/references/mcp-protocol.md +116 -0
- package/templates/repo/.github/skills/mcp-management/scripts/.env.example +10 -0
- package/templates/repo/.github/skills/mcp-management/scripts/cli.ts +195 -0
- package/templates/repo/.github/skills/mcp-management/scripts/dist/analyze-tools.js +70 -0
- package/templates/repo/.github/skills/mcp-management/scripts/dist/cli.js +160 -0
- package/templates/repo/.github/skills/mcp-management/scripts/dist/mcp-client.js +183 -0
- package/templates/repo/.github/skills/mcp-management/scripts/mcp-client.ts +230 -0
- package/templates/repo/.github/skills/mcp-management/scripts/package.json +20 -0
- package/templates/repo/.github/skills/mcp-management/scripts/tsconfig.json +15 -0
- package/templates/repo/.github/skills/mermaidjs-v11/SKILL.md +115 -0
- package/templates/repo/.github/skills/mermaidjs-v11/references/cli-usage.md +228 -0
- package/templates/repo/.github/skills/mermaidjs-v11/references/configuration.md +232 -0
- package/templates/repo/.github/skills/mermaidjs-v11/references/diagram-types.md +315 -0
- package/templates/repo/.github/skills/mermaidjs-v11/references/examples.md +344 -0
- package/templates/repo/.github/skills/mermaidjs-v11/references/integration.md +310 -0
- package/templates/repo/.github/skills/{ck-planning → planning}/SKILL.md +131 -112
- package/{skills/ck-planning → templates/repo/.github/skills/planning}/references/codebase-understanding.md +62 -62
- package/templates/repo/.github/skills/{ck-planning → planning}/references/output-standards.md +141 -127
- package/{skills/ck-planning → templates/repo/.github/skills/planning}/references/plan-organization.md +160 -150
- package/templates/repo/.github/skills/{ck-planning → planning}/references/research-phase.md +49 -49
- package/{skills/ck-planning → templates/repo/.github/skills/planning}/references/solution-design.md +63 -63
- package/templates/repo/.github/skills/{ck-problem-solving → problem-solving}/SKILL.md +95 -95
- package/{skills/ck-problem-solving → templates/repo/.github/skills/problem-solving}/references/attribution.md +69 -69
- package/templates/repo/.github/skills/{ck-problem-solving → problem-solving}/references/collision-zone-thinking.md +79 -79
- package/{skills/ck-problem-solving → templates/repo/.github/skills/problem-solving}/references/inversion-exercise.md +91 -91
- package/templates/repo/.github/skills/{ck-problem-solving → problem-solving}/references/meta-pattern-recognition.md +87 -87
- package/templates/repo/.github/skills/{ck-problem-solving → problem-solving}/references/scale-game.md +95 -95
- package/templates/repo/.github/skills/{ck-problem-solving → problem-solving}/references/simplification-cascades.md +80 -80
- package/{skills/ck-problem-solving → templates/repo/.github/skills/problem-solving}/references/when-stuck.md +72 -72
- package/templates/repo/.github/skills/repomix/SKILL.md +247 -0
- package/templates/repo/.github/skills/repomix/references/configuration.md +211 -0
- package/templates/repo/.github/skills/repomix/references/usage-patterns.md +232 -0
- package/templates/repo/.github/skills/repomix/scripts/README.md +179 -0
- package/templates/repo/.github/skills/repomix/scripts/repomix_batch.py +455 -0
- package/templates/repo/.github/skills/repomix/scripts/repos.example.json +15 -0
- package/templates/repo/.github/skills/repomix/scripts/requirements.txt +15 -0
- package/templates/repo/.github/skills/research/SKILL.md +169 -0
- package/templates/repo/.github/skills/scout/SKILL.md +78 -0
- package/templates/repo/.github/skills/scout/references/external-scouting.md +140 -0
- package/templates/repo/.github/skills/scout/references/internal-scouting.md +119 -0
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/.env.example +8 -8
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/README.md +183 -183
- package/{skills/ck-sequential-thinking → templates/repo/.github/skills/sequential-thinking}/SKILL.md +92 -92
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/package.json +31 -31
- package/{skills/ck-sequential-thinking → templates/repo/.github/skills/sequential-thinking}/references/advanced-strategies.md +79 -79
- package/{skills/ck-sequential-thinking → templates/repo/.github/skills/sequential-thinking}/references/advanced-techniques.md +76 -76
- package/{skills/ck-sequential-thinking → templates/repo/.github/skills/sequential-thinking}/references/core-patterns.md +95 -95
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/references/examples-api.md +88 -88
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/references/examples-architecture.md +94 -94
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/references/examples-debug.md +90 -90
- package/templates/repo/.github/skills/{ck-sequential-thinking → sequential-thinking}/scripts/format-thought.js +159 -159
- package/{skills/ck-sequential-thinking → templates/repo/.github/skills/sequential-thinking}/scripts/process-thought.js +236 -236
- package/templates/repo/.github/skills/ui-styling/LICENSE.txt +202 -0
- package/templates/repo/.github/skills/ui-styling/SKILL.md +319 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/templates/repo/.github/skills/ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/templates/repo/.github/skills/ui-styling/references/canvas-design-system.md +320 -0
- package/templates/repo/.github/skills/ui-styling/references/shadcn-accessibility.md +471 -0
- package/templates/repo/.github/skills/ui-styling/references/shadcn-components.md +424 -0
- package/templates/repo/.github/skills/ui-styling/references/shadcn-theming.md +373 -0
- package/templates/repo/.github/skills/ui-styling/references/tailwind-customization.md +483 -0
- package/templates/repo/.github/skills/ui-styling/references/tailwind-responsive.md +382 -0
- package/templates/repo/.github/skills/ui-styling/references/tailwind-utilities.md +455 -0
- package/templates/repo/.github/skills/ui-styling/scripts/requirements.txt +17 -0
- package/templates/repo/.github/skills/ui-styling/scripts/shadcn_add.py +292 -0
- package/templates/repo/.github/skills/ui-styling/scripts/tailwind_config_gen.py +456 -0
- package/templates/repo/.github/skills/web-testing/SKILL.md +94 -0
- package/templates/repo/.github/skills/web-testing/references/accessibility-testing.md +84 -0
- package/templates/repo/.github/skills/web-testing/references/api-testing.md +78 -0
- package/templates/repo/.github/skills/web-testing/references/ci-cd-testing-workflows.md +121 -0
- package/templates/repo/.github/skills/web-testing/references/component-testing.md +94 -0
- package/templates/repo/.github/skills/web-testing/references/contract-testing.md +146 -0
- package/templates/repo/.github/skills/web-testing/references/cross-browser-checklist.md +72 -0
- package/templates/repo/.github/skills/web-testing/references/database-testing.md +139 -0
- package/templates/repo/.github/skills/web-testing/references/e2e-testing-playwright.md +119 -0
- package/templates/repo/.github/skills/web-testing/references/functional-testing-checklist.md +88 -0
- package/templates/repo/.github/skills/web-testing/references/interactive-testing-patterns.md +89 -0
- package/templates/repo/.github/skills/web-testing/references/load-testing-k6.md +93 -0
- package/templates/repo/.github/skills/web-testing/references/mobile-gesture-testing.md +85 -0
- package/templates/repo/.github/skills/web-testing/references/performance-core-web-vitals.md +124 -0
- package/templates/repo/.github/skills/web-testing/references/playwright-component-testing.md +115 -0
- package/templates/repo/.github/skills/web-testing/references/pre-release-checklist.md +75 -0
- package/templates/repo/.github/skills/web-testing/references/security-checklists.md +81 -0
- package/templates/repo/.github/skills/web-testing/references/security-testing-overview.md +92 -0
- package/templates/repo/.github/skills/web-testing/references/shadow-dom-testing.md +70 -0
- package/templates/repo/.github/skills/web-testing/references/test-data-management.md +131 -0
- package/templates/repo/.github/skills/web-testing/references/test-flakiness-mitigation.md +86 -0
- package/templates/repo/.github/skills/web-testing/references/testing-pyramid-strategy.md +76 -0
- package/templates/repo/.github/skills/web-testing/references/unit-integration-testing.md +138 -0
- package/templates/repo/.github/skills/web-testing/references/visual-regression.md +92 -0
- package/templates/repo/.github/skills/web-testing/references/vulnerability-payloads.md +93 -0
- package/templates/repo/.github/skills/web-testing/scripts/analyze-test-results.js +280 -0
- package/templates/repo/.github/skills/web-testing/scripts/init-playwright.js +233 -0
- package/templates/repo/.github/spec-kit/memory/constitution.md +50 -0
- package/templates/repo/.github/spec-kit/scripts/bash/check-prerequisites.sh +166 -0
- package/templates/repo/.github/spec-kit/scripts/bash/common.sh +156 -0
- package/templates/repo/.github/spec-kit/scripts/bash/create-new-feature.sh +297 -0
- package/templates/repo/.github/spec-kit/scripts/bash/setup-plan.sh +61 -0
- package/templates/repo/.github/spec-kit/scripts/bash/update-agent-context.sh +799 -0
- package/templates/repo/.github/spec-kit/scripts/powershell/check-prerequisites.ps1 +148 -0
- package/templates/repo/.github/spec-kit/scripts/powershell/common.ps1 +137 -0
- package/templates/repo/.github/spec-kit/scripts/powershell/create-new-feature.ps1 +283 -0
- package/templates/repo/.github/spec-kit/scripts/powershell/setup-plan.ps1 +61 -0
- package/templates/repo/.github/spec-kit/scripts/powershell/update-agent-context.ps1 +448 -0
- package/templates/repo/.github/spec-kit/templates/agent-file-template.md +28 -0
- package/templates/repo/.github/spec-kit/templates/checklist-template.md +40 -0
- package/templates/repo/.github/spec-kit/templates/commands/analyze.md +187 -0
- package/templates/repo/.github/spec-kit/templates/commands/checklist.md +297 -0
- package/templates/repo/.github/spec-kit/templates/commands/clarify.md +184 -0
- package/templates/repo/.github/spec-kit/templates/commands/constitution.md +82 -0
- package/templates/repo/.github/spec-kit/templates/commands/implement.md +138 -0
- package/templates/repo/.github/spec-kit/templates/commands/plan.md +95 -0
- package/templates/repo/.github/spec-kit/templates/commands/specify.md +261 -0
- package/templates/repo/.github/spec-kit/templates/commands/tasks.md +140 -0
- package/templates/repo/.github/spec-kit/templates/commands/taskstoissues.md +33 -0
- package/templates/repo/.github/spec-kit/templates/plan-template.md +104 -0
- package/templates/repo/.github/spec-kit/templates/spec-template.md +115 -0
- package/templates/repo/.github/spec-kit/templates/tasks-phase-template.md +42 -0
- package/templates/repo/.github/spec-kit/templates/tasks-template.md +268 -0
- package/templates/repo/.github/spec-kit/templates/vscode-settings.json +14 -0
- package/templates/repo/.vscode/settings.json +70 -70
- package/.vscode/settings.json +0 -70
- package/AGENTS.md +0 -103
- package/FAQ.md +0 -101
- package/INIT.md +0 -154
- package/QUICK-START.md +0 -37
- package/changelogs/1.0.8.md +0 -77
- package/changelogs/1.0.9.md +0 -173
- package/plans/reports/docs-manager-260120-0854-documentation-update.md +0 -323
- package/prompts/ck-code.prompt.md +0 -178
- package/repomix-output.xml +0 -40725
- package/rules/README.agents.md +0 -55
- package/rules/README.collections.md +0 -78
- package/rules/README.copilot-instructions.md +0 -66
- package/rules/README.instructions.md +0 -73
- package/rules/README.md +0 -39
- package/rules/README.prompts.md +0 -76
- package/rules/README.skills.md +0 -71
- package/skills/ck-frontend-development/SKILL.md +0 -399
- package/skills/ck-frontend-development/resources/common-patterns.md +0 -331
- package/skills/ck-frontend-development/resources/complete-examples.md +0 -872
- package/skills/ck-frontend-development/resources/component-patterns.md +0 -502
- package/skills/ck-frontend-development/resources/data-fetching.md +0 -767
- package/skills/ck-frontend-development/resources/file-organization.md +0 -502
- package/skills/ck-frontend-development/resources/loading-and-error-states.md +0 -501
- package/skills/ck-frontend-development/resources/performance.md +0 -406
- package/skills/ck-frontend-development/resources/routing-guide.md +0 -364
- package/skills/ck-frontend-development/resources/styling-guide.md +0 -428
- package/skills/ck-frontend-development/resources/typescript-standards.md +0 -418
- package/skills/ck-sequential-thinking/tests/format-thought.test.js +0 -133
- package/skills/ck-sequential-thinking/tests/process-thought.test.js +0 -215
- package/templates/repo/.github/.cokit-version +0 -4
- package/templates/repo/.github/copilot-instructions.md +0 -45
- package/templates/repo/.github/prompts/ck-code.prompt.md +0 -178
- package/templates/repo/.github/skills/ck-frontend-development/SKILL.md +0 -399
- package/templates/repo/.github/skills/ck-frontend-development/resources/common-patterns.md +0 -331
- package/templates/repo/.github/skills/ck-frontend-development/resources/complete-examples.md +0 -872
- package/templates/repo/.github/skills/ck-frontend-development/resources/component-patterns.md +0 -502
- package/templates/repo/.github/skills/ck-frontend-development/resources/data-fetching.md +0 -767
- package/templates/repo/.github/skills/ck-frontend-development/resources/file-organization.md +0 -502
- package/templates/repo/.github/skills/ck-frontend-development/resources/loading-and-error-states.md +0 -501
- package/templates/repo/.github/skills/ck-frontend-development/resources/performance.md +0 -406
- package/templates/repo/.github/skills/ck-frontend-development/resources/routing-guide.md +0 -364
- package/templates/repo/.github/skills/ck-frontend-development/resources/styling-guide.md +0 -428
- package/templates/repo/.github/skills/ck-frontend-development/resources/typescript-standards.md +0 -418
- package/templates/repo/.github/skills/ck-sequential-thinking/tests/format-thought.test.js +0 -133
- package/templates/repo/.github/skills/ck-sequential-thinking/tests/process-thought.test.js +0 -215
- /package/skills/{ck-code-review → code-review}/references/verification-before-completion.md +0 -0
|
@@ -0,0 +1,1300 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Skills Installation Script for Linux/macOS
|
|
3
|
+
# Installs all dependencies for skills
|
|
4
|
+
#
|
|
5
|
+
# Exit codes (rustup model):
|
|
6
|
+
# 0 = Success (full or partial)
|
|
7
|
+
# 1 = Fatal error (no Python, broken venv)
|
|
8
|
+
# 2 = Partial success (some optional deps failed)
|
|
9
|
+
|
|
10
|
+
# set -e removed - we handle errors per-phase
|
|
11
|
+
|
|
12
|
+
# Parse command line arguments
|
|
13
|
+
SKIP_CONFIRM=false
|
|
14
|
+
WITH_SUDO=false
|
|
15
|
+
RESUME_MODE=false
|
|
16
|
+
RETRY_FAILED=false
|
|
17
|
+
while [[ "$#" -gt 0 ]]; do
|
|
18
|
+
case $1 in
|
|
19
|
+
-y|--yes) SKIP_CONFIRM=true ;;
|
|
20
|
+
--with-sudo) WITH_SUDO=true ;;
|
|
21
|
+
--resume) RESUME_MODE=true ;;
|
|
22
|
+
--retry-failed) RETRY_FAILED=true ;;
|
|
23
|
+
*) echo "Unknown parameter: $1"; exit 1 ;;
|
|
24
|
+
esac
|
|
25
|
+
shift
|
|
26
|
+
done
|
|
27
|
+
|
|
28
|
+
# Check for NON_INTERACTIVE environment variable
|
|
29
|
+
if [[ -n "${NON_INTERACTIVE}" ]]; then
|
|
30
|
+
SKIP_CONFIRM=true
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Colors for output
|
|
34
|
+
RED='\033[0;31m'
|
|
35
|
+
GREEN='\033[0;32m'
|
|
36
|
+
YELLOW='\033[1;33m'
|
|
37
|
+
BLUE='\033[0;34m'
|
|
38
|
+
NC='\033[0m' # No Color
|
|
39
|
+
|
|
40
|
+
# Configuration
|
|
41
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
42
|
+
VENV_DIR="$SCRIPT_DIR/.venv"
|
|
43
|
+
STATE_FILE="$SCRIPT_DIR/.install-state.json"
|
|
44
|
+
LOG_DIR="$VENV_DIR/logs"
|
|
45
|
+
|
|
46
|
+
# Installation tracking arrays (Bash 3.2+ compatible - indexed arrays only)
|
|
47
|
+
declare -a INSTALLED_CRITICAL=()
|
|
48
|
+
declare -a INSTALLED_OPTIONAL=()
|
|
49
|
+
declare -a FAILED_OPTIONAL=()
|
|
50
|
+
declare -a SKIPPED_SUDO=()
|
|
51
|
+
FINAL_EXIT_CODE=0
|
|
52
|
+
|
|
53
|
+
# Detect OS (including WSL and Windows shells)
|
|
54
|
+
detect_os() {
|
|
55
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
56
|
+
echo "macos"
|
|
57
|
+
elif [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "linux"* ]]; then
|
|
58
|
+
# Check for WSL
|
|
59
|
+
if [[ -f /proc/version ]] && grep -qi microsoft /proc/version 2>/dev/null; then
|
|
60
|
+
echo "wsl"
|
|
61
|
+
else
|
|
62
|
+
echo "linux"
|
|
63
|
+
fi
|
|
64
|
+
elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "mingw"* ]]; then
|
|
65
|
+
echo "msys" # Git Bash / MSYS2
|
|
66
|
+
elif [[ "$OSTYPE" == "cygwin" ]]; then
|
|
67
|
+
echo "cygwin"
|
|
68
|
+
else
|
|
69
|
+
echo "unknown"
|
|
70
|
+
fi
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
# Detect Linux distribution (for package manager selection)
|
|
74
|
+
detect_distro() {
|
|
75
|
+
# WSL uses the underlying Linux distro
|
|
76
|
+
if [[ "$OS" != "linux" ]] && [[ "$OS" != "wsl" ]]; then
|
|
77
|
+
echo "none"
|
|
78
|
+
return
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Alpine detection (check first - most specific)
|
|
82
|
+
if [[ -f /etc/alpine-release ]]; then
|
|
83
|
+
echo "alpine"
|
|
84
|
+
# Arch Linux detection
|
|
85
|
+
elif [[ -f /etc/arch-release ]] || command_exists pacman; then
|
|
86
|
+
echo "arch"
|
|
87
|
+
# Debian/Ubuntu detection
|
|
88
|
+
elif command_exists apt-get; then
|
|
89
|
+
echo "debian"
|
|
90
|
+
# RHEL/CentOS/Fedora detection
|
|
91
|
+
elif command_exists dnf; then
|
|
92
|
+
echo "redhat"
|
|
93
|
+
elif command_exists yum; then
|
|
94
|
+
echo "redhat"
|
|
95
|
+
else
|
|
96
|
+
echo "unknown"
|
|
97
|
+
fi
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
# Package manager abstraction - update package lists
|
|
101
|
+
pkg_update() {
|
|
102
|
+
case "$DISTRO" in
|
|
103
|
+
alpine)
|
|
104
|
+
apk update
|
|
105
|
+
;;
|
|
106
|
+
arch)
|
|
107
|
+
pacman -Sy
|
|
108
|
+
;;
|
|
109
|
+
debian)
|
|
110
|
+
apt-get update -qq
|
|
111
|
+
;;
|
|
112
|
+
redhat)
|
|
113
|
+
dnf check-update || true
|
|
114
|
+
;;
|
|
115
|
+
*)
|
|
116
|
+
print_warning "Unknown distro, skipping package update"
|
|
117
|
+
;;
|
|
118
|
+
esac
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# Package manager abstraction - install package
|
|
122
|
+
# Usage: pkg_install <package_name>
|
|
123
|
+
pkg_install() {
|
|
124
|
+
local package_name="$1"
|
|
125
|
+
|
|
126
|
+
case "$DISTRO" in
|
|
127
|
+
alpine)
|
|
128
|
+
apk add --no-cache "$package_name"
|
|
129
|
+
;;
|
|
130
|
+
arch)
|
|
131
|
+
pacman -S --noconfirm "$package_name"
|
|
132
|
+
;;
|
|
133
|
+
debian)
|
|
134
|
+
apt-get install -y "$package_name"
|
|
135
|
+
;;
|
|
136
|
+
redhat)
|
|
137
|
+
dnf install -y "$package_name"
|
|
138
|
+
;;
|
|
139
|
+
*)
|
|
140
|
+
print_warning "Unknown distro, cannot install $package_name"
|
|
141
|
+
return 1
|
|
142
|
+
;;
|
|
143
|
+
esac
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
# Print functions (must be defined before check_bash_version)
|
|
147
|
+
print_header() {
|
|
148
|
+
echo -e "\n${BLUE}===================================================${NC}"
|
|
149
|
+
echo -e "${BLUE}$1${NC}"
|
|
150
|
+
echo -e "${BLUE}===================================================${NC}\n"
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
print_success() {
|
|
154
|
+
echo -e "${GREEN}✓${NC} $1"
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
print_warning() {
|
|
158
|
+
echo -e "${YELLOW}⚠${NC} $1"
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
print_error() {
|
|
162
|
+
echo -e "${RED}✗${NC} $1"
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
print_info() {
|
|
166
|
+
echo -e "${BLUE}ℹ${NC} $1"
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
# Check Bash version (3.2+ required for compatibility)
|
|
170
|
+
check_bash_version() {
|
|
171
|
+
# Get major version number
|
|
172
|
+
bash_major="${BASH_VERSINFO[0]}"
|
|
173
|
+
|
|
174
|
+
if [ "$bash_major" -lt 3 ]; then
|
|
175
|
+
print_error "Bash 3.0+ required (found Bash $BASH_VERSION)"
|
|
176
|
+
print_info "Please upgrade Bash and re-run this script"
|
|
177
|
+
exit 1
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
if [ "$bash_major" -lt 4 ]; then
|
|
181
|
+
print_warning "Bash 3.x detected (Bash 4+ recommended)"
|
|
182
|
+
|
|
183
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
184
|
+
print_info "macOS ships with Bash 3.2 by default"
|
|
185
|
+
print_info "For better compatibility: brew install bash"
|
|
186
|
+
print_info "Then use: /usr/local/bin/bash install.sh"
|
|
187
|
+
fi
|
|
188
|
+
|
|
189
|
+
print_info "Continuing with compatibility mode..."
|
|
190
|
+
fi
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
OS=$(detect_os)
|
|
194
|
+
check_bash_version
|
|
195
|
+
|
|
196
|
+
# Check if command exists
|
|
197
|
+
command_exists() {
|
|
198
|
+
command -v "$1" >/dev/null 2>&1
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
# Initialize distro detection (after command_exists is defined)
|
|
202
|
+
DISTRO=$(detect_distro)
|
|
203
|
+
|
|
204
|
+
# ============================================================================
|
|
205
|
+
# Installation Tracking Functions
|
|
206
|
+
# ============================================================================
|
|
207
|
+
|
|
208
|
+
track_success() {
|
|
209
|
+
local category="$1" name="$2"
|
|
210
|
+
if [[ "$category" == "critical" ]]; then
|
|
211
|
+
INSTALLED_CRITICAL+=("$name")
|
|
212
|
+
else
|
|
213
|
+
INSTALLED_OPTIONAL+=("$name")
|
|
214
|
+
fi
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
track_failure() {
|
|
218
|
+
local category="$1" name="$2" reason="$3"
|
|
219
|
+
if [[ "$category" == "critical" ]]; then
|
|
220
|
+
FINAL_EXIT_CODE=1
|
|
221
|
+
else
|
|
222
|
+
FAILED_OPTIONAL+=("$name: $reason")
|
|
223
|
+
[[ "$FINAL_EXIT_CODE" == "0" ]] && FINAL_EXIT_CODE=2
|
|
224
|
+
fi
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
track_skipped() {
|
|
228
|
+
local name="$1" reason="$2"
|
|
229
|
+
SKIPPED_SUDO+=("$name: $reason")
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
# ============================================================================
|
|
233
|
+
# State Persistence Functions
|
|
234
|
+
# ============================================================================
|
|
235
|
+
|
|
236
|
+
# Initialize or load state
|
|
237
|
+
init_state() {
|
|
238
|
+
if [[ "$RESUME_MODE" == "true" ]] && [[ -f "$STATE_FILE" ]]; then
|
|
239
|
+
print_info "Resuming from previous installation..."
|
|
240
|
+
return 0
|
|
241
|
+
fi
|
|
242
|
+
|
|
243
|
+
# Create fresh state
|
|
244
|
+
cat > "$STATE_FILE" << EOF
|
|
245
|
+
{
|
|
246
|
+
"version": 1,
|
|
247
|
+
"started_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
248
|
+
"last_updated": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
249
|
+
"phases": {
|
|
250
|
+
"system_deps": "pending",
|
|
251
|
+
"node_deps": "pending",
|
|
252
|
+
"python_env": "pending",
|
|
253
|
+
"verify": "pending"
|
|
254
|
+
},
|
|
255
|
+
"packages": {
|
|
256
|
+
"installed": [],
|
|
257
|
+
"failed": [],
|
|
258
|
+
"skipped": []
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
EOF
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
# Update phase status
|
|
265
|
+
update_phase() {
|
|
266
|
+
local phase="$1" status="$2"
|
|
267
|
+
if [[ ! -f "$STATE_FILE" ]]; then
|
|
268
|
+
return 0
|
|
269
|
+
fi
|
|
270
|
+
local temp_file="$STATE_FILE.tmp"
|
|
271
|
+
|
|
272
|
+
# Simple sed replacement (jq not required)
|
|
273
|
+
sed "s/\"$phase\": \"[^\"]*\"/\"$phase\": \"$status\"/" "$STATE_FILE" > "$temp_file"
|
|
274
|
+
mv "$temp_file" "$STATE_FILE"
|
|
275
|
+
|
|
276
|
+
# Update timestamp
|
|
277
|
+
sed "s/\"last_updated\": \"[^\"]*\"/\"last_updated\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"/" "$STATE_FILE" > "$temp_file"
|
|
278
|
+
mv "$temp_file" "$STATE_FILE"
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
# Check if phase is already done (for resume)
|
|
282
|
+
phase_done() {
|
|
283
|
+
local phase="$1"
|
|
284
|
+
grep -q "\"$phase\": \"done\"" "$STATE_FILE" 2>/dev/null
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
# Clean state file (on complete success)
|
|
288
|
+
clean_state() {
|
|
289
|
+
if [[ -f "$STATE_FILE" ]]; then
|
|
290
|
+
rm -f "$STATE_FILE"
|
|
291
|
+
print_info "Installation state cleaned (success)"
|
|
292
|
+
fi
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
# ============================================================================
|
|
296
|
+
# Build Tools Detection
|
|
297
|
+
# ============================================================================
|
|
298
|
+
|
|
299
|
+
# Check if system has C build tools for compiling Python packages
|
|
300
|
+
has_build_tools() {
|
|
301
|
+
if command_exists gcc || command_exists clang; then
|
|
302
|
+
if [[ "$OS" == "linux" ]]; then
|
|
303
|
+
# Check for Python dev headers
|
|
304
|
+
if [[ -f /usr/include/python3*/Python.h ]] || \
|
|
305
|
+
python3-config --includes &>/dev/null; then
|
|
306
|
+
return 0
|
|
307
|
+
fi
|
|
308
|
+
elif [[ "$OS" == "macos" ]]; then
|
|
309
|
+
# macOS: Xcode command line tools include headers
|
|
310
|
+
if xcode-select -p &>/dev/null; then
|
|
311
|
+
return 0
|
|
312
|
+
fi
|
|
313
|
+
fi
|
|
314
|
+
fi
|
|
315
|
+
return 1
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
# Try pip install with wheel-first fallback
|
|
319
|
+
# Returns: 0=success, 1=failed
|
|
320
|
+
try_pip_install() {
|
|
321
|
+
local package_spec="$1"
|
|
322
|
+
local log_file="$2"
|
|
323
|
+
local package_name="${package_spec%%[=<>]*}" # Strip version specifier
|
|
324
|
+
|
|
325
|
+
# Phase 1: Try with prefer-binary (wheels first)
|
|
326
|
+
if pip install "$package_spec" --prefer-binary 2>&1 | tee -a "$log_file"; then
|
|
327
|
+
return 0
|
|
328
|
+
fi
|
|
329
|
+
|
|
330
|
+
# Phase 2: Check if we can build from source
|
|
331
|
+
if ! has_build_tools; then
|
|
332
|
+
print_warning "$package_name: No wheel available, no build tools"
|
|
333
|
+
if [[ "$OS" == "linux" ]] || [[ "$OS" == "wsl" ]]; then
|
|
334
|
+
case "$DISTRO" in
|
|
335
|
+
alpine)
|
|
336
|
+
print_info "Install build tools: apk add build-base python3-dev"
|
|
337
|
+
;;
|
|
338
|
+
arch)
|
|
339
|
+
print_info "Install build tools: sudo pacman -S base-devel python"
|
|
340
|
+
;;
|
|
341
|
+
debian)
|
|
342
|
+
print_info "Install build tools: sudo apt-get install gcc python3-dev"
|
|
343
|
+
;;
|
|
344
|
+
redhat)
|
|
345
|
+
print_info "Install build tools: sudo dnf install gcc python3-devel"
|
|
346
|
+
;;
|
|
347
|
+
*)
|
|
348
|
+
print_info "Install build tools: gcc and python3-dev equivalent"
|
|
349
|
+
;;
|
|
350
|
+
esac
|
|
351
|
+
elif [[ "$OS" == "macos" ]]; then
|
|
352
|
+
print_info "Install build tools: xcode-select --install"
|
|
353
|
+
fi
|
|
354
|
+
return 1
|
|
355
|
+
fi
|
|
356
|
+
|
|
357
|
+
# Phase 3: Try source build
|
|
358
|
+
print_info "Trying source build for $package_name..."
|
|
359
|
+
if pip install "$package_spec" --no-binary "$package_name" 2>&1 | tee -a "$log_file"; then
|
|
360
|
+
print_success "$package_name installed (source build)"
|
|
361
|
+
return 0
|
|
362
|
+
fi
|
|
363
|
+
|
|
364
|
+
print_error "$package_name: Both wheel and source build failed"
|
|
365
|
+
return 1
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
# Install system package - no prompts, just install or skip
|
|
369
|
+
# CLI controls sudo via --with-sudo flag
|
|
370
|
+
install_system_package() {
|
|
371
|
+
local package_name="$1"
|
|
372
|
+
local display_name="$2"
|
|
373
|
+
local check_commands="$3" # Comma-separated commands to check
|
|
374
|
+
|
|
375
|
+
# Check if already installed (check multiple commands)
|
|
376
|
+
IFS=',' read -ra cmds <<< "$check_commands"
|
|
377
|
+
for cmd in "${cmds[@]}"; do
|
|
378
|
+
if command_exists "$cmd"; then
|
|
379
|
+
print_success "$display_name already installed"
|
|
380
|
+
track_success "optional" "$display_name"
|
|
381
|
+
return 0
|
|
382
|
+
fi
|
|
383
|
+
done
|
|
384
|
+
|
|
385
|
+
# macOS: brew doesn't need sudo
|
|
386
|
+
if [[ "$OS" == "macos" ]]; then
|
|
387
|
+
print_info "Installing $display_name..."
|
|
388
|
+
if brew install "$package_name" 2>/dev/null; then
|
|
389
|
+
print_success "$display_name installed"
|
|
390
|
+
track_success "optional" "$display_name"
|
|
391
|
+
return 0
|
|
392
|
+
else
|
|
393
|
+
print_warning "$display_name: brew install failed"
|
|
394
|
+
track_failure "optional" "$display_name" "brew install failed"
|
|
395
|
+
return 1
|
|
396
|
+
fi
|
|
397
|
+
fi
|
|
398
|
+
|
|
399
|
+
# Linux: only install if --with-sudo was passed (except Alpine which often runs as root)
|
|
400
|
+
if [[ "$WITH_SUDO" == "true" ]] || [[ "$DISTRO" == "alpine" && "$(id -u)" == "0" ]]; then
|
|
401
|
+
print_info "Installing $display_name..."
|
|
402
|
+
if [[ "$WITH_SUDO" == "true" ]]; then
|
|
403
|
+
# Call package manager directly with sudo (functions don't work with sudo)
|
|
404
|
+
local install_result=0
|
|
405
|
+
case "$DISTRO" in
|
|
406
|
+
alpine) sudo apk add --no-cache "$package_name" || install_result=1 ;;
|
|
407
|
+
arch) sudo pacman -S --noconfirm "$package_name" || install_result=1 ;;
|
|
408
|
+
debian) sudo apt-get install -y "$package_name" || install_result=1 ;;
|
|
409
|
+
redhat) sudo dnf install -y "$package_name" || install_result=1 ;;
|
|
410
|
+
*) install_result=1 ;;
|
|
411
|
+
esac
|
|
412
|
+
if [[ "$install_result" -eq 0 ]]; then
|
|
413
|
+
print_success "$display_name installed"
|
|
414
|
+
track_success "optional" "$display_name"
|
|
415
|
+
return 0
|
|
416
|
+
else
|
|
417
|
+
print_warning "$display_name: package install failed"
|
|
418
|
+
track_failure "optional" "$display_name" "package install failed"
|
|
419
|
+
return 1
|
|
420
|
+
fi
|
|
421
|
+
else
|
|
422
|
+
# Alpine as root (no sudo needed)
|
|
423
|
+
if pkg_install "$package_name"; then
|
|
424
|
+
print_success "$display_name installed"
|
|
425
|
+
track_success "optional" "$display_name"
|
|
426
|
+
return 0
|
|
427
|
+
else
|
|
428
|
+
print_warning "$display_name: package install failed"
|
|
429
|
+
track_failure "optional" "$display_name" "package install failed"
|
|
430
|
+
return 1
|
|
431
|
+
fi
|
|
432
|
+
fi
|
|
433
|
+
else
|
|
434
|
+
# No sudo permission - track as skipped
|
|
435
|
+
print_info "$display_name: skipped (no --with-sudo)"
|
|
436
|
+
track_skipped "$display_name" "requires sudo"
|
|
437
|
+
return 0 # Don't fail, just skip
|
|
438
|
+
fi
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
# Check and install system package manager
|
|
442
|
+
check_package_manager() {
|
|
443
|
+
if [[ "$OS" == "macos" ]]; then
|
|
444
|
+
if ! command_exists brew; then
|
|
445
|
+
print_warning "Homebrew not found. Installing Homebrew..."
|
|
446
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
447
|
+
print_success "Homebrew installed"
|
|
448
|
+
else
|
|
449
|
+
print_success "Homebrew found"
|
|
450
|
+
fi
|
|
451
|
+
elif [[ "$OS" == "linux" ]] || [[ "$OS" == "wsl" ]]; then
|
|
452
|
+
case "$DISTRO" in
|
|
453
|
+
alpine)
|
|
454
|
+
print_success "apk found (Alpine Linux)"
|
|
455
|
+
;;
|
|
456
|
+
arch)
|
|
457
|
+
print_success "pacman found (Arch Linux)"
|
|
458
|
+
;;
|
|
459
|
+
debian)
|
|
460
|
+
print_success "apt-get found (Debian/Ubuntu)"
|
|
461
|
+
;;
|
|
462
|
+
redhat)
|
|
463
|
+
if command_exists dnf; then
|
|
464
|
+
print_success "dnf found (RHEL/Fedora)"
|
|
465
|
+
else
|
|
466
|
+
print_success "yum found (RHEL/CentOS)"
|
|
467
|
+
fi
|
|
468
|
+
;;
|
|
469
|
+
*)
|
|
470
|
+
print_warning "No supported package manager found (apk, pacman, apt-get, dnf, or yum)"
|
|
471
|
+
print_info "System packages will be skipped"
|
|
472
|
+
;;
|
|
473
|
+
esac
|
|
474
|
+
elif [[ "$OS" == "msys" ]] || [[ "$OS" == "cygwin" ]]; then
|
|
475
|
+
print_warning "Windows shell detected ($OS)"
|
|
476
|
+
print_info "System package installation not supported"
|
|
477
|
+
print_info "Please install dependencies manually or use WSL"
|
|
478
|
+
fi
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
# Install system dependencies
|
|
482
|
+
install_system_deps() {
|
|
483
|
+
print_header "Installing System Dependencies"
|
|
484
|
+
|
|
485
|
+
# Update package cache if we have permission (Linux only)
|
|
486
|
+
if [[ "$OS" == "linux" ]]; then
|
|
487
|
+
if [[ "$WITH_SUDO" == "true" ]]; then
|
|
488
|
+
print_info "Updating package lists..."
|
|
489
|
+
# Call package manager directly with sudo (functions don't work with sudo)
|
|
490
|
+
case "$DISTRO" in
|
|
491
|
+
alpine) sudo apk update ;;
|
|
492
|
+
arch) sudo pacman -Sy ;;
|
|
493
|
+
debian) sudo apt-get update -qq ;;
|
|
494
|
+
redhat) sudo dnf check-update || true ;;
|
|
495
|
+
esac
|
|
496
|
+
elif [[ "$DISTRO" == "alpine" && "$(id -u)" == "0" ]]; then
|
|
497
|
+
# Alpine as root (no sudo needed)
|
|
498
|
+
print_info "Updating package lists..."
|
|
499
|
+
pkg_update
|
|
500
|
+
fi
|
|
501
|
+
fi
|
|
502
|
+
|
|
503
|
+
# FFmpeg (video/audio processing)
|
|
504
|
+
install_system_package "ffmpeg" "FFmpeg" "ffmpeg"
|
|
505
|
+
|
|
506
|
+
# ImageMagick (image processing)
|
|
507
|
+
install_system_package "imagemagick" "ImageMagick" "magick,convert"
|
|
508
|
+
|
|
509
|
+
# PostgreSQL client (optional - just check)
|
|
510
|
+
if command_exists psql; then
|
|
511
|
+
print_success "PostgreSQL client already installed"
|
|
512
|
+
fi
|
|
513
|
+
|
|
514
|
+
# Docker (optional - just check)
|
|
515
|
+
if command_exists docker; then
|
|
516
|
+
print_success "Docker already installed ($(docker --version))"
|
|
517
|
+
fi
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
# Install Node.js and npm packages
|
|
521
|
+
install_node_deps() {
|
|
522
|
+
print_header "Installing Node.js Dependencies"
|
|
523
|
+
|
|
524
|
+
# Check Node.js
|
|
525
|
+
if command_exists node; then
|
|
526
|
+
NODE_VERSION=$(node --version)
|
|
527
|
+
print_success "Node.js already installed ($NODE_VERSION)"
|
|
528
|
+
else
|
|
529
|
+
print_info "Installing Node.js..."
|
|
530
|
+
if [[ "$OS" == "macos" ]]; then
|
|
531
|
+
brew install node
|
|
532
|
+
elif [[ "$OS" == "linux" ]] || [[ "$OS" == "wsl" ]]; then
|
|
533
|
+
case "$DISTRO" in
|
|
534
|
+
alpine)
|
|
535
|
+
# Alpine: install via apk
|
|
536
|
+
if [[ "$(id -u)" == "0" ]]; then
|
|
537
|
+
apk add --no-cache nodejs npm
|
|
538
|
+
elif [[ "$WITH_SUDO" == "true" ]]; then
|
|
539
|
+
sudo apk add --no-cache nodejs npm
|
|
540
|
+
else
|
|
541
|
+
print_warning "Node.js installation requires root or --with-sudo"
|
|
542
|
+
print_info "Run: apk add nodejs npm"
|
|
543
|
+
return 1
|
|
544
|
+
fi
|
|
545
|
+
;;
|
|
546
|
+
arch)
|
|
547
|
+
# Arch: install via pacman
|
|
548
|
+
if [[ "$(id -u)" == "0" ]]; then
|
|
549
|
+
pacman -S --noconfirm nodejs npm
|
|
550
|
+
elif [[ "$WITH_SUDO" == "true" ]]; then
|
|
551
|
+
sudo pacman -S --noconfirm nodejs npm
|
|
552
|
+
else
|
|
553
|
+
print_warning "Node.js installation requires root or --with-sudo"
|
|
554
|
+
print_info "Run: sudo pacman -S nodejs npm"
|
|
555
|
+
return 1
|
|
556
|
+
fi
|
|
557
|
+
;;
|
|
558
|
+
debian)
|
|
559
|
+
# Debian/Ubuntu: use nodesource
|
|
560
|
+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
|
561
|
+
sudo apt-get install -y nodejs
|
|
562
|
+
;;
|
|
563
|
+
redhat)
|
|
564
|
+
# RHEL/CentOS/Fedora: use nodesource
|
|
565
|
+
curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
|
|
566
|
+
if command_exists dnf; then
|
|
567
|
+
sudo dnf install -y nodejs
|
|
568
|
+
else
|
|
569
|
+
sudo yum install -y nodejs
|
|
570
|
+
fi
|
|
571
|
+
;;
|
|
572
|
+
*)
|
|
573
|
+
print_warning "Unknown distro, cannot install Node.js automatically"
|
|
574
|
+
print_info "Please install Node.js manually"
|
|
575
|
+
return 1
|
|
576
|
+
;;
|
|
577
|
+
esac
|
|
578
|
+
elif [[ "$OS" == "msys" ]] || [[ "$OS" == "cygwin" ]]; then
|
|
579
|
+
print_warning "Cannot install Node.js in $OS environment"
|
|
580
|
+
print_info "Please install Node.js from https://nodejs.org"
|
|
581
|
+
print_info "Or use WSL for better compatibility"
|
|
582
|
+
return 1
|
|
583
|
+
fi
|
|
584
|
+
print_success "Node.js installed"
|
|
585
|
+
fi
|
|
586
|
+
|
|
587
|
+
# Install global npm packages
|
|
588
|
+
print_info "Installing global npm packages..."
|
|
589
|
+
|
|
590
|
+
# Package name to CLI command mapping (some packages have different CLI names)
|
|
591
|
+
# Using indexed array with colon-separated pairs for Bash 3.2+ compatibility
|
|
592
|
+
npm_packages=(
|
|
593
|
+
"rmbg-cli:rmbg"
|
|
594
|
+
"pnpm:pnpm"
|
|
595
|
+
"wrangler:wrangler"
|
|
596
|
+
"repomix:repomix"
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
for package_pair in "${npm_packages[@]}"; do
|
|
600
|
+
# Split "package:command" on colon
|
|
601
|
+
IFS=':' read -r package cmd <<< "$package_pair"
|
|
602
|
+
|
|
603
|
+
# Check CLI command first (handles standalone installs like brew, curl, etc.)
|
|
604
|
+
if command_exists "$cmd"; then
|
|
605
|
+
version=$("$cmd" --version 2>&1 | head -n1 || echo "available")
|
|
606
|
+
print_success "$package already installed ($version)"
|
|
607
|
+
# Fallback: check if installed via npm registry
|
|
608
|
+
elif npm list -g "$package" >/dev/null 2>&1; then
|
|
609
|
+
print_success "$package already installed via npm"
|
|
610
|
+
else
|
|
611
|
+
print_info "Installing $package..."
|
|
612
|
+
npm install -g "$package" 2>/dev/null || {
|
|
613
|
+
print_warning "Failed to install $package globally. Trying with sudo..."
|
|
614
|
+
sudo npm install -g "$package"
|
|
615
|
+
}
|
|
616
|
+
print_success "$package installed"
|
|
617
|
+
fi
|
|
618
|
+
done
|
|
619
|
+
|
|
620
|
+
# Install local npm packages for skills
|
|
621
|
+
print_info "Installing local npm packages for skills..."
|
|
622
|
+
|
|
623
|
+
# sequential-thinking
|
|
624
|
+
if [ -d "$SCRIPT_DIR/sequential-thinking" ] && [ -f "$SCRIPT_DIR/sequential-thinking/package.json" ]; then
|
|
625
|
+
print_info "Installing sequential-thinking dependencies..."
|
|
626
|
+
(cd "$SCRIPT_DIR/sequential-thinking" && npm install --quiet)
|
|
627
|
+
print_success "sequential-thinking dependencies installed"
|
|
628
|
+
fi
|
|
629
|
+
|
|
630
|
+
# mcp-management
|
|
631
|
+
if [ -d "$SCRIPT_DIR/mcp-management/scripts" ] && [ -f "$SCRIPT_DIR/mcp-management/scripts/package.json" ]; then
|
|
632
|
+
print_info "Installing mcp-management dependencies..."
|
|
633
|
+
(cd "$SCRIPT_DIR/mcp-management/scripts" && npm install --quiet)
|
|
634
|
+
print_success "mcp-management dependencies installed"
|
|
635
|
+
fi
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
# Setup Python virtual environment
|
|
639
|
+
setup_python_env() {
|
|
640
|
+
print_header "Setting Up Python Environment"
|
|
641
|
+
|
|
642
|
+
# Track successful and failed installations
|
|
643
|
+
local successful_skills=()
|
|
644
|
+
local failed_skills=()
|
|
645
|
+
|
|
646
|
+
# Check Python
|
|
647
|
+
if command_exists python3; then
|
|
648
|
+
PYTHON_VERSION=$(python3 --version)
|
|
649
|
+
PYTHON_PATH=$(which python3)
|
|
650
|
+
print_success "Python3 found ($PYTHON_VERSION)"
|
|
651
|
+
|
|
652
|
+
# Check for broken UV Python installation
|
|
653
|
+
if [[ "$PYTHON_PATH" == *"/.local/share/uv/"* ]]; then
|
|
654
|
+
# Verify UV Python works by testing venv creation
|
|
655
|
+
if ! python3 -c "import sys; sys.exit(0 if '/install' not in sys.base_prefix else 1)" 2>/dev/null; then
|
|
656
|
+
print_error "UV Python installation is broken (corrupted sys.base_prefix)"
|
|
657
|
+
print_info "Please reinstall Python using Homebrew:"
|
|
658
|
+
print_info " brew install python@3.12"
|
|
659
|
+
print_info " export PATH=\"/opt/homebrew/bin:\$PATH\""
|
|
660
|
+
print_info "Or fix UV Python:"
|
|
661
|
+
print_info " uv python uninstall 3.12"
|
|
662
|
+
print_info " uv python install 3.12"
|
|
663
|
+
exit 1
|
|
664
|
+
fi
|
|
665
|
+
fi
|
|
666
|
+
else
|
|
667
|
+
print_error "Python3 not found. Please install Python 3.7+"
|
|
668
|
+
exit 1
|
|
669
|
+
fi
|
|
670
|
+
|
|
671
|
+
# Create virtual environment (or recreate if corrupted)
|
|
672
|
+
create_venv() {
|
|
673
|
+
# Try normal venv creation first
|
|
674
|
+
if python3 -m venv "$VENV_DIR" 2>/dev/null; then
|
|
675
|
+
return 0
|
|
676
|
+
fi
|
|
677
|
+
|
|
678
|
+
# If ensurepip fails (common on macOS), create without pip and bootstrap manually
|
|
679
|
+
print_warning "Standard venv creation failed, trying without ensurepip..."
|
|
680
|
+
if python3 -m venv --without-pip "$VENV_DIR"; then
|
|
681
|
+
# Bootstrap pip manually with error handling
|
|
682
|
+
source "$VENV_DIR/bin/activate"
|
|
683
|
+
if ! curl -sS https://bootstrap.pypa.io/get-pip.py | python3; then
|
|
684
|
+
print_error "Failed to bootstrap pip (network issue or get-pip.py failed)"
|
|
685
|
+
deactivate
|
|
686
|
+
rm -rf "$VENV_DIR"
|
|
687
|
+
return 1
|
|
688
|
+
fi
|
|
689
|
+
deactivate
|
|
690
|
+
return 0
|
|
691
|
+
fi
|
|
692
|
+
|
|
693
|
+
return 1
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
if [ -d "$VENV_DIR" ]; then
|
|
697
|
+
# Verify venv is valid by checking for activate script AND python executable
|
|
698
|
+
if [ -f "$VENV_DIR/bin/activate" ] && [ -x "$VENV_DIR/bin/python3" ]; then
|
|
699
|
+
print_success "Virtual environment already exists at $VENV_DIR"
|
|
700
|
+
else
|
|
701
|
+
print_warning "Virtual environment is corrupted (missing activate or python3). Recreating..."
|
|
702
|
+
rm -rf "$VENV_DIR"
|
|
703
|
+
if create_venv; then
|
|
704
|
+
print_success "Virtual environment recreated"
|
|
705
|
+
else
|
|
706
|
+
print_error "Failed to create virtual environment"
|
|
707
|
+
exit 1
|
|
708
|
+
fi
|
|
709
|
+
fi
|
|
710
|
+
else
|
|
711
|
+
print_info "Creating virtual environment at $VENV_DIR..."
|
|
712
|
+
if create_venv; then
|
|
713
|
+
print_success "Virtual environment created"
|
|
714
|
+
else
|
|
715
|
+
print_error "Failed to create virtual environment"
|
|
716
|
+
exit 1
|
|
717
|
+
fi
|
|
718
|
+
fi
|
|
719
|
+
|
|
720
|
+
# Activate and install packages
|
|
721
|
+
print_info "Activating virtual environment..."
|
|
722
|
+
source "$VENV_DIR/bin/activate"
|
|
723
|
+
|
|
724
|
+
# Create log directory
|
|
725
|
+
local LOG_DIR="$VENV_DIR/logs"
|
|
726
|
+
mkdir -p "$LOG_DIR"
|
|
727
|
+
|
|
728
|
+
# Upgrade pip with logging (use --prefer-binary)
|
|
729
|
+
print_info "Upgrading pip..."
|
|
730
|
+
if pip install --upgrade pip --prefer-binary 2>&1 | tee "$LOG_DIR/pip-upgrade.log" | tail -n 3; then
|
|
731
|
+
print_success "pip upgraded successfully"
|
|
732
|
+
else
|
|
733
|
+
print_warning "pip upgrade failed (continuing anyway)"
|
|
734
|
+
print_info "See log: $LOG_DIR/pip-upgrade.log"
|
|
735
|
+
fi
|
|
736
|
+
|
|
737
|
+
# Install dependencies from all skills' requirements.txt files
|
|
738
|
+
print_info "Installing Python dependencies from all skills..."
|
|
739
|
+
|
|
740
|
+
local installed_count=0
|
|
741
|
+
for skill_dir in "$SCRIPT_DIR"/*; do
|
|
742
|
+
if [ -d "$skill_dir" ]; then
|
|
743
|
+
skill_name=$(basename "$skill_dir")
|
|
744
|
+
|
|
745
|
+
# Skip .venv
|
|
746
|
+
if [ "$skill_name" == ".venv" ]; then
|
|
747
|
+
continue
|
|
748
|
+
fi
|
|
749
|
+
|
|
750
|
+
# Install main requirements.txt with wheel-first approach
|
|
751
|
+
if [ -f "$skill_dir/scripts/requirements.txt" ]; then
|
|
752
|
+
local SKILL_LOG="$LOG_DIR/install-${skill_name}.log"
|
|
753
|
+
|
|
754
|
+
print_info "Installing $skill_name dependencies..."
|
|
755
|
+
|
|
756
|
+
# Read requirements and install one-by-one for granular tracking
|
|
757
|
+
local pkg_success=0
|
|
758
|
+
local pkg_fail=0
|
|
759
|
+
while IFS= read -r line || [[ -n "$line" ]]; do
|
|
760
|
+
# Skip comments and empty lines
|
|
761
|
+
[[ "$line" =~ ^#.*$ ]] && continue
|
|
762
|
+
[[ -z "${line// }" ]] && continue
|
|
763
|
+
|
|
764
|
+
# Strip inline comments (e.g., "package>=1.0 # comment" -> "package>=1.0")
|
|
765
|
+
line="${line%%#*}"
|
|
766
|
+
line="${line%"${line##*[![:space:]]}"}" # trim trailing whitespace
|
|
767
|
+
[[ -z "$line" ]] && continue
|
|
768
|
+
|
|
769
|
+
if try_pip_install "$line" "$SKILL_LOG"; then
|
|
770
|
+
pkg_success=$((pkg_success + 1))
|
|
771
|
+
else
|
|
772
|
+
pkg_fail=$((pkg_fail + 1))
|
|
773
|
+
track_failure "optional" "$skill_name:$line" "Package install failed"
|
|
774
|
+
fi
|
|
775
|
+
done < "$skill_dir/scripts/requirements.txt"
|
|
776
|
+
|
|
777
|
+
if [[ $pkg_fail -eq 0 ]]; then
|
|
778
|
+
print_success "$skill_name: all $pkg_success packages installed"
|
|
779
|
+
track_success "optional" "$skill_name"
|
|
780
|
+
successful_skills+=("$skill_name")
|
|
781
|
+
installed_count=$((installed_count + 1))
|
|
782
|
+
else
|
|
783
|
+
print_warning "$skill_name: $pkg_success installed, $pkg_fail failed"
|
|
784
|
+
failed_skills+=("$skill_name")
|
|
785
|
+
fi
|
|
786
|
+
fi
|
|
787
|
+
|
|
788
|
+
# Install test requirements.txt
|
|
789
|
+
if [ -f "$skill_dir/scripts/tests/requirements.txt" ]; then
|
|
790
|
+
local SKILL_TEST_LOG="$LOG_DIR/install-${skill_name}-tests.log"
|
|
791
|
+
|
|
792
|
+
print_info "Installing $skill_name test dependencies..."
|
|
793
|
+
|
|
794
|
+
if pip install -r "$skill_dir/scripts/tests/requirements.txt" --prefer-binary 2>&1 | tee "$SKILL_TEST_LOG"; then
|
|
795
|
+
print_success "$skill_name test dependencies installed successfully"
|
|
796
|
+
else
|
|
797
|
+
print_warning "$skill_name test dependencies failed to install"
|
|
798
|
+
# Don't fail installation if test deps fail (less critical)
|
|
799
|
+
fi
|
|
800
|
+
fi
|
|
801
|
+
fi
|
|
802
|
+
done
|
|
803
|
+
|
|
804
|
+
# Install $HOME/.copilot/scripts requirements (contains pyyaml for generate_catalogs.py)
|
|
805
|
+
local SCRIPTS_REQ="$SCRIPT_DIR/../scripts/requirements.txt"
|
|
806
|
+
if [ -f "$SCRIPTS_REQ" ]; then
|
|
807
|
+
local SCRIPTS_LOG="$LOG_DIR/install-scripts.log"
|
|
808
|
+
print_info "Installing $HOME/.copilot/scripts dependencies..."
|
|
809
|
+
|
|
810
|
+
local pkg_success=0
|
|
811
|
+
local pkg_fail=0
|
|
812
|
+
while IFS= read -r line || [[ -n "$line" ]]; do
|
|
813
|
+
[[ "$line" =~ ^#.*$ ]] && continue
|
|
814
|
+
[[ -z "${line// }" ]] && continue
|
|
815
|
+
line="${line%%#*}"
|
|
816
|
+
line="${line%"${line##*[![:space:]]}"}"
|
|
817
|
+
[[ -z "$line" ]] && continue
|
|
818
|
+
|
|
819
|
+
if try_pip_install "$line" "$SCRIPTS_LOG"; then
|
|
820
|
+
pkg_success=$((pkg_success + 1))
|
|
821
|
+
else
|
|
822
|
+
pkg_fail=$((pkg_fail + 1))
|
|
823
|
+
track_failure "optional" "scripts:$line" "Package install failed"
|
|
824
|
+
fi
|
|
825
|
+
done < "$SCRIPTS_REQ"
|
|
826
|
+
|
|
827
|
+
if [[ $pkg_fail -eq 0 ]]; then
|
|
828
|
+
print_success "$HOME/.copilot/scripts: all $pkg_success packages installed"
|
|
829
|
+
track_success "optional" "scripts"
|
|
830
|
+
else
|
|
831
|
+
print_warning "$HOME/.copilot/scripts: $pkg_success installed, $pkg_fail failed"
|
|
832
|
+
fi
|
|
833
|
+
fi
|
|
834
|
+
|
|
835
|
+
# Print installation summary (brief - final report comes later)
|
|
836
|
+
print_header "Python Dependencies Installation Summary"
|
|
837
|
+
|
|
838
|
+
if [ ${#successful_skills[@]} -gt 0 ]; then
|
|
839
|
+
print_success "Successfully installed ${#successful_skills[@]} skill(s)"
|
|
840
|
+
fi
|
|
841
|
+
|
|
842
|
+
if [ ${#failed_skills[@]} -gt 0 ]; then
|
|
843
|
+
print_warning "${#failed_skills[@]} skill(s) had package failures (see final report)"
|
|
844
|
+
# Don't exit 1 - track failures instead and continue
|
|
845
|
+
elif [ ${#successful_skills[@]} -eq 0 ]; then
|
|
846
|
+
print_warning "No skill requirements.txt files found"
|
|
847
|
+
else
|
|
848
|
+
print_success "All Python dependencies installed successfully"
|
|
849
|
+
fi
|
|
850
|
+
|
|
851
|
+
deactivate
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
# Verify installations
|
|
855
|
+
verify_installations() {
|
|
856
|
+
print_header "Verifying Installations"
|
|
857
|
+
|
|
858
|
+
# FFmpeg
|
|
859
|
+
if command_exists ffmpeg; then
|
|
860
|
+
print_success "FFmpeg is available"
|
|
861
|
+
else
|
|
862
|
+
print_warning "FFmpeg is not available"
|
|
863
|
+
fi
|
|
864
|
+
|
|
865
|
+
# ImageMagick (check both magick and convert - older versions use convert)
|
|
866
|
+
if command_exists magick || command_exists convert; then
|
|
867
|
+
print_success "ImageMagick is available"
|
|
868
|
+
else
|
|
869
|
+
print_warning "ImageMagick is not available"
|
|
870
|
+
fi
|
|
871
|
+
|
|
872
|
+
# Node.js & npm
|
|
873
|
+
if command_exists node; then
|
|
874
|
+
print_success "Node.js is available"
|
|
875
|
+
else
|
|
876
|
+
print_warning "Node.js is not available"
|
|
877
|
+
fi
|
|
878
|
+
|
|
879
|
+
if command_exists npm; then
|
|
880
|
+
print_success "npm is available"
|
|
881
|
+
else
|
|
882
|
+
print_warning "npm is not available"
|
|
883
|
+
fi
|
|
884
|
+
|
|
885
|
+
declare -a npm_packages=(
|
|
886
|
+
"rmbg"
|
|
887
|
+
"pnpm"
|
|
888
|
+
"wrangler"
|
|
889
|
+
"repomix"
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
for package in "${npm_packages[@]}"; do
|
|
893
|
+
if command_exists "$package"; then
|
|
894
|
+
print_success "$package CLI is available"
|
|
895
|
+
else
|
|
896
|
+
print_warning "$package CLI is not available"
|
|
897
|
+
fi
|
|
898
|
+
done
|
|
899
|
+
|
|
900
|
+
# Check Python packages
|
|
901
|
+
if [ -d "$VENV_DIR" ]; then
|
|
902
|
+
source "$VENV_DIR/bin/activate"
|
|
903
|
+
if python -c "import google.genai" 2>/dev/null; then
|
|
904
|
+
print_success "google-genai Python package is available"
|
|
905
|
+
else
|
|
906
|
+
print_warning "google-genai Python package is not available"
|
|
907
|
+
fi
|
|
908
|
+
deactivate
|
|
909
|
+
fi
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
# ============================================================================
|
|
913
|
+
# Final Report Functions
|
|
914
|
+
# ============================================================================
|
|
915
|
+
|
|
916
|
+
generate_remediation_commands() {
|
|
917
|
+
local has_sudo_skipped=false
|
|
918
|
+
local has_python_failed=false
|
|
919
|
+
|
|
920
|
+
# Check if we have sudo-skipped packages
|
|
921
|
+
if [[ ${#SKIPPED_SUDO[@]} -gt 0 ]]; then
|
|
922
|
+
has_sudo_skipped=true
|
|
923
|
+
fi
|
|
924
|
+
|
|
925
|
+
# Check if we have Python package failures
|
|
926
|
+
if [[ ${#FAILED_OPTIONAL[@]} -gt 0 ]]; then
|
|
927
|
+
has_python_failed=true
|
|
928
|
+
fi
|
|
929
|
+
|
|
930
|
+
if [[ "$has_sudo_skipped" == "false" ]] && [[ "$has_python_failed" == "false" ]]; then
|
|
931
|
+
return 0
|
|
932
|
+
fi
|
|
933
|
+
|
|
934
|
+
echo ""
|
|
935
|
+
echo -e "${BLUE}---------------------------------------------------${NC}"
|
|
936
|
+
echo -e "${BLUE}Manual Installation Commands:${NC}"
|
|
937
|
+
echo -e "${BLUE}---------------------------------------------------${NC}"
|
|
938
|
+
echo ""
|
|
939
|
+
|
|
940
|
+
if [[ "$has_sudo_skipped" == "true" ]]; then
|
|
941
|
+
echo "# System packages (requires root/sudo):"
|
|
942
|
+
case "$DISTRO" in
|
|
943
|
+
alpine)
|
|
944
|
+
echo "apk update"
|
|
945
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
946
|
+
local pkg="${item%%:*}"
|
|
947
|
+
case "$pkg" in
|
|
948
|
+
FFmpeg) echo "apk add ffmpeg" ;;
|
|
949
|
+
ImageMagick) echo "apk add imagemagick" ;;
|
|
950
|
+
*) echo "# $pkg: see documentation" ;;
|
|
951
|
+
esac
|
|
952
|
+
done
|
|
953
|
+
;;
|
|
954
|
+
arch)
|
|
955
|
+
echo "sudo pacman -Sy"
|
|
956
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
957
|
+
local pkg="${item%%:*}"
|
|
958
|
+
case "$pkg" in
|
|
959
|
+
FFmpeg) echo "sudo pacman -S --noconfirm ffmpeg" ;;
|
|
960
|
+
ImageMagick) echo "sudo pacman -S --noconfirm imagemagick" ;;
|
|
961
|
+
*) echo "# $pkg: see documentation" ;;
|
|
962
|
+
esac
|
|
963
|
+
done
|
|
964
|
+
;;
|
|
965
|
+
debian)
|
|
966
|
+
echo "sudo apt-get update"
|
|
967
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
968
|
+
local pkg="${item%%:*}"
|
|
969
|
+
case "$pkg" in
|
|
970
|
+
FFmpeg) echo "sudo apt-get install -y ffmpeg" ;;
|
|
971
|
+
ImageMagick) echo "sudo apt-get install -y imagemagick" ;;
|
|
972
|
+
*) echo "# $pkg: see documentation" ;;
|
|
973
|
+
esac
|
|
974
|
+
done
|
|
975
|
+
;;
|
|
976
|
+
redhat)
|
|
977
|
+
echo "sudo dnf check-update"
|
|
978
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
979
|
+
local pkg="${item%%:*}"
|
|
980
|
+
case "$pkg" in
|
|
981
|
+
FFmpeg) echo "sudo dnf install -y ffmpeg" ;;
|
|
982
|
+
ImageMagick) echo "sudo dnf install -y ImageMagick" ;;
|
|
983
|
+
*) echo "# $pkg: see documentation" ;;
|
|
984
|
+
esac
|
|
985
|
+
done
|
|
986
|
+
;;
|
|
987
|
+
*)
|
|
988
|
+
echo "# Unknown distro - install packages manually"
|
|
989
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
990
|
+
local pkg="${item%%:*}"
|
|
991
|
+
echo "# $pkg: see documentation"
|
|
992
|
+
done
|
|
993
|
+
;;
|
|
994
|
+
esac
|
|
995
|
+
echo ""
|
|
996
|
+
fi
|
|
997
|
+
|
|
998
|
+
if [[ "$has_python_failed" == "true" ]]; then
|
|
999
|
+
echo "# Python packages (may require build tools):"
|
|
1000
|
+
case "$DISTRO" in
|
|
1001
|
+
alpine)
|
|
1002
|
+
echo "apk add build-base python3-dev jpeg-dev zlib-dev"
|
|
1003
|
+
;;
|
|
1004
|
+
arch)
|
|
1005
|
+
echo "sudo pacman -S --noconfirm base-devel python libjpeg-turbo zlib"
|
|
1006
|
+
;;
|
|
1007
|
+
debian)
|
|
1008
|
+
echo "sudo apt-get install -y gcc python3-dev libjpeg-dev zlib1g-dev"
|
|
1009
|
+
;;
|
|
1010
|
+
redhat)
|
|
1011
|
+
echo "sudo dnf install -y gcc python3-devel libjpeg-devel zlib-devel"
|
|
1012
|
+
;;
|
|
1013
|
+
*)
|
|
1014
|
+
if [[ "$OS" == "macos" ]]; then
|
|
1015
|
+
echo "xcode-select --install"
|
|
1016
|
+
echo "brew install jpeg libpng"
|
|
1017
|
+
else
|
|
1018
|
+
echo "# Install gcc, python3-dev, and image libraries for your distro"
|
|
1019
|
+
fi
|
|
1020
|
+
;;
|
|
1021
|
+
esac
|
|
1022
|
+
echo "source $VENV_DIR/bin/activate"
|
|
1023
|
+
|
|
1024
|
+
for item in "${FAILED_OPTIONAL[@]}"; do
|
|
1025
|
+
local pkg="${item%%:*}"
|
|
1026
|
+
# Extract package name from skill:package format
|
|
1027
|
+
if [[ "$pkg" == *":"* ]]; then
|
|
1028
|
+
pkg="${pkg#*:}"
|
|
1029
|
+
fi
|
|
1030
|
+
echo "pip install $pkg"
|
|
1031
|
+
done
|
|
1032
|
+
echo ""
|
|
1033
|
+
fi
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
print_final_report() {
|
|
1037
|
+
echo ""
|
|
1038
|
+
echo -e "${BLUE}===================================================${NC}"
|
|
1039
|
+
echo -e "${BLUE} Installation Report${NC}"
|
|
1040
|
+
echo -e "${BLUE}===================================================${NC}"
|
|
1041
|
+
echo ""
|
|
1042
|
+
|
|
1043
|
+
# Installed section
|
|
1044
|
+
local installed_count=$((${#INSTALLED_CRITICAL[@]} + ${#INSTALLED_OPTIONAL[@]}))
|
|
1045
|
+
if [[ $installed_count -gt 0 ]]; then
|
|
1046
|
+
echo -e "${GREEN}Installed ($installed_count):${NC}"
|
|
1047
|
+
for item in "${INSTALLED_CRITICAL[@]}"; do
|
|
1048
|
+
echo -e " ${GREEN}✓${NC} $item"
|
|
1049
|
+
done
|
|
1050
|
+
for item in "${INSTALLED_OPTIONAL[@]}"; do
|
|
1051
|
+
echo -e " ${GREEN}✓${NC} $item"
|
|
1052
|
+
done
|
|
1053
|
+
echo ""
|
|
1054
|
+
fi
|
|
1055
|
+
|
|
1056
|
+
# Skipped section
|
|
1057
|
+
if [[ ${#SKIPPED_SUDO[@]} -gt 0 ]]; then
|
|
1058
|
+
echo -e "${YELLOW}Skipped (${#SKIPPED_SUDO[@]}):${NC}"
|
|
1059
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
1060
|
+
local name="${item%%:*}"
|
|
1061
|
+
local reason="${item#*:}"
|
|
1062
|
+
echo -e " ${YELLOW}~${NC} $name (${reason# })"
|
|
1063
|
+
done
|
|
1064
|
+
echo ""
|
|
1065
|
+
fi
|
|
1066
|
+
|
|
1067
|
+
# Degraded/Failed section
|
|
1068
|
+
if [[ ${#FAILED_OPTIONAL[@]} -gt 0 ]]; then
|
|
1069
|
+
echo -e "${RED}Degraded (${#FAILED_OPTIONAL[@]}):${NC}"
|
|
1070
|
+
for item in "${FAILED_OPTIONAL[@]}"; do
|
|
1071
|
+
local name="${item%%:*}"
|
|
1072
|
+
local reason="${item#*:}"
|
|
1073
|
+
echo -e " ${RED}!${NC} $name (${reason# })"
|
|
1074
|
+
done
|
|
1075
|
+
echo ""
|
|
1076
|
+
fi
|
|
1077
|
+
|
|
1078
|
+
# Remediation commands
|
|
1079
|
+
generate_remediation_commands
|
|
1080
|
+
|
|
1081
|
+
# Exit status line
|
|
1082
|
+
echo -e "${BLUE}===================================================${NC}"
|
|
1083
|
+
case $FINAL_EXIT_CODE in
|
|
1084
|
+
0) echo -e " ${GREEN}Exit: 0 (success - all dependencies installed)${NC}" ;;
|
|
1085
|
+
1) echo -e " ${RED}Exit: 1 (failed - critical dependencies missing)${NC}" ;;
|
|
1086
|
+
2) echo -e " ${YELLOW}Exit: 2 (partial - some optional deps failed)${NC}" ;;
|
|
1087
|
+
esac
|
|
1088
|
+
echo -e "${BLUE}===================================================${NC}"
|
|
1089
|
+
echo ""
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
# Escape string for JSON (handle all special chars)
|
|
1093
|
+
json_escape() {
|
|
1094
|
+
printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g' | tr '\n' ' ' | tr '\r' ' ' | tr '\t' ' '
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
# Write structured error summary for CLI to parse
|
|
1098
|
+
write_error_summary() {
|
|
1099
|
+
# Only write if there are failures
|
|
1100
|
+
if [[ $FINAL_EXIT_CODE -eq 0 ]]; then
|
|
1101
|
+
return 0
|
|
1102
|
+
fi
|
|
1103
|
+
|
|
1104
|
+
# Write to a file that CLI can read
|
|
1105
|
+
local summary_file="$SCRIPT_DIR/.install-error-summary.json"
|
|
1106
|
+
|
|
1107
|
+
# Build JSON arrays carefully for bash compatibility
|
|
1108
|
+
local critical_json="[]"
|
|
1109
|
+
local optional_json="[]"
|
|
1110
|
+
local skipped_json="[]"
|
|
1111
|
+
|
|
1112
|
+
if [[ ${#FAILED_OPTIONAL[@]} -gt 0 ]]; then
|
|
1113
|
+
optional_json="["
|
|
1114
|
+
local first=true
|
|
1115
|
+
for item in "${FAILED_OPTIONAL[@]}"; do
|
|
1116
|
+
if [[ "$first" == "true" ]]; then
|
|
1117
|
+
first=false
|
|
1118
|
+
else
|
|
1119
|
+
optional_json+=","
|
|
1120
|
+
fi
|
|
1121
|
+
optional_json+="\"$(json_escape "$item")\""
|
|
1122
|
+
done
|
|
1123
|
+
optional_json+="]"
|
|
1124
|
+
fi
|
|
1125
|
+
|
|
1126
|
+
if [[ ${#SKIPPED_SUDO[@]} -gt 0 ]]; then
|
|
1127
|
+
skipped_json="["
|
|
1128
|
+
local first=true
|
|
1129
|
+
for item in "${SKIPPED_SUDO[@]}"; do
|
|
1130
|
+
if [[ "$first" == "true" ]]; then
|
|
1131
|
+
first=false
|
|
1132
|
+
else
|
|
1133
|
+
skipped_json+=","
|
|
1134
|
+
fi
|
|
1135
|
+
skipped_json+="\"$(json_escape "$item")\""
|
|
1136
|
+
done
|
|
1137
|
+
skipped_json+="]"
|
|
1138
|
+
fi
|
|
1139
|
+
|
|
1140
|
+
# Generate distro-specific remediation commands
|
|
1141
|
+
local sudo_pkg_cmd build_tools_cmd
|
|
1142
|
+
case "$DISTRO" in
|
|
1143
|
+
alpine)
|
|
1144
|
+
sudo_pkg_cmd="apk add ffmpeg imagemagick"
|
|
1145
|
+
build_tools_cmd="apk add build-base python3-dev jpeg-dev zlib-dev"
|
|
1146
|
+
;;
|
|
1147
|
+
arch)
|
|
1148
|
+
sudo_pkg_cmd="sudo pacman -S --noconfirm ffmpeg imagemagick"
|
|
1149
|
+
build_tools_cmd="sudo pacman -S --noconfirm base-devel python libjpeg-turbo zlib"
|
|
1150
|
+
;;
|
|
1151
|
+
debian)
|
|
1152
|
+
sudo_pkg_cmd="sudo apt-get install -y ffmpeg imagemagick"
|
|
1153
|
+
build_tools_cmd="sudo apt-get install -y gcc python3-dev libjpeg-dev zlib1g-dev"
|
|
1154
|
+
;;
|
|
1155
|
+
redhat)
|
|
1156
|
+
sudo_pkg_cmd="sudo dnf install -y ffmpeg ImageMagick"
|
|
1157
|
+
build_tools_cmd="sudo dnf install -y gcc python3-devel libjpeg-devel zlib-devel"
|
|
1158
|
+
;;
|
|
1159
|
+
*)
|
|
1160
|
+
if [[ "$OS" == "macos" ]]; then
|
|
1161
|
+
sudo_pkg_cmd="brew install ffmpeg imagemagick"
|
|
1162
|
+
build_tools_cmd="xcode-select --install && brew install jpeg libpng"
|
|
1163
|
+
else
|
|
1164
|
+
sudo_pkg_cmd="# Install ffmpeg and imagemagick for your distro"
|
|
1165
|
+
build_tools_cmd="# Install gcc, python3-dev, and image libraries for your distro"
|
|
1166
|
+
fi
|
|
1167
|
+
;;
|
|
1168
|
+
esac
|
|
1169
|
+
|
|
1170
|
+
cat > "$summary_file" << EOF
|
|
1171
|
+
{
|
|
1172
|
+
"exit_code": $FINAL_EXIT_CODE,
|
|
1173
|
+
"timestamp": "$(date -Iseconds 2>/dev/null || date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
1174
|
+
"distro": "$DISTRO",
|
|
1175
|
+
"critical_failures": $critical_json,
|
|
1176
|
+
"optional_failures": $optional_json,
|
|
1177
|
+
"skipped": $skipped_json,
|
|
1178
|
+
"remediation": {
|
|
1179
|
+
"sudo_packages": "$sudo_pkg_cmd",
|
|
1180
|
+
"build_tools": "$build_tools_cmd",
|
|
1181
|
+
"pip_retry": "source $VENV_DIR/bin/activate && pip install <package>"
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
EOF
|
|
1185
|
+
|
|
1186
|
+
print_info "Error summary written to: $summary_file"
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
# Print usage instructions (now just brief tips)
|
|
1190
|
+
print_usage() {
|
|
1191
|
+
echo -e "${GREEN}To use the Python virtual environment:${NC}"
|
|
1192
|
+
echo -e " source $HOME/.copilot/skills/.venv/bin/activate"
|
|
1193
|
+
echo ""
|
|
1194
|
+
echo -e "${BLUE}For more information, see:${NC}"
|
|
1195
|
+
echo -e " $HOME/.copilot/skills/INSTALLATION.md"
|
|
1196
|
+
echo ""
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
# Main installation flow
|
|
1200
|
+
main() {
|
|
1201
|
+
echo "" # Just add spacing, don't clear terminal
|
|
1202
|
+
print_header "CoKit Skills Installation"
|
|
1203
|
+
print_info "OS: $OS"
|
|
1204
|
+
if [[ "$OS" == "linux" ]] || [[ "$OS" == "wsl" ]]; then
|
|
1205
|
+
print_info "Distro: $DISTRO"
|
|
1206
|
+
fi
|
|
1207
|
+
if [[ "$OS" == "wsl" ]]; then
|
|
1208
|
+
print_info "Environment: Windows Subsystem for Linux"
|
|
1209
|
+
fi
|
|
1210
|
+
print_info "Script directory: $SCRIPT_DIR"
|
|
1211
|
+
if [[ "$WITH_SUDO" == "true" ]]; then
|
|
1212
|
+
print_info "Mode: with sudo (--with-sudo)"
|
|
1213
|
+
else
|
|
1214
|
+
print_info "Mode: without sudo (system packages will be skipped)"
|
|
1215
|
+
fi
|
|
1216
|
+
if [[ "$RESUME_MODE" == "true" ]]; then
|
|
1217
|
+
print_info "Mode: resuming previous installation"
|
|
1218
|
+
fi
|
|
1219
|
+
echo ""
|
|
1220
|
+
|
|
1221
|
+
# Handle unsupported OS
|
|
1222
|
+
if [[ "$OS" == "unknown" ]]; then
|
|
1223
|
+
print_error "Unsupported operating system"
|
|
1224
|
+
exit 1
|
|
1225
|
+
fi
|
|
1226
|
+
|
|
1227
|
+
# Warn about limited Windows shell support
|
|
1228
|
+
if [[ "$OS" == "msys" ]] || [[ "$OS" == "cygwin" ]]; then
|
|
1229
|
+
print_warning "Running in Windows shell environment ($OS)"
|
|
1230
|
+
print_warning "Limited functionality - system packages cannot be installed"
|
|
1231
|
+
print_info "For full support, consider using WSL (Windows Subsystem for Linux)"
|
|
1232
|
+
print_info "Continuing with Python environment setup only..."
|
|
1233
|
+
echo ""
|
|
1234
|
+
fi
|
|
1235
|
+
|
|
1236
|
+
# Confirm installation (skip if --yes flag or NON_INTERACTIVE env is set)
|
|
1237
|
+
if [[ "$SKIP_CONFIRM" == "false" ]]; then
|
|
1238
|
+
read -p "This will install system packages and Node.js dependencies. Continue? (y/N) " -n 1 -r
|
|
1239
|
+
echo
|
|
1240
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
1241
|
+
print_warning "Installation cancelled"
|
|
1242
|
+
exit 0
|
|
1243
|
+
fi
|
|
1244
|
+
else
|
|
1245
|
+
print_info "Auto-confirming installation (--yes flag or NON_INTERACTIVE mode)"
|
|
1246
|
+
fi
|
|
1247
|
+
|
|
1248
|
+
# Initialize state tracking
|
|
1249
|
+
init_state
|
|
1250
|
+
|
|
1251
|
+
# Phase 1: System deps
|
|
1252
|
+
if phase_done "system_deps"; then
|
|
1253
|
+
print_success "System deps: already processed (resume)"
|
|
1254
|
+
else
|
|
1255
|
+
update_phase "system_deps" "running"
|
|
1256
|
+
check_package_manager
|
|
1257
|
+
install_system_deps
|
|
1258
|
+
update_phase "system_deps" "done"
|
|
1259
|
+
fi
|
|
1260
|
+
|
|
1261
|
+
# Phase 2: Node deps
|
|
1262
|
+
if phase_done "node_deps"; then
|
|
1263
|
+
print_success "Node deps: already installed (resume)"
|
|
1264
|
+
else
|
|
1265
|
+
update_phase "node_deps" "running"
|
|
1266
|
+
install_node_deps
|
|
1267
|
+
update_phase "node_deps" "done"
|
|
1268
|
+
fi
|
|
1269
|
+
|
|
1270
|
+
# Phase 3: Python env
|
|
1271
|
+
if phase_done "python_env"; then
|
|
1272
|
+
print_success "Python env: already set up (resume)"
|
|
1273
|
+
else
|
|
1274
|
+
update_phase "python_env" "running"
|
|
1275
|
+
setup_python_env
|
|
1276
|
+
update_phase "python_env" "done"
|
|
1277
|
+
fi
|
|
1278
|
+
|
|
1279
|
+
# Phase 4: Verify
|
|
1280
|
+
update_phase "verify" "running"
|
|
1281
|
+
verify_installations
|
|
1282
|
+
update_phase "verify" "done"
|
|
1283
|
+
|
|
1284
|
+
# Print final report with all tracking info
|
|
1285
|
+
print_final_report
|
|
1286
|
+
print_usage
|
|
1287
|
+
|
|
1288
|
+
# Write error summary for CLI to parse
|
|
1289
|
+
write_error_summary
|
|
1290
|
+
|
|
1291
|
+
# Clean state on complete success
|
|
1292
|
+
if [[ "$FINAL_EXIT_CODE" -eq 0 ]]; then
|
|
1293
|
+
clean_state
|
|
1294
|
+
fi
|
|
1295
|
+
|
|
1296
|
+
exit $FINAL_EXIT_CODE
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
# Run main function
|
|
1300
|
+
main
|