agent-toolkit-cli 1.11.0__py3-none-win_amd64.whl
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.
- agent_toolkit/__init__.py +4 -0
- agent_toolkit/__main__.py +5 -0
- agent_toolkit/_paths.py +145 -0
- agent_toolkit/bin/.gitkeep +0 -0
- agent_toolkit/bin/agent-toolkit.exe +0 -0
- agent_toolkit/cli/__init__.py +0 -0
- agent_toolkit/cli/__main__.py +5 -0
- agent_toolkit/cli/build.py +278 -0
- agent_toolkit/cli/completion.py +297 -0
- agent_toolkit/cli/context_budget.py +455 -0
- agent_toolkit/cli/devcompanion.py +923 -0
- agent_toolkit/cli/devcompanion_queue.py +235 -0
- agent_toolkit/cli/diff.py +176 -0
- agent_toolkit/cli/doctor.py +1052 -0
- agent_toolkit/cli/insights.py +771 -0
- agent_toolkit/cli/install.py +706 -0
- agent_toolkit/cli/main.py +171 -0
- agent_toolkit/cli/mcp.py +537 -0
- agent_toolkit/cli/memory.py +739 -0
- agent_toolkit/cli/plugin.py +224 -0
- agent_toolkit/cli/project.py +459 -0
- agent_toolkit/cli/release.py +178 -0
- agent_toolkit/cli/skills.py +461 -0
- agent_toolkit/cli/uninstall.py +166 -0
- agent_toolkit/cli/update.py +298 -0
- agent_toolkit/cli/workspace.py +1713 -0
- agent_toolkit/compiler/hook_registry.py +110 -0
- agent_toolkit/compiler/loader.py +338 -0
- agent_toolkit/compiler/mcp_registry.py +87 -0
- agent_toolkit/compiler/model.py +182 -0
- agent_toolkit/compiler/provenance.py +140 -0
- agent_toolkit/compiler/registry_emit.py +263 -0
- agent_toolkit/compiler/target_registry.py +122 -0
- agent_toolkit/compiler/targets/__init__.py +1 -0
- agent_toolkit/compiler/targets/agent_plugins.py +160 -0
- agent_toolkit/compiler/targets/base.py +229 -0
- agent_toolkit/compiler/targets/claude_code.py +241 -0
- agent_toolkit/compiler/targets/codex.py +261 -0
- agent_toolkit/compiler/targets/copilot.py +275 -0
- agent_toolkit/compiler/targets/cursor.py +207 -0
- agent_toolkit/compiler/targets/gemini_cli.py +213 -0
- agent_toolkit/compiler/targets/muse_code.py +113 -0
- agent_toolkit/compiler/targets/opencode.py +204 -0
- agent_toolkit/compiler/targets/pi.py +263 -0
- agent_toolkit/compiler/targets/windsurf.py +267 -0
- agent_toolkit/compiler/tool_mapping.py +83 -0
- agent_toolkit/data/.gitignore +4 -0
- agent_toolkit/data/__init__.py +1 -0
- agent_toolkit/data/agents/agentic-security-reviewer/AGENT.md +60 -0
- agent_toolkit/data/agents/architect/AGENT.md +30 -0
- agent_toolkit/data/agents/assistant/AGENT.md +59 -0
- agent_toolkit/data/agents/build-error-resolver/AGENT.md +30 -0
- agent_toolkit/data/agents/client-workflow-bootstrap/AGENT.md +60 -0
- agent_toolkit/data/agents/code-reviewer/AGENT.md +49 -0
- agent_toolkit/data/agents/database-reviewer/AGENT.md +44 -0
- agent_toolkit/data/agents/docs-lookup/AGENT.md +28 -0
- agent_toolkit/data/agents/e2e-runner/AGENT.md +38 -0
- agent_toolkit/data/agents/performance-optimizer/AGENT.md +52 -0
- agent_toolkit/data/agents/planner/AGENT.md +41 -0
- agent_toolkit/data/agents/refactor-cleaner/AGENT.md +43 -0
- agent_toolkit/data/agents/reference-lookup/AGENT.md +33 -0
- agent_toolkit/data/agents/security-reviewer/AGENT.md +47 -0
- agent_toolkit/data/agents/tdd-guide/AGENT.md +58 -0
- agent_toolkit/data/agents/tech-assistant/AGENT.md +11 -0
- agent_toolkit/data/agents/typescript-reviewer/AGENT.md +61 -0
- agent_toolkit/data/capabilities/hooks/README.md +6 -0
- agent_toolkit/data/capabilities/hooks/pre-commit-validate.yaml +26 -0
- agent_toolkit/data/capabilities/hooks/scripts/pre-commit-validate.sh +41 -0
- agent_toolkit/data/capabilities/hooks/scripts/session-start-context.sh +11 -0
- agent_toolkit/data/capabilities/hooks/session-start-context.yaml +23 -0
- agent_toolkit/data/capabilities/targets/registry.yaml +90 -0
- agent_toolkit/data/capabilities/upstream.lock +118 -0
- agent_toolkit/data/catalogs/agent-catalog.yaml +81 -0
- agent_toolkit/data/catalogs/loop-catalog.yaml +55 -0
- agent_toolkit/data/catalogs/skill-catalog.yaml +520 -0
- agent_toolkit/data/catalogs/skills-layout.json +391 -0
- agent_toolkit/data/distributions/products.yaml +190 -0
- agent_toolkit/data/distributions/targets/claude-code.yaml +47 -0
- agent_toolkit/data/distributions/targets/cursor.yaml +42 -0
- agent_toolkit/data/distributions/targets/opencode.yaml +55 -0
- agent_toolkit/data/loops/changelog-drafter/loop.yaml +40 -0
- agent_toolkit/data/loops/ci-sweeper/loop.yaml +53 -0
- agent_toolkit/data/loops/daily-triage/loop.yaml +47 -0
- agent_toolkit/data/loops/dep-sweeper/loop.yaml +46 -0
- agent_toolkit/data/loops/issue-triage/loop.yaml +40 -0
- agent_toolkit/data/loops/oss-daily-briefing/loop.yaml +65 -0
- agent_toolkit/data/loops/oss-pr-monitor/loop.yaml +86 -0
- agent_toolkit/data/loops/oss-triage/loop.yaml +67 -0
- agent_toolkit/data/loops/post-merge-cleanup/loop.yaml +44 -0
- agent_toolkit/data/loops/pr-babysitter/loop.yaml +46 -0
- agent_toolkit/data/mcp/registry/chrome-devtools.yaml +61 -0
- agent_toolkit/data/mcp/registry/clickup.yaml +48 -0
- agent_toolkit/data/mcp/registry/figma.yaml +44 -0
- agent_toolkit/data/mcp/registry/github.yaml +52 -0
- agent_toolkit/data/mcp/registry/linear.yaml +47 -0
- agent_toolkit/data/mcp/registry/notion.yaml +48 -0
- agent_toolkit/data/mcp/registry/slack.yaml +46 -0
- agent_toolkit/data/mcp/templates/chrome-devtools/README.md +57 -0
- agent_toolkit/data/mcp/templates/chrome-devtools/config.template.json +6 -0
- agent_toolkit/data/mcp/templates/clickup/README.md +45 -0
- agent_toolkit/data/mcp/templates/clickup/config.template.json +8 -0
- agent_toolkit/data/mcp/templates/clickup/wrapper.sh +23 -0
- agent_toolkit/data/mcp/templates/figma/README.md +54 -0
- agent_toolkit/data/mcp/templates/figma/config.template.json +9 -0
- agent_toolkit/data/mcp/templates/github/README.md +16 -0
- agent_toolkit/data/mcp/templates/github/config.template.json +15 -0
- agent_toolkit/data/mcp/templates/github/wrapper.sh +6 -0
- agent_toolkit/data/mcp/templates/linear/README.md +49 -0
- agent_toolkit/data/mcp/templates/linear/config.template.json +10 -0
- agent_toolkit/data/mcp/templates/notion/README.md +7 -0
- agent_toolkit/data/mcp/templates/notion/config.template.json +8 -0
- agent_toolkit/data/mcp/templates/notion/wrapper.sh +23 -0
- agent_toolkit/data/mcp/templates/slack/README.md +8 -0
- agent_toolkit/data/mcp/templates/slack/config.template.json +9 -0
- agent_toolkit/data/mcp/templates/slack/wrapper.sh +23 -0
- agent_toolkit/data/packs/README.md +66 -0
- agent_toolkit/data/packs/agentic-security/README.md +19 -0
- agent_toolkit/data/packs/agentic-security/config.yaml +25 -0
- agent_toolkit/data/packs/architecture/README.md +22 -0
- agent_toolkit/data/packs/architecture/config.yaml +27 -0
- agent_toolkit/data/packs/code-quality/README.md +19 -0
- agent_toolkit/data/packs/code-quality/config.yaml +21 -0
- agent_toolkit/data/packs/delivery-discipline/README.md +19 -0
- agent_toolkit/data/packs/delivery-discipline/config.yaml +42 -0
- agent_toolkit/data/packs/design-engineering/README.md +19 -0
- agent_toolkit/data/packs/design-engineering/config.yaml +41 -0
- agent_toolkit/data/packs/engineering-workflow/README.md +21 -0
- agent_toolkit/data/packs/engineering-workflow/config.yaml +57 -0
- agent_toolkit/data/packs/oss-maintenance/README.md +245 -0
- agent_toolkit/data/packs/oss-maintenance/config.yaml +75 -0
- agent_toolkit/data/profiles/claude-code/CLAUDE.md +110 -0
- agent_toolkit/data/profiles/claude-code/agents/assistant.md +59 -0
- agent_toolkit/data/profiles/claude-code/agents/build-error-resolver.md +30 -0
- agent_toolkit/data/profiles/claude-code/agents/client-workflow-bootstrap.md +60 -0
- agent_toolkit/data/profiles/claude-code/agents/contribution-planner.md +39 -0
- agent_toolkit/data/profiles/claude-code/agents/database-reviewer.md +44 -0
- agent_toolkit/data/profiles/claude-code/agents/docs-lookup.md +28 -0
- agent_toolkit/data/profiles/claude-code/agents/e2e-runner.md +38 -0
- agent_toolkit/data/profiles/claude-code/agents/performance-optimizer.md +52 -0
- agent_toolkit/data/profiles/claude-code/agents/planner.md +41 -0
- agent_toolkit/data/profiles/claude-code/agents/refactor-cleaner.md +43 -0
- agent_toolkit/data/profiles/claude-code/agents/reference-lookup.md +33 -0
- agent_toolkit/data/profiles/claude-code/agents/security-reviewer.md +47 -0
- agent_toolkit/data/profiles/claude-code/agents/tdd-guide.md +58 -0
- agent_toolkit/data/profiles/claude-code/agents/typescript-reviewer.md +61 -0
- agent_toolkit/data/profiles/claude-code/settings.json +86 -0
- agent_toolkit/data/profiles/copilot/copilot-instructions.md +15 -0
- agent_toolkit/data/profiles/cursor/README.md +33 -0
- agent_toolkit/data/profiles/cursor/rules/architect.mdc +23 -0
- agent_toolkit/data/profiles/cursor/rules/assistant.mdc +61 -0
- agent_toolkit/data/profiles/cursor/rules/build-error-resolver.mdc +20 -0
- agent_toolkit/data/profiles/cursor/rules/code-reviewer.mdc +21 -0
- agent_toolkit/data/profiles/cursor/rules/database-reviewer.mdc +29 -0
- agent_toolkit/data/profiles/cursor/rules/docs-lookup.mdc +15 -0
- agent_toolkit/data/profiles/cursor/rules/e2e-runner.mdc +30 -0
- agent_toolkit/data/profiles/cursor/rules/performance-optimizer.mdc +27 -0
- agent_toolkit/data/profiles/cursor/rules/planner.mdc +28 -0
- agent_toolkit/data/profiles/cursor/rules/refactor-cleaner.mdc +26 -0
- agent_toolkit/data/profiles/cursor/rules/reference-lookup.mdc +20 -0
- agent_toolkit/data/profiles/cursor/rules/security-reviewer.mdc +20 -0
- agent_toolkit/data/profiles/cursor/rules/tdd-guide.mdc +26 -0
- agent_toolkit/data/profiles/cursor/rules/typescript-reviewer.mdc +28 -0
- agent_toolkit/data/profiles/muse-code/README.md +35 -0
- agent_toolkit/data/profiles/opencode/README.md +44 -0
- agent_toolkit/data/profiles/opencode/agents/architect.md +30 -0
- agent_toolkit/data/profiles/opencode/agents/assistant.md +96 -0
- agent_toolkit/data/profiles/opencode/agents/build-error-resolver.md +31 -0
- agent_toolkit/data/profiles/opencode/agents/client-workflow-bootstrap.md +66 -0
- agent_toolkit/data/profiles/opencode/agents/code-reviewer.md +47 -0
- agent_toolkit/data/profiles/opencode/agents/contribution-planner.md +44 -0
- agent_toolkit/data/profiles/opencode/agents/database-reviewer.md +43 -0
- agent_toolkit/data/profiles/opencode/agents/docs-lookup.md +28 -0
- agent_toolkit/data/profiles/opencode/agents/e2e-runner.md +33 -0
- agent_toolkit/data/profiles/opencode/agents/performance-optimizer.md +34 -0
- agent_toolkit/data/profiles/opencode/agents/planner.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/refactor-cleaner.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/reference-lookup.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/security-reviewer.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/tdd-guide.md +27 -0
- agent_toolkit/data/profiles/opencode/agents/typescript-reviewer.md +30 -0
- agent_toolkit/data/profiles/opencode/opencode.json +3 -0
- agent_toolkit/data/profiles/pi/skills/architect/skill.md +5 -0
- agent_toolkit/data/profiles/pi/skills/assistant/skill.md +3 -0
- agent_toolkit/data/profiles/pi/skills/code-reviewer/skill.md +5 -0
- agent_toolkit/data/profiles/pi/skills/planner/skill.md +3 -0
- agent_toolkit/data/profiles/pi/skills/security-reviewer/skill.md +3 -0
- agent_toolkit/data/profiles/windsurf/memories/global_rules.md +114 -0
- agent_toolkit/data/profiles/windsurf/rules/architect.mdc +23 -0
- agent_toolkit/data/profiles/windsurf/rules/assistant.mdc +61 -0
- agent_toolkit/data/profiles/windsurf/rules/build-error-resolver.mdc +20 -0
- agent_toolkit/data/profiles/windsurf/rules/code-reviewer.mdc +21 -0
- agent_toolkit/data/profiles/windsurf/rules/database-reviewer.mdc +29 -0
- agent_toolkit/data/profiles/windsurf/rules/docs-lookup.mdc +15 -0
- agent_toolkit/data/profiles/windsurf/rules/e2e-runner.mdc +30 -0
- agent_toolkit/data/profiles/windsurf/rules/performance-optimizer.mdc +27 -0
- agent_toolkit/data/profiles/windsurf/rules/planner.mdc +28 -0
- agent_toolkit/data/profiles/windsurf/rules/refactor-cleaner.mdc +26 -0
- agent_toolkit/data/profiles/windsurf/rules/reference-lookup.mdc +20 -0
- agent_toolkit/data/profiles/windsurf/rules/security-reviewer.mdc +20 -0
- agent_toolkit/data/profiles/windsurf/rules/tdd-guide.mdc +26 -0
- agent_toolkit/data/profiles/windsurf/rules/typescript-reviewer.mdc +28 -0
- agent_toolkit/data/skills/accessibility/review/SKILL.md +116 -0
- agent_toolkit/data/skills/accessibility/review/references/a11y-checklist.md +25 -0
- agent_toolkit/data/skills/accessibility/review/references/a11y-findings-template.md +56 -0
- agent_toolkit/data/skills/accessibility/review/references/research.md +47 -0
- agent_toolkit/data/skills/agentic-security/mcp-audit/SKILL.md +116 -0
- agent_toolkit/data/skills/agentic-security/mcp-audit/references/mcp-audit-template.md +51 -0
- agent_toolkit/data/skills/agentic-security/owasp-agentic-review/SKILL.md +73 -0
- agent_toolkit/data/skills/agentic-security/owasp-agentic-review/references/owasp-agentic-template.md +32 -0
- agent_toolkit/data/skills/agentic-security/supply-chain-audit/SKILL.md +142 -0
- agent_toolkit/data/skills/agentic-security/threat-modeling/SKILL.md +100 -0
- agent_toolkit/data/skills/agentic-security/threat-modeling/references/threat-model-template.md +55 -0
- agent_toolkit/data/skills/architecture/c4-model/SKILL.md +49 -0
- agent_toolkit/data/skills/cloud/aws-well-architected-review/SKILL.md +37 -0
- agent_toolkit/data/skills/cloud/cloud-design-patterns/SKILL.md +38 -0
- agent_toolkit/data/skills/core/assistant/SKILL.md +216 -0
- agent_toolkit/data/skills/core/assistant/references/AGENTS_TEMPLATE.md +0 -0
- agent_toolkit/data/skills/core/assistant/references/ORCHESTRATION.md +0 -0
- agent_toolkit/data/skills/core/assistant/references/REPO_INSPECTION.md +0 -0
- agent_toolkit/data/skills/core/dev-companion/SKILL.md +65 -0
- agent_toolkit/data/skills/core/dev-companion/references/LOOP_GUARDRAILS.md +0 -0
- agent_toolkit/data/skills/core/onboarding/SKILL.md +122 -0
- agent_toolkit/data/skills/core/output-handshake/SKILL.md +26 -0
- agent_toolkit/data/skills/core/pr-fallback/SKILL.md +35 -0
- agent_toolkit/data/skills/core/pr-fallback/references/pr-body-default.md +0 -0
- agent_toolkit/data/skills/core/project/SKILL.md +89 -0
- agent_toolkit/data/skills/core/workspace/SKILL.md +103 -0
- agent_toolkit/data/skills/core/workspace-knowledge-sync/SKILL.md +140 -0
- agent_toolkit/data/skills/data/dbt-validation/SKILL.md +41 -0
- agent_toolkit/data/skills/data/snowflake-validation/SKILL.md +38 -0
- agent_toolkit/data/skills/delivery/adr/SKILL.md +56 -0
- agent_toolkit/data/skills/delivery/adr/references/default-template.md +35 -0
- agent_toolkit/data/skills/delivery/adr/references/example-001-graphql-adoption.md +66 -0
- agent_toolkit/data/skills/delivery/agreement/SKILL.md +24 -0
- agent_toolkit/data/skills/delivery/agreement/references/default-template.md +17 -0
- agent_toolkit/data/skills/delivery/agreement/references/example-api-versioning.md +29 -0
- agent_toolkit/data/skills/delivery/bug/SKILL.md +26 -0
- agent_toolkit/data/skills/delivery/bug/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/bug/references/example-search-filter-bug.md +58 -0
- agent_toolkit/data/skills/delivery/decision-log/SKILL.md +28 -0
- agent_toolkit/data/skills/delivery/decision-log/references/default-template.md +17 -0
- agent_toolkit/data/skills/delivery/decision-log/references/example-repository-pattern.md +27 -0
- agent_toolkit/data/skills/delivery/development-workflow/SKILL.md +34 -0
- agent_toolkit/data/skills/delivery/development-workflow/references/default-workflow-checklist.md +44 -0
- agent_toolkit/data/skills/delivery/epic/SKILL.md +22 -0
- agent_toolkit/data/skills/delivery/epic/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/epic/references/example-unified-dashboard.md +40 -0
- agent_toolkit/data/skills/delivery/incident/SKILL.md +24 -0
- agent_toolkit/data/skills/delivery/incident/references/default-template.md +29 -0
- agent_toolkit/data/skills/delivery/incident/references/example-payment-outage.md +62 -0
- agent_toolkit/data/skills/delivery/management-unit-assessment/SKILL.md +104 -0
- agent_toolkit/data/skills/delivery/management-unit-assessment/references/default-template.md +24 -0
- agent_toolkit/data/skills/delivery/management-unit-assessment/references/example-team-assessment.md +126 -0
- agent_toolkit/data/skills/delivery/meeting-minutes/SKILL.md +25 -0
- agent_toolkit/data/skills/delivery/meeting-minutes/references/default-template.md +22 -0
- agent_toolkit/data/skills/delivery/meeting-minutes/references/example-weekly-sync.md +72 -0
- agent_toolkit/data/skills/delivery/planning/SKILL.md +31 -0
- agent_toolkit/data/skills/delivery/planning/references/default-template.md +25 -0
- agent_toolkit/data/skills/delivery/planning/references/example-sprint-planning.md +62 -0
- agent_toolkit/data/skills/delivery/prd/SKILL.md +46 -0
- agent_toolkit/data/skills/delivery/prd/references/default-template.md +31 -0
- agent_toolkit/data/skills/delivery/prd/references/example-unified-api.md +71 -0
- agent_toolkit/data/skills/delivery/project-assessment/SKILL.md +90 -0
- agent_toolkit/data/skills/delivery/project-assessment/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/project-assessment/references/example-platform-assessment.md +122 -0
- agent_toolkit/data/skills/delivery/project-assessment-evidence/SKILL.md +88 -0
- agent_toolkit/data/skills/delivery/project-assessment-evidence/references/default-template.md +24 -0
- agent_toolkit/data/skills/delivery/project-assessment-evidence/references/example-evidence-map.md +46 -0
- agent_toolkit/data/skills/delivery/spike/SKILL.md +24 -0
- agent_toolkit/data/skills/delivery/spike/references/default-template.md +29 -0
- agent_toolkit/data/skills/delivery/spike/references/example-graphql-federation.md +79 -0
- agent_toolkit/data/skills/delivery/task/SKILL.md +21 -0
- agent_toolkit/data/skills/delivery/task/references/default-template.md +21 -0
- agent_toolkit/data/skills/delivery/task/references/example-nav-system.md +33 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/SKILL.md +58 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/references/default-template.md +26 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/references/example-frontend-assessment.md +112 -0
- agent_toolkit/data/skills/delivery/technical-unit-assessment/references/indicator-groups.md +65 -0
- agent_toolkit/data/skills/delivery/trd/SKILL.md +49 -0
- agent_toolkit/data/skills/delivery/trd/references/default-template.md +31 -0
- agent_toolkit/data/skills/delivery/trd/references/example-api-migration.md +122 -0
- agent_toolkit/data/skills/delivery/user-story/SKILL.md +21 -0
- agent_toolkit/data/skills/delivery/user-story/references/default-template.md +21 -0
- agent_toolkit/data/skills/delivery/user-story/references/example-advanced-filtering.md +37 -0
- agent_toolkit/data/skills/delivery/work-item/SKILL.md +31 -0
- agent_toolkit/data/skills/delivery/work-item/references/default-template.md +21 -0
- agent_toolkit/data/skills/delivery/work-item/references/example-routing-dashboard.md +23 -0
- agent_toolkit/data/skills/delivery/workflow-client-bootstrap/SKILL.md +148 -0
- agent_toolkit/data/skills/delivery/workflow-client-bootstrap/questions.yaml +165 -0
- agent_toolkit/data/skills/delivery/workflow-generic-project/SKILL.md +79 -0
- agent_toolkit/data/skills/design/design-assessment/SKILL.md +150 -0
- agent_toolkit/data/skills/design/design-assessment/references/design-scorecard-template.md +78 -0
- agent_toolkit/data/skills/design/design-improvement/SKILL.md +167 -0
- agent_toolkit/data/skills/design/design-improvement/references/improvement-plan-template.md +113 -0
- agent_toolkit/data/skills/design/figma/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma/NOTICE.txt +25 -0
- agent_toolkit/data/skills/design/figma/SKILL.md +98 -0
- agent_toolkit/data/skills/design/figma/references/figma-mcp-config.md +82 -0
- agent_toolkit/data/skills/design/figma/references/figma-tools-and-prompts.md +34 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/NOTICE.txt +18 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/SKILL.md +354 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/references/mapping-checklist.md +7 -0
- agent_toolkit/data/skills/design/figma-code-connect-components/scripts/normalize_node_id.py +25 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/NOTICE.txt +19 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/SKILL.md +554 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/references/rule-template.md +15 -0
- agent_toolkit/data/skills/design/figma-create-design-system-rules/scripts/check_agents_md.sh +9 -0
- agent_toolkit/data/skills/design/figma-create-new-file/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-create-new-file/NOTICE.txt +17 -0
- agent_toolkit/data/skills/design/figma-create-new-file/SKILL.md +72 -0
- agent_toolkit/data/skills/design/figma-implement-design/LICENSE.txt +2 -0
- agent_toolkit/data/skills/design/figma-implement-design/NOTICE.txt +19 -0
- agent_toolkit/data/skills/design/figma-implement-design/SKILL.md +268 -0
- agent_toolkit/data/skills/design/frontend-design/LICENSE.txt +177 -0
- agent_toolkit/data/skills/design/frontend-design/SKILL.md +82 -0
- agent_toolkit/data/skills/design/frontend-design/UPSTREAM.md +14 -0
- agent_toolkit/data/skills/design/frontend-design-review/LICENSE +21 -0
- agent_toolkit/data/skills/design/frontend-design-review/SKILL.md +194 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/pattern-examples.md +21 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/quick-checklist.md +38 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/review-output-format.md +68 -0
- agent_toolkit/data/skills/design/frontend-design-review/references/review-type-modifiers.md +31 -0
- agent_toolkit/data/skills/design/web-design-guidelines/SKILL.md +78 -0
- agent_toolkit/data/skills/design/web-design-guidelines/references/LICENSE +21 -0
- agent_toolkit/data/skills/design/web-design-guidelines/references/web-interface-guidelines.md +180 -0
- agent_toolkit/data/skills/forge/gh-address-comments/LICENSE.txt +202 -0
- agent_toolkit/data/skills/forge/gh-address-comments/NOTICE.txt +20 -0
- agent_toolkit/data/skills/forge/gh-address-comments/SKILL.md +72 -0
- agent_toolkit/data/skills/forge/gh-address-comments/scripts/fetch_comments.py +239 -0
- agent_toolkit/data/skills/forge/gh-contribution-planner/SKILL.md +160 -0
- agent_toolkit/data/skills/forge/gh-contribution-planner/scripts/inspect_contributions.py +818 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/LICENSE.txt +201 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/NOTICE.txt +20 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/SKILL.md +74 -0
- agent_toolkit/data/skills/forge/gh-fix-ci/scripts/inspect_pr_checks.py +509 -0
- agent_toolkit/data/skills/forge/github-cli-workflow/SKILL.md +49 -0
- agent_toolkit/data/skills/forge/gitlab-cli-workflow/SKILL.md +44 -0
- agent_toolkit/data/skills/forge/workflow-client-bootstrap/SKILL.md +14 -0
- agent_toolkit/data/skills/forge/workflow-generic-project/SKILL.md +14 -0
- agent_toolkit/data/skills/forge/worktree/SKILL.md +113 -0
- agent_toolkit/data/skills/integrations/clickup-cli/SKILL.md +78 -0
- agent_toolkit/data/skills/integrations/clickup-cli/references/docs-management.md +57 -0
- agent_toolkit/data/skills/integrations/clickup-cli/references/task-management.md +131 -0
- agent_toolkit/data/skills/integrations/clickup-cli/references/time-tracking.md +38 -0
- agent_toolkit/data/skills/integrations/linear/LICENSE.txt +202 -0
- agent_toolkit/data/skills/integrations/linear/NOTICE.txt +23 -0
- agent_toolkit/data/skills/integrations/linear/SKILL.md +134 -0
- agent_toolkit/data/skills/integrations/mcp/SKILL.md +88 -0
- agent_toolkit/data/skills/integrations/slack-assistant/SKILL.md +138 -0
- agent_toolkit/data/skills/integrations/slack-cli/SKILL.md +109 -0
- agent_toolkit/data/skills/integrations/slack-cli/references/INSTALLATION.md +42 -0
- agent_toolkit/data/skills/loops/loop-runner/SKILL.md +92 -0
- agent_toolkit/data/skills/ops/docs-generator/SKILL.md +120 -0
- agent_toolkit/data/skills/ops/llm-cost-advisor/SKILL.md +87 -0
- agent_toolkit/data/skills/ops/swarm/SKILL.md +108 -0
- agent_toolkit/data/skills/ops/swarm-handoff/SKILL.md +112 -0
- agent_toolkit/data/skills/ops/swarm-observer/SKILL.md +102 -0
- agent_toolkit/data/skills/ops/triage/SKILL.md +119 -0
- agent_toolkit/data/skills/quality/codeql/SKILL.md +106 -0
- agent_toolkit/data/skills/quality/codeql/references/codeql-queries.md +43 -0
- agent_toolkit/data/skills/quality/megalinter/SKILL.md +162 -0
- agent_toolkit/data/skills/quality/megalinter/references/megalinter-images.md +36 -0
- agent_toolkit/data/skills/quality/megalinter/references/megalinter-license.md +41 -0
- agent_toolkit/data/skills/quality/megalinter/references/megalinter-targets.md +66 -0
- agent_toolkit/data/skills/tooling/chrome-devtools/SKILL.md +146 -0
- agent_toolkit/data/skills/tooling/herdr/SKILL.md +109 -0
- agent_toolkit/data/skills/tooling/inventory/SKILL.md +81 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/LICENSE.txt +201 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/NOTICE.txt +27 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/SKILL.md +145 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/assets/experiment-template.ipynb +117 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/assets/tutorial-template.ipynb +115 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/experiment-patterns.md +10 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/notebook-structure.md +17 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/quality-checklist.md +11 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/references/tutorial-patterns.md +9 -0
- agent_toolkit/data/skills/tooling/jupyter-notebook/scripts/new_notebook.py +132 -0
- agent_toolkit/data/skills/tooling/mermaid/SKILL.md +36 -0
- agent_toolkit/data/skills/tooling/playwright-cli/LICENSE.txt +201 -0
- agent_toolkit/data/skills/tooling/playwright-cli/NOTICE.txt +29 -0
- agent_toolkit/data/skills/tooling/playwright-cli/SKILL.md +154 -0
- agent_toolkit/data/skills/tooling/playwright-cli/references/cli.md +116 -0
- agent_toolkit/data/skills/tooling/playwright-cli/references/workflows.md +98 -0
- agent_toolkit/data/skills/tooling/playwright-cli/scripts/executable_playwright_cli.sh +25 -0
- agent_toolkit/data_cache.py +79 -0
- agent_toolkit/data_sync.py +144 -0
- agent_toolkit/installer/__init__.py +0 -0
- agent_toolkit/installer/merge.py +59 -0
- agent_toolkit/installer/receipt.py +89 -0
- agent_toolkit/installer/sources.py +92 -0
- agent_toolkit/installer/tracking.py +63 -0
- agent_toolkit/launcher.py +69 -0
- agent_toolkit/loop/__init__.py +0 -0
- agent_toolkit/loop/budget.py +107 -0
- agent_toolkit/loop/gh_gate.py +923 -0
- agent_toolkit/loop/loop-gh-gate +923 -0
- agent_toolkit/loop/pack.py +65 -0
- agent_toolkit/loop/runner.py +2722 -0
- agent_toolkit/runner/__init__.py +0 -0
- agent_toolkit/runner/dispatcher.py +163 -0
- agent_toolkit/runner/policy.py +356 -0
- agent_toolkit/runner/providers/__init__.py +21 -0
- agent_toolkit/runner/providers/anthropic_provider.py +109 -0
- agent_toolkit/runner/providers/base.py +53 -0
- agent_toolkit/runner/providers/ollama_provider.py +108 -0
- agent_toolkit/runner/providers/openai_provider.py +103 -0
- agent_toolkit/runner/providers/opencode_provider.py +127 -0
- agent_toolkit/swarm/__init__.py +5 -0
- agent_toolkit/swarm/approvals.py +121 -0
- agent_toolkit/swarm/backends/__init__.py +596 -0
- agent_toolkit/swarm/budget.py +83 -0
- agent_toolkit/swarm/cli.py +2448 -0
- agent_toolkit/swarm/config.py +351 -0
- agent_toolkit/swarm/handoff.py +174 -0
- agent_toolkit/swarm/models.py +230 -0
- agent_toolkit/swarm/prompts.py +177 -0
- agent_toolkit/swarm/recipes.py +304 -0
- agent_toolkit/swarm/runner.py +267 -0
- agent_toolkit/swarm/state.py +93 -0
- agent_toolkit/swarm/store.py +148 -0
- agent_toolkit/swarm/worktree.py +105 -0
- agent_toolkit/templates/workspace/.gitignore +19 -0
- agent_toolkit/templates/workspace/AGENTS.md +82 -0
- agent_toolkit/templates/workspace/knowledge/README.md +22 -0
- agent_toolkit/templates/workspace/knowledge/learnings/general.md +3 -0
- agent_toolkit/templates/workspace/knowledge/todos/pending.md +7 -0
- agent_toolkit/templates/workspace/packs/README.md +24 -0
- agent_toolkit/templates/workspace/personas/architect.md +12 -0
- agent_toolkit/templates/workspace/personas/implementer.md +12 -0
- agent_toolkit/templates/workspace/personas/researcher.md +12 -0
- agent_toolkit/templates/workspace/personas/reviewer.md +12 -0
- agent_toolkit_cli-1.11.0.dist-info/METADATA +363 -0
- agent_toolkit_cli-1.11.0.dist-info/RECORD +438 -0
- agent_toolkit_cli-1.11.0.dist-info/WHEEL +4 -0
- agent_toolkit_cli-1.11.0.dist-info/entry_points.txt +4 -0
- agent_toolkit_cli-1.11.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
"""
|
|
2
|
+
install — Install agent-toolkit profiles for AI coding assistants.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
agent-toolkit install [options]
|
|
6
|
+
|
|
7
|
+
Options:
|
|
8
|
+
--tools <list> Comma-separated tools to install (default: auto-detect)
|
|
9
|
+
Valid: claude-code, cursor, opencode, copilot, windsurf, pi, muse-code
|
|
10
|
+
--dry-run Show what would happen without making changes
|
|
11
|
+
--force Overwrite existing files without prompting
|
|
12
|
+
--offline Use only bundled/wheel data (skip GitHub Release cache)
|
|
13
|
+
--help Show this help message
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import json
|
|
19
|
+
import os
|
|
20
|
+
import shutil
|
|
21
|
+
import sys
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
from agent_toolkit._paths import toolkit_root
|
|
26
|
+
from agent_toolkit.installer.merge import merge_json_file
|
|
27
|
+
from agent_toolkit.installer.sources import (
|
|
28
|
+
agent_install_sources,
|
|
29
|
+
compiled_agent_files,
|
|
30
|
+
plugins_dir,
|
|
31
|
+
profile_file,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
if TYPE_CHECKING:
|
|
35
|
+
from agent_toolkit.installer.tracking import InstallTracker
|
|
36
|
+
|
|
37
|
+
import sys as _sys_win
|
|
38
|
+
|
|
39
|
+
if _sys_win.platform == "win32":
|
|
40
|
+
try:
|
|
41
|
+
_sys_win.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
42
|
+
_sys_win.stderr.reconfigure(encoding="utf-8", errors="replace")
|
|
43
|
+
except Exception:
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# ---------------------------------------------------------------------------
|
|
48
|
+
# Helpers
|
|
49
|
+
# ---------------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _info(msg: str) -> None:
|
|
53
|
+
print(f" [info] {msg}")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _ok(msg: str) -> None:
|
|
57
|
+
print(f" ✓ {msg}")
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _warn(msg: str) -> None:
|
|
61
|
+
print(f" ⚠ {msg}")
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _skip(msg: str) -> None:
|
|
65
|
+
print(f" - {msg}")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _dry(msg: str) -> None:
|
|
69
|
+
print(f" [dry] {msg}")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _err(msg: str) -> None:
|
|
73
|
+
print(f" ✗ {msg}", file=sys.stderr)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _confirm(prompt: str, force: bool) -> bool:
|
|
77
|
+
"""Ask user yes/no. Return True if force is set or user confirms."""
|
|
78
|
+
if force:
|
|
79
|
+
return True
|
|
80
|
+
try:
|
|
81
|
+
answer = input(f" {prompt} [y/N] ").strip().lower()
|
|
82
|
+
except EOFError:
|
|
83
|
+
return False
|
|
84
|
+
return answer in ("y", "yes")
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _files_identical(a: Path, b: Path) -> bool:
|
|
88
|
+
"""Return True if both files exist and have identical content."""
|
|
89
|
+
if not a.is_file() or not b.is_file():
|
|
90
|
+
return False
|
|
91
|
+
return a.read_bytes() == b.read_bytes()
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _copy_file(
|
|
95
|
+
src: Path,
|
|
96
|
+
dst: Path,
|
|
97
|
+
*,
|
|
98
|
+
dry_run: bool,
|
|
99
|
+
force: bool,
|
|
100
|
+
tracker: InstallTracker | None = None,
|
|
101
|
+
) -> bool:
|
|
102
|
+
"""Copy src to dst, respecting dry-run, force, and idempotency.
|
|
103
|
+
|
|
104
|
+
Returns True on success (including skip), False on failure.
|
|
105
|
+
"""
|
|
106
|
+
if not src.is_file():
|
|
107
|
+
_warn(f"Source not found, skipping: {src}")
|
|
108
|
+
return True # not a hard failure
|
|
109
|
+
|
|
110
|
+
if dry_run:
|
|
111
|
+
_dry(f"Would copy: {src.name} → {dst}")
|
|
112
|
+
return True
|
|
113
|
+
|
|
114
|
+
if _files_identical(src, dst):
|
|
115
|
+
_skip(f"Already up to date: {dst}")
|
|
116
|
+
return True
|
|
117
|
+
|
|
118
|
+
if dst.exists() and not force:
|
|
119
|
+
_skip(f"Preserving user-owned file (use --force to overwrite): {dst}")
|
|
120
|
+
return True
|
|
121
|
+
|
|
122
|
+
try:
|
|
123
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
124
|
+
shutil.copy2(src, dst)
|
|
125
|
+
_ok(f"Installed: {dst}")
|
|
126
|
+
if tracker is not None:
|
|
127
|
+
tracker.record_created(dst)
|
|
128
|
+
return True
|
|
129
|
+
except PermissionError as exc:
|
|
130
|
+
_err(f"Permission denied writing {dst}: {exc}")
|
|
131
|
+
return False
|
|
132
|
+
except OSError as exc:
|
|
133
|
+
_err(f"Failed to copy {src} → {dst}: {exc}")
|
|
134
|
+
return False
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def _copy_dir(
|
|
138
|
+
src_dir: Path,
|
|
139
|
+
dst_dir: Path,
|
|
140
|
+
*,
|
|
141
|
+
dry_run: bool,
|
|
142
|
+
force: bool,
|
|
143
|
+
tracker: InstallTracker | None = None,
|
|
144
|
+
) -> bool:
|
|
145
|
+
"""Recursively copy all files from src_dir into dst_dir."""
|
|
146
|
+
if not src_dir.is_dir():
|
|
147
|
+
_warn(f"Source directory not found, skipping: {src_dir}")
|
|
148
|
+
return True
|
|
149
|
+
|
|
150
|
+
if dry_run:
|
|
151
|
+
count = sum(1 for _ in src_dir.rglob("*") if _.is_file())
|
|
152
|
+
_dry(f"Would copy {count} file(s) from {src_dir.name}/ → {dst_dir}/")
|
|
153
|
+
return True
|
|
154
|
+
|
|
155
|
+
success = True
|
|
156
|
+
for src_file in sorted(src_dir.rglob("*")):
|
|
157
|
+
if not src_file.is_file():
|
|
158
|
+
continue
|
|
159
|
+
rel = src_file.relative_to(src_dir)
|
|
160
|
+
dst_file = dst_dir / rel
|
|
161
|
+
if not _copy_file(src_file, dst_file, dry_run=dry_run, force=force, tracker=tracker):
|
|
162
|
+
success = False
|
|
163
|
+
return success
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
# ---------------------------------------------------------------------------
|
|
167
|
+
# Tool detection
|
|
168
|
+
# ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _detect_claude_code() -> bool:
|
|
172
|
+
home = Path.home()
|
|
173
|
+
return shutil.which("claude") is not None or (home / ".claude").is_dir()
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def _detect_cursor() -> bool:
|
|
177
|
+
home = Path.home()
|
|
178
|
+
return shutil.which("cursor") is not None or (home / ".cursor").is_dir()
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def _detect_opencode() -> bool:
|
|
182
|
+
home = Path.home()
|
|
183
|
+
return shutil.which("opencode") is not None or (home / ".config" / "opencode").is_dir()
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def _detect_windsurf() -> bool:
|
|
187
|
+
home = Path.home()
|
|
188
|
+
return (
|
|
189
|
+
shutil.which("windsurf") is not None
|
|
190
|
+
or (home / ".codeium" / "windsurf").is_dir()
|
|
191
|
+
or (home / ".windsurf").is_dir()
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def _detect_pi() -> bool:
|
|
196
|
+
home = Path.home()
|
|
197
|
+
return shutil.which("pi") is not None or (home / ".pi").is_dir()
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def _detect_muse() -> bool:
|
|
201
|
+
home = Path.home()
|
|
202
|
+
return (
|
|
203
|
+
shutil.which("muse") is not None
|
|
204
|
+
or (home / ".config" / "muse").is_dir()
|
|
205
|
+
or (home / ".agents").is_dir()
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def _windsurf_config_dir() -> Path:
|
|
210
|
+
home = Path.home()
|
|
211
|
+
if (home / ".codeium" / "windsurf").is_dir():
|
|
212
|
+
return home / ".codeium" / "windsurf"
|
|
213
|
+
if (home / ".windsurf").is_dir():
|
|
214
|
+
return home / ".windsurf"
|
|
215
|
+
return home / ".codeium" / "windsurf"
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
# ---------------------------------------------------------------------------
|
|
219
|
+
# Per-tool installers
|
|
220
|
+
# ---------------------------------------------------------------------------
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def _install_agent_files(
|
|
224
|
+
tool: str,
|
|
225
|
+
dst_dir: Path,
|
|
226
|
+
*,
|
|
227
|
+
dry_run: bool,
|
|
228
|
+
force: bool,
|
|
229
|
+
data_root: Path | None = None,
|
|
230
|
+
tracker: InstallTracker | None = None,
|
|
231
|
+
) -> bool:
|
|
232
|
+
"""Install agent files from compiled plugins/ or profiles/ fallback."""
|
|
233
|
+
root = data_root or toolkit_root()
|
|
234
|
+
agents = agent_install_sources(tool, data_root=root)
|
|
235
|
+
if not agents:
|
|
236
|
+
_warn(f"No agent sources found for {tool}")
|
|
237
|
+
return True
|
|
238
|
+
|
|
239
|
+
plugins = plugins_dir(root)
|
|
240
|
+
if plugins is not None:
|
|
241
|
+
_info(f"Using compiler artifacts from {plugins}")
|
|
242
|
+
|
|
243
|
+
success = True
|
|
244
|
+
for name, src in sorted(agents.items()):
|
|
245
|
+
dst = dst_dir / f"{name}.md"
|
|
246
|
+
success &= _copy_file(src, dst, dry_run=dry_run, force=force, tracker=tracker)
|
|
247
|
+
return success
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _install_claude_code(*, dry_run: bool, force: bool) -> bool:
|
|
251
|
+
print()
|
|
252
|
+
_info("Installing: Claude Code")
|
|
253
|
+
root = toolkit_root()
|
|
254
|
+
profile = profile_file("claude-code", data_root=root)
|
|
255
|
+
|
|
256
|
+
if not profile.is_dir() and not compiled_agent_files(root):
|
|
257
|
+
_warn(f"Profile directory not found: {profile}")
|
|
258
|
+
return False
|
|
259
|
+
|
|
260
|
+
home = Path.home()
|
|
261
|
+
success = True
|
|
262
|
+
# Install instruction/agent files only. Never write ~/.claude/settings.json —
|
|
263
|
+
# that file is user-owned (plugins, permissions, env). Target contract:
|
|
264
|
+
# distributions/targets/claude-code.yaml → plugin_settings_scope: plugin-local.
|
|
265
|
+
claude_md = profile_file("claude-code", "CLAUDE.md", data_root=root)
|
|
266
|
+
if claude_md.is_file():
|
|
267
|
+
success &= _copy_file(
|
|
268
|
+
claude_md,
|
|
269
|
+
home / ".claude" / "CLAUDE.md",
|
|
270
|
+
dry_run=dry_run,
|
|
271
|
+
force=force,
|
|
272
|
+
)
|
|
273
|
+
settings_src = profile / "settings.json"
|
|
274
|
+
if settings_src.is_file():
|
|
275
|
+
_info(
|
|
276
|
+
"Skipping ~/.claude/settings.json (user-owned). "
|
|
277
|
+
"Use Claude Code marketplace plugins for toolkit capabilities; "
|
|
278
|
+
f"reference profile kept at {settings_src}"
|
|
279
|
+
)
|
|
280
|
+
success &= _install_agent_files(
|
|
281
|
+
"claude-code",
|
|
282
|
+
home / ".claude" / "agents",
|
|
283
|
+
dry_run=dry_run,
|
|
284
|
+
force=force,
|
|
285
|
+
data_root=root,
|
|
286
|
+
)
|
|
287
|
+
return success
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
def _install_cursor(*, dry_run: bool, force: bool) -> bool:
|
|
291
|
+
from agent_toolkit.installer.tracking import InstallTracker
|
|
292
|
+
|
|
293
|
+
print()
|
|
294
|
+
_info("Installing: Cursor")
|
|
295
|
+
root = toolkit_root()
|
|
296
|
+
src = profile_file("cursor", "rules", data_root=root)
|
|
297
|
+
tracker = InstallTracker("cursor", dry_run=dry_run, toolkit_root=root)
|
|
298
|
+
|
|
299
|
+
if not src.is_dir():
|
|
300
|
+
_warn(f"Cursor rules directory not found: {src}")
|
|
301
|
+
return False
|
|
302
|
+
|
|
303
|
+
ok = _copy_dir(
|
|
304
|
+
src,
|
|
305
|
+
Path.home() / ".cursor" / "rules",
|
|
306
|
+
dry_run=dry_run,
|
|
307
|
+
force=force,
|
|
308
|
+
tracker=tracker,
|
|
309
|
+
)
|
|
310
|
+
if ok and tracker.save():
|
|
311
|
+
_ok("Saved install receipt for cursor")
|
|
312
|
+
return ok
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def _install_json_config(
|
|
316
|
+
src: Path,
|
|
317
|
+
dst: Path,
|
|
318
|
+
*,
|
|
319
|
+
dry_run: bool,
|
|
320
|
+
force: bool,
|
|
321
|
+
) -> bool:
|
|
322
|
+
"""Install a JSON config with non-destructive merge when dst already exists."""
|
|
323
|
+
if not src.is_file():
|
|
324
|
+
_warn(f"Source not found, skipping: {src}")
|
|
325
|
+
return True
|
|
326
|
+
|
|
327
|
+
if dry_run:
|
|
328
|
+
if dst.is_file() and not force:
|
|
329
|
+
_dry(f"Would merge: {src.name} → {dst}")
|
|
330
|
+
else:
|
|
331
|
+
_dry(f"Would copy: {src.name} → {dst}")
|
|
332
|
+
return True
|
|
333
|
+
|
|
334
|
+
try:
|
|
335
|
+
merged, patches, ownership = merge_json_file(src, dst, force=force)
|
|
336
|
+
except (json.JSONDecodeError, OSError) as exc:
|
|
337
|
+
_err(f"Failed to merge {src} → {dst}: {exc}")
|
|
338
|
+
return False
|
|
339
|
+
|
|
340
|
+
if ownership == "unchanged":
|
|
341
|
+
_skip(f"Already up to date: {dst}")
|
|
342
|
+
return True
|
|
343
|
+
|
|
344
|
+
if ownership == "skipped":
|
|
345
|
+
_skip(f"Preserving user-owned file (use --force to overwrite): {dst}")
|
|
346
|
+
return True
|
|
347
|
+
|
|
348
|
+
if merged is None:
|
|
349
|
+
return _copy_file(src, dst, dry_run=False, force=force)
|
|
350
|
+
|
|
351
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
352
|
+
dst.write_text(json.dumps(merged, indent=2) + "\n", encoding="utf-8")
|
|
353
|
+
if ownership == "merged" and patches:
|
|
354
|
+
_ok(f"Merged config ({len(patches)} key(s) added): {dst}")
|
|
355
|
+
else:
|
|
356
|
+
_ok(f"Installed: {dst}")
|
|
357
|
+
return True
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
def _install_opencode(*, dry_run: bool, force: bool) -> bool:
|
|
361
|
+
print()
|
|
362
|
+
_info("Installing: OpenCode")
|
|
363
|
+
root = toolkit_root()
|
|
364
|
+
profile = profile_file("opencode", data_root=root)
|
|
365
|
+
|
|
366
|
+
if not profile.is_dir() and not compiled_agent_files(root):
|
|
367
|
+
_warn(f"OpenCode profile directory not found: {profile}")
|
|
368
|
+
return False
|
|
369
|
+
|
|
370
|
+
opencode_json = profile_file("opencode", "opencode.json", data_root=root)
|
|
371
|
+
if opencode_json.is_file():
|
|
372
|
+
try:
|
|
373
|
+
profile_data = json.loads(opencode_json.read_text(encoding="utf-8"))
|
|
374
|
+
except json.JSONDecodeError as exc:
|
|
375
|
+
_err(f"Invalid profiles/opencode/opencode.json: {exc}")
|
|
376
|
+
return False
|
|
377
|
+
from agent_toolkit.compiler.targets.opencode import OpenCodeAdapter
|
|
378
|
+
|
|
379
|
+
validation_errors = OpenCodeAdapter.validate_opencode_json(profile_data)
|
|
380
|
+
if validation_errors:
|
|
381
|
+
for msg in validation_errors:
|
|
382
|
+
_err(msg)
|
|
383
|
+
return False
|
|
384
|
+
|
|
385
|
+
home = Path.home()
|
|
386
|
+
success = True
|
|
387
|
+
if opencode_json.is_file():
|
|
388
|
+
success &= _install_json_config(
|
|
389
|
+
opencode_json,
|
|
390
|
+
home / ".config" / "opencode" / "opencode.json",
|
|
391
|
+
dry_run=dry_run,
|
|
392
|
+
force=force,
|
|
393
|
+
)
|
|
394
|
+
success &= _install_agent_files(
|
|
395
|
+
"opencode",
|
|
396
|
+
home / ".config" / "opencode" / "agents",
|
|
397
|
+
dry_run=dry_run,
|
|
398
|
+
force=force,
|
|
399
|
+
data_root=root,
|
|
400
|
+
)
|
|
401
|
+
return success
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
def _install_copilot(*, dry_run: bool, force: bool) -> bool:
|
|
405
|
+
print()
|
|
406
|
+
_info("Installing: GitHub Copilot")
|
|
407
|
+
_info("Copilot instructions are per-project and committed to the repository.")
|
|
408
|
+
|
|
409
|
+
src = toolkit_root() / "profiles" / "copilot" / "copilot-instructions.md"
|
|
410
|
+
if not src.is_file():
|
|
411
|
+
_warn(f"Copilot instructions not found: {src}")
|
|
412
|
+
return False
|
|
413
|
+
|
|
414
|
+
if dry_run:
|
|
415
|
+
_dry("Would copy copilot-instructions.md to <project>/.github/")
|
|
416
|
+
return True
|
|
417
|
+
|
|
418
|
+
import sys as _sys
|
|
419
|
+
|
|
420
|
+
if not _sys.stdin.isatty():
|
|
421
|
+
_skip("Non-interactive — run 'agent-toolkit install --tools copilot' interactively")
|
|
422
|
+
return True
|
|
423
|
+
|
|
424
|
+
try:
|
|
425
|
+
project_dir_raw = input(" Enter project directory path (or press Enter to skip): ").strip()
|
|
426
|
+
except EOFError:
|
|
427
|
+
project_dir_raw = ""
|
|
428
|
+
|
|
429
|
+
if not project_dir_raw:
|
|
430
|
+
_skip("No project directory specified — skipping Copilot install")
|
|
431
|
+
_info(f"To install manually: cp {src} <your-project>/.github/copilot-instructions.md")
|
|
432
|
+
return True
|
|
433
|
+
|
|
434
|
+
# Expand tilde
|
|
435
|
+
project_dir = Path(project_dir_raw).expanduser().resolve()
|
|
436
|
+
|
|
437
|
+
if not project_dir.is_dir():
|
|
438
|
+
_err(f"Directory not found: {project_dir}")
|
|
439
|
+
return False
|
|
440
|
+
|
|
441
|
+
dst = project_dir / ".github" / "copilot-instructions.md"
|
|
442
|
+
success = _copy_file(src, dst, dry_run=dry_run, force=force)
|
|
443
|
+
if success:
|
|
444
|
+
_info("Remember to: git add .github/copilot-instructions.md && git commit")
|
|
445
|
+
return success
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
def _install_windsurf(*, dry_run: bool, force: bool) -> bool:
|
|
449
|
+
print()
|
|
450
|
+
_info("Installing: Windsurf")
|
|
451
|
+
src = toolkit_root() / "profiles" / "windsurf"
|
|
452
|
+
|
|
453
|
+
if not src.is_dir():
|
|
454
|
+
_warn(f"Windsurf profile directory not found: {src}")
|
|
455
|
+
return False
|
|
456
|
+
|
|
457
|
+
config_dir = _windsurf_config_dir()
|
|
458
|
+
success = True
|
|
459
|
+
if (src / "rules").is_dir():
|
|
460
|
+
success &= _copy_dir(src / "rules", config_dir / "rules", dry_run=dry_run, force=force)
|
|
461
|
+
if (src / "memories").is_dir():
|
|
462
|
+
success &= _copy_dir(
|
|
463
|
+
src / "memories", config_dir / "memories", dry_run=dry_run, force=force
|
|
464
|
+
)
|
|
465
|
+
return success
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
def _install_muse(*, dry_run: bool, force: bool) -> bool:
|
|
469
|
+
print()
|
|
470
|
+
_info("Installing: Muse Code (Meta)")
|
|
471
|
+
# Muse uses Agent Skills spec: ~/.config/muse/skills (user) and .agents/skills (project)
|
|
472
|
+
# We deploy compiled skills from the build output or profile fallback
|
|
473
|
+
from agent_toolkit._paths import toolkit_root as _root
|
|
474
|
+
|
|
475
|
+
# Prefer compiled output if available
|
|
476
|
+
# Prefer compiled output per product if available
|
|
477
|
+
for prod in ("agent-toolkit-complete", "agent-toolkit-core"):
|
|
478
|
+
compiled = _root() / "plugins" / prod / "skills"
|
|
479
|
+
if compiled.is_dir():
|
|
480
|
+
success = _copy_dir(
|
|
481
|
+
compiled, Path.home() / ".config" / "muse" / "skills", dry_run=dry_run, force=force
|
|
482
|
+
)
|
|
483
|
+
# Also ensure universal .agents/skills gets populated for project-scope compatibility
|
|
484
|
+
_copy_dir(compiled, Path.home() / ".agents" / "skills", dry_run=dry_run, force=force)
|
|
485
|
+
return success
|
|
486
|
+
# Check dedicated muse plugin dir
|
|
487
|
+
compiled = _root() / "plugins" / "muse-code"
|
|
488
|
+
if compiled.is_dir():
|
|
489
|
+
src = compiled / "skills"
|
|
490
|
+
if src.is_dir():
|
|
491
|
+
success = _copy_dir(
|
|
492
|
+
src, Path.home() / ".config" / "muse" / "skills", dry_run=dry_run, force=force
|
|
493
|
+
)
|
|
494
|
+
_copy_dir(src, Path.home() / ".agents" / "skills", dry_run=dry_run, force=force)
|
|
495
|
+
return success
|
|
496
|
+
# Fallback: direct skills source (portable SKILL.md)
|
|
497
|
+
src_skills = _root() / "skills"
|
|
498
|
+
if src_skills.is_dir():
|
|
499
|
+
# Count skills for dry-run feedback
|
|
500
|
+
if not dry_run:
|
|
501
|
+
_copy_dir(
|
|
502
|
+
src_skills,
|
|
503
|
+
Path.home() / ".config" / "muse" / "skills",
|
|
504
|
+
dry_run=dry_run,
|
|
505
|
+
force=force,
|
|
506
|
+
)
|
|
507
|
+
_copy_dir(src_skills, Path.home() / ".agents" / "skills", dry_run=dry_run, force=force)
|
|
508
|
+
return True
|
|
509
|
+
# dry-run: report count
|
|
510
|
+
count = sum(1 for _ in (src_skills).rglob("SKILL.md") if _.is_file())
|
|
511
|
+
_info(f"Would deploy {count} skills to ~/.config/muse/skills/ and ~/.agents/skills/")
|
|
512
|
+
return True
|
|
513
|
+
# Fallback: copy profile if exists
|
|
514
|
+
src_profile = _root() / "profiles" / "muse-code"
|
|
515
|
+
if src_profile.is_dir():
|
|
516
|
+
return _copy_dir(
|
|
517
|
+
src_profile, Path.home() / ".config" / "muse", dry_run=dry_run, force=force
|
|
518
|
+
)
|
|
519
|
+
# Generic fallback: install universal skills via installer
|
|
520
|
+
_info("No pre-built Muse profile; using universal skills via agent-toolkit build")
|
|
521
|
+
return True
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
def _install_pi(*, dry_run: bool, force: bool) -> bool:
|
|
525
|
+
print()
|
|
526
|
+
_info("Installing: Pi Coding Agent")
|
|
527
|
+
src = toolkit_root() / "profiles" / "pi" / "skills"
|
|
528
|
+
|
|
529
|
+
if not src.is_dir():
|
|
530
|
+
_warn(f"Pi skills directory not found: {src}")
|
|
531
|
+
return False
|
|
532
|
+
|
|
533
|
+
return _copy_dir(src, Path.home() / ".pi" / "agent" / "skills", dry_run=dry_run, force=force)
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
# ---------------------------------------------------------------------------
|
|
537
|
+
# Argument parsing
|
|
538
|
+
# ---------------------------------------------------------------------------
|
|
539
|
+
|
|
540
|
+
_VALID_TOOLS = (
|
|
541
|
+
"claude-code",
|
|
542
|
+
"cursor",
|
|
543
|
+
"opencode",
|
|
544
|
+
"copilot",
|
|
545
|
+
"windsurf",
|
|
546
|
+
"pi",
|
|
547
|
+
"muse-code",
|
|
548
|
+
"muse",
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
# Sentinel parse outcomes — must not be confused with a successful empty-tools tuple.
|
|
553
|
+
_PARSE_HELP = object()
|
|
554
|
+
_PARSE_ERROR = object()
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
def _parse_args(args: list[str]):
|
|
558
|
+
"""Return (tools, dry_run, force, offline), _PARSE_HELP, or _PARSE_ERROR."""
|
|
559
|
+
dry_run = False
|
|
560
|
+
force = False
|
|
561
|
+
offline = False
|
|
562
|
+
requested: str = ""
|
|
563
|
+
|
|
564
|
+
i = 0
|
|
565
|
+
while i < len(args):
|
|
566
|
+
arg = args[i]
|
|
567
|
+
if arg in ("-h", "--help"):
|
|
568
|
+
print(__doc__)
|
|
569
|
+
return _PARSE_HELP
|
|
570
|
+
elif arg == "--dry-run":
|
|
571
|
+
dry_run = True
|
|
572
|
+
elif arg == "--force":
|
|
573
|
+
force = True
|
|
574
|
+
elif arg == "--offline":
|
|
575
|
+
offline = True
|
|
576
|
+
elif arg == "--tools":
|
|
577
|
+
if i + 1 >= len(args):
|
|
578
|
+
_err("--tools requires an argument")
|
|
579
|
+
return _PARSE_ERROR
|
|
580
|
+
requested = args[i + 1]
|
|
581
|
+
i += 1
|
|
582
|
+
else:
|
|
583
|
+
_err(f"Unknown option: {arg} (run 'agent-toolkit install --help' for usage)")
|
|
584
|
+
return _PARSE_ERROR
|
|
585
|
+
i += 1
|
|
586
|
+
|
|
587
|
+
tools: list[str] = []
|
|
588
|
+
if requested:
|
|
589
|
+
tools = [t.strip() for t in requested.split(",") if t.strip()]
|
|
590
|
+
return tools, dry_run, force, offline
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
# ---------------------------------------------------------------------------
|
|
594
|
+
# Main entry point
|
|
595
|
+
# ---------------------------------------------------------------------------
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
def cmd_install(args: list[str]) -> int:
|
|
599
|
+
"""Install agent-toolkit profiles for AI coding assistants.
|
|
600
|
+
|
|
601
|
+
Returns 0 on success, 1 on install failure, 2 on usage/parse errors.
|
|
602
|
+
"""
|
|
603
|
+
result = _parse_args(args)
|
|
604
|
+
if result is _PARSE_HELP:
|
|
605
|
+
return 0
|
|
606
|
+
if result is _PARSE_ERROR:
|
|
607
|
+
return 2
|
|
608
|
+
|
|
609
|
+
tools, dry_run, force, offline = result
|
|
610
|
+
|
|
611
|
+
if offline:
|
|
612
|
+
os.environ["AGENT_TOOLKIT_OFFLINE"] = "1"
|
|
613
|
+
_info("Offline mode — using bundled data only")
|
|
614
|
+
|
|
615
|
+
print()
|
|
616
|
+
print("agent-toolkit installer")
|
|
617
|
+
print(f"Toolkit: {toolkit_root()}")
|
|
618
|
+
|
|
619
|
+
if dry_run:
|
|
620
|
+
print()
|
|
621
|
+
_warn("DRY RUN — no files will be written")
|
|
622
|
+
|
|
623
|
+
# Determine tools
|
|
624
|
+
if not tools:
|
|
625
|
+
print()
|
|
626
|
+
_info("Auto-detecting installed AI tools...")
|
|
627
|
+
if _detect_claude_code():
|
|
628
|
+
tools.append("claude-code")
|
|
629
|
+
_info(" Detected: Claude Code")
|
|
630
|
+
if _detect_cursor():
|
|
631
|
+
tools.append("cursor")
|
|
632
|
+
_info(" Detected: Cursor")
|
|
633
|
+
if _detect_opencode():
|
|
634
|
+
tools.append("opencode")
|
|
635
|
+
_info(" Detected: OpenCode")
|
|
636
|
+
if _detect_windsurf():
|
|
637
|
+
tools.append("windsurf")
|
|
638
|
+
_info(" Detected: Windsurf")
|
|
639
|
+
if _detect_pi():
|
|
640
|
+
tools.append("pi")
|
|
641
|
+
_info(" Detected: Pi Coding Agent")
|
|
642
|
+
if _detect_muse():
|
|
643
|
+
tools.append("muse-code")
|
|
644
|
+
_info(" Detected: Muse Code")
|
|
645
|
+
|
|
646
|
+
# Copilot is per-project and requires a path — never auto-install.
|
|
647
|
+
# Only installed when explicitly passed via --tools copilot.
|
|
648
|
+
_info(" [info] Copilot: use --tools copilot to install per-project")
|
|
649
|
+
|
|
650
|
+
if not tools:
|
|
651
|
+
_warn("No AI tools detected. Install at least one supported tool and re-run,")
|
|
652
|
+
_warn(
|
|
653
|
+
"or specify with: --tools claude-code,cursor,opencode,copilot,windsurf,pi,muse-code"
|
|
654
|
+
)
|
|
655
|
+
return 1
|
|
656
|
+
|
|
657
|
+
print()
|
|
658
|
+
_info(f"Tools to install: {', '.join(tools)}")
|
|
659
|
+
|
|
660
|
+
installed: list[str] = []
|
|
661
|
+
skipped: list[str] = []
|
|
662
|
+
failed: list[str] = []
|
|
663
|
+
|
|
664
|
+
_installers = {
|
|
665
|
+
"claude-code": _install_claude_code,
|
|
666
|
+
"cursor": _install_cursor,
|
|
667
|
+
"opencode": _install_opencode,
|
|
668
|
+
"copilot": _install_copilot,
|
|
669
|
+
"windsurf": _install_windsurf,
|
|
670
|
+
"pi": _install_pi,
|
|
671
|
+
"muse-code": _install_muse,
|
|
672
|
+
"muse": _install_muse,
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
for tool in tools:
|
|
676
|
+
installer = _installers.get(tool)
|
|
677
|
+
if installer is None:
|
|
678
|
+
_warn(f"Unknown tool: {tool} (valid: {', '.join(_VALID_TOOLS)})")
|
|
679
|
+
skipped.append(tool)
|
|
680
|
+
continue
|
|
681
|
+
ok = installer(dry_run=dry_run, force=force)
|
|
682
|
+
if ok:
|
|
683
|
+
installed.append(tool)
|
|
684
|
+
else:
|
|
685
|
+
failed.append(tool)
|
|
686
|
+
|
|
687
|
+
print()
|
|
688
|
+
print("----------------------------------------------------------------------")
|
|
689
|
+
print("Installation summary")
|
|
690
|
+
|
|
691
|
+
if installed:
|
|
692
|
+
_ok(f"Installed: {', '.join(installed)}")
|
|
693
|
+
if skipped:
|
|
694
|
+
_skip(f"Skipped: {', '.join(skipped)}")
|
|
695
|
+
if failed:
|
|
696
|
+
_err(f"Failed: {', '.join(failed)}")
|
|
697
|
+
|
|
698
|
+
print()
|
|
699
|
+
_info("Next steps:")
|
|
700
|
+
_info(" 1. Restart your AI tool(s) to load the new profiles")
|
|
701
|
+
_info(" 2. Run 'agent-toolkit doctor' to verify the installation")
|
|
702
|
+
_info(" 3. See docs/MCP.md to configure external service integrations")
|
|
703
|
+
_info(" 4. See docs/PROFILES.md for per-tool customization options")
|
|
704
|
+
print()
|
|
705
|
+
|
|
706
|
+
return 1 if failed else 0
|