Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions docs/gists/auto-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,21 @@ Controller helpers:
auto-git start --cwd "$PWD" --task "fix this"
auto-git ledger list --cwd "$PWD"
auto-git finish --cwd "$PWD" --run-id "<id>" --complete
auto-git release-preflight --cwd "$PWD" --require-verification
auto-git release-preflight --cwd "$PWD" --run-id "<id>" --require-verification
```

`auto-git-finish.mjs` blocks coordinated/everything/yolo completion until the
branch is pushed upstream or merged into a pushed base branch, the checkout is
switched back to main/default, a PR handoff or merge is recorded, and the
ledger update succeeds.
`auto-git-finish.mjs` validates the run's `decisionReceipt` before it reports
done. It blocks when the receipt requires evidence that is missing: clean
working tree, commit evidence after changes, branch/worktree evidence,
verification, push/sync, PR/merge/land, release-preflight, release execution or
explicit deferral, follow-up thread handoff, return to main/default, and the
final ledger update. Blockers are short command-class hints and do not include
raw diffs, command output, transcripts, or secret-looking values.

For release and yolo routes, `auto-git release-preflight` records successful
preflight evidence to the active or requested run using safe metadata only.
If release execution is intentionally deferred, finish requires an explicit
`--defer-release`.

Completion from main/default still preserves the completed branch/head in the
ledger so later chats can find the exact handoff.
Expand Down
18 changes: 13 additions & 5 deletions gists/auto-git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,21 @@ Controller helpers:
auto-git start --cwd "$PWD" --task "fix this"
auto-git ledger list --cwd "$PWD"
auto-git finish --cwd "$PWD" --run-id "<id>" --complete
auto-git release-preflight --cwd "$PWD" --require-verification
auto-git release-preflight --cwd "$PWD" --run-id "<id>" --require-verification
```

`auto-git-finish.mjs` blocks coordinated/everything/yolo completion until the
branch is pushed upstream or merged into a pushed base branch, the checkout is
switched back to main/default, a PR handoff or merge is recorded, and the
ledger update succeeds.
`auto-git-finish.mjs` validates the run's `decisionReceipt` before it reports
done. It blocks when the receipt requires evidence that is missing: clean
working tree, commit evidence after changes, branch/worktree evidence,
verification, push/sync, PR/merge/land, release-preflight, release execution or
explicit deferral, follow-up thread handoff, return to main/default, and the
final ledger update. Blockers are short command-class hints and do not include
raw diffs, command output, transcripts, or secret-looking values.

For release and yolo routes, `auto-git release-preflight` records successful
preflight evidence to the active or requested run using safe metadata only.
If release execution is intentionally deferred, finish requires an explicit
`--defer-release`.

Completion from main/default still preserves the completed branch/head in the
ledger so later chats can find the exact handoff.
Expand Down
16 changes: 12 additions & 4 deletions gists/auto-git/auto-git.SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,26 +250,34 @@ PATH, use the installed skill's `scripts/*.mjs` helper paths as a fallback.
ledger metadata
- never deletes ledger entries
- `auto-git finish --cwd "$PWD" --run-id "<id>" [--complete]`
- checks dirty state, HEAD/upstream, active run locks, PR readiness, and
verification against current HEAD
- checks dirty state, unresolved index state, HEAD/upstream, active run
locks, PR readiness, and verification against current HEAD
- validates the run's `decisionReceipt` completion gates before reporting
done; missing gate evidence fails closed with a short actionable blocker
- blocks completion for coordinated/everything/yolo branch work until the
branch is pushed upstream and the checkout is switched back to main/default
- checks whether there is a recorded PR handoff or pushed merge evidence, and
whether the ledger update actually completed
- blocks release/yolo completion until release-preflight evidence is recorded
and release execution is recorded or explicitly deferred with
`--defer-release`
- blocks follow-up-thread completion until thread handoff evidence exists
- preserves the completed branch/head in the ledger even when completion is
run from main/default after cleanup
- records PR metadata when asked and completes the run only when safe
- `auto-git release-preflight --cwd "$PWD" [--require-verification]`
- `auto-git release-preflight --cwd "$PWD" [--run-id "<id>"] [--require-verification]`
- checks package version, changelog/release notes, dirty state, existing
local tag conflicts, and optional remote release/tag state before tagging
- records successful release-preflight evidence to the active or requested
Auto Git run using safe metadata only
- successful clean release verification may be reused after switching back to
main/default when `HEAD` is unchanged, even if the upstream branch context
changed the dirty fingerprint
- emits `safeToTag`; it never creates, moves, pushes, publishes, or merges

## Global Async State

Auto Git may use global advisory state under `~/.async/auto-git/v1/repos/<repo-hash>/` to avoid repeating expensive inspection and to coordinate across chats. Live runtime leases use Async-compatible lock records under `~/.async/locks/auto-git/repos/<repo-hash>/runs/*.lease.json`; completion removes the live lease and writes a receipt under `~/.async/locks/auto-git/history/`. This state is a cache of safe metadata: fingerprints, file path lists, commit ids, command names, exit codes, timestamps, lock classifications, process ids started by Auto Git, execution profiles, generated env override names/values, durations, recovery hints, run ids, task slugs, lifecycle modes, coordinated intents, branch names, worktree paths, base branches, lease expirations, lease paths, verification keys, and PR URLs/statuses.
Auto Git may use global advisory state under `~/.async/auto-git/v1/repos/<repo-hash>/` to avoid repeating expensive inspection and to coordinate across chats. Live runtime leases use Async-compatible lock records under `~/.async/locks/auto-git/repos/<repo-hash>/runs/*.lease.json`; completion removes the live lease and writes a receipt under `~/.async/locks/auto-git/history/`. This state is a cache of safe metadata: fingerprints, file path lists, commit ids, command names, exit codes, timestamps, lock classifications, process ids started by Auto Git, execution profiles, generated env override names/values, durations, recovery hints, run ids, task slugs, lifecycle modes, coordinated intents, branch names, worktree paths, base branches, lease expirations, lease paths, verification keys, release-preflight evidence, release deferral state, thread handoff ids/status, and PR URLs/statuses.

The ledger is cooperative. Auto Git can reliably detect stale or inactive chats
only when those chats used Auto Git and wrote ledger state. A run is active
Expand Down
Loading
Loading