@softspark/ai-toolkit 2.7.3 → 2.9.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.
Files changed (52) hide show
  1. package/AGENTS.md +30 -30
  2. package/CHANGELOG.md +30 -0
  3. package/README.md +4 -2
  4. package/app/.claude-plugin/plugin.json +1 -1
  5. package/app/hooks/commit-quality.sh +11 -8
  6. package/app/hooks/quality-check.sh +5 -1
  7. package/app/hooks/session-start.sh +7 -3
  8. package/app/skills/api-patterns/SKILL.md +1 -1
  9. package/app/skills/app-builder/SKILL.md +1 -1
  10. package/app/skills/architecture-decision/SKILL.md +1 -1
  11. package/app/skills/ci-cd-patterns/SKILL.md +1 -1
  12. package/app/skills/clean-code/SKILL.md +1 -1
  13. package/app/skills/csharp-patterns/SKILL.md +1 -1
  14. package/app/skills/database-patterns/SKILL.md +1 -1
  15. package/app/skills/debugging-tactics/SKILL.md +1 -1
  16. package/app/skills/design-engineering/SKILL.md +1 -1
  17. package/app/skills/docker-devops/SKILL.md +1 -1
  18. package/app/skills/documentation-standards/SKILL.md +1 -1
  19. package/app/skills/ecommerce-patterns/SKILL.md +1 -1
  20. package/app/skills/flutter-patterns/SKILL.md +1 -1
  21. package/app/skills/git-mastery/SKILL.md +1 -1
  22. package/app/skills/hive-mind/SKILL.md +1 -1
  23. package/app/skills/java-patterns/SKILL.md +1 -1
  24. package/app/skills/kotlin-patterns/SKILL.md +1 -1
  25. package/app/skills/mcp-patterns/SKILL.md +1 -1
  26. package/app/skills/migration-patterns/SKILL.md +1 -1
  27. package/app/skills/observability-patterns/SKILL.md +1 -1
  28. package/app/skills/performance-profiling/SKILL.md +1 -1
  29. package/app/skills/plan-writing/SKILL.md +1 -1
  30. package/app/skills/rag-patterns/SKILL.md +1 -1
  31. package/app/skills/research-mastery/SKILL.md +1 -1
  32. package/app/skills/ruby-patterns/SKILL.md +1 -1
  33. package/app/skills/rust-patterns/SKILL.md +1 -1
  34. package/app/skills/security-patterns/SKILL.md +1 -1
  35. package/app/skills/swift-patterns/SKILL.md +1 -1
  36. package/app/skills/testing-patterns/SKILL.md +1 -1
  37. package/app/skills/typescript-patterns/SKILL.md +1 -1
  38. package/bin/ai-toolkit.js +1 -1
  39. package/kb/procedures/release-preparation-sop.md +72 -15
  40. package/kb/procedures/release-verification-sop.md +82 -7
  41. package/llms-full.txt +184 -52
  42. package/manifest.json +1 -1
  43. package/package.json +3 -4
  44. package/scripts/add_rule.py +1 -1
  45. package/scripts/audit_skills.py +246 -6
  46. package/scripts/config_resolver.py +8 -2
  47. package/scripts/hook_sources.py +30 -3
  48. package/scripts/inject_hook_cli.py +1 -1
  49. package/scripts/install_steps/ai_tools.py +10 -2
  50. package/scripts/install_steps/hooks.py +1 -1
  51. package/scripts/install_steps/markers.py +2 -2
  52. package/scripts/rule_sources.py +30 -3
package/AGENTS.md CHANGED
@@ -449,68 +449,68 @@ Skills are invocable commands or auto-loaded knowledge sources:
449
449
  - **a11y-validate**: Validate code against accessibility standards: WCAG 2.1 Level AA, EN 301 549, and the European Accessibility Act (EAA / Directive EU 2019/882). Covers semantics, text alternatives, keyboard/focus, color/contrast, forms, media, ARIA, motion, mobile, and EAA documentation requirements. Framework-aware (React/Next/Nuxt/Astro/Gatsby/SvelteKit/Remix/Angular/Vue/React Native/Flutter/static HTML).
450
450
  - **agent-creator**: Creates new specialized agents with frontmatter, tool selection, and delegation guidance
451
451
  - **analyze**: Analyze code quality, complexity, and patterns
452
- - **api-patterns**: Loaded when user asks about REST API design or GraphQL patterns
453
- - **app-builder**: Loaded when user asks to scaffold or build a full-stack app
452
+ - **api-patterns**: REST and GraphQL API design patterns: resource naming, versioning, pagination, error contracts, idempotency, HATEOAS, OpenAPI. Triggers: API design, REST, GraphQL, endpoint, route, OpenAPI, Swagger, pagination, rate limit, versioning, idempotency key. Load when designing or reviewing any HTTP API surface.
453
+ - **app-builder**: Full-stack app scaffolding with stack-selection matrix: Next.js, React+Vite, Nuxt, Astro, FastAPI, Django, Laravel, React Native, Flutter, Unity. Triggers: scaffold, bootstrap, new project, starter template, build app, landing page, dashboard, API, mobile app, CLI, e-commerce, game. Load when user wants to start a new project from scratch.
454
454
  - **architecture-audit**: Explore codebase organically for architectural friction, discover shallow modules, and propose module-deepening refactors as GitHub issue RFCs using parallel sub-agent interface designs. Use when user wants to improve architecture, find shallow modules, deepen modules, or reduce coupling. Codex-adapted: uses native subagents and plan tracking.
455
- - **architecture-decision**: Loaded when user asks about architecture decisions or architecture note writing
455
+ - **architecture-decision**: Architecture decision making via trade-off analysis in RFC/RFD/ADR format: context, constraints, 3+ options, comparison, recommendation. Triggers: architecture decision, ADR, RFC, RFD, trade-offs, options comparison, design choice, pick between, should we use, evaluate approach. Load when weighing 2+ architectural options or writing decision records.
456
456
  - **biz-scan**: Scan codebase for business opportunities and KPIs
457
457
  - **brand-voice**: Loaded when writing documentation, content, README, or user-facing text. Prevents generic LLM rhetoric and enforces direct, technical voice.
458
458
  - **briefing**: Generate executive daily briefing across all agents
459
459
  - **build**: Build the project with auto-detected toolchain
460
460
  - **chaos**: Inject controlled faults for resilience testing
461
461
  - **ci**: Detect and run CI pipeline with status reporting
