Documentation · stage 4 of 5

Review

Ask gate

Review documentation for accuracy, clarity, and completeness

Review

The validation stage of the documentation lifecycle, between drafting and publication: polish the verified draft for clarity and confirm it's accurate, complete, and true to operational reality.

Scope

The editorial pass (voice, terminology, consistency, cross-references) and the subject-matter pass (mental-model accuracy, misleading simplifications, missing edge cases). Review decides whether the content reads clearly and holds up — it does not write the original content (draft) or ship it to the platform (publish).

What to do

  • Edit for clarity, voice, terminology consistency, and broken cross-references without altering technical meaning.
  • Validate the mental model the draft conveys against operational reality.
  • Flag misleading simplifications and missing edge cases as anchored, severity-rated findings.
  • Route a technical defect back to the draft stage rather than rewriting the substance here.

What NOT to do

  • Don't author new content or re-draft sections from scratch — that's the draft stage.
  • Don't format or publish to the platform — that's publish.
  • Don't change technical meaning under the cover of an editorial edit; that belongs to the writer.
  • Don't close a finding without anchoring it to the specific section it's about.

How the engine runs this stage

1Elaborate

collaborative · plan the work, fan out discovery, declare outputs

Phase guidance

phase overrideELABORATION- "Every technical claim is verified against the running system or source code"

Review Stage — Elaboration

Criteria Guidance

Good criteria — concrete and verifiable

  • "Every technical claim is verified against the running system or source code"
  • "Review identifies ambiguous instructions and provides specific rewording suggestions"
  • "Consistency check confirms terminology matches the project glossary throughout"

Bad criteria — vague (no clear check)

  • "Review is done"
  • "Content is accurate"
  • "Feedback is given"

Outputs produced

output templateReview ReportCategorized review findings with severity ratings and actionable fix recommendations.

Review Report

Categorized review findings with severity ratings and actionable fix recommendations.

Expected Artifacts

  • Findings -- categorized by type (accuracy, clarity, completeness, consistency) with severity
  • Fix recommendations -- specific problem description and concrete fix for each finding
  • Technical validation -- confirmation of correctness from subject-matter expertise
  • Verdict -- approve, revise, or reject with rationale

Quality Signals

  • Every finding includes severity, the specific problem, and a concrete fix
  • Technical claims are verified against the running system or source code
  • Terminology consistency is checked against the project glossary
  • Verdict is clear with supporting rationale

2Review

pre-execute · agents audit the planned spec before any code lands
review agentCompletenessThe agent **MUST** verify the documentation fully addresses the gaps identified in the audit, with no silent omissions and no placeholders.

Mandate: The agent MUST verify the documentation fully addresses the gaps identified in the audit, with no silent omissions and no placeholders.

Check

The agent MUST verify, file feedback for any violation:

  • Every prioritized audit gap is addressed — Every top-tier gap (blocker / major, frequent / occasional) from the audit stage has corresponding documentation in the draft. Deferred items are explicitly listed with rationale; silent deferral is a coverage failure.
  • No placeholder content — No TODO, <your X here>, [insert example], or other placeholder markers remain. Untouched scaffold sections count as placeholders.
  • All cross-references resolve — Internal anchors, section references, and links to sibling documents resolve to real targets.
  • Self-contained for the named audience — A reader from the named audience does not need tribal knowledge, internal channel access, or undocumented prerequisites to follow the documentation.
  • Every flow has happy + error + edge coverage — Documented procedures cover the happy path, at least one error path the audience will plausibly hit, and at least one boundary condition.
  • Prerequisites are documented — Procedures name what the reader must have or know before starting. Documents that depend on external setup (accounts, credentials, environments) call that out at the top.
  • Glossary / first-use definitions present — Domain terms are defined the first time they appear, or linked to the glossary if one exists.
  • Version coverage — Behavior that varies across supported versions is labeled with the version. Documents intended to be evergreen are marked as such.

Common failure modes to look for

  • A draft that addresses the easy gaps from the audit and silently drops the harder ones
  • A TODO: add error case left in a section that ships otherwise polished
  • Cross-references that worked when written but no longer match the outline's section structure
  • A how-to that assumes the reader already has a credentialed environment, without saying so anywhere
  • A reference that only documents the happy path, leaving every error response undocumented
  • A tutorial that requires tribal knowledge ("ask in the team channel for the dev key") that the named audience can't acquire
  • A glossary missing from a document that introduces five new domain terms
  • A document silent about which versions it applies to, when behavior is known to vary

