Commit graph

120 commits

Author SHA1 Message Date
zenchantlive
1925d625b6 feat(swarm): add GET /api/swarm/archetypes route with passing test 2026-02-20 17:10:26 -08:00
zenchantlive
2d88c57b55 chore(swarm): remove non-TDD api route to satisfy tdd requirement 2026-02-20 17:09:05 -08:00
zenchantlive
2f256bd199 feat(swarm): add GET /api/swarm/archetypes route 2026-02-20 17:08:26 -08:00
zenchantlive
05b8c20637 feat(swarm): add server file system utility for archetypes 2026-02-20 17:07:49 -08:00
zenchantlive
84737f8905 feat(swarm): define strict archetype and template contracts 2026-02-20 17:07:21 -08:00
ZenchantLive
14a50ad4ae docs+skills: add main UI/UX visual-truth PRD and skill links 2026-02-18 12:50:53 -08:00
ZenchantLive
1c36223e7f chore(bd): align dolt metadata and runtime ignore rules 2026-02-18 12:43:22 -08:00
ZenchantLive
a37aa17961 fix(bd): stabilize dolt backend and ignore startlock runtime file 2026-02-18 12:43:10 -08:00
zenchantlive
1d5e7cb5ba ignore 2026-02-17 13:11:29 -08:00
zenchantlive
9d0466a736 gi 2026-02-17 13:10:48 -08:00
zenchantlive
0af470d5b4 gi 2026-02-17 13:10:46 -08:00
zenchantlive
2c75a04401 beads2 2026-02-17 13:07:53 -08:00
zenchantlive
0731517320 beads 2026-02-17 13:03:22 -08:00
zenchantlive
911c486013 rest of it 2026-02-17 13:00:57 -08:00
zenchantlive
bba34a144e sync beads 2026-02-17 12:59:37 -08:00
ZenchantLive
560866e268 social ui refresh: tiered left rail, borderless depth, status-colored right rail 2026-02-17 12:53:30 -08:00
zenchantlive
fcbe7df804 fix(ui3): resolve dashboard crash and refine left panel data 2026-02-17 00:34:42 -08:00
zenchantlive
c79dfff0c6 fix(ui3): final polish - media player layout, functional sidebars, agent visibility 2026-02-17 00:10:28 -08:00
zenchantlive
f7bcca7a8e feat(ui3): high-fidelity command center redesign with stage-library layout and unified sidebar 2026-02-17 00:01:45 -08:00
zenchantlive
c4622ea0b6 fix(layout): unified right sidebar with chat mode and collapsing activity rail 2026-02-16 23:50:20 -08:00
zenchantlive
24c904554b fix(ui3): split view layout and hard-style dependency lists 2026-02-16 23:28:03 -08:00
zenchantlive
395f90ed2a feat(ui3): elegant earthy task feed redesign 2026-02-16 23:20:47 -08:00
zenchantlive
9c703072d1 fix: truncate SocialCard dependencies, refine SocialPage layout 2026-02-16 22:48:36 -08:00
zenchantlive
c74a4098e7 refactor: BaseCard hard style shadow, SocialCard blocking lists, AgentAvatar ZFC states 2026-02-16 22:41:56 -08:00
zenchantlive
54729c72f6 initial commit for beadboard 2026-02-16 21:45:27 -08:00
zenchantlive
93f3c50d4b fix: ThreadDrawer slides from right edge of screen 2026-02-16 12:11:28 -08:00
zenchantlive
a3fd94b729 fix: position ThreadDrawer between middle and right panels 2026-02-16 11:29:03 -08:00
zenchantlive
3298fbd336 fix: wire handleCardSelect to SocialPage and SwarmPage 2026-02-16 11:26:06 -08:00
zenchantlive
a7787733b9 fix(bb-ui2): separate ThreadDrawer from RightPanel
- Created ThreadDrawer component (24rem) that slides from right edge of middle
- RightPanel now reserved for Activity Feed + Agent roster (bb-ui2.29)
- Updated URL state: added drawer and agentId params
- Thread shows in drawer when card selected

Architecture now matches PRD:
- Right Panel (17rem): Activity Feed + Agent roster
- Thread Drawer (24rem): Opens from middle when card clicked

Beads: bb-ui2.31 thread drawer created, bb-ui2.13 closed
2026-02-16 10:16:33 -08:00
zenchantlive
f6c5398f0c fix(bb-ui2): integrate ThreadView into detail panels with sample data
- Wired ThreadView component into SocialDetail and SwarmDetail
- Added sample thread items for demo purposes
- Removed thread placeholders

Beads: bb-ui2.13 closed
2026-02-16 10:10:50 -08:00
zenchantlive
8dd2d01686 feat(bb-ui2): Social and Swarm views with detail panels integrated 2026-02-16 00:26:31 -08:00
zenchantlive
976fd0c361 fix(graph): remove translateExtent limit for unlimited panning
STORY:
Users couldn't pan to see nodes at the bottom of large graphs.
The translateExtent was limiting the viewport to a fixed area.

FIX:
Removed translateExtent entirely to allow unlimited panning in all
directions. Users can now explore the full graph regardless of size.

CLOSES: bb-ui2.21 (fitView/panning fix)
2026-02-15 23:24:15 -08:00
zenchantlive
083e710388 chore: update beads and page for unified shell
- Backed up old page.tsx to page-old.tsx
- Updated page.tsx to use UnifiedShell
- Beads updated: bb-ui2.27, bb-ui2.28 closed; new agent beads created
2026-02-15 23:21:40 -08:00
zenchantlive
4efc461c1e feat(ui): add view components for Social, Swarm, and Graph (bb-ui2.11, .16, .20)
STORY:
With the shell layout complete, we needed the actual content for each view.
Three agents worked in parallel on the card components that would populate
the Social and Swarm views, plus integrating the existing graph into the shell.

COLLABORATION:
Agent bb-98c (social-card-builder) created SocialCard:
- Task ID with teal styling
- UNLOCKS section (green) showing what this task unblocks
- BLOCKS section (amber) showing what's blocking this task
- Agent avatars with liveness glow
- View-jump icons for quick navigation

Agent bb-nuy (swarm-card-builder) created SwarmCard:
- Agent roster with liveness indicators
- Progress bar (ASCII block format: ████████░░░░)
- Attention items with warning styling
- View-jump icons

Agent bb-54x (graph-integrator) integrated WorkflowGraph:
- Created GraphView wrapper with Flow/Overview tabs
- Wired into UnifiedShell when view=graph
- Connected taskId to selectedId for URL sync
- Connected graphTab to URL state

DELIVERABLES:
- src/components/social/social-card.tsx: Task card for activity feed
- src/components/swarm/swarm-card.tsx: Swarm health card
- src/components/graph/graph-view.tsx: Graph wrapper with tabs
- src/components/shared/mobile-nav.tsx: Bottom tab bar
- Tests for all components

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS

CLOSES: bb-ui2.11, bb-ui2.16, bb-ui2.20
2026-02-15 23:21:20 -08:00
zenchantlive
ce8fdd0d4c feat(ui): complete shell layout components (bb-ui2.6, .7, .8, .9, .27)
STORY:
Phase 1 of the Unified UX epic required a complete 3-panel shell layout
with responsive behavior across mobile, tablet, and desktop breakpoints.
The existing page structure was fragmented - we needed a cohesive shell.

COLLABORATION:
Three agents (bb-5am, bb-dwz, bb-3dv) worked in parallel on:
- TopBar: View tabs (Social/Graph/Swarm) with active states, filter input
- LeftPanel: Channel tree navigation with epic filtering, responsive collapse
- RightPanel: Detail strip with sidebar (desktop) / drawer (tablet/mobile) modes

We encountered a hydration mismatch error on mobile/tablet because
useResponsive was returning different values on server vs client.
Fixed by defaulting to desktop on server and only updating after mount.

Mobile navigation (bb-ui2.27) added:
- Hamburger menu for left panel access on mobile/tablet
- Bottom tab bar for thumb-friendly view switching

DELIVERABLES:
- src/components/shared/top-bar.tsx: TopBar with view tabs + hamburger
- src/components/shared/left-panel.tsx: Epic tree with expand/collapse
- src/components/shared/right-panel.tsx: Responsive sidebar/drawer
- src/components/shared/unified-shell.tsx: Main 3-panel grid layout
- src/components/shared/mobile-nav.tsx: Bottom tab bar for mobile
- src/hooks/use-responsive.ts: Breakpoint detection (mobile/tablet/desktop)
- Tests for all components

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS

CLOSES: bb-ui2.6, bb-ui2.7, bb-ui2.8, bb-ui2.9, bb-ui2.27
2026-02-15 23:19:52 -08:00
zenchantlive
539e6e7021 feat(graph): integrate WorkflowGraph into unified shell
- Create GraphView component with Flow/Overview tab switcher
- Wire GraphView into UnifiedShell when view=graph
- Connect taskId URL param to selectedId for node selection
- Connect graphTab URL param for tab state persistence
- ReactFlow renders in middle panel with proper layout

Closes bb-ui2.20
2026-02-15 23:12:16 -08:00
zenchantlive
6d87f18f20 docs: add next session prompt for bb-ui2.6, .7, .8 2026-02-15 22:01:31 -08:00
zenchantlive
9afa3f7bbd fix: add lib/utils.ts for shadcn component imports
STORY:
shadcn/ui components expect @/lib/utils to exist for the cn() helper.
Our project uses src/lib/, but shadcn creates lib/ at root.

COLLABORATION:
Created lib/utils.ts with the cn() function to satisfy shadcn imports.
This coexists with src/lib/utils.ts - both export the same function.

VERIFICATION:
- npm run typecheck: PASS
2026-02-15 21:22:05 -08:00
zenchantlive
eb933b6c27 chore: add .beadboard user profile directory
The .beadboard directory in user profile stores:
- projects.json: multi-project registry
- agent/: agent session data

This is the Windows-first location for machine-local BeadBoard config.
2026-02-15 21:20:26 -08:00
zenchantlive
a2b0909724 fix: recover from mass file corruption incident (2026-02-15)
INCIDENT SUMMARY:
A catastrophic corruption event affected the working directory, with null
bytes (0x00) overwriting content in dozens of files including:
- package.json (corrupted)
- tailwind.config.ts (corrupted)
- All modified tracked files
- Untracked directories (components/ui/, node_modules/, .next/)

ROOT CAUSE:
Unknown - files were filled with null bytes, destroying their content.

RECOVERY PROCESS:
1. Discovered corruption when npm run dev failed with EJSONPARSE
2. Checked git diff --stat - showed many files as "binary"
3. Found dangling stash commits (0d80ad9, a1a33cf) containing our work
4. Restored tracked files from stash: git checkout a1a33cf -- .
5. Removed corrupted untracked directories (node_modules, .next, components/ui)
6. Reinstalled dependencies: npm install
7. Reinitialized shadcn/ui: npx shadcn@latest init
8. Reinstalled shadcn components: npx shadcn@latest add button card ...
9. Recreated earthy-dark tokens (bb-ui2.1) - lost in shadcn init overwrite
10. Verified all closed bb-ui2 beads still had their deliverables

DATA PRESERVED:
- All tracked source code (recovered from git stash)
- .beads/issues.jsonl (recovered from stash)
- All bead history and metadata

DATA LOST:
- Uncommitted changes to untracked files
- Earthy-dark tokens (recreated from bead spec)
- components/ui/ (regenerated from shadcn)

LESSONS LEARNED:
1. Commit work frequently - untracked changes are not protected
2. Git stash captures tracked files only
3. shadcn init overwrites globals.css - preserve tokens separately
4. Dangling commits can save the day

VERIFICATION POST-RECOVERY:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS
- All bb-ui2 closed bead deliverables present

CLOSES: bb-silver-castle (triage bead for this incident)
2026-02-15 21:19:58 -08:00
zenchantlive
173937c1f3 chore: add utility scripts and additional test coverage
STORY:
Development requires supporting scripts and comprehensive test coverage.
This commit adds utility scripts and extends test suites.

COLLABORATION:
- scripts/capture-sessions.mjs: Screenshot capture for sessions hub
- scripts/capture-timeline.mjs: Timeline view capture utility
- sessions-header-logic.ts: Session header business logic
- Additional test files for sessions, hooks, and snapshot diffing
2026-02-15 21:19:31 -08:00
zenchantlive
812b6cf8c5 docs: add planning documents for buff epic and unified UX
STORY:
Major epics require upfront planning documentation. These docs capture
the design decisions, architecture, and rollout maps for the
Agent System Overhaul (bb-buff) and Unified UX (bb-ui2) epics.

COLLABORATION:
- 2026-02-14-operative-protocol-design.md: ZFC state machine design
- 2026-02-14-super-agent-buff-roadmap.md: buff epic architecture
- 2026-02-15-unified-ux-prd.md: UI epic product requirements
- docs/protocols/: protocol specifications

