com um clique
session-end
End-of-session cleanup, documentation, and commit
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
End-of-session cleanup, documentation, and commit
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Refresh priority signals, manage active epics, and refresh Near Term pool
Multi-session deliverable play for projects spanning 3+ sessions with concrete outputs (proposals, strategies, wireframes). Provides project-level structure, evidence provenance, and cross-session handoff.
Investigation-driven card grooming — investigate across data sources, synthesize findings into card content, present for approval
Use when acting as a reviewer in an AgenTerminal review conversation. Handles both code reviews (REVIEW_APPROVED) and plan reviews (PLAN_APPROVED).
Match Slack
Weekly release impact review — pull PostHog data for Released cards and tracked PRs, classify, draft observations, post to Slack
| name | session-end |
| description | End-of-session cleanup, documentation, and commit |
| disable-model-invocation | true |
End-of-session cleanup, documentation, and commit.
1a. Fix class audit. If the session included fixes (code, documentation, process, plays, tooling), enumerate each fix and ask: is this a narrow instance of a broader class of the same issue? Would it be reasonable for the user to discover the class unaddressed and say "wait, I thought we fixed this"? For each fix, check for the same pattern in sibling locations (other sort keys in the same file, other plays in the same doc, other tools with the same interface shape). If the class is broader than what was fixed, present to the user for their preference on whether to fix it now or log it explicitly as a known gap.
[MONITOR SESSION SUMMARY] in recent context, or read from ~/.agenterminal/monitor-summaries/⚠ NARRATION GATE (steps 3-9). The steps below are sequential tool calls that activate going-dark and batch momentum. Before EACH step: say one sentence to the user about what you are doing. Do not make a tool call as your first action after a user message. This has failed: 2026-04-15, 17+ user messages unacknowledged across all of steps 3-9. The plan feeling clear is exactly when narration drops.
Write session notes to box/sessions/. File name:
YYYY-MM-DD_SHORTID.md where SHORTID is the first 8 characters after session_
in $AGENTERMINAL_SESSION_ID (e.g., 2026-04-01_c15c8b0f.md). Include: goal,
what was done, key decisions, and session learnings (from the reflection above).
Each session writes its own file — concurrent sessions don't clobber each other.
To read last session's notes, find the most recent file: ls -t box/sessions/*.md | head -1.
Carried-forward items go to GitHub Issues, not session.md. Create new Issues
with the carried-forward label using the repo's issue template. Update existing
Issues if their state changed. Close Issues that were completed. Items that didn't
change don't get touched — that's the structural advantage over the old system.
Write to the investigation log via the CLI. First, check for
/tmp/ff-{session_id}-failed-commands.log — if it exists, include its full contents
in the log entry. This is the mechanical record of every failed command in the session.
Then write observations: what was slow, what was manual, what was repeated, what worked
well, what almost didn't happen, data source quirks.
Wasted-turn accounting. The failed-commands.log now includes a reason field
(flag_guess, schema_guess, format_guess, gate_block, tool_error, unknown). Review
the reasons and count by category. Then add judgment-based wasted turns that no
hook catches: self-authorization (manufactured consent), wrong approach (command
succeeded but was the wrong path), silent failure (repeated ineffective queries
without changing strategy), redundant work (re-reading or re-investigating known
ground). Include both mechanical and judgment-based counts in the log entry.
python3 box/log-cli.py write \
--date YYYY-MM-DD \
--topic "Topic here" \
--lesson "One-line lesson for index" \
--disposition needs_intervention \
--bullet "Bold observation." "Detail text explaining the observation." \
--bullet "Another observation." "More detail."
To search: python3 box/log-cli.py query "keyword" or --date, --topic, --recent N.
File observations to feedforward-infra. For each behavioral pattern,
tooling friction, or gate failure observed during the session, whether
surfaced by the user, the Monitor, failed-command review, or your own review
of the session, first search open issues in
paulyokota/feedforward-infra for related topics before
creating anything new.
gh issue view <number> --repo paulyokota/feedforward-infragh issue comment <number> --repo paulyokota/feedforward-infra
instead of creating a duplicate issue.Whether commenting or creating, include the raw observation, the turns where it happened, and any relevant context (script name, args, error output). Don't diagnose root causes or design fixes; that's infra's job in a fresh context window with full context budget.
New issue example:
gh issue create --repo paulyokota/feedforward-infra \
--title "Observation: <what happened>" \
--body "## What happened
<description>
## What was expected
<expected behavior>
## Context
- Session: $AGENTERMINAL_SESSION_ID
- Script/module: <if applicable>
- Turns: <turn numbers where it happened>"
Skip this step only if no behavioral incidents, tooling friction, or gate failures were surfaced by the user, the Monitor, failed-command review, or your own review of the session.
Route learnings to the right file. Investigation judgment learnings are routed by type:
| Learning type | Where it goes | Example |
|---|---|---|
| New investigation principle | MEMORY.md (Investigation Approach section) | "Describe observable behavior, not inferred cause" |
| Instance of known principle | Investigation log only | "SC-399: grep match ≠ verification (proxy trust)" |
| Event/data fact (event name, property, behavior) | box/posthog-events.md or box/queries.md | "Schedule post event has a source property" |
| Card formatting lesson | MEMORY.md Card Formatting — principle only, not card-specific example | "Don't drop ideas from the original card" |
| Product fact (feature state, scope, vocabulary) | .claude/rules/product-knowledge.md | "SmartPin v2 is behind feature flag, not GA" |
Behavioral patterns, tooling gotchas, process/safety properties, framework
observations, play checklist items, and delegation patterns are infra's domain.
File these as GitHub issues in paulyokota/feedforward-infra (step 5) rather
than routing to reference/ files or play docs directly.
MEMORY.md is for investigation judgment, not behavioral interventions. Before adding a learning to MEMORY.md, check whether it's about how to investigate (keep) or how the tooling should work (file to infra). MEMORY.md principles are about evidence evaluation, framing, data source usage — not about process safety.
After writing, run wc -l on MEMORY.md and state the exact number. If over
170 lines: (a) review for items that belong in topic files instead of MEMORY.md,
and (b) look for line-level condensing opportunities. 170 is the action threshold,
not 200. Do not do the arithmetic in your head — read the number from wc -l output.
Remove anything in MEMORY.md that turned out to be wrong.
Verify play routing. Confirm that any new or renamed skills are
listed in box/plays.md. The routing table points to skill names (not
line numbers), so it only needs updating when skills are added, removed,
or renamed.
Delete session temp directory. Session artifacts are in
/tmp/ff-$AGENTERMINAL_SESSION_ID/. Only clean up YOUR session's directory:
ls /tmp/ff-$AGENTERMINAL_SESSION_ID/ 2>/dev/null && rm -r /tmp/ff-$AGENTERMINAL_SESSION_ID || echo "No session temp directory"
Also clean up the session-scoped CLI verified file:
rm -f /tmp/ff-cli-verified-$AGENTERMINAL_SESSION_ID.txt
Note: The developer-kit plugin's validate_bash_command.sh hook blocks
rm -rf /tmp/... because it pattern-matches rm -rf / as dangerous.
Use rm -r (without -f) and check existence first to avoid the block.
Do NOT use wildcard cleanup (rm -r /tmp/ff-*) — other sessions may
be running concurrently.
Stage and commit. Stage changed files (box/sessions/*.md, memory files,
any other changes). Commit with a descriptive message.
docs/session/last-session.md. That file gets overwritten by the
Developer Kit Stop hook.docs/status.md. Duplicative with session notes in box/sessions/.