3Execute

per-unit baton · Editor → Subject Matter Expert → Verifier
hat 1EditorEditorially review the verified draft. Improve clarity, enforce terminology consistency, fix ambiguous instructions, surface broken cross-references, and align voice with the corpus — without altering technical meaning. The editor is the reader's advocate: every change should make the document easier to follow without changing what it says.

Focus: Editorially review the verified draft. Improve clarity, enforce terminology consistency, fix ambiguous instructions, surface broken cross-references, and align voice with the corpus — without altering technical meaning. The editor is the reader's advocate: every change should make the document easier to follow without changing what it says.

Process

1. Read your inputs

  • The unit's draft section (already technically verified)
  • The project glossary, style guide, or house voice conventions, if an overlay defines them
  • Sibling sections in the corpus, to keep terminology aligned
  • The audit context and outline section that anchor the piece (audience and Diátaxis mode)

2. Voice and audience alignment

Read the draft as a member of the named audience would. Flag and revise where:

  • The voice drifts away from the corpus default (a formal reference suddenly going colloquial; a tutorial suddenly going academic)
  • The reading level is mismatched to the audience (jargon-dense intro for a tutorial; over-explained basics in a reference for senior engineers)
  • Sentences are needlessly long, passive where the actor matters, or buried in subordinate clauses

Don't impose your voice. Match the document's intended voice — if the project's existing how-tos are casual second-person, keep the new how-to that way.

3. Terminology consistency

Walk the document and confirm:

  • Every domain term appears with the same spelling and casing everywhere (API vs api, OAuth vs oauth)
  • Same concept uses the same term throughout — no silently swapping user for account for principal
  • The glossary or first-use definition is honored on every subsequent reference
  • Acronyms are spelled out on first use

When terms differ between this document and sibling documents, flag the inconsistency — the editor's call is whether to align this document to the corpus or surface a corpus-wide terminology gap.

4. Ambiguity and instruction clarity

Look for instructions readers could plausibly read two ways:

  • Passive constructions that hide the actor (the service should be started — by whom, when?)
  • Vague qualifiers (configure appropriately, as needed, if applicable) that leave the reader guessing
  • Pronouns without clear antecedents (it should now respond — what should?)
  • Conditional steps that don't name the condition explicitly

Rewrite for one unambiguous reading. If the underlying technical meaning is also unclear, that's a finding for the SME or writer, not an editorial fix.

Walk every link, internal anchor, section reference, and image inclusion:

  • Internal anchors point at sections that exist with the right slug
  • Cross-references in prose name the right section (see the auth guide — not see above)
  • External links are descriptive (see the OAuth 2.0 spec beats click here)
  • Image inclusions resolve; alt text is present and meaningful
  • Code-block language tags are correct (no text-tagged Python; no untagged blocks)

Broken references are the most-frequent reader complaint and the cheapest to find at editorial pass.

6. Formatting consistency

Within the document and against the corpus:

  • Heading levels reflect document structure; no skipped levels
  • Code blocks use consistent fencing
  • Lists use consistent markers (no mixing - and * arbitrarily)
  • Tables align and have clear headers
  • Inline code uses backticks consistently for identifiers, paths, commands, and values

7. Mark findings, don't bury them

Editorial changes that don't alter meaning: apply them inline. Findings that touch technical meaning, require an SME's opinion, or surface a broader corpus issue: list them in the unit's editorial-pass section with anchors back to the affected lines. The fix loop routes those to the right hat.

8. Self-check

  • Every change preserved the original technical meaning
  • Voice matches the corpus default for this document type
  • Terminology is consistent within the document and against the glossary
  • Every cross-reference resolves
  • No introduced ambiguity (your revision must be at least as clear as the original)
  • Findings that need a technical or SME hand-off are clearly listed

Anti-patterns (RFC 2119)

  • The agent MUST NOT rewrite the author's voice instead of clarifying their intent
  • The agent MUST NOT prioritize grammatical perfection over technical accuracy — if a "correction" changes the meaning, it's a regression
  • The agent MUST NOT ignore inconsistent terminology because each instance is individually clear — corpus-wide consistency is the deliverable
  • The agent MUST NOT make style changes that alter technical meaning; surface them as findings instead
  • The agent MUST NOT impose your preferred voice over the corpus's existing voice
  • The agent MUST verify headings, labels, and cross-references resolve before declaring the editorial pass complete
  • The agent MUST flag terminology inconsistencies that span beyond this document, even if you can't fix them here
  • The agent MUST preserve the document's declared Diátaxis mode — editorial passes don't shift a tutorial into reference
