heimdall-agent 1.1.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +101 -31
  2. package/README.pt-BR.md +124 -40
  3. package/agents/code-sentinel.md +7 -1
  4. package/agents/frontend-designer.md +6 -1
  5. package/agents/modernizer.md +8 -3
  6. package/agents/orchestrator.md +22 -8
  7. package/agents/reviewer.md +3 -1
  8. package/config/agents.json +177 -5
  9. package/config/mcp.json +1 -1
  10. package/config/mcp.resolved.json +74 -0
  11. package/config/mcp.template.json +85 -0
  12. package/config/models.json +70 -0
  13. package/config/profiles.json +4 -3
  14. package/config/skills.json +321 -93
  15. package/docs/SKILLS.md +158 -75
  16. package/docs/designs/old/2026-11-16 upstream-skill-sync-and-provenance-links.md +60 -0
  17. package/docs/runs/skill-audit/2026-11-12-compare-report.json +1028 -0
  18. package/docs/runs/skill-audit/2026-11-12-upstream-audit.json +275 -0
  19. package/doctrine/AGENTS.md +7 -4
  20. package/hooks/heimdall-hook.cjs +16 -1
  21. package/hooks/hooks.json +11 -0
  22. package/lib/catalog-sync.cjs +8 -3
  23. package/lib/model-context.cjs +50 -1
  24. package/lib/model-router.cjs +294 -0
  25. package/package.json +1 -1
  26. package/playbooks/01-interactive-grilling-gate.md +14 -10
  27. package/playbooks/03-adversarial-code-review.md +12 -4
  28. package/playbooks/05-canonical-plan-template.md +8 -13
  29. package/playbooks/06-model-registry-matrix.md +27 -19
  30. package/readme.html +1006 -0
  31. package/setup.mjs +317 -206
  32. package/skills/antislop-copywriting/SKILL.md +36 -1
  33. package/skills/brainstorming/SKILL.md +60 -38
  34. package/skills/codebase-design/DEEPENING.md +37 -0
  35. package/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  36. package/skills/codebase-design/SKILL.md +114 -0
  37. package/skills/communication-doctrine/SKILL.md +2 -2
  38. package/skills/domain-modeling/ADR-FORMAT.md +47 -0
  39. package/skills/domain-modeling/GLOSSARY-FORMAT.md +60 -0
  40. package/skills/domain-modeling/SKILL.md +74 -0
  41. package/skills/executing-plans/SKILL.md +6 -4
  42. package/skills/grill-me/SKILL.md +65 -0
  43. package/skills/handoff/SKILL.md +77 -0
  44. package/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  45. package/skills/improve-codebase-architecture/SKILL.md +71 -0
  46. package/skills/mcp-cleanup/SKILL.md +61 -0
  47. package/skills/mcp-sync/SKILL.md +58 -0
  48. package/skills/modern-web-guidance/SKILL.md +90 -0
  49. package/skills/owasp-security/reference/config-and-supply-chain.md +346 -344
  50. package/skills/owasp-security/reference/languages.md +378 -372
  51. package/skills/owasp-security/reference/owasp-report.md +1144 -1140
  52. package/skills/owasp-security/reference/review-checklist.md +134 -132
  53. package/skills/ruminate/SKILL.md +140 -0
  54. package/skills/subagent-driven-development/SKILL.md +7 -4
  55. package/skills/taste-skill/SKILL.md +367 -534
  56. package/skills/to-spec/SKILL.md +75 -0
  57. package/skills/to-tickets/SKILL.md +105 -0
  58. package/skills/upstream-skill-sync/SKILL.md +46 -0
  59. package/skills/wayfinder/SKILL.md +128 -0
  60. package/skills/writing-plans/SKILL.md +1 -1
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: to-spec
3
+ description: "Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ This skill takes the current conversation context and codebase understanding and produces a spec. Do NOT interview the user; just synthesize what you already know.
8
+
9
+ The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
10
+
11
+ ## Process
12
+
13
+ 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.
14
+
15
+ 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.
16
+
17
+ Check with the user that these seams match their expectations.
18
+
19
+ 3. Write the spec using the template below, then publish it to the project issue tracker. Apply the `ready-for-agent` triage label - no need for additional triage.
20
+
21
+ <spec-template>
22
+
23
+ ## Problem Statement
24
+
25
+ The problem that the user is facing, from the user's perspective.
26
+
27
+ ## Solution
28
+
29
+ The solution to the problem, from the user's perspective.
30
+
31
+ ## User Stories
32
+
33
+ A LONG, numbered list of user stories. Each user story should be in the format of:
34
+
35
+ 1. As an <actor>, I want a <feature>, so that <benefit>
36
+
37
+ <user-story-example>
38
+ 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
39
+ </user-story-example>
40
+
41
+ This list of user stories should be extremely extensive and cover all aspects of the feature.
42
+
43
+ ## Implementation Decisions
44
+
45
+ A list of implementation decisions that were made. This can include:
46
+
47
+ - The modules that will be built/modified
48
+ - The interfaces of those modules that will be modified
49
+ - Technical clarifications from the developer
50
+ - Architectural decisions
51
+ - Schema changes
52
+ - API contracts
53
+ - Specific interactions
54
+
55
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
56
+
57
+ Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
58
+
59
+ ## Testing Decisions
60
+
61
+ A list of testing decisions that were made. Include:
62
+
63
+ - A description of what makes a good test (only test external behavior, not implementation details)
64
+ - Which modules will be tested
65
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
66
+
67
+ ## Out of Scope
68
+
69
+ A description of the things that are out of scope for this spec.
70
+
71
+ ## Further Notes
72
+
73
+ Any further notes about the feature.
74
+
75
+ </spec-template>
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: to-tickets
3
+ description: Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # To Tickets
8
+
9
+ Break a plan, spec, or conversation into a set of **tickets**: tracer-bullet vertical slices, each declaring the tickets that **block** it.
10
+
11
+ The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
12
+
13
+ ## Process
14
+
15
+ ### 1. Gather context
16
+
17
+ Work from whatever is already in the conversation context. If the user passes a reference (a spec path, an issue number or URL) as an argument, fetch it and read its full body and comments.
18
+
19
+ ### 2. Explore the codebase (optional)
20
+
21
+ If you have not already explored the codebase, do so to understand the current state of the code. Ticket titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.
22
+
23
+ Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."
24
+
25
+ ### 3. Draft vertical slices
26
+
27
+ Break the work into **tracer bullet** tickets.
28
+
29
+ <vertical-slice-rules>
30
+
31
+ - Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests): vertical, NOT a horizontal slice of one layer
32
+ - A completed slice is demoable or verifiable on its own
33
+ - Each slice is sized to fit in a single fresh context window
34
+ - Any prefactoring should be done first
35
+
36
+ </vertical-slice-rules>
37
+
38
+ Give each ticket its **blocking edges**: the other tickets that must complete before it can start. A ticket with no blockers can start immediately.
39
+
40
+ **Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change (rename a column, retype a shared symbol) whose **blast radius** fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket; green is promised only there.
41
+
42
+ ### 4. Quiz the user
43
+
44
+ Present the proposed breakdown as a numbered list. For each ticket, show:
45
+
46
+ - **Title**: short descriptive name
47
+ - **Blocked by**: which other tickets (if any) must complete first
48
+ - **What it delivers**: the end-to-end behaviour this ticket makes work
49
+
50
+ Ask the user:
51
+
52
+ - Does the granularity feel right? (too coarse / too fine)
53
+ - Are the blocking edges correct: does each ticket only depend on tickets that genuinely gate it?
54
+ - Should any tickets be merged or split further?
55
+
56
+ Iterate until the user approves the breakdown.
57
+
58
+ ### 5. Publish the tickets to the configured tracker
59
+
60
+ Publish the approved tickets. **How** depends on the tracker `/setup-matt-pocock-skills` configured; the tickets are the same either way, only the shape of the blocking edges changes:
61
+
62
+ - **Local files** → write one file per ticket under `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` in dependency order (blockers first). Each file's "Blocked by" lists the numbers/titles it depends on. Use the per-ticket file template below: one ticket per file, never a single combined file.
63
+ - **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. If the source was an existing issue, make each ticket its sub-issue (tracker doc's operation). Apply the `ready-for-agent` triage label unless instructed otherwise; the tickets are agent-grabbable by construction.
64
+
65
+ Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.
66
+
67
+ Do NOT close or modify any parent issue.
68
+
69
+ <local-ticket-template>
70
+
71
+ # <NN>: <Ticket title>
72
+
73
+ **What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective, not a layer-by-layer implementation list.
74
+
75
+ **Blocked by:** the numbers/titles of the tickets that gate this one, or "None (can start immediately)".
76
+
77
+ **Status:** ready-for-agent
78
+
79
+ - [ ] Acceptance criterion 1
80
+ - [ ] Acceptance criterion 2
81
+
82
+ </local-ticket-template>
83
+
84
+ <issue-template>
85
+
86
+ ## Parent
87
+
88
+ A reference to the parent issue on the tracker (if the source was an existing issue, otherwise omit this section).
89
+
90
+ ## What to build
91
+
92
+ The end-to-end behaviour this ticket makes work, from the user's perspective, not layer-by-layer implementation.
93
+
94
+ ## Acceptance criteria
95
+
96
+ - [ ] Criterion 1
97
+ - [ ] Criterion 2
98
+
99
+ ## Blocked by
100
+
101
+ - A reference to each blocking ticket, or "None (can start immediately)". Omit this section when blockers were set as native edges.
102
+
103
+ </issue-template>
104
+
105
+ In either form, avoid specific file paths or code snippets: they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: upstream-skill-sync
3
+ description: >
4
+ Audit and update Heimdall skills from their upstream repositories in config/skills.json.
5
+ Use when the user asks to "update skills", "sync upstream skills", "check skill updates",
6
+ or "audit upstream" using the 3-tier triage rubric (Safe 1:1, Defer/Selective Merge, Reject).
7
+ ---
8
+
9
+ # Upstream Skill Sync
10
+
11
+ Audit upstream repositories listed in `config/skills.json` and classify every change before modifying local skills.
12
+
13
+ ## 1. Integration Modes (`config/skills.json`)
14
+
15
+ Every skill declares an `integrationMode`:
16
+ - `mirror`: Unmodified upstream skill. Eligible for Tier 1 (1:1) updates after security review.
17
+ - `adapted`: Upstream skill with Heimdall-specific rules (for example `/ruminate` additions in `handoff` and `writing-plans`). Requires Tier 2 selective delta merge.
18
+ - `native`: Authored inside `heimdall-agent` (`upstream` is `https://github.com/bepaldes/heimdall-agent`).
19
+ - If running inside the `heimdall-agent` repository itself, mark as `Local (in-repo)` and skip remote fetch.
20
+ - If running in an external user project or global install, check `https://github.com/bepaldes/heimdall-agent` via `git ls-remote` so users see Heimdall updates.
21
+
22
+ ## 2. Five-Step Sync Protocol
23
+
24
+ 1. **Read Registry**: Open `config/skills.json`. Filter by target skill name, suite, or `all`. Detect whether `cwd` is the `heimdall-agent` repo.
25
+ 2. **Check Upstream**: Run `git ls-remote --tags <upstream>` and `git ls-remote <upstream> HEAD` (or inspect upstream commit log/releases) against `sourceRevision`. Prefer human-readable version tags (e.g. `v1.1 -> v1.2`); if untagged, report commit delta and date (e.g. `+4 commits, 2026-11-10`). Summarize the actual **Key Changes** in the changed skill files so the user can decide without opening GitHub. Record timeouts or non-git URLs as `Unchecked`.
26
+ 3. **Run Security Gate**: Scan fetched upstream diffs with `snyk-agent-scan` heuristics. Block prompt injection, credential harvesting, or unverified remote `curl | sh` commands.
27
+ 4. **Classify Each Change (3-Tier Triage Rubric)**:
28
+ - **Tier 1 — Safe (1:1 Replace)**: Apply directly to `mirror` skills when upstream fixes bugs, clarifies steps, or adds Baseline web rules without breaking Heimdall doctrine.
29
+ - **Tier 2 — Defer / Selective Merge**: Apply to `adapted` skills or changes overlapping existing Heimdall agents. Extract non-conflicting improvements while preserving `/ruminate` rules, BLUF/STE headers, and Goldfish isolation.
30
+ - **Tier 3 — Not Recommended (Reject)**: Discard upstream additions that introduce dev-server commands, chatbot closers, vague qualifiers (`ensure`, `properly`, `gracefully`), bloated wrappers, or single-vendor lock-in.
31
+ 5. **Verify & Report**: Run `npm test` after any edit. Output a `Review Verdict` BLUF summary followed by a unified triage table with explicit `Tier / Status`, `Version`, `Affected Skills`, and `Key Changes` columns.
32
+
33
+ ## 3. Output Format
34
+
35
+ ```markdown
36
+ ### Review Verdict: APPROVED | REVISION_NEEDED | BLOCKED
37
+ - **Checked**: <count> skills (<tier1> Tier 1, <tier2> Tier 2, <tier3> Tier 3, <unchecked> Unchecked, <current> Current, <local> Local)
38
+ - **Tests**: `npm test` (<pass>/<total>, or "Not run — audit only")
39
+
40
+ | Tier / Status | Upstream Repository | Version | Affected Skills | Key Changes |
41
+ | :--- | :--- | :--- | :--- | :--- |
42
+ | **Tier 1 (Safe 1:1)** | `<repo>` | `<localTag -> remoteTag \| +N commits>` | `<skills>` | `<1-line summary of actual upstream diff>` |
43
+ | **Tier 2 (Selective Merge)** | `<repo>` | `<localTag -> remoteTag \| +N commits>` | `<skills>` | `<1-line summary + what to preserve locally>` |
44
+ | **Tier 3 (Rejected)** | `<repo>` | `<localTag -> remoteTag \| +N commits>` | `<skills>` | `<1-line reason rejected>` |
45
+ | **Unchecked** | `<repo>` | `N/A` | `<skills>` | `<timeout or non-git reason>` |
46
+ ```
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: wayfinder
3
+ description: Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ A loose idea has arrived, too big for one agent session, and wrapped in fog: the way from here to the **destination** isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a **shared map** on the repo's issue tracker, then works its **decision tickets** (questions whose resolution is a decision, not slices of a build to execute) one at a time until the route is clear.
8
+
9
+ The destination varies per effort, and naming it is the first act of charting: it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic: engineering work, course content, whatever fits the shape.
10
+
11
+ ## Plan, don't do
12
+
13
+ Wayfinder is **planning** by default: each ticket resolves a decision, and the map is done when the way is clear, with nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its **Notes**, carrying execution into the map itself, but absent that, produce decisions, not deliverables.
14
+
15
+ ## Refer by name
16
+
17
+ Every map and ticket is an issue, so it has a **name**: its title. In everything the human reads (narration, the map's Decisions-so-far), refer to it by that name, never by a bare id, number, or slug. A wall of `#42, #43, #44` is illegible; names read at a glance. The id and URL don't vanish; a name wraps its link, but they ride _inside_ the name, never stand in for it.
18
+
19
+ ## The Map
20
+
21
+ The map is a single issue on this repo's issue tracker, labelled `wayfinder:map`, the canonical artifact. Its tickets are child issues of the map.
22
+
23
+ The map is an **index**, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place, its ticket, so the map never restates it, only gists it and links.
24
+
25
+ **Where the map, its child tickets, blocking, and frontier queries physically live is tracker-specific.** The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`. Consult the tracker doc's "Wayfinding operations" section for how _this_ repo expresses them. If no tracker has been provided, default to the local-markdown tracker.
26
+
27
+ ### The map body
28
+
29
+ The whole map at low resolution, loaded once per session. Open tickets are **not** listed: they are open child issues, found by query.
30
+
31
+ ```markdown
32
+ ## Destination
33
+
34
+ <what reaching the end of this map looks like: the spec, decision, or change this effort is finding its way to. One or two lines; every session orients to it before choosing a ticket.>
35
+
36
+ ## Notes
37
+
38
+ <domain; skills every session should consult; standing preferences for this effort>
39
+
40
+ ## Decisions so far
41
+
42
+ <!-- the index: one line per closed ticket, enough to judge relevance, then zoom the link for the detail the ticket holds -->
43
+
44
+ - [<closed ticket title>](link): <one-line gist of the answer>
45
+
46
+ ## Not yet specified
47
+
48
+ <!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->
49
+
50
+ ## Out of scope
51
+
52
+ <!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->
53
+ ```
54
+
55
+ ### Tickets
56
+
57
+ Each ticket is a **child issue** of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session:
58
+
59
+ ```markdown
60
+ ## Question
61
+
62
+ <the decision or investigation this ticket resolves>
63
+ ```
64
+
65
+ Each ticket carries a `wayfinder:<type>` label, one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)). `wayfinder:` labels are the only labels a map and its tickets carry, never a triage label like `ready-for-agent`: they are decisions, not implementation work.
66
+
67
+ A session **claims** a ticket by assigning it to the dev driving the map, **first**, before any work, so concurrent sessions skip it. That assignee _is_ the claim: an open, unassigned ticket is unclaimed.
68
+
69
+ Blocking uses the tracker's **native** dependency relationship: essential because it renders the frontier _visually_ in the tracker's own UI, so the human sees what's takeable without opening the map. Only a tracker that lacks native blocking falls back to a body convention. A ticket is **unblocked** when every ticket blocking it is closed; the **frontier** is the open, unblocked, unclaimed children, the edge of the known.
70
+
71
+ The answer isn't part of the body; it's recorded on resolution (see [Work through the map](#work-through-the-map)). Assets created while resolving a ticket are linked from the issue, not pasted in.
72
+
73
+ ## Ticket Types
74
+
75
+ Every ticket is either **HITL** (human in the loop, worked _with_ a human who speaks for themselves) or **AFK**, driven by the agent alone. A HITL ticket only resolves through that live exchange; the agent never stands in for the human's side of it (a grilling agent that answers its own questions has broken this).
76
+
77
+ - **Research** (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases to surface a fact a decision waits on. Resolved by a subagent that calls the Skill tool with "research". Use when knowledge outside the current working directory is required.
78
+ - **Prototype** (HITL): Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to (an outline, a rough take, a stub, or UI/logic code) by calling the Skill tool with "prototype". Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question.
79
+ - **Grilling** (HITL): Conversation. The default case. Always call the Skill tool twice, for "grilling" and "domain-modeling".
80
+ - **Task** (HITL or AFK): Manual work that must happen before a _decision_ can be made: nothing to decide, prototype, or research, but the discussion is blocked until it's done. Signing up for a service so its API can be judged, provisioning access, moving data so its shape can be seen. This is the one type that _does_ rather than decides, and it earns its place by unblocking a decision, not by delivering the destination. The agent drives it alone where it can (AFK); otherwise it hands the human a precise checklist (HITL). Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on.
81
+
82
+ ## Fog of war
83
+
84
+ The map is _deliberately_ incomplete: don't chart what you can't yet see. Beyond the live tickets lies the **fog of war**: the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets, one at a time, until the way to the destination is clear and no tickets remain.
85
+
86
+ The map's **Not yet specified** section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier _toward_ the destination: everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed.
87
+
88
+ **Fog or ticket?** The test is whether you can state the question precisely now, _not_ whether you can answer it now.
89
+
90
+ - **Ticket when** the question is already sharp, even if it's blocked and you can't act on it yet.
91
+ - **Not yet specified when** you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it.
92
+
93
+ **Not yet specified** excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section).
94
+
95
+ ## Out of scope
96
+
97
+ Fog only ever gathers _toward_ the destination. The destination fixes the scope, so work beyond it is **out of scope**: it isn't fog, and it doesn't belong in **Not yet specified**. It gets its own **Out of scope** section on the map: work you've consciously ruled out of _this_ effort. Scope, not sharpness, lands it here.
98
+
99
+ Out-of-scope work never graduates (the frontier stops at the destination), so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption.
100
+
101
+ Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination (mis-scoped in while charting, or exposed by a resolution), **close it** (a closed ticket is unambiguously off the frontier) and leave one line in the **Out of scope** section: the gist plus why it's out of scope, linking the closed ticket. It stays out of **Decisions so far**, which records the route actually walked; a scope boundary isn't a step on it.
102
+
103
+ ## Invocation
104
+
105
+ Two modes. Either way, **never resolve more than one ticket per session**, with the exception of research tickets.
106
+
107
+ ### Chart the map
108
+
109
+ User invokes with a loose idea.
110
+
111
+ 1. **Name the destination.** Call the Skill tool twice, for "grilling" and "domain-modeling", to pin down what this map is finding its way to: the spec, decision, or change. The destination fixes the scope, so it's settled first.
112
+ 2. **Map the frontier.** Grill again, **breadth-first** this time: fan out across the whole space rather than deep on any one thread, surfacing the open decisions and the first steps takeable now. **If this surfaces no fog** (the way to the destination is already clear, the whole journey small enough for one session), you don't need a map. Stop and ask the user how they'd like to proceed.
113
+ 3. **Create the map** (label `wayfinder:map`): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into **Not yet specified**.
114
+ 4. **Create the tickets you can specify now** as child issues of the map, then wire blocking edges in a **second pass** (issues need ids before they can reference each other). Write cross-references in that pass too, with real ids: a placeholder `#<n>` auto-links to an unrelated issue. Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog: the **Not yet specified** section.
115
+ 5. **Fire the research subagents.** For each `research` ticket you just created, spin up a subagent with a fresh context window that calls the Skill tool with "research" to resolve it in parallel, capturing its findings on a throwaway `research/<name>` branch with a context pointer from the ticket. Push the branch but open no PR: it is never merged.
116
+ 6. Stop: charting is one session's work; it hand-resolves nothing.
117
+
118
+ ### Work through the map
119
+
120
+ User invokes with a map (URL or number). A ticket is **optional**: without one, you pick the next decision, not the user.
121
+
122
+ 1. Load the **map**: the low-res view, not every ticket body.
123
+ 2. Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order. **Claim it**: assign it to yourself before any work.
124
+ 3. Resolve it as the type its `wayfinder:<type>` label names (see [Ticket Types](#ticket-types)). Read the label, not just the body: the body never states the type. **Zoom as needed**: fetch the full body of any related or closed ticket on demand; call the Skill tool for whichever skills the `## Notes` block names. If in doubt, call the Skill tool twice, for "grilling" and "domain-modeling".
125
+ 4. Record the resolution: post the answer as a **resolution comment**, **close** the issue, and **append a context pointer** to the map's Decisions-so-far.
126
+ 5. Add newly-surfaced tickets (create-then-wire); graduate any fog the answer has made specifiable, clearing each graduated patch from **Not yet specified** so it lives only as its new ticket. If the answer reveals that a ticket (this one or another) sits beyond the destination, **rule it out of scope** rather than resolving it on the route. If the decision invalidates other parts of the map, update or delete those tickets.
127
+
128
+ The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.
@@ -167,7 +167,7 @@ opposite failure, and the self-review catches both.
167
167
 
168
168
  After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
169
169
 
170
- **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
170
+ **1. Spec coverage (COMPLETENESS GATE):** Skim each section/requirement in the spec AND the user's original request message. Can you point to a task that implements EVERY item? If the user said "ALL scripts", "every module", or "full migration including X", enumerate every instance explicitly — do not summarize or propose architecture without listing all items. List any gaps. A plan that omits items the user explicitly named is incomplete regardless of architectural quality. Extracted from 187 sessions via `/ruminate`.
171
171
 
172
172
  **2. Step scan:** Every step must let the implementer write exactly one reasonable thing, and no step may carry more than that: a line that decides nothing is a gap, a function body the signature and tests already determine is a transcript. Fix both.
173
173