@softspark/ai-toolkit 2.9.0 → 2.10.1

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan
3
- description: "Plan implementation with tasks and success criteria"
3
+ description: "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."
4
4
  user-invocable: true
5
5
  effort: high
6
6
  argument-hint: "[goal]"
@@ -11,71 +11,14 @@ allowed-tools: Read, Grep, Glob
11
11
 
12
12
  $ARGUMENTS
13
13
 
14
- Create a structured plan for a new project or feature.
14
+ ## Workflow
15
15
 
16
- ## Usage
17
-
18
- ```
19
- /plan [description]
20
- ```
21
-
22
- ## What This Command Does
23
-
24
- 1. **Analyzes** the request
25
- 2. **Identifies** project type and tech stack
26
- 3. **Breaks down** into tasks
27
- 4. **Creates** plan file with agent assignments
28
-
29
- ## Plan File Output
30
-
31
- Creates a `{project-slug}.md` file in project root:
32
-
33
- ```markdown
34
- # {Project Name} - Implementation Plan
35
-
36
- ## Overview
37
- - **Type**: [Web App / Mobile App / API / etc.]
38
- - **Stack**: [Tech choices]
39
- - **Complexity**: [Low / Medium / High]
40
-
41
- ## Requirements
42
- 1. [Requirement 1]
43
- 2. [Requirement 2]
44
-
45
- ## Task Breakdown
46
-
47
- ### Phase 1: Foundation
48
- - [ ] Task 1 (Agent: backend-specialist)
49
- - [ ] Task 2 (Agent: database-architect)
50
-
51
- ### Phase 2: Core Features
52
- - [ ] Task 3 (Agent: frontend-specialist)
53
- - [ ] Task 4 (Agent: backend-specialist)
54
-
55
- ### Phase 3: Polish
56
- - [ ] Task 5 (Agent: test-engineer)
57
- - [ ] Task 6 (Agent: devops-implementer)
58
-
59
- ## Agent Assignment
60
-
61
- | Task | Agent | Dependencies |
62
- |------|-------|--------------|
63
- | Database | database-architect | None |
64
- | API | backend-specialist | Database |
65
- | UI | frontend-specialist | API |
66
- | Tests | test-engineer | All above |
67
-
68
- ## File Structure
69
- ```
70
- project/
71
- ├── src/
72
- └── ...
73
- ```
74
-
75
- ## Success Criteria
76
- - [ ] Criterion 1
77
- - [ ] Criterion 2
78
- ```
16
+ 1. **Analyze scope**: read the goal, scan relevant source files to understand current state
17
+ 2. **Detect project type**: match keywords to determine stack and primary agents (see table below)
18
+ 3. **Break into phases**: group tasks by dependency order (foundation, core, polish)
19
+ 4. **Assign agents**: map each task to the best-fit agent with explicit dependencies
20
+ 5. **Write plan file**: create `{project-slug}.md` in project root using [templates/plan-template.md](templates/plan-template.md)
21
+ 6. **Validate**: confirm every requirement maps to at least one task, no circular dependencies exist, and success criteria are measurable
79
22
 
80
23
  ## Project Type Detection
81
24
 
@@ -83,44 +26,29 @@ project/
83
26
  |----------|------|----------------|
84
27
  | landing, website | Static Site | frontend-specialist |
85
28
  | dashboard, admin | Web App | frontend + backend |
86
- | api, rest | API Only | backend-specialist |
29
+ | api, rest, graphql | API Only | backend-specialist |
87
30
  | mobile, ios, android | Mobile | mobile-developer |
88
- | game, unity | Game | game-developer |
31
+ | cli, terminal | CLI Tool | backend-specialist |
89
32
 
90
- ## PLAN MODE RULES
33
+ ## Planning Constraints
91
34
 