462
- - **ci-cd-patterns**: Loaded when user asks about CI/CD pipelines or deployment automation
463
- - **clean-code**: Loaded when user asks about clean code, naming, or code quality
462
+ - **ci-cd-patterns**: CI/CD pipeline and deployment automation: GitHub Actions, GitLab CI, Jenkins, build stages, caching, artifact promotion, blue-green, canary, rollback gates. Triggers: CI, CD, pipeline, GitHub Actions, workflow YAML, deploy automation, release, artifact, rollout, canary, blue-green. Load when designing or fixing a build/release pipeline.
463
+ - **clean-code**: Code quality principles: meaningful names, single responsibility, DRY, small functions, clear intent, guard clauses, refactoring rules. Triggers: clean code, naming, refactor for clarity, code smell, SRP, DRY, long function, god class, magic number, dead code. Load when reviewing or writing any production code.
464
464
  - **command-creator**: Creates new Claude Code slash commands with frontmatter, workflow guidance, and validation
465
465
  - **commit**: Create Conventional Commits with pre-commit validation
466
466
  - **content-moderation-patterns**: Loaded when user builds content moderation, safety filters, or policy enforcement with Claude. Covers pre-filter vs LLM-classify, category design, confidence thresholds, and human-in-the-loop.
467
467
  - **council**: 4-perspective decision evaluation for architecture choices. Use when user wants multi-angle analysis, needs to decide between alternatives, or mentions 'council', 'evaluate decision', 'pros cons'. Codex-adapted: uses native subagents and plan tracking.
468
- - **csharp-patterns**: Loaded when user asks about C# or .NET development patterns
468
+ - **csharp-patterns**: C# and .NET development patterns: LINQ, async/await, dependency injection, records, nullable reference types, ASP.NET Core minimal APIs, EF Core, MediatR. Triggers: C#, .NET, dotnet, ASP.NET, EF Core, LINQ, IServiceCollection, record type, async C#, nullable reference types. Load when writing or reviewing C#/.NET code.
469
469
  - **cve-scan**: Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, bundler, dart)
470
- - **database-patterns**: Loaded when user asks about database schema or query optimization
470
+ - **database-patterns**: Database schema design and query optimization: normalization, indexing strategies, joins, N+1, transactions, isolation levels, partitioning, EXPLAIN plans. Triggers: schema, table design, index, slow query, N+1, PostgreSQL, MySQL, SQL Server, SQL, EXPLAIN, query plan, transaction, deadlock. Load when designing tables or tuning queries.
471
471
  - **debug**: Debug errors and trace root causes systematically
472
- - **debugging-tactics**: Loaded when user is debugging an issue or needs root cause analysis
472
+ - **debugging-tactics**: Root-cause debugging with 4-phase method: investigation, hypothesis, validation, fix. No fix without RCA. Triggers: bug, error, exception, stack trace, not working, intermittent, flaky, crash, regression, fails sometimes, why is X happening, broken after. Load when user reports a bug or asks to investigate failing code.
473
473
  - **deploy**: Deploy with pre-flight checks and health verification
474
474
  - **design-an-interface**: Generate multiple radically different interface designs using parallel sub-agents, then compare on simplicity, depth, and correctness. Based on 'Design It Twice' from Ousterhout. Use when user wants to design an API, explore interface options, compare module shapes, or mentions 'design it twice'. Codex-adapted: uses native subagents and plan tracking.
475
- - **design-engineering**: Loaded when user asks about UI animations or CSS design craft
476
- - **docker-devops**: Loaded when user asks about Docker, containers, or DevOps patterns
475
+ - **design-engineering**: UI craftsmanship (Emil Kowalski school): animation frequency rules, easing curves, micro-interactions, state polish, invisible-details philosophy. Triggers: animation, transition, ease-out, ease-in-out, motion, micro-interaction, hover state, loading state, UI polish, design detail, spring curve, delightful UX. Load when building or reviewing interactive UI.
476
+ - **docker-devops**: Docker, containers, Kubernetes, and DevOps patterns: Dockerfile best practices, multi-stage builds, compose, k8s manifests, Helm charts, service mesh, image hardening. Triggers: Docker, Dockerfile, container, image, Kubernetes, k8s, compose, Helm, registry, layer caching, service mesh, pod, deployment yaml. Load when writing or fixing container/orchestration configs.
477
477
  - **docs**: Generate and update README, API docs, and architecture notes
478
- - **documentation-standards**: Loaded when creating or updating KB documents, architecture notes, SOPs, or any file in kb/ directory
479
- - **ecommerce-patterns**: Loaded when user asks about e-commerce or shopping cart features
478
+ - **documentation-standards**: KB document conventions: YAML frontmatter (7 required fields), 5-category taxonomy (reference/howto/procedures/troubleshooting/best-practices), directory-category matching, validate.sh CI rules. Triggers: kb/, KB document, architecture note, SOP, runbook, howto, frontmatter, knowledge base entry, documentation standard. Load when creating or editing any file under kb/.
479
+ - **ecommerce-patterns**: E-commerce domain patterns: cart, checkout flow, payment providers (Stripe/Adyen), order state machine, inventory, promotions, tax, B2B vs B2C. Triggers: cart, checkout, product, SKU, inventory, payment, Stripe, Shopify, Medusa, Magento, order status, promotion, tax calculation, coupon, refund. Load when working on any e-commerce feature.
480
480
  - **evaluate**: Evaluate skill quality and RAG retrieval accuracy
481
481
  - **evolve**: Evolve agent definitions via meta-architect
482
482
  - **explain**: Explain code, architecture, or concepts with diagrams
483
483
  - **explore**: Explore codebase structure, stack, and architecture
484
484
  - **fix**: Auto-fix lint errors, type issues, and simple bugs
485
- - **flutter-patterns**: Loaded when user asks about Flutter or Dart development patterns
486
- - **git-mastery**: Loaded when user asks about advanced Git workflows or history rewriting
485
+ - **flutter-patterns**: Flutter and Dart development patterns: widget composition, state management (Riverpod/Bloc/Provider), navigation, async, platform channels, performance. Triggers: Flutter, Dart, widget, StatefulWidget, Riverpod, Bloc, Provider, pubspec, Navigator, platform channel, hot reload, StatelessWidget. Load when writing or reviewing Flutter code.
486
+ - **git-mastery**: Advanced Git workflows: interactive rebase, bisect, reflog, cherry-pick, worktrees, history rewriting, submodules, large-file migration (LFS/filter-repo). Triggers: git rebase, bisect, cherry-pick, reflog, force push, history rewrite, detached HEAD, merge conflict, worktree, squash, fixup, submodule. Load when user needs non-trivial Git operations.
487
487
  - **grill-me**: Stress-test a plan or design through relentless Socratic questioning, walking down each decision branch until reaching shared understanding. Use when user wants to stress-test a plan, get grilled, validate assumptions, or mentions 'grill me'. Codex-adapted: uses native subagents and plan tracking.
