From 80d149c40426f76fea4d6e2e45b6b09d77484318 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 24 Feb 2026 13:49:46 +0000 Subject: [PATCH] story-kit: create 116_story_story_kit_init_command_scaffolds_a_new_project --- ...it_init_command_scaffolds_a_new_project.md | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/.story_kit/work/1_upcoming/116_story_story_kit_init_command_scaffolds_a_new_project.md b/.story_kit/work/1_upcoming/116_story_story_kit_init_command_scaffolds_a_new_project.md index ce344a2..413c76c 100644 --- a/.story_kit/work/1_upcoming/116_story_story_kit_init_command_scaffolds_a_new_project.md +++ b/.story_kit/work/1_upcoming/116_story_story_kit_init_command_scaffolds_a_new_project.md @@ -1,17 +1,54 @@ --- -name: "story-kit init command scaffolds a new project" +name: "New project init scaffolds structure and guides user through setup" --- -# Story 116: story-kit init command scaffolds a new project +# Story 116: New project init scaffolds structure and guides user through setup ## User Story -As a ..., I want ..., so that ... +As a new Story Kit user, I want to point at an empty directory and have everything I need scaffolded automatically, then be guided through the project-specific setup (goals, tech stack), so that I can start writing stories immediately without manual configuration. + +## Context + +Currently `scaffold_story_kit()` in `server/src/io/fs.rs`: +- Creates the old `stories/archive/` structure instead of the `work/` pipeline dirs +- Writes `00_CONTEXT.md` and `STACK.md` with content that describes Story Kit itself, not a blank template for the user's project +- Does not create `project.toml` (agent config) +- Does not create `.mcp.json` (MCP endpoint registration) +- Does not run `git init` +- The embedded `STORY_KIT_README` constant is a stale copy that diverges from the actual `.story_kit/README.md` checked into this repo + +There are two categories of work: +1. **Deterministic** — things that are the same for every project and can be done by `scaffold_story_kit()` without user input +2. **Interactive** — things that depend on the user's project (goals, tech stack, language) and need a guided conversation ## Acceptance Criteria -- [ ] TODO +### Deterministic scaffold (`scaffold_story_kit`) + +- [ ] Creates the `work/` pipeline: `work/1_upcoming/`, `work/2_current/`, `work/3_qa/`, `work/4_merge/`, `work/5_archived/` +- [ ] Removes creation of the old `stories/` and `stories/archive/` directories +- [ ] Creates `specs/`, `specs/tech/`, `specs/functional/` (unchanged) +- [ ] Creates `script/test` with the existing stub (unchanged) +- [ ] Writes `.story_kit/README.md` — should be the canonical workflow doc (sync with or embed the real README.md from this repo, not the stale `STORY_KIT_README` constant) +- [ ] Writes `.story_kit/project.toml` with a sensible default agent config (one coder agent, one qa agent, one mergemaster — using `sonnet` model aliases) +- [ ] Writes `.mcp.json` in the project root pointing to the running server's MCP endpoint (reuse `write_mcp_json` from `worktree.rs`) +- [ ] Writes `specs/00_CONTEXT.md` as a blank template with section headings (High-Level Goal, Core Features, Domain Definition, Glossary) and placeholder instructions — NOT content about Story Kit itself +- [ ] Writes `specs/tech/STACK.md` as a blank template with section headings (Core Stack, Coding Standards, Quality Gates, Libraries) and placeholder instructions — NOT content about Story Kit itself +- [ ] Runs `git init` if the directory is not already a git repo +- [ ] Makes an initial commit with the scaffolded files + +### Interactive onboarding (chat agent guides the user) + +- [ ] After scaffold completes and the user lands in the chat UI, the system prompt or first message tells the agent it is in "new project onboarding" mode +- [ ] The agent asks the user what the project is about (goal, domain) and writes a populated `specs/00_CONTEXT.md` based on their answers +- [ ] The agent asks the user what tech stack they want (language, framework, build tools, test runner, linter) and writes a populated `specs/tech/STACK.md` based on their answers +- [ ] The agent updates `script/test` to invoke the project's actual test runner (e.g. `cargo test`, `pytest`, `pnpm test`) +- [ ] The agent updates `project.toml` component setup commands to match the chosen stack (e.g. `pnpm install` for a JS project, `cargo check` for Rust) +- [ ] After onboarding completes, the agent commits the populated specs and tells the user they're ready for Story #1 ## Out of Scope -- TBD +- Generating actual application code or project boilerplate (e.g. `cargo init`, `create-react-app`) — Story Kit is stack-agnostic, it only scaffolds the `.story_kit/` workflow layer +- Template galleries or presets for common stacks (future enhancement) +- Migrating existing projects that already have a `.story_kit/` directory