@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,106 @@
1
+ ---
2
+ name: code-review
3
+ description: Two-axis code review of the diff between HEAD and a fixed point — Standards (does the code follow this repo's documented coding standards and the Fowler smell baseline?) and Spec (does it implement what the issue/Spec asked for?). Runs both reviews as parallel sub-agents. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
4
+ ---
5
+
6
+ # Code Review
7
+
8
+ Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
9
+
10
+ - **Standards** — does the code conform to this repo's documented coding standards, and does it avoid the universal Fowler smell baseline?
11
+ - **Spec** — does the code faithfully implement the originating issue / Spec / spec?
12
+
13
+ Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings.
14
+
15
+ The issue tracker should have been provided to you — run `/red-setup` if `.red/agents/issue-tracker.md` is missing.
16
+
17
+ <what-to-do>
18
+
19
+ ## Process
20
+
21
+ ### 1. Pin the fixed point
22
+
23
+ Whatever the user said is the fixed point — a commit SHA, branch name, tag, `main`, `HEAD~5`, etc. Don't be opinionated; pass it through. If they didn't specify one, ask: "Review against what — a branch, a commit, or `main`?" Don't proceed until you have it.
24
+
25
+ Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`.
26
+
27
+ ### 2. Identify the spec source
28
+
29
+ Look for the originating spec, in this order:
30
+
31
+ 1. Issue references in the commit messages (`#123`, `Closes #45`, etc.) — fetch via `gh issue view` per `.red/agents/issue-tracker.md`.
32
+ 2. A path the user passed as an argument.
33
+ 3. A Spec/spec file under `docs/` or `specs/` matching the branch name or feature.
34
+ 4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
35
+
36
+ ### 3. Identify the standards sources
37
+
38
+ Anything in the repo that documents how code should be written. Common locations:
39
+
40
+ - `CLAUDE.md`, `AGENTS.md`
41
+ - `CONTRIBUTING.md`
42
+ - `.red/CONTEXT.md`, `.red/CONTEXT-MAP.md`, per-context `.red/CONTEXT.md` files
43
+ - `.red/adr/` (architectural decisions are standards)
44
+ - `.editorconfig`, `eslint.config.*`, `biome.json`, `prettier.config.*`, `tsconfig.json` (machine-enforced standards — note them but don't re-check what tooling already checks)
45
+ - Any `STYLE.md`, `STANDARDS.md`, `STYLEGUIDE.md`, or similar at the repo root or under `docs/`
46
+
47
+ Collect the list of files. The **Standards** sub-agent will read them and also apply the always-on Fowler smell baseline (see `<supporting-info>`).
48
+
49
+ ### 4. Spawn both sub-agents in parallel
50
+
51
+ Send a single message with two `Agent` tool calls. Use the `general-purpose` subagent for both.
52
+
53
+ **Standards sub-agent prompt** — include:
54
+
55
+ - The full diff command and commit list.
56
+ - The list of standards-source files you found in step 3.
57
+ - The twelve-smell Fowler baseline table from `<supporting-info>`, pasted in verbatim so the sub-agent has the list without reading this skill's file.
58
+ - The brief: "Read the standards docs. Then read the diff. Report — per file/hunk where relevant — every place the diff violates a documented standard. Cite the standard (file + the rule). Distinguish hard violations from judgement calls. Skip anything tooling enforces. Also apply the always-on Fowler smell baseline table above, even when no standards doc exists. For each smell found, name it and suggest a one-line fix. Repo standards override the baseline. Under 400 words total."
59
+
60
+ **Spec sub-agent prompt** — include:
61
+
62
+ - The diff command and commit list.
63
+ - The path or fetched contents of the spec.
64
+ - The brief: "Read the spec. Then read the diff. Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."
65
+
66
+ If the spec is missing, skip the Spec sub-agent and note this in the final report.
67
+
68
+ ### 5. Aggregate
69
+
70
+ Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings — the two axes are deliberately separate so the user can see them independently.
71
+
72
+ End with a one-line summary: total findings per axis, and the worst single issue (if any) flagged.
73
+
74
+ </what-to-do>
75
+
76
+ <supporting-info>
77
+
78
+ ## Why two axes
79
+
80
+ A change can pass one axis and fail the other:
81
+
82
+ - Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
83
+ - Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
84
+
85
+ Reporting them separately stops one axis from masking the other.
86
+
87
+ ## Fowler smell baseline
88
+
89
+ These twelve smells apply universally to every review, even when the repo has no written standards. Repo-specific standards override or extend them.
90
+
91
+ | Smell | One-line fix |
92
+ |---|---|
93
+ | **Mysterious Name** | Rename to describe exactly what it does |
94
+ | **Duplicated Code** | Extract the shared logic once |
95
+ | **Feature Envy** | Move the method closer to the data it uses |
96
+ | **Data Clumps** | Bundle the recurring group into an object |
97
+ | **Primitive Obsession** | Replace bare strings/numbers with typed objects |
98
+ | **Repeated Switches** | Replace with polymorphism or a dispatch table |
99
+ | **Shotgun Surgery** | Consolidate the scattered change points into one place |
100
+ | **Divergent Change** | Split the class by its distinct responsibilities |
101
+ | **Speculative Generality** | Delete the unused abstraction |
102
+ | **Message Chains** | Introduce a method that hides the chain |
103
+ | **Middle Man** | Remove the delegator and call the real object directly |
104
+ | **Refused Bequest** | Push down the unused inheritance to the subclass that needs it |
105
+
106
+ </supporting-info>
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: context
3
+ description: Build and refresh the project context stack before non-trivial work — domain glossary, ADRs, LLM Wiki, Memory graph, graph-aware zoom-out, and self-improvement signals. Use when the user asks to "get context", "manage context", onboard to a repo, prepare a large change, or improve agent memory/self-improvement loops.
4
+ ---
5
+
6
+ # context
7
+
8
+ **Ground the session before non-trivial work — read committed docs, recall memory, zoom out, then drill in.**
9
+
10
+ <what-to-do>
11
+
12
+ ## Context stack loop
13
+
14
+ Run these phases in order. Skip a phase only when its prerequisite is absent and the fallback says to skip.
15
+
16
+ ### 1. Orient from committed project context
17
+
18
+ Read these first, if present:
19
+
20
+ 1. `CLAUDE.md` or `AGENTS.md` — agent rules and registered skills.
21
+ 2. `.red/CONTEXT.md` — canonical domain glossary.
22
+ 3. `.red/adr/` — architectural decisions, newest relevant ADRs first.
23
+ 4. `.red/CONTEXT-MAP.md` — monorepo context routing, if present.
24
+
25
+ Do not ask the user to repeat information that is already present in those files. If the glossary is missing a term you must use in the answer or plan, add or propose the term through the owning workflow (`/start` for domain/ADR updates) instead of inventing private vocabulary in chat.
26
+
27
+ ### 2. Recall prior memory before re-deriving
28
+
29
+ If memory is configured here (a `plugins.memory` block in `.red/config.yaml`, or the legacy `.red/memory/config.json`), run a targeted recall before deep investigation:
30
+
31
+ ```bash
32
+ node "${CLAUDE_PLUGIN_ROOT}/../memory/scripts/bootstrap.mjs" recall "<topic terms>"
33
+ ```
34
+
35
+ Use the configured Memory mode automatically. In graph mode, recall is neighborhood-expanded and supersede-aware; in markdown-only mode, it searches notes. Treat hits as historical claims: cite them internally, then verify against the current worktree before relying on them.
36
+
37
+ Fallback: if Memory is absent, unbuilt, uninitialized, markdown-only when graph is needed, or failing, continue with ordinary repo reads. Memory is an optimization, not a hard dependency of `dev`.
38
+
39
+ ### 3. Refresh structural graph only when explicitly useful
40
+
41
+ Use graph indexing for large or unfamiliar codebases, impact analysis, onboarding, or repeated work across sessions:
42
+
43
+ ```bash
44
+ node "${CLAUDE_PLUGIN_ROOT}/../memory/scripts/bootstrap.mjs" ingest . --root .
45
+ ```
46
+
47
+ Only run this when Memory is initialized in graph mode. Do not run it from read-only skills such as `/zoom-out`; for those, recommend the command instead. Re-run after large refactors or before a long `/afk` wave if the graph is stale.
48
+
49
+ ### 4. Zoom out before drilling in
50
+
51
+ Use `/zoom-out` semantics for map-first understanding:
52
+
53
+ - Start with modules/layers and ownership boundaries.
54
+ - Then explain relationships, critical paths, risks/gaps, and optional impact.
55
+ - Use Memory graph neighbors/paths only as evidence to interpret, never as raw dumps.
56
+ - Verify graph evidence against files before making claims.
57
+
58
+ For a concrete bug or feature, produce a short orientation map before reading leaf files. This mirrors the Understand-Anything / graphify lesson: the graph is valuable when it teaches how pieces fit together, not when it merely shows complexity.
59
+
60
+ ### 5. Use the LLM Wiki for durable project knowledge
61
+
62
+ If `.red/agents/wiki.md` and `.red/wiki/` exist, use `/wiki query <question>` for compiled knowledge and `/wiki ingest <source>` for durable external or internal sources.
63
+
64
+ Rules:
65
+
66
+ - Read `.red/agents/wiki.md` before any wiki operation.
67
+ - Keep `.red/wiki/` gitignored; do not commit raw/private wiki state.
68
+ - File back only durable syntheses that would be painful to re-derive.
69
+ - Keep source pages, concept/entity pages, contradictions, and index/log current.
70
+
71
+ Fallback: if the wiki is not initialized and the project would benefit from compounding research/docs memory, recommend `/wiki-init` with the target domain.
72
+
73
+ ### 6. Capture only durable learning
74
+
75
+ After a non-trivial investigation, store one fact per durable lesson:
76
+
77
+ ```bash
78
+ node "${CLAUDE_PLUGIN_ROOT}/../memory/scripts/bootstrap.mjs" store "<decision, gotcha, or why-note>"
79
+ ```
80
+
81
+ Store durable operational decisions, root causes, and gotchas. Do not store secrets, Personal facts, biographical details, durable human preferences, transient progress, issue numbers, PR numbers, commit SHAs, or "task done" logs that will be stale in a week. Route human-facing context to Brain with `brain capture`. If the learning is procedural and reusable, update or create a skill instead of storing it as memory.
82
+
83
+ ### 7. Check self-improvement signals
84
+
85
+ When Skill telemetry is enabled, inspect it before curating:
86
+
87
+ ```bash
88
+ node "${CLAUDE_PLUGIN_ROOT}/../memory/scripts/bootstrap.mjs" status skills --root .
89
+ node "${CLAUDE_PLUGIN_ROOT}/../memory/scripts/bootstrap.mjs" curate skills --root .
90
+ ```
91
+
92
+ `memory curate skills` is report-only. Mutating workflow stays in `/curate`, which archives only Curatable skills after explicit approval and can restore them. Never auto-delete skills.
93
+
94
+ ### 8. Report the context posture
95
+
96
+ Before moving into implementation, summarize:
97
+
98
+ - Committed context read: files/ADRs consulted.
99
+ - Memory posture: absent / markdown-only / graph ready / graph stale / recall hits used.
100
+ - Wiki posture: absent / queried / updated.
101
+ - Codebase map: key modules and edges relevant to the task.
102
+ - Self-improvement posture: no action / store facts / update skill / run curator.
103
+
104
+ Keep this summary concise. The goal is to prove the agent is grounded, not to dump every artifact.
105
+
106
+ ### 9. End-of-session doc-landing finalizer
107
+
108
+ When the context session ends, run the shared end-of-session doc-landing finalizer in [`/start`'s DOC-LANDING-FINALIZER.md](../start/DOC-LANDING-FINALIZER.md) before exiting.
109
+
110
+ ## Hard rules
111
+
112
+ - Do not let graph or memory output outrank the current worktree.
113
+ - Do not dump raw nodes, edges, recall hits, or path listings as the final answer; interpret them into project terms.
114
+ - Do not write Memory/Wiki/Skill state from a read-only analysis unless the user asked for that side effect.
115
+ - Do not commit `.red/wiki/`, `.red/memory/graph.rdb*`, generated graph exports, or private memory notes unless the project explicitly made them committable.
116
+ - Prefer one focused context refresh over repeated broad searches.
117
+
118
+ </what-to-do>
119
+
120
+ <supporting-info>
121
+
122
+ ## Choosing the right surface
123
+
124
+ | Need | Surface |
125
+ |------|---------|
126
+ | Current repo rules and vocabulary | `CLAUDE.md` / `AGENTS.md`, `.red/CONTEXT.md`, `.red/adr/` |
127
+ | Prior decisions/gotchas | `/memory:recall` |
128
+ | Code structure and impact | `/memory:ingest`, graph reads, `/zoom-out` |
129
+ | External docs/research/source synthesis | `/wiki ingest`, `/wiki query` |
130
+ | Durable operational work fact | `/memory:store` |
131
+ | Personal fact or human-facing context | `brain capture` / `/brain:capture` |
132
+ | Reusable procedure | update/create a `SKILL.md` |
133
+ | Skill lifecycle maintenance | `memory status skills`, `memory curate skills`, `/curate` |
134
+
135
+ ## Common outcomes
136
+
137
+ - **Cold repo:** run `/red-setup`, then `/wiki-init` only if the repo needs a private knowledge base, then `memory init --mode graph` when persistent graph recall is worth the local RedDB store.
138
+ - **Large code change:** recall prior decisions, ingest if graph is stale, zoom out around the target, then drill down.
139
+ - **Repeated agent failures:** recall prior attempts/root causes, inspect Skill telemetry, update the failing skill or file a human-ready curator issue.
140
+ - **Research-heavy project:** ingest sources into the wiki, create synthesis pages, store only stable operational decisions/gotchas in Memory, and capture Personal facts or human-facing context in Brain.
141
+
142
+ </supporting-info>
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: curate
3
+ description: Interactive Skill curator. Reads `memory curate skills --json`, groups Curatable-skill candidates by category (`stale`, `abandoned`, `frequently-failing`, `archive`), asks for explicit approval, archives the approved set recoverably with the approving category recorded in the manifest, and reverses any archive with `/curate --restore <name>`. With `--background`, files a single `ready-for-human` Issue listing candidates and never mutates a Skill file.
4
+ argument-hint: "[--restore <skill-name>] [--background] (no arg = interactive curation flow)"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ **Archive Curatable skills recoverably — the engine uses `rename` only; never call `rm`, `unlink`, or `git rm`, because every archive reverses with `--restore <name>`.**
9
+
10
+ <what-to-do>
11
+
12
+ This skill **mutates skills on disk**. Run the loop below verbatim. Every mutation goes through `memory curate`, the workflow engine embedded in the Memory CLI — never invent shell commands that delete, overwrite, or rename skill files directly.
13
+
14
+ ### Boot precondition (always, before anything else)
15
+
16
+ Run `memory curate check`. If it exits non-zero, print its stderr verbatim and **stop**. The error already names the exact `memory init --mode graph --skill-telemetry` command the user needs.
17
+
18
+ ### Background mode — `--background`
19
+
20
+ If the argument is `--background`:
21
+
22
+ 1. Run `memory curate background`. The engine runs the same boot precondition (graph mode + Skill telemetry); if the precondition fails it prints the **same prerequisite message** the interactive path uses and exits non-zero. Print its stderr verbatim and stop.
23
+ 2. The engine reads `memory curate skills --json`, applies the same Curatable / pinned / category filtering as the interactive view, and:
24
+ - if the candidate list is **empty**, exits with no side effect (no issue is filed, no comment, no noise);
25
+ - otherwise files **exactly one** Issue on the project's Issue tracker labelled `ready-for-human` whose body lists candidates grouped by category (`stale` → `abandoned` → `frequently-failing` → `archive`) with the same glossary vocabulary and evidence the interactive view shows.
26
+ 3. Print the engine's one-line receipt verbatim. Stop.
27
+
28
+ `--background` performs **zero filesystem mutations of any Skill file** under any input — it never invokes `archive` or `restore`. The loop closes when a human (or `/afk` against the filed issue) runs interactive `/curate` and names the skills to archive; that path keeps the tracer-slice atomic-rename + hash-manifest guarantees.
29
+
30
+ ### Restore mode — `--restore <name>`
31
+
32
+ If the argument starts with `--restore`:
33
+
34
+ 1. Extract `<name>` (everything after `--restore`).
35
+ 2. Run `memory curate restore <name>`.
36
+ 3. The engine reads the archive manifest, moves the skill back to its **original** path, and verifies every restored file's SHA-256 against the manifest.
37
+ 4. Print the engine's receipt verbatim. Stop.
38
+
39
+ If the user passes `--restore` with no name, ask for one and re-issue.
40
+
41
+ ### Curation mode — default (interactive)
42
+
43
+ 1. **List candidates.** Run `memory curate list`. It emits JSON of the form:
44
+ ```json
45
+ {
46
+ "candidates": [...],
47
+ "byCategory": { "stale": [...], "abandoned": [...], "frequently-failing": [...], "archive": [...] },
48
+ "filtered": [...],
49
+ "totals": {...}
50
+ }
51
+ ```
52
+ `candidates[]` is the flat list across every in-scope category; each entry carries `category` and the curator's `reason` for that category. `byCategory` is the same data indexed by category — **categories with zero candidates are absent**, never present as empty arrays. `filtered[]` records anything the engine defensively dropped (bundled `plugin`/`hub` source kinds, pinned skills, non-curatable items).
53
+
54
+ 2. **Empty case.** If `candidates` is `[]` (equivalently, `byCategory` is `{}`), print `no curate candidates — nothing to curate` and **stop**. Do not invoke `archive`. Do not write any file.
55
+
56
+ 3. **Show the user, grouped by category.** For each category present in `byCategory`, in the order `stale`, `abandoned`, `frequently-failing`, `archive`, print a header naming the category and one block per candidate beneath it. Each block must show:
57
+ - the skill `name`,
58
+ - `source_kind`,
59
+ - the original `path`,
60
+ - the category-specific evidence carried in `reason` (e.g. "no skill activity for 90d (threshold 60d)" for `stale`, "loaded 5× but never invoked" for `abandoned`, "3/6 results failed (50%)" for `frequently-failing`, the archive signal text for `archive`).
61
+
62
+ **Do not** render a header for a category that is not present in `byCategory`. Use the canonical glossary terms — "Curatable skill", "Skill telemetry", and the four category names — verbatim.
63
+
64
+ 4. **Ask for explicit approval.** Prompt: `Archive which skills? Reply with comma-separated names, "all", or "none".` Approval is by skill name; if the same skill appears in more than one category, ask the user which category to record before archiving and archive once. Treat anything that isn't a known candidate name (or `all`) as `none`. **No approval = no mutation.** This is the load-bearing safety surface; do not infer consent from silence, conversation history, or default.
65
+
66
+ 5. **Archive each approved Curatable skill.** For every approved name, invoke `memory curate archive --candidate <json>` where `<json>` is the matching candidate object from step 1 (including its `category`) emitted via single-quoted JSON. The engine:
67
+ - Re-validates `source_kind` and `pinned` (refuses bundled / pinned inputs with a structured rejection — no I/O).
68
+ - Computes SHA-256 + byte length for every file under the skill's directory.
69
+ - Moves the skill into `.red/memory/skill-archive/<name>/payload/` via atomic `rename` (no `unlink`/`rm`).
70
+ - Writes a manifest at `.red/memory/skill-archive/<name>/manifest.json` recording the original root, archive timestamp, **the approving category**, the evidence reason, and per-file hashes.
71
+
72
+ 6. **Print the receipt.** For each archived skill, echo the engine's one-line output. Then print: `Restore any of them with /curate --restore <name>.`
73
+
74
+ ### Invariants you must not violate
75
+
76
+ - ✅ Empty / declined approval → zero filesystem mutations.
77
+ - ✅ Bundled (`source_kind` `plugin` / `hub`) and pinned skills are filtered defensively in every category and never archived, even if a future Memory build leaks one into the report.
78
+ - ✅ Categories with zero candidates are omitted from the listing — never shown as empty headers.
79
+ - ✅ Every archive is recoverable through `/curate --restore <name>` — the engine refuses to clobber an existing archive directory and refuses to overwrite a live skill on restore.
80
+ - ❌ Never call `rm`, `unlink`, `git rm`, or any shell that deletes files in this flow. The engine uses `rename` only; you must follow the same discipline.
81
+
82
+ </what-to-do>
83
+
84
+ <supporting-info>
85
+
86
+ ### Invocation cheat sheet
87
+
88
+ ```
89
+ # Boot check (always first)
90
+ memory curate check
91
+
92
+ # List candidates grouped by category as JSON
93
+ memory curate list
94
+
95
+ # Non-interactive: file a single ready-for-human Issue (never mutates a Skill file)
96
+ memory curate background
97
+
98
+ # Archive one approved candidate (category flows into the manifest)
99
+ memory curate archive --candidate '{"name":"foo","source_kind":"project","path":"/abs/.../SKILL.md","reason":"no skill activity for 90d (threshold 60d)","category":"stale"}'
100
+
101
+ # Restore one archived skill
102
+ memory curate restore foo
103
+ ```
104
+
105
+ The workflow ships inside the `memory` CLI. `memory curate skills` remains report-only; `memory curate check|list|background|archive|restore` are the `/curate` workflow commands.
106
+
107
+ ### Archive layout
108
+
109
+ ```
110
+ .red/memory/skill-archive/
111
+ └── <skill-name>/
112
+ ├── manifest.json # {name, originalRoot, archivedAt, category, reason, files:[{relativePath, sha256, byteLength}]}
113
+ └── payload/ # the renamed-in original skill directory
114
+ ├── SKILL.md
115
+ └── ...
116
+ ```
117
+
118
+ After a restore, the `payload/` directory is renamed back to its original path and the `manifest.json` is intentionally left behind as a record (the engine never calls a destructive op).
119
+
120
+ ### Glossary anchors
121
+
122
+ - **Curatable skill** — a Skill whose files may be modified, consolidated, or archived because it is user-owned or agent-created. Bundled `plugin` / `hub` skills are not Curatable.
123
+ - **Skill telemetry** — lifecycle and interaction events for a Skill, available only in **Graph mode** with the `--skill-telemetry` opt-in.
124
+ - **stale** — a Skill that has had no activity for at least the configured stale threshold (default 60 days).
125
+ - **abandoned** — a Skill that has been viewed (loaded) but never used, or whose `abandoned` outcomes outweigh `succeeded` ones.
126
+ - **frequently-failing** — a Skill whose share of `failed` result outcomes is at or above the failure-ratio threshold over a minimum number of result events.
127
+ - **archive** — the recoverable move of an approved Curatable skill into `.red/memory/skill-archive/`, reversible via `/curate --restore`.
128
+
129
+ ### Scope (this slice)
130
+
131
+ This slice extends the tracer's archive-only flow to the four in-scope curator categories: `stale`, `abandoned`, `frequently-failing`, and `archive`. The remaining curator categories (`consolidation`, `restore`) surface in the Memory report but are **not** acted on by this version of `/curate`; their mutating workflows are later slices.
132
+
133
+ </supporting-info>
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: daily-review
3
+ description: Generates a RedSkills operational review for a requested period. Default period is yesterday midnight to now (one day); pass `--period week` for a six-day window. Covers delivered work, local AFK workers, cycle times, and HITL/blocker challenges. Use when the user invokes `/daily-review`, `/weekly-review`, asks for daily or weekly delivery numbers, issues/PRs/commits/diffstat, worker attempts, token spend, or why tasks needed HITL.
4
+ argument-hint: "[--period day|week] [--json] [--human]"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # /daily-review
9
+
10
+ <what-to-do>
11
+
12
+ **Wrapper over the dev runtime — see [`_report-runtime/WRAPPER.md`](./../_report-runtime/WRAPPER.md) for the Run shim and output-format rules.**
13
+
14
+ Run the subcommand that matches the requested period:
15
+
16
+ | Period flag | Subcommand |
17
+ | --- | --- |
18
+ | `--period day` (default) | `red-skills-dev daily-review [--json]` |
19
+ | `--period week` | `red-skills-dev weekly-review [--json]` |
20
+
21
+ Dev-checkout equivalent:
22
+
23
+ | Period flag | Command |
24
+ | --- | --- |
25
+ | `--period day` (default) | `node plugins/dev/skills/engineering/afk/bin/afk.mjs daily-review [--json]` |
26
+ | `--period week` | `node plugins/dev/skills/engineering/afk/bin/afk.mjs weekly-review [--json]` |
27
+
28
+ </what-to-do>
29
+
30
+ <supporting-info>
31
+
32
+ ## Intervals
33
+
34
+ **day (default):** local midnight at the start of yesterday through the exact
35
+ generation time. Example: if now is `2026-06-06 14:25`, the interval is
36
+ `2026-06-05 00:00` through `2026-06-06 14:25`.
37
+
38
+ **week:** local midnight six calendar days before today through the exact
39
+ generation time. Example: if now is `2026-06-06 14:25`, the interval is
40
+ `2026-05-31 00:00` through `2026-06-06 14:25`.
41
+
42
+ ## Output format detail
43
+
44
+ The TOON wire format renders the `workers`, `challenges`, and cycle-time tables
45
+ as one column header plus bare CSV rows; big-number aggregates are pre-computed;
46
+ empty tables use the definitive `key[0]:` empty state.
47
+
48
+ ## Report Sections
49
+
50
+ - Big numbers: issues created/closed, PRs created/closed/merged, commits, lines
51
+ added/removed, local workers, local attempts, local worker time, token spend
52
+ when retained runner logs expose usage fields.
53
+ - Local workers: worker id, attempts, issues, runner, duration, and terminal
54
+ events from the `.red/state/castle/history.toonl` TOONL lane plus live local
55
+ worker state. `tq` is pinned by `/red-setup` and is the only documented
56
+ reader for RedSkills-owned TOONL lanes; there is no jq fallback.
57
+ - Challenges: HITL/blocker/no-sentinel/merge-conflict evidence from issue
58
+ labels, issue bodies/comments, and local AFK history reasons.
59
+ - Issue and PR cycle times: closed-in-interval rows include items opened before
60
+ the interval, so old work closed in the review window remains visible.
61
+
62
+ ## Notes
63
+
64
+ Token spend is best-effort. Current AFK artifacts do not guarantee usage fields;
65
+ the report says `n/a` and emits a warning when no retained local log has token
66
+ data.
67
+
68
+ </supporting-info>
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: dashboard
3
+ description: Shows a RedSkills operational dashboard with issue, Spec, AFK worker, flow, and DORA-proxy metrics from GitHub plus local AFK state. Use when the user invokes `/dashboard`, asks for RedSkills process metrics, workers running, open Specs/issues, cycle time, or DORA metrics.
4
+ argument-hint: "[--period N|Nd] [--json] [--human]"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # /dashboard
9
+
10
+ <what-to-do>
11
+
12
+ **Wrapper over the dev runtime — see [`_report-runtime/WRAPPER.md`](./../_report-runtime/WRAPPER.md) for the Run shim and output-format rules.**
13
+
14
+ Run: `red-skills-dev dashboard [--period 30d] [--json]`
15
+
16
+ Dev-checkout equivalent: `node plugins/dev/skills/engineering/afk/bin/afk.mjs dashboard [--period 30d] [--json]`
17
+
18
+ </what-to-do>
19
+
20
+ <supporting-info>
21
+
22
+ ## Output format detail
23
+
24
+ The TOON wire format uses pre-computed aggregate groups, minimal schemas, and a
25
+ definitive `warnings[0]:` empty state.
26
+
27
+ ## Metrics
28
+
29
+ - Open Specs.
30
+ - Open non-Spec issues.
31
+ - Global running workers: open issues labelled `running`.
32
+ - Local workers on this machine: live/stale/total AFK worker state files.
33
+ - Issues created, closed today, and closed in the selected period.
34
+ - Due metrics from `due: YYYY-MM-DD`, `due_date: YYYY-MM-DD`, `deadline: YYYY-MM-DD`, `target date: YYYY-MM-DD`, or label `due:YYYY-MM-DD`.
35
+ - PR flow: open PRs, merged PRs, average issue cycle time, average PR lead time.
36
+ - DORA proxies: release frequency, lead time for changes, change-failure-rate proxy, failure-like issues closed, MTTR proxy.
37
+
38
+ ## Notes
39
+
40
+ The DORA values are explicit proxies, not compliance claims. Change failure and
41
+ MTTR depend on issue labels such as `type:bug`, `bug`, `regression`, `incident`,
42
+ `type:incident`, or `blocked:validation`.
43
+
44
+ </supporting-info>
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: diagnose
3
+ description: Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.
4
+ ---
5
+
6
+ # Diagnose
7
+
8
+ **Build the feedback loop first — without one, every subsequent phase is mechanical guesswork.**
9
+
10
+ <what-to-do>
11
+
12
+ When exploring the codebase, use the project's domain glossary to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
13
+
14
+ ### Phase 1 — Build a feedback loop
15
+
16
+ **This is the skill.** Do not move on without one. A fast, deterministic, agent-runnable pass/fail signal makes every later phase mechanical. Without one, no amount of staring at code will save you.
17
+
18
+ **Be aggressive. Be creative. Refuse to give up.** Spend disproportionate effort here.
19
+
20
+ Try the 10 construction strategies in `<supporting-info>` in roughly that order. Once you have a loop, **iterate on it as a product**:
21
+
22
+ - Make it faster (cache setup, narrow scope)
23
+ - Make the signal sharper (assert on the specific symptom, not "didn't crash")
24
+ - Make it deterministic (pin time, seed RNG, isolate filesystem, freeze network)
25
+
26
+ For **non-deterministic** bugs the goal is a **higher reproduction rate**, not a clean repro. Loop the trigger 100×, parallelise, add stress, narrow timing windows. 50% flake is debuggable; 1% is not.
27
+
28
+ **Do not proceed to Phase 2 until you have a loop you believe in.** If you genuinely cannot build one, stop and tell the user what you tried; ask for environment access, a captured artifact, or permission to add temporary production instrumentation.
29
+
30
+ ### Phase 2 — Reproduce
31
+
32
+ Run the loop. Watch the bug appear. Confirm all three:
33
+
34
+ - [ ] The loop produces the failure mode the **user** described — not a different failure that happens to be nearby
35
+ - [ ] The failure is reproducible across multiple runs (or, for non-deterministic bugs, at a high enough rate to debug against)
36
+ - [ ] You captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix addresses it
37
+
38
+ **Do not proceed until you reproduce the bug.**
39
+
40
+ ### Phase 3 — Hypothesise
41
+
42
+ **First, recall past root causes** (optional — only if the `memory` plugin is installed; see *Memory recall* in `<supporting-info>`). A symptom you're seeing now may have a documented root cause from a previous diagnosis — recalling it pre-seeds the hypothesis list with battle-tested candidates instead of starting cold. Best-effort: if `memory` is absent, skip silently and hypothesise as usual.
43
+
44
+ Generate **3–5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea. Fold any recalled root cause in as a candidate — but still verify it against *this* repro; a past cause is a lead, not a verdict.
45
+
46
+ Each hypothesis **must be falsifiable**:
47
+
48
+ > Format: *"If &lt;X&gt; is the cause, then &lt;changing Y&gt; will make the bug disappear / &lt;changing Z&gt; will make it worse."*
49
+
50
+ If you can't state the prediction, the hypothesis is a vibe — discard or sharpen it.
51
+
52
+ **Show the ranked list to the user before testing.** They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3") or know hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't block on it if the user is AFK — proceed with your ranking.
53
+
54
+ ### Phase 4 — Instrument
55
+
56
+ Each probe maps to a specific prediction from Phase 3. **Change one variable at a time.**
57
+
58
+ Tool preference, in order:
59
+
60
+ 1. Debugger / REPL inspection if the env supports it — one breakpoint beats ten logs
61
+ 2. Targeted logs at the boundaries that distinguish hypotheses
62
+ 3. Never "log everything and grep"
63
+
64
+ **Tag every debug log** with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup becomes a single grep. Untagged logs survive; tagged logs die.
65
+
66
+ **Perf branch.** For performance regressions, logs are usually wrong. Establish a baseline measurement (timing harness, `performance.now()`, profiler, query plan), then bisect. Measure first, fix second.
67
+
68
+ ### Phase 5 — Fix + regression test
69
+
70
+ Write the regression test **before the fix** — but only if a **correct seam** exists. A correct seam exercises the **real bug pattern** as it occurs at the call site. A too-shallow seam (single-caller unit test when the bug needs the multi-caller chain) gives false confidence.
71
+
72
+ **If no correct seam exists, that itself is the finding.** Note it explicitly. The codebase architecture is preventing the bug from being locked down — flag for Phase 6.
73
+
74
+ If a correct seam exists:
75
+
76
+ 1. Turn the minimised repro into a failing test at that seam
77
+ 2. Watch it fail
78
+ 3. Apply the fix
79
+ 4. Watch it pass
80
+ 5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario
81
+
82
+ ### Phase 6 — Cleanup + post-mortem
83
+
84
+ Required before declaring done — every box:
85
+
86
+ - [ ] Original repro no longer reproduces (re-run the Phase 1 loop)
87
+ - [ ] Regression test passes (or absence of seam is documented)
88
+ - [ ] All `[DEBUG-...]` instrumentation removed (`grep` the prefix)
89
+ - [ ] Throwaway prototypes deleted (or moved to a clearly-marked debug location)
90
+ - [ ] The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns
91
+ - [ ] **If `memory` is installed**, store the root cause + fix so the *next* diagnosis recalls it in Phase 3: `/memory:store <symptom → root cause → fix>` (optional — skip silently if the plugin is absent)
92
+
93
+ **Then ask: what would have prevented this bug?** If the answer involves architectural change (no good test seam, tangled callers, hidden coupling), hand off to `/improve-codebase-architecture` with the specifics. Make the recommendation **after** the fix is in, not before — you have more information now than when you started.
94
+
95
+ ### Hard rules — apply across phases
96
+
97
+ - ❌ Do **not** start hypothesising without a feedback loop (Phase 1 must close first)
98
+ - ❌ Do **not** apply a fix before reproducing the bug
99
+ - ❌ Do **not** change more than one variable per probe in Phase 4
100
+ - ❌ Do **not** leave `[DEBUG-...]` instrumentation in the final diff
101
+ - ❌ Do **not** declare done without re-running the Phase 1 loop against the original scenario
102
+ - ✅ **Do** state explicitly when you're skipping a phase and why
103
+
104
+ </what-to-do>
105
+
106
+ <supporting-info>
107
+
108
+ ## Ten ways to construct a feedback loop (Phase 1)
109
+
110
+ Try in roughly this order. Stop at the first one that gives you a fast, deterministic pass/fail signal.
111
+
112
+ 1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e
113
+ 2. **Curl / HTTP script** against a running dev server
114
+ 3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot
115
+ 4. **Headless browser script** (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network
116
+ 5. **Replay a captured trace.** Save a real network request / payload / event log to disk; replay through the code path in isolation
117
+ 6. **Throwaway harness.** Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug with a single function call
118
+ 7. **Property / fuzz loop.** If "sometimes wrong output", run 1000 random inputs and look for the failure mode
119
+ 8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate `boot at state X, check, repeat` so you can `git bisect run` it
120
+ 9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs
121
+ 10. **HITL bash script.** Last resort. If a human must click, drive *them* with `scripts/hitl-loop.template.sh` so the loop is still structured. Captured output feeds back to you
122
+
123
+ Build the right feedback loop and the bug is 90% fixed.
124
+
125
+ ## Loop quality reminder
126
+
127
+ A 30-second flaky loop is barely better than no loop. A 2-second deterministic loop is a debugging superpower.
128
+
129
+ ## When you genuinely cannot build a loop
130
+
131
+ Stop and say so explicitly. List what you tried. Ask the user for one of:
132
+
133
+ - (a) Access to whatever environment reproduces it
134
+ - (b) A captured artifact (HAR file, log dump, core dump, screen recording with timestamps)
135
+ - (c) Permission to add temporary production instrumentation
136
+
137
+ Do **not** proceed to hypothesise without a loop.
138
+
139
+ ## Memory recall (optional — only if the `memory` plugin is installed)
140
+
141
+ `memory` is a sibling plugin that, when present, holds root causes from past diagnoses. Recalling at the top of Phase 3 means a recurring or related bug arrives with its previously-found cause already on the table — the single biggest accelerator for "we've seen this before". **Best-effort, never a gate**: if `memory` is not installed, skip it and diagnose exactly as today.
142
+
143
+ ```bash
144
+ if { [ -f .red/config.yaml ] && grep -qE '^[[:space:]]+memory:' .red/config.yaml; } || [ -f .red/memory/config.json ]; then
145
+ _bridge="${CLAUDE_PLUGIN_ROOT:-}/scripts/memory-bridge.sh"
146
+ [ -f "$_bridge" ] || _bridge="$(git rev-parse --show-toplevel 2>/dev/null)/plugins/dev/scripts/memory-bridge.sh"
147
+ [ -f "$_bridge" ] && source "$_bridge" \
148
+ && MEMORY_REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" \
149
+ memory_recall . "<2–6 keywords from the symptom / error / module>"
150
+ fi
151
+ ```
152
+
153
+ `memory_recall` prints a ranked block or nothing and **always exits 0** — a missing or erroring memory never derails the diagnosis. Each hit is a claim made at store time: verify it against the current repro before promoting it up your hypothesis ranking. An empty result means "nothing stored", not "novel bug". Close the loop in Phase 6 by storing this diagnosis's root cause so the next one recalls it.
154
+
155
+ </supporting-info>