@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/llms-full.txt CHANGED
@@ -61,68 +61,68 @@
61
61
  - **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).
62
62
  - **agent-creator**: Creates new specialized agents with frontmatter, tool selection, and delegation guidance
63
63
  - **analyze**: Analyze code quality, complexity, and patterns
64
- - **api-patterns**: Loaded when user asks about REST API design or GraphQL patterns
65
- - **app-builder**: Loaded when user asks to scaffold or build a full-stack app
64
+ - **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.
65
+ - **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.
66
66
  - **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.
67
- - **architecture-decision**: Loaded when user asks about architecture decisions or architecture note writing
67
+ - **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.
68
68
  - **biz-scan**: Scan codebase for business opportunities and KPIs
69
69
  - **brand-voice**: Loaded when writing documentation, content, README, or user-facing text. Prevents generic LLM rhetoric and enforces direct, technical voice.
70
70
  - **briefing**: Generate executive daily briefing across all agents
71
71
  - **build**: Build the project with auto-detected toolchain
72
72
  - **chaos**: Inject controlled faults for resilience testing
73
73
  - **ci**: Detect and run CI pipeline with status reporting
74
- - **ci-cd-patterns**: Loaded when user asks about CI/CD pipelines or deployment automation
75
- - **clean-code**: Loaded when user asks about clean code, naming, or code quality
74
+ - **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.
75
+ - **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.
76
76
  - **command-creator**: Creates new Claude Code slash commands with frontmatter, workflow guidance, and validation
77
77
  - **commit**: Create Conventional Commits with pre-commit validation
78
78
  - **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.
79
79
  - **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'.
80
- - **csharp-patterns**: Loaded when user asks about C# or .NET development patterns
80
+ - **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.
81
81
  - **cve-scan**: Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, bundler, dart)
82
- - **database-patterns**: Loaded when user asks about database schema or query optimization
82
+ - **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.
83
83
  - **debug**: Debug errors and trace root causes systematically
84
- - **debugging-tactics**: Loaded when user is debugging an issue or needs root cause analysis
84
+ - **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.
85
85
  - **deploy**: Deploy with pre-flight checks and health verification
86
86
  - **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'.
87
- - **design-engineering**: Loaded when user asks about UI animations or CSS design craft
88
- - **docker-devops**: Loaded when user asks about Docker, containers, or DevOps patterns
87
+ - **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.
88
+ - **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.
89
89
  - **docs**: Generate and update README, API docs, and architecture notes
90
- - **documentation-standards**: Loaded when creating or updating KB documents, architecture notes, SOPs, or any file in kb/ directory
91
- - **ecommerce-patterns**: Loaded when user asks about e-commerce or shopping cart features
90
+ - **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/.
91
+ - **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.
92
92
  - **evaluate**: Evaluate skill quality and RAG retrieval accuracy
93
93
  - **evolve**: Evolve agent definitions via meta-architect
94
94
  - **explain**: Explain code, architecture, or concepts with diagrams
95
95
  - **explore**: Explore codebase structure, stack, and architecture
96
96
  - **fix**: Auto-fix lint errors, type issues, and simple bugs
97
- - **flutter-patterns**: Loaded when user asks about Flutter or Dart development patterns
98
- - **git-mastery**: Loaded when user asks about advanced Git workflows or history rewriting
97
+ - **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.
98
+ - **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.
99
99
  - **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'.
100
100
  - **health**: Report service and infrastructure health status
101
101
  - **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
102
- - **hive-mind**: Loaded when orchestrating multi-agent swarms or consensus workflows
102
+ - **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.
103
103
  - **hook-creator**: Creates new Claude Code hooks with guided workflow, strict conventions, and validation
104
104
  - **index**: Index codebase into the knowledge base
105
105
  - **instinct-review**: Review and manage learned instincts from past sessions
106
106
  - **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.
107
- - **java-patterns**: Loaded when user asks about Java development patterns
107
+ - **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.
108
108
  - **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.
