Conversation
Current main's shared threshold rule still hides short single-line substantive replies: captain-directed questions, offers, and waits, one-word confirmations, per-block mixed-message results, and gerund outcome reports such as 'Testing confirms the fix works.' all sit below 240 characters with no newline, so both harnesses drop them. Extend the shared calmTextIsSubstantive contract both harnesses already read: a short single-line block is now hidden only when every sentence in it reads as routine working narration, erring toward showing. The narration classifier moves here from the Pi-only layout adapter, so Claude and Pi keep one rule and cannot drift apart; the Pi layout goes back to the shared per-block filter with no second classifier. Cover the kept behavior behaviorally on both suites plus the mod's own engine tests, and describe the extended contract in docs/calm.md. Filler fixtures that used to pin the length boundary now read as narration, since unrecognized short text is preserved by design. Authored with AI assistance.
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.
Intent
Preserve the short substantive mid-turn Calm replies that current main still hides. The Calm PR #4634 conflicts with main, and the maintainer's merged fix 888871d (#4788) only preserves mid-turn text containing a newline or at least 240 trimmed characters. Measured on current main, these cases it exists to fix are still hidden: short captain-directed replies (the "which of the two fixes should I take" question, offers, waits on the captain), one-word confirmations such as "Saved.", short per-block mixed-message results ("Found it: the cache key is case-sensitive."), and short gerund outcome reports ("Testing confirms the fix works.", "Reviewing the logs found the case-sensitivity bug.", and longer findings). Extend the shared preservation contract both harnesses read so a short single-line block hides only when every sentence in it reads as routine working narration, keeping Claude and Pi on one rule rather than a Pi-only second classifier.
What Changed
calmTextIsSubstantivepreservation rule so a short single-line mid-turn block hides only when every sentence reads as routine working narration (next-step announcements, in-progress gerunds, and routine monitoring state), preserving captain-directed replies, short confirmations, colon findings, and gerund outcome reports on both Claude and Pi.docs/calm.mdpreservation contract and expands Claude and Pi test coverage for the narration gate.Risk Assessment
✅ Low: The change monotonically narrows hiding (short text now hides only when every sentence matches routine-narration patterns) through one symlinked file both harnesses import, with all intent-listed cases traced to the correct verdict and the only behavior shift being extra-visible narration lines rather than hidden replies.
Testing
Drove the real shared preservation module (the one file both harnesses read, via the Pi symlink) against all 15 intent-named cases — every short substantive reply is now preserved and every routine-narration guard still hides — and the Claude-mod policy suite passes with its matching corpus; the Pi TUI renderer E2E could not run here because its required npm-installed Pi package layout is absent, so it is reported untested rather than guessed.
Evidence: Direct drive of shipped Calm preservation contract (15/15 PASS)
Source: Direct drive of shipped Calm preservation contract (15/15 PASS)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-calm-claude-mod.test.sh(passes; includes the shared-preservation parity corpus: Saved., captain-directed question/offer/wait, colon finding, gerund outcomes preserved; gerund progress, next-step, monitoring hidden)node /tmp/calm-drive.mjs— direct drive of the shippedcalmTextIsSubstandardcontract via the Pi symlink path (.pi/extensions/lib/fm-calm-preservation.ts) across 15 intent-named casesbash tests/fm-calm-pi-extension.test.sh(passes for runnable parts;test_calm_mid_turn_working_notesskips by design: no npm-installed@earendil-works/pi-coding-agentwith dist layout in this environment)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.