Inspiration
A long-running editorial project accumulates institutional memory faster than any one producer can retain it. The same story gets pitched twice, a speaker's new claim quietly conflicts with an older position, and familiar AI-generated phrases make their way into drafts. Ordinary search can find words, but it does not preserve the relationship between an episode, speaker, claim, review rule, and editorial decision. Editorial Brain was designed to make that memory durable and inspectable.
What it does
Editorial Brain ingests episode scripts into a structured archive and reviews a new draft against that archive. The current workflow performs:
- C1 continuity: retrieves semantically similar prior segments and cites earlier coverage.
- C2 contradiction: retrieves attributed prior claims and adjudicates plausible conflicts while preserving the speaker and episode context.
- C4 house style: applies deterministic editorial rules and quotes the exact offending span.
The public review desk lists completed runs, shows findings by severity and check, and lets a judge open the cited source and the safe audit/configuration information actually retained. Missing trace fields are grouped honestly as additional audit details rather than fabricated. An authenticated judge session receives one complete immutable script from a 12-script synthetic registry and may run it once. An atomic campaign counter stops after 30 accepted executions. There is no arbitrary public upload, prompt, SQL, or write surface.
How we built it
The agent runs as Python 3.12 Lambdas on AWS. Scripts and artifacts are stored privately in S3. Amazon Bedrock supplies Titan Text Embeddings V2 and the text-model calls used for extraction and adjudication. CockroachDB stores the archive, embeddings, attributed claims, style rules, review state, findings, and safe audit records. A static CloudFront UI reads a frozen synthetic projection through a GET-only Lambda API. Cognito, API Gateway, and DynamoDB protect the assigned-sample workflow, enforce one job per visitor capability, and cap the campaign at 30 accepted executions.
The infrastructure is plain CloudFormation, divided into data, compute, anonymous report, and authenticated producer stages. The initial serverless design has no VPC or NAT gateway.
CockroachDB tools used
Distributed Vector Indexing
Distributed vector indexes over both episode segments and attributed claims are in the review path, not beside it. Continuity uses segment retrieval; contradiction review uses claim retrieval and then joins the selected candidates back to episode, speaker, and chronology. The synthetic ten-query benchmark measured hit@1 0.80, hit@5 1.00, and MRR 0.875 with Titan V2 1,024-dimensional embeddings.
CockroachDB Cloud Managed MCP Server
Managed MCP provides a separate read-only agent interface to the same synthetic archive. It was used for source-backed archive questions and a query combining stored-vector similarity with structured speaker and episode filters. The MCP identity has no application write privileges and is not reused as an administrative credential.
We do not claim ccloud as a third tool; it was only a provisioning convenience.
AWS services used
- Amazon Bedrock: Titan V2 embeddings plus Bedrock-hosted text-model extraction and contradiction adjudication.
- AWS Lambda: resumable ingest and review execution, read-only report projection, and the authenticated assigned-sample adapter.
- Amazon S3: private scripts/artifacts and the private origin for the static UI.
- Amazon CloudFront: anonymous HTTPS delivery of the static review desk.
- Amazon Cognito and API Gateway: authentication and JWT enforcement for the bounded live run.
- Amazon DynamoDB: idempotent job ownership and safe progress projection for the demo.
- AWS Secrets Manager, SQS, and CloudWatch: least-privilege database credentials, dead-letter handling, logs, metrics, and operational evidence.
Challenges
The hardest problem was not calling a model; it was deciding what evidence must survive the call. Editorial findings cross retrieval, model, rule, retry, API, and browser boundaries. We built a safe public projection that exposes citations and recorded configuration while refusing to invent missing candidate ranks, reviewer transitions, or producing revisions.
The second challenge was demonstrating a real workflow without exposing an abuse surface. The anonymous API is read-only, and the authenticated launcher accepts only the server assignment from an integrity-checked 12-script registry. Visitor idempotency, a 30-execution campaign cap, and bounded Lambda concurrency constrain model work.
Accomplishments
- Three memory types—episodic, semantic, and procedural—in one transactional database.
- Two meaningful CockroachDB integrations: distributed vector retrieval and Managed MCP.
- A live AWS workflow that assigns one of 12 immutable scripts, produces a distinct cited report, and stops at 30 accepted campaign executions.
- A public read model that names trace gaps instead of presenting unsupported certainty.
- A synthetic public corpus, 481 public-repository tests, CloudFormation validation, and a reproducible public repository.
What we learned
Agent memory is useful only when retrieval preserves enough context to support a human decision. Vector similarity alone is not an editorial answer; speaker attribution, chronology, rule versions, audit state, and explicit uncertainty are what turn retrieval into trustworthy workflow memory.
What's next
The next product phase is the private publisher workflow: controlled corpus import, immutable script and verified-transcript revisions, reviewer accepted/dismissed/resolved transitions, normalized ordered candidate evidence, and longitudinal editorial analytics. The public demo will remain synthetic and bounded.
Disclosure and limitations
- Product direction, editorial workflow, and final decisions are Steven Pennington's. OpenAI Codex and Claude were used as development and research tools.
- The owner-authored style checklist predates the hackathon and is incorporated as disclosed configuration/data. The application implementation was created during the submission period.
- All public episodes and drafts are synthetic. Real TSL/SFH material and credentials are not in the repository.
- Current finding traceability is partial where ordered candidate sets, reviewer lifecycle, producing revision, or redacted evidence references were not persisted.
- The public surface is a bounded demonstration, not a multi-tenant upload service.
Built With
- amazon-api-gateway
- amazon-bedrock
- amazon-cloudfront
- amazon-cloudwatch
- amazon-cognito
- amazon-dynamodb
- amazon-sqs
- amazon-web-services
- aws-lambda
- aws-secrets-manager
- cloudformation
- cockroachdb-cloud
- cockroachdb-cloud-managed-mcp-server
- distributed-vector-indexing
- javascript
- python
Log in or sign up for Devpost to join the conversation.