@softspark/ai-toolkit 3.5.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/AGENTS.md +18 -23
  2. package/CHANGELOG.md +60 -0
  3. package/README.md +20 -10
  4. package/app/.claude-plugin/plugin.json +1 -1
  5. package/app/ARCHITECTURE.md +1 -9
  6. package/app/agents/chief-of-staff.md +1 -1
  7. package/app/agents/meta-architect.md +1 -1
  8. package/app/agents/night-watchman.md +1 -1
  9. package/app/agents/orchestrator.md +1 -1
  10. package/app/agents/predictive-analyst.md +1 -1
  11. package/app/agents/product-manager.md +1 -1
  12. package/app/plugins/research-pack/plugin.json +1 -1
  13. package/app/skills/a11y-validate/SKILL.md +1 -1
  14. package/app/skills/api-patterns/SKILL.md +1 -1
  15. package/app/skills/app-builder/SKILL.md +1 -1
  16. package/app/skills/architecture-audit/SKILL.md +1 -1
  17. package/app/skills/biz-scan/SKILL.md +1 -1
  18. package/app/skills/ci-cd-patterns/SKILL.md +1 -1
  19. package/app/skills/debug/SKILL.md +28 -0
  20. package/app/skills/design-an-interface/SKILL.md +1 -1
  21. package/app/skills/docker-devops/SKILL.md +1 -1
  22. package/app/skills/evolve/SKILL.md +1 -1
  23. package/app/skills/explain/SKILL.md +1 -1
  24. package/app/skills/explore/SKILL.md +1 -1
  25. package/app/skills/flutter-patterns/SKILL.md +1 -1
  26. package/app/skills/git-mastery/SKILL.md +1 -1
  27. package/app/skills/index/SKILL.md +1 -1
  28. package/app/skills/mcp-patterns/SKILL.md +1 -1
  29. package/app/skills/mem-search/SKILL.md +1 -1
  30. package/app/skills/migrate/SKILL.md +1 -1
  31. package/app/skills/migration-patterns/SKILL.md +1 -1
  32. package/app/skills/observability-patterns/SKILL.md +1 -1
  33. package/app/skills/performance-profiling/SKILL.md +1 -1
  34. package/app/skills/persona/SKILL.md +1 -1
  35. package/app/skills/plan/SKILL.md +22 -0
  36. package/app/skills/refactor-plan/SKILL.md +1 -1
  37. package/app/skills/research-mastery/SKILL.md +13 -1
  38. package/app/skills/swarm/SKILL.md +10 -5
  39. package/app/skills/typescript-patterns/SKILL.md +1 -1
  40. package/kb/procedures/release-verification-sop.md +1 -1
  41. package/kb/reference/codex-cli-compatibility.md +0 -1
  42. package/kb/reference/opencode-compatibility.md +1 -1
  43. package/kb/reference/skills-catalog.md +2 -13
  44. package/llms-full.txt +22 -39
  45. package/manifest.json +3 -3
  46. package/package.json +2 -2
  47. package/scripts/codex_skill_adapter.py +2 -7
  48. package/app/skills/debugging-tactics/SKILL.md +0 -136
  49. package/app/skills/hive-mind/SKILL.md +0 -57
  50. package/app/skills/plan-writing/SKILL.md +0 -228
  51. package/app/skills/search/SKILL.md +0 -64
  52. package/app/skills/teams/SKILL.md +0 -63
  53. package/app/skills/teams/reference/presets.md +0 -52
