# stage intake ```output { request, audience, route_history: ["intake"] } Preserve the user's original request verbatim. ``` ```prompt Read the user's runtime prompt and identify the intended audience. Preserve the request verbatim and initialize route_history with intake. This is a text-only explanation workflow: do not edit files, run commands, or claim unobserved facts. Return success with the request and audience, or error if the request is empty. ``` ```edges success -> format_router error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ``` # stage format_router ```output { request, audience, format: "brief" | "detailed", route_history } Append format_router to route_history and preserve the original request. ``` ```prompt Choose exactly one format. If the request explicitly asks for a detailed, in-depth, step-by-step, walkthrough, tutorial, or reference explanation, choose detailed. Otherwise choose brief. Append format_router to route_history. Return brief or detailed to select one branch, not both; never send work backward. ``` ```edges brief -> brief_answer detailed -> detail_router error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ``` # stage brief_answer ```output { request, audience, format, content, route_history } content is a concise answer of no more than five sentences. ``` ```prompt Write a concise answer to the request for the specified audience, no more than five sentences. Preserve all handoff fields and append brief_answer to route_history. Be honest about uncertainty; do not invent execution evidence. Return success to proceed directly to delivery, skipping the detailed branch. ``` ```edges success -> delivery error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ``` # stage detail_router ```output { request, audience, format, detail_kind: "walkthrough" | "reference", route_history } Preserve previous handoff fields and append detail_router to route_history. ``` ```prompt This is the second fork, reached only through the detailed branch. Choose walkthrough for a how-to, tutorial, or step-by-step request. Choose reference for definitions, comparisons, a conceptual explanation, or an explicit reference request. If ambiguous, choose reference. Select exactly one outcome and append detail_router to route_history. Do not return to the first router or brief branch. ``` ```edges walkthrough -> walkthrough reference -> reference error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ``` # stage walkthrough ```output { request, audience, format, detail_kind, content, route_history } content contains an ordered explanation with steps and a clearly labeled example. ``` ```prompt Write an ordered walkthrough answering the original request. Adapt the level to the audience, explain each step, and include a clearly labeled illustrative example. Instructions are not evidence that commands or actions were executed. Preserve all handoff fields and append walkthrough to route_history. Return success to proceed to delivery, without entering the reference branch. ``` ```edges success -> delivery error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ``` # stage reference ```output { request, audience, format, detail_kind, content, route_history } content contains definitions, key distinctions, and a clearly labeled example. ``` ```prompt Write a structured reference answer to the original request, using definitions, key distinctions, and a clearly labeled illustrative example. Adapt it to the audience and state uncertainty rather than inventing sources or observations. Preserve all handoff fields and append reference to route_history. Return success to proceed to delivery, without entering the walkthrough branch. ``` ```edges success -> delivery error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ``` # stage delivery ```output { answer, selected_format, selected_detail_kind?, route_history } answer contains the selected branch's content; route_history includes delivery. ``` ```prompt Deliver the preceding stage's content without doing another rewrite or routing decision. Append delivery to route_history. Return success with answer, selected_format, selected_detail_kind when present, and the exact traversed path. If content is missing, return error. Do not claim that unused branches executed. ``` ```edges success -> #success error -> #failure ``` ```configs type=model provider=opencode-go model=deepseek-v4.1-flash retries=0 ```