New paradigm · April 2026

Your app
should learn
while you work.

Most apps are built once and stay frozen. What if yours got better every time you used it — automatically, without code changes, without retraining a model?

The Limitation

Claude Code, Codex, and AI development harnesses are no longer just for coders — they are becoming essential tools for every job. Sales, customer support, contract management, HR, any process you run on a computer today is being touched by AI harnesses. And Skills — domain-specific instruction sets that shape exactly how AI behaves — are arguably the best improvement AI has seen in months. Skills are the AI Procedure: the cookbook for any business process. But there's a wall none of them have broken through yet.

These tools are extraordinary — but not everything can be done in a chat window or an IDE. Most users and most processes require a better interface and more structure. The AI is ready. The shell it lives in is holding it back.

What if...?
01

What if you could have Claude Code and a specialised interface at the same time?

Not one or the other. A proper native or web app — with your own UI, your own workflows, your own design — running Claude Code in the background as its brain. The intelligence of the harness, the experience of a real product.

02

What if your app learned from every session without any model changes?

Every time you correct an AI decision, that correction is saved. Next run, the AI reads its own history and uses it as examples. No retraining. No data science team. The app just gets better as you use it.

03

What if the intelligence layer was completely independent from the app?

Update the AI's instructions, rules, and reasoning without touching a line of app code. Ship improvements to how Claude thinks daily — while the app itself stays stable and unchanged.

Introducing

Self-Evolving Apps are web or native applications built on top of Claude Code or Codex — where the AI reasoning layer lives completely outside the app shell, and improves automatically over time.

The app handles the interface, the data, and the user experience. Claude handles the thinking, the matching, the decisions. They communicate through a shared folder — a structured contract that neither side breaks.

Every user correction feeds back as a future example. Every skill update takes effect immediately. The app you ship today is smarter than the one you shipped last week — without a new release.

Definition

Self-Evolving App /self-ih-volv-ing ap/

  • A web or native application whose intelligence layer runs as a Claude Code or Codex subprocess
  • Built on skills — domain-specific instruction sets that can be updated without changing the app
  • Accumulates user corrections as few-shot examples, fed into every subsequent AI run
  • Streams AI thinking and tool usage to the UI in real time
  • Deployable as a web app (Node.js) or native desktop app (Swift/macOS)
  • Passes the independence test: Claude can run the task from a terminal alone
How It Works
User Layer

App Shell — Web or Native

The app manages the UI, prepares data files, stores corrections, and renders results. It has no embedded intelligence — it is deliberately dumb. Language: Node.js + Express (web) or Swift + SwiftUI (macOS).

Vanilla JS / SwiftUI File I/O Subprocess runner Corrections store Token tracking
reads & writes files ↕
Contract Layer

Working Directory — The Briefing Room

The only shared space between the app and Claude. The app prepares it before each run. Claude walks in, reads everything, and leaves a structured answer. Neither side knows about the other's implementation — they only share this folder.

input.json result.json CLAUDE.md references/.env corrections.json skill symlinks
cwd = working directory ↕
AI Layer

Claude Code / Codex Subprocess

Spawned by the app per session or kept alive between messages. Reads CLAUDE.md for instructions, credentials from .env, corrections.json for past examples. Streams thinking, tool calls, and text deltas back to the app. Writes structured output to result.json.

stream-json --verbose AsyncStream events Tool calls logged Token + cost tracking
skill is a symlink ↕
Intelligence Layer

Skill — The Updatable Brain

A folder containing SKILL.md (instructions), Python scripts (preprocessing), and reference documents (domain knowledge, matching rules). Symlinked into four locations so Claude finds it from any context. Update the skill — the next run is smarter. The app never changes.

