chore(meta): update CLAUDE.md and ticket skill for new CLI
Reference db/connectors/ticket CLI in project structure and agent instructions. Rewrite ticket skill to use CLI commands instead of raw SQL wrapper scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ name: ticket
|
||||
description: >
|
||||
Manage project tickets in the SQLite ticketing database. Use when the user
|
||||
says "ticket", "create a ticket", "show tickets", "sprint", or invokes /ticket.
|
||||
Wraps the sqlite_connector.py for structured project management operations.
|
||||
Wraps the ticket CLI for structured project management operations.
|
||||
user-invocable: true
|
||||
allowed-tools: Bash, Read, Grep, Glob
|
||||
---
|
||||
@@ -14,8 +14,15 @@ Manage the Commonwealth project ticketing database at `db/commonwealth.db`.
|
||||
|
||||
## Access Method
|
||||
|
||||
**Always use the wrapper scripts, never the sqlite3 CLI or python3 directly:**
|
||||
**Use the `ticket` CLI for all ticket operations:**
|
||||
```bash
|
||||
db/connectors/ticket <command> [args...]
|
||||
db/connectors/ticket --help
|
||||
```
|
||||
|
||||
All output is JSON on stdout.
|
||||
|
||||
For raw SQL access (rare), use the wrapper scripts:
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `db/connectors/sqlite-query "<SQL>"` | Run SELECT queries |
|
||||
@@ -26,83 +33,53 @@ Manage the Commonwealth project ticketing database at `db/commonwealth.db`.
|
||||
## Commands
|
||||
|
||||
### List tickets
|
||||
Show tickets filtered by status, type, or assignee:
|
||||
```bash
|
||||
db/connectors/sqlite-query "SELECT id, type, title, status, priority, assigned_to FROM tickets WHERE status != 'cancelled' ORDER BY priority, id"
|
||||
```
|
||||
|
||||
Filter examples:
|
||||
```bash
|
||||
# By status
|
||||
db/connectors/sqlite-query "SELECT id, type, title, status FROM tickets WHERE status='in_progress'"
|
||||
|
||||
# By type
|
||||
db/connectors/sqlite-query "SELECT id, title, status FROM tickets WHERE type='initiative'"
|
||||
|
||||
# By assignee
|
||||
db/connectors/sqlite-query "SELECT id, title, status FROM tickets WHERE assigned_to='tyre'"
|
||||
|
||||
# Current sprint
|
||||
db/connectors/sqlite-query "SELECT t.id, t.title, t.status, t.assigned_to FROM tickets t JOIN sprints s ON t.sprint_id=s.id WHERE s.status='active'"
|
||||
db/connectors/ticket list [--status S] [--priority P] [--epic N] [--sprint N] [--assigned A]
|
||||
```
|
||||
|
||||
### Show ticket detail
|
||||
```bash
|
||||
db/connectors/sqlite-query "SELECT * FROM tickets WHERE id=<N>"
|
||||
db/connectors/ticket show <id>
|
||||
```
|
||||
Returns full ticket with children, blockers, and dependents.
|
||||
|
||||
### Create ticket
|
||||
```bash
|
||||
db/connectors/sqlite-exec "INSERT INTO tickets (type, title, description, priority, decision_ref, parent_id) VALUES ('<type>', '<title>', '<description>', '<priority>', '<decision_ref>', <parent_id_or_NULL>)"
|
||||
db/connectors/ticket create <type> <title> [--parent N] [--priority P] [--decision D]
|
||||
```
|
||||
|
||||
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> ...]
|
||||
```
|
||||
Statuses: `backlog`, `ready`, `in_progress`, `review`, `done`, `cancelled`
|
||||
|
||||
### Update ticket
|
||||
### Assignment
|
||||
```bash
|
||||
db/connectors/sqlite-exec "UPDATE tickets SET status='in_progress', assigned_to='tyre', updated_at=datetime('now') WHERE id=<N>"
|
||||
```
|
||||
|
||||
### Ticket tree (parent-child hierarchy)
|
||||
```bash
|
||||
db/connectors/sqlite-query "SELECT t.id, t.type, t.title, t.status, p.title as parent_title FROM tickets t LEFT JOIN tickets p ON t.parent_id=p.id ORDER BY COALESCE(t.parent_id, t.id), t.id"
|
||||
db/connectors/ticket assign <id> <agent>
|
||||
db/connectors/ticket unassign <id>
|
||||
```
|
||||
|
||||
### Sprint management
|
||||
```bash
|
||||
# Create sprint
|
||||
db/connectors/sqlite-exec "INSERT INTO sprints (name, goal, start_date, end_date) VALUES ('<name>', '<goal>', '<start>', '<end>')"
|
||||
|
||||
# Activate sprint
|
||||
db/connectors/sqlite-exec "UPDATE sprints SET status='active' WHERE id=<N>"
|
||||
|
||||
# Assign ticket to sprint
|
||||
db/connectors/sqlite-exec "UPDATE tickets SET sprint_id=<sprint_id> WHERE id=<ticket_id>"
|
||||
|
||||
# Sprint status
|
||||
db/connectors/sqlite-query "SELECT s.name, s.goal, s.status, COUNT(t.id) as tickets, SUM(CASE WHEN t.status='done' THEN 1 ELSE 0 END) as done FROM sprints s LEFT JOIN tickets t ON t.sprint_id=s.id WHERE s.status='active' GROUP BY s.id"
|
||||
db/connectors/ticket sprint [--active]
|
||||
db/connectors/ticket sprint assign <id> <sprint_id>
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
```bash
|
||||
# Add blocker
|
||||
db/connectors/sqlite-exec "INSERT INTO ticket_deps (blocker_id, blocked_id) VALUES (<blocker>, <blocked>)"
|
||||
|
||||
# Show blockers for a ticket
|
||||
db/connectors/sqlite-query "SELECT t.id, t.title, t.status FROM ticket_deps d JOIN tickets t ON d.blocker_id=t.id WHERE d.blocked_id=<N>"
|
||||
db/connectors/ticket deps <id>
|
||||
```
|
||||
|
||||
### Seed from decisions
|
||||
To re-seed the database with initiatives from decisions/ domain files:
|
||||
### Search and browse
|
||||
```bash
|
||||
db/connectors/sqlite-seed
|
||||
```
|
||||
|
||||
### Initialise database
|
||||
```bash
|
||||
db/connectors/sqlite-init
|
||||
db/connectors/ticket search <keyword>
|
||||
db/connectors/ticket epics [--status S]
|
||||
db/connectors/ticket children <id>
|
||||
db/connectors/ticket count [--status S]
|
||||
```
|
||||
|
||||
## Workflow
|
||||
@@ -114,12 +91,3 @@ db/connectors/sqlite-init
|
||||
5. Stories break into **tasks** (concrete work items assignable to agents)
|
||||
6. **Sprints** group tasks into time-boxed work periods
|
||||
7. Track history via `ticket_history` table for audit trail
|
||||
|
||||
## Labels
|
||||
```bash
|
||||
# Add label
|
||||
db/connectors/sqlite-exec "INSERT INTO ticket_labels (ticket_id, label) VALUES (<id>, '<label>')"
|
||||
|
||||
# Find by label
|
||||
db/connectors/sqlite-query "SELECT t.id, t.title FROM tickets t JOIN ticket_labels l ON t.id=l.ticket_id WHERE l.label='<label>'"
|
||||
```
|
||||
|
||||
@@ -25,6 +25,7 @@ db/
|
||||
schema.sql # Database schema
|
||||
connectors/ # Connector scripts for SQLite and Qdrant
|
||||
config.json # Endpoint configuration
|
||||
ticket # Ticket CLI (list, show, create, assign, sprint, etc.)
|
||||
sqlite_connector.py # SQLite mini MCP
|
||||
qdrant_connector.py # Qdrant + ollama mini MCP
|
||||
.claude/
|
||||
@@ -104,7 +105,7 @@ Key rules:
|
||||
- Decision IDs: `D-NNN` (confirmed), `Q-NNN` (open questions), `R-NNN` (rejected)
|
||||
- Discussion rounds: numbered sequentially, archived to `docs/discussions/` when complete
|
||||
- Briefings: one per agent, updated after decision-producing rounds
|
||||
- Tickets: managed via `/ticket` skill or `sqlite_connector.py` directly
|
||||
- Tickets: managed via `db/connectors/ticket` CLI or `/ticket` skill
|
||||
|
||||
### Commit conventions
|
||||
Use conventional commits with project-specific scopes:
|
||||
|
||||
Reference in New Issue
Block a user