← Swarm

Plan Iterations

DPP Deal Room Plan Β· v1–v11

Evolution log for architectural and multi-deal plans. The diff between revisions is the design rationale β€” agents read all iterations, not just the latest. Companion markdown: inventory/dpp-deal-room-plan-iterations.md

Iteration logs of this kind are mandatory for architectural decisions and multi-deal capabilities. Not required for one-off prompt revisions or single-shot deliverables.

Group by:
Filter by version
Filter by topic
Showing 11 of 11 iterations

v1 β€” Original DPP build framing

May 19, 2026, 7:30 PM Β· Build task. Skill-shaped solution assumed.

deal-room-structureanonymizationsource-miningloan-mart-templateblind-first
Added
  • + Loan Mart as structural template
  • + Codename requirement via inventory/blind-codenames.json
  • + Source-mining list: Gmail, Fireflies, Granola, Drive, Supabase, repo
  • + Buy-side framing for DPP
  • + Principals: Chris Fore (President), Pat Fore (founder)
  • + Starter segmentation hint about underground DOT work
  • + Independent analysis requirement (user notes are hypothesis, not fact)
Settled
  • βœ“ Blind-First compliance
  • βœ“ Codename-first ordering
  • βœ“ Buy-side framing
  • βœ“ Principals identified
  • βœ“ Segmentation from primary sources
Revoked in a later version:
  • – Read existing design-precast-deal-manager skill first (revoked in v3)

v2 β€” +Repository / +Apply-to-All loop / +Plaud / +Audio

May 19, 2026, 8:10 PM Β· Build task, expanded scope.

file-repositoryapply-to-all-loopsupabase-firstplaud-integrationaudio-playback
Added
  • + Deal File Repository as new universal capability
  • + Identification β†’ Build β†’ Apply to All loop as core protocol
  • + Supabase-first source-of-truth hierarchy
  • + Plaud as new source connector
  • + Audio playback via meetings-page player reuse
  • + Loan Mart Deal File Repository backfill in same build
Settled
  • βœ“ Repository is universal, not DPP-specific
  • βœ“ Loop is protocol-level, not one-shot
  • βœ“ Supabase canonical, Vercel renders from it

v3 β€” +Swarm autonomy / scope to /swarm-build (5 agents)

May 19, 2026, 8:18 PM Β· Build task, with constitutional rule on swarm independence.

swarm-autonomy
Added
  • + Swarm Autonomy section β€” existing artifacts are inputs, not authorities
  • + Explicit 'do NOT pre-read design-precast-deal-manager as canon'
  • + Valid verdicts: use / refactor / supersede / archive
  • + Scope confirmed to /swarm-build (5 agents), not maxswarm (11)
  • + Each agent's S1 reasoning must show independent skill read
Removed
  • βˆ’ Pre-read existing skill as canon (from v1)
Settled
  • βœ“ Swarm independence is constitutional
  • βœ“ Existing skill is input data, not authority

v4 β€” Reframed as architecture-decision swarm (no build)

May 19, 2026, 8:23 PM Β· Decision swarm. No build yet.

decision-vs-build
Added
  • + Single question: is existing skill the best path forward?
  • + Six architectural inputs the swarm must weigh
  • + Output: one architectural recommendation memo
  • + Dissent log required in output
Removed
  • βˆ’ All code/migration/page deliverables (moved to downstream build phase)
Settled
  • βœ“ Decision precedes build
  • βœ“ Build phase is downstream and contingent
  • βœ“ Swarm produces memo, not artifacts

v5 β€” +Skill-vs-application shape question / +Iteration log

May 19, 2026, 9:12 PM Β· Decision swarm. Broader option space.

skill-vs-applicationiteration-log
Added
  • + Broadened central question: shape = skill / application / hybrid
  • + Skill verdict retained as tactical sub-question
  • + Iteration log requirement (this file)
  • + Iteration log scoping rule: architectural decisions and multi-deal capabilities only
Removed
  • βˆ’ Implicit assumption that solution is skill-shaped
Settled
  • βœ“ Shape selection precedes scope
  • βœ“ Swarm chooses shape, not operator
  • βœ“ Iteration logs scoped to architectural / multi-deal work

