@softspark/ai-toolkit 2.11.0 → 2.12.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 (76) hide show
  1. package/AGENTS.md +21 -21
  2. package/CHANGELOG.md +24 -0
  3. package/README.md +6 -9
  4. package/app/.claude-plugin/plugin.json +1 -1
  5. package/app/agents/meta-architect.md +44 -0
  6. package/app/skills/agent-creator/SKILL.md +22 -6
  7. package/app/skills/analyze/SKILL.md +21 -1
  8. package/app/skills/api-patterns/SKILL.md +27 -0
  9. package/app/skills/app-builder/SKILL.md +24 -0
  10. package/app/skills/architecture-audit/SKILL.md +24 -0
  11. package/app/skills/architecture-decision/SKILL.md +24 -0
  12. package/app/skills/biz-scan/SKILL.md +24 -0
  13. package/app/skills/brand-voice/SKILL.md +36 -0
  14. package/app/skills/briefing/SKILL.md +41 -1
  15. package/app/skills/build/SKILL.md +24 -1
  16. package/app/skills/chaos/SKILL.md +22 -1
  17. package/app/skills/ci/SKILL.md +22 -1
  18. package/app/skills/ci-cd-patterns/SKILL.md +25 -0
  19. package/app/skills/command-creator/SKILL.md +31 -2
  20. package/app/skills/content-moderation-patterns/SKILL.md +25 -0
  21. package/app/skills/database-patterns/SKILL.md +25 -0
  22. package/app/skills/debug/SKILL.md +23 -1
  23. package/app/skills/design-engineering/SKILL.md +25 -0
  24. package/app/skills/docker-devops/SKILL.md +26 -0
  25. package/app/skills/ecommerce-patterns/SKILL.md +26 -0
  26. package/app/skills/evaluate/SKILL.md +22 -1
  27. package/app/skills/evolve/SKILL.md +25 -0
  28. package/app/skills/explain/SKILL.md +26 -1
  29. package/app/skills/explore/SKILL.md +25 -0
  30. package/app/skills/fix/SKILL.md +26 -1
  31. package/app/skills/git-mastery/SKILL.md +26 -0
  32. package/app/skills/grill-me/SKILL.md +22 -7
  33. package/app/skills/health/SKILL.md +22 -1
  34. package/app/skills/hipaa-validate/SKILL.md +25 -8
  35. package/app/skills/hook-creator/SKILL.md +23 -6
  36. package/app/skills/index/SKILL.md +22 -1
  37. package/app/skills/instinct-review/SKILL.md +25 -1
  38. package/app/skills/introspect/SKILL.md +26 -1
  39. package/app/skills/lint/SKILL.md +27 -1
  40. package/app/skills/mcp-builder/SKILL.md +27 -0
  41. package/app/skills/mem-search/SKILL.md +40 -0
  42. package/app/skills/migrate/SKILL.md +27 -1
  43. package/app/skills/migration-patterns/SKILL.md +26 -0
  44. package/app/skills/night-watch/SKILL.md +22 -1
  45. package/app/skills/observability-patterns/SKILL.md +26 -0
  46. package/app/skills/onboard/SKILL.md +22 -1
  47. package/app/skills/panic/SKILL.md +21 -1
  48. package/app/skills/performance-profiling/SKILL.md +34 -0
  49. package/app/skills/persona/SKILL.md +21 -4
  50. package/app/skills/plan/SKILL.md +26 -0
  51. package/app/skills/plan-writing/SKILL.md +26 -0
  52. package/app/skills/plugin-creator/SKILL.md +23 -6
  53. package/app/skills/pr/SKILL.md +24 -1
  54. package/app/skills/prd-to-issues/SKILL.md +22 -6
  55. package/app/skills/prd-to-plan/SKILL.md +22 -4
  56. package/app/skills/predict/SKILL.md +25 -0
  57. package/app/skills/qa-session/SKILL.md +23 -7
  58. package/app/skills/rag-patterns/SKILL.md +26 -0
  59. package/app/skills/refactor/SKILL.md +26 -0
  60. package/app/skills/refactor-plan/SKILL.md +23 -6
  61. package/app/skills/rollback/SKILL.md +27 -1
  62. package/app/skills/security-patterns/SKILL.md +27 -0
  63. package/app/skills/skill-audit/SKILL.md +22 -5
  64. package/app/skills/skill-creator/SKILL.md +50 -9
  65. package/app/skills/swift-patterns/SKILL.md +27 -107
  66. package/app/skills/swift-patterns/reference/frameworks.md +111 -0
  67. package/app/skills/test/SKILL.md +23 -1
  68. package/app/skills/testing-patterns/SKILL.md +26 -0
  69. package/app/skills/triage-issue/SKILL.md +22 -4
  70. package/app/skills/ubiquitous-language/SKILL.md +23 -8
  71. package/kb/procedures/release-preparation-sop.md +11 -5
  72. package/kb/procedures/release-verification-sop.md +24 -6
  73. package/llms-full.txt +56 -32
  74. package/manifest.json +1 -1
  75. package/package.json +1 -1
  76. package/scripts/evaluate_skills.py +84 -0
package/llms-full.txt CHANGED
@@ -60,17 +60,17 @@
60
60
 
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
- - **analyze**: Analyze code quality, complexity, and patterns
63
+ - **analyze**: Analyze code quality, complexity, and patterns across a codebase. Use when the user asks for a quality report, hotspot scan, or systemic architecture signal — not for fixing bugs or reviewing a single PR.
64
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
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
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**: Scans codebase for business opportunities by analyzing database schemas, API endpoints, tracking events, and feature flags to surface underutilized capabilities, missing KPIs, and monetization gaps. Use when the user asks about revenue opportunities, business metrics, KPI coverage, analytics gaps, or monetization analysis of a codebase.
69
69
  - **brand-voice**: Loaded when writing documentation, content, README, or user-facing text. Prevents generic LLM rhetoric and enforces direct, technical voice.
70
- - **briefing**: Generate executive daily briefing across all agents
71
- - **build**: Build the project with auto-detected toolchain
72
- - **chaos**: Inject controlled faults for resilience testing
73
- - **ci**: Detect and run CI pipeline with status reporting
70
+ - **briefing**: Generate an executive daily briefing that aggregates reports from all agents into a short, decision-focused summary. Use when the user asks for a status update across the whole system — not for one-agent activity reports.
71
+ - **build**: Build the project with auto-detected toolchain (npm, poetry, cargo, go, flutter, Docker). Use when the user asks to compile, bundle, or produce artifacts — not to run tests or deploy.
72
+ - **chaos**: Inject controlled faults for resilience testing on non-production targets. Use when the user explicitly asks for a chaos experiment, latency injection, or dependency kill — never implicit.
73
+ - **ci**: Detect, generate, or troubleshoot CI/CD pipeline configuration for the current project type (GitHub Actions, GitLab CI). Use when the user asks to set up, update, or debug a build pipeline — not for running tests locally.
74
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
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
@@ -80,7 +80,7 @@
80
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
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
- - **debug**: Debug errors and trace root causes systematically
83
+ - **debug**: Debug errors and trace root causes systematically using logs, health checks, and hypothesis-driven investigation. Use when a bug or error message is in hand — not for architectural questions or when there is no reproducible symptom.
84
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'.
@@ -89,42 +89,42 @@
89
89
  - **docs**: Generate and update README, API docs, and architecture notes
90
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
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
- - **evaluate**: Evaluate skill quality and RAG retrieval accuracy
92
+ - **evaluate**: Evaluate RAG retrieval accuracy and LLM-as-a-judge quality metrics (faithfulness, relevancy, context precision) against a golden dataset. Use when the user asks to measure RAG quality or detect knowledge gaps — not for evaluating generic LLM outputs.
93
93
  - **evolve**: Analyzes failure patterns and inefficiencies in agent/skill definitions, then drafts and applies targeted improvements to system prompts, tool permissions, and behavioral rules. Use when the user asks to improve agent behavior, refine skill definitions, update system prompts, or optimize agent configurations based on observed failures.
