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
2 changes: 2 additions & 0 deletions docs/gists/auto-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Gist file mapping:

- Detects repo root, branch, upstream, default branch, dirty state, and worktree topology before staging.
- Uses a compact snapshot helper to detect Git index write capability, run locks, package-manager hints, ledger occupancy, PR handoffs, PR readiness, and the recommended verification profile before expensive commands.
- Writes a sanitized start decision receipt on claimed runs, including the normalized route, selected workflow, required gates, branch/worktree context, release-preflight requirement, and follow-up thread handoff requirement without storing raw transcript text.
- Supports two workflows: local review for single-chat code review and coordinated branch for multi-chat conflicts, PR handoffs, experiments, and fanouts.
- Tracks cooperative run state and PR handoffs under `~/.async/auto-git/v1/repos/<repo-hash>/ledger.json`, with live leases under `~/.async/locks/auto-git/`, without storing raw diffs, prompts, full command output, environment dumps, or secrets.
- Commits by change intent instead of making one vague bulk commit.
Expand Down Expand Up @@ -323,6 +324,7 @@ auto-git snapshot --cwd "$PWD" --write-state --record-pr "<run-id>" --pr-url "ht
```

The snapshot emits `occupancy`, `handoffs.openPrs`, `recommendedAction`, and `prReadiness` so future chats can continue, supersede, or merge by explicit instruction.
Claimed runs also carry `decisionReceipt` in the snapshot and ledger. The receipt is the durable routing authority for follow-up helpers: it records a sanitized actionable-turn summary, normalized intent label, selected workflow, required completion gates, active branch/worktree context, and whether release preflight or thread handoff evidence is required.

Controller helpers:

Expand Down
2 changes: 2 additions & 0 deletions gists/auto-git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Gist file mapping:

- Detects repo root, branch, upstream, default branch, dirty state, and worktree topology before staging.
- Uses a compact snapshot helper to detect Git index write capability, run locks, package-manager hints, ledger occupancy, PR handoffs, PR readiness, and the recommended verification profile before expensive commands.
- Writes a sanitized start decision receipt on claimed runs, including the normalized route, selected workflow, required gates, branch/worktree context, release-preflight requirement, and follow-up thread handoff requirement without storing raw transcript text.
- Supports two workflows: local review for single-chat code review and coordinated branch for multi-chat conflicts, PR handoffs, experiments, and fanouts.
- Tracks cooperative run state and PR handoffs under `~/.async/auto-git/v1/repos/<repo-hash>/ledger.json`, with live leases under `~/.async/locks/auto-git/`, without storing raw diffs, prompts, full command output, environment dumps, or secrets.
- Commits by change intent instead of making one vague bulk commit.
Expand Down Expand Up @@ -323,6 +324,7 @@ auto-git snapshot --cwd "$PWD" --write-state --record-pr "<run-id>" --pr-url "ht
```

The snapshot emits `occupancy`, `handoffs.openPrs`, `recommendedAction`, and `prReadiness` so future chats can continue, supersede, or merge by explicit instruction.
Claimed runs also carry `decisionReceipt` in the snapshot and ledger. The receipt is the durable routing authority for follow-up helpers: it records a sanitized actionable-turn summary, normalized intent label, selected workflow, required completion gates, active branch/worktree context, and whether release preflight or thread handoff evidence is required.

Controller helpers:

Expand Down
23 changes: 16 additions & 7 deletions gists/auto-git/auto-git.SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ an already-established Auto Git mode for that action.
must not fail the whole snapshot. Auto Git state must not store raw diffs,
file contents, environment values, tokens, npmrc content, or full command
output.

2. Use the snapshot's `workflowMode`, `occupancy`, `recommendedAction`, and
`prReadiness` before mutating:
When a run is claimed, `auto-git start`/`auto-git snapshot` also attach a
small `decisionReceipt` to the ledger run. The receipt records the sanitized
routing summary, normalized intent label, selected workflow, required gates,
branch/worktree context, and release/thread handoff requirements without
storing raw transcript text.

2. Use the snapshot's `workflowMode`, `occupancy`, `recommendedAction`,
`decisionReceipt`, and `prReadiness` before mutating:
- if `occupancy.status` is `occupied`, create or reuse an isolated
worktree/branch instead of editing the occupied checkout
- if `occupancy.status` is `stale` or `abandoned-candidate`, inspect the
Expand Down Expand Up @@ -208,8 +213,9 @@ PATH, use the installed skill's `scripts/*.mjs` helper paths as a fallback.

- `auto-git start --cwd "$PWD" --task "<request>"`
- wraps snapshot and `--claim-run`
- emits `workflowMode`, `recommendedAction`, run id, PR readiness, and the
suggested worktree command for coordinated branch work
- emits `workflowMode`, `recommendedAction`, run id, PR readiness,
`decisionReceipt`, and the suggested worktree command for coordinated
branch work
- `auto-git snapshot --cwd "$PWD" --write-state`
- snapshots topology, dirty fingerprints, Git index write capability, root
and `examples/**/.async/run.lock` state, package-manager hints, and the
Expand All @@ -221,9 +227,11 @@ PATH, use the installed skill's `scripts/*.mjs` helper paths as a fallback.
a run removes the live lease and keeps a completion receipt under
`~/.async/locks/auto-git/history/`
- supports `--claim-run <task>`, `--intent <name>`,
`--lifecycle <checkpoint|sync|land|fanout>`,
`--lifecycle <checkpoint|sync|land|fanout|everything|yolo>`,
`--heartbeat-run <run-id>`, `--complete-run <run-id>`, and
`--record-pr <run-id> --pr-url <url> [--pr-number <n>]`
- stores a sanitized decision receipt on claimed runs so later helpers and
chats can inspect the original route without reading raw prompts
- emits `occupancy.status`, `handoffs.openPrs`, `recommendedAction`, and
`prReadiness` so later chats can continue, supersede, or hand off work
- classifies inaccessible PIDs with optional `ps` metadata; an unrelated
Expand All @@ -238,7 +246,8 @@ PATH, use the installed skill's `scripts/*.mjs` helper paths as a fallback.
process-tree diagnostics
- `auto-git ledger list|show|stale|handoffs --cwd "$PWD"`
- prints active runs, stale runs, completed runs, PR handoffs, branches,
worktrees, leases, and verification state from safe ledger metadata
worktrees, leases, decision receipts, and verification state from safe
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
Expand Down
6 changes: 4 additions & 2 deletions gists/auto-git/auto-git.script-auto-git-ledger.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ function publicRun(run, statusById) {
recordedAt: run.verification.recordedAt
}
: undefined,
pr: run.pr
pr: run.pr,
decisionReceipt: run.decisionReceipt
};
}

Expand Down Expand Up @@ -166,7 +167,8 @@ function printText(receipt) {
}
for (const run of receipt.runs) {
const pr = run.pr?.url ? ` pr=${run.pr.url}` : "";
console.log(`${run.id} status=${run.status} lifecycle=${run.lifecycle} intent=${run.intent} branch=${run.branch ?? "none"}${pr}`);
const decision = run.decisionReceipt?.normalizedIntentLabel ? ` decision=${run.decisionReceipt.normalizedIntentLabel}` : "";
console.log(`${run.id} status=${run.status} lifecycle=${run.lifecycle} intent=${run.intent}${decision} branch=${run.branch ?? "none"}${pr}`);
}
}

Expand Down
Loading
Loading