agentleFS
fatih-developerfatih-developer/fth-skills/skills/memory-ledger/SKILL.md

memory-ledger

Skill7 starsChanged 42 days agoMITView on GitHub

Maintain a structured ledger of decisions, discovered bugs and fixes, user preferences, constraints, current status, and failed approaches throughout multi-step agentic tasks. Auto-update after every significant step. Triggers on 'where were we', 'continue', 'summarize status', 'remember', or when a new agent instance takes over a task.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep a structured log of everything learned during a task.

    line 8
  2. Distinctive:

    Update the ledger when any of these events occur:

    line 60
  3. Distinctive:

    When a new instance takes over a task, first action is to read the ledger:

    line 77
  4. Distinctive:

    When the task is complete, close the ledger:

    line 92
  5. Distinctive:

    After 3+ significant updates to the ledger (each completion of a subtask), evaluate whether a session handoff should be suggested.

    line 122

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Memory Ledger Protocol

Keep a structured log of everything learned during a task. Goal: when a new instance takes over, it reads the ledger and continues from where things left off — no starting from scratch.


Ledger Structure

One ledger block per task. Updated incrementally as the task progresses — never rewritten from scratch.

MEMORY LEDGER
Task        : [task name / short description]
Started     : [first step number or timestamp]
Last updated: [step number or description]

## Goal
[What is being done — 1-2 sentences. Scope and success criteria.]

## User Preferences & Constraints
- [Preference / constraint 1]
- [Preference / constraint 2]
[If empty: "None established yet"]

## Decisions Made
| # | Decision | Rationale | Step |
|---|----------|-----------|------|
| 1 | [what was decided] | [why] | [which step] |

## Current Status
Completed  : [list or "—"]
In progress: [list or "—"]
Pending    : [list or "—"]

## Failed Approaches
| Approach | Why It Failed | Step |
|----------|---------------|------|
| [what was tried] | [error / issue] | [which step] |
[If empty: "None yet"]

## Bugs & Fixes
| Bug | Fix | Status |
|-----|-----|--------|
| [error message / description] | [applied fix] | Fixed / Open |
[If empty: "None yet"]

## Next Step
[The next thing to do — clear and actionable]

Update Rules

Update the ledger when any of these events occur:

EventSection to Update
Subtask completedCurrent Status, Next Step
Decision madeDecisions Made
Error occurredBugs & Fixes
Error resolvedBugs & Fixes (update status)
Approach failedFailed Approaches
User stated preference/constraintUser Preferences & Constraints

Updates must be small and surgical — only change the affected section, do not rewrite the entire ledger.


Handover Protocol

When a new instance takes over a task, first action is to read the ledger:

LEDGER READ — Task resumed
Task    : [task name]
Status  : [current status summary]
Next    : [next step]
Warning : [if any open bugs or failed approaches]
Continuing...

Ledger Close

When the task is complete, close the ledger:

LEDGER CLOSED
Task completed
Total steps   : N
Decisions made: N
Bugs resolved : N

When to Skip

  • Single-step, short tasks (< 5 minutes, < 3 steps)
  • User is only asking a question, no task
  • Context is already small and manageable

Guardrails

  • Never let the ledger grow stale — if 3+ steps pass without an update, force one.
  • Keep entries concise — one line per decision, one line per bug. No paragraphs.
  • Cross-skill: integrates with task-decomposer (tracks subtask progress), error-recovery (logs errors and fixes), and agent-reviewer (provides retrospective data).

Session Handoff Integration

After 3+ significant updates to the ledger (each completion of a subtask), evaluate whether a session handoff should be suggested.

Suggest handoff when:

  • Task involves 5+ file edits since session started
  • Multiple architecture decisions were made
  • Task is becoming long-running (context filling up)
  • User explicitly mentions context concern

Suggestion prompt:

"We've made substantial progress on this task. A session handoff document would preserve this context for future sessions, especially if we need to resume later or if context gets full. Say 'create handoff' when ready to save state."

What to include when creating handoff from memory-ledger:

  • Decisions Made table → Decisions Made section
  • Current Status → Current State Summary + Pending Work
  • Bugs & Fixes → Potential Gotchas
  • User Preferences → Assumptions Made
  • Next Step → Immediate Next Steps (first item)

For long tasks, chain handoffs: invoke session-transfer skill with --continues-from to link related handoffs.

References

  • references/EXAMPLES.md — a live ledger maintained across a multi-step Python project. Read it when the expected output format or level of detail is unclear.

🔗 Next Steps & Handoffs

<!-- BEGIN GENERATED: handoffs (generated from the ecosystem workflow map by build_ecosystems.py — do not edit by hand) -->

Ecosystem: @ecosystem-orchestration — Agent Orchestration.

Workflows:

  • Complex Task Execution Flow (orch-complex-task, step 4 of 6): next → @output-critic (optional).
  • Knowledge Capture Flow (orch-knowledge, step 1 of 2): next → @mastermind-logger.

Direct handoffs:

  • @session-transfer — The task will continue in a new session.

Handoff contract: pass results to the next skill through an inline Handoff block in your reply with the fields skill, workflow, created_at, inputs, summary, and next (the handoff contract of @ecosystem-orchestration). If a next skill is not installed, continue with its step from the ecosystem map, or install it with npx skills add fatih-developer/fth-skills --skill <name> after the user agrees.

<!-- END GENERATED: handoffs -->

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.