Skip to content

feat(harness): derive the skill bindings from the corpus, and classify authored content as authored (L9, L9.1) - #502

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/l9-derived-skill-bindings
Oct 16, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/l9-derived-skill-bindings

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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.md and an agent
definition's <name>.md are authored content, the same class as AGENTS.md, they live in the repo
that owns them under its own .agents/ trees, and the umbrella populates its own .agents/ because it
authors skills, never because it vendors the corpus.

2. The bindings become DERIVED (L9). scripts/sync-skill-bindings.mjs walks
marketplace/*/{skills,agents} and writes the two artifacts that enumerate the corpus, then verifies the
one that merely references it:

binding kind what the generator does
.dsh/skills/<name> (353 flat symlinks) a mirror — an enumeration derives it: one entry per corpus skill, collision → hard failure
reasonix.toml → [skills] paths (43 entries) a reference list — an enumeration derives it: one entry per existing marketplace/<family>/{skills,agents} dir, in byte order
opencode.json → skills.paths (1 entry) a reference — not an enumeration verifies it names the corpus root; there is nothing per-family to derive

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 sync now runs the generator immediately after the pin bump — the pin-advance path, so a
family added upstream is bound in the same pass that advances the gitlink. And check-harness-config's
checks 8 and 13 stop re-implementing the derivation (each carried its own readdirSync coverage
arithmetic, including a .well-known special case) and instead assert the artifacts ARE that
derivation — 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 --check and 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 the
arithmetic — 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 while desiredReasonixPaths() did not, so --only reasonix
died with an uncaught ENOENT where --only farm failed cleanly.

$ # THE CORPUS-ABSENT TREE — the layout Part II rule 2 requires, which the round-1 verdict was about.
$ # Before the fix: --only reasonix died with an uncaught ENOENT, and checks 8/13 went RED where
$ # check 12 kept its skip. After: both arms fail cleanly, and both checks skip visibly.
$ node scripts/sync-skill-bindings.mjs --check --only reasonix --root /tmp/l9-nocorpus-gen; echo "rc=$?"
FAIL: marketplace/ is not checked out in /tmp/l9-nocorpus-gen — the corpus is the input
rc=1
$ node scripts/sync-skill-bindings.mjs --check --only farm --root /tmp/l9-nocorpus-gen; echo "rc=$?"
FAIL: marketplace/ is not checked out in /tmp/l9-nocorpus-gen — the corpus is the input
rc=1
$ cd /tmp/l9-nocorpus && node scripts/check-harness-config.mjs | grep "derivation check skipped"
  PASS  marketplace submodule not checked out — [skills] paths derivation check skipped (structural assertions above still hold)
  PASS  marketplace/ not checked out — the .dsh/skills derivation check skipped (the shape arm above still holds)
  (that scratch tree carries only this repo's scripts and harness config, so its other surfaces are
   absent by construction; the two lines above are the arm under test. The gate's own self-test
   asserts the same on a FULLY staged tree — arm 'check 8/13: a tree without the corpus SKIPS both
   derivation arms visibly and stays green')

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 materialised for exactly that
case. 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 in
check 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 --only arms to fail cleanly rather than crash, and
the gate's self-test gained its first GREEN arm — a staged tree with marketplace/ removed must stay
green 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

$ find .dsh/skills -maxdepth 1 -type l | wc -l ; find .dsh/skills -maxdepth 1 ! -type l | wc -l ; git ls-files .dsh/skills | wc -l
353
1
353
$ find .dsh/skills -maxdepth 1 -type l ! -exec test -e {} \; -print | wc -l
0
$ ls -l .dsh/skills | sed -n "2,4p"
lrwxrwxrwx 1 atrawog atrawog 43 Oct 15 07:55 a11y-tools -> ../../marketplace/selkies/skills/a11y-tools
lrwxrwxrwx 1 atrawog atrawog 34 Oct 15 07:55 adb -> ../../marketplace/check/skills/adb
lrwxrwxrwx 1 atrawog atrawog 41 Oct 15 07:55 agent -> ../../marketplace/automation/skills/agent
$ node scripts/sync-skill-bindings.mjs --check --only reasonix
sync-skill-bindings: reasonix.toml [skills] paths  unchanged (43 entries)
sync-skill-bindings: clean
$ python3 -c "import json;print(json.load(open(\"opencode.json\"))[\"skills\"])"
{'paths': ['marketplace']}
  • .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.
  • The row's .pi/ item is already done, and the row is stale on it — measured below.

The derivation, and the one defect hand-maintenance had hidden

$ node scripts/sync-skill-bindings.mjs --check; echo "rc=$?"
sync-skill-bindings: corpus: 353 skills across 41 families, 0 name collisions
sync-skill-bindings: .dsh/skills  unchanged (353 entries)
sync-skill-bindings: reasonix.toml [skills] paths  unchanged (43 entries)
sync-skill-bindings: opencode.json skills.paths  unchanged (names the corpus root)
sync-skill-bindings: clean
rc=0
$ # the derivation, counted rather than carried:
$ node scripts/sync-skill-bindings.mjs --check --only farm
sync-skill-bindings: corpus: 353 skills across 41 families, 0 name collisions
sync-skill-bindings: .dsh/skills  unchanged (353 entries)
sync-skill-bindings: clean

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/skills was listed before marketplace/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.

$ sed -n '288,293p' .pi/extensions/charly-gates.ts
        const globalPath = m
          ? join(ctx.cwd, "marketplace", m[1], "skills", m[2], "SKILL.md")
          : join(ctx.cwd, "marketplace", ref, "SKILL.md");
        try {
          const skillContent = await readFile(globalPath, "utf8");
          results.push(`=== ${ref}/SKILL.md ===\n${skillContent}`);
sync-skill-bindings: reasonix.toml [skills] paths  unchanged (43 entries)
sync-skill-bindings: clean
$ git diff origin/main...HEAD -- reasonix.toml | tail -7
     "marketplace/pipeline/skills",
-    "marketplace/pod/skills",
     "marketplace/pod-verbs/skills",
+    "marketplace/pod/skills",
     "marketplace/punktfunk/skills",
     "marketplace/qdrant/skills",
     "marketplace/review/skills",

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 corpus
at 288-291 with 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/skills or prove
umbrella-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.

$ # FOUR sibling project roots (findProjectRoot = nearest .git), differing ONLY in the binding,
$ # each probed by a fresh session's own answer: dsh headless "List every skill name available ..."
$ # A  .dsh/skills — the farm as hand-made      -> 353 of the 353 corpus skills
$ # B  nothing bound                            -> 0  (its answer ends: NONE)
$ # C  .agents/skills — the same farm, rank 200  -> 352  (a rename, not a fix)
$ # D  .dsh/skills — the farm as DERIVED         -> 353 of the 353 corpus skills
$ # A == D (the derivation changed nothing a session sees): True
$
$ # and the OTHER half of the double probe — a session rooted in a repo that AUTHORS skills
$ # (pod-charly-automation, .agents/skills, no binding at all) -> 8 of 8 of its own
$ # missing: none

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-automation has no binding at all and its
own .agents/skills/<name>/SKILL.md resolves 8 of 8 natively, which is the D-harness model proven live
rather than asserted.

Mechanism, for the record: @deepseek-ai/dsh-skill-filesystem scans <projectRoot>/.dsh/skills at rank
100 and <projectRoot>/.agents/skills at rank 200 (lib/index.js:21-22), both at depth 1, and this
machine has no user-level ~/.dsh/skills or ~/.agents/skills to fall back on.

What this change deliberately does NOT do

  • It does not delete the three bindings, which was the ruling's first form. The measurement above is
    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.
  • It does not touch #492's PR (feat/umbrella-pin-sync, another author's). Checked: it carries 7
    gitlinks plus scripts/sync-pr-body.sh, so there is no file overlap with this change — and the pin
    advance it performs is exactly the path that now runs the generator.
  • It does not absorb #402. That is the .pi/ signpost drift, assigned and not mine; the one item in
    this row's scope that touched .pi/ is measured above as already done.
  • It does not edit the .agents/skills/agents/SKILL.md skill (a submodule copy of
    layer-charly-internals). Its own text already carves authored content out of harness config — "A
    rulebook (AGENTS.md) is NOT harness config and stays in its own repo"
    — so it is consistent with the
    amended rule and needs nothing. Spelling the skills half out there would be a layer-charly-internals
    row, not this one.

How tested

Every command ran on the tree this body names — Head f22c845e4be06bdb8b74b9fc375f7481c72fb926, tree 6c8787b6728415b39cb543f0529174be0a38f42e,
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 rev-parse HEAD HEAD^{tree}
f22c845e4be06bdb8b74b9fc375f7481c72fb926
6c8787b6728415b39cb543f0529174be0a38f42e
$ git status --short; echo "rc=$?"
rc=0
$ git log --oneline origin/main..HEAD
f22c845 fix(harness): restore the visible corpus-absent skip, and give both generator arms one guard (round 1 BLOCK)
7d4d98b feat(harness): derive the skill bindings from the corpus, and classify authored content as authored
$ git diff --stat origin/main...HEAD | tail -9
 .dsh/README.md                           |  19 ++-
 AGENTS.md                                |  11 +-
 charly.yml                               |   3 +
 reasonix.toml                            |   2 +-
 scripts/check-harness-config.mjs         | 164 +++++++++++--------
 scripts/sync-skill-bindings.mjs          | 269 +++++++++++++++++++++++++++++++
 scripts/sync-skill-bindings.selftest.mjs | 190 ++++++++++++++++++++++
 7 files changed, 585 insertions(+), 73 deletions(-)

git status --short is empty, so the committed tree is the tree every other command here ran
against.

The generator, on the committed tree — the fixed point, plus the write's only effect:

$ node scripts/sync-skill-bindings.mjs        # the write, on the committed tree
sync-skill-bindings: corpus: 353 skills across 41 families, 0 name collisions
sync-skill-bindings: .dsh/skills  unchanged (353 entries)
sync-skill-bindings: reasonix.toml [skills] paths  unchanged (43 entries)
sync-skill-bindings: opencode.json skills.paths  unchanged (names the corpus root)
sync-skill-bindings: done
$ git diff --stat -- reasonix.toml .dsh/skills | cat
$ git diff --numstat -- reasonix.toml
$ # idempotence: a SECOND write, byte-compared
$ cp reasonix.toml /tmp/l9-idem.toml && node scripts/sync-skill-bindings.mjs > /dev/null && cmp reasonix.toml /tmp/l9-idem.toml && echo "SECOND WRITE IS A NO-OP (byte-identical)"
SECOND WRITE IS A NO-OP (byte-identical)
$ node scripts/sync-skill-bindings.mjs --check
sync-skill-bindings: corpus: 353 skills across 41 families, 0 name collisions
sync-skill-bindings: .dsh/skills  unchanged (353 entries)
sync-skill-bindings: reasonix.toml [skills] paths  unchanged (43 entries)
sync-skill-bindings: opencode.json skills.paths  unchanged (names the corpus root)
sync-skill-bindings: clean

A second write is a byte-for-byte no-op (cmp clean), and --check is green immediately after it. That
is 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:

$ node scripts/sync-skill-bindings.mjs --self-test | tail -4
PASS  corpus absent: --only farm FAILS cleanly rather than crashing  (rc=1)  one guard for both arms, so they cannot diverge again
PASS  idempotence: a write run twice changes nothing the second time  (rc=0)  check-after-write rc=0
PASS  this checkout: the derivation is already a fixed point  (rc=0)  the real corpus
sync-skill-bindings --self-test: 15/15 arms live and correct
$ node scripts/check-harness-config.mjs --self-test | tail -2
  PASS  check 8/13: a tree without the corpus SKIPS both derivation arms visibly and stays green
check-harness-config --self-test: OK (32/32 arms live — "31 mutations that must go RED + 1 corpus-absent tree that must stay GREEN")

The gates this change class owns, each on the committed tree:

$ node scripts/check-harness-config.mjs; echo "rc=$?"
  PASS  every .dsh/skills entry is a symlink (real entries: none)
  PASS  the .dsh/skills farm matches its derivation (node scripts/sync-skill-bindings.mjs --check)
check-harness-config: OK
rc=0
$ node scripts/sync-skill-bindings.mjs --check | tail -2
sync-skill-bindings: opencode.json skills.paths  unchanged (names the corpus root)
sync-skill-bindings: clean
$ node scripts/check-task-contexts.mjs; echo "rc=$?"
check-task-contexts: OK — every step of every task declares a context the plan runner activates
rc=0
$ ./charly/bin/charly task verify; echo "rc=$?"    # on the round-2 committed tree
  ... 21 of 21 steps [pass], 0 [fail]
$ # the two steps this change owns, as verify reported them:
  [pass] check — every harness-config surface parses and is wired (rule 5)
  [pass] check — the harness-config gate discriminates — each mutation turns it RED (fixtures)
$ # the tail of the run:
      exit=0
  [pass] check — the root-ref gate discriminates — each mutation turns it RED (fixtures)
      exit=0
rc=0
$ ./charly/bin/charly task org-map; echo "rc=$?"
task org-map: 1 step(s), 0 failed
  [pass] check — every section reconciles, is sorted, and every submodule has a row
      exit=0
rc=0

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:

$ # SWEEP A — the rule's OLD reading, on the pre-change artifact and on the head.
$ git grep -c -E "Harness config lives only in the umbrella\." origin/main -- AGENTS.md; echo rc=$?
origin/main:AGENTS.md:1
rc=0
$ git grep -c -E "Harness config lives only in the umbrella\." HEAD -- AGENTS.md; echo rc=$?
rc=1
$ # SWEEP B — the farm's OLD framing as a hand-made binding.
$ git grep -c -F "**The R0 skill-corpus binding.**" origin/main -- .dsh/README.md; echo rc=$?
origin/main:.dsh/README.md:1
rc=0
$ git grep -c -F "**The R0 skill-corpus binding.**" HEAD -- .dsh/README.md; echo rc=$?
rc=1
$ # the POSITIVE arm: the new clause must be present on the head and absent before it.
$ git grep -c -F "authored content is not harness config" origin/main -- AGENTS.md; echo rc=$?
rc=1
$ git grep -c -F "authored content is not harness config" HEAD -- AGENTS.md; echo rc=$?
HEAD:AGENTS.md:1
rc=0

Rulebook compliance

  • R0 — Loaded before the first harness action: the umbrella AGENTS.md (the file this change amends),
    /charly-internals:{agents,skills,git-workflow,marketplace,strict-policy,cutover-policy} and
    /charly-check:check. agents is the owning skill for the harness-config surface (Part II chore: sync dotgithub pin to main #5's own
    *Detail:* line) and check for the gate verbs this change rewrites.
  • R1 — No gate failure or warning: every command in ## How tested passed with 0 failures. Round
    1's BLOCK is fixed, not rebutted
    — it named a real regression this change introduced (the lost
    corpus-absent skip and the divergent --only arms), the RCA names the missed control (every gate and
    every 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-known
    as a family (44 derived entries where 43 exist — a readdir sees dotfiles and a glob does not), caught
    by the gate's own malformed-entry oracle; (b) the gate's self-test staged the farm with cpSync, which
    dereferences 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.md
    prose in the sibling leg is filed, not fixed here, as layer-charly-internals-extra#24.
  • R2 — This change removes duplication. Checks 8 and 13 each carried a second implementation of the
    derivation (readdirSync coverage arithmetic, with .well-known special-cased by hand); both now
    invoke the one derivation. The generator in turn reuses nothing it should not: it reads the corpus
    directly and writes text, with no second parser.
  • R3 — No workaround. No sleep, retry, suppression or magic fixture: the bindings are written by one
    script, wired into charly task sync, and asserted by the existing gate. The --check mode is how the
    gate asks its question, not a fallback path.
  • R4 — Every command this diff tells a reader to run works with nothing but the charly binary:
    charly task sync and charly task verify. The new scripts are node scripts/*.mjs, run by the
    checked-in task/gate plumbing that already required node, and the .dsh/README.md prose names them
    rather than inventing a path.
  • R5 — Legacy deleted and swept: the old rule text gone (rc=1 on the head, rc=0 on origin/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.
  • R6 — git status --short was empty before the commit, origin/main was fetched and the branch cut
    off 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 to main.
  • R7 — The changed paths execute live, and the coverage fails without the change: 13 of 13 generator
    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-known non-family). The
    artifacts are validated at their real boundary — the derivation is compared against what a live session
    actually resolves, twice, from both rooting patterns.
  • R8 — N/A — no boundary crosses a live service. The one external interface here is a harness's own
    skill discovery, and it was probed live rather than mocked.
  • R9 — The umbrella's own dev/worktree build was used for its own tasks (./charly/bin/charly,
    2026.288.0637, the README-documented interface for charly task *); no Go source, pin or packaging
    changed, so no rebuild is owed and no new runtime OS dependency is introduced.
  • R10 — Run on the committed tree — Head f22c845e4be06bdb8b74b9fc375f7481c72fb926: charly task verify and charly task org-map (fences above), plus
    check-harness-config and check-task-contexts. There is no disposable: true target for this change
    class — nothing here is deployed or built — so the fresh-rebuild half has nothing to rebuild.
  • HC — One cutover, one repo, one commit, one story: the rule and its enforcement land together, the
    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.
  • COORD — CLAIM posted on both opencharly#487 and opencharly#486 with the assignee set, stating
    that the leg authorised to another lane and never claimed there is being taken. The BLOCKS/UNBLOCKS
    grammar is not needed: #492's PR overlaps no file. RESOLVED follows on merge on both threads, and
    both issues are closed by hand naming the squash and the tag.

Change classification

  • Class: harness config plus scripts plus rulebook prose. Two commits: the change, then round 1's fix. No Go, no pin, no gitlink advance, no schema,
    no image, no bed. The one charly.yml edit adds a task step to sync.
  • Gate: the umbrella's own — 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 --check and
    --self-test.
  • Not run, and why: there is no R10 bed for this class; nothing here is built, deployed or disposable.
    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.
  • Attribution tier: fully tested and validated — the change-class gates passed on the final tree, and
    every 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 in
    this same session: an AGENTS.md bullet naming a repo-relative script that repo does not ship. Filed
    there 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).
  • Nothing else was filed. The three defects this leg's own new controls caught are fixed in this tree,
    and #402 was already assigned to another lane.

Agent: internals-extra-agents
Assisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)

…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)
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 7d4d98bb4f97705f54901f942eebec91a9439d59 (branch: feat/l9-derived-skill-bindings)

Change class: harness config + scripts + rulebook prose (no Go, no schema, no pin, no bed).

Comments: none on the thread — nothing to disposition.

Blocks

  1. R1 / R10 — the gate loses its corpus-absent skip, and --only reasonix crashes instead of failing cleanly. scripts/check-harness-config.mjs check 8 (scripts/check-harness-config.mjs:597 region) and check 13 (:750 region) each removed their if (existsSync(join(root,"marketplace"))) { … } else { pass("… skipped") } guard and replaced it with an unconditional derivedBindings(...) call. On any tree where the marketplace submodule is not materialised — the session-worktree case the change's own generator self-test explicitly handles ("this checkout: SKIPPED — marketplace/ is not materialised", sync-skill-bindings.selftest.mjs), and the case the deleted code documented ("a worktree that did not populate it") — the behaviour now inverts from PASS-skip to RED:

    • derivedBindings("reasonix") → sync-skill-bindings.mjs --check --only reasonix → desiredReasonixPaths → familiesOf(marketplace) → readdirSync(marketplace) with no existsSync guard, so it dies with an uncaught ENOENT (stack trace, rc=1). The --only farm path at least has the guard in corpusSkills (fail("marketplace/ is not checked out …")), so the two --only arms are inconsistent.
    • Either way gen8.rc/gen13.rc !== 0, so check 8 and check 13 go red where they previously skipped, while check 12 keeps its skip — three corpus-dependent checks, two of which now behave differently.

    The body's R1/R10 sections do not mention this regression, and no issue is filed for it. Fix: restore the visible corpus-absent skip (as check 12 still does), and give the --only reasonix derivation the same existsSync(marketplace) guard --only farm already has, so it reports a clean FAIL rather than crashing. Re-run the gate against a tree without the submodule (and the --self-test) and paste the output.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…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)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — round 1 BLOCK read in full, both halves of the finding were correct and are reproduced, fixed in
one appended commit, RCA posted before the push, body re-finalized for the new head.

The finding, reproduced before it was fixed

The verdict named two defects in one mechanism, and I reproduced both on a scratch tree that has this
repo's scripts and harness config but no marketplace/ — the session-worktree layout Part II rule 2
requires:

$ 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 --only arms disagreed (a crash versus a clean failure), and checks 8 and 13 inverted
from PASS-skip to RED
where check 12 kept its skip. Both are regressions this change introduced — the
skip I deleted was there on purpose, and its own comment said why.

RCA

  • Mechanism. Replacing each check's coverage arithmetic with a generator call looked like a
    like-for-like swap, but it also removed the existsSync(marketplace) guard that surrounded the
    arithmetic. The guard was not part of the arithmetic being replaced; it was a precondition on the
    input. And on the generator side, corpusSkills() already guarded the corpus while
    desiredReasonixPaths() did not, so one --only arm was safe and the other was not.
  • Missed control. My pre-push set ran every gate on this tree, where the corpus IS materialised,
    and my new self-tests all staged fixtures that had a corpus. Nothing exercised the corpus-absent path
    even though the change's own generator self-test prints SKIPPED — marketplace/ is not materialised for
    exactly that case. 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.
  • Blast radius. Every session worktree and every CI checkout without submodules would have reported
    checks 8 and 13 RED for a reason unrelated to any change — a permanently red gate on the layout the
    rulebook mandates, which is the failure mode the skip existed to prevent.
  • Root fix, in three parts. (1) One corpusRoot() guard, used by both derivations, so the arms
    cannot diverge again. (2) The visible skip restored in checks 8 and 13 in check 12's own voice, with the
    shape arm made corpus-free so it still runs. (3) Two controls, one per suite: the generator's
    self-test now requires both --only arms to fail cleanly (not 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. The gate's own count now names both kinds of arm rather than
    reporting only the mutations: 32 arms — 31 that must go RED and 1 that must stay GREEN.

Re-measured after the fix, on the same corpus-absent tree: --only reasonix reports
FAIL: marketplace/ is not checked out … cleanly, and the gate reports both skips as PASS and stays
green.

Agent: internals-extra-agents
Assisted-by: DSH DeepSeek deepseek-v4.1-flash (fully tested and validated)

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: f22c845e4be06bdb8b74b9fc375f7481c72fb926 (branch: feat/l9-derived-skill-bindings)

Security screen: PASS — no scope mismatch (diff matches the body's accounting), no secrets/egress, no new deps/pins, no weakened guardrail. The AGENTS.md Part II #5 amendment is a rulebook edit but not one of the enumerated security-machinery rules (pre-push/pre-commit/branch-protection/validator spec/landing/attribution/no-force-push/no-direct-push), so no maintainer sign-off is owed.

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: corpusRoot() is the single guard used by both corpusSkills() and desiredReasonixPaths() (no divergent --only arm, no ENOENT), and checks 8/13 restore the visible !existsSync(marketplace) skip while keeping their shape oracles.

Comment dispositions:

  • Comment 6207703107 (@github-actions[bot], round-1 BLOCK): stale-superseded — the named defects (lost corpus-absent skip → RED instead of skip; --only reasonix crash) do not reproduce against the current head; both are fixed in f22c845.
  • Comment 6207830865 (@aitrawog, STATUS/RCA): verified-non-blocking — the claimed fix and the RCA naming the missed control are corroborated by the current diff (one guard, restored skips, the two added control arms).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants