feat(journal): pin the report-tone contract — a narrative engineering report, not a diary (#2711)#2722
Merged
rysweet merged 1 commit intoJul 6, 2026
Conversation
… report, not a diary (#2711) Simard's daily journal already renders as a professional NARRATIVE ENGINEERING & RESEARCH REPORT (third-person, factual, reflective prose) rather than a personal diary — the two journal recipe prompts forbid the diary voice, the deterministic offline pipeline scrubs it via the `"dear diary" -> ""` glossary, and lib tests assert its absence. The one untested surface was the prompt assets themselves and the end-to-end anti-diary guarantee. This change pins that contract and closes the gap: - Add tests/journal_report_tone_contract.rs — a hermetic, offline test that (A) asserts BOTH journal recipe YAMLs MANDATE the report voice and FORBID the diary voice (asserting the prohibition INSTRUCTION is present, not the mere absence of "Dear diary", which legitimately appears inside the negative instruction), and (B) proves the deterministic pipeline strips injected diary phrasing and stays report-framed (`## Overview`, no "I, Simard"). - Fix a stale "diary-like narrative" doc comment in src/journal/types.rs so the module docs match the enforced third-person report voice. - Document the tone contract: docs/concepts/journal-report-tone-contract.md, linked from docs/index.md and the mkdocs Concepts nav. Additive and back-compatible: no production behavior change, no new identifiers, no stray println!/eprintln!. cargo build + the journal test suite are green. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
92fb2d8 to
54b6ae0
Compare
📊 Coverage Summary
Coverage data from CI run. Test files matching |
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.
Closes #2711.
What
Simard's daily journal must read as a professional NARRATIVE ENGINEERING & RESEARCH REPORT — third-person, factual, reflective prose — and never as a personal diary ("Dear diary", confessional "I, Simard", cutesy sign-offs).
That voice is already enforced in three places on
main:journal-narrative.yaml,journal-plain-language.yaml) mandate the report voice and forbid the diary voice;"dear diary" -> ""glossary;The one untested surface was the prompt assets themselves plus the end-to-end anti-diary guarantee. This PR pins that contract and closes the gap.
Changes (additive, back-compatible)
tests/journal_report_tone_contract.rs— hermetic, offline test:## Overview, noI, Simard); glossary backstop retained.src/journal/types.rs— fix a stale "diary-like narrative" module doc comment to match the enforced third-person report voice.docs/concepts/journal-report-tone-contract.md(the tone contract), linked fromdocs/index.mdand the mkdocs Concepts nav.Verification
cargo build✅cargo test --test journal_report_tone_contract— 6/6 pass ✅cargo test --lib journal::— 60/60 pass ✅--no-verify✅No production behavior change, no new identifiers, no stray
println!/eprintln!.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com