94
- - **explain**: Explain code, architecture, or concepts with diagrams
94
+ - **explain**: Explain code, architecture, or concepts with Mermaid diagrams and sequence flows. Use when the user asks 'what does X do' or 'how does Y work' — not to critique code quality or implement changes.
95
95
  - **explore**: Explore codebase structure, stack, and architecture
96
- - **fix**: Auto-fix lint errors, type issues, and simple bugs
96
+ - **fix**: Apply a targeted fix to a known bug or lint error and verify it with the same command that surfaced the problem. Use when the root cause is already identified — not for unknown symptoms or open-ended debugging.
97
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
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
- - **health**: Report service and infrastructure health status
100
+ - **health**: Report service and infrastructure health status via liveness/readiness checks, resource usage, and quick diagnostics. Use when the user asks whether services are up or degraded — not for deep debugging of a known error.
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
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
- - **hook-creator**: Creates new Claude Code hooks with guided workflow, strict conventions, and validation
104
- - **index**: Index codebase into the knowledge base
105
- - **instinct-review**: Review and manage learned instincts from past sessions
103
+ - **hook-creator**: Create a new Claude Code lifecycle hook (PreToolUse, PostToolUse, Stop, SessionStart, etc.) with a bash script and hooks.json registration. Use when the user wants automated behavior tied to a specific event — not for one-off commands.
104
+ - **index**: Reindex the knowledge base for semantic search via the configured vector store (e.g., Qdrant). Use only when the user explicitly asks to reindex — never trigger speculative rebuilds.
105
+ - **instinct-review**: Review, promote, or remove learned instincts extracted from past sessions (`.claude/instincts/*.md`). Use when the user wants to curate the instinct list — not to extract new instincts or edit memory.
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
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
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
- - **lint**: Lint code with auto-detected tools and fix suggestions
110
+ - **lint**: Run the project's linter and type-checker with auto-detected toolchain (ruff/mypy, eslint/tsc, phpstan, golangci-lint, clippy, dart analyze). Use when the user asks for static-analysis feedback — not to run tests or refactor.
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
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
- - **migrate**: Run database migrations with backup verification
114
+ - **migrate**: Run or create database migrations with the detected tool (Alembic, Prisma, Laravel, Django, Flyway, Drizzle) and verify backups exist first. Use when the user asks to apply, roll back, or generate a migration — not for general schema design.
115
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
- - **night-watch**: Run autonomous maintenance and dependency updates
117
+ - **night-watch**: Run autonomous maintenance tasks (dependency updates, dead code removal, small refactors) in an isolated branch. Use only when the user triggers it explicitly — typically off-hours; never auto-invoked.
118
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
- - **onboard**: Generate project onboarding materials
119
+ - **onboard**: Guide setup of ai-toolkit in a new project: install symlinks, create CLAUDE.md, capture undocumented intent via interview. Use when the user starts a fresh project or migrates an existing one to ai-toolkit.
120
120
  - **orchestrate**: Coordinate multiple specialized agents in parallel
121
- - **panic**: Emergency stabilization via system-governor agent
121
+ - **panic**: Emergency kill switch that halts all agent activity via a lockfile gate. Use when agents are looping, misbehaving, or the user wants to stop everything NOW — not for normal workflow interruptions.
122
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**: Breaks down feature requests and project goals into phased implementation plans with task lists, agent assignments, dependency graphs, and success criteria. Use when the user asks to plan a feature, create an implementation roadmap, break down a coding task, or outline project phases.
125
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
- - **pr**: Create pull requests with pre-flight validation
127
+ - **pr**: Create a GitHub pull request after running pre-flight checks (lint, typecheck, tests) and generating a structured summary from commit history. Use when the branch is ready to merge — not for drafting work-in-progress.
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.
129
129
  - **prd-to-plan**: Convert a PRD into a phased implementation plan using tracer-bullet vertical slices. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions tracer bullets.
