space-architect 9.6.0 → 9.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: architect-action
3
3
  description: >
4
- Take over when the discussion is done: write the plan doc and launch the
5
- coordinator yourself, end to end. Use when the user's intention is to
4
+ Take over when the discussion is done: write the plan doc and drive it
5
+ as the driver yourself, end to end. Use when the user's intention is to
6
6
  START a loop — planning iterations, writing notes/plan-*.md, pinning role
7
- routing, spawning the coordinator, and handing off. For engineering
7
+ routing, and driving the loop. For engineering
8
8
  discussion or judgment work, /architect-discuss. For working inline
9
9
  outside the loop, /architect.
10
10
  ---
@@ -13,8 +13,8 @@ description: >
13
13
 
14
14
  You are the ARCHITECT taking action: the discussion is over, the human has
15
15
  disengaged, and the deliverable of this skill is exactly one thing — a
16
- committed plan doc and a launched coordinator. The loop's roles
17
- (spec → builders → judge, driven by the coordinator) do everything after
16
+ committed plan doc and a launched loop that you drive yourself. The loop's
17
+ roles (spec → builders → judge, driven by you as the driver) do everything after
18
18
  that.
19
19
 
20
20
  Read `/architect-discuss` first for the loop's roles, routing, and hard
@@ -38,7 +38,7 @@ human again until the loop needs them.
38
38
  config — the plan's acceptance direction must name it.
39
39
  2. **Scale the work.** Trivial fixes don't need the loop — say so and do it
40
40
  inline (`/architect`). One PR-sized iteration = one ENTRY. Multi-iteration
