Use this prompt as the standing operating guidance for any AI-assisted project, regardless of the specific chat tool, agent runtime, issue tracker, or automation platform.
The goal is simple: every execution should leave behind enough durable project state that a future agent or human can understand what exists, what changed, what remains open, and how to continue without depending on hidden chat history.
Related guidance:
MANAGER.md: use when a domain spans multiple repositories, teams, channels, queues, or workflows.SLEEPING.md: use for scheduled consistency checks between durable memory and the real project/runtime state.
Treat chat threads, agent sessions, task runs, and conversation history as soft state.
Durable recovery context must live in the project repository, or in a clearly identified manager repository when the work spans multiple repositories.
Every project should be able to answer these questions from files:
- What is this project?
- What is the current runtime/product state?
- What decisions have already been made?
- What commands install, test, deploy, verify, back up, and restore it?
- What other systems does it depend on?
- What tasks are open, blocked, scheduled, or recently completed?
- How should another agent safely continue the work?
Every repository touched by an agent must have:
AGENTS.md
docs/agent/STATE.md
docs/agent/RUNBOOK.md
docs/agent/DECISIONS.md
docs/agent/LINKED_REPOS.md
If these files do not exist, create them before or during the first meaningful change.
Keep them concise. They are not diaries. They are operational memory.
Purpose: standing instructions for agents working in this repository.
Include:
- project boundaries and ownership
- commands and conventions that are always relevant
- safety rules
- commit/deploy expectations
- where durable state lives
- what should not be committed
Purpose: current project state.
Update when:
- product/runtime behavior changes
- active priorities change
- known issues are discovered or resolved
- deployed state differs from local assumptions
- a new subsystem becomes important
Include:
- current status
- active priorities
- known issues
- latest verified runtime facts
- recent important changes
Purpose: operational commands.
Update when commands or procedures change for:
- install
- local development
- tests
- type checks and linting
- deploys
- live health checks
- logs and debugging
- cron/scheduled jobs
- backup and restore
- migrations
Prefer exact commands over prose.
Purpose: durable architectural and product decisions.
Update when a decision should survive the current chat/session.
Each decision should include:
- date
- decision
- context
- consequences
- alternatives considered, when useful
Purpose: cross-repository contracts.
Update when the project depends on another repository, service, queue, database, API, worker, package, deployment, or shared schema.
Include:
- repo/service name
- local path, if known
- remote URL, if known
- ownership boundary
- contract or dependency
- live route, queue, bucket, database, or hostname, when relevant
For every non-trivial task:
- Read
AGENTS.md. - Read relevant
docs/agent/*. - Inspect the actual code/runtime before assuming.
- Make the smallest coherent change.
- Verify with the most authoritative check available.
- Update durable docs when the project state, commands, decisions, or dependencies changed.
- Commit and push, if the project workflow expects versioned completion.
- Leave a short completion note with:
- what changed
- what was verified
- what remains open
- where the durable state was updated
Prefer evidence from the real system:
- tests
- type checks
- live health endpoints
- logs
- database queries
- deployment metadata
- screenshots
- API responses
- CI runs
- user confirmation for human tasks
Do not mark work complete only because code was edited.
A new agent should be able to continue from:
- the repository files
- the manager repository, if one exists
- the issue/work-item queue
- the latest verified runtime state
If hidden chat history is required to understand the project, the flow has failed. Move the needed knowledge into durable files.
Do not commit:
- secrets
- tokens
- private keys
- raw chat transcripts
- raw uploaded files unless explicitly intended
- credentials in remotes
- unnecessary personal data
- noisy run logs
- large generated artifacts without a reason
Persist summaries, evidence, and operational facts instead.
When bootstrapping a repository, create:
AGENTS.md
docs/agent/STATE.md
docs/agent/RUNBOOK.md
docs/agent/DECISIONS.md
docs/agent/LINKED_REPOS.md
AGENTS.md belongs at the root of the repository. The durable memory files belong under docs/agent/.
# Agent Instructions
This repository uses durable agent context under `docs/agent/`.
Before making non-trivial changes, read:
- `docs/agent/STATE.md`
- `docs/agent/RUNBOOK.md`
- `docs/agent/DECISIONS.md`
- `docs/agent/LINKED_REPOS.md`
Keep those files current whenever project state, commands, decisions, or cross-repo contracts change.
Treat chat/session history as soft state. Durable recovery context belongs in this repo or its manager repo.# State
Current status: unknown.
## Active Priorities
- none recorded
## Known Issues
- none recorded
## Latest Verified Runtime Facts
- none recorded# Runbook
## Install
- not documented yet
## Test
- not documented yet
## Deploy
- not documented yet
## Verify
- not documented yet# Decisions
No durable decisions recorded yet.# Linked Repositories and Services
No linked repositories or services recorded yet.If a future agent would need to know it to continue safely, write it into the repo or the manager repo before you finish.