92
- During planning:
93
- - Create plan documents
94
- - Define tasks and structure
95
- - NO code writing
96
- - NO file creation (except plan)
97
-
98
- ## Common Rationalizations
99
-
100
- | Excuse | Why It's Wrong |
101
- |--------|----------------|
102
- | "We already know what to build" | Assumed requirements lead to rework — validate assumptions explicitly |
103
- | "Planning is wasted time, just start coding" | Unplanned work has 3-5x more rework — 30 min planning saves days |
104
- | "The requirements will change anyway" | Plans adapt — without one, you can't assess impact of changes |
105
- | "It's a small feature, no plan needed" | Small features in complex systems have hidden dependencies — map them |
106
- | "We'll figure it out as we go" | Discovery without structure leads to scope creep and missed edge cases |
107
-
108
- ## Next Steps
109
-
110
- After plan approval:
111
- 1. Use `/orchestrate` to execute with agents
112
- 2. Or manually invoke specific agents
35
+ - Create plan documents only, NO code writing, NO file creation (except the plan)
36
+ - Each task must name affected file(s) and a single owning agent
37
+ - Phases must have explicit dependency edges (`Phase 1 -> Phase 2`)
38
+ - Success criteria must be verifiable (command to run, expected output, or observable behavior)
113
39
 
114
40
  ## KB Integration
115
41
 
116
42
  Before planning:
43
+
117
44
  ```python
118
45
  smart_query("project template: {type}")
119
46
  hybrid_search_kb("architecture {pattern}")
120
47
  ```
121
48
 
122
49
  ## Related Skills
123
- - Plan approved? → `/orchestrate` or `/workflow` to execute with agents
124
- - Need requirements first? `/write-a-prd` for structured product requirements
125
- - Want to stress-test the plan? `/grill-me` for Socratic questioning
126
- - Ready to break into issues? `/prd-to-plan` `/triage-issue`
50
+
51
+ - Plan approved? -> `/orchestrate` or `/workflow` to execute with agents
52
+ - Need requirements first? -> `/write-a-prd` for structured product requirements
53
+ - Want to stress-test the plan? -> `/grill-me` for Socratic questioning
54
+ - Ready to break into issues? -> `/prd-to-plan` -> `/triage-issue`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: predict
3
- description: "Predict regressions and impact before changes land"
3
+ description: "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."
4
4
  effort: medium
5
5
  disable-model-invocation: true
6
6
  argument-hint: "[change description]"
@@ -13,18 +13,66 @@ allowed-tools: Read, Grep, Glob
13
13
 
14
14
  $ARGUMENTS
15
15
 
16
- Triggers the Predictive Analyst to assess impact.
16
+ Triggers the Predictive Analyst to assess the impact and regression risk of proposed changes.
17
17
 
18
18
  ## Usage
19
19
 
20
20
  ```bash
21
21
  /predict [path_or_diff]
22
- # Example: /predict src/auth
23
- # Example: /predict --diff (analyzes uncommitted changes)
22
+ # /predict src/auth : analyze all files under src/auth
23
+ # /predict --diff : analyze uncommitted changes (git diff)
24
+ # /predict src/api/routes.ts : analyze a single file
24
25
  ```
25
26
 
26
27
  ## Protocol
27
- 1. **Scope**: Identify target files.
28
- 2. **Trace**: Build dependency graph.
29
- 3. **Assess**: Calculate risk score.
30
- 4. **Report**: Generate Impact Prediction.
28
+
29
+ ### 1. Scope: Identify Target Files
30
+
31
+ - If path provided: collect all files under that path
32
+ - If `--diff`: run `git diff --name-only` to get changed files
33
+ - List each file with its last-modified date and line count
34
+
35
+ ### 2. Trace: Build Dependency Graph
36
+
37
+ For each target file, find dependents:
38
+
39
+ ```bash
40
+ # Find files that import/require the target
41
+ grep -rl "import.*from.*[target]" --include="*.ts" --include="*.py" --include="*.js" .
42
+ grep -rl "require.*[target]" --include="*.js" --include="*.ts" .
43
+ ```
44
+
45
+ Build a graph: `changed file, direct dependents, transitive dependents (1 level)`
46
+
47
+ ### 3. Assess: Calculate Risk Score
48
+
49
+ Score each changed file on a 1 to 5 scale:
50
+
51
+ | Factor | Weight | Scoring |
52
+ |--------|--------|---------|
53
+ | Dependent count | 30% | 0 deps = 1, 1 to 3 = 2, 4 to 10 = 3, 11 to 20 = 4, 21+ = 5 |
54
+ | Test coverage | 30% | Has dedicated test = 1, partial = 3, none = 5 |
55
+ | Change surface | 20% | < 10 lines = 1, 10 to 50 = 2, 50 to 200 = 3, 200+ = 5 |
56
+ | Shared/core file | 20% | Leaf = 1, mid-layer = 3, core/shared = 5 |
57
+
58
+ **Overall risk** = weighted average rounded to nearest integer.
59
+
60
+ ### 4. Report: Generate Impact Prediction
61
+
62
+ Output a markdown report:
63
+
64
+ ```markdown
65
+ ## Impact Prediction: [scope]
66
+
67
+ | File | Risk | Dependents | Test Coverage | Notes |
68
+ |------|------|------------|---------------|-------|
69
+ | src/auth/login.ts | 4/5 | 12 files | partial | Core auth flow |
70
+
71
+ ### High-Risk Changes (score >= 4)
72
+ - [file]: [why it's high risk and what to watch]
73
+
74
+ ### Recommended Actions
75
+ - [ ] Add tests for [untested file]
76
+ - [ ] Review [high-dependent file] with extra scrutiny
77
+ - [ ] Run integration tests covering [affected area]
78
+ ```
@@ -110,3 +110,4 @@ What is explicitly NOT part of this refactor.
110
110
  - No file paths or code snippets in the issue (durability)
