@rune-kit/rune 2.2.6 → 2.3.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.
- package/README.md +1 -1
- package/docs/SKILL-TEMPLATE.md +15 -0
- package/docs/index.html +76 -7
- package/docs/script.js +33 -6
- package/docs/style.css +62 -0
- package/package.json +7 -5
- package/skills/adversary/SKILL.md +12 -0
- package/skills/audit/SKILL.md +63 -1
- package/skills/autopsy/SKILL.md +12 -0
- package/skills/ba/SKILL.md +9 -0
- package/skills/brainstorm/SKILL.md +11 -0
- package/skills/completion-gate/SKILL.md +15 -1
- package/skills/context-engine/SKILL.md +83 -1
- package/skills/context-pack/SKILL.md +160 -0
- package/skills/cook/SKILL.md +657 -958
- package/skills/cook/references/deviation-rules.md +19 -0
- package/skills/cook/references/error-recovery.md +37 -0
- package/skills/cook/references/exit-conditions.md +31 -0
- package/skills/cook/references/loop-detection.md +39 -0
- package/skills/cook/references/mid-run-signals.md +31 -0
- package/skills/cook/references/output-format.md +40 -0
- package/skills/cook/references/pack-detection.md +82 -0
- package/skills/cook/references/pause-resume-template.md +38 -0
- package/skills/cook/references/rfc-template.md +52 -0
- package/skills/cook/references/sharp-edges.md +24 -0
- package/skills/cook/references/subagent-status.md +38 -0
- package/skills/db/SKILL.md +12 -0
- package/skills/debug/SKILL.md +34 -2
- package/skills/deploy/SKILL.md +10 -0
- package/skills/design/SKILL.md +9 -0
- package/skills/docs/SKILL.md +12 -0
- package/skills/docs-seeker/SKILL.md +11 -0
- package/skills/fix/SKILL.md +36 -3
- package/skills/incident/SKILL.md +10 -0
- package/skills/launch/SKILL.md +12 -0
- package/skills/logic-guardian/SKILL.md +11 -0
- package/skills/marketing/SKILL.md +13 -0
- package/skills/mcp-builder/SKILL.md +13 -0
- package/skills/onboard/SKILL.md +54 -2
- package/skills/perf/SKILL.md +11 -0
- package/skills/plan/SKILL.md +342 -688
- package/skills/plan/references/completeness-scoring.md +37 -0
- package/skills/plan/references/outcome-block.md +41 -0
- package/skills/plan/references/plan-templates.md +193 -0
- package/skills/plan/references/wave-planning.md +44 -0
- package/skills/plan/references/workflow-registry.md +53 -0
- package/skills/preflight/SKILL.md +86 -1
- package/skills/rescue/SKILL.md +10 -0
- package/skills/retro/SKILL.md +11 -0
- package/skills/review/SKILL.md +100 -1
- package/skills/review-intake/SKILL.md +11 -0
- package/skills/safeguard/SKILL.md +12 -0
- package/skills/scaffold/SKILL.md +10 -0
- package/skills/scope-guard/SKILL.md +11 -0
- package/skills/scout/SKILL.md +9 -0
- package/skills/sentinel/SKILL.md +307 -425
- package/skills/sentinel/references/config-protection.md +52 -0
- package/skills/sentinel/references/destructive-commands.md +40 -0
- package/skills/sentinel/references/domain-hooks.md +73 -0
- package/skills/sentinel/references/framework-patterns.md +46 -0
- package/skills/sentinel/references/owasp-patterns.md +69 -0
- package/skills/sentinel/references/secret-patterns.md +40 -0
- package/skills/sentinel/references/skill-content-guard.md +55 -0
- package/skills/session-bridge/SKILL.md +60 -2
- package/skills/skill-forge/SKILL.md +47 -2
- package/skills/skill-router/SKILL.md +33 -1
- package/skills/surgeon/SKILL.md +12 -0
- package/skills/team/SKILL.md +35 -1
- package/skills/test/SKILL.md +167 -1
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.6.0"
|
|
9
9
|
layer: L1
|
|
10
10
|
model: opus
|
|
11
11
|
group: orchestrator
|
|
@@ -66,6 +66,28 @@ Lite Mode Phases:
|
|
|
66
66
|
|
|
67
67
|
Standard team workflow with worktree isolation (Phases 1-5 as documented below).
|
|
68
68
|
|
|
69
|
+
### Complexity Tiers (DAG Stage Selection)
|
|
70
|
+
|
|
71
|
+
Before decomposing, classify the task into a complexity tier. Each tier defines a different DAG (directed acyclic graph) of stages, ensuring the right amount of process for the task's complexity.
|
|
72
|
+
|
|
73
|
+
| Tier | Signals | DAG Stages | Context Windows |
|
|
74
|
+
|------|---------|------------|-----------------|
|
|
75
|
+
| **Trivial** | ≤3 files, single module, no shared contracts | impl → test | 1 (single cook) |
|
|
76
|
+
| **Medium** | 4-10 files, 2-3 modules, shared interfaces | research → plan → impl → test → review → fix | 3 (plan, impl+test, review+fix) |
|
|
77
|
+
| **Large** | 10+ files, 3+ modules, breaking changes or RFC | research → plan → impl → test → review₁ → fix → review₂ → final merge | 4+ (plan, impl+test, review₁+fix, review₂+merge) |
|
|
78
|
+
|
|
79
|
+
**Key principle — reviewer isolation**: The agent that writes code MUST NOT review its own code. Each review stage uses a **separate context window** (separate Task invocation) that has never seen the implementation reasoning. This prevents author bias from contaminating the review.
|
|
80
|
+
|
|
81
|
+
**Stage → Context Window mapping**:
|
|
82
|
+
- `research + plan` = Context Window 1 (opus — architectural reasoning)
|
|
83
|
+
- `impl + test` = Context Window 2 (sonnet — code writing)
|
|
84
|
+
- `review₁ + fix` = Context Window 3 (sonnet — fresh eyes, no impl context)
|
|
85
|
+
- `review₂ + merge` = Context Window 4 (sonnet — final verification, Large tier only)
|
|
86
|
+
|
|
87
|
+
**Merge queue**: When multiple streams complete at different times, use dependency order for merging. If a later stream's merge creates conflicts with an already-merged stream, provide the conflicting stream's cook report as **conflict context** to the resolution agent — never resolve blindly.
|
|
88
|
+
|
|
89
|
+
> Source: affaan-m/everything-claude-code (91.9k★) — RFC-driven DAG orchestration with reviewer isolation.
|
|
90
|
+
|
|
69
91
|
## Calls (outbound)
|
|
70
92
|
|
|
71
93
|
- `plan` (L2): high-level task decomposition into independent workstreams
|
|
@@ -433,6 +455,16 @@ Dependent streams → SEQUENTIAL (respecting dependency order)
|
|
|
433
455
|
All streams done → MERGE sequentially (avoid conflicts)
|
|
434
456
|
```
|
|
435
457
|
|
|
458
|
+
## Returns
|
|
459
|
+
|
|
460
|
+
| Artifact | Format | Location |
|
|
461
|
+
|----------|--------|----------|
|
|
462
|
+
| Workstream assignments | Markdown (inline) | NEXUS Handoff Templates emitted per stream |
|
|
463
|
+
| Cook Reports (per stream) | Markdown (inline) | Collected from each parallel cook instance |
|
|
464
|
+
| Merged implementation | Source files | `main` branch after Phase 4 merge |
|
|
465
|
+
| Integration test results | Inline stdout | Captured in Phase 5 verify |
|
|
466
|
+
| Team Report | Markdown (inline) | Emitted at end of session |
|
|
467
|
+
|
|
436
468
|
## Sharp Edges
|
|
437
469
|
|
|
438
470
|
Known failure modes for this skill. Check these before declaring done.
|
|
@@ -464,3 +496,5 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
464
496
|
## Cost Profile
|
|
465
497
|
|
|
466
498
|
~$0.20-0.50 per session. Opus for coordination. Most expensive orchestrator but handles largest tasks.
|
|
499
|
+
|
|
500
|
+
**Scope guardrail**: Do not invoke launch, rescue, or scaffold autonomously unless explicitly delegated by the parent agent.
|
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: "
|
|
6
|
+
version: "1.1.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: development
|
|
@@ -242,6 +242,52 @@ For non-trivial features (3+ test files or 20+ test cases), create a `TEST.md` i
|
|
|
242
242
|
|
|
243
243
|
**Why TEST.md**: Planning tests before code catches missing edge cases early. Appending results creates permanent evidence. One document = complete testing story.
|
|
244
244
|
|
|
245
|
+
## Skill Behavior Tests (Eval Scenarios)
|
|
246
|
+
|
|
247
|
+
For testing SKILL.md behavior (not code), use **Eval Scenarios** — unit tests for skill files, not code files.
|
|
248
|
+
|
|
249
|
+
### Eval Scenario Format
|
|
250
|
+
|
|
251
|
+
```markdown
|
|
252
|
+
## Eval: E[NN] — [scenario name]
|
|
253
|
+
|
|
254
|
+
### Prompt
|
|
255
|
+
[The exact situation/message an agent receives]
|
|
256
|
+
|
|
257
|
+
### Expected Reasoning
|
|
258
|
+
[Step-by-step reasoning the agent SHOULD follow]
|
|
259
|
+
|
|
260
|
+
### Must Include
|
|
261
|
+
- [Assertion 1: what the output MUST contain or do]
|
|
262
|
+
- [Assertion 2]
|
|
263
|
+
|
|
264
|
+
### Must NOT
|
|
265
|
+
- [Anti-pattern 1: what the output MUST NOT do]
|
|
266
|
+
- [Anti-pattern 2]
|
|
267
|
+
|
|
268
|
+
### Category
|
|
269
|
+
happy-path | adversarial | edge-case | jailbreak | credential-leak
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Eval Coverage Requirements
|
|
273
|
+
|
|
274
|
+
A skill is **behavior-tested** when it has evals covering:
|
|
275
|
+
|
|
276
|
+
| Category | Min Evals | Purpose |
|
|
277
|
+
|----------|-----------|---------|
|
|
278
|
+
| Happy path | 1 | Core workflow executes correctly |
|
|
279
|
+
| Edge case | 1 | Empty input, missing context, unusual state |
|
|
280
|
+
| Adversarial | 1 | Time pressure, sunk cost, authority pressure |
|
|
281
|
+
| Jailbreak / injection | 1 | Prompt injection attempt, "ignore instructions" |
|
|
282
|
+
|
|
283
|
+
**Minimum**: 4 evals per skill (1 per category). Security-critical skills (sentinel, safeguard): 8+ evals.
|
|
284
|
+
|
|
285
|
+
### Eval Storage
|
|
286
|
+
|
|
287
|
+
Save eval files as `skills/<name>/evals.md`. Each eval is a numbered scenario (E01–E24 range). skill-forge Phase 7 checks for evals presence before ship.
|
|
288
|
+
|
|
289
|
+
> Source: PhucMPham/zalo-agent-cli (35★) — 24 eval scenario format (E01-E24) with Must Include / Must NOT assertions.
|
|
290
|
+
|
|
245
291
|
## Error Recovery
|
|
246
292
|
|
|
247
293
|
- If test framework not found: ask calling skill to specify, or check `package.json` `devDependencies`
|
|
@@ -298,6 +344,101 @@ For non-trivial features (3+ test files or 20+ test cases), create a `TEST.md` i
|
|
|
298
344
|
| "I mentally tested it" | Mental testing is not testing. Run the command, show the output. |
|
|
299
345
|
| "This is different because..." | It's not. Write the test first. |
|
|
300
346
|
|
|
347
|
+
## Advanced: Oracle-Injection E2E Testing
|
|
348
|
+
|
|
349
|
+
For **data pipelines, AI workflows, and multi-stage processing** where comparing full output structures is impractical, use oracle injection:
|
|
350
|
+
|
|
351
|
+
1. **Generate a UUID oracle token**: `const oracle = crypto.randomUUID()`
|
|
352
|
+
2. **Inject into synthetic input**: embed the oracle in realistic test data that flows through the pipeline
|
|
353
|
+
3. **Run the full pipeline**: input → all stages → output
|
|
354
|
+
4. **Search for oracle in output**: if found → data flowed end-to-end correctly
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
// Example: testing a document processing pipeline
|
|
358
|
+
const oracle = "ORACLE-" + crypto.randomUUID();
|
|
359
|
+
const testDoc = `Meeting notes: discussed ${oracle} integration timeline`;
|
|
360
|
+
const result = await pipeline.process(testDoc);
|
|
361
|
+
assert(result.output.includes(oracle), "Oracle not found — pipeline lost data");
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**When to use**: E2E tests for pipelines with 3+ stages, LLM-based processing, ETL workflows, or any system where output structure is complex/non-deterministic but data preservation is critical.
|
|
365
|
+
|
|
366
|
+
**When NOT to use**: Unit tests, simple CRUD, or when exact output comparison is feasible.
|
|
367
|
+
|
|
368
|
+
> Source: airweave-ai/airweave (6k★) — Bongo oracle-injection pattern for pipeline E2E testing.
|
|
369
|
+
|
|
370
|
+
## Spec→Test Traceability
|
|
371
|
+
|
|
372
|
+
When a plan with acceptance criteria exists (`.rune/features/<name>/plan.md` or phase file), every criterion MUST map to at least one test case.
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
Plan Acceptance Criteria → Test Case → Implementation
|
|
376
|
+
|
|
377
|
+
AC-1: "User can reset password via email" → test_password_reset_sends_email()
|
|
378
|
+
AC-2: "Rate limit: max 3 reset attempts/hour" → test_password_reset_rate_limit()
|
|
379
|
+
AC-3: "Expired tokens rejected" → test_expired_reset_token_rejected()
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Validation step** (after writing tests): Cross-check plan's acceptance criteria against test names. For each criterion:
|
|
383
|
+
- Has test → OK
|
|
384
|
+
- No test → flag as UNTESTED REQUIREMENT (more serious than uncovered lines)
|
|
385
|
+
|
|
386
|
+
**Why this is stronger than coverage**: Coverage checks that lines were EXECUTED. Traceability checks that INTENT was VERIFIED. You can have 100% coverage but miss a requirement if the test doesn't assert the right behavior.
|
|
387
|
+
|
|
388
|
+
**Skip if**: No plan exists (ad-hoc fix), or plan has no acceptance criteria section.
|
|
389
|
+
|
|
390
|
+
> Source: Fission-AI/OpenSpec (32.8k★) — spec→test traceability validates intent, not just lines.
|
|
391
|
+
|
|
392
|
+
## Eval-Driven Development
|
|
393
|
+
|
|
394
|
+
Define **capability evals** and **regression evals** BEFORE writing implementation code. Evals go beyond unit tests — they verify that the agent/system can handle the feature's intent, not just its mechanics.
|
|
395
|
+
|
|
396
|
+
### Two Eval Types
|
|
397
|
+
|
|
398
|
+
| Type | Purpose | Pass Criteria | When |
|
|
399
|
+
|------|---------|---------------|------|
|
|
400
|
+
| **Capability eval** | Can the system do this new thing? | pass@k: ≥1 success in k attempts (k=3-5) | Before implementation |
|
|
401
|
+
| **Regression eval** | Did we break existing behavior? | pass^k: ALL k attempts must pass | After implementation |
|
|
402
|
+
|
|
403
|
+
**pass@k** (capability): At least 1 of k runs succeeds. Used for new features where some variance is acceptable. Threshold: ≥90% pass@3 for standard features, ≥95% pass@5 for critical paths.
|
|
404
|
+
|
|
405
|
+
**pass^k** (regression): ALL k runs must pass. Used for existing behavior that must never break. If ANY run fails, it's a regression. Threshold: 100% pass^3.
|
|
406
|
+
|
|
407
|
+
### Eval File Format
|
|
408
|
+
|
|
409
|
+
Store evals in `.rune/evals/<feature>.md`:
|
|
410
|
+
|
|
411
|
+
```markdown
|
|
412
|
+
# Eval: <feature name>
|
|
413
|
+
|
|
414
|
+
## Capability Evals (pass@k)
|
|
415
|
+
| ID | Description | k | Threshold | Status |
|
|
416
|
+
|----|-------------|---|-----------|--------|
|
|
417
|
+
| CAP-1 | [what the system should be able to do] | 3 | 90% | pending |
|
|
418
|
+
|
|
419
|
+
## Regression Evals (pass^k)
|
|
420
|
+
| ID | Description | k | Status |
|
|
421
|
+
|----|-------------|---|--------|
|
|
422
|
+
| REG-1 | [existing behavior that must not break] | 3 | pending |
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Anti-Pattern: Eval Overfitting
|
|
426
|
+
|
|
427
|
+
Do NOT overfit evals to specific prompts or known examples. Evals should test the **capability**, not the **exact input**.
|
|
428
|
+
|
|
429
|
+
- BAD: `"When user says 'hello', respond with 'Hi there!'"` — tests exact string match
|
|
430
|
+
- GOOD: `"When user greets, respond with a greeting"` — tests capability
|
|
431
|
+
|
|
432
|
+
### Integration with TDD
|
|
433
|
+
|
|
434
|
+
1. Write eval definitions (capability + regression) → `.rune/evals/<feature>.md`
|
|
435
|
+
2. Write unit/integration tests (RED phase) → test files
|
|
436
|
+
3. Implement feature (GREEN phase) → source files
|
|
437
|
+
4. Run evals to verify capability achieved + no regressions
|
|
438
|
+
5. Preflight checks eval results as part of quality gate
|
|
439
|
+
|
|
440
|
+
> Source: affaan-m/everything-claude-code (91.9k★) — eval-driven development with pass@k/pass^k distinction.
|
|
441
|
+
|
|
301
442
|
## Red Flags — STOP and Start Over
|
|
302
443
|
|
|
303
444
|
If you catch yourself with ANY of these, delete implementation code and restart with tests:
|
|
@@ -378,11 +519,34 @@ Partial mock missing fields that downstream code consumes. Your test passes beca
|
|
|
378
519
|
If mock setup is 30 lines and the actual test assertion is 3 lines, the test is testing infrastructure, not behavior. This is a code smell that indicates wrong abstraction level.
|
|
379
520
|
**Gate**: "Is my mock setup longer than my test logic?" → If yes: test at a higher level (integration) or extract mock factories.
|
|
380
521
|
|
|
522
|
+
### Anti-Pattern 6: Test Slop (Framework-Behavior Tests)
|
|
523
|
+
Tests that verify the framework works rather than YOUR code works. If the test would still pass with an empty component/function, it's testing infrastructure.
|
|
524
|
+
**Gate**: "Would this test pass if I deleted my business logic?" → If yes: STOP. Rewrite to test behavior that YOUR code introduces.
|
|
525
|
+
|
|
526
|
+
Examples of test slop:
|
|
527
|
+
- "renders without crashing" (tests that React works, not your component)
|
|
528
|
+
- "route responds with 200" without checking response body (tests Express, not your handler)
|
|
529
|
+
- Asserting a mock was called N times without checking the RESULT of those calls
|
|
530
|
+
- Type existence tests (`typeof result === 'object'`) when you should test the actual value
|
|
531
|
+
|
|
532
|
+
> Source: affaan-m/everything-claude-code (91.9k★) — de-sloppify pattern applied to test writing.
|
|
533
|
+
|
|
381
534
|
**Red flags — any of these means STOP and rethink:**
|
|
382
535
|
- Mock setup longer than test logic
|
|
383
536
|
- `*-mock` test IDs in assertions
|
|
384
537
|
- Methods only called in test files
|
|
385
538
|
- Can't explain in one sentence why a mock is needed
|
|
539
|
+
- Test would pass with empty implementation (test slop)
|
|
540
|
+
|
|
541
|
+
## Returns
|
|
542
|
+
|
|
543
|
+
| Artifact | Format | Location |
|
|
544
|
+
|----------|--------|----------|
|
|
545
|
+
| Test files | Source files | Co-located or `__tests__/` per project convention |
|
|
546
|
+
| Test plan + results | Markdown | `TEST.md` in test directory (non-trivial features only) |
|
|
547
|
+
| Eval scenarios | Markdown | `skills/<name>/evals.md` (for skill behavior testing) |
|
|
548
|
+
| Coverage report | Inline stdout | Shown in Test Report |
|
|
549
|
+
| Test Report | Markdown (inline) | Emitted to calling skill (cook, fix, review) |
|
|
386
550
|
|
|
387
551
|
## Sharp Edges
|
|
388
552
|
|
|
@@ -425,3 +589,5 @@ SELF-VALIDATION (run before emitting Test Report):
|
|
|
425
589
|
## Cost Profile
|
|
426
590
|
|
|
427
591
|
~$0.03-0.08 per invocation. Sonnet for writing tests, Bash for running them. Frequent invocation in TDD workflow.
|
|
592
|
+
|
|
593
|
+
**Scope guardrail**: Do not modify source or implementation files to make tests pass unless explicitly delegated by the parent agent.
|