We use a simple rule for agent work:
**R = (W × C) ÷ T**
Where:
- **R** = trusted progress
- **W** = clear win condition
- **C** = focused continuity
- **T** = turbulence
T is not time.
T is confusion, drift, context switching, mixed objectives, weak validation, and hidden failure modes.
---
# Self-Contained Execution Doctrine Template
Use this file to give an AI agent, server, workspace, or execution lane a **clear role, scope, rules, and reporting standard**.
This is not a task list. It is an **operating doctrine**.
A good doctrine file answers four questions up front:
1. **What is this environment for?**
2. **What belongs here?**
3. **What does not belong here?**
4. **What proof counts as real progress?**
When each environment has its own doctrine file, agents stop guessing. They execute with clearer boundaries, produce stronger evidence, and create less cross-system confusion.
---
## What this template does
This template helps you create a self-contained knowledge file for any:
- server
- agent
- repo lane
- service plane
- runtime environment
- operations environment
- specialist execution role
It reduces:
- vague prompts
- cross-domain confusion
- mixed objectives
- false progress
- missing validation
- weak handoffs
- unstructured reporting
It increases:
- role clarity
- scope discipline
- proof-based execution
- recoverability
- cleaner delegation
- better agent consistency over time
---
## How to use this template
1. Duplicate this file.
2. Replace every placeholder in brackets.
3. Keep the file **self-contained** so the agent does not need to infer context from other docs.
4. Store it in your agent knowledge path, such as:
- `agents/knowledge/[target_slug]_execution_doctrine.md`
5. At the top of a task prompt, tell the agent to read it first.
6. Use a separate doctrine file for each major environment or role.
7. Keep live prompts task-specific; keep this file role-specific.
Recommended split:
- **Doctrine file** = how the agent should think and operate
- **Task prompt** = what the agent should do right now
- **Handoff note** = what changed and what remains
---
## Minimal prompt header
```text
Read first:
- agents/knowledge/[target_slug]_execution_doctrine.md
Apply it as operating doctrine for planning, edits, validation, and reporting in this thread.
```
---
# [TARGET NAME] Execution Doctrine
**Target:** [TARGET_NAME]
**Type:** [Server | Agent | Workspace | Service Plane | Runtime Lane | Ops Lane]
**Slug:** [target_slug]
## Purpose
This document defines how an agent should think and execute when working on **[TARGET_NAME]**.
[Describe the environment in one tight paragraph. Explain what this environment exists to do, why it matters, and what kind of truth or value it is responsible for establishing.]
Example:
- runtime truth
- operational truth
- deployment safety
- data quality truth
- customer support resolution
- research synthesis quality
- security triage clarity
---
## Background Knowledge
[Explain where this target sits inside the wider system, stack, team, or workflow.]
### [TARGET_NAME]'s role in the wider system
[Describe the main role of this target in plain language.]
This target is typically used for work such as:
- [work type 1]
- [work type 2]
- [work type 3]
- [work type 4]
- [work type 5]
This target commonly hosts or touches work related to:
- [repo / service / subsystem 1]
- [repo / service / subsystem 2]
- [repo / service / subsystem 3]
- [repo / service / subsystem 4]
- [repo / service / subsystem 5]
### What [TARGET_NAME] is **not**
[State clearly what this environment should not become.]
This target is not the preferred place for:
- [out-of-scope category 1]
- [out-of-scope category 2]
- [out-of-scope category 3]
- [out-of-scope category 4]
- [out-of-scope category 5]
If a task is mainly about the out-of-scope categories above, it should be redirected to **[OTHER_TARGET_OR_OWNER]**.
---
## Core Execution Law
Use this as an execution doctrine, not literal mathematics:
**R = (W × C) ÷ T**
Interpretation:
- **R** = trusted progress
- **W** = clearly defined win condition
- **C** = protected continuity on one lane
- **T** = turbulence
Do **not** interpret `T` as clock time.
On **[TARGET_NAME]**, `T` means:
- context switching
- ambiguity
- drift
- mixed objectives
- missing validation
- hidden failure modes
- premature edits
- unclear ownership
- weak recovery paths
A stronger generic form is:
**Trusted Progress ≈ (Scope Clarity × Focus Depth × Evidence Quality × Recoverability) ÷ (1 Context Switching Ambiguity Drift Hidden Failure Risk)**
Adapt those terms to the reality of this target.
---
## Operating Model
### What "good work" looks like on [TARGET_NAME]
Good work on **[TARGET_NAME]** is:
- narrow
- falsifiable
- role-aligned
- evidence-backed
- easy to review
- easy to hand off
Examples:
- [good example 1]
- [good example 2]
- [good example 3]
- [good example 4]
- [good example 5]
### What "bad work" looks like on [TARGET_NAME]
Bad work on **[TARGET_NAME]** creates confusion, weakens evidence, or mixes unrelated lanes.
Examples:
- [bad example 1]
- [bad example 2]
- [bad example 3]
- [bad example 4]
- [bad example 5]
---
## Boundary Rules
1. Work one clear lane at a time.
2. Define the proof artifact before making changes.
3. Prefer the fastest falsifiable loop.
4. Do not mix unrelated domains in one slice unless the dependency is explicit and unavoidable.
5. Treat ambiguity, stale state, and hidden fallbacks as first-class blockers.
6. If the validation path is unclear, reduce ambiguity before editing.
7. A slice is incomplete if it ends without a hard artifact.
Add role-specific rules below:
- [custom rule 1]
- [custom rule 2]
- [custom rule 3]
---
## What Counts as a Hard Artifact on [TARGET_NAME]
Acceptable end-of-slice artifacts include:
- [validated diff]
- [green test]
- [healthcheck]
- [log proof]
- [benchmark delta]
- [receipt / trace / audit proof]
- [rollback note]
- [explicit blocker with evidence]
Keep this list specific to the target.
---
## Default Slice Shape
Use this default shape unless the task explicitly requires something else:
- **Timebox:** [e.g. 30 minutes]
- **Scope:** [one lane / one service / one boundary / one decision]
- **Objective:** [one measurable outcome]
- **Artifact:** [one proof object]
- **Next step:** [one narrow follow-up]
---
## Task Framing Standard
Before changing anything, define:
### Win condition
[What exact truth, result, or state is being established?]
### Lane touched
[Which service, function, file, process, subsystem, boundary, route, or workflow is in scope?]
### Validation artifact
[What exact output will prove success or failure?]
### Residual risk
[What still remains uncertain after this slice?]
### Rollback or recovery note
[How is the change reversed or contained if needed?]
If those are not clear, the task is still too broad.
---
## What Belongs on [TARGET_NAME]
This target is the correct home when the center of gravity is:
- [belongs category 1]
- [belongs category 2]
- [belongs category 3]
- [belongs category 4]
- [belongs category 5]
---
## What Does Not Belong on [TARGET_NAME]
Unless directly required by a dependency hosted here, avoid turning **[TARGET_NAME]** into the main lane for:
- [does not belong 1]
- [does not belong 2]
- [does not belong 3]
- [does not belong 4]
- [does not belong 5]
That work should usually be redirected to **[OTHER_TARGET_OR_OWNER]**.
---
## Required Reporting Format
When reporting back from **[TARGET_NAME]**, always use:
### What changed
[Specific change made.]
### Lane touched
[Exact file, service, function, route, process, or subsystem touched.]
### Validation
[The proof artifact produced.]
### Rollback or recovery note
[How to reverse, contain, or safely continue.]
### Residual risk
[What remains uncertain or unverified.]
### Next narrow slice
[The next smallest meaningful step.]
---
## Summary Doctrine
**[TARGET_NAME]** exists to establish **[core truth or value]**.
The governing rule is:
- narrow the lane
- protect the focus
- reduce turbulence
- force proof
- preserve recoverability
- never confuse motion with validated progress
---
## Quick Fill-In Checklist
Before publishing this file, confirm that you have defined:
- the target's identity
- its role in the wider system
- what belongs there
- what does not belong there
- the meaning of progress for that target
- what counts as turbulence
- what counts as a hard artifact
- the reporting format
- the recovery or rollback expectation
If any of those are missing, the doctrine is still incomplete.
---
## Why this approach works
AI agents fail less when the operating lane is explicit.
Most prompting problems are not model problems. They are **boundary problems**.
When you give an agent a self-contained doctrine file, you reduce:
- scope bleed
- fake progress
- repeated clarification loops
- fragile handoffs
- tool misuse
- multi-system confusion
In short:
**better doctrine -> better execution -> better artifacts**
#BuildingTheFuture #AIagents #QuantumComputing
#soulhash