111
111
  - File immediately via `gh issue create` — don't ask for review
112
112
  - Interview thoroughly before planning
113
+ - **Dead code cleanup is mandatory per step, not deferred** (Constitution Art. VI.1): every refactor step must leave the repo with zero orphaned references. "We'll delete the old code in a later step" is only acceptable for transitional double-write / expand-contract phases where both paths are temporarily live — and the cleanup step must be explicitly listed in the plan, not implied.
@@ -1,21 +1,17 @@
1
1
  ---
2
2
  name: teams
3
- description: "Launch pre-configured Agent Teams for common workflows"
3
+ description: "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."
4
4
  effort: max
5
5
  user-invocable: true
6
6
  argument-hint: "<preset> [task-description]"
7
7
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent, TeamCreate, TeamDelete, SendMessage, TaskCreate, TaskList, TaskUpdate, TaskGet
8
8
  ---
9
9
 
10
- # /teams - Agent Teams Presets
10
+ # /teams: Agent Teams Presets
11
11
 
12
12
  $ARGUMENTS
13
13
 
14
- ## What This Does
15
-
16
- Launches a pre-configured Agent Teams composition for your task.
17
-
18
- Requires: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`
14
+ Launches a pre-configured Agent Teams composition for your task. Requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`.
19
15
 
20
16
  ## Available Presets
21
17
 
@@ -29,70 +25,36 @@ Requires: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`
29
25
  | `security` | security-architect, security-auditor, backend-specialist | Security audit |
30
26
  | `migration` | database-architect, backend-specialist, devops-implementer | Database migration |
31
27
 
32
- ## Usage Examples
28
+ See [reference/presets.md](reference/presets.md) for detailed ownership, aggregation strategies, and output formats for each preset.
29
+
30
+ ## Usage
33
31
 
34
32
  ```
