Trazum has only ever read prompts somebody else wrote. optimize finds the
waste in one, check holds it to a budget, rules --measure says what each
rule recovers — and every one of them starts from a prompt somebody already
guessed their way into. The most expensive waste is not the filler the rules
remove; it is the paragraph that should never have been written and the
constraint nobody stated.
This release is the first four chapters of the arc that goes the other way. You say what you want, the tool asks what it needs, and what comes back is a prompt whose cost and cleanliness are known before it is ever sent. Plus the guard for the one page in this repository that had none.
Fixed#
-o on a new command was accepted, ignored, and the prompt went to stdout.
The parser rewrites -o to out on the way in, so stringFlag(args, 'o') can
never match anything — a flag that parses and does nothing, which is the defect
this CLI refuses one layer up with "Did you mean --max-growth?". Caught by the
test that asserted the file, not by reading. The same dead read had been
sitting in baseline as a fallback, ?? stringFlag(args, 'o'), which could
not fire either; removed rather than left as an alternative nobody can reach.
optimize accepted any string as a level and silently ran safe. The rule
loop skips aggressive rules unless the level is aggressive, so a typo — or a
plausible-sounding balanced, which this product has never had — produced
safe-level results with nothing said. The CLI has always refused
--level balanced by name; a library caller got the quiet downgrade
instead, which is the swallowed-flag defect one layer down. It now refuses,
naming the levels that exist. Nothing correct depended on the old behaviour: no
program means safe by writing something else.
And the previous chapter's own test was measuring safe twice. It iterated
safe, balanced and aggressive and said "all three levels" in its own name.
There are two. The zero survived the correction — both real levels recover
nothing from a draft — but the sentence did not, and the sweep now comes from
RULE_LEVELS rather than a list typed into the test, so a level added tomorrow
is covered without anybody remembering.
The slot-table guard read the whole page, and the page grew a second table.
Chapter one's check harvested every backticked first cell in
docs/prompt-writer.md, which was right until this chapter added the three
claims — whose rows are complete, cheap and clean — and it reported three
slots that do not exist. Bound an assertion by its subject, never by its
neighbour, which this repository has a helper for and that
test was not using. Bounded to ## The slots now, and still failing in both
directions: a slot dropped from the table, and a phantom row added to it.
It was CI that caught it, and it should not have been. npm run verify ran
green, then the page gained the new table, then the commit went out — the local
run was of the code and not of the change. The correction is in the record
rather than in a habit nobody can check.
RULE_LEVELS is exported. The package had the union and no list, so the
valid set was not discoverable from @trazum/core at all.
Added#
Chapter four of 1.61: trazum write on a terminal. Two ways in and one
document out — the questions asked one at a time, or a JSON object through
--answers — with the prompt on stdout and everything else on stderr, so
trazum write --answers a.json > prompt.txt is a file with a prompt in it and
not a file with an interview in it.
Input running out is not a decline, and finding that out cost a real bug.
readline on a piped stream closes as soon as the buffer drains, and a question
asked after that never settles: the event loop emptied and the process left with
status 0 and nothing printed — an interview that stopped halfway and
reported success. A terminal now gets readline and a pipe gets the lines read
in order, because a script piping answers is really handing over a list. A
truncated interview refuses, names the slots it never asked, and is asserted not
to report them as declined.
A misspelled slot id is answered with the nearest one, the same way this CLI already answers a misspelled flag. A missing required answer refuses with each slot named beside what it would have unlocked, and never writes half a prompt to stdout.
Three existing guards caught what this chapter forgot, in order: the flag
allowlist had no write entry, the README's command table and its three counts
had not moved, and the check that every --json command is covered or named as
an exception refused to let a new one be absent from both.
Chapter three of 1.61: the three claims, measured. Every assembled draft now
carries measured — complete, cheap and clean — or null when there is
no prompt to measure, never an object of zeros.
complete is a checklist with its gaps named and no score. A grade out of
ten is precisely what nothing continuous invents a number forbids, and the
test asserts the object has exactly four keys so a score cannot arrive later
without somebody noticing.
cheap keeps the estimate inside an object that says it is one.
provenance is always estimated and travels with the figure, because nobody
has sent this prompt yet. monthlyUsd is null when it cannot be priced,
never 0 — zero reads as free. The budget answers three ways and never bare:
within, over, or cannot-tell with no-budget, no-model or
model-unpriced beside it. Priced separately from the tokens and the rules,
because optimize throws on a model it cannot price and an unpriced model is
one of the three answers here rather than a crash.
clean reports what this tool's own rules still recover, and finds nothing
in its own output — with the opposite direction asserted too, so an empty list
is not the only answer the measurement can give.
Chapter two of 1.61: the assembly, and the claim the arc is judged on.
assemble() puts the answers under headings in the fixed section order and
returns a prompt-draft. Nothing is paraphrased — the words are the author's,
and a writer that rewrote them would be answering a question nobody asked it.
trazum optimize recovers nothing from a draft the templates produced, at
all three levels, measured by running it. That is the arc's acceptance test: a
writer whose output this tool still improves would be selling the cure for a
disease it had just caused, and the number proving it would be printed here.
And the zero is not vacuous — the same draft with a verbose phrase pushed
into it has to come back non-zero, or a rules engine that found nothing in
anything would satisfy the check forever.
The same answers assemble the same bytes in every locale. The headings are
English everywhere on purpose: they are structure rather than prose, and a
heading that moved with TRAZUM_LOCALE would make the prompt a function of the
machine that ran the interview.
The refusal and the output are the same fact read two ways. prompt is
null — never '' — when required answers are missing, and missing is empty
exactly when prompt is a string; the test asserts the equivalence in both
directions over four answer sets rather than asserting each half separately. A
declined slot stays out of missing and in its own list: a decision is not a
gap. A section nobody answered is omitted rather than written empty, and a slot
that fills no section (model, budget) puts no words in the prompt at all.
prompt-draft joins the interchange format — the eleventh contract
--contract accepts, the sixteenth document. This was the plan's own test of
the two releases before it, and all three guards fired as designed: the new
table needed a claim, docs/format.md and README.md needed their counts moved
to sixteen and a seventeenth, and the article map refused to guess one for a new
contract name. A fourth caught the rest — the library-documents guard from #361
required the draft to be handed to the package's own checker, since it is a
contract @trazum/core can build with nothing but answers.
Chapter one of 1.61: the questions. @trazum/core now carries the slot
catalogue and the interview behind trazum write — fourteen slots, four of them
required, three of them gated on an earlier answer. No model decides what to
ask: the catalogue is fixed, the gates are predicates over the answers so far,
and the same answers produce the same interview on any machine.
The three asking rules are run, not commented.
- A question is only asked when its answer can change the output. Every gate is handed an answer set that opens it and one that does not — a gate that is always true, or never true, does nothing, and both directions fail. A JSON schema is not asked for when the answer is prose.
- The interview stops. It reports
donewhen every open slot has an answer or a decline, and the opposite direction is asserted too:doneon an empty interview would be a stop rule that stops before it starts. - A refusal never arrives bare. Unanswered required slots are named, including
one that only a previous answer opened —
output-schemacannot be missing until the shape isjsonortable, and must be missing the moment it is.
Answered, declined and unanswered are three states, not two. null is a
decline: somebody was asked and said no. It closes the follow-up a real answer
would have opened, and it is named in the output rather than silently dropped.
Ids in core, words in the CLI, the same split the rules catalogue uses. Both locales are held to the catalogue in both directions — a slot nobody can ask fails, and copy for a slot that does not exist fails too — plus the check that would catch one locale being served the other's words.
docs/prompt-writer.md documents the catalogue and is derived: a slot the code
has and the page does not fails, and so does a row for a slot that is gone.
A plan for 1.61, written before the code: the prompt writer. Trazum has only
ever read prompts somebody else wrote — optimize finds the waste in one,
check holds it to a budget, rules --measure says what each rule recovers,
and every one of them starts from a prompt somebody already guessed their way
into. The arc goes the other way: you say what you want, the tool asks what it
needs, and what comes out is a prompt whose cost and cleanliness are known
before it is ever sent.
The tension is stated first and resolved without a footnote. A prompt writer is a generative feature in a deterministic product. The interview and the assembly are deterministic — a fixed slot catalogue, rules over the answers, a fixed section order, byte-identical output for identical answers — and the only generative step is optional, credential-gated, and named and not built while this repository has no credential, the same treatment 1.54.0 and 1.57.0 get.
It refuses to claim "the perfect prompt" — a quality judgement about text
nobody has run. Three measurable claims replace it: complete against a checklist
with its gaps named, cheap against the configured budget with the estimate
marked as one, and clean against Trazum's own rules. That third is the arc's
real test: if optimize can still recover tokens from a prompt this tool just
wrote, the templates are wrong and the number says so.
ROADMAP.md's ## Next names 1.61.0 — the first thing planned above 1.60.0 —
with the three arcs that stay open below it kept where they are, and
docs/README.md indexes the plan beside the five before it.
docs/doctrine.md was the one prose contract here with no guard at all, and
that was measured rather than assumed. Emptying the file and re-running the
suites broke nothing. Every other page that makes checkable claims — the
contract file, the interchange index, the usage-log format, CONTRIBUTING, the
README, the roadmap — fails a test when it goes stale. The doctrine did not, in
the file whose whole subject is checking what enforces your own rules, and where
the rule a rule you wrote for yourself is a claim like any other lives.
packages/core/test/doctrine.test.js does not enforce the rules — most are about
judgement and one says outright that no test can hold it. It enforces the page:
the rules the preface names still exist under those names, no rule is written
twice, a rule said to have joined at a release is named on that record, and the
links resolve. It opens by requiring the page to have rules in it at all, which
is the check that would have caught the emptiness that started this.
Italics in the preface are now reserved for rule names, and the guard is what makes that true rather than a style note: every italic phrase there is read as a rule and any that is not one fails. A preface that emphasises freely is a preface where a renamed rule hides. It fired on the first draft of the paragraph announcing it — the sentence describing the new test emphasised a phrase that was not a rule, and the check refused it.