aget-wind-down
End an AGET agent session properly. This skill runs the wind-down protocol to capture session state, run sanity checks, and prepare handoff notes.
Instructions
When this skill is invoked:
Run the wind-down script:
python3 scripts/wind_down.py
The script will:
- Run sanity checks (housekeeping protocol)
- Capture session duration and activity
- Scan for pending work in
planning/
- Generate session summary
- Suggest commit message if changes exist
If user provides notes, pass them to the script:
python3 scripts/wind_down.py --notes "User provided notes here"
Create session record file at sessions/SESSION_YYYY-MM-DD_descriptive_title.md:
- Use YAML frontmatter with Session Metadata Standard v1.0 fields (date, duration_minutes, objectives, outcomes)
- Include optional fields: learnings, commits, files_changed, pain_points, next_steps
- Add session body sections: Objectives, Deliverables, Outcomes, Lessons, Blockers, Files Changed
- Capture wind-down state in the file: sanity result, pending work, git diff stats
- Reference schema:
.aget/schemas/session_metadata_v1.0.yaml
- Reference exemplar:
sessions/SESSION_2025-12-03_kb_enhancement.md
If re-entrancy guard blocks (exit code 4), inform user:
- Wind-down was run recently (5-minute cooldown)
- Use
--force to bypass if needed
Required Outputs
Every wind-down must produce:
- Terminal summary (stdout) — sanity, changes, pending, suggested commit
- Session record file —
sessions/SESSION_YYYY-MM-DD_*.md (L004: process governance)
Output Format
Present the wind-down summary:
Wind Down Complete
- Session: [duration]
- Sanity: [healthy/warnings/errors]
- Pending: [N] items in planning/
- Changes: [staged/unstaged counts]
- Suggested commit: "[message]"
Error Handling
- Exit code 0: Clean close, sanity healthy
- Exit code 1: Close with warnings (report them)
- Exit code 2: Close with errors (require acknowledgment)
- Exit code 3: Configuration error
- Exit code 4: Re-entrancy guard active
Options
--skip-sanity: Skip sanity check (not recommended)
--force: Bypass re-entrancy guard (L468)
--json: Machine-readable output
Related
- L004: Process Governance Gap (session file as required output)
- L468: Re-entrancy Protection
- L532: Skills vs Learnings Distinction
- CAP-SESSION-003: Wind Down Protocol
1---2name: aget-wind-down3description: End AGET session with state capture and sanity checks4---5
6# aget-wind-down
7
8End an AGET agent session properly. This skill runs the wind-down protocol to capture session state, run sanity checks, and prepare handoff notes.
9
10## Instructions
11
12When this skill is invoked:
13
141. Run the wind-down script:
15 ```bash
16 python3 scripts/wind_down.py
17 ```
18
192. The script will:
20 - Run sanity checks (housekeeping protocol)
21 - Capture session duration and activity
22 - Scan for pending work in `planning/`
23 - Generate session summary
24 - Suggest commit message if changes exist
25
263. If user provides notes, pass them to the script:
27 ```bash
28 python3 scripts/wind_down.py --notes "User provided notes here"
29 ```
30
314. Create session record file at `sessions/SESSION_YYYY-MM-DD_descriptive_title.md`:
32 - Use YAML frontmatter with Session Metadata Standard v1.0 fields (date, duration_minutes, objectives, outcomes)
33 - Include optional fields: learnings, commits, files_changed, pain_points, next_steps
34 - Add session body sections: Objectives, Deliverables, Outcomes, Lessons, Blockers, Files Changed
35 - Capture wind-down state in the file: sanity result, pending work, git diff stats
36 - Reference schema: `.aget/schemas/session_metadata_v1.0.yaml`
37 - Reference exemplar: `sessions/SESSION_2025-12-03_kb_enhancement.md`
38
395. If re-entrancy guard blocks (exit code 4), inform user:
40 - Wind-down was run recently (5-minute cooldown)
41 - Use `--force` to bypass if needed
42
43## Required Outputs
44
45Every wind-down must produce:
461. Terminal summary (stdout) — sanity, changes, pending, suggested commit
472. Session record file — `sessions/SESSION_YYYY-MM-DD_*.md` (L004: process governance)
48
49## Output Format
50
51Present the wind-down summary:
52```
53Wind Down Complete
54- Session: [duration]
55- Sanity: [healthy/warnings/errors]
56- Pending: [N] items in planning/
57- Changes: [staged/unstaged counts]
58- Suggested commit: "[message]"
59```
60
61## Error Handling
62
63- Exit code 0: Clean close, sanity healthy
64- Exit code 1: Close with warnings (report them)
65- Exit code 2: Close with errors (require acknowledgment)
66- Exit code 3: Configuration error
67- Exit code 4: Re-entrancy guard active
68
69## Options
70
71- `--skip-sanity`: Skip sanity check (not recommended)
72- `--force`: Bypass re-entrancy guard (L468)
73- `--json`: Machine-readable output
74
75## Related
76
77- L004: Process Governance Gap (session file as required output)
78- L468: Re-entrancy Protection
79- L532: Skills vs Learnings Distinction
80- CAP-SESSION-003: Wind Down Protocol