@@ -1,57 +0,0 @@
1
- ---
2
- name: hive-mind
3
- description: "Multi-agent swarm: consensus voting, output aggregation, file ownership, map-reduce. Triggers: swarm, hive mind, multi-agent, consensus, parallel agents, team of agents, agent voting."
4
- effort: medium
5
- user-invocable: false
6
- allowed-tools: Read
7
- ---
8
-
9
- # Hive Mind Skill
10
-
11
- You are part of a Swarm. You are not alone.
12
-
13
- ## 🔴 Swarm Protocols
14
-
15
- ### 1. Consensus (The Vote)
16
- When agents disagree:
17
- 1. Each agent generates a solution + confidence score.
18
- 2. **Weighted Voting**: Higher confidence = Higher weight.
19
- 3. **Majority Rule**: >50% wins.
20
-
21
- ### 2. Aggregation (The Merge)
22
- When multiple agents produce outputs:
23
- 1. **Format Standardization**: Ensure all JSON/Markdown matches.
24
- 2. **De-duplication**: Remove identical findings.
25
- 3. **Synthesis**: Combine unique insights into one report.
26
-
27
- ### 3. File Ownership (Agent Teams Mode)
28
-
29
- **With Agent Teams enabled**: File conflicts are prevented by **file ownership assignment** at spawn time. Each teammate gets distinct files/directories. No locking needed.
30
-
31
- - Lead assigns ownership when creating the team
32
- - Teammates respect boundaries in their prompts
33
- - Quality hooks verify completeness on `TaskCompleted`
34
-
35
- **Without Agent Teams** (fallback):
36
- 1. Before editing a file: Check if another agent is editing.
37
- 2. Use `touch .lock.{filename}`.
38
- 3. Remove lock after edit.
39
-
40
- ### 4. Communication (Agent Teams Mode)
41
-
42
- - **message**: Send to ONE specific teammate (targeted, low cost)
43
- - **broadcast**: Send to ALL teammates (use sparingly — costs N×)
44
- - **Shared task list**: `~/.claude/tasks/{team-name}/` — all agents can see/claim
45
-
46
- ## Example Workflow (Map-Reduce)
47
-
48
- ### With Agent Teams
49
- 1. **Map**: Lead spawns 5 teammates, each scanning 20 files
50
- 2. **Parallel**: All teammates execute simultaneously in tmux panes
51
- 3. **Reduce**: Lead waits, collects results, applies Aggregation protocol
52
- 4. **Report**: `final_report.md` synthesized from all findings
53
-
54
- ### Without Agent Teams (Fallback)
55
- 1. **Map**: "Scan 100 files for leaks." → 10 Agents × 10 Files.
56
- 2. **Reduce**: Agents output `leaks_{i}.json`.
57
- 3. **Hive Mind**: Merge all `leaks_*.json` → `final_report.json`.
@@ -1,228 +0,0 @@
1
- ---
2
- name: plan-writing
3
- description: "Implementation plans + pre-mortems: phases, success criteria, risks, rollback, acceptance tests. Triggers: implementation plan, pre-mortem, phased plan, task breakdown, risk register."
4
- effort: medium
5
- user-invocable: false
6
- allowed-tools: Read
7
- ---
8
-
9
- # Plan Writing Skill
10
-
11
- ## Plan Structure
12
-
13
- ### Basic Plan Template
14
-
15
- ```markdown
16
- # [Project Name] - Implementation Plan
17
-
18
- ## Overview
19
- - **Type**: [Project type]
20
- - **Stack**: [Tech choices]
21
- - **Complexity**: [Low/Medium/High]
22
- - **Estimated Effort**: [Days/Weeks]
23
-
24
- ## Goals
25
- 1. [Primary goal]
26
- 2. [Secondary goal]
27
-
28
- ## Requirements
29
-
30
- ### Functional
31
- | ID | Requirement | Priority |
32
- |----|-------------|----------|
33
- | FR1 | [Requirement] | Must |
34
- | FR2 | [Requirement] | Should |
35
-
36
- ### Non-Functional
37
- | ID | Requirement | Metric |
38
- |----|-------------|--------|
39
- | NFR1 | Performance | < 2s load |
40
- | NFR2 | Security | OWASP compliant |
41
-
42
- ## Task Breakdown
43
-
44
- ### Phase 1: Foundation
45
- - [ ] Task 1.1
46
- - [ ] Task 1.2
47
-
48
- ### Phase 2: Core
49
- - [ ] Task 2.1
50
- - [ ] Task 2.2
51
-
52
- ### Phase 3: Polish
53
- - [ ] Task 3.1
54
- - [ ] Task 3.2
55
-
56
- ## Dependencies
57
-
58
- ```mermaid
59
- graph TD
60
- A[Database Schema] --> B[API Endpoints]
61
- B --> C[UI Components]
62
- C --> D[Tests]
63
- D --> E[Deployment]
64
- ```
65
-
66
- ## Agent Assignment
67
-
68
- | Task | Agent | Dependencies |
69
- |------|-------|--------------|
70
- | Schema | database-architect | None |
71
- | API | backend-specialist | Schema |
72
- | UI | frontend-specialist | API |
73
- | Tests | test-engineer | UI |
74
-
75
- ## Success Criteria
76
- - [ ] All tests passing
77
- - [ ] Performance targets met
78
- - [ ] Security review complete
79
-
80
- ## Risks
81
- | Risk | Probability | Impact | Mitigation |
82
- |------|-------------|--------|------------|
83
- | [Risk] | High/Med/Low | High/Med/Low | [Plan] |
84
- ```
85
-
86
- ---
87
-
88
- ## Task Breakdown Principles
89
-
90
- ### SMART Tasks
91
- - **S**pecific: Clear deliverable
92
- - **M**easurable: Done/not done
93
- - **A**ssignable: One owner
94
- - **R**ealistic: Achievable
95
- - **T**ime-bound: Estimated duration
96
-
97
- ### Good vs Bad Tasks
98
-
99
- | ❌ Bad | ✅ Good |
100
- |--------|--------|
101
- | "Implement authentication" | "Create login API endpoint with JWT" |
102
- | "Build UI" | "Create user dashboard component" |
103
- | "Fix bugs" | "Fix login redirect on mobile" |
104
- | "Optimize" | "Reduce API response time to <200ms" |
105
-
106
- ---
107
-
108
- ## Dependency Management
109
-
110
- ### Dependency Types
111
-
112
- | Type | Example |
113
- |------|---------|
114
- | **Hard** | API must exist before UI can call it |
115
- | **Soft** | Tests can start when 50% features done |
116
- | **External** | Waiting for third-party API access |
117
-
118
- ### Identifying Dependencies
119
-
120
- ```
121
- For each task, ask:
122
- 1. What must exist before this can start?
123
- 2. What does this task produce?
124
- 3. Who/what consumes that output?
125
- ```
126
-
127
- ---
128
-
129
- ## Estimation Patterns
130
-
131
- ### T-Shirt Sizing
132
-
133
- | Size | Effort | Example |
134
- |------|--------|---------|
135
- | XS | <2 hours | Fix typo, add field |
136
- | S | 2-4 hours | Simple component, basic API |
137
- | M | 1-2 days | Feature with tests |
138
- | L | 3-5 days | Complex feature |
139
- | XL | 1-2 weeks | Major subsystem |
140
-
141
- ### Cone of Uncertainty
142
-
143
- | Phase | Accuracy |
144
- |-------|----------|
145
- | Initial idea | 4x variance |
146
- | After discovery | 2x variance |
147
- | After design | 1.5x variance |
148
- | After development | 1.1x variance |
149
-
150
- ---
151
-
152
- ## Phase Templates
153
-
154
- ### MVP Launch
155
-
156
- ```
157
- Phase 1: Core (Week 1-2)
158
- - Database schema
159
- - Authentication
160
- - Core feature 1
161
-
162
- Phase 2: Essential (Week 3-4)
163
- - Core feature 2
164
- - Basic UI
165
- - Critical integrations
166
-
167
- Phase 3: Launch (Week 5)
168
- - Testing
169
- - Deployment
170
- - Documentation
171
- ```
172
-
173
- ### Feature Addition
174
-
175
- ```
176
- Phase 1: Preparation
177
- - Research existing code
178
- - Define acceptance criteria
179
- - Design solution
180
-
181
- Phase 2: Implementation
182
- - Backend changes
183
- - Frontend changes
184
- - Integration
185
-
186
- Phase 3: Validation
187
- - Testing
188
- - Code review
189
- - Deploy to staging
190
- ```
191
-
192
- ---
193
-
194
- ## Review Checklist
195
-
196
- Before finalizing plan:
197
- - [ ] All requirements captured
198
- - [ ] Tasks are SMART
199
- - [ ] Dependencies identified
200
- - [ ] Agents assigned
201
- - [ ] Risks documented
202
- - [ ] Success criteria defined
203
-
204
- ## Rules
205
-
206
- - **MUST** include a Success Criteria section with measurable, verifiable conditions — subjective criteria are not criteria
207
- - **MUST** include a Rollback Plan for any work that touches production data or shared infrastructure
208
- - **MUST** write a Pre-Mortem when estimated effort exceeds 1 day — "what could go wrong" surfaces real risks cheaply
209
- - **NEVER** estimate in hours for work longer than a week. Use T-shirt sizes (S/M/L/XL) or tracer-bullet slices — precise long-horizon estimates are false confidence
210
- - **CRITICAL**: every risk has an owner AND a mitigation. A risk register with named risks but no mitigations is decorative.
211
- - **MANDATORY**: explicit scope boundaries — "not in this plan" is as important as "in this plan"
212
-
213
- ## Gotchas
214
-
215
- - SMART criteria look complete but often omit the "relevant" dimension — a task can be Specific, Measurable, Achievable, Time-bound and still irrelevant to the outcome. Check relevance explicitly.
216
- - Pre-mortems feel pessimistic and get shortened under deadline pressure. Make the pre-mortem a first-class section with at least 5 named failure modes — a 2-bullet pre-mortem is theater.
217
- - Risk registers bloat when stakeholders add low-probability items to be safe. Cap the register at 10 risks ranked by (probability × impact); everything below line 10 is noise.
218
- - Plans authored by the person who will execute them are biased toward feasibility (they want to do it). Plans authored by someone who won't execute are biased toward ambition (they don't pay the cost). Mix both perspectives.
219
- - "Success criteria: deploy to production" is the weakest criterion — it measures effort, not outcome. Replace with user-facing or metric-based criteria ("20% reduction in p95 latency sustained for 7 days").
220
-
221
- ## When NOT to Use
222
-
223
- - For **actually generating** a plan with phases and task breakdown — use `/plan`
224
- - For requirements capture before planning — use `/write-a-prd`
225
- - For turning a plan into filed issues — use `/prd-to-issues`
226
- - For stress-testing a plan's assumptions — use `/grill-me`
227
- - For executing plans with agents — use `/orchestrate` or `/workflow`
228
- - For a single-step fix that does not warrant a document — skip the plan entirely
@@ -1,64 +0,0 @@
1
- ---
2
- name: search
3
- description: "Searches the KB with semantic + hybrid modes. Triggers: search KB, semantic search, hybrid search, knowledge base query."
4
- user-invocable: true
5
- effort: medium
6
- argument-hint: "[query]"
7
- allowed-tools: Read, Grep, Glob
8
- ---
9
-
10
- # Knowledge Base Search
11
-
12
- $ARGUMENTS
13
-
14
- ## Search Methods
15
-
16
- ### Method 1: MCP Tools (requires rag-mcp MCP server)
17
-
18
- If the `rag-mcp` MCP server is configured, use these tools:
19
-
20
- | Tool | Best For | Speed |
21
- |------|----------|-------|
22
- | `smart_query` | Default (90% of queries), auto-routing | 2-4s |
23
- | `hybrid_search_kb` | Raw vector + text search | <1s |
24
- | `get_document` | Full document content | <1s |
25
- | `crag_search` | Vague queries (Corrective RAG) | 1-3s |
26
- | `multi_hop_search` | Complex multi-step reasoning | 20-30s |
27
-
28
- ```python
29
- # Primary search
30
- smart_query("your search query", limit=10)
31
-
32
- # Full document retrieval
33
- get_document(path="kb/reference/architecture.md")
34
- ```
35
-
36
- ### Method 2: Local File Search (fallback, always available)
37
-
38
- If MCP tools are unavailable, use built-in tools:
39
-
40
- ```
41
- # Search file contents
42
- Grep: pattern="your query" path="kb/"
43
-
44
- # Search file names
45
- Glob: pattern="kb/**/*.md"
46
-
47
- # Read specific document
48
- Read: "kb/reference/architecture.md"
49
- ```
50
-
51
- ## Search Tips
52
-
53
- 1. **Be specific** - "nginx rate limiting" > "rate limiting"
54
- 2. **Try MCP first**, fall back to Grep/Glob if unavailable
55
- 3. **Use multi-hop** for "compare X with Y" questions (MCP only)
56
- 4. **Always cite sources**: `[PATH: kb/reference/doc.md]`
57
-
58
- ## Examples
59
-
60
- ```
61
- /search rate limiting configuration
62
- /search how to deploy to production
63
- /search database migration patterns
64
- ```
@@ -1,63 +0,0 @@
1
- ---
2
- name: teams
3
- description: "Launches multi-agent teams for review, debugging, feature dev, security audits, migrations. Triggers: multi-agent workflow, agent teams, team review, parallel agent collaboration."
4
- effort: max
5
- user-invocable: true
6
- argument-hint: "<preset> [task-description]"
7
- allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent, TeamCreate, TeamDelete, SendMessage, TaskCreate, TaskList, TaskUpdate, TaskGet
8
- ---
9
-
10
- # /teams: Agent Teams Presets
11
-
12
- $ARGUMENTS
13
-
14
- Launches a pre-configured Agent Teams composition for your task. Requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`.
15
-
16
- ## Available Presets
17
-
18
- | Preset | Agents | Use Case |
19
- |--------|--------|----------|
20
- | `review` | code-reviewer, security-auditor, performance-optimizer | PR code review |
21
- | `debug` | debugger, backend-specialist, incident-responder | Multi-file bug investigation |
22
- | `feature` | orchestrator, backend-specialist, frontend-specialist, test-engineer | Full feature implementation |
23
- | `fullstack` | backend-specialist, frontend-specialist, database-architect, devops-implementer | Full-stack task |
24
- | `research` | technical-researcher, data-analyst, prompt-engineer | Deep research task |
25
- | `security` | security-architect, security-auditor, backend-specialist | Security audit |
26
- | `migration` | database-architect, backend-specialist, devops-implementer | Database migration |
27
-
28
- See [reference/presets.md](reference/presets.md) for detailed ownership, aggregation strategies, and output formats for each preset.
29
-
30
- ## Usage
31
-
32
- ```
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
37
- ```
38
-
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
58
-
59
- ## Environment
60
-
61
- ```bash
62
- export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
63
- ```
@@ -1,52 +0,0 @@
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