@softspark/ai-toolkit 3.5.1 → 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 (36) hide show
  1. package/AGENTS.md +0 -5
  2. package/CHANGELOG.md +40 -0
  3. package/README.md +20 -9
  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/debug/SKILL.md +28 -0
  14. package/app/skills/explain/SKILL.md +1 -1
  15. package/app/skills/explore/SKILL.md +1 -1
  16. package/app/skills/index/SKILL.md +1 -1
  17. package/app/skills/mem-search/SKILL.md +1 -1
  18. package/app/skills/persona/SKILL.md +1 -1
  19. package/app/skills/plan/SKILL.md +22 -0
  20. package/app/skills/refactor-plan/SKILL.md +1 -1
  21. package/app/skills/research-mastery/SKILL.md +12 -0
  22. package/app/skills/swarm/SKILL.md +10 -5
  23. package/kb/procedures/release-verification-sop.md +1 -1
  24. package/kb/reference/codex-cli-compatibility.md +0 -1
  25. package/kb/reference/opencode-compatibility.md +1 -1
  26. package/kb/reference/skills-catalog.md +2 -13
  27. package/llms-full.txt +4 -21
  28. package/manifest.json +3 -3
  29. package/package.json +2 -2
  30. package/scripts/codex_skill_adapter.py +2 -7
  31. package/app/skills/debugging-tactics/SKILL.md +0 -136
  32. package/app/skills/hive-mind/SKILL.md +0 -57
  33. package/app/skills/plan-writing/SKILL.md +0 -228
  34. package/app/skills/search/SKILL.md +0 -64
  35. package/app/skills/teams/SKILL.md +0 -63
  36. package/app/skills/teams/reference/presets.md +0 -52
package/llms-full.txt CHANGED
@@ -92,7 +92,6 @@
92
92
  - **dart-rules**: Dart/Flutter coding rules: style, patterns, security, testing. Triggers: .dart, pubspec.yaml, Flutter, Riverpod, Bloc, widget, StatelessWidget, StatefulWidget.
93
93
  - **database-patterns**: DB schema design and query tuning: normalization, indexing, N+1, transactions, EXPLAIN. Triggers: schema, index, slow query, N+1, PostgreSQL, MySQL, EXPLAIN, deadlock, query plan.
94
94
  - **debug**: Systematic debugging via logs, health checks, hypothesis-driven investigation. Triggers: debug, error, trace root cause, fix bug, reproduce symptom, investigation.
95
- - **debugging-tactics**: RCA debugging: investigation, hypothesis, validation, fix. No fix without RCA. Triggers: bug, error, exception, stack trace, intermittent, flaky, crash, regression, broken after.
96
95
  - **deploy**: Deploys with pre-flight checks and health verification. Triggers: deploy, deployment, ship, release, push to prod.
97
96
  - **design-an-interface**: Generates and compares parallel interface designs (Ousterhout 'Design It Twice'). Triggers: design API, interface options, compare modules, design it twice.
98
97
  - **design-engineering**: UI craftsmanship: animation rules, easing, micro-interactions, state polish. Triggers: animation, transition, ease-out, motion, micro-interaction, hover, loading state, UI polish.
@@ -111,7 +110,6 @@
111
110
  - **grill-me**: Stress-tests a plan via Socratic questioning down each decision branch. Triggers: stress-test, grill me, validate assumptions, challenge plan, socratic review.
112
111
  - **health**: Service/infra health via liveness/readiness checks, resource usage, quick diagnostics. Triggers: health check, services up, system status, infra health, degraded service.
113
112
  - **hipaa-validate**: HIPAA validator: PHI exposure, audit logging, encryption, access control, BAA refs. Triggers: HIPAA, PHI, healthcare compliance, audit log, BAA.
114
- - **hive-mind**: Multi-agent swarm: consensus voting, aggregation, file ownership, map-reduce. Triggers: swarm, hive mind, multi-agent, consensus, parallel agents, agent voting.
115
113
  - **hook-creator**: Create new Claude Code lifecycle hook (PreToolUse/PostToolUse/Stop/SessionStart) with bash + hooks.json. Triggers: create hook, lifecycle hook, PreToolUse, PostToolUse, hook event.
116
114
  - **index**: Reindexes KB for semantic search via vector store (Qdrant). Triggers: reindex KB, rebuild index, vector reindex, refresh embeddings.
117
115
  - **instinct-review**: Reviews/promotes/removes instincts from `.claude/instincts/*.md`. Triggers: instinct review, curate instincts, manage instincts, promote instinct.
@@ -138,7 +136,6 @@
138
136
  - **persona**: Switches engineering persona at runtime. Triggers: persona, switch role, backend-lead, frontend-lead, devops-eng, junior-dev.
139
137
  - **php-rules**: PHP coding rules: style, patterns, security, testing. Triggers: .php, composer.json, Laravel, Symfony, PHPUnit, PSR-12, Composer.
140
138
  - **plan**: Breaks features/goals into phased plans with task lists, agent assignments, dependencies. Triggers: plan feature, implementation roadmap, break down task, project phases.
141
- - **plan-writing**: Implementation plans + pre-mortems: phases, success criteria, risks, rollback. Triggers: implementation plan, pre-mortem, phased plan, task breakdown.
142
139
  - **plugin-creator**: Creates opt-in plugin packs with manifests + module scaffolding for Claude/Codex. Triggers: new plugin, plugin pack, plugin scaffold.
143
140
  - **pr**: Creates GitHub PR after pre-flight checks (lint/typecheck/tests), structured summary from commits. Triggers: pr, pull request, create PR, ready to merge.
144
141
  - **prd-to-issues**: Splits a PRD into vertical-slice GitHub issues with HITL/AFK tagging and dependencies. Triggers: PRD to issues, create tickets, break down PRD, work items.
@@ -158,7 +155,6 @@
158
155
  - **ruby-rules**: Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.
159
156
  - **rust-patterns**: Rust: ownership, lifetimes, async (Tokio), Result/anyhow/thiserror, traits, unsafe. Triggers: Rust, borrow checker, lifetime, Tokio, cargo, trait, impl, Result, unsafe, clippy.
160
157
  - **rust-rules**: Rust coding rules: style, patterns, security, testing. Triggers: .rs, Cargo.toml, Cargo.lock, Tokio, Axum, Serde, clippy, cargo test.
161
- - **search**: Searches the KB with semantic + hybrid modes. Triggers: search KB, semantic search, hybrid search, knowledge base query.
162
158
  - **security-patterns**: App security: OWASP, authN/authZ, input validation, secrets, TLS, CSRF/XSS/SQLi, JWT, CSP. Triggers: security, OWASP, auth, JWT, CSRF, XSS, SQL injection, secrets, TLS, CSP, CORS.
163
159
  - **seo-validate**: SEO validator: meta/OG, Schema.org, hreflang, Core Web Vitals, crawlability. Triggers: SEO, meta tags, Schema.org, hreflang, LCP, INP, CLS, Core Web Vitals, sitemap, crawlability.
164
160
  - **skill-audit**: Scans skills/agents for security risks: dangerous patterns, secrets, excessive perms. Triggers: skill audit, security scan, agent audit, dangerous pattern.
@@ -168,7 +164,6 @@
168
164
  - **swift-patterns**: Swift/iOS: SwiftUI, Combine, async/await, actors, SPM, Core Data, UIKit interop. Triggers: Swift, SwiftUI, Combine, iOS, Xcode, actor, Core Data, @MainActor, @State.
169
165
  - **swift-rules**: Swift coding rules: style, patterns, security, testing. Triggers: .swift, Package.swift, .xcodeproj, SwiftUI, Combine, async/await, XCTest.
170
166
  - **tdd**: TDD with red-green-refactor loop and vertical slices. Triggers: TDD, test-first, red-green-refactor, test driving development.
171
- - **teams**: Launches multi-agent teams for review, debugging, feature dev, security audits, migrations. Triggers: multi-agent workflow, agent teams, team review, parallel agent collaboration.
172
167
  - **test**: Runs project test suite with coverage, auto-detects framework (pytest, vitest, jest, flutter, go, cargo, phpunit). Triggers: run tests, test suite, coverage report.
