@rune-kit/rune 2.2.4 → 2.2.6

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.
@@ -3,7 +3,7 @@ name: fix
3
3
  description: Apply code changes and fixes. Writes implementation code, applies bug fixes, and verifies changes with tests. Core action hub in the development mesh.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.4.0"
6
+ version: "0.5.0"
7
7
  layer: L2
8
8
  model: sonnet
9
9
  group: development
@@ -97,6 +97,32 @@ Confirm the change works and nothing is broken.
97
97
  - If project has a type-check command, run it via `Bash`
98
98
  - If project has a lint command, run it via `Bash`
99
99
 
100
+ ### Step 4.5: Quality Decay Check (Self-Regulation)
101
+
102
+ When fix is called repeatedly (e.g., by cook Phase 4, or iterative fix loops), track a **WTF-likelihood score** — the probability that continued fixing is making things worse.
103
+
104
+ **Compute every 3 fix attempts** (or when called 5+ times in a single cook session):
105
+
106
+ | Signal | Score Adjustment |
107
+ |--------|-----------------|
108
+ | A fix was reverted (any test that passed now fails) | +15% |
109
+ | Fix touched >3 files (blast radius expanding) | +5% per extra file beyond 3 |
110
+ | 15+ fixes already applied in this session | +1% per fix beyond 15 |
111
+ | All remaining issues are LOW severity | +10% |
112
+ | Fix touched files outside the original diagnosis scope | +20% |
113
+ | Consecutive fixes without running tests between them | +10% |
114
+
115
+ **Thresholds:**
116
+ - **>20% WTF-likelihood**: STOP fixing. Report current state to cook/user with: "Quality decay detected — continued fixes risk introducing more bugs than they resolve. {N} fixes applied, {score}% risk. Recommend: commit current progress, re-assess remaining issues."
117
+ - **Hard cap: 30 fixes per session** — regardless of score. After 30, STOP and report.
118
+
119
+ **Reset conditions:** WTF-likelihood resets to 0% when:
120
+ - User explicitly says "continue fixing"
121
+ - A full test suite run shows zero regressions
122
+ - Scope is narrowed to a single file
123
+
124
+ > Source: garrytan/gstack v0.9.0 (qa skill) — prevents runaway fix loops where each fix introduces new risk.
125
+
100
126
  ### Step 5: Post-Fix Hardening (Defense-in-Depth)
101
127
 
102
128
  After the fix works, make the bug **structurally impossible** — not just "fixed this time."
@@ -207,6 +233,7 @@ Known failure modes for this skill. Check these before declaring done.
207
233
  | Fixing at crash site without tracing data origin | HIGH | Defense-in-depth: trace where bad data ORIGINATES, add validation at every layer it passes through |
208
234
  | Single-point validation (fix one spot, hope it holds) | MEDIUM | Step 5: add entry + business logic + environment + debug layers for data-flow bugs |
209
235
  | Removing debug instrumentation before fix is verified | MEDIUM | Step 5b: preserve `#region agent-debug` markers until all tests pass — premature cleanup erases failure history |
236
+ | Runaway fix loop — 20+ fixes without checking quality decay | HIGH | Step 4.5: WTF-likelihood self-regulation. >20% risk = STOP. Hard cap 30 fixes/session. Each fix adds risk — diminishing returns after ~15 |
210
237
 
211
238
  ## Done When
212
239
 
@@ -3,7 +3,7 @@ name: git
3
3
  description: Specialized git operations — semantic commits, PR descriptions, branch management, conflict resolution guidance. Replaces ad-hoc git commands with a dedicated, convention-aware utility.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L3
8
8
  model: haiku
9
9
  group: utility
@@ -27,6 +27,7 @@ Specialized git operations utility. Handles semantic commits, PR descriptions, b
27
27
  - `/rune git pr` — manual PR generation
28
28
  - `/rune git branch <description>` — generate branch name
29
29
  - `/rune git changelog` — generate changelog from commits
30
+ - `/rune git release <version>` — create tagged release with changelog
30
31
 
31
32
  ## Calls (outbound)
32
33
 
