night-shift: weekly self-review report generator (audit log + NIGHT_SHIFT.md) - #6
Merged
Conversation
…HIFT.md) What: src/personal_llm/review/self_review.py - generate_self_review reads a MemoryStore's audit trail (store.recent_audit) plus, if present, the ai-ecosystem Night Shift build log, and renders a deterministic markdown summary via render_self_review_markdown. No model call, unlike review/weekly.py (which reads memory content and calls a model for insights) - this reads the system's own recent activity instead. parse_night_shift_log/ recent_night_shift_entries split NIGHT_SHIFT.md on its own "## YYYY-MM-DD" heading convention and filter to a day window. Wired to a new self-review CLI command and night_shift_log_path config setting (defaults to ../NIGHT_SHIFT.md, degrades gracefully to an audit-only report if the sibling repo isn't checked out next to this one). Why: PROJECT-GENESIS.md section 9 Tier 5 item 37 (aliased Tier 9 item 75); section 6 "AI that designs better AIs" names the audit log and NIGHT_SHIFT.md as its first two self-review data sources. Verified: 19 new tests (143/143 full suite green offline, up from 124, full requirements.txt installed). Also live-verified against the real ai-ecosystem/NIGHT_SHIFT.md - correctly parsed and window-filtered its real dated entries.
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.
What
src/personal_llm/review/self_review.py:generate_self_reviewreads aMemoryStore's audit trail (store.recent_audit, already populated by every existingingest/ask/remember/... call) plus, if present, the ai-ecosystem Night Shift build log, and renders a deterministic markdown summary viarender_self_review_markdown. No model call - different fromreview/weekly.py's proactive review, which reads memory content and calls a model for insights about what Zaid has been thinking about; this reads the system's own recent activity instead.parse_night_shift_log/recent_night_shift_entriessplitNIGHT_SHIFT.mdon its own## YYYY-MM-DDheading convention and filter to a day window. Wired to a newself-reviewCLI command and anight_shift_log_pathconfig setting (defaults to../NIGHT_SHIFT.md; degrades gracefully to an audit-only report if the sibling repo isn't checked out next to this one, rather than raising).Why
PROJECT-GENESIS.md section 9 Tier 5 item 37 (aliased Tier 9 item 75); section 6 "AI that designs better AIs" names the audit log and NIGHT_SHIFT.md as its first two self-review data sources.
How verified
tests/test_self_review.py(log-parsing, window filtering, audit summarization, deterministic rendering, real-MemoryStoreintegration).requirements.txtinstalled to run the real suite, not skip it).ai-ecosystem/NIGHT_SHIFT.md- correctly parsed and day-window-filtered its actual dated entries end to end.