Skip to content

feat(capture): symptom-first lesson content and symptom keywords (#409) - #419

Merged
abogartz merged 1 commit into
mainfrom
capture-symptom-first
Nov 17, 2026
Merged

abogartz merged 1 commit into
mainfrom
capture-symptom-first

Conversation

@abogartz

Copy link
Copy Markdown
Owner

Why

Retrieval alignment is a write-side property. Measured on the K-block outcome fixture (poc RESULTS §29–30):

  • The same narrowing lesson written as session diary scored zero — outside the recall window entirely — for the terse queries agents actually issue (bugs invariants test suite and variants).
  • Rewritten symptom-first (When bun test fails on an invoice total that is off by a small percentage …) with small symptom-kw sets, it ranked 1–7 on every observed query pattern.

The store's most valuable rows were unreachable, not wrong. Auto-capture currently produces diary-shaped content ("Session E run: three invariant restorations needed…"), which is exactly the form that never resurfaces.

What

Two prompt-rule changes in buildCapturePrompt:

  1. learning/blocker rows must START with the observable trigger — failing command, error text, wrong number — then the fact: "When <symptom>: <fact>".
  2. kw must include the words of the symptom itself (failing command name, distinctive error substring, the wrong figure's subject), not only the fix vocabulary.

No format, store, or read-path change. Parsing untouched; all existing capture guarantees (write gate, guided/original verification, failure citations) unchanged.

Evidence

  • Preflight harness + numbers: poc branch poc/409-tag-space, poc-409/casebank/episodic-preflight.ts (commit 5ce4098), RESULTS §29–30.
  • Full suite green locally: 1,491 tests, 0 fail. New test pins the three prompt substrings.

Retrieval alignment is a write-side property. Measured on the K-block
outcome fixture (RESULTS s29-30): the same narrowing lesson scored zero -
outside the recall window entirely - written as session diary, and ranked
1-7 for every terse query pattern agents actually issue ("bugs invariants
test suite") when it opened with the observable symptom and carried symptom
keywords. The store's most valuable rows were unreachable, not wrong.

The capture prompt already asks kw to carry future-query vocabulary but the
content rule allowed diary form; a diary row shares no words with a symptom
query and the kw bridge alone still loses when those words are fix-oriented.
Pin the form: learning and blocker rows start with the observable trigger
("When <symptom>: <fact>"), and kw must include symptom words (failing
command, distinctive error substring, the wrong figure's subject).

Test pins the three prompt substrings.
@abogartz
abogartz merged commit 1b188de into main Nov 17, 2026
7 of 8 checks passed
@abogartz-opencode-self-improvement

Copy link
Copy Markdown

🎉 This PR is included in version 0.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

abogartz-opencode-self-improvement Bot pushed a commit that referenced this pull request Nov 18, 2026
# [0.29.0](v0.28.1...v0.29.0) (2026-11-18)

### Bug Fixes

* **fixer:** cumulative replay + final batch verification ([#423](#423)) ([06a6a5e](06a6a5e)), closes [#424](#424)
* **gate:** exempt byte-identical repairs; review findings ([#423](#423)) ([4a7c899](4a7c899))

### Features

* **fixer:** kw-only --apply through the gated update path ([#423](#423)) ([e028b95](e028b95))
* **gate:** enforce symptom-first learning/blocker rows ([#423](#423)) ([8781894](8781894)), closes [#419](#419)
abogartz added a commit that referenced this pull request Nov 18, 2026
…hange comment-only

The strip that removed issue numbers was a mechanical sweep over ~200 files
with no proofread. Review reproduced the damage; this repairs it.

- Orphan fragments: 42 '( domain restructure)', 34 '( review)'-class tags,
  40 '//:' comment bodies, and double spaces where a number sat mid-sentence.
  Each hole is rewritten to state the contract forward-looking; where the
  removed token was the subject, the sentence is reworded, not collapsed.
- The strip also edited a RUNTIME string: the gate's symptom-rule hint lost
  ' (#419)'. That is model-facing output, not a comment. Reverted, so this PR
  changes no behaviour. Verified by a scope fence: no line with code changed
  in src/, scripts/ or bench/ (test/ titles are strings and are handled below).
- Test titles carried ticket numbers and review narrative in 41 places the
  strip missed entirely. All are cleaned; the repo is now at zero ticket
  references in test and describe titles.
- scripts/comment-lint.ts no longer violates its own policy ('review rounds'
  in its header).
abogartz-opencode-self-improvement Bot pushed a commit that referenced this pull request Nov 18, 2026
## [0.30.2](v0.30.1...v0.30.2) (2026-11-18)

### Bug Fixes

* **ci:** a failed git diff must not report clean, and merge stranded full stops ([74e1245](74e1245))
* **hygiene:** finish the strip — JSDoc one-liners, orphan parentheticals, remaining narrative ([80aa495](80aa495))
* **hygiene:** repair the prose the bulk strip mangled, and keep the change comment-only ([d354796](d354796)), closes [#419](#419)
@abogartz
abogartz deleted the capture-symptom-first branch November 19, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant