feat(journal): Discord !journal sessions → encrypted ShadowNote write-back - #438
Draft
nolanmak wants to merge 1 commit into
Draft
feat(journal): Discord !journal sessions → encrypted ShadowNote write-back#438nolanmak wants to merge 1 commit into
nolanmak wants to merge 1 commit into
Conversation
…e-back (#428) Write path for the ShadowNote integration (epic #425), stacked on #437: - approval-discord: JournalOps trait (InvoiceOps pattern — grammar + dispatch here, AWS/encrypt plumbing in the cli, no aws deps in this crate); pure parse_journal_command (!journal / done [title] / <text>) with unit tests; event_handler branch mirrors !invoice and runs the slow path off the event loop. Ops absent -> honest not-configured reply, nothing saved. - journal crate: compose module — no-tools Haiku opts + system prompt (first-person entry from conversation, TITLE: line + <p> HTML), text_to_paragraphs escaping/wrapping, tolerant output parser. - cli: CliJournalOps — compose (for done) -> KMS GenerateDataKey -> CryptoJS-format encrypt -> createEntry (entry renders in the app), then immediate spawn_ingest(IngestTrigger::Journal) so wiki-ask sees it before the next poller pass. Every failure reply carries the entry text back so a failed save never loses what the user wrote. - docs/journaling.md: /loop cron prompts (#429) + !journal usage + config keys. cargo test: approval-discord 118, journal 31 — green. Live !journal DM exercise pending the AWS actionables (ShadowNoteReborn#20); receipt documents exactly what was and wasn't exercised.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Jul 19, 2026
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 #428, documents #429 (the /loop cron prompts, docs/journaling.md). Part of epic #425 (Phase 3 — write path). Stacked on #437 (base
shadownote-ingest); retarget after it merges.What's in it
JournalOpstrait in approval-discord (theInvoiceOpspattern): grammar + dispatch live in the discord crate, the cli implements the encrypt/AppSync/wiki plumbing — no AWS deps in the discord crate, no circular dep.!journalgrammar (journal_cmd.rs, pure + unit-tested):!journal <text>verbatim save;!journal done [title]composes from the recent conversation viafetch_conversation_context(no new session state machine);!journal/helpusage;!journals…correctly not matched.compose.rsin the journal crate): no-tools Haiku call — first-person entry from the user's own statements only,TITLE:line +<p>HTML; tolerant parser wraps bare text if the model ignores the format.CliJournalOps: compose → KMSGenerateDataKey→ CryptoJS-format encrypt →createEntry(renders in the app like a hand-written entry) → immediatespawn_ingest(IngestTrigger::Journal). Failure replies always include the entry text — a failed save never loses what you wrote. Unconfigured boxes get an honest notice and the daemon is otherwise untouched./loopcron prompts (morning/evening/weekly review, Phase 0: morning/night/weekly journaling prompts via /loop crons (config only) #429),!journalusage, config keys.Testing
cargo test -p: approval-discord 118, journal 31 — green (grammar, compose parsing, escaping).cargo build -p augmentagent-cliclean..claude/agent-test-receipts/abbed4d….txtis explicit about what was NOT exercised: a live!journalDM needs the AWS actionables (nolanmak/ShadowNoteReborn#20) plus an owner-sent DM. Post-config checklist before merge: send!journal test entry→ expect 📓 confirmation, entry visible in the ShadowNote app, wiki ingest fired. Then!journal doneafter a morning-prompt conversation.