# Goal Ledger Resume

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-jpbaking-goal-ledger-goal-ledger-resume`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jpbaking](https://agentstack.voostack.com/s/jpbaking)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** 0BSD
- **Upstream author:** [jpbaking](https://github.com/jpbaking)
- **Source:** https://github.com/jpbaking/goal-ledger/tree/main/skills/shared/goal-ledger-resume

## Install

```sh
agentstack add skill-jpbaking-goal-ledger-goal-ledger-resume
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Goal Ledger — resume and recover

Treat the ledger and Git as evidence left by another agent. Establish what is verified, repair bookkeeping without discarding work, and continue from the first safe action.

## 1. Load the contract

If you are a subagent, ignore the ledger and this skill, then continue only the task in the prompt handed to you. Do not treat an unfinished ledger as a blocker or report it unless the prompt explicitly asks for ledger work.

Otherwise, read sections 1–3 of the sibling `goal-ledger` skill. If `.goal-ledger/GOAL.md` is missing, say there is no ledger to resume. If status is `completed` or `abandoned`, report that and stop.

## 2. Decide whether this request resumes the goal

- The user asks to resume, or the request matches the recorded Outcome: resume without another intent question.
- The ledger is `blocked-on-human` and the user answers its blockers: record the answers, return affected items to `[todo]`, and continue.
- Status `drafting`: return to Gate A. Status `approved`: if strategy, branch, baseline, or approval commit is missing or inconsistent, return to Gate B; otherwise return to Gate C. Status `awaiting-acceptance`: report the result and ask for acceptance; do not resume execution.
- An unrelated request: report the unfinished goal and ask whether to resume it or use `goal-ledger-abandon`. Never overwrite it silently.

## 3. Reconcile Git

Skip Git steps when `Repository: no`.

1. Verify the current branch equals `Work branch`. If not, do not switch with a dirty tree. Report both branches and ask before switching.
2. Verify the immutable baseline exists and is an ancestor of `HEAD`. If not, stop with the exact inconsistency.
3. Inspect `git log ..HEAD`, including commit trailers. Classify matching Goal-ID commits, foreign commits, merge commits, and phase begin/close pairs. Record foreign history in Handoff; it may prohibit squashing but does not justify deleting work.
4. Compare locally known starting/work upstream refs with their recorded Gate B SHAs. Record advances, rewinds, divergence, or goal-commit publication in Handoff. On `current-branch`, any upstream movement prohibits automated squash.
5. Inspect the worktree. A phase-begin commit followed by a clean tree means phase work did not start. A dirty tree means work may have stopped mid-phase; inspect the diff and do not discard it.
6. A completed phase without a matching close commit is unverified until its phase check passes. A close commit with stale ledger status may be reconciled after its check passes.

## 4. Verify and repair state

- Trust no `[ongoing]` sub-task merely because files changed. Run its "done when" check. If it passes, mark it done and log `verified on resume`; otherwise return it to `[todo]` and redo it deliberately.
- Repair multiple ongoing items, `GOAL.md`/phase mismatches, missing reason suffixes, stale `Last completed phase`, and stale Handoff fields. The phase file wins status disagreements.
- If a phase is fully complete, close and commit it under the Goal Ledger Git contract. If not, retain the committed begin marker and continue its work.
- Append a resume event to `GOAL.md` and identify the evidence used.
- Run the validator bundled with the sibling `goal-ledger` skill as `scripts/validate_goal_ledger.py --root `. Repair ledger errors before continuing; record Git warnings in Handoff. If Python 3 is unavailable, check the section 2 invariants and Git contract manually.

## 5. Continue

Re-enter section 6 of the `goal-ledger` skill. Preserve its commit identity, phase checks, stop conditions, acceptance, and squash safeguards.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jpbaking](https://github.com/jpbaking)
- **Source:** [jpbaking/goal-ledger](https://github.com/jpbaking/goal-ledger)
- **License:** 0BSD

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jpbaking-goal-ledger-goal-ledger-resume
- Seller: https://agentstack.voostack.com/s/jpbaking
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