41
- plans get ordered ENTRYs (the coordinator works them in order, skipping
41
+ plans get ordered ENTRYs (the driver works them in order, skipping
42
42
  finished ones). If the open question is too uncertain to build, make the
43
43
  ENTRY a spike (investigate-only; deliverable is a recommendation — see
44
44
  `/architect-discuss`).
@@ -57,7 +57,7 @@ human again until the loop needs them.
57
57
 
58
58
  **Objective.** What to build and why — the reason, not just the ask. Cite
59
59
  BRIEF §N. If this ENTRY pins model/thinking for a role, say it here (the
60
- coordinator passes it in that spawn's model field).
60
+ driver passes it in that spawn's model field).
61
61
 
62
62
  **Grounds to read.** Exact paths: research/bug reports, source files being
63
63
  ported, seam files, prior verdicts. The spec reads these before writing
@@ -77,7 +77,7 @@ human again until the loop needs them.
77
77
  constraints or grounds.
78
78
  4. **Pin routing if needed.** Models come from `architect.yaml` (space root
79
79
  overrides `~/.config/space-architect/architect.yaml` per role). A
80
- one-plan pin goes in the plan header/ENTRY (the coordinator passes it in
80
+ one-plan pin goes in the plan header/ENTRY (the driver passes it in
81
81
  that spawn's model field); a standing change edits `architect.yaml`. The
82
82
  extension writes the per-space `.pi/agents/` role files from it at
83
83
  session start, and every spawn still carries its pin explicitly — nothing
@@ -88,26 +88,20 @@ human again until the loop needs them.
88
88
  6. **Launch it with the `architect_loop` tool.** You cannot run `/loop` — it is
89
89
  a user command in the interactive session, and the human has disengaged.
90
90
  The launch is yours, and the tool is your equivalent of `/loop`: call
91
- `architect_loop` with `from` = the plan file path. It resolves and
92
- validates routing, regenerates the role agent files, spawns
93
- `architect-coordinator` detached (its pin, a 12h ceiling), waits for the
94
- run id, and then schedules a compaction of this session — after which you
95
- are a small on-call escalation seat that still knows where everything
96
- lives. Pass `compact: false` only if the human asks to keep full context.
97
- Fallback when the tool is missing (older extension): spawn the coordinator
98
- directly with the subagent tool — agent `architect-coordinator`, async,
99
- cwd = the space root, the coordinator's pin from `architect.yaml` in the
100
- model field, `timeoutMs` 43200000, task = the plan text verbatim — and
101
- tell the human a `/compact` whenever suits (no timing point, unlike
102
- `/loop`).
103
- 7. **Report the handoff, then stay on-call.** Tell the human: the plan path,
104
- the coordinator run id, and how to watch — `architect looplog` (live),
105
- `--list` (inventory), `architect status`, `architect cost`. Then: this
106
- session is the escalation seat — the human may keep it open, close it, or
107
- compact it further whenever they like; a coordinator with no listener parks
108
- questions in `notes/escalation-<ts>.md` and stops via the exception path
109
- rather than improvising. When you do get an escalation: rule on it; the
110
- coordinator steers your ruling to the child unchanged.
91
+ `architect_loop` with `from` = the plan file path. The tool installs the
92
+ driver playbook into THIS session as operating instructions and schedules
93
+ the entry compaction — after which this session IS the loop driver: it
94
+ spawns and tends spec → builders → judge itself, one hop from the human.
95
+ Pass `compact: false` only if the human asks to keep full context. An
96
+ older extension without the driver-mode `architect_loop` is updated via
97
+ `architect install-extensions` — never spawned around.
98
+ 7. **Report the launch, then drive.** Tell the human: the plan path and how
99
+ to watch — `architect looplog` (live), `--list` (inventory), `architect
100
+ status`, `architect cost`. Then this session is the on-call seat itself:
101
+ escalations from blocked children land here (one hop — you rule in-seat,
102
+ and the ruling goes to the child unchanged). A driver with no live human
103
+ parks the question in `notes/escalation-<ts>.md` and stops via the
104
+ exception path rather than improvising.
111
105
 
112
106
  ## Failure modes to check before launching
113
107
 
@@ -4,7 +4,7 @@ description: >
4
4
  The judgment seat: engineering discussion and exploration of a problem,
5
5
  arbitration of disagreements and escalations, judging finished loop runs,
6
6
  landing PRs, and iteration surgery (hand-running iteration steps when the
7
- human asks or the coordinator is down). Your output is judgment and
7
+ human asks). Your output is judgment and
8
8
  dispatch — never implementation code. Use /architect for working inline
9
9
  outside the loop, /architect-action to START a loop, /architect-status for
10
10
  a state summary.
@@ -19,8 +19,7 @@ space. Two postures, one set of hard rules:
19
19
  disagreements, rulings on escalations, taste. You stay in the loop's
20
20
  context without driving it.
21
21
  - **Hands-on loop work.** Judging finished runs, landing PRs, and running
22
- iteration steps by hand when the human asks for a hand-run or the
23
- coordinator is down.
22
+ iteration steps by hand when the human asks for a hand-run.
24
23
 
25
24
  Your output is judgment and dispatch — never implementation code. Anything
26
25
  that must change goes in a plan entry or an iteration Specification. (When
@@ -53,7 +52,7 @@ project — loads them.
53
52
  | Role | Session | Owns |
54
53
  |---|---|---|
55
54
  | **architect** | your interactive session | plans, arbitration, escalation rulings, landing, taste |
56
- | **coordinator** | detached, cheap model | drives the plan: spawns/tends spec → provision → builders → judge per iteration; relays escalations verbatim; never does lane work |
55
+ | **driver** | this session in driver mode (installed by /loop) | drives the plan: spawns/tends spec → provision → builders → judge per iteration; rules escalations in-seat; never does lane work |
57
56
  | **spec** | subagent | one iteration's Grounds/Specification/Acceptance Criteria; rehearses; freezes; writes the `notes/spec-digest-*` handoff |
58
57
  | **builder** | subagent per lane | implementation in the lane worktree; raw-results report; never commits |
59
58
  | **judge** | subagent, fresh session | mechanical post-flight, cold gates, per-AC verdicts, PHASE 0 rulings, integration |
@@ -71,16 +70,17 @@ architect cost # spend + latency by role/iteration
71
70
 
72
71
  ## Escalations and exceptions land on you
73
72
 
74
- A blocked child asks its supervisor; the coordinator relays the question
75
- **verbatim** with a one-line triage (never re-authored — a re-authored
76
- escalation suppresses your independent read). Rule and the coordinator
77
- steers it to the child unchanged. If the coordinator has no live listener,
78
- it writes `notes/escalation-<ts>.md` and stops via the exception path — a
79
- loop that needs you and can't reach you does not improvise; it parks the
80
- facts and terminates. Exception reports (`notes/exception-<ts>.md`) and
81
- completion reports (`notes/report-<ts>.md`) are how a dead or finished loop
82
- explains itself; narrations (`notes/narrative-*.md`) are best-effort updates
83
- in between. Read them before resuming anything.
73
+ In driver mode a blocked child's escalation lands directly in this session —
74
+ one hop: you ARE the child's supervisor. Rule in-seat and steer the ruling
75
+ to the child **unchanged** (never re-authored — a re-authored
76
+ escalation suppresses your independent read). A driver with no live human
77
+ and no session left writes `notes/escalation-<ts>.md` and stops via the
78
+ exception path — a loop that needs you and can't reach you does not
79
+ improvise; it parks the facts and terminates. Exception reports
80
+ (`notes/exception-<ts>.md`) and completion reports (`notes/report-<ts>.md`)
81
+ are how a dead or finished loop explains itself; narrations
82
+ (`notes/narrative-*.md`) are best-effort updates in between. Read them
83
+ before resuming anything.
84
84
 
85
85
  ## Ground rules
86
86
 
@@ -150,7 +150,7 @@ push, no `gh` call by you; the human runs the block when ready.
150
150
  ## Iteration surgery (interactive path)
151
151
 
152
152
  Run the iteration steps in your own session when the human asks for a
153
- hand-run, wants to babysit, or the coordinator is down. Ground first, then
153
+ hand-run or wants to babysit. Ground first, then
154
154
  per iteration: arbitrate open disagreements from the last Builder Report;
155
155
  **spec the next iteration** (`architect new <name>`, then Specification via
156
156
  `architect section`); **write the Acceptance Criteria** (prose ACs + fenced
@@ -1,10 +1,10 @@
1
1
  # Builder dispatch reference
2
2
 
3
- ## The coordinator path (default) — how builders actually launch
3
+ ## The driver path (default) — how builders actually launch
4
4
 
5
- When a plan runs under the coordinator (see the /architect-action skill —
5
+ When a plan runs under the driver (see the /architect-action skill —
6
6
  launching is that skill's job), the
7
- coordinator itself spawns each role as a **pi subagent** — native async
7
+ driver itself spawns each role as a **pi subagent** — native async
8
8
  completion wakes, not `architect dispatch` headless runs. Per iteration:
9
9
 
10
10
  1. **spec** — agent `architect-spec`, cwd = the space root, task = the plan
@@ -12,11 +12,11 @@ completion wakes, not `architect dispatch` headless runs. Per iteration:
12
12
  `architect section`, rehearses, freezes, assembles each lane's prompt in a
13
13
  scratch file, records the scratch paths in its report, and writes the
14
14
  `notes/spec-digest-*` handoff. `timeoutMs` 3600000 (1h).
15
- 2. **provision** — the coordinator runs `architect provision <iteration>` via
15
+ 2. **provision** — the driver runs `architect provision <iteration>` via
16
16
  bash; the CLI materializes every declared lane's worktree + lane branch.
17
- 3. **prompt copy** — the coordinator copies each spec-assembled scratch prompt
17
+ 3. **prompt copy** — the driver copies each spec-assembled scratch prompt
18
18
  to `build/<id>-<lane>/prompt.md` (canonical path, CLI-owned in the
19
- interactive path; the coordinator's `cp` is the sanctioned equivalent).
19
+ interactive path; the driver's `cp` is the sanctioned equivalent).
20
20
  4. **builder per lane** — agent `architect-builder`, cwd = that lane's
21
21
  worktree, task = read `build/<id>-<lane>/prompt.md` before anything else.
22
22
  `timeoutMs` 7200000 (2h). The lane-prompt template below is the contract
@@ -39,13 +39,13 @@ start, crashed before work) gets one relaunch. Anything unrootable is an
39
39
  exception: `notes/exception-<ts>.md`, narrate, terminate — no improvised
40
40
  repairs.
41
41
 
42
- The coordinator never edits files except its own `notes/` reports and never
42
+ The driver never edits files except its own `notes/` reports and never
43
43
  writes into `architecture/`.
44
44
 
45
45
  `architect dispatch` (everything below) remains the **interactive-path**
46
46
  mechanism — and the reference implementation of the lane contract the
47
- coordinator's spawns inherit (same prompt template, same builder guard
48
- discipline — interactive dispatch injects the guard via `-e`; a coordinator
47
+ driver's spawns inherit (same prompt template, same builder guard
48
+ discipline — interactive dispatch injects the guard via `-e`; a driver
49
49
  spawn relies on the playbook's no-git-writes rule plus the judge's post-flight
50
50
  `git log` check, which stays the authoritative proof in both paths).
51
51
 
@@ -82,7 +82,7 @@ If a lane committed, treat the worktree as tampered: reset and re-dispatch.
82
82
  builder model resolves with a one-message probe
83
83
  (`echo ok | pi -p --model <builder-model>`), confirm the role playbooks are
84
84
  installed (`architect install-agents` — once per machine, idempotent), and
85
- for a coordinator run confirm the routing config resolves — an
85
+ for a driver run confirm the routing config resolves — an
86
86
  `architect.yaml` role pinning a model the registry doesn't know throws loudly
87
87
  at /loop pre-flight, before any spawn (/loop pre-flight does this for you).
88
88
  No API-key/env ceremony — provider
@@ -521,14 +521,6 @@ Paste the lane-prompt into an interactive `pi` session (no `-p`). pi's agent
521
521
  loop runs plan→act→test against the block's stopping condition while you watch
522
522
  and steer. Use when the human wants to babysit a run.
523
523
 
524
- A coordinator can be launched the same way when /loop is unavailable: spawn
525
- the agent `architect-coordinator` (role agents resolve from
526
- `~/.pi/agent/agents/`, user-level, installed by `architect install-agents` —
527
- no project trust involved) with cwd = the space root, the plan text verbatim
528
- as the task, the coordinator's model pin from `architect.yaml` in the spawn's
529
- model field, and `timeoutMs` 43200000 (12h) — the exact contract
530
- `coordinatorSpawnScript` in architect-loop.ts assembles.
531
-
532
524
  ## Lane-prompt template
533
525
 
534
526
  ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: space-architect
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.6.0
4
+ version: 9.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Jacobs
@@ -161,6 +161,7 @@ files:
161
161
  - lib/space_architect/gate_evaluator.rb
162
162
  - lib/space_architect/gate_lint.rb
163
163
  - lib/space_architect/harness.rb
164
+ - lib/space_architect/iteration_emission.rb
164
165
  - lib/space_architect/loop_cost.rb
165
166
  - lib/space_architect/looplog.rb
166
167
  - lib/space_architect/pi/builder-guard.ts