---
name: "store.json created at project root instead of inside .huskies/"
---

# Bug 457: store.json created at project root instead of inside .huskies/

## Description

In main.rs, JsonFileStore is initialised with a hardcoded relative path `PathBuf::from("store.json")`, which creates the file in whatever directory the process was started from (typically the project root). It should live inside `.huskies/` alongside other runtime state files. The scaffold .gitignore also lists `store.json` as a root-level pattern rather than `.huskies/store.json`, and the scaffold comment/entries array in scaffold.rs explicitly lists `store.json` as a root-level file to ignore — both need updating.

## How to Reproduce

1. Run huskies in any project directory. 2. Observe that store.json is created at the project root rather than inside .huskies/.

## Actual Result

store.json is created at the working directory root, polluting the project root and not being gitignored by the scaffold-generated .gitignore unless the user happens to have a catch-all pattern.

## Expected Result

store.json is created at project_root/.huskies/store.json. The scaffold-generated .gitignore ignores .huskies/store.json. The scaffold comment and entries array in scaffold.rs no longer list store.json as a root-level file.

## Acceptance Criteria

- [ ] main.rs initialises JsonFileStore at project_root.join(".huskies").join("store.json") instead of PathBuf::from("store.json")
- [ ] scaffold.rs .gitignore entries updated: store.json root entry removed, .huskies/store.json added
- [ ] scaffold.rs comment on line ~333 updated to reflect store.json is no longer at the root
- [ ] wizard_tools.rs filter for store.json updated to match the new path if needed
- [ ] Existing deployments with a root-level store.json are not broken (huskies migrates or falls back gracefully)