130
130
  - **predict**: Analyzes code diffs and file changes to identify potential regressions, maps dependency impact across the codebase, and generates a risk-scored impact report. Use when reviewing pull requests, assessing code change risk, checking for breaking changes, or analyzing the blast radius of a diff.
@@ -136,7 +136,7 @@
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
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
- - **rollback**: Roll back a deployment safely with verification
139
+ - **rollback**: Roll back a git commit, database migration, or deployment to a previous known-good state with safety checks and health verification. Use when the user wants to revert recent changes safely — not to undo local edits or halt the whole system.
140
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
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
@@ -149,7 +149,7 @@
149
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**: Launches pre-configured multi-agent teams for code review, debugging, feature development, security audits, and database migrations. Use when the user asks to start a multi-agent workflow, coordinate agent teams, run a team review, or needs parallel agent collaboration on a complex task.
152
- - **test**: Run tests with coverage analysis and reporting
152
+ - **test**: Run the project's test suite with coverage reporting, auto-detecting the framework (pytest, vitest, jest, flutter test, go test, cargo test, phpunit). Use when the user asks to run existing tests — not to author new ones test-first.
153
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
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.
@@ -3524,10 +3524,10 @@ title: "SOP: Release Preparation"
3524
3524
  category: procedures
3525
3525
  service: ai-toolkit
3526
3526
  tags: [sop, release, version, publish, changelog, semver, provenance, sarif]
3527
- version: "1.7.0"
3527
+ version: "1.8.0"
3528
3528
  created: "2026-04-10"
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."
3529
+ last_updated: "2026-04-21"
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, and the single-run npm test discipline added in v1.8.0."
3531
3531
  ---
3532
3532
 
3533
3533
  # SOP: Release Preparation
@@ -3728,7 +3728,13 @@ python3 scripts/validate.py --strict
3728
3728
  python3 scripts/audit_skills.py --ci
3729
3729
  python3 scripts/audit_skills.py --sarif > audit.sarif # MANDATORY — GHAS ingest
3730
3730
  python3 scripts/audit_skills.py --permissions # review Bash/Write/Edit footprint
3731
- npm test
3731
+
3732
+ # Run npm test ONCE, cache output, parse from file. The suite is 669+ bats
3733
+ # cases — rerunning it per check wastes minutes. Do not pipe npm test into
3734
+ # tail/grep multiple times in the same session.
3735
+ npm test > /tmp/npm-test.log 2>&1
3736
+ tail -3 /tmp/npm-test.log
3737
+ echo "ok: $(grep -c '^ok ' /tmp/npm-test.log) | not ok: $(grep -c '^not ok' /tmp/npm-test.log)"
3732
3738
  ```
3733
3739
 
3734
3740
  **Expected results:**
@@ -3736,7 +3742,7 @@ npm test
3736
3742
  - `audit_skills.py --ci`: `HIGH: 0 | WARN: 0` (INFO is acceptable)
3737
3743
  - `audit_skills.py --sarif`: valid JSON, non-empty `runs[0].tool.driver.rules`
3738
3744
  - `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
3739
- - `npm test`: `1..N` with zero `not ok`
3745
+ - `npm test`: `1..N` with zero `not ok` (read from the cached `/tmp/npm-test.log`, do not rerun)
3740
3746
 
3741
3747
  **One-liner:**
3742
3748
  ```bash
@@ -3881,10 +3887,10 @@ title: "SOP: Release Verification"
3881
3887
  category: procedures
3882
3888
  service: ai-toolkit
3883
3889
  tags: [sop, verification, release, smoke-test, install, update, qa, provenance, sarif]
3884
- version: "1.2.0"
3890
+ version: "1.3.0"
3885
3891
  created: "2026-04-08"
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."
3892
+ last_updated: "2026-04-21"
3893
+ 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. v1.3.0 adds the single-run npm test discipline (cache to file, parse ok/not-ok once)."
3888
3894
  ---
3889
3895
 
3890
3896
  # SOP: Release Verification
@@ -3917,7 +3923,7 @@ python3 scripts/generate_agents_md.py > AGENTS.md # 1. Regenerate AGEN
3917
3923
  python3 scripts/generate_codex_rules.py . # 2. Refresh standard Codex rules
3918
3924
  python3 scripts/generate_llms_txt.py > llms.txt # 3. Regenerate llms.txt
3919
3925
  python3 scripts/validate.py --strict # 4. Validation passed?
3920
- npm test # 5. All tests passed?
3926
+ npm test > /tmp/npm-test.log 2>&1 && grep -c '^ok ' /tmp/npm-test.log && ! grep -q '^not ok' /tmp/npm-test.log # 5. All tests passed? (single run, cached)
3921
3927
 
3922
3928
  # Post-install verification (Phases 1-7)
3923
3929
  ai-toolkit --version # 6. Version OK?
@@ -4082,15 +4088,33 @@ python3 scripts/audit_skills.py --ci
4082
4088
  ## Phase 6: Tests (3-5 min)
4083
4089
 
4084
4090
  ```bash