109
- - **kotlin-patterns**: Loaded when user asks about Kotlin development patterns
109
+ - **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.
110
110
  - **lint**: Lint code with auto-detected tools and fix suggestions
111
111
  - **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.
112
- - **mcp-patterns**: Loaded when user asks about MCP servers or tool protocol design
112
+ - **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.
113
113
  - **mem-search**: Search past coding sessions using natural language. Finds relevant observations, decisions, and context from previous work.
114
114
  - **migrate**: Run database migrations with backup verification
115
- - **migration-patterns**: Loaded when user asks about database migrations or zero-downtime deploys
115
+ - **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.
116
116
  - **model-routing-patterns**: Loaded when user builds multi-model pipelines (Haiku/Sonnet/Opus). Covers cost-optimized routing, escalation, sub-agent delegation, and fallback chains.
117
117
  - **night-watch**: Run autonomous maintenance and dependency updates
118
- - **observability-patterns**: Loaded when user asks about logging, metrics, or tracing patterns
118
+ - **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.
119
119
  - **onboard**: Generate project onboarding materials
120
120
  - **orchestrate**: Coordinate multiple specialized agents in parallel
121
121
  - **panic**: Emergency stabilization via system-governor agent
122
- - **performance-profiling**: Loaded when user asks about performance profiling or optimization
122
+ - **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.
123
123
  - **persona**: Switch engineering persona at runtime: backend-lead, frontend-lead, devops-eng, junior-dev
124
124
  - **plan**: Plan implementation with tasks and success criteria
125
- - **plan-writing**: Loaded when user asks to write an implementation plan or pre-mortem
125
+ - **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.
126
126
  - **plugin-creator**: Creates experimental opt-in plugin packs with manifests, conventions, and optional module scaffolding for Claude and Codex runtimes
127
127
  - **pr**: Create pull requests with pre-flight validation
128
128
  - **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.
@@ -130,29 +130,29 @@
130
130
  - **predict**: Predict regressions and impact before changes land
131
131
  - **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.
132
132
  - **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.
133
- - **rag-patterns**: Loaded when user asks about RAG systems, embeddings, or vector search
133
+ - **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.
134
134
  - **refactor**: Refactor code for quality and maintainability
135
135
  - **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.
136
136
  - **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.
137
- - **research-mastery**: Loaded when user asks to research, verify, or synthesize information
137
+ - **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.
138
138
  - **review**: Review code for quality, security, and correctness
139
139
  - **rollback**: Roll back a deployment safely with verification
140
- - **ruby-patterns**: Loaded when user asks about Ruby development patterns
141
- - **rust-patterns**: Loaded when user asks about Rust development patterns
140
+ - **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.
141
+ - **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.
142
142
  - **search**: Search the knowledge base with semantic and hybrid modes
143
- - **security-patterns**: Loaded when user asks about security, OWASP, or auth patterns
143
+ - **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.
144
144
  - **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.
145
145
  - **skill-audit**: Scan skills and agents for security risks: dangerous patterns, secrets, excessive permissions
146
146
  - **skill-creator**: Create new skills from templates with guided workflow
147
147
  - **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.
148
148
  - **swarm**: Execute tasks via Map-Reduce, Consensus, or Relay swarms
149
- - **swift-patterns**: Loaded when user asks about Swift or iOS development patterns
149
+ - **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.
150
150
  - **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.
151
151
  - **teams**: Launch pre-configured Agent Teams for common workflows
152
152
  - **test**: Run tests with coverage analysis and reporting
153
- - **testing-patterns**: Loaded when user asks about testing strategy, fixtures, or mocking
153
+ - **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.
154
154
  - **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.
155
- - **typescript-patterns**: Loaded when user asks about TypeScript patterns or type safety
155
+ - **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.
156
156
  - **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.
157
157
  - **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.
158
158
  - **workflow**: Start and manage autonomous agent workflows
@@ -3523,11 +3523,11 @@ What `uninstall` does:
3523
3523
  title: "SOP: Release Preparation"
