SalesPlayLibrary — Production Schema

Layer 9 (drafts) → Layer 3 execution (active plays) · Brain proposes, humans co-define, AGT-302 executes · Hard volume cap on active plays · Promotion-gated state machine
L9 · Schema Production · v27 Owns: SalesPlayLibrary Brain Agents (drafts) · RevOps + SLM (promotion gate)
Purpose

SalesPlayLibrary is the workspace where Brain Agents draft sales plays for human co-definition. It is the operational mechanism for the architectural commitment in the v26 evaluation: brains propose, RevOps and sales leaders refine into a small curated set, then AGT-302 executes. The hard volume cap on active plays per segment is the safety mechanism that prevents quiet play proliferation.

Two architectural roles in one table. SalesPlayLibrary is both a workspace (where drafts live) and a registry of active plays (what AGT-302 reads to execute). The state machine is the bridge. Drafts are non-canonical; active rows are canonical — but only RevOps + SLM can transition state, never a Brain Agent.
State machine
StateMeaningWho can write/transition
draftBrain Agent has proposed a play. Lives in workspace for human review. Not visible to AGT-302.Brain Agent (AGT-901 / AGT-902) inserts. No one else writes to draft rows.
under_reviewRevOps or sales leader has picked up a draft and is co-defining it into a candidate active play. May edit hypothesis, target, cadence. Not visible to AGT-302.RevOps + sales leader (manual transition from draft). Edits permitted.
activePlay approved and live. AGT-302 reads only active plays. Subject to hard volume cap per segment.SLM + RevOps joint approval (both must approve; tracked in approval fields). Hard volume cap enforced at write time.
retiredPlay removed from active execution. AGT-302 stops new sequence generation; in-flight sequences complete. Outcomes recorded for retrospective.RevOps. Retiring a play frees capacity under the volume cap.

Allowed transitions:

Hard volume cap on active plays

Per the v26 architecture commitment: too many plays overwhelm reps and managers; sales leaders only commit to plays they helped define. The cap is enforced at the database level — not advisory.

ScopeDefault capConfigurable by
Per segment (SMB / MM / Ent / strategic / etc.) per quarter3 to 8 active plays simultaneouslyRevOps via SalesPlayLibraryConfig (L0 table). Per-segment override permitted; default is 5.
Per account (account-specific plays from AGT-902)1 active per accountHard cap. Account-specific plays must complete or retire before another can activate.
Per quarter total (across all segments)Soft monitoring; no hard capRevOps dashboard surfaces total active count. Sustained drift past 30 active triggers a quarterly playbook review.
Cap enforcement: a transition to active when the cap is already met is rejected at write time. The blocking transition surfaces an error to RevOps suggesting they retire an existing play first. No silent overflow.
Schema definition
FieldTypeReqNotes
play_idUUIDREQPrimary key.
stateENUMREQdraft / under_review / active / retired. State transitions enforced via trigger.
scopeENUMREQsegment (cross-account, segment-targeted) / account_specific (per-account from AGT-902).
segmentVARCHAR(64)optRequired when scope = segment. Free-text segment label (e.g., commercial_mm, enterprise_strategic) matching segment taxonomy in TerritoryDefinitions.
account_idUUIDoptRequired when scope = account_specific. FK to Accounts.
nameVARCHAR(128)REQHuman-readable play name. Editable in under_review.
hypothesisTEXTREQThe thesis the play tests. Editable in under_review.
target_definitionJSONBREQTarget audience criteria: ICP tier, vertical, intent signals, lifecycle stage. JSON schema validated.
suggested_cadenceJSONBREQSequence steps, channel mix, touch counts — in the format AGT-302 expects. May reference existing cadence templates by ID.
success_criteriaJSONBREQMeasurable outcomes: target meeting rate, target opp create rate, target ACV. How the play will be retrospectively evaluated.
originating_proposal_idUUIDREQFK to BrainAnalysisLog.proposal_id of the brain output that drafted this play. Lineage anchor for cohort retrospective.
writer_agent_idVARCHAR(16)REQBrain Agent that drafted: AGT-901 or AGT-902.
created_atTIMESTAMPTZREQDEFAULT NOW().
picked_up_by_user_idUUIDoptSet on draftunder_review transition. The human who picked up the draft.
picked_up_atTIMESTAMPTZoptSet on draftunder_review.
edits_during_reviewJSONBoptDiff log of edits during under_review. Captures what humans changed from brain draft — valuable signal for brain calibration.
slm_approver_user_idUUIDoptRequired to transition to active. SLM identity.
revops_approver_user_idUUIDoptRequired to transition to active. RevOps identity.
activated_atTIMESTAMPTZoptSet on under_reviewactive.
active_period_startDATEoptRequired when active. When AGT-302 begins executing.
active_period_endDATEoptOptional sunset date. Beyond this, play auto-retires.
retired_atTIMESTAMPTZoptSet on transition to retired.
retired_by_user_idUUIDoptSet on transition to retired.
retire_reasonENUMoptSet on retire. completed / replaced / poor_performance / rejected_at_review / rejected_at_draft / auto_sunset.
retrospective_outcomesJSONBoptMeasured success vs. success_criteria. Populated quarterly by RevOps from cohort data. Read by AGT-901 in next play-refresh batch.
Keys, constraints, indexes
ElementDefinitionWhy
Primary keyplay_idSurrogate.
Index 1(state, segment) WHERE state = 'active'AGT-302 hot path: read active plays per segment. Fast.
Index 2(state, account_id) WHERE state = 'active' AND account_id IS NOT NULLAccount-specific play lookup.
Index 3(state, created_at DESC) WHERE state IN ('draft','under_review')Workspace UI: show pending drafts/reviews to humans.
Index 4(originating_proposal_id)Cohort retrospective lookup.
Index 5(writer_agent_id, created_at DESC)Per-brain draft history (eval, brain calibration).
CHECK: scope ↔ segment/account_id(scope = 'segment' AND segment IS NOT NULL AND account_id IS NULL) OR (scope = 'account_specific' AND account_id IS NOT NULL)Mutual exclusion: a play targets either a segment or a single account, never both.
CHECK: active requires approversIf state = 'active' THEN slm_approver_user_id IS NOT NULL AND revops_approver_user_id IS NOT NULL AND activated_at IS NOT NULLActivation gate — both approvers required.
CHECK: state machineTrigger validates allowed transitions only. Backward transitions blocked.Auditability + integrity.
CHECK: volume cap (segment)Trigger: on transition to active for scope=segment, count of existing active plays in that segment must be < cap from SalesPlayLibraryConfig.Hard cap enforcement.
CHECK: volume cap (account)Trigger: on transition to active for scope=account_specific, no other active play exists for the same account_id.One active per account.
CHECK: writer_agent_idwriter_agent_id IN ('AGT-901','AGT-902') (extensible)Brain identity discipline.
FKoriginating_proposal_id → BrainAnalysisLog.proposal_id; account_id → Accounts; user IDs → Users.Referential integrity.
AGT-302 integration — how active plays execute

