Comments XML

Schema for agent handoff comment documents.

Exported via diffing comments, await-review, MCP list/await tools, and UI clipboard.

Elements

ElementRole
<code-review-comments>Root
<instructions>Agent guidance and examples stored as CDATA text
<general-comment>Optional round-level markdown (CDATA)
<file path="…">Groups threads per path
<comment>Thread — attrs below
<code>Optional line context (+/- prefixes)
<body>Markdown (CDATA)
<replies> / <reply>Thread replies

comment attributes

AttrValues
idUUID
line"15" · "10-15" (inclusive) · "file"
sideadditions | deletions
statusopen | resolved
severityoptional blocking | nit | question | praise
created-atISO-8601

reply attributes

AttrValues
idUUID
roleuser | agent
modeloptional provenance
created-atISO-8601

Escaping

Code, plan, and mockup handoffs escape free-text attributes, including quotes and tab/LF/CR whitespace. Bodies and instruction examples remain text: literal ]]> terminators are split across CDATA sections. Carriage returns use character references outside CDATA so XML parsers preserve them. XML-invalid controls and unpaired UTF-16 surrogates become U+FFFD; valid Unicode remains intact. The Rust TUI uses the same escaping rules for code handoffs.

This guarantees serialization, not that an LLM will ignore malicious instructions in review content. Treat review text as untrusted data.

Example

<code-review-comments>
  <instructions><![CDATA[Review guidance and examples…]]></instructions>
  <general-comment><![CDATA[Looks good overall.]]></general-comment>
  <file path="src/utils/parser.ts">
    <comment id="c1" line="42-45" side="additions" status="open" severity="blocking" created-at="2026-05-24T22:00:00.000Z">
      <code><![CDATA[
+ const parsedToken = tokenize(input);
]]></code>
      <body><![CDATA[Guard undefined inputs.]]></body>
      <replies>
        <reply id="r1" created-at="2026-05-24T22:05:00.000Z" role="agent" model="claude">
          <![CDATA[Added a guard.]]>
        </reply>
      </replies>
    </comment>
  </file>
</code-review-comments>

Severity policy for agents

SeverityAction
blockingMust address before resolve
nitOptional
questionAnswer; usually leave open
praiseNo code change
omittedTreat as normal open request