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.
- **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/`.
- **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)
+1 -1
View File
@@ -1,6 +1,6 @@
# 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`)
- **Qdrant:** `http://tower-of-joy:6333/`
+5 -1
View File
@@ -17,11 +17,15 @@ docs/
workshops/ # Workshop briefs and outputs
db/
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
ticket # Ticket CLI
sprint # Sprint lifecycle CLI
sqlite_connector.py # SQLite mini MCP
qdrant_connector.py # Qdrant + ollama mini MCP
audio_connector.py # Stable Audio Open connector
.claude/
agents/ # Agent personality files
skills/ # Skill definitions
+17
View File
@@ -25,6 +25,23 @@
"Bash(git ls-tree *)",
"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/sprint *)",
"Bash(db/connectors/sqlite-query *)",
+15 -15
View File
@@ -13,7 +13,7 @@ description: >
# Audio Generation — The Settled Reach
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
`docs/assets/audio/`. This skill provides the prompt system, generation
@@ -25,21 +25,21 @@ workflow, and quality validation.
```bash
# Check API health
db/connectors/audio-health
tooling/db/audio-health
# Generate a single asset (WAV only)
db/connectors/audio-generate "prompt text" \
tooling/db/audio-generate "prompt text" \
--duration 10 --steps 100 --cfg 7 \
--output path/to/output.wav
# 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 \
--output path/to/gen/intermediate.wav \
--output-ogg client/assets/audio/final.ogg
# 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
@@ -138,16 +138,16 @@ AMB-001, SFX-002, UI-005). This couples the manifest to the asset inventory.
```bash
# 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
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
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
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
@@ -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.
3. Read `references/category-templates.md` for the matching template.
4. Assemble the full prompt.
5. Run `db/connectors/audio-health` to verify the API is up.
6. Run `db/connectors/audio-generate` with `--post` or `--output-ogg` to
5. Run `tooling/db/audio-health` to verify the API is up.
6. Run `tooling/db/audio-generate` with `--post` or `--output-ogg` to
generate and post-process in one step.
7. Verify the output (file size, duration).
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
# 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
db/connectors/audio-post trim input.wav
db/connectors/audio-post normalize input.wav --lufs -16
db/connectors/audio-post convert input.wav --output output.ogg
tooling/db/audio-post trim input.wav
tooling/db/audio-post normalize input.wav --lufs -16
tooling/db/audio-post convert input.wav --output output.ogg
```
## 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:
```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:
+3 -3
View File
@@ -20,14 +20,14 @@ and workflows.
For precise indexing of specific content:
```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
Initialize the Qdrant collection (run once during setup):
```bash
python3 db/connectors/qdrant_connector.py create-collection
python3 tooling/db/qdrant_connector.py create-collection
```
## Bulk Indexing
@@ -35,7 +35,7 @@ python3 db/connectors/qdrant_connector.py create-collection
Index all project documents at once:
```bash
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
```
+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`:
```bash
db/connectors/ticket status <id> review
tooling/db/ticket status <id> review
```
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:
```bash
db/connectors/sprint prepare
tooling/db/sprint prepare
```
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:
```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
@@ -184,14 +184,14 @@ Update it with the theme and goal, then assign tickets:
```bash
# 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
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
`db/connectors/sprint start`. This prevents starting an unplanned sprint.
`tooling/db/sprint start`. This prevents starting an unplanned sprint.
### 8. Present summary
@@ -26,7 +26,7 @@ Each team gets one briefing file at `docs/sprints/sprint-N/<team>.md`.
|---|-------|------------|
| #ID | Title | #dependency or — |
Use `db/connectors/ticket show <id>` for full details.
Use `tooling/db/ticket show <id>` for full details.
## 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:
```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**:
@@ -48,7 +48,7 @@ Then follow the **first matching case**:
First, check whether the sprint's work is actually done:
```bash
db/connectors/sprint status
tooling/db/sprint status
```
This shows ticket counts by status (done, in_progress, backlog).
@@ -81,7 +81,7 @@ explicitly chooses to close.
#### A1. Close the active sprint
```bash
db/connectors/sprint stop
tooling/db/sprint stop
```
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:
```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
@@ -151,7 +151,7 @@ and suggest running `/sprint-plan` to complete planning.
If everything looks ready, activate the sprint:
```bash
db/connectors/sprint start
tooling/db/sprint start
```
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:
```bash
db/connectors/sprint start-work
tooling/db/sprint start-work
```
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:
```bash
db/connectors/ticket show <id>
tooling/db/ticket show <id>
```
### 6. Read key decisions
@@ -218,7 +218,7 @@ Mark all actionable (unblocked, non-done) tickets in the sprint as
`in_progress`:
```bash
db/connectors/ticket status <id> in_progress
tooling/db/ticket status <id> in_progress
```
Then output a summary:
@@ -296,8 +296,8 @@ Task(
2. DB SCRIPTS: When calling ticket/sprint/sqlite scripts, use
the exact command with no wrappers or chaining. Examples:
db/connectors/ticket show 528
db/connectors/ticket list --sprint {N}
tooling/db/ticket show 528
tooling/db/ticket list --sprint {N}
Do NOT prepend python3, do NOT chain with && or ;, do NOT
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
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}",
run_in_background: true
)
+1 -1
View File
@@ -41,7 +41,7 @@ the workflow.
Run these two commands in parallel:
```bash
db/connectors/sprint sweep
tooling/db/sprint sweep
```
```bash
+16 -16
View File
@@ -17,60 +17,60 @@ section. This skill covers the full command reference.
### List tickets (full flags)
```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
```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`
Priorities: `critical`, `high`, `medium`, `low`
### Update status
```bash
db/connectors/ticket status <id> <new_status>
db/connectors/ticket done <id> [<id> ...]
tooling/db/ticket status <id> <new_status>
tooling/db/ticket done <id> [<id> ...]
```
Statuses: `backlog`, `ready`, `in_progress`, `review`, `done`, `cancelled`
### Assignment
```bash
db/connectors/ticket assign <id> <agent>
db/connectors/ticket unassign <id>
tooling/db/ticket assign <id> <agent>
tooling/db/ticket unassign <id>
```
### Team assignment
```bash
db/connectors/ticket team <id> <teams>
tooling/db/ticket team <id> <teams>
```
Teams are comma-separated, e.g. `server`, `client`, `server,client`.
### Sprint management
```bash
db/connectors/ticket sprint [--active]
db/connectors/ticket sprint assign <id> <sprint_id>
tooling/db/ticket sprint [--active]
tooling/db/ticket sprint assign <id> <sprint_id>
```
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
```bash
db/connectors/ticket deps <id>
tooling/db/ticket deps <id>
```
### Search and browse
```bash
db/connectors/ticket search <keyword>
db/connectors/ticket epics [--status S]
db/connectors/ticket children <id>
db/connectors/ticket count [--status S]
tooling/db/ticket search <keyword>
tooling/db/ticket epics [--status S]
tooling/db/ticket children <id>
tooling/db/ticket count [--status S]
```
### Batch show
```bash
db/connectors/ticket show --brief <id> [<id>...]
tooling/db/ticket show --brief <id> [<id>...]
```
## Workflow
+11 -11
View File
@@ -14,7 +14,7 @@ server/ # Rust/bevy_ecs simulation server
tooling/ # Build tools, scripts, asset pipelines
tests/ # Integration and end-to-end tests
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
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
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
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 |
|------|---------|----------------|
| Tickets | `db/connectors/ticket list`, `show`, `create`, `assign` | `/ticket` skill |
| Sprints | `db/connectors/sprint status`, `start-work`, `prepare` | `/sprint-start` skill |
| SQL queries | `db/connectors/sqlite-query "SELECT ..."` | — |
| SQL writes | `db/connectors/sqlite-exec "UPDATE ..."` | — |
| Decisions | `db/connectors/decision next`, `claim`, `check-dupes` | — |
| Doc search | `db/connectors/qdrant-search "query"` | `/docs-search` skill |
| Doc index | `db/connectors/qdrant-index path/to/file.md` | `/docs-search` skill |
| Tickets | `tooling/db/ticket list`, `show`, `create`, `assign` | `/ticket` skill |
| Sprints | `tooling/db/sprint status`, `start-work`, `prepare` | `/sprint-start` skill |
| SQL queries | `tooling/db/sqlite-query "SELECT ..."` | — |
| SQL writes | `tooling/db/sqlite-exec "UPDATE ..."` | — |
| Decisions | `tooling/db/decision next`, `claim`, `check-dupes` | — |
| Doc search | `tooling/db/qdrant-search "query"` | `/docs-search` skill |
| Doc index | `tooling/db/qdrant-index path/to/file.md` | `/docs-search` skill |
### File conventions
- Decisions: domain files in `decisions/` (see `decisions/README.md` for index)
- 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.
- Discussion rounds: numbered sequentially, archived to `docs/discussions/` when complete
- 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-sync:
@db/connectors/decisions-sync
@tooling/db/decisions-sync
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:
@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:
@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 ---
+1
View File
@@ -0,0 +1 @@
../tooling/db
+2 -2
View File
@@ -1,5 +1,5 @@
-- 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)
PRAGMA journal_mode=WAL;
@@ -64,7 +64,7 @@ CREATE INDEX IF NOT EXISTS idx_history_ticket ON ticket_history(ticket_id);
-- ---------------------------------------------------------------------------
-- Decision Sync Tables
-- Populated by: python3 db/connectors/decisions_sync.py
-- Populated by: python3 tooling/db/decisions_sync.py
-- 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
# 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
make decisions-orphan
+6 -6
View File
@@ -269,17 +269,17 @@ Key components:
Use wrapper scripts:
```bash
db/connectors/sqlite-query "SELECT * FROM tickets WHERE status='open'"
db/connectors/sqlite-exec "UPDATE tickets SET status='done' WHERE id=1"
tooling/db/sqlite-query "SELECT * FROM tickets WHERE status='open'"
tooling/db/sqlite-exec "UPDATE tickets SET status='done' WHERE id=1"
```
## Qdrant / Document Search
```bash
db/connectors/qdrant-search "asymmetric information design"
db/connectors/qdrant-index docs/briefings/tyre.md
db/connectors/qdrant-health
db/connectors/qdrant-count
tooling/db/qdrant-search "asymmetric information design"
tooling/db/qdrant-index docs/briefings/tyre.md
tooling/db/qdrant-health
tooling/db/qdrant-count
```
## Decisions System
+1 -1
View File
@@ -12,7 +12,7 @@
| #257 | Save/load game flow | — (#256 done) |
| #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
+1 -1
View File
@@ -17,7 +17,7 @@
| #85 | Error handling & recovery | — |
| #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
+1 -1
View File
@@ -11,7 +11,7 @@
|---|-------|------------|
| #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
+1 -1
View File
@@ -7,7 +7,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
# 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
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
CONFIG_PATH = SCRIPT_DIR / "config.json"
SCHEMA_PATH = SCRIPT_DIR.parent / "schema.sql"
WORKTREE_ROOT = SCRIPT_DIR.parent.parent
WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
SCHEMA_PATH = WORKTREE_ROOT / "db" / "schema.sql"
DECISIONS_DIR = WORKTREE_ROOT / "decisions"
# Shared database lives in the parent of all worktrees (three levels up from db/connectors/).
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()
# ---------------------------------------------------------------------------
# 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
TICKET_CLI = str(SCRIPT_DIR / "ticket")
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve()
PROJECT_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
DB_PATH = (WORKTREE_ROOT / ".." / "settledreach.db").resolve()
PROJECT_ROOT = WORKTREE_ROOT
REMINDER = """---
Reminder: Keep ticket status up to date after finishing work.
db/connectors/ticket status <id> in_progress (when starting)
db/connectors/ticket status <id> done (when finished)"""
tooling/db/ticket status <id> in_progress (when starting)
tooling/db/ticket status <id> done (when finished)"""
def run_ticket(*args):
@@ -559,19 +560,19 @@ def cmd_sweep(args):
issues.append({
"type": "unassigned_in_progress",
"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:
issues.append({
"type": "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"):
issues.append({
"type": "assigned_but_done",
"detail": f"#{t['id']} done, still assigned",
"fix": f"db/connectors/ticket unassign {t['id']}",
"fix": f"tooling/db/ticket unassign {t['id']}",
})
# Progress
@@ -22,9 +22,10 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent
CONFIG_PATH = SCRIPT_DIR / "config.json"
SCHEMA_PATH = SCRIPT_DIR.parent / "schema.sql"
# Shared database lives in the parent of all worktrees (three levels up from db/connectors/).
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve()
WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").resolve()
SCHEMA_PATH = WORKTREE_ROOT / "db" / "schema.sql"
# 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():
+3 -2
View File
@@ -30,8 +30,9 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent
CONFIG_PATH = SCRIPT_DIR / "config.json"
# Shared database lives in the parent of all worktrees (three levels up from db/connectors/).
DB_PATH = (SCRIPT_DIR / ".." / ".." / ".." / "settledreach.db").resolve()
WORKTREE_ROOT = (SCRIPT_DIR / ".." / "..").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():
+1 -1
View File
@@ -203,4 +203,4 @@ if __name__ == "__main__":
monologue_chime_urgent()
print()
print("Done. Convert with: db/connectors/audio-post convert <file.wav>")
print("Done. Convert with: tooling/db/audio-post convert <file.wav>")