Claude mutation-scope integration - #263
Open
davidabram wants to merge 11 commits into
Open
Conversation
davidabram
force-pushed
the
claude-mutation-scope-integration
branch
12 times, most recently
from
September 7, 2026 12:07
48d7b91 to
fb56916
Compare
davidabram
force-pushed
the
claude-mutation-scope-integration
branch
from
September 8, 2026 17:04
9ea5e75 to
34a15e6
Compare
davidabram
force-pushed
the
claude-mutation-scope-integration
branch
from
September 8, 2026 18:24
34a15e6 to
16ae33c
Compare
Define the first concrete Claude Code mutation-scope adapter, its generic-ingress boundary, lifecycle and identity semantics, durable state, generated settings integration, and validation strategy. - Sequence the work across Claude lifecycle discovery, adapter implementation, setup integration, production regressions, and durable context. - Capture fail-closed PreToolUse behavior, write-ahead Start ordering, stale-attempt cleanup, worktree ownership, and background-shell limitations. - Record acceptance criteria and full verification commands for the stacked integration. Plan: claude-mutation-scope-integration Tasks: T01-T08 Co-authored-by: SCE <sce@crocoder.dev>
Capture Claude Code 2.1.258 lifecycle payloads for mutation-scope design decisions, including successful and failed tools, parallel calls, denials, subagents, worktree cwd, and background execution. Document uncaptured or analog-only probes and confirm the foreground/background and failure-signal assumptions used by the follow-up implementation. Co-authored-by: SCE <sce@crocoder.dev>
Capture and validate Claude hook lifecycle and tool events before wiring the adapter, so mutation-scope integration can use stable execution identities and conservative tool classification. Implement strict event parsing, identity/scope ID formatters, lifecycle models, and read-only/delegation/mutation-capable classification. Keep the module unwired and dead-code allowed until the planned ingress work lands. Plan: claude-mutation-scope-integration (T02) Co-authored-by: SCE <sce@crocoder.dev>
Persist versioned adapter attempts under the checkout's Git state directory, using bounded OS locking and durable atomic replacement to prevent lost updates and partial writes. Reuse live deliveries by tool identity while allocating monotonic ScopeIds for later executions, and reject malformed or unsupported state rather than fabricating bookkeeping. Plan: claude-mutation-scope-integration (T03) Co-authored-by: SCE <sce@crocoder.dev>
Ensure Nix package builds include the Claude mutation-scope hook fixtures so the hook's test and runtime assets are available in the packaged CLI source tree. Co-authored-by: SCE <sce@crocoder.dev>
Document the observed Claude Code lifecycle boundary for a foreground Bash call that launches a self-detaching descendant whose repository mutation occurs after PostToolUse. Add the captured hook payloads, update fixture notes, and reconcile D20/T04 in the integration plan without changing production behavior or adding process supervision. Plan: claude-mutation-scope-integration (T04) Co-authored-by: SCE <sce@crocoder.dev>
Make the existing normalized JSON ingress crate-visible so sibling hook modules can reuse it without an `sce` subprocess or a duplicate `RuntimeBoundary` construction path. Preserve the CLI command path and behavior unchanged. Plan: claude-mutation-scope-integration.md (T05) Co-authored-by: SCE <sce@crocoder.dev>
Add the hidden `sce hooks claude-mutation-scope` route and in-process driver that maps Claude lifecycle events to mutation-scope start, close, abandon, and flush operations with worktree-derived resolution and fail-closed PreToolUse behavior. Persist pending attempts before Start, retire failed or stale attempts behind a recovery barrier, and cover duplicate delivery, cleanup, background-shell, and barrier behavior with focused tests. Update the mutation-scope runtime and hook-routing contracts, and record completion of `claude-mutation-scope-integration` T06; setup registration remains pending. Co-authored-by: SCE <sce@crocoder.dev>
Make the first concrete Claude mutation-scope adapter reachable from real Claude Code sessions by adding unmatched registrations for all ten lifecycle events to generated settings. Update canonical context and mark plan task T07 complete to record setup/doctor reachability while leaving Codex, OpenCode, and Pi unwired. Plan: claude-mutation-scope-integration (T07) Co-authored-by: SCE <sce@crocoder.dev>
Record the shipped Claude mutation-scope adapter as durable repository context. Add its scope model, identity derivation, fail-closed write-ahead behavior, cleanup and recovery rules, and unsupported background-shell boundary, then update the related runtime, routing, overview, architecture, map, raw-hook, and plan references. Plan: claude-mutation-scope-integration, T09 Co-authored-by: SCE <sce@crocoder.dev>
Ensure Claude lifecycle events invoke the shared mutation-scope hook so SCE policy handling covers permission, tool-failure, session, stop, and prompt boundaries consistently.
davidabram
force-pushed
the
claude-mutation-scope-integration
branch
from
September 9, 2026 04:48
16ae33c to
e647c85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.