get-tbd 0.1.8

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 (60) hide show
  1. package/README.md +508 -0
  2. package/dist/bin-bootstrap.cjs +25 -0
  3. package/dist/bin-bootstrap.cjs.map +1 -0
  4. package/dist/bin.d.mts +2 -0
  5. package/dist/bin.mjs +106320 -0
  6. package/dist/bin.mjs.map +1 -0
  7. package/dist/cli.d.mts +13 -0
  8. package/dist/cli.mjs +9711 -0
  9. package/dist/cli.mjs.map +1 -0
  10. package/dist/docs/README.md +508 -0
  11. package/dist/docs/SKILL.md +222 -0
  12. package/dist/docs/guidelines/backward-compatibility-rules.md +78 -0
  13. package/dist/docs/guidelines/commit-conventions.md +78 -0
  14. package/dist/docs/guidelines/convex-limits-best-practices.md +170 -0
  15. package/dist/docs/guidelines/convex-rules.md +942 -0
  16. package/dist/docs/guidelines/general-coding-rules.md +36 -0
  17. package/dist/docs/guidelines/general-comment-rules.md +45 -0
  18. package/dist/docs/guidelines/general-eng-assistant-rules.md +54 -0
  19. package/dist/docs/guidelines/general-style-rules.md +37 -0
  20. package/dist/docs/guidelines/general-tdd-guidelines.md +52 -0
  21. package/dist/docs/guidelines/general-testing-rules.md +26 -0
  22. package/dist/docs/guidelines/golden-testing-guidelines.md +72 -0
  23. package/dist/docs/guidelines/python-cli-patterns.md +84 -0
  24. package/dist/docs/guidelines/python-rules.md +60 -0
  25. package/dist/docs/guidelines/typescript-cli-tool-rules.md +346 -0
  26. package/dist/docs/guidelines/typescript-code-coverage.md +171 -0
  27. package/dist/docs/guidelines/typescript-monorepo-patterns.md +71 -0
  28. package/dist/docs/guidelines/typescript-rules.md +55 -0
  29. package/dist/docs/install/claude-header.md +12 -0
  30. package/dist/docs/install/ensure-gh-cli.sh +88 -0
  31. package/dist/docs/shortcuts/standard/commit-code.md +23 -0
  32. package/dist/docs/shortcuts/standard/create-or-update-pr-simple.md +29 -0
  33. package/dist/docs/shortcuts/standard/create-or-update-pr-with-validation-plan.md +48 -0
  34. package/dist/docs/shortcuts/standard/implement-beads.md +31 -0
  35. package/dist/docs/shortcuts/standard/new-architecture-doc.md +31 -0
  36. package/dist/docs/shortcuts/standard/new-implementation-beads-from-spec.md +28 -0
  37. package/dist/docs/shortcuts/standard/new-plan-spec.md +49 -0
  38. package/dist/docs/shortcuts/standard/new-research-brief.md +30 -0
  39. package/dist/docs/shortcuts/standard/new-validation-plan.md +51 -0
  40. package/dist/docs/shortcuts/standard/precommit-process.md +88 -0
  41. package/dist/docs/shortcuts/standard/review-code-python.md +47 -0
  42. package/dist/docs/shortcuts/standard/review-code-typescript.md +46 -0
  43. package/dist/docs/shortcuts/standard/welcome-user.md +65 -0
  44. package/dist/docs/shortcuts/system/shortcut-explanation.md +61 -0
  45. package/dist/docs/shortcuts/system/skill-brief.md +40 -0
  46. package/dist/docs/shortcuts/system/skill.md +210 -0
  47. package/dist/docs/skill-brief.md +40 -0
  48. package/dist/docs/tbd-closing.md +31 -0
  49. package/dist/docs/tbd-design.md +5308 -0
  50. package/dist/docs/tbd-docs.md +1113 -0
  51. package/dist/docs/tbd-prime.md +119 -0
  52. package/dist/docs/templates/architecture-doc.md +117 -0
  53. package/dist/docs/templates/plan-spec.md +69 -0
  54. package/dist/docs/templates/research-brief.md +71 -0
  55. package/dist/index.d.mts +567 -0
  56. package/dist/index.mjs +3 -0
  57. package/dist/src-CWD4YCBk.mjs +319 -0
  58. package/dist/src-CWD4YCBk.mjs.map +1 -0
  59. package/dist/tbd +106320 -0
  60. package/package.json +92 -0
package/README.md ADDED
@@ -0,0 +1,508 @@
1
+ # tbd
2
+
3
+ **tbd helps humans and agents ship code with greater speed, quality, and discipline.**
4
+
5
+ **tbd** (which stands for “To Be Done” or “TypeScript beads,” depending on your
6
+ preference) is a command-line issue tracker plus workflows for spec-driven agentic
7
+ development.
8
+
9
+ It’s ideal for AI coding agents as well as humans: simple commands, pretty console and
10
+ JSON output. It installs via `npm` and works in almost any agent or sandboxed cloud
11
+ environment.
12
+
13
+ ## Quick Start
14
+
15
+ > [!TIP]
16
+ >
17
+ > *Just tell your agent:*
18
+ >
19
+ > ***“npm install -g get-tbd@latest and run tbd for instructions”***
20
+
21
+ That’s it. Running `tbd` with no arguments gives you everything you need:
22
+ - Not installed? It tells you how to install and set up.
23
+ - Not initialized? It explains what tbd is and how to initialize.
24
+ - Already set up? It shows project status, available work, and workflow guidance.
25
+
26
+ This command bootstraps you through each step, providing context-aware instructions for
27
+ whatever comes next.
28
+
29
+ ## What tbd Provides
30
+
31
+ tbd gives you four capabilities that work together:
32
+
33
+ 1. **Issue Tracking**: Git-native tasks/bugs.
34
+ Never lose work across sessions.
35
+ 2. **Spec-Driven Workflows**: Plan features → break into issues → implement
36
+ systematically.
37
+ 3. **Shortcuts**: Pre-built processes for commits, PRs, reviews.
38
+ 4. **Guidelines**: Best practices for TypeScript, Python, testing.
39
+
40
+ Everything is **self-documenting** through the CLI—your agents just run `tbd` commands
41
+ to discover workflows and best practices.
42
+ And the tbd skill maps your intents down to shortcuts your agent can use and follow.
43
+
44
+ It’s basically like tbd is an issue tracker and a meta-skill.
45
+ When it installs, it adds instructions on all the subcommands including shortcuts, to
46
+ the SKILL.md/AGENTS.md files.
47
+
48
+ ### Quick Reference
49
+
50
+ You generally don’t need to type tbd commands unless you want to.
51
+ The point is to make it convenient for agents.
52
+ But here is a list of some common actions you can describe and how they map to tbd
53
+ commands:
54
+
55
+ | User Need or Request | tbd Command Agent Can Run | What Happens |
56
+ | --- | --- | --- |
57
+ | "There is a bug where ..." | `tbd create "..." --type=bug` | Creates issue |
58
+ | "Fix current issues" | `tbd ready` | Lists ready issues |
59
+ | *(agent choice)* | `tbd dep add <id> <depends-on>` | Adds dependency |
60
+ | *(agent choice)* | `tbd close <id>` | Closes issue |
61
+ | *(agent choice)* | `tbd sync` | Syncs issues to remote |
62
+ | "Build a TypeScript CLI" | `tbd guidelines typescript-cli-tool-rules` | Agent gets guidelines |
63
+ | "Improve eslint setup" | `tbd guidelines typescript-monorepo-patterns` | Agent gets guidelines |
64
+ | "Add better e2e testing" | `tbd guidelines golden-testing-guidelines` | Agent gets guidelines |
65
+ | "Review these changes" (TypeScript) | `tbd guidelines typescript-rules` | Agent gets guidelines |
66
+ | "Review these changes" (Python) | `tbd guidelines python-rules` | Agent gets guidelines |
67
+ | "Let's plan a new feature" | `tbd shortcut new-plan-spec` | Agent gets spec template and instructions |
68
+ | "Break spec into issues" | `tbd shortcut new-implementation-beads-from-spec` | Agent gets instructions |
69
+ | "Implement these issues" | `tbd shortcut implement-beads` | Agent gets instructions |
70
+ | "Commit this" | `tbd shortcut commit-code` | Agent gets instructions |
71
+ | "Create a PR" | `tbd shortcut create-or-update-pr-simple` | Agent gets instructions |
72
+ | "Research this topic" | `tbd shortcut new-research-brief` | Agent gets template and instructions |
73
+ | "Document this architecture" | `tbd shortcut new-architecture-doc` | Agent gets template and instructions |
74
+
75
+ ## Why?
76
+
77
+ ### Beads: The Great and the Not-So-Great Parts
78
+
79
+ Firstly, tbd was initially inspired by [Beads](https://github.com/steveyegge/beads) by
80
+ Steve Yegge. I love the power of Beads and am grateful for it!
81
+ If you’re not familiar with the idea, you absolutely should be using it, as it raises an
82
+ agent like Claude’s capacity for doing careful, planned work from ~5-10 to-do tasks to
83
+ hundreds of issues.
84
+
85
+ Unfortunately, after using it heavily for about a month, I found architectural issues
86
+ and glitches that were too much of a distraction to ignore.
87
+ Things like Claude Code Cloud’s network filesystems unable to use SQLite, fighting with
88
+ the daemon modifying files in the active working tree, merge conflicts, and a confusing
89
+ 4-way sync algorithm.
90
+ tbd uses a simpler architecture with (I hope) fewer edge cases and bugs.
91
+ If you already use Beads, you can import issues to tbd, preserving your issue IDs.
92
+ Internally, everything is Markdown files so you can debug or migrate in the future if
93
+ you wish.
94
+
95
+ > [!NOTE]
96
+ > I use *Beads* (capitalized) to refer to the original `bd` tool.
97
+ > In the docs and prompts I sometimes use lowercase “beads” as a generic way to refer to
98
+ > issues stored in `tbd` or `bd`.
99
+
100
+ Beads are remarkably effective at solving *task tracking*. But they do not solve two
101
+ other key problems:
102
+
103
+ - *planning* (researching, documenting, thinking through what you want to build, before
104
+ you create beads)
105
+ - *orchestration* (deciding in real time how to get various agents to implement beads)
106
+
107
+ ### Spec-Driven Development
108
+
109
+ tbd won’t help you directly with orchestration.
110
+ The original Beads, [Gas Town](https://github.com/steveyegge/gastown), and
111
+ [Agent Mail](https://github.com/Dicklesworthstone/mcp_agent_mail) have done more there
112
+ by emphasizing rapid communication among agents (although I find most of the approaches
113
+ a bit too chaotic for my needs).
114
+ And others are using a Ralph loop.
115
+
116
+ So far, although I see the fun of such automation, I don’t feel like I can count on it
117
+ to do good engineering.
118
+ For most of my use cases I still prefer about 8 or 10 local or cloud agents running with
119
+ a little more direct management by me, on tasks I understand and know are pretty well
120
+ defined.
121
+
122
+ However tbd, *will* help you quite a bit with planning.
123
+ In fact, with good planning, orchestration becomes easier, because with a good enough
124
+ spec and beads, you can leave an agent to run overnight and have pretty good code to
125
+ come back to!
126
+
127
+ So I think tbd the strongest tool for that.
128
+
129
+ After months of heavy agentic coding I’m
130
+ [a big fan of carefully written specs](https://github.com/jlevy/speculate/blob/main/about/lessons_in_spec_coding.md).
131
+ It’s taken me some experimentation, but I’ve found having workflows for writing,
132
+ elaborating, implementing, and validating various kinds of docs and specs.
133
+ The problem was, there were about 50 documents I wanted to copy into each new
134
+ repository.
135
+
136
+ I’ve now figured out how to bake more of these common workflows into tbd, you’re always
137
+ one `npm install -g` away from having both the issue tracker and the docs and prompts
138
+ you need.
139
+
140
+ A key part is that it’s really convenient to have *shortcuts*: small sets of
141
+ instructions for the agent that remind it to do things right.
142
+ Or to follow a standard process.
143
+ I’ve baked in a few general ones that I’ve found incredibly useful.
144
+
145
+ - Writing planning specs
146
+ - Writing implementation plans that map into beads
147
+ - Improving code quality via numerous quality rules I’ve curated over the past few
148
+ months (TypeScript, Python, and a few other areas like Convex)
149
+ - Reviewing and committing code and filing PRs
150
+ - Writing validation plans to help you review
151
+
152
+ A bunch of my workflows and docs are already included by default, but you’re not
153
+ required to use them, and you can instead use your own; the `.tbd/config.yml` file
154
+ specifies the docs that are cached and available to your agents via tbd commands.
155
+
156
+ ## Features
157
+
158
+ - **Git-native:** Issues live in your repo, synced to a separate, dedicated `tbd-sync`
159
+ branch. Your code history stays clean—no issue churn polluting your logs.
160
+ - **Agent friendly:** JSON output, non-interactive mode, simple commands that agents
161
+ understand. Installs itself as a skill in Claude Code.
162
+ - **Markdown + YAML frontmatter:** One file per issue, human-readable and editable.
163
+ This eliminates most merge conflicts.
164
+ - **Beads alternative:** `tbd` is largely compatible with `bd` at the CLI level.
165
+ But has no JSONL merge conflicts in git.
166
+ No daemon modifying your current working tree.
167
+ No agents confused by error messages about which of several “modes” you’re running in.
168
+ No SQLite file locking issues on network filesystems (like what is used by Claude Code
169
+ Cloud).
170
+ - **Shortcuts:** Over a dozen reusable instruction documents for common workflows, like
171
+ - `new-plan-spec` — Create a feature planning spec
172
+ - `new-research-brief` — Create a research document
173
+ - `precommit-process` — Pre-commit review and testing
174
+ - `commit-code` — Run checks and commit
175
+ - `create-or-update-pr-with-validation-plan` — Create PR with test plan
176
+ - **Guidelines:** [Over 15 docs (~30 pages)](packages/tbd/docs/guidelines/) of coding
177
+ rules and best practices for TypeScript, Python, Convex, testing, TDD, backward
178
+ compatibility, and more.
179
+ - **Templates:** Document templates for planning specs, research briefs, architecture
180
+ docs.
181
+
182
+ > [!NOTE]
183
+ > See the [design doc](docs/tbd-design.md) (`tbd design`) or
184
+ > [reference docs](docs/tbd-docs.md) (`tbd docs`) for more details.
185
+
186
+ ## Installation
187
+
188
+ **Requirements:**
189
+ - Node.js 20+
190
+ - Git 2.42+ (for orphan worktree support)
191
+
192
+ ```bash
193
+ npm install -g get-tbd@latest
194
+ ```
195
+
196
+ ### Setup Options
197
+
198
+ ```bash
199
+ # Fresh project (--prefix is REQUIRED)
200
+ tbd setup --auto --prefix=myapp
201
+
202
+ # Joining existing tbd project (no prefix needed)
203
+ tbd setup --auto
204
+
205
+ # Refresh configs and skill files (re-run anytime to update)
206
+ tbd setup --auto
207
+
208
+ # Migrate from Beads
209
+ tbd setup --from-beads
210
+
211
+ # Advanced: surgical init only
212
+ tbd init --prefix=proj
213
+ ```
214
+
215
+ > **Tip:** Run `tbd setup --auto` anytime to refresh skill files, hooks, and configs.
216
+ > This updates your local installation with the latest shortcuts, guidelines, and
217
+ > templates lists.
218
+
219
+ ### Basic Usage
220
+
221
+ ```bash
222
+ # Create issues
223
+ tbd create "API returns 500 on malformed input" --type=bug --priority=P1
224
+ tbd create "Add rate limiting to /api/upload" --type=feature
225
+ tbd list --pretty # View issues
226
+
227
+ # Find and claim work
228
+ tbd ready # What's available?
229
+ tbd update proj-a7k2 --status=in_progress # Claim it
230
+
231
+ # Complete and sync
232
+ tbd closing # Get a reminder of the closing protocol (this is also in the skill docs)
233
+ tbd close proj-a7k2 --reason="Fixed in commit abc123"
234
+ tbd sync
235
+ ```
236
+
237
+ ## Commands
238
+
239
+ ### Core Workflow
240
+
241
+ ```bash
242
+ tbd ready # Issues ready to work on (open, unblocked, unassigned)
243
+ tbd list # List open issues
244
+ tbd list --all # Include closed
245
+ tbd show proj-a7k2 # View issue details
246
+ tbd create "Title" --type=bug # Create issue (bug/feature/task/epic/chore)
247
+ tbd update proj-a7k2 --status=in_progress
248
+ tbd close proj-a7k2 # Close issue
249
+ tbd sync # Sync with remote (auto-commits and pushes issues)
250
+ ```
251
+
252
+ ### Dependencies
253
+
254
+ ```bash
255
+ tbd dep add proj-b3m9 proj-a7k2 # b3m9 is blocked by a7k2
256
+ tbd blocked # Show blocked issues
257
+ ```
258
+
259
+ ### Labels
260
+
261
+ ```bash
262
+ tbd label add proj-a7k2 urgent backend
263
+ tbd label remove proj-a7k2 urgent
264
+ tbd label list # All labels in use
265
+ ```
266
+
267
+ ### Search
268
+
269
+ ```bash
270
+ tbd search "authentication"
271
+ tbd search "TODO" --status=open
272
+ ```
273
+
274
+ ### Maintenance
275
+
276
+ ```bash
277
+ tbd status # Repository status (works before init too)
278
+ tbd stats # Issue statistics
279
+ tbd doctor # Check for problems
280
+ tbd doctor --fix # Auto-fix issues
281
+ ```
282
+
283
+ ## Spec-Driven Development
284
+
285
+ For non-trivial features, tbd supports a spec-driven workflow:
286
+
287
+ 1. **Plan**: Create a planning spec (`tbd shortcut new-plan-spec`)
288
+ 2. **Break down**: Convert spec into implementation issues
289
+ (`tbd shortcut new-implementation-beads-from-spec`)
290
+ 3. **Implement**: Work through issues systematically (`tbd shortcut implement-beads`)
291
+ 4. **Validate**: Create validation plan, run tests (`tbd shortcut new-validation-plan`)
292
+ 5. **Ship**: Commit, create PR (`tbd shortcut create-or-update-pr-with-validation-plan`)
293
+
294
+ This methodology helps structure complex work before diving into code, creating clear
295
+ documentation of what was built and why.
296
+
297
+ ## For AI Agents
298
+
299
+ tbd is designed for AI coding agents.
300
+ The key philosophy: **agents should use tbd proactively to help users**, not just tell
301
+ users about commands.
302
+
303
+ ### Getting Oriented
304
+
305
+ Just run `tbd` — it provides complete orientation including:
306
+ - Installation and project status
307
+ - Workflow rules and session protocol
308
+ - All available commands with examples
309
+ - Directory of shortcuts and guidelines
310
+
311
+ For abbreviated output in constrained contexts: `tbd prime --brief`
312
+
313
+ ### Agent Workflow Loop
314
+
315
+ ```bash
316
+ tbd ready --json # Find work
317
+ tbd update proj-xxxx --status=in_progress # Claim (advisory)
318
+ # ... do the work ...
319
+ tbd close proj-xxxx --reason="Done" # Complete
320
+ tbd sync # Push
321
+ ```
322
+
323
+ ### Agent-Friendly Flags
324
+
325
+ | Flag | Purpose |
326
+ | --- | --- |
327
+ | `--json` | Machine-parseable output |
328
+ | `--non-interactive` | Fail if input required |
329
+ | `--yes` | Auto-confirm prompts |
330
+ | `--dry-run` | Preview changes |
331
+ | `--quiet` | Minimal output |
332
+
333
+ ### Claude Code Integration
334
+
335
+ ```bash
336
+ tbd setup --auto --prefix=myapp # Fresh project: full setup including Claude hooks
337
+ tbd setup --auto # Existing project or refresh: configure/update hooks
338
+ ```
339
+
340
+ This configures SessionStart hooks that run at the beginning of each agent session:
341
+
342
+ - **`tbd prime`** — Injects workflow context so the agent knows how to use tbd
343
+ - **`ensure-gh-cli.sh`** — Installs the GitHub CLI (`gh`) if not already available,
344
+ enabling PR creation, issue management, and GitHub API access from agent sessions
345
+
346
+ The agent can also run `tbd` at any time to get full orientation and see project status.
347
+
348
+ **GitHub authentication:** For `gh` to work, set these environment variables before
349
+ starting your agent session:
350
+
351
+ ```
352
+ GH_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
353
+ GH_PROMPT_DISABLED=1
354
+ ```
355
+
356
+ Create a [Personal Access Token](https://github.com/settings/tokens?type=beta)
357
+ (fine-grained recommended) with **Contents** and **Pull requests** read/write
358
+ permissions. For Claude Code Cloud, set these in your project’s environment variables.
359
+ For local CLI usage, add them to your shell profile (`~/.zshrc` or `~/.bashrc`). See
360
+ [GitHub CLI setup docs](docs/general/agent-setup/github-cli-setup.md) for details.
361
+
362
+ To disable automatic `gh` installation, pass `--no-gh-cli` during setup or set
363
+ `use_gh_cli: false` in `.tbd/config.yml` under `settings:`.
364
+
365
+ **Updating:** Run `tbd setup --auto` anytime to refresh skill files with the latest
366
+ shortcuts, guidelines, and templates.
367
+
368
+ ### Shortcuts, Guidelines, and Templates
369
+
370
+ tbd includes three types of documentation agents can invoke:
371
+
372
+ - **Shortcuts** — Reusable instruction documents for common workflows
373
+ - **Guidelines** — Coding rules and best practices
374
+ - **Templates** — Document templates for specs, research, architecture
375
+
376
+ ```bash
377
+ # Shortcuts
378
+ tbd shortcut --list # List all shortcuts
379
+ tbd shortcut new-plan-spec # Run a shortcut by name
380
+
381
+ # Guidelines
382
+ tbd guidelines --list # List all guidelines
383
+ tbd guidelines typescript-rules # Get TypeScript rules
384
+
385
+ # Templates
386
+ tbd template --list # List all templates
387
+ tbd template plan-spec > docs/project/specs/plan-2025-01-15-feature.md
388
+
389
+ # Add external docs by URL
390
+ tbd guidelines --add=<url> --name=<name>
391
+ tbd shortcut --add=<url> --name=<name>
392
+ tbd template --add=<url> --name=<name>
393
+ ```
394
+
395
+ **Available Shortcuts:**
396
+
397
+ | Shortcut | Purpose |
398
+ | --- | --- |
399
+ | `new-plan-spec` | Create feature planning spec |
400
+ | `new-research-brief` | Create research document |
401
+ | `new-architecture-doc` | Create architecture document |
402
+ | `new-validation-plan` | Create test/validation plan |
403
+ | `new-implementation-beads-from-spec` | Break spec into issues |
404
+ | `implement-beads` | Implement issues from specs |
405
+ | `precommit-process` | Pre-commit review and testing |
406
+ | `commit-code` | Commit with pre-commit checks |
407
+ | `review-code-typescript` | Code review for TypeScript |
408
+ | `review-code-python` | Code review for Python |
409
+ | `create-or-update-pr-simple` | Basic PR creation |
410
+ | `create-or-update-pr-with-validation-plan` | PR with validation plan |
411
+
412
+ **Available Guidelines:**
413
+
414
+ | Guideline | Description |
415
+ | --- | --- |
416
+ | `typescript-rules` | TypeScript coding rules |
417
+ | `typescript-cli-tool-rules` | CLI tools with Commander.js |
418
+ | `typescript-monorepo-patterns` | TypeScript monorepo architecture |
419
+ | `python-rules` | Python coding rules |
420
+ | `python-cli-patterns` | Python CLI architecture |
421
+ | `convex-rules` | Convex database patterns |
422
+ | `general-coding-rules` | Constants, magic numbers, practices |
423
+ | `general-testing-rules` | General testing principles |
424
+ | `general-tdd-guidelines` | TDD methodology |
425
+ | `general-comment-rules` | Comment best practices |
426
+ | `general-style-rules` | Auto-formatting and output formatting |
427
+ | `general-eng-assistant-rules` | AI assistant objectivity and communication |
428
+ | `commit-conventions` | Conventional commits format |
429
+ | `golden-testing-guidelines` | Golden/snapshot testing |
430
+ | `backward-compatibility-rules` | API and schema compatibility |
431
+
432
+ **Available Templates:**
433
+
434
+ | Template | Description |
435
+ | --- | --- |
436
+ | `plan-spec` | Feature planning specification |
437
+ | `research-brief` | Research document |
438
+ | `architecture` | Architecture document |
439
+
440
+ ## Documentation
441
+
442
+ ```bash
443
+ tbd # Full orientation and workflow guidance
444
+ tbd readme # This file
445
+ tbd docs # Full CLI reference
446
+ ```
447
+
448
+ Or read online:
449
+ - [CLI Reference](docs/tbd-docs.md) — Complete command documentation
450
+ - [Design Doc](docs/tbd-design.md) — Technical architecture
451
+
452
+ ## Team Workflows
453
+
454
+ tbd is designed for teams where one person sets up the project and others join later.
455
+
456
+ **First contributor (project setup):**
457
+ ```bash
458
+ npm install -g get-tbd@latest
459
+ tbd setup --auto --prefix=myproject
460
+ git add .tbd/ .claude/ && git commit -m "Initialize tbd"
461
+ git push
462
+ ```
463
+
464
+ **Joining contributors:**
465
+ ```bash
466
+ git clone <repo> # .tbd/ directory comes with repo
467
+ npm install -g get-tbd@latest # If not already installed
468
+ tbd setup --auto # No --prefix needed! Reads existing config
469
+ ```
470
+
471
+ The second contributor just runs `tbd setup --auto` — no need to know the project prefix
472
+ or any other configuration details.
473
+
474
+ **Updating tbd:** After upgrading tbd (`npm install -g get-tbd@latest`), run
475
+ `tbd setup --auto` to refresh local skill files with the latest shortcuts, guidelines,
476
+ and templates.
477
+
478
+ ## Migration from Beads
479
+
480
+ ```bash
481
+ # Auto-detects beads and migrates (uses existing beads prefix)
482
+ tbd setup --from-beads
483
+
484
+ # Verify
485
+ tbd stats
486
+ tbd list --all
487
+
488
+ # If you wish to disable beads after migration
489
+ tbd setup beads --disable
490
+ ```
491
+
492
+ Issue IDs are preserved: `proj-123` in beads becomes `proj-123` in tbd.
493
+ The prefix from your beads configuration is automatically used.
494
+
495
+ ## How It Works
496
+
497
+ tbd stores issues on a dedicated `tbd-sync` branch, separate from your code.
498
+ One file per issue means parallel creation never conflicts.
499
+ Run `tbd sync` to push changes—no manual git operations needed for issues.
500
+ See the [design doc](docs/tbd-design.md) for details.
501
+
502
+ ## Contributing
503
+
504
+ See [docs/development.md](docs/development.md) for build and test instructions.
505
+
506
+ ## License
507
+
508
+ MIT
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+
5
+ //#region src/cli/bin-bootstrap.cjs
6
+ /**
7
+ * CLI bootstrap entry point (CommonJS).
8
+ *
9
+ * This file MUST be CommonJS so it executes before any ESM module loading.
10
+ * It enables Node's compile cache for faster subsequent runs, then loads the real CLI.
11
+ *
12
+ * Why CJS? ESM static imports are resolved before module code runs, so calling
13
+ * enableCompileCache() in an ESM file is "too late" - the heavy deps are already
14
+ * being parsed. A CJS bootstrap lets us enable caching BEFORE the ESM import.
15
+ */
16
+ const path = require("node:path");
17
+ const { pathToFileURL } = require("node:url");
18
+ try {
19
+ const mod = require("node:module");
20
+ if (typeof mod.enableCompileCache === "function") mod.enableCompileCache();
21
+ } catch {}
22
+ import(pathToFileURL(path.join(__dirname, "bin.mjs")).href);
23
+
24
+ //#endregion
25
+ //# sourceMappingURL=bin-bootstrap.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-bootstrap.cjs","names":[],"sources":["../src/cli/bin-bootstrap.cjs"],"sourcesContent":["/* global __dirname */\n/**\n * CLI bootstrap entry point (CommonJS).\n *\n * This file MUST be CommonJS so it executes before any ESM module loading.\n * It enables Node's compile cache for faster subsequent runs, then loads the real CLI.\n *\n * Why CJS? ESM static imports are resolved before module code runs, so calling\n * enableCompileCache() in an ESM file is \"too late\" - the heavy deps are already\n * being parsed. A CJS bootstrap lets us enable caching BEFORE the ESM import.\n */\n'use strict';\n\nconst path = require('node:path');\nconst { pathToFileURL } = require('node:url');\n\n// Enable compile cache BEFORE loading any ESM modules.\n// This caches compiled bytecode on disk for faster subsequent runs.\n// Available in Node 22.8.0+, gracefully ignored in older versions.\ntry {\n const mod = require('node:module');\n if (typeof mod.enableCompileCache === 'function') {\n mod.enableCompileCache();\n }\n} catch {\n // Silently ignore - caching is an optimization, not required.\n}\n\n// Load the bundled CLI binary (ESM with all deps bundled for fast startup).\n// bin.mjs runs runCli() as a side effect when imported.\nconst binPath = path.join(__dirname, 'bin.mjs');\nimport(pathToFileURL(binPath).href);\n"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,OAAO,QAAQ,YAAY;AACjC,MAAM,EAAE,kBAAkB,QAAQ,WAAW;AAK7C,IAAI;CACF,MAAM,MAAM,QAAQ,cAAc;AAClC,KAAI,OAAO,IAAI,uBAAuB,WACpC,KAAI,oBAAoB;QAEpB;AAOR,OAAO,cADS,KAAK,KAAK,WAAW,UAAU,CAClB,CAAC"}
package/dist/bin.d.mts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export { };