Planner Closure Backfill
Use this output contract only when the controller activation mode is exactly
one of detailer_replan or task_set_closure. Initial intake remains owned by
planner-task-packet. Return one proposal for one activation; never combine
the two modes or substitute one mode for the other.
Activation Modes
detailer_replan
Use only the controller-provided task identity and task revision, expected
PlanTree revision, closure evidence digest, accepted facts, and supplied
Detailer/user macro-adjustment evidence. Copy those authority fields and
evidence refs exactly; do not read or infer unsupplied state.
Preserve accepted facts. Then return a complete replacement macro proposal for
the task: it invalidates and replaces the old orchestration semantics rather
than continuing, replaying, or patching the prior orchestration bundle. Do not
lower acceptance criteria. The proposal mode must be exactly
detailer_replan; it must never masquerade as task_set_closure.
task_set_closure
Use only the script-owned child status, revision, round digest, cleanup,
release, aggregate, and closure envelope. Preserve the task-set aggregate,
closure, and Frontdesk-status rules below. The proposal mode must be exactly
task_set_closure; do not treat a closure as a Detailer replacement proposal.
Inputs
- controller-provided expected PlanTree and task/task-set revisions
- original intake and Planner task refs
- for
detailer_replan: validated Detailer macro-impact and user evidence
- for
task_set_closure: validated child round, release, cleanup, aggregate,
and closure evidence
- controller-provided
closure_evidence_digest and ordered evidence refs
- for
task_set_closure: script-owned closure_ref with its canonical
project-relative closure path
- current Brief/Roadmap/TODO summary supplied by the host
Do not run shell commands, file reads/searches, tests, builds, CCB commands, or
notification commands. Use only the compact authority envelope in the prompt.
Semantic Decisions
Planner decides:
- whether Detailer evidence changes scope, dependency, acceptance, risk,
Roadmap ordering, or only local implementation detail;
- which accepted facts and completed child outputs remain valid;
- how partial, blocked, or replan branches change Roadmap/TODO state;
- whether the next milestone is ready, needs clarification, blocked, or the
macro request is terminal;
- what concise status Frontdesk may report to the user.
Planner does not decide whether child evidence, cleanup, release, identity, or
revision checks passed. Those are controller-owned input facts.
Output
Return exactly this one fenced section and no alternative authority shape. Set
mode to the exact activation value, never a selector or placeholder.
For detailer_replan, emit this legal identity/result core (all remaining
fields use the same schema fields shown below):
{"schema":"ccb.planner.backfill_proposal.v1","mode":"detailer_replan","expected_plan_revision":"<controller expected_plan_revision>","task_or_task_set_id":"<controller task_id>","task_or_task_set_revision":<controller task_revision>,"closure_evidence_digest":"<controller closure_evidence_digest>","aggregate_result":"replan_required","result":"task_set_replanned","evidence_refs":["<controller ordered evidence ref>"]}
For task_set_closure, emit this separate legal core:
{"schema":"ccb.planner.backfill_proposal.v1","mode":"task_set_closure","expected_plan_revision":"<controller expected_plan_revision>","task_or_task_set_id":"<controller task_set_id>","task_or_task_set_revision":<controller task_set_revision>,"closure_evidence_digest":"<controller closure digest>","aggregate_result":"<controller aggregate_result>","result":"<mapped controller result>","evidence_refs":["<controller ordered evidence ref>"]}
**planner-backfill.json**
```json
{
"schema": "ccb.planner.backfill_proposal.v1",
"mode": "detailer_replan",
"expected_plan_revision": "sha256:<64 lowercase hex>",
"task_or_task_set_id": "stable-id",
"task_or_task_set_revision": 1,
"closure_evidence_digest": "sha256:<64 lowercase hex>",
"aggregate_result": "replan_required",
"result": "task_set_replanned",
"brief_summary": "durable compact summary",
"roadmap_transitions": [],
"todo_transitions": [],
"decision_refs": [],
"open_question_refs": [],
"evidence_refs": [],
"accepted_scope": [],
"unresolved_scope": [],
"blockers": [],
"replan_inputs": [],
"next_milestone": {
"kind": "selected|workflow_terminal|blocked_none",
"ref": "stable-milestone-ref",
"rationale": "semantic reason"
},
"frontdesk_notification_required": true,
"frontdesk_status": {
"schema": "ccb.planner.frontdesk_status.v1",
"notification_identity": "stable-id",
"aggregate_result": "replan_required",
"accepted_scope": [],
"unresolved_scope": [],
"blockers": [],
"next_milestone": {
"kind": "selected|workflow_terminal|blocked_none",
"ref": "stable-milestone-ref",
"rationale": "semantic reason"
},
"evidence_refs": [],
"user_report_body": "factual user-facing report"
}
}
```
This skill carries two complete JSON exemplars: its
templates/planner-backfill-detailer-replan.json file is only for
detailer_replan, and templates/planner-backfill.json is only for
task_set_closure. Neither exemplar authorizes emitting the other mode.
Rules
expected_plan_revision is a digest: copy the supplied
sha256:<64 lowercase hex> value exactly. Never convert it to a counter,
infer a newer revision, or repair a stale value in provider prose.
- Copy
task_or_task_set_id, task_or_task_set_revision,
closure_evidence_digest, and the ordered supplied evidence refs exactly.
detailer_replan uses the supplied task identity and task revision, never a
task-set identity or an inferred replacement revision.
- Preserve the controller-owned
aggregate_result exactly. The complete
mapping is pass -> closure_complete, partial -> closure_partial,
replan_required -> task_set_replanned, and
blocked -> closure_blocked. Never output a complete semantic result for non-pass aggregate evidence.
- For
task_set_closure: Treat closure_ref as script-owned input. Copy
closure_ref.path exactly into proposal evidence_refs and the embedded
Frontdesk evidence_refs. Never rewrite, normalize, infer, or reconstruct that path from provider prose. Preserve validated child refs in their
supplied order, append the closure path once, and do not duplicate any ref.
- Derive
accepted_scope, unresolved_scope, blockers, replan_inputs, and
evidence_refs from validated controller authority. Never invent accepted
scope or pass from missing/nonterminal evidence. pass requires empty
unresolved/blocker/replan fields. Every non-pass requires non-empty
unresolved_scope; blocked requires blockers and replan_required
requires replan inputs.
- A
detailer_replan retains accepted facts but replaces old orchestration
semantics. Do not replay, merge with, or claim continuity of the old bundle.
A task_set_closure retains its aggregate and closure semantics. Never
exchange those activation rules.
- Multiple replan children produce one coherent macro proposal, not multiple
independent Planner actions.
- Never overwrite a newer PlanTree revision. Return
revision_conflict and the
supplied current revision as a blocker.
- Preserve aggregate result, accepted scope, unresolved scope, blockers, next
milestone, and evidence refs byte-for-byte in
frontdesk_status.
- Embed exactly one complete
ccb.planner.frontdesk_status.v1 object under the
sole frontdesk_status field, including when notification is not required.
- Do not fabricate child evidence, hashes, tests, release, cleanup, or user
decisions.
- No PlanTree write, Frontdesk notification, CCB command, file operation, test,
wait, watch, or downstream ask is allowed from this reply-only surface. The
host validates and imports the proposal and owns every side effect.
- Do not modify PlanTree or send Frontdesk messages from the provider reply.
1---2name: planner-closure-backfill3description: Produce one revision-fenced Planner backfill proposal for either a Detailer replan or task-set closure, with compact Frontdesk status evidence.4---5
6# Planner Closure Backfill
7
8Use this output contract only when the controller activation mode is exactly
9one of `detailer_replan` or `task_set_closure`. Initial intake remains owned by
10`planner-task-packet`. Return one proposal for one activation; never combine
11the two modes or substitute one mode for the other.
12
13## Activation Modes
14
15### `detailer_replan`
16
17Use only the controller-provided task identity and task revision, expected
18PlanTree revision, closure evidence digest, accepted facts, and supplied
19Detailer/user macro-adjustment evidence. Copy those authority fields and
20evidence refs exactly; do not read or infer unsupplied state.
21
22Preserve accepted facts. Then return a complete replacement macro proposal for
23the task: it invalidates and replaces the old orchestration semantics rather
24than continuing, replaying, or patching the prior orchestration bundle. Do not
25lower acceptance criteria. The proposal `mode` must be exactly
26`detailer_replan`; it must never masquerade as `task_set_closure`.
27
28### `task_set_closure`
29
30Use only the script-owned child status, revision, round digest, cleanup,
31release, aggregate, and closure envelope. Preserve the task-set aggregate,
32closure, and Frontdesk-status rules below. The proposal `mode` must be exactly
33`task_set_closure`; do not treat a closure as a Detailer replacement proposal.
34
35## Inputs
36
37- controller-provided expected PlanTree and task/task-set revisions
38- original intake and Planner task refs
39- for `detailer_replan`: validated Detailer macro-impact and user evidence
40- for `task_set_closure`: validated child round, release, cleanup, aggregate,
41 and closure evidence
42- controller-provided `closure_evidence_digest` and ordered evidence refs
43- for `task_set_closure`: script-owned `closure_ref` with its canonical
44 project-relative closure path
45- current Brief/Roadmap/TODO summary supplied by the host
46
47Do not run shell commands, file reads/searches, tests, builds, CCB commands, or
48notification commands. Use only the compact authority envelope in the prompt.
49
50## Semantic Decisions
51
52Planner decides:
53
54- whether Detailer evidence changes scope, dependency, acceptance, risk,
55 Roadmap ordering, or only local implementation detail;
56- which accepted facts and completed child outputs remain valid;
57- how partial, blocked, or replan branches change Roadmap/TODO state;
58- whether the next milestone is ready, needs clarification, blocked, or the
59 macro request is terminal;
60- what concise status Frontdesk may report to the user.
61
62Planner does not decide whether child evidence, cleanup, release, identity, or
63revision checks passed. Those are controller-owned input facts.
64
65## Output
66
67Return exactly this one fenced section and no alternative authority shape. Set
68`mode` to the exact activation value, never a selector or placeholder.
69
70For `detailer_replan`, emit this legal identity/result core (all remaining
71fields use the same schema fields shown below):
72
73```json
74{"schema":"ccb.planner.backfill_proposal.v1","mode":"detailer_replan","expected_plan_revision":"<controller expected_plan_revision>","task_or_task_set_id":"<controller task_id>","task_or_task_set_revision":<controller task_revision>,"closure_evidence_digest":"<controller closure_evidence_digest>","aggregate_result":"replan_required","result":"task_set_replanned","evidence_refs":["<controller ordered evidence ref>"]}
75```
76
77For `task_set_closure`, emit this separate legal core:
78
79```json
80{"schema":"ccb.planner.backfill_proposal.v1","mode":"task_set_closure","expected_plan_revision":"<controller expected_plan_revision>","task_or_task_set_id":"<controller task_set_id>","task_or_task_set_revision":<controller task_set_revision>,"closure_evidence_digest":"<controller closure digest>","aggregate_result":"<controller aggregate_result>","result":"<mapped controller result>","evidence_refs":["<controller ordered evidence ref>"]}
81```
82
83````markdown
84**planner-backfill.json**
85```json
86{
87 "schema": "ccb.planner.backfill_proposal.v1",
88 "mode": "detailer_replan",
89 "expected_plan_revision": "sha256:<64 lowercase hex>",
90 "task_or_task_set_id": "stable-id",
91 "task_or_task_set_revision": 1,
92 "closure_evidence_digest": "sha256:<64 lowercase hex>",
93 "aggregate_result": "replan_required",
94 "result": "task_set_replanned",
95 "brief_summary": "durable compact summary",
96 "roadmap_transitions": [],
97 "todo_transitions": [],
98 "decision_refs": [],
99 "open_question_refs": [],
100 "evidence_refs": [],
101 "accepted_scope": [],
102 "unresolved_scope": [],
103 "blockers": [],
104 "replan_inputs": [],
105 "next_milestone": {
106 "kind": "selected|workflow_terminal|blocked_none",
107 "ref": "stable-milestone-ref",
108 "rationale": "semantic reason"
109 },
110 "frontdesk_notification_required": true,
111 "frontdesk_status": {
112 "schema": "ccb.planner.frontdesk_status.v1",
113 "notification_identity": "stable-id",
114 "aggregate_result": "replan_required",
115 "accepted_scope": [],
116 "unresolved_scope": [],
117 "blockers": [],
118 "next_milestone": {
119 "kind": "selected|workflow_terminal|blocked_none",
120 "ref": "stable-milestone-ref",
121 "rationale": "semantic reason"
122 },
123 "evidence_refs": [],
124 "user_report_body": "factual user-facing report"
125 }
126}
127```
128````
129
130This skill carries two complete JSON exemplars: its
131`templates/planner-backfill-detailer-replan.json` file is only for
132`detailer_replan`, and `templates/planner-backfill.json` is only for
133`task_set_closure`. Neither exemplar authorizes emitting the other mode.
134
135## Rules
136
137- `expected_plan_revision is a digest`: copy the supplied
138 `sha256:<64 lowercase hex>` value exactly. Never convert it to a counter,
139 infer a newer revision, or repair a stale value in provider prose.
140- Copy `task_or_task_set_id`, `task_or_task_set_revision`,
141 `closure_evidence_digest`, and the ordered supplied evidence refs exactly.
142 `detailer_replan` uses the supplied task identity and task revision, never a
143 task-set identity or an inferred replacement revision.
144- Preserve the controller-owned `aggregate_result` exactly. The complete
145 mapping is `pass -> closure_complete`, `partial -> closure_partial`,
146 `replan_required -> task_set_replanned`, and
147 `blocked -> closure_blocked`. Never output a complete semantic result for non-pass aggregate evidence.
148- For `task_set_closure`: Treat `closure_ref` as script-owned input. Copy
149 `closure_ref.path` exactly into proposal `evidence_refs` and the embedded
150 Frontdesk `evidence_refs`. Never rewrite, normalize, infer, or reconstruct that path from provider prose. Preserve validated child refs in their
151 supplied order, append the closure path once, and do not duplicate any ref.
152- Derive `accepted_scope`, `unresolved_scope`, `blockers`, `replan_inputs`, and
153 `evidence_refs` from validated controller authority. Never invent accepted
154 scope or pass from missing/nonterminal evidence. `pass` requires empty
155 unresolved/blocker/replan fields. Every non-pass requires non-empty
156 `unresolved_scope`; `blocked` requires blockers and `replan_required`
157 requires replan inputs.
158- A `detailer_replan` retains accepted facts but replaces old orchestration
159 semantics. Do not replay, merge with, or claim continuity of the old bundle.
160 A `task_set_closure` retains its aggregate and closure semantics. Never
161 exchange those activation rules.
162- Multiple replan children produce one coherent macro proposal, not multiple
163 independent Planner actions.
164- Never overwrite a newer PlanTree revision. Return `revision_conflict` and the
165 supplied current revision as a blocker.
166- Preserve aggregate result, accepted scope, unresolved scope, blockers, next
167 milestone, and evidence refs byte-for-byte in `frontdesk_status`.
168- Embed exactly one complete `ccb.planner.frontdesk_status.v1` object under the
169 sole `frontdesk_status` field, including when notification is not required.
170- Do not fabricate child evidence, hashes, tests, release, cleanup, or user
171 decisions.
172- No PlanTree write, Frontdesk notification, CCB command, file operation, test,
173 wait, watch, or downstream ask is allowed from this reply-only surface. The
174 host validates and imports the proposal and owns every side effect.
175- Do not modify PlanTree or send Frontdesk messages from the provider reply.