feat(kyberforge): make Research doc name one Research registry
validate-provenance.sh assumed `Research doc:` names a research sources.md whose H2 headings are the source slugs, but 29 corpus entries named topic docs and 6 values were not a single path, so checks 7 and 8 reported INFO for 36 entries and nothing ever failed. `Research doc:` now takes exactly one path. An entry with no registry writes `none` plus one `- **Basis:** <path>` bullet per path; each Basis path is existence-checked unless annotated `(removed in <sha>)`. - Check 7 FAILs when a resolved registry lacks the slug, when the value is a topic doc, or when it is a list. An unresolvable path stays INFO. - Check 8 is retired: one registry serves many skills, so requiring every registry slug in each skill's sources.md is unsatisfiable. - The Research doc and Basis parsers accept the inline, bullet and header-plus-bullets spellings, so a differently spelled field is no longer read as absent. Refs: #121 ADR: 0028 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EGHFJextYtVQseaHPDDhxB
This commit is contained in:
@@ -252,6 +252,6 @@ inline that content directly into the skill (SKILL.md or a `references/` file) r
|
||||
to the file's path. Plugins must be self-contained and portable — the org file may not exist
|
||||
wherever the plugin is installed, and in this repo such files are meant to be deleted once their
|
||||
content is fully embedded downstream. Tag the inlined content with a `source_keys` entry using the
|
||||
same `references/sources.md` schema as the create flow's Step 6, noting in the `Research doc:`
|
||||
field that the source is an org convention rather than a plugin research corpus entry, so
|
||||
provenance survives after the source file is gone.
|
||||
same `references/sources.md` schema as the create flow's Step 6: write `Research doc: none` and
|
||||
name the org convention file in a `Basis:` line, so provenance survives after the source file is
|
||||
gone (annotate the Basis `(removed in <sha>)` once the file is deleted).
|
||||
|
||||
@@ -171,11 +171,20 @@ If a research `sources.md` is present in the conversation context:
|
||||
2. For each entry, determine which skill files it contributed to (SKILL.md and any files in
|
||||
`references/` that drew from it). Update `Contributing files` accordingly — list skill files,
|
||||
not research topic files.
|
||||
3. Write the updated content to `references/sources.md`. For each entry, include
|
||||
`- **Research doc:** <path>` where `<path>` is the relative path from the repo root to the
|
||||
plugin-level research sources file this entry was drawn from (e.g.
|
||||
`plugins/myplugin/docs/research/docs/<topic>/sources.md`). This field is required on every
|
||||
entry — it makes the provenance chain explicit and is validated by `/factory-audit`.
|
||||
3. Write the updated content to `references/sources.md`. Every entry carries exactly one
|
||||
`- **Research doc:** <path>` line. `<path>` is the relative path from the repo root to the
|
||||
**Research registry** — the plugin-level research `sources.md` whose `## H2` headings are the
|
||||
source slugs (e.g. `plugins/myplugin/docs/research/docs/<topic>/sources.md`) — never a topic
|
||||
document, and never a list: no brace expansion, no comma- or semicolon-separated paths, no
|
||||
second `Research doc:` line. A pointer to the topic document that digested the source goes in
|
||||
an annotation after the path, e.g. `<registry path> (digested in remotes.md)`, where it is not
|
||||
checked. `/factory-audit` fails a slug missing from the registry it names.
|
||||
|
||||
If the entry has no Research registry — an org convention, an ADR, a house-verified
|
||||
reproduction — write `- **Research doc:** none` and name what it was drawn from with one
|
||||
`- **Basis:** <repo path>` line per path. Each Basis path is checked to exist; annotate one
|
||||
that has since been deleted `(removed in <sha>)` and the check is skipped. `none` with no Basis
|
||||
is a FAIL.
|
||||
4. Add `source_keys` to the frontmatter of `SKILL.md` (under `metadata`) listing the slugs of
|
||||
sources that informed it.
|
||||
5. For each file in `references/` that was informed by research sources, add `source_keys`
|
||||
|
||||
Reference in New Issue
Block a user