Skip to content

Post-0.7.0 hardening: derived skill graph, drift guards, ops manual#13

Open
TheLucidTech wants to merge 5 commits into
mainfrom
feat/plugin-hardening
Open

Post-0.7.0 hardening: derived skill graph, drift guards, ops manual#13
TheLucidTech wants to merge 5 commits into
mainfrom
feat/plugin-hardening

Conversation

@TheLucidTech

Copy link
Copy Markdown
Owner

What

Post-0.7.0 plugin hardening — four [Unreleased] pieces split onto their own branch so the v0.7.0 probe gate (#12) stays atomic.

  • feat(graph) — the skill graph, derived not remembered. scripts/graph-gen.js (zero-dep, does not ship) reads skills/*/SKILL.md frontmatter + reference/PROMPTS.md and emits deterministic Cypher to reference/graph/torque-loop.cypher (21 skill nodes, the canonical phase sequence, skill→prompt IMPLEMENTS edges). The load script opens with a namespace-scoped DETACH DELETE — a delete-and-rebuild, so a shrunk or reordered graph can never leave a stale node or STEP edge behind (the earlier MERGE-only reload was additive-idempotent only). plugin-shape byte-matches the committed file against a fresh buildCypher(), so a drifted graph fails CI like a stale version.
  • test(plugin-shape) — hook drift guard: every hooks.json command must resolve to a real cmdHook subcommand, closing the silent-no-op tripwire.
  • docs(readme) — product thesis: externalized verified state lifts cognitive load; an unverified guardrail is a liability wearing the costume of relief. Drift-guarded.
  • chore(ops) — weaker-model CLAUDE.md operating manual + scripts/preflight.js suite + privacy ignores.

Parked — not in this PR

The aperture mechanism cross-links from the graph's first, hand-authored pass are deliberately not shipped: their far endpoint is a separate repo and the pairings were never adversarially attacked. They live as a documented, parked decision with an owner and route in reference/graph/README.md (convention 15), not smuggled in as if derived.

Stacking / review order

This branch is stacked on the v0.7.0 probe gate (#12). Until #12 merges, the commit list and diff here also show the probe-gate commits — they drop out automatically once #12 lands on main. Cleanest order: merge #12 first, then this.

Verification

  • npm test60 / 19 / 22 green (cli / evolve / plugin-shape)
  • node bin/ratchet doctor → healthy
  • graph drift guard proven red on a mutated skill description, green after git checkout restore (method-independent per convention 14)

Traced by: claude-opus-4-8[1m]

🤖 Generated with Claude Code

Expresiions and others added 5 commits July 6, 2026 15:12
The README still showed `ratchet --version # -> ratchet 0.2.0` — three
releases stale, on a project whose whole claim is readout trust. Fix the
value and make the README a CHECKED version surface: plugin-shape now
asserts every `-> ratchet <semver>` example matches package.json, so the
example can never silently drift again (verified falsifiable: reverting the
README value fails the suite).

npm test green (cli 60 · evolve 19 · plugin-shape 17).

Author-model: claude-fable-5

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

Lands the 2026-07-07 session's uncommitted work: CLAUDE.md rewritten as the
continuation-maintainer manual (conventions, failure modes, quality bar,
escalation, session protocol), three local skills (preflight, release-cut,
skill-forge), scripts/preflight.js wired as `npm run preflight`, and .gitignore
privacy rules for reference/PROBLEM-STATEMENT-*.md, reference/private/,
*.private.md, .env, .lucid/. Ignore rules only ADD privacy — nothing untracked
became public.

Traced by: claude-fable-5 (landing); content drafted claude-fable-5 +
claude-opus-4-8[1m] + codex gpt-5 per in-file tags · 2026-07-10

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

README now states the payoff the execution framing only implied: externalized
state lets the agent spend attention on judgment, not bookkeeping — and names
the precondition (an unverified guardrail is a liability wearing the costume of
relief). plugin-shape asserts the thesis line so its removal fails CI like a
stale version. CHANGELOG [Unreleased] entry included.

Traced by: claude-fable-5 · 2026-07-10

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

cmdHook fails closed (default: silent return), so a renamed subcommand in
hooks/hooks.json degrades every installed copy with no error anywhere. The
guard extracts each wired `ratchet hook <sub>` and asserts cmdHook handles it,
plus a floor of three wired hooks. Proven red against a simulated rename
(session-start -> session-begin) before landing; 19/19 green after revert.

Traced by: claude-fable-5 · 2026-07-10

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The first knowledge-graph pass at this plugin's skills was hand-authored — a
snapshot with nothing tying it back to source, the exact liability the README
names (a guardrail you trust without re-checking). Replace it with a zero-dep
generator (scripts/graph-gen.js, does not ship) that reads skills/*/SKILL.md
frontmatter + reference/PROMPTS.md and emits deterministic Cypher to
reference/graph/torque-loop.cypher: 21 skill nodes, the canonical phase
sequence, skill→prompt IMPLEMENTS edges.

The load script opens with a namespace-scoped DETACH DELETE — a delete-and-
rebuild, so a shrunk or reordered graph can never leave a stale node or STEP
edge behind (the earlier MERGE-only reload was additive-idempotent only).
plugin-shape byte-matches the committed file against a fresh generation, so a
drifted graph fails CI like a stale version — proven red against a mutated
skill description before landing.

The aperture mechanism cross-links from the first pass are deliberately parked,
not shipped: their far endpoint is a separate repo and the pairings were never
adversarially attacked — documented with an owner and route in
reference/graph/README.md (convention 15), not smuggled in as if derived.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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