Skip to content

feat(boatstack): retro derive — recurring instructions become typed proposals - #243

Merged
bigboateng merged 1 commit into
mainfrom
boatstack/retro-derive
Jul 28, 2026
Merged

feat(boatstack): retro derive — recurring instructions become typed proposals#243
bigboateng merged 1 commit into
mainfrom
boatstack/retro-derive

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Final slice of the published → merged program (follows #242). This closes the loop the whole program serves: the system can now detect the next standing prompt on its own and propose the typed control that retires it.

What changed

  • Gap classifier (internal/retromine/classify.go): a deterministic keyword lexicon places each recurring instruction into missing_observation / missing_verb / missing_setpoint / missing_guard, with fixed precedence guard > setpoint > observation > verb (a guard misread as a verb could become an action proposal, so the constraining readings win). Anything unmatched lands in unclassified — surfaced, but generating zero proposals (fail-closed).
  • Report (report.go): typed proposals with occurrences, sessions, capped exemplar, evidence refs, and a SuggestedShape — prose naming the promotion ("a persisted goal like delivery.terminal…"), never a diff.
  • retro derive CLI: boatstack-helper retro derive --input <transcript> ... [--format events|claudecode|plaintext] [--json]. The CLI boundary owns the pipeline's only I/O — reading the operator-named files; Boatstack never scans for transcripts. Output goes to stdout only.
  • "retro" joins the coverage-exemption set beside "flow" with its rationale pinned (derive-only, no delivery transition).
  • SKILL.md's retro operation gains the concrete step: derive → review → promote by hand through the reviewed flow; never a saved prompt, never auto-applied.

Boundary conformance

  • Boundary: transcript-derived analysis meeting the repository's change authority.
  • Control law: retro-proposes-never-enforces (the same law as lab 21's interlock derive: derivation proposes, promotion is a reviewed human change).
  • Required evidence: retro_conformance_test.go — positive (each gap type classifies from planted recurring phrasing with a suggested shape; rendering states the never-enforces contract), negative (unclassified recurrence → zero proposals), bypass (derivation leaves the filesystem byte-identical and never modifies its inputs), failure-state (empty input → empty report exit 0; malformed transcript → typed error, never a partial report).
  • Failure behavior: fail-closed to unclassified; parse failures are typed and positional.
  • Release condition: full suite green; synthetic fixtures only.

Evidence

  • go build ./... && go vet ./... && go test ./... — pass (all four packages).
  • End-to-end: fed a synthetic transcript of the exact instruction that motivated this program — "open the PR, watch CI until every check passes, then merge it" — the CLI reports [missing_setpoint] … Promote it: Add a typed setpoint (like delivery.terminal). The miner independently prescribes the control the program built.
  • Release note added: 2026-07-28-retro-derive-proposals.md.

…roposals

New derive-only verb `retro derive --input <transcript> ...`: mines the
operator-supplied transcripts for instructions recurring across sessions and
classifies each into a typed gap (missing observation / verb / setpoint /
guard, fixed precedence guard > setpoint > observation > verb) with a
suggested promotion. Unclassifiable recurrences are surfaced with ZERO
proposals (fail-closed). Output is a report to stdout only: no file writes,
no state mutation, no commands, no auto-PR; the CLI boundary owns the only
I/O (reading the named files) and never scans for transcripts.

The verb joins the coverage-exemption set beside `flow` (it registers no
delivery transition because it mutates nothing), and SKILL.md's retro
operation gains the concrete derive step: promote by hand through the
reviewed flow, never a saved prompt, never auto-applied.

control-law: retro-proposes-never-enforces

Disclosure-Reviewed: reviewed — public-safe only, private facet kept out of this commit
@bigboateng
bigboateng merged commit c99b5f3 into main Jul 28, 2026
12 checks passed
@bigboateng
bigboateng deleted the boatstack/retro-derive branch July 28, 2026 17:20
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