CI-OS (Second-Brain)
Vault: second_brain Path: CI-OS
index.md
CI-OS (Argus) — Competitor Intelligence Operating System
Compiled truth (current state)
CI-OS is Arijit's clean-slate Competitive Intelligence operating system. The product voice and operating agent is Argus — a "CI CEO" that is skeptical, witty, commercially sharp, and evidence-led, not a generic assistant. It runs on Hermes (the NousResearch hermes-agent on the chowmes VPS). The ambition is an autonomous, self-improving CI system that discovers sources, collects evidence, synthesizes market meaning, maintains living competitor theses, routes actions, updates a dashboard, and delivers decision-grade intelligence. The end goal is a sellable product, piloted first with Algolia (Arijit's employer, his domain expertise) and in parallel with partners Spryker and Amplitude as additional tenants.
Why it is differentiated (vs Crayon, Klue, Kompyte, Contify — teardown in AI-Development/Research/docs/Competitive-Intel-Proof.md): existing tools are battlecard databases with an alert feed. CI-OS is coverage-aware (refuses to say "market quiet" unless every source lane provably ran — a missing source is a failure event, not a quiet day), it synthesizes deltas into materiality-scored meaning and living per-competitor theses instead of dumping links, it self-audits its own misses (false-negative auditor + learning loop), and every claim is source-backed or it does not ship. The two failure modes it must avoid, per the research: "another noisy feed with no decision layer" and "treating LLM summaries as evidence."
The core situation as of 2026-07-07: three disconnected assets. (1) An excellent planning packet in AI-Development/CI-OS/docs/planning/ — the manifesto is the full capability spec. (2) A real-but-off-spec V0 skill running on Hermes, NOT in the repo, inside the hermes Docker container at /opt/data/knowledge/obsidian/MyOS/Projects/Competitive Intelligence/skills/competitive-research/ — a monolithic 171KB ci_core.py, a ci.sqlite ledger, an Algolia-branded HTML template, and two Hermes-internal cron jobs (daily 09:00 ET, weekly Sunday 09:00 ET) delivering to Telegram chat 6789423537. (3) A paused dashboard mockup. The real problem is the disconnect: V0 was a stopgap that rotted because it shared no source of truth with the spec.
V0 was silently broken and is now hotfixed. Delivery was never dead — the pipe worked — but every daily brief was an identical empty "quiet day" report (byte-identical 10,430-byte template). Root cause: the collector found ~15 semantic deltas per day but promoted 0 to signals (blob-vs-line text extractor yielding 0 facts, a premature break that only ever hit static page headers, and a topic whitelist too narrow to clear the 0.65 publish gate). Fixed on 2026-07-07 (backup ci_core.py.bak-20260707): a dry-run on real data went from 0 to 8 genuine signals, brief grew to 13,421 bytes, the quiet-day fallback no longer fires. Live proof is the first 09:00 ET run after the fix — Arijit must eyeball signal quality. Still open: Telegram sends the HTML as an attachment (the send layer in Hermes core needs parse_mode="HTML" to make the message itself rich); bot_deliveries never advances past "queued"; no Telegram user allowlist; and the OpenRouter + Nous API keys are dead on credit (this only affects interactive Argus chat, not the Gemini-powered digest — but it is a hard blocker for the rebuild's Claude-tier synthesis).
SESSION CLOSED (2026-07-08 ~15:30 ET) — cockpit interactive, machine autonomous. Final batch shipped: barometer selection now drives the lens panels (the design checkpoint's "click commits" behavior), plays are clickable with evidence chips and ranked with an explicit focus-first line, pages carry cache-busting, and the brief page renders in the cockpit's design language (content refreshes with tomorrow's 09:00 ET run, which persists reader_text going forward). A fast rerender tool (scripts/rerender_dashboard.py) refreshes the screen from the ledger in seconds without the 15-minute pipeline. ~52 commits, 497 tests.
DAY CLOSED (2026-07-08 ~14:20 ET): the full loop is live and self-running. Cockpit value fixes verified on the live page — the three role lenses now carry the prescription engine's team-routed plays (the ordering bug that hid them is dead), the brief link works, and the evidence bibliography dedups; the composite barometer score and card-level source dedup take effect with the next data run. Tomorrow 09:00 ET is the first fully-automatic, fully-corrected cycle. A fast re-render path (saved state → page in ~30 seconds) now decouples screen updates from the 15-minute pipeline.
THE COCKPIT IS LIVE (2026-07-08 ~13:30 ET). Arijit's hand-designed Argus cockpit (the Luxury Editorial mockup with role rail, Competitor Attention Barometer, and eye-behind-the-lenses — found in docs/mockups/ after Arijit asked "where is the UI I designed"; it had been missed by the overnight build) now renders from real pipeline state and serves as the ci.chowmes.com front page. His five-finding redundancy verdict on the brief was root-fixed the same hour (signal clustering, thesis attach-not-spawn, history/panel cleanup). A screenshot audit found five remaining data-mapping fidelity gaps (per-signal barometer rows instead of per-competitor, raw hero text, broken image assets, lenses not reading persisted plays, dead brief link); a fix agent is completing them, after which the page regenerates and Arijit gets the side-by-side against his mockup.
FIRST OFFICIAL BRIEF DELIVERED (2026-07-08 12:07 ET) — with prescriptions. After two live defects were caught and root-fixed (V2 initially wired to the wrong Telegram bot — Argus has its own Argus_CI_bot, Arijit caught it; and the Hermes gateway only loads cron jobs at startup, so the 09:00 job silently never fired — fixed by gateway restart, tomorrow fires automatically), the catch-up run delivered the first official Argus brief: three quality-passed signals plus the new YOUR PLAYS section (prescriptions persisted as action items). Spryker's brief failed quality even after a revision pass and was correctly blocked. The dashboard refreshed from the same run. The tenant onboarding pipeline (company-swap CLI, human-reviewed plans) and all module wiring are committed; 426 tests.
CUTOVER COMPLETE (2026-07-08 ~07:50 ET): Argus V2 IS the production system. On Arijit's explicit order the old system's jobs were paused (one-command rollback preserved), V2 took the 09:00 ET slot, the parallel-run marker was dropped, and ci.chowmes.com's root page now renders from the V2 pipeline in his original design language with every dormant section backed by real data (Suppressed Signals from suppressed_diagnostics, Report history from the migrated archive) or an honest empty state — no stubs. All four doctrine addendum 2 modules are also built and committed (own-brand research, multi-horizon dot-connector, prescription engine, collateral generator; 400 tests green), pending the wiring pass into the daily/weekly flow. First post-cutover brief: 09:00 ET today.
Session closed 2026-07-08 ~06:30 ET — totals: 25 commits, 310 tests, built-to-deployed in one night. Morning proof pending: V0's post-hotfix brief at 09:00 ET and V2's first Hermes-fired genuine-delta brief at 09:15 ET, side by side on Telegram; cutover remains Arijit's explicit call. Queued next: Phase 1b (delivery through Hermes's webhook push), then the doctrine addendum 2 modules (own-brand research, multi-horizon lookbacks, prescription engine, collateral generator) and the premium dashboard experience (mockups to Arijit before build).
Phase 1 executed (2026-07-08 ~06:20 ET): Hermes now owns the schedule. The V2 pipeline runs from a Hermes cron job (cios-v2-daily, 09:15 ET, script mode, no LLM in the trigger path) against a cios venv inside the container; the duplicate system cron is gone. Host networking (container shares the VPS network) made the wiring trivial. Timezone truth established: everything runs America/New_York — V0 delivers 09:00 ET, V2 09:15 ET, side by side in Arijit's morning. Remaining Phase 1b: delivery through Hermes's zero-cost webhook path, shim-as-provider feasibility, email target.
Architecture decision (2026-07-08): Hermes is the spine, cios is the brain. The integration study (repo docs/planning/CI-OS-hermes-integration-study-2026-07-08.md) found cios duplicated Hermes's channels/cron/model plumbing, while the one genuine cios-only asset is the multi-tenant identity layer. Architecture A adopted with Arijit's go: Hermes provides execution/channels/scheduling/webhooks/chat (and the ≤30-minute freshness machinery the doctrine demands), cios provides collection/synthesis/quality/theses plus identity. Phased: consolidate spine → freshness lane → interactive Argus chat → multi-tenant productization (with the Claude-Max-to-API-keys licensing swap). Doctrine addendum 2 also recorded: Argus differentiates as the dot-connector (multi-horizon industry lookbacks, own-brand research, prescriptions, generated collaterals). The V2 dashboard is now public at ci.chowmes.com/v2.
V2 IS DEPLOYED AND DELIVERING (2026-07-08 morning, parallel run). Arijit's product doctrine was recorded verbatim (product-doctrine.md here; the repo copy is canonical) and the brief layer rebuilt to it: the reader is the tenant's CMO, every signal names the team to involve, weekly patterns and monthly roll-ups are first-class, and the intelligence layer is domain-agnostic by test. The deploy leg then went end to end: V2 runs on the VPS (own Postgres, Claude shim service, all 286 tests green server-side), the REAL ci.sqlite history is migrated (the migration's loud-fail guard caught two real schema mismatches before any data moved), and after three live-run defects were found and root-fixed (cold-start recency claims correctly blocked by the quality gate, duplicate-source collection skips, a row-shape bug) the first genuine Argus V2 baseline brief was DELIVERED to Arijit's Telegram with quality passed. A 09:15 UTC daily cron now runs V2 beside V0's 09:00 so both briefs arrive side by side. V0 untouched; cutover is Arijit's explicit call after comparing.
FULL REHEARSAL PASSED (2026-07-08 ~03:00): the V2 system works end-to-end. The three-tenant rehearsal (real fetches, live Claude brain, real Postgres, real delivery code) went from partial failure to a clean pass across six fix iterations, each killing a genuine defect class: delivery is now physically gated on the quality verdict (a failed brief cannot ship), evidence cites individual articles instead of blog index pages, every quote and figure is verified verbatim against the source text before review, and a failed review feeds its required fixes back to the brain for one revision pass before staying blocked. Final run: Algolia acceptance standard MET, quality passed for all three tenants, all three planted misses caught, zero cross-tenant leakage in 18 probes. The dashboard renderer is also done: Arijit's existing page design (CSS verbatim) now renders from V2 state with a local preview CLI, nothing deployed; report-history and suppressed-signals panels are omitted until a truthful data source exists. What remains before cutover: the real ci.sqlite migration on the VPS and Arijit's two verdicts (9 AM brief quality; explicit cutover go). V0 stays live untouched meanwhile.
The rebuild is now ~70% built (overnight 2026-07-08 multi-agent run). The V2 codebase lives in AI-Development/CI-OS/src/cios/ — 11 commits, 216 offline tests plus 16 integration tests against a real Postgres, every subagent claim independently re-verified before commit. Done and committed: the multi-tenant platform foundation (51-table Postgres schema with row-level security proven to block cross-tenant reads, identity/permission checks with a full audit trail, model-provider router, Telegram + email channel adapters); the source ledger (find/validate/retire competitor sources, independently graded 18/18); the collection layer (a faithful port of the prod-hotfixed extraction logic, plus the V0 sqlite→Postgres migration script, synthetic-fixture-tested only); the executive-speech scanner (verbatim quote + source URL required, else rejected); the semantic brain (synthesizer enforcing evidence-or-silence and coverage-before-quiet, claim ledger with contradiction detection, living theses, quality reviewer, false-negative auditor, adversarial refute panel); the learning loop (every run outcome recorded, improvement proposals require evidence, never auto-applied); and the delivery layer (rich Telegram HTML with injection-safe escaping, honest send-state recording that kills V0's false "sent" rows). The former hard blocker is CLEARED: Claude now answers live from the VPS (key from Arijit's fresh login installed to /root/.hermes/.env, verified with a real call). In flight: the live brain certification — real competitor pages through real Claude against the five hard acceptance criteria. Not started: the dashboard, the three-tenant end-to-end rehearsal, and the V0 cutover (V0 remains live and untouched until parity is proven).
The build plan is written and authorized. AI-Development/CI-OS/docs/planning/CI-OS-Fable-build-goal-spec.md (187 lines) is the handoff document for Fable to build the real CI-OS as a long-running task. It records the verified ground truth, the locked decisions, a gated build order (Gates 0-7, brain-before-breadth), a paste-ready /goal prompt (section 8), and a hard precondition (a working Claude provider must exist on the VPS before Gate 4). Locked decisions: hotfix-now + rebuild-for-Fable; multi-tenant from day 1; tiered models (cheap tier for collection/extraction, Claude Opus for synthesis/thesis/quality, behind a provider router); channels = Telegram-rich then email then dashboard then WhatsApp/Apple Messages; full platform per spec, gated core-first.
Honest risk: a single fire-and-forget Fable run on a full multi-tenant platform yields a big half-working thing. A great single-tenant brain reviewed at each gate is the actual path to "amazing." The spec forces brain-before-breadth for this reason.
Timeline (append-only)
2026-07-07 — Session: recovery + Fable handoff spec
- Diagnosed the live V0 on Hermes read-only: delivery alive, but every daily/weekly brief was the identical empty quiet-day template because 15 deltas/day were promoted to 0 signals.
- Root-caused three coupled defects in
ci_core.pyand applied a production hotfix (backupci_core.py.bak-20260707); dry-run on real 2026-07-07 data: 0 → 8 genuine signals, brief 10,430 → 13,421 bytes. Live verification pending the next 09:00 ET cron run. - Interviewed Arijit; locked 7 decisions (sequencing, tenancy, models, channels, scope, deadline, hotfix authorization).
- Wrote
CI-OS-Fable-build-goal-spec.md(the deadline deliverable: spec ready to hand Fable before Fable's departure), linked it at the top ofCI-OS/index.md, and identified the CI research corpus (Research/docs/Competitive-Intel-Proof.md). - Surfaced the hard blocker: no working Claude provider on the VPS (OpenRouter/Nous credit dead) — must be fixed before Gate 4.
- Claude memory notes:
ci-os-argus-state-2026-07-07. Related infra memory:reference-hostinger-api-key,aios-jarvis-knowledge-base.
Folder catalog (auto-added 2026-07-07 clean-brain — every note must be reachable from its index)
- CI-OS Log
- CI-OS task ledger
- CI-OS Product Doctrine — Arijit's verbatim product intent (2026-07-08); outranks any implementation detail