Skip to content

ReignIn

macOS menubar app enforcing daily deliverables with AI-powered planning and tamper-evident audit trail

SwiftSwiftUIAppKitClaude CLIJSONLCryptoKitYams
Problem
Solo dev across 7 repos — daily drift, no accountability
Solution
macOS menubar app with locked daily plans and AI-scoped next actions
Proof
3,276 LOC, 7 services, SHA-256 tamper-evident audit trail
Stack
Swift, SwiftUI, AppKit, Claude CLI, CryptoKit, Yams

The Problem

Solo development across 7+ repositories creates daily drift. Without external accountability, it's easy to spend hours on tangential work that feels productive but doesn't move the needle. Task managers track what you plan to do. Nothing tracks what you actually shipped.

The Solution

ReignIn is a macOS menubar application that enforces daily deliverables. It uses NSStatusItem + NSPopover to live in the system tray as a persistent, lightweight accountability partner. Each day has a locked plan. Each action produces an append-only audit entry with SHA-256 input hashing. The AI doesn't generate vague suggestions — it returns exactly ONE next action, scoped to 10–60 minutes, based on your current ticket state.

ReignIn macOS menubar interface showing daily deliverables and audit status

How It Works

  1. Update — Concurrently scans all 7 repositories using Swift TaskGroup: reads git status (branch, dirty, ahead/behind) and scans .brain.md ticket files with YAML frontmatter parsing via Yams.
  2. Plan Day — Sends the repository snapshot to Claude CLI with JSON Schema enforcement. Returns exactly N deliverables (default 3), each tied to a real ticket with verification commands. The plan is validated then locked. Option-click to unlock and replan.
  3. Focus — Returns exactly one next action with a 10–60 minute timebox, stop rule, avoid list, and if-blocked fallback. Displayed as a "DO THIS NOW" card.
  4. Close Day — Executes verification commands for each deliverable via /bin/zsh (with dangerous-pattern blocklist). Sends results to Claude for an end-of-day report: what shipped, what's blocked, what carries over.

Architecture

3,276 lines of Swift across 25 files. The app is built around seven services, each with a single responsibility:

  • ConfigService — loads and validates YAML configuration via Yams
  • StorageService — atomic file writes, append-only JSONL with serialized access
  • AuditService — actor-isolated audit logging with SHA-256 input hashing via CryptoKit
  • GitService — reads branch, dirty, ahead/behind status via Process
  • TicketService — scans .brain.md files, parses YAML frontmatter, extracts verification commands
  • SnapshotService — concurrent multi-repo scanning via Swift TaskGroup
  • ClaudeService — Claude CLI invocation with 4-strategy JSON extraction and JSON Schema enforcement

Key Design Decisions

  • Plan locking is psychologically deliberate — you commit to deliverables in the morning and cannot silently re-plan. Unlocking requires an explicit Option-click that logs an audit event. The friction is the feature.
  • Zero network code — all AI interaction goes through Process spawning the Claude CLI with stdin/stdout piping. No API keys, no HTTP clients, no token management.
  • Tamper-evident audit trail — every action SHA-256 hashes its input before writing. The JSONL file is append-only with serialized access. You cannot retroactively change what happened.
  • Automated verification — "Close Day" runs shell commands from ticket definitions with a dangerous-pattern blocklist. The EoD report is based on evidence, not self-reporting.

What This Demonstrates

  • Native macOS development with SwiftUI, AppKit, and NSStatusItem
  • Service-oriented architecture with actor isolation and Swift Concurrency
  • AI integration (Claude CLI) with JSON Schema enforcement and structured output
  • Tamper-evident audit design with SHA-256 hashing via CryptoKit
  • Cross-repo orchestration via filesystem conventions

Get in Touch

This repo is private. Request a walkthrough or view all projects.