@rune-kit/rune 2.2.0 → 2.2.2
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.
- package/README.md +72 -40
- package/compiler/__tests__/pack-split.test.js +145 -0
- package/compiler/bin/rune.js +26 -9
- package/compiler/doctor.js +42 -0
- package/compiler/emitter.js +27 -4
- package/compiler/parser.js +41 -3
- package/compiler/transformer.js +10 -6
- package/compiler/transforms/compliance.js +40 -0
- package/docs/ANTIGRAVITY-GAP-ANALYSIS.md +369 -0
- package/docs/ARCHITECTURE.md +332 -0
- package/docs/COMMUNITY-PACKS.md +109 -0
- package/docs/CONTRIBUTING-L4.md +215 -0
- package/docs/CROSS-IDE-ANALYSIS.md +164 -0
- package/docs/EXTENSION-TEMPLATE.md +108 -0
- package/docs/MESH-RULES.md +34 -0
- package/docs/MULTI-PLATFORM.md +804 -0
- package/docs/SKILL-DEPTH-AUDIT.md +191 -0
- package/docs/SKILL-TEMPLATE.md +72 -0
- package/docs/TRADE-MATRIX.md +327 -0
- package/docs/VERSIONING.md +91 -0
- package/docs/VISION.md +263 -0
- package/docs/assets/demo-subtitles.srt +215 -0
- package/docs/assets/end-card.html +276 -0
- package/docs/assets/mesh-diagram.html +654 -0
- package/docs/assets/thumbnail.html +295 -0
- package/docs/guides/cli.md +403 -0
- package/docs/guides/index.html +1346 -0
- package/docs/index.html +674 -0
- package/docs/references/claudekit-analysis.md +414 -0
- package/docs/references/voltagent-analysis.md +189 -0
- package/docs/script.js +277 -0
- package/docs/skills/index.html +832 -0
- package/docs/style.css +583 -0
- package/docs/video-demo-plan.md +172 -0
- package/extensions/ai-ml/PACK.md +38 -474
- package/extensions/ai-ml/skills/ai-agents.md +172 -0
- package/extensions/ai-ml/skills/code-sandbox.md +187 -0
- package/extensions/ai-ml/skills/deep-research.md +146 -0
- package/extensions/ai-ml/skills/embedding-search.md +66 -0
- package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -0
- package/extensions/ai-ml/skills/llm-architect.md +125 -0
- package/extensions/ai-ml/skills/llm-integration.md +64 -0
- package/extensions/ai-ml/skills/prompt-patterns.md +72 -0
- package/extensions/ai-ml/skills/rag-patterns.md +66 -0
- package/extensions/ai-ml/skills/web-extraction.md +114 -0
- package/extensions/analytics/PACK.md +19 -484
- package/extensions/analytics/skills/ab-testing.md +72 -0
- package/extensions/analytics/skills/dashboard-patterns.md +83 -0
- package/extensions/analytics/skills/data-validation.md +68 -0
- package/extensions/analytics/skills/funnel-analysis.md +81 -0
- package/extensions/analytics/skills/sql-patterns.md +57 -0
- package/extensions/analytics/skills/statistical-analysis.md +79 -0
- package/extensions/analytics/skills/tracking-setup.md +71 -0
- package/extensions/backend/PACK.md +44 -618
- package/extensions/backend/skills/api-patterns.md +84 -0
- package/extensions/backend/skills/async-pipeline.md +193 -0
- package/extensions/backend/skills/auth-patterns.md +97 -0
- package/extensions/backend/skills/background-jobs.md +133 -0
- package/extensions/backend/skills/caching-patterns.md +108 -0
- package/extensions/backend/skills/cli-generation.md +133 -0
- package/extensions/backend/skills/database-patterns.md +87 -0
- package/extensions/backend/skills/middleware-patterns.md +104 -0
- package/extensions/chrome-ext/PACK.md +19 -921
- package/extensions/chrome-ext/skills/cws-preflight.md +143 -0
- package/extensions/chrome-ext/skills/cws-publish.md +104 -0
- package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -0
- package/extensions/chrome-ext/skills/ext-messaging.md +139 -0
- package/extensions/chrome-ext/skills/ext-storage.md +133 -0
- package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -0
- package/extensions/content/PACK.md +43 -335
- package/extensions/content/skills/blog-patterns.md +88 -0
- package/extensions/content/skills/cms-integration.md +131 -0
- package/extensions/content/skills/content-scoring.md +107 -0
- package/extensions/content/skills/i18n.md +83 -0
- package/extensions/content/skills/mdx-authoring.md +137 -0
- package/extensions/content/skills/reference.md +1014 -0
- package/extensions/content/skills/seo-patterns.md +67 -0
- package/extensions/content/skills/video-repurpose.md +153 -0
- package/extensions/devops/PACK.md +38 -457
- package/extensions/devops/skills/chaos-testing.md +67 -0
- package/extensions/devops/skills/ci-cd.md +75 -0
- package/extensions/devops/skills/docker.md +58 -0
- package/extensions/devops/skills/edge-serverless.md +163 -0
- package/extensions/devops/skills/infra-as-code.md +158 -0
- package/extensions/devops/skills/kubernetes.md +110 -0
- package/extensions/devops/skills/monitoring.md +57 -0
- package/extensions/devops/skills/server-setup.md +64 -0
- package/extensions/devops/skills/ssl-domain.md +42 -0
- package/extensions/ecommerce/PACK.md +62 -226
- package/extensions/ecommerce/skills/cart-system.md +79 -0
- package/extensions/ecommerce/skills/inventory-mgmt.md +102 -0
- package/extensions/ecommerce/skills/order-management.md +126 -0
- package/extensions/ecommerce/skills/payment-integration.md +472 -0
- package/extensions/ecommerce/skills/shopify-dev.md +69 -0
- package/extensions/ecommerce/skills/subscription-billing.md +93 -0
- package/extensions/ecommerce/skills/tax-compliance.md +117 -0
- package/extensions/gamedev/PACK.md +66 -317
- package/extensions/gamedev/skills/asset-pipeline.md +74 -0
- package/extensions/gamedev/skills/audio-system.md +129 -0
- package/extensions/gamedev/skills/camera-system.md +87 -0
- package/extensions/gamedev/skills/ecs.md +98 -0
- package/extensions/gamedev/skills/game-loops.md +72 -0
- package/extensions/gamedev/skills/input-system.md +199 -0
- package/extensions/gamedev/skills/multiplayer.md +180 -0
- package/extensions/gamedev/skills/particles.md +105 -0
- package/extensions/gamedev/skills/physics-engine.md +89 -0
- package/extensions/gamedev/skills/scene-management.md +146 -0
- package/extensions/gamedev/skills/threejs-patterns.md +90 -0
- package/extensions/gamedev/skills/webgl.md +71 -0
- package/extensions/mobile/PACK.md +56 -223
- package/extensions/mobile/skills/app-store-connect.md +152 -0
- package/extensions/mobile/skills/app-store-prep.md +66 -0
- package/extensions/mobile/skills/deep-linking.md +109 -0
- package/extensions/mobile/skills/flutter.md +60 -0
- package/extensions/mobile/skills/ios-build-pipeline.md +142 -0
- package/extensions/mobile/skills/native-bridge.md +66 -0
- package/extensions/mobile/skills/ota-updates.md +97 -0
- package/extensions/mobile/skills/push-notifications.md +111 -0
- package/extensions/mobile/skills/react-native.md +82 -0
- package/extensions/saas/PACK.md +26 -720
- package/extensions/saas/skills/billing-integration.md +121 -0
- package/extensions/saas/skills/feature-flags.md +130 -0
- package/extensions/saas/skills/multi-tenant.md +103 -0
- package/extensions/saas/skills/onboarding-flow.md +139 -0
- package/extensions/saas/skills/subscription-flow.md +95 -0
- package/extensions/saas/skills/team-management.md +144 -0
- package/extensions/security/PACK.md +10 -448
- package/extensions/security/skills/api-security.md +140 -0
- package/extensions/security/skills/compliance.md +68 -0
- package/extensions/security/skills/owasp-audit.md +64 -0
- package/extensions/security/skills/pentest-patterns.md +77 -0
- package/extensions/security/skills/secret-mgmt.md +65 -0
- package/extensions/security/skills/supply-chain.md +65 -0
- package/extensions/trading/PACK.md +18 -535
- package/extensions/trading/skills/chart-components.md +55 -0
- package/extensions/trading/skills/experiment-loop.md +125 -0
- package/extensions/trading/skills/fintech-patterns.md +47 -0
- package/extensions/trading/skills/indicator-library.md +58 -0
- package/extensions/trading/skills/quant-analysis.md +111 -0
- package/extensions/trading/skills/realtime-data.md +58 -0
- package/extensions/trading/skills/trade-logic.md +104 -0
- package/extensions/ui/PACK.md +36 -853
- package/extensions/ui/skills/a11y-audit.md +91 -0
- package/extensions/ui/skills/animation-patterns.md +106 -0
- package/extensions/ui/skills/component-patterns.md +75 -0
- package/extensions/ui/skills/design-decision.md +108 -0
- package/extensions/ui/skills/design-system.md +68 -0
- package/extensions/ui/skills/landing-patterns.md +155 -0
- package/extensions/ui/skills/palette-picker.md +173 -0
- package/extensions/ui/skills/react-health.md +90 -0
- package/extensions/ui/skills/type-system.md +125 -0
- package/extensions/ui/skills/web-vitals.md +153 -0
- package/extensions/zalo/PACK.md +117 -0
- package/extensions/zalo/skills/zalo-oa-mcp.md +317 -0
- package/extensions/zalo/skills/zalo-oa-messaging.md +429 -0
- package/extensions/zalo/skills/zalo-oa-setup.md +236 -0
- package/extensions/zalo/skills/zalo-oa-webhook.md +189 -0
- package/extensions/zalo/skills/zalo-personal-messaging.md +194 -0
- package/extensions/zalo/skills/zalo-personal-setup.md +153 -0
- package/extensions/zalo/skills/zalo-rate-guard.md +219 -0
- package/hooks/.gitkeep +0 -0
- package/hooks/auto-format/index.cjs +48 -0
- package/hooks/context-watch/index.cjs +68 -0
- package/hooks/hooks.json +99 -0
- package/hooks/metrics-collector/index.cjs +42 -0
- package/hooks/post-session-reflect/index.cjs +153 -0
- package/hooks/pre-compact/index.cjs +95 -0
- package/hooks/pre-tool-guard/index.cjs +68 -0
- package/hooks/run-hook +17 -0
- package/hooks/run-hook.cjs +16 -0
- package/hooks/run-hook.cmd +1 -0
- package/hooks/secrets-scan/index.cjs +100 -0
- package/hooks/session-start/index.cjs +65 -0
- package/hooks/typecheck/index.cjs +65 -0
- package/package.json +9 -4
- package/references/ui-pro-max-data/LICENSE-UI-PRO-MAX +21 -0
- package/references/ui-pro-max-data/charts.csv +26 -0
- package/references/ui-pro-max-data/colors.csv +162 -0
- package/references/ui-pro-max-data/styles.csv +85 -0
- package/references/ui-pro-max-data/typography.csv +74 -0
- package/references/ui-pro-max-data/ui-reasoning.csv +162 -0
- package/references/ui-pro-max-data/ux-guidelines.csv +100 -0
- package/skills/ba/SKILL.md +10 -0
- package/skills/brainstorm/SKILL.md +63 -1
- package/skills/completion-gate/SKILL.md +34 -1
- package/skills/context-engine/SKILL.md +13 -0
- package/skills/cook/SKILL.md +155 -5
- package/skills/debug/SKILL.md +56 -1
- package/skills/design/SKILL.md +11 -0
- package/skills/fix/SKILL.md +26 -1
- package/skills/mcp-builder/SKILL.md +48 -1
- package/skills/plan/SKILL.md +23 -6
- package/skills/review/SKILL.md +44 -5
- package/skills/review-intake/SKILL.md +17 -1
- package/skills/skill-forge/SKILL.md +38 -3
- package/skills/skill-router/SKILL.md +89 -7
- package/skills/team/SKILL.md +24 -1
- package/skills/test/SKILL.md +28 -1
- package/skills/verification/SKILL.md +98 -1
package/skills/plan/SKILL.md
CHANGED
|
@@ -171,6 +171,11 @@ Save to `.rune/plan-<feature>.md`:
|
|
|
171
171
|
- <decision 1 — chosen approach and why>
|
|
172
172
|
- <decision 2>
|
|
173
173
|
|
|
174
|
+
## Decision Compliance
|
|
175
|
+
- Decisions (locked): [list from requirements.md — plan MUST honor these]
|
|
176
|
+
- Discretion (agent): [list — agent chose X because Y]
|
|
177
|
+
- Deferred: [list — explicitly excluded from this feature]
|
|
178
|
+
|
|
174
179
|
## Architecture
|
|
175
180
|
<brief system diagram or component list — NOT implementation detail>
|
|
176
181
|
|
|
@@ -226,17 +231,27 @@ function validateInput(raw: unknown): TradeEntry[]; // throws ValidationError
|
|
|
226
231
|
```
|
|
227
232
|
|
|
228
233
|
## Tasks
|
|
234
|
+
|
|
235
|
+
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.
|
|
236
|
+
|
|
229
237
|
- [ ] Task 1 — Create calculateProfit function
|
|
230
|
-
- File: `src/foo/bar.ts`
|
|
231
|
-
-
|
|
238
|
+
- File: `src/foo/bar.ts` (new)
|
|
239
|
+
- Test: `tests/foo/bar.test.ts` (new)
|
|
240
|
+
- Verify: `npm test -- --grep "calculateProfit"`
|
|
241
|
+
- Commit: `feat(trading): add calculateProfit with fee calculation`
|
|
232
242
|
- Logic: sum entries by side, apply fees (0.1% per trade), return net P&L
|
|
233
243
|
- Edge: empty array → return { netPnL: 0, totalFees: 0, winRate: 0 }
|
|
234
244
|
- [ ] Task 2 — Add input validation
|
|
235
|
-
- File: `src/foo/baz.ts`
|
|
236
|
-
-
|
|
245
|
+
- File: `src/foo/baz.ts` (modify)
|
|
246
|
+
- Test: `tests/foo/baz.test.ts` (new)
|
|
247
|
+
- Verify: `npm test -- --grep "validateInput"`
|
|
248
|
+
- Commit: `feat(trading): add input validation for trade entries`
|
|
237
249
|
- Logic: check side is 'long'|'short', prices > 0, quantity > 0
|
|
238
|
-
- [ ] Task 3 — Write tests
|
|
239
|
-
- File: `tests/foo/bar.test.ts`
|
|
250
|
+
- [ ] Task 3 — Write integration tests
|
|
251
|
+
- File: `tests/foo/bar.test.ts` (modify)
|
|
252
|
+
- Test: N/A — this IS the test task
|
|
253
|
+
- Verify: `npm test -- --grep "trading" && npx tsc --noEmit`
|
|
254
|
+
- Commit: `test(trading): add integration tests for edge cases`
|
|
240
255
|
- Cases: happy path, empty input, negative values, overflow
|
|
241
256
|
|
|
242
257
|
## Failure Scenarios
|
|
@@ -503,6 +518,8 @@ Max 200 lines. Self-contained — coder needs ONLY this file.
|
|
|
503
518
|
| Plan without scout context — invented file paths | CRITICAL | Step 1: scout first, always |
|
|
504
519
|
| Phase with zero test tasks | CRITICAL | HARD-GATE rejects it |
|
|
505
520
|
| 10+ phases overwhelming the master plan | MEDIUM | Max 8 phases — split into sub-projects if more |
|
|
521
|
+
| Task without File path or Verify command | HIGH | Every task MUST have File + Test + Verify + Commit fields — no vague "implement the feature" tasks |
|
|
522
|
+
| Plan ignores locked Decisions from BA | CRITICAL | Decision Compliance section cross-checks requirements.md — locked decisions are non-negotiable |
|
|
506
523
|
|
|
507
524
|
## Done When
|
|
508
525
|
|
package/skills/review/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: review
|
|
|
3
3
|
description: Code quality review — patterns, security, performance, correctness. Finds bugs, suggests improvements, triggers fix for issues found. Escalates to opus for security-critical code.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.3.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: development
|
|
@@ -70,14 +70,17 @@ Determine what to review.
|
|
|
70
70
|
- If context is unclear: use `rune:scout` to identify all files touched by the change
|
|
71
71
|
- List every file in scope before proceeding — do not review files outside the stated scope
|
|
72
72
|
|
|
73
|
-
### Step 2: Logic Check
|
|
73
|
+
### Step 2: Logic Check (Production-Critical Focus)
|
|
74
74
|
|
|
75
|
-
Read each changed file and
|
|
75
|
+
Read each changed file. Prioritize bugs that **pass CI but break production** — these are the highest-value findings because linters and type checkers already catch the rest.
|
|
76
76
|
|
|
77
77
|
- Use `Read` on every file in scope
|
|
78
|
+
- **Race conditions**: async operations without proper sequencing, shared mutable state, missing locks
|
|
79
|
+
- **State corruption**: mutations that affect other consumers, cache invalidation gaps, stale closures
|
|
80
|
+
- **Silent failures**: caught errors that swallow context, empty catch blocks, promises without rejection handling
|
|
81
|
+
- **Data loss paths**: write operations without confirmation, delete without soft-delete, truncation without backup
|
|
82
|
+
- **Edge cases**: empty input, null/undefined, zero, negative numbers, empty arrays, Unicode, timezone boundaries
|
|
78
83
|
- Check for: logic errors, off-by-one errors, incorrect conditionals, broken async/await patterns
|
|
79
|
-
- Check for: missing error handling, uncaught promise rejections, silent failures
|
|
80
|
-
- Check for: edge cases — empty input, null/undefined, zero, negative numbers, empty arrays
|
|
81
84
|
- Flag each finding with file path, line number, and severity
|
|
82
85
|
|
|
83
86
|
**Common patterns to flag:**
|
|
@@ -163,6 +166,39 @@ Identify gaps in test coverage.
|
|
|
163
166
|
- If untested code found: call `rune:test` with specific instructions on what to test
|
|
164
167
|
- Flag as HIGH if business logic is untested, MEDIUM if utility code is untested
|
|
165
168
|
|
|
169
|
+
### Step 5.5: Two-Stage Review Gate
|
|
170
|
+
|
|
171
|
+
Separate spec compliance from code quality. Most reviews conflate both — this gate forces the distinction.
|
|
172
|
+
|
|
173
|
+
**Stage 1 — Spec Compliance (check FIRST)**
|
|
174
|
+
|
|
175
|
+
Before evaluating code quality, verify the implementation matches what was asked:
|
|
176
|
+
|
|
177
|
+
- Load the originating plan, task, ticket, or `requirements.md` if available
|
|
178
|
+
- Does the implementation cover every acceptance criterion? Check each one explicitly
|
|
179
|
+
- Is there **under-engineering** — requirements stated but not implemented?
|
|
180
|
+
- Is there **over-engineering** — abstractions, generalization, or features beyond scope?
|
|
181
|
+
- Does the file/function structure match what the plan specified?
|
|
182
|
+
|
|
183
|
+
Flag spec deviations as HIGH — clean code that misses requirements ships broken products.
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
# Spec Compliance Checklist
|
|
187
|
+
[ ] All acceptance criteria from plan/ticket covered
|
|
188
|
+
[ ] No stated requirements missing from implementation
|
|
189
|
+
[ ] No unrequested features added (scope creep)
|
|
190
|
+
[ ] API surface matches what was specified (signatures, endpoints, return types)
|
|
191
|
+
[ ] File structure matches plan (no renamed or relocated files without justification)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
If spec violations found: document them separately from code quality findings in the report. Label as `SPEC-MISS` or `SPEC-CREEP`.
|
|
195
|
+
|
|
196
|
+
**Stage 2 — Code Quality**
|
|
197
|
+
|
|
198
|
+
Proceed to Step 6 only after Stage 1 passes. Code quality findings (bugs, patterns, security, coverage) are the existing Steps 2–5 above.
|
|
199
|
+
|
|
200
|
+
The review report MUST show both stages: spec compliance verdict first, then code quality findings.
|
|
201
|
+
|
|
166
202
|
### Step 6: Report
|
|
167
203
|
|
|
168
204
|
Produce a structured severity-ranked report.
|
|
@@ -340,7 +376,10 @@ LOW — style inconsistency, naming suggestion, minor refactor opportunity
|
|
|
340
376
|
| Expanding review scope beyond the diff | MEDIUM | Limit to `git diff` scope — do not creep into adjacent unchanged files |
|
|
341
377
|
| Security finding without sentinel escalation | HIGH | Any auth/crypto/payment code touched → MUST call rune:sentinel |
|
|
342
378
|
| Skipping UI anti-pattern checks for frontend changes | MEDIUM | Any .tsx/.jsx/.svelte/.vue in diff → MUST run UI/UX Anti-Pattern Checks section |
|
|
379
|
+
| Skipping spec compliance check (Step 5.5 Stage 1) | HIGH | Code quality without spec check ships clean code that does the wrong thing — always load the plan/ticket before reviewing quality |
|
|
343
380
|
| Treating purple/indigo accent as "just a color choice" | MEDIUM | It is a documented AI-generated UI signature — always flag for domain justification |
|
|
381
|
+
| Suggesting "add X" without checking if X is used | MEDIUM | YAGNI pushback: grep codebase for the suggested feature → if uncalled anywhere → respond "Not called anywhere. Remove? (YAGNI)". Valid pushback, not laziness |
|
|
382
|
+
| Adding abstractions "for future flexibility" | MEDIUM | Three similar lines > premature abstraction. Only abstract when there are 3+ concrete callers today |
|
|
344
383
|
|
|
345
384
|
## Done When
|
|
346
385
|
|
|
@@ -3,7 +3,7 @@ name: review-intake
|
|
|
3
3
|
description: Use when receiving code review feedback, PR comments, or external suggestions before implementing any changes. Prevents blind implementation, enforces verification-first discipline.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.1.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: quality
|
|
@@ -112,9 +112,25 @@ UNCLEAR: "Need clarification on [specific aspect]."
|
|
|
112
112
|
BANNED: "You're absolutely right!"
|
|
113
113
|
BANNED: "Great point!" / "Great catch!"
|
|
114
114
|
BANNED: "Thanks for catching that!"
|
|
115
|
+
BANNED: "I agree with your suggestion"
|
|
116
|
+
BANNED: "That's a good idea"
|
|
117
|
+
BANNED: "I see what you mean"
|
|
118
|
+
BANNED: Any sentence that adds no technical information
|
|
115
119
|
BANNED: Any performative gratitude — actions speak, not words.
|
|
116
120
|
```
|
|
117
121
|
|
|
122
|
+
<HARD-GATE>
|
|
123
|
+
Every response to a review item MUST start with an ACTION VERB:
|
|
124
|
+
- "Fixed — [description]"
|
|
125
|
+
- "Reverted — [reason]"
|
|
126
|
+
- "Deferred — [reason + ticket]"
|
|
127
|
+
- "Pushed back — [technical evidence]"
|
|
128
|
+
- "Clarifying — [question]"
|
|
129
|
+
|
|
130
|
+
Responses starting with praise, agreement, or social pleasantries are BLOCKED.
|
|
131
|
+
This is a professional code review, not a conversation — signal with actions, not words.
|
|
132
|
+
</HARD-GATE>
|
|
133
|
+
|
|
118
134
|
When replying to GitHub PR comments, reply in the thread:
|
|
119
135
|
```bash
|
|
120
136
|
gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies \
|
|
@@ -3,7 +3,7 @@ name: skill-forge
|
|
|
3
3
|
description: Use when creating new Rune skills, editing existing skills, or verifying skill quality before deployment. Applies TDD discipline to skill authoring — test before write, verify before ship.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.1.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: opus
|
|
9
9
|
group: creation
|
|
@@ -106,6 +106,33 @@ Follow `docs/SKILL-TEMPLATE.md` format. Required sections:
|
|
|
106
106
|
| Cost Profile | YES | Token estimate |
|
|
107
107
|
| Mesh Gates | L1/L2 only | Progression guards |
|
|
108
108
|
|
|
109
|
+
#### SKILL.md Anatomy — WHY vs HOW Split
|
|
110
|
+
|
|
111
|
+
A skill file answers WHY and WHEN — not HOW. Code examples, syntax references, and implementation patterns belong in separate files:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
skills/[name]/
|
|
115
|
+
├── SKILL.md ← WHY: purpose, triggers, constraints, sharp edges (~150-300 lines)
|
|
116
|
+
├── references/ ← HOW: code patterns, syntax tables, API examples
|
|
117
|
+
│ ├── patterns.md ← Implementation patterns with code blocks
|
|
118
|
+
│ └── gotchas.md ← Language/framework-specific pitfalls
|
|
119
|
+
└── scripts/ ← WHAT: deterministic operations (shell, node)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Rules:**
|
|
123
|
+
1. SKILL.md MUST NOT contain code blocks longer than 10 lines — move to `references/`
|
|
124
|
+
2. One excellent inline example (≤10 lines) is OK for clarity — more than that is a smell
|
|
125
|
+
3. Format templates (Output Format section) are NOT code — they stay in SKILL.md
|
|
126
|
+
4. Pressure test scenarios (Phase 2) are NOT code — they stay in SKILL.md
|
|
127
|
+
5. If a skill has >3 code blocks → create `references/` and extract them
|
|
128
|
+
|
|
129
|
+
**Why this matters:** Code blocks in SKILL.md inflate context tokens on EVERY invocation. References are loaded only when needed. A 500-line SKILL.md with 200 lines of code examples should be a 300-line SKILL.md + a 200-line references file.
|
|
130
|
+
|
|
131
|
+
<HARD-GATE>
|
|
132
|
+
Code blocks in SKILL.md > 10 lines = review failure.
|
|
133
|
+
Extract to references/ or scripts/. No exceptions.
|
|
134
|
+
</HARD-GATE>
|
|
135
|
+
|
|
109
136
|
#### Frontmatter Rules
|
|
110
137
|
|
|
111
138
|
```yaml
|
|
@@ -119,11 +146,16 @@ metadata:
|
|
|
119
146
|
---
|
|
120
147
|
```
|
|
121
148
|
|
|
122
|
-
**Description rules:**
|
|
149
|
+
**Description rules (CSO Discipline):**
|
|
123
150
|
- MUST start with "Use when..."
|
|
124
151
|
- MUST describe triggering conditions, NOT workflow
|
|
125
152
|
- MUST be third person
|
|
126
153
|
- MUST NOT summarize what the skill does internally
|
|
154
|
+
- AI reads description → decides whether to invoke → if description contains workflow summary, AI skips reading the full SKILL.md content (it thinks it already knows)
|
|
155
|
+
- Test: if you can execute the skill from the description alone, the description leaks too much
|
|
156
|
+
|
|
157
|
+
Bad: "Analyzes code quality through 6-step process: scan files, check patterns, run linters, compare metrics, generate report, suggest fixes"
|
|
158
|
+
Good: "Use when code changes need quality review before commit. Symptoms: PR ready, refactor complete, pre-release check."
|
|
127
159
|
|
|
128
160
|
```yaml
|
|
129
161
|
# BAD: Summarizes workflow — agent reads description, skips full content
|
|
@@ -302,10 +334,13 @@ Techniques:
|
|
|
302
334
|
| Skill passes test but breaks mesh connections | MEDIUM | Phase 6 integration: verify output compatibility |
|
|
303
335
|
| Editing skill without testing the edit | MEDIUM | Adapting section: same TDD cycle for edits |
|
|
304
336
|
| Overly verbose skill burns context tokens | MEDIUM | Token efficiency guidelines: layer-based word targets |
|
|
337
|
+
| Code blocks in SKILL.md bloat every invocation | HIGH | WHY vs HOW split: SKILL.md ≤10-line code blocks, extract rest to references/ |
|
|
338
|
+
| Writing skill without TDD (no observed failures first) | CRITICAL | Skill TDD: RED (run scenario WITHOUT skill → document failures) → GREEN (write skill targeting failures) → REFACTOR (find bypasses → add blocks) |
|
|
339
|
+
| Description leaks workflow → agent skips full content | HIGH | CSO Discipline: description = triggers only. Test: can you execute from description alone? If yes, it leaks too much |
|
|
305
340
|
|
|
306
341
|
## Done When
|
|
307
342
|
|
|
308
|
-
- Baseline test documented with observed failures
|
|
343
|
+
- Baseline test documented with observed failures (TDD RED phase)
|
|
309
344
|
- SKILL.md follows template format completely
|
|
310
345
|
- Skill passes pressure test (agent complies with skill loaded)
|
|
311
346
|
- No new failures in 2 consecutive varied-pressure test runs
|
|
@@ -4,7 +4,7 @@ description: "Meta-enforcement layer that routes EVERY agent action through the
|
|
|
4
4
|
user-invocable: false
|
|
5
5
|
metadata:
|
|
6
6
|
author: runedev
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.2.0"
|
|
8
8
|
layer: L0
|
|
9
9
|
model: haiku
|
|
10
10
|
group: orchestrator
|
|
@@ -64,14 +64,33 @@ Before standard routing, check if adaptive routing rules exist:
|
|
|
64
64
|
- Model hints are written by cook Phase 8 when debug-fix loops hit max retries on the same error pattern
|
|
65
65
|
- Model hints do NOT override explicit user model preferences
|
|
66
66
|
|
|
67
|
+
### Step 0.25 — Request Classifier (Fast-Path Filter)
|
|
68
|
+
|
|
69
|
+
Before intent classification, categorize the request into one of 5 types. This determines the **enforcement level** — how strictly routing must be followed.
|
|
70
|
+
|
|
71
|
+
| Request Type | Keywords / Signals | Enforcement | Action |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| `CODE_CHANGE` | "build", "implement", "add", "create", "fix", "refactor", "update code" | **FULL** | cook mandatory, no exceptions |
|
|
74
|
+
| `QUESTION` | "what is", "how does", "explain", "why" | **LITE** | Check if a skill has domain knowledge first; answer directly if no skill matches |
|
|
75
|
+
| `DEBUG_REQUEST` | "error", "bug", "not working", "broken", "crash", "fails" | **FULL** | debug skill mandatory |
|
|
76
|
+
| `REVIEW_REQUEST` | "review", "check", "audit", "look at this code" | **FULL** | review skill mandatory |
|
|
77
|
+
| `EXPLORE` | "find", "search", "where is", "show me", "list" | **LITE** | scout if codebase-related; answer directly if general |
|
|
78
|
+
|
|
79
|
+
**Enforcement levels:**
|
|
80
|
+
- **FULL** → MUST route through a skill. Writing code without skill invocation = protocol violation.
|
|
81
|
+
- **LITE** → SHOULD check if a skill applies. Can answer directly if no skill matches and the response involves no code changes.
|
|
82
|
+
|
|
83
|
+
**Escape hatch**: If request is clearly trivial (< 5 LOC change, single-line fix, user says "just do it"), classify as CODE_CHANGE but cook activates Fast Mode automatically.
|
|
84
|
+
|
|
67
85
|
### Step 0.5 — STOP before responding
|
|
68
86
|
|
|
69
87
|
Before generating ANY response (including clarifying questions), the agent MUST:
|
|
70
88
|
|
|
71
|
-
1. **
|
|
72
|
-
2. **
|
|
73
|
-
3. **
|
|
74
|
-
4. **
|
|
89
|
+
1. **Check the request type** from Step 0.25 — if FULL enforcement, routing is mandatory
|
|
90
|
+
2. **Classify the user's intent** using the routing table below
|
|
91
|
+
3. **Identify which skill(s) match** — if even 1% chance a skill applies, invoke it
|
|
92
|
+
4. **Invoke the skill** via the Skill tool
|
|
93
|
+
5. **Follow the skill's instructions** — the skill dictates the workflow, not the agent
|
|
75
94
|
|
|
76
95
|
### Step 1 — Intent Classification (Progressive Disclosure)
|
|
77
96
|
|
|
@@ -143,7 +162,11 @@ These are rarely invoked directly — they're called by Tier 1/2 skills:
|
|
|
143
162
|
|
|
144
163
|
#### Tier 4 — Domain Extension Packs (L4)
|
|
145
164
|
|
|
146
|
-
When user intent matches a domain-specific pattern or user explicitly invokes an L4 trigger command, route to the L4 pack.
|
|
165
|
+
When user intent matches a domain-specific pattern or user explicitly invokes an L4 trigger command, route to the L4 pack.
|
|
166
|
+
|
|
167
|
+
**Split pack loading** (context-efficient): First `Read` the pack's PACK.md index. If the index contains `format: split` in its frontmatter metadata, it is a split pack — the index lists skills in a table but skill content lives in separate files under `skills/`. Match user intent to the specific skill name in the table, then `Read` only that skill file (e.g., `extensions/backend/skills/api-design.md`). This loads ~100-200 lines instead of ~1000+.
|
|
168
|
+
|
|
169
|
+
**Monolith pack loading** (legacy): If no `format: split` marker, the PACK.md contains all skills inline — read it fully and extract the matching `### skill-name` section.
|
|
147
170
|
|
|
148
171
|
| User Intent / Domain Signal | Route To | Pack File |
|
|
149
172
|
|---|---|---|
|
|
@@ -159,13 +182,41 @@ When user intent matches a domain-specific pattern or user explicitly invokes an
|
|
|
159
182
|
| Three.js, WebGL, game loop, physics | `@rune/gamedev` | `extensions/gamedev/PACK.md` |
|
|
160
183
|
| Blog, CMS, MDX, i18n, SEO | `@rune/content` | `extensions/content/PACK.md` |
|
|
161
184
|
| Analytics, A/B testing, funnels, dashboards | `@rune/analytics` | `extensions/analytics/PACK.md` |
|
|
185
|
+
| Chrome extension, manifest, service worker | `@rune/chrome-ext` | `extensions/chrome-ext/PACK.md` |
|
|
186
|
+
| PRD, roadmap, KPI, release notes, product spec | `@rune-pro/product` | `extensions/pro-product/PACK.md` |
|
|
187
|
+
| Sales outreach, pipeline, call prep, prospecting | `@rune-pro/sales` | `extensions/pro-sales/PACK.md` |
|
|
188
|
+
| Data science, SQL, dashboards, statistical analysis | `@rune-pro/data-science` | `extensions/pro-data-science/PACK.md` |
|
|
189
|
+
| Support tickets, KB, escalation, SLA tracking | `@rune-pro/support` | `extensions/pro-support/PACK.md` |
|
|
190
|
+
| Budget, expense, revenue forecast, P&L, cash flow | `@rune-pro/finance` | `extensions/pro-finance/PACK.md` |
|
|
191
|
+
| Contract review, NDA, compliance, GDPR, IP audit | `@rune-pro/legal` | `extensions/pro-legal/PACK.md` |
|
|
162
192
|
|
|
163
193
|
**L4 routing rules:**
|
|
164
|
-
1. If user explicitly invokes an L4 trigger (e.g., `/rune rag-patterns`), read the PACK.md
|
|
194
|
+
1. If user explicitly invokes an L4 trigger (e.g., `/rune rag-patterns`), read the PACK.md index first, then load only the matching skill file (split packs) or extract the matching section (monolith packs)
|
|
165
195
|
2. If the intent also involves implementation, route to `cook` (L1) first — cook will detect L4 context in Phase 1.5
|
|
166
196
|
3. L4 packs supplement L1/L2 workflows — they are domain knowledge, not standalone orchestrators
|
|
167
197
|
4. L4 packs can call L3 utilities (scout, verification) but CANNOT call L1 or L2 skills
|
|
168
198
|
5. If the L4 pack file is not found on disk, skip silently and proceed with standard routing
|
|
199
|
+
6. **NEVER load an entire split pack** — always load index first, then only the specific skill file needed
|
|
200
|
+
|
|
201
|
+
### Step 1.5 — File Ownership Matrix (Constraint Inheritance)
|
|
202
|
+
|
|
203
|
+
When the routed skill produces file changes, the **owner skill's constraints** apply to those files — even if a different skill (e.g., cook) is the orchestrator.
|
|
204
|
+
|
|
205
|
+
| File Pattern | Owner Skill | Constraints Applied |
|
|
206
|
+
|---|---|---|
|
|
207
|
+
| `*.test.*`, `*.spec.*`, `__tests__/` | `rune:test` | Test patterns, assertions, no `test.skip`, coverage rules |
|
|
208
|
+
| `migrations/`, `schema.*`, `*.prisma` | `rune:db` | Migration safety, rollback script, parameterized queries |
|
|
209
|
+
| `Dockerfile`, `*.yml` (CI/CD), `terraform/` | `rune:deploy` | Deployment checklist, no hardcoded secrets |
|
|
210
|
+
| `docs/*.md`, `README.md`, `CHANGELOG.md` | `rune:docs` | Documentation patterns, no stale references |
|
|
211
|
+
| `SKILL.md`, `PACK.md` | `rune:skill-forge` | Skill template compliance, frontmatter validation |
|
|
212
|
+
| `.env*`, `*secret*`, `*credential*` | `rune:sentinel` | Security scan mandatory, never commit secrets |
|
|
213
|
+
| `*.css`, `*.scss`, `tailwind.config.*` | `@rune/ui` | Design system patterns (if L4 pack installed) |
|
|
214
|
+
|
|
215
|
+
**Ownership rules:**
|
|
216
|
+
1. Ownership = **constraints apply**, NOT exclusive access. cook can modify test files during Phase 4 as long as test constraints are honored.
|
|
217
|
+
2. If a file matches multiple patterns, ALL matching constraints apply (union, not exclusive).
|
|
218
|
+
3. If no pattern matches, the routed skill's own constraints apply (default behavior).
|
|
219
|
+
4. File ownership is checked DURING implementation, not at routing time — it augments, not replaces, skill routing.
|
|
169
220
|
|
|
170
221
|
### Step 2 — Compound Intent Resolution
|
|
171
222
|
|
|
@@ -235,9 +286,22 @@ These DO NOT need skill routing:
|
|
|
235
286
|
|
|
236
287
|
## Output Format
|
|
237
288
|
|
|
289
|
+
### Routing Proof (Required in Every Code Response)
|
|
290
|
+
|
|
291
|
+
Every response that involves code changes MUST begin with a routing proof line:
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
> Routed: rune:<skill> | Type: CODE_CHANGE | Confidence: HIGH
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
This is NOT optional formatting. It is evidence that routing occurred. If this line is missing from a code response, the response violated skill-router compliance. For LITE enforcement (QUESTION, EXPLORE), the proof line is optional.
|
|
298
|
+
|
|
299
|
+
### Full Routing Decision (when announcing route)
|
|
300
|
+
|
|
238
301
|
```
|
|
239
302
|
## Routing Decision
|
|
240
303
|
- **Intent**: [classified user intent]
|
|
304
|
+
- **Type**: CODE_CHANGE | QUESTION | DEBUG_REQUEST | REVIEW_REQUEST | EXPLORE
|
|
241
305
|
- **Skill**: rune:[skill-name]
|
|
242
306
|
- **Confidence**: HIGH | MEDIUM | LOW
|
|
243
307
|
- **Override**: [routing override applied, if any]
|
|
@@ -278,6 +342,24 @@ For multi-skill chains:
|
|
|
278
342
|
- Success = every agent response passes through routing check
|
|
279
343
|
- Failure = any code written without skill invocation
|
|
280
344
|
|
|
345
|
+
## Self-Verification Trigger (MANDATORY)
|
|
346
|
+
|
|
347
|
+
<HARD-GATE>
|
|
348
|
+
Before EVERY response, complete this 3-point self-check:
|
|
349
|
+
|
|
350
|
+
1. **Did I classify this request?** (Step 0.25 — what type is it?)
|
|
351
|
+
2. **Did I route through a skill?** (Step 1-2 — which skill handles this?)
|
|
352
|
+
3. **Am I about to write code without a skill invocation?** → **STOP. Route first.**
|
|
353
|
+
|
|
354
|
+
If the request type is `CODE_CHANGE` or `DEBUG_REQUEST` (FULL enforcement) and ANY answer is "no":
|
|
355
|
+
→ DO NOT RESPOND. Complete routing first.
|
|
356
|
+
|
|
357
|
+
If the request type is `QUESTION` or `EXPLORE` (LITE enforcement):
|
|
358
|
+
→ Check if a skill has relevant domain knowledge. If yes, route. If no, respond directly.
|
|
359
|
+
|
|
360
|
+
**User override**: If user explicitly says "skip routing", "just write it", "no process" → respect the override. Log: "User override: routing skipped per explicit request."
|
|
361
|
+
</HARD-GATE>
|
|
362
|
+
|
|
281
363
|
## Cost Profile
|
|
282
364
|
|
|
283
365
|
~0 tokens (routing logic is internalized from this document). Cost comes from the skills it routes to, not from skill-router itself. The routing table is loaded once and cached in context.
|
package/skills/team/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ context: fork
|
|
|
5
5
|
agent: general-purpose
|
|
6
6
|
metadata:
|
|
7
7
|
author: runedev
|
|
8
|
-
version: "0.
|
|
8
|
+
version: "0.4.0"
|
|
9
9
|
layer: L1
|
|
10
10
|
model: opus
|
|
11
11
|
group: orchestrator
|
|
@@ -250,6 +250,29 @@ Error recovery:
|
|
|
250
250
|
→ Present to user for decision before continuing
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
+
**3c. Evaluate subagent status per stream.**
|
|
254
|
+
|
|
255
|
+
Each cook instance MUST have returned one of four statuses. Team handles them as follows:
|
|
256
|
+
|
|
257
|
+
| Cook Status | Team Action |
|
|
258
|
+
|-------------|-------------|
|
|
259
|
+
| `DONE` | Stream cleared for merge — proceed normally |
|
|
260
|
+
| `DONE_WITH_CONCERNS` | Stream cleared for merge, BUT trigger **cross-workstream review**: check if the concern impacts any other stream's files or contracts before merging ALL streams. Log concern in Team Report. |
|
|
261
|
+
| `NEEDS_CONTEXT` | Stream paused — present the specific question to user. Resume that stream after answer. Other independent streams may continue in parallel. |
|
|
262
|
+
| `BLOCKED` | Stream blocked from merge. If stream has no dependents → continue with remaining streams and report partial completion. If stream has dependents → STOP all dependent streams, present to user with full blocker details. |
|
|
263
|
+
|
|
264
|
+
**Cross-workstream review (triggered by any DONE_WITH_CONCERNS)**:
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
1. Read the concern from the cook report
|
|
268
|
+
2. Check if the concern touches shared contracts, interfaces, or shared files
|
|
269
|
+
→ Use Grep to find the concern's affected symbols/files across all worktrees
|
|
270
|
+
3. If concern is isolated to stream's own files → proceed to merge (concern logged only)
|
|
271
|
+
4. If concern crosses stream boundaries → resolve before merge:
|
|
272
|
+
→ Present to user with: affected streams, concern details, two remediation options
|
|
273
|
+
→ Do NOT merge any stream until user decides
|
|
274
|
+
```
|
|
275
|
+
|
|
253
276
|
Mark todo[2] `completed`.
|
|
254
277
|
|
|
255
278
|
---
|
package/skills/test/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: test
|
|
|
3
3
|
description: "TDD test writer. Writes failing tests FIRST (red), then verifies they pass after implementation (green). Covers unit, integration, and e2e tests."
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.3.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: development
|
|
@@ -23,6 +23,13 @@ THE IRON LAW: Write code before test? DELETE IT. Start over.
|
|
|
23
23
|
- Do NOT look at it to "inform" test design
|
|
24
24
|
- Delete means delete. `git checkout -- <file>` or remove the changes entirely.
|
|
25
25
|
This is not negotiable. This is not optional. "But I already wrote it" is a sunk cost fallacy.
|
|
26
|
+
|
|
27
|
+
ROLE BOUNDARY: Test writes TEST FILES only. NEVER modify source/implementation files.
|
|
28
|
+
- Do NOT "quickly fix" a broken import in source to make tests run
|
|
29
|
+
- Do NOT refactor source code to be "more testable"
|
|
30
|
+
- Do NOT add missing exports to source files
|
|
31
|
+
- If source needs changes → hand off to `rune:fix`. Test's job ends at the test file.
|
|
32
|
+
This separation ensures test never writes code biased toward passing its own tests.
|
|
26
33
|
</HARD-GATE>
|
|
27
34
|
|
|
28
35
|
## Instructions
|
|
@@ -144,6 +151,23 @@ After GREEN phase, call `verification` to check coverage threshold (80% minimum)
|
|
|
144
151
|
- If coverage drops below 80%: identify uncovered lines, write additional tests
|
|
145
152
|
- Report coverage gaps with file:line references
|
|
146
153
|
|
|
154
|
+
### Phase 6.5: Diff-Aware Mode (optional)
|
|
155
|
+
|
|
156
|
+
When invoked with `mode: "diff-aware"` or by `cook` after implementation:
|
|
157
|
+
|
|
158
|
+
1. Run `git diff main --name-only` to get changed files
|
|
159
|
+
2. For each changed file, trace its **blast radius**: what imports it? what routes does it serve? what components render it?
|
|
160
|
+
3. Map changed files → affected routes/endpoints/pages
|
|
161
|
+
4. Prioritize tests: files with most downstream dependents get tested first
|
|
162
|
+
5. Generate targeted test commands that cover ONLY affected paths — skip unchanged modules
|
|
163
|
+
|
|
164
|
+
This mode is valuable for large codebases where running the full suite is slow. It answers: "what could this diff have broken?"
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Input: git diff main --name-only
|
|
168
|
+
Output: Prioritized test plan targeting only affected paths
|
|
169
|
+
```
|
|
170
|
+
|
|
147
171
|
## Test Types
|
|
148
172
|
|
|
149
173
|
| Type | When | Framework | Speed |
|
|
@@ -152,6 +176,7 @@ After GREEN phase, call `verification` to check coverage threshold (80% minimum)
|
|
|
152
176
|
| Integration | API endpoints, DB operations | supertest/httpx/reqwest | Medium |
|
|
153
177
|
| E2E | Critical user flows | Playwright/Cypress via browser-pilot | Slow |
|
|
154
178
|
| Regression | After bug fixes | Same as unit | Fast |
|
|
179
|
+
| Diff-aware | After implementation, large codebases | Same as unit + integration | Fast (targeted) |
|
|
155
180
|
|
|
156
181
|
## Error Recovery
|
|
157
182
|
|
|
@@ -214,6 +239,7 @@ If you catch yourself with ANY of these, delete implementation code and restart
|
|
|
214
239
|
7. MUST NOT say "tests pass" without showing actual test runner output
|
|
215
240
|
8. MUST delete implementation code written before tests — Iron Law, no exceptions
|
|
216
241
|
9. MUST show RED phase output (actual failure) — "I confirmed they fail" without output is REJECTED
|
|
242
|
+
10. MUST NOT modify source/implementation files — test writes test files ONLY, hand off source changes to rune:fix
|
|
217
243
|
|
|
218
244
|
## Mesh Gates
|
|
219
245
|
|
|
@@ -256,6 +282,7 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
256
282
|
| Testing mock behavior instead of real code | HIGH | Constraint 4: test what the real code does, not what the mock returns |
|
|
257
283
|
| Coverage below 80% without filling gaps | MEDIUM | Coverage Gate: identify uncovered lines and write additional tests |
|
|
258
284
|
| Introducing a new test framework instead of using existing one | MEDIUM | Constraint 6: detect framework first, use project's existing one always |
|
|
285
|
+
| Modifying source files to make tests work | HIGH | Role boundary: test writes test files ONLY — source changes go to rune:fix |
|
|
259
286
|
|
|
260
287
|
## Done When
|
|
261
288
|
|
|
@@ -3,7 +3,7 @@ name: verification
|
|
|
3
3
|
description: "Universal verification runner. Runs lint, type-check, tests, and build. Use after any code change to verify nothing is broken."
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.4.0"
|
|
7
7
|
layer: L3
|
|
8
8
|
model: haiku
|
|
9
9
|
group: validation
|
|
@@ -98,6 +98,91 @@ If build fails: record first 20 lines of build output, mark as FAIL.
|
|
|
98
98
|
|
|
99
99
|
Compile all results into the structured report. Update all TodoWrite items to completed.
|
|
100
100
|
|
|
101
|
+
### 3-Level Artifact Verification
|
|
102
|
+
|
|
103
|
+
> From GSD (gsd-build/get-shit-done, 30.8k★): "Task done ≠ Goal achieved."
|
|
104
|
+
|
|
105
|
+
Every file created or modified during implementation must pass ALL 3 levels:
|
|
106
|
+
|
|
107
|
+
**Level 1 — EXISTS**: File is on disk, non-empty.
|
|
108
|
+
```
|
|
109
|
+
Glob("path/to/expected/file") → found
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Level 2 — SUBSTANTIVE**: Contains real logic, NOT a stub. Scan for these stub patterns:
|
|
113
|
+
|
|
114
|
+
| Pattern | Language | Meaning |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| Component returns only `<div>Placeholder</div>` or `<div>TODO</div>` | React/Vue | Stub component |
|
|
117
|
+
| Route returns `{ message: "Not implemented" }` or `res.status(501)` | API | Stub endpoint |
|
|
118
|
+
| Function body is only `return null` / `return {}` / `return []` / `pass` | Any | Stub function |
|
|
119
|
+
| Class with all methods throwing `NotImplementedError` | Python/Java | Stub class |
|
|
120
|
+
| `useEffect` with empty body / `async function` with no `await` | React/JS | Hollow implementation |
|
|
121
|
+
| File has only type/interface exports but no implementation | TypeScript | Stub types-only file |
|
|
122
|
+
| `// TODO` or `# TODO` as the only content in a function | Any | Placeholder |
|
|
123
|
+
|
|
124
|
+
If ANY stub pattern detected → mark file as STUB, Level 2 FAIL.
|
|
125
|
+
|
|
126
|
+
**Level 3 — WIRED**: Actually imported/called/used by the rest of the system.
|
|
127
|
+
|
|
128
|
+
| File Type | Wiring Check |
|
|
129
|
+
|---|---|
|
|
130
|
+
| Component | `Grep("<ComponentName")` in parent files → ≥1 consumer |
|
|
131
|
+
| API route | `Grep("fetch\\|axios\\|api.*endpoint")` for this path → ≥1 caller |
|
|
132
|
+
| Hook | `Grep("useHookName(")` → ≥1 consumer |
|
|
133
|
+
| Utility function | `Grep("import.*from.*this-file")` → ≥1 importer |
|
|
134
|
+
| DB model/schema | `Grep("ModelName\\|table_name")` in query files → ≥1 reference |
|
|
135
|
+
| CSS/style module | `Grep("import.*from.*this-style")` → ≥1 importer |
|
|
136
|
+
|
|
137
|
+
If file has 0 consumers → mark as UNWIRED, Level 3 FAIL.
|
|
138
|
+
|
|
139
|
+
**Exception**: Entry-point files (main.ts, index.ts, App.tsx, routes config) are exempt from Level 3 — they ARE the top-level consumers.
|
|
140
|
+
|
|
141
|
+
<HARD-GATE name="3-level-verification">
|
|
142
|
+
ALL new files must pass Level 1 + Level 2 + Level 3.
|
|
143
|
+
EXISTS but STUB = "Existence Theater" — agent created files but didn't implement them.
|
|
144
|
+
EXISTS and SUBSTANTIVE but UNWIRED = dead code — created but never connected.
|
|
145
|
+
Report which level failed for each file in the Verification Report.
|
|
146
|
+
</HARD-GATE>
|
|
147
|
+
|
|
148
|
+
### Artifact Output Verification
|
|
149
|
+
|
|
150
|
+
> Inspired by CLI-Anything (HKUDS/CLI-Anything, 14.5k★): "Never trust exit 0."
|
|
151
|
+
> Many tools exit 0 even when they fail silently. Always verify ACTUAL output.
|
|
152
|
+
|
|
153
|
+
After each phase command, verify that the expected artifact or indicator is present:
|
|
154
|
+
|
|
155
|
+
**Test output** — scan stdout for the pass/fail summary line:
|
|
156
|
+
- Vitest/Jest: look for `X passed`, `X failed` — if neither appears, output is incomplete
|
|
157
|
+
- Pytest: look for `X passed` or `X failed` — exit 0 with no summary = runner crashed silently
|
|
158
|
+
- If only exit code available and no summary line found → mark as INCOMPLETE, not PASS
|
|
159
|
+
|
|
160
|
+
**Build output** — after `npm run build` / `cargo build` / `go build`:
|
|
161
|
+
- Verify the output file exists: `Glob("dist/**/*.js")` or equivalent
|
|
162
|
+
- Verify file size > 0 bytes: a zero-byte output = silent truncation failure
|
|
163
|
+
- If output directory is missing → FAIL even if command exited 0
|
|
164
|
+
|
|
165
|
+
**Lint output** — parse stdout for counts, not just exit code:
|
|
166
|
+
- ESLint: look for `X problems (Y errors, Z warnings)` — `0 problems` = PASS
|
|
167
|
+
- Ruff/Flake8: zero output lines = PASS; any file:line output = FAIL
|
|
168
|
+
- If linter exits 0 but output contains `error` keyword → log as suspicious, mark WARN
|
|
169
|
+
|
|
170
|
+
**Generated files** — check magic bytes for binary outputs:
|
|
171
|
+
- PDF: first bytes must be `%PDF` — use `Bash("head -c 4 file.pdf")`
|
|
172
|
+
- ZIP/XLSX/DOCX: first bytes must be `PK` (ZIP magic) — use `Bash("head -c 2 file.zip")`
|
|
173
|
+
- File size must exceed minimum threshold (PDF > 1KB, ZIP > 100 bytes)
|
|
174
|
+
|
|
175
|
+
**Type check** — do not trust exit code alone:
|
|
176
|
+
- TypeScript `tsc --noEmit`: look for `Found X errors` or absence of error lines
|
|
177
|
+
- `Found 0 errors` = PASS; any other count = FAIL
|
|
178
|
+
- Empty output from `tsc` = PASS (no errors emitted) — note explicitly
|
|
179
|
+
|
|
180
|
+
<HARD-GATE name="artifact-verification">
|
|
181
|
+
Verification MUST check actual command output for success indicators, not just exit codes.
|
|
182
|
+
Exit 0 without a confirming output artifact or success string = UNVERIFIED.
|
|
183
|
+
Report the specific line that confirmed success (e.g., "3 passed, 0 failed").
|
|
184
|
+
</HARD-GATE>
|
|
185
|
+
|
|
101
186
|
## Error Recovery
|
|
102
187
|
|
|
103
188
|
- If project type cannot be detected: report "Unknown project type" and skip all checks
|
|
@@ -130,6 +215,13 @@ Types: [PASS/FAIL/SKIP] ([X errors])
|
|
|
130
215
|
Tests: [PASS/FAIL/SKIP] ([passed]/[total], [coverage]%)
|
|
131
216
|
Build: [PASS/FAIL/SKIP]
|
|
132
217
|
|
|
218
|
+
### 3-Level File Verification
|
|
219
|
+
| File | L1 Exists | L2 Substantive | L3 Wired | Verdict |
|
|
220
|
+
|------|-----------|----------------|----------|---------|
|
|
221
|
+
| src/auth/login.ts | ✓ | ✓ | ✓ (imported by routes.ts) | PASS |
|
|
222
|
+
| src/auth/reset.ts | ✓ | STUB (returns null) | — | FAIL L2 |
|
|
223
|
+
| src/utils/format.ts | ✓ | ✓ | UNWIRED (0 importers) | FAIL L3 |
|
|
224
|
+
|
|
133
225
|
Overall: [PASS/FAIL]
|
|
134
226
|
|
|
135
227
|
### Failures (if any)
|
|
@@ -137,6 +229,8 @@ Overall: [PASS/FAIL]
|
|
|
137
229
|
- Types: [first 5 type errors]
|
|
138
230
|
- Tests: [first 5 failing test names]
|
|
139
231
|
- Build: [first 5 build errors]
|
|
232
|
+
- Stubs: [files that failed Level 2 with stub pattern detected]
|
|
233
|
+
- Unwired: [files that failed Level 3 with 0 consumers]
|
|
140
234
|
```
|
|
141
235
|
|
|
142
236
|
## Evidence-Before-Claims Gate
|
|
@@ -187,6 +281,9 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
187
281
|
| Marking check as PASS when the tool isn't installed | MEDIUM | Mark as SKIP (not PASS) — PASS means the tool ran and reported clean |
|
|
188
282
|
| Stopping after first failure instead of running remaining checks | MEDIUM | Run all checks; aggregate all failures so developer can fix everything at once |
|
|
189
283
|
| Reporting PASS when output has warnings but zero errors | LOW | PASS is correct but note warning count — caller decides if warnings matter |
|
|
284
|
+
| Trusting exit code 0 without output verification | CRITICAL | Artifact Verification HARD-GATE: always confirm success indicator in stdout (pass count, "0 errors", output file exists) |
|
|
285
|
+
| Existence Theater — file exists but is a stub | HIGH | 3-Level check: Level 2 scans for stub patterns (`<div>Placeholder</div>`, `return null`, `NotImplementedError`) |
|
|
286
|
+
| Dead code — file created but never imported/used | MEDIUM | 3-Level check: Level 3 greps for consumers. 0 importers = UNWIRED |
|
|
190
287
|
|
|
191
288
|
## Done When
|
|
192
289
|
|