488
488
  - **health**: Report service and infrastructure health status
489
489
  - **hipaa-validate**: Validate code against HIPAA policy: PHI exposure, missing audit logging, unencrypted transmission/storage, access control gaps, temp file exposure, and missing BAA references
490
- - **hive-mind**: Loaded when orchestrating multi-agent swarms or consensus workflows
490
+ - **hive-mind**: Multi-agent swarm coordination: consensus voting with confidence scores, output aggregation, file ownership, targeted vs broadcast messaging, map-reduce workflows. Triggers: swarm, hive mind, multi-agent, consensus, parallel agents, team of agents, aggregate results, agent voting, distributed agents. Load when orchestrating 3+ agents working in parallel.
491
491
  - **hook-creator**: Creates new Claude Code hooks with guided workflow, strict conventions, and validation
492
492
  - **index**: Index codebase into the knowledge base
493
493
  - **instinct-review**: Review and manage learned instincts from past sessions
494
494
  - **introspect**: Agent self-debugging and recovery. Use when stuck in loops, making repeated errors, or quality degrades. Triggers: introspect, self-debug, stuck, loop, why failing.
495
- - **java-patterns**: Loaded when user asks about Java development patterns
495
+ - **java-patterns**: Java development patterns: Spring Boot, CompletableFuture, records, sealed types, streams, JPA/Hibernate, Maven/Gradle, virtual threads (Loom). Triggers: Java, Spring, Spring Boot, JPA, Hibernate, Maven, Gradle, CompletableFuture, record type, sealed class, virtual thread. Load when writing or reviewing Java code.
496
496
  - **json-mode-patterns**: Loaded when user needs structured JSON output from Claude. Covers tool-use-as-JSON-mode, schema design, parsing, partial recovery, and validation.
497
- - **kotlin-patterns**: Loaded when user asks about Kotlin development patterns
497
+ - **kotlin-patterns**: Kotlin development patterns: coroutines, Flow, sealed classes, data classes, extension functions, null safety, Ktor, Jetpack Compose, KMP. Triggers: Kotlin, coroutine, Flow, suspend, Ktor, Android Kotlin, Jetpack Compose, sealed class, data class, KMP, kotlinx. Load when writing or reviewing Kotlin code.
498
498
  - **lint**: Lint code with auto-detected tools and fix suggestions
499
499
  - **mcp-builder**: Build production-grade MCP (Model Context Protocol) servers from scratch using the 4-phase methodology: research, implement, test, evaluate. Use when creating new MCP integrations for external APIs, databases, or internal services.
500
- - **mcp-patterns**: Loaded when user asks about MCP servers or tool protocol design
500
+ - **mcp-patterns**: MCP (Model Context Protocol) server design: tool schemas, resource patterns, transport selection (stdio/SSE), client configuration, error handling, capability negotiation. Triggers: MCP, Model Context Protocol, MCP server, MCP tool, MCP resource, JSON-RPC, stdio transport, SSE transport, Claude Desktop config, Cursor MCP. Load when building or integrating MCP servers.
501
501
  - **mem-search**: Search past coding sessions using natural language. Finds relevant observations, decisions, and context from previous work.
502
502
  - **migrate**: Run database migrations with backup verification
503
- - **migration-patterns**: Loaded when user asks about database migrations or zero-downtime deploys
503
+ - **migration-patterns**: Zero-downtime database migration patterns: expand-contract, double-write, backfill, blue-green schema changes, feature flags, rollback safety, online DDL. Triggers: migration, schema change, zero-downtime, expand-contract, double-write, backfill, ALTER TABLE, column rename, safe deploy, online DDL. Load when planning non-trivial DB schema changes.
504
504
  - **model-routing-patterns**: Loaded when user builds multi-model pipelines (Haiku/Sonnet/Opus). Covers cost-optimized routing, escalation, sub-agent delegation, and fallback chains.
505
505
  - **night-watch**: Run autonomous maintenance and dependency updates
506
- - **observability-patterns**: Loaded when user asks about logging, metrics, or tracing patterns
506
+ - **observability-patterns**: Observability: structured logging, metrics (RED/USE/four golden signals), distributed tracing (OpenTelemetry), correlation IDs, log aggregation, SLO/SLI. Triggers: logging, log level, metrics, Prometheus, Grafana, OpenTelemetry, trace, span, structured log, observability, monitoring, SLO, SLI, alerting. Load when adding or reviewing logs, metrics, or traces.
507
507
  - **onboard**: Generate project onboarding materials
508
508
  - **orchestrate**: Coordinate multiple specialized agents in parallel Codex-adapted: uses native subagents and plan tracking.
509
509
  - **panic**: Emergency stabilization via system-governor agent
510
- - **performance-profiling**: Loaded when user asks about performance profiling or optimization
510
+ - **performance-profiling**: Performance measurement and optimization: four golden signals (latency/traffic/errors/saturation), p50/p95/p99, baseline-change-measure loop, flame graphs, load testing. Triggers: performance, slow, latency, p99, flame graph, profile, bottleneck, optimization, load test, benchmark, CPU profiling, memory leak. Load when diagnosing or optimizing slow code or services.
511
511
  - **persona**: Switch engineering persona at runtime: backend-lead, frontend-lead, devops-eng, junior-dev
512
512
  - **plan**: Plan implementation with tasks and success criteria
513
- - **plan-writing**: Loaded when user asks to write an implementation plan or pre-mortem
513
+ - **plan-writing**: Implementation plan and pre-mortem drafting: phase breakdown, success criteria, risks, rollback plan, acceptance tests, estimated effort. Triggers: implementation plan, pre-mortem, phased plan, project plan, task breakdown, success criteria, rollback strategy, risk register. Load when user asks to write a plan or pre-mortem document.
514
514
  - **plugin-creator**: Creates experimental opt-in plugin packs with manifests, conventions, and optional module scaffolding for Claude and Codex runtimes
515
515
  - **pr**: Create pull requests with pre-flight validation
516
516
  - **prd-to-issues**: Break a PRD into independently-grabbable GitHub issues using vertical slices with HITL/AFK tagging and dependency ordering. Use when user wants to convert a PRD to issues, create tickets, or break down a PRD into work items.
@@ -518,29 +518,29 @@ Skills are invocable commands or auto-loaded knowledge sources:
518
518
  - **predict**: Predict regressions and impact before changes land
