feat(kyberforge): make Research doc name one Research registry #139
Reference in New Issue
Block a user
Delete Branch "feat/121-research-doc-grammar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #121
Why
validate-provenance.shassumedResearch doc:names a researchsources.mdwhose## H2headings are the source slugs. The corpus did something else: 29 entries pointed at topic docs and 6 values were not a single path. Checks 7 and 8 therefore reported 36 INFOs and nothing ever failed, and nothing ran the validator over the real corpus, so a stricter tier would have been inert.Decisions and rejected alternatives are in
docs/adr/0028-research-doc-names-the-research-registry.md.What changed
Research doc:names exactly one Research registry (new term inCONTEXT.md). An entry with no registry writesnoneplus one- **Basis:** <path>bullet per path. Each Basis path is existence-checked unless annotated(removed in <sha>). Brace expansion, comma lists and semicolon pairs are rejected.extractedregistry slug to appear in each skill'ssources.md. One registry serves many skills (git/sources.mdbacks seven), so that is unsatisfiable. It only looked satisfiable while topic-doc pointers kept it dormant.gitea-releases,agentsmd-auditandprovider-adapter-authormoved to the new grammar. Old topic-doc links are kept as(digest: ...)annotations.scripts/check-provenance-corpus.shis a new pre-push hook that runs the validator over every skill with areferences/sources.md. Documented indocs/spec/gates.md.For the reviewer
house-vale-3-15-2-reproentry is deleted fromvale-configandvale-run, along with itssource_keyscitations. It claimed six behaviours were reproduced "against purpose-built fixtures in this repo". The entry was added ind1afdbewith no test or fixture files, and none exists in history (the only vale test ever deleted, in4de5b6b, guards an unrelatedE100). The behavioural rules stay; only the unbacked provenance claim goes. Content note:configuration-reference.mdstill says its rows were "reproduced against Vale 3.15.2", which now has no provenance entry behind it. I left that wording alone and it needs a decision, either softening it or committing real reproduction fixtures.(removed in <sha>)annotation is unverified. It can be written on any bullet to skip the existence check. Accepted for the three bullets that use it; the sha is not resolved withgit cat-file.tests/test-adr0020-contract.shpins the list of repo-authored hooks and needed one entry for the new hook, andskill-author/references/contract.mdtold authors to put the org-convention note inResearch doc:, which now contradicts the grammar.lib-provenance-skill.sh, about 360 lines) was written by a subagent and checked by its tests and the corpus sweep, not read line by line by the author. It deserves a careful read..claude/skills/is gitignoredapm installoutput and will show the old copies untilapm installregenerates it.Verification
factory-auditbats: 272/272 pass.tests/run-tests.sh --strict: 20 suites, 0 failed, 0 skipped.scripts/check-provenance-corpus.sh: 27 skills checked, passes with no allowlist.apm audit --ci,apm pack --check-clean, the new corpus gate and the version-bump gate.vale-wrap.sh: 0 errors, 0 warnings, 0 suggestions across the 16 changedSKILL.mdfiles. That is the only surface the repo's Vale hook covers (SKILL.mdand agent files). The ADR,references/andsources.mdfiles are outside any configured Vale scope, so they are unlinted, not clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01EGHFJextYtVQseaHPDDhxB
Review pass: findings and fixes
Four parallel read-only reviewers covered the validator, the tests, the corpus gate and docs, and the migrated corpus. None found a blocker. Two majors were in the validator; both are fixed, along with the minors and test gaps. Pushed as four commits (
2bde9a6..45d8f19). The pre-push hooks all passed.Fixed
Validator (
2c4b6d2)Research doc: a/sources.md (x), b/topic.mdexited 0 with the second path never checked. Comma, space-separated and backticked lists now FAIL...-escaping paths were not confined to the repo (Basis: /etc/passwdpassed). Both fields now FAIL on any path whose realpath leaves the repo.(removed in <sha>)is anchored at the end of the value with a 7-40 hex sha. The sha is format-checked only, not resolved withgit cat-file.*bullets,- **X**bullets and backticked Basis paths are read correctly. The semicolon rule no longer fires on annotation prose.none/foo.mdis no longer read asnone. The stale field messages now describe the new grammar.Corpus gate (
c008da1)sources.mdis skipped, several failures are all reported, and an errored skill alongside a failing one.Docs (
58a3f40)CONTEXT.md_Avoid_entry, thegates.mdhook counts, thecreate.mdnoneexample, and the(digest: <full path>)form ingitea-releases.Vale (
45d8f19)house-vale-3-15-2-reproclaim is now backed by a committed test,tests/test-vale-3-15-2-behaviours.sh. It runs the real Vale 3.15.2 (41 assertions) and is restored asResearch doc: noneplusBasis:.vale-configbehaviours all reproduced.Decisions made
(removed in <sha>): anchor only, no history lookup.Known limits
mdx2vast) and thevale syncrow that adds toPackages(needs the network). The wording inconfiguration-reference.mdandtroubleshooting.mdsays so.--strictturns that skip into a failure at pre-push.house-vale-3-15-2-reprodescription changed sinceaf008b6. The gate cannot judge whether the claim still holds, so someone should re-read it by hand.factory-auditis a patch bump despite a new FAIL tier and aBasis:field. That is defensible under ADR-0022.Not changed
references/sources.md. That matches the documented "covered once it grows one" behaviour.docs/x.md — reason(bare dash, no parentheses) now FAILs on whitespace, and- **docs/x.md**keeps its**. No corpus entry hits either.🤖 Generated with Claude Code
https://claude.ai/code/session_01EGHFJextYtVQseaHPDDhxB