Skip to content
Back to skills

Memory Journal

ASecurity

Cross-session ledger at `~/.opencode/memory/*.md`: appends decisions/rejections/root-causes during a session; on session start, diffs against the live transcript so the agent stops re-litigating settled decisions.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
developmentpythonshell

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add RMAzrim/opencode-artes --skill memory-journal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Memory Journal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Memory Journal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rmazrim-memory-journal/badge)](https://www.skillsdirectory.com/skills/rmazrim-memory-journal)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Memory Journal
description: "Cross-session ledger at `~/.opencode/memory/*.md`: appends decisions/rejections/root-causes during a session; on session start, diffs against the live transcript so the agent stops re-litigating settled decisions."
metadata:
  source: skills/memory-journal/memory-journal.md
---

# Memory Journal

## Prerequisites & Dependencies

- Python 3.10+ (for journal file I/O and diff logic)
- Access to `~/.opencode/memory/` directory (created on first use)
- No external runtime dependencies

## Execution Steps

1. **Initialize journal directory**: On first use, create `~/.opencode/memory/` if it doesn't exist.

2. **Append during session**: After each significant decision (adopted approach, rejected alternative, root cause identified), append a journal entry to `~/.opencode/memory/decisions.md`:
   ```markdown
   ## Decision: YYYY-MM-DD HH:MM - [tag]
   
   **Chose**: X over Y
   
   **Rationale**: Z caused prior failure
   
   **Rejected**: Y (considered but decided against)
   
   **Session**: current-session-id
   ```

3. **Session start diff**: On session initialization, run `memory-journal diff` to compare journal entries against the live transcript:
   - Surface any decisions already recorded in the journal that the current transcript is re-litigating
   - Flag any transcript references that conflict with journal entries as potentially stale
   - Output a "settled decisions" summary for the agent's awareness

4. **Cross-session reference**: Before making a decision with prior-art impact, query `~/.opencode/memory/decisions.md` for relevant tags or timestamps to avoid contradicting prior rationale.

5. **Periodic consolidation**: Run `memory-journal compact` to merge adjacent entries with identical tags, remove entries older than N months, and preserve the most recent rationale per decision topic.

## Journal Entry Example

```markdown
## Decision: 2026-09-11 14:32 - [verification]

**Chose**: verify-orchestrator for all completion claims

**Rationale**: Silent "done" without evidence is the highest-cost failure mode (audit finding E)

**Rejected**: Proceeding on absence of counterevidence

**Session**: opencode-session-2026-09-11
```

## Windows PowerShell Notes

- Journal directory: `$env:HOMEPATH\.opencode\memory`
- Use `Set-Content -Path ... -Encoding UTF8` when writing entries (`UTF8NoBOM` is PowerShell 7+ only; PS 5.1 writes a BOM otherwise)
- Diff command: `diff -u <(grep -i "decision" transcript.md) <(cat ~/.opencode/memory/decisions.md)`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.