import{_ as i,o as a,c as n,ag as t}from"./chunks/framework.CmQHR1bQ.js";const d=JSON.parse('{"title":"Agile+ Workstream Guide: Venture Platform","description":"","frontmatter":{},"headers":[],"relativePath":"guides/AGILE_WORKSTREAM.md","filePath":"guides/AGILE_WORKSTREAM.md"}'),l={name:"guides/AGILE_WORKSTREAM.md"};function e(p,s,h,k,r,F){return a(),n("div",null,[...s[0]||(s[0]=[t(`<h1 id="agile-workstream-guide-venture-platform" tabindex="-1">Agile+ Workstream Guide: Venture Platform <a class="header-anchor" href="#agile-workstream-guide-venture-platform" aria-label="Permalink to &quot;Agile+ Workstream Guide: Venture Platform&quot;">​</a></h1><p><strong>Date:</strong> 2026-02-21 <strong>Status:</strong> ACTIVE <strong>Purpose:</strong> Define sprint structure, ceremonies, and coordination model for Venture MVP delivery</p><hr><h2 id="overview" tabindex="-1">Overview <a class="header-anchor" href="#overview" aria-label="Permalink to &quot;Overview&quot;">​</a></h2><p>The Venture platform is delivered as a series of 2-week <strong>sprints</strong>, each aligned to a milestone phase (M0–M6). Each sprint:</p><ul><li>Has a clear entry condition (prior phase complete)</li><li>Runs 3 parallel L3 copilot agents</li><li>Produces shippable artifacts (code + tests passing)</li><li>Has explicit exit criteria (all tests ≥80% coverage, zero suppressions)</li><li>Results in a merged worktree on main branch</li></ul><p><strong>Total Timeline:</strong> 12–14 weeks (6–7 sprints) to full v1 MVP</p><hr><h2 id="sprint-structure" tabindex="-1">Sprint Structure <a class="header-anchor" href="#sprint-structure" aria-label="Permalink to &quot;Sprint Structure&quot;">​</a></h2><h3 id="sprint-0-m0-foundation-week-1–2" tabindex="-1">Sprint 0: M0 Foundation (Week 1–2) <a class="header-anchor" href="#sprint-0-m0-foundation-week-1–2" aria-label="Permalink to &quot;Sprint 0: M0 Foundation (Week 1–2)&quot;">​</a></h3><p><strong>Entry Condition:</strong> Project initialized; all specs finalized</p><p><strong>Theme:</strong> Stand up all infrastructure; establish baseline data persistence and event governance</p><p><strong>Stories:</strong></p><ul><li><code>FR-INFRA-001</code>: PostgreSQL schema + Alembic migrations</li><li><code>FR-INFRA-002</code>: NATS JetStream streams (events + tasks)</li><li><code>FR-INFRA-003</code>: Redis cache + rate limiter</li><li><code>FR-INFRA-004</code>: process-compose manifest with health checks</li><li><code>FR-INFRA-005</code>: Schema registry + EventEnvelopeV1 validation</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong></p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># sprint-m0-dispatch.sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">set</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -e</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPO_PATH</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/Users/kooshapari/temp-PRODVERCEL/485/kush/parpour&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">WTV</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;venture-wt-m0-foundation&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Create worktree if not exists</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Dispatch 3 parallel agents</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 1: PostgreSQL + migrations</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-INFRA-001 — Initialize PostgreSQL schema via Alembic</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_db_migrations.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify artifact_ir, ledger, audit_log, policy_bundles tables exist</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify all required columns present</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify migrations run idempotently</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: alembic/versions/ and src/infra/db.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_db_migrations.py -v</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run alembic upgrade head</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run alembic downgrade base</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run alembic upgrade head</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass linting:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run ruff check src/infra/db.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit message: &quot;feat(infra): FR-INFRA-001 PostgreSQL schema via Alembic&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 2: NATS JetStream setup</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-INFRA-002 — Stand up NATS JetStream streams</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_nats_streams.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify events.* stream created with replication 3</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify tasks.* stream created with replication 3</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify durable subscriptions persist</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Verify pub-sub round-trip works</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/infra/nats_setup.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_nats_streams.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass linting:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run ruff check src/infra/nats_setup.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit message: &quot;feat(infra): FR-INFRA-002 NATS JetStream setup&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 3: Schema registry + EventEnvelopeV1 validation</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-INFRA-003 + FR-INFRA-005 — Schema registry and EventEnvelopeV1</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_schema_registry.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test EventEnvelopeV1 accepts valid events</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test EventEnvelopeV1 rejects malformed events</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test schema versioning works</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test schema caching works</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/infra/schema_registry.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Also: src/infra/redis.py for cache (uses Redis from local setup)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_schema_registry.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass linting:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run ruff check src/infra/schema_registry.py src/infra/redis.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit message: &quot;feat(infra): FR-INFRA-003 FR-INFRA-005 Schema registry and EventEnvelopeV1&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Wait for all agents</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;M0 Sprint dispatch complete. All agents should have committed.&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Review commits and merge worktree:&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;  git switch main&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;  git merge </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p><strong>Definition of Done (M0)</strong></p><ul><li>[ ] All 5 stories implemented and tested</li><li>[ ] Tests pass: <code>pytest tests/test_db_migrations.py tests/test_nats_streams.py tests/test_schema_registry.py -v</code></li><li>[ ] Coverage ≥80% for all infra modules</li><li>[ ] No new suppressions in code</li><li>[ ] All commits follow format: <code>feat(infra): FR-XXX-YYY description</code></li><li>[ ] Worktree merged to main</li><li>[ ] <code>process-compose up</code> starts all services successfully</li></ul><p><strong>Exit Criteria (M0 Complete)</strong></p><ol><li>PostgreSQL migrations run idempotently</li><li>NATS streams persist data across restart</li><li>Schema registry validates EventEnvelopeV1 correctly</li><li>Event replay from NATS produces identical results</li><li>All services respond to health checks</li></ol><hr><h3 id="sprint-1-m1-control-plane-part-1-week-3–4a" tabindex="-1">Sprint 1: M1 Control Plane Part 1 (Week 3–4a) <a class="header-anchor" href="#sprint-1-m1-control-plane-part-1-week-3–4a" aria-label="Permalink to &quot;Sprint 1: M1 Control Plane Part 1 (Week 3–4a)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M0 complete and merged; all infra services running</p><p><strong>Theme:</strong> Policy engine, tool allowlist, FSM framework</p><p><strong>Stories:</strong></p><ul><li><code>FR-CP-001</code>: Policy engine + bundle versioning</li><li><code>FR-CP-002</code>: Tool allowlist engine</li><li><code>FR-CP-004</code>: FSM framework</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong></p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># sprint-m1a-dispatch.sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPO_PATH</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/Users/kooshapari/temp-PRODVERCEL/485/kush/parpour&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">WTV</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;venture-wt-m1-control-plane&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 1: Policy engine</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-CP-001 — Policy engine with bundle versioning</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_policy_engine.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test policy bundle CRUD</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test schema snapshot on creation</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test every decision includes policy_bundle_id and reason_code</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test policy replay: old decision with old bundle produces same result</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/control_plane/policy_engine.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_policy_engine.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(control-plane): FR-CP-001 Policy engine and bundle versioning&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 2: Tool allowlist</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-CP-002 — Tool allowlist engine</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_tool_allowlist.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test role-to-tools mapping</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test allowlist enforcement: allowed tool → permit, denied tool → 403</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test agent_role propagation in trace</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/control_plane/tool_allowlist.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_tool_allowlist.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(control-plane): FR-CP-002 Tool allowlist engine&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 3: FSM framework</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-CP-004 — FSM framework for workflow/task/action state machines</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_fsm.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test FSM states and transitions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test invalid transitions rejected</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test events emitted on entry/exit</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test idempotent state transitions</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/control_plane/fsm.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_fsm.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(control-plane): FR-CP-004 FSM framework&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;M1a Sprint dispatch complete.&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Merge: git switch main &amp;&amp; git merge </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p><strong>Definition of Done (M1a)</strong></p><ul><li>[ ] Policy engine stores bundles + versions + snapshots</li><li>[ ] Tool allowlist correctly enforces per-role permissions</li><li>[ ] FSM validates transitions; rejects invalid ones</li><li>[ ] All tests pass; coverage ≥80%</li><li>[ ] No suppressions</li></ul><hr><h3 id="sprint-1b-m1-control-plane-part-2-week-4b" tabindex="-1">Sprint 1b: M1 Control Plane Part 2 (Week 4b) <a class="header-anchor" href="#sprint-1b-m1-control-plane-part-2-week-4b" aria-label="Permalink to &quot;Sprint 1b: M1 Control Plane Part 2 (Week 4b)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M1a complete; policy + tool allowlist + FSM running</p><p><strong>Theme:</strong> Founder API and WebSocket</p><p><strong>Stories:</strong></p><ul><li><code>FR-CP-003</code>: Founder REST API</li><li><code>FR-CP-005</code>: WebSocket live feed</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong></p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># sprint-m1b-dispatch.sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPO_PATH</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/Users/kooshapari/temp-PRODVERCEL/485/kush/parpour&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">WTV</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;venture-wt-m1b-api&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent: Founder API + WebSocket</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-CP-003 + FR-CP-005 — Founder REST API and WebSocket live feed</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_founder_api.py tests/test_websocket.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test API CRUD for policies, workspaces, agents</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test WebSocket subscribers receive state changes</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test latency &lt; 100ms for WebSocket messages</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/control_plane/api.py (FastAPI) and src/control_plane/websocket.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_founder_api.py tests/test_websocket.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(control-plane): FR-CP-003 FR-CP-005 Founder API and WebSocket&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;M1b Sprint dispatch complete.&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Merge: git switch main &amp;&amp; git merge </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p><strong>Definition of Done (M1b)</strong></p><ul><li>[ ] Founder API responds on :8000</li><li>[ ] All CRUD endpoints tested and passing</li><li>[ ] WebSocket broadcasts with &lt;100ms latency</li><li>[ ] All tests pass; coverage ≥80%</li></ul><hr><h3 id="sprint-2-m2-agent-runtime-week-5–6" tabindex="-1">Sprint 2: M2 Agent Runtime (Week 5–6) <a class="header-anchor" href="#sprint-2-m2-agent-runtime-week-5–6" aria-label="Permalink to &quot;Sprint 2: M2 Agent Runtime (Week 5–6)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M1 complete; control plane running</p><p><strong>Theme:</strong> Agent orchestration, task execution, deterministic replay</p><p><strong>Stories:</strong></p><ul><li><code>FR-RT-001</code>: L1/L2 orchestrator</li><li><code>FR-RT-002</code>: L3 copilot pool</li><li><code>FR-RT-003</code>: Task envelope</li><li><code>FR-RT-004</code>: Tracer</li><li><code>FR-RT-005</code>: Integration</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong></p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># sprint-m2-dispatch.sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPO_PATH</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/Users/kooshapari/temp-PRODVERCEL/485/kush/parpour&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">WTV</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;venture-wt-m2-runtime&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 1: Orchestrator</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-RT-001 — L1/L2 orchestrator with capability filtering</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_orchestrator.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test task dispatch based on required capability</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test policy checks before dispatch</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test timeout handling</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test concurrent tasks isolation</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/runtime/orchestrator.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_orchestrator.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(runtime): FR-RT-001 L1/L2 orchestrator&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 2: Copilot pool</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-RT-002 — L3 copilot pool with health monitoring</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_copilot_pool.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test worker spawn with env vars</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test health check detection (&lt; 10s)</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test dead worker replacement</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test graceful shutdown</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/runtime/copilot_pool.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_copilot_pool.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(runtime): FR-RT-002 L3 copilot pool&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 3: Task envelope + tracer</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-RT-003 + FR-RT-004 — Task envelope and tracer</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_task_envelope.py tests/test_tracer.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test envelope wraps task with context (trace_id, workflow_id, agent_role, budget)</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test tracer logs inputs, outputs, execution time</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test replay: rebuild from trace logs, outputs match original</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Test deterministic: same replay twice = same output</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/runtime/task_envelope.py src/runtime/tracer.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_task_envelope.py tests/test_tracer.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(runtime): FR-RT-003 FR-RT-004 Task envelope and tracer&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Wait for agents to complete, then integration test</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Agents complete. Now testing integration...&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Manual integration test</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-RT-005 — Runtime integration: orchestrator + pool + envelope + tracer</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_runtime_integration.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- 10 concurrent tasks dispatched, all complete</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- All traces logged and queryable</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Agent death detected and logged</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Replay verification: 5 tasks replayed, outputs match original</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: integration test only (no new modules)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_runtime_integration.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;test(runtime): FR-RT-005 Runtime integration tests&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;M2 Sprint dispatch complete.&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Merge: git switch main &amp;&amp; git merge </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p><strong>Definition of Done (M2)</strong></p><ul><li>[ ] Agents spawn and accept tasks</li><li>[ ] Task envelope injects all context fields</li><li>[ ] Traces logged and queryable</li><li>[ ] Replay verification produces identical outputs</li><li>[ ] Agent death detected within 10s</li><li>[ ] Concurrent tasks isolated</li><li>[ ] All tests pass; coverage ≥80%</li></ul><hr><h3 id="sprint-3-m3-treasury-week-7–8" tabindex="-1">Sprint 3: M3 Treasury (Week 7–8) <a class="header-anchor" href="#sprint-3-m3-treasury-week-7–8" aria-label="Permalink to &quot;Sprint 3: M3 Treasury (Week 7–8)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M2 complete; agent runtime operational</p><p><strong>Theme:</strong> Financial controls, ledger, reconciliation</p><p><strong>Stories:</strong></p><ul><li><code>FR-TRE-001</code>: Money authorization API</li><li><code>FR-TRE-002</code>: Double-entry ledger</li><li><code>FR-TRE-003</code>: Authorization + ledger integration</li><li><code>FR-TRE-004</code>: Reconciliation</li><li><code>FR-TRE-005</code>: Compliance gates</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong></p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># sprint-m3-dispatch.sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPO_PATH</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/Users/kooshapari/temp-PRODVERCEL/485/kush/parpour&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">WTV</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;venture-wt-m3-treasury&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 1: Money API</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-TRE-001 — Default-deny money authorization</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_money_api.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Spend without intent → 403</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Spend with valid intent → 200 + authorization_id</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Reason_code and policy_bundle_id logged</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- No fallback on intent check</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/treasury/money_api.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_money_api.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(treasury): FR-TRE-001 Money authorization API&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 2: Ledger + reconciliation</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-TRE-002 + FR-TRE-004 — Double-entry ledger and reconciliation</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_ledger.py tests/test_reconciliation.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Ledger: debit + credit pairs, immutable entries, sum to zero</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Reconciliation: daily run compares to processor export, detects drift &gt; $0.01</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/treasury/ledger.py src/treasury/reconciliation.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_ledger.py tests/test_reconciliation.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(treasury): FR-TRE-002 FR-TRE-004 Ledger and reconciliation&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 3: Integration + compliance</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-TRE-003 + FR-TRE-005 — Authorization-ledger integration and compliance gates</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_authorization_ledger.py tests/test_compliance_gates.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Authorization → ledger entry created immediately</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Compliance gates block spend based on jurisdiction</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Fail-closed: if policy unavailable, deny</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/treasury/compliance_gates.py (integration happens in money_api.py)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_authorization_ledger.py tests/test_compliance_gates.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(treasury): FR-TRE-003 FR-TRE-005 Integration and compliance gates&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;M3 Sprint dispatch complete.&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Merge: git switch main &amp;&amp; git merge </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p><strong>Definition of Done (M3)</strong></p><ul><li>[ ] Unauthorized spends rejected</li><li>[ ] Ledger balances</li><li>[ ] Reconciliation detects drift and creates case</li><li>[ ] Compliance policy enforces jurisdiction controls</li><li>[ ] All tests pass; coverage ≥85%</li></ul><hr><h3 id="sprint-4-m4-artifact-compiler-week-9–10" tabindex="-1">Sprint 4: M4 Artifact Compiler (Week 9–10) <a class="header-anchor" href="#sprint-4-m4-artifact-compiler-week-9–10" aria-label="Permalink to &quot;Sprint 4: M4 Artifact Compiler (Week 9–10)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M3 complete; treasury operational</p><p><strong>Theme:</strong> Artifact IR, deterministic compilation, provenance</p><p><strong>Stories:</strong></p><ul><li><code>FR-ART-001</code>: IR schemas</li><li><code>FR-ART-002</code>: Compiler pipeline</li><li><code>FR-ART-003</code>: Build cache</li><li><code>FR-ART-004</code>: Provenance</li><li><code>FR-ART-005</code>: Replay verification</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong> — Similar pattern to M3; 3 parallel agents</p><p><strong>Definition of Done (M4)</strong></p><ul><li>[ ] IR schemas validate all artifact types</li><li>[ ] Deterministic builds: same IR + toolchain = byte-identical output</li><li>[ ] Build cache works; cache hits return identical bytes</li><li>[ ] Provenance signature verifies</li><li>[ ] Replay verification passes</li><li>[ ] All tests pass; coverage ≥85%</li></ul><hr><h3 id="sprint-5-m5-venture-portfolio-week-11–12" tabindex="-1">Sprint 5: M5 Venture Portfolio (Week 11–12) <a class="header-anchor" href="#sprint-5-m5-venture-portfolio-week-11–12" aria-label="Permalink to &quot;Sprint 5: M5 Venture Portfolio (Week 11–12)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M4 complete; artifact compiler operational</p><p><strong>Theme:</strong> Venture registry, P&amp;L tracking, portfolio management</p><p><strong>Stories:</strong></p><ul><li><code>FR-PF-001</code>: Venture registry</li><li><code>FR-PF-002</code>: P&amp;L engine</li><li><code>FR-PF-003</code>: Health score</li><li><code>FR-PF-004</code>: Portfolio optimizer</li><li><code>FR-PF-005</code>: Tier enforcement</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong> — 3 parallel agents; similar pattern</p><p><strong>Definition of Done (M5)</strong></p><ul><li>[ ] Ventures created and tracked with tiers</li><li>[ ] P&amp;L accurate (profit = revenue - spend)</li><li>[ ] Portfolio optimizer recommends tier changes</li><li>[ ] Tier spend limits enforced</li><li>[ ] All tests pass; coverage ≥80%</li></ul><hr><h3 id="sprint-6-m6-compliance-hardening-week-13–14" tabindex="-1">Sprint 6: M6 Compliance + Hardening (Week 13–14) <a class="header-anchor" href="#sprint-6-m6-compliance-hardening-week-13–14" aria-label="Permalink to &quot;Sprint 6: M6 Compliance + Hardening (Week 13–14)&quot;">​</a></h3><p><strong>Entry Condition:</strong> M5 complete; all systems integrated</p><p><strong>Theme:</strong> Audit trail, DSAR, incident response, load testing</p><p><strong>Stories:</strong></p><ul><li><code>FR-HRD-001</code>: Audit trail (append-only)</li><li><code>FR-HRD-002</code>: DSAR orchestration</li><li><code>FR-HRD-003</code>: Incident classification + response</li><li><code>FR-HRD-004</code>: Test coverage (≥95%)</li><li><code>FR-HRD-005</code>: Load test (1000 agents)</li></ul><p><strong>L3 Agent Dispatch Batch Script</strong></p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># sprint-m6-dispatch.sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPO_PATH</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/Users/kooshapari/temp-PRODVERCEL/485/kush/parpour&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">WTV</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;venture-wt-m6-hardening&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;../</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 1: Audit + DSAR</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-HRD-001 + FR-HRD-002 — Audit trail and DSAR workflows</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_audit_trail.py tests/test_dsar.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Audit trail: append-only, immutable, includes policy_bundle_id</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- DSAR: request → process → deletion within 24h</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/compliance/audit_trail.py src/compliance/dsar.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_audit_trail.py tests/test_dsar.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(compliance): FR-HRD-001 FR-HRD-002 Audit and DSAR&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 2: Incident response</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-HRD-003 — Incident classification and automated response</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Test first: tests/test_incident_response.py</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Classify: OVERSPEND, UNAUTHORIZED_TOOL, DATA_BREACH, POLICY_FAILURE</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Execute playbooks: freeze workflow, revoke capability, create case</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Idempotent execution</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Implement: src/compliance/incident_response.py</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  uv run pytest tests/test_incident_response.py -v</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;feat(compliance): FR-HRD-003 Incident response&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push, modify other modules, add new suppressions</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent 3: Coverage + load test</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">copilot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;PROMPT&#39;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Task: FR-HRD-004 + FR-HRD-005 — Test coverage audit and load testing</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Work:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">1. Run coverage: pytest --cov=src --cov-report=term-missing</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">2. Identify modules with &lt;95% coverage</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">3. Add integration tests for gaps</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">4. Load test: spawn 1000 agents, each runs 10 tasks</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">   - Measure: latency p50/p95/p99, throughput, errors</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">   - Acceptance: p99 &lt; 5s, throughput &gt; 100 tasks/sec</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Must pass:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  pytest --cov=src --cov-report=term-missing -v</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  tests/load_test.py --agents 1000</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Commit: &quot;test: FR-HRD-004 FR-HRD-005 Full coverage and load tests&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Do not: push</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PROMPT</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yolo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpt-5-mini</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --add-dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$REPO_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;write&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(uv:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --allow-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git:*)&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  --deny-tool</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;shell(git push)&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;M6 Sprint dispatch complete.&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Merge: git switch main &amp;&amp; git merge </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$WTV</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p><strong>Definition of Done (M6)</strong></p><ul><li>[ ] Audit trail append-only and tamper-evident</li><li>[ ] DSAR processed in &lt;24h; data deleted</li><li>[ ] Incident playbooks execute automatically</li><li>[ ] Test coverage ≥95% across all modules</li><li>[ ] Load test passes: 1000 agents, p99 &lt; 5s</li><li>[ ] Reconciliation still passes after load test (no data loss)</li></ul><hr><h2 id="ceremony-schedule" tabindex="-1">Ceremony Schedule <a class="header-anchor" href="#ceremony-schedule" aria-label="Permalink to &quot;Ceremony Schedule&quot;">​</a></h2><h3 id="weekly-sync-every-monday-9-am" tabindex="-1">Weekly Sync (Every Monday, 9 AM) <a class="header-anchor" href="#weekly-sync-every-monday-9-am" aria-label="Permalink to &quot;Weekly Sync (Every Monday, 9 AM)&quot;">​</a></h3><ul><li><strong>Duration:</strong> 30 min</li><li><strong>Attendees:</strong> Venture Platform Team (1 user, 3–5 L3 copilot agents)</li><li><strong>Agenda:</strong><ol><li>Sprint status: which agents on track, which blockers</li><li>Blocker resolution: dependencies, environment issues</li><li>Upcoming sprint preview</li></ol></li><li><strong>Output:</strong> Updated WORK_STREAM.md with status</li></ul><h3 id="sprint-planning-day-1-of-sprint" tabindex="-1">Sprint Planning (Day 1 of Sprint) <a class="header-anchor" href="#sprint-planning-day-1-of-sprint" aria-label="Permalink to &quot;Sprint Planning (Day 1 of Sprint)&quot;">​</a></h3><ul><li><strong>Duration:</strong> 1 hour</li><li><strong>Attendees:</strong> Venture Platform Team</li><li><strong>Agenda:</strong><ol><li>Review exit criteria for previous sprint</li><li>Confirm all dependencies met</li><li>Dispatch L3 agent batch script</li><li>Define success metrics for sprint</li></ol></li><li><strong>Output:</strong> Worktree created; agents dispatched; monitoring set up</li></ul><h3 id="daily-standup-async-end-of-each-day" tabindex="-1">Daily Standup (Async, End of Each Day) <a class="header-anchor" href="#daily-standup-async-end-of-each-day" aria-label="Permalink to &quot;Daily Standup (Async, End of Each Day)&quot;">​</a></h3><ul><li><strong>Format:</strong> Commit log review</li><li><strong>Check:</strong> <code>git log --oneline venture-wt-m{N}-* | head -10</code></li><li><strong>Verify:</strong> Agents making progress; commits formatted correctly; tests passing</li></ul><h3 id="sprint-review-end-of-sprint" tabindex="-1">Sprint Review (End of Sprint) <a class="header-anchor" href="#sprint-review-end-of-sprint" aria-label="Permalink to &quot;Sprint Review (End of Sprint)&quot;">​</a></h3><ul><li><strong>Duration:</strong> 1 hour</li><li><strong>Attendees:</strong> Venture Platform Team</li><li><strong>Agenda:</strong><ol><li>Demo: run all tests for sprint</li><li>Verify coverage ≥80%</li><li>Review commits and code quality</li><li>Discuss next sprint readiness</li></ol></li><li><strong>Output:</strong> Decision to merge worktree or rework</li></ul><h3 id="sprint-retrospective-end-of-sprint-optional" tabindex="-1">Sprint Retrospective (End of Sprint, Optional) <a class="header-anchor" href="#sprint-retrospective-end-of-sprint-optional" aria-label="Permalink to &quot;Sprint Retrospective (End of Sprint, Optional)&quot;">​</a></h3><ul><li><strong>Duration:</strong> 30 min</li><li><strong>Attendees:</strong> Venture Platform Team</li><li><strong>Agenda:</strong><ol><li>What went well?</li><li>What could improve?</li><li>Adjust agent dispatch script or guidance for next sprint</li></ol></li><li><strong>Output:</strong> Updated L3 dispatch script with lessons learned</li></ul><hr><h2 id="monitoring-and-observability" tabindex="-1">Monitoring and Observability <a class="header-anchor" href="#monitoring-and-observability" aria-label="Permalink to &quot;Monitoring and Observability&quot;">​</a></h2><h3 id="git-log-monitoring-real-time" tabindex="-1">Git Log Monitoring (Real-Time) <a class="header-anchor" href="#git-log-monitoring-real-time" aria-label="Permalink to &quot;Git Log Monitoring (Real-Time)&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Watch for new commits</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">watch</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -n</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 5</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;git log --oneline venture-wt-m*.* | head -20&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Or scripted:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">while</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">do</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  clear</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;=== M0 Foundation ===&quot;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> log</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --oneline</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venture-wt-m0-foundation</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> head</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -5</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  sleep</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 10</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">done</span></span></code></pre></div><h3 id="test-results-tracking" tabindex="-1">Test Results Tracking <a class="header-anchor" href="#test-results-tracking" aria-label="Permalink to &quot;Test Results Tracking&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># After each agent completes:</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> switch</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venture-wt-m{N}-{name}</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">uv</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pytest</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tests/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -v</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --tb=short</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">uv</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ruff</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> src/</span></span></code></pre></div><h3 id="coverage-dashboard" tabindex="-1">Coverage Dashboard <a class="header-anchor" href="#coverage-dashboard" aria-label="Permalink to &quot;Coverage Dashboard&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Post-sprint:</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">uv</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pytest</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --cov=src</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --cov-report=html</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">open</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> htmlcov/index.html</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">  # View coverage by module</span></span></code></pre></div><hr><h2 id="git-worktree-management" tabindex="-1">Git Worktree Management <a class="header-anchor" href="#git-worktree-management" aria-label="Permalink to &quot;Git Worktree Management&quot;">​</a></h2><h3 id="create-worktree-sprint-start" tabindex="-1">Create Worktree (Sprint Start) <a class="header-anchor" href="#create-worktree-sprint-start" aria-label="Permalink to &quot;Create Worktree (Sprint Start)&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /Users/kooshapari/temp-PRODVERCEL/485/kush/parpour</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ../venture-wt-m{N}-{name}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ../venture-wt-m{N}-{name}</span></span></code></pre></div><h3 id="review-commits-user-during-sprint" tabindex="-1">Review Commits (User, During Sprint) <a class="header-anchor" href="#review-commits-user-during-sprint" aria-label="Permalink to &quot;Review Commits (User, During Sprint)&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># See what agents committed</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> log</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --oneline</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -20</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Review specific commit</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> show</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">commit-has</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">h</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># See all changes since main</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> diff</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main..HEAD</span></span></code></pre></div><h3 id="merge-worktree-sprint-end" tabindex="-1">Merge Worktree (Sprint End) <a class="header-anchor" href="#merge-worktree-sprint-end" aria-label="Permalink to &quot;Merge Worktree (Sprint End)&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /Users/kooshapari/temp-PRODVERCEL/485/kush/parpour</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> switch</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> merge</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venture-wt-m{N}-{name}</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> worktree</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> remove</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ../venture-wt-m{N}-{name}</span></span></code></pre></div><h3 id="if-merge-conflict" tabindex="-1">If Merge Conflict <a class="header-anchor" href="#if-merge-conflict" aria-label="Permalink to &quot;If Merge Conflict&quot;">​</a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Resolve manually</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> status</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Edit conflicting files</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">resolved-file</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">s</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> commit</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -m</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;merge: resolve conflicts from venture-wt-m{N}-{name}&quot;</span></span></code></pre></div><hr><h2 id="l3-agent-best-practices" tabindex="-1">L3 Agent Best Practices <a class="header-anchor" href="#l3-agent-best-practices" aria-label="Permalink to &quot;L3 Agent Best Practices&quot;">​</a></h2><h3 id="commit-message-format" tabindex="-1">Commit Message Format <a class="header-anchor" href="#commit-message-format" aria-label="Permalink to &quot;Commit Message Format&quot;">​</a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>feat(module): FR-XXX-YYY Short description</span></span>
<span class="line"><span></span></span>
<span class="line"><span>Optional longer description. What was implemented.</span></span>
<span class="line"><span>Why this approach. Any tradeoffs considered.</span></span>
<span class="line"><span></span></span>
<span class="line"><span>Tests: pytest tests/test_module.py -v [PASS]</span></span>
<span class="line"><span>Lint: ruff check src/module.py [PASS]</span></span></code></pre></div><h3 id="what-to-do-if-stuck" tabindex="-1">What to Do If Stuck <a class="header-anchor" href="#what-to-do-if-stuck" aria-label="Permalink to &quot;What to Do If Stuck&quot;">​</a></h3><ol><li><strong>First:</strong> Check PLAN.md for acceptance criteria; are you on track?</li><li><strong>Second:</strong> Review test failures carefully; run locally</li><li><strong>Third:</strong> If true blocker (e.g., missing service), ask user via commit message or note</li><li><strong>Fourth:</strong> Never commit failing tests or suppressions</li></ol><h3 id="safe-permission-set-by-task-type" tabindex="-1">Safe Permission Set by Task Type <a class="header-anchor" href="#safe-permission-set-by-task-type" aria-label="Permalink to &quot;Safe Permission Set by Task Type&quot;">​</a></h3><ul><li><strong>Research tasks (reading specs, understanding code):</strong> Read-only (<code>--allow-tool &#39;shell(git status)&#39;</code>)</li><li><strong>Write + test:</strong> <code>--allow-tool &#39;write&#39;</code> + <code>--allow-tool &#39;shell(uv:*)&#39;</code> + <code>--allow-tool &#39;shell(git:*)&#39;</code></li><li><strong>Infra setup:</strong> Same as write + test, plus <code>--allow-tool &#39;shell(docker:*)&#39;</code> if needed</li></ul><hr><h2 id="cross-sprint-dependencies" tabindex="-1">Cross-Sprint Dependencies <a class="header-anchor" href="#cross-sprint-dependencies" aria-label="Permalink to &quot;Cross-Sprint Dependencies&quot;">​</a></h2><h3 id="m0-→-m1-critical-path" tabindex="-1">M0 → M1 Critical Path <a class="header-anchor" href="#m0-→-m1-critical-path" aria-label="Permalink to &quot;M0 → M1 Critical Path&quot;">​</a></h3><ul><li>M0 must complete PostgreSQL, NATS, Redis, process-compose before M1 can start policy engine</li></ul><h3 id="m2-→-m3-critical-path" tabindex="-1">M2 → M3 Critical Path <a class="header-anchor" href="#m2-→-m3-critical-path" aria-label="Permalink to &quot;M2 → M3 Critical Path&quot;">​</a></h3><ul><li>M2 runtime must be working before M3 can test money authorization with real agent tasks</li></ul><h3 id="m4-→-m5-critical-path" tabindex="-1">M4 → M5 Critical Path <a class="header-anchor" href="#m4-→-m5-critical-path" aria-label="Permalink to &quot;M4 → M5 Critical Path&quot;">​</a></h3><ul><li>M4 artifact compiler must be deterministic before M5 can build venture portfolio</li></ul><h3 id="m6-must-complete-all-predecessors" tabindex="-1">M6 Must Complete All Predecessors <a class="header-anchor" href="#m6-must-complete-all-predecessors" aria-label="Permalink to &quot;M6 Must Complete All Predecessors&quot;">​</a></h3><ul><li>Load test (M6) requires all M0–M5 running without data loss</li></ul><hr><h2 id="success-metrics-for-entire-workstream" tabindex="-1">Success Metrics for Entire Workstream <a class="header-anchor" href="#success-metrics-for-entire-workstream" aria-label="Permalink to &quot;Success Metrics for Entire Workstream&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Metric</th><th>Target</th><th>Measurement</th></tr></thead><tbody><tr><td><strong>Schedule Adherence</strong></td><td>12–14 weeks</td><td>Wall-clock time from sprint 0 start to M6 merge</td></tr><tr><td><strong>Quality Gate</strong></td><td>≥95% coverage</td><td><code>pytest --cov=src --cov-report=term-missing</code></td></tr><tr><td><strong>Test Pass Rate</strong></td><td>100%</td><td>All tests pass on main branch</td></tr><tr><td><strong>Load Test</strong></td><td>p99 &lt; 5s, 1000 agents</td><td><code>tests/load_test.py --agents 1000</code></td></tr><tr><td><strong>Reconciliation</strong></td><td>Zero drift</td><td>Ledger balances; processor export matches</td></tr><tr><td><strong>Suppressions</strong></td><td>Zero new</td><td>No new <code># noqa</code>, <code># pragma</code>, <code># type: ignore</code></td></tr><tr><td><strong>Commits</strong></td><td>Clean format</td><td>All commits follow <code>feat(module): FR-XXX description</code></td></tr></tbody></table><hr><h2 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to &quot;Troubleshooting&quot;">​</a></h2><h3 id="agent-not-making-progress" tabindex="-1">Agent Not Making Progress <a class="header-anchor" href="#agent-not-making-progress" aria-label="Permalink to &quot;Agent Not Making Progress&quot;">​</a></h3><ol><li>Check copilot session: <code>ls -la ~/.copilot/sessions/</code></li><li>Check error logs in agent output</li><li>Re-dispatch agent with <code>--resume</code> flag (if stuck in infinite loop)</li><li>Check task dependencies: is required predecessor complete?</li></ol><h3 id="test-failure-during-sprint" tabindex="-1">Test Failure During Sprint <a class="header-anchor" href="#test-failure-during-sprint" aria-label="Permalink to &quot;Test Failure During Sprint&quot;">​</a></h3><ol><li>Pull latest from main: <code>git fetch origin main</code></li><li>Rebase on main: <code>git rebase main</code> (in worktree)</li><li>Run tests locally: <code>uv run pytest tests/test_module.py -v</code></li><li>Fix code; commit; continue</li></ol><h3 id="data-loss-during-load-test" tabindex="-1">Data Loss During Load Test <a class="header-anchor" href="#data-loss-during-load-test" aria-label="Permalink to &quot;Data Loss During Load Test&quot;">​</a></h3><ol><li>Check reconciliation: <code>uv run pytest tests/test_reconciliation.py -v</code></li><li>Check ledger balance: <code>SELECT SUM(amount) FROM ledger WHERE type=&#39;DEBIT&#39;</code> vs CREDIT</li><li>If drift: investigate transaction log; fix missing entries</li><li>Run reconciliation again</li></ol><h3 id="merge-conflict-in-worktree" tabindex="-1">Merge Conflict in Worktree <a class="header-anchor" href="#merge-conflict-in-worktree" aria-label="Permalink to &quot;Merge Conflict in Worktree&quot;">​</a></h3><ol><li>List conflicting files: <code>git status</code></li><li>Open each file; resolve manually</li><li><code>git add &lt;file&gt;</code> for each resolved file</li><li><code>git commit -m &quot;merge: resolve conflicts&quot;</code></li></ol><hr><h2 id="appendix-sprint-at-a-glance" tabindex="-1">Appendix: Sprint at a Glance <a class="header-anchor" href="#appendix-sprint-at-a-glance" aria-label="Permalink to &quot;Appendix: Sprint at a Glance&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Sprint</th><th>Milestone</th><th>Dates</th><th>Key Deliverables</th><th>Exit Gate</th></tr></thead><tbody><tr><td>0</td><td>M0: Foundation</td><td>Wk 1–2</td><td>PostgreSQL, NATS, Redis, process-compose, schema registry</td><td>All services up; event validation works</td></tr><tr><td>1a</td><td>M1a: Control (Part 1)</td><td>Wk 3–4a</td><td>Policy engine, tool allowlist, FSM</td><td>Policy bundles versioned; FSM validates</td></tr><tr><td>1b</td><td>M1b: Control (Part 2)</td><td>Wk 4b</td><td>Founder API, WebSocket</td><td>API responds; WebSocket broadcasts &lt;100ms</td></tr><tr><td>2</td><td>M2: Runtime</td><td>Wk 5–6</td><td>L1/L2 orchestrator, L3 pool, envelope, tracer</td><td>Agents execute; replay deterministic</td></tr><tr><td>3</td><td>M3: Treasury</td><td>Wk 7–8</td><td>Money API, ledger, reconciliation, compliance</td><td>Ledger balances; reconciliation detects drift</td></tr><tr><td>4</td><td>M4: Compiler</td><td>Wk 9–10</td><td>IR schemas, pipeline, cache, provenance</td><td>Builds deterministic; provenance verifies</td></tr><tr><td>5</td><td>M5: Portfolio</td><td>Wk 11–12</td><td>Venture registry, P&amp;L, optimizer, tier enforcement</td><td>P&amp;L accurate; optimizer recommends</td></tr><tr><td>6</td><td>M6: Compliance</td><td>Wk 13–14</td><td>Audit trail, DSAR, incident response, load test</td><td>Coverage ≥95%; load test passes 1000 agents</td></tr></tbody></table><hr><p><strong>Workstream Status:</strong> ACTIVE <strong>Last Updated:</strong> 2026-02-21 <strong>Next Review:</strong> Sprint 0 Planning (Day 1)</p>`,154)])])}const g=i(l,[["render",e]]);export{d as __pageData,g as default};
