@reddb-io/red-skills-dev 2.75.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.
Files changed (135) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +30 -0
  3. package/package.json +32 -0
  4. package/skills/engineering/README.md +36 -0
  5. package/skills/engineering/_report-runtime/WRAPPER.md +47 -0
  6. package/skills/engineering/afk/AGENT-PROMPT.md +295 -0
  7. package/skills/engineering/afk/SAFETY.md +103 -0
  8. package/skills/engineering/afk/SKILL.md +160 -0
  9. package/skills/engineering/afk/TROUBLESHOOTING.md +260 -0
  10. package/skills/engineering/afk/actions-lane.md +213 -0
  11. package/skills/engineering/afk/bin/README.md +29 -0
  12. package/skills/engineering/afk/bin/afk.mjs +51 -0
  13. package/skills/engineering/afk/defaults/cargo-pre-worktree.sh +37 -0
  14. package/skills/engineering/afk/defaults/envelope-post-attempt.sh +47 -0
  15. package/skills/engineering/afk/defaults/gradle-pre-worktree.sh +42 -0
  16. package/skills/engineering/afk/defaults/heartbeat-post-attempt.sh +43 -0
  17. package/skills/engineering/afk/defaults/validation-post-merge.sh +77 -0
  18. package/skills/engineering/afk/detectors/README.md +72 -0
  19. package/skills/engineering/afk/detectors/cargo.sh +27 -0
  20. package/skills/engineering/afk/detectors/gradle.sh +35 -0
  21. package/skills/engineering/afk/docs/BOOT-SWEEPS.md +81 -0
  22. package/skills/engineering/afk/docs/CONFIG.md +238 -0
  23. package/skills/engineering/afk/docs/ENVELOPE.md +177 -0
  24. package/skills/engineering/afk/docs/HANDOFF.md +70 -0
  25. package/skills/engineering/afk/docs/LIVENESS.md +56 -0
  26. package/skills/engineering/afk/docs/OPERATIONS.md +409 -0
  27. package/skills/engineering/afk/examples/only-mine.sh +32 -0
  28. package/skills/engineering/afk/examples/red-afk-attempt-action.yml +53 -0
  29. package/skills/engineering/afk/examples/rs-afk-attempt.yml +76 -0
  30. package/skills/engineering/afk/fleet.md +127 -0
  31. package/skills/engineering/afk/hooks/red-cargo +44 -0
  32. package/skills/engineering/afk/hooks/red-envelope +50 -0
  33. package/skills/engineering/afk/hooks/red-gradle +50 -0
  34. package/skills/engineering/afk/hooks/red-heartbeat +46 -0
  35. package/skills/engineering/afk/hooks/red-validation +79 -0
  36. package/skills/engineering/afk/monitor.md +170 -0
  37. package/skills/engineering/afk/runner-claude-minimax.md +71 -0
  38. package/skills/engineering/afk/runner-claude.md +67 -0
  39. package/skills/engineering/afk/runner-codex.md +138 -0
  40. package/skills/engineering/afk/runner-hermes.md +40 -0
  41. package/skills/engineering/afk/runner-opencode.md +142 -0
  42. package/skills/engineering/ask-red/SKILL.md +137 -0
  43. package/skills/engineering/audit-skills/SKILL.md +46 -0
  44. package/skills/engineering/code-review/SKILL.md +106 -0
  45. package/skills/engineering/context/SKILL.md +142 -0
  46. package/skills/engineering/curate/SKILL.md +133 -0
  47. package/skills/engineering/daily-review/SKILL.md +68 -0
  48. package/skills/engineering/dashboard/SKILL.md +44 -0
  49. package/skills/engineering/diagnose/SKILL.md +155 -0
  50. package/skills/engineering/diagnose/scripts/hitl-loop.template.sh +41 -0
  51. package/skills/engineering/go/SKILL.md +144 -0
  52. package/skills/engineering/go/TROUBLESHOOTING.md +81 -0
  53. package/skills/engineering/ground-truth/SKILL.md +84 -0
  54. package/skills/engineering/hitl/SKILL.md +171 -0
  55. package/skills/engineering/hitl/TROUBLESHOOTING.md +76 -0
  56. package/skills/engineering/implement/SKILL.md +69 -0
  57. package/skills/engineering/improve-codebase-architecture/DEEPENING.md +37 -0
  58. package/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  59. package/skills/engineering/improve-codebase-architecture/LANGUAGE.md +53 -0
  60. package/skills/engineering/improve-codebase-architecture/SKILL.md +81 -0
  61. package/skills/engineering/model-tier-policy/SKILL.md +83 -0
  62. package/skills/engineering/prototype/LOGIC.md +79 -0
  63. package/skills/engineering/prototype/SKILL.md +30 -0
  64. package/skills/engineering/prototype/UI.md +112 -0
  65. package/skills/engineering/red-doctor/APPLY.md +35 -0
  66. package/skills/engineering/red-doctor/SKILL.md +172 -0
  67. package/skills/engineering/red-gains/SKILL.md +49 -0
  68. package/skills/engineering/red-setup/INTERVIEW.md +266 -0
  69. package/skills/engineering/red-setup/ISSUE-SWEEP.md +18 -0
  70. package/skills/engineering/red-setup/REFERENCE.md +35 -0
  71. package/skills/engineering/red-setup/SKILL.md +58 -0
  72. package/skills/engineering/red-setup/WORKFLOWS.md +74 -0
  73. package/skills/engineering/red-setup/WRITE-CONTRACT.md +151 -0
  74. package/skills/engineering/red-setup/config-template.yaml +174 -0
  75. package/skills/engineering/red-setup/domain.md +52 -0
  76. package/skills/engineering/red-setup/issue-tracker-github.md +88 -0
  77. package/skills/engineering/red-setup/rsp-retirement-runbook.md +35 -0
  78. package/skills/engineering/red-setup/scripts/install-runtime-shim.sh +189 -0
  79. package/skills/engineering/red-setup/triage-labels.md +176 -0
  80. package/skills/engineering/red-setup/workflows/red-issues-needs-triage.yml +36 -0
  81. package/skills/engineering/red-statusline/HOST-NOTES.md +180 -0
  82. package/skills/engineering/red-statusline/SKILL.md +58 -0
  83. package/skills/engineering/report-bug/SKILL.md +155 -0
  84. package/skills/engineering/resolving-merge-conflicts/SKILL.md +143 -0
  85. package/skills/engineering/retake/SKILL.md +184 -0
  86. package/skills/engineering/review-adrs/SKILL.md +125 -0
  87. package/skills/engineering/start/ADR-FORMAT.md +47 -0
  88. package/skills/engineering/start/CONTEXT-FORMAT.md +77 -0
  89. package/skills/engineering/start/DOC-LANDING-FINALIZER.md +9 -0
  90. package/skills/engineering/start/SKILL.md +179 -0
  91. package/skills/engineering/tdd/SKILL.md +96 -0
  92. package/skills/engineering/tdd/deep-modules.md +33 -0
  93. package/skills/engineering/tdd/interface-design.md +31 -0
  94. package/skills/engineering/tdd/mocking.md +59 -0
  95. package/skills/engineering/tdd/tests.md +85 -0
  96. package/skills/engineering/to-spec/SKILL.md +104 -0
  97. package/skills/engineering/to-tickets/SKILL.md +158 -0
  98. package/skills/engineering/triage/AGENT-BRIEF.md +207 -0
  99. package/skills/engineering/triage/OUT-OF-SCOPE.md +101 -0
  100. package/skills/engineering/triage/SKILL.md +176 -0
  101. package/skills/engineering/verify/SKILL.md +136 -0
  102. package/skills/engineering/wayfinder/SKILL.md +128 -0
  103. package/skills/engineering/zoom-out/SKILL.md +51 -0
  104. package/skills/engineering/zoom-out/scripts/graph-mode-plumbing.sh +36 -0
  105. package/skills/engineering/zoom-out/scripts/tests/contract.test.sh +168 -0
  106. package/skills/knowledge/README.md +5 -0
  107. package/skills/knowledge/research/SKILL.md +76 -0
  108. package/skills/misc/README.md +8 -0
  109. package/skills/misc/branch-lock/SKILL.md +187 -0
  110. package/skills/misc/branch-lock/scripts/branch-lock-hook.sh +113 -0
  111. package/skills/misc/branch-lock/scripts/branch-lock-session-start.sh +81 -0
  112. package/skills/misc/branch-lock/scripts/branch-lock.sh +68 -0
  113. package/skills/misc/branch-lock/scripts/lib/dev-config.sh +126 -0
  114. package/skills/misc/branch-lock/scripts/lib/git-command-classifier.sh +198 -0
  115. package/skills/misc/branch-lock/scripts/lib/lock-store.sh +67 -0
  116. package/skills/misc/branch-lock/scripts/lib/scope-resolver.sh +43 -0
  117. package/skills/misc/branch-lock/scripts/tests/branch-lock-cli.test.sh +114 -0
  118. package/skills/misc/branch-lock/scripts/tests/claude-plugin-hook.test.sh +117 -0
  119. package/skills/misc/branch-lock/scripts/tests/codex-hook.test.sh +229 -0
  120. package/skills/misc/branch-lock/scripts/tests/dev-config.test.sh +99 -0
  121. package/skills/misc/branch-lock/scripts/tests/git-command-classifier.test.sh +187 -0
  122. package/skills/misc/branch-lock/scripts/tests/lock-store.test.sh +90 -0
  123. package/skills/misc/branch-lock/scripts/tests/scope-resolver.test.sh +63 -0
  124. package/skills/misc/branch-lock/scripts/tests/session-start.test.sh +123 -0
  125. package/skills/misc/git-guardrails-claude-code/SKILL.md +105 -0
  126. package/skills/misc/git-guardrails-claude-code/scripts/block-dangerous-git.sh +231 -0
  127. package/skills/misc/git-guardrails-claude-code/scripts/tests/block-dangerous-git.test.sh +143 -0
  128. package/skills/misc/migrate-to-shoehorn/SKILL.md +96 -0
  129. package/skills/misc/setup-pre-commit/SKILL.md +94 -0
  130. package/skills/productivity/README.md +8 -0
  131. package/skills/productivity/ff/SKILL.md +116 -0
  132. package/skills/productivity/handoff/SKILL.md +37 -0
  133. package/skills/productivity/reflect/SKILL.md +18 -0
  134. package/skills/productivity/write-a-skill/SKILL.md +190 -0
  135. package/skills/productivity/write-a-skill/WRITING-STYLE.md +62 -0