173
168
  - **testing-patterns**: Testing strategy: pyramid, AAA, mocks/fakes/stubs, flaky tests, coverage. Triggers: test, fixture, mock, stub, e2e, TDD, Playwright, Cypress, flaky, coverage, property-based.
174
169
  - **triage-issue**: Bug triage: explores codebase for root cause, files GitHub issue with TDD fix plan. Triggers: triage, investigate bug, fix plan, root cause, file issue, bug report.
@@ -5453,7 +5448,7 @@ python3 scripts/audit_skills.py --ci
5453
5448
  **Verify audit_skills.py:**
5454
5449
  - [ ] `HIGH: 0` (MUST be zero — CI fails otherwise)
5455
5450
  - [ ] `WARN: 0`
5456
- - [ ] `INFO: N` (acceptable — broad-access skills: orchestrate, swarm, teams)
5451
+ - [ ] `INFO: N` (acceptable — broad-access skills: orchestrate, swarm, workflow)
5457
5452
 
5458
5453
  ---
5459
5454
 
@@ -7007,7 +7002,6 @@ The main adapted group is multi-agent orchestration:
7007
7002
  - `/orchestrate`
7008
7003
  - `/workflow`
7009
7004
  - `/swarm`
7010
- - `/teams`
7011
7005
  - `/subagent-development`
7012
7006
 
7013
7007
  The adapter also covers skills that previously depended only on Claude's
@@ -10650,7 +10644,7 @@ User-authored opencode files and user-authored `opencode.json` keys are never de
10650
10644
  ## Behavioral Limits
10651
10645
 
10652
10646
  - opencode does not expose the full Claude hook event surface; only the events in the mapping table above are bridged. Claude-only events (`TaskCompleted`, `TeammateIdle`, `SubagentStart`, `SubagentStop`, `PreCompact`) are silently skipped.
10653
- - Multi-agent orchestration skills (`/orchestrate`, `/workflow`, `/swarm`, `/teams`, `/subagent-development`) run through the Codex adaptation layer — they use opencode subagents and explicit file ownership instead of Claude's `Agent`/`TaskCreate` primitives.
10647
+ - Multi-agent orchestration skills (`/orchestrate`, `/workflow`, `/swarm`, `/subagent-development`) run through the Codex adaptation layer — they use opencode subagents and explicit file ownership instead of Claude's `Agent`/`TaskCreate` primitives.
10654
10648
 
10655
10649
  ## Verification
10656
10650
 
@@ -10997,7 +10991,7 @@ All functionality is unified under skills. Task and hybrid skills are user-invoc
10997
10991
  | **2 — Multi-agent workflow** | `/workflow <type>` | Cross-cutting task with known pattern |
10998
10992
  | **3 — Custom parallelism** | `/orchestrate`, `/swarm` | No predefined workflow matches |
10999
10993
 
11000
- ## Task Skills (32)
10994
+ ## Task Skills (30)
11001
10995
 
11002
10996
  Task skills execute a specific action. Invoked via slash commands. `disable-model-invocation: true`.
11003
10997
 
@@ -11050,13 +11044,11 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
11050
11044
  | **analyze** | `/analyze` | medium | Analyze code quality, complexity, and patterns |
11051
11045
  | **cve-scan** | `/cve-scan` | medium | Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, ruby, dart) |
11052
11046
  | **docs** | `/docs` | high | Generate/update docs: README, API docs, architecture notes, changelogs (Tier 1 — single agent) |
11053
- | **search** | `/search` | medium | Search knowledge base (MCP tools with local fallback) |
11054
11047
  | **explain** | `/explain` | medium | Explain architecture of a file/module using Mermaid diagrams |
11055
11048
  | **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3, native in Claude, Codex-adapted to `spawn_agent` workflows |
11056
11049
  | **swarm** | `/swarm` | max | Massive parallelism: map-reduce, consensus, relay — Tier 3 |
11057
11050
  | **workflow** | `/workflow` | max | 15 predefined multi-agent workflow types — Tier 2, Codex-adapted to native subagent orchestration |