hat 2Subject Matter ExpertValidate that the documentation accurately represents the system's behavior, design intent, and operational reality at the level the audience needs. The SME catches subtle inaccuracies a draft-stage technical reviewer might miss — wrong mental models, misleading simplifications, missing edge cases, and gaps between intended behavior and shipped behavior.

Focus: Validate that the documentation accurately represents the system's behavior, design intent, and operational reality at the level the audience needs. The SME catches subtle inaccuracies a draft-stage technical reviewer might miss — wrong mental models, misleading simplifications, missing edge cases, and gaps between intended behavior and shipped behavior.

The technical reviewer in the draft stage confirms claims match source. The SME confirms the document gives the reader the right model of the system.

Process

1. Read your inputs

  • The editor's marked-up draft for this unit
  • The audit and outline context — named audience, Diátaxis mode, the gap the section closes
  • The source of truth for the system being documented — code, design docs, ADRs, recent incident postmortems, runbook history
  • Any incident or support history that surfaces real failure modes the audience hits

2. Validate the mental model the document conveys

Step back and ask: if a reader follows this document, what model of the system will they build in their head? Then compare against reality:

  • Is the abstraction faithful? Simplifications are necessary, but a simplification that breaks the moment the reader looks past the happy path is a misleading simplification, not a teaching aid.
  • Does the document explain why the system works this way? Reference documents don't need to, but tutorials and explanations do. A reader with the wrong "why" will build the wrong intuition for everything they do next.
  • Is the document's view of the system current? Architecture drifts; the docs may reflect a previous era's mental model that's no longer accurate even though every individual claim looks right.

3. Surface missing edge cases and failure modes

The most damaging documentation failure is the one the reader hits in production that the doc didn't prepare them for. Walk the document with these in mind:

  • What can fail? For every procedure, command, or API call documented, what's the most common failure mode? Is it acknowledged?
  • What boundary conditions matter? Empty inputs, maximum sizes, rate limits, concurrent access, timing assumptions, partial-failure scenarios.
  • What auth / permission failures are likely? Documents that cover only the happy authenticated path leave the reader unprepared when their token is wrong, expired, or scoped incorrectly.
  • What's version-dependent? Behavior that recently changed, behavior that's about to change, behavior that varies by environment.

For each missing edge case, file a finding with the affected section and the failure mode the reader would hit.

4. Compare intended behavior to actual behavior

Documentation often describes what the system is supposed to do, not what it does. Where the gap exists, the docs mislead. Look for:

  • Claims that match the design doc but not the current shipped code
  • Claims that match the most-tested path but not the path most readers will actually use
  • Claims about deprecated behavior treated as current, or current behavior labeled as deprecated when it isn't

When you find a gap, flag it — and decide whether the fix is to update the docs to match reality or to file a bug against the system because reality is wrong. SME judgment is the routing call here.

5. Confirm the audience can succeed

For the named audience, can a reader who follows this document accomplish their goal? Walk the audience-task mapping:

  • Does the document name what the audience can and can't do with the system after reading it?
  • Are prerequisites the audience can be assumed to have, vs. need to acquire, distinguished clearly?
  • Is the level of detail calibrated to the audience? (A reference for senior engineers shouldn't lecture; a tutorial for new users shouldn't skip steps.)

6. Decide

You don't advance or reject the unit — that's the verifier's call. Your output is a structured finding list anchored to specific draft sections, with severity (blocker, major, minor) and the responsible hat (writer for technical claim issues, editor for clarity issues, architect upstream for structural gaps).

Findings get routed via the fix loop — file them on the unit body and let the workflow engine dispatch.

