@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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# observation-capture.sh — Capture tool actions into SQLite memory database.
|
|
3
|
+
#
|
|
4
|
+
# Fires on: PostToolUse
|
|
5
|
+
# Reads tool name and result from JSON on stdin (Claude Code hook protocol).
|
|
6
|
+
# Strips private tags, truncates to 2000 chars, inserts into observations table.
|
|
7
|
+
# Never blocks the user — always exits 0.
|
|
8
|
+
|
|
9
|
+
DB_PATH="${HOME}/.ai-toolkit/memory.db"
|
|
10
|
+
STRIP_PRIVATE="${HOME}/.ai-toolkit/plugin-scripts/memory-pack/strip_private.py"
|
|
11
|
+
MAX_CONTENT_LENGTH=2000
|
|
12
|
+
|
|
13
|
+
# Bail silently if database does not exist
|
|
14
|
+
if [ ! -f "$DB_PATH" ]; then
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Read JSON input from stdin (Claude Code hook protocol)
|
|
19
|
+
INPUT=$(cat)
|
|
20
|
+
|
|
21
|
+
# Check if jq is available; bail silently if not
|
|
22
|
+
if ! command -v jq &>/dev/null; then
|
|
23
|
+
exit 0
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# Parse hook input
|
|
27
|
+
SESSION_ID=$(printf '%s' "$INPUT" | jq -r '.session_id // empty')
|
|
28
|
+
TOOL_NAME=$(printf '%s' "$INPUT" | jq -r '.tool_name // "unknown"')
|
|
29
|
+
FILE_PATH=$(printf '%s' "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // empty')
|
|
30
|
+
TOOL_INPUT=$(printf '%s' "$INPUT" | jq -r '.tool_input | if type == "object" then (to_entries | map(.key + "=" + (.value | tostring)) | join(", ")) else tostring end // empty' 2>/dev/null)
|
|
31
|
+
|
|
32
|
+
# No session ID means we cannot associate the observation
|
|
33
|
+
if [ -z "$SESSION_ID" ]; then
|
|
34
|
+
exit 0
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Build content string
|
|
38
|
+
CONTENT=""
|
|
39
|
+
if [ -n "$FILE_PATH" ]; then
|
|
40
|
+
CONTENT="${TOOL_NAME}: ${FILE_PATH}"
|
|
41
|
+
elif [ -n "$TOOL_INPUT" ]; then
|
|
42
|
+
CONTENT="${TOOL_NAME}: ${TOOL_INPUT}"
|
|
43
|
+
else
|
|
44
|
+
CONTENT="${TOOL_NAME}: (no input captured)"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Strip private content
|
|
48
|
+
if [ -f "$STRIP_PRIVATE" ]; then
|
|
49
|
+
CONTENT=$(printf '%s' "$CONTENT" | python3 "$STRIP_PRIVATE")
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Truncate to max length
|
|
53
|
+
if [ ${#CONTENT} -gt $MAX_CONTENT_LENGTH ]; then
|
|
54
|
+
CONTENT="${CONTENT:0:$MAX_CONTENT_LENGTH}..."
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# Ensure session row exists (upsert — ignore if already present)
|
|
58
|
+
sqlite3 "$DB_PATH" "INSERT OR IGNORE INTO sessions (session_id, project_dir, started_at)
|
|
59
|
+
VALUES ('$(printf '%s' "$SESSION_ID" | sed "s/'/''/g")', '$(pwd)', datetime('now'));" 2>/dev/null || true
|
|
60
|
+
|
|
61
|
+
# Insert observation
|
|
62
|
+
sqlite3 "$DB_PATH" "INSERT INTO observations (session_id, tool_name, content)
|
|
63
|
+
VALUES ('$(printf '%s' "$SESSION_ID" | sed "s/'/''/g")',
|
|
64
|
+
'$(printf '%s' "$TOOL_NAME" | sed "s/'/''/g")',
|
|
65
|
+
'$(printf '%s' "$CONTENT" | sed "s/'/''/g")');" 2>/dev/null || true
|
|
66
|
+
|
|
67
|
+
exit 0
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# session-summary.sh — Summarize session observations on stop.
|
|
3
|
+
#
|
|
4
|
+
# Fires on: Stop
|
|
5
|
+
# Queries all observations for the current session, builds a compact summary
|
|
6
|
+
# (observation count, tools used, time range), and stores it in the sessions table.
|
|
7
|
+
# Auto-prunes observations older than RETENTION_DAYS (default 90).
|
|
8
|
+
# Never blocks the user — always exits 0.
|
|
9
|
+
|
|
10
|
+
DB_PATH="${HOME}/.ai-toolkit/memory.db"
|
|
11
|
+
RETENTION_DAYS="${MEMORY_RETENTION_DAYS:-90}"
|
|
12
|
+
|
|
13
|
+
# Read JSON input from stdin (Claude Code hook protocol)
|
|
14
|
+
INPUT=$(cat)
|
|
15
|
+
|
|
16
|
+
# Parse session ID from stdin JSON, fall back to env var
|
|
17
|
+
if command -v jq &>/dev/null && [ -n "$INPUT" ]; then
|
|
18
|
+
SESSION_ID=$(printf '%s' "$INPUT" | jq -r '.session_id // empty')
|
|
19
|
+
fi
|
|
20
|
+
SESSION_ID="${SESSION_ID:-${CLAUDE_SESSION_ID:-}}"
|
|
21
|
+
|
|
22
|
+
# Bail silently if database or session ID missing
|
|
23
|
+
if [ ! -f "$DB_PATH" ] || [ -z "$SESSION_ID" ]; then
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Escape session ID for SQL
|
|
28
|
+
SAFE_SESSION_ID=$(printf '%s' "$SESSION_ID" | sed "s/'/''/g")
|
|
29
|
+
|
|
30
|
+
# Count observations for this session
|
|
31
|
+
OBS_COUNT=$(sqlite3 "$DB_PATH" \
|
|
32
|
+
"SELECT COUNT(*) FROM observations WHERE session_id = '${SAFE_SESSION_ID}';" 2>/dev/null || echo "0")
|
|
33
|
+
|
|
34
|
+
# No observations — nothing to summarize
|
|
35
|
+
if [ "$OBS_COUNT" -eq 0 ] 2>/dev/null; then
|
|
36
|
+
exit 0
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Gather distinct tools used
|
|
40
|
+
TOOLS_USED=$(sqlite3 "$DB_PATH" \
|
|
41
|
+
"SELECT GROUP_CONCAT(tool_name, ', ')
|
|
42
|
+
FROM (SELECT DISTINCT tool_name FROM observations
|
|
43
|
+
WHERE session_id = '${SAFE_SESSION_ID}' ORDER BY tool_name);" 2>/dev/null || echo "unknown")
|
|
44
|
+
|
|
45
|
+
# Get time range
|
|
46
|
+
FIRST_OBS=$(sqlite3 "$DB_PATH" \
|
|
47
|
+
"SELECT MIN(created_at) FROM observations WHERE session_id = '${SAFE_SESSION_ID}';" 2>/dev/null || echo "")
|
|
48
|
+
LAST_OBS=$(sqlite3 "$DB_PATH" \
|
|
49
|
+
"SELECT MAX(created_at) FROM observations WHERE session_id = '${SAFE_SESSION_ID}';" 2>/dev/null || echo "")
|
|
50
|
+
|
|
51
|
+
# Build summary text
|
|
52
|
+
SUMMARY="Session captured ${OBS_COUNT} observations. Tools: ${TOOLS_USED}. Time range: ${FIRST_OBS} to ${LAST_OBS}."
|
|
53
|
+
|
|
54
|
+
# Escape summary for SQL
|
|
55
|
+
SAFE_SUMMARY=$(printf '%s' "$SUMMARY" | sed "s/'/''/g")
|
|
56
|
+
|
|
57
|
+
# Update session with summary and end time
|
|
58
|
+
sqlite3 "$DB_PATH" \
|
|
59
|
+
"UPDATE sessions
|
|
60
|
+
SET summary = '${SAFE_SUMMARY}',
|
|
61
|
+
ended_at = datetime('now')
|
|
62
|
+
WHERE session_id = '${SAFE_SESSION_ID}';" 2>/dev/null || true
|
|
63
|
+
|
|
64
|
+
# Auto-prune old observations and empty sessions
|
|
65
|
+
sqlite3 "$DB_PATH" \
|
|
66
|
+
"DELETE FROM observations WHERE created_at < datetime('now', '-${RETENTION_DAYS} days');
|
|
67
|
+
DELETE FROM sessions WHERE session_id NOT IN (SELECT DISTINCT session_id FROM observations)
|
|
68
|
+
AND ended_at IS NOT NULL;
|
|
69
|
+
VACUUM;" 2>/dev/null || true
|
|
70
|
+
|
|
71
|
+
exit 0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "memory-pack",
|
|
3
|
+
"description": "Persistent memory across Claude Code sessions with SQLite storage, full-text search, and progressive disclosure",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"domain": "memory",
|
|
6
|
+
"type": "plugin-pack",
|
|
7
|
+
"status": "experimental",
|
|
8
|
+
"requires": {
|
|
9
|
+
"ai-toolkit": ">=1.0.0",
|
|
10
|
+
"claude-code": ">=1.0.33"
|
|
11
|
+
},
|
|
12
|
+
"includes": {
|
|
13
|
+
"agents": [],
|
|
14
|
+
"skills": ["mem-search"],
|
|
15
|
+
"rules": [],
|
|
16
|
+
"hooks": ["observation-capture.sh", "session-summary.sh"]
|
|
17
|
+
},
|
|
18
|
+
"hook_events": {
|
|
19
|
+
"observation-capture.sh": "PostToolUse",
|
|
20
|
+
"session-summary.sh": "Stop"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Initialize SQLite memory database for ai-toolkit memory-pack.
|
|
3
|
+
|
|
4
|
+
Creates ~/.ai-toolkit/memory.db with sessions, observations, and FTS5 tables.
|
|
5
|
+
Safe to run multiple times (uses IF NOT EXISTS).
|
|
6
|
+
|
|
7
|
+
Usage: python3 app/plugins/memory-pack/scripts/init_db.py
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import sqlite3
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
DB_DIR = Path.home() / ".ai-toolkit"
|
|
15
|
+
DB_PATH = DB_DIR / "memory.db"
|
|
16
|
+
|
|
17
|
+
SCHEMA = """
|
|
18
|
+
-- Sessions table: one row per Claude Code session
|
|
19
|
+
CREATE TABLE IF NOT EXISTS sessions (
|
|
20
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
21
|
+
session_id TEXT UNIQUE NOT NULL,
|
|
22
|
+
project_dir TEXT,
|
|
23
|
+
started_at TEXT DEFAULT (datetime('now')),
|
|
24
|
+
ended_at TEXT,
|
|
25
|
+
summary TEXT
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
-- Observations table: captured tool actions within a session
|
|
29
|
+
CREATE TABLE IF NOT EXISTS observations (
|
|
30
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
31
|
+
session_id TEXT NOT NULL,
|
|
32
|
+
tool_name TEXT,
|
|
33
|
+
content TEXT NOT NULL,
|
|
34
|
+
created_at TEXT DEFAULT (datetime('now')),
|
|
35
|
+
FOREIGN KEY (session_id) REFERENCES sessions(session_id)
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
-- Full-text search index on observations
|
|
39
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS observations_fts USING fts5(
|
|
40
|
+
content,
|
|
41
|
+
tool_name,
|
|
42
|
+
content='observations',
|
|
43
|
+
content_rowid='id'
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
-- Trigger: keep FTS index in sync on INSERT
|
|
47
|
+
CREATE TRIGGER IF NOT EXISTS observations_ai AFTER INSERT ON observations BEGIN
|
|
48
|
+
INSERT INTO observations_fts(rowid, content, tool_name)
|
|
49
|
+
VALUES (new.id, new.content, new.tool_name);
|
|
50
|
+
END;
|
|
51
|
+
|
|
52
|
+
-- Trigger: keep FTS index in sync on DELETE
|
|
53
|
+
CREATE TRIGGER IF NOT EXISTS observations_ad AFTER DELETE ON observations BEGIN
|
|
54
|
+
INSERT INTO observations_fts(observations_fts, rowid, content, tool_name)
|
|
55
|
+
VALUES ('delete', old.id, old.content, old.tool_name);
|
|
56
|
+
END;
|
|
57
|
+
|
|
58
|
+
-- Trigger: keep FTS index in sync on UPDATE
|
|
59
|
+
CREATE TRIGGER IF NOT EXISTS observations_au AFTER UPDATE ON observations BEGIN
|
|
60
|
+
INSERT INTO observations_fts(observations_fts, rowid, content, tool_name)
|
|
61
|
+
VALUES ('delete', old.id, old.content, old.tool_name);
|
|
62
|
+
INSERT INTO observations_fts(rowid, content, tool_name)
|
|
63
|
+
VALUES (new.id, new.content, new.tool_name);
|
|
64
|
+
END;
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def main() -> None:
|
|
69
|
+
DB_DIR.mkdir(parents=True, exist_ok=True)
|
|
70
|
+
existed = DB_PATH.is_file()
|
|
71
|
+
conn = sqlite3.connect(str(DB_PATH))
|
|
72
|
+
conn.executescript(SCHEMA)
|
|
73
|
+
conn.close()
|
|
74
|
+
if existed:
|
|
75
|
+
print(f"memory-pack: database verified at {DB_PATH} (data preserved)")
|
|
76
|
+
else:
|
|
77
|
+
print(f"memory-pack: database created at {DB_PATH}")
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
if __name__ == "__main__":
|
|
81
|
+
main()
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Remove <private>...</private> blocks from stdin.
|
|
3
|
+
|
|
4
|
+
Used by observation-capture.sh to sanitize content before storage.
|
|
5
|
+
Handles multi-line private blocks and nested angle brackets.
|
|
6
|
+
|
|
7
|
+
Usage: echo "text <private>secret</private> more" | python3 strip_private.py
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import re
|
|
12
|
+
import sys
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> None:
|
|
16
|
+
content = sys.stdin.read()
|
|
17
|
+
cleaned = re.sub(r"<private>[^<]*</private>", "", content)
|
|
18
|
+
sys.stdout.write(cleaned)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
main()
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mem-search
|
|
3
|
+
description: "Search past coding sessions using natural language. Finds relevant observations, decisions, and context from previous work."
|
|
4
|
+
effort: medium
|
|
5
|
+
argument-hint: "[search query]"
|
|
6
|
+
allowed-tools: Bash, Read
|
|
7
|
+
user-invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Search Session Memory
|
|
11
|
+
|
|
12
|
+
Search the persistent memory database for past coding observations, decisions, and context.
|
|
13
|
+
|
|
14
|
+
$ARGUMENTS
|
|
15
|
+
|
|
16
|
+
## How It Works
|
|
17
|
+
|
|
18
|
+
This skill queries the SQLite FTS5 full-text search index at `~/.ai-toolkit/memory.db` to find relevant observations from past sessions.
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
1. **Parse the search query** from `$ARGUMENTS`. If empty, prompt the user for a query.
|
|
23
|
+
|
|
24
|
+
2. **Initialize the database** if it does not exist:
|
|
25
|
+
```bash
|
|
26
|
+
python3 "$HOME/.ai-toolkit/hooks/../plugins/memory-pack/scripts/init_db.py" 2>/dev/null || true
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. **Run the FTS5 search** against the observations table:
|
|
30
|
+
```bash
|
|
31
|
+
sqlite3 ~/.ai-toolkit/memory.db "
|
|
32
|
+
SELECT o.id, o.session_id, o.tool_name, o.content, o.created_at,
|
|
33
|
+
s.project_dir, s.summary
|
|
34
|
+
FROM observations_fts fts
|
|
35
|
+
JOIN observations o ON o.id = fts.rowid
|
|
36
|
+
LEFT JOIN sessions s ON s.session_id = o.session_id
|
|
37
|
+
WHERE observations_fts MATCH '<query>'
|
|
38
|
+
ORDER BY rank
|
|
39
|
+
LIMIT 10;
|
|
40
|
+
"
|
|
41
|
+
```
|
|
42
|
+
Replace `<query>` with the user's search terms. Escape single quotes by doubling them.
|
|
43
|
+
|
|
44
|
+
4. **Progressive disclosure** -- present results in two stages:
|
|
45
|
+
|
|
46
|
+
**Stage 1: Summary view** (show first)
|
|
47
|
+
```markdown
|
|
48
|
+
## Memory Search: "<query>"
|
|
49
|
+
|
|
50
|
+
Found N results across M sessions.
|
|
51
|
+
|
|
52
|
+
| # | Session | Project | Tool | Time | Preview |
|
|
53
|
+
|---|---------|---------|------|------|---------|
|
|
54
|
+
| 1 | abc123 | /path | Edit | 2025-01-15 | First 80 chars... |
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Stage 2: Detail view** (on request)
|
|
58
|
+
Show the full observation content, session summary, and related observations from the same session.
|
|
59
|
+
|
|
60
|
+
5. **If no results found**, suggest:
|
|
61
|
+
- Trying broader search terms
|
|
62
|
+
- Checking if memory-pack hooks are installed
|
|
63
|
+
- Running `init-db.sh` if the database is missing
|
|
64
|
+
|
|
65
|
+
## Query Tips
|
|
66
|
+
|
|
67
|
+
- Use simple keywords: `mem-search database migration`
|
|
68
|
+
- FTS5 supports prefix matching: `migrat*` matches "migration", "migrate"
|
|
69
|
+
- Boolean operators: `database AND NOT test`
|
|
70
|
+
- Column filters: `tool_name:Edit` to search only Edit tool observations
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# research-pack
|
|
2
|
+
|
|
3
|
+
Curated research and synthesis pack.
|
|
4
|
+
|
|
5
|
+
## Includes
|
|
6
|
+
- Agents: `research-synthesizer`, `technical-researcher`, `fact-checker`, `search-specialist`
|
|
7
|
+
- Skills: `/search`, `/docs`, `research-mastery`, `plan-writing`
|
|
8
|
+
- Hooks: `user-prompt-submit.sh`
|
|
9
|
+
|
|
10
|
+
## Use When
|
|
11
|
+
- validating claims before implementation,
|
|
12
|
+
- benchmarking external ecosystems,
|
|
13
|
+
- writing architecture notes, audits, and synthesis reports.
|
|
14
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "research-pack",
|
|
3
|
+
"description": "Domain plugin pack for research, synthesis, source validation, and benchmark-backed discovery.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"domain": "research",
|
|
6
|
+
"type": "plugin-pack",
|
|
7
|
+
"status": "experimental",
|
|
8
|
+
"requires": {
|
|
9
|
+
"ai-toolkit": ">=1.0.0",
|
|
10
|
+
"claude-code": ">=1.0.33"
|
|
11
|
+
},
|
|
12
|
+
"includes": {
|
|
13
|
+
"agents": ["research-synthesizer", "technical-researcher", "fact-checker", "search-specialist"],
|
|
14
|
+
"skills": ["search", "docs", "research-mastery", "plan-writing"],
|
|
15
|
+
"rules": [],
|
|
16
|
+
"hooks": ["user-prompt-submit.sh"]
|
|
17
|
+
},
|
|
18
|
+
"hook_events": {
|
|
19
|
+
"user-prompt-submit.sh": "UserPromptSubmit"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# ruby-pack
|
|
2
|
+
|
|
3
|
+
Curated Ruby development patterns pack.
|
|
4
|
+
|
|
5
|
+
## Includes
|
|
6
|
+
- Skills: `ruby-patterns`
|
|
7
|
+
|
|
8
|
+
## Use When
|
|
9
|
+
- writing Ruby code and need idiomatic patterns (blocks, modules, metaprogramming),
|
|
10
|
+
- setting up new Rails or Sinatra projects,
|
|
11
|
+
- reviewing Ruby code for RSpec, ActiveRecord, and performance best practices.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ruby-pack",
|
|
3
|
+
"description": "Domain plugin pack for Ruby development patterns and Rails conventions.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"domain": "ruby",
|
|
6
|
+
"type": "plugin-pack",
|
|
7
|
+
"status": "experimental",
|
|
8
|
+
"requires": {
|
|
9
|
+
"ai-toolkit": ">=1.0.0",
|
|
10
|
+
"claude-code": ">=1.0.33"
|
|
11
|
+
},
|
|
12
|
+
"includes": {
|
|
13
|
+
"agents": [],
|
|
14
|
+
"skills": ["ruby-patterns"],
|
|
15
|
+
"rules": [],
|
|
16
|
+
"hooks": []
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# rust-pack
|
|
2
|
+
|
|
3
|
+
Curated Rust development patterns pack.
|
|
4
|
+
|
|
5
|
+
## Includes
|
|
6
|
+
- Skills: `rust-patterns`
|
|
7
|
+
|
|
8
|
+
## Use When
|
|
9
|
+
- writing Rust code and need idiomatic patterns,
|
|
10
|
+
- setting up new Rust projects with Cargo,
|
|
11
|
+
- reviewing Rust code for ownership, borrowing, and lifetime best practices.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rust-pack",
|
|
3
|
+
"description": "Domain plugin pack for Rust development patterns and idiomatic conventions.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"domain": "rust",
|
|
6
|
+
"type": "plugin-pack",
|
|
7
|
+
"status": "experimental",
|
|
8
|
+
"requires": {
|
|
9
|
+
"ai-toolkit": ">=1.0.0",
|
|
10
|
+
"claude-code": ">=1.0.33"
|
|
11
|
+
},
|
|
12
|
+
"includes": {
|
|
13
|
+
"agents": [],
|
|
14
|
+
"skills": ["rust-patterns"],
|
|
15
|
+
"rules": [],
|
|
16
|
+
"hooks": []
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# security-pack
|
|
2
|
+
|
|
3
|
+
Curated security-focused plugin pack.
|
|
4
|
+
|
|
5
|
+
## Includes
|
|
6
|
+
- Agents: `security-auditor`, `security-architect`, `code-reviewer`
|
|
7
|
+
- Skills: `/review`, `security-patterns`, `/panic`
|
|
8
|
+
- Rules: `quality-gates`
|
|
9
|
+
- Hooks: `guard-destructive.sh`, `guard-path.sh`, `quality-gate.sh`
|
|
10
|
+
|
|
11
|
+
## Use When
|
|
12
|
+
- running security audits,
|
|
13
|
+
- reviewing authentication / authorization changes,
|
|
14
|
+
- hardening deployments and operational workflows.
|
|
15
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "security-pack",
|
|
3
|
+
"description": "Domain plugin pack for secure coding, architecture review, and hardening workflows.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"domain": "security",
|
|
6
|
+
"type": "plugin-pack",
|
|
7
|
+
"status": "experimental",
|
|
8
|
+
"requires": {
|
|
9
|
+
"ai-toolkit": ">=1.0.0",
|
|
10
|
+
"claude-code": ">=1.0.33"
|
|
11
|
+
},
|
|
12
|
+
"includes": {
|
|
13
|
+
"agents": ["security-auditor", "security-architect", "code-reviewer"],
|
|
14
|
+
"skills": ["review", "security-patterns", "panic"],
|
|
15
|
+
"rules": ["quality-gates"],
|
|
16
|
+
"hooks": ["guard-destructive.sh", "quality-gate.sh"]
|
|
17
|
+
},
|
|
18
|
+
"hook_events": {
|
|
19
|
+
"guard-destructive.sh": "PreToolUse",
|
|
20
|
+
"quality-gate.sh": "TaskCompleted"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# swift-pack
|
|
2
|
+
|
|
3
|
+
Curated Swift and iOS development patterns pack.
|
|
4
|
+
|
|
5
|
+
## Includes
|
|
6
|
+
- Skills: `swift-patterns`
|
|
7
|
+
|
|
8
|
+
## Use When
|
|
9
|
+
- writing Swift code and need idiomatic patterns (protocol-oriented, optionals, concurrency),
|
|
10
|
+
- setting up new Swift Package Manager or Xcode projects,
|
|
11
|
+
- reviewing Swift code for SwiftUI, async/await, and actor isolation best practices.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "swift-pack",
|
|
3
|
+
"description": "Domain plugin pack for Swift and iOS development patterns.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"domain": "swift",
|
|
6
|
+
"type": "plugin-pack",
|
|
7
|
+
"status": "experimental",
|
|
8
|
+
"requires": {
|
|
9
|
+
"ai-toolkit": ">=1.0.0",
|
|
10
|
+
"claude-code": ">=1.0.33"
|
|
11
|
+
},
|
|
12
|
+
"includes": {
|
|
13
|
+
"agents": [],
|
|
14
|
+
"skills": ["swift-patterns"],
|
|
15
|
+
"rules": [],
|
|
16
|
+
"hooks": []
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Claude Toolkit
|
|
2
|
+
|
|
3
|
+
Shared AI development toolkit — 85 skills, 47 agents, lifecycle hooks, safety constitution.
|
|
4
|
+
|
|
5
|
+
## Skill Tiers
|
|
6
|
+
|
|
7
|
+
- **Tier 1** — single-agent: `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain`, `/tdd`, `/triage-issue`
|
|
8
|
+
- **Tier 1.5** — planning: `/write-a-prd` → `/prd-to-plan` → `/prd-to-issues`; design: `/design-an-interface`, `/architecture-audit`, `/refactor-plan`
|
|
9
|
+
- **Tier 2** — multi-agent: `/workflow <type>` (feature-development, backend-feature, frontend-feature, api-design, database-evolution, test-coverage, security-audit, debugging, incident-response, spike, codebase-onboarding, performance-optimization, infrastructure-change, application-deploy, proactive-troubleshooting)
|
|
10
|
+
- **Tier 3** — custom: `/orchestrate <desc>` (3–6 agents) | `/swarm <mode> <desc>` (map-reduce | consensus | relay)
|
|
11
|
+
|
|
12
|
+
## Path Safety
|
|
13
|
+
- NEVER guess or hallucinate user home directory paths
|
|
14
|
+
- Use `~` or `$HOME` instead of hardcoded `/Users/<username>/` or `/home/<username>/`
|
|
15
|
+
- When an absolute path is needed, run `echo $HOME` first to get the correct value
|
|
16
|
+
|
|
17
|
+
## User Preferences
|
|
18
|
+
|
|
19
|
+
- **Style:** Direct & efficient. No pleasantries. Measurable results.
|
|
20
|
+
- **Methodology:** Provide >=3 alternatives. Use Socratic questioning.
|
|
21
|
+
- **Review:** Apply "Devil's Advocate" critique to decisions.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Quality Gates & Mandatory Practices
|
|
2
|
+
|
|
3
|
+
## MANDATORY PRACTICES
|
|
4
|
+
1. **Plan First:** Tasks >1h require Plan, Success Criteria, and Pre-Mortem.
|
|
5
|
+
2. **Quality Gates:**
|
|
6
|
+
* `ruff check .` (0 errors)
|
|
7
|
+
* `mypy --strict src/` (0 errors)
|
|
8
|
+
* `pytest --cov=src` (>70% coverage)
|
|
9
|
+
* **Type Safety:** 100% public APIs, >60% internal.
|
|
10
|
+
3. **Security:** No secrets in code, sanitization, auth z/n.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Shared utilities for skill detection scripts.
|