3524
3524
  category: procedures
3525
3525
  service: ai-toolkit
3526
- tags: [sop, release, version, publish, changelog, semver]
3527
- version: "1.6.0"
3526
+ tags: [sop, release, version, publish, changelog, semver, provenance, sarif]
3527
+ version: "1.7.0"
3528
3528
  created: "2026-04-10"
3529
- last_updated: "2026-04-17"
3530
- description: "Step-by-step checklist for preparing a new ai-toolkit release — version sync, changelog, artifact regeneration, validation, and tagging. Run BEFORE every git tag."
3529
+ last_updated: "2026-04-18"
3530
+ description: "Step-by-step checklist for preparing a new ai-toolkit release — version sync, changelog, artifact regeneration, validation, and tagging. Run BEFORE every git tag. Includes mandatory Provenance, SARIF, and checksum-pin checks added in v2.8.0."
3531
3531
  ---
3532
3532
 
3533
3533
  # SOP: Release Preparation
@@ -3563,8 +3563,13 @@ python3 scripts/generate_codex_rules.py .
3563
3563
  python3 scripts/generate_llms_txt.py > llms.txt
3564
3564
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
3565
3565
 
3566
- # 5. Validate + audit + test
3567
- python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && npm test
3566
+ # 5. Validate + audit + SARIF + test
3567
+ python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && python3 scripts/audit_skills.py --sarif > /tmp/audit.sarif && npm test
3568
+
3569
+ # 5a. Supply-chain standard (v2.8.0+) — non-negotiable
3570
+ grep -q -- '--provenance' .github/workflows/publish.yml || { echo "MISSING --provenance"; exit 1; }
3571
+ grep -q 'id-token: write' .github/workflows/publish.yml || { echo "MISSING id-token: write"; exit 1; }
3572
+ python3 scripts/audit_skills.py --permissions # review Bash/Write/Edit footprint
3568
3573
 
3569
3574
  # 6. Commit + tag + push
3570
3575
  git add -A && git commit -m "chore: release vX.Y.Z"
@@ -3721,17 +3726,21 @@ Run the full quality gate:
3721
3726
  ```bash
3722
3727
  python3 scripts/validate.py --strict
3723
3728
  python3 scripts/audit_skills.py --ci
3729
+ python3 scripts/audit_skills.py --sarif > audit.sarif # MANDATORY — GHAS ingest
3730
+ python3 scripts/audit_skills.py --permissions # review Bash/Write/Edit footprint
3724
3731
  npm test
3725
3732
  ```
3726
3733
 
3727
3734
  **Expected results:**
3728
3735
  - `validate.py`: `Errors: 0 | Warnings: 0 | VALIDATION PASSED`
3729
- - `audit_skills.py`: `HIGH: 0 | WARN: 0` (INFO is acceptable)
3736
+ - `audit_skills.py --ci`: `HIGH: 0 | WARN: 0` (INFO is acceptable)
3737
+ - `audit_skills.py --sarif`: valid JSON, non-empty `runs[0].tool.driver.rules`
3738
+ - `audit_skills.py --permissions`: review `Skills with Bash + Write + Edit` list — any newly-added skill with broad access MUST be justified in the CHANGELOG entry
3730
3739
  - `npm test`: `1..N` with zero `not ok`
3731
3740
 
3732
3741
  **One-liner:**
3733
3742
  ```bash
3734
- python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && npm test
3743
+ python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && python3 scripts/audit_skills.py --sarif > audit.sarif && npm test
3735
3744
  ```
3736
3745
 
3737
3746
  **If tests fail:** Fix the issue, do NOT skip. Common failures:
@@ -3739,6 +3748,48 @@ python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci &&
3739
3748
  - Missing frontmatter → add to new KB docs
3740
3749
  - Broken symlink → `ai-toolkit doctor --fix`
3741
3750
 
