feat(boatstack): retro derive — recurring instructions become typed proposals - #243
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
internal/retromine/classify.go): a deterministic keyword lexicon places each recurring instruction intomissing_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 inunclassified— surfaced, but generating zero proposals (fail-closed).report.go): typed proposals with occurrences, sessions, capped exemplar, evidence refs, and aSuggestedShape— prose naming the promotion ("a persisted goal likedelivery.terminal…"), never a diff.retro deriveCLI: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).Boundary conformance
retro-proposes-never-enforces(the same law as lab 21'sinterlock derive: derivation proposes, promotion is a reviewed human change).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).Evidence
go build ./... && go vet ./... && go test ./...— pass (all four packages).[missing_setpoint] … Promote it: Add a typed setpoint (like delivery.terminal). The miner independently prescribes the control the program built.2026-07-28-retro-derive-proposals.md.