SKILL.md scripts/*.py references/*.md 4× symlinked Zero-downtime updates
The Learning Loop
01

Claude processes your data

The app passes input files to Claude. Claude reads the skill instructions, loads domain knowledge, and produces a structured result — streamed live to the UI.

02

You review the results

The app parses result.json and shows Claude's decisions in a review interface. Most answers are correct. A few need correction.

03

You correct what's wrong

You change the wrong answer to the right one. The app saves the correction: which signals were present, what Claude thought, and what the correct answer was.

04

Corrections become examples

corrections.json grows. The skill instructs Claude: "Read this file before reasoning. If you see similar signals, use these past answers as authoritative examples."

05

Next run is more accurate

No model retraining. No data science. Just a casebook that grows with every session — and an AI that reads it before every decision.

0
ML infrastructure required
No fine-tuning, no vector databases, no training pipelines. The self-learning mechanism is a JSON file and a SKILL.md instruction to read it.
Skill updates, zero app releases
Improve the AI's reasoning, rules, and domain knowledge independently — while the app and its users see improvements on the next run.
Accuracy grows with usage
Every correction is an example the AI never forgets. The more the app is used, the less it needs to be corrected. The loop tightens automatically.
Technical Foundation

For builders who want to understand the implementation. Every pattern is production-tested in a real daily-use application.

📡

Streaming — NDJSON & AsyncStream

Claude streams events line by line. Web apps read via HTTP chunked fetch. Native apps use Swift AsyncStream<ClaudeEvent> — a typed enum covering thinking, toolUse, textDelta, done, and tokenUsage. Every event is rendered live.

🔐

Credentials — references/.env

All API keys live in references/.env inside the working directory. The app reads and writes this file. Claude reads it directly when calling external APIs. No hardcoded secrets. No app-specific credential stores.

🔗

Skill Symlinks — 4 Locations

Every skill is symlinked into ~/.claude/skills/, ~/.agents/skills/, ~/workdir/.claude/skills/, and ~/workdir/.agents/skills/. All four point to the same real directory. Update once, all contexts update instantly.

📊

Token & Cost Tracking

Every run captures input tokens, output tokens, cache read tokens, and total cost in USD from Claude's result event. Displayed after every session. Users always know what processing costs.

📄

Structured Output Contract

Claude never returns freeform text as primary output. Every run ends with a structured JSON envelope: {"message":"...","results":[...]}. The schema is the only hard coupling between app and skill. Change the skill freely — keep the schema stable.

Persistent Session (Native)

Native apps keep one Claude process alive per session via stdin/stdout — eliminating per-message startup delay. Web apps spawn per message. Both patterns supported. Both share the same working directory and skill architecture.

The File Contract
APP writes input files + references/.env before each run
APP writes CLAUDE.md on every launch — sources the latest skill content
APP appends corrections to corrections.json when user overrides AI
SKILL reads CLAUDE.md → credentials → corrections → input files
SKILL reasons, runs scripts, calls APIs → writes result.json
APP reads result.json → parses to domain model → renders UI
BOTH agree on result.json schema — the only hard coupling
Two Platforms. One Architecture.
🌐

Web App

Node.js + Express + Vanilla JS
  • Browser UI — HTML, CSS, no framework, no build step
  • Chat-first layout — controls left, AI chat right
  • NDJSON streaming via HTTP chunked fetch
  • New Claude process per message
  • Deployable to Railway, Docker, any server
  • Skills in skills/ dir, symlinked into workdir
  • Session continuity via --session-id / -r flags
  • Best for: team tools, dashboards, quick prototypes
🍎

Native macOS

Swift + SwiftUI + XcodeGen
  • Native SwiftUI — menus, notifications, system integration
  • Typed AsyncStream<ClaudeEvent> enum — no JSON in view layer
  • Persistent process — no startup delay between messages
  • Skills deployed from app bundle via SkillManager
  • CLAUDE.md + AGENTS.md rewritten on every launch
  • Credentials via EnvStore — reads references/.env
  • Screenpipe integration for passive activity capture
  • Best for: power users, daily workflows, offline-first tools
Ready to build
a self-evolving app?

We're sharing the architecture, the patterns, and the lessons from building in production. If you're building AI tools that need to go beyond the chat window — let's talk.

Book a Call with Me
Want to build it yourself?

The full headless app creator skill — patterns, prompts, and architecture — packaged and ready to drop into your own Claude Code setup.