|
1 | 1 | ## 1. Core Discovery & Resolution |
2 | 2 |
|
3 | | -- [ ] 1.1 Create `specIdToPath(specId: string, baseDir: string): string` and `pathToSpecId(filePath: string, specsDir: string): string` utility functions in `src/utils/` with `/`-normalization on all platforms |
4 | | -- [ ] 1.2 Refactor `getSpecIds()` in `src/utils/item-discovery.ts` to recursively discover specs using `fast-glob` pattern `**/spec.md` under `openspec/specs/`, deriving IDs from relative paths |
5 | | -- [ ] 1.3 Update all direct path construction (`path.join(SPECS_DIR, specId, 'spec.md')`) across the codebase to use `specIdToPath()` |
6 | | -- [ ] 1.4 Add unit tests for `specIdToPath` and `pathToSpecId` including Windows path separator normalization |
7 | | -- [ ] 1.5 Add unit tests for recursive `getSpecIds()` with flat, nested, mixed, and hidden directory fixtures |
| 3 | +- [x] 1.1 Create `specIdToPath(specId: string, baseDir: string): string` and `pathToSpecId(filePath: string, specsDir: string): string` utility functions in `src/utils/` with `/`-normalization on all platforms |
| 4 | +- [x] 1.2 Refactor `getSpecIds()` in `src/utils/item-discovery.ts` to recursively discover specs using `fast-glob` pattern `**/spec.md` under `openspec/specs/`, deriving IDs from relative paths |
| 5 | +- [x] 1.3 Update all direct path construction (`path.join(SPECS_DIR, specId, 'spec.md')`) across the codebase to use `specIdToPath()` |
| 6 | +- [x] 1.4 Add unit tests for `specIdToPath` and `pathToSpecId` including Windows path separator normalization |
| 7 | +- [x] 1.5 Add unit tests for recursive `getSpecIds()` with flat, nested, mixed, and hidden directory fixtures |
8 | 8 |
|
9 | 9 | ## 2. CLI Commands — Spec Subcommands |
10 | 10 |
|
11 | | -- [ ] 2.1 Update `src/commands/spec.ts` `show` subcommand to accept and resolve hierarchical spec IDs (e.g., `cli/show`) |
12 | | -- [ ] 2.2 Update `src/commands/spec.ts` `list` subcommand to display full hierarchical IDs and accept an optional subtree prefix argument |
13 | | -- [ ] 2.3 Update `src/commands/spec.ts` `validate` subcommand to accept and resolve hierarchical spec IDs |
14 | | -- [ ] 2.4 Update interactive selection prompts in `spec show` and `spec validate` to display hierarchical IDs |
| 11 | +- [x] 2.1 Update `src/commands/spec.ts` `show` subcommand to accept and resolve hierarchical spec IDs (e.g., `cli/show`) |
| 12 | +- [x] 2.2 Update `src/commands/spec.ts` `list` subcommand to display full hierarchical IDs and accept an optional subtree prefix argument |
| 13 | +- [x] 2.3 Update `src/commands/spec.ts` `validate` subcommand to accept and resolve hierarchical spec IDs |
| 14 | +- [x] 2.4 Update interactive selection prompts in `spec show` and `spec validate` to display hierarchical IDs |
15 | 15 |
|
16 | 16 | ## 3. CLI Commands — Top-Level Show, Validate, List |
17 | 17 |
|
18 | | -- [ ] 3.1 Update `src/commands/show.ts` type detection to resolve hierarchical spec IDs and include them in fuzzy-match suggestions |
19 | | -- [ ] 3.2 Update `src/commands/validate.ts` type detection and bulk validation (`--all`, `--specs`) to use recursive spec discovery |
20 | | -- [ ] 3.3 Update `src/core/list.ts` to use recursive spec discovery and support subtree filtering argument for `--specs` |
21 | | -- [ ] 3.4 Update `src/core/view.ts` dashboard to display hierarchical spec IDs in the specifications section |
| 18 | +- [x] 3.1 Update `src/commands/show.ts` type detection to resolve hierarchical spec IDs and include them in fuzzy-match suggestions |
| 19 | +- [x] 3.2 Update `src/commands/validate.ts` type detection and bulk validation (`--all`, `--specs`) to use recursive spec discovery |
| 20 | +- [x] 3.3 Update `src/core/list.ts` to use recursive spec discovery and support subtree filtering argument for `--specs` |
| 21 | +- [x] 3.4 Update `src/core/view.ts` dashboard to display hierarchical spec IDs in the specifications section |
22 | 22 |
|
23 | 23 | ## 4. Fuzzy Matching |
24 | 24 |
|
25 | | -- [ ] 4.1 Extend `src/utils/match.ts` to support leaf-segment matching — when no exact match, search for specs whose last path segment matches the query |
26 | | -- [ ] 4.2 Add tests for fuzzy matching with hierarchical IDs (full path typo, leaf match, multiple leaf matches) |
| 25 | +- [x] 4.1 Extend `src/utils/match.ts` to support leaf-segment matching — when no exact match, search for specs whose last path segment matches the query |
| 26 | +- [x] 4.2 Add tests for fuzzy matching with hierarchical IDs (full path typo, leaf match, multiple leaf matches) |
27 | 27 |
|
28 | 28 | ## 5. Archive & Delta Spec Handling |
29 | 29 |
|
30 | | -- [ ] 5.1 Update delta spec discovery in `src/core/archive.ts` / `src/core/specs-apply.ts` to recursively walk `changes/<name>/specs/` for delta specs at any depth |
31 | | -- [ ] 5.2 Update archive confirmation display to show full hierarchical paths for new and updated specs |
32 | | -- [ ] 5.3 Ensure archive creates intermediate directories when applying delta specs to new hierarchical paths |
33 | | -- [ ] 5.4 Add tests for archiving changes with hierarchical delta specs |
| 30 | +- [x] 5.1 Update delta spec discovery in `src/core/archive.ts` / `src/core/specs-apply.ts` to recursively walk `changes/<name>/specs/` for delta specs at any depth |
| 31 | +- [x] 5.2 Update archive confirmation display to show full hierarchical paths for new and updated specs |
| 32 | +- [x] 5.3 Ensure archive creates intermediate directories when applying delta specs to new hierarchical paths |
| 33 | +- [x] 5.4 Add tests for archiving changes with hierarchical delta specs |
34 | 34 |
|
35 | 35 | ## 6. Validation & Edge Cases |
36 | 36 |
|
37 | | -- [ ] 6.1 Update `src/commands/validate.ts` error messages and file path references to include full hierarchical spec paths |
38 | | -- [ ] 6.2 Update `src/core/validation/validator.ts` to handle hierarchical spec IDs in structured location paths |
39 | | -- [ ] 6.3 Add integration tests: mixed flat + hierarchical specs coexisting, subtree listing, and cross-platform path handling |
| 37 | +- [x] 6.1 Update `src/commands/validate.ts` error messages and file path references to include full hierarchical spec paths |
| 38 | +- [x] 6.2 Update `src/core/validation/validator.ts` to handle hierarchical spec IDs in structured location paths |
| 39 | +- [x] 6.3 Add integration tests: mixed flat + hierarchical specs coexisting, subtree listing, and cross-platform path handling |
40 | 40 |
|
41 | 41 | ## 7. Documentation & Cleanup |
42 | 42 |
|
43 | | -- [ ] 7.1 Update `openspec/AGENTS.md` with examples of hierarchical spec paths in templates and references |
44 | | -- [ ] 7.2 Update CLI help text for `spec list` to document subtree filtering syntax |
| 43 | +- [x] 7.1 Update `openspec/AGENTS.md` with examples of hierarchical spec paths in templates and references |
| 44 | +- [x] 7.2 Update CLI help text for `spec list` to document subtree filtering syntax |
0 commit comments