impact --worktree compares HEAD with uncommitted working-tree changesAccepted (decided 2026-10-12). Replaces the part of decision 4 in 0033 that excludes impact from working-tree support (coverage stays excluded). Decision 2 (untracked files are out of scope) and the git add -u in decision 3 are replaced by 0047.
impact resolves --base and --head as Git refs and reads Requirements, Features and TestCases from those refs’ trees. Checking “which requirements and TestCases does this change affect” while still editing a requirement or Feature therefore required committing first. Decision 4 of 0033 excluded impact because “no motivation to mix uncommitted state into a two-point comparison has been confirmed (YAGNI)”. The need to check impact before committing (Issue #129) is that motivation.
impact --worktree--worktree analyses impact from the uncommitted changes between HEAD and the working tree, with HEAD as the base. It cannot be combined with --base, --head or --fail-on-findings (clap conflicts_with). The base is fixed to HEAD because comparing against any other ref is already possible by committing and using --base/--head; “any ref to the working tree” has no confirmed motivation and is not handled (YAGNI).
Staged and unstaged changes are not distinguished: the target is the current working-tree content of every tracked file, deletions included. A new file that was git added but not committed counts as tracked. Untracked files are out of scope and appear in the result once git added. This limit is stated in the cli-manual and the command help.
A copy of the real index is pointed to by GIT_INDEX_FILE, then git add -u and git write-tree run to obtain the tree OID that corresponds to the working tree. That OID is passed unchanged to the existing ref-based code (ls-tree, blob-SHA comparison, the id_cache tree-SHA comparison, GitTreeKnowledgeSource), so differences and identifiers mean exactly what they mean between commits. The real index and HEAD are not modified.
The side effect is that the blobs git add -u writes accumulate in the object database. Files identical to HEAD hash to existing blobs and add nothing; only files being edited add blobs. The estimate is tens to hundreds of KB per run, and unreferenced blobs are reclaimed by git gc. This was judged negligible.
record_kindrecord_kind is change_impact_worktree. schema_version stays fixed at 1 for every kind and does not branch by version (markharness-v2-design.md §9.2.2). The fields are identical to change_impact, so consumers can read it with the same parser. Only these values differ:
base_commit: the HEAD commit OID.head_commit: the fixed string "worktree". It is not a commit OID; no commit corresponds to the working tree, so it does not pretend to be one.rejected_trailers: always an empty array.Because record_kind differs, a consumer written for change_impact cannot silently ingest a provisional result as an official one. The working tree keeps changing, so the commit-to-commit property that the same input yields the same result (AC37) does not hold for this result.
Spec-Reviewed is not countedNo commits lie in the range HEAD..working tree, so no Spec-Reviewed trailer can be counted. The verdict is followed_up or unconfirmed; confirmed never appears. --fail-on-findings would therefore always exit 2 whenever a requirement is touched, so the combination is rejected (decision 1).
Only the HEAD commit is used and no commit range is walked, so the shallow-clone check is not applied. A repository with no HEAD (before the first commit) exits with an error, since there is no base to compare against.
src/impact.rs: add compute_worktree; extract the analysis shared with compute as analyzesrc/git.rs: add write_tree_of_tracked_worktree, a temporary-index tree builder limited to tracked filessrc/cli.rs: add --worktree to impact; --base and --head are not required with --worktreetests/impact_cli.rs: tests for staged, unstaged, untracked, real index unchanged, rejected combinations, shallow clone and no HEADdocs/ja/cli-manual.md/docs/en/cli-manual.md (§1.13), docs/ja/design/cli-read-model-design.md/docs/en/design/cli-read-model-design.md, docs/ja/design/markharness-v2-design.md/docs/en/design/markharness-v2-design.md (the record_kind list in §9.2.2)impact): means making a temporary commit and undoing it, which either pollutes history or needs cleanup.WorkingTreeKnowledgeSource: the id_cache tree-SHA comparison, changed_between and blob_sha_at that impact uses would all need working-tree rewrites, and what a difference means could drift from the commit-to-commit meaning..gitignore, which exceeds the initial scope. Handle it separately when needed.git add ran.record_kind and add a provisional field: a consumer that ignores the field would treat a provisional result as an official one. It also conflicts with the “do not add possibly useful future fields as optional” rule in markharness-v2-design.md §9.2.2.head_commit: splitting the type for the same content gives consumers two parsers.--fail-on-findings and allow it: no motivation to gate CI on a provisional result has been confirmed.changes compute --current-tree: its unit is the Feature and it has no requirement mapping or verdict.