3751
+ ### Phase 5a: Supply-Chain Hardening Verification (v2.8.0+)
3752
+
3753
+ These checks enforce the security standard introduced in v2.8.0. Do NOT tag a release until all pass.
3754
+
3755
+ **1. Publish workflow emits provenance:**
3756
+
3757
+ ```bash
3758
+ grep -E '\-\-provenance|id-token: write' .github/workflows/publish.yml
3759
+ ```
3760
+
3761
+ - [ ] Both markers present (`--provenance` flag + `id-token: write` permission)
3762
+ - [ ] Any PR that changes `publish.yml` REQUIRES an approved security review
3763
+
3764
+ **2. URL-sourced rules and hooks are checksum-pinned:**
3765
+
3766
+ ```bash
3767
+ # On a machine that has consumed URL rules/hooks at least once:
3768
+ jq 'to_entries | map(select(.value.url != null and (.value.sha256 // "" | length) == 0))' ~/.softspark/ai-toolkit/rules/sources.json
3769
+ jq 'to_entries | map(select(.value.url != null and (.value.sha256 // "" | length) == 0))' ~/.softspark/ai-toolkit/hooks/external/sources.json
3770
+ ```
3771
+
3772
+ - [ ] Both queries return empty arrays (every URL entry has a `sha256`)
3773
+ - [ ] If not, run `ai-toolkit update` to backfill missing hashes before tagging
3774
+
3775
+ **3. Audit SARIF output is well-formed:**
3776
+
3777
+ ```bash
3778
+ python3 scripts/audit_skills.py --sarif | python3 -c "import json, sys; d=json.load(sys.stdin); assert d['version']=='2.1.0' and d['runs'][0]['tool']['driver']['name']; print('SARIF OK')"
3779
+ ```
3780
+
3781
+ - [ ] Prints `SARIF OK`
3782
+ - [ ] If the script ever grows new rule classes, extend the SARIF `rules[]` coverage before releasing
3783
+
3784
+ **4. Strict-pin mode passes on CI** (optional, recommended for stable branches):
3785
+
3786
+ ```bash
3787
+ AI_TOOLKIT_STRICT_PIN=1 ai-toolkit update --dry-run
3788
+ ```
3789
+
3790
+ - [ ] Exit 0, no `CHECKSUM CHANGED` line
3791
+ - [ ] Any unexpected upstream change blocks the release until explicitly approved
3792
+
3742
3793
  ---
3743
3794
 
3744
3795
  ## Phase 6: Commit
@@ -3771,10 +3822,12 @@ git push origin main --tags
3771
3822
  This triggers `.github/workflows/publish.yml` which:
3772
3823
  1. Runs `validate.py --strict`
3773
3824
  2. Runs `npm test`
3774
- 3. Publishes to npm as `@softspark/ai-toolkit@X.Y.Z`
3825
+ 3. Publishes to npm as `@softspark/ai-toolkit@X.Y.Z` with `--provenance` (SLSA v1 build attestation)
3826
+
3827
+ **Provenance is non-negotiable.** If `id-token: write` permission or the `--provenance` flag is missing from `publish.yml`, fix it BEFORE tagging — an unsigned release is a regression against the v2.8.0 standard.
3775
3828
 
3776
3829
  **After CI completes:** Run the [Release Verification SOP](release-verification-sop.md)
3777
- to smoke-test the published package.
3830
+ to smoke-test the published package AND verify the provenance attestation landed on npm.
3778
3831
 
3779
3832
  ---
3780
3833
 
@@ -3809,11 +3862,15 @@ git push origin --delete vX.Y.Z
3809
3862
  | 7 | CHANGELOG.md | Add release entry | Entry exists for vX.Y.Z |
