plastic AGENTS.md

A project-specific instruction file for Plastic, a tool that manages decisions and state across AI coding sessions, with optional local search.

In plain words
What is it for?
Use it when developing, testing, releasing, or searching the Plastic tool and its stored session decisions.
Why use it?
It documents the supported languages, release rules, version files, compatibility requirements, and ways to find stored project information.

Instructions file for CodexOpenCode

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 instructions/zalom/plastic/agents-md
Clone the repo
git clone --depth 1 https://github.com/zalom/plastic

Made for: Codex, OpenCode.

Per session 2,141 This file is loaded in full into every session.
When invoked 2,141 The same file — it is already loaded in full.
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.02141 $0.02141
Opus 5 $0.01071 $0.01071
Sonnet 5 $0.00428 $0.00428
Haiku 4.5 $0.00214 $0.00214

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

Security

Grade A, and why

plastic AGENTS.md 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.

AGENTS.md · 132 lines

How it starts

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

Plastic

Intent-driven state management for AI coding sessions.

Stack

  • Language: Ruby (scripts), JavaScript/Node.js (npm package, installer)
  • Framework: npm package (CLI installer), flat personal skills
  • Testing: Minitest. See the Testing section below for the correct full-suite command.
  • Source: /Users/zlatko/apps/personal/plastic
  • Remote: [email protected]:zalom/plastic.git

Defaults

  • Release process: commit_and_push, github_release, npm_publish
  • Version files: package.json, .claude-plugin/plugin.json, .claude-plugin/marketplace.json
  • Tag format: v{{version}}
  • All bash scripts must work under macOS /bin/bash 3.2 (no bash 4.x features)
  • Bump all 3 version files on every fix/feature release

Searching Plastic with QMD

QMD is an optional but recommended local markdown search engine over the Plastic stores. Plastic works without it (ripgrep over the store files is the fallback). When QMD is present, search it before re-deriving an existing decision, spec, or outcome.

  • Collections. Plastic indexes into the DEFAULT qmd index, one collection per store, all plastic- prefixed: plastic-global for ~/.plastic/store, and plastic-<slug> for each project store (slugs come from projects.yml).
  • Scope a search. One project: -c plastic-<slug>. All of Plastic: target the plastic-* collections. Pick the narrowest scope that answers the question.
  • Search before re-deriving. Look in the stores for prior decisions, specs, and outcomes before re-deriving them. The stores are the memory.
  • Power tools are recommended when present. When QMD (for intents), Enola, or Serena (for code navigation) is present, prefer them: the UserPromptSubmit hook appends one combined recommendation line covering QMD and at most one code-navigation tool, Enola-first when both code-navigation tools are present (one code-navigation slot, Enola wins over Serena), and the per-skill QMD-first steps run qmd-sync search before grep/Read, then open the authoritative intent file. Use the deterministic scripts/qmd-sync search "<terms>" helper, which scopes collections for you and is a clean no-op when QMD is absent.
  • Completion fires an async reindex. Intent delivery reindexes the delivering store's collection in the background (non-blocking), so the index stays fresh while "index mutation is lifecycle-only" stays true. Never reindex ad-hoc.
  • Index mutation is lifecycle-only. The index changes only on Plastic lifecycle events (install registers all stores, project creation registers the new project store, intent delivery reindexes the delivering store's collection). Never reindex ad-hoc.
  • Query craft lives in the qmd skill. Use the installed qmd skill for structured qmd query (intent/lex/vec/hyde) and BM25 qmd search. Two notes: structured queries need ANSI-C $'...' quoting so \n becomes a real newline, and qmd search (BM25) needs no model downloads, so it is the safe model-free fallback.

Read the full file on GitHub · 132 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 · 132 lines · 2,141 tokens per session scan A cebba0006993

Subscribe to this mod's changes

plastic AGENTS.md is an instructions file published in the GitHub repository zalom/plastic (10 stars, last pushed 2d ago), licensed MIT. It adds 2,141 tokens to every session, about $0.0107 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.