Doc system test

Prompting

How the CLI gets a template's answers - the question loop between the CLI and one template container, interactive or headless.

Meta block front matter of this doc
namespaces
  • durian.cloud/cyanprint/prompting

What this context owns. The question loop between the CLI and one template container: questions, answers, the deterministic state a template makes, the HTTP contract both sides speak, how one loop ends (prompt outcome), and headless mode with its envelope, answer validation and secret redaction. The CLI side lives in the cyanprompt crate of sulfone.iridium (plus cyanprint/src/headless.rs); the template side is the template service of each SDK in sulfone.helium.

What it does not own. Which answers each template in a dependency tree receives, presets and namespacing (composition); how a call reaches a container and the session it runs in (coordinator); where answers are saved and replayed from (project lifecycle, the state file); the SDK's author-facing API such as d.get (authoring).

Start here: client-side state and determinism, the design this context is the first example of, and the shop example, the one project every doc uses.

Docs, in reading order

DocTypeOne line
Questionformatsix kinds, their fields and ids, and the terminal prompt each becomes
Answerformat{type, value}, three spellings, which kind gives which, matched by id only
Stateless replayalgorithmthe loop: the script runs from the top on every call; 3 questions = 4 runs
Question protocolsurfaceinit and validate over HTTP through the coordinator proxy: routes, JSON, errors, timeouts
Deterministic statefeatured.get values kept within one run, and the four places they are lost
Prompt outcomeformatQnA, Complete, NeedInput, Err as a state machine
Answer validationalgorithmvalidators by replay; interactive vs headless sibling maps; the discovery walk
Headless modeflowanswers file, two walks, envelope, exit codes 0/2/1, cleanup, stdout contract
Secret redactionguardkept off this public page (security-related)

Words: UL.yaml.