feat(notes): consolidate note generation on a shared spec and improve structure#114
Merged
Merged
Conversation
…e notes summary-first with a dedicated Key Decisions section, and stop emitting a redundant notes title heading
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.
Description
A pass over Nojoin's note-generation prompts to improve the consistency and quality of generated meeting notes.
The core problem: the automatic first pass (the unified meeting-intelligence prompt) and the "Regenerate Notes" button (the standalone notes prompt) used two separate, drifted prompt bodies, so regenerating notes could produce a different structure from the original. This change makes both paths share a single source of truth and adopts an evidence-based note structure.
What changed:
NOTES_BODY_SPECinbackend/utils/meeting_notes.pyas the single source of truth for note structure and fidelity rules. Both note-generation prompts (unifiedmeeting_intelligence.pyand standalonebase.py) embed it verbatim, so they can no longer drift. A drift-guard test asserts both contain it.Summaryfirst, a dedicated scannableKey Decisionssection (with rationale), prominentAction Items(single named owner plus due date), then per-topicDetailed Notes, thenMiscellaneous. This replaces the previous topic-list-first layout that buried decisions.Summarysection and no longer emit their own top-level title heading, which duplicated and sometimes contradicted the meeting title the app already displays. Enforced by the prompt instruction, the JSON schema example, a defensivestrip_leading_title_heading()helper applied in both paths, and an updated result contract (notes must start with a##section heading).max_tokensfrom 2048 to 4096 to match the unified path so comprehensive notes are not silently truncated.get_default_speaker_prompt_template,get_speaker_prompt_template,build_speaker_prompt,parse_mapping_table); the evidence-JSON speaker-suggestion path fully supersedes them and they had no production or test callers.No new dependencies.
Type of change
Checks run
source .venv/bin/activate && pytest(864 passed)python scripts/check.py(Ruff lint, format check, mypy, doc and Alembic validators)cd frontend && npm run lint(not run: no frontend paths changed)cd frontend && npm run test(not run: no frontend paths changed)cd frontend && npm run build(not run: no frontend paths changed)python3 scripts/validate_docs.pypython3 scripts/validate_alembic.pyMigration impact
Documentation impact
docs/USAGE.mddescribes only what the notes-language setting controls (still accurate) anddocs/ARCHITECTURE.mdcovers prompt caching (unaffected).Security impact
Manual verification
Automated coverage only in this PR (864 backend tests pass, including new drift-guard and title-strip tests). Recommended live smoke check before or after merge: process a recording and use "Regenerate Notes", confirming the notes open at the Summary heading, carry a scannable Key Decisions section, and contain no duplicate title line. No capture, context-menu, auth, or migration paths are touched.