Repository navigation
feat(harness): derive the skill bindings from the corpus, and classify authored content as authored (L9, L9.1) - #502
Conversation
…y authored content as authored Part II #5 gains the clause the migration needed: a skill's `SKILL.md` and an agent definition's `<name>.md` are AUTHORED CONTENT, the same class as `AGENTS.md`, and live in the repo that owns them under its own `.agents/` trees. The umbrella populates its own `.agents/` because it authors skills, never because it vendors the corpus. Where a harness rooted here cannot reach the corpus natively, the binding that bridges it must be DERIVED, never maintained by hand. `scripts/sync-skill-bindings.mjs` is that derivation: it writes the `.dsh/skills` farm and `reasonix.toml`'s `[skills] paths` from `marketplace/*/{skills,agents}`, verifies the single-root `opencode.json` reference, and is idempotent by construction. `charly task sync` runs it as part of the pin advance; `check-harness-config` checks 8 and 13 assert the artifacts ARE that derivation rather than re-implementing it, keeping only the shape oracles the derivation cannot provide for itself. Measured on this tree: the derivation reproduces the hand-made farm exactly (353/353, 0 drift) and finds the one defect hand-maintenance had hidden -- `marketplace/pod/skills` listed before `marketplace/pod-verbs/skills`, which byte order reverses. Live probe: an umbrella-rooted session still lists 353/353 corpus skills, and a repo-rooted session lists its own 8/8 authored skills natively. Assisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: harness config + scripts + rulebook prose (no Go, no schema, no pin, no bed). Comments: none on the thread — nothing to disposition. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…enerator arms one guard (round 1 BLOCK) Round 1 found a real regression this change introduced: checks 8 and 13 lost their `existsSync(marketplace)` guard, so on a session worktree that did not populate its submodules — the layout Part II rule 2 REQUIRES — they inverted from PASS-skip to RED, while check 12 kept its skip. And `--only reasonix` crashed with an uncaught ENOENT where `--only farm` reported cleanly, because only the farm arm had a corpus guard. Fixed: one `corpusRoot()` guard used by BOTH derivations, so the two arms cannot diverge again; the visible skip restored in both checks in check 12's own voice; and the shape arm made corpus-free so it still runs on such a tree. Two controls added, one per suite: the generator's self-test now requires both `--only` arms to FAIL cleanly rather than crash on a corpus-absent tree, and the gate's self-test gained its first GREEN arm — a staged tree with `marketplace/` removed must leave the gate green WITH both skip notices. Its count now names both kinds of arm: 31 mutations that must go RED, plus 1 corpus-absent tree that must stay GREEN. Assisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)
|
STATUS — round 1 BLOCK read in full, both halves of the finding were correct and are reproduced, fixed in The finding, reproduced before it was fixedThe verdict named two defects in one mechanism, and I reproduced both on a scratch tree that has this $ node scripts/sync-skill-bindings.mjs --check --only reasonix --root <corpus-absent tree>
node:fs:1956
const result = binding.readdir(
Error: ENOENT: no such file or directory, scandir '<tree>/marketplace'
rc=1
$ node scripts/sync-skill-bindings.mjs --check --only farm --root <the same tree>
FAIL: marketplace/ is not checked out in <tree> — the corpus is the input
rc=1
$ node scripts/check-harness-config.mjs # on that same tree
FAIL reasonix.toml [skills] paths match their derivation (...)
PASS marketplace/DISPATCHER.md not checked out — dispatcher-coverage check skipped
FAIL the .dsh/skills farm matches its derivation (...)So: the two RCA
Re-measured after the fix, on the same corpus-absent tree: Agent: |
Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff matches the body's accounting), no secrets/egress, no new deps/pins, no weakened guardrail. The Checklist: All applicable rules PASS or NA. Class is harness config + scripts + rulebook prose (no Go/schema/pin/bed) — A1/A2/A3, R0–R10, HC, ARCH (scripts/prose, no layer placement), DISP, QUAL, COORD all satisfied. The round-1 regression is verifiably fixed in the CURRENT diff: Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Closes the harness half of L9 and its companion L9.1 in one change. Two things land together, because
each is the other's reason:
1. The rule gains the clause the migration needs (L9.1). Part II #5 becomes "Harness config lives
only in the umbrella — and authored content is not harness config": a skill's
SKILL.mdand an agentdefinition's
<name>.mdare authored content, the same class asAGENTS.md, they live in the repothat owns them under its own
.agents/trees, and the umbrella populates its own.agents/because itauthors skills, never because it vendors the corpus.
2. The bindings become DERIVED (L9).
scripts/sync-skill-bindings.mjswalksmarketplace/*/{skills,agents}and writes the two artifacts that enumerate the corpus, then verifies theone that merely references it:
.dsh/skills/<name>(353 flat symlinks)reasonix.toml→[skills] paths(43 entries)marketplace/<family>/{skills,agents}dir, in byte orderopencode.json→skills.paths(1 entry)That distinction is the whole design. The row called these "three mirrors of one artifact"; measured,
only the farm is a mirror. An enumeration drifts the moment the corpus grows, and the two enumerations
are exactly the ones a person was maintaining by hand; a single root entry cannot drift per family at all,
so it is verified rather than rewritten.
charly task syncnow runs the generator immediately after the pin bump — the pin-advance path, so afamily added upstream is bound in the same pass that advances the gitlink. And
check-harness-config'schecks 8 and 13 stop re-implementing the derivation (each carried its own
readdirSynccoveragearithmetic, including a
.well-knownspecial case) and instead assert the artifacts ARE thatderivation — which is the same thing as asking "was the generator run?". Each check keeps the shape
oracles a derivation cannot provide for itself: check 8 keeps "not the bare root, every entry
well-formed", check 13 keeps "every farm entry is a symlink". A generator that emitted a bare-root entry,
or a farm of real directories, would pass its own
--checkand still be wrong.The sentence this change is about, and it is tonight's general form applied to harness bindings rather
than corpus artifacts: a HAND-MAINTAINED binding drifts silently because nothing derives it, and a
DERIVED one cannot. Wherever an artifact is regenerated by a chain that cannot see its source — here,
wherever a binding is maintained by hand rather than derived — the drift is silent. The rule was never
against bindings; it was against hand-maintained copies that drift, which is what no mirrors, no parity
gate is aimed at.
Round 2: a regression this change introduced, found by the validator
Round 1 BLOCKED on one finding with two halves, and both were correct and were reproduced before they
were fixed. Replacing each check's coverage arithmetic with a generator call also removed the
existsSync(marketplace)guard that surrounded it — a precondition on the input, not part of thearithmetic — so on a session worktree that did not populate its submodules (the layout Part II rule 2
requires) checks 8 and 13 inverted from PASS-skip to RED while check 12 kept its skip; and inside the
generator,
corpusSkills()had a corpus guard whiledesiredReasonixPaths()did not, so--only reasonixdied with an uncaught
ENOENTwhere--only farmfailed cleanly.RCA, in one line: my pre-push set ran every gate on a tree where the corpus IS materialised, and every
fixture my new self-tests staged had a corpus — so nothing exercised the corpus-absent path, even though
the change's own generator self-test prints
SKIPPED — marketplace/ is not materialisedfor exactly thatcase. Two implementations of one precondition is the same defect as two implementations of one
derivation: I removed the latter duplication and created the former in the same edit.
The fix is one
corpusRoot()guard used by both derivations, the visible skip restored in both checks incheck 12's own voice, and the shape arm made corpus-free so it still runs. The control is one arm per
suite: the generator's self-test now requires both
--onlyarms to fail cleanly rather than crash, andthe gate's self-test gained its first GREEN arm — a staged tree with
marketplace/removed must staygreen with both skip notices. Its count now names both kinds of arm rather than only the mutations:
32 arms — 31 that must go RED and 1 that must stay GREEN.
The payload, measured — including three numbers the row got wrong
.dsh/skills: 353 entries, all symlinks, all tracked, 0 dangling — the row's number is right.reasonix.toml: 43 entries, not the 42 the row records. The row's own comment says the list "grew";it has grown again. The generator carries no count — it reports the one it found.
opencode.json: one entry,"skills": {"paths": ["marketplace"]}— the whole corpus by reference..pi/item is already done, and the row is stale on it — measured below.The derivation, and the one defect hand-maintenance had hidden
The derivation reproduces the hand-made farm EXACTLY — 353 of 353, with 0 entries only on disk, 0 only
derivable and 0 with a different target — and on the reasonix list it found exactly one defect:
marketplace/pod/skillswas listed beforemarketplace/pod-verbs/skills, which byte order reverses.Nothing could see it, because nothing derived the order. That single pair is the entire diff this change
makes to
reasonix.toml.The same fence carries the other half of that drift report: the row's scope says "repoint
.pi/extensions/charly-gates.ts:274-277", and that is already done — the extension reads the corpusat
288-291with a bare-ref fallback, and its own comment records the re-point. Nothing to repoint;#402's remaining drift is a different surface and stays that lane's.The double probe — the row's own unproven clause, settled by measurement
The row carried one clause it could not prove: "populate
<umbrella>/.agents/skillsor proveumbrella-rooted resolution live". Both halves are now measured, because a rule change justified by an
unmeasured resolution claim is the defect class this programme has spent the night removing.
A is the positive control (the farm is what binds today), B is the failure the ruling flagged as
unproven (nothing bound → zero skills), C shows the fallback named in the ruling works but is a
rename — the same 353 flat entries under the rank-200 root — and D is the state this change ships:
still 353 of 353, so the derivation changed nothing a session can see. The other half of the double probe
is a session rooted in a repo that authors skills:
pod-charly-automationhas no binding at all and itsown
.agents/skills/<name>/SKILL.mdresolves 8 of 8 natively, which is the D-harness model proven liverather than asserted.
Mechanism, for the record:
@deepseek-ai/dsh-skill-filesystemscans<projectRoot>/.dsh/skillsat rank100 and
<projectRoot>/.agents/skillsat rank 200 (lib/index.js:21-22), both at depth 1, and thismachine has no user-level
~/.dsh/skillsor~/.agents/skillsto fall back on.What this change deliberately does NOT do
why: at the umbrella root the corpus is reachable only through a binding, in all three harnesses, and
the only way to make deletion coherent would be to change Part II ci: adopt org-wide validation chain — pr-validator + tag-on-merge, drop custom auto-merge #2 so sessions root in the owning
repo — contradicting the premise every wave leg is built on. Option 1 was ruled and is what shipped.
#492's PR (feat/umbrella-pin-sync, another author's). Checked: it carries 7gitlinks plus
scripts/sync-pr-body.sh, so there is no file overlap with this change — and the pinadvance it performs is exactly the path that now runs the generator.
#402. That is the.pi/signpost drift, assigned and not mine; the one item inthis row's scope that touched
.pi/is measured above as already done..agents/skills/agents/SKILL.mdskill (a submodule copy oflayer-charly-internals). Its own text already carves authored content out of harness config — "Arulebook (
AGENTS.md) is NOT harness config and stays in its own repo" — so it is consistent with theamended rule and needs nothing. Spelling the skills half out there would be a
layer-charly-internalsrow, not this one.
How tested
Every command ran on the tree this body names — Head
f22c845e4be06bdb8b74b9fc375f7481c72fb926, tree6c8787b6728415b39cb543f0529174be0a38f42e,which is the second commit on the branch — and the script gates were re-run after the last edit, so the
fences below describe the committed bytes.
The head and its tree — the instrument whose output would differ for another tree:
git status --shortis empty, so the committed tree is the tree every other command here ranagainst.
The generator, on the committed tree — the fixed point, plus the write's only effect:
A second write is a byte-for-byte no-op (
cmpclean), and--checkis green immediately after it. Thatis the idempotence the instruction asked for: the generator is idempotent or it is wrong, and the
evidence is the second run, not the first.
Both self-tests, because a gate that cannot fail proves nothing. The generator's own self-test builds
temp fixtures and mutates each arm; the harness-config gate's self-test mutates a staged copy of this
tree and requires each mutation to turn its own check red:
The gates this change class owns, each on the committed tree:
The claim-keyed sweep, with its pre-change control in both directions. The claim this change ends is
the old reading of rule 5 and the farm's framing as a hand-made binding; the positive arm asserts the new
clause is actually present:
Rulebook compliance
AGENTS.md(the file this change amends),/charly-internals:{agents,skills,git-workflow,marketplace,strict-policy,cutover-policy}and/charly-check:check.agentsis the owning skill for the harness-config surface (Part II chore: sync dotgithub pin to main #5's own*Detail:*line) andcheckfor the gate verbs this change rewrites.## How testedpassed with0failures. Round1's BLOCK is fixed, not rebutted — it named a real regression this change introduced (the lost
corpus-absent skip and the divergent
--onlyarms), the RCA names the missed control (every gate andevery fixture ran with the corpus present), and the root fix went into both the code and the control, per
"Before every update push". Four defects in total were found by the new controls themselves or by the
validator and fixed in this tree rather than filed, because each was introduced by this change: (a) the generator's first version treated
marketplace/.well-knownas a family (44 derived entries where 43 exist — a
readdirsees dotfiles and aglobdoes not), caughtby the gate's own malformed-entry oracle; (b) the gate's self-test staged the farm with
cpSync, whichdereferences symlinks, so the staged farm was 353 real directories — caught by the new shape oracle,
which is exactly the assertion that could not have been faithful before it; (c) the round-1
AGENTS.mdprose in the sibling leg is filed, not fixed here, as
layer-charly-internals-extra#24.derivation (
readdirSynccoverage arithmetic, with.well-knownspecial-cased by hand); both nowinvoke the one derivation. The generator in turn reuses nothing it should not: it reads the corpus
directly and writes text, with no second parser.
script, wired into
charly task sync, and asserted by the existing gate. The--checkmode is how thegate asks its question, not a fallback path.
charlybinary:charly task syncandcharly task verify. The new scripts arenode scripts/*.mjs, run by thechecked-in task/gate plumbing that already required node, and the
.dsh/README.mdprose names themrather than inventing a path.
rc=1on the head,rc=0onorigin/main,pasted above), the farm's hand-made framing gone, and the new clause present on exactly the head. The
one surviving instance of the old phrase is inside this change's own rewritten script comment, where
the statement is still true — the farm follows the gitlink and there is still no generated copy and no
second pin.
git status --shortwas empty before the commit,origin/mainwas fetched and the branch cutoff
b407d92, and it is empty again after committing — the fence above. Nothing outside this repo was touched;#492's PR was read and left alone; no force-push, no direct push tomain.arms and 31 of 31 gate arms discriminate, each with its own message, including the three that would have
been silent before (a missing farm entry, a renamed skill, and the
.well-knownnon-family). Theartifacts are validated at their real boundary — the derivation is compared against what a live session
actually resolves, twice, from both rooting patterns.
skill discovery, and it was probed live rather than mocked.
./charly/bin/charly,2026.288.0637, the README-documented interface forcharly task *); no Go source, pin or packagingchanged, so no rebuild is owed and no new runtime OS dependency is introduced.
f22c845e4be06bdb8b74b9fc375f7481c72fb926:charly task verifyandcharly task org-map(fences above), pluscheck-harness-configandcheck-task-contexts. There is nodisposable: truetarget for this changeclass — nothing here is deployed or built — so the fresh-rebuild half has nothing to rebuild.
bindings move from hand-maintained to derived in the same pass, and the two gate checks that duplicated
the derivation are rewritten in the same change. No deferred cleanup inside the scope.
CLAIMposted on bothopencharly#487andopencharly#486with the assignee set, statingthat the leg authorised to another lane and never claimed there is being taken. The
BLOCKS/UNBLOCKSgrammar is not needed:
#492's PR overlaps no file.RESOLVEDfollows on merge on both threads, andboth issues are closed by hand naming the squash and the tag.
Change classification
no image, no bed. The one
charly.ymledit adds a task step tosync.charly task verify,charly task org-map,scripts/check-harness-config.mjs(with
--self-test),scripts/check-task-contexts.mjs, and the new generator's--checkand--self-test.The R10 evidence is the live double probe — a harness's real skill discovery, from both rooting
patterns — which is the boundary this change actually moves.
fully tested and validated— the change-class gates passed on the final tree, andevery changed path was executed live, including the two new scripts' self-tests and the live probes.
Filed issues
opencharly/layer-charly-internals-extra#24— the R4 defect carried over from the sibling leg inthis same session: an
AGENTS.mdbullet naming a repo-relative script that repo does not ship. Filedthere because it is already merged and cannot be fixed in its own PR; it lands with the next batch that
edits that file (the same batch as
#23).and
#402was already assigned to another lane.Agent:
internals-extra-agentsAssisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)