From c10709dc3f1cd97cb06213de788af8a58909e418 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 24 Dec 2025 14:02:09 -0800 Subject: [PATCH] =?UTF-8?q?terminology:=20spawn=20=E2=86=92=20pour/wisp=20?= =?UTF-8?q?for=20molecules=20(gt-9uy0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Molecules use chemistry verbs, not spawn: - pour = create persistent mol (liquid) - wisp = create ephemeral wisp (vapor) - spawn = polecats only (workers) Changes: - Delete chemistry-design-changes.md (migration doc) - Remove migration tables from sling-design.md - Update bond tables: Spawn β†’ Pour/Wisp - Rename spawnMoleculeFromProto β†’ pourMoleculeFromProto - Rename spawnMoleculeOnIssue β†’ runMoleculeOnIssue - Update templates: bd mol spawn β†’ bd wisp - Update prime.go: commands and messages - Clean all docs and comments πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .beads/issues.jsonl | 51 +-- docs/architecture.md | 2 +- docs/chemistry-design-changes.md | 375 ---------------------- docs/molecular-chemistry.md | 22 +- docs/molecule-algebra.md | 10 +- docs/propulsion-principle.md | 4 +- docs/sling-design.md | 30 +- docs/vision.md | 8 +- internal/beads/christmas_ornament_test.go | 2 +- internal/beads/molecules_patrol.go | 2 +- internal/cmd/prime.go | 32 +- internal/cmd/sling.go | 60 ++-- internal/cmd/spawn.go | 6 +- internal/templates/roles/deacon.md.tmpl | 14 +- internal/templates/roles/refinery.md.tmpl | 2 +- internal/templates/roles/witness.md.tmpl | 2 +- mayor/rig/docs/propulsion-principle.md | 4 +- 17 files changed, 95 insertions(+), 531 deletions(-) delete mode 100644 docs/chemistry-design-changes.md diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index f1486a55..d858d080 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -198,7 +198,6 @@ {"id":"gt-6tf","title":"Implement gt harness create command","description":"Add scaffolding command to create a new harness:\n- gt harness create [path]\n- Creates config/, mayor/, .beads/redirect (optional)\n- Optionally initializes git\n- Generates CLAUDE.md with Mayor role\n- Could also offer a template repo alternative","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-17T17:15:34.342552-08:00","updated_at":"2025-12-17T17:20:36.774805-08:00","closed_at":"2025-12-17T17:20:36.774805-08:00","dependencies":[{"issue_id":"gt-6tf","depends_on_id":"gt-cr9","type":"blocks","created_at":"2025-12-17T17:15:51.845578-08:00","created_by":"daemon"}]} {"id":"gt-6vks","title":"Bug: LIFECYCLE messages use literal \u003crig\u003e placeholder","description":"Found stale LIFECYCLE messages addressed to @\u003crig\u003e/witness instead of actual rig names like @gastown/witness. Template substitution not happening.\n\nExamples found:\n- gm-bay: LIFECYCLE: polecat requesting shutdown (to @\u003crig\u003e/witness)\n- gm-7du, gm-94e, gm-u5x, gm-89b: same issue\n\nFix: Ensure rig name is substituted in lifecycle mail templates.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-20T03:12:28.146613-08:00","updated_at":"2025-12-20T13:23:08.002122-08:00","closed_at":"2025-12-20T13:23:08.002122-08:00"} {"id":"gt-6y5b","title":"Polecat mood command and status line display","description":"CLI and status line support for polecat mood.\n\n## CLI Command\n```\ngt polecat mood \u003cname\u003e \u003cemoji\u003e # Set mood\ngt polecat mood \u003cname\u003e # Get mood\n```\n\nSets GT_MOOD environment variable in the polecat's tmux session.\n\n## Status Line Integration\nUpdate runWorkerStatusLine() to read mood:\n```go\nmood, _ := t.GetEnvironment(session, \"GT_MOOD\")\nif mood != \"\" {\n icon = mood // Use mood emoji instead of default\n} else {\n icon = AgentTypeIcons[AgentPolecat] // Fallback to 😺\n}\n```\n\n## Storage\nMood stored in tmux session environment (ephemeral, per-session).\nNo persistence needed - mood is reassessed each patrol cycle.\n\nDepends on: gt-u818 (plugin system)","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-21T16:17:14.111807-08:00","updated_at":"2025-12-21T16:17:14.111807-08:00","dependencies":[{"issue_id":"gt-6y5b","depends_on_id":"gt-u818","type":"blocks","created_at":"2025-12-21T16:17:20.53466-08:00","created_by":"daemon"}]} -{"id":"gt-6y8u","title":"Deacon patrol: Janitorial cleanup patterns","description":"Patterns discovered during town cleanup that could be automated in Deacon's patrol step:\n\n## Stale Issue Detection\n\n1. **Stale in_progress issues** - Issues marked in_progress for \u003eN days without activity\n - Example: 9 issues in_progress, some likely complete\n - Action: Report list, optionally nudge assignee\n\n2. **Duplicate issues** - Same title with different IDs\n - Example: gt-87jz and gt-qp2w both 'mol-witness-patrol'\n - Action: Flag for human review\n\n3. **Orphaned issues** - Referenced in commits but still open\n - bd doctor already detects: 'hq-65jk (commit f9e9034d)'\n - Action: Report, suggest closing\n\n4. **Stale test messages** - Messages with 'test' in title older than N days\n - Example: gt-54kn, gt-1ero, gt-nriy, gt-wrw2, gt-pnu4, gt-g1ud, gt-b5sh\n - Action: Auto-close or flag\n\n## File System Cleanup\n\n5. **Log file accumulation** - daemon.log and rotated .log.gz files\n - Found 8+ log files across rigs\n - Action: Rotate, compress, delete old (\u003e7 days)\n\n6. **Beads directory size** - Town .beads/ is 65MB\n - Action: Monitor growth, alert on threshold\n\n## Database Health\n\n7. **Legacy database fingerprints** - Older DBs without fingerprint\n - bd doctor warns about this\n - Action: Report, suggest migration\n\n## Cross-Reference Integrity\n\n8. **Gastown↔Beads issue sync** - Issues filed in wrong project\n - Example: gt-8tmz.* describes Beads work but no bd-* issues\n - Action: Detect cross-references, verify both sides exist\n\n## Implementation Notes\n\nThese could be added to mol-deacon-patrol.formula.yaml as cleanup substeps:\n- Daily: Log rotation, stale issue report\n- Weekly: Duplicate detection, orphan check\n- Monthly: Size monitoring, archive old closed issues","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T13:25:03.212307-08:00","updated_at":"2025-12-24T13:25:03.212307-08:00","dependencies":[{"issue_id":"gt-6y8u","depends_on_id":"gt-ingm","type":"relates-to","created_at":"2025-12-24T13:25:18.850583-08:00","created_by":"daemon"}]} {"id":"gt-6z2","title":"Test Epic: GGT MVP Validation","status":"closed","priority":0,"issue_type":"epic","created_at":"2025-12-16T21:57:37.355269-08:00","updated_at":"2025-12-16T22:06:41.124727-08:00","closed_at":"2025-12-16T22:06:41.124727-08:00"} {"id":"gt-6z2.1","title":"Test Task 1: Add comment to gt.go","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-16T21:57:43.554166-08:00","updated_at":"2025-12-16T22:06:41.126547-08:00","closed_at":"2025-12-16T22:06:41.126547-08:00","dependencies":[{"issue_id":"gt-6z2.1","depends_on_id":"gt-6z2","type":"parent-child","created_at":"2025-12-16T21:57:43.55748-08:00","created_by":"daemon"}]} {"id":"gt-6z2.2","title":"Test Task 2: Add comment to version.go","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-16T21:57:43.693217-08:00","updated_at":"2025-12-16T22:06:41.127126-08:00","closed_at":"2025-12-16T22:06:41.127126-08:00","dependencies":[{"issue_id":"gt-6z2.2","depends_on_id":"gt-6z2","type":"parent-child","created_at":"2025-12-16T21:57:43.69361-08:00","created_by":"daemon"}]} @@ -251,8 +250,8 @@ {"id":"gt-8tmz.1","title":"Phase verbs: pour and wisp commands","description":"Implement the phase transition verbs:\n- bd pour \u003cproto\u003e - instantiate as persistent mol\n- bd wisp \u003cproto\u003e - instantiate as ephemeral wisp\n- Update bd mol bond to inherit phase from target\n\nThese replace the current --wisp flag with cleaner verb semantics.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T18:03:57.280647-08:00","updated_at":"2025-12-23T18:03:57.280647-08:00"} {"id":"gt-8tmz.10","title":"Rename Engineer in Box to Shiny","description":"Rename mol-engineer-in-box to mol-shiny (or just 'shiny').\n\nMad Max reference - the canonical 'right way to engineer'.\nUpdate all references in docs and code.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T18:04:40.434948-08:00","updated_at":"2025-12-23T18:04:40.434948-08:00","dependencies":[{"issue_id":"gt-8tmz.10","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:04:40.437009-08:00","created_by":"daemon"}]} {"id":"gt-8tmz.11","title":"Rule of Five expansion template","description":"Create rule-of-five as an expansion template:\n- Jeffrey's discovery: agents converge in 4-5 iterations\n- Template expands any step into 5-pass refinement\n- draft β†’ refine-1 β†’ refine-2 β†’ refine-3 β†’ refine-4\n\nFirst example of a macro-style expansion proto.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T18:04:41.438135-08:00","updated_at":"2025-12-23T18:04:41.438135-08:00","dependencies":[{"issue_id":"gt-8tmz.11","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:04:41.439635-08:00","created_by":"daemon"}]} -{"id":"gt-8tmz.12","title":"Formula parser and YAML schema","description":"Implement formula parsing from YAML:\n- Define YAML schema for .formula.yaml files\n- Parse steps, compose rules, vars\n- Support extends for formula inheritance\n- Validate formula structure\n\nSchema should support:\n- formula: name\n- description: text\n- version: number\n- type: workflow|expansion|aspect\n- vars: variable definitions\n- steps: step definitions\n- compose: composition rules\n\n**Beads issue: bd-weu8**","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T18:20:02.788306-08:00","updated_at":"2025-12-24T13:44:21.239181-08:00","closed_at":"2025-12-24T13:44:21.239181-08:00","close_reason":"Implemented in Beads (bd-weu8, bd-wa2l)"} -{"id":"gt-8tmz.13","title":"bd cook command: Formula to Proto","description":"Implement the 'bd cook' command that transforms formulas into protos.\n\nUsage: bd cook \u003cformula-file\u003e [options]\n bd cook .beads/formulas/*.formula.yaml\n\nProcess:\n1. Parse formula YAML (uses formula parser)\n2. Resolve extends (formula inheritance)\n3. Expand macros (expansion rules)\n4. Apply aspects (cross-cutting concerns)\n5. Generate flat proto bead\n\nOutput:\n- Creates proto bead in .beads/ with mol-prefix\n- Proto has all steps pre-expanded\n- Proto is ready for pour/wisp instantiation\n\n**Beads issue: bd-wa2l**","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T18:20:03.9306-08:00","updated_at":"2025-12-24T13:44:21.26078-08:00","closed_at":"2025-12-24T13:44:21.26078-08:00","close_reason":"Implemented in Beads (bd-weu8, bd-wa2l)","dependencies":[{"issue_id":"gt-8tmz.13","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:20:03.933113-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.13","depends_on_id":"gt-8tmz.12","type":"blocks","created_at":"2025-12-23T18:20:11.133013-08:00","created_by":"daemon"}]} +{"id":"gt-8tmz.12","title":"Formula parser and YAML schema","description":"Implement formula parsing from YAML:\n- Define YAML schema for .formula.yaml files\n- Parse steps, compose rules, vars\n- Support extends for formula inheritance\n- Validate formula structure\n\nSchema should support:\n- formula: name\n- description: text\n- version: number\n- type: workflow|expansion|aspect\n- vars: variable definitions\n- steps: step definitions\n- compose: composition rules","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T18:20:02.788306-08:00","updated_at":"2025-12-23T20:00:13.739416-08:00"} +{"id":"gt-8tmz.13","title":"bd cook command: Formula to Proto","description":"Implement the 'bd cook' command:\n\n bd cook shiny-enterprise.formula.yaml\n # Cooking shiny-enterprise...\n # βœ“ Cooked proto: shiny-enterprise (30 steps)\n\nProcess:\n1. Parse formula YAML\n2. Resolve 'extends' inheritance\n3. Apply all compose rules in order:\n - expand: macro expansion\n - aspect: apply cross-cutting concerns\n - branch: add parallel paths\n - loop/gate: wire control flow\n - advice: insert before/after steps\n4. Flatten to pure step graph\n5. Store as proto in beads (template label)\n\nOptions:\n- --dry-run: preview without saving\n- --output: specify proto name\n- --purity: show expansion stats (joke flag)","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T18:20:03.9306-08:00","updated_at":"2025-12-23T18:20:03.9306-08:00","dependencies":[{"issue_id":"gt-8tmz.13","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:20:03.933113-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.13","depends_on_id":"gt-8tmz.12","type":"blocks","created_at":"2025-12-23T18:20:11.133013-08:00","created_by":"daemon"}]} {"id":"gt-8tmz.14","title":"bd formula list/show commands","description":"Implement formula management commands:\n\n bd formula list\n # Lists formulas from all search paths\n\n bd formula show rule-of-five\n # Shows formula details, steps, compose rules\n\nSearch paths (in order):\n1. .beads/formulas/ (project)\n2. ~/gt/.beads/formulas/ (town)\n3. ~/.beads/formulas/ (user)\n4. Built-in formulas (embedded)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T18:20:05.02817-08:00","updated_at":"2025-12-23T18:20:05.02817-08:00","dependencies":[{"issue_id":"gt-8tmz.14","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:20:05.03005-08:00","created_by":"daemon"}]} {"id":"gt-8tmz.15","title":"Formula cycle detection during cooking","description":"Detect and error on circular extends chains during bd cook. E.g., if formula A extends B extends A, cooking should fail with clear error message pointing to the cycle.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T18:45:06.751822-08:00","updated_at":"2025-12-23T18:45:06.751822-08:00","dependencies":[{"issue_id":"gt-8tmz.15","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:45:06.752271-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.15","depends_on_id":"gt-8tmz.13","type":"blocks","created_at":"2025-12-23T18:48:18.543425-08:00","created_by":"daemon"}]} {"id":"gt-8tmz.16","title":"Prevent aspect self-matching (infinite recursion)","description":"Aspects should only match original steps, not steps inserted by the same aspect application. Document this and implement guard during cooking. Without this, a pointcut like *.implement that inserts security-prescan could match its own insertion infinitely.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T18:45:07.855882-08:00","updated_at":"2025-12-23T18:45:07.855882-08:00","dependencies":[{"issue_id":"gt-8tmz.16","depends_on_id":"gt-8tmz","type":"parent-child","created_at":"2025-12-23T18:45:07.861131-08:00","created_by":"daemon"},{"issue_id":"gt-8tmz.16","depends_on_id":"gt-8tmz.5","type":"blocks","created_at":"2025-12-23T18:48:18.885103-08:00","created_by":"daemon"}]} @@ -323,7 +322,7 @@ {"id":"gt-9rmm","title":"Merge: gt-a95","description":"branch: polecat/Ace\ntarget: main\nsource_issue: gt-a95\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-19T14:53:53.973816-08:00","updated_at":"2025-12-19T19:13:27.736445-08:00","closed_at":"2025-12-19T17:48:09.608699-08:00"} {"id":"gt-9t14","title":"Wire up --wisp flag for ephemeral molecules","description":"The --wisp flag exists in gt sling but isn't wired through to bd mol.\n\nNeed:\n1. bd mol run --wisp - spawn to .beads-wisp/ instead of .beads/\n2. Automatic burn on molecule completion\n3. Optional squash to digest for audit trail\n\nCurrently:\n- sling.go sets thing.IsWisp but never uses it\n- bd mol run has no --wisp flag\n- .beads-wisp/ exists but nothing writes to it","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-22T13:12:25.192854-08:00","updated_at":"2025-12-22T13:18:50.72531-08:00","closed_at":"2025-12-22T13:18:50.72531-08:00","close_reason":"Wired --wisp flag: uses .beads-wisp/ storage when available, propagates IsWisp through MoleculeContext"} {"id":"gt-9uxr","title":"Critical packages lack test coverage","description":"Several packages have no test files:\n- internal/lock/ - Core identity locking (212 lines UNTESTED)\n- internal/witness/ - Worker monitoring\n- internal/mrqueue/ - MR queue management\n- internal/claude/ - Claude integration\n- internal/style/ - Terminal styling\n- internal/constants/ - Constants\n\nPriority for testing:\n1. lock/ - prevents duplicate agents, critical for correctness\n2. witness/ - agent lifecycle management\n3. mrqueue/ - merge request processing\n\nOverall: 37 test files for 160 Go files (23% by file count)","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:01.154427-08:00","updated_at":"2025-12-24T12:51:01.154427-08:00","dependencies":[{"issue_id":"gt-9uxr","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.558885-08:00","created_by":"daemon"}]} -{"id":"gt-9uy0","title":"Remove 'spawn' terminology from molecular chemistry","description":"Clean all docs and code to present ONLY current terminology. No migration paths, no \"old vs new\" tables, no deprecated flags. The codebase should read as if the current design was always the design.\n\n**Terminology rules:**\n- spawn = polecats/workers ONLY\n- pour = create persistent mol\n- wisp = create ephemeral wisp \n- run = create and execute\n\n**Scope:**\n- Remove all \"Old β†’ New\" migration tables\n- Remove deprecated flag documentation (--persistent, etc.)\n- Remove chemistry-design-changes.md entirely (it is a migration doc)\n- Clean all docs to use current terminology only\n- Rename spawn functions in code that deal with molecules","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-24T13:06:43.805547-08:00","updated_at":"2025-12-24T14:02:16.131816-08:00","closed_at":"2025-12-24T14:02:16.131816-08:00","close_reason":"Completed terminology cleanup: spawnβ†’pour/wisp for molecules across docs, code, and templates","dependencies":[{"issue_id":"gt-9uy0","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T13:06:49.341648-08:00","created_by":"daemon"}]} +{"id":"gt-9uy0","title":"Remove 'spawn' terminology from molecular chemistry","description":"'Spawn' should ONLY be used for polecats (workers). Molecules use different verbs:\n- pour: create mol from proto (persistent)\n- wisp: create wisp from proto (ephemeral)\n- run: execute molecule\n- bond: attach molecule to something\n\nFound ~100+ instances of 'bd mol spawn' or 'spawn' used with molecules.\n\n**Correct terminology:**\n- gt spawn = spawn polecat (OK)\n- bd pour \u003cproto\u003e = create persistent molecule\n- bd wisp \u003cproto\u003e = create ephemeral wisp\n- bd run \u003cproto\u003e = create and execute\n- bd mol bond = attach molecule\n\n**Docs needing updates:**\n- prompts/roles/deacon.md: 'bd mol spawn' β†’ 'bd wisp'\n- docs/molecular-chemistry.md: 'Spawn Mol/Wisp' β†’ 'Pour/Wisp'\n- docs/molecule-algebra.md: 'Spawn as Mol when...'\n- docs/sling-design.md, architecture.md, vision.md\n\n**Code needing updates:**\n- internal/cmd/prime.go: 'bd mol spawn' β†’ 'bd wisp' (~6 instances)\n- internal/cmd/sling.go: rename spawnMoleculeFromProto β†’ pourMoleculeFromProto\n\nP1 because docs show non-existent commands.","status":"in_progress","priority":1,"issue_type":"task","created_at":"2025-12-24T13:06:43.805547-08:00","updated_at":"2025-12-24T13:12:43.772336-08:00","dependencies":[{"issue_id":"gt-9uy0","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T13:06:49.341648-08:00","created_by":"daemon"}]} {"id":"gt-9wv0","title":"gt spawn should verify daemon is running for polecat triggering","description":"gt spawn notifies the Deacon (via mail) that a polecat was started, expecting the Deacon to trigger it once Claude is ready. But if the daemon isn't running, the mail sits unread and the polecat never gets triggered.\n\n## Current Behavior\n1. gt spawn starts polecat session\n2. gt spawn sends POLECAT_STARTED to deacon/\n3. (assumes daemon will trigger polecat)\n\n## Problem\nIf gt daemon isn't running, step 3 never happens and polecat sits at prompt.\n\n## Solution\nIn gt spawn, after session start:\n1. Check if daemon is running (gt daemon status)\n2. If not running, either:\n a. Start daemon: gt daemon start\n b. Or warn user: 'Daemon not running, polecat may not auto-start'\n\n## Alternative\nThe user can manually trigger with gt nudge, but automated flow should work.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T01:03:03.71521-08:00","updated_at":"2025-12-23T01:03:03.71521-08:00","dependencies":[{"issue_id":"gt-9wv0","depends_on_id":"gt-bjft","type":"blocks","created_at":"2025-12-23T01:03:12.187224-08:00","created_by":"daemon"}]} {"id":"gt-9za0","title":"Mol Mall: Molecule marketplace distribution","description":"Design the Mol Mall distribution mechanism for sharing molecules.\n\n## Core Insight\n\nMol Mall is just a registry of molecules.jsonl fragments. No special format needed.\n\n## Distribution Model\n\n```\nMol Mall (registry)\n β”‚\n β”‚ bd mol search \"security\"\n β–Ό\nMolecule catalog (searchable index)\n β”‚\n β”‚ bd mol install mol-security-scan\n β–Ό\nDownload molecules.jsonl fragment\n β”‚\n β”‚ Append to ~/.beads/molecules.jsonl\n β–Ό\nAvailable locally: bd mol list\n```\n\n## Registry Format\n\nSimple JSON index served from HTTPS:\n\n```json\n{\n \"molecules\": [\n {\n \"id\": \"mol-security-scan\",\n \"title\": \"Security Scan\",\n \"description\": \"OWASP Top 10 vulnerability checker\",\n \"labels\": [\"plugin\", \"code-review\", \"tier:sonnet\"],\n \"author\": \"anthropic\",\n \"version\": \"1.0.0\",\n \"url\": \"https://mol-mall.anthropic.com/molecules/mol-security-scan.jsonl\"\n }\n ]\n}\n```\n\n## CLI Commands\n\n```bash\nbd mol search \u003cquery\u003e # Search registry\nbd mol info \u003cid\u003e # Show molecule details\nbd mol install \u003cid\u003e # Download and install\nbd mol uninstall \u003cid\u003e # Remove from catalog\nbd mol update # Update all installed molecules\n```\n\n## Installation Locations\n\n```\n~/.beads/molecules.jsonl # User-level (default install location)\n~/gt/.beads/molecules.jsonl # Town-level (shared across rigs)\n.beads/molecules.jsonl # Project-level (team-specific)\n```\n\n## Version Management\n\nMolecules can have versions via labels: `version:1.0.0`\nInstall specific version: `bd mol install mol-security-scan@1.0.0`\n\n## Auth (Future)\n\nPrivate registries could require auth token.\nEnterprise Mol Malls for internal distribution.\n\n## Related\n\n- gt-u818: Plugin System (plugins ARE molecules)\n- molecular-chemistry.md: Format documentation","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-23T05:14:35.698369-08:00","updated_at":"2025-12-23T05:14:35.698369-08:00"} {"id":"gt-9zic","title":"Merge: gt-rp0k","description":"branch: polecat/nux\ntarget: main\nsource_issue: gt-rp0k\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-22T23:40:52.956859-08:00","updated_at":"2025-12-22T23:50:12.379136-08:00","closed_at":"2025-12-22T23:50:12.379136-08:00","close_reason":"Merged to main"} @@ -366,7 +365,6 @@ {"id":"gt-bf95","title":"rebase-main","description":"Rebase against main to incorporate any changes.\nResolve conflicts if needed.\n\ngit fetch origin main\ngit rebase origin/main\n\nIf there are conflicts, resolve them carefully and continue the rebase.\n\nDepends: self-review, verify-tests","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-21T21:48:26.322259-08:00","updated_at":"2025-12-21T21:48:26.322259-08:00","dependencies":[{"issue_id":"gt-bf95","depends_on_id":"gt-i4lo","type":"parent-child","created_at":"2025-12-21T21:48:26.327372-08:00","created_by":"stevey"},{"issue_id":"gt-bf95","depends_on_id":"gt-ldm4","type":"blocks","created_at":"2025-12-21T21:48:26.328498-08:00","created_by":"stevey"}],"wisp":true} {"id":"gt-bfd","title":"Keepalive signal from bd/gt commands","description":"Every bd and gt command should touch a keepalive file to signal 'agent is alive/working'.\n\n## Implementation\n\nTouch `\u003cworkspace\u003e/.gastown/keepalive.json`:\n```json\n{\"last_command\": \"bd show gt-99m\", \"timestamp\": \"2025-12-18T13:45:00Z\"}\n```\n\n## Usage by Daemon\n\n- Fresh (\u003c 2 min) β†’ agent is working, skip heartbeat\n- Stale (2-5 min) β†’ might be thinking, gentle poke\n- Very stale (\u003e 5 min) β†’ likely idle, safe to interrupt\n\n## Benefits\n\n- Zero cost (just file I/O)\n- Works during long tool calls\n- Doesn't require agent cooperation\n- Foundation for smarter backoff strategies","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-18T14:19:26.241957-08:00","updated_at":"2025-12-18T20:03:43.816952-08:00","closed_at":"2025-12-18T20:03:43.816952-08:00","dependencies":[{"issue_id":"gt-bfd","depends_on_id":"gt-99m","type":"blocks","created_at":"2025-12-18T14:19:46.407664-08:00","created_by":"daemon"}]} {"id":"gt-bho9","title":"stderr suppression hides critical errors","description":"Multiple files set cmd.Stderr = nil:\n- prime.go\n- up.go\n- orphans.go\n- daemon.go\n\nThis hides git errors and command failures.\n\nShould capture stderr for debugging and log when errors occur,\nrather than suppressing entirely.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:51:41.108782-08:00","updated_at":"2025-12-24T12:51:41.108782-08:00","dependencies":[{"issue_id":"gt-bho9","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T12:52:07.908317-08:00","created_by":"daemon"}]} -{"id":"gt-bi21","title":"gt sling should accept raw issues, not just molecules","description":"Currently gt sling only works with molecules. When you try to sling a raw issue:\n\n gt sling gt-9uy0 gastown/crew/max\n Error: invalid thing: issue not found\n\nOptions:\n1. Auto-wrap issues in a simple work molecule (mol-issue-work?)\n2. Create a minimal 'envelope' molecule on the fly\n3. Just pin the issue directly without a molecule wrapper\n\nThe friction of needing a molecule for every piece of work discourages using the sling mechanism for ad-hoc tasks.\n\nRelated: crew workers often want to pick up an issue without formal molecule choreography.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-24T13:46:54.92516-08:00","updated_at":"2025-12-24T13:46:54.92516-08:00","dependencies":[{"issue_id":"gt-bi21","depends_on_id":"gt-jo9n","type":"blocks","created_at":"2025-12-24T13:47:01.221497-08:00","created_by":"daemon"}]} {"id":"gt-bj6f","title":"gt prime: Refinery context detection and output","description":"Update gt prime to detect Refinery role:\n- Detect from directory: refinery/rig/ = Refinery\n- Show handoff bead reference\n- Show merge queue status\n- Show polecat branches with unmerged commits\n- Show last actions summary","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-19T18:09:09.31791-08:00","updated_at":"2025-12-19T18:09:09.31791-08:00","dependencies":[{"issue_id":"gt-bj6f","depends_on_id":"gt-ktal","type":"blocks","created_at":"2025-12-19T18:09:39.462238-08:00","created_by":"daemon"}]} {"id":"gt-bjft","title":"gt spawn should auto-start refinery/witness if not running","description":"When spawning a polecat, the infrastructure (refinery, witness) should already be running.\n\n## Current Behavior\nspawn.go only:1. Assigns issue to polecat2. Sends work mail3. Starts polecat session\n\nThe refinery and witness must be started separately.\n\n## Expected Behavior (per user feedback)\nWhen spawning a polecat, if the rig's refinery or witness is not running, auto-start them.\n\n## Options\n\n### Option A: spawn auto-starts infrastructure\nCheck if refinery/witness running before spawn, start if not.\n\n### Option B: gt swarm start \u003crig\u003e command\nExplicit command that:\n1. Starts refinery\n2. Starts witness\n3. Optionally spawns polecats on bd ready issues\n\n### Option C: gt rig start \u003crig\u003e\nSimilar to Option B but as rig lifecycle command.\n\n## Related\n- gt-n7z7: refinery --foreground race condition bug\n- gt-u1j.18: witness CLI commands","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-20T00:58:10.146332-08:00","updated_at":"2025-12-23T00:52:53.663648-08:00","closed_at":"2025-12-23T00:52:53.663648-08:00","close_reason":"Implemented in commit a3c6711: auto-start refinery/witness from spawn, added check-refinery step to mol-witness-patrol"} {"id":"gt-bmjw","title":"gt polecat add: should handle existing branch gracefully","description":"## Problem\n\n`gt polecat add gastown Nux` fails if the branch `polecat/Nux` already exists.\n\n## Current Behavior\n\n```\nfatal: a branch named 'polecat/Nux' already exists\n```\n\n## Expected Behavior\n\nShould either:\n1. Reuse the existing branch\n2. Or prompt to delete/recreate\n3. Or auto-suffix: polecat/Nux-2\n\n## Context\n\nBranch may exist from previous polecat that was removed but branch wasn't cleaned up.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-18T21:52:09.361672-08:00","updated_at":"2025-12-20T03:08:48.858604-08:00","closed_at":"2025-12-20T03:08:48.858604-08:00"} @@ -577,7 +575,6 @@ {"id":"gt-i4kq","title":"Update templates for Propulsion Principle","description":"Overhaul agent prompts to embody the Universal Gas Town Propulsion Principle:\n\n\u003e If you find something on your hook, YOU RUN IT.\n\nTemplates to update:\n- [ ] deacon.md.tmpl - Check hook first, no decision logic\n- [ ] polecat.md.tmpl - Propulsion startup, follow molecule\n- [ ] witness.md.tmpl - Sling wisps when spawning agents\n- [ ] refinery.md.tmpl - Accept slung epics\n\nKey changes:\n1. Remove 'should I run this?' decision points\n2. Add 'check your hook' as step 1 of startup\n3. Make molecule-following the default mode\n4. Simplify - agents don't think, they execute","status":"closed","priority":1,"issue_type":"task","assignee":"gastown/slit","created_at":"2025-12-22T03:17:46.464968-08:00","updated_at":"2025-12-22T23:44:05.155061-08:00","closed_at":"2025-12-22T23:44:05.155061-08:00","close_reason":"All four templates updated with Propulsion Principle","dependencies":[{"issue_id":"gt-i4kq","depends_on_id":"gt-4ev4","type":"blocks","created_at":"2025-12-22T12:10:42.245621-08:00","created_by":"daemon"},{"issue_id":"gt-i4kq","depends_on_id":"gt-uym5","type":"blocks","created_at":"2025-12-22T12:10:42.320803-08:00","created_by":"daemon"}]} {"id":"gt-i4lo","title":"mol-polecat-work","description":"Full polecat lifecycle from assignment to decommission.\n\nThis proto enables nondeterministic idempotence for polecat work.\nA polecat that crashes after any step can restart, read its molecule state,\nand continue from the last completed step. No work is lost.\n\nVariables:\n- gt-test123 - The source issue ID being worked on","status":"in_progress","priority":2,"issue_type":"epic","assignee":"stevey","created_at":"2025-12-21T21:48:26.320963-08:00","updated_at":"2025-12-21T21:48:26.332718-08:00","wisp":true} {"id":"gt-i6b9","title":"Merge: gt-cp2s","description":"branch: polecat/rictus\ntarget: main\nsource_issue: gt-cp2s\nrig: gastown","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-22T23:45:29.171329-08:00","updated_at":"2025-12-22T23:47:52.667765-08:00","closed_at":"2025-12-22T23:47:52.667765-08:00","close_reason":"Already merged (stale branch)"} -{"id":"gt-i6k1","title":"Clean up duplicate patrol protos (gt-qflq, gt-iep9)","description":"There are duplicate protos for patrol molecules:\n\n## Duplicates\n\n| Old Proto | New Proto | Name |\n|-----------|-----------|------|\n| gt-qflq | mol-witness-patrol | mol-witness-patrol |\n| gt-iep9 | mol-deacon-patrol | mol-deacon-patrol |\n\nThe old gt-* prefix protos were created before the formula cooking system.\nThe new mol-* prefix protos were created by `bd cook`.\n\n## Action\n\n1. Close or delete the old gt-* protos\n2. Update any references to use the new mol-* protos\n3. Verify `bd mol list` shows clean output\n\n## Root Cause\n\nThe bd cook command uses the formula name as the proto ID (mol-*), \nnot the project prefix (gt-*). This is probably correct behavior,\nbut means we have legacy protos to clean up.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T13:50:11.424341-08:00","updated_at":"2025-12-24T13:50:11.424341-08:00"} {"id":"gt-ia0s","title":"Review: Beads Universal Data Plane documentation","description":"Review new docs/beads-data-plane.md (275 lines) for accuracy.\n\n## Commit\n- 54c8269: Add Beads Universal Data Plane documentation\n\n## Review focus\n- Accuracy of beads architecture description\n- Correct field mappings (mail β†’ beads fields)\n- Two-level architecture (town vs rig beads) correctly explained","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-23T14:27:49.410707-08:00","updated_at":"2025-12-23T14:27:49.410707-08:00"} {"id":"gt-iahc","title":"Merge: gt-h6eq.6","description":"branch: polecat/keeper\ntarget: main\nsource_issue: gt-h6eq.6\nrig: gastown","status":"closed","priority":3,"issue_type":"merge-request","created_at":"2025-12-23T11:42:12.738221-08:00","updated_at":"2025-12-23T12:22:23.469304-08:00","closed_at":"2025-12-23T12:22:23.469304-08:00","close_reason":"Merged to main in gt-h6eq swarm"} {"id":"gt-ic0j","title":"🀝 HANDOFF: Timing fixes applied","description":"Fixed mayor attach timing bug. Completed: timing fix, gt-tulx, Emma beads-6v2. Remaining P1: gt-17zr, gt-kcee, gt-szsq. Run gt prime on startup.","status":"closed","priority":2,"issue_type":"message","created_at":"2025-12-18T22:19:57.731032-08:00","updated_at":"2025-12-18T23:28:33.950423-08:00","closed_at":"2025-12-18T23:28:33.950423-08:00"} @@ -605,9 +602,9 @@ {"id":"gt-ilav.8","title":"Recovery: Detect orphaned merged polecats","description":"Safety net for when Refinery misses sending lifecycle notification.\n\n## Detection Points\n\n**Witness polecat-scan**:\n- For each polecat in `mr_submitted` state:\n - Check MR status: `gt mq status \u003cmr-id\u003e`\n - If MR is closed/merged but polecat state is still mr_submitted:\n - Update polecat state to `merged`\n - Log recovery action\n\n**Deacon orphan-check**:\n- Query all closed MRs\n- Cross-reference with polecat states\n- If merged MR but polecat not in merged/retired state:\n - Send correction to Witness\n - Log for metrics (indicates Refinery notification missed)\n\n## Acceptance\n- Orphaned polecats detected and corrected\n- Recovery is logged for monitoring\n- No work lost due to missed notifications","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T12:07:56.821259-08:00","updated_at":"2025-12-23T12:07:56.821259-08:00","dependencies":[{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav","type":"parent-child","created_at":"2025-12-23T12:07:56.823191-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav.5","type":"blocks","created_at":"2025-12-23T12:08:06.749803-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav.2","type":"blocks","created_at":"2025-12-23T12:08:06.832711-08:00","created_by":"daemon"},{"issue_id":"gt-ilav.8","depends_on_id":"gt-ilav.4","type":"blocks","created_at":"2025-12-23T12:08:06.918149-08:00","created_by":"daemon"}]} {"id":"gt-in3x","title":"gt spawn --continue for resuming parked molecules","description":"Add `--continue` flag to gt spawn for resuming parked molecules:\n\n```bash\ngt spawn --continue gt-mol-root\n```\n\nThis:\n1. Finds molecule root\n2. Verifies molecule is in \"parked\" state (in_progress, no assignee)\n3. Checks external deps are now satisfied\n4. Spawns polecat with molecule context\n5. Polecat reads handoff mail and continues from blocked step\n\nPart of cross-project dependency system.\nSee: docs/cross-project-deps.md\n\nDepends on: gt-zniu (gt park)\nDepends on Beads: bd-zmmy (bd ready resolution)","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-21T22:39:13.154462-08:00","updated_at":"2025-12-21T22:39:13.154462-08:00","dependencies":[{"issue_id":"gt-in3x","depends_on_id":"gt-zniu","type":"blocks","created_at":"2025-12-21T22:39:44.707231-08:00","created_by":"daemon"}]} {"id":"gt-in7b","title":"gt sling: nudge crew/mayor if session is running","description":"When slinging to crew or mayor, if they have an active tmux session, send a nudge notification so they know work has landed on their hook.\n\nCurrently only slingToPolecat nudges (lines 514-521 in internal/cmd/sling.go).\n\nMissing nudge in:\n- slingToCrew (line ~669)\n- slingToMayor (line ~876)\n\nNOT applicable to patrol-based agents (witness, refinery, deacon) - they run on cycles and pick up work via hook check, not interactive nudge.\n\nImplementation:\n1. For crew: need to determine session name (e.g., gastown-crew-max)\n2. Check if session running via tmux\n3. If running, call t.NudgeSession() with appropriate message","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T15:56:22.30857-08:00","updated_at":"2025-12-23T15:57:01.19806-08:00"} -{"id":"gt-ingm","title":"Molecular Chemistry Cleanup: Fix inaccurate molecule depictions","description":"## The Correct Model\n\nAccording to molecular-chemistry.md, the hierarchy is:\n\nFormula (YAML DSL) --cook--\u003e Proto (template beads) --pour/wisp--\u003e Mol/Wisp (actual work)\n\n- **Formulas**: YAML files in .beads/formulas/ that define workflow structure\n- **Cook**: Transform formula to proto beads (with [template] label)\n- **Proto**: Template beads with child beads for each step\n- **Pour**: Proto to Mol (persistent liquid)\n- **Wisp**: Proto to Wisp (ephemeral vapor)\n\n## What's Wrong\n\nWe have legacy code and docs that use the OLD model where molecules are defined\nin Go code as structs with embedded markdown, instead of as formula YAML cooked into proto beads.\n\n---\n\n## MAJOR ISSUES\n\n### 1. Go Code: molecules_*.go (DELETE OR REWRITE)\n\n**Files:**\n- internal/beads/builtin_molecules.go\n- internal/beads/molecules_patrol.go (19KB!)\n- internal/beads/molecules_session.go (13KB)\n- internal/beads/molecules_work.go (13KB)\n\n**Problem:** Defines molecules as Go structs with embedded markdown descriptions.\nThis is completely wrong. Molecules should come from:\n1. Formula YAML files cooked into proto beads\n2. Proto beads with child beads for each step\n\n**Used by:**\n- install.go:seedBuiltinMolecules() - seeds during install\n- catalog.go - includes in catalog\n- molecule_list.go:ExportBuiltinMolecules()\n\n**Fix:** Delete these files. Create formula YAML files instead. Update seeding\nto cook formulas into protos.\n\n### 2. Role Templates: Steps Listed in Markdown (REWRITE)\n\n**Files:**\n- prompts/roles/deacon.md - Lists 7 patrol steps\n- prompts/roles/refinery.md - Lists 10 patrol steps\n- prompts/roles/witness.md - Procedural \"Heartbeat Protocol\" (not molecule-based!)\n- prompts/roles/polecat.md - References molecule steps\n\n**Problem:** The steps are listed in the markdown template, but they should be\ndiscovered from the proto beads via bd mol current. Templates should say\n\"check your hook, run your patrol\" without duplicating step definitions.\n\n**Fix:** Templates should describe HOW to run a patrol (propulsion principle,\nbd mol current, bd close --continue), not WHAT the steps are.\n\n### 3. Protos are Empty/Missing (CREATE)\n\n**Current state:**\n- gt-iep9 (mol-deacon-patrol) - Only 2 child steps\n- gt-qflq (mol-witness-patrol) - EMPTY (0 children)\n- mol-refinery-patrol - DOESN'T EXIST\n\n**Fix:** Create formula YAML files for each patrol, cook them into proper protos\nwith child beads for each step.\n\n---\n\n## MEDIUM ISSUES\n\n### 4. Command Confusion: spawn vs pour/wisp\n\n**Files:**\n- prompts/roles/deacon.md - Uses bd mol spawn ... --assignee=deacon\n- prompts/roles/refinery.md - Uses bd mol spawn ... --wisp\n- Various docs\n\n**Problem:** The correct commands per molecular-chemistry.md:\n- bd pour proto - Create persistent mol (liquid)\n- bd wisp proto - Create ephemeral wisp (vapor)\n- bd mol spawn - Old/deprecated\n\n**Fix:** Update all references to use bd wisp for patrols, bd pour for\npersistent work.\n\n### 5. Command Confusion: gt mol vs bd mol\n\n**Files:** Various docs and templates\n\n**Problem:** Some use gt mol status, others bd mol status. Need to clarify:\n- gt mol = Gas Town wrapper (if it exists, what does it add?)\n- bd mol = Beads molecule commands (authoritative)\n\n**Fix:** Audit and standardize. If gt mol is a thin wrapper, remove it.\n\n### 6. polecat-wisp-architecture.md (UPDATE OR DELETE)\n\n**File:** docs/polecat-wisp-architecture.md\n\n**Problem:** References adding molecules to builtin_molecules.go - old model.\n\n### 7. manager.go (UPDATE)\n\n**File:** internal/rig/manager.go\n\n**Problem:** Comment references \"subset of builtin_molecules.go for seeding\"\n\n---\n\n## IMPLEMENTATION ORDER\n\n1. **Create formula YAML files** for the 3 patrol molecules:\n - mol-deacon-patrol.formula.yaml\n - mol-witness-patrol.formula.yaml\n - mol-refinery-patrol.formula.yaml\n\n2. **Implement bd cook** if not already working to create protos from formulas\n\n3. **Cook the formulas** into proto beads with proper child beads\n\n4. **Update role templates** to use propulsion principle without step lists\n\n5. **Delete molecules_*.go** once formulas are working\n\n6. **Update install.go** to cook formulas instead of seeding Go structs\n\n7. **Audit gt mol vs bd mol** and standardize","status":"open","priority":1,"issue_type":"epic","created_at":"2025-12-24T12:37:49.601971-08:00","updated_at":"2025-12-24T12:37:49.601971-08:00","dependencies":[{"issue_id":"gt-ingm","depends_on_id":"gt-6y8u","type":"relates-to","created_at":"2025-12-24T13:25:18.856554-08:00","created_by":"daemon"}]} +{"id":"gt-ingm","title":"Molecular Chemistry Cleanup: Fix inaccurate molecule depictions","description":"## The Correct Model\n\nAccording to molecular-chemistry.md, the hierarchy is:\n\nFormula (YAML DSL) --cook--\u003e Proto (template beads) --pour/wisp--\u003e Mol/Wisp (actual work)\n\n- **Formulas**: YAML files in .beads/formulas/ that define workflow structure\n- **Cook**: Transform formula to proto beads (with [template] label)\n- **Proto**: Template beads with child beads for each step\n- **Pour**: Proto to Mol (persistent liquid)\n- **Wisp**: Proto to Wisp (ephemeral vapor)\n\n## What's Wrong\n\nWe have legacy code and docs that use the OLD model where molecules are defined\nin Go code as structs with embedded markdown, instead of as formula YAML cooked into proto beads.\n\n---\n\n## MAJOR ISSUES\n\n### 1. Go Code: molecules_*.go (DELETE OR REWRITE)\n\n**Files:**\n- internal/beads/builtin_molecules.go\n- internal/beads/molecules_patrol.go (19KB!)\n- internal/beads/molecules_session.go (13KB)\n- internal/beads/molecules_work.go (13KB)\n\n**Problem:** Defines molecules as Go structs with embedded markdown descriptions.\nThis is completely wrong. Molecules should come from:\n1. Formula YAML files cooked into proto beads\n2. Proto beads with child beads for each step\n\n**Used by:**\n- install.go:seedBuiltinMolecules() - seeds during install\n- catalog.go - includes in catalog\n- molecule_list.go:ExportBuiltinMolecules()\n\n**Fix:** Delete these files. Create formula YAML files instead. Update seeding\nto cook formulas into protos.\n\n### 2. Role Templates: Steps Listed in Markdown (REWRITE)\n\n**Files:**\n- prompts/roles/deacon.md - Lists 7 patrol steps\n- prompts/roles/refinery.md - Lists 10 patrol steps\n- prompts/roles/witness.md - Procedural \"Heartbeat Protocol\" (not molecule-based!)\n- prompts/roles/polecat.md - References molecule steps\n\n**Problem:** The steps are listed in the markdown template, but they should be\ndiscovered from the proto beads via bd mol current. Templates should say\n\"check your hook, run your patrol\" without duplicating step definitions.\n\n**Fix:** Templates should describe HOW to run a patrol (propulsion principle,\nbd mol current, bd close --continue), not WHAT the steps are.\n\n### 3. Protos are Empty/Missing (CREATE)\n\n**Current state:**\n- gt-iep9 (mol-deacon-patrol) - Only 2 child steps\n- gt-qflq (mol-witness-patrol) - EMPTY (0 children)\n- mol-refinery-patrol - DOESN'T EXIST\n\n**Fix:** Create formula YAML files for each patrol, cook them into proper protos\nwith child beads for each step.\n\n---\n\n## MEDIUM ISSUES\n\n### 4. Command Confusion: spawn vs pour/wisp\n\n**Files:**\n- prompts/roles/deacon.md - Uses bd mol spawn ... --assignee=deacon\n- prompts/roles/refinery.md - Uses bd mol spawn ... --wisp\n- Various docs\n\n**Problem:** The correct commands per molecular-chemistry.md:\n- bd pour proto - Create persistent mol (liquid)\n- bd wisp proto - Create ephemeral wisp (vapor)\n- bd mol spawn - Old/deprecated\n\n**Fix:** Update all references to use bd wisp for patrols, bd pour for\npersistent work.\n\n### 5. Command Confusion: gt mol vs bd mol\n\n**Files:** Various docs and templates\n\n**Problem:** Some use gt mol status, others bd mol status. Need to clarify:\n- gt mol = Gas Town wrapper (if it exists, what does it add?)\n- bd mol = Beads molecule commands (authoritative)\n\n**Fix:** Audit and standardize. If gt mol is a thin wrapper, remove it.\n\n### 6. polecat-wisp-architecture.md (UPDATE OR DELETE)\n\n**File:** docs/polecat-wisp-architecture.md\n\n**Problem:** References adding molecules to builtin_molecules.go - old model.\n\n### 7. manager.go (UPDATE)\n\n**File:** internal/rig/manager.go\n\n**Problem:** Comment references \"subset of builtin_molecules.go for seeding\"\n\n---\n\n## IMPLEMENTATION ORDER\n\n1. **Create formula YAML files** for the 3 patrol molecules:\n - mol-deacon-patrol.formula.yaml\n - mol-witness-patrol.formula.yaml\n - mol-refinery-patrol.formula.yaml\n\n2. **Implement bd cook** if not already working to create protos from formulas\n\n3. **Cook the formulas** into proto beads with proper child beads\n\n4. **Update role templates** to use propulsion principle without step lists\n\n5. **Delete molecules_*.go** once formulas are working\n\n6. **Update install.go** to cook formulas instead of seeding Go structs\n\n7. **Audit gt mol vs bd mol** and standardize","status":"open","priority":1,"issue_type":"epic","created_at":"2025-12-24T12:37:49.601971-08:00","updated_at":"2025-12-24T12:37:49.601971-08:00"} {"id":"gt-ingm.1","title":"Create patrol formula YAML files","description":"Create formula YAML files for:\n- mol-deacon-patrol.formula.yaml\n- mol-witness-patrol.formula.yaml \n- mol-refinery-patrol.formula.yaml\n\nUse the step definitions currently in molecules_patrol.go as reference.\nStore in .beads/formulas/","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-24T12:38:10.472804-08:00","updated_at":"2025-12-24T12:59:44.504798-08:00","closed_at":"2025-12-24T12:59:44.504798-08:00","close_reason":"Created 4 patrol formula YAML files in .beads/formulas/"} -{"id":"gt-ingm.2","title":"Cook patrol formulas into proto beads","description":"Use bd cook to transform formula YAML into proto beads with proper child beads for each step.\n\nVerify with bd mol show that protos have all children.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-24T12:38:11.762962-08:00","updated_at":"2025-12-24T13:47:43.467344-08:00","closed_at":"2025-12-24T13:47:43.467344-08:00","close_reason":"Cooked 4 patrol formulas: deacon(9), witness(10), refinery(11), polecat-arm(6)","dependencies":[{"issue_id":"gt-ingm.2","depends_on_id":"gt-ingm.1","type":"blocks","created_at":"2025-12-24T12:38:23.880593-08:00","created_by":"daemon"},{"issue_id":"gt-ingm.2","depends_on_id":"gt-8tmz.13","type":"blocks","created_at":"2025-12-24T13:01:04.581551-08:00","created_by":"daemon"}]} +{"id":"gt-ingm.2","title":"Cook patrol formulas into proto beads","description":"Use bd cook to transform formula YAML into proto beads with proper child beads for each step.\n\nVerify with bd mol show that protos have all children.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-24T12:38:11.762962-08:00","updated_at":"2025-12-24T12:38:11.762962-08:00","dependencies":[{"issue_id":"gt-ingm.2","depends_on_id":"gt-ingm.1","type":"blocks","created_at":"2025-12-24T12:38:23.880593-08:00","created_by":"daemon"},{"issue_id":"gt-ingm.2","depends_on_id":"gt-8tmz.13","type":"blocks","created_at":"2025-12-24T13:01:04.581551-08:00","created_by":"daemon"}]} {"id":"gt-ingm.3","title":"Delete molecules_*.go files","description":"Remove legacy Go-defined molecules:\n- internal/beads/builtin_molecules.go\n- internal/beads/molecules_patrol.go\n- internal/beads/molecules_session.go\n- internal/beads/molecules_work.go\n\nUpdate install.go to cook formulas instead of seeding Go structs.\nUpdate catalog.go if needed.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-24T12:38:13.028833-08:00","updated_at":"2025-12-24T12:38:13.028833-08:00","dependencies":[{"issue_id":"gt-ingm.3","depends_on_id":"gt-ingm.2","type":"blocks","created_at":"2025-12-24T12:38:23.964643-08:00","created_by":"daemon"}]} {"id":"gt-ingm.4","title":"Rewrite role templates without step lists","description":"Update:\n- prompts/roles/deacon.md\n- prompts/roles/refinery.md\n- prompts/roles/witness.md\n\nTemplates should describe HOW to run patrols (propulsion principle, bd mol current, bd close --continue) not WHAT the steps are. Steps come from proto beads.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-24T12:38:14.388135-08:00","updated_at":"2025-12-24T12:38:14.388135-08:00","dependencies":[{"issue_id":"gt-ingm.4","depends_on_id":"gt-ingm.2","type":"blocks","created_at":"2025-12-24T12:38:24.049212-08:00","created_by":"daemon"}]} {"id":"gt-ingm.5","title":"Standardize bd mol vs gt mol commands","description":"Audit all docs and templates for command usage.\n\nClarify:\n- gt mol = Gas Town wrapper (what does it add?)\n- bd mol = Beads molecule commands (authoritative)\n\nIf gt mol is thin wrapper, consider removing.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T12:38:15.50826-08:00","updated_at":"2025-12-24T12:38:15.50826-08:00"} @@ -620,7 +617,6 @@ {"id":"gt-j4nu","title":"Merge: gt-g44u.3","description":"branch: polecat/Ace\ntarget: main\nsource_issue: gt-g44u.3\nrig: gastown","status":"closed","priority":0,"issue_type":"merge-request","created_at":"2025-12-19T16:14:52.767156-08:00","updated_at":"2025-12-19T17:35:36.663796-08:00","closed_at":"2025-12-19T17:35:36.663796-08:00"} {"id":"gt-j5tk","title":"Work assignment messages should auto-close on completion","description":"When a polecat completes work on an issue, the work assignment message (msg-type:task) stays open. Found 7 stale work assignments in gastown after swarm completed.\n\nProposal: When bd close is called on an issue, auto-close any work assignment messages that reference that issue in their body.\n\nAlternative: Work assignment messages could use a different lifecycle - perhaps they should be acked (closed) when the polecat starts working, not when they finish.","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-20T03:12:28.403974-08:00","updated_at":"2025-12-20T03:12:28.403974-08:00"} {"id":"gt-j6s8","title":"Refinery startup: bond mol-refinery-patrol on start","description":"Wire up Refinery to automatically bond its patrol molecule on startup.\n\n## Current state\n- mol-refinery-patrol exists in builtin_molecules.go\n- prompts/roles/refinery.md describes the protocol\n- Refinery doesn't auto-bond on startup\n\n## Desired behavior\nOn Refinery session start:\n1. gt prime detects RoleRefinery\n2. Check for existing in-progress patrol: bd list --status=in_progress --assignee=refinery\n3. If found: resume from current step\n4. If not found: bd mol bond mol-refinery-patrol --wisp\n5. Output patrol context to agent\n\n## Implementation options\nA) Add to gt prime (outputRefineryPatrolContext)\nB) Add startup hook in refinery CLAUDE.md\nC) Both (prime detects, template reinforces)\n\n## Testing\n- Start refinery session\n- Verify patrol bonds automatically\n- Kill mid-patrol, restart, verify resumes\n\n## Depends on\n- gt-3x0z.10 (existing issue for Refinery patrol)","status":"closed","priority":1,"issue_type":"task","assignee":"gastown/dementus","created_at":"2025-12-22T16:43:34.739741-08:00","updated_at":"2025-12-23T01:16:16.780172-08:00","closed_at":"2025-12-23T01:16:16.780172-08:00","close_reason":"Merged to main"} -{"id":"gt-j755","title":"mol-polecat-arm: Add nudge_text variable definition","description":"The mol-polecat-arm formula references `{{nudge_text}}` in the execute step but doesn't define it in the variables section.\n\n## Current variables section\n\n```yaml\nvariables:\n - name: polecat_name\n required: true\n - name: rig\n required: true\n```\n\n## Missing\n\n```yaml\n - name: nudge_text\n required: false\n default: \"How's progress? Need any help?\"\n description: Text to send when nudging the polecat\n```\n\n## Usage in formula\n\n```bash\ntmux send-keys -t gt-{{rig}}-{{polecat_name}} \"{{nudge_text}}\" Enter\n```\n\n## Fix\n\nAdd nudge_text to the variables section with a sensible default.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-24T13:51:29.644259-08:00","updated_at":"2025-12-24T13:51:29.644259-08:00"} {"id":"gt-j87","title":"Design: Work flow simulation and validation","description":"Validate GGT designs through simulation before implementation.\n\n## Validation Approaches\n\n### 1. Dry-Run Simulation (Recommended First)\nMayor walks through scenarios mentally/on paper:\n- \"If polecat Toast signals done with dirty git state, what happens?\"\n- \"If Witness context fills mid-verification, what state is lost?\"\n- \"If two polecats try to close same issue, what happens?\"\n\nCreate beads for any gaps discovered.\n\n### 2. Real Work in gastown-py\nUse Python Gas Town to stress-test assumptions:\n- Run actual batch work on test repos\n- Observe edge cases in practice\n- Document issues found\n\n### 3. Edge Case Analysis\nSystematic review of failure modes:\n- Agent crashes mid-operation\n- Network failures during sync\n- Concurrent access to shared state\n- Context limits hit at bad times\n\n## Key Scenarios to Validate\n\n- [ ] Witness session cycling (state preservation)\n- [ ] Polecat decommission with dirty state\n- [ ] Merge conflicts in queue\n- [ ] Beads sync conflicts between workers\n- [ ] Escalation path (stuck worker -\u003e Mayor)\n- [ ] Cross-rig communication\n- [ ] Federation mail routing (future)\n\n## Success Criteria\n\n- No data loss scenarios identified\n- Clear recovery paths for all failure modes\n- Edge cases either handled or documented as limitations\n- Design improves as model cognition improves\n\n## Output\n\nFor each scenario validated:\n1. Document in relevant bead if issue found\n2. Create new beads for missing functionality\n3. Update architecture.md if design changes","status":"open","priority":1,"issue_type":"epic","created_at":"2025-12-15T20:24:11.251841-08:00","updated_at":"2025-12-16T17:25:49.858717-08:00"} {"id":"gt-jann","title":"Digest: mol-deacon-patrol","description":"Patrol OK: no mail, 8 polecats working, all witnesses/refineries up","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-23T00:46:56.992828-08:00","updated_at":"2025-12-23T00:46:56.992828-08:00","closed_at":"2025-12-23T00:46:56.992798-08:00","close_reason":"Squashed from 5 wisps"} {"id":"gt-jgdx","title":"Digest: mol-deacon-patrol","description":"Test patrol cycle - first run, no actual work done","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-22T02:07:03.388821-08:00","updated_at":"2025-12-22T02:07:03.388821-08:00","closed_at":"2025-12-22T02:07:03.388793-08:00","close_reason":"Squashed from 5 wisps"} @@ -962,7 +958,6 @@ {"id":"gt-wusk","title":"Layered context onboarding pattern","description":"Pattern from handoff discussion:\n\n## Pattern: Layered Context Onboarding\n\nTown CLAUDE.md (user/org) -\u003e Rig CLAUDE.md (project) -\u003e Role priming\n\n## Ultra-compressed HOP for workers (no reveal)\n\n- Permanent record: All work tracked. Outcomes matter.\n- Quality gates: Molecule steps exist for a reason.\n- Attribution: Completions build your track record.\n- Handoff clean: Leave state any worker can continue.\n\n## Recommendation\n\nCreate Town @AGENTS.md for shared worker context that all workers see.\nThis provides common behavioral guidance without revealing full HOP context.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-20T00:55:11.984103-08:00","updated_at":"2025-12-20T00:55:11.984103-08:00"} {"id":"gt-wvyi","title":"sling pin test 2","status":"closed","priority":2,"issue_type":"task","assignee":"max","created_at":"2025-12-23T11:51:01.899435-08:00","updated_at":"2025-12-23T12:03:22.256591-08:00","closed_at":"2025-12-23T12:03:22.256591-08:00","close_reason":"test issue for gt-o3is debugging"} {"id":"gt-wy8t","title":"Add live polling and updates","description":"Implement live polling (500ms default) for activity updates. Merge new events into view without flickering. Show connection status indicator. Handle daemon disconnects gracefully.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T16:27:18.127611-08:00","updated_at":"2025-12-23T16:27:18.127611-08:00","dependencies":[{"issue_id":"gt-wy8t","depends_on_id":"gt-3p77","type":"blocks","created_at":"2025-12-23T16:27:38.7256-08:00","created_by":"daemon"},{"issue_id":"gt-wy8t","depends_on_id":"gt-rivr","type":"parent-child","created_at":"2025-12-23T16:28:30.942591-08:00","created_by":"daemon"}]} -{"id":"gt-x0a5","title":"Patrol formulas: Inconsistent variable placeholder syntax","description":"The patrol formulas use inconsistent syntax for variable placeholders:\n\n## Inconsistency\n\n| Formula | Syntax | Examples |\n|---------|--------|----------|\n| mol-polecat-arm | `{{var}}` | `{{polecat_name}}`, `{{rig}}` |\n| mol-witness-patrol | `\u003cvar\u003e` | `\u003crig\u003e`, `\u003chandoff-bead-id\u003e` |\n| mol-refinery-patrol | `\u003cvar\u003e` | `\u003cpolecat-branch\u003e` |\n\n## Expected\n\nAll formulas should use consistent syntax, probably `{{var}}` since that's what\nthe variables section defines.\n\n## Fix\n\nUpdate mol-witness-patrol and mol-refinery-patrol to use `{{var}}` syntax\nwhere appropriate, or document that `\u003cvar\u003e` is for human-filled placeholders\nvs `{{var}}` for cook-time interpolation.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-24T13:51:48.126618-08:00","updated_at":"2025-12-24T13:51:48.126618-08:00"} {"id":"gt-x2cx","title":"gt handoff: Deadlock bug in runHandoff","notes":"Running 'gt handoff' from a polecat causes a deadlock:\n\nStack trace shows:\n- goroutine 1 [select (no cases)] in runHandoff\n- File: internal/cmd/handoff.go:125\n\nThe command successfully sends the shutdown request but then hangs with 'fatal error: all goroutines are asleep - deadlock!'","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-20T08:01:33.827354-08:00","updated_at":"2025-12-20T08:47:47.599975-08:00","closed_at":"2025-12-20T08:47:47.599975-08:00"} {"id":"gt-x74c","title":"gt mol command tree: status, catalog, burn, squash","description":"Add gt mol subcommand as agent-side API for molecule operations.\n\nCommands needed:\n- gt mol status - What's on my hook? (pinned molecule, current step, progress)\n- gt mol catalog - List available protos (delegate to bd mol catalog)\n- gt mol burn - Burn current attachment\n- gt mol squash - Squash current molecule to digest\n\nThis completes the agent-side API and makes the docs (sling-design.md, propulsion-principle.md) match reality.\n\nBlocks: deacon.md.tmpl update (can't use gt mol status until it exists)","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-22T13:12:23.710855-08:00","updated_at":"2025-12-22T13:16:16.543031-08:00","closed_at":"2025-12-22T13:16:16.543031-08:00","close_reason":"Implemented gt mol catalog, burn, squash commands. Status already existed."} {"id":"gt-x7c","title":"Work assignment mail not received by polecat","description":"When gt spawn sends a work assignment:\n\n1. gt spawn says 'βœ“ Work assignment sent'\n2. Polecat runs 'gt mail inbox' \n3. Shows '0 messages, 0 unread'\n\nThe work assignment mail never arrived at the polecat's inbox.\n\n## Observed in session\n- Spawned polecat dementus on gt-th7\n- Polecat checked inbox: empty\n- Polecat couldn't find issue (separate sync bug)\n\n## Possible causes\n- Mail routing issue for polecat addresses\n- gt spawn not actually sending mail\n- Mail sent to wrong address format","notes":"This was likely caused by stale beads in old polecats. With gt-9nf (fresh polecats), polecats now use shared rig beads via redirect file, eliminating sync issues. Mail routing uses town beads correctly.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-20T15:18:12.39878-08:00","updated_at":"2025-12-21T10:16:00.862028-08:00","closed_at":"2025-12-21T10:16:00.862028-08:00","close_reason":"Fixed by gt-9nf: fresh polecats use shared beads, mail routes correctly to town beads"} @@ -1015,39 +1010,3 @@ {"id":"gt-zut3","title":"Immediate daemon notification on lifecycle request","description":"When gt handoff sends a lifecycle request to the daemon (via bd mail send deacon/), the daemon only discovers it on its next heartbeat poll (every 5 min). Workers wait unnecessarily for retirement.\n\n## Current Behavior\n1. Worker runs gt handoff\n2. Lifecycle mail sent to deacon/ via beads\n3. Worker blocks waiting for retirement\n4. Daemon heartbeat runs (up to 5 min later)\n5. Daemon processes lifecycle request and kills session\n\n## Expected Behavior\nLifecycle requests should be processed immediately, not on poll interval.\n\n## Proposed Solutions\n\n### Option A: SIGUSR1 Signal (simplest)\n1. Add SIGUSR1 handler in daemon that calls ProcessLifecycleRequests()\n2. gt handoff reads daemon.pid and sends SIGUSR1 after mail send\n\n### Option B: Unix Socket\n1. Daemon listens on ~/gt/daemon/lifecycle.sock\n2. gt handoff connects and sends 'process' message\n\n### Option C: Watchfile + fsnotify\n1. gt handoff touches ~/gt/daemon/lifecycle.trigger\n2. Daemon uses fsnotify to detect and process\n\nRecommend Option A for simplicity.\n\n## Affected Files\n- internal/daemon/daemon.go - add signal handler\n- internal/cmd/handoff.go - send signal after mail","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-20T20:20:07.616335-08:00","updated_at":"2025-12-20T20:27:42.419089-08:00","closed_at":"2025-12-20T20:27:42.419089-08:00"} {"id":"gt-zx3","title":"Per-rig beads repo configuration","description":"Add per-rig beads configuration to rig config schema.\n\n## Config Schema\n\nIn each rig's config.json:\n\n```json\n{\n \"version\": 1,\n \"name\": \"wyvern\",\n \"git_url\": \"https://github.com/steveyegge/wyvern\",\n \"beads\": {\n \"repo\": \"local\", // \"local\" | \"\u003cpath\u003e\" | \"\u003cgit-url\u003e\"\n \"root\": null, // Override bd --root (optional)\n \"prefix\": \"wyv\" // Issue prefix for this rig\n }\n}\n```\n\n## Repo Options\n\n| Value | Meaning | Use Case |\n|-------|---------|----------|\n| `\"local\"` | Use project's `.beads/` | Own projects, full commit access |\n| `\"\u003cpath\u003e\"` | Use beads at path | OSS contributions |\n| `\"\u003cgit-url\u003e\"` | Clone and use repo | Team shared beads |\n\n## Environment Injection\n\nWhen spawning polecats, Gas Town sets:\n```bash\nexport BEADS_ROOT=\"\u003cresolved-path\u003e\"\n```\n\n## Resolution Logic\n\n```go\nfunc ResolveBeadsRoot(rigConfig *RigConfig, rigPath string) (string, error) {\n beads := rigConfig.Beads\n switch {\n case beads.Root != \"\":\n return beads.Root, nil\n case beads.Repo == \"local\" || beads.Repo == \"\":\n return filepath.Join(rigPath, \".beads\"), nil\n case strings.HasPrefix(beads.Repo, \"/\"):\n return beads.Repo, nil\n case strings.Contains(beads.Repo, \"://\"):\n return cloneAndResolve(beads.Repo)\n default:\n return filepath.Join(rigPath, beads.Repo), nil\n }\n}\n```\n\n## Backwards Compatibility\n\nIf `beads` section missing, assume `\"repo\": \"local\"`.","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-15T19:47:16.660049-08:00","updated_at":"2025-12-15T20:48:02.122203-08:00","dependencies":[{"issue_id":"gt-zx3","depends_on_id":"gt-l3c","type":"blocks","created_at":"2025-12-15T19:47:35.726502-08:00","created_by":"daemon"}]} {"id":"gt-zxgu","title":"Remove shell respawn loops from witness and deacon","description":"Currently witness and deacon use shell loops (`while true; do claude; done`) to auto-respawn when Claude exits. This bypasses the proper lifecycle architecture.\n\n## Current Behavior\n- witness.go: ensureWitnessSession() wraps Claude in a shell loop\n- deacon.go: runDeaconStart() wraps Claude in a shell loop\n- When Claude exits, shell automatically restarts it\n\n## Desired Behavior \n- Agents should request lifecycle changes via LIFECYCLE mail to deacon\n- Daemon processes lifecycle requests and handles restarts\n- No shell loops - daemon and deacon's health-scan handle respawns\n\n## Why Change\n1. Shell loops bypass state verification (requesting_cycle flag)\n2. Shell loops bypass handoff mail protocol\n3. Shell loops make lifecycle tracking harder\n4. Daemon already has infrastructure for this\n\n## Migration\n1. Remove shell loop from witness (daemon/deacon handles restart)\n2. Remove shell loop from deacon (daemon handles restart via ensureDeaconRunning)\n3. Verify daemon's health check properly restarts dead agents\n4. Update templates if needed\n\n## Risk\nLow - we have gt witness restart and gt deacon restart as fallbacks","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-23T03:55:49.172227-08:00","updated_at":"2025-12-23T04:02:27.122299-08:00","closed_at":"2025-12-23T04:02:27.122299-08:00","close_reason":"Removed shell respawn loops from witness and deacon. Daemon now properly detects dead Claude via pane command and restarts."} -{"id":"mol-deacon-patrol","title":"mol-deacon-patrol","description":"Mayor's daemon patrol loop.\n\nThe Deacon is the Mayor's background process that runs continuously,\nhandling callbacks, monitoring rig health, and performing cleanup.\nEach patrol cycle runs these steps in sequence, then loops or exits.\n","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-24T14:01:56.570703-08:00","updated_at":"2025-12-24T14:01:56.570703-08:00","labels":["template"]} -{"id":"mol-deacon-patrol.context-check","title":"Check own context limit","description":"Check own context limit.\n\nThe Deacon runs in a Claude session with finite context.\nCheck if approaching the limit:\n\n```bash\ngt context --usage\n```\n\nIf context is high (\u003e80%), prepare for handoff:\n- Summarize current state\n- Note any pending work\n- Write handoff to molecule state\n\nThis enables the Deacon to burn and respawn cleanly.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570706-08:00","updated_at":"2025-12-24T14:01:56.570706-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.context-check","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.637666-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.health-scan","title":"Check Witness and Refinery health","description":"Check Witness and Refinery health for each rig.\n\n**ZFC Principle**: You (Claude) make the judgment call about what is \"stuck\" or\n\"unresponsive\" - there are no hardcoded thresholds in Go. Read the signals,\nconsider context, and decide.\n\nFor each rig, run:\n```bash\ngt witness status \u003crig\u003e\ngt refinery status \u003crig\u003e\n```\n\n**Signals to assess:**\n\n| Component | Healthy Signals | Concerning Signals |\n|-----------|-----------------|-------------------|\n| Witness | State: running, recent activity | State: not running, no heartbeat |\n| Refinery | State: running, queue processing | Queue stuck, merge failures |\n\n**Tracking unresponsive cycles:**\n\nMaintain in your patrol state (persisted across cycles):\n```\nhealth_state:\n \u003crig\u003e:\n witness:\n unresponsive_cycles: 0\n last_seen_healthy: \u003ctimestamp\u003e\n refinery:\n unresponsive_cycles: 0\n last_seen_healthy: \u003ctimestamp\u003e\n```\n\n**Decision matrix** (you decide the thresholds based on context):\n\n| Cycles Unresponsive | Suggested Action |\n|---------------------|------------------|\n| 1-2 | Note it, check again next cycle |\n| 3-4 | Attempt restart: gt witness restart \u003crig\u003e |\n| 5+ | Escalate to Mayor with context |\n\n**Restart commands:**\n```bash\ngt witness restart \u003crig\u003e\ngt refinery restart \u003crig\u003e\n```\n\n**Escalation:**\n```bash\ngt mail send mayor/ -s \"Health: \u003crig\u003e \u003ccomponent\u003e unresponsive\" \\\n -m \"Component has been unresponsive for N cycles. Restart attempts failed.\n Last healthy: \u003ctimestamp\u003e\n Error signals: \u003cdetails\u003e\"\n```\n\nReset unresponsive_cycles to 0 when component responds normally.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570704-08:00","updated_at":"2025-12-24T14:01:56.570704-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.health-scan","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.593901-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.inbox-check","title":"Handle callbacks from agents","description":"Handle callbacks from agents.\n\nCheck the Mayor's inbox for messages from:\n- Witnesses reporting polecat status\n- Refineries reporting merge results\n- Polecats requesting help or escalation\n- External triggers (webhooks, timers)\n\n```bash\ngt mail inbox\n# For each message:\ngt mail read \u003cid\u003e\n# Handle based on message type\n```\n\nCallbacks may spawn new polecats, update issue state, or trigger other actions.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570703-08:00","updated_at":"2025-12-24T14:01:56.570703-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.inbox-check","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.571785-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.loop-or-exit","title":"Burn and respawn or loop","description":"Burn and let daemon respawn, or exit if context high.\n\nDecision point at end of patrol cycle:\n\nIf context is LOW:\n- Sleep briefly (avoid tight loop)\n- Return to inbox-check step\n\nIf context is HIGH:\n- Write state to persistent storage\n- Exit cleanly\n- Let the daemon orchestrator respawn a fresh Deacon\n\nThe daemon ensures Deacon is always running:\n```bash\n# Daemon respawns on exit\ngt daemon status\n```\n\nThis enables infinite patrol duration via context-aware respawning.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570706-08:00","updated_at":"2025-12-24T14:01:56.570706-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.loop-or-exit","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.648691-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.orphan-check","title":"Find abandoned work","description":"Find abandoned work.\n\nScan for orphaned state:\n- Issues marked in_progress with no active polecat\n- Polecats that stopped responding mid-work\n- Merge queue entries with no polecat owner\n- Wisp sessions that outlived their spawner\n\n```bash\nbd list --status=in_progress\ngt polecats --all --orphan\n```\n\nFor each orphan:\n- Check if polecat session still exists\n- If not, mark issue for reassignment or retry\n- File incident beads if data loss occurred\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570705-08:00","updated_at":"2025-12-24T14:01:56.570705-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.orphan-check","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.615838-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.plugin-run","title":"Execute registered plugins","description":"Execute registered plugins.\n\nScan ~/gt/plugins/ for plugin directories. Each plugin has a plugin.md with\nYAML frontmatter defining its gate (when to run) and instructions (what to do).\n\nSee docs/deacon-plugins.md for full documentation.\n\nGate types:\n- cooldown: Time since last run (e.g., 24h)\n- cron: Schedule-based (e.g., \"0 9 * * *\")\n- condition: Metric threshold (e.g., wisp count \u003e 50)\n- event: Trigger-based (e.g., startup, heartbeat)\n\nFor each plugin:\n1. Read plugin.md frontmatter to check gate\n2. Compare against state.json (last run, etc.)\n3. If gate is open, execute the plugin\n\nPlugins marked parallel: true can run concurrently using Task tool subagents.\nSequential plugins run one at a time in directory order.\n\nSkip this step if ~/gt/plugins/ does not exist or is empty.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570704-08:00","updated_at":"2025-12-24T14:01:56.570704-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.plugin-run","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.60486-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.session-gc","title":"Clean dead sessions","description":"Clean dead sessions.\n\nGarbage collect terminated sessions:\n- Remove stale polecat directories\n- Clean up wisp session artifacts\n- Prune old logs and temp files\n- Archive completed molecule state\n\n```bash\ngt gc --sessions\ngt gc --wisps --age=1h\n```\n\nPreserve audit trail. Only clean sessions confirmed dead.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570705-08:00","updated_at":"2025-12-24T14:01:56.570705-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.session-gc","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.626766-08:00","created_by":"stevey"}]} -{"id":"mol-deacon-patrol.trigger-pending-spawns","title":"Nudge newly spawned polecats","description":"Nudge newly spawned polecats that are ready for input.\n\nWhen polecats are spawned, their Claude session takes 10-20 seconds to initialize.\nThe spawn command returns immediately without waiting. This step finds spawned\npolecats that are now ready and sends them a trigger to start working.\n\n```bash\n# For each rig with polecats\nfor rig in gastown beads; do\n gt polecats $rig\n # For each working polecat, check if Claude is ready\n # Use tmux capture-pane to look for \"\u003e \" prompt\ndone\n```\n\nFor each ready polecat that hasn't been triggered yet:\n1. Send \"Begin.\" to trigger UserPromptSubmit hook\n2. The hook injects mail, polecat sees its assignment\n3. Mark polecat as triggered in state\n\nUse WaitForClaudeReady from tmux package (polls for \"\u003e \" prompt).\nTimeout: 60 seconds per polecat. If not ready, try again next cycle.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:01:56.570704-08:00","updated_at":"2025-12-24T14:01:56.570704-08:00","dependencies":[{"issue_id":"mol-deacon-patrol.trigger-pending-spawns","depends_on_id":"mol-deacon-patrol","type":"parent-child","created_at":"2025-12-24T14:01:56.582902-08:00","created_by":"stevey"}]} -{"id":"mol-polecat-arm","title":"mol-polecat-arm","description":"Single polecat inspection and action cycle.\n\nThis molecule is bonded dynamically by mol-witness-patrol's survey-workers step.\nEach polecat being monitored gets one arm that runs in parallel with other arms.\n\n## Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| polecat_name | Yes | Name of the polecat to inspect |\n| rig | Yes | Rig containing the polecat |\n","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-24T14:02:03.234125-08:00","updated_at":"2025-12-24T14:02:03.234125-08:00","labels":["template"]} -{"id":"mol-polecat-arm.assess","title":"Assess work status","description":"Categorize polecat state based on captured output.\n\nStates:\n- **working**: Recent tool calls, active processing\n- **idle**: At prompt, no recent activity\n- **error**: Showing errors or stack traces\n- **requesting_shutdown**: Sent LIFECYCLE/Shutdown mail\n- **done**: Showing completion indicators\n\nCalculate: minutes since last activity.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:03.234127-08:00","updated_at":"2025-12-24T14:02:03.234127-08:00","dependencies":[{"issue_id":"mol-polecat-arm.assess","depends_on_id":"mol-polecat-arm","type":"parent-child","created_at":"2025-12-24T14:02:03.246311-08:00","created_by":"stevey"}]} -{"id":"mol-polecat-arm.capture","title":"Capture polecat state","description":"Capture recent tmux output for {{polecat_name}}.\n\n```bash\ntmux capture-pane -t gt-{{rig}}-{{polecat_name}} -p | tail -50\n```\n\nRecord:\n- Last activity timestamp (when was last tool call?)\n- Visible errors or stack traces\n- Completion indicators (\"Done\", \"Finished\", etc.)\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:03.234126-08:00","updated_at":"2025-12-24T14:02:03.234126-08:00","dependencies":[{"issue_id":"mol-polecat-arm.capture","depends_on_id":"mol-polecat-arm","type":"parent-child","created_at":"2025-12-24T14:02:03.235117-08:00","created_by":"stevey"}]} -{"id":"mol-polecat-arm.decide","title":"Decide intervention action","description":"Apply the nudge matrix to determine action for {{polecat_name}}.\n\n| State | Idle Time | Nudge Count | Action |\n|-------|-----------|-------------|--------|\n| working | any | any | none |\n| idle | \u003c10min | any | none |\n| idle | 10-15min | 0 | nudge-1 (gentle) |\n| idle | 15-20min | 1 | nudge-2 (direct) |\n| idle | 20+min | 2 | nudge-3 (final) |\n| idle | any | 3 | escalate |\n| error | any | any | assess-severity |\n| requesting_shutdown | any | any | pre-kill-verify |\n| done | any | any | pre-kill-verify |\n\nNudge text:\n1. \"How's progress? Need any help?\"\n2. \"Please wrap up soon. What's blocking you?\"\n3. \"Final check. Will escalate in 5 min if no response.\"\n\nRecord decision and rationale.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:03.234128-08:00","updated_at":"2025-12-24T14:02:03.234128-08:00","dependencies":[{"issue_id":"mol-polecat-arm.decide","depends_on_id":"mol-polecat-arm","type":"parent-child","created_at":"2025-12-24T14:02:03.268522-08:00","created_by":"stevey"}]} -{"id":"mol-polecat-arm.execute","title":"Execute intervention","description":"Take the decided action for {{polecat_name}}.\n\n**nudge-N**:\n```bash\ntmux send-keys -t gt-{{rig}}-{{polecat_name}} \"{{nudge_text}}\" Enter\n```\n\n**pre-kill-verify**:\n```bash\ncd polecats/{{polecat_name}}\ngit status # Must be clean\ngit log origin/main..HEAD # Check for unpushed\nbd show \u003cassigned-issue\u003e # Verify closed/deferred\n```\nIf clean: kill session, remove worktree, delete branch\nIf dirty: record failure, retry next cycle\n\n**escalate**:\n```bash\ngt mail send mayor/ -s \"Escalation: {{polecat_name}} stuck\" -m \"...\"\n```\n\n**none**: No action needed.\n\nRecord: action taken, result, updated nudge count.\n\n## Output\n\nThe arm completes with:\n- action_taken: none | nudge-1 | nudge-2 | nudge-3 | killed | escalated\n- result: success | failed | pending\n- updated_state: New nudge count and timestamp for {{polecat_name}}\n\nThis data feeds back to the parent patrol's aggregate step.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:03.234128-08:00","updated_at":"2025-12-24T14:02:03.234128-08:00","dependencies":[{"issue_id":"mol-polecat-arm.execute","depends_on_id":"mol-polecat-arm","type":"parent-child","created_at":"2025-12-24T14:02:03.27941-08:00","created_by":"stevey"}]} -{"id":"mol-polecat-arm.load-history","title":"Load intervention history","description":"Read nudge history for {{polecat_name}} from patrol state.\n\n```\nnudge_count = state.nudges[{{polecat_name}}].count\nlast_nudge_time = state.nudges[{{polecat_name}}].timestamp\n```\n\nThis data was loaded by the parent patrol's load-state step and passed\nto the arm via the bonding context.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:03.234127-08:00","updated_at":"2025-12-24T14:02:03.234127-08:00","dependencies":[{"issue_id":"mol-polecat-arm.load-history","depends_on_id":"mol-polecat-arm","type":"parent-child","created_at":"2025-12-24T14:02:03.257427-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol","title":"mol-refinery-patrol","description":"Merge queue processor patrol loop.\n\nThe Refinery is the Engineer in the engine room. You process polecat branches,\nmerging them to main one at a time with sequential rebasing.\n\n**The Scotty Test**: Before proceeding past any failure, ask yourself:\n\"Would Scotty walk past a warp core leak because it existed before his shift?\"\n","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-24T14:02:02.983211-08:00","updated_at":"2025-12-24T14:02:02.983211-08:00","labels":["template"]} -{"id":"mol-refinery-patrol.burn-or-loop","title":"Burn and respawn or loop","description":"End of patrol cycle decision.\n\nIf queue non-empty AND context LOW:\n- Burn this wisp, start fresh patrol\n- Return to inbox-check\n\nIf queue empty OR context HIGH:\n- Burn wisp with summary digest\n- Exit (daemon will respawn if needed)\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983216-08:00","updated_at":"2025-12-24T14:02:02.983216-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.burn-or-loop","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.081862-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.context-check","title":"Check own context limit","description":"Check own context usage.\n\nIf context is HIGH (\u003e80%):\n- Write handoff summary\n- Prepare for burn/respawn\n\nIf context is LOW:\n- Can continue processing\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983215-08:00","updated_at":"2025-12-24T14:02:02.983215-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.context-check","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.070901-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.generate-summary","title":"Generate handoff summary","description":"Summarize this patrol cycle.\n\nInclude:\n- Branches processed (count, names)\n- Test results (pass/fail)\n- Issues filed (if any)\n- Branches skipped (with reasons)\n- Any escalations sent\n\nThis becomes the digest when the patrol is squashed.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983215-08:00","updated_at":"2025-12-24T14:02:02.983215-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.generate-summary","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.059979-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.handle-failures","title":"Handle test failures","description":"**VERIFICATION GATE**: This step enforces the Beads Promise.\n\nIf tests PASSED: This step auto-completes. Proceed to merge.\n\nIf tests FAILED:\n1. Diagnose: Is this a branch regression or pre-existing on main?\n2. If branch caused it:\n - Abort merge\n - Notify polecat: \"Tests failing. Please fix and resubmit.\"\n - Skip to loop-check\n3. If pre-existing on main:\n - Option A: Fix it yourself (you're the Engineer!)\n - Option B: File a bead: bd create --type=bug --priority=1 --title=\"...\"\n\n**GATE REQUIREMENT**: You CANNOT proceed to merge-push without:\n- Tests passing, OR\n- Fix committed, OR\n- Bead filed for the failure\n\nThis is non-negotiable. Never disavow. Never \"note and proceed.\"\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983215-08:00","updated_at":"2025-12-24T14:02:02.983215-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.handle-failures","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.027466-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.inbox-check","title":"Check refinery mail","description":"Check mail for MR submissions, escalations, messages.\n\n```bash\ngt mail inbox\n# Process any urgent items\n```\n\nHandle shutdown requests, escalations, and status queries.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983213-08:00","updated_at":"2025-12-24T14:02:02.983213-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.inbox-check","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.984306-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.loop-check","title":"Check for more work","description":"More branches to process?\n\nIf yes: Return to process-branch with next branch.\nIf no: Continue to generate-summary.\n\nTrack: branches processed, branches skipped (with reasons).\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983215-08:00","updated_at":"2025-12-24T14:02:02.983215-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.loop-check","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.049164-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.merge-push","title":"Merge and push to main","description":"Merge to main and push immediately.\n\n```bash\ngit checkout main\ngit merge --ff-only temp\ngit push origin main\ngit branch -d temp\ngit branch -D \u003cpolecat-branch\u003e # Local delete (branches never go to origin)\n```\n\nMain has moved. Any remaining branches need rebasing on new baseline.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983215-08:00","updated_at":"2025-12-24T14:02:02.983215-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.merge-push","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.038275-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.process-branch","title":"Process next branch","description":"Pick next branch. Rebase on current main.\n\n```bash\ngit checkout -b temp origin/\u003cpolecat-branch\u003e\ngit rebase origin/main\n```\n\nIf rebase conflicts and unresolvable:\n- git rebase --abort\n- Notify polecat to fix and resubmit\n- Skip to loop-check for next branch\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983214-08:00","updated_at":"2025-12-24T14:02:02.983214-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.process-branch","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.005836-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.queue-scan","title":"Scan merge queue","description":"Fetch remote and identify polecat branches waiting.\n\n```bash\ngit fetch origin\ngit branch -r | grep polecat\ngt refinery queue \u003crig\u003e\n```\n\nIf queue empty, skip to context-check step.\nTrack branch list for this cycle.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983213-08:00","updated_at":"2025-12-24T14:02:02.983213-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.queue-scan","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.995049-08:00","created_by":"stevey"}]} -{"id":"mol-refinery-patrol.run-tests","title":"Run test suite","description":"Run the test suite.\n\n```bash\ngo test ./...\n```\n\nTrack results: pass count, fail count, specific failures.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.983214-08:00","updated_at":"2025-12-24T14:02:02.983214-08:00","dependencies":[{"issue_id":"mol-refinery-patrol.run-tests","depends_on_id":"mol-refinery-patrol","type":"parent-child","created_at":"2025-12-24T14:02:03.016692-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol","title":"mol-witness-patrol","description":"Per-rig worker monitor patrol loop using the Christmas Ornament pattern.\n\nThe Witness is the Pit Boss for your rig. You watch polecats, nudge them toward\ncompletion, verify clean git state before kills, and escalate stuck workers.\n\n**You do NOT do implementation work.** Your job is oversight, not coding.\n\nThis molecule uses dynamic bonding to spawn mol-polecat-arm for each worker,\nenabling parallel inspection with a fanout gate for aggregation.\n\n## The Christmas Ornament Shape\n\n```\n β˜… mol-witness-patrol (trunk)\n /|\\\n β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ └────────┐\n PREFLIGHT DISCOVERY CLEANUP\n β”‚ β”‚ β”‚\n inbox-check survey aggregate (WaitsFor: all-children)\n check-refnry β”‚ save-state\n load-state β”‚ generate-summary\n ↓ context-check\n β”Œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β” burn-or-loop\n ● ● ● mol-polecat-arm (dynamic)\n ace nux toast\n```\n","status":"open","priority":2,"issue_type":"epic","created_at":"2025-12-24T14:02:02.741378-08:00","updated_at":"2025-12-24T14:02:02.741379-08:00","labels":["template"]} -{"id":"mol-witness-patrol.aggregate","title":"Aggregate arm results","description":"Collect outcomes from all polecat inspection arms.\n\nThis is a **fanout gate** - it cannot proceed until ALL dynamically-bonded\npolecat arms have completed their inspection cycles.\n\nOnce all arms complete, collect their outcomes:\n- Actions taken per polecat (nudge, kill, escalate, none)\n- Updated nudge counts\n- Any errors or issues discovered\n\nBuild the consolidated state for save-state.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741382-08:00","updated_at":"2025-12-24T14:02:02.741382-08:00","dependencies":[{"issue_id":"mol-witness-patrol.aggregate","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.786478-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.burn-or-loop","title":"Burn and respawn or loop","description":"End of patrol cycle decision.\n\nIf context is LOW:\n- Burn this wisp (no audit trail needed for patrol cycles)\n- Sleep briefly to avoid tight loop (30-60 seconds)\n- Return to inbox-check step\n\nIf context is HIGH:\n- Burn wisp with summary digest\n- Exit cleanly (daemon will respawn fresh Witness)\n\n```bash\nbd mol burn # Destroy ephemeral wisp\n```\n\nThe daemon ensures Witness is always running.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741382-08:00","updated_at":"2025-12-24T14:02:02.741382-08:00","dependencies":[{"issue_id":"mol-witness-patrol.burn-or-loop","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.829989-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.check-refinery","title":"Ensure refinery is alive","description":"Ensure the refinery is alive and processing merge requests.\n\n**Redundant system**: This check runs in both gt spawn and Witness patrol\nto ensure the merge queue processor stays operational.\n\n```bash\n# Check if refinery session is running\ngt session status \u003crig\u003e/refinery\n\n# Check for merge requests in queue\nbd list --type=merge-request --status=open\n```\n\nIf merge requests are waiting AND refinery is not running:\n```bash\ngt session start \u003crig\u003e/refinery\ngt mail send \u003crig\u003e/refinery -s \"PATROL: Wake up\" -m \"Merge requests in queue. Please process.\"\n```\n\nIf refinery is running but queue is non-empty for \u003e30 min, send nudge.\nThis ensures polecats don't wait forever for their branches to merge.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741381-08:00","updated_at":"2025-12-24T14:02:02.741381-08:00","dependencies":[{"issue_id":"mol-witness-patrol.check-refinery","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.753589-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.context-check","title":"Check own context limit","description":"Check own context usage.\n\nIf context is HIGH (\u003e80%):\n- Ensure state is saved to handoff bead\n- Prepare for burn/respawn\n\nIf context is LOW:\n- Can continue patrolling\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741382-08:00","updated_at":"2025-12-24T14:02:02.741382-08:00","dependencies":[{"issue_id":"mol-witness-patrol.context-check","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.819112-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.generate-summary","title":"Generate handoff summary","description":"Summarize this patrol cycle for digest.\n\nInclude:\n- Workers inspected (count, names)\n- Nudges sent (count, to whom)\n- Sessions killed (count, names)\n- Escalations (count, issues)\n- Issues found (brief descriptions)\n- Actions pending for next cycle\n\nThis becomes the digest when the patrol wisp is squashed.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741382-08:00","updated_at":"2025-12-24T14:02:02.741382-08:00","dependencies":[{"issue_id":"mol-witness-patrol.generate-summary","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.808239-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.inbox-check","title":"Process witness mail","description":"Process witness mail: lifecycle requests, help requests.\n\n```bash\ngt mail inbox\n```\n\nHandle by message type:\n- **LIFECYCLE/Shutdown**: Queue for pre-kill verification\n- **Blocked/Help**: Assess if resolvable or escalate\n- **HANDOFF**: Load predecessor state\n- **Work complete**: Verify issue closed, proceed to pre-kill\n\nRecord any pending actions for later steps.\nMark messages as processed when complete.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.74138-08:00","updated_at":"2025-12-24T14:02:02.74138-08:00","dependencies":[{"issue_id":"mol-witness-patrol.inbox-check","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.742442-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.load-state","title":"Load persisted patrol state","description":"Read handoff bead and get nudge counts.\n\nLoad persistent state from the witness handoff bead:\n- Active workers and their status from last cycle\n- Nudge counts per worker per issue\n- Last nudge timestamps\n- Pending escalations\n\n```bash\nbd show \u003chandoff-bead-id\u003e\n```\n\nIf no handoff exists (fresh start), initialize empty state.\nThis state persists across wisp burns and session cycles.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741381-08:00","updated_at":"2025-12-24T14:02:02.741381-08:00","dependencies":[{"issue_id":"mol-witness-patrol.load-state","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.764533-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.save-state","title":"Persist patrol state","description":"Update handoff bead with new states.\n\nPersist state to the witness handoff bead:\n- Updated worker statuses from all arms\n- Current nudge counts per worker\n- Nudge timestamps\n- Actions taken this cycle\n- Pending items for next cycle\n\n```bash\nbd update \u003chandoff-bead-id\u003e --description=\"\u003cserialized state\u003e\"\n```\n\nThis state survives wisp burns and session cycles.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741382-08:00","updated_at":"2025-12-24T14:02:02.741382-08:00","dependencies":[{"issue_id":"mol-witness-patrol.save-state","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.797264-08:00","created_by":"stevey"}]} -{"id":"mol-witness-patrol.survey-workers","title":"Survey all polecats (fanout)","description":"List polecats and bond mol-polecat-arm for each one.\n\n```bash\n# Get list of polecats\ngt polecat list \u003crig\u003e\n```\n\nFor each polecat discovered, dynamically bond an inspection arm:\n\n```bash\n# Bond mol-polecat-arm for each polecat\nfor polecat in $(gt polecat list \u003crig\u003e --names); do\n bd mol bond mol-polecat-arm $PATROL_WISP_ID \\\n --ref arm-$polecat \\\n --var polecat_name=$polecat \\\n --var rig=\u003crig\u003e\ndone\n```\n\nThis creates child wisps like:\n- patrol-x7k.arm-ace (5 steps)\n- patrol-x7k.arm-nux (5 steps)\n- patrol-x7k.arm-toast (5 steps)\n\nEach arm runs in PARALLEL. The aggregate step will wait for all to complete.\n\nIf no polecats are found, this step completes immediately with no children.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-24T14:02:02.741381-08:00","updated_at":"2025-12-24T14:02:02.741381-08:00","dependencies":[{"issue_id":"mol-witness-patrol.survey-workers","depends_on_id":"mol-witness-patrol","type":"parent-child","created_at":"2025-12-24T14:02:02.775535-08:00","created_by":"stevey"}]} diff --git a/docs/architecture.md b/docs/architecture.md index 854670ff..37f7e79c 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -604,7 +604,7 @@ Some workflows need **dynamic structure** - steps that emerge at runtime based on discovered work. Consider mol-witness-patrol: it monitors N polecats where N varies. A static molecule can't express "for each polecat, do these steps." -The solution is **dynamic bonding** - spawning child molecules at runtime: +The solution is **dynamic bonding** - creating child molecules at runtime: ```bash # In survey-workers step: diff --git a/docs/chemistry-design-changes.md b/docs/chemistry-design-changes.md deleted file mode 100644 index 451b0143..00000000 --- a/docs/chemistry-design-changes.md +++ /dev/null @@ -1,375 +0,0 @@ -# Chemistry Design Changes - -> Implementation roadmap for the molecular chemistry UX described in -> `molecular-chemistry.md` - -## Summary of Changes - -The chemistry metaphor requires the following changes to Beads and Gas Town: - -### Beads Changes - -| Change | Priority | Issue | -|--------|----------|-------| -| Add `bd pour` command (alias for `bd mol spawn --pour`) | P0 | Create | -| Add `bd wisp` command (alias for `bd mol spawn`) | P0 | Create | -| Add `bd pin` command for agent attachment | P1 | Create | -| Add `bd hook` command for hook inspection | P2 | Create | -| Rename `--persistent` to `--pour` in `bd mol spawn` | P0 | Update | -| Add `--pour` flag to `bd mol bond` | P1 | Update | -| Implement digest ID reservation for wisps | P1 | Create | - -### Gas Town Changes - -| Change | Priority | Issue | -|--------|----------|-------| -| Update daemon: remove permanent attachment for patrol | P0 | gt-3x0z.9 | -| Update deacon.md.tmpl: use wisp-based patrol | P0 | gt-3x0z.9 | -| Update witness.md.tmpl: use wisp-based patrol | P1 | Create | -| Add `gt hook` command (thin wrapper around `bd hook`) | P2 | Create | - ---- - -## Detailed Specifications - -### 1. `bd pour` Command - -**Purpose:** Instantiate a proto as a persistent mol (liquid phase). - -**Syntax:** -```bash -bd pour [flags] - -Flags: - --var strings Variable substitution (key=value) - --assignee Assign the root issue to this agent - --dry-run Preview what would be created -``` - -**Implementation:** -- Alias/wrapper for `bd mol spawn --pour` -- Default behavior: creates mol in permanent `.beads/` storage -- Returns the head bead ID of the created mol - -**Example:** -```bash -bd pour mol-feature --var name=auth -# Output: Created mol bd-abc123 from mol-feature -``` - ---- - -### 2. `bd wisp` Command - -**Purpose:** Instantiate a proto as a wisp (vapor phase). - -**Syntax:** -```bash -bd wisp [flags] - -Flags: - --var strings Variable substitution (key=value) - --dry-run Preview what would be created -``` - -**Implementation:** -- Alias/wrapper for `bd mol spawn ` (wisp is default) -- Creates wisp in `.beads-wisp/` storage -- Reserves digest ID in permanent storage (placeholder) - -**Example:** -```bash -bd wisp mol-patrol -# Output: Created wisp bd-xyz789 from mol-patrol -``` - ---- - -### 3. `bd pin` Command - -**Purpose:** Attach a mol to an agent's hook (work assignment). - -**Syntax:** -```bash -bd pin [flags] - -Flags: - --for string Agent to pin work for (default: current agent) -``` - -**Implementation:** -1. Look up the mol by ID -2. Set `pinned: true` on the mol's head bead -3. Set `assignee` to the target agent -4. Update `status` to `in_progress` if not already - -**Example:** -```bash -# Pin to myself -bd pin bd-abc123 - -# Pin to specific agent (Witness assigning work) -bd pin bd-abc123 --for polecat-ace -``` - -**Unpin:** -```bash -bd unpin [mol-id] -# Clears pinned flag, optionally releases assignee -``` - ---- - -### 4. `bd hook` Command - -**Purpose:** Inspect what's on an agent's hook. - -**Syntax:** -```bash -bd hook [flags] - -Flags: - --agent string Agent to inspect (default: current agent) - --json Output in JSON format -``` - -**Implementation:** -- Query beads for issues where `pinned: true` AND `assignee: ` -- Display the mol(s) attached to the hook - -**Example:** -```bash -bd hook -# Output: -# Hook: polecat-ace -# Pinned: bd-abc123 (mol-feature) - in_progress -# Step: implement (2 of 5) - -bd hook --agent deacon -# Output: -# Hook: deacon -# (empty - patrol uses wisps, no persistent attachment) -``` - ---- - -### 5. Rename `--persistent` to `--pour` - -**Current:** -```bash -bd mol spawn mol-feature --persistent -``` - -**New:** -```bash -bd mol spawn mol-feature --pour -# or simply: -bd pour mol-feature -``` - -**Migration:** -- Keep `--persistent` as deprecated alias -- Log warning when `--persistent` is used -- Remove in next major version - ---- - -### 6. Add `--pour` flag to `bd mol bond` - -**Purpose:** Override phase when spawning protos during bond. - -**Current behavior:** -- Phase follows target (mol β†’ liquid, wisp β†’ vapor) -- `--wisp` forces vapor - -**New:** -- Add `--pour` to force liquid even when target is vapor - -```bash -# Found important bug during patrol, make it a real issue -bd mol bond mol-critical-bug wisp-patrol-123 --pour -``` - ---- - -### 7. Digest ID Reservation - -**Problem:** When a wisp is created and later squashed, the digest should -have the same ID so cross-phase references remain valid. - -**Solution:** Reserve the ID on wisp creation. - -**Implementation:** - -1. **On wisp creation (`bd wisp`):** - - Generate the head bead ID - - Write a placeholder to permanent beads: - ```json - { - "id": "bd-xyz789", - "title": "[Wisp Placeholder]", - "status": "open", - "labels": ["wisp-placeholder"], - "description": "Reserved for wisp digest" - } - ``` - - Create actual wisp in `.beads-wisp/` with same ID - -2. **On squash (`bd mol squash`):** - - Replace placeholder with actual digest content - - Delete wisp from `.beads-wisp/` - -3. **On burn (`bd mol burn`):** - - Delete placeholder from permanent beads - - Delete wisp from `.beads-wisp/` - -**Edge cases:** -- Crash before squash: Placeholder remains (orphan cleanup needed) -- Multiple wisps: Each has unique ID, no collision - ---- - -### 8. Daemon Patrol Changes (Gas Town) - -**Current behavior (`checkDeaconAttachment`):** -- Checks if Deacon has pinned mol -- If not, spawns `mol-deacon-patrol` and attaches permanently -- This is wrong for wisp-based patrol - -**New behavior:** -- Remove `checkDeaconAttachment` entirely -- Deacon manages its own wisp lifecycle -- Daemon just ensures Deacon session is running and pokes it - -**Code change in `daemon.go`:** -```go -// Remove this function entirely: -// func (d *Daemon) checkDeaconAttachment() error { ... } - -// Or replace with a simpler check: -func (d *Daemon) ensureDeaconReady() error { - // Just verify session is running, don't attach anything - // Deacon self-spawns wisps for patrol - return nil -} -``` - ---- - -### 9. Deacon Template Update - -**Current (`deacon.md.tmpl`):** -```markdown -If no molecule (naked), **start a new patrol**: -```bash -bd mol run mol-deacon-patrol -``` -``` - -**New:** -```markdown -## Patrol Cycle (Wisp-Based) - -Each patrol cycle uses wisps: - -```bash -# 1. Spawn wisp for this cycle -bd wisp mol-deacon-patrol - -# 2. Execute steps -bd close -bd close -# ... - -# 3. Squash with summary -bd mol squash --summary="Patrol complete: " - -# 4. Loop -# Repeat from step 1 -``` - -**Why wisps?** -- Patrol cycles are operational, not auditable work -- Each cycle is independent -- Only the digest matters (and only if notable) -- Keeps permanent beads clean -``` - ---- - -## Implementation Order - -### Phase 1: Core Commands (P0) - -1. [ ] Add `bd pour` command -2. [ ] Add `bd wisp` command -3. [ ] Rename `--persistent` to `--pour` (with deprecated alias) -4. [ ] Update daemon to remove `checkDeaconAttachment` -5. [ ] Update `deacon.md.tmpl` for wisp-based patrol - -### Phase 2: Agent Attachment (P1) - -1. [ ] Add `bd pin` command -2. [ ] Add `bd unpin` command -3. [ ] Add `--pour` flag to `bd mol bond` -4. [ ] Implement digest ID reservation for wisps -5. [ ] Update `witness.md.tmpl` for wisp-based patrol - -### Phase 3: Inspection (P2) - -1. [ ] Add `bd hook` command -2. [ ] Add `gt hook` command (thin wrapper) - ---- - -## Testing Plan - -### Manual Tests - -```bash -# Test pour -bd pour mol-quick-fix -bd show # Verify in permanent beads - -# Test wisp -bd wisp mol-patrol -ls .beads-wisp/ # Verify wisp created -bd show # Should work from permanent (placeholder) - -# Test squash -bd mol squash --summary="Test" -ls .beads-wisp/ # Wisp should be gone -bd show # Digest should exist - -# Test pin -bd pour mol-feature -bd pin -bd hook # Should show pinned mol -``` - -### Integration Tests - -- Deacon patrol cycle with wisps -- Cross-phase bonding (mol + wisp) -- Digest ID stability after squash - ---- - -## Migration Notes - -### Existing Code - -- `bd mol spawn` defaults to wisp (vapor) now -- Code using `bd mol spawn` for permanent mols needs `--pour` -- `bd mol run` continues to work (creates mol, not wisp) - -### Deprecation Path - -| Old | New | Deprecation | -|-----|-----|-------------| -| `--persistent` | `--pour` | Warn in 0.x, remove in 1.0 | -| `bd mol spawn` (for mols) | `bd pour` | Keep both, prefer new | - ---- - -*This document tracks the implementation of chemistry UX changes.* diff --git a/docs/molecular-chemistry.md b/docs/molecular-chemistry.md index 8b3c2a07..82c24cef 100644 --- a/docs/molecular-chemistry.md +++ b/docs/molecular-chemistry.md @@ -344,9 +344,9 @@ behavior. | bond | Proto | Mol | Wisp | |------|-------|-----|------| -| **Proto** | Compound Proto | Spawn Mol, attach | Spawn Wisp, attach | -| **Mol** | Spawn Mol, attach | Link via edges | Link via edges | -| **Wisp** | Spawn Wisp, attach | Link via edges | Link via edges | +| **Proto** | Compound Proto | Pour, attach | Wisp, attach | +| **Mol** | Pour, attach | Link via edges | Link via edges | +| **Wisp** | Wisp, attach | Link via edges | Link via edges | The table is symmetric: bonding A+B produces the same structure as B+A. @@ -363,7 +363,7 @@ bd mol bond mol-review mol-deploy --as "Review and Deploy" Creates a compound proto that includes both workflows. The result is a reusable template (solid phase). -### Bond: Proto + Mol β†’ Spawn + Attach +### Bond: Proto + Mol β†’ Pour + Attach A solid template melts into an existing liquid workflow. @@ -374,7 +374,7 @@ bd mol bond mol-hotfix bd-feature-123 The proto is instantiated (as liquid by default) and attached to the existing mol. The new issues become part of the flowing work. -### Bond: Proto + Wisp β†’ Spawn + Attach (Vapor) +### Bond: Proto + Wisp β†’ Wisp + Attach A solid template sublimates into an existing vapor workflow. @@ -382,7 +382,7 @@ A solid template sublimates into an existing vapor workflow. bd mol bond mol-extra-check wisp-patrol-456 ``` -The proto instantiates as vapor (following the wisp's phase) and attaches. +The proto is created as a wisp (following the target's phase) and attaches. ### Bond: Mol + Mol β†’ Compound Mol @@ -416,8 +416,8 @@ bd mol bond mol-temp-check bd-feature --wisp | Flag | Effect | Use Case | |------|--------|----------| -| `--pour` | Force create as liquid | "This matters, persist it" | -| `--wisp` | Force create as vapor | "This is ephemeral, let it evaporate" | +| `--pour` | Force creation as liquid | "This matters, persist it" | +| `--wisp` | Force creation as vapor | "This is ephemeral, let it evaporate" | ### Cross-Phase Bonding @@ -480,7 +480,7 @@ Wisps are single-cycle and don't survive session boundaries in the traditional sense. Agents hold them in working memory for one cycle: ```bash -# Deacon creates patrol (no pin needed) +# Deacon creates patrol wisp (no pin needed) bd wisp mol-deacon-patrol # Create vapor # ... execute steps ... bd mol squash --summary="..." # Condense and dissipate @@ -908,8 +908,8 @@ Install alternatives from the Mol Mall: ### For Beads -1. **New commands**: `bd pour`, `bd wisp`, `bd pin` -2. **Flag changes**: `--persistent` β†’ `--pour` (or phase follows operand) +1. **Commands**: `bd pour`, `bd wisp`, `bd pin` +2. **Flags**: `--pour` forces liquid phase when bonding 3. **Wisp storage**: `.beads-wisp/` directory, gitignored 4. **Digest ID reservation**: Placeholder in permanent store on wisp creation diff --git a/docs/molecule-algebra.md b/docs/molecule-algebra.md index 96e0aed2..322cbaed 100644 --- a/docs/molecule-algebra.md +++ b/docs/molecule-algebra.md @@ -200,7 +200,7 @@ Work in Gas Town exists in three phases: **"Is this the work, or is this wrapping the work?"** -| Spawn as Mol when... | Spawn as Wisp when... | +| Pour when... | Wisp when... | |---------------------|----------------------| | This IS the work item | This SHAPES execution | | Multiple agents coordinate | Single agent executes | @@ -539,8 +539,8 @@ Still declarative, still mechanical. | Operands | Result | |----------|--------| | proto + proto | compound proto (frozen) | -| proto + mol | spawn proto as mol, attach | -| proto + wisp | spawn proto as wisp, attach | +| proto + mol | pour proto, attach | +| proto + wisp | wisp proto, attach | | mol + mol | link via edges | | wisp + wisp | link via edges | | mol + wisp | reference link (cross-phase) | @@ -548,8 +548,8 @@ Still declarative, still mechanical. | aspect + molecule | advised molecule | Phase override flags: -- `--pour`: Force spawn as mol -- `--wisp`: Force spawn as wisp +- `--pour`: Force creation as mol +- `--wisp`: Force creation as wisp ## Complete Example: Shiny-Enterprise diff --git a/docs/propulsion-principle.md b/docs/propulsion-principle.md index ebce3711..f13e23f0 100644 --- a/docs/propulsion-principle.md +++ b/docs/propulsion-principle.md @@ -67,12 +67,12 @@ The **sling** operation puts work on an agent's hook. Here's the full lifecycle: β”‚ gt sling lifecycle β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ -β”‚ 1. SPAWN (if proto) 2. ASSIGN 3. PIN β”‚ +β”‚ 1. POUR (if proto) 2. ASSIGN 3. PIN β”‚ β”‚ proto β†’ molecule mol β†’ agent β†’ hook β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Proto β”‚ ────────► β”‚Molecule β”‚ ─────► β”‚ Hook β”‚ β”‚ -β”‚ β”‚(catalog)β”‚ spawn β”‚(instance)β”‚ assign β”‚(pinned) β”‚ β”‚ +β”‚ β”‚(catalog)β”‚ pour β”‚(instance)β”‚ assign β”‚(pinned) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ agent wakes β”‚ diff --git a/docs/sling-design.md b/docs/sling-design.md index d7f56892..8d26e3b2 100644 --- a/docs/sling-design.md +++ b/docs/sling-design.md @@ -52,7 +52,7 @@ gt sling gt-epic-123 refinery/ | Thing | Prefix | Example | Notes | |-------|--------|---------|-------| -| Molecule proto | none | `gt sling feature polecat/alpha` | Spawns from proto | +| Molecule proto | none | `gt sling feature polecat/alpha` | Pours from proto | | Issue/Bead | `gt-*`, `bd-*` | `gt sling gt-xyz polecat/alpha` | Work item | | Epic | `gt-*` (type=epic) | `gt sling gt-epic refinery/` | Batch of issues | | Wisp | `--wisp` flag | `gt sling patrol deacon/ --wisp` | Wisp (no audit trail) | @@ -64,12 +64,12 @@ gt sling gt-epic-123 refinery/ β”‚ gt sling lifecycle β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ β”‚ -β”‚ 1. SPAWN (if proto) 2. ASSIGN 3. PIN β”‚ +β”‚ 1. POUR (if proto) 2. ASSIGN 3. PIN β”‚ β”‚ proto β†’ molecule mol β†’ agent β†’ hook β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Proto β”‚ ────────► β”‚Molecule β”‚ ─────► β”‚ Hook β”‚ β”‚ -β”‚ β”‚(catalog)β”‚ spawn β”‚(instance)β”‚ assign β”‚(pinned) β”‚ β”‚ +β”‚ β”‚(catalog)β”‚ pour β”‚(instance)β”‚ assign β”‚(pinned) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ agent wakes β”‚ @@ -131,7 +131,7 @@ Flags: --force Re-sling even if hook already has work Examples: - gt sling feature polecat/alpha # Spawn feature mol, sling to alpha + gt sling feature polecat/alpha # Pour feature mol, sling to alpha gt sling gt-xyz polecat/beta -m bugfix # Sling issue with bugfix workflow gt sling patrol deacon/ --wisp # Patrol wisp gt sling gt-epic-batch refinery/ # Batch work to refinery @@ -172,7 +172,7 @@ Output: | Command | gt mol | bd mol | Notes | |---------|--------|--------|-------| -| Create molecule | via `gt sling` | `bd mol spawn` | gt adds assignment | +| Create molecule | via `gt sling` | `bd pour` | gt adds assignment | | List protos | `gt mol catalog` | `bd mol catalog` | Same data | | Show molecule | `gt mol status` | `bd mol show` | gt adds agent context | | Combine | - | `bd mol bond` | Data operation only | @@ -182,26 +182,6 @@ Output: **Design principle**: `bd mol` is pure data operations. `gt sling` and `gt mol` add agent context (assignment, hooks, sessions). -## Migration Path - -### Old Commands β†’ New - -| Old | New | Notes | -|-----|-----|-------| -| `gt molecule instantiate` | `gt sling` | With assignment | -| `gt molecule attach` | `gt sling --force` | Re-sling to hook | -| `gt molecule detach` | `gt mol burn` | Or auto on complete | -| `gt molecule progress` | `gt mol status` | Better name | -| `gt molecule list` | `gt mol catalog` | Protos only | -| `gt spawn --molecule` | `gt sling` | Unified | - -### Template Updates Required - -1. **deacon.md.tmpl** - Use `gt mol status`, remove decision logic -2. **polecat.md.tmpl** - Propulsion principle, check hook on wake -3. **witness.md.tmpl** - Sling wisps to agents it spawns -4. **refinery.md.tmpl** - Accept slung epics - ## Open Design Questions 1. **Default molecule**: If you `gt sling gt-xyz polecat/alpha` without `-m`, diff --git a/docs/vision.md b/docs/vision.md index 49674835..7cb1bc3f 100644 --- a/docs/vision.md +++ b/docs/vision.md @@ -162,9 +162,9 @@ source formulas). Bond adapts to its operands: | bond | Proto | Mol | Wisp | |------|-------|-----|------| -| **Proto** | Compound Proto | Spawn + attach | Spawn wisp + attach | -| **Mol** | Spawn + attach | Link | Link | -| **Wisp** | Spawn + attach | Link | Link | +| **Proto** | Compound Proto | Pour + attach | Wisp + attach | +| **Mol** | Pour + attach | Link | Link | +| **Wisp** | Wisp + attach | Link | Link | This enables patterns like: - Patrol wisp discovers issue β†’ bonds new work mol @@ -240,7 +240,7 @@ Patrol agents run ephemeral wisps for their cycles: - Wisp starts at cycle begin - Steps complete as work progresses - Wisp squashes to digest at cycle end -- New wisp spawns for next cycle +- New wisp created for next cycle This prevents accumulation: patrol work is vapor that condenses to minimal digests, not liquid that pools forever. diff --git a/internal/beads/christmas_ornament_test.go b/internal/beads/christmas_ornament_test.go index d49bb1ba..02350ae6 100644 --- a/internal/beads/christmas_ornament_test.go +++ b/internal/beads/christmas_ornament_test.go @@ -8,7 +8,7 @@ import ( ) // TestChristmasOrnamentPattern tests the dynamic bonding pattern used by mol-witness-patrol. -// This pattern allows a parent molecule step to dynamically spawn child molecules +// This pattern allows a parent molecule step to dynamically create child molecules // at runtime, with a fanout gate (WaitsFor: all-children) for aggregation. func TestChristmasOrnamentPattern(t *testing.T) { if testing.Short() { diff --git a/internal/beads/molecules_patrol.go b/internal/beads/molecules_patrol.go index a793bb8e..8654a705 100644 --- a/internal/beads/molecules_patrol.go +++ b/internal/beads/molecules_patrol.go @@ -234,7 +234,7 @@ completion, verify clean git state before kills, and escalate stuck workers. **You do NOT do implementation work.** Your job is oversight, not coding. -This molecule uses dynamic bonding to spawn mol-polecat-arm for each worker, +This molecule uses dynamic bonding to create mol-polecat-arm for each worker, enabling parallel inspection with a fanout gate for aggregation. ## The Christmas Ornament Shape diff --git a/internal/cmd/prime.go b/internal/cmd/prime.go index 59ff9f1f..7a5c72af 100644 --- a/internal/cmd/prime.go +++ b/internal/cmd/prime.go @@ -680,7 +680,7 @@ func showMoleculeProgress(b *beads.Beads, rootID string) { // outputDeaconPatrolContext shows patrol molecule status for the Deacon. // Deacon uses wisps (Wisp:true issues in main .beads/) for patrol cycles. -// Spawn creates wisp-marked issues that are auto-deleted on squash. +// bd wisp creates wisp-marked issues that are auto-deleted on squash. func outputDeaconPatrolContext(ctx RoleContext) { fmt.Println() fmt.Printf("%s\n\n", style.Bold.Render("## πŸ”„ Patrol Status (Wisp-based)")) @@ -732,8 +732,8 @@ func outputDeaconPatrolContext(ctx RoleContext) { } if !hasPatrol { - // No active patrol - AUTO-CREATE one - fmt.Println("Status: **No active patrol** - creating mol-deacon-patrol wisp...") + // No active patrol - AUTO-SPAWN one + fmt.Println("Status: **No active patrol** - creating mol-deacon-patrol...") fmt.Println() // Find the proto ID for mol-deacon-patrol @@ -767,7 +767,7 @@ func outputDeaconPatrolContext(ctx RoleContext) { return } - // Create the wisp + // Create the patrol wisp cmdSpawn := exec.Command("bd", "--no-daemon", "wisp", protoID, "--assignee", "deacon") cmdSpawn.Dir = rigBeadsDir var stdoutSpawn, stderrSpawn bytes.Buffer @@ -776,7 +776,7 @@ func outputDeaconPatrolContext(ctx RoleContext) { if err := cmdSpawn.Run(); err != nil { fmt.Printf("Failed to create patrol wisp: %s\n", stderrSpawn.String()) - fmt.Println(style.Dim.Render("Run manually: bd --no-daemon wisp " + protoID)) + fmt.Println(style.Dim.Render("Run manually: bd --no-daemon wisp" + protoID)) return } @@ -816,7 +816,7 @@ func outputDeaconPatrolContext(ctx RoleContext) { fmt.Println("5. At cycle end (loop-or-exit step):") fmt.Println(" - Generate summary of patrol cycle") fmt.Println(" - Squash: `bd --no-daemon mol squash --summary \"\"`") - fmt.Println(" - Loop back to spawn new wisp, or exit if context high") + fmt.Println(" - Loop back to create new wisp, or exit if context high") if patrolID != "" { fmt.Println() fmt.Printf("Current patrol ID: %s\n", patrolID) @@ -898,8 +898,8 @@ func outputWitnessPatrolContext(ctx RoleContext) { } if !hasPatrol { - // No active patrol - AUTO-CREATE one - fmt.Println("Status: **No active patrol** - creating mol-witness-patrol wisp...") + // No active patrol - AUTO-SPAWN one + fmt.Println("Status: **No active patrol** - creating mol-witness-patrol...") fmt.Println() // Find the proto ID for mol-witness-patrol @@ -933,7 +933,7 @@ func outputWitnessPatrolContext(ctx RoleContext) { return } - // Create the wisp + // Create the patrol wisp cmdSpawn := exec.Command("bd", "--no-daemon", "wisp", protoID, "--assignee", ctx.Rig+"/witness") cmdSpawn.Dir = witnessBeadsDir var stdoutSpawn, stderrSpawn bytes.Buffer @@ -942,7 +942,7 @@ func outputWitnessPatrolContext(ctx RoleContext) { if err := cmdSpawn.Run(); err != nil { fmt.Printf("Failed to create patrol wisp: %s\n", stderrSpawn.String()) - fmt.Println(style.Dim.Render("Run manually: bd --no-daemon wisp " + protoID)) + fmt.Println(style.Dim.Render("Run manually: bd --no-daemon wisp" + protoID)) return } @@ -982,7 +982,7 @@ func outputWitnessPatrolContext(ctx RoleContext) { fmt.Println("6. At cycle end (burn-or-loop step):") fmt.Println(" - Generate summary of patrol cycle") fmt.Println(" - Squash: `bd --no-daemon mol squash --summary \"\"`") - fmt.Println(" - Loop back to spawn new wisp, or exit if context high") + fmt.Println(" - Loop back to create new wisp, or exit if context high") if patrolID != "" { fmt.Println() fmt.Printf("Current patrol ID: %s\n", patrolID) @@ -1064,8 +1064,8 @@ func outputRefineryPatrolContext(ctx RoleContext) { } if !hasPatrol { - // No active patrol - AUTO-CREATE one - fmt.Println("Status: **No active patrol** - creating mol-refinery-patrol wisp...") + // No active patrol - AUTO-SPAWN one + fmt.Println("Status: **No active patrol** - creating mol-refinery-patrol...") fmt.Println() // Find the proto ID for mol-refinery-patrol @@ -1099,7 +1099,7 @@ func outputRefineryPatrolContext(ctx RoleContext) { return } - // Create the wisp + // Create the patrol wisp cmdSpawn := exec.Command("bd", "--no-daemon", "wisp", protoID, "--assignee", ctx.Rig+"/refinery") cmdSpawn.Dir = refineryBeadsDir var stdoutSpawn, stderrSpawn bytes.Buffer @@ -1108,7 +1108,7 @@ func outputRefineryPatrolContext(ctx RoleContext) { if err := cmdSpawn.Run(); err != nil { fmt.Printf("Failed to create patrol wisp: %s\n", stderrSpawn.String()) - fmt.Println(style.Dim.Render("Run manually: bd --no-daemon wisp " + protoID)) + fmt.Println(style.Dim.Render("Run manually: bd --no-daemon wisp" + protoID)) return } @@ -1148,7 +1148,7 @@ func outputRefineryPatrolContext(ctx RoleContext) { fmt.Println("6. At cycle end (burn-or-loop step):") fmt.Println(" - Generate summary of patrol cycle") fmt.Println(" - Squash: `bd --no-daemon mol squash --summary \"\"`") - fmt.Println(" - Loop back to spawn new wisp, or exit if context high") + fmt.Println(" - Loop back to create new wisp, or exit if context high") if patrolID != "" { fmt.Println() fmt.Printf("Current patrol ID: %s\n", patrolID) diff --git a/internal/cmd/sling.go b/internal/cmd/sling.go index 90fa2261..ef7d698e 100644 --- a/internal/cmd/sling.go +++ b/internal/cmd/sling.go @@ -50,7 +50,7 @@ SLING MECHANICS: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ THING │─────▢│ SLING PIPELINE β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ - proto β”‚ 1. SPAWN Proto β†’ Molecule instance β”‚ + proto β”‚ 1. POUR Proto β†’ Molecule instance β”‚ issue β”‚ 2. ASSIGN Molecule β†’ Target agent β”‚ epic β”‚ 3. PIN Work β†’ Agent's hook β”‚ β”‚ 4. IGNITE Session starts automatically β”‚ @@ -525,8 +525,8 @@ func slingToPolecat(townRoot string, target *SlingTarget, thing *SlingThing) err switch thing.Kind { case "proto": - // Spawn molecule from proto - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, polecatAddress) + // Pour molecule from proto + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, polecatAddress) if err != nil { return err } @@ -535,7 +535,7 @@ func slingToPolecat(townRoot string, target *SlingTarget, thing *SlingThing) err issueID = thing.ID if thing.Proto != "" { // Sling issue with molecule workflow - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, polecatAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, polecatAddress) if err != nil { return err } @@ -679,7 +679,7 @@ func slingToDeacon(townRoot string, target *SlingTarget, thing *SlingThing) erro ID: patrolIssueID, // Use the resolved beads issue ID IsWisp: true, // Patrol cycles are ephemeral (gt-jsup) } - patrolID, _, err = spawnMoleculeFromProto(beadsPath, patrolThing, deaconAddress) + patrolID, _, err = pourMoleculeFromProto(beadsPath, patrolThing, deaconAddress) if err != nil { return fmt.Errorf("starting patrol: %w", err) } @@ -699,17 +699,17 @@ func slingToDeacon(townRoot string, target *SlingTarget, thing *SlingThing) erro var beadsIssue *BeadsIssue issueID := thing.ID - // For protos, we need to spawn the molecule but NOT pin it + // For protos, we need to pour the molecule but NOT pin it var moleculeCtx *MoleculeContext var err error if thing.Kind == "proto" { - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, deaconAddress) + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, deaconAddress) if err != nil { return err } } else if thing.Kind == "issue" { if thing.Proto != "" { - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, deaconAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, deaconAddress) if err != nil { return err } @@ -788,14 +788,14 @@ func slingToCrew(townRoot string, target *SlingTarget, thing *SlingThing) error switch thing.Kind { case "proto": - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, crewAddress) + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, crewAddress) if err != nil { return err } case "issue": issueID = thing.ID if thing.Proto != "" { - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, crewAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, crewAddress) if err != nil { return err } @@ -882,7 +882,7 @@ func slingToWitness(townRoot string, target *SlingTarget, thing *SlingThing) err ID: patrolIssueID, // Use the resolved beads issue ID IsWisp: true, // Patrol cycles are ephemeral (gt-jsup) } - patrolID, _, err = spawnMoleculeFromProto(beadsPath, patrolThing, witnessAddress) + patrolID, _, err = pourMoleculeFromProto(beadsPath, patrolThing, witnessAddress) if err != nil { return fmt.Errorf("starting patrol: %w", err) } @@ -902,17 +902,17 @@ func slingToWitness(townRoot string, target *SlingTarget, thing *SlingThing) err var beadsIssue *BeadsIssue issueID := thing.ID - // For protos, we need to spawn the molecule but NOT pin it + // For protos, we need to pour the molecule but NOT pin it var moleculeCtx *MoleculeContext var err error if thing.Kind == "proto" { - // Spawn molecule without pinning - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, witnessAddress) + // Pour molecule without pinning + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, witnessAddress) if err != nil { return err } } else if thing.Kind == "issue" && thing.Proto != "" { - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, witnessAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, witnessAddress) if err != nil { return err } @@ -980,14 +980,14 @@ func slingToPatrolWithReplace(townRoot, beadsPath, agentAddress string, thing *S switch thing.Kind { case "proto": - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, agentAddress) + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, agentAddress) if err != nil { return err } case "issue": issueID = thing.ID if thing.Proto != "" { - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, agentAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, agentAddress) if err != nil { return err } @@ -1049,7 +1049,7 @@ func slingToRefinery(townRoot string, target *SlingTarget, thing *SlingThing) er ID: patrolIssueID, // Use the resolved beads issue ID IsWisp: true, // Patrol cycles are ephemeral (gt-jsup) } - patrolID, _, err = spawnMoleculeFromProto(beadsPath, patrolThing, refineryAddress) + patrolID, _, err = pourMoleculeFromProto(beadsPath, patrolThing, refineryAddress) if err != nil { return fmt.Errorf("starting patrol: %w", err) } @@ -1069,16 +1069,16 @@ func slingToRefinery(townRoot string, target *SlingTarget, thing *SlingThing) er var beadsIssue *BeadsIssue issueID := thing.ID - // For protos, we need to spawn the molecule but NOT pin it + // For protos, we need to pour the molecule but NOT pin it var moleculeCtx *MoleculeContext var err error if thing.Kind == "proto" { - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, refineryAddress) + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, refineryAddress) if err != nil { return err } } else if thing.Kind == "issue" && thing.Proto != "" { - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, refineryAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, refineryAddress) if err != nil { return err } @@ -1151,14 +1151,14 @@ func slingToMayor(townRoot string, target *SlingTarget, thing *SlingThing) error switch thing.Kind { case "proto": - issueID, moleculeCtx, err = spawnMoleculeFromProto(beadsPath, thing, mayorAddress) + issueID, moleculeCtx, err = pourMoleculeFromProto(beadsPath, thing, mayorAddress) if err != nil { return err } case "issue": issueID = thing.ID if thing.Proto != "" { - issueID, moleculeCtx, err = spawnMoleculeOnIssue(beadsPath, thing, mayorAddress) + issueID, moleculeCtx, err = runMoleculeOnIssue(beadsPath, thing, mayorAddress) if err != nil { return err } @@ -1209,15 +1209,15 @@ func slingToMayor(townRoot string, target *SlingTarget, thing *SlingThing) error return nil } -// spawnMoleculeFromProto spawns a molecule from a proto template. -func spawnMoleculeFromProto(beadsPath string, thing *SlingThing, assignee string) (string, *MoleculeContext, error) { +// pourMoleculeFromProto creates a molecule from a proto template. +func pourMoleculeFromProto(beadsPath string, thing *SlingThing, assignee string) (string, *MoleculeContext, error) { moleculeType := "molecule" if thing.IsWisp { moleculeType = "wisp" } - fmt.Printf("Spawning %s from proto %s...\n", moleculeType, thing.ID) + fmt.Printf("Creating %s from proto %s...\n", moleculeType, thing.ID) - // Use bd mol run to spawn the molecule + // Use bd mol run to create the molecule args := []string{"--no-daemon", "mol", "run", thing.ID, "--json"} if assignee != "" { args = append(args, "--var", "assignee="+assignee) @@ -1266,7 +1266,7 @@ func spawnMoleculeFromProto(beadsPath string, thing *SlingThing, assignee string return "", nil, fmt.Errorf("parsing molecule result: %w", err) } - fmt.Printf("%s %s spawned: %s (%d steps)\n", + fmt.Printf("%s %s created: %s (%d steps)\n", style.Bold.Render("βœ“"), moleculeType, molResult.RootID, molResult.Created-1) moleculeCtx := &MoleculeContext{ @@ -1280,8 +1280,8 @@ func spawnMoleculeFromProto(beadsPath string, thing *SlingThing, assignee string return molResult.RootID, moleculeCtx, nil } -// spawnMoleculeOnIssue spawns a molecule workflow on an existing issue. -func spawnMoleculeOnIssue(beadsPath string, thing *SlingThing, assignee string) (string, *MoleculeContext, error) { +// runMoleculeOnIssue runs a molecule workflow on an existing issue. +func runMoleculeOnIssue(beadsPath string, thing *SlingThing, assignee string) (string, *MoleculeContext, error) { fmt.Printf("Running molecule %s on issue %s...\n", thing.Proto, thing.ID) args := []string{"--no-daemon", "mol", "run", thing.Proto, diff --git a/internal/cmd/spawn.go b/internal/cmd/spawn.go index 08f5e791..05d828c8 100644 --- a/internal/cmd/spawn.go +++ b/internal/cmd/spawn.go @@ -250,7 +250,7 @@ func runSpawn(cmd *cobra.Command, args []string) error { // Handle molecule instantiation if specified if spawnMolecule != "" { - // Use bd mol run to spawn the molecule - this handles everything: + // Use bd mol run to create the molecule - this handles everything: // - Creates child issues from proto template // - Assigns root to polecat // - Sets root status to in_progress @@ -285,7 +285,7 @@ func runSpawn(cmd *cobra.Command, args []string) error { return fmt.Errorf("parsing molecule result: %w", err) } - fmt.Printf("%s Molecule spawned: %s (%d steps)\n", + fmt.Printf("%s Molecule created: %s (%d steps)\n", style.Bold.Render("βœ“"), molResult.RootID, molResult.Created-1) // -1 for root // Build molecule context for work assignment @@ -616,7 +616,7 @@ func buildSpawnContext(issue *BeadsIssue, message string) string { // MoleculeContext contains information about a molecule workflow assignment. type MoleculeContext struct { MoleculeID string // The molecule template ID (proto) - RootIssueID string // The spawned molecule root issue + RootIssueID string // The created molecule root issue TotalSteps int // Total number of steps in the molecule StepNumber int // Which step this is (1-indexed) IsWisp bool // True if this is a wisp (not durable mol) diff --git a/internal/templates/roles/deacon.md.tmpl b/internal/templates/roles/deacon.md.tmpl index 54efcdd2..d07c3835 100644 --- a/internal/templates/roles/deacon.md.tmpl +++ b/internal/templates/roles/deacon.md.tmpl @@ -72,7 +72,7 @@ Each patrol cycle uses a wisp: ### 1. Create a Wisp for This Cycle ```bash -# Create patrol wisp +# Create wisp for patrol cycle bd wisp mol-deacon-patrol --assignee=deacon ``` @@ -139,7 +139,7 @@ gt gc --sessions **loop-or-exit**: Decision point (see Context Management section) - Read `patrol_count` and `extraordinary_action` from state.json - If extraordinary action occurred OR patrol_count >= 20 β†’ `gt handoff` -- Otherwise β†’ increment patrol_count, squash wisp, spawn new one +- Otherwise β†’ increment patrol_count, squash wisp, create new one ### 3. Close Steps as You Work ```bash @@ -275,7 +275,7 @@ A fresh Deacon with empty context can handle emergencies better than one with 1. Read `state.json` for `patrol_count` and `extraordinary_action` 2. If `extraordinary_action == true` β†’ hand off immediately 3. If `patrol_count >= 20` β†’ hand off -4. Otherwise β†’ increment `patrol_count`, save state, spawn new wisp +4. Otherwise β†’ increment `patrol_count`, save state, create new wisp **Handoff command:** `gt handoff -s "Routine cycle" -m "Completed N patrols, no incidents"` @@ -306,7 +306,7 @@ gt mol attach-from-mail bd wisp mol-deacon-patrol --assignee=deacon ``` -**Hook has work β†’ Run it. Hook empty β†’ Check mail. Nothing anywhere β†’ Create patrol wisp.** +**Hook has work β†’ Run it. Hook empty β†’ Check mail. Nothing anywhere β†’ Create patrol.** Then execute. Print the startup banner and work through patrol steps: @@ -320,14 +320,14 @@ Then execute. Print the startup banner and work through patrol steps: **No thinking. No "should I?" questions. Hook β†’ Execute.** If you crash mid-patrol, the wisp is abandoned (no harm - wisps are ephemeral). -Fresh session spawns fresh wisp. +Fresh session creates fresh wisp. ## Handoff (Wisp-Based) For patrol work, **no handoff is needed**: - Patrol is idempotent - running it again is harmless - Wisps are ephemeral - a crashed patrol just disappears -- New session spawns a fresh wisp +- New session creates a fresh wisp If you have important context to pass along (rare for patrol), use mail: ```bash @@ -341,4 +341,4 @@ But typically just exit and let the daemon respawn you with fresh context. State directory: {{ .TownRoot }}/deacon/ Mail identity: deacon/ Session: gt-deacon -Patrol molecule: mol-deacon-patrol (wisp) +Patrol molecule: mol-deacon-patrol (created as wisp) diff --git a/internal/templates/roles/refinery.md.tmpl b/internal/templates/roles/refinery.md.tmpl index 8c3132dd..0608a9aa 100644 --- a/internal/templates/roles/refinery.md.tmpl +++ b/internal/templates/roles/refinery.md.tmpl @@ -208,7 +208,7 @@ These consume minimal context. But complex rebases are different: 1. Read `state.json` for `simple_merges` and `complex_merge` 2. If `complex_merge == true` β†’ hand off immediately 3. If `simple_merges >= 20` β†’ hand off -4. Otherwise β†’ continue patrol, spawn new wisp +4. Otherwise β†’ continue patrol, create new wisp **Rationale**: A clean rebase is a button-push. A conflict resolution fills context with diffs, decisions, and debugging. Fresh context handles the next conflict better. diff --git a/internal/templates/roles/witness.md.tmpl b/internal/templates/roles/witness.md.tmpl index 79ba2a92..7b21bf22 100644 --- a/internal/templates/roles/witness.md.tmpl +++ b/internal/templates/roles/witness.md.tmpl @@ -97,7 +97,7 @@ gt mail inbox gt mol attach-from-mail # Step 4: Still nothing? Create patrol wisp -bd wisp mol-witness-patrol --assignee={{ .RigName }}/witness +gt wisp mol-witness-patrol --assignee={{ .RigName }}/witness ``` **Hook β†’ Execute. No exceptions.** diff --git a/mayor/rig/docs/propulsion-principle.md b/mayor/rig/docs/propulsion-principle.md index 83905554..e79d952a 100644 --- a/mayor/rig/docs/propulsion-principle.md +++ b/mayor/rig/docs/propulsion-principle.md @@ -133,8 +133,8 @@ bd list --status=in_progress --assignee= # 3. If attached: resume from current step bd ready # Find next step to work on -# 4. If not attached: wait for work or spawn new molecule -# (Patrol agents bond a new patrol molecule) +# 4. If not attached: wait for work or create new molecule +# (Patrol agents create a new patrol wisp) # (Polecats wait for assignment) ```