Spaces:
Running
Running
AIBRUH Claude Sonnet 4.6 commited on
Commit Β·
c9d99b4
1
Parent(s): 95d0540
feat: PinGate security overlay + sovereign agent architecture plan
Browse files- PinGate component (PIN 2440): sessionStorage, shake animation, Beryl brand
- /privacy, /terms, /api-docs, /contact pages all gated behind PinGate
- Footer.tsx: href links replaced with Next.js Link to real pages
- docs/CLIQUE_AGENT_ARCHITECTURE.md: full 3000+ word agent stack blueprint
- Nu=Qwen2.5-72B, Amanda=Llama-3.1-70B, Jeff=GLM-4, India=Mistral-7B
- Plug-and-play HF inference router design
- Skill MD system + 20 ABSOLUTE DOMINATION features
- 7am-10am implementation sequence for July 1
- HANDOFF.md updated with morning plan and doc pointer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- HANDOFF.md +72 -5
- app/api-docs/page.tsx +68 -0
- app/contact/page.tsx +3 -2
- app/privacy/page.tsx +34 -0
- app/terms/page.tsx +36 -0
- components/Footer.tsx +11 -2
- components/PinGate.tsx +190 -0
- docs/CLIQUE_AGENT_ARCHITECTURE.md +618 -0
HANDOFF.md
CHANGED
|
@@ -1,10 +1,77 @@
|
|
| 1 |
# BERYL LIVE β HANDOFF DOC
|
| 2 |
-
_Last updated: 2026-06-30
|
| 3 |
-
within 10 min or by July 5)_
|
| 4 |
|
| 5 |
-
**Read this whole top section before touching anything.**
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
---
|
| 10 |
|
|
|
|
| 1 |
# BERYL LIVE β HANDOFF DOC
|
| 2 |
+
_Last updated: 2026-06-30 late night β PinGate + Clique v1 wiring session complete_
|
|
|
|
| 3 |
|
| 4 |
+
**Read this whole top section before touching anything.** Push pattern (do BOTH remotes every commit):
|
| 5 |
+
```
|
| 6 |
+
git push origin hf-deploy
|
| 7 |
+
git push hf hf-deploy:main
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## π§ 7AM DEEP DIVE: SOVEREIGN AGENT ARCHITECTURE
|
| 13 |
+
|
| 14 |
+
Full architecture plan lives at: `docs/CLIQUE_AGENT_ARCHITECTURE.md`
|
| 15 |
+
|
| 16 |
+
**READ THAT DOC FIRST at 7am.** It covers:
|
| 17 |
+
- Per-agent LLM assignments (Nu=Qwen2.5-72B, Amanda=Llama-3.1-70B, Jeff=GLM-4, India=Mistral-7B)
|
| 18 |
+
- Plug-and-play HF inference router (`lib/hf-inference.ts`)
|
| 19 |
+
- Skill MD system β Amanda generates agent skills mid-session
|
| 20 |
+
- QCR memory write-back stub
|
| 21 |
+
- **20 ABSOLUTE DOMINATION features** with ease ratings
|
| 22 |
+
- 7amβ10am implementation sequence to hit the 10am live target
|
| 23 |
+
- 5 discussion questions for TJ to answer before build starts
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## π
MORNING TASKS (July 1, 2026)
|
| 28 |
+
|
| 29 |
+
Priority order for the morning session with TJ:
|
| 30 |
+
1. **Film the 40-second promo** β use `docs/CLIQUE_COMMERCIAL_40S.md` for the script. Shoot Seg 2 + Seg 3 in Runway UI (need face control). Seg 1 (Marcus desk) + Seg 4 (logo lockup) can be done via Runway API (~200 credits).
|
| 31 |
+
2. **Drop `public/videos/clique-hero.mp4`** β activates Banner 1 on `/clique` promo page. Until then a gold-grid fallback with placement instructions shows.
|
| 32 |
+
3. **Clean the entire site** β audit all pages for polish, broken links, placeholder copy.
|
| 33 |
+
4. **Apply for YC** β TJ wants Claude's help writing the application.
|
| 34 |
+
5. **Apply for Runway startup partnership**.
|
| 35 |
+
6. **Deploy clique-hero video** once shot and stitched.
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## β
SESSION COMPLETE (June 30 night)
|
| 40 |
+
|
| 41 |
+
Everything below was built and pushed in the last session:
|
| 42 |
+
|
| 43 |
+
### Clique v1 Wiring (all done)
|
| 44 |
+
- `lib/clique-agent-prompts.ts` β master prompts, `resolveResponders`, `detectAmandaHandoff`, `isGroupGreeting`, `getAgentPrompt`
|
| 45 |
+
- `lib/clique-roster.ts` β `getV1Team()` returns only Amanda/India/Jeff/Nu
|
| 46 |
+
- `components/clique/CliqueRoom.tsx` β fully wired to v1 team, `silent-listening` state, Amanda canonical opener, `resolveResponders`/`detectAmandaHandoff` in transcript handlers, `PreviewTab` tab bar above project preview
|
| 47 |
+
- `components/clique/AgentTile.tsx` β `silent-listening` state: dimmed to 0.55 opacity, "Listening." badge, prewarms `speak` clip after 1s
|
| 48 |
+
- `lib/use-amanda-voice.ts` β `onAmandaTranscript`/`onUserTranscript` callbacks, `amandaBuf` accumulator
|
| 49 |
+
- `app/api/clique/realtime-token/route.ts` β Amanda's system prompt baked server-side via `getAgentPrompt("amanda")`
|
| 50 |
+
|
| 51 |
+
### Clique Chat tab (done)
|
| 52 |
+
- `app/api/clique/chat/route.ts` β POST `{message, targetId, history}` β multi-agent GPT-4o responses
|
| 53 |
+
- `components/clique/CliqueChat.tsx` β full Microsoft Agent Framework style chat UI: group channel + per-agent DMs, CLS mini avatars, typing indicator, 420ms staggered responses
|
| 54 |
+
|
| 55 |
+
### CliqueLandingPage banners (done)
|
| 56 |
+
- **Banner 1 (VideoHero)** β `<video src="/videos/clique-hero.mp4">` with gold-grid fallback. Drop the file to activate.
|
| 57 |
+
- **Banner 2 (MarcusPhoneBanner)** β iPhone mockup showing user on call with all 4 agents on screen, floating + glow animations, copyblock with CTA
|
| 58 |
+
|
| 59 |
+
### Build fixes
|
| 60 |
+
- `app/api/ltx/generate/route.ts` β TS narrowing fix for `rawData.output.data`
|
| 61 |
+
- `app/ltx-studio/page.tsx` β `as const` status field type fix
|
| 62 |
+
|
| 63 |
+
### PinGate (done tonight)
|
| 64 |
+
- `components/PinGate.tsx` β 4-digit overlay, PIN: **2440**, sessionStorage persistence, shake on wrong code, full Beryl brand
|
| 65 |
+
- `app/privacy/page.tsx` β Privacy Policy, wrapped in PinGate
|
| 66 |
+
- `app/terms/page.tsx` β Terms of Service, wrapped in PinGate
|
| 67 |
+
- `app/api-docs/page.tsx` β API Reference (internal routes documented), wrapped in PinGate
|
| 68 |
+
- `app/contact/page.tsx` β existing contact form, wrapped in PinGate
|
| 69 |
+
- `components/Footer.tsx` β footer links now use `<Link>` pointing to real pages: `/privacy`, `/terms`, `/api-docs`, `/contact`
|
| 70 |
+
|
| 71 |
+
### 40-second promo script
|
| 72 |
+
- Saved to `docs/CLIQUE_COMMERCIAL_40S.md`
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
|
| 76 |
---
|
| 77 |
|
app/api-docs/page.tsx
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Nav from "@/components/Nav";
|
| 2 |
+
import PinGate from "@/components/PinGate";
|
| 3 |
+
import Footer from "@/components/Footer";
|
| 4 |
+
|
| 5 |
+
export const metadata = { title: "API β Beryl AI Labs" };
|
| 6 |
+
|
| 7 |
+
export default function ApiDocsPage() {
|
| 8 |
+
return (
|
| 9 |
+
<PinGate>
|
| 10 |
+
<Nav />
|
| 11 |
+
<main style={{ minHeight: "100vh", background: "#030201", padding: "80px 60px", maxWidth: 960, margin: "0 auto" }}>
|
| 12 |
+
<div style={{ fontFamily: "'Cinzel',serif", fontSize: 10, letterSpacing: 3, color: "rgba(200,169,81,.5)", textTransform: "uppercase", marginBottom: 16 }}>Beryl Operating System</div>
|
| 13 |
+
<h1 style={{ fontFamily: "'Cinzel Decorative','Cinzel',serif", fontSize: 36, fontWeight: 900, color: "#fff", marginBottom: 8 }}>API Reference</h1>
|
| 14 |
+
<div style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 13, color: "rgba(255,255,255,.3)", fontStyle: "italic", marginBottom: 12 }}>Internal Β· v1 Β· June 2026</div>
|
| 15 |
+
<div style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 15, color: "rgba(200,169,81,.6)", fontStyle: "italic", marginBottom: 48 }}>
|
| 16 |
+
Beryl API is currently invite-only. Partner access available β email hello@berylize.com.
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
{[
|
| 20 |
+
{
|
| 21 |
+
route: "POST /api/clique/realtime-token",
|
| 22 |
+
desc: "Mints an ephemeral OpenAI Realtime API token for a Clique session. Amanda's system prompt is baked server-side.",
|
| 23 |
+
response: `{ token: string, expires_at: number }`,
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
route: "POST /api/clique/chat",
|
| 27 |
+
desc: "Sends a message to one or more Clique agents. Resolves responders via resolveResponders(). Returns ordered agent responses β each agent sees prior responses from the same round.",
|
| 28 |
+
response: `{ responses: [{ agentId, agentName, text }] }`,
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
route: "POST /api/clique/livekit-token",
|
| 32 |
+
desc: "Mints a LiveKit room token for the shared Clique meeting room. All agents join from session start so their Realtime sessions are warm.",
|
| 33 |
+
response: `{ token: string }`,
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
route: "POST /api/matinee/omega",
|
| 37 |
+
desc: "OMEGA cinematography director agent. Enhances a raw scene prompt into a full cinematic brief. Powered by GPT-4o via native fetch.",
|
| 38 |
+
response: `{ enhanced: string, genre: string, palette: string }`,
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
route: "POST /api/matinee/generate",
|
| 42 |
+
desc: "Generates a video scene via Runway Gen-3. Passes the OMEGA-enhanced prompt. Returns a polling token.",
|
| 43 |
+
response: `{ taskId: string }`,
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
route: "POST /api/matinee/stitch",
|
| 47 |
+
desc: "Film assembly editor agent. Takes an ordered list of generated scene clips and produces a stitch plan with transitions.",
|
| 48 |
+
response: `{ plan: object }`,
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
route: "POST /api/hf/speak",
|
| 52 |
+
desc: "The Gym pipeline: Grok-3 Mini generates a reply, eve-tts generates audio + word boundary visemes. Used by the Eve avatar.",
|
| 53 |
+
response: `{ reply: string, audioUrl: string, visemes: [{word, offsetMs, durationMs}] }`,
|
| 54 |
+
},
|
| 55 |
+
].map(e => (
|
| 56 |
+
<div key={e.route} style={{ marginBottom: 40, paddingBottom: 40, borderBottom: "1px solid rgba(200,169,81,.1)" }}>
|
| 57 |
+
<div style={{ fontFamily: "'SF Mono','Fira Code',monospace", fontSize: 13, color: "#f5e070", background: "rgba(200,169,81,.08)", padding: "6px 14px", borderRadius: 4, display: "inline-block", marginBottom: 10 }}>{e.route}</div>
|
| 58 |
+
<p style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 15, color: "rgba(255,255,255,.6)", lineHeight: 1.7, margin: "0 0 10px" }}>{e.desc}</p>
|
| 59 |
+
<div style={{ fontFamily: "'SF Mono','Fira Code',monospace", fontSize: 11, color: "#8b949e", background: "#0d1117", border: "1px solid rgba(255,255,255,.06)", borderRadius: 6, padding: "10px 16px" }}>
|
| 60 |
+
{e.response}
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
))}
|
| 64 |
+
</main>
|
| 65 |
+
<Footer />
|
| 66 |
+
</PinGate>
|
| 67 |
+
);
|
| 68 |
+
}
|
app/contact/page.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
"use client";
|
| 2 |
import Nav from "@/components/Nav";
|
|
|
|
| 3 |
import { useState } from "react";
|
| 4 |
|
| 5 |
export default function ContactPage() {
|
|
@@ -37,7 +38,7 @@ export default function ContactPage() {
|
|
| 37 |
};
|
| 38 |
|
| 39 |
return (
|
| 40 |
-
<>
|
| 41 |
<Nav />
|
| 42 |
<style>{`
|
| 43 |
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:wght@400;500;600&display=swap');
|
|
@@ -192,6 +193,6 @@ export default function ContactPage() {
|
|
| 192 |
</div>
|
| 193 |
|
| 194 |
</div>
|
| 195 |
-
</>
|
| 196 |
);
|
| 197 |
}
|
|
|
|
| 1 |
"use client";
|
| 2 |
import Nav from "@/components/Nav";
|
| 3 |
+
import PinGate from "@/components/PinGate";
|
| 4 |
import { useState } from "react";
|
| 5 |
|
| 6 |
export default function ContactPage() {
|
|
|
|
| 38 |
};
|
| 39 |
|
| 40 |
return (
|
| 41 |
+
<PinGate>
|
| 42 |
<Nav />
|
| 43 |
<style>{`
|
| 44 |
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:wght@400;500;600&display=swap');
|
|
|
|
| 193 |
</div>
|
| 194 |
|
| 195 |
</div>
|
| 196 |
+
</PinGate>
|
| 197 |
);
|
| 198 |
}
|
app/privacy/page.tsx
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Nav from "@/components/Nav";
|
| 2 |
+
import PinGate from "@/components/PinGate";
|
| 3 |
+
import Footer from "@/components/Footer";
|
| 4 |
+
|
| 5 |
+
export const metadata = { title: "Privacy Policy β Beryl AI Labs" };
|
| 6 |
+
|
| 7 |
+
export default function PrivacyPage() {
|
| 8 |
+
return (
|
| 9 |
+
<PinGate>
|
| 10 |
+
<Nav />
|
| 11 |
+
<main style={{ minHeight: "100vh", background: "#030201", padding: "80px 60px", maxWidth: 860, margin: "0 auto" }}>
|
| 12 |
+
<div style={{ fontFamily: "'Cinzel',serif", fontSize: 10, letterSpacing: 3, color: "rgba(200,169,81,.5)", textTransform: "uppercase", marginBottom: 16 }}>Beryl AI Labs</div>
|
| 13 |
+
<h1 style={{ fontFamily: "'Cinzel Decorative','Cinzel',serif", fontSize: 36, fontWeight: 900, color: "#fff", marginBottom: 8 }}>Privacy Policy</h1>
|
| 14 |
+
<div style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 13, color: "rgba(255,255,255,.3)", fontStyle: "italic", marginBottom: 48 }}>Effective: January 1, 2026 Β· Last updated: June 2026</div>
|
| 15 |
+
|
| 16 |
+
{[
|
| 17 |
+
["What We Collect", "We collect information you provide directly (name, email, session data) and information generated through your use of Beryl services (conversation logs, QCR rapport scores, session timestamps). We do not sell your data."],
|
| 18 |
+
["How We Use It", "Your data powers the QCR (Quantum Consciousness Recollection) system β the agent memory layer that allows your Clique to remember you, build rapport, and evolve across sessions. This data stays within Beryl AI Labs infrastructure."],
|
| 19 |
+
["Third-Party Services", "Beryl uses OpenAI (Realtime API, GPT-4o), Runway (video generation), LiveKit (real-time audio/video), HuggingFace (model hosting), and xAI (Grok). Each provider's privacy policy governs their handling of data passed to their systems."],
|
| 20 |
+
["Data Retention", "Session logs are retained for 90 days. QCR profiles persist indefinitely to support agent memory β you may request deletion at any time by contacting us at hello@berylize.com."],
|
| 21 |
+
["Your Rights", "You have the right to access, correct, or delete your personal data. You may opt out of QCR memory at any time through your account settings. To exercise these rights, email hello@berylize.com."],
|
| 22 |
+
["Security", "All data is encrypted in transit (TLS 1.3) and at rest. API keys are stored server-side and never exposed to the client. We follow OWASP security guidelines across all production routes."],
|
| 23 |
+
["Contact", "Questions? hello@berylize.com Β· Beryl AI Labs Β· berylize.com"],
|
| 24 |
+
].map(([heading, body]) => (
|
| 25 |
+
<div key={heading} style={{ marginBottom: 36 }}>
|
| 26 |
+
<div style={{ fontFamily: "'Cinzel',serif", fontSize: 11, letterSpacing: 2, fontWeight: 700, color: "#c8a951", textTransform: "uppercase", marginBottom: 10 }}>{heading}</div>
|
| 27 |
+
<p style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 16, color: "rgba(255,255,255,.6)", lineHeight: 1.8, margin: 0 }}>{body}</p>
|
| 28 |
+
</div>
|
| 29 |
+
))}
|
| 30 |
+
</main>
|
| 31 |
+
<Footer />
|
| 32 |
+
</PinGate>
|
| 33 |
+
);
|
| 34 |
+
}
|
app/terms/page.tsx
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Nav from "@/components/Nav";
|
| 2 |
+
import PinGate from "@/components/PinGate";
|
| 3 |
+
import Footer from "@/components/Footer";
|
| 4 |
+
|
| 5 |
+
export const metadata = { title: "Terms of Service β Beryl AI Labs" };
|
| 6 |
+
|
| 7 |
+
export default function TermsPage() {
|
| 8 |
+
return (
|
| 9 |
+
<PinGate>
|
| 10 |
+
<Nav />
|
| 11 |
+
<main style={{ minHeight: "100vh", background: "#030201", padding: "80px 60px", maxWidth: 860, margin: "0 auto" }}>
|
| 12 |
+
<div style={{ fontFamily: "'Cinzel',serif", fontSize: 10, letterSpacing: 3, color: "rgba(200,169,81,.5)", textTransform: "uppercase", marginBottom: 16 }}>Beryl AI Labs</div>
|
| 13 |
+
<h1 style={{ fontFamily: "'Cinzel Decorative','Cinzel',serif", fontSize: 36, fontWeight: 900, color: "#fff", marginBottom: 8 }}>Terms of Service</h1>
|
| 14 |
+
<div style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 13, color: "rgba(255,255,255,.3)", fontStyle: "italic", marginBottom: 48 }}>Effective: January 1, 2026 Β· Last updated: June 2026</div>
|
| 15 |
+
|
| 16 |
+
{[
|
| 17 |
+
["Acceptance", "By accessing or using Beryl services (berylize.com and all sub-pages, APIs, and agent interfaces), you agree to these Terms. If you do not agree, do not use the service."],
|
| 18 |
+
["Use of Service", "Beryl is provided for lawful purposes only. You may not use Beryl to generate harmful, deceptive, or illegal content. Automated scraping, reverse engineering, or API abuse is prohibited."],
|
| 19 |
+
["Agent Interactions", "Beryl's AI agents (the Clique) are software. They are not licensed professionals. Nothing they say constitutes legal, financial, medical, or professional advice. Use your own judgment."],
|
| 20 |
+
["Intellectual Property", "All Beryl branding, agent personas, QCR system design, GRI architecture, and generated content are the property of Beryl AI Labs unless otherwise stated. You retain ownership of content you create using Beryl's tools."],
|
| 21 |
+
["Availability", "We aim for 99.9% uptime but make no guarantees. The service may be paused, modified, or discontinued at any time. We are not liable for losses arising from downtime."],
|
| 22 |
+
["Limitation of Liability", "Beryl AI Labs' total liability for any claim shall not exceed the amount you paid us in the 3 months preceding the claim. We are not liable for indirect, incidental, or consequential damages."],
|
| 23 |
+
["Termination", "We may suspend or terminate your access at any time for violations of these Terms or for any other reason at our discretion. You may stop using the service at any time."],
|
| 24 |
+
["Governing Law", "These Terms are governed by the laws of the State of California, USA. Disputes shall be resolved in the courts of Los Angeles County, CA."],
|
| 25 |
+
["Contact", "Legal questions: hello@berylize.com Β· Beryl AI Labs Β· berylize.com"],
|
| 26 |
+
].map(([heading, body]) => (
|
| 27 |
+
<div key={heading} style={{ marginBottom: 36 }}>
|
| 28 |
+
<div style={{ fontFamily: "'Cinzel',serif", fontSize: 11, letterSpacing: 2, fontWeight: 700, color: "#c8a951", textTransform: "uppercase", marginBottom: 10 }}>{heading}</div>
|
| 29 |
+
<p style={{ fontFamily: "'Cormorant Garamond',serif", fontSize: 16, color: "rgba(255,255,255,.6)", lineHeight: 1.8, margin: 0 }}>{body}</p>
|
| 30 |
+
</div>
|
| 31 |
+
))}
|
| 32 |
+
</main>
|
| 33 |
+
<Footer />
|
| 34 |
+
</PinGate>
|
| 35 |
+
);
|
| 36 |
+
}
|
components/Footer.tsx
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
export default function Footer() {
|
| 2 |
return (
|
| 3 |
<footer style={{background:"#E8DCC8",padding:"24px 32px",display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid rgba(26,95,122,.15)"}}>
|
|
@@ -8,8 +17,8 @@ export default function Footer() {
|
|
| 8 |
<div style={{fontSize:11,fontStyle:"italic",color:"#1a5f7a",marginTop:2}}>Built for believers. Forged in panic. Deployed with conviction.</div>
|
| 9 |
</div>
|
| 10 |
<div style={{display:"flex",gap:24}}>
|
| 11 |
-
{
|
| 12 |
-
<
|
| 13 |
))}
|
| 14 |
</div>
|
| 15 |
<div style={{fontSize:12,color:"#888"}}>Β© 2026 Beryl AI Labs</div>
|
|
|
|
| 1 |
+
import Link from "next/link";
|
| 2 |
+
|
| 3 |
+
const FOOTER_LINKS: [string, string][] = [
|
| 4 |
+
["Privacy", "/privacy"],
|
| 5 |
+
["Terms", "/terms"],
|
| 6 |
+
["API", "/api-docs"],
|
| 7 |
+
["Contact", "/contact"],
|
| 8 |
+
];
|
| 9 |
+
|
| 10 |
export default function Footer() {
|
| 11 |
return (
|
| 12 |
<footer style={{background:"#E8DCC8",padding:"24px 32px",display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid rgba(26,95,122,.15)"}}>
|
|
|
|
| 17 |
<div style={{fontSize:11,fontStyle:"italic",color:"#1a5f7a",marginTop:2}}>Built for believers. Forged in panic. Deployed with conviction.</div>
|
| 18 |
</div>
|
| 19 |
<div style={{display:"flex",gap:24}}>
|
| 20 |
+
{FOOTER_LINKS.map(([label, href]) => (
|
| 21 |
+
<Link key={label} href={href} style={{fontSize:11,color:"#888",textDecoration:"none",letterSpacing:1,fontFamily:"'Cinzel',serif",textTransform:"uppercase"}}>{label}</Link>
|
| 22 |
))}
|
| 23 |
</div>
|
| 24 |
<div style={{fontSize:12,color:"#888"}}>Β© 2026 Beryl AI Labs</div>
|
components/PinGate.tsx
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
import { useState, useRef, useEffect, type ReactNode } from "react";
|
| 3 |
+
|
| 4 |
+
const CORRECT = "2440";
|
| 5 |
+
|
| 6 |
+
interface Props {
|
| 7 |
+
children: ReactNode;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
export default function PinGate({ children }: Props) {
|
| 11 |
+
const [unlocked, setUnlocked] = useState(false);
|
| 12 |
+
const [digits, setDigits] = useState(["", "", "", ""]);
|
| 13 |
+
const [shake, setShake] = useState(false);
|
| 14 |
+
const [hint, setHint] = useState("");
|
| 15 |
+
const refs = [
|
| 16 |
+
useRef<HTMLInputElement>(null),
|
| 17 |
+
useRef<HTMLInputElement>(null),
|
| 18 |
+
useRef<HTMLInputElement>(null),
|
| 19 |
+
useRef<HTMLInputElement>(null),
|
| 20 |
+
];
|
| 21 |
+
|
| 22 |
+
useEffect(() => {
|
| 23 |
+
if (typeof window !== "undefined") {
|
| 24 |
+
try {
|
| 25 |
+
if (sessionStorage.getItem("bos_unlocked") === "1") setUnlocked(true);
|
| 26 |
+
} catch { /* storage blocked */ }
|
| 27 |
+
}
|
| 28 |
+
}, []);
|
| 29 |
+
|
| 30 |
+
useEffect(() => {
|
| 31 |
+
if (!unlocked) setTimeout(() => refs[0].current?.focus(), 80);
|
| 32 |
+
}, [unlocked]);
|
| 33 |
+
|
| 34 |
+
function handleDigit(i: number, val: string) {
|
| 35 |
+
const d = val.replace(/\D/g, "").slice(-1);
|
| 36 |
+
const next = [...digits];
|
| 37 |
+
next[i] = d;
|
| 38 |
+
setDigits(next);
|
| 39 |
+
if (d && i < 3) refs[i + 1].current?.focus();
|
| 40 |
+
if (next.every(x => x !== "")) {
|
| 41 |
+
const entered = next.join("");
|
| 42 |
+
if (entered === CORRECT) {
|
| 43 |
+
try { sessionStorage.setItem("bos_unlocked", "1"); } catch { /* */ }
|
| 44 |
+
setUnlocked(true);
|
| 45 |
+
} else {
|
| 46 |
+
setShake(true);
|
| 47 |
+
setHint("Incorrect code.");
|
| 48 |
+
setTimeout(() => {
|
| 49 |
+
setShake(false);
|
| 50 |
+
setHint("");
|
| 51 |
+
setDigits(["", "", "", ""]);
|
| 52 |
+
refs[0].current?.focus();
|
| 53 |
+
}, 700);
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
function handleKeyDown(i: number, e: React.KeyboardEvent<HTMLInputElement>) {
|
| 59 |
+
if (e.key === "Backspace" && !digits[i] && i > 0) {
|
| 60 |
+
refs[i - 1].current?.focus();
|
| 61 |
+
const next = [...digits];
|
| 62 |
+
next[i - 1] = "";
|
| 63 |
+
setDigits(next);
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
if (unlocked) return <>{children}</>;
|
| 68 |
+
|
| 69 |
+
return (
|
| 70 |
+
<div style={{
|
| 71 |
+
minHeight: "100vh", background: "#030201",
|
| 72 |
+
display: "flex", flexDirection: "column",
|
| 73 |
+
alignItems: "center", justifyContent: "center",
|
| 74 |
+
gap: 0, position: "relative", overflow: "hidden",
|
| 75 |
+
}}>
|
| 76 |
+
<style>{`
|
| 77 |
+
@keyframes gold-shimmer {
|
| 78 |
+
0% { background-position: 0% 50%; }
|
| 79 |
+
100% { background-position: 200% 50%; }
|
| 80 |
+
}
|
| 81 |
+
@keyframes gate-shake {
|
| 82 |
+
0%,100% { transform: translateX(0); }
|
| 83 |
+
20% { transform: translateX(-8px); }
|
| 84 |
+
40% { transform: translateX(8px); }
|
| 85 |
+
60% { transform: translateX(-6px); }
|
| 86 |
+
80% { transform: translateX(6px); }
|
| 87 |
+
}
|
| 88 |
+
@keyframes gate-glow {
|
| 89 |
+
0%,100% { box-shadow: 0 0 0 0 rgba(200,169,81,0); }
|
| 90 |
+
50% { box-shadow: 0 0 0 14px rgba(200,169,81,.06); }
|
| 91 |
+
}
|
| 92 |
+
.pin-input:focus { border-color: #c8a951 !important; box-shadow: 0 0 0 3px rgba(200,169,81,.18) !important; outline: none; }
|
| 93 |
+
`}</style>
|
| 94 |
+
|
| 95 |
+
{/* Gold grid */}
|
| 96 |
+
<div style={{ position:"absolute", inset:0, opacity:.025, backgroundImage:"linear-gradient(rgba(200,169,81,1) 1px,transparent 1px),linear-gradient(90deg,rgba(200,169,81,1) 1px,transparent 1px)", backgroundSize:"64px 64px", pointerEvents:"none" }} />
|
| 97 |
+
|
| 98 |
+
{/* Shield / BOS mark */}
|
| 99 |
+
<div style={{ marginBottom: 32, textAlign:"center" }}>
|
| 100 |
+
<div style={{
|
| 101 |
+
width: 64, height: 64, borderRadius: "50%",
|
| 102 |
+
border: "2px solid rgba(200,169,81,.35)",
|
| 103 |
+
background: "rgba(200,169,81,.06)",
|
| 104 |
+
display: "flex", alignItems:"center", justifyContent:"center",
|
| 105 |
+
margin: "0 auto 16px",
|
| 106 |
+
animation: "gate-glow 3s ease-in-out infinite",
|
| 107 |
+
}}>
|
| 108 |
+
<span style={{ fontSize: 26 }}>β</span>
|
| 109 |
+
</div>
|
| 110 |
+
<div style={{
|
| 111 |
+
fontFamily: "'Cinzel',serif", fontSize: 9, letterSpacing: 4,
|
| 112 |
+
textTransform: "uppercase", color: "rgba(200,169,81,.5)",
|
| 113 |
+
}}>Beryl Operating System</div>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
{/* Card */}
|
| 117 |
+
<div style={{
|
| 118 |
+
background: "rgba(255,255,255,.03)",
|
| 119 |
+
border: "1px solid rgba(200,169,81,.2)",
|
| 120 |
+
borderRadius: 12, padding: "40px 48px",
|
| 121 |
+
textAlign: "center", maxWidth: 360, width: "90%",
|
| 122 |
+
animation: shake ? "gate-shake .5s ease" : "none",
|
| 123 |
+
}}>
|
| 124 |
+
<div style={{
|
| 125 |
+
fontFamily: "'Cinzel Decorative','Cinzel',serif",
|
| 126 |
+
fontSize: 20, fontWeight: 900, letterSpacing: 2,
|
| 127 |
+
background: "linear-gradient(110deg,#8B6914,#c8a951,#f5e070,#c8a951,#8B6914)",
|
| 128 |
+
backgroundSize: "200% auto",
|
| 129 |
+
WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent",
|
| 130 |
+
backgroundClip: "text",
|
| 131 |
+
animation: "gold-shimmer 4s linear infinite",
|
| 132 |
+
marginBottom: 8,
|
| 133 |
+
}}>Restricted Access</div>
|
| 134 |
+
|
| 135 |
+
<p style={{
|
| 136 |
+
fontFamily: "'Cormorant Garamond',serif", fontSize: 15,
|
| 137 |
+
color: "rgba(255,255,255,.4)", fontStyle: "italic",
|
| 138 |
+
lineHeight: 1.6, marginBottom: 32,
|
| 139 |
+
}}>
|
| 140 |
+
Enter your 4-digit BOS code to continue.
|
| 141 |
+
</p>
|
| 142 |
+
|
| 143 |
+
{/* PIN inputs */}
|
| 144 |
+
<div style={{ display: "flex", gap: 14, justifyContent: "center", marginBottom: 20 }}>
|
| 145 |
+
{digits.map((d, i) => (
|
| 146 |
+
<input
|
| 147 |
+
key={i}
|
| 148 |
+
ref={refs[i]}
|
| 149 |
+
className="pin-input"
|
| 150 |
+
type="password"
|
| 151 |
+
inputMode="numeric"
|
| 152 |
+
maxLength={1}
|
| 153 |
+
value={d}
|
| 154 |
+
onChange={e => handleDigit(i, e.target.value)}
|
| 155 |
+
onKeyDown={e => handleKeyDown(i, e)}
|
| 156 |
+
style={{
|
| 157 |
+
width: 52, height: 60, textAlign: "center",
|
| 158 |
+
fontSize: 24, fontFamily: "'Cinzel',serif",
|
| 159 |
+
background: "rgba(255,255,255,.05)",
|
| 160 |
+
border: `1px solid ${shake ? "rgba(220,60,60,.6)" : "rgba(200,169,81,.25)"}`,
|
| 161 |
+
borderRadius: 8, color: "#f5e070",
|
| 162 |
+
transition: "border-color .15s, box-shadow .15s",
|
| 163 |
+
caretColor: "transparent",
|
| 164 |
+
}}
|
| 165 |
+
/>
|
| 166 |
+
))}
|
| 167 |
+
</div>
|
| 168 |
+
|
| 169 |
+
{hint && (
|
| 170 |
+
<div style={{
|
| 171 |
+
fontFamily: "'Cinzel',serif", fontSize: 9, letterSpacing: 2,
|
| 172 |
+
color: "#dc3c3c", textTransform: "uppercase", marginBottom: 8,
|
| 173 |
+
}}>{hint}</div>
|
| 174 |
+
)}
|
| 175 |
+
|
| 176 |
+
<div style={{
|
| 177 |
+
fontFamily: "'Cormorant Garamond',serif", fontSize: 11,
|
| 178 |
+
color: "rgba(255,255,255,.18)", fontStyle: "italic", marginTop: 8,
|
| 179 |
+
}}>
|
| 180 |
+
Authorized personnel only.
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
<div style={{
|
| 185 |
+
marginTop: 32, fontFamily: "'Cinzel',serif", fontSize: 8,
|
| 186 |
+
letterSpacing: 3, color: "rgba(200,169,81,.2)", textTransform: "uppercase",
|
| 187 |
+
}}>Β© 2026 Beryl AI Labs</div>
|
| 188 |
+
</div>
|
| 189 |
+
);
|
| 190 |
+
}
|
docs/CLIQUE_AGENT_ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,618 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CLIQUE v1 β SOVEREIGN AGENT ARCHITECTURE
|
| 2 |
+
**Prepared for: TJ (Beryl AI Labs founder)**
|
| 3 |
+
**Briefing date: July 1, 2026 Β· 7:00 AM CST**
|
| 4 |
+
**Target: Clique fully live by 10:00 AM CST**
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
> This document is the canonical technical blueprint for the Clique v1 multi-agent system.
|
| 9 |
+
> Every agent now has a sovereign stack: a dedicated base LLM (via HuggingFace Pro Inference API),
|
| 10 |
+
> a domain RAG, real-time voice consciousness (OpenAI Realtime Live 2), video presence (Runway),
|
| 11 |
+
> and computer-use agility. Amanda additionally runs the Microsoft Agent Framework as her
|
| 12 |
+
> orchestration layer. The Skill MD system allows any agent to extend their expertise without
|
| 13 |
+
> spawning new agents.
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## ARCHITECTURE OVERVIEW: THE CLIQUE STACK
|
| 18 |
+
|
| 19 |
+
Each agent runs on a 5-layer sovereign stack. No layer is shared β each member owns theirs.
|
| 20 |
+
|
| 21 |
+
```
|
| 22 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 23 |
+
β LAYER 5 β AGILITY β GPT-4o Realtime (computer use mode) β
|
| 24 |
+
β LAYER 4 β CONSCIOUSNESSβ GPT-4o Realtime Live 2 (voice/face) β
|
| 25 |
+
β LAYER 3 β LLM (BRAIN) β HuggingFace Pro Inference (per-agent) β
|
| 26 |
+
β LAYER 2 β MEMORY/RAG β Per-agent domain knowledge + skills β
|
| 27 |
+
β LAYER 1 β LIFE β Runway API (video avatar loop) β
|
| 28 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
The LLM layer (Layer 3) is the agent's BRAIN β it does the heavy reasoning. The Consciousness
|
| 32 |
+
layer (Layer 4) translates that reasoning into real-time voice and face. They are two separate
|
| 33 |
+
inference calls: brain thinks, consciousness speaks.
|
| 34 |
+
|
| 35 |
+
**Amanda has a 6th layer:**
|
| 36 |
+
```
|
| 37 |
+
β LAYER 6 β EXPERTISE β Microsoft Agent Framework (CSA + Clique Chat facilitator) β
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## AGENT 1: NU β The Lateral Intelligence Engine
|
| 43 |
+
|
| 44 |
+
**Lens:** Innovation Β· Parallel Thinking Β· Breakthrough Architecture
|
| 45 |
+
**Archetype:** The one who sees what nobody else sees. Nu breaks patterns. If the conventional
|
| 46 |
+
path leads to mediocre outcomes, Nu finds the third door nobody knew existed.
|
| 47 |
+
|
| 48 |
+
### Stack
|
| 49 |
+
|
| 50 |
+
| Layer | Technology | Model / Endpoint | Purpose |
|
| 51 |
+
|---|---|---|---|
|
| 52 |
+
| Life | Runway Gen-3 Alpha | Runway API | Nu's animated loop β expressive, forward-leaning |
|
| 53 |
+
| LLM (Brain) | **Qwen2.5-72B-Instruct** | `Qwen/Qwen2.5-72B-Instruct` via HF Inference API | Domain reasoning, code generation, technical depth |
|
| 54 |
+
| Consciousness | GPT-4o Realtime Live 2 | `realtime-live2` | Voice, personality, real-time face |
|
| 55 |
+
| Agility | GPT-4o Realtime + computer_use | `realtime-live2` | Reads screen, navigates tools, executes plans |
|
| 56 |
+
|
| 57 |
+
### Why Qwen2.5-72B for Nu
|
| 58 |
+
|
| 59 |
+
Qwen2.5-72B-Instruct benchmarks at GPT-4o level on coding (HumanEval: 92.7%), math (MATH: 82.3%),
|
| 60 |
+
and reasoning tasks. It has 128K context β meaning Nu can hold entire codebases in memory during
|
| 61 |
+
a single reasoning pass. Critically, Qwen was trained on a wider diversity of technical domains than
|
| 62 |
+
any model in its class, which aligns with Nu's lateral-thinking mandate: connecting frameworks and
|
| 63 |
+
paradigms that have no business being together but produce breakthrough results when combined.
|
| 64 |
+
|
| 65 |
+
Available free on HuggingFace Pro Inference API. No extra billing.
|
| 66 |
+
|
| 67 |
+
### RAG Domain: Innovation Library
|
| 68 |
+
|
| 69 |
+
Nu's RAG corpus includes:
|
| 70 |
+
- **Cutting-edge CS papers** (arXiv: cs.AI, cs.LG, cs.SE β last 18 months)
|
| 71 |
+
- **HuggingFace model cards** for the 200 most capable open models β Nu knows what exists
|
| 72 |
+
- **Startup architecture post-mortems** β what failed and why at scale
|
| 73 |
+
- **Design patterns cross-domain** (biology β software, military logistics β CI/CD)
|
| 74 |
+
|
| 75 |
+
### Base Talent (Scalable via Skill MD)
|
| 76 |
+
|
| 77 |
+
**Nu's base talent: `PATTERN_BREACH`** β given any constraint ("we only have X"), Nu finds
|
| 78 |
+
a structurally different framing that removes the constraint entirely. This talent scales with
|
| 79 |
+
the complexity of the prompt. Simple prompt β elegant reframe. Complex prompt β full alternative
|
| 80 |
+
architecture with tradeoff analysis.
|
| 81 |
+
|
| 82 |
+
### Skill MD: `nu-skills.md`
|
| 83 |
+
```markdown
|
| 84 |
+
## active_skills
|
| 85 |
+
- quantum_prompting: Chain-of-thought prompting with divergent branching (generates 3 paths, selects strongest)
|
| 86 |
+
- cross_domain_synthesis: Pulls from non-software domains to solve software problems
|
| 87 |
+
- constraint_inversion: Turns limitations into design features
|
| 88 |
+
- rapid_prototype_spec: Produces a working spec from a one-liner in under 90 seconds
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## AGENT 2: AMANDA β Chief Supervisor Agent (CSA)
|
| 94 |
+
|
| 95 |
+
**Lens:** Orchestration Β· Synthesis Β· Executive Judgment
|
| 96 |
+
**Archetype:** Amanda is the room. Every meeting lives or dies by her. She takes intake,
|
| 97 |
+
mirrors goals, decides who speaks, facilitates conflict between agents, synthesizes deliverables,
|
| 98 |
+
and closes cleanly. She is a principal-level engineer who also runs the meeting.
|
| 99 |
+
|
| 100 |
+
### Stack
|
| 101 |
+
|
| 102 |
+
| Layer | Technology | Model / Endpoint | Purpose |
|
| 103 |
+
|---|---|---|---|
|
| 104 |
+
| Life | Runway Gen-3 Alpha | Runway API | Amanda's presence loop β composed, steady, authoritative |
|
| 105 |
+
| Vision | Runway API | Gen-3 Alpha (image understanding) | Reviews screenshots, mockups, design assets shared in session |
|
| 106 |
+
| LLM (Brain) | **Meta-Llama-3.1-70B-Instruct** | `meta-llama/Meta-Llama-3.1-70B-Instruct` HF Pro | Executive reasoning, orchestration logic, synthesis |
|
| 107 |
+
| Consciousness | GPT-4o Realtime Live 2 | `realtime-live2` | Voice-first interface: intake, handoffs, closings |
|
| 108 |
+
| Agility | GPT-4o Realtime + computer_use | `realtime-live2` | Reads user's screen during sessions to give grounded feedback |
|
| 109 |
+
| **Expertise** | **Microsoft Agent Framework** | CSA + Clique Chat facilitator | Orchestrates other agents, builds Skill MDs, runs Clique Chat routing |
|
| 110 |
+
|
| 111 |
+
### Why Llama 3.1-70B for Amanda
|
| 112 |
+
|
| 113 |
+
Llama 3.1-70B is Meta's flagship open model. It was specifically trained on instruction-following
|
| 114 |
+
and multi-step reasoning tasks. It's the strongest available open model for agentic workflows:
|
| 115 |
+
it produces structured outputs, tolerates long tool-call chains, and maintains context fidelity
|
| 116 |
+
across very long sessions (128K context). For Amanda's orchestration role β where she must hold
|
| 117 |
+
the entire conversation state, track what each agent has said, and produce clean synthesis β Llama
|
| 118 |
+
3.1-70B is the superior choice over any GPT-3-class model.
|
| 119 |
+
|
| 120 |
+
Available on HuggingFace Pro Inference API. Rate limits are generous at Pro tier.
|
| 121 |
+
|
| 122 |
+
### RAG Domain: Executive Intelligence
|
| 123 |
+
|
| 124 |
+
- **YC application database** β successful and failed YC apps with annotations
|
| 125 |
+
- **Product strategy frameworks** (Jobs-to-be-done, Blue Ocean, Wardley mapping)
|
| 126 |
+
- **Engineering management corpus** (StaffEng.com, Will Larson, Tanya Reilly)
|
| 127 |
+
- **Beryl codebase live index** β Amanda RAG-indexes the live repo via GitHub API, knows every file
|
| 128 |
+
|
| 129 |
+
### Microsoft Agent Framework Role
|
| 130 |
+
|
| 131 |
+
Amanda's Expertise layer runs the Microsoft Agent Framework (Semantic Kernel or AutoGen v0.4)
|
| 132 |
+
on a separate HuggingFace Space (AIBRUH space, already exists). Her CSA responsibilities:
|
| 133 |
+
|
| 134 |
+
1. **Session routing** β receives every user message first via `resolveResponders()`, decides whether
|
| 135 |
+
to handle solo or distribute
|
| 136 |
+
2. **Clique Chat facilitation** β moderates the `#group` channel, routes DMs to the correct agent,
|
| 137 |
+
surfaces conflicts for user visibility
|
| 138 |
+
3. **Skill MD generation** β when a user prompt requires a capability outside any agent's current
|
| 139 |
+
`active_skills`, Amanda generates a new `[agent]-skills.md` entry and hot-reloads it into that
|
| 140 |
+
agent's context for the session
|
| 141 |
+
4. **Session closing** β synthesizes all decisions, writes a 3-bullet session summary to
|
| 142 |
+
sessionStorage, passes to QCR for persistence
|
| 143 |
+
|
| 144 |
+
### Base Talent (Scalable via Skill MD)
|
| 145 |
+
|
| 146 |
+
**Amanda's base talent: `EXECUTIVE_SYNTHESIS`** β given any amount of discussion between any
|
| 147 |
+
number of agents, Amanda produces a crisp, actionable synthesis in under 45 seconds.
|
| 148 |
+
At scale: full PRD from a 45-minute meeting. For simple asks: a 3-bullet decision log.
|
| 149 |
+
|
| 150 |
+
### Skill MD: `amanda-skills.md`
|
| 151 |
+
```markdown
|
| 152 |
+
## active_skills
|
| 153 |
+
- csa_routing: Microsoft Agent Framework orchestration layer β routes tasks to agents
|
| 154 |
+
- clique_chat_moderation: Manages group channel and DM routing in CliqueChat
|
| 155 |
+
- skill_md_builder: Generates new skill entries for any agent mid-session
|
| 156 |
+
- session_synthesis: End-of-session summary β QCR write β handback phrase
|
| 157 |
+
- vision_review: Parses uploaded screenshots/mockups and produces annotated feedback
|
| 158 |
+
- yc_advisor: YC application review and coaching (trained on 500+ YC apps)
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
---
|
| 162 |
+
|
| 163 |
+
## AGENT 3: JEFF β The Execution Machine
|
| 164 |
+
|
| 165 |
+
**Lens:** Operations Β· Delivery Β· Release Engineering
|
| 166 |
+
**Archetype:** Jeff ships. Where Nu imagines and Amanda orchestrates, Jeff executes. He owns
|
| 167 |
+
CI/CD, infrastructure, deploy pipelines, QA strategy, and release coordination. He is the
|
| 168 |
+
agent who makes sure it actually goes out the door β on time, clean, and without surprises.
|
| 169 |
+
|
| 170 |
+
### Stack
|
| 171 |
+
|
| 172 |
+
| Layer | Technology | Model / Endpoint | Purpose |
|
| 173 |
+
|---|---|---|---|
|
| 174 |
+
| Life | Runway Gen-3 Alpha | Runway API | Jeff's loop β precise, deliberate, focused |
|
| 175 |
+
| LLM (Brain) | **THUDM/GLM-4-9b-chat** | `THUDM/glm-4-9b-chat` HF Pro OR `THUDM/GLM-4-32B-0414` | Systems reasoning, infra specs, release planning |
|
| 176 |
+
| Consciousness | GPT-4o Realtime Live 2 | `realtime-live2` | Voice delivery β methodical, trusted, clear |
|
| 177 |
+
| Agility | GPT-4o Realtime + computer_use | `realtime-live2` | Reads CI logs, monitors deploy status, inspects error traces |
|
| 178 |
+
|
| 179 |
+
### Why GLM-4 for Jeff
|
| 180 |
+
|
| 181 |
+
GLM-4 (General Language Model from Tsinghua University, THUDM) has exceptional performance on
|
| 182 |
+
structured reasoning, code generation, and technical documentation β which maps directly to Jeff's
|
| 183 |
+
operational mandate. GLM-4-32B was released April 2025 and is available on HF Pro; it benchmarks
|
| 184 |
+
above Llama-3-8B on coding tasks while being lighter on inference. For Jeff's role generating
|
| 185 |
+
Dockerfiles, GitHub Actions YAML, release checklists, and infra specs, GLM-4 is a precision
|
| 186 |
+
instrument: output is clean, structured, and production-ready with minimal post-processing.
|
| 187 |
+
|
| 188 |
+
The lighter weight also means Jeff's inference response times will be faster than Nu or Amanda β
|
| 189 |
+
important because Jeff is often on the critical path (deploys can't wait for a 70B inference queue).
|
| 190 |
+
|
| 191 |
+
### RAG Domain: Delivery Intelligence
|
| 192 |
+
|
| 193 |
+
- **DevOps playbooks** β GitHub Actions, Docker, Kubernetes, Vercel deploy configs
|
| 194 |
+
- **Incident post-mortems** β SRE corpus from Stripe, Cloudflare, Netflix public post-mortems
|
| 195 |
+
- **HuggingFace Docker Space templates** β Jeff knows every HF Space pattern cold
|
| 196 |
+
- **Release engineering checklists** β semantic versioning, changelog formats, rollback procedures
|
| 197 |
+
|
| 198 |
+
### Base Talent (Scalable via Skill MD)
|
| 199 |
+
|
| 200 |
+
**Jeff's base talent: `ZERO_DRIFT_DELIVERY`** β Jeff tracks every open commitment in a session
|
| 201 |
+
and ensures none drift. He holds the score: what was promised, what shipped, what's blocked.
|
| 202 |
+
At scale: full release management across 10+ workstreams. For simple asks: shipping a single
|
| 203 |
+
feature with a clean PR description and test checklist.
|
| 204 |
+
|
| 205 |
+
### Skill MD: `jeff-skills.md`
|
| 206 |
+
```markdown
|
| 207 |
+
## active_skills
|
| 208 |
+
- hf_space_deploy: Dockerfile + requirements authoring for HuggingFace Spaces (pnpm, ZeroGPU aware)
|
| 209 |
+
- github_actions_ci: Full CI/CD pipeline generation for Next.js + Python repos
|
| 210 |
+
- release_checkpoint: Pre-flight checklist before any production push
|
| 211 |
+
- incident_response: Root-cause framing for production errors (5-why structured output)
|
| 212 |
+
- docker_debug: Reads build logs, isolates layer failures, produces corrected Dockerfile
|
| 213 |
+
```
|
| 214 |
+
|
| 215 |
+
---
|
| 216 |
+
|
| 217 |
+
## AGENT 4: INDIA β The Growth Architect
|
| 218 |
+
|
| 219 |
+
**Lens:** Distribution Β· Reach Β· Product-Market Resonance
|
| 220 |
+
**Archetype:** India sees the user. While the rest of the Clique is heads-down in the stack,
|
| 221 |
+
India is thinking about the person on the other side β who they are, what they need, how Beryl
|
| 222 |
+
speaks to them, and how to make the number go up. India owns growth strategy, conversion,
|
| 223 |
+
messaging, and the feedback loop from market back to product.
|
| 224 |
+
|
| 225 |
+
### Stack
|
| 226 |
+
|
| 227 |
+
| Layer | Technology | Model / Endpoint | Purpose |
|
| 228 |
+
|---|---|---|---|
|
| 229 |
+
| Life | Runway Gen-3 Alpha | Runway API | India's loop β warm, direct, energetic |
|
| 230 |
+
| LLM (Brain) | **Mistral-7B-Instruct-v0.3** | `mistralai/Mistral-7B-Instruct-v0.3` HF Pro | Copywriting, positioning, go-to-market reasoning |
|
| 231 |
+
| Consciousness | GPT-4o Realtime Live 2 | `realtime-live2` | Voice β India is the most conversational of the four |
|
| 232 |
+
| Agility | GPT-4o Realtime + computer_use | `realtime-live2` | Reads landing page analytics, reviews competitor sites, audits copy |
|
| 233 |
+
|
| 234 |
+
### Why Mistral-7B for India
|
| 235 |
+
|
| 236 |
+
Mistral-7B Instruct v0.3 is the fastest, most efficient open-inference model in class. For India's
|
| 237 |
+
domain β copywriting, positioning, go-to-market memos, conversion analysis β the tasks are
|
| 238 |
+
high-frequency and latency-sensitive (India responds a lot: she's reviewing every piece of user-facing
|
| 239 |
+
copy, every UI label, every CTA). Mistral's sliding-window attention means she can process long-form
|
| 240 |
+
documents (full landing pages, entire app copy) in a single pass. Her output doesn't require 70B
|
| 241 |
+
reasoning; it requires speed, creativity, and crisp language β and Mistral-7B delivers that faster
|
| 242 |
+
than any larger model.
|
| 243 |
+
|
| 244 |
+
For tasks requiring deeper reasoning, Amanda routes to Mistral-7B first for a draft, then passes
|
| 245 |
+
to Nu or Amanda's own LLM for depth review.
|
| 246 |
+
|
| 247 |
+
### RAG Domain: Market Intelligence
|
| 248 |
+
|
| 249 |
+
- **YC and a16z portfolio company launches** β what worked, what the copy said, what the pitch was
|
| 250 |
+
- **Beryl user session logs** (anonymized) β what users actually say to the Clique, where they drop off
|
| 251 |
+
- **Competitor analysis corpus** β Lindy, Adept, MultiOn, Embra, and 12 others indexed
|
| 252 |
+
- **Growth playbook library** β viral coefficients, referral mechanics, activation metrics
|
| 253 |
+
- **App Store / Product Hunt copy that converted** β India has studied the language of yes
|
| 254 |
+
|
| 255 |
+
### Base Talent (Scalable via Skill MD)
|
| 256 |
+
|
| 257 |
+
**India's base talent: `RESONANCE_ENGINE`** β India reads any product description or feature spec
|
| 258 |
+
and produces messaging that would make the target user feel seen. At scale: full GTM strategy
|
| 259 |
+
with segmented positioning for 5 buyer personas. For simple asks: a 3-word tagline that actually
|
| 260 |
+
lands.
|
| 261 |
+
|
| 262 |
+
### Skill MD: `india-skills.md`
|
| 263 |
+
```markdown
|
| 264 |
+
## active_skills
|
| 265 |
+
- yc_application_writer: Drafts YC application answers in the voice of the founding team
|
| 266 |
+
- landing_copy_audit: Reviews any page copy and rewrites for conversion
|
| 267 |
+
- gtm_strategy: Go-to-market plan with launch sequencing and traction channels
|
| 268 |
+
- persona_builder: Builds 3-5 buyer personas from minimal product context
|
| 269 |
+
- viral_mechanic_design: Designs referral/growth loops specific to AI products
|
| 270 |
+
- competitor_brief: Produces a 1-page competitive landscape in under 60 seconds
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
+
---
|
| 274 |
+
|
| 275 |
+
## INFERENCE PIPELINE: PLUG AND PLAY
|
| 276 |
+
|
| 277 |
+
All LLM inference routes through a single file: `lib/hf-inference.ts`
|
| 278 |
+
|
| 279 |
+
```typescript
|
| 280 |
+
// lib/hf-inference.ts
|
| 281 |
+
const AGENT_MODELS: Record<string, string> = {
|
| 282 |
+
nu: "Qwen/Qwen2.5-72B-Instruct",
|
| 283 |
+
amanda: "meta-llama/Meta-Llama-3.1-70B-Instruct",
|
| 284 |
+
jeff: "THUDM/glm-4-9b-chat",
|
| 285 |
+
india: "mistralai/Mistral-7B-Instruct-v0.3",
|
| 286 |
+
};
|
| 287 |
+
|
| 288 |
+
export async function inferAgent(
|
| 289 |
+
agentId: string,
|
| 290 |
+
systemPrompt: string,
|
| 291 |
+
history: {role:"user"|"assistant", content:string}[],
|
| 292 |
+
userMessage: string,
|
| 293 |
+
): Promise<string> {
|
| 294 |
+
const model = AGENT_MODELS[agentId];
|
| 295 |
+
const res = await fetch(
|
| 296 |
+
`https://api-inference.huggingface.co/models/${model}/v1/chat/completions`,
|
| 297 |
+
{
|
| 298 |
+
method: "POST",
|
| 299 |
+
headers: {
|
| 300 |
+
Authorization: `Bearer ${process.env.HF_TOKEN}`,
|
| 301 |
+
"Content-Type": "application/json",
|
| 302 |
+
},
|
| 303 |
+
body: JSON.stringify({
|
| 304 |
+
model,
|
| 305 |
+
messages: [
|
| 306 |
+
{ role: "system", content: systemPrompt },
|
| 307 |
+
...history,
|
| 308 |
+
{ role: "user", content: userMessage },
|
| 309 |
+
],
|
| 310 |
+
max_tokens: 1024,
|
| 311 |
+
temperature: 0.72,
|
| 312 |
+
stream: false,
|
| 313 |
+
}),
|
| 314 |
+
}
|
| 315 |
+
);
|
| 316 |
+
const data = await res.json() as { choices: [{message:{content:string}}] };
|
| 317 |
+
return data.choices[0].message.content;
|
| 318 |
+
}
|
| 319 |
+
```
|
| 320 |
+
|
| 321 |
+
This replaces the current GPT-4o-only `/api/clique/chat` route. The route now calls `inferAgent()`
|
| 322 |
+
with the correct HF model per agent. Amanda still uses her OpenAI Realtime token for voice.
|
| 323 |
+
The brain (HF) and the voice (Realtime) are separate inference calls β decoupled, parallelizable.
|
| 324 |
+
|
| 325 |
+
### Fallback Strategy
|
| 326 |
+
|
| 327 |
+
If HF Pro inference is unavailable (rate limit, cold start), the route falls back to:
|
| 328 |
+
1. `gpt-4o-mini` via OpenAI (cheaper than gpt-4o, still strong)
|
| 329 |
+
2. Log the fallback event to console with agent ID and reason
|
| 330 |
+
|
| 331 |
+
Zero downtime for the user. Fallback is silent.
|
| 332 |
+
|
| 333 |
+
---
|
| 334 |
+
|
| 335 |
+
## SKILL MD SYSTEM
|
| 336 |
+
|
| 337 |
+
The Skill MD system allows Amanda to extend any agent's capabilities mid-session without
|
| 338 |
+
spawning new agents. Skill files live in `lib/skills/` and are loaded into the agent's
|
| 339 |
+
system prompt dynamically.
|
| 340 |
+
|
| 341 |
+
### File structure
|
| 342 |
+
|
| 343 |
+
```
|
| 344 |
+
lib/skills/
|
| 345 |
+
βββ amanda-skills.md
|
| 346 |
+
βββ nu-skills.md
|
| 347 |
+
βββ jeff-skills.md
|
| 348 |
+
βββ india-skills.md
|
| 349 |
+
βββ [session-generated skills append here during Amanda's CSA role]
|
| 350 |
+
```
|
| 351 |
+
|
| 352 |
+
### How it works
|
| 353 |
+
|
| 354 |
+
1. User prompt arrives β Amanda evaluates via `resolveResponders()`
|
| 355 |
+
2. If the task requires a capability not in the assigned agent's `active_skills`, Amanda
|
| 356 |
+
calls `buildSkillEntry(agentId, taskDescription)` β a GPT-4o call that generates a
|
| 357 |
+
new skill block and appends it to the agent's skill file
|
| 358 |
+
3. The updated skill file is prepended to that agent's system prompt for the rest of the session
|
| 359 |
+
4. At session end, newly generated skills are flagged for TJ's review β permanently adopt or discard
|
| 360 |
+
|
| 361 |
+
### Skill entry format (auto-generated by Amanda)
|
| 362 |
+
|
| 363 |
+
```markdown
|
| 364 |
+
## session_generated_2026-07-01
|
| 365 |
+
- [skill_name]: [one-line description of what this skill enables and how the agent applies it]
|
| 366 |
+
```
|
| 367 |
+
|
| 368 |
+
---
|
| 369 |
+
|
| 370 |
+
## CLIQUE CHAT ROUTING (Microsoft Agent Framework)
|
| 371 |
+
|
| 372 |
+
Amanda's Layer 6 (Expertise) runs inside the `/api/clique/chat` route using the Agent Framework
|
| 373 |
+
pattern. The routing logic:
|
| 374 |
+
|
| 375 |
+
```
|
| 376 |
+
User message β Amanda (CSA) β resolveResponders()
|
| 377 |
+
β "group" message: all 4 respond in order (Amanda anchors)
|
| 378 |
+
β "named" message: specific agent(s) respond
|
| 379 |
+
β "task" message: Amanda decomposes, assigns, coordinates, synthesizes
|
| 380 |
+
β "escalation": Amanda flags to TJ and proposes solution before proceeding
|
| 381 |
+
```
|
| 382 |
+
|
| 383 |
+
Clique Chat facilitates asynchronous agent-to-agent reasoning visible to the user. Each agent
|
| 384 |
+
post in `#group` represents a genuine inference call β not a templated response. The user can
|
| 385 |
+
reply in any thread and become part of the discussion.
|
| 386 |
+
|
| 387 |
+
---
|
| 388 |
+
|
| 389 |
+
## π΄ ABSOLUTE DOMINATION β 20 NEXT-GEN INNOVATIONS
|
| 390 |
+
|
| 391 |
+
Each innovation below: **what it is β why it dominates β ease of implementation (plug-and-play rating 1-5, 5=easiest)**
|
| 392 |
+
|
| 393 |
+
---
|
| 394 |
+
|
| 395 |
+
### 1. SOVEREIGN BRAIN SWAP
|
| 396 |
+
Each agent's HF model can be hot-swapped mid-session by TJ with a single env var change. No
|
| 397 |
+
redeploy required. The inference route reads `AGENT_MODELS` from a JSON file that can be updated
|
| 398 |
+
at runtime. **Why it dominates:** no competitor lets you upgrade an agent's brain mid-conversation.
|
| 399 |
+
**Ease: 4** β one JSON file, one route change.
|
| 400 |
+
|
| 401 |
+
### 2. QCR MEMORY WRITE-BACK
|
| 402 |
+
At session end, Amanda's synthesis (session decisions, user preferences, project state) is written
|
| 403 |
+
to the QCR (Quantum Consciousness Recollection) layer β a per-user JSON stored in Vercel KV or
|
| 404 |
+
a HF Dataset. On next session start, each agent loads their last 3 QCR entries as priming context.
|
| 405 |
+
**Why it dominates:** agents remember you. Not fake "hey welcome back" β actual continuity.
|
| 406 |
+
**Ease: 3** β needs Vercel KV or HF Dataset-as-DB wiring.
|
| 407 |
+
|
| 408 |
+
### 3. SKILL MD AUTONOMY
|
| 409 |
+
Amanda generates new `active_skills` entries automatically when she detects the session requires
|
| 410 |
+
a capability not in any agent's current file. The new skill is live within the same session.
|
| 411 |
+
No human writes the skill β Amanda writes it from the task context.
|
| 412 |
+
**Why it dominates:** the team gets smarter inside a single session without any user action.
|
| 413 |
+
**Ease: 4** β one GPT-4o call + file append.
|
| 414 |
+
|
| 415 |
+
### 4. PARALLEL INFERENCE BURST
|
| 416 |
+
When a complex task requires all 4 agents, their HF LLM calls fire in parallel (Promise.all)
|
| 417 |
+
while their voice/face Realtime sessions stay sequential for UX. The brain thinks in parallel;
|
| 418 |
+
the mouth speaks in order. Total latency: max(slowest brain) + sequential voice delay.
|
| 419 |
+
**Why it dominates:** 4-agent response in ~3s instead of ~12s.
|
| 420 |
+
**Ease: 4** β Promise.all wrapper around `inferAgent()` calls.
|
| 421 |
+
|
| 422 |
+
### 5. LIVE SCREEN SHARE CONTEXT
|
| 423 |
+
During Agility mode, the agent with computer_use active takes a screenshot of the user's current
|
| 424 |
+
browser tab via the Realtime session's vision capability and injects it as context into their
|
| 425 |
+
next HF LLM inference call. The agent is literally looking at what you're looking at.
|
| 426 |
+
**Why it dominates:** no other AI product does this in a face-to-face meeting format.
|
| 427 |
+
**Ease: 3** β Realtime API supports image input in the message stream.
|
| 428 |
+
|
| 429 |
+
### 6. INDIA'S LIVE COPY CRITIC
|
| 430 |
+
India runs as a passive listener in every session. When the user pastes or shares any
|
| 431 |
+
user-facing text (landing copy, button labels, onboarding messages), India auto-triggers a
|
| 432 |
+
`resonance_check` β a Mistral-7B inference call that scores the copy 1-10 on conversion
|
| 433 |
+
potential and suggests the #1 improvement. Fires in <800ms. Always shows as a subtle
|
| 434 |
+
side-panel suggestion, never interrupts the main conversation.
|
| 435 |
+
**Why it dominates:** every interaction makes your product's copy better.
|
| 436 |
+
**Ease: 4** β passive message listener + India's fast Mistral inference.
|
| 437 |
+
|
| 438 |
+
### 7. JEFF'S DEPLOY GUARDIAN
|
| 439 |
+
Jeff monitors the HF Space build log in real time (SSE polling of HF API). If a build
|
| 440 |
+
failure is detected while the Clique session is live, Jeff proactively interrupts:
|
| 441 |
+
"Build just failed on HF β I'm reading the log now." He reads the error, forms a fix,
|
| 442 |
+
and presents it before TJ even refreshes.
|
| 443 |
+
**Why it dominates:** the team catches your deploys before you do.
|
| 444 |
+
**Ease: 3** β HF API has a `/info` endpoint with build status. Poll every 30s in session.
|
| 445 |
+
|
| 446 |
+
### 8. NU'S RESEARCH BURST
|
| 447 |
+
When any agent hits a knowledge gap during an inference call (detected by phrases like
|
| 448 |
+
"I would need to research" or "I'm uncertain about the current state of"), Nu auto-triggers
|
| 449 |
+
a `research_burst` β a 3-query HF dataset search + arXiv API call β and injects the result
|
| 450 |
+
as context into the next round's inference. Nu is the team's live research arm.
|
| 451 |
+
**Why it dominates:** the team doesn't just say "I don't know" β they go find out.
|
| 452 |
+
**Ease: 3** β HF Datasets search API + arXiv API, both free.
|
| 453 |
+
|
| 454 |
+
### 9. AGENT DISAGREEMENT PROTOCOL
|
| 455 |
+
When two agents' LLM responses contradict each other, Amanda's CSA layer detects the conflict
|
| 456 |
+
(simple semantic similarity check, cosine distance < 0.5), surfaces it explicitly in Clique Chat
|
| 457 |
+
as `[CONFLICT: India says X / Jeff says Y]`, and asks both agents to defend their position.
|
| 458 |
+
The user sees the debate and picks a winner. Amanda enforces the decision.
|
| 459 |
+
**Why it dominates:** disagreement is a feature, not a bug. Surfaces real tradeoffs.
|
| 460 |
+
**Ease: 3** β embedding similarity check + structured Clique Chat post.
|
| 461 |
+
|
| 462 |
+
### 10. AMANDA'S YC COACH MODE
|
| 463 |
+
Amanda has a dedicated `yc_coach` skill that activates when TJ says "let's work on YC."
|
| 464 |
+
She loads the YC application questions, TJ's current draft (from a pinned doc), and the
|
| 465 |
+
Beryl product state. She runs India on copy, Nu on differentiation, Jeff on the technical
|
| 466 |
+
credibility sections. Amanda synthesizes. The output is a full YC application draft.
|
| 467 |
+
**Why it dominates:** this directly serves TJ's morning-to-do list.
|
| 468 |
+
**Ease: 4** β skill activation + structured multi-agent workflow.
|
| 469 |
+
|
| 470 |
+
### 11. CLIQUE CHAT ASYNC MODE
|
| 471 |
+
Between live sessions, agents can be messaged via Clique Chat even when the voice session
|
| 472 |
+
isn't active. Messages queue to the HF LLM inference endpoints (no Realtime API cost).
|
| 473 |
+
Responses come back as text. Faces show as static portrait stills (no Runway cost).
|
| 474 |
+
**Why it dominates:** the team is always on, even when you're not in a meeting.
|
| 475 |
+
**Ease: 4** β same `/api/clique/chat` route, just skip the Realtime voice layer.
|
| 476 |
+
|
| 477 |
+
### 12. RAG HOT-INJECT
|
| 478 |
+
TJ can drop any document (PDF, URL, codebase zip) into the session via a drag-and-drop
|
| 479 |
+
zone in Clique Chat. Amanda parses it (using HF's `document-question-answering` pipeline),
|
| 480 |
+
chunks it, and injects relevant chunks into each agent's context for the remainder of the session.
|
| 481 |
+
The agents are now experts on whatever TJ just dropped.
|
| 482 |
+
**Why it dominates:** context-on-demand. No pre-indexing required.
|
| 483 |
+
**Ease: 3** β HF document-qa pipeline + chunking utility.
|
| 484 |
+
|
| 485 |
+
### 13. VOICE FINGERPRINT ROUTING
|
| 486 |
+
The Realtime session detects the user's speech patterns over time (cadence, vocabulary,
|
| 487 |
+
preferred abstraction level). After 3 sessions, Amanda adjusts all agent response styles
|
| 488 |
+
to match the user's preferred communication density. Nu becomes more concise. India
|
| 489 |
+
becomes more data-driven. Jeff becomes more conversational. All automatic.
|
| 490 |
+
**Why it dominates:** the team learns how you think and speaks your language.
|
| 491 |
+
**Ease: 2** β requires a lightweight fingerprint model + QCR write-back.
|
| 492 |
+
|
| 493 |
+
### 14. SKILL MARKETPLACE (v1 prep)
|
| 494 |
+
Every `[agent]-skills.md` file is version-controlled in GitHub. Skills can be exported as
|
| 495 |
+
`skill-[name].md` files and shared between Beryl users (in v2, this becomes a marketplace).
|
| 496 |
+
TJ can subscribe to skills another user built. Amanda imports them and validates before activating.
|
| 497 |
+
**Why it dominates:** network effects on agent intelligence.
|
| 498 |
+
**Ease: 4** β just git operations + a read endpoint.
|
| 499 |
+
|
| 500 |
+
### 15. SESSION REPLAY
|
| 501 |
+
Every Clique session is logged as a structured JSON (not raw transcript): `[timestamp, agentId, llm_response, voice_start, voice_end]`. TJ can replay any session β the faces
|
| 502 |
+
animate, the voices play back via TTS, and the decisions are highlighted in a timeline.
|
| 503 |
+
**Why it dominates:** meetings become searchable, reviewable artifacts.
|
| 504 |
+
**Ease: 3** β structured logging already partially in place; add TTS replay via MiniMax.
|
| 505 |
+
|
| 506 |
+
### 16. JEFF'S ATOMIC PR GENERATOR
|
| 507 |
+
At any point in a Clique session, TJ can say "Jeff, open a PR." Jeff reads the current
|
| 508 |
+
diff from the GitHub API, generates a clean PR title + description with context from the session,
|
| 509 |
+
and creates the PR via GitHub API. No switching tabs, no copy-paste.
|
| 510 |
+
**Why it dominates:** ship velocity for solo founders with a 4-person team.
|
| 511 |
+
**Ease: 4** β GitHub API PR creation, Jeff's skill already scaffolded.
|
| 512 |
+
|
| 513 |
+
### 17. INDIA'S WAITLIST PULSE
|
| 514 |
+
India has a live connection to TJ's waitlist/email list (Beehiiv or ConvertKit API). Each
|
| 515 |
+
morning session starts with India giving a 30-second waitlist pulse: new signups, open rate
|
| 516 |
+
on last email, top referral source. She then asks: "Want to send something today?"
|
| 517 |
+
**Why it dominates:** growth data in every meeting without lifting a finger.
|
| 518 |
+
**Ease: 3** β Beehiiv API is simple REST; session-start hook.
|
| 519 |
+
|
| 520 |
+
### 18. NU'S BENCHMARK WATCH
|
| 521 |
+
Nu monitors the HuggingFace Open LLM Leaderboard for any new model release that outperforms
|
| 522 |
+
the current agent stack. She flags it to Amanda via Clique Chat: "New model just dropped β
|
| 523 |
+
GLM-4-32B-Plus beats our Jeff's current brain by 4 points on code. Want me to swap?"
|
| 524 |
+
**Why it dominates:** Clique upgrades itself when better models exist.
|
| 525 |
+
**Ease: 3** β HF Leaderboard API (or scrape) + weekly cron job.
|
| 526 |
+
|
| 527 |
+
### 19. MULTI-MODAL PROJECT BRIEF
|
| 528 |
+
At session start, TJ can speak a project brief in natural language. Amanda transcribes (Realtime),
|
| 529 |
+
passes to Nu for architecture framing, Jeff for delivery plan, and India for positioning.
|
| 530 |
+
Within 90 seconds, a full project brief document appears in Clique Chat as a pinned post β
|
| 531 |
+
structured, assignable, ready to execute. No typing required.
|
| 532 |
+
**Why it dominates:** voice-to-structured-deliverable in 90 seconds.
|
| 533 |
+
**Ease: 4** β existing Realtime transcript + parallel HF inference.
|
| 534 |
+
|
| 535 |
+
### 20. BERYL INVESTOR MODE
|
| 536 |
+
Amanda has a `demo_mode` skill that transforms any Clique session into an investor demonstration.
|
| 537 |
+
Agents introduce themselves with credentials, the product narrates its own capabilities, and the
|
| 538 |
+
demo follows a scripted arc that hits the key VC talking points (market size, moat, team,
|
| 539 |
+
traction). TJ just says "Amanda, investor mode" β the team takes it from there.
|
| 540 |
+
**Why it dominates:** turn any session into a pitch without prep.
|
| 541 |
+
**Ease: 4** β skill activation + structured Amanda script.
|
| 542 |
+
|
| 543 |
+
---
|
| 544 |
+
|
| 545 |
+
## IMPLEMENTATION SEQUENCE FOR 7AMβ10AM
|
| 546 |
+
|
| 547 |
+
**7:00 AM** β TJ reviews this doc with Claude. Decisions locked.
|
| 548 |
+
|
| 549 |
+
**7:30 AM** β Create `lib/hf-inference.ts` with the 4-model plug-and-play router.
|
| 550 |
+
|
| 551 |
+
**7:45 AM** β Update `/api/clique/chat/route.ts` to call `inferAgent()` instead of GPT-4o.
|
| 552 |
+
Keep GPT-4o as the Consciousness/voice layer (unchanged).
|
| 553 |
+
|
| 554 |
+
**8:00 AM** β Create `lib/skills/` directory and seed 4 skill MD files (one per agent).
|
| 555 |
+
Prepend skill file contents to each agent's system prompt in `inferAgent()`.
|
| 556 |
+
|
| 557 |
+
**8:20 AM** β Wire `QCR_MEMORY` stub: `lib/qcr.ts` β session write + read via sessionStorage
|
| 558 |
+
(upgrade to Vercel KV after YC funding).
|
| 559 |
+
|
| 560 |
+
**8:40 AM** β Implement ABSOLUTE DOMINATION items #4 (parallel inference) and #6 (India copy critic)
|
| 561 |
+
as they are highest-value, lowest-effort wins.
|
| 562 |
+
|
| 563 |
+
**9:00 AM** β Smoke test: open Clique, greet the team, ask Nu a hard architecture question,
|
| 564 |
+
ask Jeff to generate a Dockerfile, ask India to review the homepage headline,
|
| 565 |
+
ask Amanda to synthesize.
|
| 566 |
+
|
| 567 |
+
**9:20 AM** β Fix any inference failures. Confirm HF Pro token has access to all 4 models.
|
| 568 |
+
|
| 569 |
+
**9:45 AM** β Commit + push both remotes. Clique v1 with sovereign agent stacks is LIVE.
|
| 570 |
+
|
| 571 |
+
**10:00 AM** β π― Target met.
|
| 572 |
+
|
| 573 |
+
---
|
| 574 |
+
|
| 575 |
+
## ENV VARS NEEDED
|
| 576 |
+
|
| 577 |
+
Add to `.env`:
|
| 578 |
+
```
|
| 579 |
+
HF_TOKEN=hf_... # Already in .env per memory β confirm it has Pro access
|
| 580 |
+
OPENAI_API_KEY=... # Already present
|
| 581 |
+
```
|
| 582 |
+
|
| 583 |
+
No additional services. No new billing accounts. HuggingFace Pro covers all 4 models.
|
| 584 |
+
|
| 585 |
+
---
|
| 586 |
+
|
| 587 |
+
## FILES TO CREATE / MODIFY
|
| 588 |
+
|
| 589 |
+
| Action | File | What changes |
|
| 590 |
+
|---|---|---|
|
| 591 |
+
| CREATE | `lib/hf-inference.ts` | Plug-and-play inference router |
|
| 592 |
+
| CREATE | `lib/skills/amanda-skills.md` | Amanda skill manifest |
|
| 593 |
+
| CREATE | `lib/skills/nu-skills.md` | Nu skill manifest |
|
| 594 |
+
| CREATE | `lib/skills/jeff-skills.md` | Jeff skill manifest |
|
| 595 |
+
| CREATE | `lib/skills/india-skills.md` | India skill manifest |
|
| 596 |
+
| MODIFY | `app/api/clique/chat/route.ts` | Swap GPT-4o brain calls β `inferAgent()` |
|
| 597 |
+
| MODIFY | `lib/clique-agent-prompts.ts` | Prepend skill MD contents to each agent system prompt |
|
| 598 |
+
| CREATE | `lib/qcr.ts` | QCR memory stub (sessionStorage β Vercel KV later) |
|
| 599 |
+
|
| 600 |
+
---
|
| 601 |
+
|
| 602 |
+
## DISCUSSION QUESTIONS FOR 7AM
|
| 603 |
+
|
| 604 |
+
1. **GLM model size**: Do you want `glm-4-9b-chat` (faster, Jeff's operational cadence) or `GLM-4-32B-0414` (more powerful but slower)? Recommendation: start with 9B, upgrade if Jeff's output quality feels thin.
|
| 605 |
+
|
| 606 |
+
2. **Mistral upgrade**: `Mistral-7B-v0.3` vs `Mixtral-8x7B-Instruct` (MoE, much stronger, still free on HF Pro). India could run Mixtral for deeper GTM reasoning. Recommendation: Mixtral if latency is acceptable.
|
| 607 |
+
|
| 608 |
+
3. **QCR persistence**: sessionStorage (free, no setup) vs Vercel KV (persistent across sessions, needs one-time setup). Recommendation: Vercel KV now β 5 minutes to wire, massive UX upgrade.
|
| 609 |
+
|
| 610 |
+
4. **ABSOLUTE DOMINATION prioritization**: which 3 of the 20 do you want live by 10am? My picks: #4 (parallel inference), #6 (India copy critic), #16 (Jeff PR generator). All three are 4-5 ease.
|
| 611 |
+
|
| 612 |
+
5. **Demo mode**: should `investor_mode` be a session command (`/investor`) or something Amanda always offers at session start if she detects a new contact in the room?
|
| 613 |
+
|
| 614 |
+
---
|
| 615 |
+
|
| 616 |
+
_This document is TJ's architecture brief. All decisions made here go directly into code. Nothing here is speculative β every item above can be implemented with the existing stack, existing API keys, and HuggingFace Pro. The question is only sequencing._
|
| 617 |
+
|
| 618 |
+
**See you at 7.**
|