Skip to content

Commit 3917d47

Browse files
committed
Address savepoint doc review
1 parent e33b96a commit 3917d47

4 files changed

Lines changed: 30 additions & 26 deletions

File tree

README.ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Savepoint는 가벼운 대화 요약이 아닙니다. 복구 가능한 repo/Git
3636

3737
- file mode는 `.savepoint/SAVEPOINT.md`를 씁니다.
3838
- artifact는 repo/Git snapshot, `## Resume Prompt`, 마지막 `SAVEPOINT_V1` marker block을 포함합니다.
39-
- `REDACTION_CHECKED: yes` 전에 생성된 artifact의 secret-like 값을 스캔합니다.
39+
- `REDACTION_CHECKED: yes` 전에 generated artifact를 pattern-based secret-like scan으로 검사합니다.
4040
- bundled validator가 marker shape와 safe-resume 필드를 검사합니다.
4141
- load 시 현재 disk state가 savepoint text보다 우선합니다.
4242

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If a client does not pass custom slash prompts through, use the natural-language
3636

3737
- File mode writes `.savepoint/SAVEPOINT.md`.
3838
- The artifact includes a repo/Git snapshot, `## Resume Prompt`, and one final `SAVEPOINT_V1` marker block.
39-
- Generated artifacts are scanned for secret-like values before `REDACTION_CHECKED: yes`.
39+
- Generated artifacts receive pattern-based secret-like scans before `REDACTION_CHECKED: yes`.
4040
- The bundled validator checks marker shape and safe-resume fields.
4141
- On load, current disk state wins over savepoint text.
4242

scripts/validate-repo.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,24 +292,30 @@ def validate_references(self) -> None:
292292
"SAVEPOINT_V1",
293293
"RESUME_READY: yes",
294294
"Run the bundled CLI; do not inspect implementation source during normal use.",
295+
"Resolve `<savepoint-skill-dir>` before running commands",
295296
"python3 <savepoint-skill-dir>/scripts/savepoint.py save",
297+
"inspect <path> --json",
296298
"append `--force` only when",
297299
"generated, untracked, valid default artifact",
298300
"`validation.project.status`",
299301
"`not-run-justified`",
300302
"`failed-expected`",
301303
"`no-file`, `no files`, `in-response`, or `in the response`",
304+
"Prepare `.savepoint/input.json` as in Save, then run",
302305
"## Load / Resume",
303306
"For inspect-only requests, do not clean up by default.",
304307
"Continue only when the user requested continuation and `RESUME_READY` is `yes`",
305-
"Read `references/contract.md` only when",
308+
"Read references only when normal CLI use is insufficient",
309+
"`references/contract.md`",
310+
"`references/safety.md`",
311+
"`references/template.md`",
306312
]
307313
for phrase in required_skill_phrases:
308314
if phrase not in skill_text:
309315
self.fail(f"SKILL.md missing required policy: {phrase}")
310316
skill_line_count = len(skill_text.splitlines())
311-
if not 55 <= skill_line_count <= 65:
312-
self.fail(f"SKILL.md should stay concise at 55-65 lines, got {skill_line_count}")
317+
if skill_line_count > 65:
318+
self.fail(f"SKILL.md should stay concise at <=65 lines, got {skill_line_count}")
313319
for phrase in [
314320
"direct flags such as",
315321
"do not combine direct flags",
@@ -394,6 +400,7 @@ def validate_readme_format(self) -> None:
394400
"AGENTS.md",
395401
"docs/reference/savepoint-contract.md",
396402
"Savepoint is not a lightweight conversation summary.",
403+
"pattern-based secret-like scans",
397404
]:
398405
if phrase not in readme_text:
399406
self.fail(f"README.md missing entry: {phrase}")
@@ -410,6 +417,7 @@ def validate_readme_format(self) -> None:
410417
"AGENTS.md",
411418
"docs/reference/savepoint-contract.md",
412419
"Savepoint는 가벼운 대화 요약이 아닙니다.",
420+
"pattern-based secret-like scan",
413421
]:
414422
if phrase not in readme_ko_text:
415423
self.fail(f"README.ko.md missing entry: {phrase}")

skills/savepoint/SKILL.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ argument-hint: "[save|load|text] [next-session focus]"
66

77
# Savepoint
88

9-
Create or load a recoverable repo/Git checkpoint without relying on prior chat context.
9+
Create/load a recoverable repo/Git checkpoint without prior chat context.
1010

1111
Modes:
1212
- default or `save`: create or refresh `.savepoint/SAVEPOINT.md`
@@ -17,31 +17,31 @@ If slash prompts are unavailable, treat natural-language `$savepoint` requests t
1717

1818
## Rules
1919

20-
- During save/load verification, stay in savepoint scope and do not edit application code.
20+
- During save/load verification, stay in savepoint scope; do not edit application code.
21+
- Resolve `<savepoint-skill-dir>` before running commands; Claude Code: `${CLAUDE_SKILL_DIR}`.
2122
- Do not run `/new`, `/status`, PTY/session rotation, threshold policy, or background process control.
2223
- Run the bundled CLI; do not inspect implementation source during normal use.
23-
- Prefer current files, Git state, and durable state files over chat memory.
24-
- Do not paste transcripts, full diffs, long logs, shell history, PRDs, ADRs, issues, or commits.
25-
- Reference existing artifacts by path, URL, branch, or commit.
26-
- Redact API keys, tokens, cookies, credentials, private keys, passwords, `.env` values, and PII as `<redacted>`; do not place raw secrets in semantic input files.
24+
- Prefer current disk/Git/durable state over chat memory.
25+
- Do not paste transcripts, diffs, logs, shell history, PRDs, ADRs, issues, or commits; cite paths, URLs, branches, or commits.
26+
- Redact API keys, tokens, cookies, credentials, private keys, passwords, `.env` values, and PII as `<redacted>`; never put raw secrets in input.
2727
- File savepoints must end with exactly one `SAVEPOINT_V1` marker block.
28-
- Keep top-level `SAVEPOINT.md` compact. Use generated `details/*.md` only when needed for recovery.
28+
- Keep top-level `SAVEPOINT.md` compact; use generated `details/*.md` only when needed.
2929