3810
3863
  | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_codex_rules.py`, `generate_llms_txt.py` | No unexpected diff |
3811
3864
  | 9 | Validate | `validate.py --strict` | 0 errors, 0 warnings |
3812
- | 10 | Security audit | `audit_skills.py --ci` | 0 HIGH |
3813
- | 11 | Tests | `npm test` | All pass |
3814
- | 12 | Commit | `git commit` | Clean working tree |
3815
- | 13 | Tag | `git tag vX.Y.Z` | Tag exists |
3816
- | 14 | Push | `git push origin main --tags` | CI triggered |
3865
+ | 10 | Security audit (CI mode) | `audit_skills.py --ci` | 0 HIGH |
3866
+ | 11 | Security audit (SARIF) | `audit_skills.py --sarif` | Valid SARIF 2.1.0 JSON |
3867
+ | 12 | Per-skill permissions | `audit_skills.py --permissions` | New broad-access skills justified in CHANGELOG |
3868
+ | 13 | Provenance flag check | `grep -- '--provenance' .github/workflows/publish.yml` | Present |
3869
+ | 14 | Checksum-pin backfill | `sources.json` entries all have `sha256` | No unpinned URL sources |
3870
+ | 15 | Tests | `npm test` | All pass |
3871
+ | 16 | Commit | `git commit` | Clean working tree |
3872
+ | 17 | Tag | `git tag vX.Y.Z` | Tag exists |
3873
+ | 18 | Push | `git push origin main --tags` | CI triggered with `id-token: write` |
3817
3874
 
3818
3875
  ---
3819
3876
 
@@ -3823,11 +3880,11 @@ git push origin --delete vX.Y.Z
3823
3880
  title: "SOP: Release Verification"
3824
3881
  category: procedures
3825
3882
  service: ai-toolkit
3826
- tags: [sop, verification, release, smoke-test, install, update, qa]
3827
- version: "1.1.0"
3883
+ tags: [sop, verification, release, smoke-test, install, update, qa, provenance, sarif]
3884
+ version: "1.2.0"
3828
3885
  created: "2026-04-08"
3829
- last_updated: "2026-04-13"
3830
- description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit — verifies CLI, install, doctor, validation, tests, and eject from user perspective."
3886
+ last_updated: "2026-04-18"
3887
+ description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit — verifies CLI, install, doctor, validation, tests, eject, npm provenance attestation, SARIF audit, and per-skill permissions. Reflects the v2.8.0 supply-chain standard."
3831
3888
  ---
3832
3889
 
3833
3890
  # SOP: Release Verification
@@ -3852,7 +3909,7 @@ Verifies all critical paths from the user's perspective.
3852
3909
 
3853
3910
  ## Quick Checklist (TL;DR)
3854
3911
 
3855
- 10 commands — if all pass, the release is ready:
3912
+ 13 commands — if all pass, the release is ready:
3856
3913
 
3857
3914
  ```bash
3858
3915
  # Pre-commit (Phase 0)
@@ -3868,6 +3925,11 @@ ai-toolkit status # 7. Status OK?
3868
3925
  ai-toolkit doctor # 8. Health check passed?
3869
3926
  ai-toolkit install --dry-run # 9. Global install OK?
3870
3927
  python3 scripts/audit_skills.py --ci # 10. Security audit clean?
3928
+
3929
+ # Supply-chain verification (Phase 8, v2.8.0+)
3930
+ python3 scripts/audit_skills.py --sarif | python3 -c "import json,sys; assert json.load(sys.stdin)['version']=='2.1.0'; print('SARIF OK')" # 11. SARIF 2.1.0 well-formed?
3931
+ python3 scripts/audit_skills.py --permissions | head -30 # 12. Broad-access skills reviewed?
3932
+ npm view @softspark/ai-toolkit@X.Y.Z --json | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['dist']['attestations']['provenance']['predicateType']=='https://slsa.dev/provenance/v1'; print('PROVENANCE OK')" # 13. Provenance attested on npm?
3871
3933
  ```
3872
3934
 
3873
3935
  ---
@@ -4051,6 +4113,72 @@ cd - && rm -rf /tmp/ai-toolkit-eject-test
4051
4113
  - [ ] Skills copied as real directories
4052
4114
  - [ ] Rules inlined into CLAUDE.md
4053
4115
  - [ ] constitution.md and ARCHITECTURE.md copied
4116
+ - [ ] `output-styles/` directory present (v2.7.1+)
4117
+
4118
+ ---
4119
+
4120
+ ## Phase 8: Supply-Chain Verification (2 min, v2.8.0+)
4121
+
4122
+ These checks enforce the v2.8.0 security standard on a freshly-published release. Run AFTER the `publish.yml` workflow completes on the tag.
4123
+
4124
+ ### 8.1 Provenance attestation on npm
4125
+
4126
+ ```bash
4127
+ VERSION="X.Y.Z" # the tag just published
4128
+ npm view "@softspark/ai-toolkit@${VERSION}" --json \
4129
+ | python3 -c "import json, sys; d=json.load(sys.stdin); att=d['dist'].get('attestations', {}); assert att.get('provenance', {}).get('predicateType') == 'https://slsa.dev/provenance/v1', f'NO PROVENANCE for {d[\"version\"]}'; print(f'PROVENANCE OK: {att[\"url\"]}')"
4130
+ ```
4131
+
4132
+ **Verify:**
4133
+ - [ ] Exit 0 and prints `PROVENANCE OK: https://registry.npmjs.org/...`
4134
+ - [ ] `https://www.npmjs.com/package/@softspark/ai-toolkit/v/${VERSION}` shows the green "Provenance" badge
4135
+
4136
+ **If provenance is missing:** the `publish.yml` ran without `id-token: write` or `--provenance`. Restore them and cut a patch release — a silently unsigned publish is a regression against the v2.8.0 standard.
4137
+
4138
+ ### 8.2 Audit SARIF output (for GHAS ingest)
4139
+
4140
+ ```bash
4141
+ python3 scripts/audit_skills.py --sarif > /tmp/audit.sarif
4142
+ python3 -c "import json; d=json.load(open('/tmp/audit.sarif')); assert d['version']=='2.1.0' and d['runs'][0]['tool']['driver']['name']=='ai-toolkit-audit-skills'; print(f'SARIF OK: {len(d[\"runs\"][0][\"results\"])} results across {len(d[\"runs\"][0][\"tool\"][\"driver\"][\"rules\"])} rules')"
4143
+ ```
4144
+
4145
+ **Verify:**
4146
+ - [ ] Valid SARIF 2.1.0
4147
+ - [ ] In the publishing repo, the CI job uploads `audit.sarif` via `github/codeql-action/upload-sarif@v3` so findings appear in the Security tab
4148
+
4149
+ ### 8.3 Per-skill permissions report
4150
+
4151
+ ```bash
4152
+ python3 scripts/audit_skills.py --permissions | head -40
4153
+ ```
4154
+
4155
+ **Verify:**
4156
+ - [ ] Bash skill count has NOT jumped unexpectedly since the previous release
4157
+ - [ ] Any newly added entry under `Skills with Bash + Write + Edit` matches a CHANGELOG bullet that justifies the broad scope
4158
+ - [ ] JSON form (`--permissions --json`) is available for automated drift dashboards
4159
+
4160
+ ### 8.4 URL-sourced rules/hooks are checksum-pinned
4161
+
4162
+ ```bash
4163
+ jq '.rules // .hooks // {}' ~/.softspark/ai-toolkit/rules/sources.json 2>/dev/null \
4164
+ | python3 -c "import json, sys; d=json.load(sys.stdin) or {}; bad=[n for n,v in d.items() if v.get('url') and not v.get('sha256')]; assert not bad, f'UNPINNED: {bad}'; print(f'RULE PIN OK: {len(d)} URL rules, all with sha256')"
4165
+ jq '.hooks // {}' ~/.softspark/ai-toolkit/hooks/external/sources.json 2>/dev/null \
4166
+ | python3 -c "import json, sys; d=json.load(sys.stdin) or {}; bad=[n for n,v in d.items() if v.get('url') and not v.get('sha256')]; assert not bad, f'UNPINNED: {bad}'; print(f'HOOK PIN OK: {len(d)} URL hooks, all with sha256')"
4167
+ ```
4168
+
4169
+ **Verify:**
4170
+ - [ ] Both commands print `... PIN OK`
4171
+ - [ ] If any entry is unpinned, the `register_url_source()` call missed passing `content=` — fix the call-site and retag
4172
+
4173
+ ### 8.5 Strict-pin smoke test (optional but recommended)
4174
+
4175
+ ```bash
4176
+ AI_TOOLKIT_STRICT_PIN=1 ai-toolkit update --dry-run
4177
+ ```
4178
+
4179
+ **Verify:**
4180
+ - [ ] Exit 0, no `CHECKSUM CHANGED` line
4181
+ - [ ] If a checksum change was intentional (e.g. upstream rule update), document it in the CHANGELOG entry before tagging
4054
4182
 