519
519
  - **prompt-caching-patterns**: Loaded when user builds with Anthropic API and needs to cut cost or latency via prompt caching. Covers TTL, cache breakpoints, stacking, invalidation, and measuring hit rate.
520
520
  - **qa-session**: Interactive QA session where user reports bugs conversationally and agent files GitHub issues with domain language. Explores codebase in background for context. Use when user wants to report bugs, do QA, file issues conversationally, or mentions QA session. Codex-adapted: uses native subagents and plan tracking.
521
- - **rag-patterns**: Loaded when user asks about RAG systems, embeddings, or vector search
521
+ - **rag-patterns**: RAG architecture: embeddings, chunking strategies, hybrid search (BM25 + vector), reranking, CRAG/self-correcting, multi-hop reasoning, evaluation metrics. Triggers: RAG, embedding, vector search, pgvector, Qdrant, Pinecone, Weaviate, chunking, reranker, retrieval, hybrid search, semantic search, knowledge base, cosine similarity. Load when building or tuning RAG systems.
522
522
  - **refactor**: Refactor code for quality and maintainability
523
523
  - **refactor-plan**: Create a detailed refactor plan with tiny commits via user interview, then file as a GitHub issue RFC. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps. Codex-adapted: uses native subagents and plan tracking.
524
524
  - **repeat**: Run a prompt or slash command on a recurring interval until task complete or limits reached. Use when user wants to set up a recurring task, poll for status, or run something repeatedly on an interval. Codex-adapted: uses native subagents and plan tracking.
525
- - **research-mastery**: Loaded when user asks to research, verify, or synthesize information
525
+ - **research-mastery**: Hierarchical information retrieval following strict order: KB first (smart_query/crag_search), then MCP/Context7, then web search, then LLM knowledge as last resort. Triggers: research, find information, verify fact, synthesize sources, fact-check, cross-reference, multi-source, cite sources, investigate topic. Load when any task requires external or cross-source knowledge.
526
526
  - **review**: Review code for quality, security, and correctness
527
527
  - **rollback**: Roll back a deployment safely with verification
528
- - **ruby-patterns**: Loaded when user asks about Ruby development patterns
529
- - **rust-patterns**: Loaded when user asks about Rust development patterns
528
+ - **ruby-patterns**: Ruby and Rails development patterns: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet/RBS, Hanami, Roda, Rack middleware. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, gem, Gemfile, bundler, rake, Hanami, Sorbet. Load when writing or reviewing Ruby code.
529
+ - **rust-patterns**: Rust development patterns: ownership, borrowing, lifetimes, async (Tokio), error handling (Result/anyhow/thiserror), traits, macros, zero-cost abstractions, unsafe boundaries. Triggers: Rust, borrow checker, lifetime, Tokio, async Rust, cargo, trait, impl, Result, unsafe, lifetime annotation, clippy. Load when writing or reviewing Rust code.
530
530
  - **search**: Search the knowledge base with semantic and hybrid modes
531
- - **security-patterns**: Loaded when user asks about security, OWASP, or auth patterns
531
+ - **security-patterns**: Application security: OWASP Top 10, authN/authZ, input validation, secrets management, TLS, CSRF/XSS/SQLi, session handling, JWT, rate limiting, CSP. Triggers: security, OWASP, auth, JWT, CSRF, XSS, SQL injection, secrets, encryption, TLS, authentication, authorization, CSP, CORS, password hashing. Load when touching auth code, handling user input, or doing security review.
532
532
  - **seo-validate**: Validate code against SEO best practices: W3C semantics, meta/OG tags, Schema.org, hreflang, Core Web Vitals (LCP/INP/CLS), resource hints, GEO, SPA/SSG/CSR crawlability, technical SEO, accessibility-for-SEO. Supports React/Next/Nuxt/Astro/Gatsby/SvelteKit/Remix/Angular/Vue/static HTML.
533
533
  - **skill-audit**: Scan skills and agents for security risks: dangerous patterns, secrets, excessive permissions
534
534
  - **skill-creator**: Create new skills from templates with guided workflow
535
535
  - **subagent-development**: Execute implementation plans using fresh subagents per task with two-stage review: spec compliance first, then code quality. Use when executing plans with independent tasks. Codex-adapted: uses native subagents and plan tracking.
536
536
  - **swarm**: Execute tasks via Map-Reduce, Consensus, or Relay swarms Codex-adapted: uses native subagents and plan tracking.
537
- - **swift-patterns**: Loaded when user asks about Swift or iOS development patterns
537
+ - **swift-patterns**: Swift and iOS development patterns: SwiftUI, Combine, async/await, property wrappers, actors, Swift Package Manager, Core Data, UIKit interop, @MainActor. Triggers: Swift, SwiftUI, Combine, iOS, Xcode, actor, property wrapper, Core Data, SPM, UIKit, @MainActor, @State, @Binding. Load when writing or reviewing Swift code.
538
538
  - **tdd**: Test-driven development with red-green-refactor loop and vertical slices. Use when user wants TDD, test-first development, red-green-refactor, or building features with tests driving the implementation. Codex-adapted: uses native subagents and plan tracking.
539
539
  - **teams**: Launch pre-configured Agent Teams for common workflows Codex-adapted: uses native subagents and plan tracking.
540
540
  - **test**: Run tests with coverage analysis and reporting
541
- - **testing-patterns**: Loaded when user asks about testing strategy, fixtures, or mocking
541
+ - **testing-patterns**: Testing strategy and craft: pyramid vs trophy, unit/integration/e2e split, fixtures, mocks vs fakes vs stubs, AAA pattern, flaky test diagnosis, coverage goals, property-based testing. Triggers: test, testing strategy, fixture, mock, stub, AAA, unit test, integration test, e2e, Playwright, Cypress, flaky, coverage, TDD, test pyramid. Load when writing, reviewing, or designing test suites.
542
542
  - **triage-issue**: Triage a bug by deeply exploring the codebase for root cause, then create a GitHub issue with a TDD-based fix plan. Mostly hands-off — minimal user interaction. Use when user reports a bug, wants to investigate an issue, mentions triage, or wants a fix plan. Codex-adapted: uses native subagents and plan tracking.
543
- - **typescript-patterns**: Loaded when user asks about TypeScript patterns or type safety
543
+ - **typescript-patterns**: TypeScript type safety patterns: strict mode, generics, conditional types, template literals, discriminated unions, branded types, Zod, satisfies operator, const assertions. Triggers: TypeScript, TS, generics, conditional type, utility type, strict, Zod, satisfies, discriminated union, type safety, type narrowing, template literal type. Load when writing or reviewing TypeScript code.
544
544
  - **ubiquitous-language**: Extract a DDD-style ubiquitous language glossary from the conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, or mentions DDD or domain model.