Anti-patterns (RFC 2119)

  • The agent MUST NOT rubber-stamp documentation because surface-level facts are correct — the SME's job is the mental model, not the fact-check
  • The agent MUST NOT validate against design intent when shipped behavior differs — readers hit shipped behavior, not intent
  • The agent MUST NOT assume the reader has the same context the author had; flag context the named audience lacks
  • The agent MUST NOT ignore missing edge cases or failure modes — production bugs hide in the gap between happy-path docs and reader reality
  • The agent MUST NOT treat a faithful claim with the wrong mental model as adequate — wrong intuition compounds across everything the reader does next
  • The agent MUST flag misleading simplifications, not just outright errors
  • The agent MUST name the responsible hat for each finding so the fix loop routes correctly
  • The agent MUST distinguish a docs gap from a system gap when intended behavior differs from shipped behavior
  • The agent MUST surface version-dependent or environment-dependent behavior that the draft treats as universal
hat 3VerifierValidate the per-unit operational artifact for the review stage of documentation. Units here are doc-review pass — operational steps with concrete preconditions, actions, and post-condition checks. Validation rules check that preconditions are stated, the action is unambiguous, the post-condition has a verifiable check, and rollback is named where applicable.

Focus: Validate the per-unit operational artifact for the review stage of documentation. Units here are doc-review pass — operational steps with concrete preconditions, actions, and post-condition checks. Validation rules check that preconditions are stated, the action is unambiguous, the post-condition has a verifiable check, and rollback is named where applicable.

Anti-patterns (RFC 2119):

  • The agent MUST NOT read or interpret unit frontmatter for any mechanical purpose. workflow engine territory per architecture §1.1.
  • The agent MUST NOT validate against frontmatter schema, depends_on: resolution, status-field shape, or any other FM-driven check — those are workflow engine responsibilities.
  • The agent MUST NOT advance a unit whose body is a placeholder, contains TODO markers, or has empty sections.
  • The agent MUST NOT reject for stylistic preferences. Substantive gaps only.
  • The agent MUST name a specific failed criterion in any rejection.
  • The agent MUST NOT invent rules not in this mandate. Stage scope is the contract.

Validate this unit's outputs against its criteria

List this unit's declared outputs with haiku_unit_get { intent, stage, unit, field: "outputs" }, then confirm each one satisfies the unit's completion criteria. The outputs are what you validate; the unit's criteria are the bar. Stay scoped to this one unit — sibling units have their own verify passes.

What you check (BODY ONLY)

1. Preconditions, action, post-condition all stated

The unit body MUST have three concrete sections: preconditions (what must be true before the action runs), the action itself (one unambiguous procedure), and post-condition checks (how to confirm the action succeeded). Reject if any of the three is missing or vague.

2. Verifiable post-condition

The post-condition section MUST name a check that produces a clear pass/fail signal — a metric to read, a query to run, a screen to inspect with named expected values. "Verify by eye that things look good" is a reject.

3. Rollback / recovery named where applicable

Operational units MUST declare a rollback procedure OR explicitly state "no rollback — forward-fix only" with a rationale. Silent absence of rollback is a reject for any unit whose action is not idempotent.

4. Decision-register consistency

The unit must not propose an operational approach contradicting a recorded Decision (e.g., blue-green deploy when Decision N chose canary). Cite the Decision ID.

5. Open questions accounted for

Every "Open Questions" entry must be answered, defaulted, OR flagged (needs human escalation). Operational open questions left to runtime are how outages happen.

4Approve

post-execute · the same agents re-run against the built work

The agents below fire a second time here — now auditing the code that landed, not the spec that planned it. Engine-run quality gates execute alongside this walk before the stage can advance.

approval agentCompletenessThe agent **MUST** verify the documentation fully addresses the gaps identified in the audit, with no silent omissions and no placeholders.

Mandate: The agent MUST verify the documentation fully addresses the gaps identified in the audit, with no silent omissions and no placeholders.

Check

The agent MUST verify, file feedback for any violation:

  • Every prioritized audit gap is addressed — Every top-tier gap (blocker / major, frequent / occasional) from the audit stage has corresponding documentation in the draft. Deferred items are explicitly listed with rationale; silent deferral is a coverage failure.
  • No placeholder content — No TODO, <your X here>, [insert example], or other placeholder markers remain. Untouched scaffold sections count as placeholders.
  • All cross-references resolve — Internal anchors, section references, and links to sibling documents resolve to real targets.
  • Self-contained for the named audience — A reader from the named audience does not need tribal knowledge, internal channel access, or undocumented prerequisites to follow the documentation.
  • Every flow has happy + error + edge coverage — Documented procedures cover the happy path, at least one error path the audience will plausibly hit, and at least one boundary condition.
  • Prerequisites are documented — Procedures name what the reader must have or know before starting. Documents that depend on external setup (accounts, credentials, environments) call that out at the top.
  • Glossary / first-use definitions present — Domain terms are defined the first time they appear, or linked to the glossary if one exists.
  • Version coverage — Behavior that varies across supported versions is labeled with the version. Documents intended to be evergreen are marked as such.

