Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
d394ac4
chore(porch): 1940 init spir
waleedkadous Nov 21, 2026
d4cb7e6
[Spec 1940] Initial specification draft
waleedkadous Nov 21, 2026
5d04e81
chore(porch): 1940 specify build-complete
waleedkadous Nov 21, 2026
f1fee90
[Spec 1940] Specification with multi-agent review
waleedkadous Nov 21, 2026
a7dd470
[Spec 1940] Responses to iteration 1 reviews
waleedkadous Nov 21, 2026
2116e5a
chore(porch): 1940 spec-approval gate-requested
waleedkadous Nov 21, 2026
018203e
[Spec 1940] Specification with user feedback: owner in the address, i…
waleedkadous Nov 21, 2026
f792677
[Spec 1940] Specification after second review round
waleedkadous Nov 21, 2026
f923f43
[Spec 1940] Specification, third revision: #1605, relay attestation, …
waleedkadous Nov 21, 2026
23ad14d
[Spec 1940] Specification after third review round
waleedkadous Nov 21, 2026
c0a4fce
[Spec 1940] Final review pass: verdicts and open points (spec unchanged)
waleedkadous Nov 21, 2026
90ebb02
[Spec 1940] Apply the fifteen open points from the final review pass
waleedkadous Nov 21, 2026
2338880
[Spec 1940] Thread and open-points note: the fifteen points are applied
waleedkadous Nov 21, 2026
2f431ac
chore(porch): 1940 spec-approval gate-approved
waleedkadous Nov 23, 2026
6b53bdc
chore(porch): 1940 plan phase-transition
waleedkadous Nov 23, 2026
35eb280
[Spec 1940] Thread: spec approved by the human; entering plan (stage …
waleedkadous Nov 23, 2026
61920ea
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 23, 2026
28af9b8
[Spec 1940] Initial implementation plan
waleedkadous Nov 23, 2026
8f58c93
chore(porch): 1940 plan build-complete
waleedkadous Nov 23, 2026
5140a82
[Spec 1940] Plan with multi-agent review
waleedkadous Nov 23, 2026
7259772
chore(porch): 1940 plan-approval gate-requested
waleedkadous Nov 23, 2026
914e4c3
chore(porch): 1940 plan-approval gate-approved
waleedkadous Nov 23, 2026
19efbfa
chore(porch): 1940 implement phase-transition
waleedkadous Nov 23, 2026
9f31753
chore(porch): 1940 skip plan phase phase_7: dropped by owner at plan …
waleedkadous Nov 23, 2026
732ad01
[Spec 1940] Final approved plan: owner cut phase 7 (front-door-only) …
waleedkadous Nov 23, 2026
19eb430
[Spec 1940][Phase: phase_1] feat: Shared address contract, parser and…
waleedkadous Nov 23, 2026
12fc419
chore(porch): 1940 implement build-complete
waleedkadous Nov 23, 2026
05616e9
[Spec 1940][Phase: phase_1] fix: Owner handles start with a letter; m…
waleedkadous Nov 23, 2026
168782e
chore(porch): 1940 implement re-iter (iter 2)
waleedkadous Nov 23, 2026
f1509b2
chore(porch): 1940 implement build-complete
waleedkadous Nov 23, 2026
32ce912
[Spec 1940] Thread: intermittent tests-check failure during phase 1, …
waleedkadous Nov 23, 2026
e0a7026
chore(porch): 1940 advance plan phase → phase_2
waleedkadous Nov 23, 2026
ed9a8e7
[Spec 1940] Phase 1 review iteration 2 context
waleedkadous Nov 23, 2026
491c8e7
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 23, 2026
d6124d7
[Spec 1940][Phase: phase_2] feat: Named architects across workspaces …
waleedkadous Nov 23, 2026
2e17010
chore(porch): 1940 implement build-complete
waleedkadous Nov 23, 2026
6299f1c
[Spec 1940] Thread: second intermittent tests-check failure, phase 2,…
waleedkadous Nov 23, 2026
d106d39
[Spec 1940][Phase: phase_2] fix: Registry resolver refuses where the …
waleedkadous Nov 23, 2026
d0c76b2
[Spec 1940] Thread: phase 2 blocked on porch's tests check under mach…
waleedkadous Nov 23, 2026
2d1391c
chore(porch): 1940 record PR #1957
waleedkadous Nov 23, 2026
6df1df7
Merge origin/main into builder/spir-1940
waleedkadous Nov 23, 2026
6804f57
[Spec 1940] Thread: draft PR #1957 opened for CI, main merged in
waleedkadous Nov 23, 2026
0a4c98f
[Spec 1940] Thread: phase 2 recorded, local tests check skipped under…
waleedkadous Nov 23, 2026
cc09ad6
chore(porch): 1940 implement re-iter (iter 2)
waleedkadous Nov 23, 2026
3306a1d
chore(porch): 1940 implement build-complete
waleedkadous Nov 23, 2026
9dd5eeb
[Spec 1940] Phase 2 review iteration 2 context
waleedkadous Nov 23, 2026
66ea5c7
[Spec 1940][Phase: phase_2] fix: Architects are listed in registratio…
waleedkadous Nov 23, 2026
23afe0d
chore(porch): 1940 implement re-iter (iter 3)
waleedkadous Nov 23, 2026
6129dd8
chore(porch): 1940 implement build-complete
waleedkadous Nov 23, 2026
a65050a
[Spec 1940] Phase 2 review iteration 3 context; thread notes for revi…
waleedkadous Nov 23, 2026
0097a42
chore(porch): 1940 advance plan phase → phase_3
waleedkadous Nov 23, 2026
505d00a
[Spec 1940] Thread: phase 2 complete; shellper leak in the latency te…
waleedkadous Nov 23, 2026
1f85bd1
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 23, 2026
9725f56
[Spec 1940][Phase: phase_3] fix: latency test deactivates its workspa…
waleedkadous Nov 23, 2026
0a553e8
[Spec 1940][Phase: phase_3] feat: explicit workspace address names
waleedkadous Nov 23, 2026
b6c5b32
[Spec 1940] Thread: phase 3 built; porch tests check failed under loa…
waleedkadous Nov 23, 2026
da71dac
chore(porch): 1940 implement build-complete
waleedkadous Nov 23, 2026
410f6fb
[Spec 1940][Phase: phase_3] fix: review iteration 1
waleedkadous Nov 23, 2026
f0778b5
[Spec 1940] Phase 3 iteration 1 rebuttal; thread log
waleedkadous Nov 23, 2026
344e974
[Spec 1940][Phase: phase_3] fix: refuse a workspace name that cannot …
waleedkadous Nov 24, 2026
18a9c86
[Spec 1940] Phase 3 iteration 1 rebuttal: address-fit rule; thread log
waleedkadous Nov 24, 2026
e1567ab
chore(porch): 1940 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
4844812
chore(porch): 1940 implement build-complete
waleedkadous Nov 24, 2026
1954ebb
[Spec 1940] Phase 3 iteration 2 review context
waleedkadous Nov 24, 2026
0763ae1
[Spec 1940][Phase: phase_3] fix: review iteration 2
waleedkadous Nov 24, 2026
4c9d9c9
[Spec 1940] Phase 3 iteration 2 rebuttal; thread log
waleedkadous Nov 24, 2026
c535735
chore(porch): 1940 implement re-iter (iter 3)
waleedkadous Nov 24, 2026
9156077
chore(porch): 1940 implement build-complete
waleedkadous Nov 24, 2026
029291d
[Spec 1940] Phase 3 iteration 3 review context; thread log
waleedkadous Nov 24, 2026
60146ee
chore(porch): 1940 advance plan phase → phase_4
waleedkadous Nov 24, 2026
1cbb1f2
[Spec 1940] Thread: phase 3 complete; notes carried to later phases a…
waleedkadous Nov 24, 2026
a3f14de
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 24, 2026
39bfd1f
[Spec 1940][Phase: phase_4] test: record the frames this phase must n…
waleedkadous Nov 24, 2026
ba33ee3
[Spec 1940][Phase: phase_4] feat: Qualified provenance and reply comm…
waleedkadous Nov 24, 2026
022f174
chore(porch): 1940 implement build-complete
waleedkadous Nov 24, 2026
e723236
[Spec 1940] Thread: phase 4 build recorded; the architect's answers f…
waleedkadous Nov 24, 2026
ce4bfb7
chore(porch): 1940 advance plan phase → phase_5
waleedkadous Nov 24, 2026
490169c
[Spec 1940] Thread: phase 4 complete; notes carried to phase 5 and th…
waleedkadous Nov 24, 2026
8df2c3d
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 24, 2026
47aedc3
[Spec 1940][Phase: phase_5] refactor: Resolve the front door only whe…
waleedkadous Nov 24, 2026
7afa81e
[Spec 1940][Phase: phase_5] feat: Workspace list and whoami print add…
waleedkadous Nov 24, 2026
f3ed3d4
[Spec 1940] Thread: phase 5 built; the listing, whoami and the real-T…
waleedkadous Nov 24, 2026
d6ac4a2
[Spec 1940][Phase: phase_5] test: Keep the listing test's made-up pat…
waleedkadous Nov 24, 2026
6462b25
[Spec 1940] Thread: phase 5 red run on the /tmp residue check, fixed
waleedkadous Nov 24, 2026
ec93f91
chore(porch): 1940 implement build-complete
waleedkadous Nov 24, 2026
b549c05
[Spec 1940] Thread: phase 5 build recorded; the architect's answers a…
waleedkadous Nov 24, 2026
27f497f
chore(porch): 1940 advance plan phase → phase_6
waleedkadous Nov 24, 2026
17c47cd
[Spec 1940] Thread: phase 5 complete; notes carried to phase 6 and th…
waleedkadous Nov 24, 2026
bd561dd
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 24, 2026
ea18056
[Spec 1940][Phase: phase_6] fix: say what an older Tower means in wor…
waleedkadous Nov 24, 2026
6649d85
[Spec 1940][Phase: phase_6] fix: afx send says so when an older Tower…
waleedkadous Nov 24, 2026
d5f798e
[Spec 1940][Phase: phase_6] docs: the stage 1 address forms, workspac…
waleedkadous Nov 24, 2026
fd37af5
[Spec 1940][Phase: phase_6] test: the headline path end to end on a r…
waleedkadous Nov 24, 2026
302d738
[Spec 1940][Phase: phase_6] test: seed the route tests' workspaces un…
waleedkadous Nov 24, 2026
ef6d516
[Spec 1940] Thread: phase 6 build, the latency verdict, the Windows f…
waleedkadous Nov 24, 2026
19dd055
chore(porch): 1940 implement build-complete
waleedkadous Nov 24, 2026
e05d040
[Spec 1940] Thread: phase 6 on GitHub; the architect's word for porch…
waleedkadous Nov 24, 2026
ea6c536
chore(porch): 1940 all plan phases complete → review
waleedkadous Nov 24, 2026
003de88
[Spec 1940] Thread: phase 6 reviewed (both approve); the architect-co…
waleedkadous Nov 24, 2026
9a2a983
chore(porch): 1940 acknowledge context refresh
waleedkadous Nov 24, 2026
2e774e5
[Spec 1940] Review: what was built, what was left, the scenario-to-te…
waleedkadous Nov 24, 2026
cc16082
chore(porch): 1940 review build-complete
waleedkadous Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 65 additions & 7 deletions .claude/skills/afx/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,39 @@ it is persisted and will deliver; a resend arrives twice.
|------|-----------|
| `afx send spir-585 "…"` | Builder `spir-585`. A bare `585` also works when exactly one builder id ends in it; leading zeros are ignored. |
| `afx send architect "…"` | From a builder: its spawning architect. From an architect: the `main` architect (else first registered). |
| `afx send architect:<name> "…"` | A specific named architect (sibling-architect messaging). Architects can address any architect; a builder may only use its own `spawnedByArchitect`. |
| `afx send <workspace>:architect "…"` | The architect in **another workspace** (cross-workspace). |
| `afx send architect:<name> "…"` | A specific named architect in your own workspace (sibling-architect messaging). Architects can address any architect; a builder may only use its own `spawnedByArchitect`. |
| `afx send <workspace>:architect "…"` | The **front door** of another workspace: its `main` architect, else the first registered. Any sender, builders included. |
| `afx send <workspace>:architect:<name> "…"` | A named architect in **another workspace** on this Tower. Architects and humans only: a builder is refused, and the error names the front door to use instead. |
| `afx send <workspace>:<builder-id> "…"` | A builder in another workspace. |

```bash
afx send architect:ob-refine "PR-iter-2 feedback ready" # sibling architect, same workspace
afx send taqwabench:architect "use porch.checks, don't fork protocol.json" # cross-workspace
afx send taqwabench:architect "use porch.checks, don't fork protocol.json" # another workspace's front door
afx send codev-cloud:architect:tunnel "relay endpoint is on staging" # a named architect in another workspace
```

**Find the exact workspace name first** — guessing fails with `NOT_FOUND`. The name is the basename of the workspace path, which can differ from how someone refers to it. List active workspaces via the Tower API:
**Find the address first: `afx workspace list`** — guessing fails with `NOT_FOUND`. It prints every
workspace on this Tower with its agents, each as an address ready to paste (see `afx workspace`
below). `<workspace>` is the workspace's directory name, or the name it was given with
`afx workspace name`. A named architect that is not registered fails, listing the workspace's
architects and its front door; nothing is rerouted. Mail to a registered architect with no live
terminal is held (`no-live-pty`), like any other.

```bash
curl -s http://localhost:4100/api/workspaces | python3 -m json.tool # → each .name is a valid <workspace> address
**Replying to another workspace.** A message from another workspace names its sender by full
address, and its last line is the command that answers it. Run it as printed:

```
### [ARCHITECT codev:architect:review MESSAGE → tunnel | <time>] ###
hello
############################### (reply: afx send codev:architect:review "…")
```

| Last line | Meaning |
|-----------|---------|
| `(reply: afx send <address> "…")` | The command that reaches the sender. A builder written to by an architect in another workspace is given that workspace's front door, and only when the front door reaches that architect. |
| `(reply through your architect: afx send architect "…")` | To a builder, when the front door would not reach the architect that wrote: ask your own architect to pass the answer on. |
| `(no reply address; the sender's workspace needs: afx workspace name <name>)` | The sender's workspace has no usable address name yet. |

## afx interrupt

Sends an ESC keystroke to a builder's PTY — the only thing that reaches it **mid-turn**.
Expand Down Expand Up @@ -238,7 +257,7 @@ Each builder row shows its live porch **Phase** and the **Gate** it waits at wit
## afx whoami

```bash
afx whoami # Report this terminal's identity (workspace, type, name)
afx whoami # Report this terminal's identity (workspace, type, name) and its address
afx whoami --json # Same, as a single JSON object
```

Expand All @@ -248,6 +267,11 @@ with an explanation when identity cannot be determined — it never guesses and
never defaults to `main` (issue #1094). Builders also get an `architect:`
field naming their spawning architect when recorded. Works without Tower.

The last line, `address:`, is this terminal's own address as another workspace on this Tower
types it (`codev:architect:review`, `codev:builder-spir-42`); `address` in `--json`. When there is
none it reads `address: none (<why, with the remedy>)` (`addressUnavailable` in `--json`): identity
and exit code are unaffected.

## afx tower

```bash
Expand Down Expand Up @@ -304,8 +328,42 @@ afx workspace stop # Stop workspace processes
afx workspace add-architect --name <name> # Add a named sibling architect terminal
afx workspace remove-architect <name> # Remove a sibling architect (cannot remove main)
afx workspace recover # Revive builders whose shellper died (e.g. after reboot)
afx workspace list [--json] # Every workspace on this Tower and its agents, as addresses
afx workspace name <name> # Give the current workspace an explicit address name
afx workspace name --clear # Remove it: addressed by its directory name again
```

**`afx workspace list`** is how to find an address for `afx send`. One block per workspace, one
address a line:

```
$ afx workspace list
codev /Users/ana/dev/codev
codev:architect:main live
codev:architect:review live
codev:builder-spir-1940 live
codev-cloud /Users/ana/dev/codev-cloud
codev-cloud:architect:main live
codev-cloud:architect:tunnel no live terminal
```

A line that is only an address and `live` / `no live terminal` is ready to paste; mail to an
agent with no live terminal is held until it has one. The listing is for the caller: an agent
you may not name carries `reach through <address>` (for a builder, another workspace's front
door). A workspace that is not running is listed with no agents. A workspace shown as
`(no address name)` says why on the next line, with the command that fixes it.

**`afx workspace name <name>`** sets the name other workspaces write before the colon. It is the
remedy when two workspaces share a directory name (neither can be addressed until one is named)
or when a directory name cannot be written in an address. Letters, digits, `.`, `_` and `-`,
starting with a letter or digit, stored lower-cased; `architect`, `arch` and `builder` are
reserved; a name another workspace already answers to is refused. Run it from the workspace to name (from a
builder worktree it names the builder's workspace).

These (`workspace list`, `workspace name`, the `address:` line of `whoami`, and
`afx send <workspace>:architect:<name>`) need a Tower of this version. Right after an upgrade the
running Tower is the old one: each says so, and `afx tower stop && afx tower start` fixes it.

**Recreating a dead architect** (its process died while Tower kept the registration):
re-add it under the SAME name, then re-init its identity:

Expand Down
72 changes: 65 additions & 7 deletions .codex/skills/afx/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,39 @@ it is persisted and will deliver; a resend arrives twice.
|------|-----------|
| `afx send spir-585 "…"` | Builder `spir-585`. A bare `585` also works when exactly one builder id ends in it; leading zeros are ignored. |
| `afx send architect "…"` | From a builder: its spawning architect. From an architect: the `main` architect (else first registered). |
| `afx send architect:<name> "…"` | A specific named architect (sibling-architect messaging). Architects can address any architect; a builder may only use its own `spawnedByArchitect`. |
| `afx send <workspace>:architect "…"` | The architect in **another workspace** (cross-workspace). |
| `afx send architect:<name> "…"` | A specific named architect in your own workspace (sibling-architect messaging). Architects can address any architect; a builder may only use its own `spawnedByArchitect`. |
| `afx send <workspace>:architect "…"` | The **front door** of another workspace: its `main` architect, else the first registered. Any sender, builders included. |
| `afx send <workspace>:architect:<name> "…"` | A named architect in **another workspace** on this Tower. Architects and humans only: a builder is refused, and the error names the front door to use instead. |
| `afx send <workspace>:<builder-id> "…"` | A builder in another workspace. |

```bash
afx send architect:ob-refine "PR-iter-2 feedback ready" # sibling architect, same workspace
afx send taqwabench:architect "use porch.checks, don't fork protocol.json" # cross-workspace
afx send taqwabench:architect "use porch.checks, don't fork protocol.json" # another workspace's front door
afx send codev-cloud:architect:tunnel "relay endpoint is on staging" # a named architect in another workspace
```

**Find the exact workspace name first** — guessing fails with `NOT_FOUND`. The name is the basename of the workspace path, which can differ from how someone refers to it. List active workspaces via the Tower API:
**Find the address first: `afx workspace list`** — guessing fails with `NOT_FOUND`. It prints every
workspace on this Tower with its agents, each as an address ready to paste (see `afx workspace`
below). `<workspace>` is the workspace's directory name, or the name it was given with
`afx workspace name`. A named architect that is not registered fails, listing the workspace's
architects and its front door; nothing is rerouted. Mail to a registered architect with no live
terminal is held (`no-live-pty`), like any other.

```bash
curl -s http://localhost:4100/api/workspaces | python3 -m json.tool # → each .name is a valid <workspace> address
**Replying to another workspace.** A message from another workspace names its sender by full
address, and its last line is the command that answers it. Run it as printed:

```
### [ARCHITECT codev:architect:review MESSAGE → tunnel | <time>] ###
hello
############################### (reply: afx send codev:architect:review "…")
```

| Last line | Meaning |
|-----------|---------|
| `(reply: afx send <address> "…")` | The command that reaches the sender. A builder written to by an architect in another workspace is given that workspace's front door, and only when the front door reaches that architect. |
| `(reply through your architect: afx send architect "…")` | To a builder, when the front door would not reach the architect that wrote: ask your own architect to pass the answer on. |
| `(no reply address; the sender's workspace needs: afx workspace name <name>)` | The sender's workspace has no usable address name yet. |

## afx interrupt

Sends an ESC keystroke to a builder's PTY — the only thing that reaches it **mid-turn**.
Expand Down Expand Up @@ -238,7 +257,7 @@ Each builder row shows its live porch **Phase** and the **Gate** it waits at wit
## afx whoami

```bash
afx whoami # Report this terminal's identity (workspace, type, name)
afx whoami # Report this terminal's identity (workspace, type, name) and its address
afx whoami --json # Same, as a single JSON object
```

Expand All @@ -248,6 +267,11 @@ with an explanation when identity cannot be determined — it never guesses and
never defaults to `main` (issue #1094). Builders also get an `architect:`
field naming their spawning architect when recorded. Works without Tower.

The last line, `address:`, is this terminal's own address as another workspace on this Tower
types it (`codev:architect:review`, `codev:builder-spir-42`); `address` in `--json`. When there is
none it reads `address: none (<why, with the remedy>)` (`addressUnavailable` in `--json`): identity
and exit code are unaffected.

## afx tower

```bash
Expand Down Expand Up @@ -304,8 +328,42 @@ afx workspace stop # Stop workspace processes
afx workspace add-architect --name <name> # Add a named sibling architect terminal
afx workspace remove-architect <name> # Remove a sibling architect (cannot remove main)
afx workspace recover # Revive builders whose shellper died (e.g. after reboot)
afx workspace list [--json] # Every workspace on this Tower and its agents, as addresses
afx workspace name <name> # Give the current workspace an explicit address name
afx workspace name --clear # Remove it: addressed by its directory name again
```

**`afx workspace list`** is how to find an address for `afx send`. One block per workspace, one
address a line:

```
$ afx workspace list
codev /Users/ana/dev/codev
codev:architect:main live
codev:architect:review live
codev:builder-spir-1940 live
codev-cloud /Users/ana/dev/codev-cloud
codev-cloud:architect:main live
codev-cloud:architect:tunnel no live terminal
```

A line that is only an address and `live` / `no live terminal` is ready to paste; mail to an
agent with no live terminal is held until it has one. The listing is for the caller: an agent
you may not name carries `reach through <address>` (for a builder, another workspace's front
door). A workspace that is not running is listed with no agents. A workspace shown as
`(no address name)` says why on the next line, with the command that fixes it.

**`afx workspace name <name>`** sets the name other workspaces write before the colon. It is the
remedy when two workspaces share a directory name (neither can be addressed until one is named)
or when a directory name cannot be written in an address. Letters, digits, `.`, `_` and `-`,
starting with a letter or digit, stored lower-cased; `architect`, `arch` and `builder` are
reserved; a name another workspace already answers to is refused. Run it from the workspace to name (from a
builder worktree it names the builder's workspace).

These (`workspace list`, `workspace name`, the `address:` line of `whoami`, and
`afx send <workspace>:architect:<name>`) need a Tower of this version. Right after an upgrade the
running Tower is the old one: each says so, and `afx tower stop && afx tower start` fixes it.

**Recreating a dead architect** (its process died while Tower kept the registration):
re-add it under the SAME name, then re-init its identity:

Expand Down
16 changes: 14 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,20 @@ Agents message each other with `afx send`:
|---|---|
| `afx send <builder-id> "…"` | A specific builder |
| `afx send architect "…"` | From a builder: its spawning architect. From anyone else: the architect named `main`, else the first registered |
| `afx send architect:<name> "…"` | A named architect. Architects may address any architect; a **builder may only use this for its own spawning architect** — mismatches are rejected as spoofing |
| `afx send <workspace>:architect "…"` | Cross-workspace |
| `afx send architect:<name> "…"` | A named architect in your own workspace. Architects may address any architect; a **builder may only use this for its own spawning architect** — mismatches are rejected as spoofing |
| `afx send <workspace>:architect "…"` | Another workspace's **front door**: its `main` architect, else the first registered. Open to every sender, builders included |
| `afx send <workspace>:architect:<name> "…"` | A named architect in another workspace on this Tower. Architects and humans may name any architect; a **builder is refused** and told the front door to use instead |
| `afx send <workspace>:<builder-id> "…"` | A builder in another workspace |

**Find an address with `afx workspace list`** rather than guessing one: it prints every workspace
on this Tower and its agents as addresses ready to paste, marked for what *you* may send to.
`afx whoami` prints your own address. `<workspace>` is the workspace's directory name unless it
was given another with `afx workspace name <name>`, which is also the remedy when two workspaces
share a directory name.

A message from another workspace names its sender by full address in the header and carries the
command that answers it on its last line (`reply: afx send codev:architect:review "…"`). Use that
command as printed.

`afx send` requires the workspace active in Tower (`afx workspace start`).

Expand Down
16 changes: 14 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,20 @@ Agents message each other with `afx send`:
|---|---|
| `afx send <builder-id> "…"` | A specific builder |
| `afx send architect "…"` | From a builder: its spawning architect. From anyone else: the architect named `main`, else the first registered |
| `afx send architect:<name> "…"` | A named architect. Architects may address any architect; a **builder may only use this for its own spawning architect** — mismatches are rejected as spoofing |
| `afx send <workspace>:architect "…"` | Cross-workspace |
| `afx send architect:<name> "…"` | A named architect in your own workspace. Architects may address any architect; a **builder may only use this for its own spawning architect** — mismatches are rejected as spoofing |
| `afx send <workspace>:architect "…"` | Another workspace's **front door**: its `main` architect, else the first registered. Open to every sender, builders included |
| `afx send <workspace>:architect:<name> "…"` | A named architect in another workspace on this Tower. Architects and humans may name any architect; a **builder is refused** and told the front door to use instead |
| `afx send <workspace>:<builder-id> "…"` | A builder in another workspace |

**Find an address with `afx workspace list`** rather than guessing one: it prints every workspace
on this Tower and its agents as addresses ready to paste, marked for what *you* may send to.
`afx whoami` prints your own address. `<workspace>` is the workspace's directory name unless it
was given another with `afx workspace name <name>`, which is also the remedy when two workspaces
share a directory name.

A message from another workspace names its sender by full address in the header and carries the
command that answers it on its last line (`reply: afx send codev:architect:review "…"`). Use that
command as printed.

`afx send` requires the workspace active in Tower (`afx workspace start`).

Expand Down
48 changes: 48 additions & 0 deletions apps/vscode/src/__tests__/address-conformance.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Address conformance (Spec 1940, phase 1): the VS Code extension reads and writes addresses through its own
* import of `@cluesmith/codev-sdk/address`, against the one shared table in
* `packages/types/fixtures/address-cases.json`. The SDK's own `address.test.ts` and the
* other consumer run the same table, so the CLI, Tower and the VS Code extension cannot
* disagree about what an address means.
*/

import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import type { AgentAddress, AddressReader, AddressParseErrorCode } from '@cluesmith/codev-types';
import { completeAddress, formatAddress, parseAddress } from '@cluesmith/codev-sdk/address';

interface ParseCase { note: string; input: string; address?: AgentAddress; error?: AddressParseErrorCode }
interface FormatCase { note: string; address: AgentAddress; reader: AddressReader; text: string }

const table = JSON.parse(
readFileSync(fileURLToPath(new URL('../../../../packages/types/fixtures/address-cases.json', import.meta.url)), 'utf8'),
) as { parse: ParseCase[]; format: FormatCase[] };

describe('address conformance: the shared table', () => {
it('is loaded', () => {
expect(table.parse.length).toBeGreaterThan(60);
expect(table.format.length).toBeGreaterThan(10);
});

it.each(table.parse)('parse: $note — "$input"', ({ input, address, error }) => {
const result = parseAddress(input);
if (address !== undefined) {
expect(result).toEqual({ ok: true, address });
} else {
expect(result.ok).toBe(false);
if (!result.ok) {
expect(result.error.code).toBe(error);
}
}
});

it.each(table.format)('format: $note → $text', ({ address, reader, text }) => {
expect(formatAddress(address, reader)).toBe(text);
const parsed = parseAddress(text);
expect(parsed.ok).toBe(true);
if (parsed.ok) {
expect(completeAddress(parsed.address, reader)).toEqual(address);
}
});
});
Loading
Loading