storkit: create 370_bug_scaffold_does_not_create_mcp_json_in_project_root

This commit is contained in:
dave
2026-03-23 12:43:48 +00:00
parent b8365275d8
commit efdb0c5814

View File

@@ -6,23 +6,28 @@ name: "Scaffold does not create .mcp.json in project root"
## Description ## Description
When storkit scaffolds a new project, it does not write `.mcp.json` to the project root. Without this file, agents spawned in worktrees cannot find the MCP server, causing `--permission-prompt-tool mcp__storkit__prompt_permission not found` errors and agent failures. Two related problems with project setup:
1. When the user clicks the "project setup" button in the web UI to open a new project, the scaffold does not reliably run — the `.storkit/` directory and associated files may not be created.
2. Even when the scaffold does run, it does not write `.mcp.json` to the project root. Without this file, agents spawned in worktrees cannot find the MCP server, causing `--permission-prompt-tool mcp__storkit__prompt_permission not found` errors and agent failures.
## How to Reproduce ## How to Reproduce
1. Create a new empty directory and run `storkit /path/to/new-project` 1. Open the storkit web UI and use the project setup button to open a new project directory
2. Check the project root for `.mcp.json` 2. Check whether the full scaffold was created (`.storkit/`, `CLAUDE.md`, `script/test`, etc.)
3. Check the project root for `.mcp.json`
## Actual Result ## Actual Result
`.mcp.json` is not created in the project root. Only worktrees get `.mcp.json` written (via `write_mcp_json` in `worktree.rs`). Agents fail because MCP tools are unavailable. The scaffold may not run when using the UI project setup flow. When it does run, `.mcp.json` is not created in the project root. Agents fail because MCP tools are unavailable.
## Expected Result ## Expected Result
The scaffold writes `.mcp.json` to the project root pointing to the server's port, so agents and the CLI can discover the MCP endpoint. Clicking the project setup button reliably runs the full scaffold, including `.mcp.json` pointing to the server's port.
## Acceptance Criteria ## Acceptance Criteria
- [ ] The web UI project setup button triggers the full scaffold for new projects
- [ ] scaffold_story_kit writes .mcp.json to the project root with the server's port - [ ] scaffold_story_kit writes .mcp.json to the project root with the server's port
- [ ] Existing .mcp.json is not overwritten if already present - [ ] Existing .mcp.json is not overwritten if already present
- [ ] .mcp.json is included in .gitignore since the port is environment-specific - [ ] .mcp.json is included in .gitignore since the port is environment-specific