Install
$ agentstack add skill-qgolem-orc-compound-memory ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Compound Memory
Extract patterns from the current session's JSONL transcript and save as individual memory files.
- [ ] Step 1: Extract current session transcript
- [ ] Step 2: Analyze for pattern candidates
- [ ] Step 3: Draft as memory file
- [ ] Step 4: Dedup check
- [ ] Step 5: Self-evaluate
- [ ] Step 6: Present to user
- [ ] Step 7: Write to memory
Pattern crystallizer, not note-taker. You programmatically extract the current session's tool calls and results from JSONL, identify non-trivial patterns, and save them as individual memory files with frontmatter.
Your role:
- Extract current session from JSONL via jq
- Identify debugging paths, architecture seams, workaround branches
- Draft decision trees and self-evaluate against rubric
- Present and get user confirmation before writing
Not your role:
- Saving trivial fixes or language basics
- Writing without user confirmation
- Overwriting existing memory entries
When to use:
- End of session with non-trivial debugging, workarounds, architecture decisions, or integration patterns
What NOT to extract:
- Trivial fixes, one-time issues, language basics, things already in CLAUDE.md
Avoid:
- Saving prose summaries instead of decision trees
- Skipping the dedup check against existing memory files
- Lowering the quality threshold (all 5 dimensions must be >= 4/5)
- Writing to memory without user confirmation
- Analyzing from in-context memory instead of programmatic JSONL extraction
Process
Step 1: Extract Current Session Transcript
Write the jq filter to a file first (avoids zsh != history expansion and nested quoting issues), then run it:
# Write jq filter to file to avoid shell quoting issues
cat > /tmp/memory-palace-filter.jq /dev/null | head -1)
jq -r -f /tmp/memory-palace-filter.jq "$CURRENT" > /tmp/memory-palace-session.txt 2>/tmp/memory-palace-debug.log
wc -l /tmp/memory-palace-session.txt
Read the extracted transcript.
Step 2: Analyze for Pattern Candidates
Review the extracted content for:
- Error resolution paths — root cause → diagnosis → fix
- Debugging decision trees — symptom → checks → outcomes
- Architecture/integration seams — where components meet, why boundaries exist
- Workaround branches — what works, what doesn't, why
If nothing qualifies → stop, tell user "nothing worth saving in this session."
Step 3: Draft as Memory File
Format each pattern as an individual file with frontmatter:
Filename convention: {type}_{kebab-topic}.md (e.g., feedback_shell-quoting.md)
Types: user, feedback, project, reference
---
name: [Pattern Name]
description: [when to recall + what it solves — one line, specific enough to judge relevance]
type: feedback
---
├── [trigger or entry point]
│ ├── [condition A]
│ │ ├── [outcome] → [action]
│ │ └── [alternative] → [action]
│ └── [condition B]
│ └── [outcome] → [action]
├── seam: [component] ↔ [component]
│ └── decision: [why the boundary is here]
└── pitfall: [what goes wrong if you ignore this]
Step 4: Dedup Check
Glob $MEMORY_DIR/*.md and read filenames + descriptions. If a file already covers this pattern (by filename or description overlap), either skip or propose updating the existing file.
Step 5: Self-Evaluate
Score each candidate on this rubric (threshold: all >= 4/5):
| Dimension | 1 | 3 | 5 | |-----------|---|---|---| | Specificity | Abstract, no code | Has code example | Code + edge cases | | Actionability | Unclear what to do | Main steps clear | Immediately executable | | Scope Fit | Too broad/narrow | Mostly appropriate | Trigger + content aligned | | Non-redundancy | Duplicate of existing | Partial overlap | Completely unique | | Coverage | Fraction of target | Main cases covered | Main + edge + pitfalls |
Pass: all dimensions >= 4. One re-draft pass allowed; if still fails on any dimension, discard that entry.
Step 6: Present to User
Present one AskUserQuestion per pattern so the user can approve/reject each individually. Each question uses a preview showing the full file as it'll be written.
For each candidate pattern:
AskUserQuestion:
question: "Save as {type}_{kebab-topic}.md?"
header: "Pattern N"
options:
- label: "Save"
description: "[one-line summary of the pattern]"
preview: |
[Full file content including frontmatter]
- label: "Skip"
description: "Don't save this pattern"
Only write patterns the user explicitly approved. Do NOT proceed to Step 7 for skipped patterns.
Step 7: Write to Memory
Write each approved pattern to its own file in $MEMORY_DIR/ using the filename from Step 3.
Then update $MEMORY_DIR/MEMORY.md index — one line per file with description.
If MEMORY.md doesn't exist, create it. Format:
# Memory Index
## Patterns
- `feedback_shell-quoting.md` — Shell quoting traps in zsh/awk
- `project_auth-rewrite.md` — Auth middleware rewrite context
- One line per file: filename + description
- Don't duplicate — match by filename
- Keep under 200 lines (only first 200 load into sessions)
File Ownership
| File | Access | Purpose | |------|--------|---------| | ~/.claude/projects/-$PROJECT/*.jsonl | Read only | Current session log | | $MEMORY_DIR/*.md | Read only | Dedup check | | $MEMORY_DIR/MEMORY.md | Read/Write | Index of memory files | | $MEMORY_DIR/{type}_{topic}.md | Read/Write | Individual pattern files | | /tmp/memory-palace-session.txt | Write | Extracted transcript | | /tmp/memory-palace-debug.log | Write | jq error log |
Skip Conditions
Skip if:
- No JSONL files found in project directory
- Session is trivial (no debugging, no architecture decisions, no workarounds)
- All candidate patterns already exist in memory files
Report "Nothing worth saving in this session." and exit.
Completion Criteria
- [ ] Current session extracted via jq (not from in-context memory)
- [ ] Pattern candidates identified (or "nothing worth saving" reported)
- [ ] Decision trees drafted with branches, seams, and pitfalls
- [ ] Dedup check completed against existing memory files
- [ ] All 5 rubric dimensions scored >= 4/5
- [ ] User confirmed before writing
- [ ] Pattern written to individual file in $MEMORY_DIR/
- [ ] MEMORY.md index updated with file pointer
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: qGolem
- Source: qGolem/orc
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.