35
- /teams review # Launch review team on current changes
36
- /teams debug # Launch debug team for current issue
37
- /teams feature # Launch feature team for new feature
38
- /teams security # Launch security audit team
39
- /teams migration # Launch migration team
33
+ /teams review # Launch review team on current changes
34
+ /teams debug # Launch debug team for current issue
35
+ /teams feature add auth # Launch feature team with task context
36
+ /teams security # Launch security audit team
40
37
  ```
41
38
 
42
- ## Preset Definitions
43
-
44
- ### review
45
- - **Agents**: code-reviewer (lead), security-auditor, performance-optimizer
46
- - **Ownership**: code-reviewer owns review summary; others own their domain reports
47
- - **Aggregation**: consensus flag issues found by 2+ agents as high priority
48
- - **Output**: `REVIEW.md` with severity-ranked findings
49
-
50
- ### debug
51
- - **Agents**: debugger (lead), backend-specialist, incident-responder
52
- - **Ownership**: debugger owns root-cause analysis; others own hypothesis testing
53
- - **Aggregation**: relay — debugger synthesizes findings from others
54
- - **Output**: `DEBUG_REPORT.md` with root cause and fix
55
-
56
- ### feature
57
- - **Agents**: orchestrator (lead), backend-specialist, frontend-specialist, test-engineer
58
- - **Ownership**: orchestrator owns plan; specialists own their files; test-engineer owns tests
59
- - **Aggregation**: map-reduce orchestrator integrates all outputs
60
- - **Output**: implemented feature + tests
61
-
62
- ### fullstack
63
- - **Agents**: backend-specialist, frontend-specialist, database-architect, devops-implementer
64
- - **Ownership**: each agent owns their layer (API, UI, DB, infra)
65
- - **Aggregation**: relay — backend-specialist synthesizes integration
66
- - **Output**: full stack implementation
67
-
68
- ### research
69
- - **Agents**: technical-researcher (lead), data-analyst, prompt-engineer
70
- - **Ownership**: technical-researcher owns synthesis; others own domain findings
71
- - **Aggregation**: consensus — areas of agreement highlighted
72
- - **Output**: `RESEARCH.md` with findings and recommendations
73
-
74
- ### security
75
- - **Agents**: security-architect (lead), security-auditor, backend-specialist
76
- - **Ownership**: security-architect owns threat model; auditor owns findings; backend owns remediation
77
- - **Aggregation**: relay — security-architect integrates all
78
- - **Output**: `SECURITY_AUDIT.md` with CVSS-scored findings
79
-
80
- ### migration
81
- - **Agents**: database-architect (lead), backend-specialist, devops-implementer
82
- - **Ownership**: database-architect owns schema; backend owns code changes; devops owns deployment
83
- - **Aggregation**: relay — database-architect coordinates sequence
84
- - **Output**: migration scripts + rollback plan + deployment runbook
85
-
86
- ## Steps
87
-
88
- 1. Parse `$ARGUMENTS` to extract `<preset>` and optional `[task-description]`
89
- 2. Validate preset is one of: review, debug, feature, fullstack, research, security, migration
90
- 3. Check `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` is set; warn if not
91
- 4. Display the team composition and ownership rules
92
- 5. Ask user to confirm before launching
93
- 6. Launch the appropriate agents using the Agent tool with the task description
94
- 7. Apply the aggregation strategy to synthesize results
95
- 8. Produce the defined output document
39
+ ## Workflow
40
+
41
+ 1. **Parse** `$ARGUMENTS`: extract `<preset>` and optional `[task-description]`
42
+ 2. **Validate** preset is one of: review, debug, feature, fullstack, research, security, migration
43
+ 3. **Check environment**: verify `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` is set; warn if missing
44
+ 4. **Display** team composition and ownership rules from [reference/presets.md](reference/presets.md)
45
+ 5. **Confirm** with user before launching
46
+ 6. **Launch agents**: spawn each agent with its assigned scope using the Agent tool:
47
+ ```
48
+ Agent({ description: "code-reviewer: PR review lead", prompt: "[task + ownership rules]" })
49
+ Agent({ description: "security-auditor: security findings", prompt: "[task + domain scope]" })
50
+ ```
51
+ 7. **Aggregate results**: apply the preset's aggregation strategy (consensus, relay, or map-reduce)
52
+ 8. **Produce output**: write the defined output document (e.g., `REVIEW.md`, `DEBUG_REPORT.md`)
53
+
54
+ ### Error Handling
55
+
56
+ - If an agent fails or times out: log the failure, continue with remaining agents, note the gap in the output
57
+ - If agents produce conflicting findings: the lead agent resolves conflicts; flag unresolved disagreements for user review
96
58
 
97
59
  ## Environment
98
60
 
@@ -0,0 +1,52 @@
1
+ # Agent Teams Preset Definitions
2
+
3
+ Detailed configuration for each `/teams` preset. Each preset defines agents, ownership, aggregation strategy, and output format.
4
+
5
+ ## review
6
+
7
+ - **Agents**: code-reviewer (lead), security-auditor, performance-optimizer
8
+ - **Ownership**: code-reviewer owns review summary; others own their domain reports
9
+ - **Aggregation**: consensus (flag issues found by 2+ agents as high priority)
10
+ - **Output**: `REVIEW.md` with severity-ranked findings
11
+
12
+ ## debug
13
+
14
+ - **Agents**: debugger (lead), backend-specialist, incident-responder
15
+ - **Ownership**: debugger owns root-cause analysis; others own hypothesis testing
16
+ - **Aggregation**: relay (debugger synthesizes findings from others)
17
+ - **Output**: `DEBUG_REPORT.md` with root cause and fix
18
+
19
+ ## feature
20
+
21
+ - **Agents**: orchestrator (lead), backend-specialist, frontend-specialist, test-engineer
22
+ - **Ownership**: orchestrator owns plan; specialists own their files; test-engineer owns tests
23
+ - **Aggregation**: map-reduce (orchestrator integrates all outputs)
24
+ - **Output**: implemented feature + tests
25
+
26
+ ## fullstack
27
+
28
+ - **Agents**: backend-specialist, frontend-specialist, database-architect, devops-implementer
29
+ - **Ownership**: each agent owns their layer (API, UI, DB, infra)
30
+ - **Aggregation**: relay (backend-specialist synthesizes integration)
31
+ - **Output**: full stack implementation
32
+
33
+ ## research
34
+
35
+ - **Agents**: technical-researcher (lead), data-analyst, prompt-engineer
36
+ - **Ownership**: technical-researcher owns synthesis; others own domain findings
37
+ - **Aggregation**: consensus (areas of agreement highlighted)
38
+ - **Output**: `RESEARCH.md` with findings and recommendations
39
+
40
+ ## security
41
+
42
+ - **Agents**: security-architect (lead), security-auditor, backend-specialist
43
+ - **Ownership**: security-architect owns threat model; auditor owns findings; backend owns remediation
44
+ - **Aggregation**: relay (security-architect integrates all)
45
+ - **Output**: `SECURITY_AUDIT.md` with CVSS-scored findings
46
+
47
+ ## migration
48
+
49
+ - **Agents**: database-architect (lead), backend-specialist, devops-implementer
50
+ - **Ownership**: database-architect owns schema; backend owns code changes; devops owns deployment
51
+ - **Aggregation**: relay (database-architect coordinates sequence)
52
+ - **Output**: migration scripts + rollback plan + deployment runbook
@@ -54,6 +54,9 @@ Skip any step = lying, not verifying
54
54
  | Regression test works | Red-green cycle verified | Test passes once |
55
55
  | Agent completed | VCS diff shows changes | Agent reports "success" |
56
56
  | Requirements met | Line-by-line checklist | Tests passing |
57
+ | No dead code (Art. VI.1) | Grep for every removed/renamed symbol: 0 references | "I cleaned up what I touched" |
58
+ | Behavior change covered (Art. VI.2) | Integration test for the API surface + unit test + docs updated | Unit test on the helper only |
59
+ | Diff is clean (Art. VI.4) | Re-read full diff: no orphaned imports, no stale docs, no skipped fixes | "I only changed what I needed" |
57
60
 
58
61
  ## Red Flags — STOP
59
62
 
@@ -102,6 +105,10 @@ CORRECT: Agent reports success → Check VCS diff → Verify changes → Report
102
105
  WRONG: Trust agent report at face value
103
106
  ```
