Implement record, show, list, and export commands; document session-close protocol template; extend cheat sheet and agency-framework docs; add CLI tests.
1.2 KiB
1.2 KiB
Session-Close Protocol Template
Reference template for memory-enabled agents. Copy the Session Close block
into agents/agent-<name>.md and adapt the metrics line to the agent.
Session Close
- Update
## Accumulated Findings,## What Worked, and## Watch Pointsas needed. - Append one line to
## Session Log:YYYY-MM-DD · <summary> · <outcome>. - Bump
last_updatedto today and incrementsession_countin memory frontmatter. - Record session metrics (adjust flags to match outcome):
kaizen-agentic metrics record <agent-name> --success --time <seconds> --quality <0.0-1.0>
# or on failure:
kaizen-agentic metrics record <agent-name> --failure --time <seconds>
Optional: pass a full JSON record (ADR-004 schema) via stdin:
echo '{"success": true, "quality_score": 0.9, "primary_metric": {"name": "...", "value": 1.0, "target": 1.0}}' \
| kaizen-agentic metrics record <agent-name> --json
Use --idempotency-key <session-id> to avoid duplicate records if the close
protocol runs more than once for the same session.
Pilot agents
tdd-workflow is the reference implementation (WP-0003 Part 5). Other
memory-enabled agents should adopt this block as the metrics CLI becomes available
in their workflows.