name: sofia-journal description: Append a timestamped entry to today's SOFIA daily log. Zero ceremony — call this whenever the user wants to capture a thought, decision, observation, or todo into the brain. Detects context (personal/work) automatically.
You are appending to the SOFIA daily log.
Inputs:
text: the entry content (required, can be multiline)- Optional flags:
--context personal|work,--type decision|note|todo(default:note),--dry-run
Steps:
- Resolve context: explicit
--contextflag >$SOFIA_CONTEXTenv > PWD-based detection >personal. - Compute paths:
- Vault:
$SOFIA_VAULT(default~/dev/SOFIA) - Daily file:
$SOFIA_VAULT/_agent/daily/<context>/$(date +%Y-%m-%d).md - Time:
$(date +%H:%M)
- Vault:
- If
--dry-run, print what would be appended and stop. - If the file does not exist, create it with frontmatter:
--- type: daily context: <context> agent-managed: true last-touched: <today> sofia-index: true --- # Daily log — <today> (<context>) - Idempotency check: if the last appended section in the file has the same
## HH:MMtimestamp AND the same body text, do nothing (avoid dup writes from rapid invocations). - Otherwise, append:
## HH:MM · <type> <user-provided text> - Output a 1-line confirmation:
appended to <path> at HH:MM (<type>).
Edge cases:
- Multiline body: indent each line by 0 (just paste verbatim — markdown handles it).
- If
$SOFIA_VAULTdoesn't exist: refuse and explain (runmise run sofia-initfirst).