104
107
 
108
+ ## Constitutional Anchors
109
+
110
+ This skill enforces **Constitution Art. VI.4 (Verify Before Claiming Done)**. The diff re-read is not optional: before any completion claim, confirm no orphaned references, no missing test coverage for changed paths, no stale docs. A task is not done while any of those exist.
111
+
105
112
  ## The Bottom Line
106
113
 
107
114
  Run the command. Read the output. THEN claim the result.
@@ -35,7 +35,7 @@ ai-toolkit/
35
35
  rules/ # Rules auto-injected into ~/.claude/CLAUDE.md
36
36
  hooks/ # Hook scripts (copied to ~/.softspark/ai-toolkit/hooks/)
37
37
  hooks.json # Hook definitions (merged into ~/.claude/settings.json)
38
- constitution.md # Immutable safety rules, 5 articles (marker-injected)
38
+ constitution.md # Immutable safety rules, 6 articles (marker-injected)
39
39
  ARCHITECTURE.md # System architecture reference (marker-injected)
40
40
  CLAUDE.md.template # Template for project CLAUDE.md (used by init)
41
41
  settings.local.json.template
@@ -292,15 +292,16 @@ Agents (code-reviewer, debugger, devops-implementer, ...)
292
292
 
293
293
  Scripts at `~/.softspark/ai-toolkit/hooks/`. See [hooks-catalog.md](hooks-catalog.md) for details.
