Command purpose:
- Use `CMD: finalize_thread_rollover` only when the assigned work is a SYS rollover summary request.
- `finalize_thread_rollover` returns a structured parent-thread summary to SYS.
- SYS uses the summary to create the rollover child thread and preserve continuity from the parent thread.
- The summary must be sufficient for the child thread to resume and complete the remaining work successfully without rereading the full parent thread.
- Do not use `CMD: finalize_thread_rollover` for ordinary thread summaries, synthesis recaps, implementation reports, verification reports, MRC reduce summaries, or thread termination.
- Do not use `CMD: finalize_thread_rollover` unless SYS requested a rollover summary for the assigned parent thread.

Required parameter order:

CMD: finalize_thread_rollover
parent_thread_id: <parent thread ID>
parent_thread_contract:
BEGIN
<current effective parent thread contract for the child kickoff>
END
current_state_of_work:
BEGIN
<current substantive state the child must resume from>
END
pending_carried_forward_work:
BEGIN
<pending work that must continue in the child thread>
END
carried_forward_message_id: <carried-forward message ID>
carried_forward_message_body:
BEGIN
<exact body of the carried-forward message, without message header or leading quote markers>
END
additional_artifacts:
BEGIN
(none)
or
ART: <message-id> <filename>
END

Rollover message semantics:
- The carried-forward message is the last real assigned message whose work must continue in the rollover child thread.
- It is the message immediately before the synthetic rollover bridge message that contains `CMD: initiate_thread_rollover`.
- The synthetic rollover bridge message is not the carried-forward message.
- The SYS rollover summary request is not the carried-forward message.
- The work of the carried-forward message represents pending carried-forward work that must continue in the rollover child thread.
- `CMD:` lines inside `BEGIN` / `END` multiline parameter bodies are data, not executable commands.
- If the carried-forward message body contains a `CMD:` line, preserve it as data inside `carried_forward_message_body`.

Protocol-safety rules:
- Rollover summary parameter bodies may later be rendered into a child kickoff message.
- Do not introduce standalone prose lines that look like KBOS protocol unless they are intentionally valid protocol lines in the correct parameter.
- In `parent_thread_contract`, `current_state_of_work`, and `pending_carried_forward_work`, avoid standalone lines such as:
  Pending:
  ART:
  ATTACHED:
  PENDING:
  CMD:
  TO:
  FROM:
  (none)
- Use prose-safe labels instead:
  Remaining work:
  Artifact references:
  Command context:
  No additional artifacts.
- The token `(none)` is allowed only as the complete value of the `additional_artifacts` parameter when no additional artifacts are needed.
- Do not use `(none)` as a prose placeholder in any other parameter body.

Parameter selection:

parent_thread_id:
- Use the parent thread ID named by the rollover summary request.
- Use canonical `T#` format.
- Do not use the synthetic rollover bridge message ID.
- Do not use the future child thread ID.
- Do not infer a different parent thread from examples, prior thread history, or related thread chains.

parent_thread_contract:
- Include the current effective parent thread contract for the child kickoff.
- Preserve enough contract detail for the child thread to understand the goal, task, deliverable, and constraints.
- If the parent thread has evolved through decisions or prior rollover summaries, summarize the effective current contract, not stale or superseded instructions.
- Do not include runner-owned metadata such as ID, DATE, KBCP, FROM, TO, REF, ISSUE, PR, anchors, or metrics lines.
- Do not include obsolete, superseded, or already-completed instructions unless they are needed to understand the remaining work.

current_state_of_work:
- Include the current substantive state the child must resume from.
- Clearly distinguish completed work from the active remaining blocker or next required action.
- Summarize completed work only as much as needed to preserve continuity.
- Include decisions, constraints, implementation facts, test facts, artifact facts, or review facts that materially affect the child continuation.
- Do not reopen, reassign, or revalidate work that the parent thread already marked complete unless the carried-forward work explicitly depends on it.
- Do not include irrelevant historical discussion or stale alternatives.