4085
- npm test
4091
+ # Run ONCE, capture to file, then parse. Full suite is 669+ bats cases —
4092
+ # re-running it per check (tail / grep ok / grep not ok piped separately)
4093
+ # wastes minutes every release. Always cache the output.
4094
+ npm test > /tmp/npm-test.log 2>&1
4095
+ exit=$?
4096
+ tail -3 /tmp/npm-test.log
4097
+ echo "ok: $(grep -c '^ok ' /tmp/npm-test.log)"
4098
+ echo "not ok: $(grep -c '^not ok' /tmp/npm-test.log)"
4099
+ echo "exit: $exit"
4086
4100
  ```
4087
4101
 
4088
4102
  **Verify:**
4103
+ - [ ] `exit == 0`
4104
+ - [ ] `ok == expected test count` (e.g., 669)
4105
+ - [ ] `not ok == 0`
4089
4106
  - [ ] Bats runs tests in parallel (4 jobs)
4090
- - [ ] All `ok` — zero `not ok`
4091
4107
  - [ ] Groups: agents, autodetect, cli, generators, guards, hooks, inject,
4092
4108
  install, kb, mcp, readme, profiles, uninstall, validate
4093
4109
 
4110
+ **Anti-pattern — do NOT do this:**
4111
+ ```bash
4112
+ # Runs the full suite THREE times. Adds 1-3 min and pressures CI capacity.
4113
+ npm test 2>&1 | tail -3
4114
+ npm test 2>&1 | grep -c '^ok '
4115
+ npm test 2>&1 | grep -c '^not ok'
4116
+ ```
4117
+
4094
4118
  **Key test areas:**
4095
4119
  - Guards: rm -rf, DROP TABLE, git push --force blocked
4096
4120
  - Install: idempotent, profiles, --only/--skip, orphan cleanup
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.11.0",
2
+ "version": "2.12.0",
3
3
  "components": {
4
4
  "agents": {
5
5
  "description": "44 specialized agents (orchestrator, backend, frontend, security, devops, etc.)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
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",
@@ -212,6 +212,80 @@ def _collect_quality_metrics() -> tuple[int, int, int, int, int, int]:
212
212
  return ref_count, tmpl_count, inject_count, over500, depends_count, orphan_deps
213
213
 
214
214
 
215
+ def _meta_architect_audit() -> tuple[dict[int, int], list[tuple[str, int, list[str]]]]:
216
+ """Score each skill against the 5 meta-architect binary criteria.
217
+
218
+ Criteria (all binary yes=pass):
219
+ description : frontmatter description is >= 50 chars and not generic
220
+ example : SKILL.md contains at least one fenced code block or an
221
+ '## Example' heading
222
+ constraint : SKILL.md uses at least one of MUST / NEVER / CRITICAL /
223
+ MANDATORY / REQUIRED / DO NOT as an uppercase marker
224
+ edge_case : SKILL.md mentions edge cases, failure modes, fallbacks,
225
+ or when NOT to use the skill
226
+ length : SKILL.md is under 500 lines
227
+
228
+ Returns:
229
+ (score_distribution, weak_skills) where
230
+ score_distribution maps score -> count of skills,
231
+ weak_skills is a list of (name, score, failed_criteria) for score <= 3.
232
+ """
233
+ score_dist: dict[int, int] = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0}
234
+ weak: list[tuple[str, int, list[str]]] = []
235
+
236
+ desc_generic = {"tbd", "todo", "fixme", "placeholder"}
237
+ constraint_re = re.compile(r"\b(MUST|NEVER|CRITICAL|MANDATORY|REQUIRED|DO NOT)\b")
238
+ edge_re = re.compile(
239
+ r"(?i)\b(edge case|edge-case|corner case|failure mode|when not to|"
240
+ r"do not use for|fallback|error handling|limitations?)\b"
241
+ )
242
+ example_heading_re = re.compile(
243
+ r"(?im)^##+\s*(example|examples|usage|worked example)"
244
+ )
245
+
246
+ for sf in sorted(skills_dir.glob("*/SKILL.md")):
247
+ text = sf.read_text(encoding="utf-8")
248
+ fm = frontmatter_block(sf)
249
+ desc = _fm_value(fm, "description")
250
+ line_count = text.count("\n") + (1 if text and not text.endswith("\n") else 0)
251
+
252
+ passed: list[str] = []
253
+ failed: list[str] = []
254
+
255
+ if len(desc) >= 50 and not any(g in desc.lower() for g in desc_generic):
256
+ passed.append("description")
257
+ else:
258
+ failed.append("description")
259
+
260
+ if re.search(r"^```", text, re.M) or example_heading_re.search(text):
261
+ passed.append("example")
262
+ else:
263
+ failed.append("example")
264
+
265
+ if constraint_re.search(text):
266
+ passed.append("constraint")
267
+ else:
268
+ failed.append("constraint")
269
+
270
+ if edge_re.search(text):
271
+ passed.append("edge_case")
272
+ else:
273
+ failed.append("edge_case")
274
+
275
+ if line_count < 500:
276
+ passed.append("length")
277
+ else:
278
+ failed.append("length")
279
+
280
+ score = len(passed)
281
+ score_dist[score] = score_dist.get(score, 0) + 1
282
+ if score <= 3:
283
+ weak.append((sf.parent.name, score, failed))
284
+
285
+ weak.sort(key=lambda r: (r[1], r[0]))
286
+ return score_dist, weak
287
+
288
+
215
289
  def main() -> None:
216
290
  """Run evaluation across all skills and print report."""
217
291
  print("AI Toolkit Skill Evaluation")
@@ -249,6 +323,16 @@ def main() -> None:
249
323
  print(f" Orphan dependencies: {orphan_deps}")
250
324
  print()
251
325
 
326
+ score_dist, weak = _meta_architect_audit()
327
+ print("Meta-Architect Audit (advisory, non-failing):")
328
+ print(f" Score distribution (of 5): {dict(sorted(score_dist.items()))}")
329
+ print(f" Skills scoring <= 3: {len(weak)}")
330
+ if weak:
331
+ print(" Bottom 10 (score, name, failed criteria):")
332
+ for name, score, failed in weak[:10]:
333
+ print(f" {score}/5 {name:<28} {','.join(failed)}")
334
+ print()
335
+
252
336
  if fail_count > 0:
253
337
  print("EVALUATION: ISSUES FOUND")
254
338
  sys.exit(1)