@mytechtoday/augment-extensions 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.
Files changed (50) hide show
  1. package/AGENTS.md +152 -0
  2. package/LICENSE +22 -0
  3. package/MODULES.md +124 -0
  4. package/README.md +195 -0
  5. package/cli/dist/cli.d.ts +3 -0
  6. package/cli/dist/cli.d.ts.map +1 -0
  7. package/cli/dist/cli.js +100 -0
  8. package/cli/dist/cli.js.map +1 -0
  9. package/cli/dist/commands/init.d.ts +6 -0
  10. package/cli/dist/commands/init.d.ts.map +1 -0
  11. package/cli/dist/commands/init.js +137 -0
  12. package/cli/dist/commands/init.js.map +1 -0
  13. package/cli/dist/commands/link.d.ts +6 -0
  14. package/cli/dist/commands/link.d.ts.map +1 -0
  15. package/cli/dist/commands/link.js +85 -0
  16. package/cli/dist/commands/link.js.map +1 -0
  17. package/cli/dist/commands/list.d.ts +7 -0
  18. package/cli/dist/commands/list.d.ts.map +1 -0
  19. package/cli/dist/commands/list.js +122 -0
  20. package/cli/dist/commands/list.js.map +1 -0
  21. package/cli/dist/commands/search.d.ts +6 -0
  22. package/cli/dist/commands/search.d.ts.map +1 -0
  23. package/cli/dist/commands/search.js +16 -0
  24. package/cli/dist/commands/search.js.map +1 -0
  25. package/cli/dist/commands/show.d.ts +6 -0
  26. package/cli/dist/commands/show.d.ts.map +1 -0
  27. package/cli/dist/commands/show.js +106 -0
  28. package/cli/dist/commands/show.js.map +1 -0
  29. package/cli/dist/commands/update.d.ts +6 -0
  30. package/cli/dist/commands/update.d.ts.map +1 -0
  31. package/cli/dist/commands/update.js +19 -0
  32. package/cli/dist/commands/update.js.map +1 -0
  33. package/modules/coding-standards/typescript/README.md +45 -0
  34. package/modules/coding-standards/typescript/module.json +27 -0
  35. package/modules/coding-standards/typescript/rules/naming-conventions.md +225 -0
  36. package/modules/workflows/beads/README.md +135 -0
  37. package/modules/workflows/beads/examples/complete-workflow-example.md +278 -0
  38. package/modules/workflows/beads/module.json +54 -0
  39. package/modules/workflows/beads/rules/best-practices.md +398 -0
  40. package/modules/workflows/beads/rules/file-format.md +283 -0
  41. package/modules/workflows/beads/rules/manual-setup.md +315 -0
  42. package/modules/workflows/beads/rules/workflow.md +285 -0
  43. package/modules/workflows/openspec/README.md +96 -0
  44. package/modules/workflows/openspec/examples/complete-change-example.md +230 -0
  45. package/modules/workflows/openspec/module.json +53 -0
  46. package/modules/workflows/openspec/rules/best-practices.md +272 -0
  47. package/modules/workflows/openspec/rules/manual-setup.md +231 -0
  48. package/modules/workflows/openspec/rules/spec-format.md +193 -0
  49. package/modules/workflows/openspec/rules/workflow.md +189 -0
  50. package/package.json +72 -0
