Agents view: architect-aware group-by axis (VSCode)#1106
Merged
Conversation
…llectArchitects)
…reader, distinct from persisted getArchitects)
…), retire nested tier - Replace the nested architect tier with an architectGrouping() strategy: builders group by exactly one axis at a time. Childless architects produce no group and vanish from the work view (full roster stays in Workspace > Architects). - Three Agents title-bar buttons (Stage/Area/Architect) with toggled clauses so the active axis renders pressed. Octopus SVG (theme light/dark pair) is the Architect button icon. - Remove ArchitectGroupTreeItem, partitionByArchitect/architectBadge, the adaptive architectCount gate, and the description badge.
…at-a-glance selection)
…rrent axis) VS Code menus have no 'toggled'/pressed state (verified against the schema), and a toolbar action's icon is fixed to its command. So show the active grouping with one button whose icon IS the current axis (milestone/tag/octopus), swapped via three show/hide agentsCycleGroupFrom* commands; clicking advances to the next axis. The direct groupBuildersBy* commands stay for palette/keybindings.
… redundant direct commands - Titles use present tense 'Group by X' (was 'Grouped by X'), no '(click to change)'. - Grouping button rendered first in the Agents toolbar (navigation@1; refresh/ collapse/file-tree pushed to @2/@3/@4). - Drop the redundant direct groupBuildersBy* commands (they duplicated the cycle commands' titles and were palette-only); the cycle button is the single grouping affordance.
…rent one
The button is an action ('click to group by X'), so each shows the icon + title of
the axis clicking will apply: grouped by architect → button reads 'Group by Stage'.
The current grouping is read from the tree (group headers).
Every builder is spawned with an owner (afx spawn defaults to 'main'), so there's no such thing as an unassigned builder. A null spawnedByArchitect is only a data-integrity edge (missing/legacy state.db row); fold it into the main group, matching the affinity router's fallback. Removes UNASSIGNED_ARCHITECT.
… doc fixes - Fix (codex REQUEST_CHANGES #5): handleOverview no-workspace branch now emits all required OverviewData collection fields (recentlyClosed/architects) empty, honoring the 'never undefined' contract; regression assertion added. - Fix (claude COMMENT): README Agents description rewritten for the flat group-by axis (was describing the retired nested tier); buildersGroupBy setting description no longer references a nonexistent 'pressed' button state. - Rebut: flat-axis/childless-absent/view-id-rename/no-Agents-+ are deliberate dev-gate decisions (see rebuttals doc).
amrmelsayed
added a commit
that referenced
this pull request
Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIR Review: Agents view — architect-aware grouping (VSCode)
Fixes #1104
Summary
Renames the VSCode sidebar Builders view to Agents and makes architect→builder ownership visible by adding architect as a third group-by axis alongside stage and area (builders are grouped by exactly one axis at a time). The owning architect roster is plumbed onto
/api/overviewso the conversationalCodev: Add Architectaction can route throughmain. Note: the implementation pivoted at the dev-approval gate from the issue's originally-proposed nested architect tier to a flat 3-way toggle — the reviewer found the flat axis cleaner (no duplication with Workspace > Architects, no single-architect collapse awkwardness, and childless architects vanish for free).Files Changed
(
git diff --statagainst the merge-base; excludes the porchstatus.yaml/thread bookkeeping)codev/plans/1104-vscode-merge-architects-builde.md(+267) — plancodev/state/pir-1104_thread.md(+102) — builder threadpackages/types/src/api.ts(+12) —OverviewData.architects: ArchitectState[]packages/codev/src/agent-farm/servers/tower-routes.ts(+/-72) — sharedliveArchitectshelper,/api/overviewenrichmentpackages/codev/src/agent-farm/servers/overview.ts(+/-6) —architects: []defaultpackages/codev/src/agent-farm/__tests__/tower-routes.test.ts(+42) — overview-roster testspackages/dashboard/__tests__/{useOverview.stability,useSSE.reconnect}.test.ts(+1 each) — mockarchitects: []packages/vscode/package.json(+/-111) — view id rename, group-by commands + toolbar button, octopus icon, settings/labelspackages/vscode/icons/architect{,-light,-dark}.svg(new) — octopus glyph (monochrome light/dark pair)packages/vscode/src/views/builder-grouping.ts(+/-48) —architectGrouping()strategypackages/vscode/src/views/builders.ts(+/-35) — flat single-level grouping (nested tier removed)packages/vscode/src/views/builder-tree-item.ts— dropArchitectGroupTreeItempackages/vscode/src/commands/add-architect.ts(new, +35) — conversational Add Architect helperspackages/vscode/src/extension.ts(+/-90) — group-by cycle commands, Add Architect rewrite, view-id wiringpackages/vscode/README.md(+/-14) — Builders → Agentsbuilder-grouping,add-architect,extension-architect-commands,contributes-panel,menu-when-clausesCommits
git log main..HEAD --oneline(squash-free; the development history shows the dev-gate pivot):b7e738f2Enrich /api/overview with the architect roster (shared collectArchitects)08346c61Add adaptive architect tier to the Agents tree (later retired)cc4bc4d4Conversational Add Architect + rename Builders view to Agentsb5bfce2fFix Agents view title flipping back to 'Builders' on data loadc8f3ad87/c014bf3cSweep user-facing 'Builders' labels to 'Agents' (settings + README)ae035b61Rename collectArchitects -> liveArchitects (live-session reader)1ec60502Pivot to flat 3-way group-by toggle, retire nested tier8e7821e8Name the active axis in the title (later reverted)acaba08bSingle cycling toolbar button (icon = current axis)189e0f7fPresent-tense titles, render first, drop redundant direct commands9b4f88e3Group-by button shows the NEXT axis (action), not current85cc8f21Drop the bogus 'Unassigned' architect groupTest Results
pnpm build(core + codev + dashboard): ✓ passpnpm --filter @cluesmith/codev test: ✓ 3375 pass / 48 skippedcodev-vscodecheck-types ✓, lint ✓,test:unit✓ 512 passcodev-dashboardtest: ✓ 322 pass / 1 skippedArchitecture Updates
COLD
codev/resources/arch.md— added one bullet to the VS Code Extension design decisions ("Agents view + group-by axes (#1104)"): the view-id rename (codev.builders→codev.agents, user-facing only), the three group-by strategies, thearchitectaxis semantics (null → main, childless absent), and the additive/api/overviewarchitectsfield built by the sharedliveArchitectshelper (distinct from state.ts's persistedgetArchitects). No HOTarch-critical.mdchange — this is feature/reference detail, not an always-inject system-shape invariant; module boundaries are unchanged (the extension stays a thin client; the Tower API gained one additive field).Lessons Learned Updates
COLD
codev/resources/lessons-learned.md(UI/UX) — two[From #1104]entries:toggledin the menu schema; icon is fixed to the command) — express one-of-N selection with a single button whose icon reflects state via show/hide commands, make it an action (show the next state), and let view content be the primary "what am I looking at" signal.iconPathSVGs aren't theme-tinted.No HOT
lessons-critical.mdchange — both are VS-Code-specific recipes, not high-blast-radius cross-cutting rules.Things to Look At During PR Review
1ec60502is the pivot. The nested-tier code (ArchitectGroupTreeItem,partitionByArchitect, the adaptivearchitectCountgate) was fully removed, so reviewbuilders.ts/builder-grouping.tsagainst the flat model, not the plan.liveArchitectsvsgetArchitects.tower-routes.ts'sliveArchitects(live terminal-session set) is intentionally distinct from state.ts'sgetArchitects(persisted table). The/api/overviewenrichment reuses the exact helper the dashboard-state path uses so the two payloads can't drift — confirm the extraction is byte-equivalent to the former inline loop./api/overviewis the only remaining consumer of the roster enrichment (via Add Architect'sresolveMainArchitect). The nested tier that originally also consumed it is gone; the enrichment is retained deliberately for Add Architect, not dead code.toggled(it isn't a real menu property). The group-by button is one of three show/hide cycle commands; verify thewhen-clauses cover the unset-context-key case (!codev.buildersGroupBy→ stage).maininarchitectGrouping— confirm that matches the affinity router's fallback and that there's no user-visible "Unassigned" group.Consultation (CMAP iter-1)
Single advisory pass (PIR
max_iterations: 1): codex = REQUEST_CHANGES, claude = COMMENT. Full verdicts incodev/projects/1104-*/1104-review-iter1-*.txt; dispositions in1104-review-iter1-rebuttals.md.handleOverviewno-workspace branch returned a payload missing the now-requiredarchitects(andrecentlyClosed) — now emits all collection fields empty; regression assertion added totower-routes.test.ts. (codex IDE Loop Misunderstanding - AI Doesn't Understand Phase Repetition #5)README.mdAgents description still described the retired nested tier — rewritten for the flat axis. (claude The Gestalt Problem - Features Developed in Isolation Without System Awareness #1)buildersGroupBysetting description referenced a "pressed" button state that doesn't exist — rewritten for the single cycling button. (claude Context Window Optimization - AI Needs Project Knowledge Without Breaking Limits #2)dev-approval-gate decisions, not regressions): flat axis vs nested tier; childless architects absent; view-id renamecodev.builders→codev.agents; no Add-Architect+on the Agents title bar. All four were human-directed at the dev gate (see Summary + builder thread).How to Test Locally
pir-1104→ Review Diffafx dev pir-1104(or sidebar → Run Dev Server)architectmode, group headers are architect names; a builder whose owner isn't running still appears undermain.MAIN); no "Unassigned".Codev: Add Architectwithmainrunning → request lands in main's terminal; with main absent → modal pointing at the CLI fallback.