11058
11051
  | **instinct-review** | `/instinct-review` | low | Review, curate, and manage learned instincts from past sessions |
11059
- | **teams** | `/teams` | max | Launch pre-configured Agent Teams compositions for common workflows |
11060
11052
  | **write-a-prd** | `/write-a-prd` | high | Create PRD through interactive interview, codebase exploration, and module design |
11061
11053
  | **prd-to-plan** | `/prd-to-plan` | high | Convert PRD into phased implementation plan using tracer-bullet vertical slices |
11062
11054
  | **tdd** | `/tdd` | high | Test-driven development with red-green-refactor loop and vertical slices |
@@ -11137,24 +11129,16 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
11137
11129
  | **content-moderation-patterns** | `skills/content-moderation-patterns/` | Two-stage moderation: pre-filter + LLM classifier; categories; thresholds |
11138
11130
  | **model-routing-patterns** | `skills/model-routing-patterns/` | Haiku/Sonnet/Opus routing; escalation; sub-agent delegation; fallback |
11139
11131
 
11140
- ## Knowledge Skills - Process (7)
11132
+ ## Knowledge Skills - Process (5)
11141
11133
 
11142
11134
  | Skill | Directory | Domain |
11143
11135
  |-------|-----------|--------|
11144
- | **plan-writing** | `skills/plan-writing/` | Implementation plans, success criteria, pre-mortem |
11145
- | **debugging-tactics** | `skills/debugging-tactics/` | Iron Law 4-phase debugging: root cause → pattern → hypothesis → fix |
11146
11136
  | **git-mastery** | `skills/git-mastery/` | Git workflows, branching, conflict resolution |
11147
11137
  | **architecture-decision** | `skills/architecture-decision/` | Architecture notes, trade-off analysis, alternatives |
11148
11138
  | **performance-profiling** | `skills/performance-profiling/` | Profiling, bottleneck analysis, optimization |
11149
11139
  | **research-mastery** | `skills/research-mastery/` | Multi-source research, synthesis, fact-checking |
11150
11140
  | **verification-before-completion** | `skills/verification-before-completion/` | Iron Law: evidence-before-claims, no completion without fresh verification |
11151
11141
 
11152
- ## Knowledge Skills - Orchestration (1)
11153
-
11154
- | Skill | Directory | Domain |
11155
- |-------|-----------|--------|
11156
- | **hive-mind** | `skills/hive-mind/` | Multi-agent aggregation, consensus, swarm patterns |
11157
-
11158
11142
  ## Quality Guardrails
11159
11143
 
11160
11144
  ### Anti-Rationalization Tables
@@ -11246,7 +11230,6 @@ Common adapted skills:
11246
11230
  - `/orchestrate`
11247
11231
  - `/workflow`
11248
11232
  - `/swarm`
11249
- - `/teams`
11250
11233
  - `/subagent-development`
11251
11234
  - `/tdd`
