From 8d310c6874e4b0c7aa5bcc6916f3a73ad5a60d9a Mon Sep 17 00:00:00 2001 From: Lukasz Boryn Date: Wed, 23 Sep 2026 10:08:20 +0200 Subject: [PATCH] docs(blueprint): add 028 convert cross-skill links to skill names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - docs(chart): revise ROADMAP.md phase 14 — repo stays categorized, 290 cross-skill links become unchecked /skill-name prose instead of an install-time transform or repo flatten - docs(decision): add 023 — cross-skill references are unchecked skill names, not paths (mattpocock/skills convention) - docs(blueprint): draft, sound, and lock 028 — the mechanical conversion, new skill-ref-check lint, link-skills.sh, README install path --- OKF/CONTEXT.md | 3 +- OKF/ROADMAP.md | 24 ++-- ...onvert-cross-skill-links-to-skill-names.md | 135 ++++++++++++++++++ ...ll-references-are-unchecked-skill-names.md | 68 +++++++++ OKF/decisions/index.md | 1 + OKF/index.md | 1 + 6 files changed, 222 insertions(+), 10 deletions(-) create mode 100644 OKF/blueprints/028-convert-cross-skill-links-to-skill-names.md create mode 100644 OKF/decisions/023-cross-skill-references-are-unchecked-skill-names.md diff --git a/OKF/CONTEXT.md b/OKF/CONTEXT.md index aeba1aa..8dbbd1f 100644 --- a/OKF/CONTEXT.md +++ b/OKF/CONTEXT.md @@ -15,7 +15,8 @@ Vocabulary for octobot itself. Skill-authoring terms (leading word, context load, progressive disclosure, sprawl, no-op) live in [conjure-a-skill/glossary.md](../skills/productivity/conjure-a-skill/glossary.md) — not duplicated here. Prose cites take a register prefix: `B-` -blueprint, `R-` why-register, `D-` ferry (R-022); links need none. +blueprint, `R-` why-register, `D-` ferry (R-022); links need none. A +cross-skill reference is a bare `` `/skill-name` ``, unchecked (R-023). ## Language diff --git a/OKF/ROADMAP.md b/OKF/ROADMAP.md index a7a1d47..2303ac8 100644 --- a/OKF/ROADMAP.md +++ b/OKF/ROADMAP.md @@ -54,15 +54,21 @@ single request traces to `user request ` instead, as B-008–B-017 did. analysis has one with nowhere to land. **Verify:** `OKF/findings/` holds one finding `okf-check OKF/` validates 0/0; `blueprint` states the rule. -14. **the skills tree installs into any harness** — cross-skill links assume - `skills///`, so a flat install (Copilot's - `.github/skills//`, any non-Claude harness) breaks all 288; 7 more - escape into `OKF/`. Flatten to `skills//`: category becomes - frontmatter, links become `..//SKILL.md` — resolving in the repo, - under symlinks, in a whole-tree copy, and flat; the 7 escapes become - prose. Runs after 12, both being mass renames over the same links. - **Verify:** `link-check .` 0 errors; `skill-check` reads - `skills/*/SKILL.md`; `grep -rn '](\.\./\.\./' skills/` returns nothing. +14. **the skills tree installs into any harness** — 290 cross-skill links + break under a flat install (Copilot, `npx skills add `). + Repo keeps its category directories; the links become unchecked + `` `/skill-name` `` prose instead + ([023](decisions/023-cross-skill-references-are-unchecked-skill-names.md)). + A new lint replaces `link-check`'s lost coverage on them. + `scripts/link-skills.sh` (mirrors mattpocock/skills) replaces + `README.md`'s copy-paste symlink loop; `README.md` gains `npx + skills@latest add ` as the non-Claude-harness path. The 7 + links into `OKF/decisions/` (5) and `CLAUDE.md` (2) are untouched — + real paths, still `link-check`-validated. **Verify:** cross-skill + grep empty; `link-check .` 0 errors; new lint 0 errors; + `link-skills.sh` resolves under both skill dirs; `npx skills@latest + add ` installs + cleanly in a scratch dir. ## Risks & gotchas diff --git a/OKF/blueprints/028-convert-cross-skill-links-to-skill-names.md b/OKF/blueprints/028-convert-cross-skill-links-to-skill-names.md new file mode 100644 index 0000000..e17abcf --- /dev/null +++ b/OKF/blueprints/028-convert-cross-skill-links-to-skill-names.md @@ -0,0 +1,135 @@ +--- +type: Blueprint +status: locked +traces-to: ROADMAP.md phase 14 +sounded: 2026-09-23 +cites: + - OKF/ROADMAP.md + - OKF/decisions/023-cross-skill-references-are-unchecked-skill-names.md + - skills/loop/write-OKF/scripts/link-check + - skills/productivity/conjure-a-skill/scripts/skill-check + - README.md +muster: true +review-base: myplnols +--- + +# 028 — convert cross-skill links to unchecked skill names + +## Justification + +[ROADMAP.md phase 14](../ROADMAP.md) — the skills tree must resolve under +any install (symlink, flat copy, whole-tree). [023](../decisions/023-cross-skill-references-are-unchecked-skill-names.md) +already locked the mechanism: a cross-skill reference becomes a +backtick-wrapped `` `/skill-name` ``, never a path — mattpocock/skills' +own convention, verified upstream. This blueprint is the mechanical +conversion 023 left undone. + +## Contract + +Every markdown link in `skills/` whose target is a *different skill* +(`](..//...)`, same category, or `](../..///...)`, +cross category) is rewritten to plain prose: `` `/skill-name` `` — +backtick-wrapped, leading slash, kebab-case, the skill folder's own +name, no brackets, no path. 290 such links across 59 files. The +surrounding sentence is edited only as much as the changed reference +requires — no unrelated rewording. + +**Untouched, explicitly:** +- The 7 links from a skill file to something repo-root-only — 5 into + `OKF/decisions/`, 2 into `../../../CLAUDE.md` — stay real relative + paths, `link-check` keeps validating them. +- A skill's link to its own sibling file (never names another skill) — + stays a real relative path. +- `skills/engineering/add-copilot-project-skill/skill-templates.md:104` + — a `](../AGENTS.md)` example inside a fenced block, template output + for a *consumer* project's own `AGENTS.md`, not an octobot link. + `link-check` already skips fenced blocks for this reason; the + conversion does too. + +**New lint**, `skill-ref-check` (new script, +`skills/productivity/conjure-a-skill/scripts/skill-ref-check`, sibling to +`skill-check`, same single-purpose-validator convention): scans `skills/` +for `` `/skill-name` `` mentions, errors on any that don't match an +existing `skills/*//` folder. Same CLI contract as `skill-check` +(`skill-ref-check `, exit 1 on any error). + +**New script**, `scripts/link-skills.sh` (repo root — first file in a +`scripts/` directory at that level): symlinks every `skills/*/*/` +directory into both `~/.claude/skills/` and +`~/.agents/skills/`, mirroring mattpocock/skills' +`scripts/link-skills.sh` (existing symlink or non-symlink file at the +target path is removed and relinked; a destination that is itself a +symlink into this repo aborts with an error instead of self-linking). + +**README.md** `## Install` section: the manual `for s in skills/*/*/` +loop is replaced with a pointer to running `scripts/link-skills.sh`. A +new paragraph documents `npx skills@latest add ` as the +install path for non-Claude-Code harnesses — the command is documented, +not live-verified here, since `lukabor/octobot` is private and unpushed +(user's call, tracked separately, not this blueprint's scope). + +## Seams touched + +- `skills/**/*.md` — every file carrying one of the 290 links (59 files). +- `skills/productivity/conjure-a-skill/scripts/skill-ref-check` (new) — + entry point `skill-ref-check `. +- `scripts/link-skills.sh` (new) — entry point `scripts/link-skills.sh`, + no arguments. +- `README.md` — `## Install` section. + +## Verify + +```sh +cd + +# 1. every cross-skill link is gone; the 7 escapes, sibling links, and +# the one fenced-block template example remain +grep -rEn '\]\(\.\./' skills/ | grep -vE '\.\./\.\./\.\./' \ + | grep -v 'skill-templates.md:104' \ + && echo "FAIL leftover cross-skill links" || echo "OK links converted" + +# 2. link-check still passes — OKF escapes + sibling links still resolve +skills/loop/write-OKF/scripts/link-check . && echo "OK link-check" || echo "FAIL link-check" + +# 3. new lint passes clean, and catches a planted typo +skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/ \ + && echo "OK skill-ref-check clean" || echo "FAIL skill-ref-check clean" +B=skills/loop/chart/SKILL.md +printf '\nSee `/skill-that-does-not-exist`.\n' >> $B +skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/ | grep -q 'skill-that-does-not-exist' \ + && echo "OK typo caught" || echo "FAIL typo caught" +jj restore $B # git: git checkout -- $B + +# 4. link-skills.sh symlinks resolve into this repo +scripts/link-skills.sh +for d in ~/.claude/skills ~/.agents/skills; do + for s in skills/*/*/; do + n=$(basename "${s%/}") + [ "$(readlink -f "$d/$n")" = "$(readlink -f "$s")" ] \ + && echo "OK $d/$n" || echo "FAIL $d/$n" + done +done + +# 5. tree still green +skills/loop/write-OKF/scripts/render-check . +skills/loop/write-OKF/scripts/okf-check OKF/ +skills/productivity/conjure-a-skill/scripts/skill-check skills/ +``` + +Every check prints `OK`, no `FAIL` appears; all three tallies read +`0 error(s), 0 warning(s)` (skill-check's pre-existing 9 warnings are a +different, unrelated baseline — unchanged by this blueprint). `npx +skills@latest add ` is documented in README.md but not run +here — it needs the repo public, a separate decision. + +## Out of scope + +- Flattening `skills///` itself — 023 rejected this. +- An install-time link-rewrite script — 023 rejected this. +- Making `lukabor/octobot` public, or pushing `main` — separate, + user-gated decisions (see `HANDOFF.md`). +- The 7 links from skill files into `OKF/decisions/` (5) and + `../../../CLAUDE.md` (2) — untouched, real paths. +- `~/.agents/skills` actually being scanned by any installed harness — + `link-skills.sh` populates it to mirror mattpocock's convention; + whether an agent reads from there is that harness's concern. diff --git a/OKF/decisions/023-cross-skill-references-are-unchecked-skill-names.md b/OKF/decisions/023-cross-skill-references-are-unchecked-skill-names.md new file mode 100644 index 0000000..27ecf34 --- /dev/null +++ b/OKF/decisions/023-cross-skill-references-are-unchecked-skill-names.md @@ -0,0 +1,68 @@ +--- +type: Decision +purpose: Stop cross-skill links from breaking whenever the skills tree + installs somewhere its category depth does not survive. +answers: + - "How does one skill's prose reference another skill?" +cites: + - OKF/ROADMAP.md + - skills/loop/write-OKF/scripts/link-check +status: live +reversible: yes — costly (290 links, 59 files), but nothing else depends + on the prose form +--- + +# 023 — a cross-skill reference is an unchecked `/skill-name`, not a path + +`skills///SKILL.md` files reference each other with +`..//` (same category) or `../..///` (cross +category) links — 290 of them across 59 files. Every harness that +installs a skill outside this repo drops the category level: Copilot's +`.github/skills//`, and `npx skills add ` (skills.sh), +both copy or symlink one skill directory to a flat `/`. A relative +link written for a source at some depth breaks the moment its target +sits at a different one, on either end of the link — one level deep +breaks exactly as fast as two. + +**Decision: a cross-skill reference in prose is a backtick-wrapped, +leading-slash, kebab-case skill name — `` `/skill-name` `` — never a +markdown link, never a path.** This is mattpocock/skills' own +convention (verified against `skills/engineering/ask-matt/SKILL.md` +upstream, which routes to a dozen sibling skills by name only, zero +path links between skill directories) and it survives every install +shape by construction: a name has no depth to break. + +Two link kinds are explicitly **not** touched by this decision: +- **Same-skill sibling files** (a bare filename link to a skill's own + supporting doc) never cross a category boundary and stay real + relative links. +- **A skill citing something else repo-root-only** — `OKF/decisions/` + (5) or `../../../CLAUDE.md` (2), 7 such escapes today — stays a real, + `link-check`-validated path. No installer copies either out of this + repo, so those citations only ever need to resolve here. + +## Considered options + +**Flatten the repo itself to `skills//`**, matching the installed +shape 1:1, was rejected — the user wants the repo organized by category +for browsing; category becomes frontmatter loses that. + +**An install-time transform script**, rewriting `../../category/x` to +`../x` per install target, was rejected as machinery to build and +maintain per harness, solving a problem the name-based convention +sidesteps for free. + +## Consequences + +- `link-check` stops validating these 290 references as resolvable + paths — it never could validate a bare name as a path anyway. A + typo'd `` `/skill-nmae` `` now fails silently unless a separate + checker exists. +- A new lint is required: scan `skills/` for `` `/skill-name` `` + mentions, confirm a matching skill folder exists. This is the + replacement coverage, not `link-check` extended — it checks name + existence, not path resolution. +- `scripts/link-skills.sh` (new, mirrors mattpocock's own dev script) + and `README.md`'s pointer to `npx skills@latest add ` are + the two install paths this decision makes safe; neither existed + before. diff --git a/OKF/decisions/index.md b/OKF/decisions/index.md index 0a1372a..fba8cf4 100644 --- a/OKF/decisions/index.md +++ b/OKF/decisions/index.md @@ -34,3 +34,4 @@ Format: `NNN — — — `. - [020](020-every-page-has-a-growth-path.md) — What happens to a page at cap+1? — one named move per page kind, enforced as an error — live - [021](021-session-checks-discharge-on-the-blueprint.md) — Where is a discharged-session check recorded? — stamped on its own blueprint's Verify check — live - [022](022-prose-cites-carry-a-register-prefix.md) — How is a register entry cited in prose? — `B-NNN` blueprint, `R-NNN` why-register, `D-n` ferry — live +- [023](023-cross-skill-references-are-unchecked-skill-names.md) — How does one skill's prose reference another skill? — a backtick-wrapped `/skill-name`, never a path — live diff --git a/OKF/index.md b/OKF/index.md index 2ddc78b..06e95f1 100644 --- a/OKF/index.md +++ b/OKF/index.md @@ -50,6 +50,7 @@ your task needs. Humans welcome too. - [025](blueprints/025-rule-muster-on-every-blueprint.md) — rule muster on every blueprint — implemented - [026](blueprints/026-walk-only-what-git-does-not-ignore.md) — walk only what git does not ignore — implemented - [027](blueprints/027-error-on-implemented-with-matches-no.md) — error when a mustered blueprint reaches implemented on matches: no — implemented +- [028](blueprints/028-convert-cross-skill-links-to-skill-names.md) — convert cross-skill links to unchecked skill names — locked ## Ferries