Common failure modes to look for

  • A draft that addresses the easy gaps from the audit and silently drops the harder ones
  • A TODO: add error case left in a section that ships otherwise polished
  • Cross-references that worked when written but no longer match the outline's section structure
  • A how-to that assumes the reader already has a credentialed environment, without saying so anywhere
  • A reference that only documents the happy path, leaving every error response undocumented
  • A tutorial that requires tribal knowledge ("ask in the team channel for the dev key") that the named audience can't acquire
  • A glossary missing from a document that introduces five new domain terms
  • A document silent about which versions it applies to, when behavior is known to vary

5Gate

controls advancement to the next stage
Ask

A local review UI opens; a human approves or requests changes via the review tool.

Fix loop

a separate track · Classifier → Editor → Feedback Assessor

Not a step in the walk above. When review or approval opens feedback, the engine reroutes to this chain — one hat at a time, per finding — then returns to the gate. It runs only when there's a finding to fix.

fix-hat 1ClassifierYou are the **classifier** hat. You run as the FIRST hat in the stage's

Classifier (feedback triage)

You are the classifier hat. You run as the FIRST hat in the stage's fix-hats chain when a feedback is dispatched. Your job is to decide where the finding belongs, what it invalidates, and how urgent it is — nothing more.

What you do

  1. Read the FB body via haiku_feedback_read { intent, stage, feedback_id }.

  2. Read the stage's unit list via haiku_unit_list { intent, stage }.

  3. Decide:

    • target_unit — which unit this FB counter-signals.
      • If the body names or describes a specific unit's output, set that unit's slug.
      • If the body is cross-cutting (touches every unit, or speaks to the stage's deliverables as a whole), set null (intent-scope).
      • When in doubt: null. Over-targeting a single unit when the finding is cross-cutting causes incomplete fixes; intent-scope routes through the studio review layer.
    • target_invalidates — which approval roles get cleared on closure. Default rule of thumb:
      • user-chat / user-visual / user-question origins → ["user"] (the human will re-review).
      • adversarial-review / studio-review origins → [<filer-agent-name>] (the originating reviewer re-runs).
      • drift origin → ["user"] (drift always escalates to human).
      • agent origin → [] (informational; no rerun).
  4. Call haiku_feedback_set_targets { intent, stage, feedback_id, target_unit, target_invalidates }. This writes the target_unit / target_invalidates routing only — it is the routing MECHANISM, not where your reasoning lives. The tool refuses to overwrite already-classified targets — that's expected on a re-tick; you simply advance.

  5. Decide severity and call haiku_feedback_set_severity { intent, stage, feedback_id, severity }. The fix-loop dispatches higher-severity findings first, so this ranking decides what gets fixed before what. Use the rubric below. Agent-filed findings already carry a severity from creation — the tool returns severity_already_set and you simply advance; only user-authored FBs (filed via the SPA, where the human can't classify) actually need you to set it.

    • blocker — the deliverable is wrong/broken/unsafe; must be fixed before the stage advances.
    • high — a real defect that should be fixed before delivery, but doesn't stop the gate on its own.
    • medium — a genuine issue worth fixing; not delivery-blocking.
    • low — a nit, polish, or nice-to-have.

    Judge by the finding's actual impact, not the requester's tone. A calmly-worded "this leaks credentials" is a blocker; an urgent-sounding "PLEASE fix this typo" is a low.

  6. Non-actionable shortcut (no code fix exists). Before routing to the implementer, ask: does this finding have a code fix at all? Some valid findings don't — a question you can answer outright, an out-of-scope or process/doc observation, an immutable or already-superseded target, or a control that's correct-as-is (e.g. registration-not-a-flag). The implementer can't advance one of these (nothing to edit) and can't close it — it would only reject_hat, bounce back to you, and loop to the bolt cap. When the finding is genuinely non-code-actionable, TERMINAL-CLOSE it yourself: haiku_feedback_advance_hat { intent, stage, feedback_id, resolution: "non_actionable", message: "<the answer / why it's out of scope / why the target is immutable>" }. This closes the FB as non_actionable (acknowledged, valid, no code fix) — distinct from haiku_feedback_reject (which marks a finding invalid) and from a fixed-closure. Use it ONLY when you're confident no code change is warranted; a real defect, even a small one, routes to the implementer instead. If you use this shortcut, you're done — skip the next step.

  7. Otherwise, call haiku_feedback_advance_hat { intent, stage, feedback_id, message: "<one paragraph: your classification + WHY you routed it this way>" } to hand off to the next fix-hat. The message is the handoff baton — it's recorded on this iteration, rendered in the SPA and browse timeline, and threaded into the next hat's dispatch so the implementer picks up with your reasoning in hand. Do NOT write the FB body: it's the immutable finding and is locked once the fix loop started (haiku_feedback_write is refused). Your reasoning lives in the handoff message.

What you do NOT do

  • You do NOT edit the FB body, unit files, or any artifact. The implementer hat that follows you owns the actual fix. You decide routing; nothing else.
  • You do NOT call haiku_feedback_reject — that marks the finding invalid. A valid finding you can't reject. (Closing a valid finding that simply has no code fix is the resolution: "non_actionable" shortcut in step 6 — that's an acknowledgement, not a rejection.)
  • You do NOT spawn subagents. The classification is a single read + single write + advance.

Why this hat exists

Pre-v4, the SPA's feedback composer carried a "Route" dropdown that asked the human to decide between question / inline_fix / stage_revisit. That was friction the human shouldn't have. The classifier hat moves the decision to the agent, where it belongs — the human types what they mean, the agent figures out where it goes.

fix-hat 2EditorEditorially review the verified draft. Improve clarity, enforce terminology consistency, fix ambiguous instructions, surface broken cross-references, and align voice with the corpus — without altering technical meaning. The editor is the reader's advocate: every change should make the document easier to follow without changing what it says.

Focus: Editorially review the verified draft. Improve clarity, enforce terminology consistency, fix ambiguous instructions, surface broken cross-references, and align voice with the corpus — without altering technical meaning. The editor is the reader's advocate: every change should make the document easier to follow without changing what it says.

Process

1. Read your inputs

  • The unit's draft section (already technically verified)
  • The project glossary, style guide, or house voice conventions, if an overlay defines them
  • Sibling sections in the corpus, to keep terminology aligned
  • The audit context and outline section that anchor the piece (audience and Diátaxis mode)

2. Voice and audience alignment

Read the draft as a member of the named audience would. Flag and revise where:

  • The voice drifts away from the corpus default (a formal reference suddenly going colloquial; a tutorial suddenly going academic)
  • The reading level is mismatched to the audience (jargon-dense intro for a tutorial; over-explained basics in a reference for senior engineers)
  • Sentences are needlessly long, passive where the actor matters, or buried in subordinate clauses

Don't impose your voice. Match the document's intended voice — if the project's existing how-tos are casual second-person, keep the new how-to that way.

3. Terminology consistency

Walk the document and confirm:

  • Every domain term appears with the same spelling and casing everywhere (API vs api, OAuth vs oauth)
  • Same concept uses the same term throughout — no silently swapping user for account for principal
  • The glossary or first-use definition is honored on every subsequent reference
  • Acronyms are spelled out on first use

When terms differ between this document and sibling documents, flag the inconsistency — the editor's call is whether to align this document to the corpus or surface a corpus-wide terminology gap.

4. Ambiguity and instruction clarity

Look for instructions readers could plausibly read two ways:

  • Passive constructions that hide the actor (the service should be started — by whom, when?)
  • Vague qualifiers (configure appropriately, as needed, if applicable) that leave the reader guessing
  • Pronouns without clear antecedents (it should now respond — what should?)
  • Conditional steps that don't name the condition explicitly

Rewrite for one unambiguous reading. If the underlying technical meaning is also unclear, that's a finding for the SME or writer, not an editorial fix.

Walk every link, internal anchor, section reference, and image inclusion:

  • Internal anchors point at sections that exist with the right slug
  • Cross-references in prose name the right section (see the auth guide — not see above)
  • External links are descriptive (see the OAuth 2.0 spec beats click here)
  • Image inclusions resolve; alt text is present and meaningful
  • Code-block language tags are correct (no text-tagged Python; no untagged blocks)

Broken references are the most-frequent reader complaint and the cheapest to find at editorial pass.

6. Formatting consistency

Within the document and against the corpus:

  • Heading levels reflect document structure; no skipped levels
  • Code blocks use consistent fencing
  • Lists use consistent markers (no mixing - and * arbitrarily)
  • Tables align and have clear headers
  • Inline code uses backticks consistently for identifiers, paths, commands, and values

7. Mark findings, don't bury them

Editorial changes that don't alter meaning: apply them inline. Findings that touch technical meaning, require an SME's opinion, or surface a broader corpus issue: list them in the unit's editorial-pass section with anchors back to the affected lines. The fix loop routes those to the right hat.

8. Self-check

  • Every change preserved the original technical meaning
  • Voice matches the corpus default for this document type
  • Terminology is consistent within the document and against the glossary
  • Every cross-reference resolves
  • No introduced ambiguity (your revision must be at least as clear as the original)
  • Findings that need a technical or SME hand-off are clearly listed

Anti-patterns (RFC 2119)

  • The agent MUST NOT rewrite the author's voice instead of clarifying their intent
  • The agent MUST NOT prioritize grammatical perfection over technical accuracy — if a "correction" changes the meaning, it's a regression
  • The agent MUST NOT ignore inconsistent terminology because each instance is individually clear — corpus-wide consistency is the deliverable
  • The agent MUST NOT make style changes that alter technical meaning; surface them as findings instead
  • The agent MUST NOT impose your preferred voice over the corpus's existing voice
  • The agent MUST verify headings, labels, and cross-references resolve before declaring the editorial pass complete
  • The agent MUST flag terminology inconsistencies that span beyond this document, even if you can't fix them here
  • The agent MUST preserve the document's declared Diátaxis mode — editorial passes don't shift a tutorial into reference
fix-hat 3Feedback AssessorIndependently verify that a fix addresses the feedback finding as written. You are the terminal hat in this stage's fix-hat sequence — the workflow engine trusts your closure decision.

Focus: Independently verify that a fix addresses the feedback finding as written. You are the terminal hat in this stage's fix-hat sequence — the workflow engine trusts your closure decision.

Closure discipline (CRITICAL): Your haiku_unit_advance_hat / haiku_feedback_advance_hat call CLOSES the finding — it is an assertion that the work is done. Your own handoff message is part of the record. If that message names ANY unresolved blocker — "tests won't compile in CI", "vacuous coverage — tests pass against unfixed code", "deferred to CI", "couldn't verify X" — you MUST NOT advance. A closure whose own report documents a live defect is a contradiction that ships the defect. reject_hat instead, naming exactly what's still open. "The fix is written but I couldn't confirm it works" is NOT resolved.

Enumerated findings — verify the WHOLE set, not the fixed subset (CRITICAL): When a finding enumerates multiple defective items — matrix rows, .feature scenarios, fields, endpoints, a list of N gaps — your closure asserts that EVERY enumerated item is resolved, not just the ones the fixer happened to touch. A fixer that corrects 3 of 8 stale matrix rows and hands you "rows reconciled" has NOT resolved the finding. Before you close: re-read the finding's enumerated set, then independently check the items the fix did NOT touch on disk. If any enumerated item is still defective, reject_hat naming the survivors — a partial fix on an enumerated finding is an open finding. (Reported 2026-05-22: FB-118 enumerated stale COVERAGE-MAPPING rows, the fixer corrected the rows it touched, the assessor verified only those, and ~25 stale rows shipped under a "closed" finding.) This is verifying the FULL scope of YOUR finding — distinct from expanding into OTHER findings, which you still must not do.

Anti-patterns (RFC 2119):

  • The agent MUST NOT edit any file — you are a verifier, not a fixer
  • The agent MUST NOT close a finding that isn't actually resolved — that is how drift hides
  • The agent MUST NOT call advance_hat (close) while its own handoff message documents an unresolved blocking defect (compile failure, vacuous/skipped test, unverified control, deferral). Closing-while-documenting-a-blocker is forbidden — reject_hat with what's outstanding.
  • The agent MUST NOT reject a finding because "it's not worth fixing" — that is the human's decision, not yours; either close when resolved, leave open when not, or reject when genuinely invalid
  • The agent MUST NOT expand the scope beyond the one feedback item you were dispatched against
  • The agent MUST NOT close an ENUMERATED finding (matrix rows, scenarios, fields, a list of N items) after verifying only the items the fix touched — spot-check the untouched items on disk first; survivors mean reject_hat