c_agri_trade/process/.agents/skills/up-context-checkpoint/SKILL.md

79 lines
3.8 KiB
Markdown

---
name: up-context-checkpoint
description: Save or resume a lightweight checkpoint of in-progress AI-agent work — which stage/iteration is active, what was just completed, what's mid-flight, what decisions are still pending, and the exact next action — so a new session (or a different agent) can rehydrate context and continue without re-deriving it from scratch. Use this at the end of any work session before context runs low or before handing off, and at the start of any session that continues prior work. This is a cross-cutting mechanic supporting AI-agent-driven development with agents/skills/templates in UP-AI v1.0 (process/AI_Native_Unified_Process_v1.md).
---
# up-context-checkpoint — Cross-cutting (any stage, any phase)
## Objective
Give AI-agent-driven work a cheap, structured way to pause and resume without losing context — what stage of the process is active, which artifacts are mid-authoring, which decisions are still open, and exactly what to do next.
A checkpoint is not a substitute for governance registers and not a duplicate of them — it's a short pointer document that says which stage/skill was running, what it had just done, what it was about to do, and which of the other registers to consult for the substance. Keep it concise.
## When to invoke
**Save a checkpoint:**
- At the natural end of a work session.
- Before context is about to run low mid-task.
- Before handing off to a different agent/session/developer.
- Immediately before anything requiring human input that will pause work for an unknown duration.
**Resume a checkpoint:**
- At the start of any session continuing prior work — read the latest checkpoint before doing anything else.
## Read first
- `project_sdlc/00_process_control/checkpoints/checkpoint_index.md` (pointer to the latest checkpoint, if any)
- The referenced registers named in that checkpoint (`traceability_graph.md`, `change_request_register.md`, `decision_log.md`, `ambiguity_register.md`, current iteration's `iteration_backlog.md`)
## Procedure
### Saving a checkpoint
```
Write a checkpoint for the current work session to
project_sdlc/00_process_control/checkpoints/checkpoint-<NNN>-<short-slug>.md:
- Checkpoint ID: CKPT-<NNN>
- Date, and which stage/gate/iteration was active
- What was just completed this session (short list of artifacts created/updated with paths)
- What is mid-flight / partially done
- Open items blocking progress (pointers to CR-xxx, AMB-xxx, or DEC-xxx)
- The exact next action: which skill to invoke, with what scope/args
Update project_sdlc/00_process_control/checkpoints/checkpoint_index.md to point to
this checkpoint as the latest.
```
### Resuming a checkpoint
```
Read project_sdlc/00_process_control/checkpoints/checkpoint_index.md to find the
latest checkpoint, then read that checkpoint file.
Before continuing:
1. Verify the checkpoint's "what was just completed" list matches repo state.
2. Check whether referenced pointers (CR-xxx, AMB-xxx, DEC-xxx) have been resolved.
3. If the next action is still valid, execute it; if stale, propose the corrected next action.
```
## Output expected
`project_sdlc/00_process_control/checkpoints/checkpoint-<NNN>-<slug>.md`; updated `checkpoint_index.md`.
## Exit criteria
**Save:** the checkpoint file exists, the index points to it, and the "next action" is concrete.
**Resume:** the checkpoint has been verified against current repo state and executed.
## Sample invocation
> "We're stopping here for today — save a checkpoint. We just finished UC-001's architecture spike validation; UC-002 through UC-005 still need up-use-case-author before Gate 5.1 can be re-run across the full authentication slice."
> "Starting a new session — resume from the last checkpoint and tell me what's next."
## Related skills
Usable alongside any other skill in the process.