Skip to content

Prompt parts

A stage’s prompt is a text file with parts written in double braces, {{brief}}. flume fills every part at each start of the stage, and flume prompt <place> <stage> shows the result without starting anything.

Part Filled with With nothing to fill it
{{brief}} the launch’s brief, whole the launch is refused when a stage asks for it and the launch gives none
{{name}} the work’s name, as in the-parser-reads-tabs always filled
{{kind}} the kind’s name, as in fix always filled
{{stage}} the stage’s name, as in code always filled
{{branch}} the place’s branch, as in fix/the-parser-reads-tabs always filled
{{base}} the base the place was cut from, as in main always filled
{{place}} the place’s location always filled
{{change}} the place’s change, openspec/changes/<name> refused where the repository binds no change tool
{{report}} the path of the stage’s report: for report:<path>, the path in the place, or in the place’s own folder where it starts {{state}}; for committed:<path>, the path refused for a stage with neither deliverable
{{words}} the words the stage was started with: a retry’s question and answer, or a failed submission’s or a finding’s words refused; put it inside {{#words}}…{{/words}}
{{unready}} what readiness came to: the step that failed and what it printed, that it passed, or that the repository declares none always filled
{{needs}} the way to stop short, flume needs and flume needs --found, and that it is the agent’s one way to ask always filled
{{made}} the path of the place’s made.jsonl refused for a stage that declares no makes
{{session}} the number of a statechart kind’s session, from 1 refused for a simple kind’s stage
{{file}} the file a statechart kind’s session was given by its rule, as in personas/a.md refused for a simple kind’s stage, and the launch is refused where a stage lists its agents

A part refused at a start leaves the stage refused, naming the part in status, and starts no agent. Text in double braces that names no part is left as written.

{{#words}}…{{/words}} holds text sent only when the stage starts with words: a retry’s --words, a failed or conflicting submission’s words, or found work that sends the place back to its fix round. With no words, the whole section is left out. flume’s own code prompt uses it so:

{{#words}}This stage has been sent back to you with these words:
{{words}}
Where the words name files contested and the base's revision the merge
queue tested against, take that revision in before anything else: …
{{/words}}Do the work the brief names, and commit it on {{branch}} in this place.

A retry’s words reach the agent as the question its stage stopped on and your answer:

The question: Which README, the root's or the parser's?
The answer: The root's README.

flume adds three things to a prompt, the first two only where the template does not place them itself:

  • The way to stop short. Every prompt carries it. Where the template has no {{needs}}, flume appends it at the end:

    run `flume needs "<words>"` when you cannot go on without an answer,
    saying what you need, or `flume needs --found "<words>"` when you found
    work a stage before this one must do again, saying what you found;
    then stop. Stopping short is your one way to ask for what your stage
    needs: write no card and no message to a person yourself, since
    whoever answers your question decides whether it is a person's.
  • A failed readiness. A kind’s first stage, started in a place whose readiness failed, carries what {{unready}} gives. Where the template has no {{unready}}, flume appends it.

  • The roles it may ask. Where a source of the host declares roles with words of what they answer, flume appends, after everything else, each role the agent may name with flume needs --to: the place’s own stream’s by the role alone, then every other stream’s by its address, each with its source’s words. It reads them from the sources at each start, so the list comes after every part a stage’s repetitions share (asking a role).

flume adds nothing between a prompt’s parts, and nothing that differs from start to start beyond what the parts fill and the roles a source declares at that start.