Source Compile Automation Setup
How to set up the
source-compileautomation in Codex and Cursor Automations.
What It Does
The source-compile automation closes the loop between raw data collection and knowledge compilation:
- Syncs X bookmarks and indexes Codex, Cursor, and Claude conversations in place
- Enriches X bookmarks with resolved links, linked READMEs/articles/transcripts, author self-threads, author artifact replies, and demo media
- Researches promoted bookmark entities online before writing durable pages
- Audits recent agent sessions for friction patterns and skill opportunities
- Proposes exact stable-owner, skill, workflow, and router changes through Daily Brief
- Defers writeback to a separate exact-approval apply/verify path
The local runner can index and selectively replay the actual Codex, Cursor, and Claude stores; the cloud runner cannot access those private local paths and must not claim session coverage. Source: automations/source-compile.md; automations/source-compile.cursor-automation.md
Runner Decision
| Runner | Use when | Limitation |
|---|---|---|
| Local Codex / local agent | Need local transcripts, local skills, X bookmark sync, or direct filesystem access | Must run on Kevin's machine |
| Cursor cloud automation | Raw/enriched repository sources are already committed and task can use GitHub/Firecrawl | Cannot read local ~/.cursor, ~/.codex, ~/.claude, browser profiles, private session analyses, or uncommitted files |
| Manual supervised run | Source quality or filing decisions need Kevin review | Slower but safer for new source classes |
If the run discovers a repeated compile pattern, update or create the relevant skill. Source compile is not only ingestion; it is also skill maintenance.
Manual Trigger
In any agent session (Cursor, Codex, Claude Code):
Run the source-compile automation.
The agent reads automations/source-compile.md and follows the 5-phase pipeline.
Recover a missing task or project month
For one completed Codex task, paste its full task URL or native ID:
npm run brain -- sessions index
npm run brain -- replay sessions --id <task-url-or-id>
npm run brief -- compile-analysis .brain/analyses/<analysis_id>.json
For the month when the wiki was absent, select by provider, project/workspace, and exact dates before replaying bounded batches:
npm run brain -- sessions list --since <start-ISO> --until <end-ISO> --workspace <project> --limit 100 --json
npm run brain -- replay sessions --since <start-ISO> --until <end-ISO> --workspace <project> --limit 25
If the task appears in the Codex app but no local provider JSONL exists, export
or otherwise authorize a private capture and add it with sessions index --path <export> --provider codex. Task-catalog metadata proves discovery only; the
captured turns and their repository/test artifacts are the evidence. Replayed
signals remain private candidates until review and verified owner writeback.
Cursor Automations (Cloud Cron)
- Go to cursor.com/automations
- Create new automation
- Name: Source Compile
- Schedule: Daily-compatible for cloud, or on push to
raw/ - Repo:
kevin-wiki - MCPs: GitHub
- Instructions: Copy the text inside the code block from
automations/source-compile.cursor-automation.md
Limitation: Cloud sandbox cannot access local paths (~/.cursor/, ~/.codex/, ~/.claude/) or .brain/. It can process committed raw sources and validated redacted review receipts, but agent-session replay stays local.
Codex Automation (Local Cron)
Codex runs the local connector every four hours. Register and update it through
the Codex automation API/UI; never mutate the scheduler database directly. The
live job is wiki-source-compile, and its prompt begins with
AUTOMATION_ID: source-compile so npm run audit:automations can bind the
scheduler entry to the canonical V2 definition.
Because the Codex project registry currently points at the main checkout, the
prompt also says Work only in /Users/kevinliu/repos/Kevin-Wiki-v3. The audit
fails readiness if that exact checkout pin disappears. The canonical task logic
remains in automations/source-compile.md; the scheduler prompt is only a thin
wrapper.
The job is proposal-only. It may sync, enrich, index, replay bounded cohorts,
research, create validated source-review receipts, and deliver Daily Brief
proposals. It may not update wiki owners, skills, routing, absorption markers,
indexes, state change/verification clocks, commits, or merges. Those belong to a
separate approved-mutation path consuming Kevin's exact durable approval receipt.
Verifying It Works
After the first automated run, check:
npm run audit:automations
npm run brief -- list
npx tsx scripts/doctor.ts --only automations --verbose
Done Criteria
A source-compile run is complete only when:
- output file exists under
outputs/<date>/source-compile/ - source revisions and replay fingerprints are content-bound
- every accepted candidate has a validated source-review receipt
- every proposal names stable owners, exact source revisions, patch hash, proof, strongest objection, authority, and rollback
- the Daily Brief delivery receipt exists
- only the research/run clock advances; changed/verified clocks remain untouched
- blocked/no-op runs preserve evidence and a concrete reopening condition
- a later approved apply runs the affected owner doctors, index/projection/QMD refresh, absorption markers, and canonical change log
Timeline
- 2026-08-12 | Verified a real proof-bound source-compile run that deep-read an X-linked release toolchain, corrected a bad child-repository guess against primary repositories, produced five exploration receipts and one held stable-owner review, delivered the exact proposal to Daily Brief, and advanced only the research clock. Source:
reviews/source-signals/sentry-release-toolchain-2082947922648281278-2026-08-12.json;.brain/automation-runs/source-compile/ - 2026-08-11 | Replaced direct SQLite scheduling and automatic wiki/commit
instructions with the audited Automation V2 registration, explicit V3
checkout pin, proposal-only Daily Brief delivery, and exact-approval writeback
boundary. Source:
wiki-source-compile;npm run audit:automations - 2026-07-01 | Updated local Codex setup from daily to every four hours to match the current sub-daily source/email/Slack capture loop. Source: User request, 2026-07-01; Sub-Daily Cadence
- 2026-08-10 | Added generated-surface and artifact-audit closeout through graph objects and workflows. Source: User request, 2026-08-10
- 2026-06-19 | Updated setup for daily X bookmark deep absorption: Codex local cron should use the canonical
kevin-wikipath, run enrichment before absorption, inspect author artifact replies, research promoted entities online, and route stack changes into skills/tool routers. Source: User request, 2026-06-19 - 2026-06-18 | Added runner decision table and done criteria distinguishing local filesystem runs from Cursor cloud runs. Source: User request, 2026-06-18; automations/source-compile.md