prompts

package
v0.2.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package prompts is where the designer's brief LIVES, as prose, so that the hardest writing in this system is edited as writing rather than as a builder full of Fprintf calls.

WHY AN ASSET AND NOT A STRING BUILDER: the brief is a meta-guide — it teaches a derivation procedure, and a procedure is argued in paragraphs. Held in Go it was held in fragments, every line wearing quotes and an escape, and the shape of the argument was invisible to the person changing it. Held here it is a document, diffable as a document, readable by a person who is not going to open a compiler.

WHAT IS STILL DERIVED: every cap, both ladders and the tool belt. They are «placeholders», filled by Render from the package that owns the numbers, and a placeholder with nobody to fill it is an ERROR rather than a stray brace in a prompt — so a guide that has drifted from the machinery it describes fails at load, in the first second of a run, instead of being noticed in a bad design.

The guillemets are the point of the delimiter choice: the guide has to quote the runtime's own `{{input}}` verbatim, so the two vocabularies must not collide.

Index

Constants

This section is empty.

Variables

View Source
var Designer string

Designer is the meta-guide: the machinery, the derivation procedure, the output contract. Unrendered — see Render.

View Source
var Reviewer string

Reviewer is stage 1.5's addendum. It is APPENDED to the rendered guide rather than standing alone, because a critic that cannot see the law it is judging against would be reviewing its own recollection of it — and the checklists in it are the guide's own steps, turned into questions.

Functions

func Render

func Render(guide string, values map[string]string) (string, error)

Render fills a guide's placeholders. An unknown placeholder left in the text is an error and so is a value nothing asked for: the first means the guide is describing machinery the caller did not supply, the second means the caller is supplying machinery the guide stopped describing. Both are drift, and drift in this file is the failure mode the whole arrangement exists to prevent.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL