Skip to content

Maintenance Adapter

Most users only need the main liner skill (liner agent-skill install), which lets your agent discover, load, and build liners.

If you also want Codex or Claude Code to run structured maintenance on finished liners (renaming or moving folders, replacing or purging sources, or applying reviewed patches to a finished synthesis), install the optional Maintenance Adapter. It delegates every edit to liner project and liner sources commands and never writes liner.yaml, tape.yaml, LINER.md, SKILL.md, or MIXTAPE.md directly.

Surface What it does Active instructions?
liner skill (liner agent-skill install) Lets your agent discover your library, suggest liners, and build new ones. Yes, once you install it.
Root SKILL.md (inside each liner) Tells an agent when that specific liner applies and how to load LINER.md and mixtape/. Yes, when that liner is used.
Maintenance Adapter (liner adapters install) Teaches Codex or Claude Code to route structural edits through liner project guidance with previews and receipts. Yes, once you install it.
type: skill source (in tape.yaml) Pulls another skill’s text into a liner’s sources as evidence or an example. No. Always inert reference material.

Install Liner globally so your agent calls the same CLI binary on every request:

npm install -g linersh

Inspect the Codex target and preview what installation will write:

liner adapters inspect codex
liner adapters install codex

Authorize the installation after reviewing the plan:

liner adapters install codex --yes

Use claude for Claude Code:

liner adapters inspect claudeliner adapters install claudeliner adapters install claude --yes

Without --yes, install prints the file plan and exits with code 2 when approval is required. With --yes, it applies the changes immediately and prints a receipt. Installation preserves all user-authored files and text outside Liner’s managed blocks.

Open Codex or Claude Code where it can read the liner, then ask for a specific change:

Inspect this liner. Add the current Apple App Review Guidelines as a required source, tell me which derived files become stale, and show any approval-required plan before applying it.

The adapter instructs your agent to inspect first using the CLI’s current contract (from ~/liner/projects, or using your liner’s actual path):

liner project guidance mobile-design-foundations --format markdownliner project inspect mobile-design-foundations --json

Every supported maintenance change follows five steps:

  1. Snapshot: Liner reads current identity (Project ID), revision, compatibility, Source IDs, and lifecycle state without writing.
  2. Change Set: Liner builds a write-free plan listing exact operations, file effects, risk level, and which derived files become stale.
  3. Approval gate: When approval_required is true, the agent stops and waits for your fresh approval of that exact preview.
  4. Revalidation: Liner verifies the liner and plan still match before applying atomically.
  5. Change Receipt: Liner saves a redacted receipt under mixtape/.liner-runs/maintenance/ without copying source text or private notes.

Additive and metadata-only updates may apply after validation without a separate approval gate. Source removal, purge, semantic replacement, folder moves, and other higher-risk edits always require explicit approval.

  • Inspect liner identity, compatibility, lifecycle state, and Source IDs.
  • Add or update a source while preserving its immutable Source ID.
  • Replace a source semantically with a successor Source ID linked to its predecessor.
  • Remove a source into the retention vault, or separately approve a destructive purge.
  • Rename or move a liner folder without changing its immutable Project ID.
  • Refresh stale compiled sources and AI instructions through the required review steps.
  • Patch a finished liner’s synthesis or instruction files without changing sources (requires a current, finished liner with no unreviewed external edits; a synthesis patch triggers a recompile and instruction review).
  • Update managed AGENTS.md or CLAUDE.md pointer blocks without overwriting user text.

Preview and apply updates to managed adapter content:

liner adapters update codexliner adapters update codex --yes

Preview and apply removal:

liner adapters remove codexliner adapters remove codex --yes

Use claude for Claude Code. Update and removal touch only verified Liner-managed content. If managed state or compatibility is ambiguous, Liner stops and prints the exact recovery steps.