tidied up CLAUDE.md
Dependencies
- [2]
DS22DKV3added shell script integration tests. - [3]
KZKLAINJrun out of space on nest, cleaned out
Change contents
- edit in CLAUDE.md at line 10
---## 🚨 Critical Database Safety### ALWAYS Use Test Database for Testing**CORRECT:**```bashcd shell_scripts./test_sql.sh ../db/test.duckdb > test.txt 2>&1```- `db/skraak.duckdb` = **PRODUCTION** (1.4M files)- `db/test.duckdb` = **TEST** (safe for testing)- **Always specify test.duckdb explicitly**### Testing Best Practices- **Always pipe to file** (prevents token overflow from large output)- Navigate to `shell_scripts/` before running tests- Verify: `rg '"result":' test.txt | wc -l` - edit in CLAUDE.md at line 11
--- - replacement in CLAUDE.md at line 16
- **`tools/`** - MCP/CLI tools (one file per tool, defines input/output types)- **`cmd/mcp.go`** - MCP adapters (only file importing MCP SDK)- **`tools/`** - CLI tools (one file per tool, defines input/output types) - replacement in CLAUDE.md at line 26
main.go → CLI dispatcher (mcp | import | sql | dataset | ...)cmd/mcp.go → MCP server + thin adapters (ONLY MCP SDK import)main.go → CLI dispatcher (import | sql | dataset | ...) - replacement in CLAUDE.md at line 28
tools/*.go → Core logic (plain Go structs, no MCP dependency)tools/*.go → Core logic (plain Go structs) - replacement in CLAUDE.md at line 40
├── cmd/ # MCP adapters + CLI commands├── cmd/ # CLI commands - replacement in CLAUDE.md at line 42
├── tools/ # tools (MCP-free)├── tools/ # tools - edit in CLAUDE.md at line 45
├── resources/schema.go # Schema resources - edit in CLAUDE.md at line 57
### MCP Server```bash./skraak mcp --db ./db/skraak.duckdb``` - edit in CLAUDE.md at line 68[3.1197342]→[3.1197342:1197511](∅→∅),[3.1197511]→[2.23108:23239](∅→∅),[2.23239]→[3.1197511:1197641](∅→∅),[3.1197511]→[3.1197511:1197641](∅→∅)
### Shell Scripts (in shell_scripts/)All scripts default to `../db/test.duckdb`:```bashcd shell_scripts./test_sql.sh ../db/test.duckdb > test.txt 2>&1 # SQL tool./test_cluster_import.sh # cluster_import.go integration./test_mapping_validation.sh # ValidateMappingAgainstDB integration# Verifyrg '"result":' test.txt | wc -l # Count successesrg '"isError":true' test.txt | wc -l # Count expected errors``` - replacement in CLAUDE.md at line 71
| File | Why Skipped ||------|------------|| `utils/audio_player.go` | Thin wrapper over `oto` (requires audio hardware). No testable logic without hardware; `Resample` already covered in `resample_test.go` |`utils/audio_player.go` is a thin wrapper over `oto` (requires audio hardware). No testable logic without hardware; `Resample` already covered in `resample_test.go` | - edit in CLAUDE.md at line 79
```### Shell Scripts (in shell_scripts/)```# make sure db/test.duckdb available and FK's applied.# 550 line output, beware token overflow# runs all unit tests and shell script integration testsmake test - edit in CLAUDE.md at line 90[3.1197897]
🚨 Critical Database Safety**ALWAYS Use Test Database for Testing**```bashcd shell_scripts./test_sql.sh ../db/test.duckdb > test.txt 2>&1```- `db/skraak.duckdb` = **PRODUCTION**- `db/test.duckdb` = **TEST** (safe for testing)- **Always specify test.duckdb explicitly**