Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2adcfc3
chore(porch): 823 init spir
waleedkadous May 22, 2026
4ea9cb4
[Spec 823] Initial specification draft
waleedkadous May 22, 2026
c3f0b37
chore(porch): 823 specify build-complete
waleedkadous May 22, 2026
1748ca9
[Spec 823] Specification with multi-agent review (iter-1 CMAP)
waleedkadous May 22, 2026
c806041
[Spec 823] Add iter-1 CMAP rebuttal
waleedkadous May 22, 2026
24b1842
chore(porch): 823 spec-approval gate-requested
waleedkadous May 22, 2026
33d7bdf
[Spec 823] Lock OQ-B (architect direction, pre-spec-approval)
waleedkadous May 23, 2026
874ad8c
[Spec 823] iter-2 CMAP corrections (Item 3 path semantics + skeleton …
waleedkadous May 23, 2026
51ef89f
[Spec 823] iter-2 CMAP rebuttal
waleedkadous May 23, 2026
3586ad0
[Spec 823] iter-3 CMAP corrections (skeleton templates MUST + thread …
waleedkadous May 23, 2026
02a1c27
[Spec 823] iter-3 CMAP rebuttal
waleedkadous May 23, 2026
dda591d
[Spec 823] iter-4 CMAP corrections (item 2 scope wording + item 3 com…
waleedkadous May 23, 2026
724a06d
[Spec 823] iter-4 CMAP rebuttal
waleedkadous May 23, 2026
ddb5084
[Spec 823] Final approved specification - iter-5 unanimous APPROVE co…
waleedkadous May 23, 2026
16a2e1e
chore(porch): 823 spec-approval gate-approved
waleedkadous May 23, 2026
652182f
chore(porch): 823 plan phase-transition
waleedkadous May 23, 2026
7fc2d7a
[Spec 823] Initial implementation plan
waleedkadous May 23, 2026
ecd7ce1
chore(porch): 823 plan build-complete
waleedkadous May 23, 2026
016e2d3
[Spec 823] Plan with multi-agent review (iter-1 CMAP - Phase 4 SSE pa…
waleedkadous May 23, 2026
b70defe
[Spec 823] Plan iter-1 CMAP rebuttal
waleedkadous May 23, 2026
b14435f
chore(porch): 823 plan-approval gate-requested
waleedkadous May 23, 2026
0b1b2b0
[Spec 823] Final approved plan - iter-2 CMAP convergence (APPROVE/COM…
waleedkadous May 23, 2026
3e30fec
[Spec 823] Plan iter-2 CMAP rebuttal
waleedkadous May 23, 2026
90bc4b5
chore(porch): 823 plan-approval gate-approved
waleedkadous May 23, 2026
44920e7
chore(porch): 823 implement phase-transition
waleedkadous May 23, 2026
3fbbb37
[Spec 823][Phase: phase_1_attribution] feat: dashboard builder attrib…
waleedkadous May 23, 2026
878b4cb
chore(porch): 823 implement build-complete
waleedkadous May 23, 2026
395d12e
[Spec 823][Phase: phase_1_attribution] test: Playwright visual smoke …
waleedkadous May 23, 2026
7f93333
[Spec 823][Phase: phase_1_attribution] docs: iter-1 CMAP rebuttal
waleedkadous May 23, 2026
74a8445
chore(porch): 823 implement review-recorded
waleedkadous May 23, 2026
bc70c7f
chore(porch): 823 advance plan phase → phase_2_thread_file
waleedkadous May 23, 2026
d18d106
[Spec 823][Phase: phase_2_thread_file] feat: per-builder thread file …
waleedkadous May 23, 2026
4859453
chore(porch): 823 implement build-complete
waleedkadous May 23, 2026
781b2f0
chore(porch): 823 advance plan phase → phase_3_messaging_docs
waleedkadous May 23, 2026
b226f30
[Spec 823][Phase: phase_3_messaging_docs] docs: surface inter-agent m…
waleedkadous May 23, 2026
9f3b8b9
chore(porch): 823 implement build-complete
waleedkadous May 23, 2026
1ce6725
[Spec 823][Phase: phase_3_messaging_docs] docs: iter-1 CMAP correctio…
waleedkadous May 23, 2026
f6327c5
[Spec 823][Phase: phase_3_messaging_docs] docs: iter-1 CMAP rebuttal
waleedkadous May 23, 2026
b9d53c5
chore(porch): 823 implement review-recorded
waleedkadous May 23, 2026
8615eae
chore(porch): 823 advance plan phase → phase_4_vscode_refresh
waleedkadous May 23, 2026
f172cf0
[Spec 823][Phase: phase_4_vscode_refresh] feat: architects-updated SS…
waleedkadous May 23, 2026
fb316e6
chore(porch): 823 implement build-complete
waleedkadous May 23, 2026
ffa7259
[Spec 823][Phase: phase_4_vscode_refresh] iter-1 corrections: emit on…
waleedkadous May 23, 2026
b53171a
[Spec 823][Phase: phase_4_vscode_refresh] docs: iter-1 CMAP rebuttal
waleedkadous May 23, 2026
b690aa6
chore(porch): 823 implement review-recorded
waleedkadous May 23, 2026
7a7fb6a
chore(porch): 823 all plan phases complete → review
waleedkadous May 23, 2026
0df6305
[Spec 823] Review: lessons learned + consultation feedback summary + …
waleedkadous May 23, 2026
3083296
[Spec 823] arch.md + lessons-learned.md updates
waleedkadous May 23, 2026
aab7ce0
[Spec 823] Review: add Architecture Updates section (porch check)
waleedkadous May 23, 2026
9667ba7
[Spec 823] Review: add Lessons Learned Updates section (porch check)
waleedkadous May 23, 2026
92740df
chore(porch): 823 review build-complete
waleedkadous May 23, 2026
6662004
[Spec 823] Review iter-1 fix: tests for the two workspace-scoped emit…
waleedkadous May 23, 2026
0097416
[Spec 823] Review iter-1 CMAP rebuttal
waleedkadous May 23, 2026
552cf72
chore(porch): 823 pr gate-requested
waleedkadous May 23, 2026
42bb6c2
chore(porch): 823 pr gate-approved
waleedkadous May 23, 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
33 changes: 33 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,39 @@ afx open file.ts # Open file in annotation viewer (NOT system open)

Agent Farm is configured via `.codev/config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`.

## Inter-agent messaging

Agents within a workspace communicate through `afx send`. Four addressing forms are supported:

### Addressing forms

| Form | Meaning | Allowed from |
|---|---|---|
| `afx send <builder-id> "msg"` | Send to a specific builder (e.g. `afx send 0823 "..."`). | Any sender. |
| `afx send architect "msg"` | From a builder: routes to the spawning architect via affinity (per #774). From an architect (or any non-builder sender): routes to the architect named `main` if present, else the first registered architect. | Any sender. |
| `afx send architect:<name> "msg"` | Explicit per-architect addressing. **Architects (including `main`)**: open address grammar — any architect can address any other architect. This is the sibling-architect messaging form. **Builders**: allowed ONLY when `<name>` matches the builder's own `spawnedByArchitect`. Mismatches are rejected by the spoofing check at `tower-messages.ts:213-218`. From a builder, this is an explicit form of the affinity routing, NOT an override. | Any sender (with the spoofing constraint above for builders). |
| `afx send <workspace>:architect "msg"` | Cross-workspace addressing (e.g. `afx send marketmaker:architect "..."`). | Any sender. |

### Sibling-architect messaging

When a workspace hosts more than one architect (added via `afx workspace add-architect --name <name>`), sibling architects message each other via the `architect:<name>` form. Example:

```bash
# From main's terminal to a sibling architect named ob-refine
afx send architect:ob-refine "PR-iter-2 feedback ready"
```

This works because sender = architect bypasses the spoofing check.

### Builder spoofing-check (verified at `tower-messages.ts:213-218`)

Builder `spir-823` running `afx send architect:ob-refine "..."` is rejected unless its `spawnedByArchitect == 'ob-refine'`. A builder cannot use `architect:<name>` to address an architect other than its spawning architect — that's an attempted spoof.

### Discovering active agents

- `afx status` lists all architects (post-#786) alongside builders, with names, terminal IDs, and PIDs where available.
- Each active builder maintains a free-text narrative log at `codev/state/<builder-id>_thread.md` (relative to its worktree, so `.builders/<id>/codev/state/<id>_thread.md` from the main workspace root). **In-flight discovery**: `ls .builders/*/codev/state/*.md` and `cat .builders/<id>/codev/state/<id>_thread.md`. **Post-merge discovery**: after a builder's PR merges, its thread lands in `codev/state/` on `main`, alongside `codev/reviews/` — list with `ls codev/state/` and read with `cat codev/state/<builder-id>_thread.md` from the main checkout.

## Porch - Protocol Orchestrator

Porch drives SPIR, ASPIR, AIR, and BUGFIX protocols via a state machine with phase transitions, gates, and multi-agent consultations.
Expand Down
33 changes: 33 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,39 @@ afx open file.ts # Open file in annotation viewer (NOT system open)

Agent Farm is configured via `.codev/config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`.

## Inter-agent messaging

Agents within a workspace communicate through `afx send`. Four addressing forms are supported:

### Addressing forms

| Form | Meaning | Allowed from |
|---|---|---|
| `afx send <builder-id> "msg"` | Send to a specific builder (e.g. `afx send 0823 "..."`). | Any sender. |
| `afx send architect "msg"` | From a builder: routes to the spawning architect via affinity (per #774). From an architect (or any non-builder sender): routes to the architect named `main` if present, else the first registered architect. | Any sender. |
| `afx send architect:<name> "msg"` | Explicit per-architect addressing. **Architects (including `main`)**: open address grammar — any architect can address any other architect. This is the sibling-architect messaging form. **Builders**: allowed ONLY when `<name>` matches the builder's own `spawnedByArchitect`. Mismatches are rejected by the spoofing check at `tower-messages.ts:213-218`. From a builder, this is an explicit form of the affinity routing, NOT an override. | Any sender (with the spoofing constraint above for builders). |
| `afx send <workspace>:architect "msg"` | Cross-workspace addressing (e.g. `afx send marketmaker:architect "..."`). | Any sender. |

### Sibling-architect messaging

When a workspace hosts more than one architect (added via `afx workspace add-architect --name <name>`), sibling architects message each other via the `architect:<name>` form. Example:

```bash
# From main's terminal to a sibling architect named ob-refine
afx send architect:ob-refine "PR-iter-2 feedback ready"
```

This works because sender = architect bypasses the spoofing check.

### Builder spoofing-check (verified at `tower-messages.ts:213-218`)

Builder `spir-823` running `afx send architect:ob-refine "..."` is rejected unless its `spawnedByArchitect == 'ob-refine'`. A builder cannot use `architect:<name>` to address an architect other than its spawning architect — that's an attempted spoof.

### Discovering active agents

- `afx status` lists all architects (post-#786) alongside builders, with names, terminal IDs, and PIDs where available.
- Each active builder maintains a free-text narrative log at `codev/state/<builder-id>_thread.md` (relative to its worktree, so `.builders/<id>/codev/state/<id>_thread.md` from the main workspace root). **In-flight discovery**: `ls .builders/*/codev/state/*.md` and `cat .builders/<id>/codev/state/<id>_thread.md`. **Post-merge discovery**: after a builder's PR merges, its thread lands in `codev/state/` on `main`, alongside `codev/reviews/` — list with `ls codev/state/` and read with `cat codev/state/<builder-id>_thread.md` from the main checkout.

## Porch - Protocol Orchestrator

Porch drives SPIR, ASPIR, AIR, and BUGFIX protocols via a state machine with phase transitions, gates, and multi-agent consultations.
Expand Down
21 changes: 21 additions & 0 deletions codev-skeleton/roles/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,27 @@ porch status # (strict mode) Your project status
afx status # All builders
```

## Thread file

You maintain a free-text markdown log at `codev/state/<builder-id>_thread.md` (relative to your worktree). This is the cohort's collective situational-awareness surface — architects and sibling builders can read it via plain file I/O.

**Path resolution**: `<builder-id>` is the basename of your worktree path. Resolve it once with `basename "$(pwd)"`. Example: if your worktree is `.builders/spir-823/`, the path is `codev/state/spir-823_thread.md`.

**Directory creation**: `codev/state/` likely doesn't exist when you start (it's greenfield). Your first write creates it — the Write tool's `mkdir -p` semantics handle this transparently. No need to pre-create the directory.

**What to write**: phase transitions, decisions, blockers, anything worth recording for the cohort. Trust your own judgement about what's useful. There is no required schema, no required sections, no timestamp format. The thread is yours.

**When to write**: at phase boundaries and at any other moment you think a future reader would want to know what happened. Don't over-engineer cadence — append when there's something to say.

**Discovery**:
- **In-flight** (while you're active): your thread lives in your worktree at `.builders/<builder-id>/codev/state/<builder-id>_thread.md` (from the main workspace root). Architects read it with `cat .builders/<id>/codev/state/<id>_thread.md`; they discover threads with `ls .builders/*/codev/state/*.md`.
- **Sibling builders**: read each other's threads via `cat ../<sibling-id>/codev/state/<sibling-id>_thread.md` from your own worktree (the parent `.builders/` directory is shared between all builders in the workspace).
- **Post-merge**: after your PR merges, your thread lands in `codev/state/` on `main` (parallel to `codev/reviews/`) and becomes part of the historical review record.

**Commit/retention rule**: **the default disposition is COMMIT.** Stage and commit your thread file as part of your PR. The rare exception — when your thread turned out to be noise rather than useful narrative — is an explicit decision to strip it before PR (via gitignore for the PR or by not staging the file). Silently leaving the thread uncommitted by accident is a bug, not an exercise of the exception. The cohort's situational-awareness goal depends on threads surviving to `main`.

**Scope reminder**: this is for the cohort's situational awareness, not porch's tracking. Porch does not read this file. There are no hooks, no validation, no enforcement.

## Notifications

**ALWAYS notify the architect** via `afx send` at these key moments:
Expand Down
20 changes: 20 additions & 0 deletions codev-skeleton/templates/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ For complete reference, see `codev/resources/commands/`:
- `codev/resources/commands/agent-farm.md` - Agent Farm commands
- `codev/resources/commands/consult.md` - Consultation commands

## Inter-agent messaging

Agents within a workspace communicate through `afx send`. Four addressing forms are supported:

| Form | Meaning | Allowed from |
|---|---|---|
| `afx send <builder-id> "msg"` | Send to a specific builder (e.g. `afx send 0042 "..."`). | Any sender. |
| `afx send architect "msg"` | From a builder: routes to the spawning architect via affinity. From an architect (or any non-builder sender): routes to the architect named `main` if present, else the first registered architect. | Any sender. |
| `afx send architect:<name> "msg"` | Explicit per-architect addressing. **Architects (including `main`)**: open address grammar — any architect can address any other architect (sibling-architect messaging). **Builders**: allowed ONLY when `<name>` matches the builder's own spawning architect; mismatches are rejected by Tower's spoofing check. From a builder, this is an explicit form of the affinity routing, NOT an override. | Any sender (with the spoofing constraint above for builders). |
| `afx send <workspace>:architect "msg"` | Cross-workspace addressing (e.g. `afx send marketmaker:architect "..."`). | Any sender. |

**Sibling-architect messaging**: when a workspace hosts more than one architect (added via `afx workspace add-architect --name <name>`), sibling architects message each other via the `architect:<name>` form. Example: `main` running `afx send architect:ob-refine "PR-iter-2 feedback ready"` lands on the `ob-refine` architect's terminal. This works because sender = architect bypasses the spoofing check.

**Builder spoofing-check**: a builder may only address its own spawning architect via `architect:<name>`. The spoofing check is enforced by Tower's message router; attempts to address a different architect from a builder are rejected.

**Discovering active agents**:

- `afx status` lists all architects alongside builders, with names, terminal IDs, and PIDs where available.
- Each active builder maintains a free-text narrative log at `codev/state/<builder-id>_thread.md` (relative to its worktree). **In-flight discovery**: `ls .builders/*/codev/state/*.md` and `cat .builders/<id>/codev/state/<id>_thread.md`. **Post-merge discovery**: after a builder's PR merges, its thread lands in `codev/state/` on `main` — list with `ls codev/state/` and read with `cat codev/state/<builder-id>_thread.md` from the main checkout.

## Configuration

Agent Farm is configured via `.codev/config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI flags: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`.
Expand Down
20 changes: 20 additions & 0 deletions codev-skeleton/templates/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ For complete reference, see `codev/resources/commands/`:
- `codev/resources/commands/agent-farm.md` - Agent Farm commands
- `codev/resources/commands/consult.md` - Consultation commands

## Inter-agent messaging

Agents within a workspace communicate through `afx send`. Four addressing forms are supported:

| Form | Meaning | Allowed from |
|---|---|---|
| `afx send <builder-id> "msg"` | Send to a specific builder (e.g. `afx send 0042 "..."`). | Any sender. |
| `afx send architect "msg"` | From a builder: routes to the spawning architect via affinity. From an architect (or any non-builder sender): routes to the architect named `main` if present, else the first registered architect. | Any sender. |
| `afx send architect:<name> "msg"` | Explicit per-architect addressing. **Architects (including `main`)**: open address grammar — any architect can address any other architect (sibling-architect messaging). **Builders**: allowed ONLY when `<name>` matches the builder's own spawning architect; mismatches are rejected by Tower's spoofing check. From a builder, this is an explicit form of the affinity routing, NOT an override. | Any sender (with the spoofing constraint above for builders). |
| `afx send <workspace>:architect "msg"` | Cross-workspace addressing (e.g. `afx send marketmaker:architect "..."`). | Any sender. |

**Sibling-architect messaging**: when a workspace hosts more than one architect (added via `afx workspace add-architect --name <name>`), sibling architects message each other via the `architect:<name>` form. Example: `main` running `afx send architect:ob-refine "PR-iter-2 feedback ready"` lands on the `ob-refine` architect's terminal. This works because sender = architect bypasses the spoofing check.

**Builder spoofing-check**: a builder may only address its own spawning architect via `architect:<name>`. The spoofing check is enforced by Tower's message router; attempts to address a different architect from a builder are rejected.

**Discovering active agents**:

- `afx status` lists all architects alongside builders, with names, terminal IDs, and PIDs where available.
- Each active builder maintains a free-text narrative log at `codev/state/<builder-id>_thread.md` (relative to its worktree). **In-flight discovery**: `ls .builders/*/codev/state/*.md` and `cat .builders/<id>/codev/state/<id>_thread.md`. **Post-merge discovery**: after a builder's PR merges, its thread lands in `codev/state/` on `main` — list with `ls codev/state/` and read with `cat codev/state/<builder-id>_thread.md` from the main checkout.

## Configuration

Agent Farm is configured via `.codev/config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI flags: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`.
Expand Down
Loading
Loading