task-family-manager
Inspect, rename, archive, restore, or proof-gated-clean an exact Codex task family with native app mutations, previews, reconciliation, and receipts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Inspect, rename, archive, restore, or proof-gated-clean an exact Codex task family with native app mutations, previews, reconciliation, and receipts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | task-family-manager |
| description | Inspect, rename, archive, restore, or proof-gated-clean an exact Codex task family with native app mutations, previews, reconciliation, and receipts. |
Use this skill when a user wants to inspect or operate on a Codex task family. Identity always comes from exact task UUIDs and typed relations; titles are display text only.
The repository package plans and verifies operations. Codex app tools perform task mutations. Never write Codex SQLite directly, call private app APIs, infer membership from similar titles, or treat archive as cancellation.
Use the available Codex app tools for their supported actions:
list_threads and read_thread for visible task state;set_thread_title for one exact rename;set_thread_archived for one exact archive or restore;handoff_thread and get_handoff_status only when handoff work is requested;navigate_to_codex_page only when the user asks to open a task.The app currently lacks an include-archived inventory, readable pin state, typed family graph, atomic batch mutation, and native receipt API. The local bridge therefore performs bounded, read-only SQLite reconciliation after each native mutation. --db auto discovers a compatible local database fail-closed; an explicit database path is also accepted.
Runtime packets, rollover leases, and automations are preservation-only locally. For finish-and-clean, record a tool-backed terminal task status. Any selected rollover endpoint also needs rollover_cleanup_eligible: "true" plus rollover_cleanup_proof; any automation_id needs automation_cleanup_eligible: "true" plus automation_cleanup_proof. Missing proof blocks cleanup. Even with proof, the local executor records retirement as deferred and preserves the evidence because no native retirement API exists.
Create a versioned manifest from tool-backed exact IDs. Prefer structured fork responses or persisted spawn edges. Add reviewer, handoff, replacement, and rollover relations only when explicit evidence exists. issue_or_pr_member may be display-only by setting family_defining to false.
{
"schema_version": 1,
"family_id": "issue-5140-family",
"seed_task_id": "00000000-0000-4000-8000-000000000001",
"nodes": [
{
"task_id": "00000000-0000-4000-8000-000000000001",
"title": "Plan lifecycle",
"project_root": "/absolute/project",
"worktree": null,
"branch": null,
"pr_id": null,
"metadata": {"cwd": "/absolute/project", "status": "completed"}
},
{
"task_id": "00000000-0000-4000-8000-000000000002",
"title": "Implement lifecycle",
"project_root": "/absolute/project",
"worktree": "/absolute/project/.worktrees/dispatch/codex/example",
"branch": "codex/example",
"pr_id": "123",
"metadata": {"cwd": "/absolute/project", "status": "completed"}
}
],
"relations": [
{
"source_id": "00000000-0000-4000-8000-000000000002",
"target_id": "00000000-0000-4000-8000-000000000001",
"relation_type": "subagent_of",
"evidence": "codex_app fork response sourceThreadId",
"family_defining": true
}
]
}
Supported typed relations are root, subagent_of, reviewer_for, handoff_of, replacement_of, rollover_generation_of, and issue_or_pr_member.
.venv/bin/python -m scripts.orchestration.task_family inspect \
--manifest /absolute/manifest.json --json
Show the exact included and excluded task IDs, derived roles, relation count, resources, and blockers. Stop if the graph has unknown endpoints, conflicting parents, cycles, incompatible project roots, or anything other than one root.
Pinned state is currently unreadable. Every affected task must be selected explicitly with one --select-task <TASK_UUID> argument and separately acknowledged with one --confirm-pin-unknown <TASK_UUID> argument. Never pass a Boolean in place of a task UUID.
Use a fresh UUID for each operation. The preview persists an immutable exact rename map and digest. Generated titles keep role/generation suffixes and respect Codex's 60-character persisted-title limit.
.venv/bin/python -m scripts.orchestration.task_family preview-rename \
--repo-root /absolute/project \
--manifest /absolute/manifest.json \
--operation-id 00000000-0000-4000-8000-000000000010 \
--base-title "Lifecycle complete" \
--select-task 00000000-0000-4000-8000-000000000001 \
--select-task 00000000-0000-4000-8000-000000000002 \
--confirm-pin-unknown 00000000-0000-4000-8000-000000000001 \
--confirm-pin-unknown 00000000-0000-4000-8000-000000000002 \
--actor codex/operator --json
Family rename requires every included task. Repeat both selection arguments for every included UUID. After the user has seen the preview, call set_thread_title once per selected task using that task's exact new_title. Immediately reconcile each result:
.venv/bin/python -m scripts.orchestration.task_family reconcile-title \
--repo-root /absolute/project \
--family-id issue-5140-family \
--operation-id 00000000-0000-4000-8000-000000000010 \
--plan-digest <64-lowercase-hex-digest> \
--db auto \
--task-id 00000000-0000-4000-8000-000000000001 \
--cwd /absolute/project \
--expected-title "Lifecycle complete [Lead]"
Proceed sequentially and stop on the first mismatch. A retry is read-back-only when that exact action already succeeded.
Choose the operation explicitly:
preview-archive is reversible and retains transcripts, worktrees, branches, and runtime resources.preview-cleanup archives tasks and may remove only exact, verified, family-owned resources. Purge is not implemented.When the family belongs to non-trivial GitHub implementation work, task-family
cleanup is only the final local/native part of the shared closeout contract. Load
the exact task-lifecycle.v1 ledger from its task-identity.v1 repository/issue
before previewing cleanup:
.venv/bin/python -m scripts.orchestration.task_closeout locate \
--identity-file /absolute/task-identity.json
.venv/bin/python -m scripts.orchestration.task_closeout reconcile \
--state-file /absolute/.agent/task-lifecycle/.../issue-N.json \
--branch codex/N-topic --worktree /absolute/.worktrees/dispatch/codex/N-topic
Do not treat archived tasks, a completed worker, a merged PR, or a Fixes #N
keyword as terminal proof. The lifecycle receipt must verify the explicit
merge/deploy/certify goal, actual issue closure, and exact branch/worktree
cleanup. A BLOCKED_WITH_RECEIPT disposition stops preview-cleanup until its
owner, reason, evidence, and next action are resolved.
.venv/bin/python -m scripts.orchestration.task_family preview-archive \
--repo-root /absolute/project \
--manifest /absolute/manifest.json \
--operation-id 00000000-0000-4000-8000-000000000020 \
--lineage-id 00000000-0000-4000-8000-000000000021 \
--base-title "Lifecycle complete" --db auto \
--select-task 00000000-0000-4000-8000-000000000001 \
--select-task 00000000-0000-4000-8000-000000000002 \
--confirm-pin-unknown 00000000-0000-4000-8000-000000000001 \
--confirm-pin-unknown 00000000-0000-4000-8000-000000000002 \
--actor codex/operator --json
For cleanup, replace preview-archive with preview-cleanup. Display its exact resource decisions and blockers before any mutation.
Call set_thread_archived with archived: true once per selected task, then reconcile immediately with its current exact title:
.venv/bin/python -m scripts.orchestration.task_family reconcile-archive \
--repo-root /absolute/project \
--family-id issue-5140-family \
--operation-id 00000000-0000-4000-8000-000000000020 \
--db auto \
--task-id 00000000-0000-4000-8000-000000000001 \
--cwd /absolute/project \
--expected-title "Lifecycle complete [Lead]"
Only after every selected task verifies, execute the persisted plan:
.venv/bin/python -m scripts.orchestration.task_family apply-cleanup \
--repo-root /absolute/project \
--family-id issue-5140-family \
--operation-id 00000000-0000-4000-8000-000000000020 \
--lineage-id 00000000-0000-4000-8000-000000000021 \
--plan-digest <64-lowercase-hex-digest> --json
Cleanup must never call .git/hooks/post-merge, alias.cleanup-gone, a broad gone-upstream pruner, remote branch deletion, forced worktree removal, auto-stash/commit, or lock deletion. A local branch is eligible only under the executor's exact PR/head/remote/worktree/snapshot/protected-base proof.
To restore, call set_thread_archived with archived: false, then reconcile the same selected task:
.venv/bin/python -m scripts.orchestration.task_family reconcile-restore \
--repo-root /absolute/project \
--family-id issue-5140-family \
--operation-id 00000000-0000-4000-8000-000000000020 \
--db auto \
--task-id 00000000-0000-4000-8000-000000000001 \
--cwd /absolute/project \
--expected-title "Lifecycle complete [Lead]"
Render the durable receipt at any point:
.venv/bin/python -m scripts.orchestration.task_family receipt \
--repo-root /absolute/project \
--family-id issue-5140-family \
--operation-id 00000000-0000-4000-8000-000000000020 --json
Report planned versus actual actions, skipped resources and reasons, failures with recovery instructions, restoration information, final retained resources, and the receipt path under .agent/task-families/<family>/operations/<operation>/.
Run or resume the manifest-derived curriculum lifecycle for one active track. Use when an operator asks to process a track in manifest order, select built, unbuilt, stale, or one-module scope, or resume an exact coordinator run. Route every acquired module through curriculum-preparation or track-completion; do not use for an uncoordinated standalone module.
Prepare, audit, or resume missing or stale prerequisite evidence for one manifest target, one track missing-only scan, or one bounded homogeneous packet by using the canonical curriculum readiness evaluator. Use for preparation-scoped work before a learner-module build or when curriculum-lifecycle explicitly delegates preparation. Do not use to build learner modules, coordinate a track, run post-build review, certify, publish, or deploy.
Complete one active Ukrainian curriculum module through a canonical CORE-or-seminar workflow. Use for built modules that need the versioned post-build gate, unbuilt modules that need plan review and V7 construction before that gate, interrupted module completion runs that must resume from a durable ledger, or non-PASS modules that need root-cause repair, fresh review, independent cross-family review, and publication.
Model-agnostic orchestrator playbook for driving ONE epic/track lane end-to-end over the fleet-comms message plane. Invoke this when you are launched as an epic/track driver (Grok, Sonnet-5, Gemini/AGY, Kimi, or Claude) via a start-<model>.sh --epic launch and told to "drive this epic". Teaches the METHOD — topology → route → dispatch → settle → cross-family review → merge → handoff — and defers all live roster/routing DATA to /api/rules and model_catalog.yaml. Not for main-orchestrator cold-start (that has its own hook) and not for writing a single module (use $track-completion).
How to monitor V7 curriculum builds — the Monitor tool command template, mandatory --worktree isolation, the JSONL event fields v7_build.py/linear_pipeline.py emit, and the Monitor API for state queries without running a build. Use whenever launching or watching a `scripts/build/v7_build.py` run.
Audit prompt sizes across build orchestration dirs. Surfaces sections that dominate the prompt (>40%), tracks per-phase budget vs the model's context window, and checks whether directives in the prompt were actually covered in the response.