4055
4183
  ---
4056
4184
 
@@ -4100,9 +4228,13 @@ ai-toolkit eject /tmp/test # retry
4100
4228
  | Health | `doctor`: 0 errors, 0 warnings, PASSED |
4101
4229
  | Install | `--dry-run` correct counts, `--local` all configs |
4102
4230
  | Quality | `validate.py --strict`: PASSED |
4103
- | Security | `audit_skills.py --ci`: 0 HIGH |
4231
+ | Security (baseline) | `audit_skills.py --ci`: 0 HIGH |
4232
+ | Security (SARIF) | `audit_skills.py --sarif`: valid SARIF 2.1.0 with non-empty rules array |
4233
+ | Security (permissions) | `audit_skills.py --permissions`: broad-access skills unchanged or justified in CHANGELOG |
4234
+ | Supply chain | `dist.attestations.provenance.predicateType == https://slsa.dev/provenance/v1` on npm |
4235
+ | Supply chain | All `sources.json` URL entries carry a `sha256`; `AI_TOOLKIT_STRICT_PIN=1 ai-toolkit update --dry-run` passes |
4104
4236
  | Tests | `npm test`: N/N passed, 0 failures |
4105
- | Eject | Standalone .claude/ with real files |
4237
+ | Eject | Standalone `.claude/` with real files AND `output-styles/` directory |
4106
4238
  | Guards | Destructive commands blocked |
4107
4239
 
4108
4240
  ---
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.7.3",
2
+ "version": "2.9.0",
3
3
  "components": {
4
4
  "agents": {
5
5
  "description": "44 specialized agents (orchestrator, backend, frontend, security, devops, etc.)",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "2.7.3",
4
- "description": "Professional-grade AI coding toolkit: 99 skills, 44 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity, Codex CLI, opencode), machine-enforced safety constitution, persona presets, skill security auditor, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
3
+ "version": "2.9.0",
4
+ "description": "AI coding toolkit: 99 skills, 44 agents, 12-editor write-through (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex, opencode), machine-enforced safety constitution, SARIF audit, signed npm provenance.",
5
5
  "keywords": [
6
6
  "claude",
7
7
  "claude-code",
@@ -77,7 +77,6 @@
77
77
  "llms-full.txt"
78
78
  ],
79
79
  "engines": {
80
- "node": ">=18.0.0",
81
- "bats": ">=1.8.0 — install via: brew install bats-core (macOS) or apt install bats (Ubuntu)"
80
+ "node": ">=18.0.0"
82
81
  }
83
82
  }
@@ -68,7 +68,7 @@ def main() -> None:
68
68
 
69
69
  dest = rules_dir / f"{rule_name}.md"
70
70
  dest.write_bytes(data)
71
- register_url_source(rules_dir, rule_name, source)
71
+ register_url_source(rules_dir, rule_name, source, content=data)
72
72
 
73
73
  print(f"Registered: '{rule_name}' -> {dest}")
74
74
  print(f"Source URL: {source} (auto-refreshed on update)")