agentleFS
ai-erp-collabai-erp-collab/deterministic-context-routing-plugin/skills/close-session/SKILL.md

close-session

Skill0 starsChanged 4 days agoMITView on GitHub

Use when the user ends or pauses work in a module ("close the session", "wrap up", "done for today") or when a non-conversational task in a module is finished, to write the module session entry and the root index entry. Not for workspace-wide health checks (use check).

10 other projects use 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. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    If tools/kb/kb.py is missing but AGENTS.md and modules.md exist, the workspace predates the integrity tool: tell the user to run the init …

    line 8
  2. Very specific:

    Check what this session changed: python tools/kb/kb.py check --changed <files changed this session>.

    line 16
  3. Very specific:

    Write the minimal entry a new session can continue from alone, ending with one next step concrete enough to start without asking.

    line 36
  4. Very specific:

    Ask the user: "Did a recurring problem or workaround come up that future tasks must know about?" If yes, add a section to known_issues.md …

    line 50
  5. Distinctive:

    Never edit or delete older entries.

    line 56

“Common” is measured: kept by at least 6 in 10 of the 9 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

Close Session

If tools/kb/kb.py is missing but AGENTS.md and modules.md exist, the workspace predates the integrity tool: tell the user to run the init skill, which upgrades it, and stop. Run tool commands from the workspace root; use python3 or py -3 where python is missing or older than 3.9.

  1. Resolve the active module: the one the user named, otherwise the last active module in root session_state.md.
  2. Check what this session changed: python tools/kb/kb.py check --changed <files changed this session>. Resolve blocking issues with the kb skill before writing the entry, or list them in it. Its summary line goes into the entry's checks.
  3. Recipe candidates: run python tools/kb/kb.py recipe candidate tick --module <module>, then python tools/kb/kb.py recipe candidates. If a candidate is listed, ask the user whether to promote it (the kb skill's recipe procedure). Then ask once: "Did this session settle a platform technique other modules could reuse?" On yes, register it with python tools/kb/kb.py recipe candidate add <file> --symbol <name> --module <module>.
  4. Insert a new entry at the top of modules/<module>/session_state.md, following templates/session/session-state-entry.md in the workspace:
    • what was asked and the current state;
    • files changed;
    • durable facts learned, with the evidence for each;
    • assumptions and confidence;
    • checks run (including the step 2 summary) and what remains unverified;
    • exactly one next useful action. Write the minimal entry a new session can continue from alone, ending with one next step concrete enough to start without asking. End it with the line <!-- AGENT-SESSION-STOP -->.
  5. Insert a short entry at the top of root session_state.md, in the same shape as its other entries:

    ## YYYY-MM-DD - <module>: <task summary>
    - Last active module: `<module>`.
    - Workspace docs: <one-line summary of docs changed>.
    - Verification: <checks run>.
    - Next useful action: <the same next action as the module entry>.
    <!-- AGENT-SESSION-STOP -->
  6. Ask the user: "Did a recurring problem or workaround come up that future tasks must know about?" If yes, add a section to known_issues.md with Symptom, Cause, and Required handling, written so it changes what the next agent does. Workspace defects found by the check skill never go here; that skill keeps its own single line.
  7. Never edit or delete older entries.

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.