chunk fix command, git pre-push hook model, session-scoped sidecar state - #491
Draft
schurchleycci wants to merge 4 commits into
Draft
chunk fix command, git pre-push hook model, session-scoped sidecar state#491schurchleycci wants to merge 4 commits into
schurchleycci wants to merge 4 commits into
Conversation
…ed sidecar state - Split config schema: unified commands[] → separate fix[] and validate[] arrays with automatic migration from the legacy format on load - Add chunk fix command for running formatters and file-rewriting tools locally - Replace the .chunk/hooks-disabled sentinel model with a real git pre-push hook: chunk hook enable/disable/status now manage .git/hooks/pre-push directly, including worktree support via git rev-parse --git-common-dir - Remove Stop hook and Claude session detection from chunk validate; the stdin-sniffing approach was the source of the awkward stdout→stderr rerouting and attempt-tracking machinery (attempts.go deleted) - Restore per-session sidecar isolation via a new SessionStart hook: chunk session start reads the Claude Code SessionStart payload and persists the session_id to the project data dir; chunk validate reads it back and injects it into context so LoadActive/SaveActive continue to namespace state files by session - settings.Build now emits SessionStart, PreToolUse, and PostToolUse hooks; merge logic updated to handle the matcher-less SessionStart group Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove PreToolUse hook from Build/BuildCodex; validation no longer runs as a Claude hook, only via the git pre-push hook - chunk init now installs the pre-push git hook instead of pre-commit; writeGitHook/gitHookContent removed, writePrePushHook delegates to a new shared installPrePushHook helper in hook.go - Build/BuildCodex signatures drop the validate parameter; SessionStart and PostToolUse hooks only emitted when fix commands are configured - Fix goconst (session/start constants), unparam (findGitRootFrom returns string, not (string, error)) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Always emit SessionStart hook from Build(), not only when fix commands
exist — projects without fix commands were getting branch-based sidecar
naming, causing concurrent sessions to compete for the same sidecar
- Expand {{CHANGED_PACKAGES}} in RunInline so chunk validate --cmd
honours the template the same way RunAll/RunNamed do
- Remove stale Stop-hook reference from MergeCodex doc comment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jesseworld22
added a commit
that referenced
this pull request
Aug 13, 2026
The getting-started guide walked new users through build-prompt and code review as its numbered path, with sidecars below it under a heading still marked '(preview)'. Someone following the steps in order never touched a sidecar. README framed the two as co-equal capabilities. Restructure so the sidecar loop is the primary path: - GETTING_STARTED: sidecar creation and the dev loop become Steps 3 and 4, skills become Step 5, and build-prompt/review move below the sidecar material as 'Team review context'. Drop the '(preview)' label. Group the detail sections under a 'Sidecar reference' heading. Lead the auth step with CircleCI, since that is what sidecars need. - README: drop the 'two main capabilities' framing, move context generation below the sidecar quick start. - AGENTS.md: describe sidecars as the primary capability. - SKILLS.md: lead the intro with sidecar setup and the dev loop, and point first-time readers at chunk-sidecar-setup. Also adds the chunk-sidecar-setup skill to the getting-started skills table, which listed only four of the five installed skills. Command-level details in 'Environment setup', 'Syncing', 'First-time sidecar setup', and 'Hook behavior' are left alone pending #438, #462, #491, and #501, which change those commands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
commands[]intofix[]andvalidate[]; legacy configs migrate automatically on loadchunk fixcommand — runs formatters locally, fired by aPostToolUse(Edit|Write)hookchunk hooksentinel file with a real.git/hooks/pre-push;chunk initnow installs itPreToolUsevalidate hook and pre-commit git hook — validation is pre-push onlySessionStarthook that persists the Claude session IDTest plan
task testpasseschunk initwritesSessionStart+PostToolUsehooks (noPreToolUse) and installs.git/hooks/pre-pushchunk fixruns formatters;chunk fix <name>runs one by name; no-config case returns clear errorchunk hook enable/disable/statusmanage.git/hooks/pre-pushcorrectly🤖 Generated with Claude Code