Keep master's quiet system/rate_limit_event handlers while preserving
the story-62 permission_request handler (the core feature).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the "agents-at-work" list section from AgentPanel. The roster
badges with flying lozenge animations already convey which agents are
active, making the redundant list unnecessary.
- Remove StatusBadge, DiffCommand, EditorCommand components
- Remove expandedKey, logEndRefs, fade-timer state and effects
- Remove handleStop (no more Stop buttons)
- Keep agents state + SSE subscriptions (roster badges still need it)
- Delete diff-command and fade-out tests (feature removed)
- Add test asserting no agent-entry divs are rendered
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add data-testid="roster-dot-{name}" to both active and idle dot spans for testability
- Change idle badge from grey (#888, #555, #333) to green (#3fb950, #3fb95015, #3fb95040)
- Update idle label from "idle" to "available" to reinforce positive availability signal
- Update tooltip from "— idle" to "— available" for consistency
- Active/running agents retain blue (#58a6ff) pulsing dot styling unchanged
- Add 4 new Vitest tests covering green idle dot, green badge styling, blue active dot, and blue active badge
Closes story 81: Agent roster badges show availability state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolves conflict in AgentPanel.test.tsx between story 73 (fade-out)
and story 74 (lozenge fly animation) - kept both the assertion and
the comment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
waitFor's internal polling setInterval is itself faked when vi.useFakeTimers()
is active, causing it to hang indefinitely. Replace the affected assertions
with act + multiple Promise.resolve() to flush React state updates, and a
direct assertion after act+vi.advanceTimersByTime instead of a second waitFor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements Story 74: agent lozenges now animate as fixed-position overlays
that fly from the roster badge in AgentPanel to the story slot in StagePanel
(and back when the agent is removed), satisfying all acceptance criteria.
Key changes:
- LozengeFlyContext.tsx (new): coordinates FLIP animations via React context.
LozengeFlyProvider tracks pipeline changes, hides slot lozenges during
fly-in (useLayoutEffect before paint), then creates a portal-rendered
fixed-position clone that transitions from roster → slot (or reverse).
z-index 9999 ensures the clone travels above all other UI elements.
- AgentPanel.tsx: RosterBadge registers its DOM element with the context
so fly animations know the correct start/end coordinates.
- StagePanel.tsx: AgentLozenge registers its DOMRect on every render via
useLayoutEffect (for fly-out) and reads pendingFlyIns to stay hidden
while a fly-in clone is in flight. Added align-self: flex-start so the
lozenge maintains its intrinsic width and never stretches in the panel.
- Chat.tsx: right-column panels wrapped in LozengeFlyProvider.
- LozengeFlyContext.test.tsx (new): 10 tests covering fixed width,
fly-in/fly-out clone creation, portal placement, opacity lifecycle,
and idle vs active visual distinction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove tdd-gates, story-todos, and test-protection e2e specs that
tested deleted GatePanel, TodoPanel, and ReviewPanel. Rename the
surviving boot smoke test from review-panel.spec.ts to smoke.spec.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add notify-based filesystem watcher for .story_kit/work/ that
auto-commits changes with deterministic messages and broadcasts
events over WebSocket. Push full pipeline state (Upcoming, Current,
QA, To Merge) to frontend on connect and after every watcher event.
Strip dead UI: remove ReviewPanel, GatePanel, TodoPanel,
UpcomingPanel and all associated REST polling. Replace with 4
generic StagePanel components driven by WebSocket. Simplify
AgentPanel to roster-only.
Delete all 11 workflow HTTP endpoints and 16 request/response types
from the server. Clean dead code from workflow module. MCP tools
call Rust functions directly and need none of the HTTP layer.
Net: ~4,100 lines deleted, ~400 added.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate Claude Code provider into the chat UI alongside regular
Ollama/Anthropic providers. Updates AgentPanel and Chat components.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Server detects .story_kit/ in cwd or parent directories at startup and
automatically opens the project. MCP tools work immediately without
manual project-open step. Falls back to cwd when no .story_kit/ found.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bug 2: Expand triangle now works when no agents are started - shows
"No agents started" message. AgentPanel moved to top of panels.
Bug 3: Run `git worktree prune` before `git worktree add` to clean
stale references from externally-deleted worktree directories.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add base_branch detection to WorktreeInfo (from project root HEAD)
- Expose base_branch in AgentInfo API response
- Add {{base_branch}} template variable to agent config rendering
- Show git difftool command with copy-to-clipboard in AgentPanel UI
- Add diff command instruction to coder agent prompts
- Add AgentPanel tests for diff command rendering and clipboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
getAnthropicModels() was called unconditionally on mount, causing a
console error when no API key was set. Now chains the call after
getAnthropicApiKeyExists() confirms a key is present.
Includes regression test added before the fix per bug workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use --resume <session_id> with claude -p so the web UI claude-code-pty
provider maintains full conversation context across messages, identical
to a long-running terminal Claude Code session.
Changes:
- Capture session_id from claude -p stream-json system event
- Pass --resume on subsequent messages in same chat session
- Thread session_id through ProviderConfig, ChatResult, WsResponse
- Frontend stores sessionId per chat, clears on New Session
- Unset CLAUDECODE env to allow nested spawning from server
- Wait for clean process exit to ensure transcript flush to disk
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace single [agent] config with multi-agent [[agent]] roster system.
Each agent has name, role, model, allowed_tools, max_turns, max_budget_usd,
and system_prompt fields that map to Claude CLI flags at spawn time.
- AgentConfig expanded with structured fields, validated at startup (panics
on duplicate names, empty names, non-positive budgets/turns)
- Backwards-compatible: legacy [agent] format auto-wraps with deprecation warning
- AgentPool uses composite "story_id:agent_name" keys for concurrent agents
- agent_name added to AgentEvent variants, AgentInfo, start/stop/subscribe APIs
- GET /agents/config returns roster, POST /agents/config/reload hot-reloads
- POST /agents/start accepts optional agent_name, /agents/stop requires it
- SSE route updated to /agents/:story_id/:agent_name/stream
- Frontend: roster badges, agent selector dropdown, composite-key state
- Project root initialized to cwd at startup so config endpoints work immediately
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add POST /workflow/stories/create endpoint that auto-assigns story
numbers, generates correct front matter, and writes to upcoming/.
Add slugify_name and next_story_number helpers with full test coverage.
Add frontend createStory API method and types.
Update README to recommend creation API for agents.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add git worktree isolation for concurrent story agents. Each agent now
runs in its own worktree with setup/teardown commands driven by
.story_kit/project.toml config. Agents stream output via SSE and support
start/stop lifecycle with Pending/Running/Completed/Failed statuses.
Backend: config.rs (TOML parsing), worktree.rs (git worktree lifecycle),
refactored agents.rs (broadcast streaming), agents_sse.rs (SSE endpoint).
Frontend: AgentPanel.tsx with Run/Stop buttons and streaming output log.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Single env var STORYKIT_PORT configures backend port, frontend proxy target,
frontend dev server port (port + 2172), and WebSocket host. Added .story_kit_port
to .gitignore and .ignore to prevent git tracking and cargo watch restart loops.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add configurable port via STORYKIT_PORT env var (default 3001). Server
prints machine-readable STORYKIT_PORT=<port> on startup and writes
.story_kit_port file for discovery. Frontend proxy and WebSocket read
VITE_STORYKIT_PORT env var instead of hardcoding port 3001.
7 new tests (4 backend, 3 frontend) all passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All acceptance criteria verified. Always show story name/id in TODO
panel regardless of story count. Archive story.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add GET /workflow/upcoming endpoint that reads .story_kit/stories/upcoming/
and returns story IDs with names parsed from frontmatter. Add UpcomingPanel
component wired into Chat view with loading, error, empty, and list states.
12 new tests (3 backend, 9 frontend) all passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add TodoPanel that displays unchecked acceptance criteria from current
story files. Backend parses `- [ ]` lines from markdown, frontend
shows them in a panel with refresh. Includes 4 Rust unit tests,
3 Vitest tests, 3 Playwright E2E tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Spike proved: spawning claude -p in a PTY from Rust gets Max subscription
billing. Multi-agent concurrency confirmed with session resumption.
Includes AgentPool REST API, claude-code provider, and spike documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
# .ignore
Reverts port changes made during the spike back to default (3001/5173).
Adds two new stories for multi-worktree support: dynamic port management
(story 32) and worktree diff inspection with editor integration (story 33).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Proves that spawning `claude -p` in a pseudo-terminal from Rust gets Max
subscription billing (apiKeySource: "none", rateLimitType: "five_hour")
instead of per-token API charges. Concurrent agents run in parallel PTY
sessions with session resumption via --resume for multi-turn conversations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add end-to-end coverage tracking: backend collects vitest coverage,
records metrics with threshold/baseline tracking, and blocks acceptance
on regression. Frontend displays coverage in gate/review panels with
a "Collect Coverage" button. Includes 20 Rust tests, 17 Vitest tests,
and 14 Playwright E2E tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add workflow engine with acceptance gates, test recording, and review
queue. Frontend displays gate status (blocked/ready), test summaries,
failing badges, and warnings. Proceed action is disabled when gates
are not met. Includes 13 unit tests (Vitest) and 9 E2E tests
(Playwright) covering all five acceptance criteria.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>