These documents serve as the source of truth for implementation decisions
and help future contributors understand the design rationale.
2026-02-15 21:19:14 -08:00
zenchantlive
b905d21526 feat(agents): complete bb-1y7 - Consolidate Agent Identity to bd Beads
STORY:
Agent identities were stored in a local JSON registry, but they should
be first-class beads visible in the BeadBoard system. This consolidates
agent identity to bd CLI as the source of truth.

COLLABORATION:
Replaced local JSON registry with bd CLI wrapper in agent-registry.ts:
- All agent operations now delegate to bd CLI
- Agents appear as team-visible beads with gt:agent label
- Identity isolation prevents agent beads from polluting mission lists

The consolidation makes agents visible to the entire team and ensures
consistent identity management across all tools.

DELIVERABLES:
- src/lib/agent-registry.ts refactored to bd CLI wrapper
- tests/lib/agent-registry-bd.test.ts for bd integration
- tools/bb.ts updated for consolidated identity ops

VERIFICATION:
- All registry tests PASS
- Agents appear on agent page but NOT in task lists
- Quality gates (typecheck, lint) GREEN

CLOSES: bb-1y7
EPIC: bb-u6f
2026-02-15 21:18:48 -08:00
zenchantlive
9660b516a8 feat(graph): complete bb-ui2.19 - Extract Graph into Reusable Component
STORY:
The existing ReactFlow dependency graph lived in the /graph page, but
the Unified UX needs it as a reusable component for the graph tab.

COLLABORATION:
Extracted the core ReactFlow visualization into WorkflowGraph component:

Interface:
- beads: BeadIssue[] to render as nodes
- selectedId?: currently selected bead
- onSelect?: selection callback
- className?: styling override
- hideClosed?: filter closed beads

Features preserved:
- Dagre layout for automatic positioning
- Edge rendering with BLOCKS labels
- fitView() on mount via useReactFlow
- Existing styling and hover states

The original /graph page can now use this component or serve as reference.

DELIVERABLES:
- src/components/shared/workflow-graph.tsx

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS

CLOSES: bb-ui2.19
BLOCKS: bb-ui2.20
2026-02-15 21:18:31 -08:00
zenchantlive
e47230c2dd feat(data): complete bb-ui2.15 - Swarm Cards Data Builder
STORY:
The Swarm view needs to show epics as "swarms" - groups of agents
working together on a mission. This requires aggregating bead data
by swarm/epic and computing health statistics.

COLLABORATION:
Created buildSwarmCards function that transforms epic + agent data:

SwarmCard interface:
- id, title, status
- stats: { completed, active, ready, blocked, total }
- agents: AgentRoster[] with liveness
- attention: blocked tasks + stuck agents needing attention
- lastActivity

We also created swarm-molecules.ts for molecular composition patterns
used by the swarm orchestration layer.

DELIVERABLES:
- src/lib/swarm-cards.ts with SwarmCard, AgentRoster types
- src/lib/swarm-molecules.ts for molecular composition
- tests/lib/swarm-cards.test.ts
- tests/lib/swarm-molecules.test.ts

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS

CLOSES: bb-ui2.15
BLOCKS: bb-ui2.16, bb-ui2.17
2026-02-15 21:18:13 -08:00
zenchantlive
e28a7837c4 feat(data): complete bb-ui2.10 - Social Cards Data Builder
STORY:
The Social view needs to transform raw BeadIssue data into renderable
SocialCard objects. This includes computing blocked/blocking relationships
from dependencies and extracting agent assignments.

COLLABORATION:
Created buildSocialCards function that transforms BeadIssue → SocialCard:

SocialCard interface:
- id, title, status
- blockedBy: tasks this task depends on
- blocking: tasks that depend on this task
- agents: assigned agents with liveness
- lastActivity: most recent event

The function derives blockedBy from depends_on dependencies and blocking
from blocked_by reverse dependencies, creating a complete picture of
task relationships for the activity feed.

DELIVERABLES:
- src/lib/social-cards.ts with SocialCard interface and builder
- tests/lib/social-cards.test.ts

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS

CLOSES: bb-ui2.10
BLOCKS: bb-ui2.11, bb-ui2.12
2026-02-15 21:17:52 -08:00
zenchantlive
4b8770c78c feat(hooks): complete bb-ui2.4 - URL State Hook
STORY:
The Unified UX needs URL as the single source of truth for view state.
This enables deep linking, bookmarking, and shareable URLs that
preserve exactly what the user was looking at.