AGT-302 Cadence Coordinator is the execution engine. It reads SalesPlayLibrary WHERE state = 'active' at sequence-generation time. Plays in any other state are invisible to AGT-302 — the workspace is hidden from production execution by design.

AGT-302 readWhat's used
target_definitionFilters which accounts/leads receive the play's sequence.
suggested_cadenceSequence steps + cadence type. AGT-302's existing 3-touch/week cap and ABM backstop still apply on top.
play_idWritten to CadenceEventLog.play_id for every event generated under this play.
originating_proposal_idWritten to CadenceEventLog.originating_proposal_id for cohort retrospective lineage. Per BrainAnalysisLog spec.
active_period_endIf reached, AGT-302 stops generating new sequences from this play. AGT-302 can also auto-transition the play to retired with retire_reason = 'auto_sunset' if RevOps configures auto-sunset.
Existing AGT-302 v25 spec governs touch caps, suppression, ABM backstop. This integration adds two new read fields (play_id, originating_proposal_id) to write through to CadenceEventLog — a v27 ripple change to AGT-302's schema.
Brain calibration feedback loop

SalesPlayLibrary closes the loop on brain quality. Three signals matter:

SignalWhat it measuresBrain calibration use
Promotion rate (active / draft ratio per quarter, per brain)How often brain drafts make it through co-definition to activationPer AGT-901 eval criteria target ≥ 30%. Below that → brain not aligned with leadership criteria.
Edit volume in edits_during_reviewHow heavily humans rewrite brain drafts during reviewHeavy edits → brain drafts are starting points, not finished products. Light edits → brain is calibrated. Used to tune system prompt + few-shot examples.
Retrospective outcomes vs success_criteriaDid active plays hit their stated success criteria?Cohort-level lift on brain-co-designed plays vs. plays without brain involvement. Reads by AGT-901 in next play-refresh batch.
This is the v26 architecture's "cohort-level retrospective" mechanism in concrete form. Tag every action with the brain's proposal_id, compare cohort outcomes quarterly, refine. No per-deal attribution; pattern-level signal.
Retention
TierWindowAccess
HotActive or recently retired (last 90 days)Operational reads (AGT-302, workspace UI, dashboards)
WarmRetired 90 days to 18 monthsQuarterly retrospectives, brain calibration analysis
Cold18 months to 7 yearsAudit access for any audit period covering brain-influenced actions