agentleFS
XORwellXORwell/archeflow/skills/memory/SKILL.md

memory

Skill0 starsChanged 52 days agoMITView on GitHub

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>

106 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ecosystem-reference, fractal-delegation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • Maliot100XSkill

    send-user-message

    Send a proactive message to a paired user via their channel (Discord, Telegram, or WhatsApp). Use when the agent needs to notify, alert, or send an unsolicited message to a user — especially during heartbeat invocations, scheduled tasks, or when the agent wants to reach out without a prior user message in the current conversation. Triggers: 'send message to user', 'notify user', 'alert user', 'message the user on discord/telegram/whatsapp', or any need to proactively communicate with a paired sender.

    Also in 4 projects that use this

  • jh941213Skill

    docs-ci

    문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.

    Also in 3 projects that use this

  • jh941213Skill

    docs-interfaces

    API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.

    Also in 3 projects that use this

  • +6 more from naman10parikh
  • +1 more from jh941213

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 89 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After each run.complete, extract lessons from findings:

    line 68
  2. Distinctive:

    Before spawning agents, inject relevant lessons:

    line 80
  3. Very specific:

    After each run.complete, apply decay: lessons not seen for 10 runs lose 1 frequency.

    line 98

“Common” is measured: kept by at least 6 in 10 of the 89 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Command

InvocationRun
/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

TypeSourceDescription
patternAuto-detectedRecurring finding across runs (same category + similar description)
preferenceManualUser correction or workflow preference (injected immediately, skips frequency threshold)
archetype_hintAuto-detectedPer-archetype insight (e.g., Sage catches voice drift in monologues)
anti_patternManual or autoSomething that was tried and failed -- avoid repeating

Lesson JSON Fields

FieldTypeDescription
idstringm-NNN (monotonically increasing)
tsISO 8601Created or last updated
run_idstringRun that created or last triggered this lesson
typestringpattern, preference, archetype_hint, anti_pattern
sourcestringArchetype name or user_feedback
descriptionstringHuman-readable lesson text
frequencyintegerTimes this lesson was triggered
severitystringbug, warning, info, recommendation
domainstringwriting, code, general, or project-specific
tagsstring[]Keywords for matching and filtering
archetypestring?For archetype_hint -- which archetype this applies to
last_seen_runstringRun ID where last matched
runs_since_last_seenintegerCounter for decay

Example:

{"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:

<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:

<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:

## 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.

<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).

<archeflow-root>/lib/archeflow-memory.sh inject <domain> "" --audit <run_id>
<archeflow-root>/lib/archeflow-memory.sh audit-check <run_id>

Integration Points

MomentActionScript Command
After run.completeExtract lessons from findingsarcheflow-memory.sh extract <events.jsonl>
After extractionApply decay to all lessonsarcheflow-memory.sh decay
Before agent spawnInject relevant lessonsarcheflow-memory.sh inject <domain> <archetype>
User commandAdd/list/forget lessonsarcheflow-memory.sh add/list/forget

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.