545
545
  - **verification-before-completion**: Loaded when agent is about to claim work is complete, fixed, or passing — requires running verification commands and confirming output before making any success claims. Evidence before assertions, always.
546
546
  - **workflow**: Start and manage autonomous agent workflows Codex-adapted: uses native subagents and plan tracking.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,36 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v2.9.0 — Skill Routability & Description Lint (2026-04-19)
11
+
12
+ ### Changed
13
+ - **30 knowledge-skill descriptions rewritten** — every skill with `user-invocable: false` used the `"Loaded when user asks about X"` shape, which carries no action verb and no concrete trigger keywords. Per [Anthropic skill docs](https://code.claude.com/docs/en/skills.md), Claude Code auto-routes skills using only the `description:` field (+ optional `when_to_use:`), so weak descriptions silently lowered hit rate. Rewritten with the pattern `[capability]. Triggers: [keywords]. Load when [...]`. Affected skills: `api-patterns`, `app-builder`, `architecture-decision`, `ci-cd-patterns`, `clean-code`, `csharp-patterns`, `database-patterns`, `debugging-tactics`, `design-engineering`, `docker-devops`, `documentation-standards`, `ecommerce-patterns`, `flutter-patterns`, `git-mastery`, `hive-mind`, `java-patterns`, `kotlin-patterns`, `mcp-patterns`, `migration-patterns`, `observability-patterns`, `performance-profiling`, `plan-writing`, `rag-patterns`, `research-mastery`, `ruby-patterns`, `rust-patterns`, `security-patterns`, `swift-patterns`, `testing-patterns`, `typescript-patterns`.
14
+
15
+ ### Added
16
+ - **`scripts/audit_skills.py` description-quality lint (`check_description`)** — new WARN rules that prevent the `"Loaded when user asks about/to ..."` anti-pattern from returning. Enforces three limits on auto-loadable skills: `description + when_to_use ≤ 1536 chars` (Anthropic truncation limit), knowledge-skill description ≥ 80 chars, and a regex block on the historical weak-opening patterns. Task skills (`disable-model-invocation: true`) are skipped — their description is a menu label, not a routing signal.
17
+ - **Regenerated `AGENTS.md`, `llms.txt`, `llms-full.txt`, `GEMINI.md`, `.github/copilot-instructions.md`** — machine-readable catalogs now carry the new descriptions. External clients (Cursor, Windsurf, Copilot, Gemini CLI, Codex) get the same routing signal as Claude Code.
18
+
19
+
20
+
21
+ ### Added
22
+ - **`scripts/audit_skills.py --sarif`** — emits SARIF 2.1.0 JSON compatible with GitHub Advanced Security Code Scanning. Severity maps HIGH→error / WARN→warning / INFO→note. Enables the GitHub Security tab to ingest audit findings directly.
23
+ - **`scripts/audit_skills.py --permissions`** — per-skill tool-permission report (human + `--json` forms). Aggregates skills by tool usage (e.g. "50 skills use Bash"), flags broad Bash+Write+Edit access, prints full skill/invocable/tools table. Security review can now answer "show me every skill that can Bash" in one command.
24
+ - **Checksum pinning for URL-sourced rules and hooks** — `rule_sources.py` and `hook_sources.py` now persist `sha256` of the fetched payload in `sources.json`. Subsequent refreshes log `CHECKSUM CHANGED` when the upstream payload changes. Setting `AI_TOOLKIT_STRICT_PIN=1` turns the mismatch into a hard failure (exit 2) so CI can reject silent upstream tampering.
25
+ - **`SECRET_PLACEHOLDER_PREFIXES`** allowlist in `audit_skills.py` — WARN-level hardcoded-secret patterns now skip values starting with `REPLACE_`, `CHANGEME_`, `CHANGE_ME`, `YOUR_`, `EXAMPLE_`, `PLACEHOLDER_`, `${`, `{{`, `$ENV_`, `$(`, `<`, `xxx`, `XXX`. Fewer false positives on docs and `.env.example` fixtures.
26
+
27
+ ### Changed
28
+ - **npm publish workflow (`.github/workflows/publish.yml`)** now runs with `--provenance` and `id-token: write`. Published tarballs carry a cryptographic provenance attestation visible on npmjs.com and verifiable via `npm audit signatures`.
29
+ - **`scripts/config_resolver.py:_extract_tarball`** passes `filter="data"` to `tarfile.extract` on Python 3.12+. Defense in depth on top of existing path-traversal, symlink, and absolute-path rejection. Future-proofs against the 3.14 default-filter change.
30
+ - **`app/hooks/session-start.sh`** sanitises `VERSION_MSG` with `LC_ALL=C tr -d '"'"'"'\\`$'` before interpolating into `osascript` / `powershell.exe` notification commands. Closes a latent command-injection footgun.
31
+ - **`scripts/install_steps/ai_tools.py`** and **`hooks.py`** — generator and merge-hooks `subprocess.run` calls now have `timeout=120`. A stuck generator produces a clear error instead of hanging `ai-toolkit install` indefinitely.
32
+ - **`app/hooks/commit-quality.sh`** — extracted commit message via a small Python regex instead of fragile shell `grep -oE` chain. Handles commit messages containing mixed `"` and `'` correctly.
33
+ - **`app/hooks/quality-check.sh`** — normalised `|| true` handling across all languages (Python ruff was previously the only one propagating exit status). All language checks are now consistently advisory on the Stop hook.
34
+ - **`bin/ai-toolkit.js:handleAddRule`** — simplified HTTPS/HTTP detection (single `startsWith('https://')` after the `http://` reject).
35
+ - **`package.json` description** shortened from 400+ to 241 characters — stops mid-sentence truncation in npm search. Surfaces the new SARIF + provenance differentiators.
36
+ - **`package.json` `engines`** — removed non-standard `bats` entry (npm ignores unknown engines and warned on install). Bats requirement is documented in `CLAUDE.md` Commands section.
37
+
38
+ ---
39
+
10
40
  ## v2.7.3 — Regenerate llms after Medplum Merge (2026-04-17)
11
41
 
12
42
  ### Fixed
package/README.md CHANGED
@@ -10,9 +10,11 @@
10
10
 
11
11
  ---
12
12
 
13
- ## What's New in v2.7.3
13
+ ## What's New in v2.9.0
14
14
 
15
- - **`llms.txt` + `llms-full.txt` regenerated** after PR #7 (Medplum/FHIR rules) catalogs now list `medplum-docs-map.md` and the language-rules reference advertises the correct counts: `14 languages / 73 rule files` (was `13 / 68`).
15
+ - **Skill routability fix** 30 knowledge skills (`user-invocable: false`) had weak `"Loaded when user asks about X"` descriptions that silently lowered auto-loading hit rate. Rewritten with the Anthropic-docs-aligned shape `[capability]. Triggers: [keywords]. Load when [...]`.
16
+ - **Description-quality lint** — `audit_skills.py` now enforces `description + when_to_use ≤ 1536 chars` (Anthropic limit), knowledge-skill descriptions ≥ 80 chars, and blocks the old anti-pattern from returning. CI fails on regression.
17
+ - **Catalogs regenerated** — `AGENTS.md`, `llms.txt`, `llms-full.txt`, `GEMINI.md`, and `.github/copilot-instructions.md` now carry the improved routing signals for Cursor, Windsurf, Copilot, Gemini CLI, and Codex.
16
18
 
17
19
  See [CHANGELOG.md](CHANGELOG.md) for full history.
18
20
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-toolkit",
3
3
  "description": "Professional-grade Claude Code toolkit with persona presets, skill security auditor, expanded lifecycle hooks, experimental opt-in plugin packs, benchmark harvesting, and multi-tool support.",
4
- "version": "2.7.3",
4
+ "version": "2.9.0",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -14,14 +14,17 @@ fi
14
14
  # Only check commands that contain "git commit"
15
15
  printf '%s' "$COMMAND" | grep -q 'git commit' || exit 0
16
16
 
17
- # Extract commit message from -m flag
18
- # Handles: git commit -m "msg", git commit -m 'msg', git commit -am "msg"
19
- MSG=$(printf '%s' "$COMMAND" | grep -oE '\-m\s+["'"'"']([^"'"'"']*)["'"'"']' | head -1 | sed "s/^-m[[:space:]]*[\"']//" | sed "s/[\"']$//")
20
-
21
- # Also handle heredoc-style: -m "$(cat <<'EOF' ... EOF )"
22
- if [ -z "$MSG" ]; then
23
- MSG=$(printf '%s' "$COMMAND" | grep -oE '\-m\s+"[^"]*"' | head -1 | sed 's/^-m[[:space:]]*//' | tr -d '"')
24
- fi
17
+ # Extract commit message from -m flag. Delegated to Python for correct
18
+ # quote handling the previous shell-regex approach broke on commit messages
19
+ # containing both " and '.
20
+ MSG=$(printf '%s' "$COMMAND" | python3 -c '
21
+ import re, sys
22
+ cmd = sys.stdin.read()
23
+ # Match -m followed by a quoted string (either " or ").
24
+ m = re.search(r"""-m\s+("((?:[^"\\]|\\.)*)"|'"'"'((?:[^'"'"'\\]|\\.)*)'"'"')""", cmd)
25
+ if m:
26
+ print(m.group(2) if m.group(2) is not None else m.group(3))
27
+ ' 2>/dev/null)
25
28
 
26
29
  # No message found (might be --amend or interactive) — skip
27
30
  if [ -z "$MSG" ]; then
@@ -7,8 +7,12 @@
7
7
  # shellcheck source=_profile-check.sh
8
8
  source "$(dirname "$0")/_profile-check.sh"
9
9
 
10
+ # All lint/typecheck invocations are advisory. They run on the Stop hook and
11
+ # must not block Claude from returning a response, hence the trailing `|| true`.
12
+ # The first 15 lines of output are surfaced to the user; further lines are
13
+ # truncated to keep the context lean.
10
14
  if [ -f pyproject.toml ] || [ -f setup.py ]; then
11
- ruff check . 2>&1 | head -15
15
+ ruff check . 2>&1 | head -15 || true
12
16
  elif [ -f package.json ] && [ -f tsconfig.json ]; then
13
17
  npx tsc --noEmit 2>&1 | head -15 || true
14
18
  elif [ -f composer.json ] && [ -f vendor/bin/phpstan ]; then
@@ -14,13 +14,17 @@ TOOLKIT_DIR="$(npm root -g 2>/dev/null)/@softspark/ai-toolkit"
14
14
  VERSION_MSG=$(python3 "$TOOLKIT_DIR/scripts/version_check.py" 2>/dev/null)
15
15
  if [ -n "$VERSION_MSG" ]; then
16
16
  echo "$VERSION_MSG"
17
+ # Strip shell/AppleScript/PowerShell metacharacters before interpolating into
18
+ # notification commands. VERSION_MSG is version_check.py output which should
19
+ # be plain ASCII, but sanitize anyway as defense in depth.
20
+ VERSION_MSG_SAFE=$(printf '%s' "$VERSION_MSG" | LC_ALL=C tr -d '"'"'"'\\`$')
17
21
  # Desktop notification so user sees update before typing
18
22
  if command -v osascript >/dev/null 2>&1; then
19
- osascript -e "display notification \"$VERSION_MSG\" with title \"ai-toolkit\"" 2>/dev/null &
23
+ osascript -e "display notification \"$VERSION_MSG_SAFE\" with title \"ai-toolkit\"" 2>/dev/null &
20
24
  elif command -v notify-send >/dev/null 2>&1; then
21
- notify-send "ai-toolkit" "$VERSION_MSG" 2>/dev/null &
25
+ notify-send "ai-toolkit" "$VERSION_MSG_SAFE" 2>/dev/null &
22
26
  elif command -v powershell.exe >/dev/null 2>&1; then
23
- powershell.exe -Command "[void](New-Object -ComObject WScript.Shell).Popup('$VERSION_MSG',5,'ai-toolkit',64)" 2>/dev/null &
27
+ powershell.exe -Command "[void](New-Object -ComObject WScript.Shell).Popup('$VERSION_MSG_SAFE',5,'ai-toolkit',64)" 2>/dev/null &
24
28
  fi
25
29
  fi
26
30
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: api-patterns
3
- description: "Loaded when user asks about REST API design or GraphQL patterns"
3
+ description: "REST and GraphQL API design patterns: resource naming, versioning, pagination, error contracts, idempotency, HATEOAS, OpenAPI. Triggers: API design, REST, GraphQL, endpoint, route, OpenAPI, Swagger, pagination, rate limit, versioning, idempotency key. Load when designing or reviewing any HTTP API surface."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: app-builder
3
- description: "Loaded when user asks to scaffold or build a full-stack app"
3
+ description: "Full-stack app scaffolding with stack-selection matrix: Next.js, React+Vite, Nuxt, Astro, FastAPI, Django, Laravel, React Native, Flutter, Unity. Triggers: scaffold, bootstrap, new project, starter template, build app, landing page, dashboard, API, mobile app, CLI, e-commerce, game. Load when user wants to start a new project from scratch."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: architecture-decision
3
- description: "Loaded when user asks about architecture decisions or architecture note writing"
3
+ description: "Architecture decision making via trade-off analysis in RFC/RFD/ADR format: context, constraints, 3+ options, comparison, recommendation. Triggers: architecture decision, ADR, RFC, RFD, trade-offs, options comparison, design choice, pick between, should we use, evaluate approach. Load when weighing 2+ architectural options or writing decision records."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Write
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ci-cd-patterns
3
- description: "Loaded when user asks about CI/CD pipelines or deployment automation"
3
+ description: "CI/CD pipeline and deployment automation: GitHub Actions, GitLab CI, Jenkins, build stages, caching, artifact promotion, blue-green, canary, rollback gates. Triggers: CI, CD, pipeline, GitHub Actions, workflow YAML, deploy automation, release, artifact, rollout, canary, blue-green. Load when designing or fixing a build/release pipeline."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: clean-code
3
- description: "Loaded when user asks about clean code, naming, or code quality"
3
+ description: "Code quality principles: meaningful names, single responsibility, DRY, small functions, clear intent, guard clauses, refactoring rules. Triggers: clean code, naming, refactor for clarity, code smell, SRP, DRY, long function, god class, magic number, dead code. Load when reviewing or writing any production code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: csharp-patterns
3
- description: "Loaded when user asks about C# or .NET development patterns"
3
+ description: "C# and .NET development patterns: LINQ, async/await, dependency injection, records, nullable reference types, ASP.NET Core minimal APIs, EF Core, MediatR. Triggers: C#, .NET, dotnet, ASP.NET, EF Core, LINQ, IServiceCollection, record type, async C#, nullable reference types. Load when writing or reviewing C#/.NET code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: database-patterns
3
- description: "Loaded when user asks about database schema or query optimization"
3
+ description: "Database schema design and query optimization: normalization, indexing strategies, joins, N+1, transactions, isolation levels, partitioning, EXPLAIN plans. Triggers: schema, table design, index, slow query, N+1, PostgreSQL, MySQL, SQL Server, SQL, EXPLAIN, query plan, transaction, deadlock. Load when designing tables or tuning queries."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: debugging-tactics
3
- description: "Loaded when user is debugging an issue or needs root cause analysis"
3
+ description: "Root-cause debugging with 4-phase method: investigation, hypothesis, validation, fix. No fix without RCA. Triggers: bug, error, exception, stack trace, not working, intermittent, flaky, crash, regression, fails sometimes, why is X happening, broken after. Load when user reports a bug or asks to investigate failing code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Grep, Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: design-engineering
3
- description: "Loaded when user asks about UI animations or CSS design craft"
3
+ description: "UI craftsmanship (Emil Kowalski school): animation frequency rules, easing curves, micro-interactions, state polish, invisible-details philosophy. Triggers: animation, transition, ease-out, ease-in-out, motion, micro-interaction, hover state, loading state, UI polish, design detail, spring curve, delightful UX. Load when building or reviewing interactive UI."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docker-devops
3
- description: "Loaded when user asks about Docker, containers, or DevOps patterns"
3
+ description: "Docker, containers, Kubernetes, and DevOps patterns: Dockerfile best practices, multi-stage builds, compose, k8s manifests, Helm charts, service mesh, image hardening. Triggers: Docker, Dockerfile, container, image, Kubernetes, k8s, compose, Helm, registry, layer caching, service mesh, pod, deployment yaml. Load when writing or fixing container/orchestration configs."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: documentation-standards
3
- description: "Loaded when creating or updating KB documents, architecture notes, SOPs, or any file in kb/ directory"
3
+ description: "KB document conventions: YAML frontmatter (7 required fields), 5-category taxonomy (reference/howto/procedures/troubleshooting/best-practices), directory-category matching, validate.sh CI rules. Triggers: kb/, KB document, architecture note, SOP, runbook, howto, frontmatter, knowledge base entry, documentation standard. Load when creating or editing any file under kb/."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ecommerce-patterns
3
- description: "Loaded when user asks about e-commerce or shopping cart features"
3
+ description: "E-commerce domain patterns: cart, checkout flow, payment providers (Stripe/Adyen), order state machine, inventory, promotions, tax, B2B vs B2C. Triggers: cart, checkout, product, SKU, inventory, payment, Stripe, Shopify, Medusa, Magento, order status, promotion, tax calculation, coupon, refund. Load when working on any e-commerce feature."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: flutter-patterns
3
- description: "Loaded when user asks about Flutter or Dart development patterns"
3
+ description: "Flutter and Dart development patterns: widget composition, state management (Riverpod/Bloc/Provider), navigation, async, platform channels, performance. Triggers: Flutter, Dart, widget, StatefulWidget, Riverpod, Bloc, Provider, pubspec, Navigator, platform channel, hot reload, StatelessWidget. Load when writing or reviewing Flutter code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: git-mastery
3
- description: "Loaded when user asks about advanced Git workflows or history rewriting"
3
+ description: "Advanced Git workflows: interactive rebase, bisect, reflog, cherry-pick, worktrees, history rewriting, submodules, large-file migration (LFS/filter-repo). Triggers: git rebase, bisect, cherry-pick, reflog, force push, history rewrite, detached HEAD, merge conflict, worktree, squash, fixup, submodule. Load when user needs non-trivial Git operations."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Grep, Glob
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hive-mind
3
- description: "Loaded when orchestrating multi-agent swarms or consensus workflows"
3
+ description: "Multi-agent swarm coordination: consensus voting with confidence scores, output aggregation, file ownership, targeted vs broadcast messaging, map-reduce workflows. Triggers: swarm, hive mind, multi-agent, consensus, parallel agents, team of agents, aggregate results, agent voting, distributed agents. Load when orchestrating 3+ agents working in parallel."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: java-patterns
3
- description: "Loaded when user asks about Java development patterns"
3
+ description: "Java development patterns: Spring Boot, CompletableFuture, records, sealed types, streams, JPA/Hibernate, Maven/Gradle, virtual threads (Loom). Triggers: Java, Spring, Spring Boot, JPA, Hibernate, Maven, Gradle, CompletableFuture, record type, sealed class, virtual thread. Load when writing or reviewing Java code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kotlin-patterns
3
- description: "Loaded when user asks about Kotlin development patterns"
3
+ description: "Kotlin development patterns: coroutines, Flow, sealed classes, data classes, extension functions, null safety, Ktor, Jetpack Compose, KMP. Triggers: Kotlin, coroutine, Flow, suspend, Ktor, Android Kotlin, Jetpack Compose, sealed class, data class, KMP, kotlinx. Load when writing or reviewing Kotlin code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mcp-patterns
3
- description: "Loaded when user asks about MCP servers or tool protocol design"
3
+ description: "MCP (Model Context Protocol) server design: tool schemas, resource patterns, transport selection (stdio/SSE), client configuration, error handling, capability negotiation. Triggers: MCP, Model Context Protocol, MCP server, MCP tool, MCP resource, JSON-RPC, stdio transport, SSE transport, Claude Desktop config, Cursor MCP. Load when building or integrating MCP servers."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migration-patterns
3
- description: "Loaded when user asks about database migrations or zero-downtime deploys"
3
+ description: "Zero-downtime database migration patterns: expand-contract, double-write, backfill, blue-green schema changes, feature flags, rollback safety, online DDL. Triggers: migration, schema change, zero-downtime, expand-contract, double-write, backfill, ALTER TABLE, column rename, safe deploy, online DDL. Load when planning non-trivial DB schema changes."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: observability-patterns
3
- description: "Loaded when user asks about logging, metrics, or tracing patterns"
3
+ description: "Observability: structured logging, metrics (RED/USE/four golden signals), distributed tracing (OpenTelemetry), correlation IDs, log aggregation, SLO/SLI. Triggers: logging, log level, metrics, Prometheus, Grafana, OpenTelemetry, trace, span, structured log, observability, monitoring, SLO, SLI, alerting. Load when adding or reviewing logs, metrics, or traces."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: performance-profiling
3
- description: "Loaded when user asks about performance profiling or optimization"
3
+ description: "Performance measurement and optimization: four golden signals (latency/traffic/errors/saturation), p50/p95/p99, baseline-change-measure loop, flame graphs, load testing. Triggers: performance, slow, latency, p99, flame graph, profile, bottleneck, optimization, load test, benchmark, CPU profiling, memory leak. Load when diagnosing or optimizing slow code or services."
4
4
  effort: medium
5
5
  allowed-tools: Read, Grep
6
6
  user-invocable: false
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan-writing
3
- description: "Loaded when user asks to write an implementation plan or pre-mortem"
3
+ description: "Implementation plan and pre-mortem drafting: phase breakdown, success criteria, risks, rollback plan, acceptance tests, estimated effort. Triggers: implementation plan, pre-mortem, phased plan, project plan, task breakdown, success criteria, rollback strategy, risk register. Load when user asks to write a plan or pre-mortem document."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rag-patterns
3
- description: "Loaded when user asks about RAG systems, embeddings, or vector search"
3
+ description: "RAG architecture: embeddings, chunking strategies, hybrid search (BM25 + vector), reranking, CRAG/self-correcting, multi-hop reasoning, evaluation metrics. Triggers: RAG, embedding, vector search, pgvector, Qdrant, Pinecone, Weaviate, chunking, reranker, retrieval, hybrid search, semantic search, knowledge base, cosine similarity. Load when building or tuning RAG systems."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: research-mastery
3
- description: "Loaded when user asks to research, verify, or synthesize information"
3
+ description: "Hierarchical information retrieval following strict order: KB first (smart_query/crag_search), then MCP/Context7, then web search, then LLM knowledge as last resort. Triggers: research, find information, verify fact, synthesize sources, fact-check, cross-reference, multi-source, cite sources, investigate topic. Load when any task requires external or cross-source knowledge."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ruby-patterns
3
- description: "Loaded when user asks about Ruby development patterns"
3
+ description: "Ruby and Rails development patterns: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet/RBS, Hanami, Roda, Rack middleware. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, gem, Gemfile, bundler, rake, Hanami, Sorbet. Load when writing or reviewing Ruby code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rust-patterns
3
- description: "Loaded when user asks about Rust development patterns"
3
+ description: "Rust development patterns: ownership, borrowing, lifetimes, async (Tokio), error handling (Result/anyhow/thiserror), traits, macros, zero-cost abstractions, unsafe boundaries. Triggers: Rust, borrow checker, lifetime, Tokio, async Rust, cargo, trait, impl, Result, unsafe, lifetime annotation, clippy. Load when writing or reviewing Rust code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: security-patterns
3
- description: "Loaded when user asks about security, OWASP, or auth patterns"
3
+ description: "Application security: OWASP Top 10, authN/authZ, input validation, secrets management, TLS, CSRF/XSS/SQLi, session handling, JWT, rate limiting, CSP. Triggers: security, OWASP, auth, JWT, CSRF, XSS, SQL injection, secrets, encryption, TLS, authentication, authorization, CSP, CORS, password hashing. Load when touching auth code, handling user input, or doing security review."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: swift-patterns
3
- description: "Loaded when user asks about Swift or iOS development patterns"
3
+ description: "Swift and iOS development patterns: SwiftUI, Combine, async/await, property wrappers, actors, Swift Package Manager, Core Data, UIKit interop, @MainActor. Triggers: Swift, SwiftUI, Combine, iOS, Xcode, actor, property wrapper, Core Data, SPM, UIKit, @MainActor, @State, @Binding. Load when writing or reviewing Swift code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: testing-patterns
3
- description: "Loaded when user asks about testing strategy, fixtures, or mocking"
3
+ description: "Testing strategy and craft: pyramid vs trophy, unit/integration/e2e split, fixtures, mocks vs fakes vs stubs, AAA pattern, flaky test diagnosis, coverage goals, property-based testing. Triggers: test, testing strategy, fixture, mock, stub, AAA, unit test, integration test, e2e, Playwright, Cypress, flaky, coverage, TDD, test pyramid. Load when writing, reviewing, or designing test suites."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: typescript-patterns
3
- description: "Loaded when user asks about TypeScript patterns or type safety"
3
+ description: "TypeScript type safety patterns: strict mode, generics, conditional types, template literals, discriminated unions, branded types, Zod, satisfies operator, const assertions. Triggers: TypeScript, TS, generics, conditional type, utility type, strict, Zod, satisfies, discriminated union, type safety, type narrowing, template literal type. Load when writing or reviewing TypeScript code."
4
4
  effort: medium
5
5
  user-invocable: false
6
6
  allowed-tools: Read