Skip to content

fix(engine): the baseline judgment records its verdict — a native project is never re-asked - #1090

Open
leeovery wants to merge 2 commits into
mainfrom
fix/baseline-native-verdict
Open

fix(engine): the baseline judgment records its verdict — a native project is never re-asked#1090
leeovery wants to merge 2 commits into
mainfrom
fix/baseline-native-verdict

Conversation

@leeovery

@leeovery leeovery commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

The baseline offer fired on Folio, a project created from scratch with the workflows. Boot reported baseline: none for any project that never recorded a status, and workflow-start's Step 0.4 judged "does a codebase predate the workflows?" per boot from context, recording nothing on a "no" and telling the session to offer when in doubt. Every boot of a native project re-rolled the judgment; the Sep 2 roll went straight from the migration commit to the offer with no evidence gathered.

The test is code precedence, read by cognition. Was there real development before the workflows arrived, or only setup? Boot hands the session the evidence and the prose asks for the read — no thresholds.

  • baseline_signal on a none boot: history_before (the commits before .workflows/ first landed, as date subject, head and tail kept around one elision), files_at_arrival + tree_at_arrival (the project tree the workflows arrived into, top-level shape), commits_before/commits_total, root_date/workflows_date (null when nothing under .workflows/ is committed yet). Ancestry-exact, signature-blind, author-dated, every read bounded through the kernel's tryGit; null on a shallow clone, no commits, no repository, or a failed read. Folio reads eight setup/wip commits over three days, seven files, a scaffold tree — native beyond doubt.
  • native is a recorded status. Step 0.4 (now Baseline Judgment) records it when the project grew up on the workflows; the offer's decline records skipped. Both land through engine baseline record <native|skipped> — validated, refuses once recorded, one write under the project lock committed confined to the project manifest (commit --workflows swept a peer session's dirty files). Hidden on every menu but manage; the offer gate and the mid-flight surfaces refuse over it; the baseline skill treats it as never started.
  • No backfill migration. The next boot of every existing native project judges once on evidence and records the answer.
  • workflow-start's two remaining prose menus (migration confirm, tmux opt-in) move to the engine per "touching a file adopts its menus".
  • Prose harness: worlds stamp native; a .git/prose-stamp.json marker records what was stamped so the differ strips exactly that; a layered project manifest is stamped when its layer lands, so a case can put commits before the arrival. start-records-a-native-verdict is Folio's shape; new start-offers-the-baseline-on-a-predating-codebase walks the offer and the decline.

Design doc rewritten in place; CLAUDE.md, CONVENTIONS' sub-step example, the engine command docs and docs/configuration.md updated. Reviewed by the eight-dimension finder fleet; every verified finding landed here.

Test plan

  • npm test — 2769 pass (new test-engine-baseline.cjs; signal shapes: brownfield history, root-commit arrival over a legacy tree, branched history, long-run elision, log.showSignature, shallow clone, no history, not-ready boot; boot gates; projection matrix; harness stamp round-trips and the layered-manifest world)
  • npm run test:cli
  • npm run typecheck
  • /prose-test on start-records-a-native-verdict, start-offers-the-baseline-on-a-predating-codebase, and the intersecting start cases

🤖 Generated with Claude Code

leeovery and others added 2 commits September 2, 2026 18:42
…ject is never re-asked

Boot reported `baseline: none` for every project that never recorded a
status, and workflow-start's Step 0.4 judged "does a codebase predate the
workflows?" from whatever was in context, recording nothing when the
answer was no. Every boot of a native project re-rolled the judgment, and
one wrong roll rendered the brownfield offer to a project that grew up on
the workflows (Folio, 2026-09-02: straight from the migration commit to
the offer, no evidence gathered).

- `native` joins the baseline statuses: Step 0.4 writes it when the project
  grew up on the workflows and commits, so the judgment is made once, ever.
  Hidden on every menu but manage, like `none`; the offer gate and the
  mid-flight surfaces refuse over it.
- Boot's `none` response carries `baseline_signal` — the repository's own
  history (`domain/baseline.cjs` `baselineSignal`): first-commit date, the
  date of the first commit touching `.workflows/` (null when none is
  committed yet), commits before that arrival against the total, tracked
  project files at the last commit before it; null with no history. The
  prose judges from it, and "when in doubt, offer once" is gone — the tree
  resolves the doubt, never the user.
- No backfill migration: the next boot of an existing native project
  judges once on evidence and records the answer.
- Prose worlds stamp `native` (was `skipped`); the harness strips the
  stamp only where the expected world carries no baseline, so a case can
  pin the verdict write. New case `start-records-a-native-verdict`.
- Tests: boot (statuses, signal shapes, null), start gateway rows,
  render refusals, the simulation's baseline walk.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ords through one verb

Review pass over #1090 (eight finders) and Lee's rulings: the test is
code precedence, read by cognition — hand the agent the commits before
the workflows arrived and the tree they arrived into, never a count to
threshold.

- `baseline_signal` reshaped: `history_before` (the pre-arrival commits
  as `date  subject`, head and tail around an elision), `files_at_arrival`
  + `tree_at_arrival` (the project tree the workflows arrived into — a
  legacy codebase put under git at install is no longer a fresh start),
  the counts and dates as context. Ancestry-exact (`rev-list --parents`
  / `--count` from the arrival's parent, not the log listing's neighbour),
  `--no-show-signature`, author dates, every read bounded through the
  kernel's new `tryGit` (64 MiB), null on a shallow clone, no commits, no
  repository, or a failed read.
- `engine baseline record <native|skipped>`: validated, refuses once
  recorded, writes under the project lock, commits confined to the
  project manifest — `commit --workflows` swept a peer session's dirty
  files under the verdict's message. Both Step 0.4 arms use it, each with
  the sibling failure clause.
- Step 0.4 is the Baseline Judgment (CONVENTIONS' sub-step example too);
  native is scaffolding-only before the arrival, predating is application
  code and the history of building it — one binary question, no gap.
- workflow-start's migration confirm and tmux opt-in menus move to the
  engine (`render migration-gate`, `render label-gate`) — touching a file
  adopts its menus.
- Refusals name the status; stale "never started"/"offer" wording fixed
  in the baseline skill, scope-areas' back-out line, the offer-gate
  comment; docs and the design doc restated positively.
- Prose harness: a `.git/prose-stamp.json` marker records what
  materialise stamped so the differ strips exactly that; a layered
  project manifest is stamped when its layer lands, so a case can put
  commits before the workflows' arrival. `start-records-a-native-verdict`
  is now Folio's shape (three scaffolding commits, then `.workflows/`);
  new `start-offers-the-baseline-on-a-predating-codebase` walks the
  offer and the decline.
- Tests: the verb (`test-engine-baseline.cjs`), signal shapes (root
  arrival over a legacy tree, branched history, elision, showSignature,
  shallow, not-ready boot), the projection matrix, the boot gates, the
  harness stamp.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant