@ericrisco/rsc 0.1.27 → 0.1.29

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 (44) hide show
  1. package/manifest.json +1 -1
  2. package/package.json +1 -1
  3. package/scripts/rsc.js +20 -0
  4. package/skills/agent-eval/SKILL.md +1 -1
  5. package/skills/analyze/SKILL.md +2 -2
  6. package/skills/author-skill/SKILL.md +3 -3
  7. package/skills/building-agents/SKILL.md +3 -5
  8. package/skills/constitution/SKILL.md +5 -5
  9. package/skills/continuous-learning/SKILL.md +2 -2
  10. package/skills/coolify/SKILL.md +3 -4
  11. package/skills/course-storytelling/SKILL.md +5 -5
  12. package/skills/cpp/SKILL.md +3 -5
  13. package/skills/decision-records/SKILL.md +2 -2
  14. package/skills/deployment/SKILL.md +3 -5
  15. package/skills/design/SKILL.md +4 -4
  16. package/skills/duckdb/SKILL.md +2 -1
  17. package/skills/fastapi/SKILL.md +3 -3
  18. package/skills/flutter/SKILL.md +3 -5
  19. package/skills/go/SKILL.md +3 -5
  20. package/skills/harness/SKILL.md +25 -0
  21. package/skills/harness/references/claude-md-template.md +8 -21
  22. package/skills/implement/SKILL.md +1 -1
  23. package/skills/init/SKILL.md +2 -2
  24. package/skills/java/SKILL.md +4 -4
  25. package/skills/marketing/SKILL.md +3 -3
  26. package/skills/modal/SKILL.md +2 -1
  27. package/skills/mongodb/SKILL.md +4 -4
  28. package/skills/nextjs/SKILL.md +4 -4
  29. package/skills/plan/SKILL.md +3 -3
  30. package/skills/postgresdb/SKILL.md +4 -4
  31. package/skills/presentations/SKILL.md +2 -2
  32. package/skills/python/SKILL.md +2 -2
  33. package/skills/review/SKILL.md +1 -1
  34. package/skills/rust/SKILL.md +4 -4
  35. package/skills/sdd/SKILL.md +2 -1
  36. package/skills/secure-coding/SKILL.md +4 -4
  37. package/skills/security-scan/SKILL.md +3 -2
  38. package/skills/ship/SKILL.md +1 -1
  39. package/skills/specify/SKILL.md +4 -3
  40. package/skills/suggest/SKILL.md +23 -18
  41. package/skills/suggest/evals/cases.yaml +6 -6
  42. package/skills/tasks/SKILL.md +3 -2
  43. package/skills/verify/SKILL.md +1 -1
  44. package/targets/session-start.mjs +22 -0
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.27",
2
+ "version": "0.1.29",
3
3
  "counts": {
4
4
  "skills": 231
5
5
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ericrisco/rsc",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "Eric Risco's agent-skills catalog as a granular, self-recommending CLI installer.",
5
5
  "type": "module",
6
6
  "bin": {
package/scripts/rsc.js CHANGED
@@ -187,6 +187,26 @@ async function main() {
187
187
  for (const o of toOutcomes(ids)) say(`${o.id}\t${o.label}`);
188
188
  return;
189
189
  }
190
+ case 'catalog': {
191
+ // Full catalog dump for SEMANTIC in-agent discovery: every skill as
192
+ // `id <installed|available> short description`, unranked. `consult` ranks
193
+ // lexically and returns nothing for natural-language / Catalan intent; `catalog`
194
+ // hands the agent the whole candidate set so the MODEL picks the best-fit missing
195
+ // skill by meaning. `--available` drops what's already installed for this target.
196
+ const m = loadManifest();
197
+ const installed = new Set(listInstalled({ target }));
198
+ const onlyAvailable = argv.includes('--available');
199
+ const short = (d) => {
200
+ const s = String(d || '').split('. ')[0].replace(/\s+/g, ' ').trim();
201
+ return s.length > 160 ? `${s.slice(0, 159)}…` : s;
202
+ };
203
+ for (const sk of [...m.skills].sort((a, b) => a.id.localeCompare(b.id))) {
204
+ const state = installed.has(sk.id) ? 'installed' : 'available';
205
+ if (onlyAvailable && state === 'installed') continue;
206
+ say(`${sk.id}\t${state}\t${short(sk.description)}`);
207
+ }
208
+ return;
209
+ }
190
210
  case 'audit': {
191
211
  const report = audit();
192
212
  const written = writeAuditReport(report);
@@ -199,7 +199,7 @@ Pick by where the eval runs and what it must do. Versions as of 2026-06 — re-v
199
199
 
200
200
  ## Project grounding
201
201
 
202
- If the workspace has a `02-DOCS/` harness, record the eval policy in `02-DOCS/wiki/stack/evals.md`: dataset location, scorer mix, gate baseline file, judge model, and the failure modes covered. Link it from root `CLAUDE.md` under `## Knowledge map`. This is **recorded, not gated** — skip silently if there is no harness.
202
+ If the workspace has a `02-DOCS/` harness, record the eval policy in `02-DOCS/wiki/stack/evals.md`: dataset location, scorer mix, gate baseline file, judge model, and the failure modes covered. Index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer). This is **recorded, not gated** — skip silently if there is no harness.
203
203
 
204
204
  ## verify.sh
205
205
 
@@ -53,7 +53,7 @@ If no profile exists, default to L2 and note that the harness has not gauged the
53
53
 
54
54
  ## Inputs — locate the four artifacts
55
55
 
56
- Read all four before analyzing. The rsc-sdd artifacts live under `02-DOCS/wiki/sdd/` (the harness Karpathy-wiki convention), indexed from the root `CLAUDE.md` `## Knowledge map`:
56
+ Read all four before analyzing. The rsc-sdd artifacts live under `02-DOCS/wiki/sdd/` (the harness Karpathy-wiki convention), indexed from `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it):
57
57
 
58
58
  | Artifact | Canonical location | Role in the check |
59
59
  | --- | --- | --- |
@@ -111,7 +111,7 @@ Produce a single consistency report:
111
111
  3. **Findings table** — `# | Severity | Type | Artifact A (loc) | Artifact B (loc) | Conflict | Resolve in (phase)`.
112
112
  4. **Recommended routing** — group fixes by the phase that owns them (`clarify` for spec ambiguity, `plan` for missing architecture, `tasks` for a missing done-check, `constitution` if a principle itself is wrong).
113
113
 
114
- Write the report to `02-DOCS/wiki/sdd/analysis/<slug>.md` (create the dir if absent) and add/refresh its row in the root `CLAUDE.md` `## Knowledge map` under the `sdd/` topic, so the next phase and the harness can find it. The report is the artifact analyze owns — it is the *only* thing analyze writes. Per-run point-in-time; overwrite on re-run, the wiki keeps history.
114
+ Write the report to `02-DOCS/wiki/sdd/analysis/<slug>.md` (create the dir if absent) and index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) under the `sdd/` topic, so the next phase and the harness can find it. The report is the artifact analyze owns — it is the *only* thing analyze writes. Per-run point-in-time; overwrite on re-run, the wiki keeps history.
115
115
 
116
116
  Adapt the rendered verbosity to the dial (L0 = table only; L3 = full walk-through). Do not log a decision to `decisions.md` — analyze decides nothing; the phase that resolves the finding logs its own decision.
117
117
 
@@ -124,7 +124,7 @@ Run in order. Each step gates the next.
124
124
  4. **Write the body** in the rsc voice (see below). Tag every code/example fence with a language. Add a copy-able checklist or decision table *only where the flow actually branches* — not as decoration. Add a short anti-patterns table.
125
125
  5. **Extract references** for anything long or branch-specific.
126
126
  6. **Write the evals** — `cases.yaml` then `README.md`. → `references/eval-authoring.md`.
127
- 7. **Wire it into the rsc plumbing** (`tags`, `recommends`, `npm run manifest`, Knowledge map). → `references/rsc-conventions.md`.
127
+ 7. **Wire it into the rsc plumbing** (`tags`, `recommends`, `npm run manifest`, and indexing any artifact in `02-DOCS/wiki/index.md` — the Knowledge map; root `CLAUDE.md` keeps only a short pointer). → `references/rsc-conventions.md`.
128
128
  8. **Self-audit against the rubric** (below). Fix every miss or justify it.
129
129
 
130
130
  ## The rsc voice
@@ -149,7 +149,7 @@ A skill ships only when every box is checked or a miss is consciously justified.
149
149
  - [ ] **Every fence language-tagged**; no placeholder/TODO prose; examples concrete.
150
150
  - [ ] **Checklist/decision table only where a flow branches**; an **anti-patterns table** present.
151
151
  - [ ] **Accompaniment dial honored** — reads the profile, adapts verbosity.
152
- - [ ] **Artifacts under `02-DOCS/wiki/`** and indexed in the root CLAUDE.md Knowledge map, if the skill produces any.
152
+ - [ ] **Artifacts under `02-DOCS/wiki/`** and indexed in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer), if the skill produces any.
153
153
  - [ ] **Concrete tooling delegated** to the stack skills rather than reinvented.
154
154
  - [ ] **evals present** — `cases.yaml` (≥5 `should_trigger` incl. non-obvious, ≥4 `should_not_trigger` each with a real-sibling `route_to`, ≥1 `capability` with a `must_include` rubric) + an honest `README.md`. `scripts/eval-lint.sh` passes — but it only checks presence and the counts (≥5/≥4/≥1) and that those keys are lists; the `route_to`-points-at-a-real-sibling, non-obvious phrasings, and `must_include` quality are yours to verify here, not the linter's.
155
155
  - [ ] **verify.sh** present iff the skill has a checkable artifact; process skills rely on evals.
@@ -195,7 +195,7 @@ only when **both** are green:
195
195
 
196
196
  ## Project grounding (02-DOCS + CLAUDE.md)
197
197
 
198
- When authoring produces a durable design note (a skill's scope decision, a description rationale worth keeping), persist it under `02-DOCS/wiki/sdd/` and add a row to the root CLAUDE.md `## Knowledge map`, per the `../harness/SKILL.md` convention — never a stray file at the repo root. The skill's own `evals/` is the executable record of intent; the wiki note is the human-readable why.
198
+ When authoring produces a durable design note (a skill's scope decision, a description rationale worth keeping), persist it under `02-DOCS/wiki/sdd/` and index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer), per the `../harness/SKILL.md` convention — never a stray file at the repo root. The skill's own `evals/` is the executable record of intent; the wiki note is the human-readable why.
199
199
 
200
200
  ## See Also
201
201
 
@@ -449,14 +449,12 @@ if __name__ == "__main__":
449
449
 
450
450
  When this skill runs in a project with a `02-DOCS/` layer (the
451
451
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this
452
- project's agent decisions there and index them from the root `CLAUDE.md`, so the next
452
+ project's agent decisions there and index them in `02-DOCS/wiki/index.md`, so the next
453
453
  agent inherits the conventions instead of re-deriving them.
454
454
 
455
- 1. **Find the article** `02-DOCS/wiki/stack/agents.md`, linked from a `## Knowledge map` section in the root
456
- `CLAUDE.md`.
455
+ 1. **Find the article** `02-DOCS/wiki/stack/agents.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
457
456
  2. **If missing or stale**, create/update it with the project's real choices — the provider(s) and model routing, where the provider adapter lives, tool/RAG conventions, the eval gates, and the observability backend —
458
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
459
- `CLAUDE.md` itself, if absent).
457
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
460
458
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
461
459
  article (bump its `Updated` date) in the same change.
462
460
 
@@ -13,7 +13,7 @@ origin: risco
13
13
 
14
14
  A constitution is small, durable, and enforceable. It is **not** a wiki of everything you know about the project (that is what `02-DOCS/wiki/` already is, run by the `harness`). It is the short list of principles that, if violated, mean the work is wrong regardless of whether it runs. If a rule here cannot be checked or pointed at later, it does not belong here — move it to the stack wiki and link it.
15
15
 
16
- This skill produces `02-DOCS/wiki/sdd/constitution.md` and one Knowledge-map row in the root `CLAUDE.md`. It reconciles with — never duplicates — the stack conventions the harness keeps under `02-DOCS/wiki/stack/*`.
16
+ This skill produces `02-DOCS/wiki/sdd/constitution.md` and one Knowledge-map row. The constitution is one of the few **read-first** pointer entries kept directly in the root `CLAUDE.md` `## Knowledge map` (everything else lives in `02-DOCS/wiki/index.md`, the full Knowledge map that root `CLAUDE.md` points to). It reconciles with — never duplicates — the stack conventions the harness keeps under `02-DOCS/wiki/stack/*`.
17
17
 
18
18
  ## Model tier — `heavy` (opt-in routing)
19
19
 
@@ -52,7 +52,7 @@ Do NOT use when (route instead):
52
52
 
53
53
  The harness may already hold real conventions under `02-DOCS/wiki/stack/*` (e.g. `nextjs.md`, `fastapi.md`, `postgresdb.md`). The constitution does not copy them — it **ratifies the principle and links the detail**. Run this reconciliation pass first:
54
54
 
55
- 1. **Read the Knowledge map** in the root `CLAUDE.md`. List every `02-DOCS/wiki/stack/*` article that exists.
55
+ 1. **Read the Knowledge map** the full index lives in `02-DOCS/wiki/index.md` (root `CLAUDE.md` keeps only a short pointer to it). List every `02-DOCS/wiki/stack/*` article that exists.
56
56
  2. **Read each stack article.** Pull out anything already phrased as a rule (a version pin, a lint config, a test threshold, a naming convention).
57
57
  3. **For each existing rule, decide:** is it a *project-wide non-negotiable* (→ ratify it as a principle, linking the stack article for detail) or a *local mechanic* (→ leave it in the stack wiki, do not lift it into the constitution)?
58
58
  4. **Contradictions are findings, not fixes.** If two stack articles disagree, or a stack article contradicts what the user states now, surface it and let the user resolve — never silently pick a winner.
@@ -137,12 +137,12 @@ The constitution is versioned so `analyze` and `review` can cite "constitution v
137
137
  - [ ] The Definition-of-Done checklist is present (what `verify` runs against).
138
138
  - [ ] Fixed principles included: human git authorship + decisions logged.
139
139
  - [ ] `02-DOCS/wiki/sdd/constitution.md` written with version + ratified date + amendment log.
140
- - [ ] Root `CLAUDE.md` Knowledge map has a row for the constitution (additive only — never delete sections).
140
+ - [ ] Root `CLAUDE.md` `## Knowledge map` pointer has the read-first row for the constitution (it is one of the few entries kept in root `CLAUDE.md`; the full index lives in `02-DOCS/wiki/index.md`). Additive only — never delete sections.
141
141
  - [ ] The constitution was shown to the user and explicitly ratified.
142
142
 
143
143
  ## Project grounding (02-DOCS + CLAUDE.md)
144
144
 
145
- This skill's `02-DOCS` record is the constitution at `02-DOCS/wiki/sdd/constitution.md`, linked from a `## Knowledge map` row in the root `CLAUDE.md` (create `CLAUDE.md` if absent, additive only — never delete existing sections). Add this row if it is not already present:
145
+ This skill's `02-DOCS` record is the constitution at `02-DOCS/wiki/sdd/constitution.md`. It is a **read-first** pointer entry, so its row stays in the short `## Knowledge map` pointer in the root `CLAUDE.md` (create `CLAUDE.md` if absent, additive only — never delete existing sections) — unlike other sdd artifacts, which are indexed in `02-DOCS/wiki/index.md` (the full Knowledge map that root `CLAUDE.md` points to). Add this row to the root pointer if it is not already present:
146
146
 
147
147
  ```markdown
148
148
  | Project constitution (SDD non-negotiables) | `02-DOCS/wiki/sdd/constitution.md` |
@@ -159,6 +159,6 @@ The constitution is the guardrail; now describe what to build. Hand off to **`..
159
159
  - `../sdd/SKILL.md` — the rsc-sdd dispatcher: the method, the phase map, the invoke rule.
160
160
  - `../specify/SKILL.md` — the next phase: intent → spec.
161
161
  - `../analyze/SKILL.md` — the consistency gate that checks specs/plans against this constitution.
162
- - `harness` — owns `02-DOCS/wiki/` (including `wiki/stack/*` and the Knowledge map this skill reconciles with and links into).
162
+ - `harness` — owns `02-DOCS/wiki/` (including `wiki/stack/*` and the full Knowledge map at `02-DOCS/wiki/index.md` this skill reconciles with; the constitution's read-first row stays in the root `CLAUDE.md` pointer).
163
163
  - Stack skills the constitution *names but does not duplicate*: `../fastapi/SKILL.md`, `../nextjs/SKILL.md`, `../go/SKILL.md`, `../postgresdb/SKILL.md`, `../flutter/SKILL.md`, `../design/SKILL.md`, `../secure-coding/SKILL.md`.
164
164
  - References: `references/constitution-template.md`.
@@ -92,7 +92,7 @@ Copy-pasteable and **situation-tagged**, so it retrieves on the trigger that mat
92
92
  - **We believed:** <the wrong assumption>
93
93
  - **Actually:** <what is true>
94
94
  - **Durable home:** <path + surface that now holds it>
95
- - **Fires next time via:** <rule / eval / verify.sh / Knowledge-map entry>
95
+ - **Fires next time via:** <rule / eval / verify.sh / index entry in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer)>
96
96
  ```
97
97
 
98
98
  The last two lines are not optional. An entry with no durable home and no "fires next time" is a chat message with a date on it.
@@ -104,7 +104,7 @@ This is the rigor of this process skill, and it stands in for a `verify.sh` (thi
104
104
  - a rule the agent reads on its next pass (`CLAUDE.md` or a skill body), or
105
105
  - an eval case (`should_not_trigger` / `should_trigger`) that would have caught the miss, or
106
106
  - a `verify.sh` check on the owning skill that fails on the banned pattern, or
107
- - a `## Knowledge map` entry pointing at the new wiki article.
107
+ - a `02-DOCS/wiki/index.md` entry (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) pointing at the new wiki article.
108
108
 
109
109
  If you cannot name one of those, the lesson is not captured — keep going. Prefer a surface a human can review (a rule, an eval, a profile line) over an opaque store: a single agent reflecting alone can talk itself into a local optimum, so the durable write should be legible enough for a human to sanity-check.
110
110
 
@@ -186,14 +186,13 @@ live deploy. Exits 0 on a clean/empty target.
186
186
  ## Project grounding (02-DOCS + CLAUDE.md)
187
187
 
188
188
  When this skill runs in a project with a `02-DOCS/` layer (the harness Karpathy wiki), record this
189
- instance's deploy topology there and index it from the root `CLAUDE.md`, so the next agent inherits it
189
+ instance's deploy topology there and index it in `02-DOCS/wiki/index.md`, so the next agent inherits it
190
190
  instead of re-deriving it.
191
191
 
192
- 1. **Find the article** `02-DOCS/wiki/stack/coolify.md`, linked from a `## Knowledge map` section in the
193
- root `CLAUDE.md`.
192
+ 1. **Find the article** `02-DOCS/wiki/stack/coolify.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
194
193
  2. **If missing or stale**, create/update it with the real choices — the box (provider/specs), instance
195
194
  FQDN, which apps/databases run on it, build packs in use, the backup destination + cron + retention,
196
- and the port/firewall decisions — then add/refresh the `CLAUDE.md` link.
195
+ and the port/firewall decisions — then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
197
196
  3. **Read it first on every use** and stay consistent; when the topology changes, update the article (bump
198
197
  its `Updated` date) in the same change. Never commit credentials here — record *where* secrets live,
199
198
  not their values.
@@ -37,13 +37,13 @@ Do NOT use when (delegate or decline):
37
37
 
38
38
  Run this gate before reframing a single concept:
39
39
 
40
- 1. **Locate the teaching profile.** Read the project's root `CLAUDE.md` and look for a `## Knowledge map` section linking into `02-DOCS/wiki/teaching/` (the `harness` Karpathy-wiki convention: compiled profile articles live under `02-DOCS/wiki/teaching/`, raw inputs the user pastes live under `02-DOCS/raw/teaching/`). If `CLAUDE.md` is absent, the link is missing, or it points nowhere, treat the profile as ABSENT.
40
+ 1. **Locate the teaching profile.** Read the project's root `CLAUDE.md` and follow its short `## Knowledge map` pointer to the full index at `02-DOCS/wiki/index.md`, looking for the entry into `02-DOCS/wiki/teaching/` (the `harness` Karpathy-wiki convention: compiled profile articles live under `02-DOCS/wiki/teaching/`, raw inputs the user pastes live under `02-DOCS/raw/teaching/`). If `CLAUDE.md` is absent, the index entry is missing, or it points nowhere, treat the profile as ABSENT.
41
41
 
42
42
  2. **Check completeness** against the checklist in `references/learner-grounding.md`. The profile is complete only when every dimension is filled: the LEARNER (level, prior knowledge, pains, desires, current false beliefs, what they want to DO after); the AUDIENCE (same as the buyer or not? live vs recorded? size? context?); the target TRANSFORMATION (the one result, before→after); and constraints/format. **Any empty dimension = INCOMPLETE.**
43
43
 
44
44
  3. **If ABSENT or INCOMPLETE, STOP and interview the user.** Ask the question script from `references/learner-grounding.md`, **one focused batch at a time** (do not dump all questions at once; ask, wait, persist, then continue). Then:
45
45
  - **a.** Write/update the profile into `02-DOCS/wiki/teaching/` as wiki articles (`learner.md`, `audience.md`, `transformation.md`, `false-beliefs.md`, `constraints.md`, plus an `index.md`), following the article format in `references/learner-grounding.md`. Save any raw material the user pastes (transcripts, outlines, existing slides) verbatim into `02-DOCS/raw/teaching/` and link it from the article's `> Raw:` line. Create the directories if they do not exist.
46
- - **b.** Add or update a `## Knowledge map` section in the root `CLAUDE.md` linking to the teaching profile. Create `CLAUDE.md` if absent (additive only — never delete existing sections). The exact snippet is in `references/learner-grounding.md`.
46
+ - **b.** Index the teaching profile in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer). Ensure root `CLAUDE.md` carries that short pointer to the index, creating `CLAUDE.md` if absent (additive only — never delete existing sections). The exact snippet is in `references/learner-grounding.md`.
47
47
 
48
48
  4. **Only once the profile exists and is complete, proceed.** Cite which articles you used (e.g. "grounded in `02-DOCS/wiki/teaching/learner.md` and `false-beliefs.md`") so every reframing is traceable to a real learner, not an imagined one.
49
49
 
@@ -188,12 +188,12 @@ Automate → `scripts/verify.sh` (read-only; warns by default, `--strict` to gat
188
188
 
189
189
  ## Project grounding (02-DOCS + CLAUDE.md)
190
190
 
191
- This skill's 02-DOCS record has two parts, both indexed from a `## Knowledge map` section in the root `CLAUDE.md`:
191
+ This skill's 02-DOCS record has two parts, both indexed in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer):
192
192
 
193
- - The **learner + audience profile** at `02-DOCS/wiki/teaching/` — a hard gate (see "Learner grounding" above): if the root `CLAUDE.md` lacks the link or any dimension is empty (learner, audience, transformation, false beliefs, constraints), ask until complete, persist it (raw inputs to `02-DOCS/raw/teaching/`), link it from `## Knowledge map` (create `CLAUDE.md` if absent), and only then teach.
193
+ - The **learner + audience profile** at `02-DOCS/wiki/teaching/` — a hard gate (see "Learner grounding" above): if the index lacks the entry or any dimension is empty (learner, audience, transformation, false beliefs, constraints), ask until complete, persist it (raw inputs to `02-DOCS/raw/teaching/`), index it in `02-DOCS/wiki/index.md` and ensure root `CLAUDE.md` carries the short pointer to that index (create `CLAUDE.md` if absent), and only then teach.
194
194
  - The **course teaching conventions** at `02-DOCS/wiki/stack/course-storytelling.md` (or alongside the profile under `02-DOCS/wiki/teaching/`) — the established narrative spine, the named mental models already coined, the Big Dominoes per module, and the teacher's Attractive Character. Recorded, not gated.
195
195
 
196
- Create/update both as decisions are made and refresh their `CLAUDE.md` links. Read them first on every use and keep every reframing consistent with them. If the project has no `02-DOCS` layer at all, skip this section silently and proceed with the in-session profile.
196
+ Create/update both as decisions are made and keep their entries current in `02-DOCS/wiki/index.md` (root `CLAUDE.md` keeps only a short pointer to it). Read them first on every use and keep every reframing consistent with them. If the project has no `02-DOCS` layer at all, skip this section silently and proceed with the in-session profile.
197
197
 
198
198
  ## See Also
199
199
 
@@ -314,15 +314,13 @@ bad index is UB, not an exception.
314
314
  ## Project grounding (02-DOCS + CLAUDE.md)
315
315
 
316
316
  When this skill runs in a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md)
317
- Karpathy wiki), record this project's C++ decisions there and index them from the root `CLAUDE.md`,
317
+ Karpathy wiki), record this project's C++ decisions there and index them in `02-DOCS/wiki/index.md`,
318
318
  so the next agent inherits them instead of re-deriving them.
319
319
 
320
- 1. **Find the article** `02-DOCS/wiki/stack/cpp.md`, linked from a `## Knowledge map` section in
321
- the root `CLAUDE.md`.
320
+ 1. **Find the article** `02-DOCS/wiki/stack/cpp.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
322
321
  2. **If missing or stale**, create/update it with the project's real choices — std version and
323
322
  compiler matrix, CMake layout and presets, the sanitizer/warning policy, and the ownership/error
324
- conventions — then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
325
- `CLAUDE.md` itself, if absent).
323
+ conventions — then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
326
324
  3. **Read it first on every use** and stay consistent; when a convention changes, update the article
327
325
  (bump its `Updated` date) in the same change.
328
326
 
@@ -40,7 +40,7 @@ Prefer **numeric-prefix**: `NNNN-title-with-dashes.md`. Stable IDs are what make
40
40
  **Where to store** (first match wins):
41
41
  1. The project's existing convention — never invent a parallel log.
42
42
  2. A code repo with no convention: `docs/adr/` (also seen as `doc/adr/`).
43
- 3. A harness workspace: `02-DOCS/wiki/decisions/`, linked from the wiki knowledge map.
43
+ 3. A harness workspace: `02-DOCS/wiki/decisions/`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer).
44
44
 
45
45
  ```text
46
46
  Bad: decision-final-v2-REAL.md # no ID, no order, will rot
@@ -169,7 +169,7 @@ A decision log is only useful if it stays navigable.
169
169
  - **Index every ADR at creation.** One row: `| 0007 | Choose Postgres | accepted | 2026-06-02 |`. No orphans.
170
170
  - **Keep supersession links live** in both directions.
171
171
  - **Review cadence.** Periodically sweep `accepted` ADRs — anything reality has overtaken gets a superseding record, not a silent edit.
172
- - **Link the log from the entry point** — root `CLAUDE.md` or the wiki knowledge map — so onboarding finds it. The broader wiki and onboarding doc are owned by `knowledge-ops` and `codebase-onboarding`; this skill owns only the ADRs the wiki links to. The meeting that spawned a decision routes to [`meeting-notes`](../meeting-notes/SKILL.md); the repeatable how-to it implies routes to [`sop-builder`](../sop-builder/SKILL.md).
172
+ - **Index the log from the entry point** — `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) — so onboarding finds it. The broader wiki and onboarding doc are owned by `knowledge-ops` and `codebase-onboarding`; this skill owns only the ADRs the wiki links to. The meeting that spawned a decision routes to [`meeting-notes`](../meeting-notes/SKILL.md); the repeatable how-to it implies routes to [`sop-builder`](../sop-builder/SKILL.md).
173
173
 
174
174
  ## Anti-patterns
175
175
 
@@ -409,14 +409,12 @@ async def readyz() -> dict[str, str]:
409
409
 
410
410
  When this skill runs in a project with a `02-DOCS/` layer (the
411
411
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this
412
- project's deploy decisions there and index them from the root `CLAUDE.md`, so the next
412
+ project's deploy decisions there and index them in `02-DOCS/wiki/index.md`, so the next
413
413
  agent inherits the conventions instead of re-deriving them.
414
414
 
415
- 1. **Find the article** `02-DOCS/wiki/stack/deployment.md`, linked from a `## Knowledge map` section in the root
416
- `CLAUDE.md`.
415
+ 1. **Find the article** `02-DOCS/wiki/stack/deployment.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
417
416
  2. **If missing or stale**, create/update it with the project's real choices — the base-image/container choices, the CI pipeline, the Coolify/target config, the secrets flow, and the rollback strategy —
418
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
419
- `CLAUDE.md` itself, if absent).
417
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
420
418
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
421
419
  article (bump its `Updated` date) in the same change.
422
420
 
@@ -368,8 +368,8 @@ Score = Σ(dimension × weight), max 115 (normalize to /100 by ×100/115 if you
368
368
 
369
369
  ## Project grounding (02-DOCS + CLAUDE.md)
370
370
 
371
- This skill's 02-DOCS record has two parts, both indexed from a `## Knowledge map` section in
372
- the root `CLAUDE.md`:
371
+ This skill's 02-DOCS record has two parts, both indexed in `02-DOCS/wiki/index.md` (the Knowledge
372
+ map index; root `CLAUDE.md` points to it):
373
373
 
374
374
  - The **brand study** at `02-DOCS/wiki/brand/` — a hard gate (see "Brand grounding" above): if
375
375
  missing or incomplete, ask until complete before designing.
@@ -377,8 +377,8 @@ the root `CLAUDE.md`:
377
377
  (color/OKLCH, type scale, spacing, radius, shadow, motion), the 2026 direction picked, and the
378
378
  reference sites. Recorded, not gated.
379
379
 
380
- Create/update both as decisions are made and add/refresh their `CLAUDE.md` links (create the
381
- `## Knowledge map` section, and `CLAUDE.md` itself, if absent). Read them first on every use and
380
+ Create/update both as decisions are made and index them in `02-DOCS/wiki/index.md` (the Knowledge map;
381
+ root `CLAUDE.md` keeps only a short pointer to it). Read them first on every use and
382
382
  keep outputs consistent with them.
383
383
 
384
384
  ## See Also
@@ -203,5 +203,6 @@ version. If neither the CLI nor the Python module is present it prints `SKIP` an
203
203
 
204
204
  In a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md) wiki), record this project's
205
205
  DuckDB decisions — version pin, file layout, persistent vs in-memory, remote/secret setup — in
206
- `02-DOCS/wiki/stack/duckdb.md` and link it from the root `CLAUDE.md` `## Knowledge map`. Read it first on
206
+ `02-DOCS/wiki/stack/duckdb.md` and index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md`
207
+ keeps only a short pointer to it). Read it first on
207
208
  every use and keep choices consistent. No `02-DOCS/`? Skip silently. Conventions are recorded, never gated.
@@ -480,14 +480,14 @@ shutdown, keyset pagination, caching, `ORJSONResponse` and proxy headers all liv
480
480
 
481
481
  When this skill runs in a project with a `02-DOCS/` layer (the
482
482
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this project's API decisions in
483
- `02-DOCS/wiki/stack/fastapi.md` and link it from a `## Knowledge map` section in the root
484
- `CLAUDE.md`, so the next agent inherits the conventions instead of re-deriving them.
483
+ `02-DOCS/wiki/stack/fastapi.md` and index it in `02-DOCS/wiki/index.md` (the Knowledge map index; root
484
+ `CLAUDE.md` points to it), so the next agent inherits the conventions instead of re-deriving them.
485
485
 
486
486
  - **Read it first** on every use and stay consistent; bump its `Updated` date when a
487
487
  convention changes.
488
488
  - **Create/update it** with the project's real choices — auth model (JWT/OAuth2 provider,
489
489
  token TTLs), DB session + migration tool, error-envelope shape, settings/secrets approach,
490
- deployment target — adding the `CLAUDE.md` link (and the file) if absent.
490
+ deployment target — indexing it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it) if absent.
491
491
 
492
492
  No `02-DOCS/` layer? Skip silently (optionally suggest `harness`). Technical conventions are
493
493
  *recorded, not gated* — never block the task on this.
@@ -423,14 +423,12 @@ encapsulation → `references/i18n-and-dependencies.md`.
423
423
 
424
424
  When this skill runs in a project with a `02-DOCS/` layer (the
425
425
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this
426
- project's app decisions there and index them from the root `CLAUDE.md`, so the next
426
+ project's app decisions there and index them in `02-DOCS/wiki/index.md`, so the next
427
427
  agent inherits the conventions instead of re-deriving them.
428
428
 
429
- 1. **Find the article** `02-DOCS/wiki/stack/flutter.md`, linked from a `## Knowledge map` section in the root
430
- `CLAUDE.md`.
429
+ 1. **Find the article** `02-DOCS/wiki/stack/flutter.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
431
430
  2. **If missing or stale**, create/update it with the project's real choices — the state-management choice (Riverpod/Bloc), the architecture layers, routing, the Material 3 token system, and codegen setup —
432
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
433
- `CLAUDE.md` itself, if absent).
431
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
434
432
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
435
433
  article (bump its `Updated` date) in the same change.
436
434
 
@@ -411,14 +411,12 @@ Docker note: distroless/static base, `CGO_ENABLED=0`, multi-stage build. Full Co
411
411
 
412
412
  When this skill runs in a project with a `02-DOCS/` layer (the
413
413
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this
414
- project's service decisions there and index them from the root `CLAUDE.md`, so the next
414
+ project's service decisions there and index them in `02-DOCS/wiki/index.md`, so the next
415
415
  agent inherits the conventions instead of re-deriving them.
416
416
 
417
- 1. **Find the article** `02-DOCS/wiki/stack/go.md`, linked from a `## Knowledge map` section in the root
418
- `CLAUDE.md`.
417
+ 1. **Find the article** `02-DOCS/wiki/stack/go.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
419
418
  2. **If missing or stale**, create/update it with the project's real choices — the project layout, the router (stdlib 1.22 / chi), the error and `slog` logging conventions, and concurrency/timeout defaults —
420
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
421
- `CLAUDE.md` itself, if absent).
419
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
422
420
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
423
421
  article (bump its `Updated` date) in the same change.
424
422
 
@@ -276,6 +276,31 @@ Once the structure stands, make sure the workspace has the rsc skills its stack
276
276
  Can't run a shell? Print the exact command for another terminal tab.
277
277
  3. **Flag the new session.** New skills load at session start — tell the user to open a **new tab/session** (or reload Cursor/Codex/Gemini) in this folder for them to activate. Log the installed set in `02-DOCS/wiki/harness/decisions.md`.
278
278
 
279
+ ## Keep CLAUDE.md lean — the index lives in the wiki
280
+
281
+ Root `CLAUDE.md` is read on **every** turn, so every line is a permanent context tax (2026 best
282
+ practice: keep it **under ~200 lines**; beyond that, adherence rots as the rules that matter get
283
+ diluted by an index nobody needs in context). The biggest growth vector is the `## Knowledge map` —
284
+ a row per wiki article, appended by many skills, forever.
285
+
286
+ **The rule:** the **full** Knowledge map lives in `02-DOCS/wiki/index.md` (loaded on demand, grows
287
+ freely). Root `CLAUDE.md`'s `## Knowledge map` is a **short pointer** — only the read-first entries
288
+ (`harness/user-profile.md`, `sdd/constitution.md`) plus "full index → `02-DOCS/wiki/index.md`".
289
+
290
+ **Offload when it bloats (a move, never a trim — no info lost):** when `CLAUDE.md` passes ~200 lines
291
+ (the SessionStart hook nudges you) or its `## Knowledge map` has grown past the read-first entries:
292
+
293
+ 1. Open `02-DOCS/wiki/index.md` (create it if absent).
294
+ 2. **Move** every Knowledge-map row beyond the read-first entries from `CLAUDE.md` into
295
+ `02-DOCS/wiki/index.md`, merging — don't duplicate, don't delete.
296
+ 3. Leave `CLAUDE.md`'s `## Knowledge map` as the short pointer above.
297
+ 4. Same for any other section overgrown into an index (e.g. a huge tool table): detail to the wiki,
298
+ pointer stays.
299
+
300
+ From then on, **new index entries go to `02-DOCS/wiki/index.md`**, not `CLAUDE.md`. This is additive
301
+ and reversible; it honors the "never delete user content" rule (you relocate it, with a pointer).
302
+ Opt out of the size nudge with `.rsc/.no-claudemd-check`.
303
+
279
304
  ## Iron rules (non-negotiable)
280
305
 
281
306
  These rules cut across every phase. Violating any one of them aborts the run.
@@ -14,32 +14,19 @@ workspace. If you're working in a subproject that also has its own
14
14
 
15
15
  ## Knowledge map
16
16
 
17
- The living record of this project's conventions lives under `02-DOCS/wiki/` and is maintained by
18
- the stack skills, plus the `harness/` topic maintained by the harness itself (user profile +
19
- decisions log). Each skill links its article here as it is created read the relevant article
20
- before working in its area (the `harness/user-profile.md` first, to match the user's technical +
21
- accompaniment level), and update it when conventions change.
17
+ The **full** index of this project's conventions lives in **`02-DOCS/wiki/index.md`** maintained by
18
+ the stack skills plus the `harness/` topic. Read the relevant article before working in its area, and
19
+ update it when conventions change. Keep this section a **short pointer**: CLAUDE.md is read on every
20
+ turn, so the full per-area table belongs in `02-DOCS/wiki/index.md`, not here. New index entries go
21
+ there, not into this file.
22
+
23
+ Read first, always:
22
24
 
23
25
  | Area | Article |
24
26
  |------|---------|
25
27
  | User profile (technical + accompaniment level) | `02-DOCS/wiki/harness/user-profile.md` |
26
- | Decisions log (append-only, "siempre 3 opciones") | `02-DOCS/wiki/harness/decisions.md` |
27
28
  | SDD constitution (project non-negotiables) | `02-DOCS/wiki/sdd/constitution.md` |
28
- | SDD specs (what & why, per feature) | `02-DOCS/wiki/sdd/specs/` |
29
- | SDD plans (technical approach, per feature) | `02-DOCS/wiki/sdd/plans/` |
30
- | SDD decisions (implement-phase log) | `02-DOCS/wiki/sdd/decisions.md` |
31
- | Brand & voice | `02-DOCS/wiki/brand/` |
32
- | Design system | `02-DOCS/wiki/stack/design.md` |
33
- | FastAPI / API | `02-DOCS/wiki/stack/fastapi.md` |
34
- | Next.js app | `02-DOCS/wiki/stack/nextjs.md` |
35
- | Go services | `02-DOCS/wiki/stack/go.md` |
36
- | PostgreSQL | `02-DOCS/wiki/stack/postgresdb.md` |
37
- | Flutter app | `02-DOCS/wiki/stack/flutter.md` |
38
- | Agents | `02-DOCS/wiki/stack/agents.md` |
39
- | Security | `02-DOCS/wiki/stack/security.md` |
40
- | Deployment | `02-DOCS/wiki/stack/deployment.md` |
41
- | Presentations | `02-DOCS/wiki/stack/presentations.md` |
42
- | Course storytelling | `02-DOCS/wiki/stack/course-storytelling.md` |
29
+ | **Everything else full index** | `02-DOCS/wiki/index.md` |
43
30
 
44
31
  ## Workspace map
45
32
 
@@ -180,7 +180,7 @@ done-checks, the constitution and decision logging hold at every level, includin
180
180
 
181
181
  When you make a choice the plan did not fully specify — a library, a data shape, an error contract, a
182
182
  deviation from the plan — append it to `02-DOCS/wiki/sdd/decisions.md` (append-only; create it if
183
- absent and add a row to the root `CLAUDE.md` `## Knowledge map` under the `sdd/` topic). One entry:
183
+ absent and index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) under the `sdd/` topic). One entry:
184
184
 
185
185
  ```text
186
186
  ## YYYY-MM-DD — <short title> (feature: <slug>, task: <n>)
@@ -51,7 +51,7 @@ Before discovery, before any recommendation, write the profile to `02-DOCS` and
51
51
 
52
52
  - `02-DOCS/wiki/harness/user-profile.md` — the living profile (technical level, accompaniment level, goals, context, constraints). Format in `references/accompaniment-and-profile.md`.
53
53
  - `02-DOCS/wiki/harness/decisions.md` — an **append-only** decisions log. Every significant decision gets one entry, never edited or deleted. Format in `references/accompaniment-and-profile.md`.
54
- - Root `CLAUDE.md` → a `## Knowledge map` section linking to BOTH files. Create `CLAUDE.md` if absent (additive only — never delete existing sections).
54
+ - Root `CLAUDE.md` → a SHORT `## Knowledge map` pointer: the read-first entries (this `user-profile.md` and the `decisions.md` log) plus a "full index → `02-DOCS/wiki/index.md`" line. Keep this pointer tiny — it loads on every turn; ALL other index entries live in `02-DOCS/wiki/index.md`, not here. Create `CLAUDE.md` if absent (additive only — never delete existing sections).
55
55
 
56
56
  If `02-DOCS/` does not yet exist (greenfield), create `02-DOCS/wiki/harness/` now — just enough to hold these two files. That, plus the `CLAUDE.md` Knowledge-map link, is everything `init` writes; ALL other `01-TOOLS/` + `02-DOCS/` scaffolding is the `harness` skill's job.
57
57
 
@@ -196,7 +196,7 @@ These thoughts mean the skill is about to break its own rules. Recognize and abo
196
196
 
197
197
  ## Project grounding (02-DOCS + CLAUDE.md)
198
198
 
199
- This skill's `02-DOCS` record is the **user profile** at `02-DOCS/wiki/harness/user-profile.md` plus the append-only **decisions log** at `02-DOCS/wiki/harness/decisions.md`. Both are written in Phase 1 and updated throughout, and both are linked from a `## Knowledge map` section in the root `CLAUDE.md` (created if absent, additive only). Every rsc skill reads the profile first and adapts its verbosity and question count to `accompaniment_level` and `technical_level`. Those two files plus the Knowledge-map link are everything `init` writes; ALL other `01-TOOLS/` + `02-DOCS/` scaffolding is the `harness` skill's job, and it reads this same profile.
199
+ This skill's `02-DOCS` record is the **user profile** at `02-DOCS/wiki/harness/user-profile.md` plus the append-only **decisions log** at `02-DOCS/wiki/harness/decisions.md`. Both are written in Phase 1 and updated throughout. Because they are the read-first entries, both stay in the SHORT `## Knowledge map` pointer in the root `CLAUDE.md` (created if absent, additive only) — alongside a "full index → `02-DOCS/wiki/index.md`" line where every OTHER index entry lives. Every rsc skill reads the profile first and adapts its verbosity and question count to `accompaniment_level` and `technical_level`. Those two files plus the Knowledge-map link are everything `init` writes; ALL other `01-TOOLS/` + `02-DOCS/` scaffolding is the `harness` skill's job, and it reads this same profile.
200
200
 
201
201
  Verify the profile and the Knowledge-map link exist with `scripts/verify.sh` (read-only; warns, never fails).
202
202
 
@@ -303,13 +303,13 @@ When this skill runs in a project with a `02-DOCS/` layer (the
303
303
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this project's Java decisions there
304
304
  and index them from the root `CLAUDE.md`, so the next agent inherits them instead of re-deriving.
305
305
 
306
- 1. **Find the article** `02-DOCS/wiki/stack/java.md`, linked from a `## Knowledge map` section
307
- in the root `CLAUDE.md`.
306
+ 1. **Find the article** `02-DOCS/wiki/stack/java.md`, indexed in `02-DOCS/wiki/index.md` (the
307
+ Knowledge map index; root `CLAUDE.md` points to it).
308
308
  2. **If missing or stale**, create/update it with the project's real choices — JDK/LTS target,
309
309
  Maven vs Gradle, the domain-modeling conventions (records/sealed), the concurrency model
310
310
  (virtual threads, structured-concurrency preview on/off), and the error/null conventions —
311
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section and `CLAUDE.md`
312
- itself if absent).
311
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a
312
+ short pointer to it).
313
313
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
314
314
  article (bump its `Updated` date) in the same change.
315
315
 
@@ -221,9 +221,9 @@ Automate → `scripts/verify.sh` (read-only grep gate; warns by default, `--stri
221
221
  This skill's 02-DOCS record is the **brand & voice study** at `02-DOCS/wiki/brand/` — a hard
222
222
  gate (see "Brand grounding" above): if the root `CLAUDE.md` lacks the link or the study is
223
223
  incomplete (no voice samples, positioning, do/don't lists), ask until complete, persist it, and
224
- link it from a `## Knowledge map` section in `CLAUDE.md` (create `CLAUDE.md` if absent). Read it
225
- first on every use and ground all copy in it. Site and visual conventions belong to the sibling
226
- `design` and `nextjs` articles in the same Knowledge map.
224
+ index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short
225
+ pointer to it). Read it first on every use and ground all copy in it. Site and visual conventions
226
+ belong to the sibling `design` and `nextjs` articles in the same Knowledge map index.
227
227
 
228
228
  ## See Also
229
229
 
@@ -296,7 +296,8 @@ exits 0.
296
296
 
297
297
  In a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md) wiki), record this
298
298
  app's real Modal choices — GPU types, image base, Volume names, schedule, endpoint shape — in
299
- `02-DOCS/wiki/stack/modal.md` and link it from the root `CLAUDE.md` `## Knowledge map`. Read it
299
+ `02-DOCS/wiki/stack/modal.md` and index it in `02-DOCS/wiki/index.md` (the Knowledge map; root
300
+ `CLAUDE.md` keeps only a short pointer to it). Read it
300
301
  first on every use; create/update it with the real decisions. No `02-DOCS/`? Skip silently.
301
302
 
302
303
  ## See Also
@@ -311,12 +311,12 @@ When this skill runs in a project with a `02-DOCS/` layer (the [`harness`](../ha
311
311
  Karpathy wiki), record this project's MongoDB decisions there and index them from the root
312
312
  `CLAUDE.md`, so the next agent inherits the conventions instead of re-deriving them.
313
313
 
314
- 1. **Find the article** `02-DOCS/wiki/stack/mongodb.md`, linked from a `## Knowledge map` section in
315
- the root `CLAUDE.md`.
314
+ 1. **Find the article** `02-DOCS/wiki/stack/mongodb.md`, indexed in `02-DOCS/wiki/index.md` (the
315
+ Knowledge map index; root `CLAUDE.md` points to it).
316
316
  2. **If missing or stale**, create/update it with the project's real choices — collection layout and
317
317
  embed/reference decisions, the index set and its ESR rationale, read/write concern policy, the
318
- Atlas tier, and any encryption/RBAC setup — then add/refresh the `CLAUDE.md` link (create the
319
- `## Knowledge map` section, and `CLAUDE.md` itself, if absent).
318
+ Atlas tier, and any encryption/RBAC setup — then index it in `02-DOCS/wiki/index.md` (the
319
+ Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
320
320
  3. **Read it first on every use** and stay consistent; when a convention changes, update the article
321
321
  (bump its `Updated` date) in the same change.
322
322
 
@@ -454,11 +454,11 @@ When this skill runs in a project with a `02-DOCS/` layer (the
454
454
  project's app decisions there and index them from the root `CLAUDE.md`, so the next
455
455
  agent inherits the conventions instead of re-deriving them.
456
456
 
457
- 1. **Find the article** `02-DOCS/wiki/stack/nextjs.md`, linked from a `## Knowledge map` section in the root
458
- `CLAUDE.md`.
457
+ 1. **Find the article** `02-DOCS/wiki/stack/nextjs.md`, indexed in `02-DOCS/wiki/index.md` (the
458
+ Knowledge map index; root `CLAUDE.md` points to it).
459
459
  2. **If missing or stale**, create/update it with the project's real choices — the caching model in use (v15 fetch-cache vs v16 `use cache`), the auth approach, server-action and data-fetching conventions, runtime choices (edge/node), and the design-system hookup —
460
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
461
- `CLAUDE.md` itself, if absent).
460
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a
461
+ short pointer to it).
462
462
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
463
463
  article (bump its `Updated` date) in the same change.
464
464
 
@@ -51,7 +51,7 @@ Run this gate. Skipping it produces a plan that drifts from intent on contact.
51
51
  3. **Read the constitution.** `02-DOCS/wiki/sdd/constitution.md` holds the project's non-negotiables
52
52
  (stack canon, quality bars, conventions). Every architectural choice must be consistent with it;
53
53
  when the plan needs to bend a principle, say so explicitly with a reason — don't bend it silently.
54
- 4. **Read the Knowledge map.** The root `CLAUDE.md` `## Knowledge map` points at existing
54
+ 4. **Read the Knowledge map.** The full index at `02-DOCS/wiki/index.md` (root `CLAUDE.md` keeps only a short pointer to it) points at existing
55
55
  `02-DOCS/wiki/stack/*` and prior plans/decisions. Reuse what's already established. A plan that
56
56
  reinvents a pattern the project already settled is scope drift.
57
57
 
@@ -172,8 +172,8 @@ complete; it's just quiet.
172
172
 
173
173
  Write to `02-DOCS/wiki/sdd/plans/<slug>.md`, where `<slug>` matches the spec's slug exactly (one
174
174
  plan per spec, same name — that's how `tasks`, `analyze`, and `implement` find it). Use
175
- `references/plan-template.md` verbatim as the skeleton. Then index it: add a row under the
176
- `## Knowledge map` section of the root `CLAUDE.md` pointing at the new plan, so the harness wiki and
175
+ `references/plan-template.md` verbatim as the skeleton. Then index it in `02-DOCS/wiki/index.md`
176
+ (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) pointing at the new plan, so the harness wiki and
177
177
  every later phase can find it. If a plan for this slug already exists, update it in place and note
178
178
  what changed — don't fork a `-v2`.
179
179
 
@@ -353,11 +353,11 @@ When this skill runs in a project with a `02-DOCS/` layer (the
353
353
  project's database decisions there and index them from the root `CLAUDE.md`, so the next
354
354
  agent inherits the conventions instead of re-deriving them.
355
355
 
356
- 1. **Find the article** `02-DOCS/wiki/stack/postgresdb.md`, linked from a `## Knowledge map` section in the root
357
- `CLAUDE.md`.
356
+ 1. **Find the article** `02-DOCS/wiki/stack/postgresdb.md`, indexed in `02-DOCS/wiki/index.md` (the
357
+ Knowledge map index; root `CLAUDE.md` points to it).
358
358
  2. **If missing or stale**, create/update it with the project's real choices — schema and naming conventions, the migration tool, indexing/partitioning decisions, the pooling setup, and any RLS policies —
359
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
360
- `CLAUDE.md` itself, if absent).
359
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a
360
+ short pointer to it).
361
361
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
362
362
  article (bump its `Updated` date) in the same change.
363
363
 
@@ -276,8 +276,8 @@ When this skill runs in a project with a `02-DOCS/` layer (the
276
276
  conventions there and index them from the root `CLAUDE.md`, so the next agent inherits them instead of
277
277
  re-deriving them.
278
278
 
279
- 1. **Find the article** `02-DOCS/wiki/stack/presentations.md`, linked from a `## Knowledge map` section in the root `CLAUDE.md`.
280
- 2. **If missing or stale**, create/update it with this project's real choices — the chosen pipeline (Marp / Slidev / python-pptx) and why; the theme file path and how it maps the design tokens (`02-DOCS/wiki/stack/design.md`); the standard deck arc(s); export commands and the canonical output (PDF / PPTX); presenter-vs-leave-behind convention; font-embedding and asset-location notes — then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and `CLAUDE.md` itself, if absent).
279
+ 1. **Find the article** `02-DOCS/wiki/stack/presentations.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
280
+ 2. **If missing or stale**, create/update it with this project's real choices — the chosen pipeline (Marp / Slidev / python-pptx) and why; the theme file path and how it maps the design tokens (`02-DOCS/wiki/stack/design.md`); the standard deck arc(s); export commands and the canonical output (PDF / PPTX); presenter-vs-leave-behind convention; font-embedding and asset-location notes — then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
281
281
  3. **Read it first on every use** and stay consistent; when a convention changes, update the article (bump its `Updated` date) in the same change.
282
282
 
283
283
  The deck theme is downstream of the design tokens: always reconcile `02-DOCS/wiki/stack/presentations.md`
@@ -348,9 +348,9 @@ When this skill runs in a project with a `02-DOCS/` layer (the
348
348
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this project's Python conventions
349
349
  there so the next agent inherits them — *recorded, not gated*, never block the task on this.
350
350
 
351
- 1. **Find** `02-DOCS/wiki/stack/python.md`, linked from a `## Knowledge map` in the root `CLAUDE.md`.
351
+ 1. **Find** `02-DOCS/wiki/stack/python.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
352
352
  2. **If missing or stale**, write the project's real choices (interpreter floor, `src/` layout,
353
- uv workflow, ruff/mypy config, async-vs-sync stance, data-modeling defaults) and add the link.
353
+ uv workflow, ruff/mypy config, async-vs-sync stance, data-modeling defaults) and index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
354
354
  3. **Read it first on every use**; bump its `Updated` date when a convention changes.
355
355
 
356
356
  No `02-DOCS/` layer? Skip silently (optionally suggest `harness`).
@@ -219,7 +219,7 @@ Review is mostly a conversation, but two artifacts persist into the harness wiki
219
219
  - **Accepted/declined findings** of consequence → append to `02-DOCS/wiki/sdd/decisions.md` (e.g. "declined NPE finding on documents.py:42 — guarded by require_auth; added regression test"). This is the same append-only log `implement` writes to.
220
220
  - If a finding reveals a **missing constitution rule** (a defect class the project keeps hitting), propose adding it to `02-DOCS/wiki/sdd/constitution.md` so the next review catches it earlier.
221
221
 
222
- Index both under the root `CLAUDE.md` `## Knowledge map` (the `sdd/` topic) — the harness owns that map; this skill just keeps its rows honest.
222
+ Index both in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) under the `sdd/` topic — the harness owns that map; this skill just keeps its rows honest.
223
223
 
224
224
  ## Next in the chain
225
225
 
@@ -365,12 +365,12 @@ When this skill runs in a project with a `02-DOCS/` layer (the
365
365
  [`harness`](../harness/SKILL.md) Karpathy wiki), record this project's service decisions there and index
366
366
  them from the root `CLAUDE.md`, so the next agent inherits the conventions instead of re-deriving them.
367
367
 
368
- 1. **Find the article** `02-DOCS/wiki/stack/rust.md`, linked from a `## Knowledge map` section in the
369
- root `CLAUDE.md`.
368
+ 1. **Find the article** `02-DOCS/wiki/stack/rust.md`, indexed in `02-DOCS/wiki/index.md` (the
369
+ Knowledge map index; root `CLAUDE.md` points to it).
370
370
  2. **If missing or stale**, create/update it with the project's real choices — the crate/workspace layout,
371
371
  the runtime (tokio), the HTTP framework (axum 0.8), the error strategy (thiserror enum + IntoResponse
372
- mapping), the DB layer (sqlx + pool), and tracing/concurrency defaults — then add/refresh the
373
- `CLAUDE.md` link (create the `## Knowledge map` section, and `CLAUDE.md` itself, if absent).
372
+ mapping), the DB layer (sqlx + pool), and tracing/concurrency defaults — then index it in
373
+ `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
374
374
  3. **Read it first on every use** and stay consistent; when a convention changes, update the article
375
375
  (bump its `Updated` date) in the same change.
376
376
 
@@ -145,9 +145,10 @@ Every phase writes under `02-DOCS/wiki/sdd/` so the feature's reasoning outlives
145
145
  └── decisions.md ← append-only log of decisions taken while building
146
146
  ```
147
147
 
148
- Index these from the root `CLAUDE.md` `## Knowledge map` under an `sdd/` topic, so every other skill reads them before working in the area. The harness maintains and improves these files just like any other wiki topic — `sdd` produces them, the harness keeps them honest.
148
+ Index these in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) under an `sdd/` topic, so every other skill reads them before working in the area. The harness maintains and improves these files just like any other wiki topic — `sdd` produces them, the harness keeps them honest.
149
149
 
150
150
  ```markdown
151
+ # 02-DOCS/wiki/index.md
151
152
  ## Knowledge map
152
153
  | Topic | Where | What |
153
154
  | --- | --- | --- |
@@ -336,11 +336,11 @@ When this skill runs in a project with a `02-DOCS/` layer (the
336
336
  project's security decisions there and index them from the root `CLAUDE.md`, so the next
337
337
  agent inherits the conventions instead of re-deriving them.
338
338
 
339
- 1. **Find the article** `02-DOCS/wiki/stack/security.md`, linked from a `## Knowledge map` section in the root
340
- `CLAUDE.md`.
339
+ 1. **Find the article** `02-DOCS/wiki/stack/security.md`, indexed in `02-DOCS/wiki/index.md` (the
340
+ Knowledge map index; root `CLAUDE.md` points to it).
341
341
  2. **If missing or stale**, create/update it with the project's real choices — the threat model, the auth model, the secrets backend, the CI security gates, and any accepted risks —
342
- then add/refresh the `CLAUDE.md` link (create the `## Knowledge map` section, and
343
- `CLAUDE.md` itself, if absent).
342
+ then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a
343
+ short pointer to it).
344
344
  3. **Read it first on every use** and stay consistent; when a convention changes, update the
345
345
  article (bump its `Updated` date) in the same change.
346
346
 
@@ -216,8 +216,9 @@ Emit one `security-scan-report.json` — the machine-checkable contract CI gates
216
216
 
217
217
  In a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md)
218
218
  Karpathy wiki), record the scanner choices, pinned versions, gate thresholds, and
219
- any accepted-risk suppressions in `02-DOCS/wiki/stack/security-scan.md`, and link
220
- it from the root `CLAUDE.md` `## Knowledge map`. Read it first on every run so the
219
+ any accepted-risk suppressions in `02-DOCS/wiki/stack/security-scan.md`, and index
220
+ it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short
221
+ pointer to it). Read it first on every run so the
221
222
  next agent inherits the pinned tools and thresholds instead of re-deriving them.
222
223
  No `02-DOCS/`? Skip silently. Conventions are recorded, not gated — never block
223
224
  the scan on this.
@@ -228,7 +228,7 @@ When no profile exists, default to L2 and proceed — don't stall the ship to as
228
228
  Ship is mostly git actions, but the outcome is recorded so the knowledge model stays whole:
229
229
 
230
230
  - **The landing decision** (which of the three options, and why) → append to `02-DOCS/wiki/sdd/decisions.md`, the same append-only log `implement`, `verify`, and `review` write to. Parks and discards are logged with their reason so dead-ends aren't re-walked.
231
- - A **shipped feature** flips its spec under `02-DOCS/wiki/sdd/specs/<slug>.md` to a shipped state (note the merge commit / PR). The harness owns the wiki; ship just keeps the `sdd/` rows in the root `CLAUDE.md` `## Knowledge map` honest.
231
+ - A **shipped feature** flips its spec under `02-DOCS/wiki/sdd/specs/<slug>.md` to a shipped state (note the merge commit / PR). The harness owns the wiki; ship just keeps the `sdd/` rows in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) honest.
232
232
  - An **archive bundle** closes the loop under `02-DOCS/wiki/sdd/archive/<slug>/`:
233
233
  - `final-report.md` — what shipped, why, landing decision, links.
234
234
  - `apply-progress.md` — copy or link to `progress/<slug>.md`.
@@ -11,7 +11,7 @@ origin: risco
11
11
 
12
12
  This is the **specify** phase of the rsc-sdd chain: `constitution` → **`specify`** → `clarify` → `plan` → `tasks` → `analyze` → `implement` → `verify` → `review` → `ship`. Its single job is to turn a fuzzy intent into a written specification that states **WHAT** the change is and **WHY** it matters — and nothing about **HOW** it gets built.
13
13
 
14
- A spec is a contract about behaviour and outcomes, readable by a non-technical stakeholder and precise enough that a `plan` can be derived from it. The output is one file: `02-DOCS/wiki/sdd/specs/<slug>.md`, indexed in the root `CLAUDE.md` Knowledge map.
14
+ A spec is a contract about behaviour and outcomes, readable by a non-technical stakeholder and precise enough that a `plan` can be derived from it. The output is one file: `02-DOCS/wiki/sdd/specs/<slug>.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer).
15
15
 
16
16
  ## Detect the moment — and hold the gate
17
17
 
@@ -93,7 +93,8 @@ Run these in order. It is a collaborative dialogue, not a form you fill in silen
93
93
  5. PROPOSE 2-3 approaches → distinct directions with honest trade-offs; lead with your recommendation and why
94
94
  6. PRESENT the design → section by section (problem, users, behaviour, acceptance), scaled to complexity;
95
95
  after EACH section ask "does this look right?" and adjust before moving on
96
- 7. WRITE the spec → 02-DOCS/wiki/sdd/specs/<slug>.md (WHAT/WHY), index it in CLAUDE.md, commit if a repo
96
+ 7. WRITE the spec → 02-DOCS/wiki/sdd/specs/<slug>.md (WHAT/WHY), index it in 02-DOCS/wiki/index.md
97
+ (the Knowledge map; root CLAUDE.md keeps only a short pointer), commit if a repo
97
98
  8. SELF-REVIEW → scan for TODO/placeholder, contradictions, ambiguity, scope creep; fix inline
98
99
  9. USER APPROVES → ask them to read the written spec and confirm; loop on changes until they approve
99
100
  10. HAND OFF → only now, result envelope → clarify/plan. NEVER to implement.
@@ -191,7 +192,7 @@ The proposal is allowed to mention options and tradeoffs; the spec that follows
191
192
  - Read `02-DOCS/wiki/sdd/constitution.md` first — its principles are inherited constraints, not things to re-decide. If it's missing, note that the project has no constitution yet and suggest the `constitution` phase before continuing (you can still draft a spec, but flag the absence).
192
193
  - **No constitution yet?** Still write the spec, but inherit nothing — lean harder on the wiki and the user's answers, and record every constraint you would have inherited as a *point to clarify* instead of assuming it.
193
194
  - Write the spec to `02-DOCS/wiki/sdd/specs/<slug>.md`. Create the directory if absent.
194
- - Add a row under the `## Knowledge map` section of the root `CLAUDE.md` linking the new spec under the `sdd/specs` topic (additive only — never delete existing rows). Create `CLAUDE.md` if absent.
195
+ - Add a row in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) linking the new spec under the `sdd/specs` topic (additive only — never delete existing rows). Create the index if absent.
195
196
  - Log the spec's creation and any significant scoping decision to `02-DOCS/wiki/sdd/decisions.md` (append-only), so the chain keeps a trace of why scope landed where it did. This is the canonical SDD decisions log shared with `constitution` and `plan` — not the harness's own `02-DOCS/wiki/harness/decisions.md`.
196
197
 
197
198
  ## Result envelope
@@ -56,8 +56,8 @@ When the current task would clearly benefit from an rsc skill that is **not inst
56
56
  Rules:
57
57
 
58
58
  - Installing changes the user's environment — always confirm first.
59
- - To know what exists, run `npx @ericrisco/rsc consult "<the task>"` instead of guessing.
60
- - For a project-level view, prefer `.rsc/skill-registry.json` when present; if it is missing or stale, suggest `npx @ericrisco/rsc registry refresh`. This is a cheap index, not a reason to load every skill.
59
+ - To know what exists, run `npx @ericrisco/rsc catalog --available` (every NOT-installed skill as `id available short description`) and **pick the best fit yourself, by meaning** — see the detector below. Don't guess from memory.
60
+ - `npx @ericrisco/rsc consult "<task>"` is only a cheap **lexical** hint: it keyword-matches and silently returns nothing for natural-language or non-English/Catalan intent (e.g. it finds no email skill for "mandar emails"). Never let it be the decider; if it's empty, scan `catalog` and judge semantically.
61
61
  - Never recommend something already installed (`npx @ericrisco/rsc list`).
62
62
  - One suggestion at a time. Don't interrupt the flow for nice-to-haves.
63
63
 
@@ -78,24 +78,29 @@ This is broader than "start a project". It includes mid-conversation requests su
78
78
  - Knowledge and research: "documenta cómo funciona esto", "crea una wiki", "procesa este inbox", "research competitors", "turn this into SOPs".
79
79
  - Other languages: any equivalent phrasing. Match the user's intent, not exact words.
80
80
 
81
- When a capability intent appears:
82
-
83
- 1. Run `npx @ericrisco/rsc list` to know what is already installed.
84
- 2. Run `npx @ericrisco/rsc consult "<the user's exact intent>"`.
85
- 3. Read the ordered result as the install queue, but pick only the **first missing**
86
- skill that is useful right now. Skip `suggest` and any installed skill.
81
+ When a capability intent appears, **you** make the match semantically — do not delegate the decision to a keyword ranker:
82
+
83
+ 1. Run `npx @ericrisco/rsc catalog --available` to get every NOT-installed skill as
84
+ `id available short description`. (It already excludes what's installed.)
85
+ 2. **Read the catalog and pick the single best-fit skill by MEANING** — match the user's
86
+ intent to a skill's *purpose*, semantically, in any language (CA/ES/EN/…), the way you'd
87
+ match a request to a teammate's expertise. Judge meaning, not shared keywords:
88
+ "mandar emails de bienvenida" → `email-connector` even though no words overlap its tags;
89
+ "login con Google" → an auth/security skill, not `flutter`; "transcripció de veu" → a
90
+ speech/audio skill *if one exists*.
91
+ 3. If nothing in the catalog genuinely fits, **say so and move on** — don't force a weak
92
+ match, and don't propose a tangential skill just to have an answer. (`npx @ericrisco/rsc
93
+ consult "<intent>"` is available as a lexical hint, but it misses natural-language and
94
+ Catalan intent and is silent for many real needs — never read its silence as "no skill
95
+ exists." The catalog + your judgment is the source of truth.)
87
96
  4. Ask before installing: "Para esto instalaría `<id>`, que aún no tienes. ¿La instalo? (sí/no)".
88
- 5. On yes, run `npx @ericrisco/rsc add <id>` and then continue the original request.
89
-
90
- Example: if the user says "quiero montar una pagina web para vender cursos online",
91
- do not just start building. Check the installed list, consult that exact phrase, and
92
- recommend the first missing skill from the returned queue. In a base install, `init`
93
- and `harness` may already exist, so the first missing skill is usually `nextjs`. In a
94
- bare install, `init` may be first. Install one skill at a time.
97
+ 5. On yes, run `npx @ericrisco/rsc add <id>` and continue the original request. One at a time.
95
98
 
96
- Example: if the user says "hazme una secuencia de cold emails para vender mi SaaS",
97
- consult that exact phrase and recommend the first missing email/marketing skill rather
98
- than writing generic copy with no specialist loaded.
99
+ Example: "quiero montar una pagina web para vender cursos online" scan the catalog and
100
+ pick the web stack skill (usually `nextjs`) by meaning; don't start building before offering it.
101
+ Example: "hazme una secuencia de cold emails para vender mi SaaS" → pick the email/outreach
102
+ skill (`cold-outreach` / `email-connector`) because it *means* email outreach — not because
103
+ the keywords happen to match (they often won't).
99
104
 
100
105
  ## Onboarding gate (first contact)
101
106
 
@@ -62,17 +62,17 @@ capability:
62
62
  - scenario: "Mid-conversation, after base install, the user says 'quiero montar una pagina web para vender cursos online'. `init`, `harness`, `orient`, and `suggest` are already installed; `nextjs` is not. Show how rsc-suggest behaves."
63
63
  must_include:
64
64
  - "Treats the message as in-agent capability intent, not as a CLI-only consult task"
65
- - "Runs `npx @ericrisco/rsc list` before recommending so installed `init`/`harness` are skipped"
66
- - "Runs `npx @ericrisco/rsc consult \"quiero montar una pagina web para vender cursos online\"` or equivalent exact-intent consult"
67
- - "Names `nextjs` as the first missing useful skill for the website work"
65
+ - "Runs `npx @ericrisco/rsc catalog --available` to see the not-installed skills (already excludes installed `init`/`harness`)"
66
+ - "Picks the best-fit skill by MEANING from the catalog, not by relying on lexical `consult` ranking"
67
+ - "Names `nextjs` as the missing useful skill for the website work"
68
68
  - "Asks one short confirmation before installing and does not auto-install"
69
69
  - "On confirmation, runs `npx @ericrisco/rsc add nextjs`, then resumes the original website task"
70
70
 
71
71
  - scenario: "Mid-conversation, the user says 'Automatiza el flujo de leads desde el formulario hasta mi CRM'. The base skills are installed, but `automation-flows` and CRM/connector skills are not. Show how rsc-suggest behaves."
72
72
  must_include:
73
73
  - "Treats the message as in-agent capability intent for automation/integration, not only as a coding task"
74
- - "Runs `npx @ericrisco/rsc list` before recommending"
75
- - "Runs `npx @ericrisco/rsc consult \"Automatiza el flujo de leads desde el formulario hasta mi CRM\"` or equivalent exact-intent consult"
76
- - "Names the first missing useful automation/connector skill from the consult results"
74
+ - "Runs `npx @ericrisco/rsc catalog --available` to see the not-installed skills"
75
+ - "Picks the best-fit missing automation/connector skill by MEANING (not by lexical `consult` ranking, which may return nothing)"
76
+ - "Names that one missing automation/connector skill"
77
77
  - "Asks one short confirmation before installing and does not auto-install"
78
78
  - "On confirmation, runs `npx @ericrisco/rsc add <id>` for that one missing skill, then resumes the automation task"
@@ -153,7 +153,8 @@ The task list is **not** a new document. Append it to the existing plan under a
153
153
  T001 … T0NN as the table below, + a one-line "generated by tasks on <date>"
154
154
  ```
155
155
 
156
- Then ensure the plan is indexed in the root `CLAUDE.md` `## Knowledge map` under
156
+ Then ensure the plan is indexed in `02-DOCS/wiki/index.md` (the Knowledge map;
157
+ root `CLAUDE.md` keeps only a short pointer) under
157
158
  the `sdd/` topic (the `plan` phase usually added the row; confirm it points at
158
159
  `02-DOCS/wiki/sdd/plans/<slug>.md`, add it if missing — additive only, never
159
160
  delete a user's map entry).
@@ -219,7 +220,7 @@ Before handing off, confirm:
219
220
  - [ ] Every task traces to a spec line; no orphan tasks.
220
221
  - [ ] Dependencies form a valid order (nothing precedes what it needs).
221
222
  - [ ] `[P]` markers only on file/state-disjoint tasks.
222
- - [ ] The list is appended under `## Tasks` in the plan artifact, indexed in the Knowledge map.
223
+ - [ ] The list is appended under `## Tasks` in the plan artifact, indexed in the Knowledge map at `02-DOCS/wiki/index.md` (root `CLAUDE.md` keeps only a short pointer).
223
224
  - [ ] A final closer task gates on all done-checks + `verify.sh`.
224
225
  - [ ] Review workload forecast and suggested delivery strategy appended.
225
226
 
@@ -113,7 +113,7 @@ A criterion you "reviewed by reading the code" is not verified. Reading is `revi
113
113
 
114
114
  ### 4 — RECORD
115
115
 
116
- Write a dated verification record to `02-DOCS/wiki/sdd/verifications/<slug>-YYYY-MM-DD.md` so the project's living knowledge carries the proof, then ensure it's indexed in the root `CLAUDE.md` `## Knowledge map` under the `sdd/` topic. Keep it short and factual:
116
+ Write a dated verification record to `02-DOCS/wiki/sdd/verifications/<slug>-YYYY-MM-DD.md` so the project's living knowledge carries the proof, then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer) under the `sdd/` topic. Keep it short and factual:
117
117
 
118
118
  ```markdown
119
119
  # Verification — <slug> — YYYY-MM-DD
@@ -107,6 +107,28 @@ ACTION: run \`npx @ericrisco/rsc audit\`. Opt out with .rsc/.no-audit.
107
107
  `);
108
108
  }
109
109
 
110
+ // CLAUDE.md hygiene: the root CLAUDE.md is read on EVERY turn, so an overgrown one (usually
111
+ // the Knowledge map accreting a row per wiki article) is a permanent context tax that rots
112
+ // adherence. When it passes the ~200-line 2026 budget, nudge to offload the index into
113
+ // 02-DOCS/wiki/index.md and keep CLAUDE.md a short pointer (the `harness` skill owns the move;
114
+ // it's a relocation, not a delete). Opt out with .rsc/.no-claudemd-check.
115
+ const CLAUDEMD_MAX_LINES = 200;
116
+ if (!has('.rsc', '.no-claudemd-check')) {
117
+ try {
118
+ const lines = readFileSync(join(root, 'CLAUDE.md'), 'utf8').split('\n').length;
119
+ if (lines > CLAUDEMD_MAX_LINES) {
120
+ process.stdout.write(`
121
+ ===== rsc CLAUDE.md hygiene =====
122
+ CLAUDE.md is ${lines} lines — over the ~${CLAUDEMD_MAX_LINES}-line budget (it's read every turn, so each line costs context).
123
+ ACTION: offload the Knowledge map / overgrown sections into 02-DOCS/wiki/index.md and leave a short
124
+ pointer in CLAUDE.md (no info lost — it's a move). The \`harness\` skill owns the procedure.
125
+ Opt out with .rsc/.no-claudemd-check.
126
+ =================================
127
+ `);
128
+ }
129
+ } catch { /* no CLAUDE.md → nothing to check */ }
130
+ }
131
+
110
132
  // Update check: compare the installed version (.rsc/.version, written at install)
111
133
  // against the latest published on npm, and nudge the agent to offer an update.
112
134
  // Fail-silent (offline / missing baseline / parse error → nothing). Disable with