Project Info
Inspiration
I often found that when debugging, a loop starts which immediately becomes a chain of context switches - especially when not coding in a native AI IDE: copy the error, find the right repo, open an AI tool, explain context, wait for suggested fix, and then work out if the patch is safe to try. The idea of Premonition is to explore a smaller interface at that moment: what if copying an error were enough to prepare a reviewable fix, whilst the developer kept the final decision?
What it does
Premonition is a native macOS menu-bar app and ambient layer for Codex. It watches the clipboard locally, but ordinary clipboard content stops before any model call. A deterministic heuristic first checks for a supported error shape, then resolves extracted paths only against Git repositories the developer explicitly allowlists. Only after those checks pass does Premonition send the copied error verbatim to Codex, pinned to GPT-5.6 Sol. Sol drafts one bounded unified diff inside an ephemeral, read-only, no-approval sandbox. Premonition parses and bounds the diff, rejects out-of-repository or malformed changes, and runs git apply --check without modifying the working tree. If the candidate is mechanically applicable, the menu-bar eye changes state and the developer can review a focused semantic diff and a short Sol rationale. The only outcomes are explicit: Apply, Copy Patch, or Dismiss. Apply rechecks that the worktree is literally clean and then uses git apply; the edit remains unstaged. Premonition never auto-applies, stages, commits, runs tests, invokes repository hooks, or executes post-apply commands. How I built it with Codex and GPT-5.6 GPT-5.6 Sol has two inspectable roles in Premonition. At runtime, every real patch and rationale call is made through the Codex CLI with the model pinned to gpt-5.6-sol. The runtime contract is deliberately narrow: read-only speculation, one candidate, canonical diff validation and a human decision before any repository mutation. During Build Week, Codex with GPT-5.6 Sol was also the build partner for the specification-led implementation: architecture, privacy and threat-model reviews, SwiftUI/AppKit implementation, tests, native UX refinement, fixture replay, signing and release evidence, and submission preparation. I retained the product-scope, privacy, acceptance and publication decisions. The durable record is visible in PREMONITION_SPEC.md, BUILDLOG.md, DEVLOG.md and docs/build-week/sol-ledger.md, with phase and session trailers in material commits. Outside this, I leveraged a purpose-build set of Skills in a Codex Toolkit plugin that aided the progress of the build, and kept it on track. These included $build-premonition which was called nearly 100 times over the 5 days I worked on this. Safety and privacy boundary Premonition's safety spine is local gate → allowlisted repository → admission cap → read-only Sol speculation → one bounded candidate → mechanical validation → explicit human decision. A ready patch expires after ten minutes, and tracked or untracked worktree changes block Apply. The limits are as important as the mechanism. The gate is heuristic. An admitted error is sent verbatim to Codex and may contain secrets; v0.1 has no secret-redaction pass and makes no claim about provider-side retention. git apply --check proves mechanical applicability, not correctness, security or completeness. Live model output can vary. A judge-runnable path The public v0.1.0 release is a signed, notarised and stapled Apple Silicon app for macOS 14+. Judges can download it without rebuilding. The repository also contains deterministic shallow and deep fixtures for demo purposes without needing to expose their own repos. Replay Fixture replaces only the model hop and is visibly labelled; the real gate, repository resolver, admission checks, diff parser, bounds validator, git apply --check, review UI and human action still run without network access. Prior work and what is new Premonition had specification v1.1 planning on 12 July 2026, before the Submission Period - I started working on this the moment that the challenge was announced, of course trying out the various Sol, Terra and Luna models. GPT-5.6 Sol-assisted specification and workflow refinement is recorded on 13 July through commit 2e83e84. Implementation began on 14 July with S0 commit 3422b0c. No application implementation is attributed to the pre-period plan; the dated boundary and direct commit links are documented in docs/build-week/prior-new-boundary.md. What I learned The interesting problem was not merely obtaining a plausible patch. It was designing the admission, validation, privacy and interaction boundaries around speculation so the experience could feel ambient without becoming autonomous. The deterministic fixture path also proved useful beyond demos: it makes the complete product loop inspectable even when network access or live model variability would otherwise get in the way.
What's next
Premonition v0.1 intentionally stops at one local, reviewable candidate. Future work may explore bi-directional MCP integration and a direct OpenAI API executor, but neither is present in this submission. Automatic mutation, generic error comprehension, secret redaction and IDE integration are not implied roadmap commitments.
Premonition
Copy an error, and the fix is already waiting.
Premonition is a native macOS menu-bar app and ambient interface layer for Codex. It watches the local clipboard for error-shaped text, resolves the error only against Git repositories you explicitly allowlist, asks Codex pinned to GPT-5.6 Sol for one bounded patch, validates that the patch applies, and waits for your decision.
The v0.1 source, offline demo and signed, notarised judge artifact are complete and owner-approved. This repository is public for judging, and the verified Premonition 0.1.0 release provides the signed archive.
Owner-review explainer (ChatGPT sign-in required): https://premonition-field-guide.tom-ballard08574345.chatgpt.site
How the loop works
clipboard → gate → allowlisted repository → admission → Sol → validation → review → human decision
- Premonition polls the pasteboard locally twice per second. Concealed, transient and auto-generated items are skipped before their content is read.
- A deterministic heuristic gate admits only supported, multi-line error shapes. Ordinary clipboard content stops locally.
- Extracted paths must resolve to an existing Git repository beneath a root you added in Settings. Single-flight and the daily candidate cap are then checked.
- Codex runs in an ephemeral, read-only, no-approval sandbox with the model
pinned to
gpt-5.6-sol. - One canonical parser rejects malformed, binary and out-of-repository diffs.
git apply --checkverifies mechanical applicability without changing the repository. - Premonition presents the diagnosis, semantic diff and optional Sol rationale. You choose Apply, Copy Patch or Dismiss.
Premonition never auto-applies, stages, commits, runs tests, invokes repository
hooks, or runs post-apply commands. Apply rechecks that the worktree is clean
and uses git apply; the resulting edit is unstaged.
Privacy constitution
Watches your clipboard locally. Nothing leaves this machine unless it is error-shaped text resolving to a Git repository you explicitly allowlist. If admitted, the copied error is sent verbatim to Codex using GPT-5.6 Sol. Premonition does not redact it, store it or auto-apply the result. You always review the patch first.
Copied errors are untrusted input and may contain secrets. v0.1 has no secret redaction pass. After gate, allowlist and cap admission, the copied error is sent verbatim to Codex. Premonition makes no claim about provider-side retention.
An admitted candidate can make at most three model calls:
- one initial Sol patch attempt;
- one Sol escalation if execution or validation fails;
- one optional Sol rationale after a patch has validated.
Normal operation persists only configuration, date/count state and content-free operational verdicts. It does not persist clipboard text, prompts, diffs, rationales, model output or subprocess stderr.
Requirements
- macOS 14 or later;
- Apple Silicon or a local Swift 5.10+ toolchain for source builds;
- an installed and authenticated Codex CLI for live speculation. The default
path is
/opt/homebrew/bin/codexand can be changed in the configuration; - an explicitly allowlisted local Git repository.
Premonition has no third-party runtime dependencies.
Install the signed release
Download
Premonition-0.1.0.zip,
extract it, move Premonition.app to /Applications, and open the app. The
archive is signed with Developer ID, notarised by Apple and stapled. Its
SHA-256 is:
3d48e5b06342ce8bd11dddf0fa7f8b318e7273dd3e453177b6a2b47ef8d03178
Build and run from source
The repository-owned developer entry point builds the app bundle and launches it:
script/build_and_run.sh
For a launch verification without attaching a debugger:
script/build_and_run.sh --verify
The first launch opens Settings. Choose Add Root… and select a directory containing repositories you permit Premonition to resolve. Settings shows the Codex CLI status, the pinned GPT-5.6 Sol runtime, the daily count, and the fixture-replay controls. No JSON editing is required for onboarding.
The local source-build bundle is not the signed judge artifact. Use the published v0.1.0 release above when evaluating the distributed build.
Offline demo mode
Create the deterministic demo repository:
scripts/make-demo-repo.sh /tmp/Premonition-Demo
Add /tmp/Premonition-Demo as an allowlisted root in Settings, enable the demo
panel, then choose Replay Fixture. Replay replaces only the model hop: the
real gate, repository resolver, admission, diff parser, bounds validator,
git apply --check, presentation and human decision still run. It requires no
network access and is visibly labelled Fixture replay.
For the live shallow failure, run make break inside that repository and copy
the traceback. make break-deep provides the deterministic cross-file failure.
Safety and current limitations
- The error gate is heuristic. It can miss unfamiliar traces or admit false positives; it is not generic error comprehension.
git apply --checkproves only that a patch applies to the current tree. It does not prove that the patch is correct, secure or complete.- Large patches are summarised rather than rendered without bound. Copy Patch remains available.
- Tracked or untracked worktree changes block Apply. The clean-tree and patch checks run again when Apply is clicked.
- One candidate may be active at a time; later candidates are dropped rather than queued. Ready fixes expire after ten minutes.
- Live Sol output can vary. Fixture replay is the deterministic evaluation route.
- v0.1 is macOS-only and has no telemetry, updater, clipboard history, secret redaction, IDE extension, model picker or automatic repository commands.
See SECURITY.md for the reporting path and the complete safety boundary.
Sol provenance and Build Week boundary
Sol has two explicit roles:
- Runtime engine: every real v0.1 patch and rationale call is Codex pinned to GPT-5.6 Sol.
- Build partner: the product decisions, architecture, implementation, tests, design reviews and release preparation were developed and reviewed in a durable GPT-5.6 Sol-selected Codex session, with the owner retaining final scope and acceptance decisions.
The evidence trail is in PREMONITION_SPEC.md, BUILDLOG.md, DEVLOG.md, and docs/build-week/sol-ledger.md.
The boundary is dated and explicit: specification v1.1 planning predates the
Submission Period on 12 July 2026; Sol-assisted specification and workflow
planning is recorded through commit 2e83e84
on 13 July; new application implementation begins with S0 commit 3422b0c
on 14 July. See
docs/build-week/prior-new-boundary.md.
Roadmap
Bi-directional MCP integration and a direct OpenAI API executor are roadmap items. They are not present in v0.1. CodexToolkit skills used during the build are external workflow infrastructure, not shipped app or runtime dependencies.
Licence
Premonition is available under the MIT Licence.
Analysis
View
Metric
- 17
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- RubyIn code
- SwiftIn code
6 of 6 appear in the indexed code.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
627 KB
Source files
91
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
tcballard/Premonition
105 files · 665 KB · @ 2a4a85b
Structure
Interface
9 files · 9%Screens, components and styles rendered to the user.
Application logic
38 files · 36%Domain rules, services and shared utilities.
+2 more
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Markdown67%
- Swift26%
- Python2%
- CSS2%
- Shell2%
- HTML1%
- Other (2)1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
site/package.json
npm · 11 development-only dependencies.
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.