@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Deviation Rules — When Implementation Diverges from Plan
|
|
2
|
+
|
|
3
|
+
When implementation diverges from the approved plan, classify the deviation and act accordingly.
|
|
4
|
+
|
|
5
|
+
## Rule Table
|
|
6
|
+
|
|
7
|
+
| Rule | Scope | Action | Example |
|
|
8
|
+
|------|-------|--------|---------|
|
|
9
|
+
| R1: Bug fix | Code doesn't work as planned | Auto-fix, continue | Test fails due to typo, missing import |
|
|
10
|
+
| R2: Security fix | Vulnerability discovered | Auto-fix, continue | SQL injection, XSS, hardcoded secret |
|
|
11
|
+
| R3: Blocking fix | Can't proceed without change | Auto-fix, continue | Missing dependency, wrong API signature |
|
|
12
|
+
| R4: Architectural change | Different approach than planned | **ASK user first** | New database table, changed API contract, different library |
|
|
13
|
+
|
|
14
|
+
## Guidance
|
|
15
|
+
|
|
16
|
+
**R1-R3**: Security primitives and correctness fixes are NOT features — fix silently.
|
|
17
|
+
|
|
18
|
+
**R4**: If you catch yourself thinking "this is a better way" — STOP and ask.
|
|
19
|
+
The plan was approved for a reason. Architectural deviations require explicit user consent before proceeding.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Error Recovery — Phase Failure Handling
|
|
2
|
+
|
|
3
|
+
What to do when each phase fails, plus repair operators to use before escalating.
|
|
4
|
+
|
|
5
|
+
## Phase Failure Table
|
|
6
|
+
|
|
7
|
+
| Phase | If this fails... | Do this... |
|
|
8
|
+
|-------|-----------------|------------|
|
|
9
|
+
| 1 UNDERSTAND | scout finds nothing relevant | Proceed with plan, note limited context |
|
|
10
|
+
| 2 PLAN | Task too complex | Break into smaller tasks, consider `rune:team` |
|
|
11
|
+
| 3 TEST | Can't write tests (no test framework) | Skip TDD, write tests after implementation |
|
|
12
|
+
| 4 IMPLEMENT | Fix hits repeated bugs | `rune:debug` (max 3 loops) → re-plan → if still blocked → **Approach Pivot Gate** → `rune:brainstorm(rescue)` |
|
|
13
|
+
| 5a PREFLIGHT | Logic issues found | Fix → re-run preflight |
|
|
14
|
+
| 5b SENTINEL | Security CRITICAL found | Fix immediately → re-run (mandatory) |
|
|
15
|
+
| 5c REVIEW | Code quality issues | Fix CRITICAL/HIGH → re-review (max 2 loops) |
|
|
16
|
+
| 6 VERIFY | Build/lint/type fails | Fix → re-run verification |
|
|
17
|
+
|
|
18
|
+
## Repair Operators (before escalation)
|
|
19
|
+
|
|
20
|
+
When a task fails during Phase 4 (IMPLEMENT), apply these operators in order before escalating.
|
|
21
|
+
|
|
22
|
+
| Operator | When | Action |
|
|
23
|
+
|----------|------|--------|
|
|
24
|
+
| **RETRY** | Transient failure (network, timeout, flaky test) | Re-run same approach, max 2 attempts |
|
|
25
|
+
| **DECOMPOSE** | Task too complex, partial progress | Split into 2-3 smaller tasks, continue |
|
|
26
|
+
| **PRUNE** | Approach fundamentally wrong | Remove failed code, try different approach from plan |
|
|
27
|
+
|
|
28
|
+
## Retry Budget
|
|
29
|
+
|
|
30
|
+
**2 repair attempts per task.**
|
|
31
|
+
|
|
32
|
+
After 2 failures → escalate:
|
|
33
|
+
- Same error both times → `debug` for root cause
|
|
34
|
+
- Different errors → `plan` to redesign the task
|
|
35
|
+
- All approaches exhausted → `brainstorm(rescue)` for alternative category
|
|
36
|
+
|
|
37
|
+
Do NOT ask user until repair budget is spent.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Exit Conditions — Autonomous Loop Caps
|
|
2
|
+
|
|
3
|
+
Every cook invocation inside `team` or autonomous workflows MUST respect these exit conditions.
|
|
4
|
+
These caps prevent runaway loops and force escalation before context exhaustion.
|
|
5
|
+
|
|
6
|
+
## Hard Caps
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
MAX_DEBUG_LOOPS: 3 per error area (already enforced in Phase 4)
|
|
10
|
+
MAX_QUALITY_LOOPS: 2 re-runs of Phase 5 (fix→recheck cycle)
|
|
11
|
+
MAX_REPLAN: 1 re-plan per cook session (Phase 4 re-plan check)
|
|
12
|
+
MAX_PIVOT: 1 approach pivot per cook session (Approach Pivot Gate)
|
|
13
|
+
MAX_FIXES: 30 per session (hard cap — fix's WTF-likelihood self-regulation)
|
|
14
|
+
WTF_THRESHOLD: 20% quality decay risk → STOP fixing, commit progress, re-assess
|
|
15
|
+
TIMEOUT_SIGNAL: If context-watch reports ORANGE, wrap up current phase and checkpoint
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Escalation Chain
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
debug-fix (3x) → re-plan (1x) → approach pivot via brainstorm rescue (1x) → THEN escalate to user
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Never surrender before exhausting the pivot. Never spin indefinitely.
|
|
25
|
+
|
|
26
|
+
## Triggered State
|
|
27
|
+
|
|
28
|
+
If any exit condition triggers without resolution:
|
|
29
|
+
- Cook emits `BLOCKED` status with full details (phase, blocker, what was tried)
|
|
30
|
+
- Execution stops
|
|
31
|
+
- User must make a decision before cook can resume
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Hash-Based Loop Detection — Content-Aware Stuck Detection
|
|
2
|
+
|
|
3
|
+
The Analysis Paralysis Guard (5-read counter in SKILL.md) catches obvious paralysis.
|
|
4
|
+
This catches **same-input-same-output loops** — where the agent keeps calling the same tool
|
|
5
|
+
with the same arguments and getting the same result, making zero progress.
|
|
6
|
+
|
|
7
|
+
Source: goclaw (832★) — SHA256-based loop detection distinguishes true stuck loops from productive retries.
|
|
8
|
+
|
|
9
|
+
## Detection Logic
|
|
10
|
+
|
|
11
|
+
Track mentally (no actual SHA256 required):
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
For each tool call, track:
|
|
15
|
+
argsHash = fingerprint(tool_name + arguments)
|
|
16
|
+
resultHash = fingerprint(result content)
|
|
17
|
+
|
|
18
|
+
IF same argsHash AND same resultHash seen before:
|
|
19
|
+
consecutive_identical += 1
|
|
20
|
+
ELSE:
|
|
21
|
+
consecutive_identical = 0
|
|
22
|
+
|
|
23
|
+
Thresholds:
|
|
24
|
+
3 identical calls → WARN: "Loop detected — same tool, same args, same result 3x. Change approach."
|
|
25
|
+
5 identical calls → FORCE STOP: "True stuck loop. Must try different tool or different arguments."
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Key Distinction
|
|
29
|
+
|
|
30
|
+
Retry-with-different-result is **NOT** a loop (e.g., re-running tests after a fix).
|
|
31
|
+
Only same-input-AND-same-output counts.
|
|
32
|
+
|
|
33
|
+
## Common Loop Patterns
|
|
34
|
+
|
|
35
|
+
| Pattern | Looks Like | Actually |
|
|
36
|
+
|---------|-----------|----------|
|
|
37
|
+
| Re-reading same file after failed edit | `Read(file.ts)` → same content 3x | Agent forgot what it read — act on existing knowledge |
|
|
38
|
+
| Re-running same failing test without code change | `Bash(npm test)` → same failure 3x | No code was changed between runs — fix first, then test |
|
|
39
|
+
| Grepping same pattern across different paths | `Grep("pattern", src/)` → `Grep("pattern", lib/)` → same 0 results | Pattern doesn't exist — change search terms |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Mid-Run Signal Detection — Two-Stage Intent Classification
|
|
2
|
+
|
|
3
|
+
When user sends a message DURING cook execution (mid-phase), classify intent before acting.
|
|
4
|
+
Source: goclaw (832★) — two-stage intent classification prevents expensive LLM calls for simple signals.
|
|
5
|
+
|
|
6
|
+
## Stage 1 — Keyword Fast-Path
|
|
7
|
+
|
|
8
|
+
No LLM reasoning needed. Applies when message is <60 chars.
|
|
9
|
+
|
|
10
|
+
| Pattern | Intent | Action |
|
|
11
|
+
|---------|--------|--------|
|
|
12
|
+
| "stop", "cancel", "dừng", "abort" | `Cancel` | Save progress → emit Cook Report with status BLOCKED → stop |
|
|
13
|
+
| "status", "tiến độ", "progress", "where are you" | `StatusQuery` | Reply with current phase + task + % estimate → resume |
|
|
14
|
+
| "wait", "pause", "đợi" | `Pause` | Create `.rune/.continue-here.md` → WIP commit → stop |
|
|
15
|
+
| "skip this", "bỏ qua", "next" | `Steer` | Skip current task → proceed to next task/phase |
|
|
16
|
+
|
|
17
|
+
## Stage 2 — Context Classification
|
|
18
|
+
|
|
19
|
+
Applies when NO keyword match AND message is >60 chars.
|
|
20
|
+
|
|
21
|
+
| Intent | Signal | Action |
|
|
22
|
+
|--------|--------|--------|
|
|
23
|
+
| `Steer` | Modifies scope but keeps goal ("actually use Redis instead of Memcached") | Update plan inline, note deviation in Cook Report |
|
|
24
|
+
| `NewTask` | Unrelated to current work ("also fix the login page") | Log to `.rune/backlog.md`, continue current task. Announce: "Noted for later — staying on current task." |
|
|
25
|
+
| `Clarification` | Answers a question cook asked, or provides missing context | Absorb into current phase context, resume |
|
|
26
|
+
|
|
27
|
+
## Priority Rule
|
|
28
|
+
|
|
29
|
+
Cancel and Pause are **safety signals** — they take absolute priority over all other classifications.
|
|
30
|
+
If ambiguous between Cancel and Steer → ask: "Did you mean stop, or change approach?"
|
|
31
|
+
Never queue user messages — process immediately.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Cook Report — Output Format
|
|
2
|
+
|
|
3
|
+
Full format for the Cook Report emitted at the end of every cook session.
|
|
4
|
+
Also defines the NEXUS Deliverables table format used when cook is invoked by `team`.
|
|
5
|
+
|
|
6
|
+
## Cook Report Format
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
## Cook Report: [Task Name]
|
|
10
|
+
- **Status**: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
11
|
+
- **Phases**: [list of completed phases]
|
|
12
|
+
- **Files Changed**: [count] ([list])
|
|
13
|
+
- **Tests**: [passed]/[total] ([coverage]%)
|
|
14
|
+
- **Quality**: preflight [PASS/WARN] | sentinel [PASS/WARN] | review [PASS/WARN]
|
|
15
|
+
- **Commit**: [hash] — [message]
|
|
16
|
+
|
|
17
|
+
### Deliverables (NEXUS response — when invoked by team)
|
|
18
|
+
| # | Deliverable | Status | Evidence |
|
|
19
|
+
|---|-------------|--------|----------|
|
|
20
|
+
| 1 | [from handoff] | DELIVERED | [file path or test output quote] |
|
|
21
|
+
| 2 | [from handoff] | DELIVERED | [file path or test output quote] |
|
|
22
|
+
| 3 | [from handoff] | PARTIAL | [what's missing and why] |
|
|
23
|
+
|
|
24
|
+
### Concerns (if DONE_WITH_CONCERNS)
|
|
25
|
+
- [concern]: [impact assessment] — [suggested remediation]
|
|
26
|
+
|
|
27
|
+
### Decisions Made
|
|
28
|
+
- [decision]: [rationale]
|
|
29
|
+
|
|
30
|
+
### Session State
|
|
31
|
+
- Saved to .rune/decisions.md
|
|
32
|
+
- Saved to .rune/progress.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage Rules
|
|
36
|
+
|
|
37
|
+
- When cook is invoked **standalone** (not by team): Deliverables table is optional
|
|
38
|
+
- When cook is invoked by **team** with a NEXUS Handoff: Deliverables table is **MANDATORY** — team uses it to track acceptance criteria across streams
|
|
39
|
+
- Cook Report MUST contain actual commit hash, not placeholder
|
|
40
|
+
- Self-Validation must pass before emitting the report
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# L4 Pack Detection — Signal → Pack Mapping
|
|
2
|
+
|
|
3
|
+
This file defines the full signal-to-pack mapping used in Phase 1.5 (DOMAIN CONTEXT).
|
|
4
|
+
When a signal in the codebase or task description matches a row below, load the corresponding pack.
|
|
5
|
+
|
|
6
|
+
## Split Pack Protocol (context-efficient)
|
|
7
|
+
|
|
8
|
+
- `Read` the matching PACK.md index (~60-80 lines) — contains triggers, skill table, connections, workflows
|
|
9
|
+
- Match the task to the specific skill name in the index's Skills Included table
|
|
10
|
+
- `Read` only the matching skill file(s) from `skills/` subdirectory (e.g., `extensions/backend/skills/auth.md`)
|
|
11
|
+
- Load max 2-3 skill files per invocation — not all skills in the pack
|
|
12
|
+
- Pack-level constraints (from index's Connections and Sharp Edges sections) always apply
|
|
13
|
+
|
|
14
|
+
## Monolith Pack Protocol (legacy)
|
|
15
|
+
|
|
16
|
+
If no `format: split` in PACK.md frontmatter, read the full PACK.md and extract the matching `### skill-name` section.
|
|
17
|
+
|
|
18
|
+
## Signal → Pack Table
|
|
19
|
+
|
|
20
|
+
| Signal in Codebase or Task | Pack | File |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `*.tsx`, `*.svelte`, `*.vue`, Tailwind, CSS modules | `@rune/ui` | `extensions/ui/PACK.md` |
|
|
23
|
+
| Express/Fastify/NestJS routes, API endpoints | `@rune/backend` | `extensions/backend/PACK.md` |
|
|
24
|
+
| Dockerfile, `.github/workflows/`, Terraform | `@rune/devops` | `extensions/devops/PACK.md` |
|
|
25
|
+
| `react-native`, `expo`, `flutter`, `ios/`, `android/` | `@rune/mobile` | `extensions/mobile/PACK.md` |
|
|
26
|
+
| Auth, OWASP, secrets, PCI/HIPAA markers | `@rune/security` | `extensions/security/PACK.md` |
|
|
27
|
+
| Trading, charts, market data, `decimal.js` | `@rune/trading` | `extensions/trading/PACK.md` |
|
|
28
|
+
| Multi-tenant, billing, `stripe`, subscription | `@rune/saas` | `extensions/saas/PACK.md` |
|
|
29
|
+
| Cart, checkout, inventory, Shopify | `@rune/ecommerce` | `extensions/ecommerce/PACK.md` |
|
|
30
|
+
| `openai`, `anthropic`, embeddings, RAG, LLM | `@rune/ai-ml` | `extensions/ai-ml/PACK.md` |
|
|
31
|
+
| `three`, `pixi`, `phaser`, `*.glsl`, game loop | `@rune/gamedev` | `extensions/gamedev/PACK.md` |
|
|
32
|
+
| CMS, blog, MDX, `i18next`, SEO | `@rune/content` | `extensions/content/PACK.md` |
|
|
33
|
+
| Analytics, tracking, A/B test, funnel | `@rune/analytics` | `extensions/analytics/PACK.md` |
|
|
34
|
+
| Chrome extension, `manifest.json`, service worker, content script | `@rune/chrome-ext` | `extensions/chrome-ext/PACK.md` |
|
|
35
|
+
| PRD, roadmap, KPI, release notes, `.rune/business/` | `@rune-pro/product` | `extensions/pro-product/PACK.md` |
|
|
36
|
+
| Sales outreach, pipeline, call prep, competitive intel | `@rune-pro/sales` | `extensions/pro-sales/PACK.md` |
|
|
37
|
+
| Data science, SQL, dashboard, statistical testing, ETL | `@rune-pro/data-science` | `extensions/pro-data-science/PACK.md` |
|
|
38
|
+
| Support ticket, KB article, escalation, SLA, FAQ | `@rune-pro/support` | `extensions/pro-support/PACK.md` |
|
|
39
|
+
| Budget, expense, revenue forecast, P&L, cash flow, runway | `@rune-pro/finance` | `extensions/pro-finance/PACK.md` |
|
|
40
|
+
| Contract, NDA, compliance, GDPR, IP, legal incident | `@rune-pro/legal` | `extensions/pro-legal/PACK.md` |
|
|
41
|
+
| JD, resume, interview, hiring, onboarding, compensation, HR policy | `@rune-pro/hr` | `extensions/pro-hr/PACK.md` |
|
|
42
|
+
| Enterprise search, cross-system, knowledge graph, federated query | `@rune-pro/enterprise-search` | `extensions/pro-enterprise-search/PACK.md` |
|
|
43
|
+
| Zalo Mini App, ZMP, `zalo-mini-app`, ZNS, Zalo OA | `@rune/zalo` | `extensions/zalo/PACK.md` |
|
|
44
|
+
|
|
45
|
+
## After Match Found
|
|
46
|
+
|
|
47
|
+
If ≥1 pack matches:
|
|
48
|
+
- Use `Read` to load the matching PACK.md (index if split, full if monolith)
|
|
49
|
+
- For split packs: identify the relevant skill from the index table, then `Read` only that skill file from `skills/` subdirectory
|
|
50
|
+
- For monolith packs: extract the relevant `### skill-name` section from the PACK.md body
|
|
51
|
+
- Apply pack constraints alongside cook's own constraints for the rest of the workflow
|
|
52
|
+
- Announce: "Loaded @rune/[pack] → [skill-name] (split)" or "Loaded @rune/[pack] → [skill-name] (full)"
|
|
53
|
+
|
|
54
|
+
If 0 packs match: skip silently, proceed to Phase 2.
|
|
55
|
+
|
|
56
|
+
## Workflow Command Detection
|
|
57
|
+
|
|
58
|
+
After a pack is matched, check if the user's request maps to a named workflow in the pack's Workflows table.
|
|
59
|
+
|
|
60
|
+
**Detection rules:**
|
|
61
|
+
1. Explicit command: user types `/rune <pack> <workflow>` (e.g., `/rune finance monthly-close`)
|
|
62
|
+
2. Implicit match: task description contains workflow trigger keywords from the Workflows table
|
|
63
|
+
3. Single-skill shortcut: `/rune <pack> <skill>` routes directly to one skill
|
|
64
|
+
|
|
65
|
+
**If a workflow matches:**
|
|
66
|
+
1. Read the Workflows section of the matched PACK.md
|
|
67
|
+
2. Extract the skill sequence (e.g., `expense-analysis → financial-reporting → cash-flow-optimization`)
|
|
68
|
+
3. Execute skills in order — each skill's output feeds the next as context
|
|
69
|
+
4. Thread state via `.rune/<pack>/` artifacts (each skill reads previous skill's output file)
|
|
70
|
+
|
|
71
|
+
**If no workflow matches:**
|
|
72
|
+
- Fall back to single-skill detection (match task to best skill from the Skills table)
|
|
73
|
+
- This is the current default behavior
|
|
74
|
+
|
|
75
|
+
**Workflow examples:**
|
|
76
|
+
| Command | Pack | Workflow | Skill Sequence |
|
|
77
|
+
|---------|------|----------|----------------|
|
|
78
|
+
| `/rune finance monthly-close` | finance | monthly-close | expense-analysis → financial-reporting → cash-flow |
|
|
79
|
+
| `/rune hr full-cycle` | hr | full-cycle | jd-writer → resume-screener → interview-planner → scorecard |
|
|
80
|
+
| `/rune search "query"` | enterprise-search | search | query-planner → source-connector → result-merger → permission-guard |
|
|
81
|
+
| `/rune sales prep` | sales | prep | account-research → call-preparation → competitive-intel |
|
|
82
|
+
| `/rune product feature` | product | feature | feature-spec → roadmap → metrics-tracking |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Pause/Resume Template — Formal Mid-Phase Handoff
|
|
2
|
+
|
|
3
|
+
This file defines the `.continue-here.md` format used when cook must pause mid-phase
|
|
4
|
+
(context limit, user break, session end before phase completes).
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
When cook cannot complete the current phase in one session:
|
|
9
|
+
- Context limit approaching (context-watch ORANGE)
|
|
10
|
+
- User explicitly requests a break ("pause", "đợi", "wait")
|
|
11
|
+
- Session end is forced before phase completes
|
|
12
|
+
|
|
13
|
+
## `.rune/.continue-here.md` Format
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
## Continue Here
|
|
17
|
+
- **Phase**: [current phase number and name]
|
|
18
|
+
- **Task**: [current task within phase — e.g., "Task 3 of 5"]
|
|
19
|
+
- **Completed**: [list of tasks done this session]
|
|
20
|
+
- **Remaining**: [list of tasks not yet started]
|
|
21
|
+
- **Decisions**: [any decisions made this session]
|
|
22
|
+
- **Blockers**: [if any — what's stuck and why]
|
|
23
|
+
- **WIP Files**: [files modified but not yet committed]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Pause Protocol
|
|
27
|
+
|
|
28
|
+
1. Create `.rune/.continue-here.md` with the format above
|
|
29
|
+
2. Create a WIP commit: `wip: cook phase N paused at task M`
|
|
30
|
+
3. Stop execution
|
|
31
|
+
|
|
32
|
+
## Resume Protocol
|
|
33
|
+
|
|
34
|
+
Phase 0 (RESUME CHECK) detects `.continue-here.md` → resumes from exact task position.
|
|
35
|
+
|
|
36
|
+
This is more granular than Phase 0's plan-level resume — it resumes **within** a phase, not just between phases.
|
|
37
|
+
|
|
38
|
+
After successful resume and phase completion → delete `.continue-here.md`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# RFC Template — Breaking Change Gate
|
|
2
|
+
|
|
3
|
+
This file contains the RFC artifact format used in Phase 2.5 (RFC GATE).
|
|
4
|
+
Write this artifact to `.rune/rfc/RFC-<NNN>-<slug>.md` whenever a breaking change is detected.
|
|
5
|
+
|
|
6
|
+
## Auto-Trigger Conditions (ANY triggers this gate)
|
|
7
|
+
|
|
8
|
+
- Plan includes `BREAKING CHANGE` annotation
|
|
9
|
+
- Plan modifies a public API signature (added/removed/changed parameters)
|
|
10
|
+
- Plan alters database schema (migration required)
|
|
11
|
+
- Plan removes or renames an exported function/type used by other modules
|
|
12
|
+
- Plan changes authentication/authorization flow
|
|
13
|
+
|
|
14
|
+
## Skip Conditions
|
|
15
|
+
|
|
16
|
+
Non-breaking changes, internal refactors, new features with no API surface change.
|
|
17
|
+
|
|
18
|
+
## RFC Artifact Format
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
# RFC-<NNN>: <Title>
|
|
22
|
+
|
|
23
|
+
**Date**: [YYYY-MM-DD]
|
|
24
|
+
**Author**: [agent or user]
|
|
25
|
+
**Status**: Proposed | Approved | Rejected
|
|
26
|
+
**Impact**: [list affected consumers — modules, services, users]
|
|
27
|
+
|
|
28
|
+
## What Changes
|
|
29
|
+
[Specific breaking change — old behavior → new behavior]
|
|
30
|
+
|
|
31
|
+
## Why
|
|
32
|
+
[Business/technical justification — why breaking is necessary]
|
|
33
|
+
|
|
34
|
+
## Migration Path
|
|
35
|
+
[Step-by-step guide for consumers to adapt]
|
|
36
|
+
[Include code examples: before → after]
|
|
37
|
+
|
|
38
|
+
## Rollback Plan
|
|
39
|
+
[How to revert if the change causes issues]
|
|
40
|
+
|
|
41
|
+
## Affected Systems
|
|
42
|
+
| System | Impact | Migration Effort |
|
|
43
|
+
|--------|--------|-----------------|
|
|
44
|
+
| [module/service] | [description] | [low/medium/high] |
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Gate Protocol
|
|
48
|
+
|
|
49
|
+
Present RFC to user for approval. User responds:
|
|
50
|
+
- **"approved"** → proceed to Phase 3
|
|
51
|
+
- **"rejected"** → revise plan
|
|
52
|
+
- **"deferred"** → skip breaking change, implement non-breaking alternative
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Sharp Edges — Known Failure Modes
|
|
2
|
+
|
|
3
|
+
Check these before declaring done. These are the most common ways cook goes wrong.
|
|
4
|
+
|
|
5
|
+
| Failure Mode | Severity | Mitigation |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| Skipping scout to "save time" on a simple task | CRITICAL | Scout Gate blocks this — Phase 1 is mandatory regardless of perceived simplicity |
|
|
8
|
+
| Writing code without user-approved plan | HIGH | Plan Gate: do NOT proceed to Phase 3 without explicit approval ("go", "proceed", "yes") |
|
|
9
|
+
| Claiming "all tests pass" without showing output | HIGH | Constraint 7 blocks this — show actual test runner output via completion-gate |
|
|
10
|
+
| Entering debug↔fix loop more than 3 times without escalating | MEDIUM | After 3 loops → re-plan → if still blocked → Approach Pivot Gate → brainstorm(rescue) |
|
|
11
|
+
| Surrendering "no solution" without triggering Approach Pivot Gate | CRITICAL | MUST invoke brainstorm(rescue) before telling user "can't be done" — pivot to different category first |
|
|
12
|
+
| Re-planning with the same approach category after it fundamentally failed | HIGH | Re-plan = revise steps within same approach. If CATEGORY is wrong → Approach Pivot Gate, not re-plan |
|
|
13
|
+
| Not escalating to sentinel:opus on security-sensitive tasks | MEDIUM | Auth, crypto, payment code → sentinel must run at opus, not sonnet |
|
|
14
|
+
| Running Phase 5 checks sequentially instead of parallel | MEDIUM | Launch preflight+sentinel+review as parallel Task agents for speed |
|
|
15
|
+
| Saying "done" without evidence trail | CRITICAL | completion-gate validates claims — UNCONFIRMED = BLOCK |
|
|
16
|
+
| Analysis paralysis — 5+ reads without writing | HIGH | Analysis Paralysis Guard: act on incomplete info or report BLOCKED with specific missing piece |
|
|
17
|
+
| Fast mode on security-relevant code | HIGH | Fast mode auto-excludes auth/crypto/payments — never fast-track security code |
|
|
18
|
+
| Loading all phase files at once into context | HIGH | Phase File Gate: load ONLY the active phase file — one phase per session |
|
|
19
|
+
| Resuming without checking master plan | MEDIUM | Phase 0 (RESUME CHECK) runs before Phase 1 — detects existing plans |
|
|
20
|
+
| Treating user "stop"/"cancel" as scope change | CRITICAL | Mid-Run Signal Detection: Cancel/Pause are safety signals with absolute priority — never reinterpret as Steer or NewTask |
|
|
21
|
+
| Same tool+args+result called 3+ times without progress | HIGH | Hash-Based Loop Detection: 3x warn, 5x force stop. Only same-input-AND-same-output counts |
|
|
22
|
+
| Ignoring mid-run user messages during autonomous execution | HIGH | Two-stage intent classification: keyword fast-path for simple signals, context for longer. Never queue messages. |
|
|
23
|
+
| Breaking change shipped without RFC review | CRITICAL | Phase 2.5 RFC Gate: any breaking change MUST have RFC artifact + user approval before implementation |
|
|
24
|
+
| Runaway fix loop — fix introduces more bugs than it resolves | HIGH | fix v0.5.0 WTF-likelihood self-regulation: >20% decay = STOP. Hard cap 30 fixes/session via MAX_FIXES exit condition |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Subagent Status Protocol
|
|
2
|
+
|
|
3
|
+
When cook completes (whether standalone or invoked by `team`), it MUST return one of four statuses.
|
|
4
|
+
Sub-skills invoked by cook (fix, test, review, sentinel, etc.) MUST also return one of these statuses
|
|
5
|
+
so cook can route accordingly.
|
|
6
|
+
|
|
7
|
+
## Status Table
|
|
8
|
+
|
|
9
|
+
| Status | Meaning | Cook Action |
|
|
10
|
+
|--------|---------|-------------|
|
|
11
|
+
| `DONE` | Task complete, no issues | Proceed to next phase |
|
|
12
|
+
| `DONE_WITH_CONCERNS` | Task complete but issues noted (e.g., "tests pass but a performance regression observed") | Proceed, but append concern to `.rune/progress.md` and surface in Cook Report; address in Phase 5 (QUALITY) or next review cycle |
|
|
13
|
+
| `NEEDS_CONTEXT` | Cannot proceed without more information (missing requirement, ambiguous spec, unknown environment) | Pause execution. Ask user the specific question(s) blocking progress. Resume from the same phase after answer received. |
|
|
14
|
+
| `BLOCKED` | Hard blocker — cannot continue regardless of context (broken dependency, fundamental incompatibility, exhausted escalation chain) | Trigger escalation chain: debug-fix (3x) → re-plan (1x) → brainstorm rescue (1x) → then escalate to user with full details |
|
|
15
|
+
|
|
16
|
+
## Message Formats
|
|
17
|
+
|
|
18
|
+
### DONE_WITH_CONCERNS
|
|
19
|
+
|
|
20
|
+
Append to `.rune/progress.md`:
|
|
21
|
+
```
|
|
22
|
+
[CONCERN][phase][timestamp] <sub-skill>: <concern description>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### NEEDS_CONTEXT
|
|
26
|
+
|
|
27
|
+
State exactly:
|
|
28
|
+
1. What is unknown
|
|
29
|
+
2. Why it blocks progress
|
|
30
|
+
3. The two most likely answers (to help the user respond quickly)
|
|
31
|
+
|
|
32
|
+
### BLOCKED
|
|
33
|
+
|
|
34
|
+
Include:
|
|
35
|
+
1. The phase
|
|
36
|
+
2. The sub-skill that emitted BLOCKED
|
|
37
|
+
3. The specific blocker
|
|
38
|
+
4. What was already attempted
|
package/skills/db/SKILL.md
CHANGED
|
@@ -251,6 +251,18 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
251
251
|
- Schema changelog updated in .rune/schema-changelog.md
|
|
252
252
|
- Structured DB Report emitted with PASS/WARN/BLOCK verdict
|
|
253
253
|
|
|
254
|
+
## Returns
|
|
255
|
+
|
|
256
|
+
| Artifact | Format | Location |
|
|
257
|
+
|----------|--------|----------|
|
|
258
|
+
| Migration file (up) | SQL or ORM-specific | `migrations/<timestamp>_<name>/` |
|
|
259
|
+
| Rollback script (down) | SQL or ORM-specific | same migration directory |
|
|
260
|
+
| Schema changelog entry | Markdown | `.rune/schema-changelog.md` |
|
|
261
|
+
| Index recommendations | Structured list | inline (DB Report) |
|
|
262
|
+
| DB Report with verdict | Markdown (PASS/WARN/BLOCK) | inline |
|
|
263
|
+
|
|
254
264
|
## Cost Profile
|
|
255
265
|
|
|
256
266
|
~2000-6000 tokens input, ~800-2000 tokens output. Sonnet for migration generation quality.
|
|
267
|
+
|
|
268
|
+
**Scope guardrail:** db generates and validates migrations — it does not run them in production. Execution is delegated to `verification` in test environments only.
|
package/skills/debug/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: debug
|
|
|
3
3
|
description: Root cause analysis for bugs and unexpected behavior. Traces errors through code, uses structured reasoning, and hands off to fix when cause is found. Core of the debug↔fix mesh.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.8.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: development
|
|
@@ -305,6 +305,7 @@ ALL of these mean: STOP. Return to Step 2 (Gather Evidence).
|
|
|
305
305
|
```
|
|
306
306
|
## Debug Report
|
|
307
307
|
- **Error**: [error message]
|
|
308
|
+
- **Status**: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
308
309
|
- **Severity**: critical | high | medium | low
|
|
309
310
|
- **Confidence**: high | medium | low
|
|
310
311
|
- **Fix Attempt**: [1/2/3 — track recurring bugs]
|
|
@@ -323,6 +324,12 @@ ALL of these mean: STOP. Return to Step 2 (Gather Evidence).
|
|
|
323
324
|
- Attempt 1: [what was tried] → [why it didn't hold]
|
|
324
325
|
- Attempt 2: [what was tried] → [why it didn't hold]
|
|
325
326
|
|
|
327
|
+
### Concerns (if DONE_WITH_CONCERNS)
|
|
328
|
+
- [concern]: [impact assessment] — [suggested remediation]
|
|
329
|
+
|
|
330
|
+
### Context Needed (if NEEDS_CONTEXT)
|
|
331
|
+
- [what is unknown]: [why it blocks diagnosis] — [two most likely answers]
|
|
332
|
+
|
|
326
333
|
### Suggested Fix
|
|
327
334
|
[Description of what needs to change — no code, just direction]
|
|
328
335
|
[If attempt 3: "ESCALATION: 3-fix rule triggered. Recommending redesign via rune:plan."]
|
|
@@ -331,6 +338,26 @@ ALL of these mean: STOP. Return to Step 2 (Gather Evidence).
|
|
|
331
338
|
- `path/to/related.ts` — [why it's relevant]
|
|
332
339
|
```
|
|
333
340
|
|
|
341
|
+
### Status Protocol (Subagent Contract)
|
|
342
|
+
|
|
343
|
+
Debug returns one of four statuses to its caller (cook, fix, test, surgeon). The caller uses this to route next actions.
|
|
344
|
+
|
|
345
|
+
| Status | When | Example |
|
|
346
|
+
|--------|------|---------|
|
|
347
|
+
| `DONE` | Root cause identified with high confidence, ready for fix | Clear diagnosis with file:line evidence |
|
|
348
|
+
| `DONE_WITH_CONCERNS` | Root cause found but diagnosis has caveats | "Likely race condition but cannot reproduce consistently — fix may need retry logic" |
|
|
349
|
+
| `NEEDS_CONTEXT` | Cannot diagnose without more info — missing repro steps, env details, or access | "Error only occurs in production — need prod logs or env variables to continue" |
|
|
350
|
+
| `BLOCKED` | Exhausted 3 hypothesis cycles, escalation triggered | "3 cycles completed, no confirmed root cause — escalating to problem-solver" |
|
|
351
|
+
|
|
352
|
+
## Returns
|
|
353
|
+
|
|
354
|
+
| Artifact | Format | Location |
|
|
355
|
+
|----------|--------|----------|
|
|
356
|
+
| Debug Report | Markdown (inline) | Emitted to calling skill (cook, fix, test, surgeon) |
|
|
357
|
+
| Root cause + location | Inline (Debug Report) | Specific file:line with evidence |
|
|
358
|
+
| Fix recommendation | Inline (Debug Report) | Direction only — no code changes |
|
|
359
|
+
| Debug knowledge base entry | Markdown | `.rune/debug/knowledge-base.md` (appended on success) |
|
|
360
|
+
|
|
334
361
|
## Sharp Edges
|
|
335
362
|
|
|
336
363
|
| Failure Mode | Severity | Mitigation |
|
|
@@ -354,9 +381,14 @@ ALL of these mean: STOP. Return to Step 2 (Gather Evidence).
|
|
|
354
381
|
- Error reproduced (not assumed) with specific reproduction steps documented
|
|
355
382
|
- 2-3 hypotheses formed, each marked CONFIRMED or RULED OUT with file:line evidence
|
|
356
383
|
- Root cause identified at specific file:line
|
|
357
|
-
- Structured Debug Report emitted
|
|
384
|
+
- Structured Debug Report emitted with 4-state status
|
|
385
|
+
- If `DONE_WITH_CONCERNS`: caveats documented with impact assessment
|
|
386
|
+
- If `NEEDS_CONTEXT`: specific questions + two likely answers provided
|
|
387
|
+
- If `BLOCKED`: all 3 hypothesis cycles documented + escalation target identified
|
|
358
388
|
- No code changes made — rune:fix called with the report if fix is needed
|
|
359
389
|
|
|
360
390
|
## Cost Profile
|
|
361
391
|
|
|
362
392
|
~2000-5000 tokens input, ~500-1500 tokens output. Sonnet for code analysis quality. May escalate to opus for deeply complex bugs.
|
|
393
|
+
|
|
394
|
+
**Scope guardrail**: Do not apply code changes or expand investigation beyond the locked scope directory unless explicitly delegated by the parent agent.
|
package/skills/deploy/SKILL.md
CHANGED
|
@@ -193,6 +193,16 @@ Deploy Report with platform, status (success/failed/rollback), deployed URL, bui
|
|
|
193
193
|
6. MUST complete release checklist for production deploys — version bump, changelog, rollback plan
|
|
194
194
|
7. MUST create rollback plan artifact before first production deploy of a version
|
|
195
195
|
|
|
196
|
+
## Returns
|
|
197
|
+
|
|
198
|
+
| Artifact | Format | Location |
|
|
199
|
+
|----------|--------|----------|
|
|
200
|
+
| Deploy report | Markdown | inline (chat output) |
|
|
201
|
+
| Deploy status (success/failed/rollback) | Text | inline |
|
|
202
|
+
| Health check results (HTTP status, visual) | Markdown | inline |
|
|
203
|
+
| Rollback plan document | Markdown | `.rune/deploy/rollback-<version>.md` |
|
|
204
|
+
| Monitoring confirmation | Text | inline |
|
|
205
|
+
|
|
196
206
|
## Sharp Edges
|
|
197
207
|
|
|
198
208
|
Known failure modes for this skill. Check these before declaring done.
|
package/skills/design/SKILL.md
CHANGED
|
@@ -443,6 +443,15 @@ Trading/Fintech — Data-Dense Dark — Web
|
|
|
443
443
|
| Persistence Gate | .rune/design-system.md written before reporting done | Write file first |
|
|
444
444
|
| Platform Gate | Platform detected before generating tokens | Default to web, note assumption |
|
|
445
445
|
|
|
446
|
+
## Returns
|
|
447
|
+
|
|
448
|
+
| Artifact | Format | Location |
|
|
449
|
+
|----------|--------|----------|
|
|
450
|
+
| Design system file | Markdown | `.rune/design-system.md` |
|
|
451
|
+
| Design report | Markdown | inline (chat output) |
|
|
452
|
+
| Accessibility audit findings | Markdown list | inline + appended to design-system.md |
|
|
453
|
+
| UX writing guidelines | Markdown section | `.rune/design-system.md` § UX Writing |
|
|
454
|
+
|
|
446
455
|
## Sharp Edges
|
|
447
456
|
|
|
448
457
|
Known failure modes for this skill. Check these before declaring done.
|
package/skills/docs/SKILL.md
CHANGED
|
@@ -294,6 +294,18 @@ Docs Update Report:
|
|
|
294
294
|
5. MUST NOT generate docs for code that doesn't exist yet (unless explicitly creating spec docs)
|
|
295
295
|
6. API docs MUST match actual route signatures — wrong API docs are worse than no docs
|
|
296
296
|
|
|
297
|
+
## Returns
|
|
298
|
+
|
|
299
|
+
| Artifact | Format | Location |
|
|
300
|
+
|----------|--------|----------|
|
|
301
|
+
| README.md | Markdown | project root |
|
|
302
|
+
| ARCHITECTURE.md | Markdown | project root (if 10+ files) |
|
|
303
|
+
| API reference | Markdown | `docs/API.md` |
|
|
304
|
+
| Changelog entry | Markdown (Keep a Changelog) | `CHANGELOG.md` |
|
|
305
|
+
| Docs update report | Markdown | inline (chat output) |
|
|
306
|
+
|
|
307
|
+
**Scope guardrail:** Documents only what exists in the codebase — never invents features, endpoints, or APIs.
|
|
308
|
+
|
|
297
309
|
## Sharp Edges
|
|
298
310
|
|
|
299
311
|
| Failure Mode | Severity | Mitigation |
|
|
@@ -161,6 +161,17 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
161
161
|
- Source URL provided
|
|
162
162
|
- Documentation emitted in output format
|
|
163
163
|
|
|
164
|
+
## Returns
|
|
165
|
+
|
|
166
|
+
| Artifact | Format | Location |
|
|
167
|
+
|----------|--------|----------|
|
|
168
|
+
| API reference (signature + params) | Markdown | inline |
|
|
169
|
+
| Minimal working code example | Code block | inline |
|
|
170
|
+
| Deprecation / version notes | Markdown | inline |
|
|
171
|
+
| Source URL | Plain text | inline |
|
|
172
|
+
|
|
164
173
|
## Cost Profile
|
|
165
174
|
|
|
166
175
|
~300-600 tokens input, ~200-400 tokens output. Haiku. Fast lookup.
|
|
176
|
+
|
|
177
|
+
**Scope guardrail:** docs-seeker looks up documentation only — it does not apply changes, write code, or interpret whether the API fits the caller's use case.
|