build: untrack local documents and add them to .gitignore
Browse files- .gitignore +5 -0
- brand_alchemy_company_brain.html +0 -254
- company_brain_PRD_v4.md +0 -1061
.gitignore
CHANGED
|
@@ -40,3 +40,8 @@ htmlcov/
|
|
| 40 |
# For the hackathon, we keep the static demo rivanly-inc files, but ignore other companies if uploaded
|
| 41 |
data/sources/*/
|
| 42 |
!data/sources/rivanly-inc/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
# For the hackathon, we keep the static demo rivanly-inc files, but ignore other companies if uploaded
|
| 41 |
data/sources/*/
|
| 42 |
!data/sources/rivanly-inc/
|
| 43 |
+
|
| 44 |
+
# Local documents & drafts (untracked on GitHub)
|
| 45 |
+
brand_alchemy_company_brain.html
|
| 46 |
+
company_brain_PRD_v4.md
|
| 47 |
+
|
brand_alchemy_company_brain.html
DELETED
|
@@ -1,254 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
<style>
|
| 3 |
-
.ba-root { font-family: var(--font-sans); padding: 1.5rem 0; }
|
| 4 |
-
.section-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-tertiary); margin-bottom: 0.75rem; }
|
| 5 |
-
.pov-block { border-left: 2px solid var(--color-border-secondary); padding: 0.75rem 1rem; margin-bottom: 1.5rem; }
|
| 6 |
-
.pov-block p { margin: 0; font-size: 15px; color: var(--color-text-primary); line-height: 1.6; }
|
| 7 |
-
.pov-block .pov-sub { font-size: 13px; color: var(--color-text-secondary); margin-top: 0.4rem; }
|
| 8 |
-
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 2rem; }
|
| 9 |
-
.meta-card { background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 0.75rem 1rem; }
|
| 10 |
-
.meta-card .mk { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
|
| 11 |
-
.meta-card .mv { font-size: 13px; font-weight: 500; color: var(--color-text-primary); }
|
| 12 |
-
.name-card { background: var(--color-background-primary); border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 1.25rem; margin-bottom: 0.75rem; }
|
| 13 |
-
.name-card.winner { border: 1.5px solid #1D9E75; }
|
| 14 |
-
.name-header { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
|
| 15 |
-
.name-title { font-size: 22px; font-weight: 500; color: var(--color-text-primary); letter-spacing: -0.02em; }
|
| 16 |
-
.name-score { display: flex; gap: 6px; margin-left: auto; align-items: center; }
|
| 17 |
-
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-tertiary); }
|
| 18 |
-
.dot.filled { background: #1D9E75; }
|
| 19 |
-
.winner-badge { font-size: 11px; font-weight: 500; background: #E1F5EE; color: #0F6E56; padding: 3px 10px; border-radius: 20px; }
|
| 20 |
-
.name-tagline { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 0.75rem; font-style: italic; }
|
| 21 |
-
.phono-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0.75rem; }
|
| 22 |
-
.phono-pill { font-size: 11px; background: var(--color-background-secondary); border: 0.5px solid var(--color-border-tertiary); color: var(--color-text-secondary); padding: 3px 10px; border-radius: 20px; }
|
| 23 |
-
.phono-pill.p { background: #EEEDFE; color: #3C3489; border-color: #AFA9EC; }
|
| 24 |
-
.phono-pill.l { background: #E1F5EE; color: #0F6E56; border-color: #5DCAA5; }
|
| 25 |
-
.phono-pill.f { background: #FAEEDA; color: #633806; border-color: #EF9F27; }
|
| 26 |
-
.name-reasoning { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; margin-bottom: 0.75rem; }
|
| 27 |
-
.domain-row { display: flex; gap: 8px; flex-wrap: wrap; }
|
| 28 |
-
.domain-tag { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 20px; display: flex; align-items: center; gap: 5px; }
|
| 29 |
-
.domain-tag.available { background: #E1F5EE; color: #085041; }
|
| 30 |
-
.domain-tag.taken { background: #FCEBEB; color: #791F1F; }
|
| 31 |
-
.diamond-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 2rem; }
|
| 32 |
-
.diamond-item { background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 0.6rem; text-align: center; }
|
| 33 |
-
.diamond-label { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 4px; }
|
| 34 |
-
.diamond-bar-bg { height: 4px; background: var(--color-border-tertiary); border-radius: 2px; overflow: hidden; }
|
| 35 |
-
.diamond-bar-fill { height: 4px; border-radius: 2px; background: #1D9E75; }
|
| 36 |
-
.diamond-score { font-size: 12px; font-weight: 500; color: var(--color-text-primary); margin-top: 4px; }
|
| 37 |
-
.divider { border: none; border-top: 0.5px solid var(--color-border-tertiary); margin: 1.5rem 0; }
|
| 38 |
-
.rec-block { background: #E1F5EE; border-radius: var(--border-radius-lg); padding: 1.25rem; margin-top: 1rem; }
|
| 39 |
-
.rec-title { font-size: 14px; font-weight: 500; color: #085041; margin-bottom: 0.5rem; }
|
| 40 |
-
.rec-text { font-size: 13px; color: #0F6E56; line-height: 1.6; }
|
| 41 |
-
.positioning-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 1.5rem; }
|
| 42 |
-
.positioning-table td { padding: 8px 12px; border-bottom: 0.5px solid var(--color-border-tertiary); color: var(--color-text-secondary); vertical-align: top; }
|
| 43 |
-
.positioning-table td:first-child { font-weight: 500; color: var(--color-text-primary); width: 40%; }
|
| 44 |
-
</style>
|
| 45 |
-
|
| 46 |
-
<div class="ba-root">
|
| 47 |
-
<h2 style="sr-only">Brand Alchemy Report — Company Brain</h2>
|
| 48 |
-
|
| 49 |
-
<div class="section-label">Product DNA — what was learned</div>
|
| 50 |
-
<div class="pov-block">
|
| 51 |
-
<p>A compiler layer that extracts the operational judgment scattered across Slack, SOPs, tickets and people's heads — and produces a versioned, evidence-linked, executable skills file any AI agent can consume.</p>
|
| 52 |
-
<p class="pov-sub">Not RAG. Not a chatbot. Not search. A compiler of how a company actually decides things — living, stale-aware, and infrastructure-grade.</p>
|
| 53 |
-
</div>
|
| 54 |
-
|
| 55 |
-
<div class="meta-grid">
|
| 56 |
-
<div class="meta-card">
|
| 57 |
-
<div class="mk">Category</div>
|
| 58 |
-
<div class="mv">AI Infrastructure</div>
|
| 59 |
-
</div>
|
| 60 |
-
<div class="meta-card">
|
| 61 |
-
<div class="mk">Audience</div>
|
| 62 |
-
<div class="mv">B2B SaaS Ops + AI Builders</div>
|
| 63 |
-
</div>
|
| 64 |
-
<div class="meta-card">
|
| 65 |
-
<div class="mk">Brand vibe</div>
|
| 66 |
-
<div class="mv">Authoritative + Precise</div>
|
| 67 |
-
</div>
|
| 68 |
-
<div class="meta-card">
|
| 69 |
-
<div class="mk">Core metaphor</div>
|
| 70 |
-
<div class="mv">Compiler, not assistant</div>
|
| 71 |
-
</div>
|
| 72 |
-
<div class="meta-card">
|
| 73 |
-
<div class="mk">Alternative today</div>
|
| 74 |
-
<div class="mv">Long system prompts, Notion docs</div>
|
| 75 |
-
</div>
|
| 76 |
-
<div class="meta-card">
|
| 77 |
-
<div class="mk">The moat</div>
|
| 78 |
-
<div class="mv">Stale detection + evidence trail</div>
|
| 79 |
-
</div>
|
| 80 |
-
</div>
|
| 81 |
-
|
| 82 |
-
<hr class="divider">
|
| 83 |
-
|
| 84 |
-
<div class="section-label">Category point of view (POV)</div>
|
| 85 |
-
<div class="pov-block" style="margin-bottom: 2rem;">
|
| 86 |
-
<p>The old category — "knowledge management" — is about humans finding information. The new category is <strong style="color:var(--color-text-primary)">operational memory infrastructure</strong>: the persistent, executable layer that lets AI agents inherit a company's judgment. The race isn't between AI models. It's between companies that give their agents operational memory and those that don't.</p>
|
| 87 |
-
</div>
|
| 88 |
-
|
| 89 |
-
<hr class="divider">
|
| 90 |
-
|
| 91 |
-
<div class="section-label">Phonosemantics key — sound symbolism used</div>
|
| 92 |
-
<div style="display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 1.5rem;">
|
| 93 |
-
<span class="phono-pill p">P — plosive → authority, precision</span>
|
| 94 |
-
<span class="phono-pill l">L — liquid → intelligence, flow</span>
|
| 95 |
-
<span class="phono-pill f">F — fricative → speed, edge</span>
|
| 96 |
-
<span class="phono-pill" style="background:#FAECE7;color:#712B13;border-color:#F0997B;">N — nasal → warmth, connection</span>
|
| 97 |
-
<span class="phono-pill" style="background:#E6F1FB;color:#0C447C;border-color:#85B7EB;">K — hard plosive → technical force</span>
|
| 98 |
-
</div>
|
| 99 |
-
|
| 100 |
-
<div class="section-label">5 name candidates — linguistic breakdown + domain verification</div>
|
| 101 |
-
|
| 102 |
-
<!-- KERNL -->
|
| 103 |
-
<div class="name-card winner">
|
| 104 |
-
<div class="name-header">
|
| 105 |
-
<div class="name-title">Kernl</div>
|
| 106 |
-
<span class="winner-badge">★ top pick</span>
|
| 107 |
-
<div class="name-score">
|
| 108 |
-
<div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div>
|
| 109 |
-
</div>
|
| 110 |
-
</div>
|
| 111 |
-
<div class="name-tagline">"The operational kernel your AI agents run on."</div>
|
| 112 |
-
<div class="phono-row">
|
| 113 |
-
<span class="phono-pill p">K plosive — technical force</span>
|
| 114 |
-
<span class="phono-pill l">R liquid — intelligence</span>
|
| 115 |
-
<span class="phono-pill" style="background:#FAECE7;color:#712B13;border-color:#F0997B;">N nasal — familiar</span>
|
| 116 |
-
<span class="phono-pill" style="background:#E6F1FB;color:#0C447C;border-color:#85B7EB;">dropped 'e' — modern tech register</span>
|
| 117 |
-
</div>
|
| 118 |
-
<div class="name-reasoning">A kernel is the essential core of an operating system — the layer that mediates between hardware and everything above it. Kernl <em>is</em> that layer for AI agents: between raw company data and reliable automation. The dropped final 'e' (à la Tumblr, Flickr) signals a distinctly technical register. Infrastructure-grade naming — belongs alongside Redis, Kafka, Postgres.</div>
|
| 119 |
-
<div class="domain-row">
|
| 120 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> kernl.com</span>
|
| 121 |
-
<span class="domain-tag taken"><i class="ti ti-x" aria-hidden="true"></i> kernl.ai</span>
|
| 122 |
-
<span class="domain-tag taken"><i class="ti ti-x" aria-hidden="true"></i> kernl.io</span>
|
| 123 |
-
</div>
|
| 124 |
-
</div>
|
| 125 |
-
|
| 126 |
-
<!-- MELD -->
|
| 127 |
-
<div class="name-card">
|
| 128 |
-
<div class="name-header">
|
| 129 |
-
<div class="name-title">Meld</div>
|
| 130 |
-
<div class="name-score">
|
| 131 |
-
<div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot"></div>
|
| 132 |
-
</div>
|
| 133 |
-
</div>
|
| 134 |
-
<div class="name-tagline">"Melds scattered knowledge into a single executable mind."</div>
|
| 135 |
-
<div class="phono-row">
|
| 136 |
-
<span class="phono-pill" style="background:#FAECE7;color:#712B13;border-color:#F0997B;">M nasal — warmth, familiarity</span>
|
| 137 |
-
<span class="phono-pill l">L liquid — intelligence</span>
|
| 138 |
-
<span class="phono-pill p">D plosive — decisive, final</span>
|
| 139 |
-
<span class="phono-pill" style="background:#E6F1FB;color:#0C447C;border-color:#85B7EB;">1 syllable — maximum compression</span>
|
| 140 |
-
</div>
|
| 141 |
-
<div class="name-reasoning">To meld is to blend disparate elements into a unified whole. In card games, it means to lay down your hidden hand — revealing what was implicit. Both meanings map perfectly: Meld takes scattered, implicit operational knowledge and merges it into explicit, executable form. One syllable, pure infrastructure energy, zero ambiguity.</div>
|
| 142 |
-
<div class="domain-row">
|
| 143 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> meld.com</span>
|
| 144 |
-
<span class="domain-tag taken"><i class="ti ti-x" aria-hidden="true"></i> meld.ai</span>
|
| 145 |
-
<span class="domain-tag taken"><i class="ti ti-x" aria-hidden="true"></i> meld.io</span>
|
| 146 |
-
</div>
|
| 147 |
-
</div>
|
| 148 |
-
|
| 149 |
-
<!-- OPSLORE -->
|
| 150 |
-
<div class="name-card">
|
| 151 |
-
<div class="name-header">
|
| 152 |
-
<div class="name-title">Opslore</div>
|
| 153 |
-
<div class="name-score">
|
| 154 |
-
<div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot"></div>
|
| 155 |
-
</div>
|
| 156 |
-
</div>
|
| 157 |
-
<div class="name-tagline">"The living operational lore of your company, made executable."</div>
|
| 158 |
-
<div class="phono-row">
|
| 159 |
-
<span class="phono-pill p">P plosive — operational precision</span>
|
| 160 |
-
<span class="phono-pill f">S fricative — speed</span>
|
| 161 |
-
<span class="phono-pill l">L+R liquids — intelligence, depth</span>
|
| 162 |
-
</div>
|
| 163 |
-
<div class="name-reasoning">Lore is the body of accumulated, traditional knowledge belonging to a group — the unwritten rules, the cultural wisdom. "Opslore" is the operational lore of a company: how refunds get handled, why escalation chains exist, what the pricing exception rule actually is. The word has warmth and depth while remaining precise. Best domain position of any candidate — .com, .ai, and .io all clear.</div>
|
| 164 |
-
<div class="domain-row">
|
| 165 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> opslore.com</span>
|
| 166 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> opslore.ai</span>
|
| 167 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> opslore.io</span>
|
| 168 |
-
</div>
|
| 169 |
-
</div>
|
| 170 |
-
|
| 171 |
-
<!-- OPSCODEX -->
|
| 172 |
-
<div class="name-card">
|
| 173 |
-
<div class="name-header">
|
| 174 |
-
<div class="name-title">Opscodex</div>
|
| 175 |
-
<div class="name-score">
|
| 176 |
-
<div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot"></div>
|
| 177 |
-
</div>
|
| 178 |
-
</div>
|
| 179 |
-
<div class="name-tagline">"The compiled operational codex your agents execute from."</div>
|
| 180 |
-
<div class="phono-row">
|
| 181 |
-
<span class="phono-pill p">K+P plosives — double authority</span>
|
| 182 |
-
<span class="phono-pill" style="background:#EEEDFE;color:#3C3489;border-color:#AFA9EC;">X terminal — distinct, rare</span>
|
| 183 |
-
<span class="phono-pill" style="background:#E6F1FB;color:#0C447C;border-color:#85B7EB;">Codex etymology — compiled law</span>
|
| 184 |
-
</div>
|
| 185 |
-
<div class="name-reasoning">A codex was the ancient form of the book — sheets compiled and bound, replacing scrolls. Historically, codices preserved legal codes, canonical texts, laws. Opscodex is the compiled operational code of a company: the canonical, authoritative record of how things are decided. The terminal X adds sonic distinctiveness and technical sharpness. Carries scholarly gravitas — infrastructure, not a feature.</div>
|
| 186 |
-
<div class="domain-row">
|
| 187 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> opscodex.com</span>
|
| 188 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> opscodex.ai</span>
|
| 189 |
-
</div>
|
| 190 |
-
</div>
|
| 191 |
-
|
| 192 |
-
<!-- LOREKERN -->
|
| 193 |
-
<div class="name-card">
|
| 194 |
-
<div class="name-header">
|
| 195 |
-
<div class="name-title">Lorekern</div>
|
| 196 |
-
<div class="name-score">
|
| 197 |
-
<div class="dot filled"></div><div class="dot filled"></div><div class="dot filled"></div><div class="dot"></div><div class="dot"></div>
|
| 198 |
-
</div>
|
| 199 |
-
</div>
|
| 200 |
-
<div class="name-tagline">"The kernel of operational lore, distilled and executable."</div>
|
| 201 |
-
<div class="phono-row">
|
| 202 |
-
<span class="phono-pill l">L+R liquids — intelligence, flow</span>
|
| 203 |
-
<span class="phono-pill p">K plosive — technical core</span>
|
| 204 |
-
<span class="phono-pill" style="background:#FAECE7;color:#712B13;border-color:#F0997B;">N nasal — grounding</span>
|
| 205 |
-
</div>
|
| 206 |
-
<div class="name-reasoning">Morpheme blend of Lore (accumulated operational wisdom) and Kern (kernel/core). Reads as two concepts merged — like the product itself: taking the living lore of an organization and distilling it into an executable core. More descriptive and compound than the other candidates; works well if a human-warmth brand angle is preferred over pure infrastructure framing.</div>
|
| 207 |
-
<div class="domain-row">
|
| 208 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> lorekern.com</span>
|
| 209 |
-
<span class="domain-tag available"><i class="ti ti-check" aria-hidden="true"></i> lorekern.ai</span>
|
| 210 |
-
</div>
|
| 211 |
-
</div>
|
| 212 |
-
|
| 213 |
-
<hr class="divider">
|
| 214 |
-
|
| 215 |
-
<div class="section-label">Diamond test — top pick: Kernl</div>
|
| 216 |
-
<div class="diamond-grid">
|
| 217 |
-
<div class="diamond-item">
|
| 218 |
-
<div class="diamond-label">Distinctiveness</div>
|
| 219 |
-
<div class="diamond-bar-bg"><div class="diamond-bar-fill" style="width:96%"></div></div>
|
| 220 |
-
<div class="diamond-score">96</div>
|
| 221 |
-
</div>
|
| 222 |
-
<div class="diamond-item">
|
| 223 |
-
<div class="diamond-label">Processing fluency</div>
|
| 224 |
-
<div class="diamond-bar-bg"><div class="diamond-bar-fill" style="width:95%"></div></div>
|
| 225 |
-
<div class="diamond-score">95</div>
|
| 226 |
-
</div>
|
| 227 |
-
<div class="diamond-item">
|
| 228 |
-
<div class="diamond-label">Relevance</div>
|
| 229 |
-
<div class="diamond-bar-bg"><div class="diamond-bar-fill" style="width:97%"></div></div>
|
| 230 |
-
<div class="diamond-score">97</div>
|
| 231 |
-
</div>
|
| 232 |
-
<div class="diamond-item">
|
| 233 |
-
<div class="diamond-label">Energy</div>
|
| 234 |
-
<div class="diamond-bar-bg"><div class="diamond-bar-fill" style="width:88%"></div></div>
|
| 235 |
-
<div class="diamond-score">88</div>
|
| 236 |
-
</div>
|
| 237 |
-
</div>
|
| 238 |
-
|
| 239 |
-
<div class="rec-block">
|
| 240 |
-
<div class="rec-title">Final recommendation: Kernl</div>
|
| 241 |
-
<div class="rec-text">Register <strong>kernl.com</strong> immediately. The kernel metaphor is structurally perfect — it is the deepest, most precise analogy in the OS/infra vocabulary for what this product does. The hard K plosive delivers maximum technical authority. The dropped 'e' places it firmly in infrastructure naming tradition. It scales: "your company's Kernl", "deploy Kernl", "the Kernl API". It competes with Redis and Kafka on naming gravity, which is exactly the positioning the PRD demands.</div>
|
| 242 |
-
</div>
|
| 243 |
-
|
| 244 |
-
<hr class="divider">
|
| 245 |
-
|
| 246 |
-
<div class="section-label">Visual system direction</div>
|
| 247 |
-
<table class="positioning-table">
|
| 248 |
-
<tr><td>Mark style</td><td>Wordmark only. No icon. Infrastructure products don't need icons — they are the icon. Monospace or geometric sans. Think Stripe, Linear, Vercel.</td></tr>
|
| 249 |
-
<tr><td>Color</td><td>Single accent on near-black ground. Deep teal (#0F6E56) or electric indigo — evokes precision and living systems without the generic "AI blue" trap.</td></tr>
|
| 250 |
-
<tr><td>Voice</td><td>Declarative. Short sentences. Never explain — demonstrate. "12 skills. 58 seconds. Evidence-linked." — not "our platform leverages AI to..."</td></tr>
|
| 251 |
-
<tr><td>Tagline direction</td><td>"Operational memory for AI agents." — or — "Your AI knows how your company works."</td></tr>
|
| 252 |
-
<tr><td>Pitch one-liner</td><td>"Kernl compiles how your company decides into an executable skills file. Any agent. Any task. Correct every time."</td></tr>
|
| 253 |
-
</table>
|
| 254 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
company_brain_PRD_v4.md
DELETED
|
@@ -1,1061 +0,0 @@
|
|
| 1 |
-
# Company Brain — Product Requirements Document
|
| 2 |
-
**Version:** 4.0 — Final (Pre-Build, All Issues Resolved)
|
| 3 |
-
**Date:** May 4, 2026
|
| 4 |
-
**Authors:** Abhijith Pingali, Harshit Anand
|
| 5 |
-
**Status:** Final — Build starts post-kickoff
|
| 6 |
-
|
| 7 |
-
> **v4 changes over v3:**
|
| 8 |
-
> 1. Ground truth table completed — all 12 Rivanly scenarios with expected action + skill
|
| 9 |
-
> 2. `with_brain: false` behaviour fully documented in Section 9
|
| 10 |
-
> 3. Section 10 user flow added — screen-to-screen navigation with decision points
|
| 11 |
-
> 4. Competitive landscape updated with 8 real companies identified in LinkedIn thread
|
| 12 |
-
> 5. Risk table updated: "knowledge never captured" risk added from Paul Breuler's comment
|
| 13 |
-
> 6. Section 2.5 added: "The Stale Knowledge Problem" — validates drift detection as core feature
|
| 14 |
-
> 7. Section 15 updated: execution boundary insight from Horizon Labs added to v2 roadmap
|
| 15 |
-
|
| 16 |
-
---
|
| 17 |
-
|
| 18 |
-
## 1. Executive Summary
|
| 19 |
-
|
| 20 |
-
**Problem:** AI agents deployed by B2B companies behave like a new hire on day one — they lack the operational judgment embedded in how the company actually decides things. This knowledge lives in Slack threads, SOPs, support tickets, and people's heads, invisible to any model.
|
| 21 |
-
|
| 22 |
-
**Solution:** Company Brain is a compilation layer that extracts this operational judgment and produces a versioned, evidence-linked, executable skills file any AI agent can consume to act like the company's best employee.
|
| 23 |
-
|
| 24 |
-
**Success Criteria (Hackathon v0):**
|
| 25 |
-
|
| 26 |
-
| KPI | Target |
|
| 27 |
-
|---|---|
|
| 28 |
-
| Full compilation pipeline: sources → 12 skills | Completes without error, every run |
|
| 29 |
-
| Skills with confidence ≥ 0.7 | ≥ 10 of 12 |
|
| 30 |
-
| Brain agent: correct action on all Rivanly scenarios | 12 / 12 correct |
|
| 31 |
-
| Compilation time on AMD MI300X | < 90s (target 60s) |
|
| 32 |
-
| Brain agent response latency | < 8s per query |
|
| 33 |
-
|
| 34 |
-
---
|
| 35 |
-
|
| 36 |
-
## 2. Problem Statement & Solution
|
| 37 |
-
|
| 38 |
-
### 2.1 The Problem
|
| 39 |
-
|
| 40 |
-
Every company trying to deploy AI automation hits the same wall. The models are good enough. The infrastructure is available. But the AI behaves like a new hire on day one — it doesn't know how the company actually operates.
|
| 41 |
-
|
| 42 |
-
Refund policies live in Priya's head. Pricing exceptions get decided in Slack threads nobody archived. Escalation chains exist because three incidents taught the team the hard way. This operational knowledge — how the company actually decides things — is invisible to AI agents.
|
| 43 |
-
|
| 44 |
-
Existing solutions miss this entirely. RAG retrieves document chunks. Chatbots answer questions. Neither gives an AI agent the operational judgment to do real work correctly and consistently.
|
| 45 |
-
|
| 46 |
-
### 2.2 The Solution
|
| 47 |
-
|
| 48 |
-
Company Brain is the missing compilation layer. It extracts the operational judgment embedded in how a company behaves — not what it documents, but how it actually decides — and compiles it into an executable, versioned, living skills file that any AI agent can use.
|
| 49 |
-
|
| 50 |
-
**Agents are compilers, not assistants.** Company Brain's extraction agents do not summarize or search. They convert messy human behavior into structured, executable logic. The downstream brain agent that does real work is a consumer of that compiled output — it never reasons from scratch.
|
| 51 |
-
|
| 52 |
-
### 2.3 One-Line Pitch
|
| 53 |
-
|
| 54 |
-
> "We turn how your company actually operates into an executable Company Brain. Any agent can use it to do real work without guessing."
|
| 55 |
-
|
| 56 |
-
### 2.4 Product Positioning
|
| 57 |
-
|
| 58 |
-
Company Brain is **infrastructure, not a feature.**
|
| 59 |
-
|
| 60 |
-
| What it is NOT | What it IS |
|
| 61 |
-
|---|---|
|
| 62 |
-
| RAG over documents | Compiler of operational judgment |
|
| 63 |
-
| Chatbot over your data | Executable skills file for AI agents |
|
| 64 |
-
| A search engine | A living map of how your company works |
|
| 65 |
-
| One-time snapshot | Versioned, updatable, drift-aware |
|
| 66 |
-
|
| 67 |
-
### 2.5 The Stale Knowledge Problem (Why "Living" Matters)
|
| 68 |
-
|
| 69 |
-
*Validated by multiple practitioners in the YC RFS LinkedIn thread.*
|
| 70 |
-
|
| 71 |
-
The hardest part of any knowledge system is not building it — it is keeping it alive. Most companies will document their workflows once, ship the AI agent, and within six weeks the map diverges from reality. A new pricing exception gets approved in a Slack DM. An escalation chain changes when someone leaves. The AI keeps following the old rules.
|
| 72 |
-
|
| 73 |
-
Company Brain's stale detection — SHA-256 hashing of source files, `stale: true` badges on affected skills, and recompile triggers — directly solves this. The skills file is not a document. It is a living artifact that stays current with how the company actually evolves.
|
| 74 |
-
|
| 75 |
-
This is not a minor feature. It is the moat.
|
| 76 |
-
|
| 77 |
-
### 2.6 What Company Brain Does NOT Solve (v0)
|
| 78 |
-
|
| 79 |
-
*Acknowledged risk from Paul Breuler (BaseState founder), LinkedIn thread:*
|
| 80 |
-
|
| 81 |
-
> "The decisions that matter happen in context, on the ground, and were never captured in a ticket or Slack thread."
|
| 82 |
-
|
| 83 |
-
Company Brain compiles knowledge that was captured somewhere — Slack, SOPs, tickets, call transcripts. Knowledge that exists only in someone's head and was never written down or discussed in any recorded channel cannot be extracted. This is a known limitation. The pitch should never claim to capture all company knowledge — only the knowledge that was communicated in any digital form.
|
| 84 |
-
|
| 85 |
-
For v1, voice call transcription addresses a portion of this gap. For v2, an active knowledge capture interface (where employees record decisions as they happen) closes it further.
|
| 86 |
-
|
| 87 |
-
---
|
| 88 |
-
|
| 89 |
-
## 3. Target Customer & User Personas
|
| 90 |
-
|
| 91 |
-
### 3.1 Primary Wedge — v1
|
| 92 |
-
|
| 93 |
-
**B2B SaaS companies, 10–50 employees, actively deploying AI automation for the first time.**
|
| 94 |
-
|
| 95 |
-
These companies have:
|
| 96 |
-
- Enough operational complexity that AI agents fail without context
|
| 97 |
-
- Enough technical sophistication to understand why RAG isn't solving their problem
|
| 98 |
-
- Enough urgency to pay for a solution (they are actively trying and failing to deploy AI)
|
| 99 |
-
- Not enough resources to build this infrastructure themselves
|
| 100 |
-
|
| 101 |
-
### 3.2 User Personas
|
| 102 |
-
|
| 103 |
-
| Persona | Role | Primary Goal | Pain Point |
|
| 104 |
-
|---|---|---|---|
|
| 105 |
-
| **Ops Owner** | Head of Operations / Founder | Get AI agents to handle work consistently | Agents hallucinate edge cases; policies go stale |
|
| 106 |
-
| **AI Builder** | Developer / Automation Lead | Consume company knowledge in agent prompts | No structured source of truth to inject into prompts |
|
| 107 |
-
| **Agent Consumer** | Support agent, AM, anyone using the AI | Get correct, policy-backed responses instantly | Generic AI responses that don't match company policy |
|
| 108 |
-
| **Demo Viewer / Judge** | Hackathon judge, investor, prospect | Understand what the product does in 5 minutes | Can't distinguish this from "just another RAG tool" |
|
| 109 |
-
|
| 110 |
-
### 3.3 Fictional Reference Customer — Rivanly Inc.
|
| 111 |
-
|
| 112 |
-
Rivanly is a 15-person B2B SaaS company used throughout this document and the demo. 6 departments, 12 operational skills. Enough complexity to make the product real, small enough to demo in 5 minutes.
|
| 113 |
-
|
| 114 |
-
### 3.4 Expanded Customer Universe — v2+
|
| 115 |
-
|
| 116 |
-
- E-commerce operators (refund, shipping, returns automation)
|
| 117 |
-
- Agencies (client approval, scope change, billing exception workflows)
|
| 118 |
-
- Healthcare admin (referral routing, prior authorization, scheduling exceptions)
|
| 119 |
-
- Legal operations (intake, escalation, matter routing)
|
| 120 |
-
|
| 121 |
-
---
|
| 122 |
-
|
| 123 |
-
## 4. Jobs To Be Done
|
| 124 |
-
|
| 125 |
-
| Job | Current Solution | Problem |
|
| 126 |
-
|---|---|---|
|
| 127 |
-
| "I want an AI agent to handle customer refunds correctly" | Write a long system prompt with refund rules | Rules go stale, edge cases missed, no evidence trail |
|
| 128 |
-
| "I need to onboard a new AI tool to how we operate" | Document everything manually in Notion | Takes weeks, immediately outdated, agent still hallucinates |
|
| 129 |
-
| "I want to know if my AI agent is following company policy" | Read agent logs manually | No structured audit trail linking actions to rules |
|
| 130 |
-
| "We updated our pricing policy — the AI needs to know" | Edit the system prompt manually | No systematic way to detect or propagate policy changes |
|
| 131 |
-
| "Why did the agent make that decision?" | Cannot answer | No evidence chain from agent action back to source |
|
| 132 |
-
|
| 133 |
-
---
|
| 134 |
-
|
| 135 |
-
## 5. User Stories
|
| 136 |
-
|
| 137 |
-
### Source Ingestion & File Handling
|
| 138 |
-
|
| 139 |
-
1. As an Ops Owner, I want to upload `.md` Notion SOPs so that my written policies are ingested without manual reformatting.
|
| 140 |
-
2. As an Ops Owner, I want to upload Slack JSON exports so that informal decision patterns from real conversations are captured.
|
| 141 |
-
3. As an Ops Owner, I want to upload Zendesk ticket JSON exports so that resolved case reasoning is extracted as evidence.
|
| 142 |
-
4. As an Ops Owner, I want the system to detect unchanged files by SHA-256 hash so that re-uploading a file doesn't trigger unnecessary re-extraction.
|
| 143 |
-
5. As an Ops Owner, I want a clear parse error message when a file is malformed so that I know exactly which file to fix.
|
| 144 |
-
6. As an Ops Owner, I want unsupported file types to be rejected with a helpful error so that I don't wait for a compilation that will fail.
|
| 145 |
-
7. As an Ops Owner, I want source files stored in Supabase so that I don't need to re-upload them on every compile.
|
| 146 |
-
|
| 147 |
-
### Compilation Pipeline
|
| 148 |
-
|
| 149 |
-
8. As an Ops Owner, I want 4 extraction agents to run in parallel on AMD MI300X so that compilation completes under 90 seconds instead of 8+ minutes.
|
| 150 |
-
9. As an Ops Owner, I want IF-THEN-EXCEPT decision rules extracted from Slack threads so that informal decisions become structured, executable policies.
|
| 151 |
-
10. As an Ops Owner, I want sequential process steps extracted from SOPs and runbooks so that workflow sequences are captured correctly.
|
| 152 |
-
11. As an Ops Owner, I want edge cases, overrides, and "unless..." patterns extracted specifically so that exception logic isn't lost in summarization.
|
| 153 |
-
12. As an Ops Owner, I want contradictions between SOPs and actual Slack/ticket behavior flagged so that I can identify and resolve policy drift.
|
| 154 |
-
13. As an Ops Owner, I want skills with confidence below 0.6 to be flagged for human review rather than auto-published so that only verified rules go live.
|
| 155 |
-
14. As an Ops Owner, I want each decision rule backlinked to its source file and excerpt so that every policy is auditable, not asserted.
|
| 156 |
-
15. As an Ops Owner, I want the system to retry once if the LLM returns malformed JSON so that a single bad LLM response doesn't abort the whole compile.
|
| 157 |
-
16. As an Ops Owner, I want a clear compile error message if vLLM becomes unreachable so that I know the issue is infrastructure, not my data.
|
| 158 |
-
17. As a Developer, I want LangGraph checkpointing via MemorySaver so that a crashed compile can be inspected and does not silently lose data.
|
| 159 |
-
|
| 160 |
-
### Skills File & Schema
|
| 161 |
-
|
| 162 |
-
18. As an Ops Owner, I want each skill stored as a versioned JSON object with id, name, domain, confidence, decision_logic, forbidden_actions, escalation_chain, and evidence_sources so that the schema is complete and consistent.
|
| 163 |
-
19. As an Ops Owner, I want skills converted to markdown at query time so that they are injected into LLM prompts efficiently.
|
| 164 |
-
20. As an Ops Owner, I want the meta block of the skills file to store source hashes so that stale skills can be detected when source files change.
|
| 165 |
-
21. As an Ops Owner, I want the skills file versioned with semver so that every compile produces a traceable snapshot.
|
| 166 |
-
|
| 167 |
-
### Version Management & Drift Detection
|
| 168 |
-
|
| 169 |
-
22. As an Ops Owner, I want to compare any two historical brain versions in a diff view so that I can see exactly what changed after a policy update.
|
| 170 |
-
23. As an Ops Owner, I want changed rules highlighted in the diff (added green, removed red, modified yellow) so that I don't have to read everything to spot changes.
|
| 171 |
-
24. As an Ops Owner, I want stale skills badged in the Skills Viewer so that I know which skills need recompilation after a source file changed.
|
| 172 |
-
25. As an Ops Owner, I want at least 2 pre-seeded historical versions in the demo so that the diff view is usable on day one.
|
| 173 |
-
|
| 174 |
-
### Brain Dashboard (Frontend)
|
| 175 |
-
|
| 176 |
-
26. As an Ops Owner, I want a "Build Company Brain" button on the dashboard so that I can trigger recompilation from the UI without touching a terminal.
|
| 177 |
-
27. As an Ops Owner, I want the button to be disabled with a spinner during an active compile so that I can't trigger duplicate jobs.
|
| 178 |
-
28. As an Ops Owner, I want a real-time SSE feed showing each pipeline node completing with timestamps so that I trust the system is working.
|
| 179 |
-
29. As an Ops Owner, I want the compilation time displayed to the second so that I can use this as a live AMD MI300X proof point.
|
| 180 |
-
30. As an Ops Owner, I want the current brain version and last-compiled timestamp visible at a glance so that I know which brain is active.
|
| 181 |
-
|
| 182 |
-
### Skills Viewer (Frontend)
|
| 183 |
-
|
| 184 |
-
31. As an Ops Owner, I want skills grouped by department so that I can navigate to the right area quickly.
|
| 185 |
-
32. As an Ops Owner, I want a visual confidence bar per skill so that I can immediately see which skills are strong vs. uncertain without reading numbers.
|
| 186 |
-
33. As an Ops Owner, I want to expand any skill and see all its decision conditions and forbidden actions so that I can verify the rules are correct.
|
| 187 |
-
34. As an Ops Owner, I want the evidence panel per skill to show source file names and excerpts so that I can trace every policy back to where it came from.
|
| 188 |
-
|
| 189 |
-
### Brain Agent (Demo)
|
| 190 |
-
|
| 191 |
-
35. As an AI Builder, I want to submit a natural language scenario to the brain agent so that I get a structured action recommendation with evidence, not a guess.
|
| 192 |
-
36. As an AI Builder, I want the response to include the exact rule condition that matched so that I can verify the logic is correct.
|
| 193 |
-
37. As an AI Builder, I want the agent to gracefully handle scenarios with no matching skill so that low-confidence situations escalate to a human rather than produce a wrong answer.
|
| 194 |
-
38. As a Demo Viewer / Judge, I want to see the agent without the brain respond generically to the same scenario so that the value of the compilation layer is immediately obvious.
|
| 195 |
-
39. As a Demo Viewer / Judge, I want to see the "Change a SOP rule → Rebuild → same scenario → different outcome" flow so that I understand this is a living map, not a static snapshot.
|
| 196 |
-
|
| 197 |
-
---
|
| 198 |
-
|
| 199 |
-
## 6. Product Scope
|
| 200 |
-
|
| 201 |
-
### 6.1 Three-Ring Model
|
| 202 |
-
|
| 203 |
-
| Ring | Name | Timeline | What Ships |
|
| 204 |
-
|---|---|---|---|
|
| 205 |
-
| **Ring 1** | Hackathon v0 | May 4–10, 2026 | Offline compiler, Rivanly demo, file upload inputs, brain agent demo |
|
| 206 |
-
| **Ring 2** | Product v1 | 4–6 weeks post-hackathon | Live connectors, multi-tenant, real company data, auth |
|
| 207 |
-
| **Ring 3** | Scale | 2–6 months | Agent SDK, skills marketplace, audit trails, RBAC |
|
| 208 |
-
|
| 209 |
-
### 6.2 Hackathon v0 — In Scope
|
| 210 |
-
|
| 211 |
-
- Multi-agent compilation pipeline (LangGraph, 4 parallel async extraction agents)
|
| 212 |
-
- 6-department, 12-skill coverage of Rivanly Inc.
|
| 213 |
-
- Synthetic dataset (8 source files authored before kickoff)
|
| 214 |
-
- Skills file: JSON storage, markdown runtime, evidence-linked, confidence-scored, versioned
|
| 215 |
-
- Brain agent: scenario input → in-memory skill match → structured response with rule trace
|
| 216 |
-
- Frontend: Brain Dashboard + Skills Viewer + Demo Agent panel
|
| 217 |
-
- Real-time SSE compilation progress feed
|
| 218 |
-
- Brain version diffing (v1.2 → v1.3 what changed)
|
| 219 |
-
- AMD MI300X deployment via vLLM (`RedHatAI/Qwen2.5-72B-Instruct-FP8-dynamic`)
|
| 220 |
-
- Side-by-side "with brain vs. without brain" comparison panel — **P0, the money shot**
|
| 221 |
-
- Build in Public: 2 posts on X/LinkedIn during build
|
| 222 |
-
|
| 223 |
-
### 6.3 Out of Scope for v0
|
| 224 |
-
|
| 225 |
-
- Real Slack, Notion, Zendesk OAuth connectors — file upload only
|
| 226 |
-
- Multi-tenant isolation — single company demo
|
| 227 |
-
- Auth / login — none required for demo
|
| 228 |
-
- Redis job queue — direct `graph.ainvoke()` only
|
| 229 |
-
- pgvector — in-memory sentence-transformers for v0 skill matching
|
| 230 |
-
- Webhook-triggered recompilation
|
| 231 |
-
- Human skill review queue UI
|
| 232 |
-
|
| 233 |
-
### 6.4 Team Ownership
|
| 234 |
-
|
| 235 |
-
| Owner | Scope |
|
| 236 |
-
|---|---|
|
| 237 |
-
| **Abhijith** | F-01, F-02, F-03, F-04, F-05, F-06, F-07, F-12 (pipeline + API) |
|
| 238 |
-
| **Harshit** | F-08, F-09, F-10, F-11 (all frontend) |
|
| 239 |
-
| **Both** | Synthetic dataset — 4 files each, done before May 4 kickoff |
|
| 240 |
-
|
| 241 |
-
---
|
| 242 |
-
|
| 243 |
-
## 7. Feature Requirements
|
| 244 |
-
|
| 245 |
-
Priority: **[P0]** = demo breaks without it · **[P1]** = must ship · **[P2]** = ship if time allows
|
| 246 |
-
|
| 247 |
-
---
|
| 248 |
-
|
| 249 |
-
### F-01: Source Ingestion [P0]
|
| 250 |
-
|
| 251 |
-
**Functional Requirements:**
|
| 252 |
-
- Accept `.md`, `.json`, `.txt` file uploads
|
| 253 |
-
- Parse Notion SOP markdown → `structured_sops[]`
|
| 254 |
-
- Parse Slack export JSON → `normalized_events[]`
|
| 255 |
-
- Parse ticket JSON → `resolved_cases[]`
|
| 256 |
-
- Compute SHA-256 hash per file; compare to previous run; skip unchanged files
|
| 257 |
-
- No LLM calls at this stage — pure Python parsing only
|
| 258 |
-
|
| 259 |
-
**Acceptance Criteria:**
|
| 260 |
-
|
| 261 |
-
*AC-01-1:*
|
| 262 |
-
- **Given** a valid Notion SOP `.md` file is uploaded
|
| 263 |
-
- **When** the ingest node runs
|
| 264 |
-
- **Then** `structured_sops` contains at least one entry with `source`, `content`, and `type` fields
|
| 265 |
-
|
| 266 |
-
*AC-01-2:*
|
| 267 |
-
- **Given** a file was uploaded in a previous compile with hash `H`
|
| 268 |
-
- **When** the same file is uploaded again unchanged
|
| 269 |
-
- **Then** the ingestion node skips extraction for that file and logs "hash match, skipping"
|
| 270 |
-
|
| 271 |
-
*AC-01-3:*
|
| 272 |
-
- **Given** a malformed JSON file is uploaded
|
| 273 |
-
- **When** the ingest node attempts to parse it
|
| 274 |
-
- **Then** the SSE stream emits `node_error` with `file`, `error: "parse_error"`, and `detail` — and the compile continues with remaining files
|
| 275 |
-
|
| 276 |
-
*AC-01-4:*
|
| 277 |
-
- **Given** an unsupported file type (e.g. `.xlsx`) is uploaded
|
| 278 |
-
- **When** `POST /sources/upload` is called
|
| 279 |
-
- **Then** the API returns `400` with `{"error": "unsupported_file_type", "accepted": [".md", ".json", ".txt"]}`
|
| 280 |
-
|
| 281 |
-
---
|
| 282 |
-
|
| 283 |
-
### F-02: Parallel Extraction [P0]
|
| 284 |
-
|
| 285 |
-
**Functional Requirements:**
|
| 286 |
-
- Four async LangGraph nodes run simultaneously via `Send` API + `await llm.ainvoke()`
|
| 287 |
-
- Decision Extractor: IF-THEN-EXCEPT judgment patterns from Slack + tickets
|
| 288 |
-
- Workflow Extractor: sequential process steps from SOPs and runbooks
|
| 289 |
-
- Exception Extractor: edge cases, overrides, "unless..." patterns
|
| 290 |
-
- Contradiction Detector: divergence between SOPs and actual behavior
|
| 291 |
-
- All four target `RedHatAI/Qwen2.5-72B-Instruct-FP8-dynamic` on AMD MI300X via vLLM
|
| 292 |
-
|
| 293 |
-
**Acceptance Criteria:**
|
| 294 |
-
|
| 295 |
-
*AC-02-1:*
|
| 296 |
-
- **Given** all three ingest nodes have completed
|
| 297 |
-
- **When** `route_to_extractors` is called
|
| 298 |
-
- **Then** all four extraction nodes start within 2 seconds of each other
|
| 299 |
-
|
| 300 |
-
*AC-02-2:*
|
| 301 |
-
- **Given** the Rivanly synthetic dataset
|
| 302 |
-
- **When** extraction completes
|
| 303 |
-
- **Then** each extractor returns a non-empty list; `contradictions[]` contains ≥ 1 entry
|
| 304 |
-
|
| 305 |
-
*AC-02-3:*
|
| 306 |
-
- **Given** the LLM returns malformed JSON for one extractor
|
| 307 |
-
- **When** the node catches the error
|
| 308 |
-
- **Then** it retries once with a stricter JSON-only prompt; if still malformed, returns empty list and emits `node_error` without aborting other extractors
|
| 309 |
-
|
| 310 |
-
*AC-02-4:*
|
| 311 |
-
- **Given** all four async extractors complete
|
| 312 |
-
- **When** wall clock is checked
|
| 313 |
-
- **Then** total extraction time is under 45 seconds on MI300X
|
| 314 |
-
|
| 315 |
-
---
|
| 316 |
-
|
| 317 |
-
### F-03: Skill Compilation [P0]
|
| 318 |
-
|
| 319 |
-
**Functional Requirements:**
|
| 320 |
-
- Synthesize extractor outputs into 12 canonical skill objects
|
| 321 |
-
- Evidence linker: backfill `evidence_sources[]` for every `decision_logic` entry
|
| 322 |
-
- Confidence scorer: `f(source_count, source_recency, internal_consistency)`
|
| 323 |
-
- Skills below 0.6 confidence: present with `"review_required": true`, not auto-published
|
| 324 |
-
- Write `skills_file.json` to Supabase `skills_files` table with incremented semver
|
| 325 |
-
|
| 326 |
-
**Acceptance Criteria:**
|
| 327 |
-
|
| 328 |
-
*AC-03-1:*
|
| 329 |
-
- **Given** all extraction nodes have produced output
|
| 330 |
-
- **When** `synthesize_skills` runs
|
| 331 |
-
- **Then** output contains exactly 12 skill objects, each with all required schema fields
|
| 332 |
-
|
| 333 |
-
*AC-03-2:*
|
| 334 |
-
- **Given** a skill has been synthesized
|
| 335 |
-
- **When** `link_evidence` runs
|
| 336 |
-
- **Then** every `decision_logic` entry has at least one `evidence_sources` entry with non-empty `source` and `excerpt`
|
| 337 |
-
|
| 338 |
-
*AC-03-3:*
|
| 339 |
-
- **Given** a skill has only one supporting source
|
| 340 |
-
- **When** `score_confidence` runs
|
| 341 |
-
- **Then** that skill's `confidence` is below 0.7 and `review_required` is `true` if below 0.6
|
| 342 |
-
|
| 343 |
-
*AC-03-4:*
|
| 344 |
-
- **Given** compilation succeeds
|
| 345 |
-
- **When** `write_brain` runs
|
| 346 |
-
- **Then** `skills_files` table gains a new row with semver one minor bump higher, `is_current: true`, and all previous rows `is_current: false`
|
| 347 |
-
|
| 348 |
-
---
|
| 349 |
-
|
| 350 |
-
### F-04: Skills File Format [P0]
|
| 351 |
-
|
| 352 |
-
**Schema (per skill):**
|
| 353 |
-
```json
|
| 354 |
-
{
|
| 355 |
-
"id": "handle_refund_request",
|
| 356 |
-
"name": "Handle Refund Request",
|
| 357 |
-
"domain": "support",
|
| 358 |
-
"version": "1.2",
|
| 359 |
-
"confidence": 0.91,
|
| 360 |
-
"stale": false,
|
| 361 |
-
"review_required": false,
|
| 362 |
-
"last_updated": "2026-05-04T09:30:00Z",
|
| 363 |
-
"trigger": {
|
| 364 |
-
"phrases": ["refund", "money back"],
|
| 365 |
-
"conditions": ["customer mentions payment dissatisfaction"]
|
| 366 |
-
},
|
| 367 |
-
"decision_logic": [
|
| 368 |
-
{
|
| 369 |
-
"condition": "plan == 'annual' AND days_since_purchase <= 14",
|
| 370 |
-
"action": "approve_full_refund",
|
| 371 |
-
"note": "No-questions policy within 14 days.",
|
| 372 |
-
"evidence_sources": [
|
| 373 |
-
{ "source": "notion_refund_sop.md", "excerpt": "...", "confidence": 0.95 }
|
| 374 |
-
]
|
| 375 |
-
}
|
| 376 |
-
],
|
| 377 |
-
"forbidden_actions": ["Never process refunds for lifetime deal accounts"],
|
| 378 |
-
"escalation_chain": ["support_agent", "support_lead", "account_manager", "founder"],
|
| 379 |
-
"sla": "respond_within_2h, resolve_within_24h"
|
| 380 |
-
}
|
| 381 |
-
```
|
| 382 |
-
|
| 383 |
-
**Acceptance Criteria:**
|
| 384 |
-
|
| 385 |
-
*AC-04-1:*
|
| 386 |
-
- **Given** the compiled skills file
|
| 387 |
-
- **When** validated against JSON schema
|
| 388 |
-
- **Then** zero validation errors
|
| 389 |
-
|
| 390 |
-
*AC-04-2:*
|
| 391 |
-
- **Given** a skill selected for prompt injection
|
| 392 |
-
- **When** converted to markdown
|
| 393 |
-
- **Then** output is plain English, contains all conditions and forbidden actions, under 800 tokens
|
| 394 |
-
|
| 395 |
-
---
|
| 396 |
-
|
| 397 |
-
### F-05: Brain Version Management [P1]
|
| 398 |
-
|
| 399 |
-
**Acceptance Criteria:**
|
| 400 |
-
|
| 401 |
-
*AC-05-1:*
|
| 402 |
-
- **Given** one source file changed and recompilation triggered
|
| 403 |
-
- **When** compile finishes
|
| 404 |
-
- **Then** new brain version is a minor bump (`1.2.0 → 1.3.0`) and diff endpoint returns that file's dependent skills as `modified_skills`
|
| 405 |
-
|
| 406 |
-
*AC-05-2:*
|
| 407 |
-
- **Given** two brain versions exist
|
| 408 |
-
- **When** `GET /diff/1.2.0/1.3.0` is called
|
| 409 |
-
- **Then** response contains `added_skills`, `removed_skills`, and `modified_skills` with per-skill field-level changes
|
| 410 |
-
|
| 411 |
-
*AC-05-3:*
|
| 412 |
-
- **Given** a source file changes
|
| 413 |
-
- **When** the new compile runs
|
| 414 |
-
- **Then** skills whose `evidence_sources` reference that file have `stale: true`
|
| 415 |
-
|
| 416 |
-
---
|
| 417 |
-
|
| 418 |
-
### F-06: Scenario Handling — Brain Agent [P0]
|
| 419 |
-
|
| 420 |
-
**Functional Requirements:**
|
| 421 |
-
- Accept natural language scenario input + optional structured context
|
| 422 |
-
- Embed query via `all-MiniLM-L6-v2` (in-memory, CPU); pre-compute skill embeddings once at startup
|
| 423 |
-
- Cosine similarity match → select top skill
|
| 424 |
-
- Convert skill JSON → markdown snippet
|
| 425 |
-
- Single LLM call: company context + skill rules + scenario
|
| 426 |
-
- Return structured response (F-07)
|
| 427 |
-
|
| 428 |
-
**Acceptance Criteria:**
|
| 429 |
-
|
| 430 |
-
*AC-06-1:*
|
| 431 |
-
- **Given** an enterprise refund scenario
|
| 432 |
-
- **When** `POST /agent/handle` is called
|
| 433 |
-
- **Then** matched skill is `handle_refund_request` (cosine similarity > 0.6)
|
| 434 |
-
|
| 435 |
-
*AC-06-2:*
|
| 436 |
-
- **Given** all 12 Rivanly demo scenarios submitted in sequence
|
| 437 |
-
- **When** each response reviewed
|
| 438 |
-
- **Then** all 12 return correct action (verified against ground truth table in Section 12)
|
| 439 |
-
|
| 440 |
-
*AC-06-3:*
|
| 441 |
-
- **Given** a scenario matching no skill above cosine 0.4
|
| 442 |
-
- **When** match function runs
|
| 443 |
-
- **Then** response is `{"action": "escalate_to_human", "reason": "no_skill_match", "confidence": <score>}` — not an error, not a hallucination
|
| 444 |
-
|
| 445 |
-
*AC-06-4:*
|
| 446 |
-
- **Given** a valid scenario submitted
|
| 447 |
-
- **When** response returned
|
| 448 |
-
- **Then** wall-clock latency under 8 seconds
|
| 449 |
-
|
| 450 |
-
---
|
| 451 |
-
|
| 452 |
-
### F-07: Response Structure [P0]
|
| 453 |
-
|
| 454 |
-
Every `POST /agent/handle` response:
|
| 455 |
-
|
| 456 |
-
```json
|
| 457 |
-
{
|
| 458 |
-
"action": "escalate_to_am_within_1hr",
|
| 459 |
-
"message_to_customer": "...",
|
| 460 |
-
"rule_applied": "plan == 'enterprise' AND any_amount",
|
| 461 |
-
"evidence": {
|
| 462 |
-
"source": "slack_thread_2024-03-12",
|
| 463 |
-
"excerpt": "enterprise = always AM"
|
| 464 |
-
},
|
| 465 |
-
"skill_matched": "handle_refund_request",
|
| 466 |
-
"confidence": 0.91
|
| 467 |
-
}
|
| 468 |
-
```
|
| 469 |
-
|
| 470 |
-
**Acceptance Criteria:**
|
| 471 |
-
|
| 472 |
-
*AC-07-1:*
|
| 473 |
-
- **Given** any valid scenario input
|
| 474 |
-
- **When** brain agent responds
|
| 475 |
-
- **Then** all six top-level fields present and non-null
|
| 476 |
-
|
| 477 |
-
*AC-07-2:*
|
| 478 |
-
- **Given** the response `rule_applied` field
|
| 479 |
-
- **When** compared to matched skill's `decision_logic`
|
| 480 |
-
- **Then** string matches an exact `condition` field — never paraphrased
|
| 481 |
-
|
| 482 |
-
---
|
| 483 |
-
|
| 484 |
-
### F-08: Brain Dashboard [P0]
|
| 485 |
-
|
| 486 |
-
**Acceptance Criteria:**
|
| 487 |
-
|
| 488 |
-
*AC-08-1:*
|
| 489 |
-
- **Given** the dashboard is loaded
|
| 490 |
-
- **When** user clicks "Build Company Brain"
|
| 491 |
-
- **Then** button becomes disabled with spinner and SSE feed begins showing node events within 2 seconds
|
| 492 |
-
|
| 493 |
-
*AC-08-2:*
|
| 494 |
-
- **Given** SSE stream is active
|
| 495 |
-
- **When** each pipeline node completes
|
| 496 |
-
- **Then** feed shows node name, completion checkmark, and elapsed time in real time without page refresh
|
| 497 |
-
|
| 498 |
-
*AC-08-3:*
|
| 499 |
-
- **Given** compilation completes
|
| 500 |
-
- **When** dashboard updates
|
| 501 |
-
- **Then** brain version, last-compiled timestamp, and total compilation time displayed with correct values
|
| 502 |
-
|
| 503 |
-
---
|
| 504 |
-
|
| 505 |
-
### F-09: Skills Viewer [P0]
|
| 506 |
-
|
| 507 |
-
**Acceptance Criteria:**
|
| 508 |
-
|
| 509 |
-
*AC-09-1:*
|
| 510 |
-
- **Given** a compiled brain with 12 skills
|
| 511 |
-
- **When** Skills Viewer loaded
|
| 512 |
-
- **Then** all 12 skills visible, grouped under 6 correct department headings
|
| 513 |
-
|
| 514 |
-
*AC-09-2:*
|
| 515 |
-
- **Given** a skill with `stale: true`
|
| 516 |
-
- **When** it appears in the viewer
|
| 517 |
-
- **Then** it has a visible "Stale" badge and confidence bar is visually de-emphasized
|
| 518 |
-
|
| 519 |
-
*AC-09-3:*
|
| 520 |
-
- **Given** user clicks any skill
|
| 521 |
-
- **When** detail panel expands
|
| 522 |
-
- **Then** all `decision_logic` conditions, all `forbidden_actions`, `escalation_chain`, and at least one `evidence_sources` entry visible
|
| 523 |
-
|
| 524 |
-
---
|
| 525 |
-
|
| 526 |
-
### F-10: Demo Agent Panel [P0] — Side-by-Side Required
|
| 527 |
-
|
| 528 |
-
**Functional Requirements:**
|
| 529 |
-
- Free-text scenario input + optional structured context fields
|
| 530 |
-
- Two response panels rendered simultaneously:
|
| 531 |
-
- **Without Brain:** Same LLM, same scenario, system prompt contains only the raw scenario — no company name, no skills context, no Rivanly-specific information. Goal: produce a demonstrably generic response.
|
| 532 |
-
- **With Brain:** Full skill context + rule trace + evidence
|
| 533 |
-
- Visual trace showing matched skill and cosine similarity score
|
| 534 |
-
|
| 535 |
-
**Acceptance Criteria:**
|
| 536 |
-
|
| 537 |
-
*AC-10-1:*
|
| 538 |
-
- **Given** a scenario submitted
|
| 539 |
-
- **When** both panels render
|
| 540 |
-
- **Then** both responses appear within 10 seconds
|
| 541 |
-
|
| 542 |
-
*AC-10-2:*
|
| 543 |
-
- **Given** the enterprise refund demo scenario
|
| 544 |
-
- **When** both panels render
|
| 545 |
-
- **Then** "Without Brain" response is generic (no company-specific rule, no evidence); "With Brain" response includes `rule_applied` and `evidence` visually highlighted
|
| 546 |
-
|
| 547 |
-
*AC-10-3:*
|
| 548 |
-
- **Given** a judge views the demo panel for the first time
|
| 549 |
-
- **When** they read both responses
|
| 550 |
-
- **Then** the value of the brain is legible without any verbal explanation
|
| 551 |
-
|
| 552 |
-
---
|
| 553 |
-
|
| 554 |
-
### F-11: Version Diff View [P1]
|
| 555 |
-
|
| 556 |
-
**Acceptance Criteria:**
|
| 557 |
-
|
| 558 |
-
*AC-11-1:*
|
| 559 |
-
- **Given** two pre-seeded brain versions (v1.1.0 and v1.2.0)
|
| 560 |
-
- **When** diff view opened and both selected
|
| 561 |
-
- **Then** modified skills highlighted yellow with field-level changes inline
|
| 562 |
-
|
| 563 |
-
*AC-11-2:*
|
| 564 |
-
- **Given** the "change a rule → rebuild → diff" demo flow
|
| 565 |
-
- **When** performed end-to-end
|
| 566 |
-
- **Then** diff correctly shows changed rule in under 30 seconds of demo time
|
| 567 |
-
|
| 568 |
-
---
|
| 569 |
-
|
| 570 |
-
### F-12: API Layer [P0]
|
| 571 |
-
|
| 572 |
-
**`POST /compile`**
|
| 573 |
-
```
|
| 574 |
-
Request: { "company_id": "rivanly-inc", "force_recompile": false }
|
| 575 |
-
Response: { "job_id": "uuid", "status": "started", "stream_url": "/compile/stream?job_id=uuid" }
|
| 576 |
-
```
|
| 577 |
-
|
| 578 |
-
**`GET /brain/status`**
|
| 579 |
-
```
|
| 580 |
-
Response: {
|
| 581 |
-
"company_id": "rivanly-inc",
|
| 582 |
-
"brain_version": "1.3.0",
|
| 583 |
-
"last_compiled_at": "2026-05-04T09:30:00Z",
|
| 584 |
-
"total_skills": 12,
|
| 585 |
-
"stale_skills": 2,
|
| 586 |
-
"coverage_areas": ["support", "revenue", "product_eng", "customer_success", "hr", "finance_ops"]
|
| 587 |
-
}
|
| 588 |
-
```
|
| 589 |
-
|
| 590 |
-
**`GET /skills`**
|
| 591 |
-
```
|
| 592 |
-
Response: {
|
| 593 |
-
"skills": [
|
| 594 |
-
{ "id": "handle_refund_request", "name": "Handle Refund Request",
|
| 595 |
-
"domain": "support", "confidence": 0.91, "stale": false, "version": "1.2" }
|
| 596 |
-
]
|
| 597 |
-
}
|
| 598 |
-
```
|
| 599 |
-
|
| 600 |
-
**`GET /skills/:id`** → full skill object (schema per F-04)
|
| 601 |
-
|
| 602 |
-
**`POST /agent/handle`**
|
| 603 |
-
```
|
| 604 |
-
Request: {
|
| 605 |
-
"scenario": "Enterprise customer, 18 months tenure, wants $1,200 refund",
|
| 606 |
-
"context": { "plan": "enterprise", "tenure_months": 18, "refund_amount": 1200 },
|
| 607 |
-
"with_brain": true
|
| 608 |
-
}
|
| 609 |
-
```
|
| 610 |
-
|
| 611 |
-
**`with_brain` flag behaviour (fully specified):**
|
| 612 |
-
- `with_brain: true` → system prompt includes: company name (Rivanly), active brain version, relevant skill in markdown, all decision conditions, forbidden actions, escalation chain
|
| 613 |
-
- `with_brain: false` → system prompt contains ONLY the raw scenario text. No company name. No skills context. No Rivanly-specific information. No hint that a brain exists. The goal is to produce a generic response from the base model that demonstrates what agents do WITHOUT the compilation layer. This is the "before" panel in the side-by-side comparison.
|
| 614 |
-
|
| 615 |
-
**`GET /compile/stream?job_id=uuid`** — SSE event schema:
|
| 616 |
-
```
|
| 617 |
-
event: node_start
|
| 618 |
-
data: {"node": "ingest_slack", "timestamp": "2026-05-04T09:30:01Z"}
|
| 619 |
-
|
| 620 |
-
event: node_complete
|
| 621 |
-
data: {"node": "ingest_slack", "duration_ms": 312, "output_count": 47}
|
| 622 |
-
|
| 623 |
-
event: node_error
|
| 624 |
-
data: {"node": "extract_decisions", "error": "llm_malformed_json", "retrying": true}
|
| 625 |
-
|
| 626 |
-
event: compile_complete
|
| 627 |
-
data: {
|
| 628 |
-
"brain_version": "1.3.0",
|
| 629 |
-
"total_skills": 12,
|
| 630 |
-
"stale_skills": 0,
|
| 631 |
-
"duration_ms": 54200,
|
| 632 |
-
"skills_below_threshold": 1
|
| 633 |
-
}
|
| 634 |
-
|
| 635 |
-
event: compile_error
|
| 636 |
-
data: {"error": "llm_unavailable", "checkpoint_saved": true, "resume_job_id": "uuid"}
|
| 637 |
-
```
|
| 638 |
-
|
| 639 |
-
**`GET /diff/:v1/:v2`**
|
| 640 |
-
```
|
| 641 |
-
Response: {
|
| 642 |
-
"from_version": "1.2.0", "to_version": "1.3.0",
|
| 643 |
-
"added_skills": [], "removed_skills": [],
|
| 644 |
-
"modified_skills": [
|
| 645 |
-
{ "id": "handle_refund_request",
|
| 646 |
-
"changes": [{"field": "decision_logic[1].action",
|
| 647 |
-
"from": "approve_prorated_refund", "to": "escalate_to_am"}] }
|
| 648 |
-
]
|
| 649 |
-
}
|
| 650 |
-
```
|
| 651 |
-
|
| 652 |
-
**`POST /sources/upload`**
|
| 653 |
-
```
|
| 654 |
-
Request: multipart/form-data: files[], company_id
|
| 655 |
-
Response: { "uploaded": ["notion_refund_sop.md"], "hashes": {"notion_refund_sop.md": "sha256:a1b2c3..."} }
|
| 656 |
-
```
|
| 657 |
-
|
| 658 |
-
---
|
| 659 |
-
|
| 660 |
-
## 8. AI System Requirements
|
| 661 |
-
|
| 662 |
-
### 8.1 Tool & Model Requirements
|
| 663 |
-
|
| 664 |
-
| Component | Tool / Model | Reason |
|
| 665 |
-
|---|---|---|
|
| 666 |
-
| All LLM extraction calls | `RedHatAI/Qwen2.5-72B-Instruct-FP8-dynamic` via vLLM | Best instruction following; FP8 = 1.5× throughput, ~72GB VRAM |
|
| 667 |
-
| Skill matching (v0) | `all-MiniLM-L6-v2` via `sentence-transformers` (in-memory, CPU) | Zero infra overhead; sufficient for 12 skills |
|
| 668 |
-
| Skill matching (v1) | pgvector on Supabase | Multi-tenant, persistent, scalable |
|
| 669 |
-
| LLM fallback | `Llama-3.3-70B BF16` | If Qwen2.5 unavailable on MI300X |
|
| 670 |
-
| Serving | vLLM on AMD MI300X (192GB VRAM) | Parallel batch inference, OpenAI-compatible API |
|
| 671 |
-
|
| 672 |
-
### 8.2 Extraction Prompts — Requirements
|
| 673 |
-
|
| 674 |
-
- All extractors demand: "Output ONLY structured JSON. Do not summarize. Do not generalize beyond what the text explicitly supports."
|
| 675 |
-
- All extractors include: output schema definition + 1-shot example in system prompt
|
| 676 |
-
- Temperature: 0.1 (deterministic extraction)
|
| 677 |
-
- Max tokens: 4096 per call
|
| 678 |
-
|
| 679 |
-
### 8.3 Evaluation Strategy
|
| 680 |
-
|
| 681 |
-
| Eval | Target | How to test |
|
| 682 |
-
|---|---|---|
|
| 683 |
-
| Brain agent correct action | 12 / 12 (100%) | Run all 12 scenarios against ground truth table |
|
| 684 |
-
| Evidence coverage | 100% of `decision_logic` entries have ≥ 1 `evidence_sources` | JSON schema validation post-compile |
|
| 685 |
-
| Contradiction recall | ≥ 2 contradictions flagged | Plant 2 deliberate contradictions in synthetic dataset |
|
| 686 |
-
| Confidence calibration | Well-sourced skills ≥ 0.7, single-source skills < 0.75 | Inspect post-compile |
|
| 687 |
-
| LLM JSON validity | 0 uncaught malformed responses in 10-run stress test | Run compile 10× on same dataset |
|
| 688 |
-
| "Without brain" failure rate | ≥ 8 of 12 scenarios produce generic/wrong response | Verify demo panel contrast is meaningful |
|
| 689 |
-
|
| 690 |
-
---
|
| 691 |
-
|
| 692 |
-
## 9. Implementation Decisions
|
| 693 |
-
|
| 694 |
-
**`with_brain: false` — Full Specification**
|
| 695 |
-
|
| 696 |
-
When `POST /agent/handle` is called with `"with_brain": false`, the system prompt sent to Qwen2.5-72B contains ONLY this:
|
| 697 |
-
|
| 698 |
-
```
|
| 699 |
-
You are a helpful customer support assistant.
|
| 700 |
-
The customer says: {scenario}
|
| 701 |
-
{context if provided}
|
| 702 |
-
Respond appropriately.
|
| 703 |
-
```
|
| 704 |
-
|
| 705 |
-
No company name. No skills. No Rivanly. No hint that any compiled knowledge exists. The base model responds from its training data alone. This produces a generic, policy-free response — which is the "before" state that makes the "with brain" response look like magic.
|
| 706 |
-
|
| 707 |
-
**Other key architectural decisions:**
|
| 708 |
-
|
| 709 |
-
- `ingest_join` + `Send` API pattern required for correct LangGraph fan-in. Direct edges ingest→extract cause synthesis to fire before all extractors complete.
|
| 710 |
-
- `Annotated[List, operator.add]` on all extraction output fields required for parallel writes to merge correctly rather than overwrite.
|
| 711 |
-
- `await compiled_graph.ainvoke(initial_state)` — not `.invoke()` — in FastAPI background task. Without async, nodes block the event loop and parallelism is lost.
|
| 712 |
-
- Skills file is the only source of truth. The agent never reads raw source files at query time.
|
| 713 |
-
- `skills_files.is_current` enforced via partial unique index — only one row per company can be `true` at a time.
|
| 714 |
-
- `compile_runs` table is append-only. No updates.
|
| 715 |
-
|
| 716 |
-
---
|
| 717 |
-
|
| 718 |
-
## 10. Technical Specifications
|
| 719 |
-
|
| 720 |
-
### 10.1 Architecture Overview
|
| 721 |
-
|
| 722 |
-
```
|
| 723 |
-
FILE UPLOAD (Next.js)
|
| 724 |
-
│
|
| 725 |
-
▼ POST /sources/upload
|
| 726 |
-
FASTAPI API LAYER
|
| 727 |
-
│
|
| 728 |
-
▼ POST /compile → ainvoke
|
| 729 |
-
LANGGRAPH ENGINE (BrainState)
|
| 730 |
-
│
|
| 731 |
-
├── INGESTION (parallel, CPU)
|
| 732 |
-
│ ├── ingest_slack → normalized_events[]
|
| 733 |
-
│ ├── ingest_notion → structured_sops[]
|
| 734 |
-
│ └── ingest_tickets → resolved_cases[]
|
| 735 |
-
│ └── ingest_join (barrier)
|
| 736 |
-
│
|
| 737 |
-
├── EXTRACTION (parallel, async, AMD MI300X)
|
| 738 |
-
│ ├── extract_decisions → raw_decisions[]
|
| 739 |
-
│ ├── extract_workflows → workflow_steps[]
|
| 740 |
-
│ ├── extract_exceptions → exception_rules[]
|
| 741 |
-
│ └── detect_contradictions → contradictions[]
|
| 742 |
-
│
|
| 743 |
-
└── COMPILATION + VALIDATION (sequential)
|
| 744 |
-
├── synthesize_skills → draft_skills[]
|
| 745 |
-
├── link_evidence → skills_with_evidence[]
|
| 746 |
-
├── score_confidence → confidence per skill
|
| 747 |
-
└── write_brain → skills_file.json → Supabase
|
| 748 |
-
|
| 749 |
-
BRAIN AGENT (query time)
|
| 750 |
-
POST /agent/handle
|
| 751 |
-
→ sentence-transformers match → skill JSON → markdown
|
| 752 |
-
→ single vLLM call → structured response JSON
|
| 753 |
-
```
|
| 754 |
-
|
| 755 |
-
### 10.2 Screen-to-Screen User Flow
|
| 756 |
-
|
| 757 |
-
**Primary flow (Ops Owner compiling and testing for the first time):**
|
| 758 |
-
|
| 759 |
-
```
|
| 760 |
-
[Upload Sources page]
|
| 761 |
-
→ Upload 3–8 files (drag + drop or file picker)
|
| 762 |
-
→ See file list with SHA-256 hash status (new / unchanged / changed)
|
| 763 |
-
→ Click "Done — Go to Dashboard"
|
| 764 |
-
↓
|
| 765 |
-
[Brain Dashboard]
|
| 766 |
-
→ See: company name, current brain version (or "No brain yet"), last compiled timestamp
|
| 767 |
-
→ See: source files uploaded (count)
|
| 768 |
-
→ Click "Build Company Brain" button
|
| 769 |
-
↓
|
| 770 |
-
[SSE Progress overlay — renders in-place on Dashboard]
|
| 771 |
-
→ Real-time: each node appears as it starts, gets checkmark when complete
|
| 772 |
-
→ ingest_slack ✓ → ingest_notion ✓ → ingest_tickets ✓ → [join]
|
| 773 |
-
→ extract_decisions ✓ (parallel) extract_workflows ✓ extract_exceptions ✓ detect_contradictions ✓
|
| 774 |
-
→ synthesize_skills ✓ → link_evidence ✓ → score_confidence ✓ → write_brain ✓
|
| 775 |
-
→ "Brain compiled: v1.3.0 in 58 seconds"
|
| 776 |
-
↓
|
| 777 |
-
[Brain Dashboard — updated state]
|
| 778 |
-
→ Version badge updated: v1.3.0
|
| 779 |
-
→ Last compiled: just now
|
| 780 |
-
→ 12 skills / 6 departments / 0 stale
|
| 781 |
-
→ Click "View Skills" (or nav to Skills in sidebar)
|
| 782 |
-
↓
|
| 783 |
-
[Skills Viewer]
|
| 784 |
-
→ 6 department groups, 12 skill cards
|
| 785 |
-
→ Each card: name, confidence bar, stale badge (if applicable)
|
| 786 |
-
→ Click any skill card → detail panel expands right
|
| 787 |
-
→ Detail: all conditions, forbidden actions, escalation chain, evidence panel (source + excerpt)
|
| 788 |
-
→ Click "Try a scenario" button (appears in detail panel)
|
| 789 |
-
↓
|
| 790 |
-
[Demo Agent Panel]
|
| 791 |
-
→ Left panel: "Without Brain" — base model response (generic)
|
| 792 |
-
→ Right panel: "With Brain" — rule trace + evidence + action
|
| 793 |
-
→ Scenario input pre-filled from skill that was clicked (optional convenience)
|
| 794 |
-
→ Submit → both panels render simultaneously
|
| 795 |
-
→ Judge reads both — value is self-evident
|
| 796 |
-
→ Click "What changed?" link (appears in top nav after ≥ 2 brain versions exist)
|
| 797 |
-
↓
|
| 798 |
-
[Version Diff View]
|
| 799 |
-
→ Select v1 and v2 from dropdowns (pre-seeded with v1.1.0 and v1.2.0)
|
| 800 |
-
→ See: modified skills (yellow), new skills (green), removed (red)
|
| 801 |
-
→ Click modified skill → see field-level diff of changed conditions
|
| 802 |
-
→ Click "← Back to Dashboard" (always accessible from nav)
|
| 803 |
-
↓
|
| 804 |
-
[Brain Dashboard]
|
| 805 |
-
→ Modify a source file → re-upload → stale badge appears on affected skills
|
| 806 |
-
→ Click "Build Company Brain" → recompile cycle repeats
|
| 807 |
-
```
|
| 808 |
-
|
| 809 |
-
**Critical path for demo (8-step script):**
|
| 810 |
-
Upload Sources → Dashboard → Build → SSE feed → Skills Viewer → Evidence panel → Demo Agent (side-by-side) → Change + Rebuild → Diff view
|
| 811 |
-
|
| 812 |
-
**Navigation rules:**
|
| 813 |
-
- Sidebar always visible: Dashboard | Skills | Agent | Diff
|
| 814 |
-
- "Try a scenario" shortcut from Skills Viewer pre-fills the Agent panel's skill context
|
| 815 |
-
- "What changed?" link only appears when ≥ 2 brain versions exist (prevents confusion when first compiled)
|
| 816 |
-
- All pages accessible from nav at any time — no forced linear flow outside the demo script
|
| 817 |
-
|
| 818 |
-
### 10.3 Integration Points
|
| 819 |
-
|
| 820 |
-
| Integration | v0 | v1 |
|
| 821 |
-
|---|---|---|
|
| 822 |
-
| LLM | vLLM on AMD MI300X (private IP:8000) | Same + failover |
|
| 823 |
-
| Database | Supabase Postgres | Same + RLS per company |
|
| 824 |
-
| File storage | Supabase Storage | Same |
|
| 825 |
-
| Auth | None | Clerk |
|
| 826 |
-
| Queue | None (direct ainvoke) | Redis/Upstash |
|
| 827 |
-
| Connectors | File upload only | Slack OAuth, Notion API, Zendesk |
|
| 828 |
-
| Checkpointing | MemorySaver (in-memory) | PostgresSaver |
|
| 829 |
-
|
| 830 |
-
### 10.4 Security & Privacy
|
| 831 |
-
|
| 832 |
-
**v0 (hackathon):** All data is synthetic (Rivanly is fictional). No PII. vLLM on private AMD cloud IP. No RLS needed.
|
| 833 |
-
|
| 834 |
-
**v1 (required before real customer data):**
|
| 835 |
-
- Clerk auth on all endpoints
|
| 836 |
-
- Supabase RLS: `company_id` row-level isolation
|
| 837 |
-
- vLLM behind VPC — not publicly accessible
|
| 838 |
-
- No customer message content stored permanently — only extracted rules and evidence excerpts
|
| 839 |
-
|
| 840 |
-
---
|
| 841 |
-
|
| 842 |
-
## 11. Data Model (Supabase)
|
| 843 |
-
|
| 844 |
-
```sql
|
| 845 |
-
CREATE TABLE companies (
|
| 846 |
-
id TEXT PRIMARY KEY,
|
| 847 |
-
name TEXT NOT NULL,
|
| 848 |
-
created_at TIMESTAMPTZ DEFAULT now()
|
| 849 |
-
);
|
| 850 |
-
|
| 851 |
-
CREATE TABLE skills_files (
|
| 852 |
-
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
| 853 |
-
company_id TEXT REFERENCES companies(id),
|
| 854 |
-
version TEXT NOT NULL,
|
| 855 |
-
brain_json JSONB NOT NULL,
|
| 856 |
-
source_hashes JSONB NOT NULL,
|
| 857 |
-
compiled_at TIMESTAMPTZ DEFAULT now(),
|
| 858 |
-
is_current BOOLEAN DEFAULT false
|
| 859 |
-
);
|
| 860 |
-
CREATE UNIQUE INDEX idx_skills_files_current ON skills_files(company_id) WHERE is_current = true;
|
| 861 |
-
|
| 862 |
-
CREATE TABLE skills (
|
| 863 |
-
id TEXT NOT NULL,
|
| 864 |
-
company_id TEXT REFERENCES companies(id),
|
| 865 |
-
skills_file_id UUID REFERENCES skills_files(id),
|
| 866 |
-
name TEXT NOT NULL,
|
| 867 |
-
domain TEXT NOT NULL,
|
| 868 |
-
version TEXT NOT NULL,
|
| 869 |
-
confidence FLOAT NOT NULL,
|
| 870 |
-
stale BOOLEAN DEFAULT false,
|
| 871 |
-
review_required BOOLEAN DEFAULT false,
|
| 872 |
-
skill_json JSONB NOT NULL,
|
| 873 |
-
PRIMARY KEY (id, company_id, skills_file_id)
|
| 874 |
-
);
|
| 875 |
-
|
| 876 |
-
CREATE TABLE source_files (
|
| 877 |
-
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
| 878 |
-
company_id TEXT REFERENCES companies(id),
|
| 879 |
-
filename TEXT NOT NULL,
|
| 880 |
-
sha256 TEXT NOT NULL,
|
| 881 |
-
storage_path TEXT NOT NULL,
|
| 882 |
-
uploaded_at TIMESTAMPTZ DEFAULT now()
|
| 883 |
-
);
|
| 884 |
-
|
| 885 |
-
CREATE TABLE compile_runs (
|
| 886 |
-
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
| 887 |
-
company_id TEXT REFERENCES companies(id),
|
| 888 |
-
status TEXT NOT NULL CHECK (status IN ('started','running','complete','error')),
|
| 889 |
-
started_at TIMESTAMPTZ DEFAULT now(),
|
| 890 |
-
completed_at TIMESTAMPTZ,
|
| 891 |
-
duration_ms INTEGER,
|
| 892 |
-
result_version TEXT,
|
| 893 |
-
error_detail TEXT
|
| 894 |
-
);
|
| 895 |
-
|
| 896 |
-
CREATE INDEX idx_skills_files_company ON skills_files(company_id, compiled_at DESC);
|
| 897 |
-
CREATE INDEX idx_skills_company ON skills(company_id);
|
| 898 |
-
```
|
| 899 |
-
|
| 900 |
-
---
|
| 901 |
-
|
| 902 |
-
## 12. Testing Decisions
|
| 903 |
-
|
| 904 |
-
### Ground Truth Test Suite — All 12 Scenarios (COMPLETE)
|
| 905 |
-
|
| 906 |
-
**Owner: Abhijith. Must be run and passing before demo day. All 12 must return correct `action`.**
|
| 907 |
-
|
| 908 |
-
| # | Scenario | Key Context | Expected `action` | Expected `skill_matched` |
|
| 909 |
-
|---|---|---|---|---|
|
| 910 |
-
| 1 | Enterprise customer, 18 months tenure, $1,200 refund requested | plan=enterprise, tenure=18mo, amount=1200 | `escalate_to_am_within_1hr` | `handle_refund_request` |
|
| 911 |
-
| 2 | Annual plan customer, day 10 of subscription, $300 refund requested | plan=annual, days_since_purchase=10, amount=300 | `approve_full_refund` | `handle_refund_request` |
|
| 912 |
-
| 3 | New customer, 2 months tenure, $600 refund requested | plan=monthly, tenure=2mo, amount=600 | `escalate_to_founder` | `handle_refund_request` |
|
| 913 |
-
| 4 | Loyal annual customer, 14 months tenure, $150 refund outside window | plan=annual, tenure=14mo, amount=150 | `approve_prorated_refund` | `handle_refund_request` |
|
| 914 |
-
| 5 | Lifetime deal customer requesting any refund | plan=lifetime, amount=any | `deny_refund_ltd_terms` | `handle_refund_request` |
|
| 915 |
-
| 6 | Customer contact during active platform outage | context=outage_active | `send_incident_response_template` | `respond_to_outage` |
|
| 916 |
-
| 7 | Startup customer requesting 40% discount | customer_type=startup, discount_requested=40% | `escalate_to_ae` | `evaluate_discount_request` |
|
| 917 |
-
| 8 | P0 bug reported on dashboard module by enterprise customer | bug_severity=P0, customer_plan=enterprise | `page_oncall_engineer_immediately` | `prioritize_bug_report` |
|
| 918 |
-
| 9 | Customer SLA breached by 2 hours, enterprise plan | sla_breach_hours=2, plan=enterprise | `notify_am_and_eng_lead` | `handle_sla_breach` |
|
| 919 |
-
| 10 | Customer showing 3 churn signals in last 30 days (no login, support ticket, downgrade inquiry) | signals=3, timeframe=30days | `schedule_am_call_within_24h` | `evaluate_churn_risk` |
|
| 920 |
-
| 11 | Engineering candidate — completed 2 rounds, needs offer approval | stage=offer, role=engineer | `get_founder_approval_before_sending` | `hiring_process_engineering` |
|
| 921 |
-
| 12 | Vendor invoice for $3,500 needs payment approval | amount=3500, vendor_type=software | `route_to_ops_lead_approval` | `approve_vendor_payment` |
|
| 922 |
-
|
| 923 |
-
**How to run:**
|
| 924 |
-
```python
|
| 925 |
-
# Run before demo. All 12 must pass.
|
| 926 |
-
for scenario in GROUND_TRUTH_SCENARIOS:
|
| 927 |
-
response = client.post("/agent/handle", json=scenario["input"])
|
| 928 |
-
assert response.json()["action"] == scenario["expected_action"]
|
| 929 |
-
assert response.json()["skill_matched"] == scenario["expected_skill"]
|
| 930 |
-
```
|
| 931 |
-
|
| 932 |
-
### Module Test Matrix
|
| 933 |
-
|
| 934 |
-
| Module | Test Type | What to Test |
|
| 935 |
-
|---|---|---|
|
| 936 |
-
| Source parsers | Unit | Given raw fixture file → correct normalized output shape |
|
| 937 |
-
| SHA-256 hasher | Unit | Same content → same hash; changed content → different hash |
|
| 938 |
-
| Skill matcher | Unit | Given 12 known queries → each returns correct `skill_id` |
|
| 939 |
-
| JSON→Markdown converter | Unit | Given skill object → output contains all conditions and forbidden actions, under 800 tokens |
|
| 940 |
-
| `POST /compile` | Integration | Returns `job_id` and `stream_url`; sets compile_run status to "started" |
|
| 941 |
-
| `GET /skills` | Integration | Returns exactly 12 skills for Rivanly |
|
| 942 |
-
| `POST /agent/handle` | Integration | All 12 ground-truth scenarios return correct `action` |
|
| 943 |
-
| `GET /diff/:v1/:v2` | Integration | Pre-seeded v1.1.0 and v1.2.0 → returns expected `modified_skills` |
|
| 944 |
-
| Full pipeline | End-to-end | 8 source files → 12 skills in Supabase, `is_current: true`, all with evidence |
|
| 945 |
-
| LLM output | Eval | 10-run stress test → zero uncaught malformed JSON |
|
| 946 |
-
|
| 947 |
-
---
|
| 948 |
-
|
| 949 |
-
## 13. Non-Functional Requirements
|
| 950 |
-
|
| 951 |
-
- Full compilation: under 90 seconds (target: 60s)
|
| 952 |
-
- Brain agent response: under 8 seconds
|
| 953 |
-
- SSE feed: real-time node events, no polling
|
| 954 |
-
- Skill matching: under 200ms (in-memory cosine similarity)
|
| 955 |
-
- LangGraph MemorySaver checkpointing: compile state survives crash
|
| 956 |
-
- Fallback model: Llama-3.3-70B BF16 if Qwen2.5 unavailable
|
| 957 |
-
- vLLM health check queried before accepting `/compile` requests
|
| 958 |
-
|
| 959 |
-
---
|
| 960 |
-
|
| 961 |
-
## 14. Success Metrics
|
| 962 |
-
|
| 963 |
-
### Hackathon v0 — Measurable Targets
|
| 964 |
-
|
| 965 |
-
| Metric | Target | Verification |
|
| 966 |
-
|---|---|---|
|
| 967 |
-
| End-to-end pipeline | Completes without error | Run 3× in final 2 hours |
|
| 968 |
-
| Skills produced | Exactly 12 | Check `skills_file.json` |
|
| 969 |
-
| Skills with confidence ≥ 0.7 | ≥ 10 of 12 | Check confidence field |
|
| 970 |
-
| Agent correct action | 12 / 12 | Run ground truth suite |
|
| 971 |
-
| Agent latency | < 8 seconds | Time on demo day |
|
| 972 |
-
| Compilation time | < 90 seconds | Dashboard display |
|
| 973 |
-
| Live URL accessible | Yes | Test on fresh device before submission |
|
| 974 |
-
| Demo video submitted | Yes | Render early, keep backup |
|
| 975 |
-
| Public posts | 2 minimum | During hours 8–16 and 16–28 |
|
| 976 |
-
|
| 977 |
-
### The 8-Step Demo — Ring 1 Acceptance Test
|
| 978 |
-
|
| 979 |
-
1. Show source files — "Rivanly's scattered knowledge."
|
| 980 |
-
2. Click "Build Company Brain" — watch SSE feed in real time.
|
| 981 |
-
3. Show compilation time — "12 skills in 58 seconds on AMD MI300X."
|
| 982 |
-
4. Open Skills Viewer — 6 departments, 12 skills, confidence bars.
|
| 983 |
-
5. Click `handle_refund_request` — show evidence panel.
|
| 984 |
-
6. Submit enterprise refund scenario to agent panel.
|
| 985 |
-
7. Show side-by-side: without brain (generic) vs. with brain (rule trace + evidence).
|
| 986 |
-
8. Change one SOP rule → Rebuild → same scenario → different outcome. **This is the moment.**
|
| 987 |
-
|
| 988 |
-
### Post-Hackathon Business Metrics (v1)
|
| 989 |
-
|
| 990 |
-
- 3 paying pilot customers within 60 days of v1 launch
|
| 991 |
-
- Activation: first brain compiled + agent handles 1 scenario correctly
|
| 992 |
-
- Retention: brain recompiled at least once within 30 days
|
| 993 |
-
- Revenue: $200/month Starter, $500/month Growth
|
| 994 |
-
|
| 995 |
-
---
|
| 996 |
-
|
| 997 |
-
## 15. Competitive Landscape
|
| 998 |
-
|
| 999 |
-
*Updated with companies identified in YC/LinkedIn Company Brain thread.*
|
| 1000 |
-
|
| 1001 |
-
| Company | What they do | Differentiation |
|
| 1002 |
-
|---|---|---|
|
| 1003 |
-
| **Notion AI** | Q&A over documents | Retrieves chunks, doesn't compile operational judgment |
|
| 1004 |
-
| **Guru / Confluence** | Knowledge base search | Human-maintained, not executable by AI agents |
|
| 1005 |
-
| **Glean** | Enterprise search | Search-first, not compilation; no executable output |
|
| 1006 |
-
| **Sugarwork** (sugarwork.com) | Surfaces tacit knowledge for AI | Adjacent; watch closely |
|
| 1007 |
-
| **BrandOS** (getbrandos.site) | Company brain for marketing teams | Vertical-specific; not full company coverage |
|
| 1008 |
-
| **Context AI** | Operational knowledge for agents | Direct competitor — monitor |
|
| 1009 |
-
| **LineageOne** (NEXT'26) | Fragmented operations → live operational model | Direct competitor |
|
| 1010 |
-
| **AutoBase** | Building this for 7 months | Direct competitor |
|
| 1011 |
-
| **Company Brain** | Full compilation layer, all departments, versioned, evidence-linked | Evidence trail, stale detection, parallel AMD compilation |
|
| 1012 |
-
|
| 1013 |
-
**Observation:** Multiple teams are building in this space. This validates the market. The race is to who ships the most complete, demo-able, production-credible version. Company Brain's differentiator is the combination of: evidence-linked rules (not just structured outputs), stale detection, version diffing, and the clean "compiler not assistant" framing that competitors haven't articulated.
|
| 1014 |
-
|
| 1015 |
-
---
|
| 1016 |
-
|
| 1017 |
-
## 16. Risks & Mitigation
|
| 1018 |
-
|
| 1019 |
-
| Risk | Likelihood | Mitigation |
|
| 1020 |
-
|---|---|---|
|
| 1021 |
-
| Knowledge that was never captured cannot be extracted | **High — acknowledged** | Scope v0 to knowledge that exists in digital form; call out in pitch as known limitation; v1 adds call transcription |
|
| 1022 |
-
| Extraction agents produce low-quality skills | Medium | Dataset authored backward from desired output; eval suite catches failures before demo |
|
| 1023 |
-
| vLLM setup on AMD cloud takes too long | Low | Kubernetes on AMD course completed; fallback to Fireworks API |
|
| 1024 |
-
| LangGraph parallel fan-in bug | Low | Fixed using `Send` API + `ingest_join` barrier node |
|
| 1025 |
-
| Demo breaks during judging | Medium | Pre-recorded fallback video; deploy to stable URL 24h before submission |
|
| 1026 |
-
| Qwen2.5-72B FP8 unavailable | Low | `RedHatAI/Qwen2.5-72B-Instruct-FP8-dynamic` confirmed on HuggingFace |
|
| 1027 |
-
| Frontend/backend API contract mismatch | Medium | Both parties agree on F-12 schemas before writing frontend code |
|
| 1028 |
-
| Synthetic dataset too shallow | Medium | Each file: ≥ 4 edge cases, ≥ 1 planted contradiction; reviewed together before kickoff |
|
| 1029 |
-
| Competitors ship demo before May 11 | Low | Multiple are building but none have shipped a demo yet; Company Brain's AMD + parallel compile angle is unique |
|
| 1030 |
-
|
| 1031 |
-
---
|
| 1032 |
-
|
| 1033 |
-
## 17. v2 Roadmap — Insights from LinkedIn Thread
|
| 1034 |
-
|
| 1035 |
-
*Insights from practitioners who responded to Tom Blomfield's YC RFS post that should inform v2 product decisions.*
|
| 1036 |
-
|
| 1037 |
-
**Execution boundaries (Horizon Labs insight):** The skills file is currently advisory — the agent reads it and acts. In v2, the skills file should become constraining — the agent should not be able to take actions not in the admissible action set. This is the difference between a knowledge map and an execution boundary. Add to v2: `forbidden_actions` enforced at the runtime level, not just injected as prompt guidance.
|
| 1038 |
-
|
| 1039 |
-
**The stale knowledge divergence problem (Matan Elmalam insight):** Teams build the map once, ship the agent, and within six weeks reality diverges. Our stale detection addresses this for captured knowledge. For v2: active monitoring — compare agent actions against skills file weekly and surface divergences as "possible new skills" for human review.
|
| 1040 |
-
|
| 1041 |
-
**Call transcription (Paul Breuler gap):** Knowledge that exists only in spoken conversations will never be in Slack or Notion. In v2: integrate with Fireflies/Otter/Grain to pull meeting transcripts as a first-class source type. This closes the most common knowledge capture gap.
|
| 1042 |
-
|
| 1043 |
-
**Audit trail (Josh Jefferd insight):** Every agent action should be logged with which skill rule was applied and which evidence excerpt justified it. This is the compliance and trust layer. Add to v2 roadmap as a first-class feature, not an afterthought.
|
| 1044 |
-
|
| 1045 |
-
---
|
| 1046 |
-
|
| 1047 |
-
## 18. Open Questions — All Resolved
|
| 1048 |
-
|
| 1049 |
-
| Question | Resolution |
|
| 1050 |
-
|---|---|
|
| 1051 |
-
| Who owns frontend vs. pipeline? | Abhijith = pipeline + API. Harshit = all frontend. |
|
| 1052 |
-
| Supabase schema? | Defined in Section 11. |
|
| 1053 |
-
| SSE disconnect/reconnect handling? | Frontend: exponential backoff (1s, 2s, 4s). Fallback: `GET /brain/status` for final state. |
|
| 1054 |
-
| Synthetic dataset ownership? | Both — 4 files each, authored before May 4 kickoff. |
|
| 1055 |
-
| Ground truth table complete? | Yes — all 12 scenarios in Section 12. Run before demo. |
|
| 1056 |
-
| `with_brain: false` behaviour? | Fully specified in F-10 and Section 9. |
|
| 1057 |
-
| Screen-to-screen user flow? | Defined in Section 10.2. |
|
| 1058 |
-
|
| 1059 |
-
---
|
| 1060 |
-
|
| 1061 |
-
*This document supersedes company_brain_PRD_v3.md. All three audit issues resolved. Competitive landscape updated with real companies from LinkedIn thread. No scope changes after May 4 kickoff.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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