chore(db): move db/connectors/ to tooling/db/ (#274)

Consolidates all connector scripts under tooling/ per project
structure conventions. Symlink at db/connectors → tooling/db/
preserves backwards compatibility (remove after Sprint 22).

Updated references in CLAUDE.md, Makefile, DEVOPS.md, all skill
files, agent files, rules, schema comments, and Sprint 21
briefings. Python scripts updated with correct SCHEMA_PATH
(now relative to WORKTREE_ROOT/db/schema.sql).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 11:08:00 +01:00
co-authored by Claude Opus 4.6
parent 93e050f3bf
commit bc226d8baf
47 changed files with 128 additions and 103 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ Named after Qatux, the Raiel with perfect memory who helped Paula Myo by recalli
- **Work in dedicated round files:** All new rounds happen in `docs/discussions/round-NN-topic.md` from the start. DISCUSSION.md is retired for new content. - **Work in dedicated round files:** All new rounds happen in `docs/discussions/round-NN-topic.md` from the start. DISCUSSION.md is retired for new content.
- **Update the discussion index ONLY when closing:** After a round is formally closed, update `docs/discussions/README.md` with the round entry (number, topic, decisions produced, file link). - **Update the discussion index ONLY when closing:** After a round is formally closed, update `docs/discussions/README.md` with the round entry (number, topic, decisions produced, file link).
- **Update briefings:** After a round produces new decisions, update the relevant agent briefing files in `docs/briefings/`. - **Update briefings:** After a round produces new decisions, update the relevant agent briefing files in `docs/briefings/`.
- **Re-index documents:** After archiving or updating documents, re-index them in Qdrant via `db/connectors/qdrant-index <path>`. - **Re-index documents:** After archiving or updating documents, re-index them in Qdrant via `tooling/db/qdrant-index <path>`.
## Team workflow (mandatory) ## Team workflow (mandatory)
+1 -1
View File
@@ -1,6 +1,6 @@
# Local Services # Local Services
Endpoints are also preconfigured in `db/connectors/config.json`. Endpoints are also preconfigured in `tooling/db/config.json`.
- **Gitea:** `http://git.schweitz.internal` (login: `schweitz`) - **Gitea:** `http://git.schweitz.internal` (login: `schweitz`)
- **Qdrant:** `http://tower-of-joy:6333/` - **Qdrant:** `http://tower-of-joy:6333/`
+5 -1
View File
@@ -17,11 +17,15 @@ docs/
workshops/ # Workshop briefs and outputs workshops/ # Workshop briefs and outputs
db/ db/
schema.sql # Database schema schema.sql # Database schema
connectors/ # Connector scripts for SQLite and Qdrant connectors/ # Symlink → tooling/db/ (backwards compat, remove after Sprint 22)
tooling/
db/ # Connector scripts for SQLite, Qdrant, and audio
config.json # Endpoint configuration config.json # Endpoint configuration
ticket # Ticket CLI ticket # Ticket CLI
sprint # Sprint lifecycle CLI
sqlite_connector.py # SQLite mini MCP sqlite_connector.py # SQLite mini MCP
qdrant_connector.py # Qdrant + ollama mini MCP qdrant_connector.py # Qdrant + ollama mini MCP
audio_connector.py # Stable Audio Open connector
.claude/ .claude/
agents/ # Agent personality files agents/ # Agent personality files
skills/ # Skill definitions skills/ # Skill definitions
+17
View File
@@ -25,6 +25,23 @@
"Bash(git ls-tree *)", "Bash(git ls-tree *)",
"Bash(git rev-parse --show-toplevel)", "Bash(git rev-parse --show-toplevel)",
"Bash(tooling/db/ticket *)",
"Bash(tooling/db/sprint *)",
"Bash(tooling/db/sqlite-query *)",
"Bash(tooling/db/sqlite-exec *)",
"Bash(tooling/db/qdrant-search *)",
"Bash(tooling/db/qdrant-index *)",
"Bash(tooling/db/qdrant-health)",
"Bash(tooling/db/qdrant-count)",
"Bash(tooling/db/sqlite-init)",
"Bash(tooling/db/decisions-sync)",
"Bash(tooling/db/decision *)",
"Bash(tooling/db/audio-generate *)",
"Bash(tooling/db/audio-health)",
"Bash(tooling/db/audio-post *)",
"Bash(tooling/db/audio-batch *)",
"Bash(db/connectors/ticket *)", "Bash(db/connectors/ticket *)",
"Bash(db/connectors/sprint *)", "Bash(db/connectors/sprint *)",
"Bash(db/connectors/sqlite-query *)", "Bash(db/connectors/sqlite-query *)",
+15 -15
View File
@@ -13,7 +13,7 @@ description: >
# Audio Generation — The Settled Reach # Audio Generation — The Settled Reach
Generate sonically consistent audio assets using the Stable Audio Open API via Generate sonically consistent audio assets using the Stable Audio Open API via
wrapper scripts at `db/connectors/audio-*`. wrapper scripts at `tooling/db/audio-*`.
Asset descriptions, filenames, bus routing, and design intent are documented in Asset descriptions, filenames, bus routing, and design intent are documented in
`docs/assets/audio/`. This skill provides the prompt system, generation `docs/assets/audio/`. This skill provides the prompt system, generation
@@ -25,21 +25,21 @@ workflow, and quality validation.
```bash ```bash
# Check API health # Check API health
db/connectors/audio-health tooling/db/audio-health
# Generate a single asset (WAV only) # Generate a single asset (WAV only)
db/connectors/audio-generate "prompt text" \ tooling/db/audio-generate "prompt text" \
--duration 10 --steps 100 --cfg 7 \ --duration 10 --steps 100 --cfg 7 \
--output path/to/output.wav --output path/to/output.wav
# Generate + post-process in one command (WAV → trim → normalize → OGG) # Generate + post-process in one command (WAV → trim → normalize → OGG)
db/connectors/audio-generate "prompt text" \ tooling/db/audio-generate "prompt text" \
--duration 10 --steps 100 --cfg 7 \ --duration 10 --steps 100 --cfg 7 \
--output path/to/gen/intermediate.wav \ --output path/to/gen/intermediate.wav \
--output-ogg client/assets/audio/final.ogg --output-ogg client/assets/audio/final.ogg
# Batch-generate from a manifest (preferred for multiple assets) # Batch-generate from a manifest (preferred for multiple assets)
db/connectors/audio-batch docs/assets/audio/batch-s10-327.json tooling/db/audio-batch docs/assets/audio/batch-s10-327.json
``` ```
### Parameters ### Parameters
@@ -138,16 +138,16 @@ AMB-001, SFX-002, UI-005). This couples the manifest to the asset inventory.
```bash ```bash
# Full run # Full run
db/connectors/audio-batch docs/assets/audio/batch-s10-327.json tooling/db/audio-batch docs/assets/audio/batch-s10-327.json
# Dry run — preview what would be generated # Dry run — preview what would be generated
db/connectors/audio-batch docs/assets/audio/batch-s10-327.json --dry-run tooling/db/audio-batch docs/assets/audio/batch-s10-327.json --dry-run
# Generate only specific assets # Generate only specific assets
db/connectors/audio-batch docs/assets/audio/batch-s10-327.json --only AMB-001,AMB-002 tooling/db/audio-batch docs/assets/audio/batch-s10-327.json --only AMB-001,AMB-002
# Skip assets that already have OGG files # Skip assets that already have OGG files
db/connectors/audio-batch docs/assets/audio/batch-s10-327.json --skip-existing tooling/db/audio-batch docs/assets/audio/batch-s10-327.json --skip-existing
``` ```
### 3. Update asset docs with prompts ### 3. Update asset docs with prompts
@@ -190,8 +190,8 @@ For one-off generation or iteration on a specific asset:
2. Read `references/sonic-palette.md` for the sonic family prefix. 2. Read `references/sonic-palette.md` for the sonic family prefix.
3. Read `references/category-templates.md` for the matching template. 3. Read `references/category-templates.md` for the matching template.
4. Assemble the full prompt. 4. Assemble the full prompt.
5. Run `db/connectors/audio-health` to verify the API is up. 5. Run `tooling/db/audio-health` to verify the API is up.
6. Run `db/connectors/audio-generate` with `--post` or `--output-ogg` to 6. Run `tooling/db/audio-generate` with `--post` or `--output-ogg` to
generate and post-process in one step. generate and post-process in one step.
7. Verify the output (file size, duration). 7. Verify the output (file size, duration).
8. Update the asset status and prompt in `docs/assets/audio/{category}.md`. 8. Update the asset status and prompt in `docs/assets/audio/{category}.md`.
@@ -218,12 +218,12 @@ If you need to post-process separately (e.g., re-normalizing an existing file):
```bash ```bash
# Full pipeline: trim → normalize → convert # Full pipeline: trim → normalize → convert
db/connectors/audio-post pipeline input.wav --output output.ogg tooling/db/audio-post pipeline input.wav --output output.ogg
# Individual steps # Individual steps
db/connectors/audio-post trim input.wav tooling/db/audio-post trim input.wav
db/connectors/audio-post normalize input.wav --lufs -16 tooling/db/audio-post normalize input.wav --lufs -16
db/connectors/audio-post convert input.wav --output output.ogg tooling/db/audio-post convert input.wav --output output.ogg
``` ```
## Manual Synthesis (Insert-Tech Sounds) ## Manual Synthesis (Insert-Tech Sounds)
+1 -1
View File
@@ -169,7 +169,7 @@ Construct the ticket title and description from the report summary and any
investigation findings. Use the ticket CLI: investigation findings. Use the ticket CLI:
```bash ```bash
db/connectors/ticket create bug "{title}" --team {team} --description "{description}" tooling/db/ticket create bug "{title}" --team {team} --description "{description}"
``` ```
The description should include: The description should include:
+3 -3
View File
@@ -20,14 +20,14 @@ and workflows.
For precise indexing of specific content: For precise indexing of specific content:
```bash ```bash
python3 db/connectors/qdrant_connector.py index "unique-id" "Text content to index" --metadata source=manual heading="Custom heading" python3 tooling/db/qdrant_connector.py index "unique-id" "Text content to index" --metadata source=manual heading="Custom heading"
``` ```
### Create collection ### Create collection
Initialize the Qdrant collection (run once during setup): Initialize the Qdrant collection (run once during setup):
```bash ```bash
python3 db/connectors/qdrant_connector.py create-collection python3 tooling/db/qdrant_connector.py create-collection
``` ```
## Bulk Indexing ## Bulk Indexing
@@ -35,7 +35,7 @@ python3 db/connectors/qdrant_connector.py create-collection
Index all project documents at once: Index all project documents at once:
```bash ```bash
for f in decisions/*.md DISCUSSION.md TEAM.md docs/discussions/*.md docs/briefings/*.md; do for f in decisions/*.md DISCUSSION.md TEAM.md docs/discussions/*.md docs/briefings/*.md; do
db/connectors/qdrant-index "$f" tooling/db/qdrant-index "$f"
done done
``` ```
+1 -1
View File
@@ -123,7 +123,7 @@ Extract ticket IDs from `#NNN` patterns. For each ticket that is
currently `in_progress`, update it to `review`: currently `in_progress`, update it to `review`:
```bash ```bash
db/connectors/ticket status <id> review tooling/db/ticket status <id> review
``` ```
Report which tickets were moved to review. Skip tickets that are Report which tickets were moved to review. Skip tickets that are
+6 -6
View File
@@ -88,7 +88,7 @@ the user and a purpose-assembled agent panel.
Get carry-overs, backlog candidates, and decision gaps in one shot: Get carry-overs, backlog candidates, and decision gaps in one shot:
```bash ```bash
db/connectors/sprint prepare tooling/db/sprint prepare
``` ```
This auto-detects the next sprint number (max ID + 1), creates the sprint This auto-detects the next sprint number (max ID + 1), creates the sprint
@@ -103,10 +103,10 @@ record in `planning` status if needed, and outputs:
For critical epics, check their children for granular candidates: For critical epics, check their children for granular candidates:
```bash ```bash
db/connectors/ticket children <epic_id> tooling/db/ticket children <epic_id>
``` ```
Use `db/connectors/ticket show --brief <id> [<id>...]` to quickly scan multiple tickets. Use `tooling/db/ticket show --brief <id> [<id>...]` to quickly scan multiple tickets.
### 3. Read existing code state ### 3. Read existing code state
@@ -184,14 +184,14 @@ Update it with the theme and goal, then assign tickets:
```bash ```bash
# Update the sprint with theme and goal # Update the sprint with theme and goal
db/connectors/sqlite-exec "UPDATE sprints SET name='Sprint N: Theme', goal='goal' WHERE id=N" tooling/db/sqlite-exec "UPDATE sprints SET name='Sprint N: Theme', goal='goal' WHERE id=N"
# Assign tickets # Assign tickets
db/connectors/ticket sprint assign <ticket_id> <sprint_id> tooling/db/ticket sprint assign <ticket_id> <sprint_id>
``` ```
The sprint stays in `planning` status until explicitly activated via The sprint stays in `planning` status until explicitly activated via
`db/connectors/sprint start`. This prevents starting an unplanned sprint. `tooling/db/sprint start`. This prevents starting an unplanned sprint.
### 8. Present summary ### 8. Present summary
@@ -26,7 +26,7 @@ Each team gets one briefing file at `docs/sprints/sprint-N/<team>.md`.
|---|-------|------------| |---|-------|------------|
| #ID | Title | #dependency or — | | #ID | Title | #dependency or — |
Use `db/connectors/ticket show <id>` for full details. Use `tooling/db/ticket show <id>` for full details.
## Key Decisions ## Key Decisions
+11 -11
View File
@@ -38,7 +38,7 @@ When `/sprint-start` is run on `main`, assess the current sprint state
and do the next right thing. Query the database to determine the state: and do the next right thing. Query the database to determine the state:
```bash ```bash
db/connectors/sqlite-query "SELECT id, name, status FROM sprints ORDER BY id DESC LIMIT 3" tooling/db/sqlite-query "SELECT id, name, status FROM sprints ORDER BY id DESC LIMIT 3"
``` ```
Then follow the **first matching case**: Then follow the **first matching case**:
@@ -48,7 +48,7 @@ Then follow the **first matching case**:
First, check whether the sprint's work is actually done: First, check whether the sprint's work is actually done:
```bash ```bash
db/connectors/sprint status tooling/db/sprint status
``` ```
This shows ticket counts by status (done, in_progress, backlog). This shows ticket counts by status (done, in_progress, backlog).
@@ -81,7 +81,7 @@ explicitly chooses to close.
#### A1. Close the active sprint #### A1. Close the active sprint
```bash ```bash
db/connectors/sprint stop tooling/db/sprint stop
``` ```
This marks the active sprint as completed and lists carry-over candidates. This marks the active sprint as completed and lists carry-over candidates.
@@ -142,7 +142,7 @@ A sprint is ready to activate. Verify it looks complete:
``` ```
2. Check the ticket count: 2. Check the ticket count:
```bash ```bash
db/connectors/sprint status --sprint N tooling/db/sprint status --sprint N
``` ```
If briefings are missing or the sprint has 0 tickets, report the gap If briefings are missing or the sprint has 0 tickets, report the gap
@@ -151,7 +151,7 @@ and suggest running `/sprint-plan` to complete planning.
If everything looks ready, activate the sprint: If everything looks ready, activate the sprint:
```bash ```bash
db/connectors/sprint start tooling/db/sprint start
``` ```
Then report: Then report:
@@ -184,7 +184,7 @@ If the merge has conflicts, report them and stop — do not force-resolve.
Run the sprint CLI to get the full context dump in one shot: Run the sprint CLI to get the full context dump in one shot:
```bash ```bash
db/connectors/sprint start-work tooling/db/sprint start-work
``` ```
This auto-detects the active sprint and current team from the branch. This auto-detects the active sprint and current team from the branch.
@@ -204,7 +204,7 @@ If no matching briefing exists for the team, suggest running
For tickets that need more detail than the `start-work` summary provides: For tickets that need more detail than the `start-work` summary provides:
```bash ```bash
db/connectors/ticket show <id> tooling/db/ticket show <id>
``` ```
### 6. Read key decisions ### 6. Read key decisions
@@ -218,7 +218,7 @@ Mark all actionable (unblocked, non-done) tickets in the sprint as
`in_progress`: `in_progress`:
```bash ```bash
db/connectors/ticket status <id> in_progress tooling/db/ticket status <id> in_progress
``` ```
Then output a summary: Then output a summary:
@@ -296,8 +296,8 @@ Task(
2. DB SCRIPTS: When calling ticket/sprint/sqlite scripts, use 2. DB SCRIPTS: When calling ticket/sprint/sqlite scripts, use
the exact command with no wrappers or chaining. Examples: the exact command with no wrappers or chaining. Examples:
db/connectors/ticket show 528 tooling/db/ticket show 528
db/connectors/ticket list --sprint {N} tooling/db/ticket list --sprint {N}
Do NOT prepend python3, do NOT chain with && or ;, do NOT Do NOT prepend python3, do NOT chain with && or ;, do NOT
add cleanup commands. Just the bare command. add cleanup commands. Just the bare command.
@@ -346,7 +346,7 @@ Task(
7. If no tasks remain, message the team lead. Do NOT shut down 7. If no tasks remain, message the team lead. Do NOT shut down
on your own. on your own.
Use `db/connectors/ticket show <id>` for full ticket specs.", Use `tooling/db/ticket show <id>` for full ticket specs.",
description: "Sprint {N} {team}: {name}", description: "Sprint {N} {team}: {name}",
run_in_background: true run_in_background: true
) )
+1 -1
View File
@@ -41,7 +41,7 @@ the workflow.
Run these two commands in parallel: Run these two commands in parallel:
```bash ```bash
db/connectors/sprint sweep tooling/db/sprint sweep
``` ```
```bash ```bash
+16 -16
View File
@@ -17,60 +17,60 @@ section. This skill covers the full command reference.
### List tickets (full flags) ### List tickets (full flags)
```bash ```bash
db/connectors/ticket list [--status S] [--priority P] [--epic N] [--sprint N] [--assigned A] [--team T] tooling/db/ticket list [--status S] [--priority P] [--epic N] [--sprint N] [--assigned A] [--team T]
``` ```
### Create ticket ### Create ticket
```bash ```bash
db/connectors/ticket create <type> <title> [--parent N] [--priority P] [--decision D] [--team T] tooling/db/ticket create <type> <title> [--parent N] [--priority P] [--decision D] [--team T]
``` ```
Types: `initiative`, `epic`, `story`, `task`, `bug` Types: `initiative`, `epic`, `story`, `task`, `bug`
Priorities: `critical`, `high`, `medium`, `low` Priorities: `critical`, `high`, `medium`, `low`
### Update status ### Update status
```bash ```bash
db/connectors/ticket status <id> <new_status> tooling/db/ticket status <id> <new_status>
db/connectors/ticket done <id> [<id> ...] tooling/db/ticket done <id> [<id> ...]
``` ```
Statuses: `backlog`, `ready`, `in_progress`, `review`, `done`, `cancelled` Statuses: `backlog`, `ready`, `in_progress`, `review`, `done`, `cancelled`
### Assignment ### Assignment
```bash ```bash
db/connectors/ticket assign <id> <agent> tooling/db/ticket assign <id> <agent>
db/connectors/ticket unassign <id> tooling/db/ticket unassign <id>
``` ```
### Team assignment ### Team assignment
```bash ```bash
db/connectors/ticket team <id> <teams> tooling/db/ticket team <id> <teams>
``` ```
Teams are comma-separated, e.g. `server`, `client`, `server,client`. Teams are comma-separated, e.g. `server`, `client`, `server,client`.
### Sprint management ### Sprint management
```bash ```bash
db/connectors/ticket sprint [--active] tooling/db/ticket sprint [--active]
db/connectors/ticket sprint assign <id> <sprint_id> tooling/db/ticket sprint assign <id> <sprint_id>
``` ```
For sprint-scoped operations (status overview, context dumps, lifecycle), For sprint-scoped operations (status overview, context dumps, lifecycle),
use the dedicated sprint CLI instead: `db/connectors/sprint --help` use the dedicated sprint CLI instead: `tooling/db/sprint --help`
### Dependencies ### Dependencies
```bash ```bash
db/connectors/ticket deps <id> tooling/db/ticket deps <id>
``` ```
### Search and browse ### Search and browse
```bash ```bash
db/connectors/ticket search <keyword> tooling/db/ticket search <keyword>
db/connectors/ticket epics [--status S] tooling/db/ticket epics [--status S]
db/connectors/ticket children <id> tooling/db/ticket children <id>
db/connectors/ticket count [--status S] tooling/db/ticket count [--status S]
``` ```
### Batch show ### Batch show
```bash ```bash
db/connectors/ticket show --brief <id> [<id>...] tooling/db/ticket show --brief <id> [<id>...]
``` ```
## Workflow ## Workflow
+11 -11
View File
@@ -14,7 +14,7 @@ server/ # Rust/bevy_ecs simulation server
tooling/ # Build tools, scripts, asset pipelines tooling/ # Build tools, scripts, asset pipelines
tests/ # Integration and end-to-end tests tests/ # Integration and end-to-end tests
docs/ # Architecture, design, briefings, sprints, workshops docs/ # Architecture, design, briefings, sprints, workshops
db/ # Schema + connector scripts (ticket CLI, SQLite, Qdrant) db/ # Schema + seed data (connectors moved to tooling/db/)
.claude/ # Agents, skills, rules .claude/ # Agents, skills, rules
decisions/ # Decision domain files (D-NNN confirmed, Q-NNN open, R-NNN rejected) decisions/ # Decision domain files (D-NNN confirmed, Q-NNN open, R-NNN rejected)
``` ```
@@ -42,7 +42,7 @@ The ticketing database (`settledreach.db`) lives in the **parent directory** sha
### Before starting work ### Before starting work
1. Read your sprint briefing at `docs/sprints/sprint-N/{team}.md` for current tasks 1. Read your sprint briefing at `docs/sprints/sprint-N/{team}.md` for current tasks
2. Use `db/connectors/ticket show <id>` for full ticket details 2. Use `tooling/db/ticket show <id>` for full ticket details
3. Read the relevant `decisions/*.md` domain file(s) referenced in the briefing 3. Read the relevant `decisions/*.md` domain file(s) referenced in the briefing
4. Background context: `docs/briefings/{your-name}.md`, `docs/discussions/` 4. Background context: `docs/briefings/{your-name}.md`, `docs/discussions/`
@@ -52,19 +52,19 @@ The ticketing database (`settledreach.db`) lives in the **parent directory** sha
| Tool | Command | Full reference | | Tool | Command | Full reference |
|------|---------|----------------| |------|---------|----------------|
| Tickets | `db/connectors/ticket list`, `show`, `create`, `assign` | `/ticket` skill | | Tickets | `tooling/db/ticket list`, `show`, `create`, `assign` | `/ticket` skill |
| Sprints | `db/connectors/sprint status`, `start-work`, `prepare` | `/sprint-start` skill | | Sprints | `tooling/db/sprint status`, `start-work`, `prepare` | `/sprint-start` skill |
| SQL queries | `db/connectors/sqlite-query "SELECT ..."` | — | | SQL queries | `tooling/db/sqlite-query "SELECT ..."` | — |
| SQL writes | `db/connectors/sqlite-exec "UPDATE ..."` | — | | SQL writes | `tooling/db/sqlite-exec "UPDATE ..."` | — |
| Decisions | `db/connectors/decision next`, `claim`, `check-dupes` | — | | Decisions | `tooling/db/decision next`, `claim`, `check-dupes` | — |
| Doc search | `db/connectors/qdrant-search "query"` | `/docs-search` skill | | Doc search | `tooling/db/qdrant-search "query"` | `/docs-search` skill |
| Doc index | `db/connectors/qdrant-index path/to/file.md` | `/docs-search` skill | | Doc index | `tooling/db/qdrant-index path/to/file.md` | `/docs-search` skill |
### File conventions ### File conventions
- Decisions: domain files in `decisions/` (see `decisions/README.md` for index) - Decisions: domain files in `decisions/` (see `decisions/README.md` for index)
- Decision IDs: `D-NNN` (confirmed), `Q-NNN` (open questions), `R-NNN` (rejected) - Decision IDs: `D-NNN` (confirmed), `Q-NNN` (open questions), `R-NNN` (rejected)
- **Claim IDs before writing:** `db/connectors/decision claim D <domain> "title"` — prevents ID collisions across worktrees - **Claim IDs before writing:** `tooling/db/decision claim D <domain> "title"` — prevents ID collisions across worktrees
- Diagrams: `.d2` source + `.png` renders in `docs/diagrams/{category}/`. Create or update diagrams via `/d2-diagram` when D-records are added or modified. - Diagrams: `.d2` source + `.png` renders in `docs/diagrams/{category}/`. Create or update diagrams via `/d2-diagram` when D-records are added or modified.
- Discussion rounds: numbered sequentially, archived to `docs/discussions/` when complete - Discussion rounds: numbered sequentially, archived to `docs/discussions/` when complete
- Briefings: one per agent, updated after decision-producing rounds - Briefings: one per agent, updated after decision-producing rounds
- Tickets: managed via `db/connectors/ticket` CLI or `/ticket` skill - Tickets: managed via `tooling/db/ticket` CLI or `/ticket` skill
+4 -4
View File
@@ -284,16 +284,16 @@ db-install:
# --- Decisions --- # --- Decisions ---
decisions-sync: decisions-sync:
@db/connectors/decisions-sync @tooling/db/decisions-sync
decisions-coverage: decisions-coverage:
@db/connectors/sqlite-query "SELECT d.domain, COUNT(DISTINCT d.id) as decisions, COUNT(DISTINCT t.decision_ref) as with_tickets FROM decisions d LEFT JOIN tickets t ON d.id = t.decision_ref WHERE d.status='active' AND d.type='confirmed' GROUP BY d.domain" @tooling/db/sqlite-query "SELECT d.domain, COUNT(DISTINCT d.id) as decisions, COUNT(DISTINCT t.decision_ref) as with_tickets FROM decisions d LEFT JOIN tickets t ON d.id = t.decision_ref WHERE d.status='active' AND d.type='confirmed' GROUP BY d.domain"
decisions-active: decisions-active:
@db/connectors/sqlite-query "SELECT id, domain, title FROM decisions WHERE status='active' AND type='confirmed' ORDER BY domain, id" @tooling/db/sqlite-query "SELECT id, domain, title FROM decisions WHERE status='active' AND type='confirmed' ORDER BY domain, id"
decisions-orphan: decisions-orphan:
@db/connectors/sqlite-query "SELECT id, title FROM decisions WHERE type='confirmed' AND status='active' AND id NOT IN (SELECT DISTINCT decision_ref FROM tickets WHERE decision_ref IS NOT NULL)" @tooling/db/sqlite-query "SELECT id, title FROM decisions WHERE type='confirmed' AND status='active' AND id NOT IN (SELECT DISTINCT decision_ref FROM tickets WHERE decision_ref IS NOT NULL)"
# --- Content Validation --- # --- Content Validation ---
+1
View File
@@ -0,0 +1 @@
../tooling/db
+2 -2
View File
@@ -1,5 +1,5 @@
-- Commonwealth Project Ticketing Database Schema -- Commonwealth Project Ticketing Database Schema
-- Access via: python3 db/connectors/sqlite_connector.py <command> -- Access via: python3 tooling/db/sqlite_connector.py <command>
-- DO NOT use sqlite3 CLI (crashes in Claude Code due to std::bad_alloc bug) -- DO NOT use sqlite3 CLI (crashes in Claude Code due to std::bad_alloc bug)
PRAGMA journal_mode=WAL; PRAGMA journal_mode=WAL;
@@ -64,7 +64,7 @@ CREATE INDEX IF NOT EXISTS idx_history_ticket ON ticket_history(ticket_id);
-- --------------------------------------------------------------------------- -- ---------------------------------------------------------------------------
-- Decision Sync Tables -- Decision Sync Tables
-- Populated by: python3 db/connectors/decisions_sync.py -- Populated by: python3 tooling/db/decisions_sync.py
-- Source: decisions/*.md domain files -- Source: decisions/*.md domain files
-- --------------------------------------------------------------------------- -- ---------------------------------------------------------------------------
+1 -1
View File
@@ -24,7 +24,7 @@ The SQLite database contains a `decisions` table synced from these files. Common
```bash ```bash
# All active architecture decisions # All active architecture decisions
db/connectors/sqlite-query "SELECT id, title FROM decisions WHERE domain='architecture' AND status='active'" tooling/db/sqlite-query "SELECT id, title FROM decisions WHERE domain='architecture' AND status='active'"
# Decisions without implementing tickets # Decisions without implementing tickets
make decisions-orphan make decisions-orphan
+6 -6
View File
@@ -269,17 +269,17 @@ Key components:
Use wrapper scripts: Use wrapper scripts:
```bash ```bash
db/connectors/sqlite-query "SELECT * FROM tickets WHERE status='open'" tooling/db/sqlite-query "SELECT * FROM tickets WHERE status='open'"
db/connectors/sqlite-exec "UPDATE tickets SET status='done' WHERE id=1" tooling/db/sqlite-exec "UPDATE tickets SET status='done' WHERE id=1"
``` ```
## Qdrant / Document Search ## Qdrant / Document Search
```bash ```bash
db/connectors/qdrant-search "asymmetric information design" tooling/db/qdrant-search "asymmetric information design"
db/connectors/qdrant-index docs/briefings/tyre.md tooling/db/qdrant-index docs/briefings/tyre.md
db/connectors/qdrant-health tooling/db/qdrant-health
db/connectors/qdrant-count tooling/db/qdrant-count
``` ```
## Decisions System ## Decisions System
+1 -1
View File
@@ -12,7 +12,7 @@
| #257 | Save/load game flow | — (#256 done) | | #257 | Save/load game flow | — (#256 done) |
| #561 | Housekeeping: move debug_overlay.gd to ui/ directory | — | | #561 | Housekeeping: move debug_overlay.gd to ui/ directory | — |
Use `db/connectors/ticket show <id>` for full details on any ticket. Use `tooling/db/ticket show <id>` for full details on any ticket.
## Key Decisions ## Key Decisions
+1 -1
View File
@@ -17,7 +17,7 @@
| #85 | Error handling & recovery | — | | #85 | Error handling & recovery | — |
| #246 | Basic environmental interaction | — | | #246 | Basic environmental interaction | — |
Use `db/connectors/ticket show <id>` for full details on any ticket. Use `tooling/db/ticket show <id>` for full details on any ticket.
## Key Decisions ## Key Decisions
+1 -1
View File
@@ -11,7 +11,7 @@
|---|-------|------------| |---|-------|------------|
| #564 | Fog shader too opaque — tune alpha for semi-transparent layers per D-059 | — | | #564 | Fog shader too opaque — tune alpha for semi-transparent layers per D-059 | — |
Use `db/connectors/ticket show <id>` for full details. Use `tooling/db/ticket show <id>` for full details.
## Key Decisions ## Key Decisions
+1 -1
View File
@@ -7,7 +7,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")" REPO_ROOT="$(dirname "$SCRIPT_DIR")"
# Use the decisions_sync.py check-dupes command # Use the decisions_sync.py check-dupes command
RESULT=$(python3 "$REPO_ROOT/db/connectors/decisions_sync.py" check-dupes 2>&1) RESULT=$(python3 "$REPO_ROOT/tooling/db/decisions_sync.py" check-dupes 2>&1)
# Parse the JSON result # Parse the JSON result
DUPES=$(echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('duplicates',0))" 2>/dev/null || echo "0") DUPES=$(echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('duplicates',0))" 2>/dev/null || echo "0")
@@ -23,11 +23,11 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent SCRIPT_DIR = Path(__file__).resolve().parent
CONFIG_PATH = SCRIPT_DIR / "config.json" CONFIG_PATH = SCRIPT_DIR / "config.json"
SCHEMA_PATH = SCRIPT_DIR.parent / "schema.sql" WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
WORKTREE_ROOT = SCRIPT_DIR.parent.parent SCHEMA_PATH = WORKTREE_ROOT / "db" / "schema.sql"
DECISIONS_DIR = WORKTREE_ROOT / "decisions" DECISIONS_DIR = WORKTREE_ROOT / "decisions"
# Shared database lives in the parent of all worktrees (three levels up from db/connectors/). # Shared database lives in the parent of all worktrees (three levels up from tooling/db/).
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve() DB_PATH = (WORKTREE_ROOT / ".." / "settledreach.db").resolve()
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Config / DB (same pattern as sqlite_connector.py) # Config / DB (same pattern as sqlite_connector.py)
+8 -7
View File
@@ -23,13 +23,14 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent SCRIPT_DIR = Path(__file__).resolve().parent
TICKET_CLI = str(SCRIPT_DIR / "ticket") TICKET_CLI = str(SCRIPT_DIR / "ticket")
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve() WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
PROJECT_ROOT = (SCRIPT_DIR / ".." / "..").resolve() DB_PATH = (WORKTREE_ROOT / ".." / "settledreach.db").resolve()
PROJECT_ROOT = WORKTREE_ROOT
REMINDER = """--- REMINDER = """---
Reminder: Keep ticket status up to date after finishing work. Reminder: Keep ticket status up to date after finishing work.
db/connectors/ticket status <id> in_progress (when starting) tooling/db/ticket status <id> in_progress (when starting)
db/connectors/ticket status <id> done (when finished)""" tooling/db/ticket status <id> done (when finished)"""
def run_ticket(*args): def run_ticket(*args):
@@ -559,19 +560,19 @@ def cmd_sweep(args):
issues.append({ issues.append({
"type": "unassigned_in_progress", "type": "unassigned_in_progress",
"detail": f"#{t['id']} unassigned {t['status']}", "detail": f"#{t['id']} unassigned {t['status']}",
"fix": f"db/connectors/ticket assign {t['id']} <agent>", "fix": f"tooling/db/ticket assign {t['id']} <agent>",
}) })
if t["status"] == "backlog" and sprint["status"] == "active" and t["id"] not in blocked_by_map: if t["status"] == "backlog" and sprint["status"] == "active" and t["id"] not in blocked_by_map:
issues.append({ issues.append({
"type": "stale_backlog", "type": "stale_backlog",
"detail": f"#{t['id']} stale backlog", "detail": f"#{t['id']} stale backlog",
"fix": f"db/connectors/ticket status {t['id']} in_progress", "fix": f"tooling/db/ticket status {t['id']} in_progress",
}) })
if t["status"] == "done" and t.get("assigned_to"): if t["status"] == "done" and t.get("assigned_to"):
issues.append({ issues.append({
"type": "assigned_but_done", "type": "assigned_but_done",
"detail": f"#{t['id']} done, still assigned", "detail": f"#{t['id']} done, still assigned",
"fix": f"db/connectors/ticket unassign {t['id']}", "fix": f"tooling/db/ticket unassign {t['id']}",
}) })
# Progress # Progress
@@ -22,9 +22,10 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent SCRIPT_DIR = Path(__file__).resolve().parent
CONFIG_PATH = SCRIPT_DIR / "config.json" CONFIG_PATH = SCRIPT_DIR / "config.json"
SCHEMA_PATH = SCRIPT_DIR.parent / "schema.sql" WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
# Shared database lives in the parent of all worktrees (three levels up from db/connectors/). SCHEMA_PATH = WORKTREE_ROOT / "db" / "schema.sql"
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve() # Shared database lives in the parent of all worktrees (three levels up from tooling/db/).
DB_PATH = (WORKTREE_ROOT / ".." / "settledreach.db").resolve()
def load_config(): def load_config():
+3 -2
View File
@@ -30,8 +30,9 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent SCRIPT_DIR = Path(__file__).resolve().parent
CONFIG_PATH = SCRIPT_DIR / "config.json" CONFIG_PATH = SCRIPT_DIR / "config.json"
# Shared database lives in the parent of all worktrees (three levels up from db/connectors/). WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve() # Shared database lives in the parent of all worktrees (three levels up from tooling/db/).
DB_PATH = (WORKTREE_ROOT / ".." / "settledreach.db").resolve()
def load_config(): def load_config():
+1 -1
View File
@@ -203,4 +203,4 @@ if __name__ == "__main__":
monologue_chime_urgent() monologue_chime_urgent()
print() print()
print("Done. Convert with: db/connectors/audio-post convert <file.wav>") print("Done. Convert with: tooling/db/audio-post convert <file.wav>")