agentleFS
youcislayoucisla/Agent-Foundry/skills/core/session-distill/SKILL.md

session-distill

Skill1 starsChanged 23 days agoMITView on GitHub

Turn a working session into a structured artifact covering changes, decisions, open questions, and reusable patterns. Use when wrapping up a session or handing work to another agent.

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before a context compaction

    line 20
  2. Distinctive:

    After a long debugging session

    line 22
  3. Very specific:

    Use Decision: ... because ....

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Session Distill

Convert a working session into an artifact that survives the session. The artifact is written by hand or by the manual helper; nothing is captured automatically.

When to Use

  • End of a work session
  • Before a context compaction
  • Handing work to another agent or person
  • After a long debugging session
  • Weekly, to consolidate several sessions

Procedure

Artifact

Save to plans/sessions/YYYY-MM-DD-<short-name>.md. The private plans/ tree is gitignored and excluded from catalog, install, and package discovery.

Required sections:

# Session: YYYY-MM-DD - <short name>

## What we did
- [Concrete change]

## Decisions made
- **Decision**: [what we chose] because [evidence]

## Files changed
- `path/to/file` - [one-line description]

## Open questions
- [Question deferred]

## Patterns observed
- [Reusable insight or anti-pattern]

## Next session
- [Concrete next action and owner]

Writing each section

What we did

Bullets, one concrete change each. Drop anything you cannot state concretely.

Decisions made

Use **Decision**: ... because .... The reason is the part a future session needs; a decision without a reason cannot be revisited.

Files changed

Include paths and one-line descriptions. This is the audit trail.

Open questions

Questions you did not answer. They move to the next session's artifact.

Patterns observed

The reusable section:

  • For a reusable pattern, draft under plans/skills/drafts/ using knowledge-extract.
  • For a repeated mistake, add it to plans/anti-patterns.md.

Next session

Specific enough to act on. Name the file, function, or open question.

Optional helper

hooks/session-end.sh is a manual helper, not a registered hook. By default it stores no transcript and calls no model. Two explicit opt-ins change that:

  • AGENT_FOUNDRY_SESSION_PERSIST=1 appends a redacted raw transcript.
  • AGENT_FOUNDRY_SESSION_DISTILL=1 requests model distillation from the local daemon and falls back to a labeled manual placeholder when unavailable.

Review the artifact before sharing. Redaction is pattern-based, not a guarantee.

Anti-patterns

  • A decision list with no reasons.
  • Recording only what changed, not what was checked.
  • Writing patterns directly into skills/ without review.
  • Pasting a raw transcript by default.
  • Treating a model-distilled summary as a record of fact.

References

  • details

Verification Checklist

  • All six sections are present.
  • Every decision includes a reason.
  • Changed files have paths and descriptions.
  • Patterns point to a draft path under plans/.
  • No transcript is stored unless the persist opt-in was set.

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.