294
294
 
295
- ## Constitution (5 Articles)
295
+ ## Constitution (6 Articles)
296
296
 
297
297
  | Article | Key Rule |
298
298
  |---------|----------|
299
- | I Safety First | No data loss, no blind execution, max 3 loop iterations |
299
+ | I Safety First | No data loss, no blind execution, max 5 loop iterations |
300
300
  | II Hierarchy of Truth | KB is source of truth, research protocol mandatory |
301
301
  | III Operational Integrity | Green tests = Done, logs are evidence |
302
302
  | IV Self-Preservation | Constitution is read-only, kill switch via system-governor |
303
303
  | V Resource Governance | No destructive commands without confirmation |
304
+ | VI Repair Discipline | No dead code, fix every found bug, tests and docs follow behavior, verify before done |
304
305
 
305
306
  ## Persona Presets
306
307
 
@@ -175,9 +175,9 @@ Requirements:
175
175
 
176
176
  ## Constitution Immutability
177
177
 
178
- - **Articles I-V** (toolkit core) are absolutely immutable
178
+ - **Articles I-VI** (toolkit core) are absolutely immutable
179
179
  - **Base config articles** are immutable — projects cannot modify them
180
- - Projects can **only ADD** new articles (article 6+)
180
+ - Projects can **only ADD** new articles (article 7+)
181
181
 
182
182
  ```json
183
183
  {
package/llms-full.txt CHANGED
@@ -65,7 +65,7 @@
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
- - **biz-scan**: Scan codebase for business opportunities and KPIs
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
70
  - **briefing**: Generate executive daily briefing across all agents
71
71
  - **build**: Build the project with auto-detected toolchain
@@ -90,7 +90,7 @@
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
92
  - **evaluate**: Evaluate skill quality and RAG retrieval accuracy
93
- - **evolve**: Evolve agent definitions via meta-architect
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
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
@@ -121,13 +121,13 @@
121
121
  - **panic**: Emergency stabilization via system-governor agent
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
- - **plan**: Plan implementation with tasks and success criteria
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
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.
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
- - **predict**: Predict regressions and impact before changes land
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.
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
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.
@@ -148,7 +148,7 @@
148
148
  - **swarm**: Execute tasks via Map-Reduce, Consensus, or Relay swarms
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
- - **teams**: Launch pre-configured Agent Teams for common workflows
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
152
  - **test**: Run tests with coverage analysis and reporting
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.
@@ -4630,7 +4630,7 @@ ai-toolkit/
4630
4630
  rules/ # Rules auto-injected into ~/.claude/CLAUDE.md
4631
4631
  hooks/ # Hook scripts (copied to ~/.softspark/ai-toolkit/hooks/)
4632
4632
  hooks.json # Hook definitions (merged into ~/.claude/settings.json)
4633
- constitution.md # Immutable safety rules, 5 articles (marker-injected)
4633
+ constitution.md # Immutable safety rules, 6 articles (marker-injected)
4634
4634
  ARCHITECTURE.md # System architecture reference (marker-injected)
4635
4635
  CLAUDE.md.template # Template for project CLAUDE.md (used by init)
4636
4636
  settings.local.json.template
@@ -4887,15 +4887,16 @@ Agents (code-reviewer, debugger, devops-implementer, ...)
4887
4887
 
4888
4888
  Scripts at `~/.softspark/ai-toolkit/hooks/`. See [hooks-catalog.md](hooks-catalog.md) for details.
4889
4889
 
4890
- ## Constitution (5 Articles)
4890
+ ## Constitution (6 Articles)
4891
4891
 
4892
4892
  | Article | Key Rule |
4893
4893
  |---------|----------|
4894
- | I Safety First | No data loss, no blind execution, max 3 loop iterations |
4894
+ | I Safety First | No data loss, no blind execution, max 5 loop iterations |
4895
4895
  | II Hierarchy of Truth | KB is source of truth, research protocol mandatory |
4896
4896
  | III Operational Integrity | Green tests = Done, logs are evidence |
4897
4897
  | IV Self-Preservation | Constitution is read-only, kill switch via system-governor |
4898
4898
  | V Resource Governance | No destructive commands without confirmation |
4899
+ | VI Repair Discipline | No dead code, fix every found bug, tests and docs follow behavior, verify before done |
4899
4900
 
4900
4901
  ## Persona Presets
4901
4902
 
@@ -6520,9 +6521,9 @@ Requirements:
6520
6521
 
6521
6522
  ## Constitution Immutability
6522
6523
 
6523
- - **Articles I-V** (toolkit core) are absolutely immutable
6524
+ - **Articles I-VI** (toolkit core) are absolutely immutable
6524
6525
  - **Base config articles** are immutable — projects cannot modify them
6525
- - Projects can **only ADD** new articles (article 6+)
6526
+ - Projects can **only ADD** new articles (article 7+)
6526
6527
 
6527
6528
  ```json
