Implement CLI command atomcommit plan to analyze git working tree and produce atomic commit plan#3
Merged
rogerchappel merged 7 commits intoApr 29, 2026
Conversation
Add fixtures/ directory with: - setup-mixed-changes.sh: script to create deterministic test repo - mixed-changes-repo: generated fixture with 9 file changes across 4 groups - .gitignore: exclude generated fixture repos The fixture exercises all grouping logic, risk flagging, and commit message suggestion including: - Modified source files - New and modified test files - Documentation changes and additions - CI/CD configuration changes - Renamed files - Deleted binary files Tests verify deterministic output across multiple runs and assert expected structure.
Add 3 new tests: - Fixture repo validation: verifies CLI against repo with mixed changes, checks all groups and risk flags - Commit message validation: asserts suggested messages are meaningful - Snapshot test: verifies exact structure, file counts, and risk flags match expected output Update package.json test script to only run test/ files (exclude fixtures). All 6 tests pass (3 existing + 3 new).
Add comprehensive documentation: README.md: - Overview section with key features - Full usage examples with sample output - Grouping logic table - Risk flag definitions - Fixture repository documentation docs/README.md: - Added decision log documenting grouping logic rationale - Risk flag trigger conditions and review rationale - Future enhancement ideas Provides sufficient documentation for human approval of logic and criteria.
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
This PR hardens the existing
atomcommit planCLI command with comprehensive tests, fixture repos, and documentation. The core functionality was already implemented inf90d5ba(Add deterministic plan command). This PR focuses on verification, determinism, and reviewable documentation.Changes
1. Fixture Repositories
fixtures/setup-mixed-changes.sh— script to create deterministic test reposfixtures/mixed-changes-repo— generated fixture with 9 file changes across 4 groups:.gitignoreto exclude generated fixture repos2. Test Suite Enhancements (6 tests total)
Existing tests (3):
New tests (3):
All tests pass and output is deterministic across multiple runs.
3. Documentation
README.md:
docs/README.md:
4. Package Configuration
package.jsontest script to only runtest/**/*.test.js(exclude fixtures from test runner)Verification
Test Results
npm test bash scripts/validate.shBoth pass all checks.
Manual Testing
Design Decisions
Grouping Logic
Files are grouped based on path and extension:
.github/*docs/*,*.mdfilestest/*,*.test.jssrc/*,*.jssource filesRationale: Co-locates related changes for focused review (docs together, tests together, etc.).
Risk Flags
deletionD(file deleted)renameR(file renamed/moved)binary-filelarge-changeRationale: Flags highlight changes requiring extra review attention.
Commits
test: add fixture repo for mixed changes with snapshot testtest: add snapshot and fixture tests for deterministic plan outputdocs: expand README with usage examples, grouping logic, and risk flagsAll commits are focused and atomic.
Human Review Needed
Links
agent/implement-cli-command-atomcommit-plan-to-analyze-git-working-tree-and-pr