memory
Show or manage ArcheFlow's cross-run memory: lessons learned from past runs that are injected into agent prompts.
Skill by XORwell
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/xorwell-memory
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/memory
What's inside
- Skill name
memory- Description
- Show or manage ArcheFlow's cross-run memory: lessons learned from past runs that are injected into agent prompts. Usage: /archeflow:memory [list | add <text> | forget <id>] <example>User: "/archeflow:memory"</example> <example>User: "/archeflow:memory add Always run the migration tests"</example> <example>User: "/archeflow:memory forget m-002"</example>
- License
- MIT
- Instructions
- 118 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
## Command
| Invocation | Run |
|------------|-----|
| `/archeflow:memory` or `list` | `<archeflow-root>/lib/archeflow-memory.sh list` |
| `add <text>` | write the text to `.archeflow/memory/new-lesson.txt` with your file tool, then `<archeflow-root>/lib/archeflow-memory.sh add preference "$(cat .archeflow/memory/new-lesson.txt)"` and delete the file |
| `forget <id>` | `<archeflow-root>/lib/archeflow-memory.sh forget <id>` (ids look like `m-002`) |
The rest of this file describes how runs use memory (`/archeflow:run` calls these steps itself).
# Cross-Run Memory
ArcheFlow forgets everything after each run. This skill extracts lessons from completed runs and injects them into future agent prompts, so recurring issues (timeline errors, missing null checks) are caught proactively.
## Storage
```
.archeflow/memory/lessons.jsonl # Append-only, one lesson per line
.archeflow/memory/archive.jsonl # Decayed lessons (frequency reached 0)
.archeflow/memory/audit.jsonl # Injection audit trail
```
## Lesson Types
| Type | Source | Description |
|------|--------|-------------|
| `pattern` | Auto-detected | Recurring finding across runs (same category + similar description) |
| `preference` | Manual | User correction or workflow preference (injected immediately, skips frequency threshold) |
| `archetype_hint` | Auto-detected | Per-archetype insight (e.g., Sage catches voice drift in monologues) |
| `anti_pattern` | Manual or auto | Something that was tried and failed -- avoid repeating |
## Lesson JSON Fields
| Field | Type | Description |
|-------|------|-------------|
| `id` | string | `m-NNN` (monotonically increasing) |
| `ts` | ISO 8601 | Created or last updated |
| `run_id` | string | Run that created or last triggered this lesson |
| `type` | string | `pattern`, `preference`, `archetype_hint`, `anti_pattern` |
| `source` | string | Archetype name or `user_feedback` |
| `description` | string | Human-readable lesson text |
| `frequency` | integer | Times this lesson was triggered |
| `severity` | string | `bug`, `warning`, `info`, `recommendation` |
| `domain` | string | `writing`, `code`, `general`, or project-specific |
| `tags` | string[] | Keywords for matching and filtering |
| `archetype` | string? | For `archetype_hint` -- which archetype this applies to |
| `last_seen_run` | string | Run ID where last matched |
| `runs_since_last_seen` | integer | Counter for decay |
Example:
```jsonl
{"id":"m-001","ts":"2026-04-03T14:00:00Z","run_id":"2026-04-03-add-auth","type":"pattern","source":"guardian","description":"Timeline references must match story start day","frequency":2,"severity":"bug","domain":"writing","tags":["continuity","timeline"],"last_seen_run":"2026-04-03-add-auth","runs_since_last_seen":0}
```
---
## Auto-Detection
After each `run.complete`, extract lessons from findings:
```bash
<archeflow-root>/lib/archeflow-memory.sh extract .archeflow/events/<run_id>.jsonl
```
The script reads `review.verdict` events, matches findings against existing lessons by keyword overlap (50%+ threshold), increments frequency on matches, and creates new candidate lessons (frequency: 1) for unmatched findings with severity >= WARNING.
**Promotion rule:** A finding needs `frequency >= 2` (seen in 2+ runs) before injection. This filters out one-off noise. Preferences skip this threshold.
## Injection
Before spawning agents, inject relevant lessons:
```bash
<archeflow-root>/lib/archeflow-memory.sh inject <domain> <archetype>
```
Rules: filters by domain (or `general`), optionally by archetype, requires `frequency >= 2`, sorts by frequency descending, caps at 10 lessons. Lessons with `frequency >= 5` are always injected regardless of filters.
Injected as a markdown section appended to the agent's system prompt:
```markdown
## Known Issues (from past runs)
- Timeline references must match story start day [seen 3x, guardian]
- Voice drift common in monologue passages >200 words [seen 2x, sage]
```
## Decay
After each `run.complete`, apply decay: lessons not seen for 10 runs lose 1 frequency. When frequency reaches 0, the lesson is archived.
```bash
<archeflow-root>/lib/archeflow-memory.sh decay
```
## Manual Management
See the Command table at the top. Lessons added by hand are type `preference` and are injected
from the next run on.
## Audit Trail
Track which lessons are injected per run and whether they were effective. Pass `--audit <run_id>` to inject to log records. After a run, `audit-check <run_id>` compares injected lessons against review findings: no matching finding = helpful (issue prevented), matching finding = ineffective (issue repeated despite injection).
```bash
<archeflow-root>/lib/archeflow-memory.sh inject <domain> "" --audit <run_id>
<archeflow-root>/lib/archeflow-memory.sh audit-check <run_id>
```
## Integration Points
| Moment | Action | Script Command |
|--------|--------|----------------|
| After `run.complete` | Extract lessons from findings | `archeflow-memory.sh extract <events.jsonl>` |
| After extraction | Apply decay to all lessons | `archeflow-memory.sh decay` |
| Before agent spawn | Inject relevant lessons | `archeflow-memory.sh inject <domain> <archetype>` |
| User command | Add/list/forget lessons | `archeflow-memory.sh add/list/forget` |From XORwell/archeflow, MIT.
More from XORwell/archeflow
- 0.565score
review
XORwell
Review existing changes (uncommitted work, a branch, or a commit range) with ArcheFlow's reviewer roles: Guardian by default, optionally Skeptic, Sage and…
SkillAFreshness: AClaude Code +9 - 0.565score
run
XORwell
Run one task through Plan -> Do -> Check -> Act with ArcheFlow's roles, on its own git branch.
SkillAFreshness: AClaude Code +9 - 0.561score
check-phase
XORwell
Reviewer protocol for Guardian, Skeptic, Sage and Trickster - finding table, evidence rules, reviewer inputs, evidence gate.
SkillAFreshness: AClaude Code +9 - 0.561score
cost-tracking
XORwell
ArcheFlow cost tracking: per-agent and per-run token cost, budget enforcement, cheapest adequate model per role and domain.
SkillAFreshness: AClaude Code +9 - 0.561score
git-integration
XORwell
How an ArcheFlow run uses git (run branch, Maker worktree, integrate, merge, rollback, cleanup): reference for archeflow-git.sh and its config.
SkillAFreshness: AClaude Code +9 - 0.561score
multi-project
XORwell
Multi-project ArcheFlow runs from a multi-run.yaml: dependency DAG across repositories, parallel sub-runs, shared budget.
SkillAFreshness: AClaude Code +9 - 0.561score
act-phase
XORwell
Act phase of an ArcheFlow run: consolidate findings, route them to Creator or Maker, decide merge / cycle back / stop, write act-feedback.md.
SkillAFreshness: AClaude Code +9 - 0.558score
domains
XORwell
ArcheFlow domain adapters (code, writing, research): terminology, metrics, review focus and context for non-code runs.
SkillAFreshness: AClaude Code +9 - 0.558score
autonomous-mode
XORwell
Running ArcheFlow unattended (overnight, batches of tasks): self-organization, progress logging, safe stopping.
SkillAFreshness: AClaude Code +9 - 0.558score
progress
XORwell
Live progress file .archeflow/progress.md for ArcheFlow runs (status, budget, DAG), watchable from a second terminal.
SkillAFreshness: AClaude Code +9 - 0.558score
presence
XORwell
How ArcheFlow reports its activity to the user: short status lines, outcomes not mechanics.
SkillAFreshness: AClaude Code +9 - 0.524score
replay
XORwell
Replay a recorded ArcheFlow run: decision timeline and weighted what-if over the reviewers' verdicts.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
- Last release
- Sep 24, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/XORwell/archeflow
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from XORwell
- 0.565score
review
XORwell
Review existing changes (uncommitted work, a branch, or a commit range) with ArcheFlow's reviewer roles: Guardian by default, optionally Skeptic, Sage and…
SkillAFreshness: AClaude Code +9 - 0.565score
run
XORwell
Run one task through Plan -> Do -> Check -> Act with ArcheFlow's roles, on its own git branch.
SkillAFreshness: AClaude Code +9 - 0.561score
check-phase
XORwell
Reviewer protocol for Guardian, Skeptic, Sage and Trickster - finding table, evidence rules, reviewer inputs, evidence gate.
SkillAFreshness: AClaude Code +9 - 0.561score
git-integration
XORwell
How an ArcheFlow run uses git (run branch, Maker worktree, integrate, merge, rollback, cleanup): reference for archeflow-git.sh and its config.
SkillAFreshness: AClaude Code +9 - 0.561score
cost-tracking
XORwell
ArcheFlow cost tracking: per-agent and per-run token cost, budget enforcement, cheapest adequate model per role and domain.
SkillAFreshness: AClaude Code +9 - 0.561score
multi-project
XORwell
Multi-project ArcheFlow runs from a multi-run.yaml: dependency DAG across repositories, parallel sub-runs, shared budget.
SkillAFreshness: AClaude Code +9
Cite this page
memory skill. Agent Mart. https://agentmart.dev/skills/xorwell-memory (last updated 2026-10-24)