3030
## Create / Save
3131

32-
1. Treat provided focus text, if any, only as next-session focus.
33-
2. Capture repo/Git state and write compact input JSON with `goal`, `current_state`, `next_action`, `files_to_inspect_first`, and `unresolved_blockers`; start with `python3 <savepoint-skill-dir>/scripts/savepoint.py init-input --output .savepoint/input.json` if blank.
34-
3. Set `validation.project.status` to one of `passed`, `failed-expected`, `failed-blocking`, `not-run-justified`, or `not-run-unknown`. For `failed-expected`, include failed command/result/summary evidence, an explicit reason, and next validation command. For `not-run-justified`, include a reason and next validation command.
35-
4. Run `python3 <savepoint-skill-dir>/scripts/savepoint.py save --input .savepoint/input.json --output .savepoint/SAVEPOINT.md --assert-no-active-commands --scan-redaction --validate`. Inside this repository, `python3 scripts/savepoint.py save ...` also works.
32+
1. Treat any focus text only as next-session focus.
33+
2. Capture repo/Git state in compact input JSON with `goal`, `current_state`, `next_action`, `files_to_inspect_first`, and `unresolved_blockers`; if blank, start with `python3 <savepoint-skill-dir>/scripts/savepoint.py init-input --output .savepoint/input.json`.
34+
3. Set `validation.project.status` to `passed`, `failed-expected`, `failed-blocking`, `not-run-justified`, or `not-run-unknown`. `failed-expected` needs failed command/result/summary evidence, reason, and next validation command. `not-run-justified` needs reason and next validation command.
35+
4. Run `python3 <savepoint-skill-dir>/scripts/savepoint.py save --input .savepoint/input.json --output .savepoint/SAVEPOINT.md --assert-no-active-commands --scan-redaction --validate`; in this repo, `python3 scripts/savepoint.py save ...` also works.
3636
5. Inspect only the generated `.savepoint/SAVEPOINT.md`.
3737
6. Report exact path, `RESUME_READY`, blockers if any, and the first next action.
3838

39-
`savepoint.py save` exit code `2` can still mean a not-ready `SAVEPOINT.md` was written. Inspect the file, report blockers, and do not continue unless `RESUME_READY: yes`.
39+
Exit code `2` may still write a not-ready `SAVEPOINT.md`; inspect it, report blockers, and do not continue unless `RESUME_READY: yes`.
4040

4141
## Load / Resume
4242

43-
1. Read the selected savepoint: user path first, then `.savepoint/SAVEPOINT.md`.
44-
2. Verify cwd, Git root, branch, short HEAD, status, and diff against current disk state.
43+
1. Select the user path first, otherwise `.savepoint/SAVEPOINT.md`; run `python3 <savepoint-skill-dir>/scripts/savepoint.py inspect <path> --json`.
44+
2. Verify cwd, Git root, branch, short HEAD, status, and diff against disk state.
4545
3. Disk state wins over savepoint text. Report drift before edits.
4646
4. Continue only when the user requested continuation and `RESUME_READY` is `yes`, with no blocking drift or missing required file.
4747
5. For inspect-only requests, do not clean up by default.
@@ -50,16 +50,12 @@ If slash prompts are unavailable, treat natural-language `$savepoint` requests t
5050

5151
Use text mode only when the user explicitly asks for copy-paste, text-only, `no-file`, `no files`, `in-response`, or `in the response`.
5252

53-
Run `python3 <savepoint-skill-dir>/scripts/savepoint.py text --input .savepoint/input.json`.
53+
Prepare `.savepoint/input.json` as in Save, then run `python3 <savepoint-skill-dir>/scripts/savepoint.py text --input .savepoint/input.json`.
5454

55-
Text mode must not claim `.savepoint/SAVEPOINT.md` was written, repo recovery is guaranteed, or `RESUME_READY: yes`.
55+
Text mode must not claim `.savepoint/SAVEPOINT.md` was written, recovery is guaranteed, or `RESUME_READY: yes`.
5656

5757
## Advanced Cases
5858

59-
Read `references/contract.md` only when marker semantics, cleanup, stale savepoints, detail spillover, overwrite adoption, or safe-resume edge cases are unclear.
59+
Read references only when normal CLI use is insufficient: `references/contract.md` for marker/safe-resume/cleanup/staleness/detail/overwrite edge cases, `references/safety.md` for secret-like paths, and `references/template.md` when the renderer is unavailable.
6060

6161
For refresh, append `--force` only when the existing file is the generated, untracked, valid default artifact `.savepoint/SAVEPOINT.md` and the user did not ask to preserve history; otherwise preserve or ask.
62-
63-
Read `references/safety.md` only when secret redaction or secret-like paths are involved.
64-
65-
Read `references/template.md` only when the renderer is unavailable and a manual artifact is unavoidable.

0 commit comments

Comments
 (0)