@@ -187,6 +188,49 @@ Group commits by conventional commit type. Format as [Keep a Changelog](https://
187
188
 
188
189
  Link to PRs/issues when references found in commit messages.
189
190
 
191
+ ### Release Mode
192
+
193
+ Create a version tag with release artifacts.
194
+
195
+ **Triggers:**
196
+ - `/rune git release <version>` — create release for specified version
197
+ - Called by `launch` (L1) during release pipeline
198
+ - Called by `deploy` (L2) after successful production deploy
199
+
200
+ #### Step 1 — Validate Version
201
+
202
+ Parse version string. Must follow semver (`major.minor.patch`):
203
+ - Breaking changes → major bump
204
+ - New features → minor bump
205
+ - Bug fixes → patch bump
206
+
207
+ Check `git tag -l` to ensure version doesn't already exist.
208
+
209
+ #### Step 2 — Generate Release Artifacts
210
+
211
+ 1. **Changelog**: Run Changelog Mode to generate entries since last tag
212
+ 2. **Version bump**: Update version in `package.json`, `pyproject.toml`, `Cargo.toml`, or equivalent
213
+ 3. **Release notes**: Summarize changes for GitHub Release body
214
+
215
+ #### Step 3 — Tag and Push
216
+
217
+ ```bash
218
+ git add <version-files>
219
+ git commit -m "chore: bump version to v<version>"
220
+ git tag -a v<version> -m "Release v<version>"
221
+ git push origin master --tags
222
+ ```
223
+
224
+ #### Step 4 — Create GitHub Release
225
+
226
+ ```bash
227
+ gh release create v<version> --title "v<version>" --notes "<release-notes>"
228
+ ```
229
+
230
+ #### Step 5 — Notify
231
+
232
+ If deploy reports customer email list available (via rune-pay `/admin/emails`), flag for notification.
233
+
190
234
  ## Output Format
191
235
 
192
236
  ### Commit Mode
@@ -235,6 +279,16 @@ Examples: `feat/jwt-refresh`, `fix/123-login-crash`, `refactor/auth-module`
235
279
  - Change description (#PR)
236
280
  ```
237
281
 
282
+ ### Release Mode
283
+ ```
284
+ ## Release: v<version>
285
+ - **Tag**: v<version>
286
+ - **Commits**: [count] since last release
287
+ - **Changelog**: [path to CHANGELOG.md]
288
+ - **GitHub Release**: [URL]
289
+ - **Artifacts**: version bump, changelog, tag, release
290
+ ```
291
+
238
292
  ## Constraints
239
293
 
240
294
  1. MUST use conventional commit format — no freeform messages
@@ -3,7 +3,7 @@ name: journal
3
3
  description: Persistent state tracking and Architecture Decision Records across sessions. Manages progress state, module health, dependency graphs, and ADRs for any workflow.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L3
8
8
  model: haiku
9
9
  group: state
@@ -43,6 +43,7 @@ None — pure L3 state management utility.
43
43
  .rune/module-status.json — Machine-readable module states
44
44
  .rune/dependency-graph.mmd — Mermaid diagram, color-coded by health
45
45
  .rune/adr/ — Architecture Decision Records (one per decision)
46
+ .rune/risks/ — Risk Register entries (one per identified risk)
46
47
  ```
47
48
 
48
49
  ## Execution
@@ -111,6 +112,50 @@ For each architectural decision or trade-off made during this session (applies t
111
112
  - **[Alternative B]**: Rejected because [specific reason]. May reconsider if [condition changes].
112
113
  ```
113
114
 
115
+ ### Step 3.5 — Record risks
116
+
117
+ For each risk identified during the session (technical, schedule, dependency, security):
118
+
119
+ 1. Generate a risk filename: `.rune/risks/RISK-[NNN]-[slug].md` where NNN is next sequential number
120
+ 2. Use `Write` to create the risk file:
121
+
122
+ ```markdown
123
+ # RISK-[NNN]: [Risk Title]
124
+
125
+ **Date Identified**: [YYYY-MM-DD]
126
+ **Identified By**: [workflow — cook | plan | deploy | audit | adversary]
127
+ **Severity**: Critical | High | Medium | Low
128
+ **Likelihood**: High | Medium | Low
129
+ **Status**: Open | Mitigated | Accepted | Closed
130
+
131
+ ## Description
132
+ [What could go wrong — specific scenario, not vague "things might break"]
133
+
134
+ ## Impact
135
+ [What happens if this risk materializes — quantify if possible]
136
+
137
+ ## Mitigation
138
+ [Actions to reduce likelihood or impact]
139
+ - [ ] [Action 1 — owner, deadline]
140
+ - [ ] [Action 2]
141
+
142
+ ## Trigger Conditions
143
+ [How to detect this risk is materializing — monitoring, alerts, symptoms]
144
+
145
+ ## Contingency
146
+ [What to do if risk materializes despite mitigation — the Plan B]
147
+ ```
148
+
149
+ 3. **Risk classification matrix**:
150
+
151
+ | Likelihood \ Severity | Critical | High | Medium | Low |
152
+ |----------------------|----------|------|--------|-----|
153
+ | **High** | 🔴 Immediate action | 🔴 This sprint | 🟡 This quarter | ⚪ Backlog |
154
+ | **Medium** | 🔴 This sprint | 🟡 This quarter | ⚪ Backlog | ⚪ Accept |
155
+ | **Low** | 🟡 This quarter | ⚪ Backlog | ⚪ Accept | ⚪ Accept |
156
+
157
+ 4. Risks marked 🔴 MUST have mitigation actions with deadlines. ⚪ Accept = documented acknowledgment, no action required.
158
+
114
159
  ### Step 4 — Update dependency graph
115
160
 
116
161
  If any module dependencies changed during this session (new imports, removed dependencies, refactored interfaces):
@@ -145,6 +190,7 @@ Emit the journal update summary to the calling skill.
145
190
  - **Module**: [current module]
146
191
  - **Health**: [before] → [after]
147
192
  - **ADRs Written**: [count]
193
+ - **Risks Logged**: [count] ([severity breakdown])
148
194
  - **Files Updated**: [list of .rune/ files modified]
149
195
  - **Next Module**: [next in queue, or "rescue complete"]
150
196
  ```
@@ -154,8 +200,9 @@ Emit the journal update summary to the calling skill.
154
200
  ```
155
201
  1. Read .rune/RESCUE-STATE.md → full rescue history
156
202
  2. Read .rune/module-status.json → module states and health scores
157
- 3. Read git log latest changes since last session
158
- 4. Read CLAUDE.md project conventions
203
+ 3. Read .rune/risks/ open risks and their status
204
+ 4. Read git log latest changes since last session
205
+ 5. Read CLAUDE.md → project conventions
159
206
  → Result: Zero context loss across rescue sessions
160
207
  ```
161
208
 
@@ -180,6 +227,7 @@ Known failure modes for this skill. Check these before declaring done.
180
227
  ## Done When
181
228
 
182
229
  - All decisions from the session recorded as ADR files with rationale
230
+ - All identified risks recorded as RISK files with severity, mitigation, and trigger conditions
183
231
  - Progress state updated (module status, phase, or deploy event as appropriate)
184
232
  - Dependency graph updated if module relationships changed
185
233
  - Journal Update summary emitted to calling skill
@@ -3,7 +3,7 @@ name: plan
3
3
  description: Create structured implementation plans from requirements. Produces master plan + phase files for enterprise-scale project management. Master plan = overview (<80 lines). Phase files = execution detail (<150 lines each). Each session handles 1 phase. Uses opus for deep reasoning.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.6.0"
6
+ version: "0.9.0"
7
7
  layer: L2
8
8
  model: opus
9
9
  group: creation
@@ -101,10 +101,25 @@ High-level multi-feature planning — organize features into milestones.
101
101
  - `skill-forge` (L2): plan structure for new skill
102
102
  - User: `/rune plan` direct invocation
103
103
 
104
- ## Cross-Hub Connections
104
+ ## Data Flow
105
+
106
+ ### Feeds Into →
107
+
108
+ - `cook` (L1): master plan + phase files → cook's Phase 2-4 execution roadmap
109
+ - `team` (L1): task decomposition + wave grouping → team's parallel workstream dispatch
110
+ - `fix` (L2): phase file tasks → fix's implementation targets
111
+ - `test` (L2): phase file test tasks → test's RED phase targets
112
+
113
+ ### Fed By ←
114
+
115
+ - `ba` (L2): Requirements Document → plan's primary input (locked decisions, user stories)
116
+ - `scout` (L2): codebase analysis → plan's convention/pattern awareness
117
+ - `neural-memory` (external): past architectural decisions → plan's precedent context
105
118
 
106
- - `plan` `brainstorm` — bidirectional: plan asks brainstorm for options, brainstorm asks plan for structure
107
- - `ba` → `plan` — BA produces Requirements Document, plan consumes it as primary input
119
+ ### Feedback Loops
120
+
121
+ - `plan` ↔ `brainstorm`: plan requests options when multiple approaches exist → brainstorm generates options → plan selects and structures the chosen approach
122
+ - `plan` ↔ `cook`: cook discovers plan gaps during implementation → plan updates phase files → cook resumes with corrected tasks
108
123
 
109
124
  ## Executable Steps (Implementation Mode)
110
125
 
@@ -321,6 +336,7 @@ function validateInput(raw: unknown): TradeEntry[]; // throws ValidationError
321
336
  Each task MUST include: **File** (exact path), **Test** (test file or N/A), **Verify** (shell command), **Commit** (semantic message). Granularity: 2-5 min per task. If >10min, decompose.
322
337
 
323
338
  - [ ] Task 1 — Create calculateProfit function
339
+ - Req: REQ-001 (P&L calculation)
324
340
  - File: `src/foo/bar.ts` (new)
325
341
  - Test: `tests/foo/bar.test.ts` (new)
326
342
  - Verify: `npm test -- --grep "calculateProfit"`
@@ -328,12 +344,14 @@ Each task MUST include: **File** (exact path), **Test** (test file or N/A), **Ve
328
344
  - Logic: sum entries by side, apply fees (0.1% per trade), return net P&L
329
345
  - Edge: empty array → return { netPnL: 0, totalFees: 0, winRate: 0 }
330
346
  - [ ] Task 2 — Add input validation
347
+ - Req: REQ-002 (input validation)
331
348
  - File: `src/foo/baz.ts` (modify)
332
349
  - Test: `tests/foo/baz.test.ts` (new)
333
350
  - Verify: `npm test -- --grep "validateInput"`
334
351
  - Commit: `feat(trading): add input validation for trade entries`
335
352
  - Logic: check side is 'long'|'short', prices > 0, quantity > 0
336
353
  - [ ] Task 3 — Write integration tests
354
+ - Req: REQ-001, REQ-002 (integration coverage)
337
355
  - File: `tests/foo/bar.test.ts` (modify)
338
356
  - Test: N/A — this IS the test task
339
357
  - Verify: `npm test -- --grep "trading" && npx tsc --noEmit`
@@ -382,6 +400,14 @@ Each task MUST include: **File** (exact path), **Test** (test file or N/A), **Ve
382
400
  - [ ] Performance: calculateProfit(10K entries) < 100ms
383
401
  - [ ] No `any` types, no mutation, no `toFixed()` for money
384
402
 
403
+ ## Traceability Matrix
404
+ | Req ID | Requirement | Task(s) | Test(s) | Status |
405
+ |--------|-------------|---------|---------|--------|
406
+ | REQ-001 | P&L calculation with fees | Task 1 | `tests/foo/bar.test.ts` | ⬚ |
407
+ | REQ-002 | Input validation | Task 2 | `tests/foo/baz.test.ts` | ⬚ |
408
+
409
+ Every requirement from BA's Requirements Document MUST appear in this matrix. Missing requirement = incomplete phase. `completion-gate` checks this matrix during verification.
410
+
385
411
  ## Files Touched
386
412
  - `src/foo/bar.ts` — new
387
413
  - `src/foo/baz.ts` — modify
@@ -400,17 +426,36 @@ Every phase file MUST include ALL of these sections (Amateur-Proof Checklist):
400
426
  6. ✅ Cross-Phase Context — what's assumed from prior phases, what's exported for future phases
401
427
  7. ✅ Acceptance Criteria — testable, includes performance if applicable
402
428
  8. ✅ Test tasks — every code task has corresponding tests
429
+ 9. ✅ Traceability Matrix — every BA requirement mapped to tasks and tests (skip if no BA requirements exist)
403
430
 
404
431
  A phase missing ANY of sections 1-7 is INCOMPLETE — the weakest coder will guess wrong.
405
432
  Performance Constraints section is optional (only when NFRs apply).
406
433
  </HARD-GATE>
407
434
 
435
+ ### Step 5.5 — Completeness Scoring (Alternatives)
436
+
437
+ When presenting alternative approaches (from brainstorm or Step 3 decisions), rate each with **Completeness X/10**:
438
+
439
+ | Score | Meaning |
440
+ |-------|---------|
441
+ | 9-10 | Complete — all edge cases, full coverage, production-ready |
442
+ | 7-8 | Happy path covered, some edges skipped |
443
+ | 4-6 | Shortcut — defers significant work |
444
+ | 1-3 | Minimal viable, debt guaranteed |
445
+
446
+ **Always recommend higher-completeness option.** With AI-assisted coding, the marginal cost of completeness is near-zero. Show dual effort estimates for each approach: `(human: ~X / AI: ~Y)`.
447
+
448
+ **Anti-pattern**: "Option B saves 70 LOC" → 70 LOC delta is meaningless with AI. Choose complete. The last 10% of coverage is where production bugs hide.
449
+
450
+ > Source: garrytan/gstack v0.9.0 — "Boil the Lake" principle.
451
+
408
452
  ### Step 6 — Present and Get Approval
409
453
 
410
454
  Present the **master plan** to user (NOT all phase files). User reviews:
411
455
  - Phase breakdown
412
456
  - Key decisions
413
457
  - Risks
458
+ - Completeness scores for chosen approach (from Step 5.5)
414
459
 
415
460
  Wait for explicit approval ("go", "proceed", "yes") before writing phase files.
416
461
 
@@ -609,6 +654,19 @@ Max 200 lines. Self-contained — coder needs ONLY this file.
609
654
  | Tasks without `depends_on` in Wave 2+ | MEDIUM | Implicit dependencies break parallel dispatch. Every Wave 2+ task MUST declare `depends_on` |
610
655
  | Plan ignores locked Decisions from BA | CRITICAL | Decision Compliance section cross-checks requirements.md — locked decisions are non-negotiable |
611
656
  | Complex feature missing Workflow Registry — components planned but never wired | HIGH | Step 4.5: 4-view registry catches orphaned components, unphased workflows, and missing state transitions before phase files are written |
657
+ | Recommending shortcut approach without Completeness Score | MEDIUM | Step 5.5: every alternative needs X/10 Completeness score + dual effort estimate (human vs AI). "Saves 70 LOC" is not a reason when AI makes the delta cost minutes |
658
+
659
+ ## Self-Validation
660
+
661
+ ```
662
+ SELF-VALIDATION (run before presenting plan to user):
663
+ - [ ] Every task has a clear file path — no "update relevant files" vagueness
664
+ - [ ] Wave dependencies are acyclic — no task depends on a task in the same or later wave
665
+ - [ ] Every code-producing phase has at least one test task
666
+ - [ ] Phase files have ALL Amateur-Proof sections (data flow, code contracts, failure scenarios, rejection criteria)
667
+ - [ ] Locked decisions from BA are reflected in plan — none contradicted or ignored
668
+ - [ ] Every BA requirement has a corresponding Req ID in at least one phase's Traceability Matrix
669
+ ```
612
670
 
613
671
  ## Done When
614
672
 
@@ -623,6 +681,7 @@ Max 200 lines. Self-contained — coder needs ONLY this file.
623
681
  - Every code-producing phase has test tasks
624
682
  - Master plan presented to user with "Awaiting Approval"
625
683
  - User has explicitly approved
684
+ - Self-Validation: all checks passed
626
685
 
627
686
  ## Cost Profile
628
687
 
@@ -3,7 +3,7 @@ name: preflight
3
3
  description: Pre-commit quality gate that catches "almost right" code. Goes beyond linting — checks logic correctness, error handling, regressions, and completeness.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L2
8
8
  model: sonnet
9
9
  group: quality
@@ -158,6 +158,52 @@ Verify that new code ships complete:
158
158
 
159
159
  If any completeness item is missing, flag as **WARN** with: what is missing, which file needs it.
160
160
 
161
+ ### Step 4.5 — Domain Quality Hooks
162
+
163
+ Apply domain-specific quality checks based on detected file types in the diff. These extend the generic completeness checks in Step 4 with deeper domain validation.
164
+
165
+ <HARD-GATE>
166
+ Domain hooks are additive — they add checks, never remove generic ones from Steps 1-4.
167
+ If a domain hook flags BLOCK, the overall preflight verdict is BLOCK regardless of other steps.
168
+ </HARD-GATE>
169
+
170
+ #### Hook Selection (auto-detect from diff)
171
+
172
+ | Detected Pattern | Domain Hook | Key Checks |
173
+ |-----------------|-------------|------------|
174
+ | `migrations/*.sql`, `*.migration.*` | Database | Rollback script present, no bare DROP/DELETE, migration tested |
175
+ | `openapi.*`, `*.graphql`, `*.proto` | API Contract | Breaking changes flagged, version bumped, deprecated fields documented |
176
+ | `docs/policies/*`, `PRIVACY*`, `TERMS*` | Legal/Compliance | No placeholder text, review date current, practice matches policy |
177
+ | `**/billing*`, `**/payment*`, `**/invoice*` | Financial | Decimal precision correct, currency locale-aware, no hardcoded rates |
178
+ | `skills/*/SKILL.md`, `extensions/*/PACK.md` | Rune Skill | Frontmatter valid, all required sections present, word count within layer budget |
179
+ | `*.test.*`, `*.spec.*`, `__tests__/*` | Test Quality | No `.skip`/`.only` left in, assertions present (not empty tests), no hardcoded timeouts |
180
+
181
+ #### Domain Hook Execution
182
+
183
+ For each detected domain, run its checks on the relevant files in the diff:
184
+
185
+ 1. **Identify** which domain hooks apply based on changed file patterns
186
+ 2. **Load** domain-specific check rules (inline above, or from pack reference files if a pack is installed)
187
+ 3. **Scan** each relevant file for domain violations
188
+ 4. **Classify** findings: BLOCK (data loss risk, breaking contract) or WARN (best practice, incomplete)
189
+ 5. **Append** to preflight report under `### Domain Quality` section
190
+
191
+ #### Pack Integration
192
+
193
+ When a domain pack is installed (e.g., `@rune-pro/finance`, `@rune-pro/legal`), preflight checks the pack's **Hard-Stop Thresholds** table and applies matching rules to staged files. This means:
194
+ - Installing `@rune-pro/finance` automatically adds financial quality gates to preflight
195
+ - Installing `@rune-pro/legal` automatically adds compliance checks to preflight
196
+ - No manual configuration needed — pack presence = hooks active
197
+
198
+ #### Output Section
199
+
200
+ ```
201
+ ### Domain Quality
202
+ - **Domains detected**: [Database, Financial]
203
+ - `migrations/003-add-billing.sql` — BLOCK: DROP TABLE without rollback script
204
+ - `src/billing/invoice.ts:42` — WARN: price calculation uses `toFixed(2)` instead of `Intl.NumberFormat`
205
+ ```
206
+
161
207
  ### Step 5 — Security Sub-Check
162
208
  Invoke `rune:sentinel` on the changed files. Attach sentinel's output verbatim under the "Security" section of the preflight report. If sentinel returns BLOCK, preflight verdict is also BLOCK.
163
209
 
@@ -216,6 +262,9 @@ WARN — 3 issues found (0 blocking, 3 must-acknowledge). Resolve before commit
216
262
  | Skipping sentinel sub-check because "this file doesn't look security-relevant" | HIGH | MUST invoke sentinel — security relevance is sentinel's job to determine, not preflight's |
217
263
  | Skipping Stage A (spec compliance) when plan is available | HIGH | If cook provides an approved plan, Stage A is mandatory — catches incomplete implementations |
218
264
  | Agent modified files not in plan without flagging | MEDIUM | Stage A flags unplanned file changes as WARN — scope creep detection |
265
+ | Domain hooks not triggered when pack is installed | HIGH | Step 4.5 auto-detects file patterns — if pack is installed but hooks don't fire, check file pattern matching |
266
+ | Domain hooks overriding generic checks | HIGH | HARD-GATE: domain hooks are ADDITIVE — they never replace Steps 1-4 |
267
+ | Pack Hard-Stop Thresholds ignored in preflight | MEDIUM | Step 4.5 Pack Integration must read installed pack thresholds — test with each new pack |
219
268
 
220
269
  ## Done When
221
270
 
@@ -3,7 +3,7 @@ name: research
3
3
  description: Web search and external knowledge lookup. Gathers data on technologies, libraries, best practices, and competitor solutions.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L3
8
8
  model: haiku
9
9
  group: knowledge
@@ -44,25 +44,51 @@ Generate 2-3 targeted search queries from the research question. Vary phrasing t
44
44
  - Secondary: "[topic] best practices 2026" or "[topic] vs alternatives"
45
45
  - Tertiary: "[topic] example" or "[topic] tutorial" if implementation detail needed
46
46
 
47
- ### Step 2 — Search
47
+ ### Step 2 — Search (Minimum 3 Complementary Sources)
48
48
 
49
- Call `WebSearch` for each query. Collect result titles, URLs, and snippets. Identify the top 3-5 most relevant URLs based on:
50
- - Source authority (official docs, major blogs, GitHub repos)
49
+ <HARD-GATE>
50
+ Every research conclusion MUST be backed by at minimum 3 complementary sources from DIFFERENT source types.
51
+ Single-source conclusions are flagged as `low` confidence regardless of source authority.
52
+ </HARD-GATE>
53
+
54
+ Call `WebSearch` for each query. Collect result titles, URLs, and snippets. Identify the top 3-5 most relevant URLs prioritizing **source diversity**:
55
+
56
+ | Source Type | Examples | Why |
57
+ |-------------|----------|-----|
58
+ | **Official docs** | Framework docs, API reference, RFC | Authoritative but may lag behind reality |
59
+ | **Community** | Stack Overflow, GitHub Issues, Reddit | Real-world pain points, edge cases |
60
+ | **Technical blogs** | Dev.to, Medium engineering blogs, personal blogs | Practical experience, tutorials |
61
+ | **Repositories** | GitHub repos, npm packages, example code | Working implementations |
62
+
63
+ **Selection rules:**
64
+ - Source authority (official docs > major blogs > personal blogs)
51
65
  - Recency (prefer 2025-2026)
52
66
  - Relevance to the query
67
+ - **Diversity: never select 3+ URLs from the same domain** — spread across source types
68
+
69
+ > Source: K-Dense claude-scientific-skills (literature-review "minimum 3 complementary databases" pattern), adapted for software research.
53
70
 
54
71
  ### Step 3 — Deep Dive
55
72
 
56
73
  Call `WebFetch` on the top 3-5 URLs identified in Step 2. Hard limit: **max 5 WebFetch calls** per research invocation. For each fetched page:
57
74
  - Extract key facts, API signatures, code examples
58
75
  - Note the source URL and publication date if visible
76
+ - Tag the source type (official/community/blog/repo) for Step 4 triangulation
59
77
 
60
- ### Step 4 — Synthesize
78
+ ### Step 4 — Synthesize (Triangulation)
61
79
 
62
- Across all fetched content:
63
- - Identify points of consensus across sources
80
+ Across all fetched content, **triangulate** — don't just aggregate:
81
+ - Identify points of consensus across sources (≥3 sources = strong signal)
64
82
  - Flag any conflicting information explicitly (e.g., "Source A says X, Source B says Y")
65
- - Assign confidence: `high` (3+ sources agree), `medium` (1-2 sources), `low` (single source or unclear)
83
+ - Check if conflicts are temporal (old vs new info) or genuine disagreement
84
+ - Assign confidence using source diversity:
85
+
86
+ | Confidence | Criteria |
87
+ |------------|----------|
88
+ | `high` | 3+ sources from different types agree |
89
+ | `medium` | 2 sources agree, or 3+ from same type |
90
+ | `low` | Single source, or sources conflict without resolution |
91
+ | `unverified` | No sources found — report this explicitly, NEVER fabricate |
66
92
 
67
93
  ### Step 5 — Report
68
94
 
@@ -108,6 +134,8 @@ Known failure modes for this skill. Check these before declaring done.
108
134
  | Reporting conflicting sources without flagging the conflict | HIGH | Constraint: flag conflicting information explicitly, never silently pick one side |
109
135
  | Assigning "high" confidence from a single source | MEDIUM | High = 3+ sources agree; 1-2 sources = medium confidence |
110
136
  | Exceeding 5 WebFetch calls per invocation | MEDIUM | Hard limit: prioritize top 3-5 URLs from search, fetch only the most relevant |
137
+ | Single-source conclusions presented as fact | HIGH | HARD-GATE: minimum 3 complementary sources from different source types. Single source = `low` confidence |
138
+ | All sources from same domain (e.g., 3 Stack Overflow links) | MEDIUM | Source diversity rule: never 3+ URLs from the same domain. Spread across official/community/blog/repo |
111
139
 
112
140
  ## Done When
113
141