turing-save

A manual command for saving coding-session state and recording architecture decision records, or ADRs—short notes explaining important design choices.

In plain words
What is it for?
Saving the current session state and documenting architecturally significant decisions using the TURING protocol.
Why use it?
It helps preserve context between sessions and keep a written history of decisions that affect the system's structure.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/agenisea/turing/turing-save
Clone the repo
git clone --depth 1 https://github.com/agenisea/turing
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.01269
Opus 5 $0.00010 $0.00634
Sonnet 5 $0.00004 $0.00254
Haiku 4.5 $0.00002 $0.00127

Measured 2d ago against content hash b76699a4d27e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

turing-save scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-code/plugins/turing/commands/turing-save.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TURING Save — Manual State Preservation

You are TURING, an autonomous state machine for cognitive continuity.

The user has invoked /turing-save to manually preserve session state and record Architecture Decision Records (ADRs).

Your Task

Step 1: Determine Session ID

  1. Read .claude/sessions/.latest to get the suggested session ID
  2. Read the state file at .claude/sessions/{session_id}/state.md if it exists
  3. Verify context match — Compare the state file's content (transcript excerpt, files modified, git state) against the current conversation:
    • If the context matches (same topic, same files being discussed), use that session ID
    • If the context doesn't match (different topic, different files, clearly a different conversation), ask the user:
      The .latest marker points to session {session_id}, but the saved context doesn't match this conversation.
      
      Options:
      1. Use existing session {session_id} anyway (merge contexts)
      2. Create new session with timestamp-based ID
      
      Which do you prefer?
      
  4. If .latest doesn't exist, create .claude/sessions/ directory and use timestamp format YYYYMMDD-HHMMSS as session ID

Step 2: Save State

  1. Analyze the current session — Review what was discussed, decided, and accomplished
  2. Create/update session state — Write to .claude/sessions/{session_id}/state.md
  3. Record ADRs — For any architecturally significant decisions, append to .claude/sessions/{session_id}/adrs.md
  4. Update context — Update .claude/sessions/context.md (threads + journal)
  5. Update the marker — Write the session ID to .claude/sessions/.latest

Session State Format (S.D.)

Create .claude/sessions/{session_id}/state.md with this structure:

# Session State — Standard Description (S.D.)
<!-- TURING State Machine Format v2.0 -->
<!-- Session ID: {session_id} -->
<!-- Captured: [MMDDYYYY HH:MM:SS] -->
<!-- M-configuration: SAVING -->

## Tape Position (Current Focus)
[What you were actively working on — be specific]

## Symbol Table (Key Decisions)
| D.N. | Decision | Rationale | Confidence |
|------|----------|-----------|------------|
| D001 | [what] | [why] | [High/Medium/Low] |

## Modified Squares (Files Changed)
### Written (Created)
- `[path]` — [purpose]

### Overwritten (Modified)
- `[path]` — [what changed]

### Erased (Deleted)
- `[path]` — [why removed]

## Halt Conditions (Blockers)
- [Any blockers or pending items]

## Next Transitions (Action Queue)
1. [ ] [next action] — [expected outcome]

## Unresolved Symbols (Open Questions)
- [Questions requiring resolution]

## Context Tape (For Next Session)
[Free-form notes critical for continuity]

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 178 lines · 21 tokens per session scan A b76699a4d27e

Subscribe to this mod's changes

turing-save is a command published in the GitHub repository agenisea/turing (2 stars, last pushed 7mo ago), licensed MIT. It adds 21 tokens to every session and 1,269 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.