Outline
Ask gateStructure the documentation with clear information architecture
Outline
The information-architecture stage of the documentation lifecycle: translate the audit's ranked gaps into a navigable structure before any prose lands. This is where the shape of the docs gets decided — what gets written, in what mode, in what order, and how the pieces connect.
Scope
Designing the section hierarchy, the per-section purpose, the doc mode (tutorial / how-to / reference / explanation), and the navigation paths between pieces. Outline decides the structure — it does not assess the existing docs (audit) or write the content that fills the structure (draft).
What to do
- Translate each prioritized gap into a placed section with a stated purpose.
- Tag each section with its doc mode and keep the modes from blurring into one another.
- Lay out the navigation paths a reader takes between sections, not just a flat list.
- Check the structure against real reader journeys before drafting commits to it.
What NOT to do
- Don't re-audit the existing docs or re-rank gaps — carry forward what audit established.
- Don't write the prose, code samples, or visuals — that's the draft stage.
- Don't leave a section without a clear purpose statement.
- Don't defer structural decisions to drafting; IA changes after prose lands are expensive.
How the engine runs this stage
1Elaborate
collaborative · plan the work, fan out discovery, declare outputsInputs consumed
Phase guidance
phase overrideELABORATION- "Outline defines a clear hierarchy with no more than 3 levels of nesting"
Outline Stage — Elaboration
Criteria Guidance
Good criteria — concrete and verifiable
- "Outline defines a clear hierarchy with no more than 3 levels of nesting"
- "Each section has a one-sentence purpose statement explaining what the reader will learn"
- "Information architecture groups content by user task, not by system component"
Bad criteria — vague (no clear check)
- "Outline is structured"
- "Sections are organized"
- "Architecture is clear"
Outputs produced
output templateDocument OutlineInformation architecture with logical section hierarchy and purpose statements.
Document Outline
Information architecture with logical section hierarchy and purpose statements.
Expected Artifacts
- Section hierarchy -- organized structure with no more than 3 levels of nesting
- Purpose statements -- one-sentence description of what the reader will learn per section
- Audience mapping -- target audience identified for each section
- Navigation design -- task-oriented structure with progressive disclosure
Quality Signals
- Structure serves the reader's workflow, not the system's architecture
- Each section has a defined purpose and audience
- Information architecture groups content by user task
- No orphaned sections or dead-end navigation paths
2Review
pre-execute · agents audit the planned spec before any code landsreview agentStructureThe agent **MUST** verify the information architecture supports how readers actually look for information — by task and by audience, not by system structure.
Mandate: The agent MUST verify the information architecture supports how readers actually look for information — by task and by audience, not by system structure.
Check
The agent MUST verify, file feedback for any violation:
- Task orientation, not code structure — Top-level grouping follows what readers are trying to do (onboarding, integrating, troubleshooting, looking up reference). Outlines organized by internal modules / packages / services typically fail every audience except the team that built them.
- Heading hierarchy is logical and consistent — Depth stays around three levels or less; nesting matches the conceptual model; sibling sections are at compatible levels of abstraction.
- Section sizing balanced — No section is too small to need its own heading and no section is too large to be navigated. Sections that exceed reasonable navigation depth should split into siblings.
- Diátaxis mode integrity — Every piece has a declared mode (tutorial / how-to / reference / explanation). No piece mixes modes inside one document.
- Purpose statement per section — Every section has its one-sentence statement of what the reader gets there. Sections without one signal undefined scope.
- Navigation completeness — Every page has at least one inbound path (it's reachable) and a deliberate outbound path or terminal status (it's not a dead end without intent).
- Cross-references resolve within the outline — No
See Section Xpointing at a section that isn't in the outline. - Entry point per audience — Each named audience has an obvious starting page; outlines without entry points fail new users no matter how complete the rest is.
- Audit coverage — Every prioritized gap from the audit appears in the outline or is explicitly deferred with rationale.
Common failure modes to look for
- Top-level grouping mirrors the code's module names ("Auth Service", "Billing Service") when readers are searching by task ("How do I sign up?", "How do I cancel my subscription?")
- A four- or five-level deep nesting where every leaf is one sentence — flatten or merge
- A "Getting Started" section that's actually a reference page in disguise (or vice versa)
- An outline that lists every page but never names how a reader arrives there
- Orphaned reference pages with no inbound paths from the tutorials or how-to clusters that should link to them
- Top-tier audit gaps silently dropped from the outline with no deferral rationale
- Sections labeled with internal jargon the named audience wouldn't recognize
3Execute
per-unit baton · Architect → Outline Reviewer → Verifierhat 1ArchitectDesign the information architecture that turns the audit's ranked gap list into a navigable structure. The architect decides what each piece of documentation IS (tutorial, how-to, reference, explanation) and how the pieces connect into journeys readers can actually follow. Structure decisions here propagate into every line of prose downstream, so getting the IA right is leverage.
Focus: Design the information architecture that turns the audit's ranked gap list into a navigable structure. The architect decides what each piece of documentation IS (tutorial, how-to, reference, explanation) and how the pieces connect into journeys readers can actually follow. Structure decisions here propagate into every line of prose downstream, so getting the IA right is leverage.
Process
1. Read the audit and the audience
Before structuring anything, ground the design in the audit:
- The named audience(s) the audit was scoped against
- The ranked gap list with severity / frequency / evidence
- The recommended doc modes from the gap analyst
- The item-coupling notes (gaps that depend on each other)
If the audit lacks any of those, file feedback against the audit stage rather than guess — IA built on assumed context propagates the wrong structure everywhere downstream.
2. Decide doc mode per piece (Diátaxis discipline)
For each gap to be addressed, decide which mode of documentation it becomes. The four-mode frame:
- Tutorial — lesson-shaped, teaches by doing, optimized for learning. New users follow it from start to finish. Holds the reader's hand. NOT for reference.
- How-to guide — task-shaped, helps a reader accomplish a specific goal they already understand. Assumes context. Multiple paths.
- Reference — describes what exists. API surfaces, configuration options, command flags. Looked up, not read through. Optimized for completeness and findability.
- Explanation — concept-shaped, gives the reader the mental model. Why something is the way it is. Optimized for understanding, not action.
Mixing modes inside one document is the most common readability failure. A tutorial that drifts into reference loses learners; a reference that lectures loses lookups. When a single gap genuinely needs two modes, split it into two pieces and link them.
Decide the mode before structuring sections — section design follows mode, not the other way around.
3. Group and sequence
With modes assigned, group pieces by how readers will reach them:
- Entry point — the doc someone lands on first. Often a getting-started tutorial or a landing page that routes by intent. Every audience should have one obvious entry point.
- Task clusters — how-to guides grouped by the goal they serve (auth, deployment, troubleshooting). Readers in a task mindset scan a cluster, not the whole site.
- Reference layer — the lookup surface. Flat enough that readers can find the right page in 1-2 clicks from a search result.
- Conceptual layer — explanations that ground the reference and how-tos. Read out-of-band, often linked from tutorials and how-tos.
Sequence within a cluster by dependency, not alphabet. If how-to B requires concepts introduced in how-to A, A goes first.
4. Draft the hierarchy
Sketch the section tree. Hold yourself to a few constraints:
- Maximum nesting depth of about three levels. Deeper hierarchies become unnavigable; flatten or split into separate documents.
- Section sizes balanced. A section that's three sentences should merge into its parent; a section that's twenty subsections should split into sibling documents.
- Every section has a one-sentence purpose statement — what the reader learns or accomplishes by reading it. If you can't write the sentence, the section doesn't have a job.
Outline format that captures this:
1. <Top-level page or section>
Purpose: <one sentence — what the reader gets here>
Mode: <tutorial / how-to / reference / explanation>
1.1. <Subsection>
Purpose: <one sentence>
...
5. Plan navigation and cross-references
Structure is only useful if readers can move through it. For each piece, name:
- Entry paths — how does a reader arrive here? From the landing page, from search, from another doc, from an in-product link?
- Outbound links — which other pieces does this one reference? Where do readers go next?
- Inbound expectations — what does this piece assume the reader has already read or knows? Name prerequisites explicitly.
Cross-references are part of the design, not a polish step. A piece with no inbound paths is orphaned; a piece with no outbound paths is a dead end.
6. Coverage map the outline against the audit
Before declaring done, walk the gap list and confirm every prioritized gap has at least one piece in the outline that addresses it. Where a gap is intentionally deferred (out of scope for this intent, deferred to a follow-up), note that explicitly rather than leaving it silently uncovered.
7. Write the outline artifact
The unit body structure: scope and audience recap, doc-mode index, hierarchy with per-section purpose statements, navigation notes, gap-to-piece coverage map, deferred items. Every section in the hierarchy traces back to a ranked gap or to a structural piece (entry point, navigation hub) that the IA needs to be navigable.
Anti-patterns (RFC 2119)
- The agent MUST NOT organize documentation by system component when the audience came with a task — readers look for "how do I X", not "what are the modules"
- The agent MUST NOT create deeply nested hierarchies (beyond ~3 levels) — they become unnavigable and signal a structure that should be split
- The agent MUST NOT design structure without naming how readers arrive at each page — orphaned pages are an IA failure, not a content failure
- The agent MUST NOT omit an obvious entry point — every named audience needs one
- The agent MUST NOT treat the outline as a flat table of contents — IA is the navigation and cross-reference graph, not just an order
- The agent MUST NOT assign Diátaxis modes by guessing — name the mode based on what the reader is doing when they reach the piece
- The agent MUST NOT mix modes inside one document — split into siblings and link
- The agent MUST write a one-sentence purpose statement for every section; sections without one have no job
- The agent MUST map every prioritized audit gap to a piece in the outline (or explicitly defer it)
- The agent MUST match the existing docs-platform conventions when one exists (heading style, navigation patterns, file-naming) — consistency over preference
hat 2Outline ReviewerValidate the architect's outline against the reader's experience. You are the verify role for the outline stage. Walk realistic user journeys through the proposed IA and confirm the structure supports them. Either advance the unit or reject with a named failure — you do not redesign the outline yourself.
Focus: Validate the architect's outline against the reader's experience. You are the verify role for the outline stage. Walk realistic user journeys through the proposed IA and confirm the structure supports them. Either advance the unit or reject with a named failure — you do not redesign the outline yourself.
You own validation; the architect owns design. Reject when the structure fails a journey, not because you would have organized it differently.
Process
1. Read your inputs
- The unit body (the architect's outline)
- The audit-stage
audit-reportthe outline addresses - The named audience(s) and any prior decisions on doc-platform conventions
2. Walk the journeys
For each named audience, walk at least one realistic journey end-to-end through the outline:
- New user journey — land on the entry point, read the first piece, navigate to the next, complete a representative task. Do they have everything they need at each step?
- Task-driven journey — arrive from search with a specific goal in mind. Can they find the right page in one or two clicks? Does the page assume context they don't have?
- Lookup journey — arrive needing a specific piece of reference. Is it where they'd expect? Is it complete enough that they don't need to bounce out?
- Recovery journey (for runbooks / troubleshooting) — arrive with a failure mode in hand. Does the structure surface the right page?
If a journey hits a dead end, a missing prerequisite, or a page that mixes modes incoherently, that's a journey failure, not a style note.
3. Check structural rules
After the journey walks, audit the IA against the structural constraints:
- Doc mode integrity — every piece has one Diátaxis mode declared; no piece secretly mixes modes
- Heading hierarchy — depth stays around three levels or less; deeper nesting signals "split into a sibling document"
- Section sizing — no section is too small to merit its own header or too large to be navigated
- Purpose statements — every section has its one-sentence purpose
- Navigation completeness — no orphan pages (no inbound paths) and no dead-end pages (no outbound paths) unless intentional and explained
- Cross-reference accuracy — every named cross-reference points to a piece that exists in the outline
4. Confirm audit coverage
Walk the audit's prioritized gap list and confirm:
- Every top-tier gap (blocker / major) is addressed by a piece in the outline, or explicitly deferred with rationale
- Deferred items aren't silently dropped — they're listed so the user can confirm scope
5. Decide
- If every journey succeeds, structural rules pass, and audit coverage is complete: call
haiku_unit_advance_hat. - If any journey fails, structural rule breaks, or top-tier gap is silently uncovered: call
haiku_unit_reject_hatwith a message naming the responsible hat (architect) and the specific failure (which journey, what broke, where). The workflow engine rewinds within the unit; the architect re-designs.
You do not rewrite the outline yourself. You name what's wrong; the architect fixes it.
Anti-patterns (RFC 2119)
- The agent MUST NOT approve an outline without walking at least one journey per named audience — structural review without journey simulation misses the user-impact failures
- The agent MUST NOT reject for stylistic preference (different section names you'd have used, different ordering you'd prefer) — substantive failures only
- The agent MUST NOT edit the outline; verification is rejection or advancement, not redesign
- The agent MUST NOT approve when a top-tier audit gap is silently uncovered — silent omission propagates into drafting
- The agent MUST name a specific failure in any rejection (which journey broke, where, why)
- The agent MUST verify Diátaxis mode integrity — pieces that mix tutorial and reference modes will fail readers regardless of prose quality
- The agent MUST verify cross-references resolve within the outline before drafting starts
- The agent MUST flag the absence of a clear entry point per audience — even a strong hierarchy fails without one
hat 3VerifierValidate the per-unit information architecture for the outline stage of documentation. Units here are the IA scaffold the draft stage will fill in. Validation rules check that every audit-ranked gap has a home in the structure, that per-section purpose statements and Diátaxis mode tags are present, and that the structure is internally consistent with the named audience.
Focus: Validate the per-unit information architecture for the outline stage of documentation. Units here are the IA scaffold the draft stage will fill in. Validation rules check that every audit-ranked gap has a home in the structure, that per-section purpose statements and Diátaxis mode tags are present, and that the structure is internally consistent with the named audience.
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 NOT re-walk user journeys (that's the outline-reviewer's lens, already run).
- The agent MUST name a specific failed criterion in any rejection.
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. Every ranked audit gap has a section
Cross-reference the audit's ranked gap list against the IA. Every gap MUST have a destination section in the outline OR an explicit "out of scope — see <next intent>" note. Silent absence is a reject.
2. Per-section purpose statements are concrete
Each section in the IA MUST name what it explains, to whom, and in what Diátaxis mode (tutorial / how-to / reference / explanation). Sections with placeholder purposes ("covers X") or missing mode tags are a reject.
3. Audience-structure consistency
The unit's named audience (developer / operator / end-user / etc.) must align with the IA's depth and ordering. A developer-targeted reference doc sequenced as a beginner tutorial — or vice versa — is a structural mismatch the draft phase can't recover from. Reject and cite the section.
4. Decision-register consistency
The outline MUST NOT propose a doc structure, terminology, or audience framing that contradicts a Decision in the intent's register. Cite the Decision ID.
5. Open questions accounted for
Every "Open Questions" entry in the body must be answered, defaulted, OR flagged (needs human escalation).
4Approve
post-execute · the same agents re-run against the built workThe 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 agentStructureThe agent **MUST** verify the information architecture supports how readers actually look for information — by task and by audience, not by system structure.
Mandate: The agent MUST verify the information architecture supports how readers actually look for information — by task and by audience, not by system structure.
Check
The agent MUST verify, file feedback for any violation:
- Task orientation, not code structure — Top-level grouping follows what readers are trying to do (onboarding, integrating, troubleshooting, looking up reference). Outlines organized by internal modules / packages / services typically fail every audience except the team that built them.
- Heading hierarchy is logical and consistent — Depth stays around three levels or less; nesting matches the conceptual model; sibling sections are at compatible levels of abstraction.
- Section sizing balanced — No section is too small to need its own heading and no section is too large to be navigated. Sections that exceed reasonable navigation depth should split into siblings.
- Diátaxis mode integrity — Every piece has a declared mode (tutorial / how-to / reference / explanation). No piece mixes modes inside one document.
- Purpose statement per section — Every section has its one-sentence statement of what the reader gets there. Sections without one signal undefined scope.
- Navigation completeness — Every page has at least one inbound path (it's reachable) and a deliberate outbound path or terminal status (it's not a dead end without intent).
- Cross-references resolve within the outline — No
See Section Xpointing at a section that isn't in the outline. - Entry point per audience — Each named audience has an obvious starting page; outlines without entry points fail new users no matter how complete the rest is.
- Audit coverage — Every prioritized gap from the audit appears in the outline or is explicitly deferred with rationale.
Common failure modes to look for
- Top-level grouping mirrors the code's module names ("Auth Service", "Billing Service") when readers are searching by task ("How do I sign up?", "How do I cancel my subscription?")
- A four- or five-level deep nesting where every leaf is one sentence — flatten or merge
- A "Getting Started" section that's actually a reference page in disguise (or vice versa)
- An outline that lists every page but never names how a reader arrives there
- Orphaned reference pages with no inbound paths from the tutorials or how-to clusters that should link to them
- Top-tier audit gaps silently dropped from the outline with no deferral rationale
- Sections labeled with internal jargon the named audience wouldn't recognize
5Gate
controls advancement to the next stageA local review UI opens; a human approves or requests changes via the review tool.
Fix loop
a separate track · Classifier → Architect → Feedback AssessorNot 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
-
Read the FB body via
haiku_feedback_read { intent, stage, feedback_id }. -
Read the stage's unit list via
haiku_unit_list { intent, stage }. -
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-questionorigins →["user"](the human will re-review).adversarial-review/studio-revieworigins →[<filer-agent-name>](the originating reviewer re-runs).driftorigin →["user"](drift always escalates to human).agentorigin →[](informational; no rerun).
-
Call
haiku_feedback_set_targets { intent, stage, feedback_id, target_unit, target_invalidates }. This writes thetarget_unit/target_invalidatesrouting 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. -
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 returnsseverity_already_setand 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.
-
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 asnon_actionable(acknowledged, valid, no code fix) — distinct fromhaiku_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. -
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. Themessageis 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_writeis refused). Your reasoning lives in the handoffmessage.
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 theresolution: "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 2ArchitectDesign the information architecture that turns the audit's ranked gap list into a navigable structure. The architect decides what each piece of documentation IS (tutorial, how-to, reference, explanation) and how the pieces connect into journeys readers can actually follow. Structure decisions here propagate into every line of prose downstream, so getting the IA right is leverage.
Focus: Design the information architecture that turns the audit's ranked gap list into a navigable structure. The architect decides what each piece of documentation IS (tutorial, how-to, reference, explanation) and how the pieces connect into journeys readers can actually follow. Structure decisions here propagate into every line of prose downstream, so getting the IA right is leverage.
Process
1. Read the audit and the audience
Before structuring anything, ground the design in the audit:
- The named audience(s) the audit was scoped against
- The ranked gap list with severity / frequency / evidence
- The recommended doc modes from the gap analyst
- The item-coupling notes (gaps that depend on each other)
If the audit lacks any of those, file feedback against the audit stage rather than guess — IA built on assumed context propagates the wrong structure everywhere downstream.
2. Decide doc mode per piece (Diátaxis discipline)
For each gap to be addressed, decide which mode of documentation it becomes. The four-mode frame:
- Tutorial — lesson-shaped, teaches by doing, optimized for learning. New users follow it from start to finish. Holds the reader's hand. NOT for reference.
- How-to guide — task-shaped, helps a reader accomplish a specific goal they already understand. Assumes context. Multiple paths.
- Reference — describes what exists. API surfaces, configuration options, command flags. Looked up, not read through. Optimized for completeness and findability.
- Explanation — concept-shaped, gives the reader the mental model. Why something is the way it is. Optimized for understanding, not action.
Mixing modes inside one document is the most common readability failure. A tutorial that drifts into reference loses learners; a reference that lectures loses lookups. When a single gap genuinely needs two modes, split it into two pieces and link them.
Decide the mode before structuring sections — section design follows mode, not the other way around.
3. Group and sequence
With modes assigned, group pieces by how readers will reach them:
- Entry point — the doc someone lands on first. Often a getting-started tutorial or a landing page that routes by intent. Every audience should have one obvious entry point.
- Task clusters — how-to guides grouped by the goal they serve (auth, deployment, troubleshooting). Readers in a task mindset scan a cluster, not the whole site.
- Reference layer — the lookup surface. Flat enough that readers can find the right page in 1-2 clicks from a search result.
- Conceptual layer — explanations that ground the reference and how-tos. Read out-of-band, often linked from tutorials and how-tos.
Sequence within a cluster by dependency, not alphabet. If how-to B requires concepts introduced in how-to A, A goes first.
4. Draft the hierarchy
Sketch the section tree. Hold yourself to a few constraints:
- Maximum nesting depth of about three levels. Deeper hierarchies become unnavigable; flatten or split into separate documents.
- Section sizes balanced. A section that's three sentences should merge into its parent; a section that's twenty subsections should split into sibling documents.
- Every section has a one-sentence purpose statement — what the reader learns or accomplishes by reading it. If you can't write the sentence, the section doesn't have a job.
Outline format that captures this:
1. <Top-level page or section>
Purpose: <one sentence — what the reader gets here>
Mode: <tutorial / how-to / reference / explanation>
1.1. <Subsection>
Purpose: <one sentence>
...
5. Plan navigation and cross-references
Structure is only useful if readers can move through it. For each piece, name:
- Entry paths — how does a reader arrive here? From the landing page, from search, from another doc, from an in-product link?
- Outbound links — which other pieces does this one reference? Where do readers go next?
- Inbound expectations — what does this piece assume the reader has already read or knows? Name prerequisites explicitly.
Cross-references are part of the design, not a polish step. A piece with no inbound paths is orphaned; a piece with no outbound paths is a dead end.
6. Coverage map the outline against the audit
Before declaring done, walk the gap list and confirm every prioritized gap has at least one piece in the outline that addresses it. Where a gap is intentionally deferred (out of scope for this intent, deferred to a follow-up), note that explicitly rather than leaving it silently uncovered.
7. Write the outline artifact
The unit body structure: scope and audience recap, doc-mode index, hierarchy with per-section purpose statements, navigation notes, gap-to-piece coverage map, deferred items. Every section in the hierarchy traces back to a ranked gap or to a structural piece (entry point, navigation hub) that the IA needs to be navigable.
Anti-patterns (RFC 2119)
- The agent MUST NOT organize documentation by system component when the audience came with a task — readers look for "how do I X", not "what are the modules"
- The agent MUST NOT create deeply nested hierarchies (beyond ~3 levels) — they become unnavigable and signal a structure that should be split
- The agent MUST NOT design structure without naming how readers arrive at each page — orphaned pages are an IA failure, not a content failure
- The agent MUST NOT omit an obvious entry point — every named audience needs one
- The agent MUST NOT treat the outline as a flat table of contents — IA is the navigation and cross-reference graph, not just an order
- The agent MUST NOT assign Diátaxis modes by guessing — name the mode based on what the reader is doing when they reach the piece
- The agent MUST NOT mix modes inside one document — split into siblings and link
- The agent MUST write a one-sentence purpose statement for every section; sections without one have no job
- The agent MUST map every prioritized audit gap to a piece in the outline (or explicitly defer it)
- The agent MUST match the existing docs-platform conventions when one exists (heading style, navigation patterns, file-naming) — consistency over preference
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_hatwith 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