6528
6529
  {
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.9.0",
2
+ "version": "2.10.1",
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.9.0",
3
+ "version": "2.10.1",
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",
@@ -217,7 +217,7 @@ def _diff_constitution(base: dict, project: dict) -> None:
217
217
  if base_articles or proj_articles:
218
218
  print()
219
219
  print(" Constitution:")
220
- print(" = Articles I-V (immutable)")
220
+ print(" = Articles I-VI (immutable)")
221
221
  for num, art in sorted(base_articles.items()):
222
222
  print(f" = Article {num}: {art['title']} (inherited from base)")
223
223
  for num, art in sorted(proj_articles.items()):
@@ -2,7 +2,7 @@
2
2
  """Config merger for ai-toolkit extends system.
3
3
 
4
4
  Implements layered deep merge with:
5
- - Constitution immutability (Articles I-V absolute, base articles immutable)
5
+ - Constitution immutability (Articles I-VI absolute, base articles immutable)
6
6
  - Agent merge with requiredAgents enforcement
7
7
  - Override validation (override:true + justification required)
8
8
  - enforce block constraints (minHookProfile, requiredPlugins, forbidOverride, requiredAgents)
@@ -22,7 +22,7 @@ from typing import Any
22
22
  # Constants
23
23
  # ---------------------------------------------------------------------------
24
24
 
25
- IMMUTABLE_ARTICLES = frozenset({1, 2, 3, 4, 5})
25
+ IMMUTABLE_ARTICLES = frozenset({1, 2, 3, 4, 5, 6})
26
26
 
27
27
  HOOK_PROFILE_ORDER = {"minimal": 0, "standard": 1, "strict": 2}
28
28
 
@@ -163,7 +163,7 @@ def _merge_constitution(
163
163
  """Merge constitution — additions only, no modifications.
164
164
 
165
165
  Rules:
166
- 1. Articles I-V (1-5) are ABSOLUTELY immutable — toolkit core.
166
+ 1. Articles I-VI (1-6) are ABSOLUTELY immutable — toolkit core.
167
167
  2. Articles defined by base configs are immutable — projects cannot modify.
168
168
  3. Projects can ADD new articles with article numbers not in base.
169
169
  """
@@ -177,8 +177,8 @@ def _merge_constitution(
177
177
  if article_num in IMMUTABLE_ARTICLES:
178
178
  raise ConfigMergeError(
179
179
  f"Cannot modify Constitution Article {article_num} — immutable.\n"
180
- f"Articles I-V are defined by ai-toolkit and cannot be overridden.\n"
181
- f"You can ADD new articles (article 6+)."
180
+ f"Articles I-VI are defined by ai-toolkit and cannot be overridden.\n"
181
+ f"You can ADD new articles (article 7+)."
182
182
  )
183
183
  if article_num in base_amendments:
184
184
  raise ConfigMergeError(
@@ -21,7 +21,7 @@ from typing import Any
21
21
  VALID_PROFILES = {"minimal", "standard", "strict", "full", "offline-slm"}
22
22
  VALID_HOOK_PROFILES = {"minimal", "standard", "strict"}
23
23
  HOOK_PROFILE_ORDER = {"minimal": 0, "standard": 1, "strict": 2}
24
- IMMUTABLE_ARTICLES = frozenset({1, 2, 3, 4, 5})
24
+ IMMUTABLE_ARTICLES = frozenset({1, 2, 3, 4, 5, 6})
25
25
  MIN_JUSTIFICATION_LEN = 20
26
26
 
27
27