@@ -0,0 +1,283 @@
1
+ # Beads File Format Specification
2
+
3
+ ## Overview
4
+
5
+ Beads stores issues in `.beads/issues.jsonl` using JSONL (JSON Lines) format. Each line is a complete JSON object representing an issue or update.
6
+
7
+ ## JSONL Format
8
+
9
+ **JSONL** = One JSON object per line, newline-separated.
10
+
11
+ ```jsonl
12
+ {"id":"bd-a1b2","title":"Task 1","status":"open"}
13
+ {"id":"bd-b2c3","title":"Task 2","status":"closed"}
14
+ {"id":"bd-c3d4","title":"Task 3","status":"open"}
15
+ ```
16
+
17
+ ## Issue Schema
18
+
19
+ ### Minimal Issue
20
+
21
+ ```json
22
+ {
23
+ "id": "bd-a1b2",
24
+ "title": "Implement user authentication",
25
+ "status": "open",
26
+ "created": "2024-01-20T10:00:00Z",
27
+ "updated": "2024-01-20T10:00:00Z"
28
+ }
29
+ ```
30
+
31
+ ### Complete Issue
32
+
33
+ ```json
34
+ {
35
+ "id": "bd-a1b2",
36
+ "title": "Implement user authentication",
37
+ "description": "Add JWT-based authentication with email/password login",
38
+ "status": "open",
39
+ "priority": 0,
40
+ "labels": ["backend", "auth", "security"],
41
+ "assignee": "agent-1",
42
+ "blocks": ["bd-b2c3", "bd-c3d4"],
43
+ "blocked_by": [],
44
+ "related": ["bd-d4e5"],
45
+ "parent": null,
46
+ "comments": [
47
+ {
48
+ "text": "Started implementation",
49
+ "author": "agent-1",
50
+ "timestamp": "2024-01-20T11:00:00Z"
51
+ }
52
+ ],
53
+ "created": "2024-01-20T10:00:00Z",
54
+ "updated": "2024-01-20T11:00:00Z",
55
+ "closed": null
56
+ }
57
+ ```
58
+
59
+ ## Field Definitions
60
+
61
+ ### Required Fields
62
+
63
+ - **id** (string): Unique hash-based ID, format: `bd-<hash>` or `bd-<hash>.<number>` for hierarchical
64
+ - **title** (string): Short description of the task
65
+ - **status** (string): One of: `"open"`, `"in-progress"`, `"blocked"`, `"closed"`
66
+ - **created** (string): ISO 8601 timestamp
67
+ - **updated** (string): ISO 8601 timestamp
68
+
69
+ ### Optional Fields
70
+
71
+ - **description** (string): Detailed description
72
+ - **priority** (integer): 0 (highest) to 3 (lowest), default: 2
73
+ - **labels** (array of strings): Tags for categorization
74
+ - **assignee** (string): Who is working on this
75
+ - **blocks** (array of strings): IDs of tasks this task blocks
76
+ - **blocked_by** (array of strings): IDs of tasks blocking this task
77
+ - **related** (array of strings): IDs of related tasks
78
+ - **parent** (string): ID of parent task (for hierarchical IDs)
79
+ - **comments** (array of objects): Comments and updates
80
+ - **closed** (string): ISO 8601 timestamp when closed
81
+
82
+ ## ID Format
83
+
84
+ ### Standard IDs
85
+
86
+ Hash-based, 4-character hex:
87
+
88
+ ```
89
+ bd-a1b2
90
+ bd-b2c3
91
+ bd-c3d4
92
+ ```
93
+
94
+ ### Hierarchical IDs
95
+
96
+ Epic/task/subtask structure:
97
+
98
+ ```
99
+ bd-a3f8 # Epic
100
+ bd-a3f8.1 # Task under epic
101
+ bd-a3f8.1.1 # Subtask
102
+ bd-a3f8.2 # Another task under epic
103
+ ```
104
+
105
+ ## Status Values
106
+
107
+ - **open** - Task is ready to work on (no blockers)
108
+ - **in-progress** - Currently being worked on
109
+ - **blocked** - Waiting on dependencies
110
+ - **closed** - Completed or cancelled
111
+
112
+ ## Priority Values
113
+
114
+ - **0** - Critical (P0)
115
+ - **1** - High (P1)
116
+ - **2** - Medium (P2) - default
117
+ - **3** - Low (P3)
118
+
119
+ ## Dependency Types
120
+
121
+ ### blocks
122
+
123
+ Tasks that this task prevents from starting:
124
+
125
+ ```json
126
+ {
127
+ "id": "bd-a1b2",
128
+ "title": "Add database schema",
129
+ "blocks": ["bd-b2c3", "bd-c3d4"]
130
+ }
131
+ ```
132
+
133
+ Means: `bd-b2c3` and `bd-c3d4` cannot start until `bd-a1b2` is closed.
134
+
135
+ ### blocked_by
136
+
137
+ Tasks that must be completed before this task can start:
138
+
139
+ ```json
140
+ {
141
+ "id": "bd-b2c3",
142
+ "title": "Add API endpoint",
143
+ "blocked_by": ["bd-a1b2"]
144
+ }
145
+ ```
146
+
147
+ Means: `bd-b2c3` cannot start until `bd-a1b2` is closed.
148
+
149
+ ### related
150
+
151
+ Tasks that are related but not blocking:
152
+
153
+ ```json
154
+ {
155
+ "id": "bd-c3d4",
156
+ "title": "Add frontend form",
157
+ "related": ["bd-b2c3"]
158
+ }
159
+ ```
160
+
161
+ ## Comments Format
162
+
163
+ ```json
164
+ {
165
+ "comments": [
166
+ {
167
+ "text": "Started implementation",
168
+ "author": "agent-1",
169
+ "timestamp": "2024-01-20T11:00:00Z"
170
+ },
171
+ {
172
+ "text": "Added login endpoint",
173
+ "author": "agent-1",
174
+ "timestamp": "2024-01-20T12:00:00Z"
175
+ }
176
+ ]
177
+ }
178
+ ```
179
+
180
+ ## Append-Only Log
181
+
182
+ `.beads/issues.jsonl` is an **append-only log**. Updates are appended as new lines:
183
+
184
+ ```jsonl
185
+ {"id":"bd-a1b2","title":"Task 1","status":"open","created":"2024-01-20T10:00:00Z","updated":"2024-01-20T10:00:00Z"}
186
+ {"id":"bd-a1b2","status":"in-progress","updated":"2024-01-20T11:00:00Z"}
187
+ {"id":"bd-a1b2","status":"closed","closed":"2024-01-20T12:00:00Z","updated":"2024-01-20T12:00:00Z"}
188
+ ```
189
+
190
+ The **latest entry** for each ID is the current state.
191
+
192
+ ## Reading Issues
193
+
194
+ ### With CLI
195
+
196
+ The CLI maintains a SQLite cache (`.beads/cache.db`) for fast queries:
197
+
198
+ ```bash
199
+ bd list # Query cache
200
+ bd ready # Query cache
201
+ bd show bd-a1b2 # Query cache
202
+ ```
203
+
204
+ ### Without CLI
205
+
206
+ Parse `.beads/issues.jsonl` manually:
207
+
208
+ 1. Read all lines
209
+ 2. Parse each line as JSON
210
+ 3. Group by `id`
211
+ 4. Merge fields (latest wins)
212
+ 5. Return current state
213
+
214
+ ## Writing Issues
215
+
216
+ ### With CLI
217
+
218
+ ```bash
219
+ bd create "Title" -p 0
220
+ # Appends to issues.jsonl and updates cache
221
+ ```
222
+
223
+ ### Without CLI
224
+
225
+ Append JSON line to `.beads/issues.jsonl`:
226
+
227
+ ```bash
228
+ echo '{"id":"bd-a1b2","title":"New task","status":"open","created":"2024-01-20T10:00:00Z","updated":"2024-01-20T10:00:00Z"}' >> .beads/issues.jsonl
229
+ ```
230
+
231
+ ## Configuration File
232
+
233
+ `.beads/config.json`:
234
+
235
+ ```json
236
+ {
237
+ "version": "1.0",
238
+ "stealth": false,
239
+ "compact_threshold": 100,
240
+ "auto_sync": true
241
+ }
242
+ ```
243
+
244
+ ## Best Practices
245
+
246
+ 1. **Always append**: Never edit existing lines
247
+ 2. **Include timestamps**: Use ISO 8601 format
248
+ 3. **Unique IDs**: Use hash-based IDs to avoid conflicts
249
+ 4. **Atomic updates**: One field change per line
250
+ 5. **Validate JSON**: Ensure each line is valid JSON
251
+
252
+ ## Example Workflow
253
+
254
+ ### Create Task
255
+
256
+ ```jsonl
257
+ {"id":"bd-a1b2","title":"Add authentication","status":"open","priority":0,"created":"2024-01-20T10:00:00Z","updated":"2024-01-20T10:00:00Z"}
258
+ ```
259
+
260
+ ### Add Dependency
261
+
262
+ ```jsonl
263
+ {"id":"bd-a1b2","blocks":["bd-b2c3"],"updated":"2024-01-20T10:05:00Z"}
264
+ ```
265
+
266
+ ### Start Work
267
+
268
+ ```jsonl
269
+ {"id":"bd-a1b2","status":"in-progress","updated":"2024-01-20T11:00:00Z"}
270
+ ```
271
+
272
+ ### Add Comment
273
+
274
+ ```jsonl
275
+ {"id":"bd-a1b2","comments":[{"text":"Added login endpoint","timestamp":"2024-01-20T12:00:00Z"}],"updated":"2024-01-20T12:00:00Z"}
276
+ ```
277
+
278
+ ### Close Task
279
+
280
+ ```jsonl
281
+ {"id":"bd-a1b2","status":"closed","closed":"2024-01-20T13:00:00Z","updated":"2024-01-20T13:00:00Z"}
282
+ ```
283
+
@@ -0,0 +1,315 @@
1
+ # Beads Manual Setup (Without CLI)
2
+
3
+ ## Overview
4
+
5
+ You can use Beads without installing the CLI by working directly with `.beads/issues.jsonl` files. This guide shows how to set up and use Beads manually.
6
+
7
+ ## Initial Setup
8
+
9
+ ### 1. Create Directory Structure
10
+
11
+ ```bash
12
+ mkdir .beads
13
+ touch .beads/issues.jsonl
14
+ ```
15
+
16
+ ### 2. Create Configuration File
17
+
18
+ Create `.beads/config.json`:
19
+
20
+ ```json
21
+ {
22
+ "version": "1.0",
23
+ "stealth": false,
24
+ "compact_threshold": 100,
25
+ "auto_sync": true
26
+ }
27
+ ```
28
+
29
+ ### 3. Add to .gitignore
30
+
31
+ Add to `.gitignore`:
32
+
33
+ ```
34
+ .beads/cache.db
35
+ .beads/cache.db-*
36
+ ```
37
+
38
+ **Note**: Commit `.beads/issues.jsonl` and `.beads/config.json`, but not the cache.
39
+
40
+ ### 4. Create AGENTS.md Integration
41
+
42
+ Add to your project's `AGENTS.md` (or create it):
43
+
44
+ ```markdown
45
+ # Beads Task Tracking
46
+
47
+ This project uses Beads for task tracking. Issues are stored in `.beads/issues.jsonl`.
48
+
49
+ ## File Format
50
+
51
+ Each line in `.beads/issues.jsonl` is a JSON object representing an issue or update.
52
+
53
+ ### Creating Tasks
54
+
55
+ Append a JSON line:
56
+
57
+ ```json
58
+ {"id":"bd-<hash>","title":"Task title","status":"open","priority":0,"created":"<ISO-8601>","updated":"<ISO-8601>"}
59
+ ```
60
+
61
+ ### Updating Tasks
62
+
63
+ Append a JSON line with the same ID and updated fields:
64
+
65
+ ```json
66
+ {"id":"bd-<hash>","status":"in-progress","updated":"<ISO-8601>"}
67
+ ```
68
+
69
+ ### Closing Tasks
70
+
71
+ Append a JSON line with status "closed":
72
+
73
+ ```json
74
+ {"id":"bd-<hash>","status":"closed","closed":"<ISO-8601>","updated":"<ISO-8601>"}
75
+ ```
76
+
77
+ ## Task States
78
+
79
+ - **open** - Ready to work on
80
+ - **in-progress** - Currently being worked on
81
+ - **blocked** - Waiting on dependencies
82
+ - **closed** - Completed
83
+
84
+ ## Dependencies
85
+
86
+ Use `blocks` and `blocked_by` fields:
87
+
88
+ ```json
89
+ {"id":"bd-a1b2","blocks":["bd-b2c3"],"updated":"<ISO-8601>"}
90
+ ```
91
+
92
+ ## Finding Ready Tasks
93
+
94
+ Tasks are ready when:
95
+ - Status is "open"
96
+ - `blocked_by` is empty or all blockers are closed
97
+
98
+ ## Workflow
99
+
100
+ 1. Create task by appending to `.beads/issues.jsonl`
101
+ 2. Add dependencies with `blocks`/`blocked_by` fields
102
+ 3. Find ready tasks (no open blockers)
103
+ 4. Update status to "in-progress"
104
+ 5. Add comments as needed
105
+ 6. Close task when complete
106
+ ```
107
+
108
+ ## Generating Hash-Based IDs
109
+
110
+ ### Simple Method
111
+
112
+ Use the first 4 characters of a hash:
113
+
114
+ ```bash
115
+ # Linux/macOS
116
+ echo -n "$(date +%s%N)" | md5sum | cut -c1-4
117
+
118
+ # Or use a random string
119
+ echo -n "task-$(date +%s)" | md5sum | cut -c1-4
120
+ ```
121
+
122
+ ### In Code (Python)
123
+
124
+ ```python
125
+ import hashlib
126
+ import time
127
+
128
+ def generate_id():
129
+ hash_input = f"task-{time.time()}"
130
+ hash_hex = hashlib.md5(hash_input.encode()).hexdigest()
131
+ return f"bd-{hash_hex[:4]}"
132
+
133
+ print(generate_id()) # bd-a1b2
134
+ ```
135
+
136
+ ### In Code (JavaScript)
137
+
138
+ ```javascript
139
+ const crypto = require('crypto');
140
+
141
+ function generateId() {
142
+ const hashInput = `task-${Date.now()}`;
143
+ const hash = crypto.createHash('md5').update(hashInput).digest('hex');
144
+ return `bd-${hash.substring(0, 4)}`;
145
+ }
146
+
147
+ console.log(generateId()); // bd-a1b2
148
+ ```
149
+
150
+ ## Creating Your First Task
151
+
152
+ ### 1. Generate ID
153
+
154
+ ```bash
155
+ # Generate a unique ID
156
+ ID="bd-$(echo -n "task-$(date +%s)" | md5sum | cut -c1-4)"
157
+ echo $ID # bd-a1b2
158
+ ```
159
+
160
+ ### 2. Create JSON
161
+
162
+ ```bash
163
+ # Create task JSON
164
+ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
165
+ TASK=$(cat <<EOF
166
+ {"id":"$ID","title":"Implement user authentication","status":"open","priority":0,"created":"$TIMESTAMP","updated":"$TIMESTAMP"}
167
+ EOF
168
+ )
169
+ ```
170
+
171
+ ### 3. Append to File
172
+
173
+ ```bash
174
+ echo "$TASK" >> .beads/issues.jsonl
175
+ ```
176
+
177
+ ## Working with AI Agents
178
+
179
+ ### Creating Tasks
180
+
181
+ Ask your AI:
182
+
183
+ ```
184
+ Create a Beads task for implementing user authentication with priority 0.
185
+ Append the JSON to .beads/issues.jsonl with a unique hash-based ID.
186
+ ```
187
+
188
+ The AI will:
189
+ 1. Generate a unique ID (e.g., `bd-a1b2`)
190
+ 2. Create JSON with required fields
191
+ 3. Append to `.beads/issues.jsonl`
192
+
193
+ ### Finding Ready Tasks
194
+
195
+ Ask your AI:
196
+
197
+ ```
198
+ What Beads tasks are ready to work on?
199
+ Parse .beads/issues.jsonl and find tasks where:
200
+ - status is "open"
201
+ - blocked_by is empty or all blockers are closed
202
+ ```
203
+
204
+ ### Updating Tasks
205
+
206
+ Ask your AI:
207
+
208
+ ```
209
+ Update Beads task bd-a1b2 to status "in-progress"
210
+ Append an update to .beads/issues.jsonl
211
+ ```
212
+
213
+ ### Adding Dependencies
214
+
215
+ Ask your AI:
216
+
217
+ ```
218
+ Make Beads task bd-b2c3 depend on bd-a1b2
219
+ Append updates to .beads/issues.jsonl:
220
+ - bd-a1b2 blocks bd-b2c3
221
+ - bd-b2c3 is blocked_by bd-a1b2
222
+ ```
223
+
224
+ ## Reading Current State
225
+
226
+ ### Parse JSONL (Python)
227
+
228
+ ```python
229
+ import json
230
+
231
+ def read_issues(filepath='.beads/issues.jsonl'):
232
+ issues = {}
233
+ with open(filepath, 'r') as f:
234
+ for line in f:
235
+ issue = json.loads(line.strip())
236
+ issue_id = issue['id']
237
+ if issue_id not in issues:
238
+ issues[issue_id] = {}
239
+ issues[issue_id].update(issue)
240
+ return issues
241
+
242
+ # Get all issues
243
+ all_issues = read_issues()
244
+
245
+ # Find ready tasks
246
+ ready_tasks = [
247
+ issue for issue in all_issues.values()
248
+ if issue.get('status') == 'open' and not issue.get('blocked_by')
249
+ ]
250
+ ```
251
+
252
+ ### Parse JSONL (JavaScript)
253
+
254
+ ```javascript
255
+ const fs = require('fs');
256
+
257
+ function readIssues(filepath = '.beads/issues.jsonl') {
258
+ const issues = {};
259
+ const lines = fs.readFileSync(filepath, 'utf-8').split('\n');
260
+
261
+ for (const line of lines) {
262
+ if (!line.trim()) continue;
263
+ const issue = JSON.parse(line);
264
+ const issueId = issue.id;
265
+ if (!issues[issueId]) {
266
+ issues[issueId] = {};
267
+ }
268
+ Object.assign(issues[issueId], issue);
269
+ }
270
+
271
+ return issues;
272
+ }
273
+
274
+ // Get all issues
275
+ const allIssues = readIssues();
276
+
277
+ // Find ready tasks
278
+ const readyTasks = Object.values(allIssues).filter(
279
+ issue => issue.status === 'open' && (!issue.blocked_by || issue.blocked_by.length === 0)
280
+ );
281
+ ```
282
+
283
+ ## Limitations Without CLI
284
+
285
+ - ❌ No SQLite cache (slower queries)
286
+ - ❌ No auto-sync daemon
287
+ - ❌ No validation
288
+ - ❌ No compaction
289
+ - ❌ Manual ID generation
290
+ - ❌ Manual JSONL parsing
291
+
292
+ ## Benefits Without CLI
293
+
294
+ - ✅ No installation required
295
+ - ✅ Works immediately
296
+ - ✅ Full control over data
297
+ - ✅ Simple git workflow
298
+ - ✅ Compatible with all AI agents
299
+
300
+ ## Upgrading to CLI Later
301
+
302
+ If you decide to install the CLI later:
303
+
304
+ ```bash
305
+ npm install -g @beads/bd
306
+ cd your-project
307
+ bd init
308
+ ```
309
+
310
+ The CLI will:
311
+ - Detect existing `.beads/issues.jsonl`
312
+ - Build SQLite cache from existing data
313
+ - Start auto-sync daemon
314
+ - Continue working with your existing issues
315
+