Skip to content

🧠 Persistent Context ​

🧠 Persistent ContextInstructions, prompts,skills and agents

Persistent Context is versioned knowledge that guides AI agents: rules, tasks, workflows, and past decisions.

Why ​

Agents need your conventions and decisions in a reusable form. Commit them once instead of repeating them in every chat.

Primitives ​

Four file types guide agents: instructions (rules), prompts (tasks), skills (workflows), and agents (specialists). See coding-pal for when and how to use each. coding-pal also publishes catalogs of instructions, prompts, skills, and agents.

Persistent Context across the stages ​

Persistent Context supports 0 — Meet through 5 — Prove. 7 — Learn enriches Persistent Context in return:

StageWhat Persistent Context does there
0 — MeetSupplies the domain glossary, specifications, and meeting agent instructions and prompts, and receives new client terminology back
1 — TriageGrounds the qualification and mapping of requirements to existing capabilities and domain glossaries
2 — ThinkSupplies architectural invariants, decision records, and domain boundaries that bound the options
3 — PlanInforms constraints and non-functional invariants carried into the plan
4 — CodeGuides AI agents with repository conventions, type rules, and execution skills
5 — ProveConstrains agent auto-remediation loops so automated patches comply with decision records and contracts
7 — LearnReceives new instructions, prompts, skills, agents, and decision records from production evidence

Who owns it ​

The Architect owns Persistent Context, with every team contributing changes through pull requests.

Where it lives ​

Persistent Context lives in two places, depending on how widely it applies.

Project-specificShared (global and generic)
WhatWhat only this application needs: its own instructions, specifications, and decision recordsWhat every project needs: coding standards, test conventions, and generic agents, skills, and prompts
WhereIn the application repository, next to the code it describesIn a dedicated repository, such as coding-pal
How it reaches a projectIt is already there, and is reviewed like the code it describesIt is installed into each project with a package manager (coding-pal uses APM), so one change reaches every project

Both are committed, reviewed through pull requests, and versioned.

Rules ​

  1. Committed, reviewed, versioned. A context artifact changes through a pull request.
  2. Evidence-driven. New artifacts come from 7 — Learn: something was corrected twice, or re-explained twice.
  3. Small and specific. Instructions that try to cover everything get ignored by models and humans alike.
  4. Scoped precisely. Instructions declare the narrowest matching pattern that works; broad patterns waste context on every request.
  5. Deleted when wrong. An outdated instruction is worse than none: it produces confident, consistent, wrong output.
  6. Never contains secrets. Context artifacts are read by tools and shared across sessions.

Health signals ​

SignalHealthyUnhealthy
Fix-loop iterations neededTrending down (1–2 loops)Flat or above 3 loops
Manual human corrections during validationNear zeroFrequent
Instruction countStable, each one usedGrowing without pruning
First-pass green rate in Code> 80%< 50%
Generated output matching codebase conventionsHighRequires rewriting

Published and maintained by ALTEN