---
name: "No-arg huskies in empty directory skips scaffold"
---

# Bug 371: No-arg huskies in empty directory skips scaffold

## Description

When running `huskies` with no path argument from an empty directory (no `.huskies/`), the server starts but never calls `open_project` or the scaffold. The `find_story_kit_root` check fails to find `.huskies/`, so the fallback at main.rs:179-186 just sets `project_root = cwd` without scaffolding. This means no `.huskies/`, no `project.toml`, no `.mcp.json`, no `CLAUDE.md` — the project is non-functional.

The explicit path branch (`huskies .`) 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 `huskies` (no path argument)
4. Observe that no scaffold is created — `.huskies/`, `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 `huskies` with no arguments from a directory without `.huskies/` should scaffold the project the same as `huskies .` does — calling `open_project` and triggering `ensure_project_root_with_story_kit`.

## Acceptance Criteria

- [ ] Running `huskies` with no args from a dir without `.huskies/` 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 `huskies` completes startup, `.huskies/project.toml`, `.mcp.json`, `CLAUDE.md`, and `script/test` all exist
