# Issue tracker: Local Markdown ## Lifecycle Active feature work lives in `.scratch//`. When a feature is complete, `/close-feature` graduates it into `docs/`. This keeps in-progress work isolated from the permanent record. ``` /grilling → /to-prd → /to-issues → .scratch// ↓ all Status: done /close-feature ↓ docs/ ``` ## During a feature (in .scratch/) - `.scratch//PRD.md` — narrative PRD - `.scratch//prd.json` — machine-readable story list (used by ralph) - `.scratch//issues/-.md` — user stories, numbered from `01` - Triage state is a `Status:` line near the top of each issue (see `triage-labels.md`) - Comments and conversation history append under a `## Comments` heading ## After close (in docs/) - `docs/PRD.md` — narrative PRD (appended under a feature heading) - `docs/prd.json` — merged story list - `docs/issues/-.md` — renumbered from next available slot - `docs/adr/-.md` — any ADRs from the feature, renumbered ## Closing a feature Run `/close-feature ` when all issues have `Status: done`. The skill will: 1. Verify all issues are done (stops if any are incomplete) 2. Show what will move and ask for confirmation 3. `git mv` everything into `docs/` with correct numbering 4. Merge prd.json user stories into `docs/prd.json` 5. Delete `.scratch//` and commit The agent should also **proactively offer** to run `/close-feature` when it notices all issues in a `.scratch//` are done. ## When a skill says "publish to the issue tracker" Create a new file under `.scratch//issues/` following the numbering convention. Create the directory if it doesn't exist. ## When a skill says "fetch the relevant ticket" Read the file at the referenced path. The user will normally pass the path or issue number directly. Check both `docs/issues/` (closed features) and `.scratch/*/issues/` (active features).