# Foundry & Titus: Founder & AI Executive Owner’s Manual
> **"One brain. One source of truth. One command center. Many capture sources. Many AI models."**
> **Canonical Platform Manual & Operational Reference Guide**
> **Release:** `2026.10.05-rev3` &bull; **Protocol Revision:** `rev-2026.10.05.3` &bull; **Environment:** `PREVIEW (foundry-preview-dkv.pages.dev)` &bull; **Canonical URL:** [`https://foundry-preview-dkv.pages.dev`](https://foundry-preview-dkv.pages.dev) &bull; **Source Digest:** `sha256_a24bdec3caf3609663e75c5d0b619000a9cdd32c01efe1f032c58cb83827b5aa`

---

## 1. Executive Overview & System Architecture

Foundry is the sovereign internal operating system and executive command center for Forged Integrity. It unites institutional knowledge, product boundaries, architectural decisions, and delegated AI execution under explicit, revocable Founder governance.

```
┌─────────────────────────────────────────────────────────────────────────────────┐
│                           FOUNDER: CHRISTOPHER LANE                             │
│                      (Sole Ultimate Sovereign Authority)                        │
└──────────────────────────────────────┬──────────────────────────────────────────┘
                                       │
                                       ▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│                               FOUNDRY COMMAND HUB                               │
│        /start (Public Protocols)  │  /tasks (Authenticated Delegations)         │
│        /brain (Canonical Store)   │  /review (Conflict Resolution)              │
└───────────────────────┬───────────────────────────────┬─────────────────────────┘
                        │                               │
            Public Protocols (Unauthenticated)  Authenticated Private Context
            - Constitutions & Operating Rules   - Neon PostgreSQL (198 Entities)
            - Startup / Shutdown Checklists     - Cryptographic Delegation Grants
            - DEA Risk Tiers (R0 - R4)          - Execution Receipts (cxr_*)
                        │                               │
                        ▼                               ▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│                     ANTIGRAVITY / TITUS AI EXECUTOR ENGINE                      │
│                  - PreToolUse Delegation Hook (Authorization)                   │
│                  - Bounded In-Envelope Host Tool Execution                      │
│                  - Post-Execution Receipt Capture & Reporting                   │
└─────────────────────────────────────────────────────────────────────────────────┘
```

### Core Architecture Invariants
1. **Current State is Single Source of Truth:** Institutional facts derive exclusively from cryptographically hashed evidence stored in PostgreSQL on Neon.
2. **Zero Ambient Authority:** AI models, automation daemons, and background runners possess zero ambient privileges. All mutating operations require an active, signed `DelegationGrant`.
3. **Separation of Concerns:**
   - **Public Protocol Access (`/start`, `/api/protocols`, `/manual.md`):** General operating rules, foundational constitutions, and workflow checklists available to any AI session without credentials.
   - **Authenticated Private Context (`/api/gateway/bootstrap`, `/tasks`, `/api/context/export`):** Proprietary project data, architectural decisions, conflict queues, and signed grants protected by Founder session cookies or machine tokens.
4. **Honest Receipt Accounting:** Pre-execution evaluation (`PreToolUse`) authorizes operations; post-execution recording (`cxr_*`) captures verifiable proof of completed tool operations.
5. **Finish Line (Unity FINISH Standard):** A milestone is DONE when every approved Acceptance Criterion passes. Sessions report "Criteria met: X/Y" each response, verify each criterion once, keep passed criteria closed unless an observed failure reopens them, park out-of-scope work, and stop at Y/Y with one evidence link per criterion.

---

## 2. Quick-Start Guide (Founder Operational Flow)

### Step 1: Open Foundry & Check Session
1. Navigate to the canonical deployment: [`https://foundry-preview-dkv.pages.dev`](https://foundry-preview-dkv.pages.dev).
2. Look at the top-right header:
   - If signed in: Shows **"Christopher • Founder Verified"**.
   - If signed out: Click **"Sign In as Founder"** on `/tasks` or `/start`.

### Step 2: Access Protocol Bootstrap (`/start`)
1. Click **"Start Here (AI)"** in the left sidebar or visit [`/start`](https://foundry-preview-dkv.pages.dev/start).
2. Review the **Session Startup Protocol** and **Constitutions**.
3. Click **"Copy AI Bootstrap Prompt"** to copy a deterministic, sanitized context package ready for any AI session.

### Step 3: Stage and Authorize a Task (`/tasks`)
1. Visit [`/tasks`](https://foundry-preview-dkv.pages.dev/tasks).
2. Enter the **Task Title** (e.g. `tmp/foundry-handoff-test.txt`).
3. Set the bounded operational envelope:
   - **Allowed Actions:** `write_to_file`, `replace_file_content`, `run_command`, `view_file`.
   - **Allowed Target Paths:** `tmp/`, `scratch/`, `docs/`, `lib/`.
   - **Execution Budget:** e.g. `10` max executions.
4. Click **"Authorize Task Delegation"**. Foundry generates a cryptographically signed Ed25519 grant (`del_grant_*`).

### Step 4: Dispatch to Antigravity
1. Copy the generated **Start in Antigravity** instruction:
   ```text
   Execute assigned Foundry task "tmp/foundry-handoff-test.txt" under bounded delegation del_grant_1791185935030_v8oc. Retrieve assigned scope and governance rules via /api/gateway/bootstrap, execute in-envelope tool calls, and record receipts back to Foundry.
   ```
2. Paste this single instruction into your Antigravity pairing session.

### Step 5: Verify Live Execution & Close Grant
1. Return to [`/tasks`](https://foundry-preview-dkv.pages.dev/tasks) and click **"Refresh State"**.
2. The UI displays:
   - **Last Refreshed Timestamp**
   - **Grant Status:** `COMPLETED` (e.g. `2/10` executions consumed)
   - **Receipts Table:** Exact `SUCCESS` execution receipts with timestamps, operations, and parameters.
3. If finished, click **"Complete Grant"** to close the delegation grant.

### Step 6: Review & Save Session (Canonical State Persistence)
1. In the Command Composer ([`/`](https://foundry-preview-dkv.pages.dev/)), click **"Review & Save Session"**.
2. Inspect the exact proposed changes in the review modal:
   - **Builder Journal entry:** Summarizing session achievements, decisions, and anomalies.
   - **Current State progression:** Advancing operational state and version lock.
   - **Optional EAP progress:** Updated only when explicitly included in the approved package.
3. Verify the server-issued HMAC signature badge (**"Founder Verified: Christopher Lane"**).
4. Click **"Approve & Save Session"**.
5. The server enforces Founder authentication, HMAC draft verification, and commits the records atomically to Neon PostgreSQL in a single CTE transaction.
6. A fresh conversation session immediately retrieves the persisted Builder Journal and Current State updates via normal AI providers.

---

## 3. Deep-Dive: The `/start` Protocol Bootstrap

The `/start` center provides the deterministic starting point for AI pairing sessions, onboarding, and protocol enforcement.

### Verbatim Imported Constitutions vs Operational Guidance
Foundry preserves the exact imported text from Titus consolidation while providing operational execution steps:

| Protocol / Constitution | Verbatim Imported Canonical Text | Foundry Operational Runtime Guidance |
| :--- | :--- | :--- |
| **Mission & Vision** (`ent_gov_mission` • `evi_titus_2df6720945462b58`) | **Mission:** *"Give every Forged Integrity organization and project a durable, AI-native home — so starting or resuming work never requires reconstructing context from scratch."*<br>**Vision:** *"Titus becomes Forged Integrity's executive operating system: a universal platform with personal workspaces where current state, decisions, knowledge, execution, and handoffs live together."*<br>**Purpose:** *"Replace scattered docs, stale prompts, and tribal knowledge with one deterministic, local-first system that any AI — or any person — can pick up instantly."* | Canonical knowledge store in PostgreSQL on Neon with SHA-256 evidence integrity. |
| **Engineering Constitution** (`ent_gov_engineering` • `evi_titus_7e4b49bfb34e75d9`) | 1. Current State is the single source of truth. Never duplicate project identity, version, milestone, specification, current task, or next task anywhere else.<br>2. Every workspace is isolated. No project's data leaks into another's Knowledge Engine.<br>3. All persistence is local until a backend milestone explicitly says otherwise.<br>4. Every architectural decision gets logged in the Decision Log with a rationale — not just the what, but the why.<br>5. Specifications precede implementation for anything non-trivial.<br>6. The Builder Journal is a running log, not a changelog — write it in the moment, not after the fact.<br>7. AI context packages are deterministic. No hidden state, no AI API calls to generate them.<br>8. Ship the smallest working version of a milestone, then iterate. | Evaluated dynamically during build, test, and migration procedures. |
| **Ethics & Principles Constitution** (`ent_gov_ethics` • `evi_titus_467af376bdd315fb`) | 1. Titus never sends data anywhere without an explicit, visible action from the user.<br>2. Every AI-facing artifact (context packages, recommendations) is generated deterministically — no hidden model calls, no invented data.<br>3. The user owns their data. Reset and export are always available, never obscured.<br>4. Titus recommends; it does not decide. Recommendations and readiness checks inform a human — they don't act unsupervised.<br>5. Placeholders are labeled honestly as placeholders, never presented as working features.<br>6. Every workspace is treated as independent and equally important, regardless of its size or stage. | Enforced by DEA policy rules and Founder signing gates. |
| **Startup Protocol** (`ent_gov_startup_protocol` • `evi_titus_112a0d0b0d2d5a64`) | 1. Load Workspace<br>2. Read Current State<br>3. Read Builder Journal<br>4. Read Decisions<br>5. Read Active EAP<br>6. Generate AI Context | Query `/api/gateway/bootstrap`, verify risk ceilings, and load active delegation. Assemble operational envelope and verify proposed tool calls remain within the granted risk ceiling. |
| **Shutdown Protocol** (`ent_gov_shutdown_protocol` • `evi_titus_1a66d2860d05e80d`) | 1. Update Builder Journal<br>2. Update Decisions<br>3. Update Current State<br>4. Update EAP<br>5. Generate Context Package | Confirm execution receipts posted to `/api/connectors/receipts`, close grant via `/api/delegations/{id}/complete` (or draft proposed updates if uncredentialed). |

---

## 4. Access Paths, Authority Triad & Sandbox Boundaries

### Access Paths and Authority Triad
Foundry establishes a strict 3-tier separation between protocol discovery, private context inspection, and tool execution:

1. **Public Protocol Reading (`/start`, `/api/protocols`, `/manual.md`):**
   - **Credentials:** None required (Zero authentication).
   - **Scope:** Public constitutions, operating rules, DEA tier definitions, startup/shutdown checklists.
   - **Authority:** Grants **ZERO** execution authority.
2. **Scoped Private Reading & Exports (`/api/gateway/bootstrap`, `/tasks`, `/api/context/export`):**
   - **Credentials:** Founder authentication required (Founder session cookie or `Authorization: Bearer <FOUNDRY_AGENT_SECRET>`).
   - **Scope:** Proprietary institutional memory, active tasks, uncommitted decisions, builder journal entries, and private context export packages.
   - **Authority:** Read-only access. Exporting private context requires an explicit Founder action. Absence of credentials in an exported context package does not make private facts safe to publish anonymously.
3. **Bounded Tool Execution (`del_grant_*`):**
   - **Credentials:** Cryptographically signed Ed25519 Delegation Grant.
   - **Scope:** Bounded action envelope (`write_to_file`, `replace_file_content`, `run_command`), target paths (`docs/`, `lib/`), risk ceiling (`R2_INTERNAL_GOVERNED`), and max execution budget.
   - **Authority:** Full execution within envelope. Inside this envelope, routine operations proceed autonomously without repeat approval requests.

### Task Authorization vs Host Sandbox Approval
Task authorization and host sandbox confirmation are separate, independent boundaries:
- **Institutional Task Authorization (Foundry / DEA / Ed25519 Delegation):** Governs whether the agent has legitimate authority from the Founder to perform actions on behalf of the project.
- **Host Sandbox Boundary (IDE / OS Terminal Sandbox):** Governs whether the local host operating system or IDE environment permits external execution or unsandboxed network operations (`BypassSandbox: true`).
- **Non-Substitutability Rules:**
  1. **A host dialog does NOT supply missing Founder authority:** Clicking "Allow" on an IDE or terminal popup does not issue a delegation grant or authorize an uncredentialed action.
  2. **A valid delegation does NOT eliminate every host prompt:** A valid Ed25519 grant authorizes the agent at the institutional/DEA layer, but host-enforced OS or IDE sandboxes (e.g. running external binaries or outbound network commands) will still prompt locally if the host environment requires it.

### Shared Missing Context Checklist
When an AI session operates without authenticated gateway access, it must request the core checklist from the Founder (or import an explicit Founder-exported context package via `/api/context/export?project=foundry`):

#### Core Context Items (Shared Across All Clients)
1. Project / workspace root path and repository in scope.
2. Current State: active milestone, current task, blockers.
3. Recent Builder Journal entries for preceding session context.
4. Decision Log / ADRs that bind the requested task.
5. Active EAP: phase goal, execution steps, acceptance criteria.
6. Unresolved conflicts / Review Queue items.
7. Concurrent-work awareness: identify other active agents or sessions operating in the same repository or target paths before making changes; if concurrent state is unknown, report that uncertainty explicitly rather than assuming sole ownership or inventing a claims registry.
8. Signed Delegation Grant (`del_grant_*`) if mutating operations are requested.
9. Authorized tool action envelope and target file paths.
10. Maximum execution budget and lease duration.
11. Escalation criteria and Founder contact channel.

#### Optional Client-Specific Additions
- **Antigravity Sessions:**
  - Local PreToolUse bridge path (`scripts/dea-pretool-bridge.cjs`) and public verification key.
  - Agent secret (`FOUNDRY_AGENT_SECRET`) for authoritative server verification and receipt reporting.
- **Ordinary AI Chats (Web / Claude / ChatGPT):**
  - Sanitized Founder context package exported via `/api/context/export?project=foundry`.
  - Explicit confirmation that draft journal/receipt outputs remain proposals until reviewed and applied by Founder.
- **Claude Code CLI:**
  - Scoped read-only gateway token (`PROPOSED / UNVERIFIED`).
  - Configured tool execution hooks in `settings.json`.

---

## 5. Deep-Dive: The `/tasks` Workbench & Agent-Directed Receipt Reporting

### The Bounded Execution Lifecycle

```
[ Founder in UI ] ──(1. Authorize Task)──► [ Delegation Grant (Ed25519) ]
                                                        │
                                                        ▼
[ Antigravity Session ] ◄──(2. Paste Prompt)── [ Copyable Instruction ]
         │
         ├──(3. Query Bootstrap)──► /api/gateway/bootstrap?grantId={id}
         │
         ├──(4. PreToolUse Check)──► Titus DEA Hook (Authorizes In-Envelope Action)
         │
         ├──(5. Actual Host Execution)──► Tool executes (e.g. write_to_file)
         │
         └──(6. Post-Execution Report)──► POST /api/connectors/receipts (cxr_*)
                                                        │
                                                        ▼
[ Founder in UI ] ◄──(7. Refresh State)──── [ PostgreSQL Receipts Read-Back ]
```

### Honest Receipt Accounting & Client Substrate Realities
1. **PreToolUse Hook (Authorization Gate):**
   - **Antigravity-Specific:** Intercepts proposed tool calls *before* execution on the local host via `scripts/dea-pretool-bridge.cjs`.
   - Validates that the requested tool (`write_to_file`, `view_file`, etc.) and target path match the active delegation grant.
   - Returns allow or deny. **Authorization is not an execution receipt.**
2. **Ordinary AI Chats (Behavioral Guidance Only):**
   - Ordinary AI chats do *not* have local PreToolUse hook interception or automated receipt posting.
   - They follow instructions behaviorally and prepare proposed updates, draft ADRs, and drafted receipts as unpersisted markdown text for Founder review.
3. **Post-Execution Receipt Capture (Proof of Work):**
   - Once the tool call successfully completes on the host, an execution receipt payload is constructed with:
     - `executionId` (`cxr_*`)
     - `connectorId` (`antigravity_bridge`)
     - `operation` (`write_to_file`, `view_file`, `run_command`, etc.)
     - `status` (`SUCCESS` or `FAILED`)
     - `parameters` (e.g. target path, line counts)
     - `completedAt` timestamp
   - The receipt is submitted via `POST /api/connectors/receipts` and persisted durably in Neon PostgreSQL.
4. **Agent-Directed Reporting Step:**
   - In standard agent sessions, the agent or client bridge explicitly executes the receipt recording call upon tool completion.
   - If an agent completes a tool call but fails to call `/api/connectors/receipts`, no receipt will appear in Foundry.

---

## 6. Executive Hierarchy & Authoritative DEA Action/Risk Matrix

### Executive Hierarchy (3 Tiers • 4 Bounded Domain Executives)
1. **Tier 0 (Sovereign Authority):** Founder — Christopher Lane (`founder_christopher_lane`) — Ultimate sovereign authority across all systems.
2. **Tier 1 (Enterprise Executive):** Titus (`exec_titus`) — Internal executive overseeing operations, strategy, cross-product governance, and engineering (never customer-facing).
3. **Tier 2 (Bounded Domain Executives):** 4 Domain Executives strictly bound to their respective systems and allowed domains:
   - **Samson** (`exec_samson`): Forged Genesis (Performance, Longevity, Protocols).
   - **Joseph** (`exec_joseph`): Forged Ledger (Personal Finance, Stewardship).
   - **The Quill** (`exec_the_quill`): Quill & Anvil (Manuscripts, Creative Authoring).
   - **The Craftsman** (`exec_craftsman`): The Forged Craftsman (Digital Fabrication, CNC, Toolpaths).

### Authoritative DEA Action & Risk Matrix

| Risk Tier | Risk Class Name | Governing Scope | Representative Operations & Tools | Policy Rule & Execution Behavior |
| :--- | :--- | :--- | :--- | :--- |
| **R0** | `R0_READ` | Read-Only Discovery & Verification | `view_file`, `read_url_content`, `search_web`, `git status`, `git diff`, `git log`, `ls`, `grep`, `npm test`, `vitest`, `npm run typecheck`, `tsc`, `node -e` | **Public / Ambient:** Zero mutation. Executed autonomously without prompts or signatures (`requiresSignature: false`). |
| **R1** | `R1_INTERNAL_REVERSIBLE` | Scoped Workspace Edits & Local Staging | `write_to_file`, `replace_file_content` (targeting bounded workspace paths), local draft staging, review queue staging | **Bounded Workspace Scope:** Requires no cryptographic signature (`requiresSignature: false`), BUT is **not** broadly authorized by default. Under Zero Ambient Authority, local edits still strictly require an active in-scope delegation envelope (`allowedActions` & `allowedTargets`). |
| **R2** | `R2_INTERNAL_GOVERNED` | Governed Engineering Execution & Local Pipelines | `create_feature_branch`, `npm run build`, `npx @cloudflare/next-on-pages`, multi-file compilation pipelines | **Requires Signed Delegation (`requiresSignature: true`):** Covered by Founder's grant signature at setup. Routine in-scope builds and pipelines proceed without per-action confirmations. |
| **R3** | `R3_EXTERNAL_MUTATION` | External Service Mutation & Remote Publishing | `git push` to remote/origin, `wrangler pages deploy`, `vercel deploy`, external SaaS mutations | **Explicit Publishing Scope (`requiresSignature: true`):** Requires explicit inclusion of `deploy` or `push` in the signed delegation envelope; escalates to Founder confirmation if omitted. Secret rotation is a Founder-reserved restricted action. |
| **R4** | `R4_HIGH_IMPACT` | Destructive Infrastructure Guard | `drop database`, `production_db_drop`, `rm -rf /`, `git push --force`, deleting remote branches, production DNS changes, destructive credential deletion | **Strictly Prohibited (`requiresSignature: true`):** Banned from autonomous/unattended execution. Denied by standing DEA policy. |

---

## 7. Delegated Execution Authority (DEA) & Approval Fatigue Resolution

### How Approval Fatigue Was Solved
In prior workflows, executing a single bounded task often triggered multiple repetitive confirmation dialogs. We resolved this by aligning the full execution envelope with Titus DEA governance and host sandbox security rules:

1. **One Founder Authorization:**
   - The Founder authorizes a task once on `/tasks`, defining the allowed actions (e.g. `write_to_file`, `run_command`), target folders (e.g. `docs/`, `lib/`), risk ceiling (`R2_INTERNAL_GOVERNED`), and execution budget.
2. **Routine In-Scope Operations Proceed Autonomously:**
   - The Antigravity `PreToolUse` hook (`scripts/dea-pretool-bridge.cjs`) validates that each tool call matches the active signed grant.
   - **R0 Operations (Read/Discover):** `view_file`, `git status`, `git diff`, `npm test`, search $\rightarrow$ Auto-allowed under R0 policy.
   - **R1 Operations (Code/File Edits):** In-envelope edits to specified targets $\rightarrow$ Auto-allowed under active delegation.
   - **R2 Operations (Pipelines/Builds):** Local builds (`npm run build`), typechecks, and tests $\rightarrow$ Auto-allowed under active delegation.
3. **Escalation Only for Genuinely Out-of-Scope or Prohibited Actions:**
   - Tool calls outside the active grant's action or target envelope return `ask` to prompt the Founder.
   - Destructive actions (R4, e.g. `rm -rf /`, `git push --force`) are strictly denied (`deny`).
4. **Host-Enforced Security Boundaries:**
   - **Standard Sandbox Mode (`BypassSandbox: false`):** Runs fully autonomously inside the workspace without prompts.
   - **Bypass Sandbox Mode (`BypassSandbox: true`):** Required by Antigravity OS sandbox rules only when a command accesses the outbound network (e.g. `git push`, Cloudflare `wrangler pages deploy`). The host UI displays an owner-controlled approval dialog. This is a secure host boundary, not a Titus hook defect.

### Measured Approval Accounting (Empirical Run: `del_grant_1791185935030_v8oc`)
Approval counts are conditional upon the specific tool/network action and grant envelope. In verified test run `del_grant_1791185935030_v8oc` (2/10 execution budget used):

| Step in Lifecycle | Tool Call / Operation | Governing Layer | Approval Required? | Rationale |
| :--- | :--- | :--- | :--- | :--- |
| **1. Task Creation** | Founder signs grant in UI | Foundry Server | **1 Human Click** | Sovereign Founder initiates and bounds authority. |
| **2. Context Retrieval** | `view_file`, `git status` | Titus DEA (R0) | **0 Prompts** | Read-only discovery is permitted autonomously. |
| **3. Code/Doc Modification**| `replace_file_content` | Titus DEA (R1) | **0 Prompts** | Target path is inside authorized grant envelope. |
| **4. Local Build & Test** | `npm run build`, `vitest` | Titus DEA (R2) / Host Sandbox | **0 Prompts** | Sandboxed local build permitted within budget. |
| **5. Audit Receipts** | `POST /api/connectors/receipts`| Titus / Foundry | **0 Prompts** | Telemetry logging permitted autonomously. |
| **6. Remote Deployment** | `wrangler pages deploy` (network) | Antigravity Host Sandbox | **Conditional Host Prompt** | Required only when outbound network access bypasses sandbox (`BypassSandbox: true`). |
| **7. Task Completion** | Single final summary | Antigravity / Founder | **0 Prompts** | Report delivered directly to Founder. |

---

## 8. Authorized Session Saving & Canonical State Persistence

Foundry implements an authorized session-saving workflow directly inside the Command Composer ([`/`](https://foundry-preview-dkv.pages.dev/)), enabling Founder Christopher Lane to review, verify, and commit session updates without manual transcript transfer or terminal scripts.

### End-to-End Workflow
1. **Draft Generation (`POST /api/session/draft`):**
   - Click **"Review & Save Session"** in the Command Composer.
   - Foundry analyzes the conversation and synthesizes a candidate session-close package containing:
     - New Builder Journal entry (`ent_asset_journal_*`)
     - Proposed Current State progression (`ent_asset_current-state-*`)
     - Optional EAP updates (included only when explicitly requested)
   - The server computes an HMAC-SHA256 signature binding the draft package ID to its canonical content digest.
2. **Review & Visual Diff Modal:**
   - The interactive modal displays complete diffs of proposed changes before any record is written.
   - The badge **"Founder Verified: Christopher Lane"** confirms active Founder authentication.
3. **Founder Approval & Atomic Persistence (`POST /api/session/save`):**
   - Click **"Approve & Save Session"**.
   - The server validates:
     - Active Founder session role (`FOUNDER`).
     - Server-issued HMAC draft signature match (rejects altered content even if client recalculated the digest).
     - Optimistic concurrency version lock.
   - Records are committed atomically to Neon PostgreSQL (`entities` table) in a single Common Table Expression (CTE) query with zero-row rollback on concurrency conflict.
4. **Fresh Conversation Retrieval:**
   - Saved records are immediately discoverable by fresh conversations via the normal AI provider streaming pipeline (`POST /api/command/stream`).

### Core Invariants & Boundaries
- **Zero Ambient Authority:** Drafting and reviewing never mutate operational records until explicit Founder approval.
- **Cryptographic Draft Binding:** Approval is cryptographically bound to the server-issued draft signature; altered payloads with recalculated client digests are strictly rejected.
- **Preserved Snapshot Freshness:** Stored metrics retain `datedSnapshot.asOf` verbatim; saving a session is not a fresh measurement.
- **Conditional EAP Updates:** EAP steps are updated only when explicitly included in the approved package; saves never silently mutate unrelated milestones.
- **No In-Composer Decision Staging:** Composer conversations do not stage or adopt architectural decisions; `/review` does not support decision staging.

---

## 9. Known System Limitations & Boundaries

1. **No Ambient Auto-Launch:** Antigravity does not possess an ambient external dispatch daemon for unprompted session creation. Christopher initiates the pairing session and pastes the one bootstrap instruction.
2. **Cloudflare Edge Neon Connectivity:** In Cloudflare Pages Worker runtime, database queries execute over HTTPS fetch (`neonConfig.poolQueryViaFetch = true`) to avoid edge WebSocket origin DNS lookup issues.
3. **Receipt Submission Timing:** Receipts reflect completed operations reported to `/api/connectors/receipts`. If an agent terminates unexpectedly mid-task, unsubmitted receipts will not appear in the workbench.

---

## 10. Troubleshooting & Operational Runbook

| Symptom | Cause | Resolution |
| :--- | :--- | :--- |
| **"Unauthorized: Missing Founder authorization credentials"** | Founder session cookie expired or unauthenticated request to `/api/delegations`. | Click **"Sign In as Founder"** on `/tasks` or `/start` and sign in. |
| **"Refresh State shows no change"** | Receipts query filtered by connector ID or database connection latency. | Confirm task execution completed and click **"Refresh State"**. The live timestamp updates immediately. |
| **"Action outside delegated scope"** | Tool or target path is not listed in the active delegation grant. | Stage a new grant on `/tasks` with the required action (`run_command`, `write_to_file`) and target folder. |
| **"Single-use setup token invalid or expired"** | Token was already consumed or has expired (24h lease). | Generate a fresh setup token locally via `node scripts/generate-setup-token.mjs`. |
| **"401 on /api/gateway/bootstrap"** | Anonymous caller attempted to access private project context. | Provide `Authorization: Bearer <FOUNDRY_AGENT_SECRET>` in request headers or sign in as Founder. |

---

*Foundry & Titus Platform Owner’s Manual &bull; Forged Integrity &bull; Release: 2026.10.05-rev3 &bull; Protocol Revision: rev-2026.10.05.3 &bull; Source Digest: sha256_a24bdec3caf3609663e75c5d0b619000a9cdd32c01efe1f032c58cb83827b5aa &bull; Environment: PREVIEW (foundry-preview-dkv.pages.dev)*
