Skip to content

Add format-parity gate, tighten skill git allowlists#5

Merged
gpxl merged 4 commits into
mainfrom
claude/clever-ardinghelli-d2d2d4
Jul 8, 2026
Merged

Add format-parity gate, tighten skill git allowlists#5
gpxl merged 4 commits into
mainfrom
claude/clever-ardinghelli-d2d2d4

Conversation

@gpxl

@gpxl gpxl commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Implements three tracked issues (wj-a7u, wj-ehf, wj-c1q) from an architecture
review:

  • Deterministic format-parity gate. Format parity with OpenWiki was
    previously enforced only by prose doctrine in references/wiki-format.md,
    unlike algorithm parity which tests/noop.test.ts verifies case for case.
    scripts/check-format.sh closes that gap — a read-only validator that
    emits {ok, pages, problems, warnings} JSON, following the repo's
    script-emits-JSON + co-located-behavioral-test convention
    (tests/check-format.test.ts).
  • Wired into init/update as a blocking step. Both skills now run the gate
    before recording state and hard-stop on ok:false, matching how the
    algorithm side already blocks on check-noop.sh.
  • Tightened tool allowlists. skills/init and skills/update had a
    blanket Bash(git *) grant; narrowed to the read-only git subset the
    disciplines actually need. Git writes belong to the agent pipeline, not a
    skill invoked mid-conversation. agents/wiki-scout.md now pins the durable
    sonnet model alias and documents why its Bash grant can't be narrowed the
    same way (agent tools: frontmatter only accepts bare tool names).
  • Doctrine locked with tests + docs. tests/plugin-structure.test.ts
    asserts the allowlist claims so a future edit can't silently re-widen them.
    PARITY.md points the format-parity row at the new verifier and adds a
    watch item on the sed-based state-file parsing seam. CLAUDE.md records
    the architecture change and the pr_automerge config key — CI merge
    policy is now auto-merge-on-green per the updated Agent Config.

Commits

  • 7f4b07c feat: add deterministic wiki-format parity gate
  • eb88141 feat: wire format gate into init/update, tighten git tool allowlists
  • 93e4fba refactor: pin wiki-scout to durable sonnet alias, lock allowlist doctrine
  • ccbdebc docs: record format-gate parity row and pr_automerge policy

Test plan

  • All tests pass (npm test — 8 files, 62 tests)
  • Lint clean (npm run lint — shellcheck)
  • Build clean (no build step for this project)
  • Code-quality agent: PASS (scripts/check-format.sh)
  • Manual verification

🤖 Generated with Claude Code

gpxl and others added 4 commits July 8, 2026 14:37
Format parity with OpenWiki was previously enforced only by prose
doctrine in references/wiki-format.md, with no automated check —
unlike algorithm parity, which tests/noop.test.ts verifies case for
case. check-format.sh closes that gap: it validates an openwiki/
directory against the format contract (entrypoint filename, H1-first
pages, resolving relative links, ## Source map / Git evidence: shape,
init page ceiling) and emits {ok, pages, problems, warnings} JSON,
following the same script-emits-JSON convention as the rest of
scripts/. tests/check-format.test.ts exercises it against a real temp
git repo per the project's co-located-behavioral-test convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Run scripts/check-format.sh as a blocking step before init and update
record state, so a wiki that has drifted from the format contract
never gets committed — matching how the algorithm side already blocks
on check-noop.sh. Both skills now hard-stop on ok:false and treat
warnings as judgment calls.

While touching allowed-tools, narrow the blanket Bash(git *) grant
down to the read-only subset the skills' disciplines actually need
(log/show/diff/status/blame/rev-parse/rev-list/cat-file/ls-files/
shortlog). Git writes (add/commit/push/checkout) belong to the agent
pipeline, not a skill invoked mid-conversation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rine

Switch wiki-scout's model from a pinned dated id to the durable
`sonnet` alias so the scout tracks the current Sonnet without needing
a version-bump edit every release. Document why its Bash grant can't
be narrowed to a read-only git subset the way the skills' can — agent
`tools:` frontmatter only accepts bare tool names, not per-command
specifiers like `Bash(git log:*)` — and note the upgrade path if
Claude Code adds that support.

tests/plugin-structure.test.ts locks both the read-only-git doctrine
for init/update (no Bash(git *) catch-all, no commit/push/checkout
grant) and the wiki-scout alias/read-only claims, so a future edit
can't silently re-widen either allowlist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PARITY.md: point the format-parity row at the new check-format.sh
verifier (was doctrine-only) and add a watch item flagging that
check-noop.sh parses openwiki/.last-update.json with sed rather than
a JSON parser — the one seam where interchangeability depends on
parsing JSON that OpenWiki itself wrote, to be re-checked first if
upstream's serializer output ever changes shape.

CLAUDE.md: document the format gate in the architecture blurb and add
the pr_automerge Agent Config key — pr-monitor now merges feature PRs
automatically once CI is green, no human approval gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gpxl
gpxl force-pushed the claude/clever-ardinghelli-d2d2d4 branch from ccbdebc to 64b2475 Compare July 8, 2026 12:39
@gpxl
gpxl merged commit 511f237 into main Jul 8, 2026
4 checks passed
@gpxl
gpxl deleted the claude/clever-ardinghelli-d2d2d4 branch July 8, 2026 12:40
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.

1 participant