@softspark/ai-toolkit 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/AGENTS.md +412 -0
- package/CHANGELOG.md +68 -0
- package/LICENSE +21 -0
- package/README.md +632 -0
- package/action.yml +53 -0
- package/app/.claude-plugin/plugin.json +44 -0
- package/app/ARCHITECTURE.md +306 -0
- package/app/CLAUDE.md.template +23 -0
- package/app/agents/ai-engineer.md +128 -0
- package/app/agents/backend-specialist.md +193 -0
- package/app/agents/business-intelligence.md +54 -0
- package/app/agents/chaos-monkey.md +67 -0
- package/app/agents/chief-of-staff.md +51 -0
- package/app/agents/code-archaeologist.md +127 -0
- package/app/agents/code-reviewer.md +184 -0
- package/app/agents/command-expert.md +131 -0
- package/app/agents/data-analyst.md +205 -0
- package/app/agents/data-scientist.md +151 -0
- package/app/agents/database-architect.md +317 -0
- package/app/agents/debugger.md +238 -0
- package/app/agents/devops-implementer.md +194 -0
- package/app/agents/documenter.md +364 -0
- package/app/agents/explorer-agent.md +145 -0
- package/app/agents/fact-checker.md +172 -0
- package/app/agents/frontend-specialist.md +209 -0
- package/app/agents/game-developer.md +216 -0
- package/app/agents/incident-responder.md +226 -0
- package/app/agents/infrastructure-architect.md +127 -0
- package/app/agents/infrastructure-validator.md +247 -0
- package/app/agents/llm-ops-engineer.md +237 -0
- package/app/agents/mcp-expert.md +228 -0
- package/app/agents/mcp-server-architect.md +195 -0
- package/app/agents/mcp-testing-engineer.md +292 -0
- package/app/agents/meta-architect.md +58 -0
- package/app/agents/ml-engineer.md +136 -0
- package/app/agents/mobile-developer.md +190 -0
- package/app/agents/night-watchman.md +55 -0
- package/app/agents/nlp-engineer.md +154 -0
- package/app/agents/orchestrator.md +437 -0
- package/app/agents/performance-optimizer.md +254 -0
- package/app/agents/predictive-analyst.md +57 -0
- package/app/agents/product-manager.md +194 -0
- package/app/agents/project-planner.md +287 -0
- package/app/agents/prompt-engineer.md +103 -0
- package/app/agents/qa-automation-engineer.md +182 -0
- package/app/agents/rag-engineer.md +201 -0
- package/app/agents/research-synthesizer.md +138 -0
- package/app/agents/search-specialist.md +101 -0
- package/app/agents/security-architect.md +62 -0
- package/app/agents/security-auditor.md +293 -0
- package/app/agents/seo-specialist.md +111 -0
- package/app/agents/system-governor.md +57 -0
- package/app/agents/tech-lead.md +62 -0
- package/app/agents/technical-researcher.md +103 -0
- package/app/agents/test-engineer.md +264 -0
- package/app/constitution.md +38 -0
- package/app/hooks/_profile-check.sh +11 -0
- package/app/hooks/guard-destructive.sh +74 -0
- package/app/hooks/guard-path.sh +73 -0
- package/app/hooks/post-tool-use.sh +35 -0
- package/app/hooks/pre-compact.sh +31 -0
- package/app/hooks/quality-check.sh +22 -0
- package/app/hooks/quality-gate.sh +49 -0
- package/app/hooks/save-session.sh +24 -0
- package/app/hooks/session-end.sh +37 -0
- package/app/hooks/session-start.sh +29 -0
- package/app/hooks/subagent-start.sh +16 -0
- package/app/hooks/subagent-stop.sh +16 -0
- package/app/hooks/track-usage.sh +50 -0
- package/app/hooks/user-prompt-submit.sh +25 -0
- package/app/hooks.json +178 -0
- package/app/mcp-defaults.json +23 -0
- package/app/output-styles/golden-rules.md +43 -0
- package/app/plugins/README.md +19 -0
- package/app/plugins/csharp-pack/README.md +11 -0
- package/app/plugins/csharp-pack/plugin.json +18 -0
- package/app/plugins/enterprise-pack/README.md +16 -0
- package/app/plugins/enterprise-pack/hooks/output-style.sh +6 -0
- package/app/plugins/enterprise-pack/hooks/status-line.sh +8 -0
- package/app/plugins/enterprise-pack/plugin.json +24 -0
- package/app/plugins/frontend-pack/README.md +14 -0
- package/app/plugins/frontend-pack/plugin.json +22 -0
- package/app/plugins/java-pack/README.md +11 -0
- package/app/plugins/java-pack/plugin.json +18 -0
- package/app/plugins/kotlin-pack/README.md +11 -0
- package/app/plugins/kotlin-pack/plugin.json +18 -0
- package/app/plugins/memory-pack/README.md +24 -0
- package/app/plugins/memory-pack/hooks/observation-capture.sh +67 -0
- package/app/plugins/memory-pack/hooks/session-summary.sh +71 -0
- package/app/plugins/memory-pack/plugin.json +22 -0
- package/app/plugins/memory-pack/scripts/init_db.py +81 -0
- package/app/plugins/memory-pack/scripts/strip_private.py +22 -0
- package/app/plugins/memory-pack/skills/mem-search/SKILL.md +70 -0
- package/app/plugins/research-pack/README.md +14 -0
- package/app/plugins/research-pack/plugin.json +22 -0
- package/app/plugins/ruby-pack/README.md +11 -0
- package/app/plugins/ruby-pack/plugin.json +18 -0
- package/app/plugins/rust-pack/README.md +11 -0
- package/app/plugins/rust-pack/plugin.json +18 -0
- package/app/plugins/security-pack/README.md +15 -0
- package/app/plugins/security-pack/plugin.json +23 -0
- package/app/plugins/swift-pack/README.md +11 -0
- package/app/plugins/swift-pack/plugin.json +18 -0
- package/app/rules/claude-toolkit-rules.md +21 -0
- package/app/rules/git-conventions.md +5 -0
- package/app/rules/quality-gates.md +10 -0
- package/app/skills/_lib/__init__.py +1 -0
- package/app/skills/_lib/detect_utils.py +150 -0
- package/app/skills/agent-creator/SKILL.md +82 -0
- package/app/skills/analyze/SKILL.md +92 -0
- package/app/skills/analyze/scripts/complexity.py +165 -0
- package/app/skills/api-patterns/SKILL.md +305 -0
- package/app/skills/app-builder/SKILL.md +187 -0
- package/app/skills/architecture-audit/SKILL.md +141 -0
- package/app/skills/architecture-decision/SKILL.md +55 -0
- package/app/skills/architecture-decision/templates/adr-template.md +36 -0
- package/app/skills/biz-scan/SKILL.md +30 -0
- package/app/skills/briefing/SKILL.md +27 -0
- package/app/skills/build/SKILL.md +97 -0
- package/app/skills/build/scripts/detect-build.py +151 -0
- package/app/skills/chaos/SKILL.md +32 -0
- package/app/skills/ci/SKILL.md +77 -0
- package/app/skills/ci/scripts/ci-detect.py +135 -0
- package/app/skills/ci/templates/github-actions-node.yml +38 -0
- package/app/skills/ci/templates/github-actions-python.yml +42 -0
- package/app/skills/ci-cd-patterns/SKILL.md +299 -0
- package/app/skills/clean-code/SKILL.md +110 -0
- package/app/skills/clean-code/reference/dart.md +18 -0
- package/app/skills/clean-code/reference/go.md +23 -0
- package/app/skills/clean-code/reference/php.md +32 -0
- package/app/skills/clean-code/reference/python.md +180 -0
- package/app/skills/clean-code/reference/typescript.md +26 -0
- package/app/skills/command-creator/SKILL.md +83 -0
- package/app/skills/commit/SKILL.md +98 -0
- package/app/skills/commit/scripts/pre-commit-check.py +87 -0
- package/app/skills/commit/templates/conventional-commit.md +52 -0
- package/app/skills/csharp-patterns/SKILL.md +450 -0
- package/app/skills/database-patterns/SKILL.md +297 -0
- package/app/skills/debug/SKILL.md +154 -0
- package/app/skills/debug/scripts/error-parser.py +187 -0
- package/app/skills/debugging-tactics/SKILL.md +136 -0
- package/app/skills/deploy/SKILL.md +130 -0
- package/app/skills/deploy/scripts/pre_deploy_check.py +171 -0
- package/app/skills/deploy/templates/deployment-checklist.md +31 -0
- package/app/skills/design-an-interface/SKILL.md +105 -0
- package/app/skills/design-engineering/SKILL.md +260 -0
- package/app/skills/docker-devops/SKILL.md +303 -0
- package/app/skills/docs/SKILL.md +145 -0
- package/app/skills/docs/scripts/doc-inventory.py +176 -0
- package/app/skills/docs/templates/adr-template.md +36 -0
- package/app/skills/docs/templates/readme-template.md +67 -0
- package/app/skills/documentation-standards/SKILL.md +191 -0
- package/app/skills/ecommerce-patterns/SKILL.md +209 -0
- package/app/skills/evaluate/SKILL.md +132 -0
- package/app/skills/evolve/SKILL.md +27 -0
- package/app/skills/explain/SKILL.md +54 -0
- package/app/skills/explain/scripts/dependency-graph.py +215 -0
- package/app/skills/explore/SKILL.md +112 -0
- package/app/skills/explore/scripts/visualize.py +117 -0
- package/app/skills/fix/SKILL.md +78 -0
- package/app/skills/fix/scripts/error-classifier.py +191 -0
- package/app/skills/flutter-patterns/SKILL.md +254 -0
- package/app/skills/git-mastery/SKILL.md +70 -0
- package/app/skills/grill-me/SKILL.md +38 -0
- package/app/skills/health/SKILL.md +91 -0
- package/app/skills/health/scripts/health_check.py +162 -0
- package/app/skills/hive-mind/SKILL.md +56 -0
- package/app/skills/hook-creator/SKILL.md +107 -0
- package/app/skills/index/SKILL.md +74 -0
- package/app/skills/instinct-review/SKILL.md +77 -0
- package/app/skills/java-patterns/SKILL.md +442 -0
- package/app/skills/kotlin-patterns/SKILL.md +446 -0
- package/app/skills/lint/SKILL.md +103 -0
- package/app/skills/lint/scripts/detect-linters.py +112 -0
- package/app/skills/mcp-patterns/SKILL.md +270 -0
- package/app/skills/mem-search/SKILL.md +70 -0
- package/app/skills/migrate/SKILL.md +90 -0
- package/app/skills/migrate/scripts/migration-status.py +195 -0
- package/app/skills/migration-patterns/SKILL.md +260 -0
- package/app/skills/night-watch/SKILL.md +28 -0
- package/app/skills/observability-patterns/SKILL.md +203 -0
- package/app/skills/onboard/SKILL.md +76 -0
- package/app/skills/orchestrate/SKILL.md +86 -0
- package/app/skills/panic/SKILL.md +30 -0
- package/app/skills/performance-profiling/SKILL.md +59 -0
- package/app/skills/plan/SKILL.md +110 -0
- package/app/skills/plan/templates/plan-template.md +40 -0
- package/app/skills/plan-writing/SKILL.md +201 -0
- package/app/skills/plugin-creator/SKILL.md +78 -0
- package/app/skills/pr/SKILL.md +129 -0
- package/app/skills/pr/scripts/pr-summary.py +175 -0
- package/app/skills/prd-to-issues/SKILL.md +108 -0
- package/app/skills/prd-to-plan/SKILL.md +120 -0
- package/app/skills/predict/SKILL.md +30 -0
- package/app/skills/qa-session/SKILL.md +110 -0
- package/app/skills/rag-patterns/SKILL.md +203 -0
- package/app/skills/refactor/SKILL.md +124 -0
- package/app/skills/refactor/scripts/refactor-scan.py +210 -0
- package/app/skills/refactor-plan/SKILL.md +112 -0
- package/app/skills/repeat/SKILL.md +149 -0
- package/app/skills/research-mastery/SKILL.md +56 -0
- package/app/skills/review/SKILL.md +141 -0
- package/app/skills/review/scripts/diff-analyzer.py +170 -0
- package/app/skills/rollback/SKILL.md +87 -0
- package/app/skills/rollback/scripts/rollback_info.py +149 -0
- package/app/skills/ruby-patterns/SKILL.md +454 -0
- package/app/skills/rust-patterns/SKILL.md +446 -0
- package/app/skills/search/SKILL.md +64 -0
- package/app/skills/security-patterns/SKILL.md +91 -0
- package/app/skills/security-patterns/reference/authentication.md +37 -0
- package/app/skills/security-patterns/reference/authorization.md +22 -0
- package/app/skills/security-patterns/reference/input-validation.md +30 -0
- package/app/skills/security-patterns/reference/oauth-csrf-audit.md +131 -0
- package/app/skills/skill-creator/SKILL.md +154 -0
- package/app/skills/skill-creator/templates/dashboard/index.html +130 -0
- package/app/skills/skill-creator/templates/reasoning-engine/assets/example.json +12 -0
- package/app/skills/skill-creator/templates/reasoning-engine/search.py +110 -0
- package/app/skills/subagent-development/SKILL.md +225 -0
- package/app/skills/subagent-development/reference/code-quality-reviewer-prompt.md +145 -0
- package/app/skills/subagent-development/reference/implementer-prompt.md +118 -0
- package/app/skills/subagent-development/reference/spec-reviewer-prompt.md +100 -0
- package/app/skills/swarm/SKILL.md +81 -0
- package/app/skills/swift-patterns/SKILL.md +500 -0
- package/app/skills/tdd/SKILL.md +174 -0
- package/app/skills/tdd/reference/deep-modules.md +32 -0
- package/app/skills/tdd/reference/interface-design.md +32 -0
- package/app/skills/tdd/reference/mocking.md +52 -0
- package/app/skills/tdd/reference/refactoring.md +10 -0
- package/app/skills/tdd/reference/tests.md +59 -0
- package/app/skills/teams/SKILL.md +101 -0
- package/app/skills/test/SKILL.md +107 -0
- package/app/skills/test/scripts/detect-runner.py +113 -0
- package/app/skills/testing-patterns/SKILL.md +73 -0
- package/app/skills/testing-patterns/reference/flutter-testing.md +33 -0
- package/app/skills/testing-patterns/reference/go-testing.md +52 -0
- package/app/skills/testing-patterns/reference/php-phpunit.md +39 -0
- package/app/skills/testing-patterns/reference/python-pytest.md +228 -0
- package/app/skills/testing-patterns/reference/typescript-vitest.md +50 -0
- package/app/skills/triage-issue/SKILL.md +120 -0
- package/app/skills/typescript-patterns/SKILL.md +256 -0
- package/app/skills/ubiquitous-language/SKILL.md +74 -0
- package/app/skills/verification-before-completion/SKILL.md +108 -0
- package/app/skills/workflow/SKILL.md +250 -0
- package/app/skills/write-a-prd/SKILL.md +129 -0
- package/app/skills/write-a-prd/reference/visual-companion.md +78 -0
- package/app/skills/write-a-prd/scripts/frame-template.html +111 -0
- package/app/skills/write-a-prd/scripts/visual-server.cjs +79 -0
- package/app/templates/skill/generator/SKILL.md.template +40 -0
- package/app/templates/skill/knowledge/SKILL.md.template +52 -0
- package/app/templates/skill/linter/SKILL.md.template +34 -0
- package/app/templates/skill/reviewer/SKILL.md.template +51 -0
- package/app/templates/skill/workflow/SKILL.md.template +49 -0
- package/benchmarks/README.md +111 -0
- package/benchmarks/ecosystem-dashboard.json +148 -0
- package/benchmarks/ecosystem-harvest.json +148 -0
- package/benchmarks/results.json +38 -0
- package/benchmarks/run.py +351 -0
- package/bin/ai-toolkit.js +345 -0
- package/kb/best-practices/README.md +11 -0
- package/kb/howto/README.md +11 -0
- package/kb/procedures/maintenance-sop.md +306 -0
- package/kb/reference/agents-catalog.md +124 -0
- package/kb/reference/anti-pattern-registry-format.md +221 -0
- package/kb/reference/architecture-overview.md +232 -0
- package/kb/reference/benchmark-config.md +62 -0
- package/kb/reference/ci-integration.md +66 -0
- package/kb/reference/claude-ecosystem-benchmark-snapshot.md +80 -0
- package/kb/reference/claude-ecosystem-expansion-foundations.md +102 -0
- package/kb/reference/commands-catalog.md +21 -0
- package/kb/reference/distribution-model.md +63 -0
- package/kb/reference/global-install-model.md +56 -0
- package/kb/reference/hierarchical-override-pattern.md +200 -0
- package/kb/reference/hooks-catalog.md +306 -0
- package/kb/reference/integrations.md +88 -0
- package/kb/reference/language-packs.md +52 -0
- package/kb/reference/merge-friendly-install-model.md +58 -0
- package/kb/reference/plugin-pack-conventions.md +151 -0
- package/kb/reference/quick-wins-implementation-summary.md +70 -0
- package/kb/reference/skill-templates.md +50 -0
- package/kb/reference/skills-catalog.md +215 -0
- package/kb/reference/skills-unification.md +57 -0
- package/kb/reference/stats.md +69 -0
- package/kb/reference/sync.md +76 -0
- package/kb/troubleshooting/README.md +11 -0
- package/llms-full.txt +3068 -0
- package/llms.txt +39 -0
- package/package.json +75 -0
- package/scripts/_common.py +160 -0
- package/scripts/add_rule.py +50 -0
- package/scripts/benchmark_config.py +127 -0
- package/scripts/benchmark_ecosystem.py +288 -0
- package/scripts/check_deps.py +260 -0
- package/scripts/create_skill.py +118 -0
- package/scripts/doctor.py +504 -0
- package/scripts/eject.py +113 -0
- package/scripts/emission.py +256 -0
- package/scripts/evaluate_skills.py +260 -0
- package/scripts/frontmatter.py +58 -0
- package/scripts/generate_agents_md.py +91 -0
- package/scripts/generate_aider_conf.py +51 -0
- package/scripts/generate_cline.py +35 -0
- package/scripts/generate_copilot.py +30 -0
- package/scripts/generate_cursor_rules.py +35 -0
- package/scripts/generate_gemini.py +28 -0
- package/scripts/generate_llms_txt.py +164 -0
- package/scripts/generate_roo_modes.py +80 -0
- package/scripts/generate_windsurf.py +35 -0
- package/scripts/generator_base.py +140 -0
- package/scripts/harvest_ecosystem.py +50 -0
- package/scripts/inject_rule_cli.py +101 -0
- package/scripts/inject_section_cli.py +47 -0
- package/scripts/injection.py +180 -0
- package/scripts/install.py +236 -0
- package/scripts/install_git_hooks.py +71 -0
- package/scripts/install_steps/__init__.py +5 -0
- package/scripts/install_steps/ai_tools.py +261 -0
- package/scripts/install_steps/hooks.py +90 -0
- package/scripts/install_steps/markers.py +79 -0
- package/scripts/install_steps/symlinks.py +87 -0
- package/scripts/merge-hooks.py +192 -0
- package/scripts/plugin.py +642 -0
- package/scripts/plugin_schema.py +138 -0
- package/scripts/remove_rule.py +58 -0
- package/scripts/stats.py +81 -0
- package/scripts/sync.py +215 -0
- package/scripts/uninstall.py +292 -0
- package/scripts/validate.py +700 -0
package/llms.txt
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# ai-toolkit
|
|
2
|
+
|
|
3
|
+
> Professional-grade Claude Code toolkit: 85 skills, 47 agents, machine-enforced constitution, quality hooks.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
- [README](README.md): Installation, usage, and feature overview
|
|
8
|
+
- [CHANGELOG](CHANGELOG.md): Version history
|
|
9
|
+
- [ARCHITECTURE](app/ARCHITECTURE.md): System design
|
|
10
|
+
- [CONSTITUTION](app/constitution.md): Safety rules
|
|
11
|
+
|
|
12
|
+
## Knowledge Base
|
|
13
|
+
|
|
14
|
+
- [Best Practices](kb/best-practices/README.md)
|
|
15
|
+
- [How-To Guides](kb/howto/README.md)
|
|
16
|
+
- [SOP: Claude Toolkit Maintenance](kb/procedures/maintenance-sop.md)
|
|
17
|
+
- [Agents Catalog (47 agents)](kb/reference/agents-catalog.md)
|
|
18
|
+
- [Anti-Pattern Registry Format](kb/reference/anti-pattern-registry-format.md)
|
|
19
|
+
- [AI Toolkit Architecture](kb/reference/architecture-overview.md)
|
|
20
|
+
- [Config Benchmark](kb/reference/benchmark-config.md)
|
|
21
|
+
- [CI Integration](kb/reference/ci-integration.md)
|
|
22
|
+
- [Claude Ecosystem Benchmark Snapshot](kb/reference/claude-ecosystem-benchmark-snapshot.md)
|
|
23
|
+
- [Claude Ecosystem Expansion Foundations](kb/reference/claude-ecosystem-expansion-foundations.md)
|
|
24
|
+
- [Commands Catalog (DEPRECATED)](kb/reference/commands-catalog.md)
|
|
25
|
+
- [Distribution Model](kb/reference/distribution-model.md)
|
|
26
|
+
- [Global Install Model](kb/reference/global-install-model.md)
|
|
27
|
+
- [Hierarchical Override Pattern](kb/reference/hierarchical-override-pattern.md)
|
|
28
|
+
- [Hooks Catalog](kb/reference/hooks-catalog.md)
|
|
29
|
+
- [External Integrations](kb/reference/integrations.md)
|
|
30
|
+
- [Language Plugin Packs](kb/reference/language-packs.md)
|
|
31
|
+
- [Merge-Friendly Install Model](kb/reference/merge-friendly-install-model.md)
|
|
32
|
+
- [Plugin Pack Conventions](kb/reference/plugin-pack-conventions.md)
|
|
33
|
+
- [Quick Wins Implementation Summary](kb/reference/quick-wins-implementation-summary.md)
|
|
34
|
+
- [Skill Templates](kb/reference/skill-templates.md)
|
|
35
|
+
- [Skills Catalog (85 skills)](kb/reference/skills-catalog.md)
|
|
36
|
+
- [Skills Unification Model](kb/reference/skills-unification.md)
|
|
37
|
+
- [Usage Statistics](kb/reference/stats.md)
|
|
38
|
+
- [Config Sync](kb/reference/sync.md)
|
|
39
|
+
- [Troubleshooting](kb/troubleshooting/README.md)
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@softspark/ai-toolkit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Professional-grade AI coding toolkit: 85 skills, 47 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider), machine-enforced safety constitution, Iron Law enforcement, persistent memory, visual brainstorming, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"claude",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"anthropic",
|
|
9
|
+
"ai",
|
|
10
|
+
"agents",
|
|
11
|
+
"skills",
|
|
12
|
+
"llm",
|
|
13
|
+
"toolkit",
|
|
14
|
+
"developer-tools",
|
|
15
|
+
"cursor",
|
|
16
|
+
"windsurf",
|
|
17
|
+
"copilot",
|
|
18
|
+
"gemini",
|
|
19
|
+
"cline",
|
|
20
|
+
"roo-code",
|
|
21
|
+
"roo",
|
|
22
|
+
"aider",
|
|
23
|
+
"multi-platform"
|
|
24
|
+
],
|
|
25
|
+
"homepage": "https://github.com/softspark/ai-toolkit",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/softspark/ai-toolkit.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/softspark/ai-toolkit/issues"
|
|
32
|
+
},
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"author": "SoftSpark <biuro@softspark.eu>",
|
|
35
|
+
"main": "bin/ai-toolkit.js",
|
|
36
|
+
"bin": {
|
|
37
|
+
"ai-toolkit": "bin/ai-toolkit.js"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"prepublishOnly": "npm run generate:all && python3 scripts/validate.py && npm test",
|
|
41
|
+
"test": "bats tests/ --jobs 4 --no-parallelize-within-files",
|
|
42
|
+
"validate": "python3 scripts/validate.py",
|
|
43
|
+
"evaluate": "python3 scripts/evaluate_skills.py",
|
|
44
|
+
"benchmark:ecosystem": "python3 scripts/benchmark_ecosystem.py --offline",
|
|
45
|
+
"benchmark:harvest": "python3 scripts/harvest_ecosystem.py --offline",
|
|
46
|
+
"generate:agents": "python3 scripts/generate_agents_md.py > AGENTS.md",
|
|
47
|
+
"generate:cursor": "python3 scripts/generate_cursor_rules.py > .cursorrules",
|
|
48
|
+
"generate:llms": "python3 scripts/generate_llms_txt.py > llms.txt && python3 scripts/generate_llms_txt.py --full > llms-full.txt",
|
|
49
|
+
"generate:windsurf": "python3 scripts/generate_windsurf.py > .windsurfrules",
|
|
50
|
+
"generate:copilot": "python3 scripts/generate_copilot.py > .github/copilot-instructions.md",
|
|
51
|
+
"generate:gemini": "python3 scripts/generate_gemini.py > GEMINI.md",
|
|
52
|
+
"generate:cline": "python3 scripts/generate_cline.py > .clinerules",
|
|
53
|
+
"generate:roo": "python3 scripts/generate_roo_modes.py > .roomodes",
|
|
54
|
+
"generate:aider": "python3 scripts/generate_aider_conf.py > .aider.conf.yml",
|
|
55
|
+
"generate:all": "npm run generate:agents && npm run generate:cursor && npm run generate:windsurf && npm run generate:copilot && npm run generate:gemini && npm run generate:cline && npm run generate:roo && npm run generate:aider && npm run generate:llms"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"bin/",
|
|
59
|
+
"app/",
|
|
60
|
+
"scripts/",
|
|
61
|
+
"kb/",
|
|
62
|
+
"benchmarks/",
|
|
63
|
+
"action.yml",
|
|
64
|
+
"README.md",
|
|
65
|
+
"CHANGELOG.md",
|
|
66
|
+
"LICENSE",
|
|
67
|
+
"AGENTS.md",
|
|
68
|
+
"llms.txt",
|
|
69
|
+
"llms-full.txt"
|
|
70
|
+
],
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=18.0.0",
|
|
73
|
+
"bats": ">=1.8.0 — install via: brew install bats-core (macOS) or apt install bats (Ubuntu)"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Shared library for ai-toolkit Python scripts.
|
|
3
|
+
|
|
4
|
+
This module is a **facade** that re-exports from focused sub-modules:
|
|
5
|
+
- frontmatter.py — YAML frontmatter parsing
|
|
6
|
+
- injection.py — marker-based section injection and rule management
|
|
7
|
+
- emission.py — markdown emission, counting, and generator helpers
|
|
8
|
+
|
|
9
|
+
All functions are stdlib-only. Import and use from any scripts/*.py file.
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
from _common import toolkit_dir, frontmatter_field, inject_section
|
|
13
|
+
"""
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import os
|
|
17
|
+
import platform
|
|
18
|
+
import shutil
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
|
|
21
|
+
# ---------------------------------------------------------------------------
|
|
22
|
+
# Re-exports from frontmatter module
|
|
23
|
+
# ---------------------------------------------------------------------------
|
|
24
|
+
from frontmatter import frontmatter_field, frontmatter_block # noqa: F401
|
|
25
|
+
|
|
26
|
+
# ---------------------------------------------------------------------------
|
|
27
|
+
# Re-exports from injection module
|
|
28
|
+
# ---------------------------------------------------------------------------
|
|
29
|
+
from injection import ( # noqa: F401
|
|
30
|
+
markers_start,
|
|
31
|
+
markers_end,
|
|
32
|
+
inject_section,
|
|
33
|
+
inject_rule,
|
|
34
|
+
remove_rule_section,
|
|
35
|
+
# Internal helpers re-exported for backwards compat (install.py uses them)
|
|
36
|
+
strip_section as _strip_section,
|
|
37
|
+
trim_trailing_blanks as _trim_trailing_blanks,
|
|
38
|
+
collapse_blank_runs as _collapse_blank_runs,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
# ---------------------------------------------------------------------------
|
|
42
|
+
# Re-exports from emission module
|
|
43
|
+
# ---------------------------------------------------------------------------
|
|
44
|
+
from emission import ( # noqa: F401
|
|
45
|
+
agent_count,
|
|
46
|
+
skill_count,
|
|
47
|
+
count_agents_and_skills,
|
|
48
|
+
emit_agents_headings,
|
|
49
|
+
emit_agents_bullets,
|
|
50
|
+
emit_skills_headings,
|
|
51
|
+
emit_skills_bullets,
|
|
52
|
+
print_toolkit_start,
|
|
53
|
+
print_toolkit_end,
|
|
54
|
+
generate_general_guidelines,
|
|
55
|
+
generate_quality_standards,
|
|
56
|
+
generate_workflow_guidelines,
|
|
57
|
+
generate_quality_guidelines,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# ---------------------------------------------------------------------------
|
|
61
|
+
# Path constants (canonical source — emission.py also resolves these)
|
|
62
|
+
# ---------------------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
def _resolve_toolkit_dir() -> Path:
|
|
65
|
+
"""Resolve the toolkit root directory (parent of scripts/)."""
|
|
66
|
+
return Path(__file__).resolve().parent.parent
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
toolkit_dir: Path = _resolve_toolkit_dir()
|
|
70
|
+
app_dir: Path = toolkit_dir / "app"
|
|
71
|
+
agents_dir: Path = app_dir / "agents"
|
|
72
|
+
skills_dir: Path = app_dir / "skills"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# ---------------------------------------------------------------------------
|
|
76
|
+
# Component filtering (for install/update)
|
|
77
|
+
# ---------------------------------------------------------------------------
|
|
78
|
+
|
|
79
|
+
def should_install(component: str, only: str = "", skip: str = "") -> bool:
|
|
80
|
+
"""Check if a component should be installed (respects --only and --skip)."""
|
|
81
|
+
if only:
|
|
82
|
+
allowed = [c.strip() for c in only.split(",")]
|
|
83
|
+
if component not in allowed:
|
|
84
|
+
return False
|
|
85
|
+
if skip:
|
|
86
|
+
skipped = [c.strip() for c in skip.split(",")]
|
|
87
|
+
if component in skipped:
|
|
88
|
+
return False
|
|
89
|
+
return True
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# ---------------------------------------------------------------------------
|
|
93
|
+
# OS detection (for dependency checker)
|
|
94
|
+
# ---------------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
def detect_os() -> dict[str, str]:
|
|
97
|
+
"""Detect operating system and package manager.
|
|
98
|
+
|
|
99
|
+
Returns dict with keys: os, distro, pkg_manager, install_cmd.
|
|
100
|
+
"""
|
|
101
|
+
system = platform.system().lower()
|
|
102
|
+
|
|
103
|
+
if system == "darwin":
|
|
104
|
+
return {
|
|
105
|
+
"os": "macOS",
|
|
106
|
+
"distro": platform.mac_ver()[0],
|
|
107
|
+
"pkg_manager": "brew" if shutil.which("brew") else "none",
|
|
108
|
+
"install_cmd": "brew install",
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if system == "linux":
|
|
112
|
+
distro = ""
|
|
113
|
+
pkg_manager = "none"
|
|
114
|
+
install_cmd = ""
|
|
115
|
+
|
|
116
|
+
# Read os-release
|
|
117
|
+
for path in ("/etc/os-release", "/usr/lib/os-release"):
|
|
118
|
+
if os.path.isfile(path):
|
|
119
|
+
with open(path) as f:
|
|
120
|
+
for line in f:
|
|
121
|
+
if line.startswith("ID="):
|
|
122
|
+
distro = line.strip().split("=", 1)[1].strip('"')
|
|
123
|
+
elif line.startswith("ID_LIKE="):
|
|
124
|
+
if not distro:
|
|
125
|
+
distro = line.strip().split("=", 1)[1].strip('"').split()[0]
|
|
126
|
+
break
|
|
127
|
+
|
|
128
|
+
# Map distro to package manager
|
|
129
|
+
if distro in ("ubuntu", "debian", "linuxmint", "pop"):
|
|
130
|
+
pkg_manager = "apt"
|
|
131
|
+
install_cmd = "sudo apt install -y"
|
|
132
|
+
elif distro in ("fedora", "rhel", "centos", "rocky", "alma"):
|
|
133
|
+
pkg_manager = "dnf" if shutil.which("dnf") else "yum"
|
|
134
|
+
install_cmd = f"sudo {pkg_manager} install -y"
|
|
135
|
+
elif distro in ("arch", "manjaro", "endeavouros"):
|
|
136
|
+
pkg_manager = "pacman"
|
|
137
|
+
install_cmd = "sudo pacman -S --noconfirm"
|
|
138
|
+
elif distro == "alpine":
|
|
139
|
+
pkg_manager = "apk"
|
|
140
|
+
install_cmd = "sudo apk add"
|
|
141
|
+
elif distro in ("opensuse", "suse"):
|
|
142
|
+
pkg_manager = "zypper"
|
|
143
|
+
install_cmd = "sudo zypper install -y"
|
|
144
|
+
|
|
145
|
+
# Check for WSL
|
|
146
|
+
is_wsl = "microsoft" in platform.release().lower()
|
|
147
|
+
|
|
148
|
+
return {
|
|
149
|
+
"os": "WSL" if is_wsl else "Linux",
|
|
150
|
+
"distro": distro,
|
|
151
|
+
"pkg_manager": pkg_manager,
|
|
152
|
+
"install_cmd": install_cmd,
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
"os": system,
|
|
157
|
+
"distro": "",
|
|
158
|
+
"pkg_manager": "none",
|
|
159
|
+
"install_cmd": "",
|
|
160
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""add-rule -- Register a rule file in ~/.ai-toolkit/rules/.
|
|
3
|
+
|
|
4
|
+
Registered rules are automatically injected into all AI tool configs
|
|
5
|
+
(Claude, Cursor, Windsurf, Gemini) on next 'ai-toolkit install',
|
|
6
|
+
and into project-local configs (Copilot, Cline) on 'ai-toolkit install --local'.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
add_rule.py <rule-file> [rule-name]
|
|
10
|
+
|
|
11
|
+
Arguments:
|
|
12
|
+
rule-file Path to .md file with the rule content
|
|
13
|
+
rule-name Override the rule name (default: filename without .md)
|
|
14
|
+
"""
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import shutil
|
|
18
|
+
import sys
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
|
|
21
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main() -> None:
|
|
25
|
+
"""Register a rule file in the global rules directory."""
|
|
26
|
+
if len(sys.argv) < 2:
|
|
27
|
+
print("Usage: add_rule.py <rule-file> [rule-name]", file=sys.stderr)
|
|
28
|
+
sys.exit(1)
|
|
29
|
+
|
|
30
|
+
rule_file = Path(sys.argv[1])
|
|
31
|
+
if not rule_file.is_file():
|
|
32
|
+
print(f"Rule file not found: {rule_file}", file=sys.stderr)
|
|
33
|
+
sys.exit(1)
|
|
34
|
+
|
|
35
|
+
rule_name = sys.argv[2] if len(sys.argv) > 2 else rule_file.stem
|
|
36
|
+
rules_dir = Path.home() / ".ai-toolkit" / "rules"
|
|
37
|
+
rules_dir.mkdir(parents=True, exist_ok=True)
|
|
38
|
+
|
|
39
|
+
dest = rules_dir / f"{rule_name}.md"
|
|
40
|
+
shutil.copy2(rule_file, dest)
|
|
41
|
+
|
|
42
|
+
print(f"Registered: '{rule_name}' -> {dest}")
|
|
43
|
+
print()
|
|
44
|
+
print("Apply now:")
|
|
45
|
+
print(" ai-toolkit update # global (Claude, Cursor, Windsurf, Gemini)")
|
|
46
|
+
print(" ai-toolkit update --local # project-local (Copilot, Cline)")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if __name__ == "__main__":
|
|
50
|
+
main()
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""ai-toolkit benchmark --my-config — Compare user config vs toolkit vs ecosystem."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
10
|
+
from _common import toolkit_dir
|
|
11
|
+
|
|
12
|
+
CLAUDE_DIR = Path.home() / ".claude"
|
|
13
|
+
HOOKS_DIR = Path.home() / ".ai-toolkit" / "hooks"
|
|
14
|
+
DASHBOARD = toolkit_dir / "benchmarks" / "ecosystem-dashboard.json"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def count_files(directory: Path, pattern: str, min_depth: int = 0) -> int:
|
|
18
|
+
"""Count files matching pattern in directory."""
|
|
19
|
+
if not directory.is_dir():
|
|
20
|
+
return 0
|
|
21
|
+
count = 0
|
|
22
|
+
for p in directory.iterdir():
|
|
23
|
+
if min_depth > 0 and not p.is_dir():
|
|
24
|
+
continue
|
|
25
|
+
if p.name.endswith(pattern.lstrip("*")) if "*" in pattern else p.name == pattern:
|
|
26
|
+
count += 1
|
|
27
|
+
if min_depth > 0 and p.is_dir():
|
|
28
|
+
count += 1
|
|
29
|
+
return count
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def main() -> None:
|
|
33
|
+
tk_dir = Path(sys.argv[1]) if len(sys.argv) > 1 else toolkit_dir
|
|
34
|
+
|
|
35
|
+
print("AI Toolkit Config Benchmark")
|
|
36
|
+
print("========================")
|
|
37
|
+
print()
|
|
38
|
+
|
|
39
|
+
# --- User's installed components ---
|
|
40
|
+
print("## Your Configuration (~/.claude/)")
|
|
41
|
+
|
|
42
|
+
user_agents = sum(1 for f in (CLAUDE_DIR / "agents").glob("*.md")) if (CLAUDE_DIR / "agents").is_dir() else 0
|
|
43
|
+
user_skills = sum(1 for d in (CLAUDE_DIR / "skills").iterdir() if d.is_dir() or d.is_symlink()) if (CLAUDE_DIR / "skills").is_dir() else 0
|
|
44
|
+
user_hooks = sum(1 for f in HOOKS_DIR.glob("*.sh")) if HOOKS_DIR.is_dir() else 0
|
|
45
|
+
|
|
46
|
+
print(f" Agents: {user_agents}")
|
|
47
|
+
print(f" Skills: {user_skills}")
|
|
48
|
+
print(f" Hooks: {user_hooks}")
|
|
49
|
+
print()
|
|
50
|
+
|
|
51
|
+
# --- Toolkit totals ---
|
|
52
|
+
print("## Toolkit Totals")
|
|
53
|
+
|
|
54
|
+
tk_agents = sum(1 for f in (tk_dir / "app" / "agents").glob("*.md"))
|
|
55
|
+
tk_skills = sum(1 for d in (tk_dir / "app" / "skills").iterdir() if d.is_dir())
|
|
56
|
+
tk_hooks = sum(1 for f in (tk_dir / "app" / "hooks").glob("*.sh"))
|
|
57
|
+
|
|
58
|
+
print(f" Agents: {tk_agents}")
|
|
59
|
+
print(f" Skills: {tk_skills}")
|
|
60
|
+
print(f" Hooks: {tk_hooks}")
|
|
61
|
+
print()
|
|
62
|
+
|
|
63
|
+
# --- Coverage ---
|
|
64
|
+
print("## Coverage")
|
|
65
|
+
|
|
66
|
+
agent_pct = (user_agents * 100 // tk_agents) if tk_agents > 0 else 0
|
|
67
|
+
skill_pct = (user_skills * 100 // tk_skills) if tk_skills > 0 else 0
|
|
68
|
+
hook_pct = (user_hooks * 100 // tk_hooks) if tk_hooks > 0 else 0
|
|
69
|
+
|
|
70
|
+
print(f" Agents: {agent_pct}% ({user_agents} / {tk_agents})")
|
|
71
|
+
print(f" Skills: {skill_pct}% ({user_skills} / {tk_skills})")
|
|
72
|
+
print(f" Hooks: {hook_pct}% ({user_hooks} / {tk_hooks})")
|
|
73
|
+
print()
|
|
74
|
+
|
|
75
|
+
# --- Missing components ---
|
|
76
|
+
if user_agents < tk_agents or user_skills < tk_skills:
|
|
77
|
+
print("## Missing Components")
|
|
78
|
+
shown = 0
|
|
79
|
+
if (tk_dir / "app" / "agents").is_dir() and (CLAUDE_DIR / "agents").is_dir():
|
|
80
|
+
for agent in sorted((tk_dir / "app" / "agents").glob("*.md")):
|
|
81
|
+
if not (CLAUDE_DIR / "agents" / agent.name).exists():
|
|
82
|
+
print(f" Agent: {agent.name}")
|
|
83
|
+
shown += 1
|
|
84
|
+
if shown >= 10:
|
|
85
|
+
break
|
|
86
|
+
missing = tk_agents - user_agents
|
|
87
|
+
if missing > 10:
|
|
88
|
+
print(f" ... and {missing - 10} more agents")
|
|
89
|
+
|
|
90
|
+
if (tk_dir / "app" / "skills").is_dir() and (CLAUDE_DIR / "skills").is_dir():
|
|
91
|
+
for skill_dir in sorted((tk_dir / "app" / "skills").iterdir()):
|
|
92
|
+
if not skill_dir.is_dir():
|
|
93
|
+
continue
|
|
94
|
+
if not (CLAUDE_DIR / "skills" / skill_dir.name).exists():
|
|
95
|
+
print(f" Skill: {skill_dir.name}")
|
|
96
|
+
shown += 1
|
|
97
|
+
if shown >= 20:
|
|
98
|
+
break
|
|
99
|
+
missing = tk_skills - user_skills
|
|
100
|
+
if missing > 10:
|
|
101
|
+
print(f" ... and {missing - 10} more skills")
|
|
102
|
+
print()
|
|
103
|
+
|
|
104
|
+
# --- Ecosystem comparison ---
|
|
105
|
+
if DASHBOARD.is_file():
|
|
106
|
+
print("## Ecosystem Comparison")
|
|
107
|
+
with open(DASHBOARD) as f:
|
|
108
|
+
data = json.load(f)
|
|
109
|
+
|
|
110
|
+
header = f"{'Repo':<40} {'Agents':>7} {'Skills':>7} {'Hooks':>6}"
|
|
111
|
+
print(header)
|
|
112
|
+
print("-" * 62)
|
|
113
|
+
print(f"{'Your config':<40} {user_agents:>7} {user_skills:>7} {user_hooks:>6}")
|
|
114
|
+
print("-" * 62)
|
|
115
|
+
for repo in data.get("repos", []):
|
|
116
|
+
name = repo.get("repo", "unknown")
|
|
117
|
+
agents = repo.get("agents_md", 0)
|
|
118
|
+
skills = repo.get("skills", 0) + repo.get("commands_md", 0)
|
|
119
|
+
hooks = repo.get("hook_settings_files", 0)
|
|
120
|
+
print(f"{name:<40} {agents:>7} {skills:>7} {hooks:>6}")
|
|
121
|
+
|
|
122
|
+
print()
|
|
123
|
+
print("Run 'ai-toolkit install' to sync missing components.")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
if __name__ == "__main__":
|
|
127
|
+
main()
|