33GOD features: the migration rules
33GOD grew features (crank, tab painting, hindsight hooks…) that are spread across
repos, Hermes profiles and ~/.local/bin, with 2-6 copies of the same building
block. We are moving, one slice at a time, to: every feature in a formal repo,
every shared building block ("atom") with exactly one owner. Every change you make
while this runs must move toward that, never away.
Where the truth lives (this skill holds rules, not status):
| What |
Where |
| Catalog of features + atom owners |
~/code/33GOD/features.toml |
| Progress, delegations, tickets |
~/code/33GOD/_bmad-output/planning-artifacts/initiatives.md → I-9 (and I-8 for crank) |
| Ownership study (why ASM + zellij-driver) |
…/planning-artifacts/33god-features/asm-ownership-study.md |
| Feature design (manifest, lifecycle) |
…/planning-artifacts/33god-features/feature-packaging-design.md; summary in references/feature-anatomy.md |
Every prompt: the four checks
Before writing code, a script, a job, a hook or a schedule:
- Which component or feature is this? A single-repo capability is a component;
it does not need a feature repo. A cross-repo capability whose parts have become
hard to maintain or extend is a feature candidate. Find its catalog entry before
promoting it; a new integration alone does not automatically create a feature.
A promoted feature has a dedicated coordinating repo, starting with crank.
- Which atoms does it read or do? Look up each owner in
features.toml [atoms].
Call the owner's interface. If that does not exist yet, call the listed
provisional provider. Never write a new copy of pane listing, agent
detection, session lookup, agent state, tab-name canon, zellij invocation or
project identity. If you truly must, file a ticket on the owner's board and say
so in your report.
- Where does the code go? In the feature's
repo. If that repo does not exist
yet (status is scattered or embedded), change the piece where it lives today.
Never start a new location, and never put logic in a Hermes profile or
~/.local/bin copy. Those hold links and rendered stubs only.
- Does it respect the layers? A lower layer never imports, calls or names a
higher one (table below).
Rules
Decided by the operator on 2026-11-06:
- F1. Components are not features (clarified 2026-11-07). Single-repo
functionality is a component. A capability becomes a feature candidate when it
crosses repo boundaries and becomes hard to maintain or extend. A promoted
feature has a dedicated formal repo that binds all participating parts into
one tracked hub: its GitHub repo, board, BMAD, manifest and integration links.
This does not move all participating code into that repo: integrations stay
in their owning components. Crank's domain and registry live in
delorenj/crank;
the pj CLI/TUI integration stays in pjangler and is part of the crank feature.
- F2.
33GOD/features.toml is the catalog and the planning map. Keep it true
whether or not anything reads it. An install disables features only in its own
untracked ~/.config/33god/features.toml ([disable] crank = "reason").
- F3. No pins. Features track main. A pin is a temporary bandage that carries a
reason and an open exit ticket, and it is removed as soon as the fix merges.
Precedent: CAND-49's pinned Hermes image, dropped by CAND-52.
Standing rules carried by the design:
- One owner per atom. Any other implementation is either
provisional (until
the owner's interface passes a live differential) or declared [[implements]]
and checked live. Products (Deckard, Wingman) and control surfaces (pj,
Holocene) consume. They never own a primitive. PJAN-202's panes.ts is the
cautionary tale: good code in the wrong layer.
- Hosts hold pointers, never logic. A Hermes profile holds only generated
stubs, and all logic runs from one checkout. The stale profile
zcrank.py is
what goes wrong otherwise.
- Address by name. Ids live only in receipts. Never hardcode a Hermes job id,
a Candybar id, a zellij session name ("Workspace") or
/home/delorenj in feature code.
- Clock last on install, first on remove. Candybar is the only clock (load
the
candybar skill).
- The world beats the receipt. Uninstall sweeps everything matching a
feature's claims. A receipt only permits deleting what still matches it;
anything foreign is quarantined, not deleted.
- No fixtures. Atom contracts carry live probes. Redis
127.0.0.1:6379 is
production: tests use a throwaway redis-server on a random port, deletes are
SCAN + DEL of exact keys on an explicit -p, and nothing ever runs FLUSH*.
Layers (ASM / terminal split approved 2026-11-07; implementation pending)
| Layer |
Owns |
Must never |
| L0 Host: zellij, /proc, Redis, NATS, systemd |
Raw machinery |
Hold 33GOD logic |
| L1a bloodbank |
Hook intake (hooks.master.json, bb-hook, hook-hub), event schemas, transport |
Hold a state fold, import the ASM in-process (it does today: publisher.py:136), name a product in a subject (deckard.evt.attention) |
| L1b terminal-driver (new; Zellij backend first) |
Every zellij call: topology by tab/pane id, readiness, focus, rename, verified pane input |
Know what an agent is |
| L2 asm (new, out of bloodbank) |
Agent process detection, identity (pid + start time; Hermes profile when headless), native session id, live state, attention/ack |
Type into a pane, focus, rename, or use a pane as identity |
| L2' Peer owners: pjangler (project identity), Candybar (clock), Krebs (ticket lifecycle) |
One fact each |
Re-derive agent or terminal state |
| L3 Features: crank, hindsight-hooks… |
Their own state (zcrank:*), jobs and schedules |
Keep a private copy of topology, detection or state |
| L4 Control surfaces: pj, Holocene |
Wrapping and chaining lower commands, read models |
Grow their own primitive |
| L5 Products: Deckard, Wingman, painters |
Rendering and acting through lower layers. Deckard's lights and media are commands to delohome, playerctl and wpctl |
Run a second agent-state machine |
The split is approved, not deployed. The ASM code is still in
bloodbank/services/agent-hooks/ and the current pane/agent reader is
pj crank panes --json (provisional). Read through those until the owner APIs
land; do not assume planned commands exist or add new copies.
Deckard requires the ASM (operator decision 2026-11-07). Retire its duplicate
state fold on cutover; do not preserve a no-Redis fallback state machine.
Terminal ownership belongs to a new delorenj/terminal-driver component (choice
delegated by the operator, recorded 2026-11-07). Do not repurpose the existing
zellij-driver/Perth repo or reuse zdrive: it has implemented intent/snapshot
functionality, an installed CLI and an Agentboard bridge contract. Extract neutral
terminal code from deckard-mux, removing its dependency on deckard-core and leaving
agent classification in ASM. Start with Zellij only, not a multi-backend project.
Not yours to decide (open operator decisions)
Leave these alone and ask, or work around them:
- Repo visibility for
asm (not approval of the already-approved split).
- Whether a failed tool call is "red", and how long amber (needs-input) lasts.
- The 15 s
asm-sweep.timer: a recorded exception in the asm repo, or compute staleness on read.
BMAD at two levels
The parent 33GOD repo holds platform requirements, shared architecture decisions,
I-9 integration outcomes and delegations. Feature hubs bind cross-repo work with
links and seam acceptance criteria, not copies of participant backlogs. Each
component owns its internal architecture, implementation epics/stories, tickets
and execution loop. See the accepted Director Rule in the parent.
For this brownfield migration: reuse the investigation; capture an I-9-scoped PRD
before finalizing architecture; review contracts and migration safety; then ask
child PMs to plan the next thin slice. Do not regenerate the entire platform PRD,
produce every future story up front, or run a child implementation loop in 33GOD.
Explain each BMAD step's purpose and artifact briefly: learning the method is an
explicit secondary goal, not a separate training project.
Live traps (2026-11-06; re-verify before relying on them)
- ASM identity has been broken since 2026-09-13 (BB-33). Claude agents appear
twice, ghost rows
asm:a:*:x:22822.11015 never expire, and session_id is
empty on every row. Do not build on asm:a:* session ids until BB-33 lands.
test_asm.py defaults to production Redis (BB-32). Never run it bare.
- The Hermes economics cap on crank-beat stays until I-8 lands. It is the
operator's call. Candybar logs a cap refusal as success, so read
~/.hermes/profiles/33god-pm/cron/usage_audit.jsonl for the truth.
- crank-watchdog's argv keeps
candybar.transition_exec. It is the only
writer of the report that zcrank-gate reads.
- Two Hermes jobs are named
cronjob_manage (777c511a009c and 9b5dadbd1e4d),
so lookup by name raises AmbiguousJobReference. Rename them before addressing
either by name.
- Deployed binaries lag main. Deckard (2026-10-15) lacks the DECK-42
readiness check. The pj main checkout may lack recent pjangler work, so rebuild
before trusting
pj output.
Commands
| Today |
Planned († = does not exist yet; never call it) |
pj crank panes --json (agent panes, provisional) |
asmctl agents --json --topology† |
asmctl (human output) |
`asmctl state |
deckard status |
terminal-driver JSON CLI† (name/interface to finalize; do not reuse zdrive) |
| `uv run candybar show |
history |
px on the owning board |
GET :8764/v1/resolve?cwd=† |
When something lands
Update features.toml (status, atom state) and I-9's delegations first. Then,
if a rule or decision changed, update this skill in ~/code/skillex/all-skills/33god-features/
(delorenj/skills), push it, and bump the all-skills pointer in ~/code/skillex.
Don't record status here. Status belongs in I-9 and features.toml.
1---2name: 33god-features3description: Rules for the system-wide 33GOD feature migration (initiative I-9). Load before any change that adds, moves, installs, schedules or edits something spanning 33GOD repos - crank/zcrank, the ASM (asmctl, asm-tabpaint), Deckard agent state, pane/tab discovery, zellij calls, agent process or session detection, project identity from cwd, hook-hub handlers, hindsight hooks, target-watch, g33, git guards, a Hermes job or Candybar manifest that belongs to a feature, features.toml, feature.toml, pins, or any new script that reads panes, agents or sessions. Says which repo owns each shared building block, where new code goes, and what not to copy.4metadata:5 source: https://skillmd.com/skills/delorenj/33god-features6---78# 33GOD features: the migration rules91033GOD grew features (crank, tab painting, hindsight hooks…) that are spread across11repos, Hermes profiles and `~/.local/bin`, with 2-6 copies of the same building12block. We are moving, one slice at a time, to: **every feature in a formal repo,13every shared building block ("atom") with exactly one owner**. Every change you make14while this runs must move toward that, never away.1516Where the truth lives (this skill holds rules, not status):1718| What | Where |19|---|---|20| Catalog of features + atom owners | `~/code/33GOD/features.toml` |21| Progress, delegations, tickets | `~/code/33GOD/_bmad-output/planning-artifacts/initiatives.md` → **I-9** (and I-8 for crank) |22| Ownership study (why ASM + zellij-driver) | `…/planning-artifacts/33god-features/asm-ownership-study.md` |23| Feature design (manifest, lifecycle) | `…/planning-artifacts/33god-features/feature-packaging-design.md`; summary in `references/feature-anatomy.md` |2425## Every prompt: the four checks2627Before writing code, a script, a job, a hook or a schedule:28291. **Which component or feature is this?** A single-repo capability is a component;30 it does not need a feature repo. A cross-repo capability whose parts have become31 hard to maintain or extend is a feature candidate. Find its catalog entry before32 promoting it; a new integration alone does not automatically create a feature.33 A promoted feature has a dedicated coordinating repo, starting with crank.342. **Which atoms does it read or do?** Look up each owner in `features.toml [atoms]`.35 Call the owner's interface. If that does not exist yet, call the listed36 `provisional` provider. **Never write a new copy** of pane listing, agent37 detection, session lookup, agent state, tab-name canon, zellij invocation or38 project identity. If you truly must, file a ticket on the owner's board and say39 so in your report.403. **Where does the code go?** In the feature's `repo`. If that repo does not exist41 yet (`status` is `scattered` or `embedded`), change the piece where it lives today.42 Never start a new location, and never put logic in a Hermes profile or43 `~/.local/bin` copy. Those hold links and rendered stubs only.444. **Does it respect the layers?** A lower layer never imports, calls or names a45 higher one (table below).4647## Rules4849Decided by the operator on 2026-11-06:5051- **F1. Components are not features (clarified 2026-11-07).** Single-repo52 functionality is a component. A capability becomes a feature candidate when it53 crosses repo boundaries and becomes hard to maintain or extend. A promoted54 feature has a dedicated formal repo that binds all participating parts into55 one tracked hub: its GitHub repo, board, BMAD, manifest and integration links.56 This does **not** move all participating code into that repo: integrations stay57 in their owning components. Crank's domain and registry live in `delorenj/crank`;58 the pj CLI/TUI integration stays in pjangler and is part of the crank feature.59- **F2. `33GOD/features.toml` is the catalog and the planning map.** Keep it true60 whether or not anything reads it. An install disables features only in its own61 untracked `~/.config/33god/features.toml` (`[disable] crank = "reason"`).62- **F3. No pins.** Features track main. A pin is a temporary bandage that carries a63 reason and an open exit ticket, and it is removed as soon as the fix merges.64 Precedent: CAND-49's pinned Hermes image, dropped by CAND-52.6566Standing rules carried by the design:6768- **One owner per atom.** Any other implementation is either `provisional` (until69 the owner's interface passes a live differential) or declared `[[implements]]`70 and checked live. Products (Deckard, Wingman) and control surfaces (pj,71 Holocene) consume. They never own a primitive. PJAN-202's `panes.ts` is the72 cautionary tale: good code in the wrong layer.73- **Hosts hold pointers, never logic.** A Hermes profile holds only generated74 stubs, and all logic runs from one checkout. The stale profile `zcrank.py` is75 what goes wrong otherwise.76- **Address by name. Ids live only in receipts.** Never hardcode a Hermes job id,77 a Candybar id, a zellij session name ("Workspace") or `/home/delorenj` in feature code.78- **Clock last on install, first on remove.** Candybar is the only clock (load79 the `candybar` skill).80- **The world beats the receipt.** Uninstall sweeps everything matching a81 feature's claims. A receipt only permits deleting what still matches it;82 anything foreign is quarantined, not deleted.83- **No fixtures.** Atom contracts carry live probes. Redis `127.0.0.1:6379` is84 production: tests use a throwaway `redis-server` on a random port, deletes are85 `SCAN` + `DEL` of exact keys on an explicit `-p`, and nothing ever runs `FLUSH*`.8687## Layers (ASM / terminal split approved 2026-11-07; implementation pending)8889| Layer | Owns | Must never |90|---|---|---|91| L0 Host: zellij, /proc, Redis, NATS, systemd | Raw machinery | Hold 33GOD logic |92| L1a **bloodbank** | Hook intake (`hooks.master.json`, bb-hook, hook-hub), event schemas, transport | Hold a state fold, import the ASM in-process (it does today: `publisher.py:136`), name a product in a subject (`deckard.evt.attention`) |93| L1b **terminal-driver** (new; Zellij backend first) | Every zellij call: topology by tab/pane id, readiness, focus, rename, verified pane input | Know what an agent is |94| L2 **asm** (new, out of bloodbank) | Agent process detection, identity (pid + start time; Hermes profile when headless), native session id, live state, attention/ack | Type into a pane, focus, rename, or use a pane as identity |95| L2' Peer owners: pjangler (project identity), Candybar (clock), Krebs (ticket lifecycle) | One fact each | Re-derive agent or terminal state |96| L3 Features: crank, hindsight-hooks… | Their own state (`zcrank:*`), jobs and schedules | Keep a private copy of topology, detection or state |97| L4 Control surfaces: pj, Holocene | Wrapping and chaining lower commands, read models | Grow their own primitive |98| L5 Products: Deckard, Wingman, painters | Rendering and acting through lower layers. Deckard's lights and media are commands to delohome, playerctl and wpctl | Run a second agent-state machine |99100The split is approved, not deployed. The ASM code is still in101`bloodbank/services/agent-hooks/` and the current pane/agent reader is102`pj crank panes --json` (provisional). Read through those until the owner APIs103land; do not assume planned commands exist or add new copies.104105Deckard **requires the ASM** (operator decision 2026-11-07). Retire its duplicate106state fold on cutover; do not preserve a no-Redis fallback state machine.107Terminal ownership belongs to a new `delorenj/terminal-driver` component (choice108delegated by the operator, recorded 2026-11-07). Do not repurpose the existing109`zellij-driver`/Perth repo or reuse `zdrive`: it has implemented intent/snapshot110functionality, an installed CLI and an Agentboard bridge contract. Extract neutral111terminal code from deckard-mux, removing its dependency on deckard-core and leaving112agent classification in ASM. Start with Zellij only, not a multi-backend project.113114## Not yours to decide (open operator decisions)115116Leave these alone and ask, or work around them:117118- Repo visibility for `asm` (not approval of the already-approved split).119- Whether a failed tool call is "red", and how long amber (needs-input) lasts.120- The 15 s `asm-sweep.timer`: a recorded exception in the asm repo, or compute staleness on read.121122## BMAD at two levels123124The parent 33GOD repo holds platform requirements, shared architecture decisions,125I-9 integration outcomes and delegations. Feature hubs bind cross-repo work with126links and seam acceptance criteria, not copies of participant backlogs. Each127component owns its internal architecture, implementation epics/stories, tickets128and execution loop. See the accepted Director Rule in the parent.129130For this brownfield migration: reuse the investigation; capture an I-9-scoped PRD131before finalizing architecture; review contracts and migration safety; then ask132child PMs to plan the next thin slice. Do not regenerate the entire platform PRD,133produce every future story up front, or run a child implementation loop in 33GOD.134Explain each BMAD step's purpose and artifact briefly: learning the method is an135explicit secondary goal, not a separate training project.136137## Live traps (2026-11-06; re-verify before relying on them)138139- **ASM identity has been broken since 2026-09-13 (BB-33).** Claude agents appear140 twice, ghost rows `asm:a:*:x:22822.11015` never expire, and `session_id` is141 empty on every row. Do not build on `asm:a:*` session ids until BB-33 lands.142- **`test_asm.py` defaults to production Redis (BB-32).** Never run it bare.143- **The Hermes economics cap on crank-beat stays until I-8 lands.** It is the144 operator's call. Candybar logs a cap refusal as success, so read145 `~/.hermes/profiles/33god-pm/cron/usage_audit.jsonl` for the truth.146- **crank-watchdog's argv keeps `candybar.transition_exec`.** It is the only147 writer of the report that `zcrank-gate` reads.148- **Two Hermes jobs are named `cronjob_manage`** (777c511a009c and 9b5dadbd1e4d),149 so lookup by name raises `AmbiguousJobReference`. Rename them before addressing150 either by name.151- **Deployed binaries lag main.** Deckard (2026-10-15) lacks the DECK-42152 readiness check. The pj main checkout may lack recent pjangler work, so rebuild153 before trusting `pj` output.154155## Commands156157| Today | Planned (`†` = does not exist yet; never call it) |158|---|---|159| `pj crank panes --json` (agent panes, provisional) | `asmctl agents --json --topology`† |160| `asmctl` (human output) | `asmctl state|watch|doctor --json`† |161| `deckard status` | terminal-driver JSON CLI† (name/interface to finalize; do not reuse `zdrive`) |162| `uv run candybar show|history|doctor` | `pj feature check|plan|apply|remove|why`† |163| `px` on the owning board | `GET :8764/v1/resolve?cwd=`† |164165## When something lands166167Update `features.toml` (status, atom `state`) and I-9's delegations first. Then,168if a rule or decision changed, update this skill in `~/code/skillex/all-skills/33god-features/`169(delorenj/skills), push it, and bump the `all-skills` pointer in `~/code/skillex`.170Don't record status here. Status belongs in I-9 and `features.toml`.