story-kit: done 225_story_surface_merge_conflicts_and_failures_in_the_web_ui

This commit is contained in:
Dave
2026-02-27 16:41:20 +00:00
parent 1168917071
commit 7574e3b4bc
3 changed files with 299 additions and 17 deletions

View File

@@ -131,22 +131,23 @@ Based on the tech stack answers, use `write_file` to write `script/test` — a b
The script must start with `#!/usr/bin/env bash` and `set -euo pipefail`.
## Step 4: Project Configuration
Use `write_file` to write `.story_kit/project.toml` with `[[component]]` entries that match the chosen stack. Each component needs:
- `name` — component identifier (e.g. "backend", "frontend", "app")
- `path` — relative path from project root (use "." for root)
- `setup` — list of setup commands (e.g. ["pnpm install"], ["cargo check"])
- `teardown` — list of cleanup commands (usually empty)
The scaffold has written `.story_kit/project.toml` with example `[[component]]` sections. You must replace these examples with real definitions that match the project's actual tech stack.
Also include at least one `[[agent]]` entry for a coder agent:
```toml
[[agent]]
name = "coder-1"
stage = "coder"
role = "Implements features across all components."
model = "sonnet"
max_turns = 50
max_budget_usd = 5.00
```
First, inspect the project structure to identify the tech stack:
- Use `list_directory(".")` to see top-level files and directories
- Look for tech stack markers: `Cargo.toml` (Rust/Cargo), `package.json` (Node/frontend), `pyproject.toml` or `requirements.txt` (Python), `go.mod` (Go), `Gemfile` (Ruby)
- Check subdirectories like `frontend/`, `backend/`, `app/`, `web/` for nested stacks
- If you find a `package.json`, check whether `pnpm-lock.yaml`, `yarn.lock`, or `package-lock.json` exists to determine the package manager
Then use `read_file(".story_kit/project.toml")` to see the current content, keeping the `[[agent]]` sections intact.
Finally, use `write_file` to rewrite `.story_kit/project.toml` with real `[[component]]` entries. Each component needs:
- `name` — component identifier (e.g. "backend", "frontend", "app")
- `path` — relative path from project root (use "." for root, "frontend" for a frontend subdirectory)
- `setup` — list of setup commands that install dependencies and verify the build (e.g. ["pnpm install"], ["cargo check"])
- `teardown` — list of cleanup commands (usually [])
Preserve all `[[agent]]` entries from the existing file. Only replace the `[[component]]` sections.
## Step 5: Commit & Finish
After writing all files: