stack: SKILL.md-Links auf repo-root-relative Pfade umgestellt, docs verify/instructions verify pruefen Linkziele
CI / verify (push) Successful in 52s
Release / release (push) Successful in 36s

Files changed:
- CHANGES.md
- VERSION
- instructions/CONTRACT.md
- instructions/dev/doc-pull-through.md
- instructions/dev/stack-close/SKILL.md
- instructions/dev/stack-dev/SKILL.md
- instructions/wiki-ingest/SKILL.md
- instructions/wiki-lint/SKILL.md
- instructions/wiki-manage/SKILL.md
- instructions/wiki-query/SKILL.md
- instructions/wiki-status/SKILL.md
- tools/CONTRACT.md
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/instructions_cmd.py
- tools/chemenu/tests/test_docs_verify.py
- tools/chemenu/tests/test_instructions_cmd.py
This commit is contained in:
2026-09-12 23:21:45 +02:00
parent dc688e5726
commit 0fb8fd6122
16 changed files with 442 additions and 78 deletions
+35 -3
View File
@@ -18,6 +18,7 @@ alongside [AGENTS.md](../AGENTS.md).
- [Publishing](#publishing)
- [Writing an instruction](#writing-an-instruction)
- [A skill's H1 is a name, not an imperative](#a-skills-h1-is-a-name-not-an-imperative)
- [A skill's outbound reference is a plain path, not a link](#a-skills-outbound-reference-is-a-plain-path-not-a-link)
- [Reference depth: bundled files, not repo-wide contracts](#reference-depth-bundled-files-not-repo-wide-contracts)
- [When a skill carries a copy-in checklist](#when-a-skill-carries-a-copy-in-checklist)
- [How much reasoning a step may carry](#how-much-reasoning-a-step-may-carry)
@@ -190,6 +191,35 @@ exception in the same breath - "for promoted skills, the skill name is the title
That is the whole exception. Everything else in this section binds a `SKILL.md` exactly as it
binds an instruction.
### A skill's outbound reference is a plain path, not a link
`tools/wikitool instructions sync` copies each `SKILL.md` byte for byte into
`.agents/skills/<name>/` and `.claude/skills/<name>/` (§ Publishing, above) - a different depth
than the source, and without the sibling files a relative link might expect. A markdown link
correct at `instructions/<name>/SKILL.md` (`../session-setup.md`, `../../kb/CONTRACT.md`)
resolves to a different, usually nonexistent, file once copied: the number of `../` segments
that reaches a target from `instructions/` does not reach the same target from
`.claude/skills/`. Fifty-two of the fifty-eight relative links across this repo's seven skills
broke exactly this way before this rule existed, silently - nothing rendered the copy to notice,
and no check read a link target.
So a `SKILL.md` never writes an outbound reference as a relative markdown link, correct depth or
not. It names the target as a repo-root-relative **plain path** instead - `` `instructions/session-setup.md` ``, not `[session-setup.md](../session-setup.md)`; `` `kb/CONTRACT.md` `` for a
whole file, `` `kb/CONVENTIONS.md` § Tone `` for a section rather than an anchored link. The path
survives the copy unchanged because it does not depend on where the reading file sits: an
agent's working directory is the instance root regardless of which published copy it opened, so
the same plain path resolves in the source and in both published copies alike. The cost is that
the reference is no longer clickable from the source file - accepted deliberately, because the
source is not where an agent reads it from; the harness reads the published copy.
`tools/wikitool instructions verify` enforces the ban mechanically
(`check_skill_reference_paths`).
This binds only `SKILL.md`. The flat `instructions/<name>.md` form - this file included - is
never copied anywhere, so its relative links stay exactly as correct as their `../` count says,
and stay ordinary links; `tools/wikitool docs verify` (`check_reference_targets`) resolves those
against the working tree instead of banning the syntax, over the same reference-file scope
`tools/wikitool docs toc` uses.
### Reference depth: bundled files, not repo-wide contracts
Anthropic's skill-authoring guidance asks that reference files stay **one level deep from
@@ -201,9 +231,11 @@ That rule governs **skill-bundled** material: files sitting in `instructions/<na
`OOXML.md`), and it says nothing about files outside the skill directory. No skill in this repo
has a bundled file today, so as written the rule currently binds nothing here.
A link from a skill to a repo-wide contract - [kb/CONTRACT.md](../kb/CONTRACT.md),
[tools/CONTRACT.md](../tools/CONTRACT.md), [gates.md](gates.md) - is a different category, and
the two halves of the question have different answers:
A skill's reference to a repo-wide contract - `kb/CONTRACT.md`, `tools/CONTRACT.md`,
`instructions/gates.md` (written as a plain path per § "A skill's outbound reference is a plain
path, not a link" above; this file is a flat instruction rather than a `SKILL.md`, so its own
references to the same three files, a few sections up and below, stay ordinary links) - is a
different category, and the two halves of the question have different answers:
- **The mechanic is real and directory-independent.** A contract reached at the second hop can
be read partially exactly as a bundled file would be. Nothing about the path makes it safe.