@markmdev/pebble 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # pebble
2
+
3
+ A lightweight, JSONL-based issue tracker with CLI and React UI.
4
+
5
+ ## Features
6
+
7
+ - **Simple storage**: Append-only JSONL file enables full history
8
+ - **Git-like discovery**: Auto-discovers `.pebble/` directory upward
9
+ - **JSON-first output**: JSON by default, `--pretty` for human-readable
10
+ - **Dependencies**: Block issues on other issues, cycle detection
11
+ - **React UI**: View issues, filter, sort, dependency graph visualization
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install -g pebble
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ # Create your first issue (auto-initializes .pebble/ directory)
23
+ pebble create "Fix login bug" -t bug -p 1
24
+
25
+ # List all issues
26
+ pebble list
27
+
28
+ # Show ready issues (no open blockers)
29
+ pebble ready
30
+
31
+ # View in the browser
32
+ pebble ui
33
+ ```
34
+
35
+ ## Commands
36
+
37
+ ### Queries
38
+
39
+ | Command | Description |
40
+ |---------|-------------|
41
+ | `pebble ready` | Issues with no open blockers |
42
+ | `pebble blocked` | Issues with open blockers |
43
+ | `pebble list [options]` | List issues with filters |
44
+ | `pebble show <id>` | Full issue details |
45
+
46
+ ### Mutations
47
+
48
+ | Command | Description |
49
+ |---------|-------------|
50
+ | `pebble create <title> [options]` | Create an issue |
51
+ | `pebble update <ids...> [options]` | Update issues (supports batch) |
52
+ | `pebble claim <ids...>` | Set status to in_progress (shorthand) |
53
+ | `pebble close <ids...> [--reason] [--comment]` | Close issues (supports batch) |
54
+ | `pebble reopen <id> [--reason]` | Reopen an issue |
55
+
56
+ ### Dependencies
57
+
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `pebble dep add <id> <blocker>` | Add blocking dependency |
61
+ | `pebble dep remove <id> <blocker>` | Remove dependency |
62
+ | `pebble dep list <id>` | Show dependencies |
63
+ | `pebble dep tree <id>` | Show dependency tree |
64
+
65
+ ### Comments & Visualization
66
+
67
+ | Command | Description |
68
+ |---------|-------------|
69
+ | `pebble comments add <id> <text>` | Add a comment |
70
+ | `pebble graph [--root id]` | Show dependency graph |
71
+ | `pebble ui [--port 3333]` | Serve React UI |
72
+
73
+ ## Options
74
+
75
+ ### Global
76
+
77
+ - `--pretty` — Human-readable output (default: JSON)
78
+ - `--help` — Show help
79
+
80
+ ### Create
81
+
82
+ - `-t, --type <type>` — Issue type: task, bug, epic (default: task)
83
+ - `-p, --priority <n>` — Priority: 0=critical, 4=backlog (default: 2)
84
+ - `-d, --description <text>` — Description
85
+ - `--parent <id>` — Parent epic ID
86
+
87
+ ### List
88
+
89
+ - `--status <status>` — Filter by status
90
+ - `--type <type>` — Filter by type
91
+ - `--priority <n>` — Filter by priority
92
+ - `--parent <id>` — Filter by parent
93
+
94
+ ### Update
95
+
96
+ - `--status <status>` — Set status
97
+ - `--priority <n>` — Set priority
98
+ - `--title <text>` — Set title
99
+ - `--description <text>` — Set description
100
+
101
+ ## Data Model
102
+
103
+ ### Issue
104
+
105
+ ```typescript
106
+ {
107
+ id: string; // PREFIX-xxxxxx
108
+ title: string;
109
+ type: 'task' | 'bug' | 'epic';
110
+ priority: 0-4; // 0=critical, 4=backlog
111
+ status: 'open' | 'in_progress' | 'blocked' | 'closed';
112
+ description?: string;
113
+ parent?: string; // Parent epic ID
114
+ blockedBy: string[]; // IDs of blocking issues
115
+ comments: Comment[];
116
+ createdAt: string;
117
+ updatedAt: string;
118
+ }
119
+ ```
120
+
121
+ ### Storage
122
+
123
+ All data is stored in `.pebble/issues.jsonl` as append-only events:
124
+ - `create` — New issue
125
+ - `update` — Field changes
126
+ - `close` — Close with reason
127
+ - `reopen` — Reopen with reason
128
+ - `comment` — Add comment
129
+
130
+ ## UI Features
131
+
132
+ The React UI (`pebble ui`) provides full CRUD capabilities with real-time updates:
133
+
134
+ - **Issue List**: Hierarchical view (epics with children), sorting, filtering, search
135
+ - **Create Issues**: "New Issue" button opens creation dialog
136
+ - **Inline Editing**: Click title to edit, status/priority dropdowns, description editing
137
+ - **Issue Actions**: Close/reopen, add comments, manage blockers
138
+ - **Dependency Graph**: Interactive visualization with parent-child and blocker edges
139
+ - **History View**: Timeline of all events, filterable by type
140
+ - **Real-time Sync**: Changes from CLI automatically appear in UI via SSE
141
+ - **Breadcrumbs**: Navigation trail for easy orientation
142
+
143
+ ## Business Rules
144
+
145
+ 1. **Ready**: Non-closed issue where all `blockedBy` issues are closed
146
+ 2. **Blocked**: Issue has at least one open blocker
147
+ 3. **Epic close**: Cannot close epic if any child is not closed
148
+ 4. **Cycle detection**: Cannot create circular dependencies
149
+ 5. **ID resolution**: Partial IDs work (case-insensitive prefix match)
150
+
151
+ ## Development
152
+
153
+ ```bash
154
+ # Install dependencies
155
+ npm install
156
+
157
+ # Build
158
+ npm run build
159
+
160
+ # Run tests
161
+ npm test
162
+
163
+ # Type check
164
+ npm run typecheck
165
+ ```
166
+
167
+ ## License
168
+
169
+ MIT
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node