Skip to content

enhance(cli): walk a repository to a result in four commands - #302

Merged
luuuc merged 4 commits into
mainfrom
feat/speak-to-the-operator
Aug 22, 2026
Merged

enhance(cli): walk a repository to a result in four commands#302
luuuc merged 4 commits into
mainfrom
feat/speak-to-the-operator

Conversation

@luuuc

@luuuc luuuc commented Aug 21, 2026

Copy link
Copy Markdown
Owner

The bench instrument now walks a repository from a github handle to a measured result in four commands, with nothing typed that it already knows and no arithmetic left to the person running it. Every stop says what happened, what comes next, why, and the one command that moves it.

Problem

Driving one repository through one cycle took six commands, one of which did not exist. sense-lab report, sense-lab harvest and sense-lab board were printed as instructions and answered unknown command. Twelve paths were typed by hand across probe and two score calls, nine of them values the crank was holding at the moment it printed the instruction, and the command it printed named a scenario file that cannot exist because the run tree is not committed. Two files had to be hand written, cells.json and the bench that declares what a repository is measured on. The delta, which is the number the whole instrument exists to produce, was left as a subtraction in the operator's head. Four stops printed no next step at all, and the position page ran to 30KB, reprinted after every phase.

Underneath that was one inversion. The instrument did the hard, irreversible things unassisted and correctly, then handed over the clerical work.

Worse, a check could not refuse. The preflight phase had a single verdict, so when it found no bench file for a repository it wrote sixty lines explaining why that was fatal, emitted the only verdict it had, and the loop advanced into the phase that spends money against a matrix no file declared.

Summary

One verb walks the flow and one verb spends, with the paths, the arms and the arithmetic derived rather than typed. A phase that finds something wrong can now say so and stop the loop.

Changes

The flow

  • sense-lab next <repo> admits an unknown repository or advances a known one, printing five plain stages, a line as each stage starts with its clock and its wall, and a four part stop
  • sense-lab pay <repo> runs the paid cells the bench declares, checks each pair is a measurement, scores both arms and states the gap in words. Six refusals happen before anything spawns
  • sense-lab why <repo> is the whole record, and sense-lab help concepts defines the vocabulary the pages deliberately avoid
  • repo and run are deleted. run spawned a single unisolated session and took no subject, so a tree built with it carried arm names and no arms

Safety

  • Preflight gains a refusing verdict with its own standing and exit code, so an undeclared matrix stops the loop before the money instead of after it
  • cells.json is written after every cell, and a second paid run into a directory that already holds one is refused by name, because an interrupted matrix that left nothing naming the burned arm is how a later pass pairs it
  • Spending narrows to the paid cell alone. Judging a result spends a model call on an artifact already on disk, so those phases are driven rather than held back
  • The checkout is held at its pin on every invocation rather than only the first, so a phase cannot run against a tree that drifted

Output

  • Numbers are stated with the bar and the direction, never as a bare recall or a delta
  • No phase name and no verdict token reaches the four commands a person walks the flow with, and a test enforces it
  • Admission writes a starter bench file, checked against the resolver, so what a repository is measured on is decided by editing rather than authoring

Architecture Highlights

  • Three new pure packages: stage maps the eleven phases onto five named stages, say turns a scored pair into a sentence, ask is the only place the binary waits for a person
  • The confirmation lives at the command boundary and never between two phases. Every command takes -yes, and a caller with no terminal and no flag is refused rather than assumed either way
  • Tests walk the phase graph rather than restating it, so a phase or a verdict added without words fails instead of printing a blank line
  • position reports what kind of act moves a repository; the verbs live in one function in the command layer, so a pure package cannot go stale when a command is renamed

Breaking Changes

⚠️ sense-lab repo and sense-lab run are removed. repo is replaced by sense-lab next <repo>, which admits and advances. run has no replacement by design: a paired cell is produced by sense-lab pay, and a single unisolated session is not a measurement.

Test Plan

  • sense-lab next <handle> clones, indexes and stops with a bench file to review
  • sense-lab next <repo> walks the stages and stops at the money with the command that spends
  • Declining the confirmation leaves no clone, no record and no phase run
  • A repository with no bench file cannot run a phase, and the refusal names the file to write
  • A second sense-lab pay into a directory holding a record is refused and the record is unchanged
  • An interrupted paid cell records what it burned, and the agent's process tree dies with the binary
  • A drifted lab clone is put back at its pin before anything is dispatched
  • No page prints a command this binary does not have
  • make ci passes: coverage gate, lint, complexity ledger
  • make smoke passes

luuuc added 4 commits August 21, 2026 16:49
A check whose verdict enum has one member is not a check. Preflight could
only emit AUTO: on mastodon cycle 3 it found no lab/benches/mastodon.json,
wrote sixty lines explaining why that is fatal, emitted the only verdict it
had, and the loop advanced into the phase that spends money — against a
matrix no file declared.

- BLOCKED joins preflight's enum, and phase.Stopped is what it routes to: a
  second non-phase beside Done, because they are opposite outcomes and
  neither is a re-entry — no rewording of a question declares a missing arm
- position.Blocked is its own standing rather than Unusable, which means an
  agent misbehaved; here nothing did, and the two send a reader to opposite
  places. The awaited phase stays the one that stopped, so editing the file
  and running again picks it up where it was
- lab/plans/preflight.md declares both verdicts and says when to emit which;
  the plans loader holds the enum in both directions, so the graph and the
  plan cannot drift apart
- position.Act says what kind of act moves a repository, for the pages that
  have to ask
Three pure packages, no callers yet. They exist so the flow can speak in
ordinary English while the code keeps the names it should have: the internal
vocabulary is right inside the binary and wrong on a terminal, and renaming
it would make the code worse in order to make one screen better.

- stage maps the eleven phases onto five plain-English stages and turns a
  verdict into what it means. A test walks phase.Graph and fails when a phase
  or a verdict has no words: one added without them would print a blank line
  at the moment somebody is watching to see what happened
- say turns a scored pair into a sentence naming the bar and the direction.
  The gap is the difference of the ROUNDED percentages rather than the
  rounded difference, so a reader's own subtraction agrees with the one
  printed beside it
- ask is the one place this instrument waits for a person: at the command
  boundary and never between two phases, with an unattended path that refuses
  rather than assuming when there is nobody there to answer
The paid step took eight flags and four hand-typed paths, printed a scenario
path that does not exist, and left the operator to score both arms and
subtract the two recalls in their head. `sense-lab pay <repo>` takes a
repository: the arms come from the bench file, the scenario from the phase
the graph says wrote it, and both arms are scored with the gap stated in
words.

- Six refusals before anything spawns: no bench file, arms that cannot all
  run, subjects that are not a baseline against a sense pair, a repository
  not standing at the paid step, the lifetime ceiling, and a scenario that
  cannot be scored. Scoring both arms against nothing returns zero for each,
  and zero against zero reads as a measurement in which Sense gave no
  advantage
- cells.json is written after EVERY cell, and a second run into a directory
  that already holds one is refused by name: an interrupted matrix that left
  nothing naming the burned arm is how a later pass pairs it
- `run` is deleted. It spawned a single unisolated session and took no
  subject, so a tree built with it carried arm names and no arms, which cost
  four paid runs to discover. Its shared resolution helpers move to job.go
  and its shared fixtures to fixtures_test.go, because what they describe is
  the lab rather than the verb
- The SIGTERM test drives `pay`, where an agent left running is spending on
  an arm nobody can pair, and asserts the interrupted cell records what it
  burned
`sense-lab next <repo>` is the whole flow: admit an unknown repository, or
advance a known one to its next stop, printing where it stands in five plain
stages, a line as each stage starts, and a stop that says what happened, what
is next, why, and the one command that moves it. `repo` is gone — it switched
between three behaviours on whether a flag happened to be set, and which one
you were about to get was invisible until it had happened.

- Admission ends with a bench file already written and checked against the
  resolver, so what a repository is measured on is decided by editing rather
  than by authoring. Nothing is ever overwritten: a bench somebody wrote IS
  the decision this exists to ask for
- Spending narrows to the paid cell alone. Report, harvest and board spend a
  model call on an artifact already on disk and are now cranked; they used to
  stop the loop and print three commands this binary does not have, which is
  what made the flow go dark after the expensive step
- The checkout is held at its pin on every invocation rather than only the
  first. A phase run against a tree that drifted records a result against a
  commit it did not come from
- `why` prints the whole record, `help concepts` defines the words the pages
  deliberately do not use, and every status row that can move carries the
  command that moves it
- The verbs live in one function: position says only what KIND of act is
  owed, so a package that decides positions cannot go stale when a command is
  renamed
@luuuc luuuc added the enhancement Not a feature, not a bug. Anything that makes Sense better. label Aug 21, 2026
@luuuc luuuc self-assigned this Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

@luuuc
luuuc merged commit 7457632 into main Aug 22, 2026
7 checks passed
@luuuc
luuuc deleted the feat/speak-to-the-operator branch August 22, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Not a feature, not a bug. Anything that makes Sense better.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant