narrative-backfill

Digest session history into a journal-led narrative estate using pooled Codex workers.

14|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/intendant-dev/Intendant --skill narrative-backfill-intendant-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: narrative-backfill
Source: https://github.com/intendant-dev/Intendant/tree/main/automations/narrative-backfill
Command: npx skills add https://github.com/intendant-dev/Intendant --skill narrative-backfill-intendant-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Machines accumulate long session histories that are never synthesized into a searchable, citable narrative record. This Skill bootstraps that derived narrative estate in one idempotent run and catches up after any daily-digest lapse, without re-processing already-digested sessions. ## Core Features & Use Cases - Idempotent journal-led digest: An append-only journal keys every skip and watermark, so re-runs only process the missing diff and crashed runs resume exactly where they stopped. - Rolling worker pool: A synchronous pool of ephemeral codex exec workers digests sessions oldest-first, with chunking and merge for sessions over 150K tokens, quota-aware backoff, and a single retry per target. - Owner-controlled spend cap: The run fails closed until the owner annotates the agenda item with an exact NS CAP: $<amount> line, and stops refilling workers when cumulative estimated cost crosses the cap. - Use Case: After adopting the narrative-synthesis cycle on a machine with months of session history, run this once to digest everything into cited Markdown digests with JSON sidecars, then let the daily digest take over. ## Quick Start Approve the narrative-backfill agenda item, annotate it with a spend cap such as NS CAP: $60, and ask the agent to run the narrative backfill to digest this machine's session history.

Frequently Asked Questions about narrative-backfill

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

FAQPage Schema
How do I backfill session history into narrative digests?▼

Run the narrative-backfill action once after approving its agenda item and annotating it with an exact NS CAP: $<amount> line. It exports each eligible session, digests it with codex exec workers, and journals every result so re-runs only process what is missing.

How do I set the spend cap for a narrative backfill run?▼

Add the exact line NS CAP: $<amount> as an owner annotation on the stamped agenda item, either in its THREAD section on the dashboard or via intendant ctl agenda annotate <item-id> 'NS CAP: $60'. Prose or bare numbers authorize nothing; the run refuses to digest without the exact line.

Does narrative backfill require an API key for Codex?▼

No. Digests run as codex exec workers authenticated through Codex subscription OAuth only, never an API key or direct API billing. All dollar figures are API-equivalent estimates, not billed dollars.

What happens if a backfill run stops midway?▼

The next run resumes from the journal exactly where the previous one stopped, since the append-only journal records every committed digest and skip. Sessions interrupted mid-chunking simply re-digest because their estate write and journal line only happen after the merge.

Why does the backfill refuse to run after I approved it?▼

Approval alone never authorizes spend. The run fails closed until it finds an owner-written NS CAP: $<amount> annotation on the item; near-miss notes like "cap it at sixty dollars" are quoted back and rejected.

Can narrative backfill digest a session that is still active?▼

No. Only sessions idle for more than six hours are candidates, determined by the newest transcript mtime. Live sessions are never digested, and redaction stays on for every export.