microsoft / microsoft/hve-core

Make Git commit staging follow explicit path intent

Open
#2,898 0 comments 0 reactions 1 assignee Claimed by @WilliamBerryiii View on GitHub
enhancement prompts
Dominant language
Python
Stars
1.5k
Forks
301
Avg merge
3d 3h
Merged PRs (30d)
92

Description

The `/git-commit` prompt currently uses repository-wide staging and root `.gitignore` state as a proxy for whether untracked files should be included. Update the workflow so contributors explicitly select whole paths and confirm the exact staged set before one local commit is created. This keeps unrelated working-tree and pre-existing index changes outside the commit boundary unless the user deliberately includes them.

## Acceptance Criteria

- [ ] Candidate tracked, untracked, deleted, renamed, and initially staged paths are inventoried before staging.
- [ ] Only whole paths selected by the user are newly staged; detected rename pairs remain atomic.
- [ ] Partially staged paths stop with guidance instead of overwriting hunk-level index intent.
- [ ] Every initially staged path must be selected, or the workflow stops before index mutation.
- [ ] The exact staged path set requires explicit confirmation before commit.
- [ ] Rejection restores only the staging delta created by the workflow and leaves the working tree and prior index state intact.
- [ ] The workflow still creates at most one local commit, never pushes, and preserves existing commit-message rules.
- [ ] Disposable Git tests cover ignore-file variants, unrelated changes, prior staging, rename handling, cancellation, and resulting commit paths.
- [ ] The existing Git commit behavior-conformance stimulus and generated prompt documentation reflect the revised contract.

## Scope

Update `.github/prompts/hve-core/git-commit.prompt.md`, its existing behavior-conformance stimulus, focused disposable Git test coverage, and canonical generated documentation or extension projections.

Do not add a pre-commit hook, a new secret-scanner dependency, or model-based secret detection. Existing repository scanning remains the deterministic downstream control.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.