11252
11235
 
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.5.1",
2
+ "version": "4.0.0",
3
3
  "components": {
4
4
  "agents": {
5
5
  "description": "44 specialized agents (orchestrator, backend, frontend, security, devops, etc.)",
@@ -9,7 +9,7 @@
9
9
  "tags": ["core", "agents"]
10
10
  },
11
11
  "skills": {
12
- "description": "112 skills (32 task + 31 hybrid + 49 knowledge)",
12
+ "description": "107 skills (30 task + 31 hybrid + 46 knowledge)",
13
13
  "path": "app/skills",
14
14
  "target": ".claude/skills",
15
15
  "type": "symlink",
@@ -90,7 +90,7 @@
90
90
  "default": true
91
91
  },
92
92
  "skills": {
93
- "description": "112 skills (task, hybrid, knowledge)",
93
+ "description": "107 skills (task, hybrid, knowledge)",
94
94
  "default": true
95
95
  },
96
96
  "rules-common": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "3.5.1",
4
- "description": "AI coding toolkit: 112 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.",
3
+ "version": "4.0.0",
4
+ "description": "AI coding toolkit: 107 skills, 44 agents, 12-editor write-through (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex, opencode), machine-enforced safety constitution, SARIF audit, signed npm provenance.",
5
5
  "keywords": [
6
6
  "claude",
7
7
  "claude-code",
@@ -98,7 +98,7 @@ def build_codex_skill_text(skill_file: Path) -> str:
98
98
 
99
99
  if adapted:
100
100
  frontmatter = _adapt_frontmatter(frontmatter)
101
- body = _adapt_body(skill_file.parent.name, body)
101
+ body = _adapt_body(body)
102
102
 
103
103
  rendered_frontmatter = _render_frontmatter(frontmatter)
104
104
  return f"---\n{rendered_frontmatter}\n---\n{body.rstrip()}\n"
@@ -221,7 +221,7 @@ def _adapt_allowed_tools(value: str) -> list[str]:
221
221
  return tools
222
222
 
223
223
 
224
- def _adapt_body(skill_name: str, body: str) -> str:
224
+ def _adapt_body(body: str) -> str:
225
225
  body = body.replace(
226
226
  "## MANDATORY: You MUST use the Agent tool",
227
227
  "## MANDATORY: Use Codex subagents for delegation",
@@ -258,11 +258,6 @@ def _adapt_body(skill_name: str, body: str) -> str:
258
258
  if "$ARGUMENTS" in body:
259
259
  body = body.replace("$ARGUMENTS", f"$ARGUMENTS\n{_CODEX_NOTE.rstrip()}", 1)
260
260
 
261
- if skill_name == "teams":
262
- body = body.replace(
263
- "Launches a pre-configured Agent Teams composition for your task.",
264
- "Launches a pre-configured Codex subagent composition for your task.",
265
- )
266
261
  return body
267
262
 
268
263
 
@@ -1,136 +0,0 @@
1
- ---
2
- name: debugging-tactics
3
- description: "RCA debugging: investigation, hypothesis, validation, fix. No fix without RCA. Triggers: bug, error, exception, stack trace, intermittent, flaky, crash, regression, broken after."
4
- effort: medium
5
- user-invocable: false
6
- allowed-tools: Grep, Read
7
- ---
8
-
9
- # Debugging Tactics Skill
10
-
11
- ## The Iron Law
12
-
13
- ```
14
- NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
15
- ```
16
-
17
- If you haven't completed Phase 1 (Root Cause Investigation), you cannot propose fixes.
18
-
19
- Random fixes waste time and create new bugs. Quick patches mask underlying issues.
20
-
21
- **Violating the letter of this process is violating the spirit of debugging.**
22
-
23
- ## The Four Phases
24
-
25
- You MUST complete each phase before proceeding to the next.
26
-
27
- ### Phase 1: Root Cause Investigation
28
-
29
- **BEFORE attempting ANY fix:**
30
-
31
- 1. **Read Error Messages Carefully**
32
- - Don't skip past errors or warnings — they often contain the answer
33
- - Read stack traces completely
34
- - Note line numbers, file paths, error codes
35
-
36
- 2. **Reproduce Consistently**
37
- - Can you trigger it reliably?
38
- - What are the exact steps?
39
- - If not reproducible, gather more data — don't guess
40
-
41
- 3. **Check Recent Changes**
42
- - `git diff`, recent commits, new dependencies
43
- - Config changes, environmental differences
44
-
45
- 4. **Gather Evidence in Multi-Component Systems**
46
- For each component boundary: log what enters, log what exits, verify state at each layer.
47
- Run once to gather evidence showing WHERE it breaks, THEN investigate that specific component.
48
-
49
- 5. **Trace Data Flow**
50
- Where does the bad value originate? Trace backward through call stack to the source. Fix at source, not at symptom.
51
-
52
- ### Phase 2: Pattern Analysis
53
-
54
- 1. **Find Working Examples** — locate similar working code in same codebase
55
- 2. **Compare Against References** — read reference implementations COMPLETELY, not skimming
56
- 3. **Identify Differences** — list every difference, however small
57
- 4. **Understand Dependencies** — what other components, settings, config does this need?
58
-
59
- ### Phase 3: Hypothesis and Testing
60
-
61
- 1. **Form Single Hypothesis** — "I think X is the root cause because Y" (be specific)
62
- 2. **Test Minimally** — smallest possible change, one variable at a time
63
- 3. **Verify Before Continuing** — did it work? If not, form NEW hypothesis. Don't add more fixes on top.
64
-
65
- ### Phase 4: Implementation
66
-
67
- 1. **Create Failing Test Case** — MUST have before fixing (use TDD skill)
68
- 2. **Implement Single Fix** — address root cause, ONE change at a time, no "while I'm here" improvements
69
- 3. **Verify Fix** — test passes? No regressions? Issue resolved?
70
- 4. **If Fix Doesn't Work** — count your attempts:
71
- - If < 3: Return to Phase 1, re-analyze with new information
72
- - **If >= 3: STOP and question the architecture** (see below)
73
-
74
- ### Architecture Escalation (3+ Failed Fixes)
75
-
76
- **Pattern indicating architectural problem:**
77
- - Each fix reveals new shared state/coupling in different places
78
- - Fixes require "massive refactoring" to implement
79
- - Each fix creates new symptoms elsewhere
80
-
81
- **STOP and question fundamentals:**
82
- - Is this pattern fundamentally sound?
83
- - Should we refactor architecture vs. continue fixing symptoms?
84
- - Discuss with user before attempting more fixes
85
-
86
- This is NOT a failed hypothesis — this is a wrong architecture.
87
-
88
- ## Red Flags — STOP and Follow Process
89
-
90
- | Excuse | Reality |
91
- |--------|---------|
92
- | "Quick fix for now, investigate later" | Systematic is faster than thrashing |
93
- | "Just try changing X and see" | One variable at a time, with hypothesis |
94
- | "I'll skip the test, I'll manually verify" | Untested fixes don't stick |
95
- | "It's probably X, let me fix that" | Seeing symptoms is not understanding root cause |
96
- | "One more fix attempt" (after 2+) | 3+ failures = architectural problem. STOP. |
97
- | "Here are the main problems: [list]" | You're proposing fixes without investigation |
98
-
99
- ## Legacy Reference
100
-
101
- ## Language-Specific Tactics
102
-
103
- ### Python
104
- - **Debugger**: `import pdb; pdb.set_trace()` (or `ipdb`)
105
- - **Trace**: `traceback.print_stack()`
106
- - **Memory**: `tracemalloc` for leaks.
107
- ```python
108
- import tracemalloc
109
- tracemalloc.start()
110
- # ... code ...
111
- snapshot = tracemalloc.take_snapshot()
112
- top_stats = snapshot.statistics('lineno')
113
- ```
114
-
115
- ### Node.js / TypeScript
116
- - **Debugger**: `node --inspect-brk app.js` -> Open `chrome://inspect`.
117
- - **Memory**: `heapdump` or built-in inspector.
118
- - **Async Traces**: Ensure `Error.stackTraceLimit = Infinity`.
119
-
120
- ### PHP (Laravel/Symfony)
121
- - **Debugger**: Xdebug (`xdebug_break()`).
122
- - **Logs**: `Log::info('State:', $data);`.
123
- - **Query Log**: `DB::enableQueryLog(); ... dd(DB::getQueryLog());`.
124
-
125
- ### Flutter / Dart
126
- - **Debugger**: `debugger()` statement.
127
- - **Inspector**: Flutter DevTools (Widget Inspector).
128
- - **Network**: Network tab in DevTools for API calls.
129
-
130
- ## "5 Whys" Root Cause Analysis
131
- Ask "Why?" 5 times to find the real issue:
132
- - "The app crashed." -> Why? -> "Null pointer exception."
133
- - -> Why? -> "User object was null."
134
- - -> Why? -> "API returned 404."
135
- - -> Why? -> "User ID was invalid."
136
- - -> Why? -> "Frontend validation allowed negative IDs." (ROOT CAUSE)
@@ -1,57 +0,0 @@
1
- ---
2
- name: hive-mind
3
- description: "Multi-agent swarm: consensus voting, aggregation, file ownership, map-reduce. Triggers: swarm, hive mind, multi-agent, consensus, parallel 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. Triggers: implementation plan, pre-mortem, phased plan, task breakdown."
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
- ```