Commit b10df37
feat: Add --builtin-types flag and rename default type dir (#38)
This commit adds two improvements to the validate-dsl command:
1. **New `--builtin-types` flag**: Allows using built-in types (Job,
Requirement, ADR) without requiring a custom type directory. This
makes it easier to get started with DSL validation.
2. **Renamed default type directory**: Changed from `.spec-types` to
`spec_types` for Python package name validity. The dot prefix made
it an invalid Python package name.
**Changes:**
- Added `--builtin-types` / `-b` flag to CLI
- Updated `cmd_validate_dsl()` to load builtin types when flag is set
- Changed default `--type-dir` from `.spec-types` to `spec_types`
- Updated help text examples to reflect new options
**Usage:**
```bash
# Use built-in types
spec-check validate-dsl --builtin-types specs/
# Use custom types (new default location)
spec-check validate-dsl --type-dir spec_types/
```
**Testing:**
- All 274 tests pass
- Manually tested new --builtin-types flag
- Help text displays correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent dfe6702 commit b10df37
1 file changed
+27
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | 258 | | |
265 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
| |||
733 | 738 | | |
734 | 739 | | |
735 | 740 | | |
736 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
737 | 745 | | |
738 | 746 | | |
739 | 747 | | |
740 | 748 | | |
741 | 749 | | |
742 | 750 | | |
743 | | - | |
| 751 | + | |
744 | 752 | | |
745 | 753 | | |
746 | 754 | | |
| |||
760 | 768 | | |
761 | 769 | | |
762 | 770 | | |
763 | | - | |
| 771 | + | |
764 | 772 | | |
765 | 773 | | |
766 | 774 | | |
| |||
793 | 801 | | |
794 | 802 | | |
795 | 803 | | |
796 | | - | |
797 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
798 | 813 | | |
799 | 814 | | |
800 | 815 | | |
| |||
0 commit comments