diff --git a/.storkit/work/1_backlog/371_bug_no_arg_storkit_in_empty_directory_skips_scaffold.md b/.storkit/work/1_backlog/371_bug_no_arg_storkit_in_empty_directory_skips_scaffold.md new file mode 100644 index 0000000..4c85493 --- /dev/null +++ b/.storkit/work/1_backlog/371_bug_no_arg_storkit_in_empty_directory_skips_scaffold.md @@ -0,0 +1,32 @@ +--- +name: "No-arg storkit in empty directory skips scaffold" +--- + +# Bug 371: No-arg storkit in empty directory skips scaffold + +## Description + +When running `storkit` with no path argument from an empty directory (no `.storkit/`), the server starts but never calls `open_project` or the scaffold. The `find_story_kit_root` check fails to find `.storkit/`, so the fallback at main.rs:179-186 just sets `project_root = cwd` without scaffolding. This means no `.storkit/`, no `project.toml`, no `.mcp.json`, no `CLAUDE.md` — the project is non-functional. + +The explicit path branch (`storkit .`) works correctly because it calls `open_project` → `ensure_project_root_with_story_kit` → `scaffold_story_kit`. The no-arg branch should do the same. + +## How to Reproduce + +1. Create a new empty directory +2. cd into it +3. Run `storkit` (no path argument) +4. Observe that no scaffold is created — `.storkit/`, `CLAUDE.md`, `.mcp.json`, etc. are all missing + +## Actual Result + +Server starts with project_root set to cwd but no scaffold runs. The project is non-functional — no agent config, no MCP endpoint, no work pipeline directories. + +## Expected Result + +Running `storkit` with no arguments from a directory without `.storkit/` should scaffold the project the same as `storkit .` does — calling `open_project` and triggering `ensure_project_root_with_story_kit`. + +## Acceptance Criteria + +- [ ] Running `storkit` with no args from a dir without `.storkit/` calls `open_project` and triggers the full scaffold +- [ ] The no-arg fallback path in main.rs calls `open_project(cwd)` instead of just setting project_root directly +- [ ] After `storkit` completes startup, `.storkit/project.toml`, `.mcp.json`, `CLAUDE.md`, and `script/test` all exist