diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c0cfd..aea140d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ format and uses semantic versioning when versioned releases are published. ### Added -- Initial project setup. +- Release-candidate metadata, package allowlist, and npm pack smoke coverage. +- Fixture-backed CLI smoke test for Markdown and JSON output. +- README quickstart, safety notes, and release verification commands. ## Release Links diff --git a/README.md b/README.md index bcd40ca..a0d48a4 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # atomcommit -atomcommit is an early-stage local-first developer tool. +`atomcommit` is a local-first CLI that turns staged and unstaged git diffs into deterministic atomic commit plans. ## Status -This repository is early-stage. The README now reflects the current project intent from `docs/PRD.md`, but behavior should still be treated as pre-1.0 until implementation, examples, and release checks mature. +Early V0.1 release candidate. The planner is useful for local git diffs, but it does not stage files, create commits, push branches, or infer product intent. ## Install from a checkout @@ -22,21 +22,49 @@ npm install -g atomcommit ## Use -Start by reading the product notes and running the local checks: +Generate an atomic commit plan from a repository with local changes: ```sh -sed -n '1,120p' docs/PRD.md -npm test +atomcommit +atomcommit plan ``` -Generate an atomic commit plan from a repository with local changes: +Use JSON output for automation: ```sh -atomcommit plan atomcommit plan --json +``` + +Print version or help without needing to be inside a git repository: + +```sh atomcommit --version +atomcommit --help ``` +## What it reads + +`atomcommit` shells out to read-only git diff commands: + +- `git diff --name-status` +- `git diff --cached --name-status` +- `git diff --numstat` +- `git diff --stat` + +It groups changes by repository area such as documentation, tests, source code, package metadata, and CI automation. It also flags review risks such as deletions, renames, lockfiles, large changes, binary files, and sensitive-looking paths. + +## Fixture smoke + +The repository includes a deterministic mixed-change fixture: + +```sh +bash fixtures/setup-mixed-changes.sh /tmp/atomcommit-fixture +cd /tmp/atomcommit-fixture +node /path/to/atomcommit/src/index.js plan --json +``` + +The fixture covers source edits, docs, tests, workflow changes, a rename, and a deletion. + ## Verification ```sh @@ -50,9 +78,10 @@ bash scripts/validate.sh ## Limitations -- The package is still a v0.1.0 project and may not expose a finished CLI or public API yet. -- Treat the PRD as direction, not a guarantee that every listed capability is implemented. -- Do not use the package for production security, compliance, or release decisions until tests and examples cover that workflow. +- The package is still a v0.1.0 project and its JSON shape may change before 1.0. +- Commit boundaries are structural suggestions. Humans still choose the final history. +- Sensitive-path flags are heuristics, not a secret scanner or compliance control. +- Git rename detection follows `git diff --name-status`; unusual diff settings can affect rename reporting. ## Contributing @@ -66,12 +95,6 @@ See [SECURITY.md](SECURITY.md). Do not include secrets, private tokens, propriet MIT -## Verification - -Run the release-readiness checks that match this package before publishing or opening a release PR. - -- `npm run build` - compile the package artifacts - ## Release Verification Before publishing or tagging a release, run the local verification path that matches CI: diff --git a/ROADMAP.md b/ROADMAP.md index 6d3c9d7..10d2919 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,22 +6,20 @@ contributors, and implementation constraints. ## Now -- Define the smallest useful project scope. -- Keep repository setup, documentation, and verification easy for contributors - to follow. -- Ship small, reviewable improvements. +- Keep the git-diff planner deterministic and local-only. +- Verify the CLI with fixture-backed tests and smoke checks before release. +- Document the V0.1 safety model and pack contents clearly. ## Next -- Add the next capabilities that directly support the project's primary users. -- Improve tests, docs, and examples around the most used workflows. -- Reduce setup friction discovered during early use. +- Add optional configuration for grouping rules and sensitive-path patterns. +- Provide examples for staged-only and mixed staged/unstaged workflows. +- Add richer JSON schema documentation for agent integrations. ## Later -- Consider larger features after the core workflow is stable. -- Add automation only where it removes repeated maintainer work. -- Revisit packaging, deployment, or integration options based on real demand. +- Explore editor and GitHub Action integrations once the CLI contract is stable. +- Consider commit-message templates after enough real plans are reviewed. ## Not Planned diff --git a/scripts/smoke.sh b/scripts/smoke.sh index e463ced..8b02457 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -8,10 +8,8 @@ trap 'rm -rf "$tmp_dir"' EXIT fixture_repo="$tmp_dir/mixed-changes-repo" bash "$repo_root/fixtures/setup-mixed-changes.sh" "$fixture_repo" >/dev/null -markdown_output="$(node "$repo_root/src/index.js" plan < /dev/null 2>/dev/null || true)" -if [ -z "$markdown_output" ]; then - : # running outside a git repo may fail; the fixture smoke below is authoritative -fi +node "$repo_root/src/index.js" --help | grep -q 'Usage: atomcommit' +test "$(node "$repo_root/src/index.js" --version)" = "0.1.0" cd "$fixture_repo" node "$repo_root/src/index.js" plan > "$tmp_dir/plan.md"