@@ -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 — 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 — run `/red-setup` if not. Consult the tracker doc's "Wayfinding operations" and "Dependency & hierarchy operations" sections for how _this_ repo expresses and wires 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)).
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. Use `/red-setup` issue-tracker-github *Dependency & hierarchy operations* for the concrete GitHub create/read commands. 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 `/research` **subagent**. 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 via the /prototype skill. 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 via the /start skills, one question at a time. The default case.
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 session never executes repo-mutating task work inline — when AFK-safe, it routes the ticket into the autonomous queue per the tracker doc, and the AFK engine runs it (isolated worktree, shared validation gate, PR); 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.** Run a `/start` session 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). 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 `/research` subagent to resolve it in parallel, capturing its findings on a throwaway `research/<name>` branch with a context pointer from the ticket.
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 — **zoom as needed**: fetch the full body of any related or closed ticket on demand; invoke the skills the `## Notes` block names. If in doubt, use `/start`.
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 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.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: zoom-out
3
+ description: Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ **Never paste raw graph output — interpret nodes and edges into project terms before answering.**
8
+
9
+ I don't know this area of code well. Go up a layer of abstraction and produce a map-first **Zoom-out answer** for the relevant part of the **Codebase understanding surface**.
10
+
11
+ <what-to-do>
12
+
13
+ ## Gather Context
14
+
15
+ Use the project's glossary vocabulary from `.red/CONTEXT.md` and respect nearby ADRs. Then read the codebase normally: relevant modules, callers, tests, entrypoints, and configuration.
16
+
17
+ Opportunistically fold in Memory recall when it is available. Treat Memory as best-effort context, never a gate. For graph mode only — see [`scripts/graph-mode-plumbing.sh`](scripts/graph-mode-plumbing.sh) (variables `_zoom_out_target_file`, `_zoom_out_target_symbol`, `_zoom_out_focus_label`, `_zoom_out_path_from`, `_zoom_out_path_to`; calls `memory_structural_impact` via the `structural-impact-reader`, `memory_neighbors`, `memory_path`, `memory_graph_ready`, `memory_recall`).
18
+
19
+ If Memory is absent, unavailable, uninitialized, errors, or returns no context, continue through ordinary codebase exploration. Verify any recalled claim against current files before relying on it. If Memory is in graph mode but `memory_graph_ready` is false, continue through ordinary codebase exploration; mention `/memory:ingest` in **Risks/Gaps** only when indexing would materially improve future zoom-out work.
20
+
21
+ When the focused area is a likely change target and graph reads are available, consult the `structural-impact-reader` through `memory_structural_impact` before falling back to ordinary codebase exploration for the structural side of **Impact**. If it prints evidence, translate it into map-first prose about imports, importers, definitions, and containing files, then verify any correctness-affecting claim against the current worktree before including it. If it prints nothing, reports no structural impact, fails, Memory is markdown-only, or Memory is absent, behave identically to today's ad-hoc file-reading path.
22
+
23
+ If the user names a focused area and graph neighbors are available through `memory_neighbors`, interpret neighbor evidence into the **Relationships** section after verifying against current files. If `memory_neighbors` prints nothing or fails, continue with ordinary codebase exploration.
24
+
25
+ If the user asks about the relationship between two explicit project elements, use `memory_path` as optional graph evidence for the **Critical Paths** section, then verify against current files. If `memory_path` prints nothing, reports no path, fails, or graph reads are unavailable, continue through ordinary codebase exploration.
26
+
27
+ When the focused area is a likely change target and graph reads are available, `memory_neighbors` and `memory_recall` also surface **Reasoning attempts** recorded by AFK — fold this evidence into the **Observed impact** sub-bullet per the Answer Contract below. If no attempt evidence is present, surfaced, or relevant, drop the sub-bullet silently.
28
+
29
+ </what-to-do>
30
+
31
+ <supporting-info>
32
+
33
+ ## Answer Contract
34
+
35
+ The entire `zoom-out` answer is read-only. Do not run ingest, reindex, graph writes, memory stores, or any mutation from `zoom-out`, in the **Impact** section or anywhere else.
36
+
37
+ Start with the map, not raw graph output. Use this order:
38
+
39
+ 1. **Modules/Layers** - the relevant modules, layers, skills, scripts, services, or packages and their responsibilities.
40
+ 2. **Relationships** - the callers, dependencies, data/control flow, ownership boundaries, and how the pieces fit.
41
+ 3. **Impact** *(optional — include when the user's focus is a file, symbol, module, skill, or concept that may change)* - the impact surface of that focused target, expressed in project terms. When evidence for both kinds is available, **separate structural impact from observed impact explicitly**:
42
+ - **Structural impact** — what the codebase says today about the target: **imports**, **calls**, **containment** (module/package/skill membership), **type-use** (symbols referenced through type positions), **docs links** (referencing markdown/SKILL.md/CONTEXT/ADR), and **graph neighbors/paths** for the target. Every claim must be **verified against the current worktree** (current file relationships, current imports, current call sites) before it lands in the answer.
43
+ - **Observed impact** — what prior **Reasoning attempts** recorded by AFK show happened operationally around this target: files **touched together** with it across attempts, **repeated** blocked / no-sentinel / merge-conflict attempts, **retry chains** that led to (or away from) a successful attempt, and **validation summaries** attached to those attempts. Describe this as **operational history**, not authoritative product direction or acceptance criteria — it is evidence of what tends to break, retry, or co-change, not a spec. Verify any observed claim that affects the answer against the current worktree before relying on it.
44
+
45
+ Interpret graph or recall evidence into project terms — do **not** paste raw nodes, edges, paths, recall output, attempt records, or `memory_*` command output. If Memory is absent, stale, empty, failing, or has no relevant attempts for this target, **degrade cleanly**: drop the Observed impact sub-bullet and answer from structural impact alone; if structural evidence is also absent, answer from ordinary code reads and mention indexing only as a risk/gap in **Risks/Gaps** when materially useful. This section is **read-only**: it must not run `/memory:ingest`, reindex, or any graph-write or memory-write command, and it must not create or reference a new `/impact` skill or a `memory_impact` primitive.
46
+ 4. **Critical Paths** - the workflows or execution paths that matter most for the user's question or planned change.
47
+ 5. **Risks/Gaps** - missing context, stale indexing, unclear ownership, brittle areas, test gaps, or change hazards.
48
+
49
+ Use project glossary terms for names and concepts. Do not lead with a graph dump, raw nodes/edges, raw neighbor output, or unprocessed recall output; graph or Memory evidence can support the map after the structure is clear.
50
+
51
+ </supporting-info>
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env bash
2
+ # Graph-mode memory plumbing for zoom-out.
3
+ # Source only; do not execute directly. Called by zoom-out Gather Context
4
+ # when Memory is available. All reads only — no writes, no ingest, no reindex.
5
+
6
+ _zoom_out_focus_label="<skill/module/file/concept label from the user's request, or empty>"
7
+ _zoom_out_path_from="<first explicitly named skill/module/file/concept, or empty>"
8
+ _zoom_out_path_to="<second explicitly named skill/module/file/concept, or empty>"
9
+ _zoom_out_target_file="<focused file path when the user's request names one, or empty>"
10
+ _zoom_out_target_symbol="<focused symbol name when the user's request names one, or empty>"
11
+ if { [ -f .red/config.yaml ] && grep -qE '^[[:space:]]+memory:' .red/config.yaml; } || [ -f .red/memory/config.json ]; then
12
+ _bridge="${CLAUDE_PLUGIN_ROOT:-}/scripts/memory-bridge.sh"
13
+ [ -f "$_bridge" ] || _bridge="$(git rev-parse --show-toplevel 2>/dev/null)/plugins/dev/scripts/memory-bridge.sh"
14
+ if [ -f "$_bridge" ] && source "$_bridge"; then
15
+ MEMORY_REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"
16
+ _memory_mode="$(memory_mode . 2>/dev/null || printf 'unavailable\n')"
17
+ if [ "$_memory_mode" = "graph" ]; then
18
+ if memory_graph_ready .; then
19
+ if [ -n "$_zoom_out_path_from" ] && [ -n "$_zoom_out_path_to" ]; then
20
+ memory_path . "$_zoom_out_path_from" "$_zoom_out_path_to" bfs
21
+ fi
22
+ if [ -n "$_zoom_out_target_file" ] || [ -n "$_zoom_out_target_symbol" ]; then
23
+ memory_structural_impact . "$_zoom_out_target_file" "$_zoom_out_target_symbol"
24
+ fi
25
+ if [ -n "$_zoom_out_focus_label" ]; then
26
+ memory_neighbors . "$_zoom_out_focus_label" 1 both
27
+ fi
28
+ memory_recall . "<2-6 keywords for the code area>"
29
+ else
30
+ _zoom_out_memory_ingest_hint=1
31
+ fi
32
+ else
33
+ memory_recall . "<2-6 keywords for the code area>"
34
+ fi
35
+ fi
36
+ fi
@@ -0,0 +1,168 @@
1
+ #!/usr/bin/env bash
2
+ # Contract test for the zoom-out SKILL.md.
3
+ #
4
+ # Asserts the Answer Contract carries an optional Impact section between
5
+ # Relationships and Critical Paths, defines structural impact in the
6
+ # expected terms, requires graph evidence be interpreted (not pasted raw),
7
+ # stays read-only, and does not introduce a new /impact skill or a
8
+ # memory_impact primitive (issue #97, parent #95).
9
+
10
+ set -euo pipefail
11
+
12
+ HERE="$(cd "$(dirname "$0")" && pwd)"
13
+ SKILL_MD="$HERE/../../SKILL.md"
14
+
15
+ if [ ! -f "$SKILL_MD" ]; then
16
+ echo "FAIL SKILL.md not found at $SKILL_MD" >&2
17
+ exit 1
18
+ fi
19
+
20
+ pass=0
21
+ fail=0
22
+
23
+ # absent(needle): assert the literal string does NOT appear anywhere in SKILL.md.
24
+ absent() {
25
+ local label="$1" needle="$2"
26
+ if grep -qF "$needle" "$SKILL_MD"; then
27
+ echo "FAIL $label (forbidden text present: $needle)" >&2
28
+ fail=$((fail + 1))
29
+ else
30
+ echo "ok $label"
31
+ pass=$((pass + 1))
32
+ fi
33
+ }
34
+
35
+ # present(needle): assert the literal string DOES appear.
36
+ present() {
37
+ local label="$1" needle="$2"
38
+ if grep -qF "$needle" "$SKILL_MD"; then
39
+ echo "ok $label"
40
+ pass=$((pass + 1))
41
+ else
42
+ echo "FAIL $label (missing: $needle)" >&2
43
+ fail=$((fail + 1))
44
+ fi
45
+ }
46
+
47
+ # present_re(regex): assert the extended regex matches.
48
+ present_re() {
49
+ local label="$1" re="$2"
50
+ if grep -Eq "$re" "$SKILL_MD"; then
51
+ echo "ok $label"
52
+ pass=$((pass + 1))
53
+ else
54
+ echo "FAIL $label (regex did not match: $re)" >&2
55
+ fail=$((fail + 1))
56
+ fi
57
+ }
58
+
59
+ # --- Section order: Relationships -> Impact -> Critical Paths ----------
60
+
61
+ rel_line="$(grep -n '^2\. \*\*Relationships\*\*' "$SKILL_MD" | head -1 | cut -d: -f1 || true)"
62
+ imp_line="$(grep -n '^3\. \*\*Impact\*\*' "$SKILL_MD" | head -1 | cut -d: -f1 || true)"
63
+ crit_line="$(grep -n '^4\. \*\*Critical Paths\*\*' "$SKILL_MD" | head -1 | cut -d: -f1 || true)"
64
+ risk_line="$(grep -n '^5\. \*\*Risks/Gaps\*\*' "$SKILL_MD" | head -1 | cut -d: -f1 || true)"
65
+
66
+ if [ -n "$rel_line" ] && [ -n "$imp_line" ] && [ -n "$crit_line" ] && [ -n "$risk_line" ] \
67
+ && [ "$rel_line" -lt "$imp_line" ] \
68
+ && [ "$imp_line" -lt "$crit_line" ] \
69
+ && [ "$crit_line" -lt "$risk_line" ]; then
70
+ echo "ok contract lists Relationships < Impact < Critical Paths < Risks/Gaps"
71
+ pass=$((pass + 1))
72
+ else
73
+ echo "FAIL contract section order broken (rel=$rel_line imp=$imp_line crit=$crit_line risk=$risk_line)" >&2
74
+ fail=$((fail + 1))
75
+ fi
76
+
77
+ # Impact must be advertised as optional.
78
+ present_re "Impact is optional" '3\. \*\*Impact\*\*.*optional'
79
+
80
+ # --- Structural impact vocabulary --------------------------------------
81
+
82
+ present "Impact mentions imports" "**imports**"
83
+ present "Impact mentions calls" "**calls**"
84
+ present "Impact mentions containment" "**containment**"
85
+ present "Impact mentions type-use" "**type-use**"
86
+ present "Impact mentions docs links" "**docs links**"
87
+ present "Impact mentions graph neighbors/paths" "**graph neighbors/paths**"
88
+
89
+ # --- Verification against the current worktree -------------------------
90
+
91
+ present_re "Impact requires worktree verification" "verified against the current worktree"
92
+
93
+ # --- Graph-backed structural impact reader -----------------------------
94
+
95
+ present "Gather Context names target file variable" "_zoom_out_target_file"
96
+ present "Gather Context names target symbol variable" "_zoom_out_target_symbol"
97
+ present "Gather Context calls structural-impact helper" "memory_structural_impact"
98
+ present "Gather Context names structural-impact-reader" "structural-impact-reader"
99
+ present_re "Structural Impact consults graph before fallback" "before falling back to ordinary codebase exploration"
100
+ present_re "Structural Impact includes graph-derived import evidence when available" "imports, importers, definitions, and containing files"
101
+ present_re "Structural Impact degrades cleanly when graph evidence is empty" "behave identically to today's ad-hoc file-reading path"
102
+
103
+ # --- Interpret graph evidence, no raw dumps ----------------------------
104
+
105
+ present_re "Impact requires interpretation over raw graph output" "Interpret graph or recall evidence into project terms"
106
+ present_re "Impact forbids raw nodes/edges/paths/recall dump" "do \*\*not\*\* paste raw nodes, edges, paths, recall output"
107
+
108
+ # --- Read-only, no ingest / reindex / graph writes ---------------------
109
+
110
+ present_re "Impact is read-only" "This section is \*\*read-only\*\*"
111
+ present_re "Impact forbids ingest/reindex/graph writes" "must not run .*memory:ingest.*reindex.*graph-write"
112
+ present_re "answer-wide read-only restatement" "The entire .zoom-out. answer is read-only"
113
+
114
+ # --- No new /impact skill or memory_impact primitive -------------------
115
+
116
+ present_re "contract forbids new /impact skill" "must not (create or reference|introduce).*/impact"
117
+ present_re "contract forbids memory_impact primitive" "memory_impact"
118
+
119
+ # A memory_impact mention is only allowed in the *forbidding* clauses.
120
+ # Make sure it never shows up as a callable primitive invocation.
121
+ if grep -Eq '^[[:space:]]*memory_impact\b|`memory_impact `|\$\(memory_impact' "$SKILL_MD"; then
122
+ echo "FAIL memory_impact appears as an invocation, not just a prohibition" >&2
123
+ fail=$((fail + 1))
124
+ else
125
+ echo "ok memory_impact is not invoked anywhere"
126
+ pass=$((pass + 1))
127
+ fi
128
+
129
+ # Same guard for a "/impact" skill invocation (allowed only in prohibitions).
130
+ if grep -Eq '(invoke|run|call|use) /impact\b' "$SKILL_MD"; then
131
+ echo "FAIL /impact appears as an invocation, not just a prohibition" >&2
132
+ fail=$((fail + 1))
133
+ else
134
+ echo "ok /impact skill is not invoked anywhere"
135
+ pass=$((pass + 1))
136
+ fi
137
+
138
+ # --- Structural vs observed impact split (issue #100) ------------------
139
+
140
+ present "Impact names Structural impact sub-bullet" "**Structural impact**"
141
+ present "Impact names Observed impact sub-bullet" "**Observed impact**"
142
+ present_re "Impact separates structural from observed" "separate structural impact from observed impact"
143
+
144
+ # --- Observed-impact vocabulary ----------------------------------------
145
+
146
+ present "Observed impact cites Reasoning attempts" "**Reasoning attempts**"
147
+ present "Observed impact cites touched-together files" "**touched together**"
148
+ present "Observed impact cites repeated failures" "**repeated**"
149
+ present "Observed impact cites retry chains" "**retry chains**"
150
+ present "Observed impact cites validation summaries" "**validation summaries**"
151
+ present_re "Observed impact frames evidence as operational history" "operational history"
152
+ present_re "Observed impact is not authoritative product direction" "not authoritative product (direction|requirements)"
153
+
154
+ # --- Graceful degradation ----------------------------------------------
155
+
156
+ present_re "Impact degrades cleanly when attempt evidence is absent" "degrade cleanly"
157
+ present_re "Impact falls back to structural-only when attempts are missing" "drop the Observed impact sub-bullet"
158
+
159
+ # --- No raw graph dump, attempts included ------------------------------
160
+
161
+ present_re "Impact forbids raw attempt-record dumps" "do \*\*not\*\* paste raw nodes, edges, paths, recall output, attempt records"
162
+
163
+ # --- Summary -----------------------------------------------------------
164
+
165
+ echo
166
+ echo "passed: $pass"
167
+ echo "failed: $fail"
168
+ [ "$fail" -eq 0 ]
@@ -0,0 +1,5 @@
1
+ # knowledge
2
+
3
+ Skills for knowledge accumulation and curation. The LLM Wiki pattern (`/wiki-init`, `/wiki`) lives in the `memory` plugin; source-backed research stays here.
4
+
5
+ - **[research](./research/SKILL.md)** — Deep official-source technical research saved to `.red/researches/<YYYY-MM-DD>-<slug>.md`.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: research
3
+ description: Performs deep official-source research on a technical topic and saves a structured Markdown report under `.red/researches/<YYYY-MM-DD>-<slug>.md`. Use when the user invokes `/research`, asks for official documentation, primary-source research, repository/wiki documentation, specs, or high-depth source-backed notes.
4
+ argument-hint: "<topic> [--deep] [--save-as slug]"
5
+ ---
6
+
7
+ # /research
8
+
9
+ **Research a technical topic from official primary sources only, then save a structured, date-disambiguated report to `.red/researches/<YYYY-MM-DD>-<slug>.md`.**
10
+
11
+ ## Source Policy
12
+
13
+ Use browsing. Prefer sources in this order:
14
+
15
+ 1. Official documentation site.
16
+ 2. Official repository docs, README, examples, changelog, and wiki.
17
+ 3. Official GitHub/GitLab/Bitbucket Pages or docs folders.
18
+ 4. Standards, RFCs, specs, or API references.
19
+ 5. Official issues, discussions, and release notes when they document real behavior.
20
+
21
+ Never cite SEO blogs or Medium posts — they obscure official truth. Avoid generic tutorials, StackOverflow answers, and unofficial summaries; if the user explicitly asks for them, flag them as non-primary. If official coverage is weak, say so in the report.
22
+
23
+ ## Workflow
24
+
25
+ 1. Parse the topic and optional `--save-as <slug>`.
26
+ 2. Search broadly, then narrow to official/primary sources.
27
+ 3. Open and read the relevant pages; follow official links when they clarify API, config, behavior, versioning, or migration details.
28
+ 4. Create `.red/researches/` if needed.
29
+ 5. Save the report as `.red/researches/<YYYY-MM-DD>-<slug>.md`. If that path
30
+ already exists, append a numeric suffix such as
31
+ `.red/researches/<YYYY-MM-DD>-<slug>-2.md`; never silently overwrite an
32
+ earlier report.
33
+ 6. Reply with the saved path and the highest-signal findings.
34
+
35
+ ## Report Template
36
+
37
+ ```md
38
+ # <Title>
39
+
40
+ Date: <YYYY-MM-DD>
41
+ Query: <original request>
42
+ Scope: <what was included/excluded>
43
+
44
+ ## Executive Summary
45
+
46
+ ## Official Sources
47
+
48
+ - [Title](url) — why this is primary/official.
49
+
50
+ ## Hotlinks
51
+
52
+ - [Anchor text](url) — direct link to the useful section.
53
+
54
+ ## Key Findings
55
+
56
+ ## API / CLI / Config Details
57
+
58
+ ## Version Notes
59
+
60
+ ## Gotchas
61
+
62
+ ## Open Questions
63
+
64
+ ## Source-by-Source Notes
65
+
66
+ ## Recommended Next Steps
67
+ ```
68
+
69
+ ## Depth Rules
70
+
71
+ - Default: enough depth for implementation planning.
72
+ - `--deep`: follow secondary official links and include more source-by-source notes.
73
+ - `--save-as <slug>`: use the provided slug; otherwise generate a lowercase kebab-case slug from the topic.
74
+
75
+ Every factual claim in the report should be traceable to a listed official
76
+ source. Keep quoted text short; prefer paraphrase with links.
@@ -0,0 +1,8 @@
1
+ # Misc
2
+
3
+ Tools I keep around but rarely use.
4
+
5
+ - **[branch-lock](./branch-lock/SKILL.md)** — Lock the agent to a branch and block it from switching away, via agent-only pre-tool hooks for Claude Code and Codex plus a `/branch-lock` set/clear command.
6
+ - **[git-guardrails-claude-code](./git-guardrails-claude-code/SKILL.md)** — Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, etc.) before they execute.
7
+ - **[migrate-to-shoehorn](./migrate-to-shoehorn/SKILL.md)** — Migrate test files from `as` type assertions to @total-typescript/shoehorn.
8
+ - **[setup-pre-commit](./setup-pre-commit/SKILL.md)** — Set up Husky pre-commit hooks with lint-staged, Prettier, type checking, and tests.