claude-code-arcane 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +100 -0
- package/LICENSE +26 -0
- package/README.md +372 -0
- package/agents/ai/ai-architect.md +80 -0
- package/agents/ai/data-engineer.md +66 -0
- package/agents/ai/data-scientist.md +58 -0
- package/agents/ai/ml-engineer.md +61 -0
- package/agents/business/business-ops-lead.md +64 -0
- package/agents/business/financial-analyst.md +62 -0
- package/agents/business/sales-engineer.md +74 -0
- package/agents/clevel/ceo-advisor.md +64 -0
- package/agents/clevel/cfo-advisor.md +63 -0
- package/agents/clevel/chief-of-staff.md +60 -0
- package/agents/clevel/cmo-advisor.md +67 -0
- package/agents/clevel/coo-advisor.md +79 -0
- package/agents/clevel/cto-advisor.md +72 -0
- package/agents/devops/cloud-architect.md +52 -0
- package/agents/devops/platform-lead.md +72 -0
- package/agents/devops/sre-lead.md +100 -0
- package/agents/engineering/android-engineer.md +78 -0
- package/agents/engineering/backend-architect.md +127 -0
- package/agents/engineering/database-architect.md +138 -0
- package/agents/engineering/flutter-engineer.md +75 -0
- package/agents/engineering/frontend-architect.md +138 -0
- package/agents/engineering/go-engineer.md +102 -0
- package/agents/engineering/ios-engineer.md +76 -0
- package/agents/engineering/node-engineer.md +107 -0
- package/agents/engineering/react-engineer.md +109 -0
- package/agents/engineering/react-native-engineer.md +112 -0
- package/agents/engineering/sql-specialist.md +106 -0
- package/agents/game/accessibility-specialist.md +150 -0
- package/agents/game/ai-programmer.md +95 -0
- package/agents/game/analytics-engineer.md +101 -0
- package/agents/game/art-director.md +64 -0
- package/agents/game/economy-designer.md +143 -0
- package/agents/game/game-designer.md +70 -0
- package/agents/game/gameplay-programmer.md +133 -0
- package/agents/game/lead-programmer.md +62 -0
- package/agents/game/level-designer.md +115 -0
- package/agents/game/live-ops-designer.md +184 -0
- package/agents/game/narrative-director.md +60 -0
- package/agents/game/network-programmer.md +98 -0
- package/agents/game/performance-analyst.md +112 -0
- package/agents/game/qa-lead.md +65 -0
- package/agents/game/qa-tester-gamedev.md +230 -0
- package/agents/game/release-manager.md +65 -0
- package/agents/game/sound-designer.md +85 -0
- package/agents/game/systems-designer.md +157 -0
- package/agents/game/technical-artist.md +108 -0
- package/agents/game/technical-director.md +74 -0
- package/agents/game/ue-replication-specialist.md +143 -0
- package/agents/game/unity-shader-specialist.md +178 -0
- package/agents/game/unity-specialist.md +184 -0
- package/agents/game/unreal-specialist.md +172 -0
- package/agents/game/ux-designer.md +112 -0
- package/agents/game/world-builder.md +111 -0
- package/agents/game/writer.md +104 -0
- package/agents/integrations/api-tools-specialist.md +209 -0
- package/agents/integrations/comms-tools-specialist.md +159 -0
- package/agents/integrations/design-tools-specialist.md +129 -0
- package/agents/integrations/docs-tools-specialist.md +116 -0
- package/agents/integrations/integrations-architect.md +144 -0
- package/agents/integrations/project-tools-specialist.md +129 -0
- package/agents/management/delivery-manager.md +105 -0
- package/agents/management/program-director.md +55 -0
- package/agents/management/project-manager.md +126 -0
- package/agents/management/scrum-master.md +96 -0
- package/agents/marketing/content-lead.md +74 -0
- package/agents/marketing/growth-lead.md +72 -0
- package/agents/marketing/marketing-analyst.md +89 -0
- package/agents/marketing/marketing-director.md +75 -0
- package/agents/marketing/seo-lead.md +80 -0
- package/agents/product/chief-product-officer.md +79 -0
- package/agents/product/design-system-lead.md +76 -0
- package/agents/product/product-manager.md +132 -0
- package/agents/product/ui-lead.md +73 -0
- package/agents/product/ux-lead.md +103 -0
- package/agents/quality/qa-director.md +121 -0
- package/agents/quality/qa-engineer.md +92 -0
- package/agents/quality/security-architect.md +144 -0
- package/agents/regulatory/compliance-officer.md +88 -0
- package/agents/regulatory/quality-manager.md +90 -0
- package/agents/regulatory/regulatory-director.md +92 -0
- package/agents/visualnovel/vn-comfyui-artist.md +91 -0
- package/agents/visualnovel/vn-narrative-director.md +86 -0
- package/agents/visualnovel/vn-producer.md +108 -0
- package/agents/visualnovel/vn-renpy-developer.md +118 -0
- package/agents/visualnovel/vn-scene-director.md +98 -0
- package/agents/visualnovel/vn-ui-designer.md +97 -0
- package/dist/cli.js +2352 -0
- package/docs/SKILLS-CATALOG.md +457 -0
- package/docs/USER-GUIDE.md +543 -0
- package/docs/agent-hierarchy.md +133 -0
- package/docs/coding-standards.md +135 -0
- package/docs/collaborative-design.md +439 -0
- package/docs/context-management.md +200 -0
- package/docs/coordination-rules.md +164 -0
- package/docs/directory-structure.md +156 -0
- package/docs/division-structure.md +135 -0
- package/docs/gamedev/coding-standards.md +184 -0
- package/docs/gates/README.md +169 -0
- package/docs/gates/gamedev-gates.md +509 -0
- package/docs/gates/software-gates.md +449 -0
- package/docs/software/coding-standards.md +165 -0
- package/docs/technical-preferences.md +61 -0
- package/docs/templates/accessibility-requirements.md +331 -0
- package/docs/templates/architecture-decision-record.md +177 -0
- package/docs/templates/architecture-doc-from-code.md +266 -0
- package/docs/templates/architecture-traceability.md +101 -0
- package/docs/templates/changelog-template.md +62 -0
- package/docs/templates/collaborative-protocols/design-agent-protocol.md +157 -0
- package/docs/templates/collaborative-protocols/implementation-agent-protocol.md +160 -0
- package/docs/templates/collaborative-protocols/leadership-agent-protocol.md +181 -0
- package/docs/templates/design-doc-from-implementation.md +204 -0
- package/docs/templates/incident-response.md +135 -0
- package/docs/templates/interaction-pattern-library.md +1089 -0
- package/docs/templates/milestone-definition.md +79 -0
- package/docs/templates/post-mortem.md +69 -0
- package/docs/templates/prd.md +222 -0
- package/docs/templates/project-stage-report.md +218 -0
- package/docs/templates/release-checklist-template.md +125 -0
- package/docs/templates/release-notes.md +103 -0
- package/docs/templates/rfc.md +256 -0
- package/docs/templates/risk-register-entry.md +58 -0
- package/docs/templates/skill-test-spec.md +96 -0
- package/docs/templates/sprint-plan.md +75 -0
- package/docs/templates/technical-design-document.md +98 -0
- package/docs/templates/test-evidence.md +86 -0
- package/docs/templates/test-plan.md +151 -0
- package/docs/templates/ux-spec.md +544 -0
- package/hooks/check-update.sh +82 -0
- package/hooks/detect-division.sh +28 -0
- package/hooks/detect-gaps.sh +230 -0
- package/hooks/log-agent-stop.sh +7 -0
- package/hooks/log-agent.sh +7 -0
- package/hooks/notify.sh +7 -0
- package/hooks/post-compact.sh +7 -0
- package/hooks/pre-compact.sh +7 -0
- package/hooks/session-start.sh +78 -0
- package/hooks/session-stop.sh +7 -0
- package/hooks/statusline.sh +98 -0
- package/hooks/validate-assets.sh +10 -0
- package/hooks/validate-commit.sh +24 -0
- package/hooks/validate-push.sh +21 -0
- package/hooks/validate-secrets.sh +23 -0
- package/hooks/validate-skill-change.sh +19 -0
- package/package.json +63 -0
- package/profiles/agile.yaml +60 -0
- package/profiles/ai.yaml +27 -0
- package/profiles/android-native.yaml +36 -0
- package/profiles/backend-go.yaml +56 -0
- package/profiles/backend-ts.yaml +59 -0
- package/profiles/business.yaml +24 -0
- package/profiles/clevel.yaml +48 -0
- package/profiles/clickup.yaml +21 -0
- package/profiles/core.yaml +83 -0
- package/profiles/database.yaml +28 -0
- package/profiles/design.yaml +30 -0
- package/profiles/docs.yaml +31 -0
- package/profiles/finance.yaml +23 -0
- package/profiles/flutter.yaml +37 -0
- package/profiles/frontend.yaml +39 -0
- package/profiles/infra.yaml +47 -0
- package/profiles/integrations.yaml +23 -0
- package/profiles/ios-native.yaml +37 -0
- package/profiles/jira.yaml +21 -0
- package/profiles/marketing.yaml +64 -0
- package/profiles/mobile.yaml +39 -0
- package/profiles/regulatory.yaml +33 -0
- package/profiles/security.yaml +30 -0
- package/profiles/self-improving.yaml +22 -0
- package/profiles/statusline.yaml +21 -0
- package/profiles/testing.yaml +32 -0
- package/profiles/unity-design.yaml +37 -0
- package/profiles/unity-dev.yaml +44 -0
- package/profiles/visual-novel.yaml +54 -0
- package/rules/ai-code.md +60 -0
- package/rules/api-code.md +41 -0
- package/rules/backend-code.md +35 -0
- package/rules/data-files.md +58 -0
- package/rules/frontend-code.md +35 -0
- package/rules/gamedev/ai-code.md +15 -0
- package/rules/gamedev/design-docs.md +18 -0
- package/rules/gamedev/engine-code.md +41 -0
- package/rules/gamedev/gameplay-code.md +31 -0
- package/rules/gamedev/narrative.md +15 -0
- package/rules/gamedev/network-code.md +15 -0
- package/rules/gamedev/shader-code.md +43 -0
- package/rules/gamedev/ui-code.md +15 -0
- package/rules/gamedev/vn-code.md +37 -0
- package/rules/implementation-workflow.md +48 -0
- package/rules/infra-code.md +47 -0
- package/rules/migration-code.md +41 -0
- package/rules/prototype-code.md +40 -0
- package/rules/test-standards.md +55 -0
- package/skills/ab-test-setup/SKILL.md +99 -0
- package/skills/ab-test-setup/references/sample-size-guide.md +252 -0
- package/skills/ab-test-setup/references/test-templates.md +268 -0
- package/skills/ab-test-setup/scripts/sample_size_calculator.py +337 -0
- package/skills/accessibility/SKILL.md +32 -0
- package/skills/accessibility/references/anti-patterns.md +9 -0
- package/skills/accessibility/references/component-requirements.md +15 -0
- package/skills/accessibility/references/focus-forms-testing.md +31 -0
- package/skills/accessibility/references/wcag-criteria.md +17 -0
- package/skills/ad-creative/SKILL.md +85 -0
- package/skills/ad-creative/references/creative-frameworks.md +253 -0
- package/skills/ad-creative/references/platform-specs.md +170 -0
- package/skills/ad-creative/scripts/ad_copy_validator.py +490 -0
- package/skills/agent-designer/README.md +430 -0
- package/skills/agent-designer/SKILL.md +64 -0
- package/skills/agent-designer/agent_evaluator.py +1223 -0
- package/skills/agent-designer/agent_planner.py +911 -0
- package/skills/agent-designer/assets/sample_execution_logs.json +543 -0
- package/skills/agent-designer/assets/sample_system_requirements.json +57 -0
- package/skills/agent-designer/assets/sample_tool_descriptions.json +545 -0
- package/skills/agent-designer/expected_outputs/sample_agent_architecture.json +488 -0
- package/skills/agent-designer/expected_outputs/sample_evaluation_report.json +570 -0
- package/skills/agent-designer/expected_outputs/sample_tool_schemas.json +416 -0
- package/skills/agent-designer/references/agent_architecture_patterns.md +445 -0
- package/skills/agent-designer/references/evaluation_methodology.md +749 -0
- package/skills/agent-designer/references/tool_design_best_practices.md +470 -0
- package/skills/agent-designer/tool_schema_generator.py +978 -0
- package/skills/agent-protocol/SKILL.md +102 -0
- package/skills/agent-protocol/references/communication-standard.md +115 -0
- package/skills/agent-protocol/references/invocation-patterns.md +247 -0
- package/skills/agent-protocol/references/quality-loop.md +123 -0
- package/skills/agent-workflow-designer/SKILL.md +59 -0
- package/skills/agent-workflow-designer/references/workflow-patterns.md +82 -0
- package/skills/agent-workflow-designer/scripts/workflow_scaffolder.py +113 -0
- package/skills/ai-security/SKILL.md +113 -0
- package/skills/ai-security/references/atlas-coverage.md +150 -0
- package/skills/ai-security/scripts/ai_threat_scanner.py +564 -0
- package/skills/ai-seo/SKILL.md +172 -0
- package/skills/ai-seo/references/ai-search-landscape.md +191 -0
- package/skills/ai-seo/references/content-patterns.md +276 -0
- package/skills/ai-seo/references/monitoring-guide.md +208 -0
- package/skills/ai-seo/references/optimization-playbook.md +58 -0
- package/skills/analytics-tracking/SKILL.md +105 -0
- package/skills/analytics-tracking/references/debugging-playbook.md +224 -0
- package/skills/analytics-tracking/references/event-taxonomy-guide.md +203 -0
- package/skills/analytics-tracking/references/gtm-patterns.md +298 -0
- package/skills/analytics-tracking/scripts/tracking_plan_generator.py +386 -0
- package/skills/android-native-dev/SKILL.md +878 -0
- package/skills/android-native-dev/references/accessibility.md +209 -0
- package/skills/android-native-dev/references/adaptive-screens.md +231 -0
- package/skills/android-native-dev/references/design-style-guide.md +365 -0
- package/skills/android-native-dev/references/functional-requirements.md +229 -0
- package/skills/android-native-dev/references/motion-system.md +203 -0
- package/skills/android-native-dev/references/performance-stability.md +223 -0
- package/skills/android-native-dev/references/privacy-security.md +244 -0
- package/skills/android-native-dev/references/testing.md +554 -0
- package/skills/android-native-dev/references/visual-design.md +246 -0
- package/skills/api-design/SKILL.md +88 -0
- package/skills/api-design/references/anti-patterns.md +14 -0
- package/skills/api-design/references/versioning-deprecation.md +23 -0
- package/skills/api-docs/SKILL.md +101 -0
- package/skills/api-versioning/SKILL.md +51 -0
- package/skills/api-versioning/references/anti-patterns-and-checklist.md +27 -0
- package/skills/api-versioning/references/implementation-by-framework.md +31 -0
- package/skills/app-store-optimization/HOW_TO_USE.md +281 -0
- package/skills/app-store-optimization/SKILL.md +150 -0
- package/skills/app-store-optimization/assets/aso-audit-template.md +268 -0
- package/skills/app-store-optimization/expected_output.json +170 -0
- package/skills/app-store-optimization/references/ab-testing-guide.md +72 -0
- package/skills/app-store-optimization/references/aso-best-practices.md +403 -0
- package/skills/app-store-optimization/references/before-after-examples.md +73 -0
- package/skills/app-store-optimization/references/keyword-research-guide.md +419 -0
- package/skills/app-store-optimization/references/metadata-optimization.md +65 -0
- package/skills/app-store-optimization/references/platform-requirements.md +324 -0
- package/skills/app-store-optimization/sample_input.json +30 -0
- package/skills/app-store-optimization/scripts/ab_test_planner.py +662 -0
- package/skills/app-store-optimization/scripts/aso_scorer.py +482 -0
- package/skills/app-store-optimization/scripts/competitor_analyzer.py +577 -0
- package/skills/app-store-optimization/scripts/keyword_analyzer.py +406 -0
- package/skills/app-store-optimization/scripts/launch_checklist.py +739 -0
- package/skills/app-store-optimization/scripts/localization_helper.py +588 -0
- package/skills/app-store-optimization/scripts/metadata_optimizer.py +581 -0
- package/skills/app-store-optimization/scripts/review_analyzer.py +714 -0
- package/skills/arcane-add/SKILL.md +47 -0
- package/skills/arcane-clean/SKILL.md +45 -0
- package/skills/arcane-list/SKILL.md +46 -0
- package/skills/arcane-remove/SKILL.md +68 -0
- package/skills/arcane-status/SKILL.md +42 -0
- package/skills/architecture-decision/SKILL.md +75 -0
- package/skills/architecture-decision/templates/adr.md +101 -0
- package/skills/architecture-review/SKILL.md +90 -0
- package/skills/art-bible/SKILL.md +88 -0
- package/skills/art-bible/references/anti-patterns.md +8 -0
- package/skills/art-bible/references/checklist.md +17 -0
- package/skills/asset-audit/SKILL.md +95 -0
- package/skills/asset-spec/SKILL.md +72 -0
- package/skills/asset-spec/references/anti-patterns-checklist.md +19 -0
- package/skills/asset-spec/references/spec-output-format.md +34 -0
- package/skills/async-ops/SKILL.md +59 -0
- package/skills/async-ops/references/anti-patterns.md +16 -0
- package/skills/async-ops/references/checklist.md +10 -0
- package/skills/async-ops/references/job-scheduling.md +37 -0
- package/skills/async-ops/references/outbound-webhooks.md +19 -0
- package/skills/atlassian-admin/SKILL.md +121 -0
- package/skills/atlassian-admin/assets/permission_scheme_template.json +173 -0
- package/skills/atlassian-admin/references/security-hardening-guide.md +214 -0
- package/skills/atlassian-admin/references/user-provisioning-checklist.md +177 -0
- package/skills/atlassian-admin/scripts/permission_audit_tool.py +469 -0
- package/skills/atlassian-templates/SKILL.md +128 -0
- package/skills/atlassian-templates/references/governance-framework.md +234 -0
- package/skills/atlassian-templates/references/template-design-patterns.md +252 -0
- package/skills/atlassian-templates/scripts/template_scaffolder.py +418 -0
- package/skills/audit-dev/SKILL.md +43 -0
- package/skills/audit-game/SKILL.md +54 -0
- package/skills/audit-game/references/cross-reference-criteria.md +42 -0
- package/skills/audit-game/references/output-template.md +48 -0
- package/skills/audit-log/SKILL.md +75 -0
- package/skills/auth-strategy/SKILL.md +120 -0
- package/skills/auth-strategy/references/anti-patterns.md +21 -0
- package/skills/aws-solution-architect/SKILL.md +125 -0
- package/skills/aws-solution-architect/assets/expected_output.json +55 -0
- package/skills/aws-solution-architect/assets/sample_input.json +18 -0
- package/skills/aws-solution-architect/references/architecture_patterns.md +535 -0
- package/skills/aws-solution-architect/references/best_practices.md +631 -0
- package/skills/aws-solution-architect/references/service_selection.md +484 -0
- package/skills/aws-solution-architect/scripts/architecture_designer.py +808 -0
- package/skills/aws-solution-architect/scripts/cost_optimizer.py +346 -0
- package/skills/aws-solution-architect/scripts/serverless_stack.py +663 -0
- package/skills/azure-cloud-architect/SKILL.md +128 -0
- package/skills/azure-cloud-architect/references/architecture_patterns.md +413 -0
- package/skills/azure-cloud-architect/references/best_practices.md +337 -0
- package/skills/azure-cloud-architect/references/service_selection.md +250 -0
- package/skills/azure-cloud-architect/scripts/architecture_designer.py +592 -0
- package/skills/azure-cloud-architect/scripts/bicep_generator.py +775 -0
- package/skills/azure-cloud-architect/scripts/cost_optimizer.py +492 -0
- package/skills/backup-strategy/SKILL.md +101 -0
- package/skills/balance-check/SKILL.md +119 -0
- package/skills/board-deck-builder/SKILL.md +64 -0
- package/skills/board-deck-builder/references/deck-frameworks.md +184 -0
- package/skills/board-deck-builder/templates/board-deck-template.md +210 -0
- package/skills/board-meeting/SKILL.md +58 -0
- package/skills/board-meeting/references/meeting-facilitation.md +167 -0
- package/skills/board-meeting/templates/meeting-agenda.md +81 -0
- package/skills/board-meeting/templates/meeting-minutes.md +91 -0
- package/skills/brainstorm/SKILL.md +94 -0
- package/skills/brainstorm/references/next-steps-pipeline.md +13 -0
- package/skills/brainstorm/references/review-mode-gates.md +13 -0
- package/skills/brand-guidelines/SKILL.md +91 -0
- package/skills/brand-guidelines/references/brand-identity-and-framework.md +262 -0
- package/skills/bug-report/SKILL.md +53 -0
- package/skills/bug-triage/SKILL.md +74 -0
- package/skills/business-investment-advisor/SKILL.md +83 -0
- package/skills/business-investment-advisor/references/analysis-frameworks.md +113 -0
- package/skills/caching-strategy/SKILL.md +81 -0
- package/skills/caching-strategy/references/http-headers.md +9 -0
- package/skills/caching-strategy/references/patterns-and-invalidation.md +25 -0
- package/skills/caching-strategy/references/redis-and-client.md +13 -0
- package/skills/caching-strategy/references/ttl-defaults.md +11 -0
- package/skills/campaign-analytics/SKILL.md +93 -0
- package/skills/campaign-analytics/assets/ab_test_template.md +130 -0
- package/skills/campaign-analytics/assets/campaign_report_template.md +141 -0
- package/skills/campaign-analytics/assets/channel_comparison_template.md +158 -0
- package/skills/campaign-analytics/assets/expected_output.json +110 -0
- package/skills/campaign-analytics/assets/sample_campaign_data.json +151 -0
- package/skills/campaign-analytics/references/attribution-models-guide.md +285 -0
- package/skills/campaign-analytics/references/campaign-metrics-benchmarks.md +259 -0
- package/skills/campaign-analytics/references/funnel-optimization-framework.md +302 -0
- package/skills/campaign-analytics/scripts/attribution_analyzer.py +347 -0
- package/skills/campaign-analytics/scripts/campaign_roi_calculator.py +459 -0
- package/skills/campaign-analytics/scripts/funnel_analyzer.py +305 -0
- package/skills/capa-officer/SKILL.md +125 -0
- package/skills/capa-officer/references/effectiveness-verification-guide.md +462 -0
- package/skills/capa-officer/references/rca-methodologies.md +455 -0
- package/skills/capa-officer/scripts/capa_tracker.py +638 -0
- package/skills/capa-officer/scripts/root_cause_analyzer.py +486 -0
- package/skills/cdn-setup/SKILL.md +33 -0
- package/skills/cdn-setup/references/cache-strategy-and-invalidation.md +30 -0
- package/skills/cdn-setup/references/security-and-anti-patterns.md +26 -0
- package/skills/ceo-advisor/SKILL.md +110 -0
- package/skills/ceo-advisor/references/board_governance_investor_relations.md +599 -0
- package/skills/ceo-advisor/references/executive_decision_framework.md +475 -0
- package/skills/ceo-advisor/references/leadership_organizational_culture.md +682 -0
- package/skills/ceo-advisor/scripts/financial_scenario_analyzer.py +451 -0
- package/skills/ceo-advisor/scripts/strategy_analyzer.py +609 -0
- package/skills/cfo-advisor/SKILL.md +81 -0
- package/skills/cfo-advisor/references/cash_management.md +374 -0
- package/skills/cfo-advisor/references/financial_planning.md +500 -0
- package/skills/cfo-advisor/references/fundraising_playbook.md +419 -0
- package/skills/cfo-advisor/scripts/burn_rate_calculator.py +402 -0
- package/skills/cfo-advisor/scripts/fundraising_model.py +490 -0
- package/skills/cfo-advisor/scripts/unit_economics_analyzer.py +529 -0
- package/skills/change-management/SKILL.md +53 -0
- package/skills/change-management/references/adkar-details.md +110 -0
- package/skills/change-management/references/change-playbook.md +308 -0
- package/skills/changelog/SKILL.md +111 -0
- package/skills/check/SKILL.md +22 -0
- package/skills/chief-of-staff/SKILL.md +70 -0
- package/skills/chief-of-staff/references/routing-matrix.md +212 -0
- package/skills/chief-of-staff/references/synthesis-framework.md +201 -0
- package/skills/chro-advisor/SKILL.md +86 -0
- package/skills/chro-advisor/references/comp_frameworks.md +320 -0
- package/skills/chro-advisor/references/org_design.md +333 -0
- package/skills/chro-advisor/references/people_strategy.md +320 -0
- package/skills/chro-advisor/scripts/comp_benchmarker.py +613 -0
- package/skills/chro-advisor/scripts/hiring_plan_modeler.py +572 -0
- package/skills/churn-prevention/SKILL.md +200 -0
- package/skills/churn-prevention/references/cancel-flow-playbook.md +254 -0
- package/skills/churn-prevention/references/dunning-guide.md +276 -0
- package/skills/churn-prevention/references/exit-survey-and-save-offers.md +42 -0
- package/skills/churn-prevention/scripts/churn_impact_calculator.py +199 -0
- package/skills/ci-cd-setup/SKILL.md +66 -0
- package/skills/ci-cd-setup/references/anti-patterns.md +10 -0
- package/skills/ci-cd-setup/references/checklist.md +14 -0
- package/skills/ci-cd-setup/references/secret-and-deploy.md +30 -0
- package/skills/ciso-advisor/SKILL.md +86 -0
- package/skills/ciso-advisor/references/compliance_roadmap.md +370 -0
- package/skills/ciso-advisor/references/incident_response.md +350 -0
- package/skills/ciso-advisor/references/security_strategy.md +321 -0
- package/skills/ciso-advisor/scripts/compliance_tracker.py +781 -0
- package/skills/ciso-advisor/scripts/risk_quantifier.py +690 -0
- package/skills/clickup/SKILL.md +134 -0
- package/skills/cloud-security/SKILL.md +107 -0
- package/skills/cloud-security/references/cspm-checks.md +109 -0
- package/skills/cloud-security/scripts/cloud_posture_check.py +1180 -0
- package/skills/cmo-advisor/SKILL.md +82 -0
- package/skills/cmo-advisor/references/brand_positioning.md +374 -0
- package/skills/cmo-advisor/references/growth_frameworks.md +456 -0
- package/skills/cmo-advisor/references/marketing_org.md +281 -0
- package/skills/cmo-advisor/scripts/growth_model_simulator.py +416 -0
- package/skills/cmo-advisor/scripts/marketing_budget_modeler.py +440 -0
- package/skills/code-review/SKILL.md +66 -0
- package/skills/cold-email/SKILL.md +178 -0
- package/skills/cold-email/references/deliverability-guide.md +225 -0
- package/skills/cold-email/references/follow-up-playbook.md +225 -0
- package/skills/cold-email/references/frameworks.md +217 -0
- package/skills/cold-email/references/voice-and-subject-lines.md +41 -0
- package/skills/cold-email/scripts/email_sequence_analyzer.py +517 -0
- package/skills/commit/SKILL.md +25 -0
- package/skills/company-os/SKILL.md +66 -0
- package/skills/company-os/references/implementation-guide.md +249 -0
- package/skills/company-os/references/os-comparison.md +242 -0
- package/skills/company-os/references/six-components.md +129 -0
- package/skills/competitive-intel/SKILL.md +62 -0
- package/skills/competitive-intel/references/ci-playbook.md +237 -0
- package/skills/competitive-intel/templates/battlecard-template.md +99 -0
- package/skills/competitive-teardown/SKILL.md +169 -0
- package/skills/competitive-teardown/references/analysis-templates.md +203 -0
- package/skills/competitive-teardown/references/competitive-analysis-frameworks.md +107 -0
- package/skills/competitive-teardown/references/data-collection-guide.md +104 -0
- package/skills/competitive-teardown/references/scoring-rubric.md +116 -0
- package/skills/competitive-teardown/scripts/competitive_matrix_builder.py +299 -0
- package/skills/competitor-alternatives/SKILL.md +92 -0
- package/skills/competitor-alternatives/references/content-architecture.md +263 -0
- package/skills/competitor-alternatives/references/templates.md +212 -0
- package/skills/competitor-alternatives/scripts/comparison_matrix_builder.py +365 -0
- package/skills/confluence-expert/SKILL.md +129 -0
- package/skills/confluence-expert/references/macro-cheat-sheet.md +144 -0
- package/skills/confluence-expert/references/space-architecture-patterns.md +246 -0
- package/skills/confluence-expert/references/templates.md +725 -0
- package/skills/confluence-expert/scripts/content_audit_analyzer.py +457 -0
- package/skills/confluence-expert/scripts/space_structure_generator.py +517 -0
- package/skills/consistency-check/SKILL.md +68 -0
- package/skills/content-creator/SKILL.md +52 -0
- package/skills/content-creator/assets/content_calendar_template.md +99 -0
- package/skills/content-creator/examples/brand_voice_analysis_example.md +180 -0
- package/skills/content-creator/examples/seo_optimization_example.md +259 -0
- package/skills/content-creator/references/analytics_guide.md +352 -0
- package/skills/content-creator/references/brand_guidelines.md +219 -0
- package/skills/content-creator/references/content_frameworks.md +551 -0
- package/skills/content-creator/references/social_media_optimization.md +342 -0
- package/skills/content-humanizer/SKILL.md +193 -0
- package/skills/content-humanizer/references/ai-tells-checklist.md +157 -0
- package/skills/content-humanizer/references/voice-techniques.md +168 -0
- package/skills/content-humanizer/scripts/humanizer_scorer.py +504 -0
- package/skills/content-production/SKILL.md +192 -0
- package/skills/content-production/references/content-brief-guide.md +146 -0
- package/skills/content-production/references/optimization-checklist.md +139 -0
- package/skills/content-production/scripts/brand_voice_analyzer.py +197 -0
- package/skills/content-production/scripts/content_scorer.py +464 -0
- package/skills/content-production/scripts/seo_optimizer.py +433 -0
- package/skills/content-production/templates/content-brief-template.md +126 -0
- package/skills/content-strategy/SKILL.md +125 -0
- package/skills/content-strategy/references/content-strategy-reference.md +278 -0
- package/skills/content-strategy/scripts/topic_cluster_mapper.py +243 -0
- package/skills/context-engine/SKILL.md +50 -0
- package/skills/context-engine/references/anonymization-protocol.md +173 -0
- package/skills/context-prime/SKILL.md +25 -0
- package/skills/contract-and-proposal-writer/SKILL.md +126 -0
- package/skills/contract-and-proposal-writer/references/contract-templates.md +276 -0
- package/skills/contract-testing/SKILL.md +42 -0
- package/skills/contract-testing/references/anti-patterns-and-checklist.md +28 -0
- package/skills/contract-testing/references/implementation-details.md +29 -0
- package/skills/coo-advisor/SKILL.md +92 -0
- package/skills/coo-advisor/references/ops_cadence.md +606 -0
- package/skills/coo-advisor/references/process_frameworks.md +459 -0
- package/skills/coo-advisor/references/scaling_playbook.md +465 -0
- package/skills/coo-advisor/scripts/okr_tracker.py +1100 -0
- package/skills/coo-advisor/scripts/ops_efficiency_analyzer.py +1071 -0
- package/skills/copy-editing/SKILL.md +124 -0
- package/skills/copy-editing/references/copy-editing-checklist.md +134 -0
- package/skills/copy-editing/references/plain-english-alternatives.md +376 -0
- package/skills/copy-editing/references/seven-sweeps-framework.md +228 -0
- package/skills/copy-editing/scripts/readability_scorer.py +285 -0
- package/skills/copywriting/SKILL.md +192 -0
- package/skills/copywriting/references/copy-frameworks.md +338 -0
- package/skills/copywriting/references/natural-transitions.md +252 -0
- package/skills/copywriting/references/writing-style-rules.md +63 -0
- package/skills/copywriting/scripts/headline_scorer.py +256 -0
- package/skills/cpo-advisor/SKILL.md +102 -0
- package/skills/cpo-advisor/references/pmf_playbook.md +307 -0
- package/skills/cpo-advisor/references/product_org_design.md +407 -0
- package/skills/cpo-advisor/references/product_strategy.md +454 -0
- package/skills/cpo-advisor/scripts/pmf_scorer.py +600 -0
- package/skills/cpo-advisor/scripts/portfolio_analyzer.py +547 -0
- package/skills/create-epics/SKILL.md +65 -0
- package/skills/create-pr/SKILL.md +26 -0
- package/skills/create-stories/SKILL.md +85 -0
- package/skills/create-test-user/SKILL.md +37 -0
- package/skills/create-ticket/SKILL.md +50 -0
- package/skills/cro-advisor/SKILL.md +86 -0
- package/skills/cro-advisor/references/nrr_playbook.md +380 -0
- package/skills/cro-advisor/references/pricing_strategy.md +417 -0
- package/skills/cro-advisor/references/sales_playbook.md +461 -0
- package/skills/cro-advisor/scripts/churn_analyzer.py +742 -0
- package/skills/cro-advisor/scripts/revenue_forecast_model.py +571 -0
- package/skills/cs-onboard/SKILL.md +60 -0
- package/skills/cs-onboard/references/interview-guide.md +173 -0
- package/skills/cs-onboard/templates/company-context-template.md +144 -0
- package/skills/csp-headers/SKILL.md +53 -0
- package/skills/csp-headers/references/anti-patterns-checklist.md +26 -0
- package/skills/csp-headers/references/implementation.md +18 -0
- package/skills/cto-advisor/SKILL.md +95 -0
- package/skills/cto-advisor/references/architecture_decision_records.md +294 -0
- package/skills/cto-advisor/references/engineering_metrics.md +393 -0
- package/skills/cto-advisor/references/technology_evaluation_framework.md +370 -0
- package/skills/cto-advisor/references/workflows.md +84 -0
- package/skills/cto-advisor/scripts/team_scaling_calculator.py +562 -0
- package/skills/cto-advisor/scripts/tech_debt_analyzer.py +450 -0
- package/skills/culture-architect/SKILL.md +66 -0
- package/skills/culture-architect/references/culture-playbook.md +243 -0
- package/skills/culture-architect/templates/culture-code-template.md +137 -0
- package/skills/customer-success-manager/SKILL.md +97 -0
- package/skills/customer-success-manager/assets/executive_business_review_template.md +209 -0
- package/skills/customer-success-manager/assets/expected_output.json +170 -0
- package/skills/customer-success-manager/assets/onboarding_checklist_template.md +215 -0
- package/skills/customer-success-manager/assets/qbr_template.md +163 -0
- package/skills/customer-success-manager/assets/sample_customer_data.json +314 -0
- package/skills/customer-success-manager/assets/success_plan_template.md +167 -0
- package/skills/customer-success-manager/references/cs-metrics-benchmarks.md +259 -0
- package/skills/customer-success-manager/references/cs-playbooks.md +290 -0
- package/skills/customer-success-manager/references/health-scoring-framework.md +184 -0
- package/skills/customer-success-manager/scripts/churn_risk_analyzer.py +487 -0
- package/skills/customer-success-manager/scripts/expansion_opportunity_scorer.py +414 -0
- package/skills/customer-success-manager/scripts/health_score_calculator.py +438 -0
- package/skills/data-migrations/SKILL.md +113 -0
- package/skills/data-migrations/references/anti-patterns.md +14 -0
- package/skills/data-migrations/references/batching.md +9 -0
- package/skills/data-migrations/references/checklist.md +14 -0
- package/skills/data-migrations/references/expand-contract.md +19 -0
- package/skills/data-operations/SKILL.md +59 -0
- package/skills/data-operations/references/anti-patterns.md +17 -0
- package/skills/data-operations/references/query-optimization.md +37 -0
- package/skills/data-operations/references/seeding.md +38 -0
- package/skills/data-seeding/SKILL.md +96 -0
- package/skills/database/SKILL.md +74 -0
- package/skills/database/references/anti-patterns.md +20 -0
- package/skills/database/references/query-patterns.md +32 -0
- package/skills/database-indexing/SKILL.md +85 -0
- package/skills/database-indexing/references/anti-patterns.md +14 -0
- package/skills/database-indexing/references/checklists.md +23 -0
- package/skills/database-indexing/references/index-types.md +18 -0
- package/skills/database-setup/SKILL.md +109 -0
- package/skills/database-setup/references/indexing-guide.md +126 -0
- package/skills/db-diagram/SKILL.md +87 -0
- package/skills/decision-logger/SKILL.md +59 -0
- package/skills/decision-logger/references/entry-format.md +55 -0
- package/skills/decision-logger/scripts/decision_tracker.py +620 -0
- package/skills/decision-logger/templates/decision-entry.md +63 -0
- package/skills/deploy-check/SKILL.md +87 -0
- package/skills/deploy-staging/SKILL.md +44 -0
- package/skills/deps-audit/SKILL.md +92 -0
- package/skills/design-handoff/SKILL.md +49 -0
- package/skills/design-system/SKILL.md +56 -0
- package/skills/design-system/references/post-design-validation.md +8 -0
- package/skills/design-system/references/section-guidance.md +29 -0
- package/skills/distributed-tracing/SKILL.md +86 -0
- package/skills/doc-gdd/SKILL.md +56 -0
- package/skills/doc-pas/SKILL.md +41 -0
- package/skills/doc-pas/references/examples-and-usage.md +27 -0
- package/skills/doc-pas/references/output-format-template.md +63 -0
- package/skills/doc-rfc/SKILL.md +55 -0
- package/skills/doc-rfc/templates/decision.md +38 -0
- package/skills/doc-rfc/templates/epica.md +68 -0
- package/skills/doc-rfc/templates/hu.md +52 -0
- package/skills/doc-rfc/templates/tarea.md +37 -0
- package/skills/docker-setup/SKILL.md +78 -0
- package/skills/docker-setup/references/anti-patterns.md +10 -0
- package/skills/docker-setup/references/checklists.md +34 -0
- package/skills/docker-setup/references/size-optimization.md +7 -0
- package/skills/docx-generator/SKILL.md +249 -0
- package/skills/docx-generator/assets/styles/academic_styles.xml +250 -0
- package/skills/docx-generator/assets/styles/corporate_styles.xml +284 -0
- package/skills/docx-generator/assets/styles/default_styles.xml +449 -0
- package/skills/docx-generator/assets/xsd/aesthetic-rules.xsd +470 -0
- package/skills/docx-generator/assets/xsd/business-rules.xsd +130 -0
- package/skills/docx-generator/assets/xsd/common-types.xsd +159 -0
- package/skills/docx-generator/assets/xsd/wml-subset.xsd +589 -0
- package/skills/docx-generator/references/cjk_typography.md +357 -0
- package/skills/docx-generator/references/cjk_university_template_guide.md +184 -0
- package/skills/docx-generator/references/comments_guide.md +191 -0
- package/skills/docx-generator/references/design_good_bad_examples.md +829 -0
- package/skills/docx-generator/references/design_principles.md +819 -0
- package/skills/docx-generator/references/openxml_element_order.md +308 -0
- package/skills/docx-generator/references/openxml_encyclopedia_part1.md +4061 -0
- package/skills/docx-generator/references/openxml_encyclopedia_part2.md +2820 -0
- package/skills/docx-generator/references/openxml_encyclopedia_part3.md +3381 -0
- package/skills/docx-generator/references/openxml_namespaces.md +82 -0
- package/skills/docx-generator/references/openxml_units.md +72 -0
- package/skills/docx-generator/references/scenario_a_create.md +284 -0
- package/skills/docx-generator/references/scenario_b_edit_content.md +295 -0
- package/skills/docx-generator/references/scenario_c_apply_template.md +456 -0
- package/skills/docx-generator/references/track_changes_guide.md +200 -0
- package/skills/docx-generator/references/troubleshooting.md +506 -0
- package/skills/docx-generator/references/typography_guide.md +294 -0
- package/skills/docx-generator/references/xsd_validation_guide.md +158 -0
- package/skills/docx-generator/scripts/doc_to_docx.sh +40 -0
- package/skills/docx-generator/scripts/docx_preview.sh +37 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
- package/skills/docx-generator/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
- package/skills/docx-generator/scripts/env_check.sh +196 -0
- package/skills/docx-generator/scripts/setup.ps1 +274 -0
- package/skills/docx-generator/scripts/setup.sh +504 -0
- package/skills/email-sequence/SKILL.md +119 -0
- package/skills/email-sequence/references/email-sequence-playbook.md +209 -0
- package/skills/email-sequence/scripts/sequence_analyzer.py +354 -0
- package/skills/email-template-builder/SKILL.md +93 -0
- package/skills/email-template-builder/references/react-email-templates.md +323 -0
- package/skills/env-sync/SKILL.md +102 -0
- package/skills/error-tracking/SKILL.md +25 -0
- package/skills/error-tracking/references/anti-patterns-and-checklist.md +23 -0
- package/skills/error-tracking/references/operational-details.md +38 -0
- package/skills/error-tracking/references/setup-per-stack.md +24 -0
- package/skills/estimate/SKILL.md +51 -0
- package/skills/estimate/references/complexity-factors.md +30 -0
- package/skills/estimate/references/estimate-template.md +60 -0
- package/skills/executive-mentor/.claude-plugin/plugin.json +13 -0
- package/skills/executive-mentor/SKILL.md +90 -0
- package/skills/executive-mentor/agents/devils-advocate.md +139 -0
- package/skills/executive-mentor/references/board_dynamics.md +263 -0
- package/skills/executive-mentor/references/crisis_playbook.md +173 -0
- package/skills/executive-mentor/references/hard_things.md +256 -0
- package/skills/executive-mentor/scripts/decision_matrix_scorer.py +491 -0
- package/skills/executive-mentor/scripts/stakeholder_mapper.py +547 -0
- package/skills/executive-mentor/skills/board-prep/SKILL.md +76 -0
- package/skills/executive-mentor/skills/challenge/SKILL.md +80 -0
- package/skills/executive-mentor/skills/hard-call/SKILL.md +64 -0
- package/skills/executive-mentor/skills/postmortem/SKILL.md +78 -0
- package/skills/executive-mentor/skills/stress-test/SKILL.md +74 -0
- package/skills/executive-mentor/skills/stress-test/references/patterns-by-type.md +73 -0
- package/skills/experiment-designer/SKILL.md +108 -0
- package/skills/experiment-designer/references/experiment-playbook.md +70 -0
- package/skills/experiment-designer/references/statistics-reference.md +56 -0
- package/skills/experiment-designer/scripts/sample_size_calculator.py +100 -0
- package/skills/fda-consultant-specialist/SKILL.md +102 -0
- package/skills/fda-consultant-specialist/references/device_cybersecurity_guidance.md +695 -0
- package/skills/fda-consultant-specialist/references/fda_capa_requirements.md +718 -0
- package/skills/fda-consultant-specialist/references/fda_submission_guide.md +400 -0
- package/skills/fda-consultant-specialist/references/hipaa_compliance_framework.md +721 -0
- package/skills/fda-consultant-specialist/references/qsr_compliance_requirements.md +753 -0
- package/skills/fda-consultant-specialist/scripts/fda_submission_tracker.py +493 -0
- package/skills/fda-consultant-specialist/scripts/hipaa_risk_assessment.py +626 -0
- package/skills/fda-consultant-specialist/scripts/qsr_compliance_checker.py +618 -0
- package/skills/feature-flags/SKILL.md +98 -0
- package/skills/figma/SKILL.md +124 -0
- package/skills/figma-to-code/SKILL.md +80 -0
- package/skills/figma-to-code/references/checklist-and-output.md +32 -0
- package/skills/figma-to-code/references/stack-detection.md +34 -0
- package/skills/figma-tokens/SKILL.md +55 -0
- package/skills/file-uploads/SKILL.md +95 -0
- package/skills/financial-analyst/SKILL.md +152 -0
- package/skills/financial-analyst/assets/dcf_analysis_template.md +184 -0
- package/skills/financial-analyst/assets/expected_output.json +161 -0
- package/skills/financial-analyst/assets/forecast_report_template.md +177 -0
- package/skills/financial-analyst/assets/sample_financial_data.json +219 -0
- package/skills/financial-analyst/assets/variance_report_template.md +122 -0
- package/skills/financial-analyst/references/financial-ratios-guide.md +376 -0
- package/skills/financial-analyst/references/forecasting-best-practices.md +279 -0
- package/skills/financial-analyst/references/industry-adaptations.md +103 -0
- package/skills/financial-analyst/references/valuation-methodology.md +246 -0
- package/skills/financial-analyst/scripts/budget_variance_analyzer.py +406 -0
- package/skills/financial-analyst/scripts/dcf_valuation.py +449 -0
- package/skills/financial-analyst/scripts/forecast_builder.py +494 -0
- package/skills/financial-analyst/scripts/ratio_calculator.py +432 -0
- package/skills/fix-issue/SKILL.md +19 -0
- package/skills/flutter-dev/SKILL.md +122 -0
- package/skills/flutter-dev/references/animations.md +497 -0
- package/skills/flutter-dev/references/bloc-state.md +281 -0
- package/skills/flutter-dev/references/forms.md +656 -0
- package/skills/flutter-dev/references/gorouter-navigation.md +257 -0
- package/skills/flutter-dev/references/localization.md +510 -0
- package/skills/flutter-dev/references/networking.md +566 -0
- package/skills/flutter-dev/references/performance.md +306 -0
- package/skills/flutter-dev/references/platform-specific.md +417 -0
- package/skills/flutter-dev/references/project-structure.md +274 -0
- package/skills/flutter-dev/references/riverpod-state.md +232 -0
- package/skills/flutter-dev/references/testing.md +364 -0
- package/skills/flutter-dev/references/widget-patterns.md +233 -0
- package/skills/form-cro/SKILL.md +128 -0
- package/skills/form-cro/references/experiments.md +77 -0
- package/skills/form-cro/references/form-cro-playbook.md +271 -0
- package/skills/form-cro/scripts/form_field_analyzer.py +291 -0
- package/skills/form-validation/SKILL.md +75 -0
- package/skills/founder-coach/SKILL.md +57 -0
- package/skills/founder-coach/references/delegation-energy.md +124 -0
- package/skills/founder-coach/references/founder-toolkit.md +296 -0
- package/skills/founder-coach/references/leadership-evolution.md +112 -0
- package/skills/founder-coach/references/leadership-growth.md +178 -0
- package/skills/free-tool-strategy/SKILL.md +167 -0
- package/skills/free-tool-strategy/references/design-and-lead-capture.md +58 -0
- package/skills/free-tool-strategy/references/launch-playbook.md +182 -0
- package/skills/free-tool-strategy/references/tool-types-guide.md +253 -0
- package/skills/free-tool-strategy/scripts/tool_roi_estimator.py +401 -0
- package/skills/frontend-dev/SKILL.md +555 -0
- package/skills/frontend-dev/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/frontend-dev/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/frontend-dev/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/frontend-dev/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/frontend-dev/references/asset-prompt-guide.md +43 -0
- package/skills/frontend-dev/references/env-setup.md +33 -0
- package/skills/frontend-dev/references/minimax-cli-reference.md +133 -0
- package/skills/frontend-dev/references/minimax-image-guide.md +65 -0
- package/skills/frontend-dev/references/minimax-music-guide.md +216 -0
- package/skills/frontend-dev/references/minimax-tts-guide.md +78 -0
- package/skills/frontend-dev/references/minimax-video-guide.md +82 -0
- package/skills/frontend-dev/references/minimax-voice-catalog.md +686 -0
- package/skills/frontend-dev/references/motion-recipes.md +407 -0
- package/skills/frontend-dev/references/troubleshooting.md +85 -0
- package/skills/frontend-dev/scripts/minimax_image.py +137 -0
- package/skills/frontend-dev/scripts/minimax_music.py +157 -0
- package/skills/frontend-dev/scripts/minimax_tts.py +127 -0
- package/skills/frontend-dev/scripts/minimax_video.py +187 -0
- package/skills/frontend-dev/templates/generator_template.js +223 -0
- package/skills/frontend-dev/templates/viewer.html +599 -0
- package/skills/game-analysis/SKILL.md +51 -0
- package/skills/game-analysis/references/anti-patterns-checklist.md +25 -0
- package/skills/game-analysis/references/balance-report-format.md +21 -0
- package/skills/game-analysis/references/playtest-template.md +28 -0
- package/skills/game-audit/SKILL.md +66 -0
- package/skills/game-docs/SKILL.md +58 -0
- package/skills/game-docs/references/gdd-structure.md +24 -0
- package/skills/game-docs/references/pas-format.md +49 -0
- package/skills/game-docs/references/writing-rules.md +17 -0
- package/skills/gate-check/SKILL.md +93 -0
- package/skills/gcp-cloud-architect/SKILL.md +127 -0
- package/skills/gcp-cloud-architect/references/architecture_patterns.md +512 -0
- package/skills/gcp-cloud-architect/references/best_practices.md +467 -0
- package/skills/gcp-cloud-architect/references/service_selection.md +547 -0
- package/skills/gcp-cloud-architect/scripts/architecture_designer.py +805 -0
- package/skills/gcp-cloud-architect/scripts/cost_optimizer.py +465 -0
- package/skills/gcp-cloud-architect/scripts/deployment_manager.py +835 -0
- package/skills/gdocs/SKILL.md +128 -0
- package/skills/gdpr-dsgvo-expert/SKILL.md +97 -0
- package/skills/gdpr-dsgvo-expert/references/dpia_methodology.md +412 -0
- package/skills/gdpr-dsgvo-expert/references/gdpr_compliance_guide.md +336 -0
- package/skills/gdpr-dsgvo-expert/references/german_bdsg_requirements.md +327 -0
- package/skills/gdpr-dsgvo-expert/scripts/data_subject_rights_tracker.py +541 -0
- package/skills/gdpr-dsgvo-expert/scripts/dpia_generator.py +670 -0
- package/skills/gdpr-dsgvo-expert/scripts/gdpr_compliance_checker.py +443 -0
- package/skills/gdrive/SKILL.md +46 -0
- package/skills/gh-projects/SKILL.md +103 -0
- package/skills/gh-projects/references/graphql-queries.md +207 -0
- package/skills/git-worktree-manager/SKILL.md +86 -0
- package/skills/git-worktree-manager/references/docker-compose-patterns.md +62 -0
- package/skills/git-worktree-manager/references/port-allocation-strategy.md +46 -0
- package/skills/git-worktree-manager/scripts/worktree_cleanup.py +196 -0
- package/skills/git-worktree-manager/scripts/worktree_manager.py +240 -0
- package/skills/go-clean-architecture/SKILL.md +95 -0
- package/skills/go-clean-architecture/references/anti-patterns.md +7 -0
- package/skills/go-clean-architecture/references/checklist.md +13 -0
- package/skills/gsheets/SKILL.md +46 -0
- package/skills/helm-chart-builder/.claude-plugin/plugin.json +13 -0
- package/skills/helm-chart-builder/SKILL.md +122 -0
- package/skills/helm-chart-builder/references/chart-patterns.md +435 -0
- package/skills/helm-chart-builder/references/values-design.md +462 -0
- package/skills/helm-chart-builder/scripts/chart_analyzer.py +542 -0
- package/skills/helm-chart-builder/scripts/values_validator.py +442 -0
- package/skills/help/SKILL.md +75 -0
- package/skills/hotfix/SKILL.md +63 -0
- package/skills/i18n-setup/SKILL.md +79 -0
- package/skills/incident/SKILL.md +107 -0
- package/skills/incident-commander/SKILL.md +133 -0
- package/skills/incident-commander/assets/incident_report_template.md +171 -0
- package/skills/incident-commander/assets/runbook_template.md +289 -0
- package/skills/incident-commander/assets/sample_incident_classification.json +14 -0
- package/skills/incident-commander/assets/sample_incident_data.json +276 -0
- package/skills/incident-commander/assets/sample_incident_pir_data.json +74 -0
- package/skills/incident-commander/assets/sample_timeline_events.json +263 -0
- package/skills/incident-commander/assets/simple_incident.json +6 -0
- package/skills/incident-commander/assets/simple_timeline_events.json +30 -0
- package/skills/incident-commander/expected_outputs/incident_classification_text_output.txt +44 -0
- package/skills/incident-commander/expected_outputs/pir_markdown_output.md +88 -0
- package/skills/incident-commander/expected_outputs/simple_incident_classification.txt +44 -0
- package/skills/incident-commander/expected_outputs/timeline_reconstruction_text_output.txt +110 -0
- package/skills/incident-commander/references/communication_templates.md +591 -0
- package/skills/incident-commander/references/incident-response-framework.md +372 -0
- package/skills/incident-commander/references/incident_severity_matrix.md +292 -0
- package/skills/incident-commander/references/rca_frameworks_guide.md +562 -0
- package/skills/incident-commander/references/reference-information.md +201 -0
- package/skills/incident-commander/references/sla-management-guide.md +566 -0
- package/skills/incident-commander/scripts/incident_classifier.py +914 -0
- package/skills/incident-commander/scripts/incident_timeline_builder.py +742 -0
- package/skills/incident-commander/scripts/pir_generator.py +1638 -0
- package/skills/incident-commander/scripts/postmortem_generator.py +804 -0
- package/skills/incident-commander/scripts/severity_classifier.py +1228 -0
- package/skills/incident-commander/scripts/timeline_reconstructor.py +1007 -0
- package/skills/incident-response/SKILL.md +103 -0
- package/skills/incident-response/references/regulatory-deadlines.md +125 -0
- package/skills/incident-response/scripts/incident_triage.py +768 -0
- package/skills/information-security-manager-iso27001/SKILL.md +120 -0
- package/skills/information-security-manager-iso27001/references/incident-response.md +420 -0
- package/skills/information-security-manager-iso27001/references/iso27001-controls.md +381 -0
- package/skills/information-security-manager-iso27001/references/risk-assessment-guide.md +262 -0
- package/skills/information-security-manager-iso27001/scripts/compliance_checker.py +398 -0
- package/skills/information-security-manager-iso27001/scripts/risk_assessment.py +403 -0
- package/skills/internal-narrative/SKILL.md +68 -0
- package/skills/internal-narrative/references/narrative-frameworks.md +211 -0
- package/skills/internal-narrative/templates/all-hands-template.md +103 -0
- package/skills/intl-expansion/SKILL.md +72 -0
- package/skills/intl-expansion/references/market-entry-playbook.md +138 -0
- package/skills/intl-expansion/references/regional-guide.md +144 -0
- package/skills/ios-application-dev/SKILL.md +172 -0
- package/skills/ios-application-dev/references/accessibility.md +259 -0
- package/skills/ios-application-dev/references/graphics-animation.md +350 -0
- package/skills/ios-application-dev/references/layout-system.md +199 -0
- package/skills/ios-application-dev/references/metal-shader.md +178 -0
- package/skills/ios-application-dev/references/navigation-patterns.md +175 -0
- package/skills/ios-application-dev/references/swift-coding-standards.md +757 -0
- package/skills/ios-application-dev/references/swiftui-design-guidelines.md +1167 -0
- package/skills/ios-application-dev/references/system-integration.md +401 -0
- package/skills/ios-application-dev/references/uikit-components.md +297 -0
- package/skills/isms-audit-expert/SKILL.md +108 -0
- package/skills/isms-audit-expert/references/cloud-security-audit.md +226 -0
- package/skills/isms-audit-expert/references/iso27001-audit-methodology.md +260 -0
- package/skills/isms-audit-expert/references/security-control-testing.md +276 -0
- package/skills/isms-audit-expert/scripts/isms_audit_scheduler.py +279 -0
- package/skills/jira-tickets/SKILL.md +52 -0
- package/skills/jira-tickets/references/states-epics-sprints.md +43 -0
- package/skills/jira-tickets/references/team-data.md +51 -0
- package/skills/job-scheduling/SKILL.md +107 -0
- package/skills/jwt-strategy/SKILL.md +74 -0
- package/skills/jwt-strategy/references/anti-patterns.md +16 -0
- package/skills/jwt-strategy/references/checklist.md +13 -0
- package/skills/jwt-strategy/references/implementation.md +21 -0
- package/skills/kickoff/SKILL.md +180 -0
- package/skills/launch-strategy/SKILL.md +72 -0
- package/skills/launch-strategy/references/launch-frameworks-and-checklists.md +317 -0
- package/skills/launch-strategy/scripts/launch_readiness_scorer.py +301 -0
- package/skills/llm-cost-optimizer/SKILL.md +194 -0
- package/skills/local-database-setup/SKILL.md +48 -0
- package/skills/logging-setup/SKILL.md +79 -0
- package/skills/logging-setup/references/anti-patterns.md +7 -0
- package/skills/logging-setup/references/checklist.md +14 -0
- package/skills/logging-setup/references/pii-audit-access.md +25 -0
- package/skills/ma-playbook/SKILL.md +72 -0
- package/skills/ma-playbook/references/due-diligence-checklist.md +148 -0
- package/skills/ma-playbook/references/integration-playbook.md +145 -0
- package/skills/map-systems/SKILL.md +82 -0
- package/skills/map-systems/references/dependency-layers-priorities.md +36 -0
- package/skills/map-systems/references/implicit-systems.md +13 -0
- package/skills/marketing-context/SKILL.md +167 -0
- package/skills/marketing-context/references/context-template.md +64 -0
- package/skills/marketing-context/scripts/context_validator.py +219 -0
- package/skills/marketing-context/templates/marketing-context-template.md +133 -0
- package/skills/marketing-demand-acquisition/SKILL.md +124 -0
- package/skills/marketing-demand-acquisition/references/attribution-guide.md +217 -0
- package/skills/marketing-demand-acquisition/references/campaign-templates.md +221 -0
- package/skills/marketing-demand-acquisition/references/hubspot-workflows.md +168 -0
- package/skills/marketing-demand-acquisition/references/international-playbooks.md +200 -0
- package/skills/marketing-demand-acquisition/scripts/calculate_cac.py +101 -0
- package/skills/marketing-ideas/SKILL.md +83 -0
- package/skills/marketing-ideas/references/ideas-by-category.md +347 -0
- package/skills/marketing-ops/SKILL.md +188 -0
- package/skills/marketing-ops/references/routing-matrix.md +37 -0
- package/skills/marketing-ops/scripts/campaign_tracker.py +156 -0
- package/skills/marketing-psychology/SKILL.md +121 -0
- package/skills/marketing-psychology/references/mental-models-catalog.md +397 -0
- package/skills/marketing-strategy-pmm/SKILL.md +130 -0
- package/skills/marketing-strategy-pmm/references/international-gtm.md +401 -0
- package/skills/marketing-strategy-pmm/references/launch-checklists.md +333 -0
- package/skills/marketing-strategy-pmm/references/messaging-templates.md +446 -0
- package/skills/marketing-strategy-pmm/references/positioning-frameworks.md +279 -0
- package/skills/mcp-server-builder/SKILL.md +109 -0
- package/skills/mcp-server-builder/references/openapi-extraction-guide.md +34 -0
- package/skills/mcp-server-builder/references/python-server-template.md +22 -0
- package/skills/mcp-server-builder/references/typescript-server-template.md +19 -0
- package/skills/mcp-server-builder/references/validation-checklist.md +30 -0
- package/skills/mcp-server-builder/scripts/mcp_validator.py +186 -0
- package/skills/mcp-server-builder/scripts/openapi_to_mcp.py +284 -0
- package/skills/mdr-745-specialist/SKILL.md +110 -0
- package/skills/mdr-745-specialist/references/clinical-evidence-requirements.md +303 -0
- package/skills/mdr-745-specialist/references/mdr-classification-guide.md +289 -0
- package/skills/mdr-745-specialist/references/technical-documentation-templates.md +355 -0
- package/skills/mdr-745-specialist/scripts/mdr_gap_analyzer.py +511 -0
- package/skills/meeting-analyzer/SKILL.md +99 -0
- package/skills/meeting-analyzer/references/analysis-modules.md +92 -0
- package/skills/meeting-to-tasks/SKILL.md +63 -0
- package/skills/mfa-setup/SKILL.md +111 -0
- package/skills/mfa-setup/references/anti-patterns.md +15 -0
- package/skills/mfa-setup/references/checklist.md +17 -0
- package/skills/mfa-setup/references/rate-limiting.md +10 -0
- package/skills/mfa-setup/references/role-rules.md +9 -0
- package/skills/mfa-setup/references/schema-db.md +5 -0
- package/skills/milestone-review/SKILL.md +46 -0
- package/skills/monorepo-setup/SKILL.md +66 -0
- package/skills/monorepo-setup/references/anti-patterns-and-checklist.md +27 -0
- package/skills/ms365-tenant-manager/SKILL.md +104 -0
- package/skills/ms365-tenant-manager/expected_output.json +86 -0
- package/skills/ms365-tenant-manager/references/powershell-templates.md +704 -0
- package/skills/ms365-tenant-manager/references/security-policies.md +357 -0
- package/skills/ms365-tenant-manager/references/troubleshooting.md +411 -0
- package/skills/ms365-tenant-manager/references/workflow-scripts.md +145 -0
- package/skills/ms365-tenant-manager/sample_input.json +21 -0
- package/skills/ms365-tenant-manager/scripts/powershell_generator.py +430 -0
- package/skills/ms365-tenant-manager/scripts/tenant_setup.py +447 -0
- package/skills/ms365-tenant-manager/scripts/user_management.py +447 -0
- package/skills/oauth-setup/SKILL.md +92 -0
- package/skills/observability/SKILL.md +88 -0
- package/skills/observability-ops/SKILL.md +42 -0
- package/skills/observability-ops/references/anti-patterns.md +14 -0
- package/skills/observability-ops/references/slo-sli-framework.md +44 -0
- package/skills/observability-ops/references/tracing-setup.md +35 -0
- package/skills/observability-setup/SKILL.md +43 -0
- package/skills/observability-setup/references/conventions-and-anti-patterns.md +32 -0
- package/skills/observability-setup/references/stack-setup-details.md +23 -0
- package/skills/onboard/SKILL.md +123 -0
- package/skills/onboarding-cro/SKILL.md +149 -0
- package/skills/onboarding-cro/references/experiments.md +89 -0
- package/skills/onboarding-cro/scripts/activation_funnel_analyzer.py +217 -0
- package/skills/optimize/SKILL.md +27 -0
- package/skills/org-health-diagnostic/SKILL.md +79 -0
- package/skills/org-health-diagnostic/references/health-benchmarks.md +217 -0
- package/skills/org-health-diagnostic/scripts/health_scorer.py +585 -0
- package/skills/owasp-top10-check/SKILL.md +110 -0
- package/skills/owasp-top10-check/references/anti-patterns.md +19 -0
- package/skills/owasp-top10-check/references/educabot-specifics.md +6 -0
- package/skills/owasp-top10-check/references/tools.md +9 -0
- package/skills/page-cro/SKILL.md +160 -0
- package/skills/page-cro/references/experiments.md +71 -0
- package/skills/page-cro/scripts/conversion_audit.py +427 -0
- package/skills/paid-ads/SKILL.md +162 -0
- package/skills/paid-ads/references/ad-copy-templates.md +200 -0
- package/skills/paid-ads/references/audience-targeting.md +234 -0
- package/skills/paid-ads/references/campaign-structure.md +103 -0
- package/skills/paid-ads/references/platform-setup-checklists.md +269 -0
- package/skills/paid-ads/scripts/roas_calculator.py +304 -0
- package/skills/patch-notes/SKILL.md +51 -0
- package/skills/paywall-upgrade-cro/SKILL.md +189 -0
- package/skills/paywall-upgrade-cro/references/experiments.md +78 -0
- package/skills/pdf-generator/SKILL.md +181 -0
- package/skills/pdf-generator/design/design.md +381 -0
- package/skills/pdf-generator/scripts/cover.py +1579 -0
- package/skills/pdf-generator/scripts/fill_inspect.py +200 -0
- package/skills/pdf-generator/scripts/fill_write.py +242 -0
- package/skills/pdf-generator/scripts/make.sh +491 -0
- package/skills/pdf-generator/scripts/merge.py +112 -0
- package/skills/pdf-generator/scripts/palette.py +521 -0
- package/skills/pdf-generator/scripts/reformat_parse.py +374 -0
- package/skills/pdf-generator/scripts/render_body.py +1052 -0
- package/skills/pdf-generator/scripts/render_cover.js +111 -0
- package/skills/perf-profile/SKILL.md +82 -0
- package/skills/performance/SKILL.md +37 -0
- package/skills/performance/references/anti-patterns.md +25 -0
- package/skills/performance/references/cache-strategy.md +48 -0
- package/skills/performance/references/rate-limit-config.md +48 -0
- package/skills/performance-test/SKILL.md +87 -0
- package/skills/playtest-report/SKILL.md +45 -0
- package/skills/playwright-pro/.mcp.json +27 -0
- package/skills/playwright-pro/CLAUDE.md +84 -0
- package/skills/playwright-pro/LICENSE +21 -0
- package/skills/playwright-pro/SKILL.md +91 -0
- package/skills/playwright-pro/agents/migration-planner.md +121 -0
- package/skills/playwright-pro/agents/test-architect.md +105 -0
- package/skills/playwright-pro/agents/test-debugger.md +117 -0
- package/skills/playwright-pro/hooks/detect-playwright.sh +23 -0
- package/skills/playwright-pro/hooks/hooks.json +25 -0
- package/skills/playwright-pro/hooks/validate-test.sh +58 -0
- package/skills/playwright-pro/references/assertions.md +89 -0
- package/skills/playwright-pro/references/common-pitfalls.md +137 -0
- package/skills/playwright-pro/references/fixtures.md +121 -0
- package/skills/playwright-pro/references/flaky-tests.md +56 -0
- package/skills/playwright-pro/references/golden-rules.md +12 -0
- package/skills/playwright-pro/references/locators.md +77 -0
- package/skills/playwright-pro/settings.json +8 -0
- package/skills/playwright-pro/skills/browserstack/SKILL.md +169 -0
- package/skills/playwright-pro/skills/fix/SKILL.md +114 -0
- package/skills/playwright-pro/skills/fix/flaky-taxonomy.md +134 -0
- package/skills/playwright-pro/skills/generate/SKILL.md +145 -0
- package/skills/playwright-pro/skills/generate/patterns.md +163 -0
- package/skills/playwright-pro/skills/init/SKILL.md +168 -0
- package/skills/playwright-pro/skills/migrate/SKILL.md +136 -0
- package/skills/playwright-pro/skills/migrate/cypress-mapping.md +79 -0
- package/skills/playwright-pro/skills/migrate/selenium-mapping.md +94 -0
- package/skills/playwright-pro/skills/report/SKILL.md +127 -0
- package/skills/playwright-pro/skills/review/SKILL.md +103 -0
- package/skills/playwright-pro/skills/review/anti-patterns.md +182 -0
- package/skills/playwright-pro/skills/testrail/SKILL.md +130 -0
- package/skills/playwright-pro/templates/README.md +123 -0
- package/skills/playwright-pro/templates/accessibility/color-contrast.md +162 -0
- package/skills/playwright-pro/templates/accessibility/keyboard-navigation.md +149 -0
- package/skills/playwright-pro/templates/accessibility/screen-reader.md +159 -0
- package/skills/playwright-pro/templates/api/auth-headers.md +148 -0
- package/skills/playwright-pro/templates/api/error-responses.md +157 -0
- package/skills/playwright-pro/templates/api/graphql.md +174 -0
- package/skills/playwright-pro/templates/api/rate-limiting.md +152 -0
- package/skills/playwright-pro/templates/api/rest-crud.md +152 -0
- package/skills/playwright-pro/templates/auth/login.md +119 -0
- package/skills/playwright-pro/templates/auth/logout.md +112 -0
- package/skills/playwright-pro/templates/auth/mfa.md +125 -0
- package/skills/playwright-pro/templates/auth/password-reset.md +129 -0
- package/skills/playwright-pro/templates/auth/rbac.md +132 -0
- package/skills/playwright-pro/templates/auth/remember-me.md +127 -0
- package/skills/playwright-pro/templates/auth/session-timeout.md +113 -0
- package/skills/playwright-pro/templates/auth/sso.md +115 -0
- package/skills/playwright-pro/templates/checkout/add-to-cart.md +112 -0
- package/skills/playwright-pro/templates/checkout/apply-coupon.md +123 -0
- package/skills/playwright-pro/templates/checkout/order-confirm.md +108 -0
- package/skills/playwright-pro/templates/checkout/order-history.md +119 -0
- package/skills/playwright-pro/templates/checkout/payment.md +148 -0
- package/skills/playwright-pro/templates/checkout/update-quantity.md +125 -0
- package/skills/playwright-pro/templates/crud/bulk-operations.md +129 -0
- package/skills/playwright-pro/templates/crud/create.md +118 -0
- package/skills/playwright-pro/templates/crud/delete.md +116 -0
- package/skills/playwright-pro/templates/crud/read.md +117 -0
- package/skills/playwright-pro/templates/crud/soft-delete.md +113 -0
- package/skills/playwright-pro/templates/crud/update.md +129 -0
- package/skills/playwright-pro/templates/dashboard/chart-rendering.md +131 -0
- package/skills/playwright-pro/templates/dashboard/data-loading.md +128 -0
- package/skills/playwright-pro/templates/dashboard/date-range-filter.md +136 -0
- package/skills/playwright-pro/templates/dashboard/export.md +146 -0
- package/skills/playwright-pro/templates/dashboard/realtime-updates.md +143 -0
- package/skills/playwright-pro/templates/forms/autosave.md +135 -0
- package/skills/playwright-pro/templates/forms/conditional-fields.md +120 -0
- package/skills/playwright-pro/templates/forms/file-upload.md +136 -0
- package/skills/playwright-pro/templates/forms/multi-step.md +137 -0
- package/skills/playwright-pro/templates/forms/single-step.md +124 -0
- package/skills/playwright-pro/templates/forms/validation.md +141 -0
- package/skills/playwright-pro/templates/notifications/in-app.md +125 -0
- package/skills/playwright-pro/templates/notifications/notification-center.md +128 -0
- package/skills/playwright-pro/templates/notifications/toast-messages.md +139 -0
- package/skills/playwright-pro/templates/onboarding/email-verification.md +118 -0
- package/skills/playwright-pro/templates/onboarding/first-time-setup.md +130 -0
- package/skills/playwright-pro/templates/onboarding/registration.md +131 -0
- package/skills/playwright-pro/templates/onboarding/welcome-tour.md +128 -0
- package/skills/playwright-pro/templates/search/basic-search.md +118 -0
- package/skills/playwright-pro/templates/search/empty-state.md +109 -0
- package/skills/playwright-pro/templates/search/filters.md +128 -0
- package/skills/playwright-pro/templates/search/pagination.md +123 -0
- package/skills/playwright-pro/templates/search/sorting.md +131 -0
- package/skills/playwright-pro/templates/settings/account-delete.md +136 -0
- package/skills/playwright-pro/templates/settings/notification-prefs.md +139 -0
- package/skills/playwright-pro/templates/settings/password-change.md +143 -0
- package/skills/playwright-pro/templates/settings/profile-update.md +130 -0
- package/skills/popup-cro/SKILL.md +142 -0
- package/skills/popup-cro/references/experiments.md +88 -0
- package/skills/popup-cro/references/popup-cro-playbook.md +261 -0
- package/skills/postman/SKILL.md +79 -0
- package/skills/pptx-generator/SKILL.md +246 -0
- package/skills/pptx-generator/references/design-system.md +392 -0
- package/skills/pptx-generator/references/editing.md +162 -0
- package/skills/pptx-generator/references/pitfalls.md +112 -0
- package/skills/pptx-generator/references/pptxgenjs.md +420 -0
- package/skills/pptx-generator/references/slide-types.md +413 -0
- package/skills/pricing-strategy/SKILL.md +101 -0
- package/skills/pricing-strategy/references/pricing-models.md +194 -0
- package/skills/pricing-strategy/references/pricing-page-playbook.md +221 -0
- package/skills/pricing-strategy/scripts/pricing_modeler.py +283 -0
- package/skills/product-analytics/SKILL.md +151 -0
- package/skills/product-analytics/references/dashboard-templates.md +66 -0
- package/skills/product-analytics/references/metrics-frameworks.md +84 -0
- package/skills/product-analytics/scripts/metrics_calculator.py +195 -0
- package/skills/product-discovery/SKILL.md +118 -0
- package/skills/product-discovery/references/discovery-frameworks.md +72 -0
- package/skills/product-discovery/scripts/assumption_mapper.py +123 -0
- package/skills/product-manager-toolkit/SKILL.md +121 -0
- package/skills/product-manager-toolkit/assets/prd_template.md +132 -0
- package/skills/product-manager-toolkit/assets/rice_input_template.csv +4 -0
- package/skills/product-manager-toolkit/references/frameworks.md +559 -0
- package/skills/product-manager-toolkit/references/input-output-examples.md +156 -0
- package/skills/product-manager-toolkit/references/prd_templates.md +317 -0
- package/skills/product-manager-toolkit/scripts/customer_interview_analyzer.py +452 -0
- package/skills/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
- package/skills/product-spec/SKILL.md +65 -0
- package/skills/product-strategist/SKILL.md +122 -0
- package/skills/product-strategist/assets/okr_template.md +106 -0
- package/skills/product-strategist/references/examples/sample_growth_okrs.json +366 -0
- package/skills/product-strategist/references/okr_framework.md +328 -0
- package/skills/product-strategist/references/strategy_types.md +320 -0
- package/skills/product-strategist/scripts/okr_cascade_generator.py +592 -0
- package/skills/programmatic-seo/SKILL.md +156 -0
- package/skills/programmatic-seo/references/playbooks.md +72 -0
- package/skills/programmatic-seo/scripts/url_pattern_generator.py +194 -0
- package/skills/prompt-engineer-toolkit/README.md +51 -0
- package/skills/prompt-engineer-toolkit/SKILL.md +136 -0
- package/skills/prompt-engineer-toolkit/references/evaluation-rubric.md +14 -0
- package/skills/prompt-engineer-toolkit/references/prompt-templates.md +105 -0
- package/skills/prompt-engineer-toolkit/references/technique-guide.md +25 -0
- package/skills/prompt-engineer-toolkit/scripts/prompt_tester.py +239 -0
- package/skills/prompt-engineer-toolkit/scripts/prompt_versioner.py +235 -0
- package/skills/prototype/SKILL.md +54 -0
- package/skills/qa-plan/SKILL.md +77 -0
- package/skills/qms-audit-expert/SKILL.md +116 -0
- package/skills/qms-audit-expert/references/iso13485-audit-guide.md +388 -0
- package/skills/qms-audit-expert/references/nonconformity-classification.md +221 -0
- package/skills/qms-audit-expert/scripts/audit_schedule_optimizer.py +420 -0
- package/skills/quality-documentation-manager/SKILL.md +140 -0
- package/skills/quality-documentation-manager/references/21cfr11-compliance-guide.md +398 -0
- package/skills/quality-documentation-manager/references/document-control-procedures.md +340 -0
- package/skills/quality-documentation-manager/scripts/document_validator.py +646 -0
- package/skills/quality-documentation-manager/scripts/document_version_control.py +466 -0
- package/skills/quality-manager-qmr/SKILL.md +129 -0
- package/skills/quality-manager-qmr/references/management-review-guide.md +378 -0
- package/skills/quality-manager-qmr/references/quality-kpi-framework.md +296 -0
- package/skills/quality-manager-qmr/scripts/management_review_tracker.py +580 -0
- package/skills/quality-manager-qmr/scripts/quality_effectiveness_monitor.py +481 -0
- package/skills/quality-manager-qms-iso13485/SKILL.md +129 -0
- package/skills/quality-manager-qms-iso13485/references/iso13485-clause-requirements.md +726 -0
- package/skills/quality-manager-qms-iso13485/references/qms-process-templates.md +876 -0
- package/skills/quality-manager-qms-iso13485/scripts/qms_audit_checklist.py +886 -0
- package/skills/query-optimization/SKILL.md +107 -0
- package/skills/quick-design/SKILL.md +47 -0
- package/skills/rag-architect/SKILL.md +117 -0
- package/skills/rag-architect/references/chunking_strategies_comparison.md +287 -0
- package/skills/rag-architect/references/embedding_model_benchmark.md +338 -0
- package/skills/rag-architect/references/rag_evaluation_framework.md +431 -0
- package/skills/rag-architect/scripts/chunking_optimizer.py +787 -0
- package/skills/rag-architect/scripts/rag_pipeline_designer.py +680 -0
- package/skills/rag-architect/scripts/retrieval_evaluator.py +578 -0
- package/skills/rate-limiting/SKILL.md +114 -0
- package/skills/rbac-abac/SKILL.md +70 -0
- package/skills/rbac-abac/references/anti-patterns.md +14 -0
- package/skills/rbac-abac/references/checklist.md +13 -0
- package/skills/rbac-abac/references/schema-jwt-cache.md +27 -0
- package/skills/react-native-dev/SKILL.md +139 -0
- package/skills/react-native-dev/references/animations.md +254 -0
- package/skills/react-native-dev/references/components.md +124 -0
- package/skills/react-native-dev/references/engineering.md +527 -0
- package/skills/react-native-dev/references/forms.md +300 -0
- package/skills/react-native-dev/references/native-capabilities.md +163 -0
- package/skills/react-native-dev/references/navigation.md +271 -0
- package/skills/react-native-dev/references/networking.md +346 -0
- package/skills/react-native-dev/references/performance.md +215 -0
- package/skills/react-native-dev/references/state-management.md +230 -0
- package/skills/react-native-dev/references/styling.md +117 -0
- package/skills/react-native-dev/references/testing.md +342 -0
- package/skills/read-replicas/SKILL.md +46 -0
- package/skills/read-replicas/references/anti-patterns-checklist.md +26 -0
- package/skills/read-replicas/references/consistency-connection.md +24 -0
- package/skills/read-replicas/references/ha-dr.md +18 -0
- package/skills/red-team/SKILL.md +120 -0
- package/skills/red-team/references/attack-path-methodology.md +135 -0
- package/skills/red-team/scripts/engagement_planner.py +420 -0
- package/skills/referral-program/SKILL.md +189 -0
- package/skills/referral-program/references/loop-and-incentives.md +81 -0
- package/skills/referral-program/references/measurement-framework.md +199 -0
- package/skills/referral-program/references/program-mechanics.md +212 -0
- package/skills/referral-program/scripts/referral_roi_calculator.py +420 -0
- package/skills/regression-suite/SKILL.md +89 -0
- package/skills/regulatory-affairs-head/SKILL.md +117 -0
- package/skills/regulatory-affairs-head/references/eu-mdr-submission-guide.md +95 -0
- package/skills/regulatory-affairs-head/references/fda-submission-guide.md +127 -0
- package/skills/regulatory-affairs-head/references/global-regulatory-pathways.md +283 -0
- package/skills/regulatory-affairs-head/references/iso-regulatory-requirements.md +363 -0
- package/skills/regulatory-affairs-head/scripts/regulatory_pathway_analyzer.py +557 -0
- package/skills/regulatory-affairs-head/scripts/regulatory_tracker.py +199 -0
- package/skills/release/SKILL.md +89 -0
- package/skills/release-announce/SKILL.md +64 -0
- package/skills/release-checklist/SKILL.md +63 -0
- package/skills/research-summarizer/SKILL.md +94 -0
- package/skills/research-summarizer/references/citation-formats.md +105 -0
- package/skills/research-summarizer/references/summary-templates.md +120 -0
- package/skills/research-summarizer/scripts/extract_citations.py +309 -0
- package/skills/research-summarizer/scripts/format_summary.py +244 -0
- package/skills/retrospective/SKILL.md +72 -0
- package/skills/revenue-operations/SKILL.md +101 -0
- package/skills/revenue-operations/assets/expected_output.json +117 -0
- package/skills/revenue-operations/assets/forecast_report_template.md +149 -0
- package/skills/revenue-operations/assets/gtm_dashboard_template.md +215 -0
- package/skills/revenue-operations/assets/pipeline_review_template.md +138 -0
- package/skills/revenue-operations/assets/sample_forecast_data.json +23 -0
- package/skills/revenue-operations/assets/sample_gtm_data.json +24 -0
- package/skills/revenue-operations/assets/sample_pipeline_data.json +160 -0
- package/skills/revenue-operations/references/gtm-efficiency-benchmarks.md +257 -0
- package/skills/revenue-operations/references/pipeline-management-framework.md +292 -0
- package/skills/revenue-operations/references/revops-metrics-guide.md +304 -0
- package/skills/revenue-operations/scripts/forecast_accuracy_tracker.py +531 -0
- package/skills/revenue-operations/scripts/gtm_efficiency_calculator.py +658 -0
- package/skills/revenue-operations/scripts/pipeline_analyzer.py +496 -0
- package/skills/reverse-document/SKILL.md +70 -0
- package/skills/risk-management-specialist/SKILL.md +125 -0
- package/skills/risk-management-specialist/references/iso14971-implementation-guide.md +468 -0
- package/skills/risk-management-specialist/references/risk-analysis-methods.md +415 -0
- package/skills/risk-management-specialist/references/risk-assessment-templates.md +77 -0
- package/skills/risk-management-specialist/scripts/fmea_analyzer.py +442 -0
- package/skills/risk-management-specialist/scripts/risk_matrix_calculator.py +419 -0
- package/skills/roadmap-communicator/SKILL.md +96 -0
- package/skills/roadmap-communicator/references/communication-templates.md +63 -0
- package/skills/roadmap-communicator/references/roadmap-templates.md +44 -0
- package/skills/roadmap-communicator/scripts/changelog_generator.py +151 -0
- package/skills/rollback-strategy/SKILL.md +80 -0
- package/skills/rollback-strategy/references/anti-patterns.md +14 -0
- package/skills/rollback-strategy/references/canary-auto-rollback.md +17 -0
- package/skills/rollback-strategy/references/communication-protocol.md +6 -0
- package/skills/rollback-strategy/references/mobile-rollback.md +10 -0
- package/skills/rollback-strategy/references/pre-deploy-checklist.md +15 -0
- package/skills/rollback-strategy/references/runbook-commands.md +147 -0
- package/skills/run-migrations/SKILL.md +67 -0
- package/skills/runbooks/SKILL.md +57 -0
- package/skills/runbooks/references/anti-patterns.md +6 -0
- package/skills/runbooks/references/checklist.md +13 -0
- package/skills/runbooks/references/lifecycle.md +14 -0
- package/skills/runbooks/references/writing-principles.md +9 -0
- package/skills/runbooks/templates/runbook.md +80 -0
- package/skills/saas-metrics-coach/SKILL.md +156 -0
- package/skills/saas-metrics-coach/assets/input-template.md +29 -0
- package/skills/saas-metrics-coach/references/benchmarks.md +101 -0
- package/skills/saas-metrics-coach/references/formulas.md +103 -0
- package/skills/saas-metrics-coach/scripts/metrics_calculator.py +217 -0
- package/skills/saas-metrics-coach/scripts/quick_ratio_calculator.py +173 -0
- package/skills/saas-metrics-coach/scripts/unit_economics_simulator.py +205 -0
- package/skills/sales-engineer/SKILL.md +104 -0
- package/skills/sales-engineer/assets/demo_script_template.md +232 -0
- package/skills/sales-engineer/assets/expected_output.json +474 -0
- package/skills/sales-engineer/assets/poc_scorecard_template.md +213 -0
- package/skills/sales-engineer/assets/sample_rfp_data.json +219 -0
- package/skills/sales-engineer/assets/technical_proposal_template.md +231 -0
- package/skills/sales-engineer/references/competitive-positioning-framework.md +226 -0
- package/skills/sales-engineer/references/poc-best-practices.md +277 -0
- package/skills/sales-engineer/references/rfp-response-guide.md +189 -0
- package/skills/sales-engineer/scripts/competitive_matrix_builder.py +525 -0
- package/skills/sales-engineer/scripts/poc_planner.py +765 -0
- package/skills/sales-engineer/scripts/rfp_response_analyzer.py +557 -0
- package/skills/scaffold-fastify-ts/SKILL.md +77 -0
- package/skills/scaffold-fastify-ts/references/anti-patterns.md +10 -0
- package/skills/scaffold-fastify-ts/references/key-decisions.md +27 -0
- package/skills/scaffold-go/SKILL.md +77 -0
- package/skills/scaffold-go/references/patterns.md +22 -0
- package/skills/scaffold-go/references/project-structure.md +15 -0
- package/skills/scaffold-react-native/SKILL.md +69 -0
- package/skills/scaffold-react-native/references/conventions.md +26 -0
- package/skills/scaffold-react-native/references/workflow-and-navigation.md +22 -0
- package/skills/scaffold-react-vite/SKILL.md +76 -0
- package/skills/scaffold-react-vite/references/anti-patterns.md +9 -0
- package/skills/scaffold-react-vite/references/dependency-baseline.md +22 -0
- package/skills/scaffold-unity/SKILL.md +52 -0
- package/skills/scaffold-unity/references/folder-structure-and-files.md +43 -0
- package/skills/scaffold-unity/references/naming-conventions.md +11 -0
- package/skills/scenario-war-room/SKILL.md +81 -0
- package/skills/scenario-war-room/references/cascade-model.md +103 -0
- package/skills/scenario-war-room/references/scenario-planning.md +212 -0
- package/skills/scenario-war-room/scripts/scenario_modeler.py +486 -0
- package/skills/schema-markup/SKILL.md +184 -0
- package/skills/schema-markup/references/implementation-patterns.md +437 -0
- package/skills/schema-markup/references/schema-types-guide.md +285 -0
- package/skills/schema-markup/references/testing-and-mistakes.md +43 -0
- package/skills/schema-markup/scripts/schema_validator.py +442 -0
- package/skills/scope-check/SKILL.md +67 -0
- package/skills/scope-check/references/report-template.md +56 -0
- package/skills/scrum-master/SKILL.md +128 -0
- package/skills/scrum-master/assets/expected_output.json +131 -0
- package/skills/scrum-master/assets/expected_velocity_output.json +85 -0
- package/skills/scrum-master/assets/sample_sprint_data.json +821 -0
- package/skills/scrum-master/assets/sprint_report_template.md +214 -0
- package/skills/scrum-master/assets/team_health_check_template.md +380 -0
- package/skills/scrum-master/references/retro-formats.md +336 -0
- package/skills/scrum-master/references/team-dynamics-framework.md +561 -0
- package/skills/scrum-master/references/velocity-forecasting-guide.md +386 -0
- package/skills/scrum-master/scripts/retrospective_analyzer.py +914 -0
- package/skills/scrum-master/scripts/sprint_health_scorer.py +744 -0
- package/skills/scrum-master/scripts/velocity_analyzer.py +580 -0
- package/skills/search-setup/SKILL.md +49 -0
- package/skills/search-setup/references/anti-patterns-checklist.md +24 -0
- package/skills/search-setup/references/engine-details.md +15 -0
- package/skills/search-setup/references/indexing-pipeline.md +11 -0
- package/skills/search-setup/references/observability.md +6 -0
- package/skills/secret-management/SKILL.md +49 -0
- package/skills/secret-management/references/anti-patterns.md +7 -0
- package/skills/secret-management/references/checklist.md +13 -0
- package/skills/secret-management/references/implementation-details.md +37 -0
- package/skills/security-audit/SKILL.md +86 -0
- package/skills/security-pen-testing/SKILL.md +114 -0
- package/skills/security-pen-testing/references/attack_patterns.md +629 -0
- package/skills/security-pen-testing/references/owasp_top_10_checklist.md +440 -0
- package/skills/security-pen-testing/references/responsible_disclosure.md +317 -0
- package/skills/security-pen-testing/scripts/dependency_auditor.py +455 -0
- package/skills/security-pen-testing/scripts/pentest_report_generator.py +462 -0
- package/skills/security-pen-testing/scripts/vulnerability_scanner.py +545 -0
- package/skills/self-improving-agent/.claude-plugin/plugin.json +13 -0
- package/skills/self-improving-agent/CLAUDE.md +79 -0
- package/skills/self-improving-agent/LICENSE +21 -0
- package/skills/self-improving-agent/SKILL.md +112 -0
- package/skills/self-improving-agent/agents/memory-analyst.md +74 -0
- package/skills/self-improving-agent/agents/skill-extractor.md +110 -0
- package/skills/self-improving-agent/hooks/error-capture.sh +110 -0
- package/skills/self-improving-agent/hooks/hooks.json +15 -0
- package/skills/self-improving-agent/reference/memory-architecture.md +131 -0
- package/skills/self-improving-agent/reference/promotion-rules.md +83 -0
- package/skills/self-improving-agent/reference/rules-directory-patterns.md +137 -0
- package/skills/self-improving-agent/settings.json +28 -0
- package/skills/self-improving-agent/skills/extract/SKILL.md +182 -0
- package/skills/self-improving-agent/skills/promote/SKILL.md +148 -0
- package/skills/self-improving-agent/skills/remember/SKILL.md +102 -0
- package/skills/self-improving-agent/skills/review/SKILL.md +130 -0
- package/skills/self-improving-agent/skills/status/SKILL.md +107 -0
- package/skills/self-improving-agent/templates/rule-template.md +17 -0
- package/skills/self-improving-agent/templates/skill-template.md +53 -0
- package/skills/senior-computer-vision/SKILL.md +125 -0
- package/skills/senior-computer-vision/references/computer_vision_architectures.md +683 -0
- package/skills/senior-computer-vision/references/object_detection_optimization.md +885 -0
- package/skills/senior-computer-vision/references/production_vision_systems.md +1226 -0
- package/skills/senior-computer-vision/references/reference-docs-and-commands.md +96 -0
- package/skills/senior-computer-vision/scripts/dataset_pipeline_builder.py +1699 -0
- package/skills/senior-computer-vision/scripts/inference_optimizer.py +557 -0
- package/skills/senior-computer-vision/scripts/vision_model_trainer.py +576 -0
- package/skills/senior-data-engineer/SKILL.md +198 -0
- package/skills/senior-data-engineer/references/data_modeling_patterns.md +1058 -0
- package/skills/senior-data-engineer/references/data_pipeline_architecture.md +1100 -0
- package/skills/senior-data-engineer/references/dataops_best_practices.md +1502 -0
- package/skills/senior-data-engineer/references/troubleshooting.md +183 -0
- package/skills/senior-data-engineer/references/workflows.md +624 -0
- package/skills/senior-data-engineer/scripts/data_quality_validator.py +1636 -0
- package/skills/senior-data-engineer/scripts/etl_performance_optimizer.py +1685 -0
- package/skills/senior-data-engineer/scripts/pipeline_orchestrator.py +883 -0
- package/skills/senior-data-scientist/SKILL.md +117 -0
- package/skills/senior-data-scientist/references/experiment_design_frameworks.md +80 -0
- package/skills/senior-data-scientist/references/feature_engineering_patterns.md +80 -0
- package/skills/senior-data-scientist/references/statistical_methods_advanced.md +80 -0
- package/skills/senior-data-scientist/scripts/experiment_designer.py +100 -0
- package/skills/senior-data-scientist/scripts/feature_engineering_pipeline.py +100 -0
- package/skills/senior-data-scientist/scripts/model_evaluation_suite.py +100 -0
- package/skills/senior-ml-engineer/SKILL.md +121 -0
- package/skills/senior-ml-engineer/references/llm_integration_guide.md +317 -0
- package/skills/senior-ml-engineer/references/mlops_production_patterns.md +265 -0
- package/skills/senior-ml-engineer/references/rag_system_architecture.md +371 -0
- package/skills/senior-ml-engineer/scripts/ml_monitoring_suite.py +100 -0
- package/skills/senior-ml-engineer/scripts/model_deployment_pipeline.py +100 -0
- package/skills/senior-ml-engineer/scripts/rag_system_builder.py +100 -0
- package/skills/senior-pm/SKILL.md +109 -0
- package/skills/senior-pm/assets/executive_report_template.md +267 -0
- package/skills/senior-pm/assets/expected_output.json +150 -0
- package/skills/senior-pm/assets/project_charter_template.md +274 -0
- package/skills/senior-pm/assets/raci_matrix_template.md +265 -0
- package/skills/senior-pm/assets/sample_project_data.json +458 -0
- package/skills/senior-pm/references/portfolio-kpis.md +32 -0
- package/skills/senior-pm/references/portfolio-prioritization-models.md +645 -0
- package/skills/senior-pm/references/risk-management-framework.md +485 -0
- package/skills/senior-pm/scripts/project_health_dashboard.py +814 -0
- package/skills/senior-pm/scripts/resource_capacity_planner.py +846 -0
- package/skills/senior-pm/scripts/risk_matrix_analyzer.py +698 -0
- package/skills/senior-prompt-engineer/SKILL.md +108 -0
- package/skills/senior-prompt-engineer/references/agentic_system_design.md +646 -0
- package/skills/senior-prompt-engineer/references/llm_evaluation_frameworks.md +524 -0
- package/skills/senior-prompt-engineer/references/prompt_engineering_patterns.md +572 -0
- package/skills/senior-prompt-engineer/scripts/agent_orchestrator.py +560 -0
- package/skills/senior-prompt-engineer/scripts/prompt_optimizer.py +519 -0
- package/skills/senior-prompt-engineer/scripts/rag_evaluator.py +574 -0
- package/skills/seo-audit/SKILL.md +150 -0
- package/skills/seo-audit/references/aeo-geo-patterns.md +110 -0
- package/skills/seo-audit/references/ai-writing-detection.md +63 -0
- package/skills/seo-audit/references/seo-audit-reference.md +289 -0
- package/skills/seo-audit/scripts/seo_checker.py +361 -0
- package/skills/shader-dev/SKILL.md +299 -0
- package/skills/shader-dev/reference/ambient-occlusion.md +382 -0
- package/skills/shader-dev/reference/analytic-ray-tracing.md +651 -0
- package/skills/shader-dev/reference/anti-aliasing.md +71 -0
- package/skills/shader-dev/reference/atmospheric-scattering.md +571 -0
- package/skills/shader-dev/reference/camera-effects.md +80 -0
- package/skills/shader-dev/reference/cellular-automata.md +635 -0
- package/skills/shader-dev/reference/color-palette.md +481 -0
- package/skills/shader-dev/reference/csg-boolean-operations.md +466 -0
- package/skills/shader-dev/reference/domain-repetition.md +436 -0
- package/skills/shader-dev/reference/domain-warping.md +419 -0
- package/skills/shader-dev/reference/fluid-simulation.md +425 -0
- package/skills/shader-dev/reference/fractal-rendering.md +525 -0
- package/skills/shader-dev/reference/lighting-model.md +639 -0
- package/skills/shader-dev/reference/matrix-transform.md +535 -0
- package/skills/shader-dev/reference/multipass-buffer.md +571 -0
- package/skills/shader-dev/reference/normal-estimation.md +418 -0
- package/skills/shader-dev/reference/particle-system.md +589 -0
- package/skills/shader-dev/reference/path-tracing-gi.md +602 -0
- package/skills/shader-dev/reference/polar-uv-manipulation.md +521 -0
- package/skills/shader-dev/reference/post-processing.md +375 -0
- package/skills/shader-dev/reference/procedural-2d-pattern.md +439 -0
- package/skills/shader-dev/reference/procedural-noise.md +551 -0
- package/skills/shader-dev/reference/ray-marching.md +396 -0
- package/skills/shader-dev/reference/sdf-2d.md +724 -0
- package/skills/shader-dev/reference/sdf-3d.md +805 -0
- package/skills/shader-dev/reference/sdf-tricks.md +63 -0
- package/skills/shader-dev/reference/shadow-techniques.md +476 -0
- package/skills/shader-dev/reference/simulation-physics.md +644 -0
- package/skills/shader-dev/reference/sound-synthesis.md +578 -0
- package/skills/shader-dev/reference/terrain-rendering.md +839 -0
- package/skills/shader-dev/reference/texture-mapping-advanced.md +87 -0
- package/skills/shader-dev/reference/texture-sampling.md +553 -0
- package/skills/shader-dev/reference/volumetric-rendering.md +608 -0
- package/skills/shader-dev/reference/voronoi-cellular-noise.md +486 -0
- package/skills/shader-dev/reference/voxel-rendering.md +701 -0
- package/skills/shader-dev/reference/water-ocean.md +445 -0
- package/skills/shader-dev/reference/webgl-pitfalls.md +41 -0
- package/skills/shader-dev/techniques/ambient-occlusion.md +364 -0
- package/skills/shader-dev/techniques/analytic-ray-tracing.md +542 -0
- package/skills/shader-dev/techniques/anti-aliasing.md +124 -0
- package/skills/shader-dev/techniques/atmospheric-scattering.md +522 -0
- package/skills/shader-dev/techniques/camera-effects.md +115 -0
- package/skills/shader-dev/techniques/cellular-automata.md +531 -0
- package/skills/shader-dev/techniques/color-palette.md +380 -0
- package/skills/shader-dev/techniques/csg-boolean-operations.md +491 -0
- package/skills/shader-dev/techniques/domain-repetition.md +333 -0
- package/skills/shader-dev/techniques/domain-warping.md +414 -0
- package/skills/shader-dev/techniques/fluid-simulation.md +1175 -0
- package/skills/shader-dev/techniques/fractal-rendering.md +436 -0
- package/skills/shader-dev/techniques/lighting-model.md +527 -0
- package/skills/shader-dev/techniques/matrix-transform.md +455 -0
- package/skills/shader-dev/techniques/multipass-buffer.md +922 -0
- package/skills/shader-dev/techniques/normal-estimation.md +318 -0
- package/skills/shader-dev/techniques/particle-system.md +1203 -0
- package/skills/shader-dev/techniques/path-tracing-gi.md +623 -0
- package/skills/shader-dev/techniques/polar-uv-manipulation.md +373 -0
- package/skills/shader-dev/techniques/post-processing.md +788 -0
- package/skills/shader-dev/techniques/procedural-2d-pattern.md +346 -0
- package/skills/shader-dev/techniques/procedural-noise.md +554 -0
- package/skills/shader-dev/techniques/ray-marching.md +467 -0
- package/skills/shader-dev/techniques/sdf-2d.md +631 -0
- package/skills/shader-dev/techniques/sdf-3d.md +589 -0
- package/skills/shader-dev/techniques/sdf-tricks.md +100 -0
- package/skills/shader-dev/techniques/shadow-techniques.md +776 -0
- package/skills/shader-dev/techniques/simulation-physics.md +1542 -0
- package/skills/shader-dev/techniques/sound-synthesis.md +490 -0
- package/skills/shader-dev/techniques/terrain-rendering.md +408 -0
- package/skills/shader-dev/techniques/texture-mapping-advanced.md +121 -0
- package/skills/shader-dev/techniques/texture-sampling.md +382 -0
- package/skills/shader-dev/techniques/volumetric-rendering.md +375 -0
- package/skills/shader-dev/techniques/voronoi-cellular-noise.md +458 -0
- package/skills/shader-dev/techniques/voxel-rendering.md +985 -0
- package/skills/shader-dev/techniques/water-ocean.md +490 -0
- package/skills/shader-dev/techniques/webgl-pitfalls.md +170 -0
- package/skills/signup-flow-cro/SKILL.md +150 -0
- package/skills/signup-flow-cro/references/experiments.md +76 -0
- package/skills/signup-flow-cro/references/signup-cro-playbook.md +180 -0
- package/skills/signup-flow-cro/scripts/funnel_drop_analyzer.py +320 -0
- package/skills/site-architecture/SKILL.md +167 -0
- package/skills/site-architecture/references/internal-linking-playbook.md +216 -0
- package/skills/site-architecture/references/navigation-design.md +32 -0
- package/skills/site-architecture/references/silo-and-linking-guide.md +80 -0
- package/skills/site-architecture/references/url-design-guide.md +220 -0
- package/skills/site-architecture/scripts/sitemap_analyzer.py +375 -0
- package/skills/skill-auditor/SKILL.md +159 -0
- package/skills/skill-auditor/references/frontmatter-spec.md +113 -0
- package/skills/skill-auditor/references/lazy-loading-guide.md +98 -0
- package/skills/skill-improve/SKILL.md +59 -0
- package/skills/skill-test/SKILL.md +45 -0
- package/skills/skill-test/references/audit-mode-procedure.md +7 -0
- package/skills/skill-test/references/category-mode-procedure.md +7 -0
- package/skills/skill-test/references/next-steps-guide.md +9 -0
- package/skills/skill-test/references/spec-mode-procedure.md +8 -0
- package/skills/skill-test/references/static-checks.md +13 -0
- package/skills/slack/SKILL.md +45 -0
- package/skills/slo-sli/SKILL.md +92 -0
- package/skills/slo-sli/references/alerting-burn-rate.md +22 -0
- package/skills/slo-sli/references/anti-patterns.md +12 -0
- package/skills/slo-sli/references/checklist.md +14 -0
- package/skills/smoke-check/SKILL.md +77 -0
- package/skills/snowflake-development/SKILL.md +119 -0
- package/skills/snowflake-development/references/cortex_ai_and_agents.md +280 -0
- package/skills/snowflake-development/references/snowflake_sql_and_pipelines.md +281 -0
- package/skills/snowflake-development/references/troubleshooting.md +155 -0
- package/skills/snowflake-development/scripts/snowflake_query_helper.py +233 -0
- package/skills/soc2-compliance/SKILL.md +132 -0
- package/skills/soc2-compliance/references/evidence_collection_guide.md +227 -0
- package/skills/soc2-compliance/references/trust_service_criteria.md +273 -0
- package/skills/soc2-compliance/references/type1_vs_type2.md +273 -0
- package/skills/soc2-compliance/scripts/control_matrix_builder.py +679 -0
- package/skills/soc2-compliance/scripts/evidence_tracker.py +240 -0
- package/skills/soc2-compliance/scripts/gap_analyzer.py +479 -0
- package/skills/social-content/SKILL.md +155 -0
- package/skills/social-content/references/hooks-and-repurposing.md +74 -0
- package/skills/social-content/references/platforms.md +163 -0
- package/skills/social-content/references/post-templates.md +171 -0
- package/skills/social-content/references/reverse-engineering.md +190 -0
- package/skills/social-media-analyzer/HOW_TO_USE.md +39 -0
- package/skills/social-media-analyzer/SKILL.md +190 -0
- package/skills/social-media-analyzer/assets/expected_output.json +61 -0
- package/skills/social-media-analyzer/assets/sample_input.json +42 -0
- package/skills/social-media-analyzer/references/platform-benchmarks.md +226 -0
- package/skills/social-media-analyzer/scripts/analyze_performance.py +180 -0
- package/skills/social-media-analyzer/scripts/calculate_metrics.py +147 -0
- package/skills/social-media-manager/SKILL.md +195 -0
- package/skills/social-media-manager/scripts/social_calendar_generator.py +399 -0
- package/skills/sprint-ceremony/SKILL.md +75 -0
- package/skills/sprint-plan/SKILL.md +47 -0
- package/skills/sprint-report/SKILL.md +124 -0
- package/skills/standup-report/SKILL.md +51 -0
- package/skills/start/SKILL.md +67 -0
- package/skills/start-service/SKILL.md +45 -0
- package/skills/state-management/SKILL.md +75 -0
- package/skills/story-done/SKILL.md +69 -0
- package/skills/story-done/references/review-gates.md +9 -0
- package/skills/story-done/references/test-evidence-traceability.md +17 -0
- package/skills/story-readiness/SKILL.md +57 -0
- package/skills/story-readiness/references/context-loading.md +9 -0
- package/skills/story-readiness/references/output-format.md +7 -0
- package/skills/story-readiness/references/readiness-checklist.md +33 -0
- package/skills/strategic-alignment/SKILL.md +79 -0
- package/skills/strategic-alignment/references/alignment-playbook.md +205 -0
- package/skills/strategic-alignment/scripts/alignment_checker.py +455 -0
- package/skills/stripe-integration-expert/SKILL.md +65 -0
- package/skills/stripe-integration-expert/references/stripe-code-examples.md +372 -0
- package/skills/tdd-guide/HOW_TO_USE.md +313 -0
- package/skills/tdd-guide/SKILL.md +114 -0
- package/skills/tdd-guide/assets/expected_output.json +77 -0
- package/skills/tdd-guide/assets/sample_coverage_report.lcov +56 -0
- package/skills/tdd-guide/assets/sample_input_python.json +39 -0
- package/skills/tdd-guide/assets/sample_input_typescript.json +36 -0
- package/skills/tdd-guide/references/ci-integration.md +195 -0
- package/skills/tdd-guide/references/framework-guide.md +206 -0
- package/skills/tdd-guide/references/tdd-best-practices.md +128 -0
- package/skills/tdd-guide/references/tdd-code-examples.md +229 -0
- package/skills/tdd-guide/scripts/coverage_analyzer.py +434 -0
- package/skills/tdd-guide/scripts/fixture_generator.py +440 -0
- package/skills/tdd-guide/scripts/format_detector.py +384 -0
- package/skills/tdd-guide/scripts/framework_adapter.py +428 -0
- package/skills/tdd-guide/scripts/metrics_calculator.py +456 -0
- package/skills/tdd-guide/scripts/output_formatter.py +354 -0
- package/skills/tdd-guide/scripts/tdd_workflow.py +474 -0
- package/skills/tdd-guide/scripts/test_generator.py +438 -0
- package/skills/team-communications/SKILL.md +69 -0
- package/skills/team-communications/references/3p-updates.md +47 -0
- package/skills/team-communications/references/company-newsletter.md +65 -0
- package/skills/team-communications/references/faq-answers.md +30 -0
- package/skills/team-communications/references/general-comms.md +16 -0
- package/skills/team-vn/SKILL.md +187 -0
- package/skills/tech-debt/SKILL.md +91 -0
- package/skills/tech-debt/references/register-format.md +20 -0
- package/skills/tech-debt/references/scan-indicators.md +22 -0
- package/skills/tech-stack-evaluator/SKILL.md +111 -0
- package/skills/tech-stack-evaluator/assets/expected_output_comparison.json +82 -0
- package/skills/tech-stack-evaluator/assets/sample_input_structured.json +39 -0
- package/skills/tech-stack-evaluator/assets/sample_input_tco.json +42 -0
- package/skills/tech-stack-evaluator/assets/sample_input_text.json +4 -0
- package/skills/tech-stack-evaluator/references/examples.md +383 -0
- package/skills/tech-stack-evaluator/references/metrics.md +242 -0
- package/skills/tech-stack-evaluator/references/workflows.md +362 -0
- package/skills/tech-stack-evaluator/scripts/ecosystem_analyzer.py +501 -0
- package/skills/tech-stack-evaluator/scripts/format_detector.py +430 -0
- package/skills/tech-stack-evaluator/scripts/migration_analyzer.py +587 -0
- package/skills/tech-stack-evaluator/scripts/report_generator.py +460 -0
- package/skills/tech-stack-evaluator/scripts/security_assessor.py +518 -0
- package/skills/tech-stack-evaluator/scripts/stack_comparator.py +389 -0
- package/skills/tech-stack-evaluator/scripts/tco_calculator.py +458 -0
- package/skills/terraform-init/SKILL.md +80 -0
- package/skills/terraform-init/references/anti-patterns.md +11 -0
- package/skills/terraform-init/references/security-checklist.md +10 -0
- package/skills/test-flakiness/SKILL.md +90 -0
- package/skills/test-helpers/SKILL.md +50 -0
- package/skills/test-setup/SKILL.md +58 -0
- package/skills/testing/SKILL.md +32 -0
- package/skills/testing/references/anti-patterns.md +11 -0
- package/skills/testing/references/coverage-strategy.md +11 -0
- package/skills/testing/references/framework-setup.md +25 -0
- package/skills/testing/references/helper-patterns.md +9 -0
- package/skills/threat-detection/SKILL.md +114 -0
- package/skills/threat-detection/references/hunt-playbooks.md +131 -0
- package/skills/threat-detection/scripts/threat_signal_analyzer.py +571 -0
- package/skills/unity-game-architecture/SKILL.md +45 -0
- package/skills/unity-game-architecture/references/anti-patterns.md +15 -0
- package/skills/unity-game-architecture/references/checklist.md +16 -0
- package/skills/unity-game-architecture/references/performance-and-systems.md +29 -0
- package/skills/user-persona/SKILL.md +65 -0
- package/skills/user-persona/references/persona-template.md +27 -0
- package/skills/ux-design/SKILL.md +60 -0
- package/skills/ux-design/references/cross-reference-and-routing.md +19 -0
- package/skills/ux-design/references/spec-sections.md +19 -0
- package/skills/ux-review/SKILL.md +70 -0
- package/skills/video-content-strategist/SKILL.md +181 -0
- package/skills/video-content-strategist/references/scripts-and-anti-patterns.md +48 -0
- package/skills/visual-regression/SKILL.md +86 -0
- package/skills/vn-asset-pipeline/SKILL.md +166 -0
- package/skills/vn-character-design/SKILL.md +220 -0
- package/skills/vn-comfyui-gen/SKILL.md +235 -0
- package/skills/vn-comfyui-gen/references/comfyui-vn-workflows.md +197 -0
- package/skills/vn-dialogue-tree/SKILL.md +126 -0
- package/skills/vn-gdd/SKILL.md +133 -0
- package/skills/vn-narrative-design/SKILL.md +185 -0
- package/skills/vn-renpy-setup/SKILL.md +136 -0
- package/skills/vn-scene-compose/SKILL.md +234 -0
- package/skills/vn-script/SKILL.md +140 -0
- package/skills/vn-script/references/renpy-cheatsheet.md +169 -0
- package/skills/vn-testing/SKILL.md +178 -0
- package/skills/vn-ui-design/SKILL.md +220 -0
- package/skills/web-security/SKILL.md +92 -0
- package/skills/web-security/references/csp-and-frontend.md +36 -0
- package/skills/webhooks/SKILL.md +102 -0
- package/skills/websocket-realtime-rooms/SKILL.md +46 -0
- package/skills/websocket-realtime-rooms/references/anti-patterns-checklist.md +27 -0
- package/skills/websocket-realtime-rooms/references/auth-security.md +9 -0
- package/skills/websocket-realtime-rooms/references/client-implementation.md +15 -0
- package/skills/websocket-realtime-rooms/references/heartbeat-reconnect-backpressure.md +17 -0
- package/skills/weekly-digest/SKILL.md +51 -0
- package/skills/worktree-isolation/README.md +193 -0
- package/skills/worktree-isolation/SKILL.md +87 -0
- package/skills/worktree-isolation/scripts/apply.py +178 -0
- package/skills/worktree-isolation/scripts/lib.py +371 -0
- package/skills/worktree-isolation-setup/README.md +137 -0
- package/skills/worktree-isolation-setup/SKILL.md +192 -0
- package/skills/worktree-isolation-setup/scripts/apply.py +178 -0
- package/skills/worktree-isolation-setup/scripts/install_hook.py +118 -0
- package/skills/worktree-isolation-setup/scripts/lib.py +371 -0
- package/skills/x-twitter-growth/SKILL.md +91 -0
- package/skills/x-twitter-growth/references/algorithm-signals.md +70 -0
- package/skills/x-twitter-growth/scripts/competitor_analyzer.py +235 -0
- package/skills/x-twitter-growth/scripts/content_planner.py +210 -0
- package/skills/x-twitter-growth/scripts/growth_tracker.py +259 -0
- package/skills/x-twitter-growth/scripts/profile_auditor.py +294 -0
- package/skills/x-twitter-growth/scripts/tweet_composer.py +290 -0
- package/skills/xlsx-generator/SKILL.md +135 -0
- package/skills/xlsx-generator/references/create.md +691 -0
- package/skills/xlsx-generator/references/edit.md +684 -0
- package/skills/xlsx-generator/references/fix.md +37 -0
- package/skills/xlsx-generator/references/format.md +768 -0
- package/skills/xlsx-generator/references/ooxml-cheatsheet.md +231 -0
- package/skills/xlsx-generator/references/read-analyze.md +97 -0
- package/skills/xlsx-generator/references/validate.md +772 -0
- package/skills/xlsx-generator/scripts/formula_check.py +422 -0
- package/skills/xlsx-generator/scripts/libreoffice_recalc.py +248 -0
- package/skills/xlsx-generator/scripts/shared_strings_builder.py +163 -0
- package/skills/xlsx-generator/scripts/style_audit.py +575 -0
- package/skills/xlsx-generator/scripts/xlsx_add_column.py +395 -0
- package/skills/xlsx-generator/scripts/xlsx_insert_row.py +274 -0
- package/skills/xlsx-generator/scripts/xlsx_pack.py +87 -0
- package/skills/xlsx-generator/scripts/xlsx_reader.py +362 -0
- package/skills/xlsx-generator/scripts/xlsx_shift_rows.py +396 -0
- package/skills/xlsx-generator/scripts/xlsx_unpack.py +130 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/[Content_Types].xml +9 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/_rels/.rels +6 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/xl/styles.xml +160 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/xl/workbook.xml +30 -0
- package/skills/xlsx-generator/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
- package/templates/gamedev/architecture-decision-record.md +176 -0
- package/templates/gamedev/art-bible.md +80 -0
- package/templates/gamedev/concept-doc-from-prototype.md +304 -0
- package/templates/gamedev/difficulty-curve.md +330 -0
- package/templates/gamedev/economy-model.md +130 -0
- package/templates/gamedev/faction-design.md +166 -0
- package/templates/gamedev/game-concept.md +316 -0
- package/templates/gamedev/game-design-document.md +219 -0
- package/templates/gamedev/game-pillars.md +313 -0
- package/templates/gamedev/hud-design.md +505 -0
- package/templates/gamedev/level-design-document.md +111 -0
- package/templates/gamedev/narrative-character-sheet.md +111 -0
- package/templates/gamedev/pitch-document.md +140 -0
- package/templates/gamedev/player-journey.md +357 -0
- package/templates/gamedev/project-stage-report.md +199 -0
- package/templates/gamedev/sound-bible.md +130 -0
- package/templates/gamedev/systems-index.md +146 -0
- package/templates/gamedev/technical-design-document.md +96 -0
- package/templates/gamedev/test-evidence.md +86 -0
- package/templates/gamedev/test-plan.md +144 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,2352 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/cli.ts
|
|
4
|
+
import { Command } from "commander";
|
|
5
|
+
|
|
6
|
+
// src/commands/install.ts
|
|
7
|
+
import path9 from "path";
|
|
8
|
+
import chalk from "chalk";
|
|
9
|
+
|
|
10
|
+
// src/profiles.ts
|
|
11
|
+
import fs from "fs";
|
|
12
|
+
import path from "path";
|
|
13
|
+
import yaml from "js-yaml";
|
|
14
|
+
function parseProfile(filePath) {
|
|
15
|
+
const raw = yaml.load(fs.readFileSync(filePath, "utf-8"));
|
|
16
|
+
const rules = raw.rules ?? {};
|
|
17
|
+
const perms = raw.permissions ?? {};
|
|
18
|
+
return {
|
|
19
|
+
name: String(raw.name ?? path.basename(filePath, ".yaml")),
|
|
20
|
+
description: String(raw.description ?? ""),
|
|
21
|
+
type: raw.type ?? "addon",
|
|
22
|
+
skills: raw.skills ?? [],
|
|
23
|
+
rules: {
|
|
24
|
+
universal: rules.universal ?? [],
|
|
25
|
+
gamedev: rules.gamedev ?? []
|
|
26
|
+
},
|
|
27
|
+
agents: raw.agents ?? [],
|
|
28
|
+
hooks: raw.hooks ?? [],
|
|
29
|
+
permissions: {
|
|
30
|
+
allow: perms.allow ?? [],
|
|
31
|
+
deny: perms.deny ?? []
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function listProfiles(profilesDir) {
|
|
36
|
+
if (!fs.existsSync(profilesDir)) return [];
|
|
37
|
+
return fs.readdirSync(profilesDir).filter((f) => f.endsWith(".yaml") && f !== "core.yaml").map((f) => parseProfile(path.join(profilesDir, f))).sort((a, b) => a.name.localeCompare(b.name));
|
|
38
|
+
}
|
|
39
|
+
function mergeProfiles(profilesDir, profileNames) {
|
|
40
|
+
const namesToLoad = ["core", ...profileNames];
|
|
41
|
+
const loaded = [];
|
|
42
|
+
const seenSkills = /* @__PURE__ */ new Set();
|
|
43
|
+
const seenRulesUniv = /* @__PURE__ */ new Set();
|
|
44
|
+
const seenRulesGamedev = /* @__PURE__ */ new Set();
|
|
45
|
+
const seenAgents = /* @__PURE__ */ new Set();
|
|
46
|
+
const seenHooks = /* @__PURE__ */ new Set();
|
|
47
|
+
const allPermAllow = [];
|
|
48
|
+
const allPermDeny = [];
|
|
49
|
+
const skills = [];
|
|
50
|
+
const rulesUniv = [];
|
|
51
|
+
const rulesGamedev = [];
|
|
52
|
+
const agents = [];
|
|
53
|
+
const hooks = [];
|
|
54
|
+
for (const name of namesToLoad) {
|
|
55
|
+
const filePath = path.join(profilesDir, `${name}.yaml`);
|
|
56
|
+
if (!fs.existsSync(filePath)) {
|
|
57
|
+
console.warn(` WARN: Profile '${name}.yaml' not found, skipping`);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const profile = parseProfile(filePath);
|
|
61
|
+
loaded.push(name);
|
|
62
|
+
for (const s of profile.skills) {
|
|
63
|
+
if (!seenSkills.has(s)) {
|
|
64
|
+
seenSkills.add(s);
|
|
65
|
+
skills.push(s);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
for (const r of profile.rules.universal) {
|
|
69
|
+
if (!seenRulesUniv.has(r)) {
|
|
70
|
+
seenRulesUniv.add(r);
|
|
71
|
+
rulesUniv.push(r);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (const r of profile.rules.gamedev) {
|
|
75
|
+
if (!seenRulesGamedev.has(r)) {
|
|
76
|
+
seenRulesGamedev.add(r);
|
|
77
|
+
rulesGamedev.push(r);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
for (const a of profile.agents) {
|
|
81
|
+
if (!seenAgents.has(a)) {
|
|
82
|
+
seenAgents.add(a);
|
|
83
|
+
agents.push(a);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
for (const h of profile.hooks) {
|
|
87
|
+
if (!seenHooks.has(h)) {
|
|
88
|
+
seenHooks.add(h);
|
|
89
|
+
hooks.push(h);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
allPermAllow.push(...profile.permissions.allow);
|
|
93
|
+
allPermDeny.push(...profile.permissions.deny);
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
loaded,
|
|
97
|
+
skills,
|
|
98
|
+
rules: { universal: rulesUniv, gamedev: rulesGamedev },
|
|
99
|
+
agents,
|
|
100
|
+
hooks,
|
|
101
|
+
permissions: {
|
|
102
|
+
allow: [...new Set(allPermAllow)],
|
|
103
|
+
deny: [...new Set(allPermDeny)]
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/installer.ts
|
|
109
|
+
import fs5 from "fs";
|
|
110
|
+
import path6 from "path";
|
|
111
|
+
|
|
112
|
+
// src/utils.ts
|
|
113
|
+
import { fileURLToPath } from "url";
|
|
114
|
+
import path2 from "path";
|
|
115
|
+
import fs2 from "fs";
|
|
116
|
+
function getPackageRoot() {
|
|
117
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
118
|
+
return path2.resolve(path2.dirname(thisFile), "..");
|
|
119
|
+
}
|
|
120
|
+
function copyDirSync(src, dest) {
|
|
121
|
+
fs2.mkdirSync(dest, { recursive: true });
|
|
122
|
+
for (const entry of fs2.readdirSync(src, { withFileTypes: true })) {
|
|
123
|
+
const srcPath = path2.join(src, entry.name);
|
|
124
|
+
const destPath = path2.join(dest, entry.name);
|
|
125
|
+
if (entry.isDirectory()) {
|
|
126
|
+
copyDirSync(srcPath, destPath);
|
|
127
|
+
} else {
|
|
128
|
+
fs2.copyFileSync(srcPath, destPath);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function ensureDir(dir) {
|
|
133
|
+
fs2.mkdirSync(dir, { recursive: true });
|
|
134
|
+
}
|
|
135
|
+
function fileExists(p) {
|
|
136
|
+
return fs2.existsSync(p);
|
|
137
|
+
}
|
|
138
|
+
function readJsonSync(p) {
|
|
139
|
+
return JSON.parse(fs2.readFileSync(p, "utf-8"));
|
|
140
|
+
}
|
|
141
|
+
function writeJsonSync(p, data) {
|
|
142
|
+
fs2.writeFileSync(p, JSON.stringify(data, null, 2) + "\n", "utf-8");
|
|
143
|
+
}
|
|
144
|
+
function isSymlinkOrJunction(p) {
|
|
145
|
+
try {
|
|
146
|
+
return fs2.lstatSync(p).isSymbolicLink();
|
|
147
|
+
} catch {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function getPackageVersion() {
|
|
152
|
+
const pkgPath = path2.join(getPackageRoot(), "package.json");
|
|
153
|
+
const pkg = readJsonSync(pkgPath);
|
|
154
|
+
return pkg.version;
|
|
155
|
+
}
|
|
156
|
+
function safeRemove(p) {
|
|
157
|
+
if (isSymlinkOrJunction(p)) {
|
|
158
|
+
fs2.unlinkSync(p);
|
|
159
|
+
} else if (fs2.existsSync(p)) {
|
|
160
|
+
fs2.rmSync(p, { recursive: true, force: true });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// src/manifest.ts
|
|
165
|
+
import path3 from "path";
|
|
166
|
+
var MANIFEST_FILE = "arcane-manifest.json";
|
|
167
|
+
function manifestPath(target) {
|
|
168
|
+
return path3.join(target, ".claude", MANIFEST_FILE);
|
|
169
|
+
}
|
|
170
|
+
function readManifest(target) {
|
|
171
|
+
const p = manifestPath(target);
|
|
172
|
+
if (!fileExists(p)) return null;
|
|
173
|
+
return readJsonSync(p);
|
|
174
|
+
}
|
|
175
|
+
function writeManifest(target, merged, profileCommand, packageRoot, worktreeOrOpts) {
|
|
176
|
+
let opts = {};
|
|
177
|
+
if (worktreeOrOpts) {
|
|
178
|
+
if ("is_worktree" in worktreeOrOpts) {
|
|
179
|
+
opts = { worktree: worktreeOrOpts };
|
|
180
|
+
} else {
|
|
181
|
+
opts = worktreeOrOpts;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const version = getPackageVersion();
|
|
185
|
+
const manifest = {
|
|
186
|
+
arcane_version: version,
|
|
187
|
+
cli: "npm",
|
|
188
|
+
profile_command: profileCommand,
|
|
189
|
+
profiles: merged.loaded,
|
|
190
|
+
installed_at: (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z"),
|
|
191
|
+
total_skills: merged.skills.length,
|
|
192
|
+
total_rules: merged.rules.universal.length + merged.rules.gamedev.length,
|
|
193
|
+
installed_skills: merged.skills,
|
|
194
|
+
installed_rules: [
|
|
195
|
+
...merged.rules.universal,
|
|
196
|
+
...merged.rules.gamedev
|
|
197
|
+
],
|
|
198
|
+
installed_agents: merged.agents,
|
|
199
|
+
source: packageRoot,
|
|
200
|
+
source_version: version
|
|
201
|
+
};
|
|
202
|
+
if (opts.worktree) {
|
|
203
|
+
manifest.worktree = opts.worktree;
|
|
204
|
+
}
|
|
205
|
+
if (opts.contentHashes) {
|
|
206
|
+
manifest.content_hashes = opts.contentHashes;
|
|
207
|
+
}
|
|
208
|
+
if (opts.sourceType) {
|
|
209
|
+
manifest.source_type = opts.sourceType;
|
|
210
|
+
}
|
|
211
|
+
writeJsonSync(manifestPath(target), manifest);
|
|
212
|
+
}
|
|
213
|
+
function updateManifestFields(target, updates) {
|
|
214
|
+
const manifest = readManifest(target);
|
|
215
|
+
if (!manifest) return;
|
|
216
|
+
Object.assign(manifest, updates);
|
|
217
|
+
writeJsonSync(manifestPath(target), manifest);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// src/worktree.ts
|
|
221
|
+
import { execSync } from "child_process";
|
|
222
|
+
import fs3 from "fs";
|
|
223
|
+
import path4 from "path";
|
|
224
|
+
function getWorktreeInfo(target) {
|
|
225
|
+
try {
|
|
226
|
+
execSync("git rev-parse --is-inside-work-tree", {
|
|
227
|
+
cwd: target,
|
|
228
|
+
encoding: "utf-8",
|
|
229
|
+
stdio: "pipe"
|
|
230
|
+
});
|
|
231
|
+
} catch {
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
const gitCommonDir = execSync("git rev-parse --git-common-dir", {
|
|
235
|
+
cwd: target,
|
|
236
|
+
encoding: "utf-8",
|
|
237
|
+
stdio: "pipe"
|
|
238
|
+
}).trim();
|
|
239
|
+
const gitDir = execSync("git rev-parse --git-dir", {
|
|
240
|
+
cwd: target,
|
|
241
|
+
encoding: "utf-8",
|
|
242
|
+
stdio: "pipe"
|
|
243
|
+
}).trim();
|
|
244
|
+
const resolvedCommon = path4.resolve(target, gitCommonDir);
|
|
245
|
+
const resolvedGit = path4.resolve(target, gitDir);
|
|
246
|
+
const isWorktree = resolvedCommon !== resolvedGit;
|
|
247
|
+
const mainWorktreePath = isWorktree ? path4.resolve(resolvedCommon, "..") : target;
|
|
248
|
+
let currentBranch = "HEAD";
|
|
249
|
+
try {
|
|
250
|
+
currentBranch = execSync("git branch --show-current", {
|
|
251
|
+
cwd: target,
|
|
252
|
+
encoding: "utf-8",
|
|
253
|
+
stdio: "pipe"
|
|
254
|
+
}).trim();
|
|
255
|
+
} catch {
|
|
256
|
+
}
|
|
257
|
+
const allWorktrees = parseWorktreeList(target);
|
|
258
|
+
return {
|
|
259
|
+
isWorktree,
|
|
260
|
+
mainWorktreePath,
|
|
261
|
+
currentBranch,
|
|
262
|
+
worktreeId: path4.basename(target),
|
|
263
|
+
allWorktrees
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function parseWorktreeList(cwd) {
|
|
267
|
+
try {
|
|
268
|
+
const raw = execSync("git worktree list --porcelain", {
|
|
269
|
+
cwd,
|
|
270
|
+
encoding: "utf-8",
|
|
271
|
+
stdio: "pipe"
|
|
272
|
+
});
|
|
273
|
+
const entries = [];
|
|
274
|
+
let current = null;
|
|
275
|
+
for (const line of raw.split("\n")) {
|
|
276
|
+
if (line.startsWith("worktree ")) {
|
|
277
|
+
if (current) entries.push(current);
|
|
278
|
+
current = {
|
|
279
|
+
path: line.slice("worktree ".length),
|
|
280
|
+
branch: "",
|
|
281
|
+
isMain: false
|
|
282
|
+
};
|
|
283
|
+
} else if (line.startsWith("branch ") && current) {
|
|
284
|
+
current.branch = line.slice("branch ".length).replace("refs/heads/", "");
|
|
285
|
+
} else if (line === "" && current) {
|
|
286
|
+
entries.push(current);
|
|
287
|
+
current = null;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (current) entries.push(current);
|
|
291
|
+
if (entries.length > 0) entries[0].isMain = true;
|
|
292
|
+
return entries;
|
|
293
|
+
} catch {
|
|
294
|
+
return [];
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function findMainArcaneInstall(mainPath) {
|
|
298
|
+
return fs3.existsSync(
|
|
299
|
+
path4.join(mainPath, ".claude", "arcane-manifest.json")
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
function linkOrCopyDir(src, dest, mode) {
|
|
303
|
+
if (mode === "symlink") {
|
|
304
|
+
try {
|
|
305
|
+
const parentDir = path4.dirname(dest);
|
|
306
|
+
fs3.mkdirSync(parentDir, { recursive: true });
|
|
307
|
+
const type = process.platform === "win32" ? "junction" : "dir";
|
|
308
|
+
fs3.symlinkSync(src, dest, type);
|
|
309
|
+
return "linked";
|
|
310
|
+
} catch {
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
copyDirSync(src, dest);
|
|
314
|
+
return "copied";
|
|
315
|
+
}
|
|
316
|
+
function sanitizeBranchForPath(branch) {
|
|
317
|
+
return branch.replace(/^(feat|fix|feature|hotfix)\//, "").replace(/\//g, "-").replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
318
|
+
}
|
|
319
|
+
function defaultWorktreePath(repoRoot, branch) {
|
|
320
|
+
const repoName = path4.basename(repoRoot);
|
|
321
|
+
const sanitized = sanitizeBranchForPath(branch);
|
|
322
|
+
return path4.resolve(repoRoot, "..", `${repoName}-${sanitized}`);
|
|
323
|
+
}
|
|
324
|
+
function createGitWorktree(repoRoot, worktreePath, branch, base) {
|
|
325
|
+
const branchExists = checkBranchExists(repoRoot, branch);
|
|
326
|
+
if (branchExists) {
|
|
327
|
+
execSync(`git worktree add "${worktreePath}" "${branch}"`, {
|
|
328
|
+
cwd: repoRoot,
|
|
329
|
+
encoding: "utf-8",
|
|
330
|
+
stdio: "pipe"
|
|
331
|
+
});
|
|
332
|
+
} else {
|
|
333
|
+
const baseBranch = base ?? "HEAD";
|
|
334
|
+
execSync(
|
|
335
|
+
`git worktree add -b "${branch}" "${worktreePath}" "${baseBranch}"`,
|
|
336
|
+
{
|
|
337
|
+
cwd: repoRoot,
|
|
338
|
+
encoding: "utf-8",
|
|
339
|
+
stdio: "pipe"
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function checkBranchExists(cwd, branch) {
|
|
345
|
+
try {
|
|
346
|
+
execSync(`git show-ref --verify refs/heads/${branch}`, {
|
|
347
|
+
cwd,
|
|
348
|
+
encoding: "utf-8",
|
|
349
|
+
stdio: "pipe"
|
|
350
|
+
});
|
|
351
|
+
return true;
|
|
352
|
+
} catch {
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
function detectPackageManager(dir) {
|
|
357
|
+
const managers = [
|
|
358
|
+
{ lockfile: "pnpm-lock.yaml", command: "pnpm install" },
|
|
359
|
+
{ lockfile: "bun.lockb", command: "bun install" },
|
|
360
|
+
{ lockfile: "yarn.lock", command: "yarn install" },
|
|
361
|
+
{ lockfile: "package-lock.json", command: "npm install" }
|
|
362
|
+
];
|
|
363
|
+
for (const m of managers) {
|
|
364
|
+
if (fs3.existsSync(path4.join(dir, m.lockfile))) return m;
|
|
365
|
+
}
|
|
366
|
+
if (fs3.existsSync(path4.join(dir, "package.json"))) {
|
|
367
|
+
return { lockfile: "package.json", command: "npm install" };
|
|
368
|
+
}
|
|
369
|
+
return null;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/content-hash.ts
|
|
373
|
+
import fs4 from "fs";
|
|
374
|
+
import path5 from "path";
|
|
375
|
+
import { createHash } from "crypto";
|
|
376
|
+
function hashFile(filePath) {
|
|
377
|
+
const content = fs4.readFileSync(filePath);
|
|
378
|
+
return createHash("sha256").update(content).digest("hex");
|
|
379
|
+
}
|
|
380
|
+
function hashDirectory(dirPath) {
|
|
381
|
+
const hashes = {};
|
|
382
|
+
walkDir(dirPath, dirPath, hashes);
|
|
383
|
+
return hashes;
|
|
384
|
+
}
|
|
385
|
+
function walkDir(base, current, hashes) {
|
|
386
|
+
for (const entry of fs4.readdirSync(current, { withFileTypes: true })) {
|
|
387
|
+
const fullPath = path5.join(current, entry.name);
|
|
388
|
+
const relPath = path5.relative(base, fullPath).split(path5.sep).join("/");
|
|
389
|
+
if (entry.isDirectory()) {
|
|
390
|
+
walkDir(base, fullPath, hashes);
|
|
391
|
+
} else {
|
|
392
|
+
hashes[relPath] = hashFile(fullPath);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function computeContentHashes(claudeDir) {
|
|
397
|
+
const hashes = {
|
|
398
|
+
skills: {},
|
|
399
|
+
rules: {},
|
|
400
|
+
agents: {},
|
|
401
|
+
hooks: {}
|
|
402
|
+
};
|
|
403
|
+
const skillsDir = path5.join(claudeDir, "skills");
|
|
404
|
+
if (fs4.existsSync(skillsDir)) {
|
|
405
|
+
for (const entry of fs4.readdirSync(skillsDir, { withFileTypes: true })) {
|
|
406
|
+
if (entry.isDirectory()) {
|
|
407
|
+
const dirHash = hashDirectory(path5.join(skillsDir, entry.name));
|
|
408
|
+
const combined = createHash("sha256").update(JSON.stringify(dirHash)).digest("hex");
|
|
409
|
+
hashes.skills[entry.name] = combined;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
const rulesDir = path5.join(claudeDir, "rules");
|
|
414
|
+
if (fs4.existsSync(rulesDir)) {
|
|
415
|
+
for (const entry of fs4.readdirSync(rulesDir, { withFileTypes: true })) {
|
|
416
|
+
if (!entry.isDirectory()) {
|
|
417
|
+
hashes.rules[entry.name] = hashFile(path5.join(rulesDir, entry.name));
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
const agentsDir = path5.join(claudeDir, "agents");
|
|
422
|
+
if (fs4.existsSync(agentsDir)) {
|
|
423
|
+
for (const entry of fs4.readdirSync(agentsDir, { withFileTypes: true })) {
|
|
424
|
+
if (entry.isDirectory()) {
|
|
425
|
+
const dirHash = hashDirectory(path5.join(agentsDir, entry.name));
|
|
426
|
+
const combined = createHash("sha256").update(JSON.stringify(dirHash)).digest("hex");
|
|
427
|
+
hashes.agents[entry.name] = combined;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
const hooksDir = path5.join(claudeDir, "hooks");
|
|
432
|
+
if (fs4.existsSync(hooksDir)) {
|
|
433
|
+
for (const entry of fs4.readdirSync(hooksDir, { withFileTypes: true })) {
|
|
434
|
+
if (!entry.isDirectory()) {
|
|
435
|
+
hashes.hooks[entry.name] = hashFile(path5.join(hooksDir, entry.name));
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return hashes;
|
|
440
|
+
}
|
|
441
|
+
function computeSourceHashes(packageRoot, skills, rules, agents) {
|
|
442
|
+
const hashes = {
|
|
443
|
+
skills: {},
|
|
444
|
+
rules: {},
|
|
445
|
+
agents: {},
|
|
446
|
+
hooks: {}
|
|
447
|
+
};
|
|
448
|
+
for (const skill of skills) {
|
|
449
|
+
const skillDir = path5.join(packageRoot, "skills", skill);
|
|
450
|
+
if (fs4.existsSync(skillDir)) {
|
|
451
|
+
const dirHash = hashDirectory(skillDir);
|
|
452
|
+
const combined = createHash("sha256").update(JSON.stringify(dirHash)).digest("hex");
|
|
453
|
+
hashes.skills[skill] = combined;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
for (const rule of rules) {
|
|
457
|
+
const ruleName = rule.endsWith(".md") ? rule : `${rule}.md`;
|
|
458
|
+
const rulePath = path5.join(packageRoot, "rules", ruleName);
|
|
459
|
+
if (fs4.existsSync(rulePath)) {
|
|
460
|
+
hashes.rules[ruleName] = hashFile(rulePath);
|
|
461
|
+
} else {
|
|
462
|
+
const gamedevPath = path5.join(packageRoot, "rules", "gamedev", ruleName);
|
|
463
|
+
if (fs4.existsSync(gamedevPath)) {
|
|
464
|
+
hashes.rules[ruleName] = hashFile(gamedevPath);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
for (const agent of agents) {
|
|
469
|
+
const agentDir = path5.join(packageRoot, "agents", agent);
|
|
470
|
+
if (fs4.existsSync(agentDir)) {
|
|
471
|
+
const dirHash = hashDirectory(agentDir);
|
|
472
|
+
const combined = createHash("sha256").update(JSON.stringify(dirHash)).digest("hex");
|
|
473
|
+
hashes.agents[agent] = combined;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
const hooksDir = path5.join(packageRoot, "hooks");
|
|
477
|
+
if (fs4.existsSync(hooksDir)) {
|
|
478
|
+
for (const entry of fs4.readdirSync(hooksDir, { withFileTypes: true })) {
|
|
479
|
+
if (!entry.isDirectory()) {
|
|
480
|
+
hashes.hooks[entry.name] = hashFile(path5.join(hooksDir, entry.name));
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return hashes;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// src/installer.ts
|
|
488
|
+
var SETTINGS_TEMPLATE = {
|
|
489
|
+
$schema: "https://json.schemastore.org/claude-code-settings.json",
|
|
490
|
+
permissions: { allow: [], deny: [] },
|
|
491
|
+
hooks: {
|
|
492
|
+
SessionStart: [
|
|
493
|
+
{
|
|
494
|
+
matcher: "",
|
|
495
|
+
hooks: [
|
|
496
|
+
{
|
|
497
|
+
type: "command",
|
|
498
|
+
command: "bash .claude/hooks/session-start.sh",
|
|
499
|
+
timeout: 10
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
type: "command",
|
|
503
|
+
command: "bash .claude/hooks/detect-division.sh",
|
|
504
|
+
timeout: 10
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
type: "command",
|
|
508
|
+
command: "bash .claude/hooks/detect-gaps.sh",
|
|
509
|
+
timeout: 10
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
type: "command",
|
|
513
|
+
command: "bash .claude/hooks/check-update.sh",
|
|
514
|
+
timeout: 10
|
|
515
|
+
}
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
PreToolUse: [
|
|
520
|
+
{
|
|
521
|
+
matcher: "Bash",
|
|
522
|
+
hooks: [
|
|
523
|
+
{
|
|
524
|
+
type: "command",
|
|
525
|
+
command: "bash .claude/hooks/validate-commit.sh",
|
|
526
|
+
timeout: 15
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
type: "command",
|
|
530
|
+
command: "bash .claude/hooks/validate-push.sh",
|
|
531
|
+
timeout: 10
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
type: "command",
|
|
535
|
+
command: "bash .claude/hooks/validate-secrets.sh",
|
|
536
|
+
timeout: 10
|
|
537
|
+
}
|
|
538
|
+
]
|
|
539
|
+
}
|
|
540
|
+
],
|
|
541
|
+
PostToolUse: [
|
|
542
|
+
{
|
|
543
|
+
matcher: "Write|Edit",
|
|
544
|
+
hooks: [
|
|
545
|
+
{
|
|
546
|
+
type: "command",
|
|
547
|
+
command: "bash .claude/hooks/validate-assets.sh",
|
|
548
|
+
timeout: 10
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
type: "command",
|
|
552
|
+
command: "bash .claude/hooks/validate-skill-change.sh",
|
|
553
|
+
timeout: 5
|
|
554
|
+
}
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
Notification: [
|
|
559
|
+
{
|
|
560
|
+
matcher: "",
|
|
561
|
+
hooks: [
|
|
562
|
+
{
|
|
563
|
+
type: "command",
|
|
564
|
+
command: "bash .claude/hooks/notify.sh",
|
|
565
|
+
timeout: 10
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
PreCompact: [
|
|
571
|
+
{
|
|
572
|
+
matcher: "",
|
|
573
|
+
hooks: [
|
|
574
|
+
{
|
|
575
|
+
type: "command",
|
|
576
|
+
command: "bash .claude/hooks/pre-compact.sh",
|
|
577
|
+
timeout: 10
|
|
578
|
+
}
|
|
579
|
+
]
|
|
580
|
+
}
|
|
581
|
+
],
|
|
582
|
+
PostCompact: [
|
|
583
|
+
{
|
|
584
|
+
matcher: "",
|
|
585
|
+
hooks: [
|
|
586
|
+
{
|
|
587
|
+
type: "command",
|
|
588
|
+
command: "bash .claude/hooks/post-compact.sh",
|
|
589
|
+
timeout: 10
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
Stop: [
|
|
595
|
+
{
|
|
596
|
+
matcher: "",
|
|
597
|
+
hooks: [
|
|
598
|
+
{
|
|
599
|
+
type: "command",
|
|
600
|
+
command: "bash .claude/hooks/session-stop.sh",
|
|
601
|
+
timeout: 10
|
|
602
|
+
}
|
|
603
|
+
]
|
|
604
|
+
}
|
|
605
|
+
],
|
|
606
|
+
SubagentStart: [
|
|
607
|
+
{
|
|
608
|
+
matcher: "",
|
|
609
|
+
hooks: [
|
|
610
|
+
{
|
|
611
|
+
type: "command",
|
|
612
|
+
command: "bash .claude/hooks/log-agent.sh",
|
|
613
|
+
timeout: 5
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
SubagentStop: [
|
|
619
|
+
{
|
|
620
|
+
matcher: "",
|
|
621
|
+
hooks: [
|
|
622
|
+
{
|
|
623
|
+
type: "command",
|
|
624
|
+
command: "bash .claude/hooks/log-agent-stop.sh",
|
|
625
|
+
timeout: 5
|
|
626
|
+
}
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
]
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
var Installer = class {
|
|
633
|
+
root;
|
|
634
|
+
target;
|
|
635
|
+
claudeDir;
|
|
636
|
+
merged;
|
|
637
|
+
dryRun;
|
|
638
|
+
logs = [];
|
|
639
|
+
shareFrom;
|
|
640
|
+
sharedDirs = [];
|
|
641
|
+
constructor(merged, opts) {
|
|
642
|
+
this.root = opts.contentRoot ?? getPackageRoot();
|
|
643
|
+
this.target = opts.target;
|
|
644
|
+
this.claudeDir = path6.join(opts.target, ".claude");
|
|
645
|
+
this.merged = merged;
|
|
646
|
+
this.dryRun = opts.dryRun;
|
|
647
|
+
this.shareFrom = opts.shareFrom;
|
|
648
|
+
}
|
|
649
|
+
log(msg) {
|
|
650
|
+
this.logs.push(msg);
|
|
651
|
+
console.log(msg);
|
|
652
|
+
}
|
|
653
|
+
run(profileCommand, worktreeMeta) {
|
|
654
|
+
this.backup();
|
|
655
|
+
this.createDirs();
|
|
656
|
+
this.copyHooks();
|
|
657
|
+
this.copySkills();
|
|
658
|
+
this.copyRules();
|
|
659
|
+
this.copyAgents();
|
|
660
|
+
this.copyDocs();
|
|
661
|
+
this.generateSettings();
|
|
662
|
+
if (!this.dryRun) {
|
|
663
|
+
const wt = worktreeMeta && this.sharedDirs.length > 0 ? { ...worktreeMeta, shared_dirs: this.sharedDirs } : worktreeMeta ? { ...worktreeMeta, shared_dirs: [] } : void 0;
|
|
664
|
+
const contentHashes = computeContentHashes(this.claudeDir);
|
|
665
|
+
writeManifest(this.target, this.merged, profileCommand, this.root, {
|
|
666
|
+
worktree: wt,
|
|
667
|
+
contentHashes
|
|
668
|
+
});
|
|
669
|
+
this.log(" [ok] arcane-manifest.json");
|
|
670
|
+
} else {
|
|
671
|
+
this.log(" [dry-run] arcane-manifest.json");
|
|
672
|
+
}
|
|
673
|
+
return this.logs;
|
|
674
|
+
}
|
|
675
|
+
backup() {
|
|
676
|
+
if (!fs5.existsSync(this.claudeDir)) return;
|
|
677
|
+
const backup = path6.join(this.target, ".claude.bak");
|
|
678
|
+
if (this.dryRun) {
|
|
679
|
+
this.log(" [dry-run] Would backup .claude/ -> .claude.bak/");
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
if (fs5.existsSync(backup)) {
|
|
683
|
+
fs5.rmSync(backup, { recursive: true, force: true });
|
|
684
|
+
}
|
|
685
|
+
fs5.renameSync(this.claudeDir, backup);
|
|
686
|
+
this.log(" Backed up .claude/ -> .claude.bak/");
|
|
687
|
+
}
|
|
688
|
+
createDirs() {
|
|
689
|
+
if (this.dryRun) return;
|
|
690
|
+
for (const d of ["skills", "rules", "agents", "docs"]) {
|
|
691
|
+
ensureDir(path6.join(this.claudeDir, d));
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
get hasStatusline() {
|
|
695
|
+
return this.merged.loaded.includes("statusline");
|
|
696
|
+
}
|
|
697
|
+
copyHooks() {
|
|
698
|
+
this.log("\nHooks:");
|
|
699
|
+
const hooksDir = path6.join(this.claudeDir, "hooks");
|
|
700
|
+
if (this.dryRun) {
|
|
701
|
+
if (this.shareFrom) {
|
|
702
|
+
this.log(" [dry-run] hooks/ -> symlink from main worktree");
|
|
703
|
+
} else {
|
|
704
|
+
this.log(" [dry-run] hooks/ -> .claude/hooks/");
|
|
705
|
+
}
|
|
706
|
+
if (this.hasStatusline) this.log(" [dry-run] statusline.sh");
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
if (this.shareFrom) {
|
|
710
|
+
const sharedHooks = path6.join(this.shareFrom, ".claude", "hooks");
|
|
711
|
+
if (fs5.existsSync(sharedHooks)) {
|
|
712
|
+
const result = linkOrCopyDir(sharedHooks, hooksDir, "symlink");
|
|
713
|
+
if (result === "linked") {
|
|
714
|
+
this.sharedDirs.push("hooks");
|
|
715
|
+
this.log(" [ok] hooks/ (shared via symlink)");
|
|
716
|
+
} else {
|
|
717
|
+
this.log(" [ok] hooks/ (copied \u2014 symlink failed)");
|
|
718
|
+
}
|
|
719
|
+
this.copyStatusline();
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
const hooksSrc = path6.join(this.root, "hooks");
|
|
724
|
+
if (fs5.existsSync(hooksSrc)) {
|
|
725
|
+
ensureDir(hooksDir);
|
|
726
|
+
for (const entry of fs5.readdirSync(hooksSrc, { withFileTypes: true })) {
|
|
727
|
+
if (entry.name === "statusline.sh") continue;
|
|
728
|
+
const src = path6.join(hooksSrc, entry.name);
|
|
729
|
+
const dst = path6.join(hooksDir, entry.name);
|
|
730
|
+
if (entry.isDirectory()) {
|
|
731
|
+
copyDirSync(src, dst);
|
|
732
|
+
} else {
|
|
733
|
+
fs5.copyFileSync(src, dst);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
this.log(" [ok] hooks/");
|
|
737
|
+
}
|
|
738
|
+
this.copyStatusline();
|
|
739
|
+
}
|
|
740
|
+
copyStatusline() {
|
|
741
|
+
if (!this.hasStatusline) return;
|
|
742
|
+
const statusline = path6.join(this.root, "hooks", "statusline.sh");
|
|
743
|
+
if (fs5.existsSync(statusline)) {
|
|
744
|
+
fs5.copyFileSync(
|
|
745
|
+
statusline,
|
|
746
|
+
path6.join(this.claudeDir, "statusline.sh")
|
|
747
|
+
);
|
|
748
|
+
this.log(" [ok] statusline.sh (+statusline addon)");
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
copySkills() {
|
|
752
|
+
this.log("\nSkills:");
|
|
753
|
+
for (const skill of this.merged.skills) {
|
|
754
|
+
const src = path6.join(this.root, "skills", skill);
|
|
755
|
+
if (!fs5.existsSync(src)) {
|
|
756
|
+
this.log(` WARN: Skill '${skill}' not found in skills/`);
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
759
|
+
const dst = path6.join(this.claudeDir, "skills", skill);
|
|
760
|
+
if (this.dryRun) {
|
|
761
|
+
this.log(` [dry-run] ${skill}`);
|
|
762
|
+
} else {
|
|
763
|
+
copyDirSync(src, dst);
|
|
764
|
+
this.log(` [ok] ${skill}`);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
const hasGamedev = this.merged.rules.gamedev.length > 0;
|
|
768
|
+
if (hasGamedev) {
|
|
769
|
+
const tplSrc = path6.join(this.root, "templates", "gamedev");
|
|
770
|
+
if (fs5.existsSync(tplSrc)) {
|
|
771
|
+
const tplDst = path6.join(this.claudeDir, "skills", "_templates");
|
|
772
|
+
if (this.dryRun) {
|
|
773
|
+
this.log(" [dry-run] _templates/");
|
|
774
|
+
} else {
|
|
775
|
+
copyDirSync(tplSrc, tplDst);
|
|
776
|
+
this.log(" [ok] _templates/");
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
copyRules() {
|
|
782
|
+
this.log("\nRules:");
|
|
783
|
+
for (const rule of this.merged.rules.universal) {
|
|
784
|
+
const src = path6.join(this.root, "rules", `${rule}.md`);
|
|
785
|
+
if (!fs5.existsSync(src)) {
|
|
786
|
+
this.log(` WARN: Rule '${rule}.md' not found`);
|
|
787
|
+
continue;
|
|
788
|
+
}
|
|
789
|
+
if (this.dryRun) {
|
|
790
|
+
this.log(` [dry-run] ${rule}.md`);
|
|
791
|
+
} else {
|
|
792
|
+
fs5.copyFileSync(
|
|
793
|
+
src,
|
|
794
|
+
path6.join(this.claudeDir, "rules", `${rule}.md`)
|
|
795
|
+
);
|
|
796
|
+
this.log(` [ok] ${rule}.md`);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
for (const rule of this.merged.rules.gamedev) {
|
|
800
|
+
const src = path6.join(this.root, "rules", "gamedev", `${rule}.md`);
|
|
801
|
+
if (!fs5.existsSync(src)) {
|
|
802
|
+
this.log(` WARN: Rule '${rule}.md' not found`);
|
|
803
|
+
continue;
|
|
804
|
+
}
|
|
805
|
+
if (this.dryRun) {
|
|
806
|
+
this.log(` [dry-run] ${rule}.md`);
|
|
807
|
+
} else {
|
|
808
|
+
fs5.copyFileSync(
|
|
809
|
+
src,
|
|
810
|
+
path6.join(this.claudeDir, "rules", `${rule}.md`)
|
|
811
|
+
);
|
|
812
|
+
this.log(` [ok] ${rule}.md`);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
copyAgents() {
|
|
817
|
+
if (this.merged.agents.length === 0) return;
|
|
818
|
+
this.log("\nAgents:");
|
|
819
|
+
for (const agentDir of this.merged.agents) {
|
|
820
|
+
const src = path6.join(this.root, "agents", agentDir);
|
|
821
|
+
if (!fs5.existsSync(src)) {
|
|
822
|
+
this.log(` WARN: Agent dir '${agentDir}' not found`);
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
const dst = path6.join(this.claudeDir, "agents", agentDir);
|
|
826
|
+
if (this.dryRun) {
|
|
827
|
+
this.log(` [dry-run] agents/${agentDir}/`);
|
|
828
|
+
} else {
|
|
829
|
+
copyDirSync(src, dst);
|
|
830
|
+
const count = fs5.readdirSync(dst, { recursive: true }).filter((f) => String(f).endsWith(".md")).length;
|
|
831
|
+
this.log(` [ok] agents/${agentDir}/ (${count} agents)`);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
copyDocs() {
|
|
836
|
+
const docsDir = path6.join(this.claudeDir, "docs");
|
|
837
|
+
const docsSrc = path6.join(this.root, "docs");
|
|
838
|
+
if (!fs5.existsSync(docsSrc)) return;
|
|
839
|
+
this.log("\nDocs:");
|
|
840
|
+
if (this.dryRun) {
|
|
841
|
+
if (this.shareFrom) {
|
|
842
|
+
this.log(" [dry-run] docs/ -> symlink from main worktree");
|
|
843
|
+
} else {
|
|
844
|
+
this.log(" [dry-run] docs/");
|
|
845
|
+
}
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
if (this.shareFrom) {
|
|
849
|
+
const sharedDocs = path6.join(this.shareFrom, ".claude", "docs");
|
|
850
|
+
if (fs5.existsSync(sharedDocs)) {
|
|
851
|
+
const result = linkOrCopyDir(sharedDocs, docsDir, "symlink");
|
|
852
|
+
if (result === "linked") {
|
|
853
|
+
this.sharedDirs.push("docs");
|
|
854
|
+
this.log(" [ok] docs/ (shared via symlink)");
|
|
855
|
+
} else {
|
|
856
|
+
this.log(" [ok] docs/ (copied \u2014 symlink failed)");
|
|
857
|
+
}
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
copyDirSync(docsSrc, docsDir);
|
|
862
|
+
this.log(" [ok] docs/");
|
|
863
|
+
}
|
|
864
|
+
generateSettings() {
|
|
865
|
+
this.log("\nConfig:");
|
|
866
|
+
const settings = JSON.parse(JSON.stringify(SETTINGS_TEMPLATE));
|
|
867
|
+
settings.permissions.allow = [...this.merged.permissions.allow];
|
|
868
|
+
settings.permissions.deny = [...this.merged.permissions.deny];
|
|
869
|
+
if (this.hasStatusline) {
|
|
870
|
+
settings.statusLine = {
|
|
871
|
+
type: "command",
|
|
872
|
+
command: "bash .claude/statusline.sh"
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
if (this.dryRun) {
|
|
876
|
+
this.log(
|
|
877
|
+
` [dry-run] settings.json (${this.merged.permissions.allow.length} allow, ${this.merged.permissions.deny.length} deny)`
|
|
878
|
+
);
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
const settingsPath = path6.join(this.claudeDir, "settings.json");
|
|
882
|
+
fs5.writeFileSync(
|
|
883
|
+
settingsPath,
|
|
884
|
+
JSON.stringify(settings, null, 2) + "\n",
|
|
885
|
+
"utf-8"
|
|
886
|
+
);
|
|
887
|
+
this.log(" [ok] settings.json");
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
function clean(target) {
|
|
891
|
+
const claudeDir = path6.join(target, ".claude");
|
|
892
|
+
const backup = path6.join(target, ".claude.bak");
|
|
893
|
+
if (!fs5.existsSync(claudeDir)) {
|
|
894
|
+
console.log(`No .claude/ found in ${target} \u2014 nothing to clean.`);
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
const manifestFile = path6.join(claudeDir, "arcane-manifest.json");
|
|
898
|
+
if (fs5.existsSync(manifestFile)) {
|
|
899
|
+
const data = JSON.parse(fs5.readFileSync(manifestFile, "utf-8"));
|
|
900
|
+
const profiles = (data.profiles ?? []).filter(
|
|
901
|
+
(p) => p !== "core"
|
|
902
|
+
);
|
|
903
|
+
console.log(` Current profile: ${profiles.join(" + ")}`);
|
|
904
|
+
console.log(` Installed: ${data.installed_at ?? "unknown"}`);
|
|
905
|
+
const shared = data.worktree?.shared_dirs ?? [];
|
|
906
|
+
for (const dir of shared) {
|
|
907
|
+
const p = path6.join(claudeDir, dir);
|
|
908
|
+
if (isSymlinkOrJunction(p)) {
|
|
909
|
+
fs5.unlinkSync(p);
|
|
910
|
+
console.log(` [ok] Unlinked shared ${dir}/`);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
for (const sub of ["hooks", "docs", "skills", "agents", "rules"]) {
|
|
915
|
+
const p = path6.join(claudeDir, sub);
|
|
916
|
+
safeRemove(p);
|
|
917
|
+
}
|
|
918
|
+
const remaining = fs5.readdirSync(claudeDir);
|
|
919
|
+
for (const f of remaining) {
|
|
920
|
+
const p = path6.join(claudeDir, f);
|
|
921
|
+
safeRemove(p);
|
|
922
|
+
}
|
|
923
|
+
if (fs5.existsSync(claudeDir)) {
|
|
924
|
+
fs5.rmSync(claudeDir, { recursive: true, force: true });
|
|
925
|
+
}
|
|
926
|
+
if (fs5.existsSync(backup)) {
|
|
927
|
+
fs5.rmSync(backup, { recursive: true, force: true });
|
|
928
|
+
}
|
|
929
|
+
console.log(`
|
|
930
|
+
[ok] Removed .claude/ from ${target}`);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// src/content-source.ts
|
|
934
|
+
import fs7 from "fs";
|
|
935
|
+
import path8 from "path";
|
|
936
|
+
import os2 from "os";
|
|
937
|
+
|
|
938
|
+
// src/cache.ts
|
|
939
|
+
import fs6 from "fs";
|
|
940
|
+
import path7 from "path";
|
|
941
|
+
import os from "os";
|
|
942
|
+
var ARCANE_DIR = path7.join(os.homedir(), ".arcane");
|
|
943
|
+
var CACHE_DIR = path7.join(ARCANE_DIR, "cache");
|
|
944
|
+
function getCachePath(version) {
|
|
945
|
+
return path7.join(CACHE_DIR, version);
|
|
946
|
+
}
|
|
947
|
+
function isCached(version) {
|
|
948
|
+
const versionDir = getCachePath(version);
|
|
949
|
+
return fs6.existsSync(versionDir) && fs6.existsSync(path7.join(versionDir, ".cache-meta.json"));
|
|
950
|
+
}
|
|
951
|
+
function getCachedContentRoot(version) {
|
|
952
|
+
if (!isCached(version)) return null;
|
|
953
|
+
return getCachePath(version);
|
|
954
|
+
}
|
|
955
|
+
function storeInCache(version, contentDir) {
|
|
956
|
+
const versionDir = getCachePath(version);
|
|
957
|
+
if (fs6.existsSync(versionDir)) {
|
|
958
|
+
fs6.rmSync(versionDir, { recursive: true, force: true });
|
|
959
|
+
}
|
|
960
|
+
fs6.mkdirSync(versionDir, { recursive: true });
|
|
961
|
+
for (const dir of ["skills", "rules", "agents", "hooks", "profiles", "templates", "docs"]) {
|
|
962
|
+
const src = path7.join(contentDir, dir);
|
|
963
|
+
if (fs6.existsSync(src)) {
|
|
964
|
+
copyDirRecursive(src, path7.join(versionDir, dir));
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
const meta = {
|
|
968
|
+
version,
|
|
969
|
+
cached_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
970
|
+
};
|
|
971
|
+
fs6.writeFileSync(
|
|
972
|
+
path7.join(versionDir, ".cache-meta.json"),
|
|
973
|
+
JSON.stringify(meta, null, 2) + "\n"
|
|
974
|
+
);
|
|
975
|
+
return versionDir;
|
|
976
|
+
}
|
|
977
|
+
function pruneCache(keepCount = 3) {
|
|
978
|
+
if (!fs6.existsSync(CACHE_DIR)) return;
|
|
979
|
+
const entries = fs6.readdirSync(CACHE_DIR, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => {
|
|
980
|
+
const metaPath = path7.join(CACHE_DIR, e.name, ".cache-meta.json");
|
|
981
|
+
let cachedAt = 0;
|
|
982
|
+
if (fs6.existsSync(metaPath)) {
|
|
983
|
+
try {
|
|
984
|
+
const meta = JSON.parse(fs6.readFileSync(metaPath, "utf-8"));
|
|
985
|
+
cachedAt = new Date(meta.cached_at).getTime();
|
|
986
|
+
} catch {
|
|
987
|
+
cachedAt = 0;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return { name: e.name, cachedAt };
|
|
991
|
+
}).sort((a, b) => b.cachedAt - a.cachedAt);
|
|
992
|
+
for (const entry of entries.slice(keepCount)) {
|
|
993
|
+
fs6.rmSync(path7.join(CACHE_DIR, entry.name), { recursive: true, force: true });
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
function copyDirRecursive(src, dest) {
|
|
997
|
+
fs6.mkdirSync(dest, { recursive: true });
|
|
998
|
+
for (const entry of fs6.readdirSync(src, { withFileTypes: true })) {
|
|
999
|
+
const srcPath = path7.join(src, entry.name);
|
|
1000
|
+
const destPath = path7.join(dest, entry.name);
|
|
1001
|
+
if (entry.isDirectory()) {
|
|
1002
|
+
copyDirRecursive(srcPath, destPath);
|
|
1003
|
+
} else {
|
|
1004
|
+
fs6.copyFileSync(srcPath, destPath);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
// src/content-source.ts
|
|
1010
|
+
var GITHUB_OWNER = "SebastianLuser";
|
|
1011
|
+
var GITHUB_REPO = "Claude-Code-Arcane";
|
|
1012
|
+
var GITHUB_BRANCH = "main";
|
|
1013
|
+
var BundledContentSource = class {
|
|
1014
|
+
type = "bundled";
|
|
1015
|
+
async getContentRoot() {
|
|
1016
|
+
return getPackageRoot();
|
|
1017
|
+
}
|
|
1018
|
+
async isAvailable() {
|
|
1019
|
+
const root = getPackageRoot();
|
|
1020
|
+
return fs7.existsSync(path8.join(root, "skills"));
|
|
1021
|
+
}
|
|
1022
|
+
async getVersion() {
|
|
1023
|
+
return getPackageVersion();
|
|
1024
|
+
}
|
|
1025
|
+
};
|
|
1026
|
+
var CachedContentSource = class {
|
|
1027
|
+
type = "cache";
|
|
1028
|
+
version;
|
|
1029
|
+
constructor(version) {
|
|
1030
|
+
this.version = version;
|
|
1031
|
+
}
|
|
1032
|
+
async getContentRoot() {
|
|
1033
|
+
const cached = getCachedContentRoot(this.version);
|
|
1034
|
+
if (!cached) throw new Error(`Cache miss for version ${this.version}`);
|
|
1035
|
+
return cached;
|
|
1036
|
+
}
|
|
1037
|
+
async isAvailable() {
|
|
1038
|
+
return isCached(this.version);
|
|
1039
|
+
}
|
|
1040
|
+
async getVersion() {
|
|
1041
|
+
return this.version;
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
var GitHubContentSource = class {
|
|
1045
|
+
type = "github";
|
|
1046
|
+
owner;
|
|
1047
|
+
repo;
|
|
1048
|
+
branch;
|
|
1049
|
+
resolvedVersion = null;
|
|
1050
|
+
constructor(owner = GITHUB_OWNER, repo = GITHUB_REPO, branch = GITHUB_BRANCH) {
|
|
1051
|
+
this.owner = owner;
|
|
1052
|
+
this.repo = repo;
|
|
1053
|
+
this.branch = branch;
|
|
1054
|
+
}
|
|
1055
|
+
async getContentRoot() {
|
|
1056
|
+
const version = await this.getVersion();
|
|
1057
|
+
if (isCached(version)) {
|
|
1058
|
+
return getCachedContentRoot(version);
|
|
1059
|
+
}
|
|
1060
|
+
const tmpDir = fs7.mkdtempSync(path8.join(os2.tmpdir(), "arcane-github-"));
|
|
1061
|
+
try {
|
|
1062
|
+
await this.downloadAndExtract(tmpDir);
|
|
1063
|
+
const contentRoot = storeInCache(version, this.findExtractedRoot(tmpDir));
|
|
1064
|
+
pruneCache(3);
|
|
1065
|
+
return contentRoot;
|
|
1066
|
+
} finally {
|
|
1067
|
+
fs7.rmSync(tmpDir, { recursive: true, force: true });
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
async isAvailable() {
|
|
1071
|
+
try {
|
|
1072
|
+
const response = await fetch(
|
|
1073
|
+
`https://api.github.com/repos/${this.owner}/${this.repo}/commits/${this.branch}`,
|
|
1074
|
+
{
|
|
1075
|
+
method: "HEAD",
|
|
1076
|
+
headers: { "User-Agent": "arcane-cli" },
|
|
1077
|
+
signal: AbortSignal.timeout(5e3)
|
|
1078
|
+
}
|
|
1079
|
+
);
|
|
1080
|
+
return response.ok;
|
|
1081
|
+
} catch {
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
async getVersion() {
|
|
1086
|
+
if (this.resolvedVersion) return this.resolvedVersion;
|
|
1087
|
+
try {
|
|
1088
|
+
const response = await fetch(
|
|
1089
|
+
`https://api.github.com/repos/${this.owner}/${this.repo}/commits/${this.branch}`,
|
|
1090
|
+
{
|
|
1091
|
+
headers: {
|
|
1092
|
+
"User-Agent": "arcane-cli",
|
|
1093
|
+
Accept: "application/vnd.github.v3+json"
|
|
1094
|
+
},
|
|
1095
|
+
signal: AbortSignal.timeout(1e4)
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
if (!response.ok) {
|
|
1099
|
+
throw new Error(`GitHub API returned ${response.status}`);
|
|
1100
|
+
}
|
|
1101
|
+
const data = await response.json();
|
|
1102
|
+
this.resolvedVersion = data.sha.substring(0, 12);
|
|
1103
|
+
return this.resolvedVersion;
|
|
1104
|
+
} catch {
|
|
1105
|
+
this.resolvedVersion = `github-${Date.now()}`;
|
|
1106
|
+
return this.resolvedVersion;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
async downloadAndExtract(destDir) {
|
|
1110
|
+
const tarballUrl = `https://api.github.com/repos/${this.owner}/${this.repo}/tarball/${this.branch}`;
|
|
1111
|
+
const response = await fetch(tarballUrl, {
|
|
1112
|
+
headers: {
|
|
1113
|
+
"User-Agent": "arcane-cli",
|
|
1114
|
+
Accept: "application/vnd.github.v3.tarball"
|
|
1115
|
+
},
|
|
1116
|
+
signal: AbortSignal.timeout(6e4),
|
|
1117
|
+
redirect: "follow"
|
|
1118
|
+
});
|
|
1119
|
+
if (!response.ok || !response.body) {
|
|
1120
|
+
throw new Error(`Failed to download tarball: ${response.status}`);
|
|
1121
|
+
}
|
|
1122
|
+
const tar = await import("tar");
|
|
1123
|
+
const tarballPath = path8.join(destDir, "repo.tar.gz");
|
|
1124
|
+
const fileStream = fs7.createWriteStream(tarballPath);
|
|
1125
|
+
const reader = response.body.getReader();
|
|
1126
|
+
const writable = new WritableStream({
|
|
1127
|
+
write(chunk) {
|
|
1128
|
+
fileStream.write(chunk);
|
|
1129
|
+
},
|
|
1130
|
+
close() {
|
|
1131
|
+
fileStream.end();
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
await reader.read().then(async function process2({ done, value }) {
|
|
1135
|
+
if (done) {
|
|
1136
|
+
fileStream.end();
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
fileStream.write(value);
|
|
1140
|
+
return reader.read().then(process2);
|
|
1141
|
+
});
|
|
1142
|
+
await new Promise((resolve) => fileStream.on("finish", resolve));
|
|
1143
|
+
await tar.extract({
|
|
1144
|
+
file: tarballPath,
|
|
1145
|
+
cwd: destDir
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
findExtractedRoot(tmpDir) {
|
|
1149
|
+
const entries = fs7.readdirSync(tmpDir, { withFileTypes: true });
|
|
1150
|
+
const dirs = entries.filter(
|
|
1151
|
+
(e) => e.isDirectory() && e.name !== "." && e.name !== ".."
|
|
1152
|
+
);
|
|
1153
|
+
if (dirs.length === 1) {
|
|
1154
|
+
return path8.join(tmpDir, dirs[0].name);
|
|
1155
|
+
}
|
|
1156
|
+
return tmpDir;
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
async function resolveContentSource(opts = {}) {
|
|
1160
|
+
const envSource = process.env.ARCANE_SOURCE;
|
|
1161
|
+
const preference = envSource ?? opts.source ?? "auto";
|
|
1162
|
+
const log = opts.quiet ? () => {
|
|
1163
|
+
} : console.log;
|
|
1164
|
+
if (preference === "bundled") {
|
|
1165
|
+
return new BundledContentSource();
|
|
1166
|
+
}
|
|
1167
|
+
if (preference === "github" || preference === "auto") {
|
|
1168
|
+
const github = new GitHubContentSource();
|
|
1169
|
+
if (await github.isAvailable()) {
|
|
1170
|
+
const version = await github.getVersion();
|
|
1171
|
+
if (isCached(version)) {
|
|
1172
|
+
if (!opts.quiet) log(` Source: cache (${version})`);
|
|
1173
|
+
return new CachedContentSource(version);
|
|
1174
|
+
}
|
|
1175
|
+
if (!opts.quiet) log(" Source: github");
|
|
1176
|
+
return github;
|
|
1177
|
+
}
|
|
1178
|
+
if (preference === "github") {
|
|
1179
|
+
throw new Error("GitHub source requested but not available. Check your internet connection.");
|
|
1180
|
+
}
|
|
1181
|
+
const cached = findLatestCache();
|
|
1182
|
+
if (cached) {
|
|
1183
|
+
if (!opts.quiet) log(` Source: cache (${cached}, offline fallback)`);
|
|
1184
|
+
return new CachedContentSource(cached);
|
|
1185
|
+
}
|
|
1186
|
+
if (!opts.quiet) log(" Source: bundled (offline fallback)");
|
|
1187
|
+
return new BundledContentSource();
|
|
1188
|
+
}
|
|
1189
|
+
return new BundledContentSource();
|
|
1190
|
+
}
|
|
1191
|
+
function findLatestCache() {
|
|
1192
|
+
const cacheDir = path8.join(os2.homedir(), ".arcane", "cache");
|
|
1193
|
+
if (!fs7.existsSync(cacheDir)) return null;
|
|
1194
|
+
const entries = fs7.readdirSync(cacheDir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => {
|
|
1195
|
+
const metaPath = path8.join(cacheDir, e.name, ".cache-meta.json");
|
|
1196
|
+
let cachedAt = 0;
|
|
1197
|
+
if (fs7.existsSync(metaPath)) {
|
|
1198
|
+
try {
|
|
1199
|
+
const meta = JSON.parse(fs7.readFileSync(metaPath, "utf-8"));
|
|
1200
|
+
cachedAt = new Date(meta.cached_at).getTime();
|
|
1201
|
+
} catch {
|
|
1202
|
+
cachedAt = 0;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
return { name: e.name, cachedAt };
|
|
1206
|
+
}).sort((a, b) => b.cachedAt - a.cachedAt);
|
|
1207
|
+
return entries.length > 0 ? entries[0].name : null;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
// src/commands/install.ts
|
|
1211
|
+
async function installCommand(profileExpr, opts) {
|
|
1212
|
+
const source = await resolveContentSource({
|
|
1213
|
+
source: opts.source ?? "auto",
|
|
1214
|
+
quiet: !profileExpr
|
|
1215
|
+
});
|
|
1216
|
+
const root = await source.getContentRoot();
|
|
1217
|
+
const profilesDir = path9.join(root, "profiles");
|
|
1218
|
+
const target = path9.resolve(opts.target ?? process.cwd());
|
|
1219
|
+
if (!profileExpr) {
|
|
1220
|
+
const profiles = listProfiles(profilesDir);
|
|
1221
|
+
const bases = profiles.filter((p) => p.type === "base");
|
|
1222
|
+
const addons = profiles.filter((p) => p.type === "addon");
|
|
1223
|
+
console.log(chalk.bold("\nAvailable profiles:\n"));
|
|
1224
|
+
console.log(chalk.cyan(" Base (pick one):"));
|
|
1225
|
+
for (const p of bases) {
|
|
1226
|
+
console.log(` ${chalk.green(p.name.padEnd(20))} ${p.description}`);
|
|
1227
|
+
}
|
|
1228
|
+
console.log(chalk.cyan("\n Addons (combine with +):"));
|
|
1229
|
+
for (const p of addons) {
|
|
1230
|
+
console.log(
|
|
1231
|
+
` ${chalk.green(("+" + p.name).padEnd(20))} ${p.description}`
|
|
1232
|
+
);
|
|
1233
|
+
}
|
|
1234
|
+
console.log(
|
|
1235
|
+
chalk.dim("\n Usage: npx arcane install backend-ts+agile+testing\n")
|
|
1236
|
+
);
|
|
1237
|
+
return;
|
|
1238
|
+
}
|
|
1239
|
+
const profileNames = profileExpr.split("+").filter(Boolean);
|
|
1240
|
+
console.log(
|
|
1241
|
+
chalk.bold(`
|
|
1242
|
+
Installing profile: ${chalk.cyan(profileExpr)}`)
|
|
1243
|
+
);
|
|
1244
|
+
console.log(` Target: ${target}`);
|
|
1245
|
+
const wtInfo = getWorktreeInfo(target);
|
|
1246
|
+
let shareFrom = opts.shareFrom;
|
|
1247
|
+
let worktreeMeta;
|
|
1248
|
+
if (wtInfo?.isWorktree) {
|
|
1249
|
+
console.log(chalk.blue(` Worktree: yes (main: ${wtInfo.mainWorktreePath})`));
|
|
1250
|
+
worktreeMeta = {
|
|
1251
|
+
is_worktree: true,
|
|
1252
|
+
main_worktree: wtInfo.mainWorktreePath
|
|
1253
|
+
};
|
|
1254
|
+
if (!shareFrom && findMainArcaneInstall(wtInfo.mainWorktreePath)) {
|
|
1255
|
+
shareFrom = wtInfo.mainWorktreePath;
|
|
1256
|
+
console.log(
|
|
1257
|
+
chalk.blue(" Sharing: hooks + docs from main worktree")
|
|
1258
|
+
);
|
|
1259
|
+
}
|
|
1260
|
+
} else if (wtInfo) {
|
|
1261
|
+
worktreeMeta = { is_worktree: false, main_worktree: target };
|
|
1262
|
+
}
|
|
1263
|
+
if (opts.dryRun) console.log(chalk.yellow(" Mode: dry-run\n"));
|
|
1264
|
+
const merged = mergeProfiles(profilesDir, profileNames);
|
|
1265
|
+
console.log(` Profiles loaded: ${merged.loaded.join(", ")}`);
|
|
1266
|
+
console.log(` Skills: ${merged.skills.length}`);
|
|
1267
|
+
console.log(
|
|
1268
|
+
` Rules: ${merged.rules.universal.length + merged.rules.gamedev.length}`
|
|
1269
|
+
);
|
|
1270
|
+
console.log(` Agents: ${merged.agents.length}`);
|
|
1271
|
+
const installer = new Installer(merged, {
|
|
1272
|
+
target,
|
|
1273
|
+
dryRun: opts.dryRun ?? false,
|
|
1274
|
+
force: opts.force ?? false,
|
|
1275
|
+
shareFrom,
|
|
1276
|
+
contentRoot: root
|
|
1277
|
+
});
|
|
1278
|
+
installer.run(profileExpr, worktreeMeta);
|
|
1279
|
+
if (!opts.dryRun) {
|
|
1280
|
+
console.log(chalk.green("\n Installation complete."));
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// src/commands/add.ts
|
|
1285
|
+
import fs8 from "fs";
|
|
1286
|
+
import path10 from "path";
|
|
1287
|
+
import chalk2 from "chalk";
|
|
1288
|
+
async function addCommand(items) {
|
|
1289
|
+
const target = process.cwd();
|
|
1290
|
+
const source = await resolveContentSource({ quiet: true });
|
|
1291
|
+
const root = await source.getContentRoot();
|
|
1292
|
+
const manifest = readManifest(target);
|
|
1293
|
+
if (!manifest) {
|
|
1294
|
+
console.error(
|
|
1295
|
+
chalk2.red(
|
|
1296
|
+
"No arcane-manifest.json found. Run `npx arcane install` first."
|
|
1297
|
+
)
|
|
1298
|
+
);
|
|
1299
|
+
process.exit(1);
|
|
1300
|
+
}
|
|
1301
|
+
const added = [];
|
|
1302
|
+
const skipped = [];
|
|
1303
|
+
for (const item of items) {
|
|
1304
|
+
if (item.startsWith("+")) {
|
|
1305
|
+
const profileName = item.slice(1);
|
|
1306
|
+
const profilePath = path10.join(root, "profiles", `${profileName}.yaml`);
|
|
1307
|
+
if (!fs8.existsSync(profilePath)) {
|
|
1308
|
+
console.error(chalk2.red(` Profile '${profileName}' not found`));
|
|
1309
|
+
continue;
|
|
1310
|
+
}
|
|
1311
|
+
const profile = parseProfile(profilePath);
|
|
1312
|
+
for (const skill of profile.skills) {
|
|
1313
|
+
const result = addSkill(root, target, skill, manifest.installed_skills);
|
|
1314
|
+
if (result === "added") added.push(skill);
|
|
1315
|
+
else skipped.push(skill);
|
|
1316
|
+
}
|
|
1317
|
+
if (!manifest.profiles.includes(profileName)) {
|
|
1318
|
+
manifest.profiles.push(profileName);
|
|
1319
|
+
}
|
|
1320
|
+
} else {
|
|
1321
|
+
const result = addSkill(root, target, item, manifest.installed_skills);
|
|
1322
|
+
if (result === "added") added.push(item);
|
|
1323
|
+
else skipped.push(item);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
manifest.installed_skills.push(...added);
|
|
1327
|
+
manifest.total_skills = manifest.installed_skills.length;
|
|
1328
|
+
const merged = {
|
|
1329
|
+
loaded: manifest.profiles,
|
|
1330
|
+
skills: manifest.installed_skills,
|
|
1331
|
+
rules: { universal: manifest.installed_rules, gamedev: [] },
|
|
1332
|
+
agents: manifest.installed_agents,
|
|
1333
|
+
hooks: [],
|
|
1334
|
+
permissions: { allow: [], deny: [] }
|
|
1335
|
+
};
|
|
1336
|
+
writeManifest(target, merged, manifest.profile_command, root);
|
|
1337
|
+
console.log(chalk2.bold(`
|
|
1338
|
+
Added ${added.length} skills:`));
|
|
1339
|
+
for (const s of added) console.log(chalk2.green(` [ok] ${s}`));
|
|
1340
|
+
for (const s of skipped)
|
|
1341
|
+
console.log(chalk2.dim(` [skip] ${s} (already installed)`));
|
|
1342
|
+
}
|
|
1343
|
+
function addSkill(root, target, skill, installed) {
|
|
1344
|
+
if (installed.includes(skill)) return "skipped";
|
|
1345
|
+
const src = path10.join(root, "skills", skill);
|
|
1346
|
+
if (!fs8.existsSync(src)) {
|
|
1347
|
+
console.error(chalk2.red(` Skill '${skill}' not found in skills/`));
|
|
1348
|
+
return "skipped";
|
|
1349
|
+
}
|
|
1350
|
+
const dst = path10.join(target, ".claude", "skills", skill);
|
|
1351
|
+
copyDirSync(src, dst);
|
|
1352
|
+
return "added";
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
// src/commands/remove.ts
|
|
1356
|
+
import fs9 from "fs";
|
|
1357
|
+
import path11 from "path";
|
|
1358
|
+
import chalk3 from "chalk";
|
|
1359
|
+
var CORE_SKILLS = [
|
|
1360
|
+
"commit",
|
|
1361
|
+
"create-pr",
|
|
1362
|
+
"changelog",
|
|
1363
|
+
"check",
|
|
1364
|
+
"code-review",
|
|
1365
|
+
"context-prime",
|
|
1366
|
+
"help",
|
|
1367
|
+
"start",
|
|
1368
|
+
"fix-issue",
|
|
1369
|
+
"hotfix",
|
|
1370
|
+
"brainstorm",
|
|
1371
|
+
"scope-check",
|
|
1372
|
+
"reverse-document",
|
|
1373
|
+
"skill-improve",
|
|
1374
|
+
"skill-test",
|
|
1375
|
+
"tech-debt",
|
|
1376
|
+
"arcane-status",
|
|
1377
|
+
"arcane-list",
|
|
1378
|
+
"arcane-add",
|
|
1379
|
+
"arcane-remove",
|
|
1380
|
+
"arcane-clean"
|
|
1381
|
+
];
|
|
1382
|
+
async function removeCommand(items) {
|
|
1383
|
+
const target = process.cwd();
|
|
1384
|
+
const source = await resolveContentSource({ quiet: true });
|
|
1385
|
+
const root = await source.getContentRoot();
|
|
1386
|
+
const manifest = readManifest(target);
|
|
1387
|
+
if (!manifest) {
|
|
1388
|
+
console.error(
|
|
1389
|
+
chalk3.red(
|
|
1390
|
+
"No arcane-manifest.json found. Run `npx arcane install` first."
|
|
1391
|
+
)
|
|
1392
|
+
);
|
|
1393
|
+
process.exit(1);
|
|
1394
|
+
}
|
|
1395
|
+
const removedSkills = [];
|
|
1396
|
+
const removedAgents = [];
|
|
1397
|
+
const removedProfiles = [];
|
|
1398
|
+
const skipped = [];
|
|
1399
|
+
for (const item of items) {
|
|
1400
|
+
if (item.startsWith("+")) {
|
|
1401
|
+
const profileName = item.slice(1);
|
|
1402
|
+
const result = removeProfile(
|
|
1403
|
+
root,
|
|
1404
|
+
target,
|
|
1405
|
+
profileName,
|
|
1406
|
+
manifest
|
|
1407
|
+
);
|
|
1408
|
+
removedSkills.push(...result.skills);
|
|
1409
|
+
removedAgents.push(...result.agents);
|
|
1410
|
+
if (result.removed) removedProfiles.push(profileName);
|
|
1411
|
+
else skipped.push(item);
|
|
1412
|
+
} else {
|
|
1413
|
+
const result = removeSkill(target, item, manifest);
|
|
1414
|
+
if (result === "removed") removedSkills.push(item);
|
|
1415
|
+
else skipped.push(item);
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
manifest.total_skills = manifest.installed_skills.length;
|
|
1419
|
+
manifest.total_rules = manifest.installed_rules.length;
|
|
1420
|
+
const mp = path11.join(target, ".claude", "arcane-manifest.json");
|
|
1421
|
+
writeJsonSync(mp, manifest);
|
|
1422
|
+
const totalRemoved = removedSkills.length + removedAgents.length + removedProfiles.length;
|
|
1423
|
+
console.log(chalk3.bold(`
|
|
1424
|
+
Removed ${totalRemoved} items:`));
|
|
1425
|
+
for (const p of removedProfiles)
|
|
1426
|
+
console.log(chalk3.magenta(` [ok] +${p} (profile)`));
|
|
1427
|
+
for (const s of removedSkills)
|
|
1428
|
+
console.log(chalk3.green(` [ok] ${s} (skill)`));
|
|
1429
|
+
for (const a of removedAgents)
|
|
1430
|
+
console.log(chalk3.cyan(` [ok] ${a} (agent dir)`));
|
|
1431
|
+
for (const s of skipped)
|
|
1432
|
+
console.log(chalk3.dim(` [skip] ${s}`));
|
|
1433
|
+
}
|
|
1434
|
+
function removeSkill(target, skill, manifest) {
|
|
1435
|
+
if (CORE_SKILLS.includes(skill)) {
|
|
1436
|
+
console.warn(
|
|
1437
|
+
chalk3.yellow(` WARNING: '${skill}' is a core skill. Skipping.`)
|
|
1438
|
+
);
|
|
1439
|
+
return "skipped";
|
|
1440
|
+
}
|
|
1441
|
+
const skillDir = path11.join(target, ".claude", "skills", skill);
|
|
1442
|
+
if (!fs9.existsSync(skillDir)) return "skipped";
|
|
1443
|
+
fs9.rmSync(skillDir, { recursive: true, force: true });
|
|
1444
|
+
manifest.installed_skills = manifest.installed_skills.filter(
|
|
1445
|
+
(s) => s !== skill
|
|
1446
|
+
);
|
|
1447
|
+
return "removed";
|
|
1448
|
+
}
|
|
1449
|
+
function removeProfile(root, target, profileName, manifest) {
|
|
1450
|
+
if (profileName === "core") {
|
|
1451
|
+
console.warn(
|
|
1452
|
+
chalk3.yellow(" WARNING: Cannot remove core profile. Skipping.")
|
|
1453
|
+
);
|
|
1454
|
+
return { removed: false, skills: [], agents: [] };
|
|
1455
|
+
}
|
|
1456
|
+
if (!manifest.profiles.includes(profileName)) {
|
|
1457
|
+
console.warn(
|
|
1458
|
+
chalk3.yellow(` WARNING: Profile '${profileName}' is not installed.`)
|
|
1459
|
+
);
|
|
1460
|
+
return { removed: false, skills: [], agents: [] };
|
|
1461
|
+
}
|
|
1462
|
+
const profilePath = path11.join(root, "profiles", `${profileName}.yaml`);
|
|
1463
|
+
if (!fs9.existsSync(profilePath)) {
|
|
1464
|
+
console.warn(
|
|
1465
|
+
chalk3.yellow(` WARNING: Profile '${profileName}.yaml' not found.`)
|
|
1466
|
+
);
|
|
1467
|
+
return { removed: false, skills: [], agents: [] };
|
|
1468
|
+
}
|
|
1469
|
+
const profile = parseProfile(profilePath);
|
|
1470
|
+
const remainingProfiles = manifest.profiles.filter(
|
|
1471
|
+
(p) => p !== profileName
|
|
1472
|
+
);
|
|
1473
|
+
const sharedSkills = /* @__PURE__ */ new Set();
|
|
1474
|
+
const sharedAgents = /* @__PURE__ */ new Set();
|
|
1475
|
+
const sharedRules = /* @__PURE__ */ new Set();
|
|
1476
|
+
for (const rp of remainingProfiles) {
|
|
1477
|
+
const rpPath = path11.join(root, "profiles", `${rp}.yaml`);
|
|
1478
|
+
if (!fs9.existsSync(rpPath)) continue;
|
|
1479
|
+
const rpDef = parseProfile(rpPath);
|
|
1480
|
+
rpDef.skills.forEach((s) => sharedSkills.add(s));
|
|
1481
|
+
rpDef.agents.forEach((a) => sharedAgents.add(a));
|
|
1482
|
+
rpDef.rules.universal.forEach((r) => sharedRules.add(r));
|
|
1483
|
+
rpDef.rules.gamedev.forEach((r) => sharedRules.add(r));
|
|
1484
|
+
}
|
|
1485
|
+
const removedSkills = [];
|
|
1486
|
+
for (const skill of profile.skills) {
|
|
1487
|
+
if (sharedSkills.has(skill)) continue;
|
|
1488
|
+
if (CORE_SKILLS.includes(skill)) continue;
|
|
1489
|
+
const skillDir = path11.join(target, ".claude", "skills", skill);
|
|
1490
|
+
if (fs9.existsSync(skillDir)) {
|
|
1491
|
+
fs9.rmSync(skillDir, { recursive: true, force: true });
|
|
1492
|
+
removedSkills.push(skill);
|
|
1493
|
+
}
|
|
1494
|
+
manifest.installed_skills = manifest.installed_skills.filter(
|
|
1495
|
+
(s) => s !== skill
|
|
1496
|
+
);
|
|
1497
|
+
}
|
|
1498
|
+
const removedAgents = [];
|
|
1499
|
+
for (const agent of profile.agents) {
|
|
1500
|
+
if (sharedAgents.has(agent)) continue;
|
|
1501
|
+
const agentDir = path11.join(target, ".claude", "agents", agent);
|
|
1502
|
+
if (fs9.existsSync(agentDir)) {
|
|
1503
|
+
fs9.rmSync(agentDir, { recursive: true, force: true });
|
|
1504
|
+
removedAgents.push(agent);
|
|
1505
|
+
}
|
|
1506
|
+
manifest.installed_agents = manifest.installed_agents.filter(
|
|
1507
|
+
(a) => a !== agent
|
|
1508
|
+
);
|
|
1509
|
+
}
|
|
1510
|
+
for (const rule of [
|
|
1511
|
+
...profile.rules.universal,
|
|
1512
|
+
...profile.rules.gamedev
|
|
1513
|
+
]) {
|
|
1514
|
+
if (sharedRules.has(rule)) continue;
|
|
1515
|
+
const ruleFile = path11.join(target, ".claude", "rules", `${rule}.md`);
|
|
1516
|
+
if (fs9.existsSync(ruleFile)) {
|
|
1517
|
+
fs9.rmSync(ruleFile);
|
|
1518
|
+
}
|
|
1519
|
+
manifest.installed_rules = manifest.installed_rules.filter(
|
|
1520
|
+
(r) => r !== rule
|
|
1521
|
+
);
|
|
1522
|
+
}
|
|
1523
|
+
manifest.profiles = remainingProfiles;
|
|
1524
|
+
manifest.profile_command = remainingProfiles.filter((p) => p !== "core").join("+");
|
|
1525
|
+
return { removed: true, skills: removedSkills, agents: removedAgents };
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
// src/commands/list.ts
|
|
1529
|
+
import fs10 from "fs";
|
|
1530
|
+
import path12 from "path";
|
|
1531
|
+
import chalk4 from "chalk";
|
|
1532
|
+
async function listCommand() {
|
|
1533
|
+
const source = await resolveContentSource({ quiet: true });
|
|
1534
|
+
const root = await source.getContentRoot();
|
|
1535
|
+
const profilesDir = path12.join(root, "profiles");
|
|
1536
|
+
const skillsDir = path12.join(root, "skills");
|
|
1537
|
+
const target = process.cwd();
|
|
1538
|
+
const manifest = readManifest(target);
|
|
1539
|
+
const profiles = listProfiles(profilesDir);
|
|
1540
|
+
const bases = profiles.filter((p) => p.type === "base");
|
|
1541
|
+
const addons = profiles.filter((p) => p.type === "addon");
|
|
1542
|
+
const installedSkills = new Set(manifest?.installed_skills ?? []);
|
|
1543
|
+
console.log(chalk4.bold("\n=== Available Profiles ===\n"));
|
|
1544
|
+
console.log(chalk4.cyan("Base:"));
|
|
1545
|
+
for (const p of bases) {
|
|
1546
|
+
const tag = manifest?.profiles.includes(p.name) ? chalk4.green(" [installed]") : "";
|
|
1547
|
+
console.log(
|
|
1548
|
+
` ${chalk4.green(p.name.padEnd(20))} ${p.description}${tag}`
|
|
1549
|
+
);
|
|
1550
|
+
}
|
|
1551
|
+
console.log(chalk4.cyan("\nAddons:"));
|
|
1552
|
+
for (const p of addons) {
|
|
1553
|
+
const tag = manifest?.profiles.includes(p.name) ? chalk4.green(" [installed]") : "";
|
|
1554
|
+
console.log(
|
|
1555
|
+
` ${chalk4.green(("+" + p.name).padEnd(20))} ${p.description}${tag}`
|
|
1556
|
+
);
|
|
1557
|
+
}
|
|
1558
|
+
if (fs10.existsSync(skillsDir)) {
|
|
1559
|
+
const allSkills = fs10.readdirSync(skillsDir, { withFileTypes: true }).filter(
|
|
1560
|
+
(d) => d.isDirectory() && !d.name.startsWith("_") && fs10.existsSync(path12.join(skillsDir, d.name, "SKILL.md"))
|
|
1561
|
+
).map((d) => d.name).sort();
|
|
1562
|
+
console.log(chalk4.bold(`
|
|
1563
|
+
=== Skills (${allSkills.length}) ===
|
|
1564
|
+
`));
|
|
1565
|
+
const cols = 3;
|
|
1566
|
+
for (let i = 0; i < allSkills.length; i += cols) {
|
|
1567
|
+
const row = allSkills.slice(i, i + cols).map((s) => {
|
|
1568
|
+
const tag = installedSkills.has(s) ? chalk4.green("*") : " ";
|
|
1569
|
+
return `${tag} ${s.padEnd(30)}`;
|
|
1570
|
+
});
|
|
1571
|
+
console.log(" " + row.join(""));
|
|
1572
|
+
}
|
|
1573
|
+
if (manifest) {
|
|
1574
|
+
console.log(chalk4.dim("\n * = installed in current project"));
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
// src/commands/status.ts
|
|
1580
|
+
import chalk5 from "chalk";
|
|
1581
|
+
async function statusCommand() {
|
|
1582
|
+
const target = process.cwd();
|
|
1583
|
+
const manifest = readManifest(target);
|
|
1584
|
+
if (!manifest) {
|
|
1585
|
+
console.log(
|
|
1586
|
+
chalk5.yellow("No Arcane installation found in this project.")
|
|
1587
|
+
);
|
|
1588
|
+
console.log(chalk5.dim("Run `npx arcane install <profile>` to install."));
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1591
|
+
const profiles = manifest.profiles.filter((p) => p !== "core");
|
|
1592
|
+
console.log(chalk5.bold("\n=== Arcane Status ===\n"));
|
|
1593
|
+
console.log(` Profiles: ${chalk5.cyan(profiles.join(" + "))}`);
|
|
1594
|
+
console.log(` Installed: ${manifest.installed_at}`);
|
|
1595
|
+
console.log(` Version: ${manifest.arcane_version}`);
|
|
1596
|
+
console.log(` CLI: ${manifest.cli}`);
|
|
1597
|
+
console.log(` Source: ${chalk5.dim(manifest.source)}`);
|
|
1598
|
+
if (manifest.worktree) {
|
|
1599
|
+
const wt = manifest.worktree;
|
|
1600
|
+
console.log(
|
|
1601
|
+
` Worktree: ${wt.is_worktree ? chalk5.blue("yes") : "no"} (main: ${chalk5.dim(wt.main_worktree)})`
|
|
1602
|
+
);
|
|
1603
|
+
if (wt.shared_dirs.length > 0) {
|
|
1604
|
+
console.log(
|
|
1605
|
+
` Shared: ${chalk5.blue(wt.shared_dirs.join(", "))} (symlinked)`
|
|
1606
|
+
);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
console.log(chalk5.bold(`
|
|
1610
|
+
Skills (${manifest.total_skills}):`));
|
|
1611
|
+
const skills = manifest.installed_skills ?? [];
|
|
1612
|
+
for (let i = 0; i < skills.length; i += 5) {
|
|
1613
|
+
const row = skills.slice(i, i + 5).map((s) => s.padEnd(25)).join("");
|
|
1614
|
+
console.log(` ${row}`);
|
|
1615
|
+
}
|
|
1616
|
+
console.log(chalk5.bold(`
|
|
1617
|
+
Rules (${manifest.total_rules}):`));
|
|
1618
|
+
const rules = manifest.installed_rules ?? [];
|
|
1619
|
+
console.log(` ${rules.join(", ")}`);
|
|
1620
|
+
console.log(chalk5.bold("\n Agents:"));
|
|
1621
|
+
const agents = manifest.installed_agents ?? [];
|
|
1622
|
+
console.log(` ${agents.join(", ")}`);
|
|
1623
|
+
console.log();
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
// src/commands/update.ts
|
|
1627
|
+
import fs11 from "fs";
|
|
1628
|
+
import path13 from "path";
|
|
1629
|
+
import chalk6 from "chalk";
|
|
1630
|
+
async function updateCommand(opts) {
|
|
1631
|
+
const target = process.cwd();
|
|
1632
|
+
const manifest = readManifest(target);
|
|
1633
|
+
if (!manifest) {
|
|
1634
|
+
if (!opts.quiet) {
|
|
1635
|
+
console.log(chalk6.red("No Arcane installation found. Run 'arcane install' first."));
|
|
1636
|
+
}
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
const contentSource = await resolveContentSource({
|
|
1640
|
+
source: opts.source ?? "auto",
|
|
1641
|
+
quiet: opts.quiet
|
|
1642
|
+
});
|
|
1643
|
+
const root = await contentSource.getContentRoot();
|
|
1644
|
+
const currentVersion = await contentSource.getVersion();
|
|
1645
|
+
const installedVersion = manifest.source_version ?? manifest.arcane_version;
|
|
1646
|
+
if (installedVersion === currentVersion && !opts.force) {
|
|
1647
|
+
if (!opts.quiet) {
|
|
1648
|
+
console.log(chalk6.green(`Already up to date (v${currentVersion}).`));
|
|
1649
|
+
}
|
|
1650
|
+
return;
|
|
1651
|
+
}
|
|
1652
|
+
if (!opts.quiet) {
|
|
1653
|
+
console.log(
|
|
1654
|
+
chalk6.bold(`
|
|
1655
|
+
Update available: ${chalk6.red(installedVersion)} -> ${chalk6.green(currentVersion)}`)
|
|
1656
|
+
);
|
|
1657
|
+
}
|
|
1658
|
+
const profileNames = manifest.profile_command.split("+").filter(Boolean);
|
|
1659
|
+
const profilesDir = path13.join(root, "profiles");
|
|
1660
|
+
const merged = mergeProfiles(profilesDir, profileNames);
|
|
1661
|
+
const allRules = [...merged.rules.universal, ...merged.rules.gamedev];
|
|
1662
|
+
const sourceHashes = computeSourceHashes(root, merged.skills, allRules, merged.agents);
|
|
1663
|
+
const claudeDir = path13.join(target, ".claude");
|
|
1664
|
+
const installedHashes = computeContentHashes(claudeDir);
|
|
1665
|
+
const items = computeUpdatePlan(
|
|
1666
|
+
manifest.content_hashes ?? null,
|
|
1667
|
+
installedHashes,
|
|
1668
|
+
sourceHashes
|
|
1669
|
+
);
|
|
1670
|
+
const updates = items.filter((i) => i.action === "update" || i.action === "add" || i.action === "conflict");
|
|
1671
|
+
const skipped = items.filter((i) => i.action === "skip-customized" || i.action === "skip-unchanged");
|
|
1672
|
+
const removed = items.filter((i) => i.action === "remove");
|
|
1673
|
+
if (!opts.quiet) {
|
|
1674
|
+
printUpdateSummary(items, opts.dryRun ?? false);
|
|
1675
|
+
}
|
|
1676
|
+
if (updates.length === 0 && removed.length === 0) {
|
|
1677
|
+
if (!opts.quiet) {
|
|
1678
|
+
console.log(chalk6.green("\nNo changes to apply."));
|
|
1679
|
+
}
|
|
1680
|
+
return;
|
|
1681
|
+
}
|
|
1682
|
+
if (opts.dryRun) {
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1685
|
+
applyUpdates(items, root, claudeDir, merged, opts.force ?? false);
|
|
1686
|
+
const newHashes = computeContentHashes(claudeDir);
|
|
1687
|
+
updateManifestFields(target, {
|
|
1688
|
+
arcane_version: currentVersion,
|
|
1689
|
+
source_version: currentVersion,
|
|
1690
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z"),
|
|
1691
|
+
content_hashes: newHashes,
|
|
1692
|
+
installed_skills: merged.skills,
|
|
1693
|
+
installed_rules: allRules,
|
|
1694
|
+
installed_agents: merged.agents,
|
|
1695
|
+
total_skills: merged.skills.length,
|
|
1696
|
+
total_rules: allRules.length
|
|
1697
|
+
});
|
|
1698
|
+
if (!opts.quiet) {
|
|
1699
|
+
console.log(chalk6.green(`
|
|
1700
|
+
Updated to v${currentVersion}.`));
|
|
1701
|
+
console.log(` ${updates.length} updated, ${skipped.length} skipped, ${removed.length} removed`);
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
function computeUpdatePlan(manifestHashes, installedHashes, sourceHashes) {
|
|
1705
|
+
const items = [];
|
|
1706
|
+
for (const contentType of ["skills", "rules", "agents", "hooks"]) {
|
|
1707
|
+
const itemType = contentType === "skills" ? "skill" : contentType === "rules" ? "rule" : contentType === "agents" ? "agent" : "hook";
|
|
1708
|
+
const manifest = manifestHashes?.[contentType] ?? {};
|
|
1709
|
+
const installed = installedHashes[contentType];
|
|
1710
|
+
const source = sourceHashes[contentType];
|
|
1711
|
+
const allKeys = /* @__PURE__ */ new Set([
|
|
1712
|
+
...Object.keys(manifest),
|
|
1713
|
+
...Object.keys(installed),
|
|
1714
|
+
...Object.keys(source)
|
|
1715
|
+
]);
|
|
1716
|
+
for (const key of allKeys) {
|
|
1717
|
+
const mHash = manifest[key] ?? null;
|
|
1718
|
+
const iHash = installed[key] ?? null;
|
|
1719
|
+
const sHash = source[key] ?? null;
|
|
1720
|
+
const action = resolveAction(mHash, iHash, sHash);
|
|
1721
|
+
if (action) {
|
|
1722
|
+
items.push({ type: itemType, name: key, action });
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
return items;
|
|
1727
|
+
}
|
|
1728
|
+
function resolveAction(manifestHash, installedHash, sourceHash) {
|
|
1729
|
+
if (!sourceHash && !installedHash) return null;
|
|
1730
|
+
if (sourceHash && !installedHash) return "add";
|
|
1731
|
+
if (!sourceHash && installedHash) return "remove";
|
|
1732
|
+
if (!manifestHash) {
|
|
1733
|
+
if (installedHash === sourceHash) return "skip-unchanged";
|
|
1734
|
+
return "update";
|
|
1735
|
+
}
|
|
1736
|
+
if (manifestHash === installedHash && installedHash === sourceHash) return "skip-unchanged";
|
|
1737
|
+
if (manifestHash === installedHash && sourceHash !== installedHash) return "update";
|
|
1738
|
+
if (manifestHash !== installedHash && manifestHash === sourceHash) return "skip-customized";
|
|
1739
|
+
if (manifestHash !== installedHash && installedHash === sourceHash) return "skip-unchanged";
|
|
1740
|
+
return "conflict";
|
|
1741
|
+
}
|
|
1742
|
+
function printUpdateSummary(items, isDryRun) {
|
|
1743
|
+
const prefix = isDryRun ? chalk6.yellow("[dry-run] ") : "";
|
|
1744
|
+
const updates = items.filter((i) => i.action === "update");
|
|
1745
|
+
const adds = items.filter((i) => i.action === "add");
|
|
1746
|
+
const conflicts = items.filter((i) => i.action === "conflict");
|
|
1747
|
+
const customized = items.filter((i) => i.action === "skip-customized");
|
|
1748
|
+
const removed = items.filter((i) => i.action === "remove");
|
|
1749
|
+
if (updates.length > 0) {
|
|
1750
|
+
console.log(`
|
|
1751
|
+
${prefix}${chalk6.cyan("Will update:")}`);
|
|
1752
|
+
for (const item of updates) {
|
|
1753
|
+
console.log(` ${chalk6.green("~")} ${item.type}: ${item.name}`);
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
if (adds.length > 0) {
|
|
1757
|
+
console.log(`
|
|
1758
|
+
${prefix}${chalk6.cyan("Will add:")}`);
|
|
1759
|
+
for (const item of adds) {
|
|
1760
|
+
console.log(` ${chalk6.green("+")} ${item.type}: ${item.name}`);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
if (removed.length > 0) {
|
|
1764
|
+
console.log(`
|
|
1765
|
+
${prefix}${chalk6.cyan("Will remove:")}`);
|
|
1766
|
+
for (const item of removed) {
|
|
1767
|
+
console.log(` ${chalk6.red("-")} ${item.type}: ${item.name}`);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
if (conflicts.length > 0) {
|
|
1771
|
+
console.log(`
|
|
1772
|
+
${prefix}${chalk6.yellow("Conflicts (will backup + update):")}`);
|
|
1773
|
+
for (const item of conflicts) {
|
|
1774
|
+
console.log(` ${chalk6.yellow("!")} ${item.type}: ${item.name}`);
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
if (customized.length > 0) {
|
|
1778
|
+
console.log(`
|
|
1779
|
+
${prefix}${chalk6.dim("Skipped (locally customized):")}`);
|
|
1780
|
+
for (const item of customized) {
|
|
1781
|
+
console.log(` ${chalk6.dim(" " + item.type + ": " + item.name)}`);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
function applyUpdates(items, root, claudeDir, merged, force) {
|
|
1786
|
+
for (const item of items) {
|
|
1787
|
+
if (item.action === "skip-unchanged" || item.action === "skip-customized") {
|
|
1788
|
+
if (item.action === "skip-customized" && force) {
|
|
1789
|
+
applyItem(item, root, claudeDir);
|
|
1790
|
+
}
|
|
1791
|
+
continue;
|
|
1792
|
+
}
|
|
1793
|
+
if (item.action === "conflict") {
|
|
1794
|
+
backupItem(item, claudeDir);
|
|
1795
|
+
applyItem(item, root, claudeDir);
|
|
1796
|
+
continue;
|
|
1797
|
+
}
|
|
1798
|
+
if (item.action === "update" || item.action === "add") {
|
|
1799
|
+
applyItem(item, root, claudeDir);
|
|
1800
|
+
continue;
|
|
1801
|
+
}
|
|
1802
|
+
if (item.action === "remove") {
|
|
1803
|
+
removeItem(item, claudeDir);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
function applyItem(item, root, claudeDir) {
|
|
1808
|
+
const src = getSourcePath(item, root);
|
|
1809
|
+
const dst = getInstalledPath(item, claudeDir);
|
|
1810
|
+
if (!src || !fs11.existsSync(src)) return;
|
|
1811
|
+
if (item.type === "skill" || item.type === "agent") {
|
|
1812
|
+
if (fs11.existsSync(dst)) {
|
|
1813
|
+
fs11.rmSync(dst, { recursive: true, force: true });
|
|
1814
|
+
}
|
|
1815
|
+
copyDirSync(src, dst);
|
|
1816
|
+
} else {
|
|
1817
|
+
const dir = path13.dirname(dst);
|
|
1818
|
+
if (!fs11.existsSync(dir)) {
|
|
1819
|
+
fs11.mkdirSync(dir, { recursive: true });
|
|
1820
|
+
}
|
|
1821
|
+
fs11.copyFileSync(src, dst);
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
function backupItem(item, claudeDir) {
|
|
1825
|
+
const installed = getInstalledPath(item, claudeDir);
|
|
1826
|
+
if (!fs11.existsSync(installed)) return;
|
|
1827
|
+
const backupPath = installed + ".bak";
|
|
1828
|
+
if (fs11.existsSync(backupPath)) {
|
|
1829
|
+
fs11.rmSync(backupPath, { recursive: true, force: true });
|
|
1830
|
+
}
|
|
1831
|
+
fs11.renameSync(installed, backupPath);
|
|
1832
|
+
}
|
|
1833
|
+
function removeItem(item, claudeDir) {
|
|
1834
|
+
const installed = getInstalledPath(item, claudeDir);
|
|
1835
|
+
if (fs11.existsSync(installed)) {
|
|
1836
|
+
fs11.rmSync(installed, { recursive: true, force: true });
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
function getSourcePath(item, root) {
|
|
1840
|
+
switch (item.type) {
|
|
1841
|
+
case "skill":
|
|
1842
|
+
return path13.join(root, "skills", item.name);
|
|
1843
|
+
case "rule": {
|
|
1844
|
+
const direct = path13.join(root, "rules", item.name);
|
|
1845
|
+
if (fs11.existsSync(direct)) return direct;
|
|
1846
|
+
return path13.join(root, "rules", "gamedev", item.name);
|
|
1847
|
+
}
|
|
1848
|
+
case "agent":
|
|
1849
|
+
return path13.join(root, "agents", item.name);
|
|
1850
|
+
case "hook":
|
|
1851
|
+
return path13.join(root, "hooks", item.name);
|
|
1852
|
+
default:
|
|
1853
|
+
return null;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
function getInstalledPath(item, claudeDir) {
|
|
1857
|
+
switch (item.type) {
|
|
1858
|
+
case "skill":
|
|
1859
|
+
return path13.join(claudeDir, "skills", item.name);
|
|
1860
|
+
case "rule":
|
|
1861
|
+
return path13.join(claudeDir, "rules", item.name);
|
|
1862
|
+
case "agent":
|
|
1863
|
+
return path13.join(claudeDir, "agents", item.name);
|
|
1864
|
+
case "hook":
|
|
1865
|
+
return path13.join(claudeDir, "hooks", item.name);
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
// src/commands/clean.ts
|
|
1870
|
+
import chalk7 from "chalk";
|
|
1871
|
+
async function cleanCommand(opts) {
|
|
1872
|
+
const target = process.cwd();
|
|
1873
|
+
const manifest = readManifest(target);
|
|
1874
|
+
if (!manifest) {
|
|
1875
|
+
console.log(chalk7.yellow("No Arcane installation found."));
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
console.log(chalk7.bold("\nThis will remove:"));
|
|
1879
|
+
console.log(` - ${manifest.total_skills} skills in .claude/skills/`);
|
|
1880
|
+
console.log(` - ${manifest.total_rules} rules in .claude/rules/`);
|
|
1881
|
+
console.log(
|
|
1882
|
+
` - ${manifest.installed_agents?.length ?? 0} agent dirs in .claude/agents/`
|
|
1883
|
+
);
|
|
1884
|
+
console.log(" - hooks/ directory");
|
|
1885
|
+
console.log(" - settings.json");
|
|
1886
|
+
console.log(" - arcane-manifest.json");
|
|
1887
|
+
if (!opts.force) {
|
|
1888
|
+
console.log(
|
|
1889
|
+
chalk7.yellow("\n Pass --force to confirm removal.\n")
|
|
1890
|
+
);
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
clean(target);
|
|
1894
|
+
console.log(
|
|
1895
|
+
chalk7.green("\n Run `npx arcane install` to reinstall.\n")
|
|
1896
|
+
);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
// src/commands/worktree.ts
|
|
1900
|
+
import fs12 from "fs";
|
|
1901
|
+
import path14 from "path";
|
|
1902
|
+
import { execSync as execSync2 } from "child_process";
|
|
1903
|
+
import chalk8 from "chalk";
|
|
1904
|
+
async function worktreeCommand(branch, opts) {
|
|
1905
|
+
const cwd = process.cwd();
|
|
1906
|
+
const wtInfo = getWorktreeInfo(cwd);
|
|
1907
|
+
if (!wtInfo) {
|
|
1908
|
+
console.error(chalk8.red("Not a git repository."));
|
|
1909
|
+
process.exit(1);
|
|
1910
|
+
}
|
|
1911
|
+
const repoRoot = wtInfo.isWorktree ? wtInfo.mainWorktreePath : cwd;
|
|
1912
|
+
const worktreePath = opts.path ? path14.resolve(opts.path) : defaultWorktreePath(repoRoot, branch);
|
|
1913
|
+
if (fs12.existsSync(worktreePath)) {
|
|
1914
|
+
console.error(
|
|
1915
|
+
chalk8.red(`Path already exists: ${worktreePath}`)
|
|
1916
|
+
);
|
|
1917
|
+
process.exit(1);
|
|
1918
|
+
}
|
|
1919
|
+
let profileExpr = opts.profile;
|
|
1920
|
+
if (!profileExpr) {
|
|
1921
|
+
const manifest = readManifest(cwd);
|
|
1922
|
+
if (manifest) {
|
|
1923
|
+
profileExpr = manifest.profile_command;
|
|
1924
|
+
console.log(
|
|
1925
|
+
chalk8.dim(
|
|
1926
|
+
` Inheriting profile from current installation: ${profileExpr}`
|
|
1927
|
+
)
|
|
1928
|
+
);
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
if (!profileExpr) {
|
|
1932
|
+
console.error(
|
|
1933
|
+
chalk8.red(
|
|
1934
|
+
"No profile specified and no existing installation to inherit from.\nUse --profile to specify one: npx arcane worktree feat/api --profile backend-ts+agile"
|
|
1935
|
+
)
|
|
1936
|
+
);
|
|
1937
|
+
process.exit(1);
|
|
1938
|
+
}
|
|
1939
|
+
console.log(chalk8.bold("\nCreating worktree:"));
|
|
1940
|
+
console.log(` Branch: ${chalk8.cyan(branch)}`);
|
|
1941
|
+
console.log(` Path: ${worktreePath}`);
|
|
1942
|
+
console.log(` Profile: ${chalk8.green(profileExpr)}`);
|
|
1943
|
+
if (opts.base) console.log(` Base: ${opts.base}`);
|
|
1944
|
+
if (opts.dryRun) {
|
|
1945
|
+
console.log(chalk8.yellow("\n [dry-run] Would create worktree and install Arcane."));
|
|
1946
|
+
return;
|
|
1947
|
+
}
|
|
1948
|
+
console.log("\n Creating git worktree...");
|
|
1949
|
+
try {
|
|
1950
|
+
createGitWorktree(repoRoot, worktreePath, branch, opts.base);
|
|
1951
|
+
console.log(chalk8.green(" [ok] Git worktree created"));
|
|
1952
|
+
} catch (err) {
|
|
1953
|
+
console.error(
|
|
1954
|
+
chalk8.red(` Failed to create worktree: ${err.message}`)
|
|
1955
|
+
);
|
|
1956
|
+
process.exit(1);
|
|
1957
|
+
}
|
|
1958
|
+
console.log(" Installing Arcane...");
|
|
1959
|
+
const root = getPackageRoot();
|
|
1960
|
+
const profilesDir = path14.join(root, "profiles");
|
|
1961
|
+
const profileNames = profileExpr.split("+").filter(Boolean);
|
|
1962
|
+
const merged = mergeProfiles(profilesDir, profileNames);
|
|
1963
|
+
const shareFrom = opts.share !== false ? cwd : void 0;
|
|
1964
|
+
const installer = new Installer(merged, {
|
|
1965
|
+
target: worktreePath,
|
|
1966
|
+
dryRun: false,
|
|
1967
|
+
force: true,
|
|
1968
|
+
shareFrom
|
|
1969
|
+
});
|
|
1970
|
+
installer.run(profileExpr, {
|
|
1971
|
+
is_worktree: true,
|
|
1972
|
+
main_worktree: repoRoot
|
|
1973
|
+
});
|
|
1974
|
+
console.log(chalk8.green(" [ok] Arcane installed"));
|
|
1975
|
+
if (opts.installDeps) {
|
|
1976
|
+
const pm = detectPackageManager(worktreePath);
|
|
1977
|
+
if (pm) {
|
|
1978
|
+
console.log(` Running ${pm.command}...`);
|
|
1979
|
+
try {
|
|
1980
|
+
execSync2(pm.command, {
|
|
1981
|
+
cwd: worktreePath,
|
|
1982
|
+
encoding: "utf-8",
|
|
1983
|
+
stdio: "pipe",
|
|
1984
|
+
timeout: 12e4
|
|
1985
|
+
});
|
|
1986
|
+
console.log(chalk8.green(` [ok] Dependencies installed`));
|
|
1987
|
+
} catch {
|
|
1988
|
+
console.warn(
|
|
1989
|
+
chalk8.yellow(" WARN: Dependency install failed. Run manually.")
|
|
1990
|
+
);
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
if (opts.isolate) {
|
|
1995
|
+
const isolateScript = path14.join(
|
|
1996
|
+
worktreePath,
|
|
1997
|
+
".claude",
|
|
1998
|
+
"skills",
|
|
1999
|
+
"worktree-isolation"
|
|
2000
|
+
);
|
|
2001
|
+
if (fs12.existsSync(isolateScript)) {
|
|
2002
|
+
console.log(" Applying worktree isolation...");
|
|
2003
|
+
try {
|
|
2004
|
+
execSync2(
|
|
2005
|
+
"python3 scripts/apply.py --cwd . --verbose --force",
|
|
2006
|
+
{
|
|
2007
|
+
cwd: isolateScript,
|
|
2008
|
+
encoding: "utf-8",
|
|
2009
|
+
stdio: "pipe",
|
|
2010
|
+
timeout: 3e4
|
|
2011
|
+
}
|
|
2012
|
+
);
|
|
2013
|
+
console.log(chalk8.green(" [ok] Worktree isolation applied"));
|
|
2014
|
+
} catch {
|
|
2015
|
+
console.warn(
|
|
2016
|
+
chalk8.yellow(
|
|
2017
|
+
" WARN: Worktree isolation failed. Run /worktree-isolation manually."
|
|
2018
|
+
)
|
|
2019
|
+
);
|
|
2020
|
+
}
|
|
2021
|
+
} else {
|
|
2022
|
+
console.warn(
|
|
2023
|
+
chalk8.yellow(
|
|
2024
|
+
" WARN: worktree-isolation skill not installed. Add it with: npx arcane add worktree-isolation"
|
|
2025
|
+
)
|
|
2026
|
+
);
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
console.log(chalk8.bold.green("\nWorktree ready:"));
|
|
2030
|
+
console.log(` ${chalk8.cyan(`cd ${worktreePath}`)}`);
|
|
2031
|
+
console.log(` ${chalk8.dim("claude")}
|
|
2032
|
+
`);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
// src/commands/global.ts
|
|
2036
|
+
import fs13 from "fs";
|
|
2037
|
+
import path15 from "path";
|
|
2038
|
+
import os3 from "os";
|
|
2039
|
+
import chalk9 from "chalk";
|
|
2040
|
+
var CLAUDE_HOME = path15.join(os3.homedir(), ".claude");
|
|
2041
|
+
var SCRIPTS_DIR = path15.join(CLAUDE_HOME, "scripts", "worktree-isolation");
|
|
2042
|
+
var SETTINGS_PATH = path15.join(CLAUDE_HOME, "settings.json");
|
|
2043
|
+
async function globalCommand(opts) {
|
|
2044
|
+
if (opts.status) {
|
|
2045
|
+
showStatus();
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
if (opts.remove) {
|
|
2049
|
+
removeGlobal();
|
|
2050
|
+
return;
|
|
2051
|
+
}
|
|
2052
|
+
installGlobal();
|
|
2053
|
+
}
|
|
2054
|
+
function showStatus() {
|
|
2055
|
+
console.log(chalk9.bold("\n=== Arcane Global Status ===\n"));
|
|
2056
|
+
const hasScripts = fs13.existsSync(
|
|
2057
|
+
path15.join(SCRIPTS_DIR, "apply.py")
|
|
2058
|
+
);
|
|
2059
|
+
console.log(
|
|
2060
|
+
` Worktree scripts: ${hasScripts ? chalk9.green("installed") : chalk9.dim("not installed")}`
|
|
2061
|
+
);
|
|
2062
|
+
if (hasScripts) {
|
|
2063
|
+
console.log(` ${chalk9.dim(SCRIPTS_DIR)}`);
|
|
2064
|
+
}
|
|
2065
|
+
const hookInstalled = isHookInstalled();
|
|
2066
|
+
console.log(
|
|
2067
|
+
` SessionStart hook: ${hookInstalled ? chalk9.green("active") : chalk9.dim("not configured")}`
|
|
2068
|
+
);
|
|
2069
|
+
console.log(` ${chalk9.dim(SETTINGS_PATH)}`);
|
|
2070
|
+
console.log();
|
|
2071
|
+
}
|
|
2072
|
+
function installGlobal() {
|
|
2073
|
+
console.log(chalk9.bold("\nInstalling Arcane global hooks...\n"));
|
|
2074
|
+
const root = getPackageRoot();
|
|
2075
|
+
const scriptsSrc = path15.join(
|
|
2076
|
+
root,
|
|
2077
|
+
"skills",
|
|
2078
|
+
"worktree-isolation",
|
|
2079
|
+
"scripts"
|
|
2080
|
+
);
|
|
2081
|
+
if (!fs13.existsSync(scriptsSrc)) {
|
|
2082
|
+
console.error(
|
|
2083
|
+
chalk9.red(" worktree-isolation scripts not found in package.")
|
|
2084
|
+
);
|
|
2085
|
+
process.exit(1);
|
|
2086
|
+
}
|
|
2087
|
+
fs13.mkdirSync(SCRIPTS_DIR, { recursive: true });
|
|
2088
|
+
for (const file of ["apply.py", "lib.py"]) {
|
|
2089
|
+
const src = path15.join(scriptsSrc, file);
|
|
2090
|
+
const dst = path15.join(SCRIPTS_DIR, file);
|
|
2091
|
+
if (!fs13.existsSync(src)) {
|
|
2092
|
+
console.warn(chalk9.yellow(` WARN: ${file} not found, skipping`));
|
|
2093
|
+
continue;
|
|
2094
|
+
}
|
|
2095
|
+
if (fs13.existsSync(dst) && fs13.readFileSync(src).equals(fs13.readFileSync(dst))) {
|
|
2096
|
+
console.log(chalk9.dim(` [skip] ${file} (already up-to-date)`));
|
|
2097
|
+
} else {
|
|
2098
|
+
fs13.copyFileSync(src, dst);
|
|
2099
|
+
if (process.platform !== "win32") {
|
|
2100
|
+
fs13.chmodSync(dst, 493);
|
|
2101
|
+
}
|
|
2102
|
+
console.log(chalk9.green(` [ok] ${file} -> ${SCRIPTS_DIR}`));
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
if (isHookInstalled()) {
|
|
2106
|
+
console.log(
|
|
2107
|
+
chalk9.dim(" [skip] SessionStart hook (already configured)")
|
|
2108
|
+
);
|
|
2109
|
+
} else {
|
|
2110
|
+
addHookToSettings();
|
|
2111
|
+
console.log(
|
|
2112
|
+
chalk9.green(" [ok] SessionStart hook added to ~/.claude/settings.json")
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
2115
|
+
console.log(chalk9.bold.green("\n Global hooks installed."));
|
|
2116
|
+
console.log(
|
|
2117
|
+
chalk9.dim(
|
|
2118
|
+
" Worktree isolation will auto-apply on every new Claude Code session.\n"
|
|
2119
|
+
)
|
|
2120
|
+
);
|
|
2121
|
+
}
|
|
2122
|
+
function removeGlobal() {
|
|
2123
|
+
console.log(chalk9.bold("\nRemoving Arcane global hooks...\n"));
|
|
2124
|
+
if (fs13.existsSync(SCRIPTS_DIR)) {
|
|
2125
|
+
fs13.rmSync(SCRIPTS_DIR, { recursive: true, force: true });
|
|
2126
|
+
console.log(chalk9.green(" [ok] Removed worktree-isolation scripts"));
|
|
2127
|
+
} else {
|
|
2128
|
+
console.log(chalk9.dim(" [skip] Scripts not found"));
|
|
2129
|
+
}
|
|
2130
|
+
if (isHookInstalled()) {
|
|
2131
|
+
removeHookFromSettings();
|
|
2132
|
+
console.log(chalk9.green(" [ok] Removed SessionStart hook"));
|
|
2133
|
+
} else {
|
|
2134
|
+
console.log(chalk9.dim(" [skip] Hook not configured"));
|
|
2135
|
+
}
|
|
2136
|
+
console.log(chalk9.bold.green("\n Global hooks removed.\n"));
|
|
2137
|
+
}
|
|
2138
|
+
function readSettings() {
|
|
2139
|
+
if (!fs13.existsSync(SETTINGS_PATH)) return {};
|
|
2140
|
+
try {
|
|
2141
|
+
return JSON.parse(fs13.readFileSync(SETTINGS_PATH, "utf-8"));
|
|
2142
|
+
} catch {
|
|
2143
|
+
return {};
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
function writeSettings(settings) {
|
|
2147
|
+
fs13.mkdirSync(path15.dirname(SETTINGS_PATH), { recursive: true });
|
|
2148
|
+
fs13.writeFileSync(
|
|
2149
|
+
SETTINGS_PATH,
|
|
2150
|
+
JSON.stringify(settings, null, 2) + "\n",
|
|
2151
|
+
"utf-8"
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
function isHookInstalled() {
|
|
2155
|
+
const settings = readSettings();
|
|
2156
|
+
const hooks = settings.hooks ?? {};
|
|
2157
|
+
const sessionStart = hooks.SessionStart ?? [];
|
|
2158
|
+
for (const entry of sessionStart) {
|
|
2159
|
+
for (const hook of entry.hooks ?? []) {
|
|
2160
|
+
if (hook.command?.includes("worktree-isolation/apply.py") && hook.command?.includes("--quiet")) {
|
|
2161
|
+
return true;
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
return false;
|
|
2166
|
+
}
|
|
2167
|
+
function addHookToSettings() {
|
|
2168
|
+
const settings = readSettings();
|
|
2169
|
+
const hooks = settings.hooks ??= {};
|
|
2170
|
+
const sessionStart = hooks.SessionStart ??= [];
|
|
2171
|
+
const hookEntry = {
|
|
2172
|
+
type: "command",
|
|
2173
|
+
command: `${SCRIPTS_DIR.replace(/\\/g, "/")}/apply.py --quiet`
|
|
2174
|
+
};
|
|
2175
|
+
const existing = sessionStart.find(
|
|
2176
|
+
(e) => (e.matcher ?? "") === ""
|
|
2177
|
+
);
|
|
2178
|
+
if (existing) {
|
|
2179
|
+
(existing.hooks ??= []).push(hookEntry);
|
|
2180
|
+
} else {
|
|
2181
|
+
sessionStart.push({
|
|
2182
|
+
matcher: "",
|
|
2183
|
+
hooks: [hookEntry]
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
writeSettings(settings);
|
|
2187
|
+
}
|
|
2188
|
+
function removeHookFromSettings() {
|
|
2189
|
+
const settings = readSettings();
|
|
2190
|
+
const hooks = settings.hooks ?? {};
|
|
2191
|
+
const sessionStart = hooks.SessionStart ?? [];
|
|
2192
|
+
for (const entry of sessionStart) {
|
|
2193
|
+
if (!entry.hooks) continue;
|
|
2194
|
+
entry.hooks = entry.hooks.filter(
|
|
2195
|
+
(h) => !(h.command?.includes("worktree-isolation/apply.py") && h.command?.includes("--quiet"))
|
|
2196
|
+
);
|
|
2197
|
+
}
|
|
2198
|
+
hooks.SessionStart = sessionStart.filter(
|
|
2199
|
+
(e) => (e.hooks?.length ?? 0) > 0
|
|
2200
|
+
);
|
|
2201
|
+
writeSettings(settings);
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
// src/update-check.ts
|
|
2205
|
+
import fs14 from "fs";
|
|
2206
|
+
import path16 from "path";
|
|
2207
|
+
import os4 from "os";
|
|
2208
|
+
import chalk10 from "chalk";
|
|
2209
|
+
var CHECK_FILE = path16.join(os4.homedir(), ".arcane", "last-check.json");
|
|
2210
|
+
var CHECK_INTERVAL_MS = 4 * 60 * 60 * 1e3;
|
|
2211
|
+
var GITHUB_OWNER2 = "SebastianLuser";
|
|
2212
|
+
var GITHUB_REPO2 = "Claude-Code-Arcane";
|
|
2213
|
+
var GITHUB_BRANCH2 = "main";
|
|
2214
|
+
async function checkForUpdates(opts = {}) {
|
|
2215
|
+
try {
|
|
2216
|
+
const cached = readCachedCheck();
|
|
2217
|
+
if (cached && !opts.force) {
|
|
2218
|
+
const age = Date.now() - new Date(cached.checked_at).getTime();
|
|
2219
|
+
if (age < CHECK_INTERVAL_MS) {
|
|
2220
|
+
if (cached.update_available && !opts.quiet) {
|
|
2221
|
+
printUpdateNotice(cached.local_version, cached.remote_sha);
|
|
2222
|
+
}
|
|
2223
|
+
return cached.update_available;
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
const manifest = readManifest(process.cwd());
|
|
2227
|
+
const localVersion = manifest?.source_version ?? manifest?.arcane_version ?? "unknown";
|
|
2228
|
+
const remoteSha = await getLatestCommitSha();
|
|
2229
|
+
if (!remoteSha) return false;
|
|
2230
|
+
const shortSha = remoteSha.substring(0, 12);
|
|
2231
|
+
const updateAvailable = localVersion !== shortSha && !remoteSha.startsWith(localVersion);
|
|
2232
|
+
const result = {
|
|
2233
|
+
checked_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2234
|
+
local_version: localVersion,
|
|
2235
|
+
remote_sha: shortSha,
|
|
2236
|
+
update_available: updateAvailable
|
|
2237
|
+
};
|
|
2238
|
+
writeCachedCheck(result);
|
|
2239
|
+
if (updateAvailable && !opts.quiet) {
|
|
2240
|
+
printUpdateNotice(localVersion, shortSha);
|
|
2241
|
+
}
|
|
2242
|
+
return updateAvailable;
|
|
2243
|
+
} catch {
|
|
2244
|
+
return false;
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
function printUpdateNotice(localVersion, remoteSha) {
|
|
2248
|
+
console.log(
|
|
2249
|
+
chalk10.yellow(`
|
|
2250
|
+
Arcane update available: ${localVersion} \u2192 ${remoteSha}`)
|
|
2251
|
+
);
|
|
2252
|
+
console.log(
|
|
2253
|
+
chalk10.dim(" Run: arcane update (--dry-run to preview)\n")
|
|
2254
|
+
);
|
|
2255
|
+
}
|
|
2256
|
+
async function getLatestCommitSha() {
|
|
2257
|
+
try {
|
|
2258
|
+
const response = await fetch(
|
|
2259
|
+
`https://api.github.com/repos/${GITHUB_OWNER2}/${GITHUB_REPO2}/commits/${GITHUB_BRANCH2}`,
|
|
2260
|
+
{
|
|
2261
|
+
headers: {
|
|
2262
|
+
"User-Agent": "arcane-cli",
|
|
2263
|
+
Accept: "application/vnd.github.v3+json"
|
|
2264
|
+
},
|
|
2265
|
+
signal: AbortSignal.timeout(5e3)
|
|
2266
|
+
}
|
|
2267
|
+
);
|
|
2268
|
+
if (!response.ok) return null;
|
|
2269
|
+
const data = await response.json();
|
|
2270
|
+
return data.sha;
|
|
2271
|
+
} catch {
|
|
2272
|
+
return null;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
function readCachedCheck() {
|
|
2276
|
+
try {
|
|
2277
|
+
if (!fs14.existsSync(CHECK_FILE)) return null;
|
|
2278
|
+
return JSON.parse(fs14.readFileSync(CHECK_FILE, "utf-8"));
|
|
2279
|
+
} catch {
|
|
2280
|
+
return null;
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
function writeCachedCheck(result) {
|
|
2284
|
+
try {
|
|
2285
|
+
const dir = path16.dirname(CHECK_FILE);
|
|
2286
|
+
if (!fs14.existsSync(dir)) {
|
|
2287
|
+
fs14.mkdirSync(dir, { recursive: true });
|
|
2288
|
+
}
|
|
2289
|
+
fs14.writeFileSync(CHECK_FILE, JSON.stringify(result, null, 2) + "\n");
|
|
2290
|
+
} catch {
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
// src/cli.ts
|
|
2295
|
+
var program = new Command();
|
|
2296
|
+
program.name("arcane").description(
|
|
2297
|
+
"Claude Code Arcane \u2014 Skills, agents, hooks and rules for Claude Code"
|
|
2298
|
+
).version(getPackageVersion());
|
|
2299
|
+
program.command("install [profile]").description(
|
|
2300
|
+
"Install a profile (e.g., backend-ts+agile). Without args, shows available profiles."
|
|
2301
|
+
).option("-t, --target <dir>", "Target project directory", process.cwd()).option("-n, --dry-run", "Show what would be installed without changing files").option("-f, --force", "Overwrite without backup prompt").option(
|
|
2302
|
+
"-s, --share-from <dir>",
|
|
2303
|
+
"Share hooks/docs from an existing Arcane installation (e.g., main worktree)"
|
|
2304
|
+
).option("--source <source>", "Content source: auto, github, or bundled", "auto").action(async (profile, opts) => {
|
|
2305
|
+
await installCommand(profile, opts);
|
|
2306
|
+
});
|
|
2307
|
+
program.command("add <items...>").description(
|
|
2308
|
+
"Add skills or profiles. Use +profileName for profiles, skillName for individual skills."
|
|
2309
|
+
).action(async (items) => {
|
|
2310
|
+
await addCommand(items);
|
|
2311
|
+
});
|
|
2312
|
+
program.command("remove <items...>").description(
|
|
2313
|
+
"Remove skills or profiles. Use +profileName for profiles, skillName for individual skills."
|
|
2314
|
+
).action(async (items) => {
|
|
2315
|
+
await removeCommand(items);
|
|
2316
|
+
});
|
|
2317
|
+
program.command("list").description("List all available profiles and skills.").action(async () => {
|
|
2318
|
+
await listCommand();
|
|
2319
|
+
});
|
|
2320
|
+
program.command("status").description("Show current Arcane installation status.").action(async () => {
|
|
2321
|
+
await statusCommand();
|
|
2322
|
+
});
|
|
2323
|
+
program.command("update").description("Update installed Arcane content to latest version.").option("-q, --quiet", "Quiet mode for hook usage").option("-n, --dry-run", "Show what would change without applying").option("-f, --force", "Overwrite even locally modified files").option("--source <source>", "Content source: auto, github, or bundled", "auto").action(async (opts) => {
|
|
2324
|
+
await updateCommand(opts);
|
|
2325
|
+
});
|
|
2326
|
+
program.command("clean").description("Remove Arcane installation from current project.").option("-f, --force", "Skip confirmation").action(async (opts) => {
|
|
2327
|
+
await cleanCommand(opts);
|
|
2328
|
+
});
|
|
2329
|
+
program.command("worktree <branch>").description(
|
|
2330
|
+
"Create a git worktree with Arcane pre-installed."
|
|
2331
|
+
).option(
|
|
2332
|
+
"-p, --profile <profile>",
|
|
2333
|
+
"Profile to install (inherits from current installation if omitted)"
|
|
2334
|
+
).option("--path <dir>", "Custom worktree directory path").option(
|
|
2335
|
+
"-b, --base <branch>",
|
|
2336
|
+
"Base branch for new branch (default: current HEAD)"
|
|
2337
|
+
).option("--install-deps", "Install dependencies after creation").option(
|
|
2338
|
+
"--isolate",
|
|
2339
|
+
"Apply worktree-isolation for Docker port deconfliction"
|
|
2340
|
+
).option("-n, --dry-run", "Show what would be done without making changes").option("--no-share", "Don't share hooks/docs from current installation").action(async (branch, opts) => {
|
|
2341
|
+
await worktreeCommand(branch, opts);
|
|
2342
|
+
});
|
|
2343
|
+
program.command("global").description(
|
|
2344
|
+
"Install or manage global hooks (worktree-isolation auto-apply on SessionStart)."
|
|
2345
|
+
).option("--remove", "Remove global hooks").option("--status", "Show global hooks status").action(async (opts) => {
|
|
2346
|
+
await globalCommand(opts);
|
|
2347
|
+
});
|
|
2348
|
+
program.parse();
|
|
2349
|
+
if (!process.env.ARCANE_SOURCE && !process.env.VITEST) {
|
|
2350
|
+
checkForUpdates({ quiet: false }).catch(() => {
|
|
2351
|
+
});
|
|
2352
|
+
}
|