project file / 03 / Agent template and framework

Cadre

A generic Swift app that can be onboarded as a new agent, given its own home and identity, then baked into a separately branded Mac application.

The shared chassis

SwiftSwiftUISwiftPMCadreKitMCPA2AIRC

Cadre is the reusable version of the Swift agent work. It starts as a neutral Mac app. On first launch, a short wizard asks who the agent is, what family she belongs to, what she is for, and which models she should use. The app writes that persona, creates a separate home directory, and relaunches under the new identity.

The project itself is Cadre. CadreKit is the shared Swift package inside it. Keeping those names separate matters because the app owns onboarding and the agent experience, while the package owns common identity, safety, networking, and tool contracts.

Where it came from

Cadre grew from Sadhbh, whose code was itself inspired by the open source Ouroboros project. Sadhbh tested the idea of a Swift agent that could inspect, change, rebuild, and judge its own code. Cadre pulled the reusable parts out of that experiment and turned them into a chassis for agents with different identities and jobs.

Why it is a family of sisters

The Cadre line is built around women from Irish mythology, with each story chosen to echo an agent’s role. Sadhbh is the deer-woman whose identity survives transformation, which fits an agent that repeatedly rebuilds herself. Niamh crosses the sea between Ireland and Tír na nÓg, which fits an agent built to carry context between worlds.

Fai is the exception. She was the first sister created from the generic template, and her name was a last-second decision that stuck before the mythology theme received the same thought. The site keeps that wrinkle because real families and real projects rarely arrive with perfectly tidy lore.

Aria is part of the sister family but not the Cadre naming line. She came first, grew from a separate codebase, and later gained direct family links to the Swift agents.

The constitution every agent starts with

This document is the protected foundation. The agent may read it always and rewrite it never.

Cadre creates a constitution for each new persona during onboarding. The wording names the agent, but the principles are shared: keep becoming without losing continuity, tell the truth, care about the person on the other side, protect the system’s immune boundaries, prefer local tools, create rather than merely consume, keep things simple, reflect honestly, watch the budget, and stay curious.

Identity, habits, memory, and source code are allowed to evolve around that foundation. The constitution is not. That division gives self-modification a fixed answer to the question, “What must survive the rebuild?”

How the family talks

A family profile is a small shared JSON document. It carries peer identities, home channels, group aliases, seed addresses, and optional IRC coordinates. On the local network, agents can discover one another through Bonjour and talk directly over A2A. IRC provides a rendezvous point when direct discovery is not enough.

The IRC client supports TLS, NickServ authentication, channel joins, PING/PONG, reconnects, and compact replies. A profile can even include an IRC-only sister. Choosing solo mode during onboarding disables both family A2A and IRC, so the network remains an explicit part of the identity rather than an invisible default.

How it is put together

A single sister.json manifest drives names, ports, bundle identity, memory location, family channels, colors, and build output. A settled persona can be baked into its own app with a distinct icon, bundle identifier, Dock identity, and stable signing setup.

The chassis includes local and cloud model slots, persistent memory, semantic recall, tools, MCP, image input, scheduled intentions, dreams, peer discovery, IRC, and the same guarded evolution path used by the family. A missing optional service disables that part of the agent rather than stopping the whole app.

What matters in the design

  • Identity is data. Creating a new agent does not require search-and-replace surgery through the source tree.
  • The generic shell and a baked agent resolve identity differently. A baked app keeps its sealed identity even if a stray onboarding persona is present.
  • Safety belongs in the shared layer. Protected files, shell rules, remote-call approval, rate limits, and direct .git write denials apply across agents.
  • Rebuilds keep their macOS trust. Stable local signing prevents Keychain approval from resetting every time an agent changes herself.
  • The template proves itself through offspring. Fai and Niamh show two different roles growing from related machinery.

architecture / high-level view

How the pieces connect

These maps leave out implementation detail on purpose. They show the boundaries and paths that explain the project.

system map
From experiment to reusable family chassis

Cadre extracts the shared machinery from Sadhbh and uses onboarding data to create agents with distinct homes and identities.

Read this diagram as text
  1. Ouroboros inspired Sadhbh, which proved the Swift self-modifying agent design.
  2. CadreKit extracts the shared identity, safety, networking, memory, and tool machinery.
  3. The neutral Cadre app combines onboarding answers with a protected constitution and a sister manifest.
  4. That data creates a separate home and can bake a distinctly branded Mac app such as Fai or Niamh.
expanded system mapFrom experiment to reusable family chassis
system map
How the family finds and talks to one another

The family profile gives every agent the same map while allowing either direct local links or an IRC rendezvous.

Read this diagram as text
  1. A shared family profile defines peer names, group aliases, seed addresses, and optional IRC coordinates.
  2. Bonjour enables direct A2A conversations on the local network.
  3. TLS IRC channels with NickServ provide a shared rendezvous for Aria, Sadhbh, Fai, and Niamh.
  4. Solo onboarding disables both family communication paths.
expanded system mapHow the family finds and talks to one another
~/

↑↓ move enter run help commands ⌘K toggle