pending_carried_forward_work:
- State only the work that must continue in the child thread.
- Include required proof, review path, and return condition when applicable.
- Make the next required action clear.
- Do not describe already-completed work as pending.
- Do not invent new work beyond the carried-forward message and current parent-thread state.

carried_forward_message_id:
- Use the exact message ID of the carried-forward message.
- Use canonical `T#M#` format.
- Do not use the synthetic rollover bridge message ID.
- Do not use the SYS rollover summary request message ID.
- Do not use the outgoing `CMD: finalize_thread_rollover` message ID.

carried_forward_message_body:
- Include the carried-forward message body lines only.
- Start with the first non-blank quoted body line after the message header.
- End with the last quoted body line before the next message, metrics line, or end of message block.
- Do not include the message anchor.
- Do not include message header fields such as ID, DATE, KBCP, FROM, TO, REF, ISSUE, or PR.
- Do not include metrics lines.
- Do not include leading `> ` quote markers.
- Do not include leading or trailing blank lines.
- Preserve the body content exactly enough for the child thread to continue safely.

additional_artifacts:
- Include only artifact references needed by the child thread that are not already present in `carried_forward_message_body`.
- Use canonical artifact references only:
  ART: T#M# filename
- Do not include an `ART:` reference already present in `carried_forward_message_body`.
- Do not include `ATTACHED:` lines.
- Do not include `PENDING:` lines.
- Do not include artifact explanations or prose.
- If no additional artifact references are needed, write exactly `(none)` as the complete `additional_artifacts` parameter value.
- Do not write `(none)` in any other parameter body.
- Do not include prose such as `Additional Artifacts`, `No additional artifacts.`, or explanations inside the `additional_artifacts` parameter.
- The `(none)` token is command syntax for SYS, not child-kickoff prose.

Finalize-rollover message semantics:
- SYS uses `parent_thread_contract` to populate the child kickoff's parent contract context.
- SYS uses `current_state_of_work` to populate the child kickoff's current state context.
- SYS uses `pending_carried_forward_work` to populate the child kickoff's pending work context.
- SYS uses `carried_forward_message_id` to identify the carried-forward message.
- SYS uses `carried_forward_message_body` to preserve the pending carried-forward message work.
- SYS uses `additional_artifacts` to preserve extra artifact references needed by the child thread.
- The actor producing `CMD: finalize_thread_rollover` must not create the child thread directly.
- The actor producing `CMD: finalize_thread_rollover` must not terminate the parent thread directly.
- The actor producing `CMD: finalize_thread_rollover` must not route directly to the continued actor.

Required output rules:
- Route the outgoing message to SYS only.
- After the `TO: SYS` routing line and blank line, start the message body with `CMD: finalize_thread_rollover`.
- Do not include extra prose, notes, headings, or sections beyond the required parameters.
- Use the exact CMD and parameter names.
- Use the exact parameter order shown above.
- Every parameter is required.
- Use scalar parameter syntax for scalar fields.
- Use `BEGIN` and `END` blocks for multiline fields.
- `BEGIN` and `END` must appear alone on their own lines.
- `parent_thread_contract` must not be empty.
- `current_state_of_work` must not be empty.
- `pending_carried_forward_work` must not be empty.
- `carried_forward_message_id` must use canonical `T#M#` format.
- `carried_forward_message_body` must not be empty.
- `additional_artifacts` must contain either exactly `(none)` or canonical `ART: T#M# filename` references.
- `(none)` must appear only inside `additional_artifacts` and only when there are no additional artifact references.
- Do not place `(none)` in `parent_thread_contract`, `current_state_of_work`, `pending_carried_forward_work`, or `carried_forward_message_body`.
- Do not introduce standalone protocol-looking prose labels in multiline parameter bodies, including `Pending:`, `ART:`, `ATTACHED:`, `PENDING:`, `CMD:`, `TO:`, or `FROM:`, unless preserving exact carried-forward message data requires it.
- Do not include more than one top-level SYS CMD.
- Do not mix `CMD: finalize_thread_rollover` with other SYS CMD families in one outgoing message.
- Do not include `CMD: create_thread`, `CMD: create_thread_batch`, or `CMD: terminate_thread` as top-level commands in the same outgoing message.
