This file is read by AI coding agents (Claude Code, Codex, Copilot, Aider, etc.) to understand project conventions, architecture decisions, and contribution patterns.
lo6 is a “Newsroom Operating System” — an Ableton Live for journalists. It orchestrates AI agents for sourcing, research, and drafting while keeping human journalists in creative control through a Human-in-the-Loop architecture with strict source provenance.
┌─────────────────────────────────────────────────┐
│ Newsroom Console (Next.js) │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Triage │ │ Editor │ │ Signal Exchange │ │
│ │ Board │ │ Studio │ │ Dashboard │ │
│ └──────────┘ └──────────┘ └──────────────────┘ │
└──────────────────────┬──────────────────────────┘
│ tRPC / REST
┌──────────────────────┴──────────────────────────┐
│ Newsroom Engine (LangGraph.js) │
│ ┌─────────┐ ┌──────────┐ ┌───────────────────┐ │
│ │ Sourcing │ │ Research │ │ Drafting Agent │ │
│ │ Agent │ │ Agent │ │ │ │
│ └─────────┘ └──────────┘ └───────────────────┘ │
└──────────────────────┬──────────────────────────┘
│ Prisma
┌──────────────────────┴──────────────────────────┐
│ PostgreSQL (Supabase / Neon) │
└─────────────────────────────────────────────────┘
any. No @ts-ignore. Zod for runtime validation.prisma/schema.prisma.npx shadcn@latest add <component>.lo6/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── (auth)/ # Auth group route
│ │ ├── (dashboard)/ # Main dashboard layout
│ │ │ ├── triage/ # Triage Board page
│ │ │ ├── research/ # Research Desk page
│ │ │ ├── editor/ # Writing Studio page
│ │ │ ├── editorial/ # Editorial Review page
│ │ │ └── signals/ # Signal Exchange page
│ │ ├── api/ # API routes (tRPC)
│ │ └── layout.tsx
│ ├── components/
│ │ ├── ui/ # Shadcn/UI primitives
│ │ └── features/ # Feature-specific components
│ ├── lib/
│ │ ├── agents/ # LangGraph agent definitions
│ │ │ ├── sourcing.ts # SourcingAgent node
│ │ │ ├── research.ts # ResearchAgent node
│ │ │ ├── drafting.ts # DraftingAgent node
│ │ │ ├── triage.ts # TriageAgent (scoring)
│ │ │ └── graph.ts # Main LangGraph workflow
│ │ ├── db/ # Prisma client & queries
│ │ ├── auth/ # Supabase auth helpers
│ │ ├── validators/ # Zod schemas
│ │ └── utils/ # Shared utilities
│ ├── hooks/ # Custom React hooks
│ ├── stores/ # Zustand stores
│ └── types/ # Shared TypeScript types
├── prisma/
│ └── schema.prisma
├── docs/ # Architecture & spec documents
├── tests/ # Vitest test files
├── public/
├── .env.example
├── AGENTS.md # This file
├── CONTRIBUTING.md
└── README.md
dangerouslySetInnerHTML without sanitization.docs/security_spec.md and docs/lib/security.md for concrete patterns.sourceUrl and sourceSnippet.[UNVERIFIED].Lead → Triage → Research → Draft → Review → PublishTriageCard.tsx).formatSource.ts).sourcing.ts, researchNode.ts).good-first-issue or help-wanted from the GitHub issue board./docs before writing any code.feat/<issue-number>-<short-description>./tests, then implement.npm run lint && npm run typecheck && npm run test && npm run build
any. Run npm run typecheck — it must pass with zero errors.npx shadcn@latest add <component>.lib/ or hooks/.| Area | Read This |
|---|---|
| Architecture | docs/implementation_plan.md |
| Database schema | docs/data_model.md |
| Agent workflows | docs/agent_interface_spec.md |
| UI/UX | docs/frontend_spec.md |
| Security | docs/security_spec.md |
| Security snippets | docs/lib/security.md |
| Accessibility | docs/accessibility_appendix.md |