feat(420): arckit-build v0.4 input-hash change detection#476
Merged
Conversation
Records SHA-256 of every dep artefact at build time in state.targets[id].input_hashes and re-checks on resume. Edits to upstream artefacts now cascade staleness through the DAG instead of being silently skipped by test -f idempotency. Adds --skip-hash-check escape hatch and bumps state_format_version to 0.4 (0.3 state read-compatible). Item 2 (orchestrator-side skill fallback) deferred — still listed under "Future versions" in SKILL.md. Co-Authored-By: Claude Opus 4.7 (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
Implements issue #420 item 1 — file-hash-based change detection for the
arckit-buildskill.sha256sumof every dep artefact at build time instate.targets[id].input_hashes.--resume(or any subsequent run), targets whose inputs hash-differ from the recorded value are marked stale; staleness cascades through the DAG in topological order, so editingREQnow correctly rebuildsRISK,HLD,SOBC,PLAN, …,TRACE.--refresh NAMEkeeps its unconditional override.--skip-hash-checkflag bypasses hash + cascade checks for fast resume (existing v0.3 behaviour).state_format_versionbumped0.3→0.4; 0.3 state files are read-compatible (no spurious rebuild on upgrade).What's NOT in this PR
Item 2 (orchestrator-side fallback for skills inaccessible to subagents) is explicitly out of scope per the issue thread. Still listed under "Future versions" in
SKILL.md.Files changed
arckit-claude/skills/arckit-build/SKILL.md— operating principles, args table, new "Input-hash change detection" section, wave plan algorithm, step 5 (update state.json), step 7 (compute work list), state schema example, failure modes, future versions.Test plan
Skill is prompt-driven, so testing is integration-only on a real project:
/arckit:build 001 --planfrom a fresh checkout — verify all targets show as(build)not(skip)./arckit:build 001 --resume— verify every target shows(skip).projects/001-*/ARC-001-REQ-v*.md(add a blank line), re-run/arckit:build 001 --resume --plan— verifyREQis(stale), and downstream targets (RISK,HLD,SOBC,PLAN,TRACE, …) are(stale-cascade). Non-deps ofREQ(e.g.PRIN,GLOSSARY) stay(skip).--skip-hash-check: verify all targets(skip).rman artefact, verifytest -fstill catches deletion (no regression from 0.3).Closes #420 (item 1 only).
🤖 Generated with Claude Code