@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,35 @@
1
+ # Setup RedSkills Reference
2
+
3
+ # Setup RedSkills
4
+
5
+ **Scaffold the per-repo configuration that the engineering skills assume — this skill is the only thing authorized to create `.red/`.** NEVER create `.red/` outside this skill — plugins stay fully inert in any directory whose `.red/config.yaml` is missing or lacks an explicit `plugins.<name>.enabled: true`.
6
+
7
+ Scaffold includes:
8
+
9
+ - **Plugin activation** — the per-directory gate (ADR 0067): which RedSkills plugins (`dev`, `memory`, `brain`) are allowed to run here.
10
+ - **Issue tracker** — GitHub Issues (the only supported option, reddb.io policy)
11
+ - **Triage labels** — the strings used for the canonical triage roles and label families
12
+ - **Domain docs** — where `.red/CONTEXT.md` and ADRs live, and the consumer rules for reading them
13
+ - **Workflows** — GitHub Actions shipped by RedSkills (installed under the `rs-*` prefix), e.g. auto-label fresh issues with `needs-triage` so nothing slips past `/triage` and `/afk`
14
+ - **Token efficiency** — provision the repo-owned `rsp` opt-in (`rsp.enabled: true`) so supported noisy commands can use wrapper summaries, reversible elision handles, and hook rewrites without a third-party proxy
15
+ - **Runtime launcher** — optionally install a host-level `red-skills-dev` shim so Claude Code, Codex, and opencode can invoke the same dev runtime without relying on CLI-specific plugin-root env vars
16
+ - **Required host binaries** — install pinned `tq` (`TQ_VERSION=v0.3.0`) through the toon repo installer and record `host_binaries.tq.version` so `/red-doctor` can enforce the no-jq-fallback TOON/TOONL contract
17
+ - **Command guards** — configure the repo-owned `.red/config.yaml` policy that the globally-installed Claude Code, Codex, and opencode hook proxies enforce
18
+ - **Development workflow** — teach agents the `.red/tmp` worktree rules, preserve the primary checkout for the human, and route one-off concrete work through `/go` (ADR 0081)
19
+
20
+ This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
21
+
22
+ ## Explore Checklist
23
+
24
+ ### Explore
25
+
26
+ Look at the current repo to understand its starting state. Read whatever exists; don't assume:
27
+
28
+ - `git remote -v` and `.git/config` — is this a GitHub repo? Which one?
29
+ - `AGENTS.md` and `CLAUDE.md` at the repo root — does either exist? Is there already an `## Agent skills` section in either?
30
+ - `.red/CONTEXT.md` and `.red/CONTEXT-MAP.md` at the repo root
31
+ - `.red/adr/` — the single root ADR sequence (there are no nested `.red/` subtrees)
32
+ - `.red/agents/` — does this skill's prior output already exist?
33
+ - `.red/config.yaml` — does it exist? Which plugins are already enabled (`plugins.<name>.enabled: true`)? Is the canonical `plugins.dev.lock.primary-branch` flag already set? Is `command_guard` already configured, and under which scopes (`global`, `main`, `worktree`, or legacy `deny`)?
34
+ - `tq --version` and `.red/config.yaml` `host_binaries.tq.version` — is the required host binary present and pinned to `0.3.0`?
35
+ - `AGENTS.md` and `CLAUDE.md` — does either already have a `## Development workflow` section?
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: red-setup
3
+ description: >-
4
+ The one authorized creator of a repo's `.red/` directory and the only way to
5
+ enable RedSkills plugins (dev, memory, brain) in a project (ADR 0067).
6
+ RedSkills hooks are installed globally on every agent but stay fully inert in
7
+ any directory without a `.red/config.yaml` whose
8
+ `plugins.<name>.enabled: true` opts that plugin in. This skill prompts which
9
+ plugins to enable, creates `.red/`, writes the activation flags, and sets up
10
+ `## Agent skills`/`## Development workflow` blocks in AGENTS.md/CLAUDE.md plus
11
+ `.red/agents/`. Run to turn RedSkills on in a repo, to enable/disable a
12
+ plugin, before first use of `to-tickets`, `to-spec`, `triage`, `diagnose`,
13
+ `tdd`, `improve-codebase-architecture`, `zoom-out`, or `/go`, or if those
14
+ skills appear to be missing context.
15
+ disable-model-invocation: true
16
+ ---
17
+
18
+ # Setup RedSkills
19
+
20
+ **Scaffold the per-repo configuration that the engineering skills assume — this skill is the only thing authorized to create `.red/`.** NEVER create `.red/` outside this skill — plugins stay fully inert in any directory whose `.red/config.yaml` is missing or lacks an explicit `plugins.<name>.enabled: true`.
21
+
22
+ This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
23
+
24
+ <what-to-do>
25
+
26
+ ## Hot Path
27
+
28
+ 1. **Explore first.** Inspect the repo state listed in [REFERENCE.md](./REFERENCE.md#explore-checklist); do not assume prior RedSkills setup is absent or current.
29
+ 2. **Ask in sequence.** Walk the user through one setup section at a time. Keep the plugin-activation gate first, then continue through issue tracker, triage labels, domain docs, workflows, token efficiency, runtime launcher, required host binaries, statusline, config template, command guards, development workflow, and hook scripts. Use the exact section copy and choices in [INTERVIEW.md](./INTERVIEW.md).
30
+ 3. **Confirm before writing.** Show the draft agent-skills block, generated agent docs, development-workflow changes, and any accepted command-guard policy before editing. See [WRITE-CONTRACT.md](./WRITE-CONTRACT.md#confirm-and-edit).
31
+ 4. **Write under the no-clobber contract.** Never overwrite, rewrite, or reorder existing user-owned content except for the explicit surgical merges named in [WRITE-CONTRACT.md](./WRITE-CONTRACT.md#write). Use the existing-file selection rules, seed docs, workflow copy rules, plugin-activation merge, development-workflow injector, statusline wiring, and hook-script registration exactly as documented there.
32
+ 5. **Sweep existing issues only after setup.** If open issues exist, group label backfill candidates and ask for one batch approval before editing labels. See [ISSUE-SWEEP.md](./ISSUE-SWEEP.md).
33
+ 6. **Finish with the setup recap.** Tell the user which plugins are enabled here, remind them that other directories stay inert until setup runs there too, point memory/brain users at their next init step, and route one-off concrete work through `/go`, backlog work through `/afk`, and parked issues through `/retake`.
34
+
35
+ ## Hard Rules
36
+
37
+ - **Only this skill may create `.red/`.** Creating `.red/` is authorized only by the plugin-activation decision; if the user enables no plugins, write nothing.
38
+ - **Global hooks are inert by default.** A plugin block alone is not enough: each enabled plugin must have `plugins.<name>.enabled: true` in `.red/config.yaml` (ADR 0067).
39
+ - **GitHub Issues only.** In reddb.io repos there is no local fallback and no supported alternate issue tracker. Stop if the repo has no GitHub remote.
40
+ - **No clobbering.** Existing files are project state. Skip existing targets unless the referenced write contract explicitly names a surgical exception.
41
+ - **Do not add generated setup files for the user.** In particular, do not `git add` `.red/config.yaml`, `.red/.gitignore`, or hook files written by this setup.
42
+ - **Workflow install is opt-in by lane.** Install only the workflows the user picked; standalone copy-installables keep their `red-*` filename, while reusable callers use `rs-*`.
43
+ - **Command guards are offer-only.** The built-in dev worktree invariant comes from `plugins.dev.enabled: true`; do not write example `command_guard` rules unless the user explicitly accepts them.
44
+ - **ask-red maintenance rule.** Skill add, rename, removal, or flow changes require re-checking `../ask-red/SKILL.md` and updating its Coverage Inventory/routes. A progressive-disclosure-only extraction of this skill is not such a change; no router update is expected after re-checking.
45
+
46
+ </what-to-do>
47
+
48
+ <supporting-info>
49
+
50
+ ## Reference Map
51
+
52
+ - [REFERENCE.md](./REFERENCE.md) — setup scope, scaffold list, and exploration checklist.
53
+ - [INTERVIEW.md](./INTERVIEW.md) — the full section-by-section user interview, including plugin activation, workflows, token efficiency, runtime launcher, statusline, config template, command guards, development workflow, and hook-script offers.
54
+ - [WRITE-CONTRACT.md](./WRITE-CONTRACT.md) — confirmation draft requirements, no-clobber rules, file-selection rules, seed-doc writes, workflow installation, config merges, statusline wiring, hook writes, and final recap text.
55
+ - [ISSUE-SWEEP.md](./ISSUE-SWEEP.md) — open-issue label backfill mechanics.
56
+ - Existing seed/reference files: [issue-tracker-github.md](./issue-tracker-github.md), [triage-labels.md](./triage-labels.md), [domain.md](./domain.md), [config-template.yaml](./config-template.yaml), [WORKFLOWS.md](./WORKFLOWS.md), and [scripts/install-runtime-shim.sh](./scripts/install-runtime-shim.sh).
57
+
58
+ </supporting-info>
@@ -0,0 +1,74 @@
1
+ # RedSkills GitHub Actions workflows
2
+
3
+ ## Naming convention — three prefixes by role
4
+
5
+ RedSkills workflows carry one of three filename prefixes, chosen by the file's
6
+ **role**:
7
+
8
+ - **`reusable-*` — reusable workflow (called by ref).** A `workflow_call`
9
+ workflow that lives in `reddb-io/red-skills` and adopters *invoke by reference*
10
+ (e.g. `uses: reddb-io/red-skills/.github/workflows/reusable-afk-attempt.yml@v1`).
11
+ It is **referenced, never copied** — its filename never changes.
12
+ - **`rs-*` — caller of a reusable (an *instantiation*).** A thin workflow whose
13
+ job is to `uses:` a `reusable-*` with concrete triggers + inputs. This is what
14
+ an adopter installs to wire up a reusable lane — **one `rs-*` per reusable they
15
+ adopt** (today just `rs-afk-attempt.yml`; more as we extract more reusables).
16
+ `rs-` reads as "red-skills caller" — the namespace marker for a
17
+ red-skills-provided caller in a foreign repo.
18
+ - **`red-*` — a standalone workflow authored by red-skills** (no `workflow_call`,
19
+ does not `uses:` a reusable). Most run only in `reddb-io/red-skills` (release,
20
+ upstream-watch, workspace CI). A few are *also* offered as verbatim
21
+ copy-installables (e.g. `red-issues-needs-triage.yml`) — those keep their
22
+ `red-*` name when copied into an adopter (filename unchanged, body verbatim).
23
+
24
+ Classification is by **role**, decidable from a file's content: has
25
+ `workflow_call:` → `reusable-*`; `uses:` a `reusable-*` → `rs-*`; otherwise →
26
+ `red-*`. (`/red-doctor` audits this — see its naming-convention check.)
27
+
28
+ Install mapping (body copied verbatim, including any
29
+ `uses: …/reusable-afk-attempt.yml@v1` ref):
30
+
31
+ | Role / source | Installed into adopter as |
32
+ |---|---|
33
+ | `reusable-afk-attempt.yml` (reusable — called by ref) | not copied; the **caller** is installed as `rs-afk-attempt.yml` |
34
+ | `red-issues-needs-triage.yml` (standalone `red-*` copy-installable) | `red-issues-needs-triage.yml` (verbatim — name unchanged) |
35
+
36
+ So `red-skills` itself, as an adopter of its own lane, carries a
37
+ `rs-afk-attempt.yml` caller next to the `reusable-afk-attempt.yml`
38
+ reusable.
39
+
40
+ ## Adopter-installable (offered by `/red-setup`)
41
+
42
+ Section D is a **menu** — the user picks which workflows + configs. A reusable's
43
+ **caller** installs as `rs-*`; a standalone copy-installable keeps its `red-*`
44
+ name.
45
+
46
+ | Source | Installed as | Default | Trigger | What it does |
47
+ |---|---|---|---|---|
48
+ | `red-issues-needs-triage.yml` | `red-issues-needs-triage.yml` (verbatim) | **install (yes)** | `issues: opened`/`reopened` | Auto-applies `needs-triage` to any fresh label-less issue, so reports never slip past `/triage` and never sit invisible to `/afk` (which only drains `ready-for-agent`). |
49
+ | `reusable-afk-attempt.yml` (reusable, called by ref) | `rs-afk-attempt.yml` (the caller) | **opt-in (no)** | `issues: labeled`/`opened` (on `ready-for-agent`), `workflow_dispatch`, `workflow_call` | The **AFK Actions lane** — runs one `/afk` attempt per issue headless from Actions and opens a PR (no fleet, no admin-merge; human merges). Needs an OpenCode auth secret + a trust-gate allowlist. Full guide: [`../afk/actions-lane.md`](../afk/actions-lane.md). |
50
+
51
+ The AFK lane has two shapes (both in `../afk/examples/`): the **turnkey caller**
52
+ (`rs-afk-attempt.yml`, what `/red-setup` installs) and the
53
+ **composable action** (`red-afk-attempt-action.yml`, for your own
54
+ triggers/gate). It depends only on GitHub-official actions plus reddb-io's own
55
+ composite action.
56
+
57
+ ## red-skills' own CI (`red-*`, NOT installed into adopter repos)
58
+
59
+ These run in `reddb-io/red-skills` only. Listed so the catalogue is complete.
60
+
61
+ | Workflow | Trigger | What it does |
62
+ |---|---|---|
63
+ | `red-release.yml` | push to `main` | Auto-release: conventional-commit version bump, build the per-plugin bundles, publish a GitHub Release with the assets. Defers while a `running` issue (an active fleet) exists. |
64
+ | `red-memory-drift-guard.yml` | `pull_request` | Fails a PR that changes a watched memory surface (`.red/adr/**`, the glossary) without a `Memory-Ingested:`/`Memory-NoIngest:` audit marker. |
65
+ | `red-memory-bench.yml` | `pull_request`, push to `main` | Memory deterministic-core regression gate. |
66
+ | `red-memory-wiki-extract.yml` | PR merge | Extracts LLM-Wiki pages from the merged PR. |
67
+ | `red-upstream-watch.yml` | schedule | Opens a tracking issue when `mattpocock/skills` advances past the recorded `.upstream` SHA. |
68
+
69
+ ## Conventions
70
+
71
+ - **`reusable-*`** — reusable (`workflow_call`) workflows, referenced by `uses:`, never copied into an adopter.
72
+ - **`rs-*`** — a caller that `uses:` a `reusable-*`. What an adopter installs to wire up a reusable lane (one `rs-*` per reusable). Body copied verbatim, including the `uses: …/reusable-afk-attempt.yml@v1` ref.
73
+ - **`red-*`** — a standalone workflow authored by red-skills (no `workflow_call`, no `uses:` a reusable). Internal CI plus verbatim copy-installables (e.g. needs-triage) that keep the `red-*` name in the adopter.
74
+ - red-skills self-hosts its own lane, so it carries a `rs-afk-attempt.yml` caller — the same `rs-*` an adopter installs.
@@ -0,0 +1,151 @@
1
+ # Setup RedSkills Write Contract
2
+
3
+ ## Confirm and edit
4
+
5
+ Show the user a draft of:
6
+
7
+ - The `## Agent skills` block to add to whichever of `CLAUDE.md` / `AGENTS.md` is being edited (see step 4 for selection rules)
8
+ - The contents of `.red/agents/issue-tracker.md`, `.red/agents/triage-labels.md`, `.red/agents/domain.md`
9
+ - The Section H development-workflow changes: `plugins.dev.lock.primary-branch: true` plus the canonical `## Development workflow` block for `AGENTS.md` and `CLAUDE.md`
10
+ - The Section E2 required-host-binary record: `host_binaries.tq.version: 0.3.0`
11
+ - The Section G1 command-guard changes if the user accepted them: the exact `command_guard` block or scoped entries that will be written to `.red/config.yaml`
12
+
13
+ Let them edit before writing.
14
+
15
+ ## Write
16
+
17
+ **No-clobber rule (governs every write below).** Never overwrite, rewrite, or reorder content in a file this skill did not just create: if a target already exists, skip it, log a one-line notice, and move on — no second ask, and never `git add` on the user's behalf. Two surgical merges are the *only* exceptions, flagged at the steps that own them: updating `plugins.<name>.enabled` flags in an existing `.red/config.yaml`, and appending a missing `tmp/`, `state/`, or `researches/` line to an existing `.red/.gitignore`. (Copied workflow YAML is the one "ask, don't silently skip" case — diff and ask first.)
18
+
19
+ **Config-key spelling rule.** Write `.red/config.yaml` keys only in the spellings that appear in [config-template.yaml](./config-template.yaml). Folded accessor names such as root-level `dev.*` or bare `afk.*` are display/reader vocabulary only; never write them as YAML keys because folding readers may honor them while exact-key readers ignore them, creating a split-brain config.
20
+
21
+ **Pick the file to edit:**
22
+
23
+ - If `CLAUDE.md` exists, edit it.
24
+ - Else if `AGENTS.md` exists, edit it.
25
+ - If neither exists, ask the user which one to create — don't pick for them.
26
+
27
+ Never create `AGENTS.md` when `CLAUDE.md` already exists (or vice versa) — always edit the one that's already there.
28
+
29
+ If an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
30
+
31
+ The block:
32
+
33
+ ```markdown
34
+ ## Agent skills
35
+
36
+ ### Issue tracker
37
+
38
+ [one-line summary of where issues are tracked]. See `.red/agents/issue-tracker.md`.
39
+
40
+ ### Triage labels
41
+
42
+ [one-line summary of the label vocabulary]. See `.red/agents/triage-labels.md`.
43
+
44
+ ### Domain docs
45
+
46
+ [one-line summary of layout — "single-context" or "multi-context"]. See `.red/agents/domain.md`.
47
+ ```
48
+
49
+ Then write the three docs files using the seed templates in this skill folder as a starting point:
50
+
51
+ - [issue-tracker-github.md](./issue-tracker-github.md) — GitHub issue tracker (the only option)
52
+ - [triage-labels.md](./triage-labels.md) — label mapping
53
+ - [domain.md](./domain.md) — domain doc consumer rules + layout
54
+
55
+ If the user accepted Section D, copy each standalone `red-*.yml` template the user picked from this skill folder's `workflows/` into `.github/workflows/` of the consumer repo **verbatim — keep the `red-*` filename, do not rename** (e.g. `workflows/red-issues-needs-triage.yml` → `.github/workflows/red-issues-needs-triage.yml`): standalone copy-installables keep their `red-*` prefix, only reusable **callers** get renamed to `rs-*` (AFK lane below). Don't overwrite an existing file — diff and ask first. Then ensure both `needs-triage` and `runner-error` labels exist via `gh label create` if missing (`gh label create runner-error --color B60205 --description "AFK supervisor circuit-tripped; runner was misconfigured"`).
56
+
57
+ **If the user opted into the autonomous AFK execution lane** (Section D, default no), additionally:
58
+
59
+ 1. Copy [`../afk/examples/rs-afk-attempt.yml`](../afk/examples/rs-afk-attempt.yml) to `.github/workflows/rs-afk-attempt.yml` in the consumer repo (installed name is `rs-*`; the `uses:` ref inside still points at the `reusable-afk-attempt.yml` reusable — leave it). Don't overwrite an existing file — diff and ask first.
60
+ 2. Edit `allowlist_authors` and `allowlist_label_actors` to the maintainer login(s) the user named (the trust gate; keep it short on public repos).
61
+ 3. Apply the trigger choice from Section D: keep `workflow_dispatch` for a manual caller, the `issues: labeled` auto-trigger, or both. (The reusable's own `if:` gate auto-triggers on `ready-for-agent` even when only the dispatch caller exists.)
62
+ 4. Set the `model:` input to the slug the user picked (e.g. `minimax/MiniMax-M3`), or leave it empty to fall back to the repo's `.red/config.yaml` model config.
63
+ 5. Print the secret-setup guidance — the lane needs one OpenCode auth key; do **not** set it for them (secrets are the user's to provision): `gh secret set MINIMAX_API_KEY --repo OWNER/REPO` (or `OPENAI_API_KEY` / `OPENROUTER_API_KEY`; first set wins). **Public-repo gotcha:** if the repo is public, an *org* secret resolves empty unless its "Repository access" includes this repo — prefer a repo secret, or widen the org secret's access. Point them at [`../afk/actions-lane.md`](../afk/actions-lane.md#configuring-secrets-per-provider) for the per-provider table + auth precedence + the `model` slug.
64
+ 6. Note that the lane will not fire until both a secret is set (and reaching the repo) and an issue carries `ready-for-agent` from an allowlisted actor.
65
+
66
+ Scaffold `.red/config.yaml` (Section G), writing the Section A0 activation flags
67
+ and the `rsp` opt-in block:
68
+
69
+ 1. If `.red/config.yaml` already exists at the repo root, apply the **plugin-flags exception** to the no-clobber rule: surgically add/update the `plugins.<name>.enabled` flags to match the Section A0 choice (add a `plugins:` block or `plugins.<name>:` child if missing; set `enabled: true` for enabled plugins; remove the flag or set `false` for ones the user turned off), and surgically add/update the top-level `rsp:` block to `enabled: true`, `ttlDays: 7`, `ephemeralTtlHours: 6`, and `byteBudget: 67108864`; touch nothing else, and log `.red/config.yaml present - merged plugin activation flags and rsp defaults, left the rest as-is`.
70
+ 2. Otherwise, ensure `.red/` exists (this section is the authorized creator) and copy [config-template.yaml](./config-template.yaml) to `.red/config.yaml`, then surgically edit only the template-provided values that Section A0 selected. Do not compose the `plugins:` block from memory: start from the shipped template, preserve its key nesting, and only uncomment/flip the relevant `plugins.<name>.enabled` flags (the template ships with `plugins.dev.enabled: true` as the baseline and `memory`/`brain` commented — uncomment/flip per the choice). The `rsp` block ships enabled with default retention because the hook remains strictly per-repo opt-in: absent block or any value other than `enabled: true` is inert. The rest of the template is a fully-commented snapshot of every v1 knob the AFK config loader (`apps/dev/src/core/config.ts`) reads, so it stays a no-op until the user uncomments a line — including the commented `command_guard` and `afk.backpressure` blocks.
71
+ 3. **Provision the rsp elision store.** Run `rsp setup` from the repo root. This is the supported provisioning command: it writes the `rsp:` config block and points rsp at the shared repo-local RedDB store `.red/state/red-skills.rdb` (per ADR 0098). Elision records use the `rsp_elisions_v1` KV collection with storage-class accounting and a physical byte cap; legacy JSON files are only a fallback/migration path, not the normal setup target. `rsp setup` performs no memory-graph migration and does not create, move, or repoint `.red/memory/graph.rdb` or `plugins.memory.storePath`; memory and brain keep using RedDB through their own provisioning path.
72
+ 4. **Self-ignore `.red/`'s local state.** Whenever `.red/` exists (fresh scaffold or pre-existing), make the directory protect itself so `.red/tmp`, `.red/state`, and `.red/researches` never get committed regardless of the repo-root `.gitignore`. Write `.red/.gitignore` if it is **missing** with exactly:
73
+
74
+ ```gitignore
75
+ # Generated by /red-setup — local AFK/runtime state, never committed.
76
+ tmp/
77
+ state/
78
+ researches/
79
+ ```
80
+
81
+ If `.red/.gitignore` already **exists**, apply the **gitignore-append exception**: append whichever of the three patterns (`tmp/`, `state/`, `researches/`) is missing, and never rewrite or reorder existing lines. Keep tracked `.red` content (`config.yaml`, `contexts/`, `adr/`, `agents/`, `contracts/`, `hooks/`) committable — only local state and generated research reports are ignored. Do **not** `git add` `.red/.gitignore` (step 5 — the user controls when `.red/` lands in git).
82
+ 5. **Backpressure pre-fill offer (only on a fresh scaffold).** Read the repo-root (or primary package) `package.json`; if it declares `test` and/or `lint` scripts, surface them and ask whether to pre-fill `afk.backpressure` with the matching `npm run <script>` (or `pnpm run <script>`) lines, uncommented. On explicit yes, replace the commented `backpressure:` placeholder with the confirmed list; otherwise leave it commented. Skip silently when no such scripts exist. This step never runs when `.red/config.yaml` already existed (step 1 wins).
83
+ 6. **Command guard write (only when Section G1 was explicitly accepted).** Update `.red/config.yaml` with the confirmed `command_guard` policy. If the file is fresh, replace the commented placeholder with the confirmed block. If the file already existed, merge only the accepted `command_guard.global`, `command_guard.main`, and/or `command_guard.worktree` entries, appending without duplicates and preserving unrelated content. If a legacy `command_guard.deny` block exists, leave it intact unless the user explicitly approved migrating it to `global`.
84
+ 7. **Mandatory post-write config check.** Load the just-written `.red/config.yaml` through the real dev config loader before setup can finish. From a source checkout, run `pnpm --filter @reddb-io/dev dev red-doctor` from the target repo root; from an installed plugin, run `red-skills-dev red-doctor`. If the loader prints an off-contract-spelling warning such as root-level `dev.*` or bare `afk.*`, treat the check as red: fix `.red/config.yaml` back to the template spelling, re-run the same command, and only continue when the warning is gone.
85
+ 8. Do **not** `git add` or commit `.red/config.yaml` or `.red/.gitignore` — the user controls when they land in git.
86
+
87
+ Install and record required host binaries (Section E2):
88
+
89
+ 1. Run the pinned toon installer exactly as documented:
90
+
91
+ ```bash
92
+ TQ_VERSION=v0.3.0 curl -fsSL https://raw.githubusercontent.com/reddb-io/toon/v0.3.0/install.sh | sh
93
+ ```
94
+
95
+ 2. Verify `tq --version` reports `0.3.0`. If it does not, stop and report the mismatch; do not offer a jq fallback.
96
+ 3. Ensure `.red/config.yaml` records the pin:
97
+
98
+ ```yaml
99
+ host_binaries:
100
+ tq:
101
+ version: 0.3.0
102
+ ```
103
+
104
+ If `.red/config.yaml` already exists, merge only that `host_binaries.tq.version` entry and preserve unrelated content.
105
+
106
+ If the user accepted Section H, activate the development workflow:
107
+
108
+ 1. Invoke the shared injector rather than hand-editing the rules block. From a source checkout, run `pnpm --filter @reddb-io/dev dev inject-development-workflow --root <repo-root>`. From an installed plugin, run the bundled AFK entrypoint with `inject-development-workflow --root <repo-root>` (for example, `node ../afk/bin/afk.mjs inject-development-workflow --root <repo-root>` from this skill folder). The command writes both `AGENTS.md` and `CLAUDE.md`, creates `.red/config.yaml` if still missing, and sets `plugins.dev.lock.primary-branch: true`.
109
+ 2. If the command is unavailable, make the same changes manually: add or update the canonical `plugins:` → `dev:` → `lock:` block in `.red/config.yaml` so `primary-branch` is `true`, then upsert the canonical `## Development workflow` block in both `AGENTS.md` and `CLAUDE.md`. Never append a duplicate block; update the existing section in place. Leave any legacy top-level `dev.lock.*` keys untouched; `/red-doctor --fix` owns that migration.
110
+ 3. In the recap, explicitly point the user at `/go` for one-off concrete work, and at a normal PR for a hand-worked worktree branch that is already committed and pushed.
111
+
112
+ If the user accepted Section F, wire the statusline:
113
+
114
+ 1. Check the opt-out: if `.red/config.yaml` exists and contains an `afk:` block with `statusline: false`, log `afk.statusline: false in .red/config.yaml — skipping statusline wiring` and skip the rest of this step.
115
+ 2. Check for an existing `statusLine` key in `.claude/settings.json`. If one is present, log `statusLine already configured in .claude/settings.json — leaving as-is` and skip the rest of this step.
116
+ 3. Otherwise, ensure `.claude/` exists and write/merge the `statusLine` block above into `.claude/settings.json`. Use `jq` for the merge when the file already has unrelated keys; create a fresh file containing only `statusLine` when missing.
117
+
118
+ If the user confirmed any hook scripts from Section I:
119
+
120
+ 1. For each confirmed suggestion, ensure `.red/hooks/<point>/` exists (create the directory; `.red/` is already authorized by Section A0 — subdirectories under it are permitted).
121
+ 2. Write `.red/hooks/<point>/<name>` with the script content. Per the no-clobber rule, if the file already exists, skip it silently — log `.red/hooks/<point>/<name> already exists — not overwriting` and move on.
122
+ 3. Update `.red/config.yaml`: add the script path under the `afk.hooks.<point>:` list. Use the relative-to-root form `bash .red/hooks/<point>/<name>` as the command string. If the key already has entries, append without duplicating; if missing, add it. The `afk:` → `hooks:` → `<point>:` nesting matches the config-template structure.
123
+ 4. Do **not** `git add` any of the written files or the updated config.
124
+
125
+ Script content for each signal type (all open with `#!/usr/bin/env bash` + `set -euo pipefail`):
126
+
127
+ - `red-run-tests.sh` (`pre_merge`): `<pm> run test`
128
+ - `red-typecheck.sh` (`pre_merge`): `<pm> run typecheck` (or `type-check` per the detected key)
129
+ - `red-lint.sh` (`pre_merge`): `<pm> run lint`
130
+ - `red-build.sh` (`pre_merge`): `<pm> run build`
131
+ - `red-e2e.sh` (`post_merge`): `<pm> run e2e` (or `test:e2e` per the detected key)
132
+ - `red-make-<target>.sh` (`pre_merge`): `make <target>`
133
+ - `red-cargo-test.sh` (`pre_merge`): `cargo test`
134
+ - `red-gradle-check.sh` (`pre_merge`): `./gradlew check`
135
+ - `red-lint-staged.sh` (`pre_merge`): `npx lint-staged`
136
+ - `red-pre-commit.sh` (`pre_merge`): `pre-commit run --all-files`
137
+ - `red-slack-notify.sh` (`post_merge`):
138
+
139
+ ```bash
140
+ #!/usr/bin/env bash
141
+ set -euo pipefail
142
+ # Post-merge Slack notification. Set SLACK_WEBHOOK_URL before running /afk.
143
+ [ -z "${SLACK_WEBHOOK_URL:-}" ] && exit 0
144
+ curl -sf -X POST "$SLACK_WEBHOOK_URL" \
145
+ -H "Content-Type: application/json" \
146
+ -d "{\"text\":\"AFK merged issue #${RED_AFK_ISSUE:-?} on ${RED_AFK_REPO:-repo}\"}"
147
+ ```
148
+
149
+ ## Done
150
+
151
+ Tell the user the setup is complete, which plugins are now enabled here (and that all other directories stay inert until they run this skill there too), and which engineering skills will now read from these files. If they enabled **memory** or **brain**, point them at the next step — `/memory:init` to pick a storage mode, or the brain setup — since enabling only authorizes the plugin to run; its own init configures it. Mention they can edit `.red/agents/*.md` directly later, and that one-off concrete work should be dispatched with `/go` (backlog via `/afk`, parked issues via `/retake`). Re-run this skill to enable or disable a plugin, switch issue trackers, or restart from scratch.
@@ -0,0 +1,174 @@
1
+ # .red/config.yaml — per-project plugin settings (consumed by /afk and friends)
2
+ # Uncomment any line to override the default.
3
+
4
+ # Plugin activation gate (ADR 0067). RedSkills hooks are installed globally on
5
+ # every agent but stay fully inert in any directory whose `.red/config.yaml`
6
+ # does NOT set `plugins.<name>.enabled: true`. /red-setup writes this
7
+ # block; it is the only authorized creator of `.red/`. Strict opt-in: a block
8
+ # without `enabled: true` is OFF.
9
+ plugins:
10
+ dev:
11
+ enabled: true # the engineering stack (/afk, /triage, /retake, …)
12
+ # trunk: main # canonical location: plugins.dev.trunk.
13
+ # # The Trunk (ADR 0083): the focal branch agent work
14
+ # # bases on and lands to when no lock/pin names one
15
+ # # (precedence lock > pin > trunk). Always consumed
16
+ # # as fresh-fetched origin/<trunk>, never the local
17
+ # # branch. Set e.g. develop or workspace/<user>.
18
+ # lock:
19
+ # primary-branch: true # branch-lock compatibility/base-pinning flag
20
+ # # (Section H of /red-setup sets this)
21
+ # branch: my-branch # static base lock: AFK bases/merges here (ADR 0031);
22
+ # # the runtime /branch-lock overrides it per session
23
+ # triage:
24
+ # external_pr_surface:
25
+ # enabled: false # default OFF. When true, /triage may list/read
26
+ # # external PRs as request data. It still treats
27
+ # # PR bodies/diffs as untrusted and never checks
28
+ # # out, builds, tests, or executes PR code.
29
+ # memory:
30
+ # enabled: true # then run /memory:init to pick a storage mode
31
+ # brain:
32
+ # enabled: true # the agentic command-center context
33
+
34
+ # rsp hook activation and retention (ADR 0095 amended by ADR 0098). /red-setup
35
+ # provisions `.red/state/red-skills.rdb`; the hook remains inert unless this
36
+ # explicit flag is true.
37
+ rsp:
38
+ enabled: true
39
+ ttlDays: 7
40
+ ephemeralTtlHours: 6
41
+ byteBudget: 67108864 # 64 MiB
42
+
43
+ # Required host binaries (ADR 0097). /red-setup installs these through their
44
+ # checksum-verified upstream installers and records the exact pin here so
45
+ # /red-doctor can red-flag absence or version drift. tq is required for
46
+ # TOON/TOONL inspection; there is no jq fallback lane.
47
+ host_binaries:
48
+ tq:
49
+ version: 0.3.0
50
+
51
+ # Built-in dev shell guard: once plugins.dev.enabled is true, agent-created
52
+ # worktrees must live under a registered .red/tmp/ lane, and branch-changing
53
+ # commands in the primary checkout are blocked. Create task branches with:
54
+ # git worktree add .red/tmp/worktrees/manual/<slug> -b <branch> origin/main
55
+ #
56
+ # Command guard policy. The installed Claude Code, Codex, and opencode hooks are
57
+ # thin proxies: they read this repo-owned policy at runtime and stay inert unless
58
+ # plugins.dev.enabled is true. These rules are additional to the built-in
59
+ # registered .red/tmp worktree boundary above. Uncomment only rules this repo actually wants.
60
+ # command_guard:
61
+ # global: # applies in main sessions and runtime worktrees
62
+ # - "rm -Rf /*"
63
+ # - "git stash"
64
+ # main: # primary interactive session scope, not branch name
65
+ # - "git rebase"
66
+ # - "git checkout -b"
67
+ # worktree: # /afk and /go worktrees under .red/tmp/
68
+ # - "git clean"
69
+
70
+ # afk:
71
+ # default_runner: claude # fallback runner when no explicit signal
72
+ # worktree_launches_pull_request: true # landing MODE, decoupled from the lock
73
+ # # (ADR 0030 amended, #842). true (default) → land
74
+ # # via an admin-merged PR into the resolved base;
75
+ # # false → direct merge into that base (offline,
76
+ # # no PR). The branch-lock only resolves the target
77
+ # # base (lock > pin > main, ADR 0031), NOT the mode.
78
+ # # How a PR merges stays governed by `afk.merge.*`.
79
+ # # NOTE: default true means a locked repo now gets
80
+ # # an admin-PR to the lock branch; set false to keep
81
+ # # the old offline/direct-promotion flow.
82
+ # models: # per-runner AFK tier table (ADR 0049)
83
+ # claude:
84
+ # validate:
85
+ # model: claude-haiku-4-5
86
+ # effort: low
87
+ # simple:
88
+ # model: claude-sonnet-4-6
89
+ # effort: high
90
+ # complex:
91
+ # model: claude-opus-4-8
92
+ # effort: medium
93
+ # think: # default until the AFK classifier lands
94
+ # model: claude-opus-4-8
95
+ # effort: high
96
+ # codex:
97
+ # validate:
98
+ # model: gpt-5.5
99
+ # effort: low
100
+ # simple:
101
+ # model: gpt-5.5
102
+ # effort: high
103
+ # complex:
104
+ # model: gpt-5.5
105
+ # effort: medium
106
+ # think:
107
+ # model: gpt-5.5
108
+ # effort: high
109
+ # opencode: # ADR 0059 — endpoint-agnostic; slug = <provider>/<model>
110
+ # base: # auto-populates EVERY tier of this runner. Set the model
111
+ # model: minimax/MiniMax-M3 # once to point the whole runner at one provider/model;
112
+ # effort: medium # `base.effort` is optional (omit it to keep per-tier defaults).
113
+ # think: # specialize a single tier — overrides `base` for that tier only
114
+ # model: minimax/MiniMax-M3
115
+ # fleet:
116
+ # target: 2 # default supervisor worker target
117
+ # release: # bundle release channel (ADR 0058)
118
+ # channel: canary # `stable` (default = today's version-pinned
119
+ # # release) or `canary` (npm dist-tag pointer to
120
+ # # an already-published stable package version).
121
+ # # The launcher reads this or the
122
+ # # `RED_SKILLS_CHANNEL` env var (env wins); absent
123
+ # # config keeps tracking stable. Canary promotion
124
+ # # moves the npm dist-tag (scripts/afk-promote-channel.sh),
125
+ # # gated on the proof-by-drain telemetry.
126
+ # backpressure: # extra merge gates run on every successful
127
+ # - npm run test # iteration (DONE + salvaged no-sentinel), after
128
+ # - npm run lint # the built-in feedback gate. Any non-zero exit
129
+ # # blocks the merge and parks to ready-for-human,
130
+ # # exactly like a feedback failure. Optional;
131
+ # # absent/empty = no-op. (#430 / PRD #429)
132
+ # output_shaping:
133
+ # terse_steering: false # default OFF. When true, even-numbered issues
134
+ # # get a phrasing-only terse steering block;
135
+ # # odd-numbered issues are the holdout. The arm
136
+ # # is stamped next to heartbeat output-token
137
+ # # counters and reported by `afk-output-shaping`.
138
+ # test:
139
+ # quarantine: # config-declared flaky-test quarantine lane (issue #1035).
140
+ # # Each entry excludes a known-flaky test file from the
141
+ # # scoped gate run and emits a visible "quarantined" sidecar
142
+ # # record — exclusions are NEVER silent (repo norm). An entry
143
+ # # without an issue ref fails the gate loudly. /red-doctor warns
144
+ # # when a referenced issue is closed (managed debt, not
145
+ # # permanent forgetting).
146
+ # # Pattern is a repo-relative file path passed to vitest
147
+ # # --exclude (relative to the scope dir at run time).
148
+ # # Named entries e0, e1, e2 … are read in order until the
149
+ # # first gap.
150
+ # e0:
151
+ # pattern: apps/dev/tests/supervisor.test.ts
152
+ # issue: "https://github.com/reddb-io/red-skills/issues/1063"
153
+ # since: "2026-07-02"
154
+ # reason: "OOM under AFK fleet=2 concurrent load (exit 137 / SIGKILL)"
155
+ # e1:
156
+ # pattern: apps/brain/tests/dashboard.test.ts
157
+ # issue: "https://github.com/reddb-io/red-skills/issues/1064"
158
+ # since: "2026-07-02"
159
+ # reason: "tsx spawn timeout under concurrent AFK load (40 s ceiling)"
160
+ # hooks:
161
+ # defaults:
162
+ # cargo: true # ship cargo isolation on Rust projects
163
+ # gradle: true # ship gradle isolation when GRADLE_USER_HOME_BASE is set
164
+ # trust-gate: # "executable issue" trust gate (#621, ADR 0085)
165
+ # allowlist: alice,bob # comma/space-separated GitHub logins. An issue is
166
+ # # executable only when its AUTHOR is in this list AND
167
+ # # `ready-for-agent` was applied by a listed actor
168
+ # # (read from the issue timeline, not the label set).
169
+ # # ABSENT/empty (the default) → PERMISSIVE: the gate
170
+ # # never fires and every ready-for-agent issue is
171
+ # # claimable, exactly as today. Setting it switches the
172
+ # # repo to STRICT mode; a ready-for-agent applied by a
173
+ # # non-listed actor is skipped at claim and may be
174
+ # # stripped by a sweep with an audit comment.
@@ -0,0 +1,52 @@
1
+ # Domain Docs
2
+
3
+ How the engineering skills should consume this repo's domain documentation when exploring the codebase.
4
+
5
+ ## Before exploring, read these
6
+
7
+ - **`.red/CONTEXT.md`** at the repo root, or
8
+ - **`.red/CONTEXT-MAP.md`** at the repo root if it exists — it points at one `.red/contexts/<name>/CONTEXT.md` per context. Read each one relevant to the topic.
9
+ - **`.red/adr/`** — read ADRs that touch the area you're about to work in. ADRs live in this single root sequence, even in multi-context repos.
10
+
11
+ If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The producer skill (`/start`) creates them lazily when terms or decisions actually get resolved.
12
+
13
+ ## File structure
14
+
15
+ Single-context repo (most repos):
16
+
17
+ ```
18
+ /
19
+ ├── .red/
20
+ │ ├── CONTEXT.md
21
+ │ └── adr/
22
+ │ ├── 0001-event-sourced-orders.md
23
+ │ └── 0002-postgres-for-write-model.md
24
+ └── src/
25
+ ```
26
+
27
+ Multi-context repo (presence of `.red/CONTEXT-MAP.md` at the root) — everything stays under the single root `.red/`:
28
+
29
+ ```
30
+ /
31
+ ├── .red/
32
+ │ ├── CONTEXT-MAP.md ← lists the contexts and how they relate
33
+ │ ├── contexts/
34
+ │ │ ├── ordering/CONTEXT.md
35
+ │ │ └── billing/CONTEXT.md
36
+ │ └── adr/ ← single root ADR sequence (all contexts)
37
+ └── src/
38
+ ├── ordering/
39
+ └── billing/
40
+ ```
41
+
42
+ ## Use the glossary's vocabulary
43
+
44
+ When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `.red/CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
45
+
46
+ If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/start`).
47
+
48
+ ## Flag ADR conflicts
49
+
50
+ If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
51
+
52
+ > _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_