Commit Graph

1144 Commits

Author SHA1 Message Date
Dave
94d05c905b Noting existence of mcp server 2026-02-19 19:46:48 +00:00
Dave
6ea44fb5c4 Add story 38: Auto-Open Project on Server Startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:37:07 +00:00
Dave
45f1234a06 Accept spike 2: MCP HTTP endpoint for workflow and agent tools
Adds POST /mcp endpoint speaking MCP Streamable HTTP (JSON-RPC 2.0)
with 12 tools for workflow management and agent orchestration.
Supports both JSON and SSE response modes. Includes real-time agent
output streaming over SSE, Content-Type validation, and 15 integration
tests (134 total).

Tools: create_story, validate_stories, list_upcoming, get_story_todos,
record_tests, ensure_acceptance, start_agent, stop_agent, list_agents,
get_agent_config, reload_agent_config, get_agent_output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:34:03 +00:00
Dave
8f095a3ec9 Renamed worktree diff story 2026-02-19 19:03:59 +00:00
Dave
6d57b06636 Accept story 34: Per-Project Agent Configuration and Role Definitions
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>
2026-02-19 18:46:14 +00:00
Dave
f9fc2472fd Splitting up the editor and diff stories 2026-02-19 18:22:19 +00:00
Dave
c94b3d4450 Accept story 36: Enforce Front Matter on All Story Files
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>
2026-02-19 18:02:48 +00:00
Dave
5e5cdd9b2f Accept story 30: Worktree-based agent orchestration
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>
2026-02-19 17:58:53 +00:00
Dave
f7902c3569 Merge story-32: Multi-Instance Worktree Support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

# Conflicts:
#	.story_kit/stories/archived/32_multi_instance_worktree_support.md
#	.story_kit/stories/current/30_worktree_agent_orchestration.md
#	.story_kit/stories/current/32_multi_instance_worktree_support.md
#	.story_kit/stories/current/36_enforce_story_front_matter.md
#	.story_kit/stories/upcoming/29_directory_based_workflow_coordination.md
#	.story_kit/stories/upcoming/32_worktree_agent_orchestration.md
#	.story_kit/stories/upcoming/33_worktree_diff_and_editor_integration.md
#	.story_kit/stories/upcoming/34_agent_configuration_and_roles.md
#	.story_kit/stories/upcoming/35_agent_security_and_sandboxing.md
2026-02-19 17:17:21 +00:00
Dave
e54209eb5a Story 32: Multi-Instance Worktree Support
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>
2026-02-19 17:14:33 +00:00
Dave
12542f10a8 Move story 32 to current and rename to multi-instance worktree support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:58:33 +00:00
Dave
79d6868a82 Move story 36 to current: Enforce Front Matter on All Story Files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:56:14 +00:00
Dave
03852effde Remove duplicate story 34 security file (renumbered to 35)
The security/sandboxing story was renumbered from 34 to 35 but the
old 34_agent_security_and_sandboxing.md was never deleted. Story 34
is now Per-Project Agent Configuration and Role Definitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:51:13 +00:00
Dave
af71c16e1d Backfill YAML front matter on all story files
Add name and test_plan front matter to 31 story files that were
missing it. Upcoming stories get test_plan: pending, current and
archived get test_plan: approved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:50:04 +00:00
Dave
59bb4bff90 Renumber agent security and sandboxing story from 34 to 35
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:45:45 +00:00
Dave
775e6630ce Move story 30 to current: Worktree-Based Agent Orchestration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:43:45 +00:00
Dave
baee84dfa5 Move story 32 to current and rename to multi-instance worktree support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:39:14 +00:00
Dave
b4f2eacea6 Accept story 28: Show Remaining Test TODOs in the UI
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>
2026-02-19 16:04:05 +00:00
Dave
62905a6373 Add story 36: Enforce front matter on all story files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:01:05 +00:00
Dave
bf0fb5bcf6 Add story 35: Agent security and sandboxing, add bypassPermissions to agent spawns
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:56:05 +00:00
Dave
3807f0e625 Merge story-31: View Upcoming Stories
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

# Conflicts:
#	frontend/src/api/workflow.ts
#	frontend/src/components/Chat.test.tsx
#	frontend/src/components/Chat.tsx
#	server/src/http/workflow.rs
2026-02-19 15:54:02 +00:00
Dave
939387104b Story 31: View Upcoming Stories
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>
2026-02-19 15:51:12 +00:00
Dave
5f5c09461b Add story 34: per-project agent configuration and role definitions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:49:07 +00:00
Dave
f942a00b96 Merge branch 'feature/story-28-ui-show-test-todos' 2026-02-19 15:36:04 +00:00
Dave
2c3003d721 Story 28: Show remaining test TODOs in the UI
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>
2026-02-19 15:33:45 +00:00
Dave
50c905d868 Merge spike/claude-code-integration: PTY-based Claude Code with multi-agent support
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
2026-02-19 15:30:56 +00:00
Dave
f17cd63d2f Revert spike ports to 3001/5173, add stories 32 and 33
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>
2026-02-19 15:30:23 +00:00
Dave
68a19c393e Spike: PTY-based Claude Code integration with multi-agent concurrency
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>
2026-02-19 15:25:22 +00:00
Dave
644644d5b3 Update story 28 to read TODOs from story file instead of tests/todo/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:08:20 +00:00
Dave
8973d22afc Renumber upcoming stories and add .ignore updates
Drop story 28, renumber 30-33 to 28-31, add story 31 (View Upcoming
Stories), and extend .ignore for .claude/ and .story_kit/ directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:07:06 +00:00
Dave
9864e0a9e6 Finished a few more stories 2026-02-19 14:53:44 +00:00
Dave
8f684a6ca4 Story 27: Coverage tracking (full-stack)
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>
2026-02-19 14:45:57 +00:00
Dave
8f0bc971bf Ensuring we keep the current storykit stories folder 2026-02-19 12:59:02 +00:00
Dave
013b28d77f Story 26: Establish TDD workflow and quality gates
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>
2026-02-19 12:54:04 +00:00
Dave
d0a1da2176 Update Story Kit workflow docs and move story 26 2026-02-17 14:12:45 +00:00
Dave
5854ff5593 Consolidate upcoming TDD stories 2026-02-17 13:42:59 +00:00
Dave
37ef7abb2f Deleted orphan file 2026-02-17 13:39:46 +00:00
Dave
3302b62839 Rename workflow to story-driven test workflow 2026-02-17 13:38:31 +00:00
Dave
3079ea194f Add story for UI test TODO visibility 2026-02-17 13:35:27 +00:00
Dave
4c887d93b5 Refocus workflow on TDD and reorganize stories 2026-02-17 13:34:32 +00:00
Dave
1f4f10930f Archived story 25 2026-02-16 20:34:21 +00:00
Dave
f1e5ac72e0 Project creation is workign 2026-02-16 20:34:03 +00:00
Dave
caf293a8c4 Renamed .living_spec in a few more places 2026-02-16 15:45:44 +00:00
Dave
3865883998 Renamed living spec to Story Kit 2026-02-16 15:44:20 +00:00