# Handling Text (Design) and Code (Runtime) in FPF
This guide defines the standard for maintaining the **Strict Distinction (A.7)** and **Traceability (A.10)** between text-based specifications (`U.Episteme`) and executable code (`U.System`).
## 1. The Core Principle: Twin-Twin Binding
In FPF, code does not exist in a vacuum. It is the **enactment** of a design.
* **Text (Design):** The *Authority*. It defines "What" and "Why". (Lives in `design/`)
* **Code (Runtime):** The *Enactor*. It performs the "How". (Lives in `src/`)
## 2. Structural Alignment
Every Bounded Context has a mirrored structure:
```
contexts/MyContext/
├── design/ # The Spec (Text)
│ ├── roles/ # Role Definitions
│ └── methods/ # Method Descriptions (Recipes)
└── src/ # The Code (Implementation)
└── my_component.ts # The System bearing the Role
```
## 3. The "Glue": Traceability Tags
We use JSDoc/Docstrings to strictly bind Code to Design. This makes the codebase self-indexing against the spec.
### Format
```typescript
/**
* @holon <Context>.<ComponentName>
* @role <RoleName>:<Context>
* @implements <ArtifactID> (from Design)
*/
```
### Example
**1. The Design (Text)**
*File: `contexts/SkillRuntime/design/methods/agent_loop.md`*
> **MethodDescription: AgentLoop_v1**
> * **Objective:** Cycle through Observation, Thought, and Action.
> * **Required Role:** `TransformerRole`
**2. The Code (Implementation)**
*File: `contexts/SkillRuntime/src/AgentLoop.ts`*
```typescript
/**
* The main runtime loop for the agent.
*
* @holon SkillRuntime.MainLoop
* @role TransformerRole:SkillRuntime
* @implements MethodDescription:AgentLoop_v1
*/
export class AgentLoop {
// ...
}
```
## 4. The Change Workflow (A.4)
1. **Design First:** Edit the Markdown spec in `design/`.
2. **Rationale:** If it's a major change, record a **DRR** in `governance/drr/`.
3. **Implement:** Update the Code in `src/` to match the new Design.
4. **Verify:** Update tests in `tests/` to assert the Design's invariants.