storkit: create 372_story_scaffold_auto_detects_tech_stack_and_configures_script_test

This commit is contained in:
dave
2026-03-23 14:08:16 +00:00
parent 78ff6d104e
commit fbab93f493
2 changed files with 23 additions and 32 deletions

View File

@@ -1,32 +0,0 @@
---
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

View File

@@ -0,0 +1,23 @@
---
name: "Scaffold auto-detects tech stack and configures script/test"
---
# Story 372: Scaffold auto-detects tech stack and configures script/test
## User Story
As a user setting up a new project with storkit, I want the scaffold to detect my project's tech stack and generate a working `script/test` automatically, so that agents can run tests immediately without manual configuration.
## Acceptance Criteria
- [ ] Scaffold detects Go projects (go.mod) and adds `go test ./...` to script/test
- [ ] Scaffold detects Node.js projects (package.json) and adds `npm test` to script/test
- [ ] Scaffold detects Rust projects (Cargo.toml) and adds `cargo test` to script/test
- [ ] Scaffold detects Python projects (pyproject.toml or requirements.txt) and adds `pytest` to script/test
- [ ] Scaffold handles multi-stack projects (e.g. Go + Next.js) by combining the relevant test commands
- [ ] project.toml component entries are generated to match detected tech stack
- [ ] Falls back to the generic 'No tests configured' stub if no known stack is detected
## Out of Scope
- TBD