一键导入
close-orchestrator-session
End-of-session ritual for the pflow MAIN ORCHESTRATOR. Invoke when the user closes a session or the context window nears its end.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
End-of-session ritual for the pflow MAIN ORCHESTRATOR. Invoke when the user closes a session or the context window nears its end.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
End-of-session ritual for the pflow MAIN ORCHESTRATOR. Invoke when the user closes a session or the context window nears its end.
Boot the pflow MAIN ORCHESTRATOR — verify state, pick lane and work, launch and shepherd the agent hierarchy, merge, reconcile.
Create task file from discussion context
Deploy specialized review agents to find bugs that general code review misses. Handles both plan review (before implementation) and code review (after implementation). Deploys 1-8 focused agents in capacity-aware parallel batches, scaled to plan/diff complexity, each targeting a specific blindspot category.
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in context/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
Run the pflow release process — generate changelog, bump version, commit, and create GitHub Release
| name | close-orchestrator-session |
| description | End-of-session ritual for the pflow MAIN ORCHESTRATOR. Invoke when the user closes a session or the context window nears its end. |
The main orchestrator's session close is a retrospection event, not a filing chore. The state
docs should already be true (you update them as events land); what this moment adds is the look
BACK across the whole session — the corrections, overturned calls, improvised mechanisms, and the
user's exact words — before they age out with your context window. A successor boots on
ORCHESTRATION.md + DECISIONS.md → CURRENT-STATE.md → latest session file (thin-file rule, DECISIONS #10) → BRAINDUMP.md and nothing else; this ritual makes that stack sufficient.
Ground rule: verify, then write. Every claim entering a durable file gets checked against
reality first (git log, gh, ./scripts/tasks, git worktree list, the filesystem) — a
braindump line that's false is worse than a missing one.
If anything is in flight, the close has not started yet: let all running agents and tasks run to the end, fix all loose ends, THEN close out. Keep doing the job — relay handbacks, nudge stalled lanes, merge what reaches CI-green, tear down merged worktrees — until the board is quiescent. Two exceptions:
Walk the session start-to-end and answer, honestly:
Should be near-no-ops if you kept discipline; audit, don't rewrite:
~~…~~ with a one-line verdict), not silently deleted. No session digest —
the session file boundary does that job. Respect the ~80-line budget: every line a pointer to
verify, not a fact.Update the rolling tacit layer — the top section of
.taskmaster/orchestration/BRAINDUMP.md, above the --- that precedes the frozen Genesis
section (2026-07-02; never refreshed) — in place, minimal deltas, extending its header with
this session's marker. This is a knowledge transfer to yourself, returning
with no memory. The doctrine, customized for this role:
The one test, applied line by line to the EXISTING file first:
"Could the next agent find this by reading files?" If yes — cut it.
Knowledge migrates: what was tacit last session may now live in a skill, a task-review, a DECISIONS row, or a gotcha that got fixed in code. The braindump must shrink as knowledge becomes durable elsewhere — pruning stale lines is as important as adding new ones. Delete verified "needs verification" items; rewrite bullets whose advice was superseded (never leave an old bad habit standing next to its correction).
What belongs (add from step 1):
scratchpads/,
machine state, unpushed commits, pending external steps) — with where they live and what to do
if missing.UNCLEAR: · ASSUMPTION: · ASKED-NOT-ANSWERED: · NEEDS VERIFICATION: — explicit
uncertainty beats implied confidence.What does NOT belong:
Keep the closing note-to-next-agent line intact (read fully → summarize → proceed).
If the session changed how this role operates — a new failure mode hit, a mechanism worth
standardizing, a rule the user stated — propose the edit to start-orchestration (the role
prompt) or ORCHESTRATION.md and let the user rule. Editing your own role definition is never a
unilateral act. (A skill/tooling gap you can fix in-repo — a script hardening, a stale agent def —
is normal work, not this. Remember the mirror sync: uv run python scripts/sync_claude_assets.py --write after editing any .claude/ asset.)