docs(blueprint): add 028 convert cross-skill links to skill names

- 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
This commit is contained in:
Łukasz Boryń 2026-09-23 10:08:20 +02:00
parent 68c8c18d0d
commit 8d310c6874
6 changed files with 222 additions and 10 deletions

View File

@ -15,7 +15,8 @@ Vocabulary for octobot itself. Skill-authoring terms (leading word,
context load, progressive disclosure, sprawl, no-op) live in context load, progressive disclosure, sprawl, no-op) live in
[conjure-a-skill/glossary.md](../skills/productivity/conjure-a-skill/glossary.md) [conjure-a-skill/glossary.md](../skills/productivity/conjure-a-skill/glossary.md)
— not duplicated here. Prose cites take a register prefix: `B-` — 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 ## Language

View File

@ -54,15 +54,21 @@ single request traces to `user request <date>` instead, as B-008–B-017 did.
analysis has one with nowhere to land. **Verify:** `OKF/findings/` holds analysis has one with nowhere to land. **Verify:** `OKF/findings/` holds
one finding `okf-check OKF/` validates 0/0; `blueprint` states the rule. one finding `okf-check OKF/` validates 0/0; `blueprint` states the rule.
14. **the skills tree installs into any harness** — cross-skill links assume 14. **the skills tree installs into any harness** — 290 cross-skill links
`skills/<category>/<name>/`, so a flat install (Copilot's break under a flat install (Copilot, `npx skills add <owner/repo>`).
`.github/skills/<name>/`, any non-Claude harness) breaks all 288; 7 more Repo keeps its category directories; the links become unchecked
escape into `OKF/`. Flatten to `skills/<name>/`: category becomes `` `/skill-name` `` prose instead
frontmatter, links become `../<name>/SKILL.md` — resolving in the repo, ([023](decisions/023-cross-skill-references-are-unchecked-skill-names.md)).
under symlinks, in a whole-tree copy, and flat; the 7 escapes become A new lint replaces `link-check`'s lost coverage on them.
prose. Runs after 12, both being mass renames over the same links. `scripts/link-skills.sh` (mirrors mattpocock/skills) replaces
**Verify:** `link-check .` 0 errors; `skill-check` reads `README.md`'s copy-paste symlink loop; `README.md` gains `npx
`skills/*/SKILL.md`; `grep -rn '](\.\./\.\./' skills/` returns nothing. skills@latest add <owner/repo>` 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 <owner/repo>` installs
cleanly in a scratch dir.
## Risks & gotchas ## Risks & gotchas

View File

@ -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*
(`](../<name>/...)`, same category, or `](../../<category>/<name>/...)`,
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/*/<name>/` folder. Same CLI contract as `skill-check`
(`skill-ref-check <skills-dir>`, 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/<name>` and
`~/.agents/skills/<name>`, 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 <owner/repo>` 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 <skills-dir>`.
- `scripts/link-skills.sh` (new) — entry point `scripts/link-skills.sh`,
no arguments.
- `README.md` — `## Install` section.
## Verify
```sh
cd <repo-root>
# 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 <owner/repo>` is documented in README.md but not run
here — it needs the repo public, a separate decision.
## Out of scope
- Flattening `skills/<category>/<name>/` 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.

View File

@ -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/<category>/<name>/SKILL.md` files reference each other with
`../<name>/` (same category) or `../../<category>/<name>/` (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/<name>/`, and `npx skills add <owner/repo>` (skills.sh),
both copy or symlink one skill directory to a flat `<name>/`. 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/<name>/`**, 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 <owner/repo>` are
the two install paths this decision makes safe; neither existed
before.

View File

@ -34,3 +34,4 @@ Format: `NNN — <question it settles> — <verdict> — <status>`.
- [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 - [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 - [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 - [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

View File

@ -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 - [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 - [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 - [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 ## Ferries