-
Notifications
You must be signed in to change notification settings - Fork 0
[codex] Clarify savepoint onboarding #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,8 @@ | ||||||||||||
| # Savepoint | ||||||||||||
|
|
||||||||||||
| Savepoint creates or verifies a recoverable coding-session checkpoint so a fresh agent can continue from current repo/Git state without prior chat context. | ||||||||||||
| A repo/Git savepoint artifact for coding-agent handoff after compaction, reset, or transfer. | ||||||||||||
|
|
||||||||||||
| Savepoint creates or verifies `.savepoint/SAVEPOINT.md` so a fresh agent can continue from current repo/Git state without prior chat context. It records the repo snapshot, validation posture, redaction status, and resume prompt that a plain summary can miss. | ||||||||||||
|
|
||||||||||||
| Savepoint is not a lightweight conversation summary. It is a recoverable repo/Git checkpoint; use `/savepoint text` or an ordinary summary when file recovery is unnecessary. | ||||||||||||
|
|
||||||||||||
|
|
@@ -17,13 +19,48 @@ If a client does not pass custom slash prompts through, use the natural-language | |||||||||||
|
|
||||||||||||
| [Korean README](README.ko.md) | ||||||||||||
|
|
||||||||||||
| ## Install | ||||||||||||
|
|
||||||||||||
| From a clone of this repository, preview first: | ||||||||||||
|
|
||||||||||||
| ```bash | ||||||||||||
| # Claude user install | ||||||||||||
| python3 scripts/install.py --target claude --scope user | ||||||||||||
|
|
||||||||||||
| # Codex repo install | ||||||||||||
| python3 scripts/install.py --target codex --scope repo --repo-root /path/to/target-repo --add-gitignore | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| Apply after reviewing the destination: | ||||||||||||
|
|
||||||||||||
| ```bash | ||||||||||||
| python3 scripts/install.py --target claude --scope user --apply | ||||||||||||
| python3 scripts/install.py --target codex --scope repo --repo-root /path/to/target-repo --apply --add-gitignore | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| The helper defaults to dry-run, refuses existing destinations, and writes files only with `--apply`. With repo-scope install, `--add-gitignore` appends `.savepoint/`. | ||||||||||||
|
|
||||||||||||
| Quick check from this repository: | ||||||||||||
|
|
||||||||||||
| ```bash | ||||||||||||
| python3 scripts/savepoint.py validate --allow-example-paths examples/file-bugfix/SAVEPOINT.md | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| On Windows, prefer the install helper or a normal Git clone/worktree. Archive extraction tools can mishandle symlinks. | ||||||||||||
|
|
||||||||||||
| ## When to use | ||||||||||||
|
|
||||||||||||
| - The context window is full or likely to compact. | ||||||||||||
| - You are about to reset or transfer a coding-agent session. | ||||||||||||
| - A multi-file refactor needs a verifiable resume point. | ||||||||||||
| - Codex, Claude, Gemini, or an external orchestrator must hand off repo state. | ||||||||||||
|
|
||||||||||||
| ## Choosing a handoff | ||||||||||||
|
|
||||||||||||
| - Use an ordinary summary when no repo recovery is needed. | ||||||||||||
| - Use `/savepoint text` for a copy-paste note without file recovery. | ||||||||||||
| - Use `/savepoint` when the next agent must verify disk/Git state before continuing. | ||||||||||||
|
|
||||||||||||
| ## When not to use | ||||||||||||
|
|
||||||||||||
| - A short ordinary summary is enough. | ||||||||||||
|
|
@@ -40,6 +77,25 @@ If a client does not pass custom slash prompts through, use the natural-language | |||||||||||
| - The bundled validator checks marker shape and safe-resume fields. | ||||||||||||
| - On load, current disk state wins over savepoint text. | ||||||||||||
|
|
||||||||||||
| ## Example load report | ||||||||||||
|
|
||||||||||||
| A typical `/savepoint load` report answers whether a fresh agent can continue safely: | ||||||||||||
|
|
||||||||||||
| ```text | ||||||||||||
| Loaded: .savepoint/SAVEPOINT.md | ||||||||||||
| Git root: matches | ||||||||||||
| Branch: feature/auth matches | ||||||||||||
| HEAD: matches | ||||||||||||
| Working tree drift: none | ||||||||||||
| Required files: present | ||||||||||||
| Detail artifacts: none needed | ||||||||||||
| Redaction: checked | ||||||||||||
|
Comment on lines
+90
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To maintain consistency with the sample load report in
Suggested change
|
||||||||||||
| Savepoint validation: passed | ||||||||||||
| Project validation: passed | ||||||||||||
| RESUME_READY: yes | ||||||||||||
| Next action: run npm test -- tests/auth/session.test.ts | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ## What it does not guarantee | ||||||||||||
|
|
||||||||||||
| - Tests pass. | ||||||||||||
|
|
@@ -65,22 +121,6 @@ python3 scripts/savepoint.py inspect .savepoint/SAVEPOINT.md --json | |||||||||||
|
|
||||||||||||
| Use `validation.project.status` values `passed`, `failed-expected`, `failed-blocking`, `not-run-justified`, or `not-run-unknown`. With `--scan-redaction`, the input JSON is scanned before rendering; do not put raw secrets in `.savepoint/input.json`. | ||||||||||||
|
|
||||||||||||
| ## Install | ||||||||||||
|
|
||||||||||||
| Recommended commands: | ||||||||||||
|
|
||||||||||||
| ```bash | ||||||||||||
| # Claude user install | ||||||||||||
| python3 scripts/install.py --target claude --scope user --apply | ||||||||||||
|
|
||||||||||||
| # Codex repo install | ||||||||||||
| python3 scripts/install.py --target codex --scope repo --apply --add-gitignore | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| The helper defaults to dry-run. It writes files only with `--apply`. With repo-scope install, `--add-gitignore` appends `.savepoint/`. | ||||||||||||
|
|
||||||||||||
| On Windows, prefer the install helper or a normal Git clone/worktree. Archive extraction tools can mishandle symlinks. | ||||||||||||
|
|
||||||||||||
| ## Runtime boundary | ||||||||||||
|
|
||||||||||||
| Normal create/load should use only: | ||||||||||||
|
|
@@ -94,8 +134,10 @@ Examples, evals, maintainer docs, and repository validation scripts are not norm | |||||||||||
|
|
||||||||||||
| ## Examples | ||||||||||||
|
|
||||||||||||
| - `examples/README.md`: scenario index. | ||||||||||||
| - `examples/file-bugfix/`: small file savepoint. | ||||||||||||
| - `examples/file-architecture/`: savepoint with focused `details/*.md` spillover. | ||||||||||||
| - `examples/load-report/`: sample load reports. | ||||||||||||
| - `examples/text-note/`: response-only `/savepoint text` note. | ||||||||||||
| - `examples/unsafe-savepoint/`: intentionally unsafe `RESUME_READY: no` artifact. | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Eval: Ordinary Summary vs Savepoint | ||
|
|
||
| ## Scenario | ||
|
|
||
| A coding agent changed five files, recorded one expected failing test, and left one narrow next action. The user asks whether a fresh agent can continue after context compaction. | ||
|
|
||
| Compare two handoff styles: | ||
|
|
||
| - Ordinary summary: short prose with the goal and current task. | ||
| - Savepoint file mode: `.savepoint/SAVEPOINT.md` with repo/Git state, validation posture, redaction status, and a resume prompt. | ||
|
|
||
| ## Expected | ||
|
|
||
| - Identifies changed files from disk/Git state, not prior chat. | ||
| - Reports validation status before continuation. | ||
| - Notices stale branch, HEAD, status, required-file, or validation drift. | ||
| - Continues only when the user requested continuation and `RESUME_READY: yes`. | ||
| - Uses the smallest recorded next action instead of broad refactoring. | ||
|
|
||
| ## Failure Conditions | ||
|
|
||
| - Treats a plain summary as proof that disk/Git state still matches. | ||
| - Continues past drift without reporting it. | ||
| - Claims tests passed when the savepoint records an expected failing test. | ||
| - Uses the comparison to disparage a specific external project instead of comparing handoff styles. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Savepoint Examples | ||
|
|
||
| These examples show what Savepoint records and what a resume agent should verify. | ||
|
|
||
| | Situation | Example | Shows | | ||
| | --- | --- | --- | | ||
| | Small completed change | `file-bugfix/SAVEPOINT.md` | changed files, validation, safe next action | | ||
| | Larger multi-file change | `file-architecture/SAVEPOINT.md` | focused `details/*.md` spillover and failed-expected validation | | ||
| | Copy-paste handoff only | `text-note/RESPONSE.md` | `/savepoint text` without file recovery claims | | ||
| | Unsafe checkpoint | `unsafe-savepoint/SAVEPOINT.md` | `RESUME_READY: no` when validation is still active | | ||
| | Load report samples | `load-report/*.REPORT.md` | how a resume check can report clean or stale state | | ||
|
|
||
| These are examples, not normal runtime context. Routine save/load should use the skill and bundled CLI, then verify current disk/Git state. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Sample Load Report: Clean Resume | ||
|
|
||
| This is a sample agent report after `/savepoint load`, not raw CLI output. | ||
|
|
||
| ```text | ||
| Loaded: .savepoint/SAVEPOINT.md | ||
| Git root: matches | ||
| Branch: feature/auth matches | ||
| HEAD: matches | ||
| Working tree drift: none | ||
| Required files: present | ||
| Detail artifacts: none needed | ||
| Redaction: checked | ||
| Savepoint validation: passed | ||
| Project validation: passed | ||
| RESUME_READY: yes | ||
| Next action: run npm test -- tests/auth/session.test.ts | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Sample Load Report: Stale Disk State | ||
|
|
||
| This is a sample agent report after `/savepoint load`, not raw CLI output. | ||
|
|
||
| ```text | ||
| Loaded: .savepoint/SAVEPOINT.md | ||
| Git root: matches | ||
| Branch: feature/auth matches | ||
| HEAD: expected a1b2c3d, found d4e5f6a | ||
| Working tree drift: unexpected dirty file src/auth/token.ts | ||
| Required files: present | ||
| Detail artifacts: not read; drift blocks continuation | ||
| Redaction: checked | ||
| Savepoint validation: passed | ||
| Project validation drift: recorded result was for the previous HEAD | ||
| RESUME_READY: no | ||
| Blocker: disk/Git state changed after the savepoint was written | ||
| Next action: inspect current git status and decide whether to refresh the savepoint | ||
| ``` |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To maintain consistency with the sample load report in
examples/load-report/clean-resume.REPORT.md, please include theDetail artifacts: none neededline in this example load report.