Files

4.6 KiB

stage intake

{ request, audience, route_history: ["intake"] }
Preserve the user's original request verbatim.
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.
success -> format_router
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0

stage format_router

{ request, audience, format: "brief" | "detailed", route_history }
Append format_router to route_history and preserve the original request.
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.
brief -> brief_answer
detailed -> detail_router
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0

stage brief_answer

{ request, audience, format, content, route_history }
content is a concise answer of no more than five sentences.
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.
success -> delivery
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0

stage detail_router

{ request, audience, format, detail_kind: "walkthrough" | "reference", route_history }
Preserve previous handoff fields and append detail_router to route_history.
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.
walkthrough -> walkthrough
reference -> reference
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0

stage walkthrough

{ request, audience, format, detail_kind, content, route_history }
content contains an ordered explanation with steps and a clearly labeled example.
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.
success -> delivery
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0

stage reference

{ request, audience, format, detail_kind, content, route_history }
content contains definitions, key distinctions, and a clearly labeled example.
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.
success -> delivery
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0

stage delivery

{ answer, selected_format, selected_detail_kind?, route_history }
answer contains the selected branch's content; route_history includes delivery.
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.
success -> #success
error -> #failure
type=model
provider=opencode-go
model=deepseek-v4.1-flash
retries=0