v6 β€” +Webpage / +Filterable UI for iterations

May 19, 2026, 9:15 PM Β· Decision swarm, with iteration log as first-class UI surface.

iteration-log
Added
  • + Iteration log surfaced as webpage at /swarm/plan-iterations
  • + Organized by topic, filterable by any data field
  • + JSON data file feeds both markdown and webpage
  • + Page inherits root layout (NavLinks; No Orphans rule satisfied)
Settled
  • βœ“ Iteration logs are first-class UI surfaces
  • βœ“ Agent-readable .md and human-browsable page stay in sync via shared JSON

v7 β€” Architectural verdict landed (swarm-build #015)

May 19, 2026, 9:33 PM Β· Decision swarm complete; verdict feeds run #016 build.

decision-vs-buildskill-vs-applicationfile-repositorysupabase-firstapply-to-all-loopblind-first
Added
  • + Shape verdict: HYBRID (application-led + thin per-deal skill); unanimous S1 convergence across architect, data-architect, quarterback
  • + Skill verdict: REFACTOR design-precast-deal-manager; content preserved, Desktop-file storage abstraction retired
  • + 3 new Supabase tables: deal_files, deal_file_tags, deal_pages
  • + 1 extended table: deal_rooms (+ blind_codename, blind_slug, visibility)
  • + 4+ reused tables via FK (meetings, transcript_extractions, documents, drive_files)
  • + Apply-to-All Master Rule to be added to AGENTS.md, enforced by gate-check.sh reading Supabase deals
  • + Buy-side template (DPP) separate from sell-side template (Loan Mart); chosen by deals.side
  • + Run #016 scope frozen: universal foundation + Helios blind + Bedrock scaffold
  • + 6 binary open questions for Ewing gating run #016
Removed
  • βˆ’ public/deal-rooms/*.html as primary surface (becomes one-time export only)
  • βˆ’ Author-discretion enforcement of Blind-First (replaced by DB trigger pair invariant)
  • βˆ’ Desktop-file canonical state in per-deal skills
Settled
  • βœ“ Persistent state belongs in application; trigger gating belongs in skills
  • βœ“ Blind/named pair invariant enforced by DB trigger, not author discipline
  • βœ“ Codename source-of-truth: DB (JSON deprecated to read-replica) β€” pending Ewing confirmation
  • βœ“ Existing skill content survives via extraction to deal-manager-base
  • βœ“ Run #016 first deliverable is Helios blind (resolves active Loan Mart Blind-First violation)

v8 β€” Six-question gate cleared; run #016 ready

May 19, 2026, 10:34 PM Β· All v7 open questions resolved. Run #016 fully scoped and awaiting trigger.

decision-vs-buildsupabase-firstblind-firstplaud-integrationskill-vs-application
Added
  • + Codename source-of-truth: DB-canonical via new deal_codenames table (JSON deprecated to read-replica)
  • + Per-deal password scheme: 4-digit randomized deal_number; password = each digit + 1 mod 10 (e.g., 4729 -> 5830)
  • + Plaud file-size pre-flight checkpoint: probe duration + bitrate, chunk via TUS or transcode if file exceeds bucket limit
  • + Rate-limit the password gate endpoint (4-digit space = brute-forceable without it)
  • + deal_codenames table as structured codename store
  • + deals.deal_number CHAR(4) NOT NULL UNIQUE column
  • + Plaud bucket file_size_limit set explicitly at migration time
  • + Test fixture requirement: 90-minute mock audio at 128 kbps must round-trip successfully
Removed
  • βˆ’ JSON file (inventory/blind-codenames.json) as authoritative codename store
  • βˆ’ Shared single password across all blind rooms
  • βˆ’ Migration of existing Loan Mart static HTML in run #016 (frozen, parallel-only)
Settled
  • βœ“ Codename storage: DB single source; JSON becomes a generated artifact
  • βœ“ Password gate: deterministic per-deal scheme; internal-only user model accepted
  • βœ“ Plaud: Supabase Storage with size-check + transcode-or-chunk fallback
  • βœ“ Sequencing: universal-first (Option A); Helios blind first deliverable; DPP content second run
  • βœ“ Hybrid shape verdict approved; run #016 cleared to execute

v9 β€” Run #016 shipped β€” universal foundation live (file system)

May 19, 2026, 10:54 PM Β· Build artifacts produced and integrated; migration files written but NOT yet applied to production Supabase. Awaiting Ewing's `doppler run -- supabase db push`. PASS verdict after one REWORK cycle (2 column-name defects, conductor-fixed).

decision-vs-buildskill-vs-applicationfile-repositorysupabase-firstapply-to-all-loopblind-firstaudio-playback
Added
  • + Migration 2026_05_19_e__deal_room_foundation.sql β€” 4 new tables (deal_codenames, deal_files, deal_file_tags, deal_pages), 2 extended (deals +side/engagement_type/deal_number; deal_rooms +blind_codename/blind_slug/visibility), blind/named pair invariant trigger, deal_room_password() SQL function, RLS policies, 9 indexes, 3 triggers
  • + Migration 2026_05_19_f__deal_room_seeds.sql β€” Helios + Bedrock blind hub deal_pages rows, deal_codenames entries for both, deals upserts with hardcoded deal_numbers (4729 design-precast, 5037 loanmart-hugo)
  • + Next.js render route src/app/deal-rooms/[codename]/[page]/page.tsx β€” RSC, inherits NavLinks (No Orphans-compliant), password-gated, light theme
  • + Password gate API src/app/api/deal-rooms/unlock/route.ts β€” derived 4-digit password (digit+1 mod 10), in-memory rate limit (10 per 15-min per IP+codename)
  • + Skill skills/deal-manager-base/SKILL.md β€” shared base with mandatory pre-deliverable sequence and universal anti-pattern guardrails
  • + Skill refactor skills/design-precast-deal-manager/SKILL.md β€” reduced from 120 to 56 lines; Desktop file pointer removed; reads context from /api/deals/design-precast
  • + Apply-to-All Master Rule appended to AGENTS.md as third BLOCKING Master Rule
  • + Project Bedrock codename entry merged into inventory/blind-codenames.json
  • + Script scripts/plaud-size-check.mjs β€” direct / direct-raised / chunk TUS decision logic; self-test PASSES all 4 contract cases
  • + Script scripts/apply-to-all-gate.sh β€” enumerates active deals via stage filter, fails fatal on missing capability artifact
  • + Script scripts/anonymize-all.mjs extended β€” verifyDealPagesCoverage() reads deal_pages and validates Blind-First pair invariant at Vercel build time
  • + REWORK cycle fixes: seed migration column status->stage (deals enum), apply-to-all-gate column archived_at->closed_at+stage filter, silent error suppression replaced with fatal exit
Removed
  • βˆ’ design-precast-deal-manager Desktop file pointer storage abstraction
  • βˆ’ Silent error suppression (2>/dev/null || true) from apply-to-all-gate.sh
Settled
  • βœ“ Universal foundation shipped on disk; migration files ready for supabase db push
  • βœ“ Helios blind room scaffolded (resolves long-standing Blind-First violation on Loan Mart)
  • βœ“ Bedrock blind room scaffolded (DPP placeholder; content authoring deferred to run #018+)
  • βœ“ design-precast-deal-manager is the FIRST per-deal skill refactored to the hybrid base+overlay pattern
  • βœ“ REWORK loop validated end-to-end: auditor caught 2 real defects that would have crashed production migration apply
  • βœ“ PASS verdict on 16/16 audit criteria after resubmission
  • βœ“ Deferred to run #017: Gmail/Fireflies/Drive ingestion adapters, hr-com-deal-manager + ches-booker-deal-manager refactors, Apply-to-All sweep against HR.com + Capstone repositories
  • βœ“ Deferred to run #018+: Plaud adapter daemon, Loan Mart Deal File Repository population, DPP Bedrock content authoring, migration of remaining public/deal-rooms/*.html

v10 β€” Migrations applied to production Supabase β€” PASS

May 20, 2026, 6:05 AM Β· Both migration files applied to production via psql $DATABASE_URL. Two additional defects found and fixed during apply. Full smoke-test passed. Schema and seed data are live.

supabase-firstblind-firstdeal-room-structure
Added
  • + Defect 3 fix: deal_number backfill replaced pure random with row_number*97%10000 (prime stride, guaranteed unique across up to 10,000 rows). Applied in 2026_05_19_e__deal_room_foundation.sql.
  • + Defect 4 fix: seed INSERT used 'name' column; correct column is 'company_name'. Fixed in 2026_05_19_f__deal_room_seeds.sql.
  • + Defect 4b fix: ON CONFLICT COALESCE blocked canonical deal_numbers; changed to direct overwrite. deal_numbers manually set: design-precast=4729, loanmart-hugo=5037.
  • + Production smoke tests: deal_room_password('4729')='5830' βœ“, deal_room_password('5037')='6148' βœ“, both hub pages queryable from deal_pages table.
Settled
  • βœ“ Production Supabase has deal_codenames, deal_files, deal_file_tags, deal_pages tables live
  • βœ“ deal_rooms extended with blind_codename, blind_slug, visibility
  • βœ“ Helios hub: /deal-rooms/helios/hub live (password 6148)
  • βœ“ Bedrock hub: /deal-rooms/bedrock/hub live (password 5830)
  • βœ“ Password derivation function matches all 4 build contract test vectors
  • βœ“ Run #017 can now proceed: ingestion adapters + remaining skill refactors

v11 β€” Run #018 scoped (Opus) β€” connector completion + cost guardrails + skill reconciliation

May 19, 2026, 11:38 PM Β· Infrastructure-completion run. Closes the three FixLater items filed at the end of #017 (Gmail #100, pipeline_items #101, cost ledger #102). Two Phase-0 probe findings reshape the scope: deal_targets already exists (no new table needed β€” Modeling Rule 9), and Gmail OAuth scope is NOT confirmed on the existing Google refresh token.

Operative
supabase-firstapply-to-all-loopskill-vs-applicationdecision-vs-build
Added
  • + Track A β€” Gmail adapter (engine/ingestion/gmail_to_deal_files.py + LaunchAgent). Phase 0 verifies Gmail scope; if missing, blocks Track A pending one-time browser re-OAuth.
  • + Track B β€” Skill reconciliation: deal-manager-base + ches-booker-deal-manager point at existing public.deal_targets instead of nonexistent deal_pipeline_items. Closes FixLater #101 with no migration.
  • + Track C β€” Cost ledger JSONL (inventory/cost-ledger.jsonl) + helper script + Phase 5 hard requirement. Backfill #016 and #017 entries. Closes FixLater #102.
  • + Phase 0 probe finding: deal_targets exists with 117 rows for HR.com (deal_id='hr_com_ltd'). Modeling Rule 9 says do not create deal_pipeline_items.
  • + Phase 0 probe finding: Google OAuth token returned HTTP 401 on Gmail profile probe. Track A needs re-OAuth before build.
Removed
  • βˆ’ Creation of new deal_pipeline_items table (Modeling Rule 9 β€” deal_targets serves the use case already)
Settled
  • βœ“ Theme: connector completion + cost guardrails. NOT content authoring (#020+) and NOT Plaud (device-dependent).
  • βœ“ deal_targets slug normalization (hr_com_ltd vs hr-com) deferred as separate FixLater β€” fixing risks breaking existing HR.com pipeline UI
  • βœ“ deal_targets.fit_score Modeling Rule 2 migration deferred as separate FixLater β€” existing tech debt, large effort
  • βœ“ Cost ledger format: JSONL append-only (no new schema migration, easy diff)
  • βœ“ Bedrock + Forum + Lagoon content authoring waits one week so the freshly-ingested corpus grows from primary sources
Next step: Ewing answers 4 open questions (especially: Gmail OAuth re-consent yes/no). Then fire /swarm-build for run #018 deal-room-connector-completion. If Gmail OAuth is deferred, only Tracks B + C ship β€” ~1-2 hours of work β€” and Track A is documented as conditional-deferred in the build contract.