file-backed-state-module

Externalize agent state into durable files with path-addressable handoffs.

43|2|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/curated-skills/LinguaClaw --skill file-backed-state-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-backed-state-module
Source: https://github.com/curated-skills/LinguaClaw/tree/main/harnesses/modules/file-backed-state
Command: npx skills add https://github.com/curated-skills/LinguaClaw --skill file-backed-state-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of losing or misordering agent state during long runs, delegation, and context compression by making all transferable information durable and addressable by file path.

Core Features & Use Cases

  • Durable, path-addressable handoffs: Ensures tasks, role instructions, and reusable replies are written to stable files before any child stage reads them.
  • Authoritative run and child status tracking: Uses STATE_ROOT/RESPONSE.md and children/<id>/RESPONSE.md to record the current completion/status and where to continue next.
  • Auditability and recoverability: Maintains an append-only state/task_history.jsonl log and requires recovery via relaunch/retry when durable outputs are missing or corrupted.
  • Artifact promotion discipline: Maintains artifacts/manifest.json to index final deliverables (and key supporting files) for later evaluation.

Quick Start

Configure STATE_ROOT under /sa-output, then write STATE_ROOT/TASK.md, create STATE_ROOT/RESPONSE.md early, and persist each child’s outputs into STATE_ROOT/children/<child_id_or_role>/RESPONSE.md only after the required durable files are complete.

Frequently Asked Questions about file-backed-state-module

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist agent state safely across multiple runs and context compression?

Persist agent state by externalizing all transferable information into durable, path-addressable files like TASK.md and RESPONSE.md before any child stage reads them. This ensures context compression and delegated stages resume reliably without losing or misordering state.

What is the best way to manage child agent handoffs in multi-stage agent orchestration?

Manage child agent handoffs by establishing a stable STATE_ROOT directory and persisting each child's outputs into children/<id>/RESPONSE.md only after required durable files are complete. This transfer discipline guarantees role instructions and reusable replies are safely addressed by file path.

How do I track agent run status and maintain audit logs for file-based workflows?

Track agent run status and maintain audit logs by writing completion status to STATE_ROOT/RESPONSE.md and appending every state transition to an append-only state/task_history.jsonl log. This provides authoritative run tracking and enables recovery via relaunch or retry when durable outputs are corrupted or missing.

How do I index final deliverables and promote artifacts during multi-stage agent harness runs?

Index final deliverables and promote artifacts by maintaining an artifacts/manifest.json file that catalogs produced deliverables and key supporting files. This artifact promotion discipline ensures all outputs are addressable by file path for later evaluation across long horizon agent runs.

When should I not use file-based state persistence for agent delegation?

Avoid file-based state persistence if your agent runs are short-lived, single-stage, or do not require context compression and child handoffs. This approach requires a stable STATE_ROOT layout and adds transfer discipline overhead, making it unnecessary for simple, stateless agent tasks.