Skip to content

docs(spec): SPEC-008 — full-context integrity lock (agents.lock + agents.sum) - #74

Merged
nmccready merged 1 commit into
mainfrom
spec/008-context-integrity-lock
Jul 15, 2026
Merged

docs(spec): SPEC-008 — full-context integrity lock (agents.lock + agents.sum)#74
nmccready merged 1 commit into
mainfrom
spec/008-context-integrity-lock

Conversation

@nmccready-tars

Copy link
Copy Markdown
Contributor

What

Adds specs/SPEC-008-context-integrity-lock.md (status: Draft) — a full-tree provenance + integrity layer for .agents/. Spec-only PR: no code changes. Implementation follows against #73.

Design highlights

  • Two files, go.mod/go.sum split: agents.lock = provenance (where every artifact comes from: local / source:<entry> / linked:<file:path> / imported:<url>, resolved SHAs, per-artifact tree hash); agents.sum = content ground truth (one <path> sha256:<hash> line per file, sorted, LF-only). Resolution and integrity stay separately reviewable — a one-line .sum change in a PR names the exact file that moved.
  • Separate from sources.lock, deliberately: sources.lock is the pull pipeline's per-entry resolution record for remote entries only; agents.lock is a whole-tree snapshot with different ownership, lifecycle, and failure semantics. agents.lock references sources.lock entries rather than duplicating them, and agents.sum sums sources.yaml/sources.lock (and agents.lock itself) so tampering with any layer is caught.
  • Commands: sync-agents lock (generate/refresh), sync-agents verify (--json, --strict, --explain <path>; exit 1 on drift). pull/update/approve/detach/add/import/remove auto-refresh affected entries once the lock exists.
  • Severity policy encodes the supply-chain posture: local edits to pulled content = ERROR (tamper signal, ClawHub posture); linked-checkout drift = INFO unless --strict (live checkouts drift by design, SPEC-007); unlocked file appearing = ERROR (bypassed the gate). .quarantine/, .sources/, unshared STATE_*.md, and origin metadata are excluded; SPEC-006 OS-scoped subdirs are always locked (content record, not routing record).
  • Closes the SPEC-005 loop: quarantine gates entry, the sum file detects post-install tampering; a scheduled verify --json is drift detection for the whole AI-context picture.
  • Rollout: additive 1.x; inert until the first explicit sync-agents lock.

Refs #73.

🤖 Generated with Claude Code

…nts.sum)

Draft spec for a whole-tree provenance + integrity layer over .agents/:
agents.lock records where every artifact comes from (local / source /
linked / imported), agents.sum is the go.sum-style per-file content
ground truth. New lock/verify commands; verify --json as a scheduled
drift sentinel closing the loop with SPEC-005 quarantine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

🤖 AI Code Review Complete

Review performed on changed files. Check inline comments for specific findings.

Severity Levels:

  • 🔴 Critical: Must fix (bugs, security, data loss)
  • 🟡 Warning: Should fix (performance, maintainability)
  • 🔵 Suggestion: Nice to have (style, alternatives)
  • Nit: Optional (cosmetic)

@nmccready
nmccready merged commit e59750c into main Jul 15, 2026
6 checks passed
@nmccready
nmccready deleted the spec/008-context-integrity-lock branch July 15, 2026 01:50
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