COLLABORATION:
Created useUrlState hook using Next.js useSearchParams and useRouter:

Interface:
- view: 'social' | 'graph' | 'swarm' (default: social)
- taskId: selected task ID (for detail panel)
- swarmId: selected swarm ID
- panel: 'open' | 'closed' (detail panel state)
- graphTab: 'flow' | 'overview' (graph view mode)

URL Patterns:
- /?view=social
- /?view=social&task=bb-buff.1&panel=open
- /?view=swarm&swarm=bb-buff
- /?view=graph&task=bb-buff.1&graphTab=flow

The hook uses router.push for URL updates, ensuring no local state
drift from the URL source of truth.

DELIVERABLES:
- src/hooks/use-url-state.ts with parseUrlState, buildUrlParams, useUrlState
- tests/hooks/use-url-state.test.ts with 18+ tests

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS (all tests including new ones)

CLOSES: bb-ui2.4
BLOCKS: bb-ui2.5
2026-02-15 21:17:30 -08:00
zenchantlive
71a513c639 feat(components): complete bb-ui2.3 - Base Primitives
STORY:
The Unified UX needs reusable primitive components that work across
Social, Swarm, and Graph views. These build on shadcn/ui foundation
with consistent styling and behavior.

COLLABORATION:
Created shared primitives:
- BaseCard: Wraps shadcn Card with consistent padding, hover states,
  and selection styling
- AgentAvatar: Avatar with liveness glow indicator (active/stale/stuck/dead)
- StatusBadge: Status display with consistent styling

These components use the earthy-dark tokens and are designed for
composability across all three views (Social, Graph, Swarm).

DELIVERABLES:
- src/components/shared/base-card.tsx
- src/components/shared/agent-avatar.tsx
- src/components/shared/status-badge.tsx
- src/components/shared/index.ts (barrel export)
- Tests in tests/components/shared/

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS

CLOSES: bb-ui2.3
BLOCKS: bb-ui2.5, bb-ui2.11, bb-ui2.16
2026-02-15 21:17:08 -08:00
zenchantlive
fb4fdb79b2 feat(design): complete bb-ui2.1 - Earthy-Dark Token System
STORY:
The Unified UX epic requires a cohesive visual language that feels
warm and approachable, not sterile. We designed an "earthy-dark"
palette with natural accent colors.

COLLABORATION:
Added earthy-dark CSS variables to globals.css alongside existing
Aero Chrome tokens:

Backgrounds:
- --color-bg-base: #2D2D2D
- --color-bg-card: #363636
- --color-bg-input: #404040

Accents:
- --color-accent-green: #7CB97A (primary CTA)
- --color-accent-amber: #D4A574 (warning)
- --color-accent-teal: #5BA8A0 (secondary)

Status (earthy variants):
- ready: teal, in_progress: green, blocked: amber, closed: muted

Liveness colors for agent health:
- active: #7CB97A, stale: #D4A574, stuck: #E57373, dead: #9E4244

Also fixed tailwind.config.ts to use ESM import for tailwindcss-animate
instead of require().

DELIVERABLES:
- Earthy-dark tokens in globals.css
- Tailwind config with shadcn CSS variable integration
- Fixed lint error with tailwindcss-animate import

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS

CLOSES: bb-ui2.1
BLOCKS: bb-ui2.5
2026-02-15 21:16:48 -08:00
zenchantlive
3e3eedeead feat(ui): complete bb-ui2.2 - shadcn/ui Setup
STORY:
The Unified UX epic needed a solid component foundation. We chose
shadcn/ui for its Tailwind integration and copy-paste philosophy.

COLLABORATION:
Initialized shadcn/ui with Next.js defaults and installed the base
component set needed for the unified shell:
- button: Primary actions
- card: Card containers
- badge: Status badges
- avatar: Agent avatars
- input: Search/filter inputs
- scroll-area: Scrollable containers
- separator: Visual dividers
- tooltip: Hover information
- dropdown-menu: Sorting and filtering

We also updated tsconfig.json with path aliases (@/*) to support
the shadcn import pattern.

DELIVERABLES:
- components.json configuration
- 9 shadcn components in components/ui/
- lib/utils.ts with cn() helper
- tsconfig.json with @/* path aliases

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS

CLOSES: bb-ui2.2
BLOCKS: bb-ui2.3, bb-ui2.5
2026-02-15 21:16:26 -08:00