get-tbd 0.2.1 → 0.2.3
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/dist/bin.mjs +653 -229
- package/dist/bin.mjs.map +1 -1
- package/dist/cli.mjs +644 -232
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-BJz1m9eN.mjs → config-1ouUTKQr.mjs} +15 -4
- package/dist/config-1ouUTKQr.mjs.map +1 -0
- package/dist/{config-DlCUMyCG.mjs → config-YRRW9l89.mjs} +1 -1
- package/dist/docs/SKILL.md +8 -1
- package/dist/docs/guidelines/bun-monorepo-patterns.md +65 -66
- package/dist/docs/guidelines/cli-agent-skill-patterns.md +415 -169
- package/dist/docs/guidelines/common-doc-guidelines.md +2 -2
- package/dist/docs/guidelines/convex-limits-best-practices.md +39 -39
- package/dist/docs/guidelines/convex-rules.md +13 -13
- package/dist/docs/guidelines/electron-app-development-patterns.md +18 -18
- package/dist/docs/guidelines/error-handling-rules.md +3 -0
- package/dist/docs/guidelines/general-coding-rules.md +2 -1
- package/dist/docs/guidelines/general-comment-rules.md +3 -2
- package/dist/docs/guidelines/general-eng-agent-principles.md +126 -0
- package/dist/docs/guidelines/general-tdd-guidelines.md +10 -4
- package/dist/docs/guidelines/general-testing-rules.md +4 -0
- package/dist/docs/guidelines/golden-testing-guidelines.md +9 -9
- package/dist/docs/guidelines/pnpm-monorepo-patterns.md +49 -49
- package/dist/docs/guidelines/python-cli-patterns.md +5 -1
- package/dist/docs/guidelines/python-modern-guidelines.md +7 -4
- package/dist/docs/guidelines/python-rules.md +6 -0
- package/dist/docs/guidelines/release-notes-guidelines.md +18 -2
- package/dist/docs/guidelines/supply-chain-hardening.md +84 -29
- package/dist/docs/guidelines/tbd-sync-troubleshooting.md +27 -5
- package/dist/docs/guidelines/typescript-cli-tool-rules.md +18 -18
- package/dist/docs/guidelines/typescript-code-coverage.md +8 -6
- package/dist/docs/guidelines/typescript-rules.md +9 -11
- package/dist/docs/guidelines/typescript-sorting-patterns.md +1 -1
- package/dist/docs/guidelines/typescript-yaml-handling-rules.md +6 -6
- package/dist/docs/shortcuts/standard/new-shortcut.md +14 -0
- package/dist/docs/shortcuts/standard/setup-github-cli.md +4 -1
- package/dist/docs/shortcuts/system/shortcut-explanation.md +16 -1
- package/dist/docs/shortcuts/system/skill-baseline.md +8 -1
- package/dist/docs/tbd-design.md +43 -43
- package/dist/docs/tbd-docs.md +1 -1
- package/dist/docs/tbd-prime.md +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{src-CtZIHxYM.mjs → src-DTyyuaG_.mjs} +2 -2
- package/dist/{src-CtZIHxYM.mjs.map → src-DTyyuaG_.mjs.map} +1 -1
- package/dist/tbd +653 -229
- package/package.json +1 -1
- package/dist/config-BJz1m9eN.mjs.map +0 -1
- package/dist/docs/guidelines/general-eng-assistant-rules.md +0 -59
|
@@ -31,6 +31,24 @@ tbd sync
|
|
|
31
31
|
4. Import happens automatically when you later run `tbd sync` in an environment that can
|
|
32
32
|
push
|
|
33
33
|
|
|
34
|
+
### Push Fails Because Histories Are Unrelated
|
|
35
|
+
|
|
36
|
+
**Symptoms:**
|
|
37
|
+
- `tbd sync` aborts with “`origin/tbd-sync` has an unrelated history (no common
|
|
38
|
+
ancestor)”
|
|
39
|
+
- `tbd doctor` reports the remote sync branch histories are unrelated
|
|
40
|
+
- Push cannot fast-forward and a merge refuses
|
|
41
|
+
|
|
42
|
+
**Causes:**
|
|
43
|
+
- The local `tbd-sync` branch and `origin/tbd-sync` were created independently—for
|
|
44
|
+
example, two clones each initialized their own sync branch, or the remote branch was
|
|
45
|
+
replaced—so the two have no common ancestor
|
|
46
|
+
|
|
47
|
+
**Solutions:**
|
|
48
|
+
1. Run `tbd doctor --fix` to reconcile the unrelated histories.
|
|
49
|
+
This is non-destructive: a backup branch is created first.
|
|
50
|
+
2. Run `tbd sync` again to confirm the push succeeds.
|
|
51
|
+
|
|
34
52
|
### “Already in sync” but data not on remote
|
|
35
53
|
|
|
36
54
|
**Symptoms:**
|
|
@@ -60,7 +78,8 @@ auto-saving, since the issue is likely temporary.
|
|
|
60
78
|
1. Check network connectivity
|
|
61
79
|
2. Verify remote URL: `git remote -v`
|
|
62
80
|
3. Retry: `tbd sync`
|
|
63
|
-
4. If persistent,
|
|
81
|
+
4. If persistent, save for later: `tbd save --outbox` (auto-imports on the next
|
|
82
|
+
successful sync)
|
|
64
83
|
|
|
65
84
|
### Bulk Trivial Changes in Outbox (Version/Timestamp Only)
|
|
66
85
|
|
|
@@ -79,7 +98,7 @@ auto-saving, since the issue is likely temporary.
|
|
|
79
98
|
|
|
80
99
|
**What tbd now does:**
|
|
81
100
|
- `mergeIssues()` detects no-op merges and skips the version/timestamp bump
|
|
82
|
-
- `getUpdatedIssues()` ignores `version` and `updated_at` when filtering
|
|
101
|
+
- `getUpdatedIssues()` ignores `version` and `updated_at` when filtering—only issues
|
|
83
102
|
with actual content changes (title, status, labels, description, etc.)
|
|
84
103
|
are saved
|
|
85
104
|
- When fetch fails, the cached `origin/tbd-sync` ref is used for comparison instead of
|
|
@@ -87,7 +106,7 @@ auto-saving, since the issue is likely temporary.
|
|
|
87
106
|
|
|
88
107
|
**If you encounter this with an older version:**
|
|
89
108
|
1. Update tbd: `npm install -g get-tbd@latest`
|
|
90
|
-
2. If you already have a large outbox, you can safely import it
|
|
109
|
+
2. If you already have a large outbox, you can safely import it—the import will merge
|
|
91
110
|
using field-level LWW and the trivial changes will be harmless
|
|
92
111
|
3. Run `tbd sync` to clear the outbox
|
|
93
112
|
|
|
@@ -123,7 +142,7 @@ auto-saving, since the issue is likely temporary.
|
|
|
123
142
|
### Don’t gitignore .tbd/workspaces/
|
|
124
143
|
|
|
125
144
|
When `tbd sync` fails and auto-saves to `.tbd/workspaces/outbox/`, a new untracked
|
|
126
|
-
directory appears. Do not add it to `.gitignore
|
|
145
|
+
directory appears. Do not add it to `.gitignore`—the outbox must be committed to your
|
|
127
146
|
working branch so unsynced data survives across sessions.
|
|
128
147
|
|
|
129
148
|
**What to do instead:**
|
|
@@ -193,7 +212,8 @@ The `.tbd/.gitignore` file contains a `!workspaces/` negation pattern to prevent
|
|
|
193
212
|
- Commands fail with worktree errors
|
|
194
213
|
|
|
195
214
|
**Solutions:**
|
|
196
|
-
1. Run `tbd doctor --fix` to auto-repair
|
|
215
|
+
1. Run `tbd doctor --fix` to auto-repair, or `tbd sync --fix` to repair the worktree as
|
|
216
|
+
part of a sync
|
|
197
217
|
2. If that fails, manually repair:
|
|
198
218
|
```bash
|
|
199
219
|
rm -rf "$(git rev-parse --path-format=absolute --git-common-dir)/tbd/data-sync-worktree"
|
|
@@ -258,6 +278,8 @@ tbd sync
|
|
|
258
278
|
**CLI Options:**
|
|
259
279
|
- `--no-auto-save`: Skip automatic save to outbox on failure
|
|
260
280
|
- `--no-outbox`: Skip automatic import from outbox on success
|
|
281
|
+
- `--fix`: Repair an unhealthy worktree before syncing
|
|
282
|
+
- `--status`: Show sync status without syncing
|
|
261
283
|
|
|
262
284
|
See `tbd shortcut sync-failure-recovery` for the full workflow.
|
|
263
285
|
|
|
@@ -13,9 +13,9 @@ Commander 14 moves to security-only maintenance until May 2027.
|
|
|
13
13
|
|
|
14
14
|
**Related**:
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
16
|
+
- `typescript-rules`
|
|
17
|
+
- `error-handling-rules`—failure paths and exit codes are part of every CLI command.
|
|
18
|
+
- `supply-chain-hardening`—follow the 14-day package-age rule for every CLI dependency.
|
|
19
19
|
Bundlers and CLI dependencies that execute at install time (`postinstall` scripts) are
|
|
20
20
|
a primary attack surface.
|
|
21
21
|
|
|
@@ -368,10 +368,10 @@ context, output, and error handling.
|
|
|
368
368
|
Strict separation of data and diagnostics enables pipeline composability.
|
|
369
369
|
|
|
370
370
|
- **Data to stdout:** `data()`, `success()`, `notice()`, `dryRun()`, `table()`,
|
|
371
|
-
`list()`, `count()
|
|
371
|
+
`list()`, `count()`—all go to `console.log` (stdout).
|
|
372
372
|
|
|
373
373
|
- **Diagnostics to stderr:** `info()`, `warn()`, `error()`, `command()`, `debug()`,
|
|
374
|
-
`spinner
|
|
374
|
+
`spinner`—all go to `console.error` (stderr) or `process.stderr.write`.
|
|
375
375
|
|
|
376
376
|
- **JSON mode wraps diagnostics:** `warn()` outputs `{"warning": "..."}` to stderr.
|
|
377
377
|
`error()` outputs `{"error": "..."}` to stderr.
|
|
@@ -579,7 +579,7 @@ seamlessly in local dev and in remote environments.
|
|
|
579
579
|
precedence logic, or runtime conditional loading from inside the CLI).
|
|
580
580
|
|
|
581
581
|
- **Use `dotenv` only when needed:** Add `dotenv` only if your CLI must load env files
|
|
582
|
-
programmatically
|
|
582
|
+
programmatically—e.g., it reads them after parsing command-line flags, performs
|
|
583
583
|
variable expansion, or supports custom file paths the user cannot pre-bake into the
|
|
584
584
|
`node` invocation.
|
|
585
585
|
|
|
@@ -615,11 +615,11 @@ seamlessly in local dev and in remote environments.
|
|
|
615
615
|
|
|
616
616
|
- **Standard environment variables to respect:**
|
|
617
617
|
|
|
618
|
-
- `NO_COLOR
|
|
619
|
-
- `FORCE_COLOR
|
|
620
|
-
- `CI
|
|
621
|
-
- `DEBUG
|
|
622
|
-
- `PAGER
|
|
618
|
+
- `NO_COLOR`—disable colors (standard)
|
|
619
|
+
- `FORCE_COLOR`—force colors
|
|
620
|
+
- `CI`—detect CI environment, force non-interactive
|
|
621
|
+
- `DEBUG`—enable debug logging (or a namespaced equivalent like `<TOOL>_DEBUG`)
|
|
622
|
+
- `PAGER`—custom pager command for long output
|
|
623
623
|
|
|
624
624
|
## Sub-Command Logging for Testability
|
|
625
625
|
|
|
@@ -705,27 +705,27 @@ runtimes, Cloudflare Workers, etc.).
|
|
|
705
705
|
|
|
706
706
|
**Key patterns:**
|
|
707
707
|
|
|
708
|
-
- **Base Command Pattern
|
|
708
|
+
- **Base Command Pattern**—All handlers extend `BaseCommand`, which provides
|
|
709
709
|
`CommandContext`, `OutputManager`, `execute()` error wrapping, and `checkDryRun()`
|
|
710
710
|
|
|
711
|
-
- **Dual Output Mode
|
|
711
|
+
- **Dual Output Mode**—`OutputManager.data(data, textFormatter)` switches between JSON
|
|
712
712
|
and text formatting based on `--json` flag
|
|
713
713
|
|
|
714
|
-
- **Handler + Command Structure
|
|
714
|
+
- **Handler + Command Structure**—Command definition (`.option()`, `.action()`) is
|
|
715
715
|
separate from handler class implementation.
|
|
716
716
|
Action handlers do `new XxxHandler(command)` then `handler.run(options)`
|
|
717
717
|
|
|
718
|
-
- **Version Handling
|
|
718
|
+
- **Version Handling**—Prefer deterministic runtime version resolution: build-time
|
|
719
719
|
injection first, then environment override for dev/test, then `package.json` fallback
|
|
720
720
|
|
|
721
|
-
- **Global Options
|
|
721
|
+
- **Global Options**—Define `--dry-run`, `--verbose`, `--quiet`, `--json`, `--color`,
|
|
722
722
|
and `--debug` at program level, plus tool-specific options as needed.
|
|
723
723
|
Only add `--non-interactive` and `--yes` if the CLI has interactive prompts
|
|
724
724
|
|
|
725
|
-
- **Stdout/Stderr Separation
|
|
725
|
+
- **Stdout/Stderr Separation**—Data to stdout, diagnostics to stderr for pipeline
|
|
726
726
|
compatibility. See the Stdout/Stderr Separation section above for details
|
|
727
727
|
|
|
728
|
-
- **Terminal Width Management
|
|
728
|
+
- **Terminal Width Management**—Cap help text and formatted output at a maximum width
|
|
729
729
|
(e.g., 88 chars) for readability, using narrower if the terminal is smaller
|
|
730
730
|
|
|
731
731
|
## Best Practices
|
|
@@ -7,15 +7,17 @@ author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
|
7
7
|
|
|
8
8
|
**Last Updated**: 2026-05-21
|
|
9
9
|
|
|
10
|
-
**Tracks**: Vitest `^4.1.7`, `@vitest/coverage-v8` `^4.1.7`. Vitest 5.0 is in beta
|
|
10
|
+
**Tracks**: Vitest `^4.1.7`, `@vitest/coverage-v8` `^4.1.7`. Vitest 5.0 is in beta—do
|
|
11
11
|
not adopt yet.
|
|
12
12
|
|
|
13
13
|
**Related**:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
- `typescript-rules`
|
|
16
|
+
- `general-testing-rules` and `general-tdd-guidelines`—what to test and the red-green
|
|
17
|
+
workflow that coverage measures.
|
|
18
|
+
- `pnpm-monorepo-patterns`—the Testing section covers the monorepo test setup.
|
|
19
|
+
- `supply-chain-hardening`—follow the 14-day package-age rule when installing or
|
|
20
|
+
upgrading `vitest` and `@vitest/coverage-v8`.
|
|
19
21
|
|
|
20
22
|
## Coverage Metrics
|
|
21
23
|
|
|
@@ -95,7 +97,7 @@ upgrade: use `ncu --cooldown 14` or `pnpm install --frozen-lockfile`.
|
|
|
95
97
|
- **`coverage.all` was removed** in Vitest 4. Use `coverage.include` and
|
|
96
98
|
`coverage.exclude` to define exactly which files are reported.
|
|
97
99
|
- Coverage reporters and v8 provider now ship as part of `@vitest/coverage-v8` aligned
|
|
98
|
-
with the Vitest major version
|
|
100
|
+
with the Vitest major version—pin them together.
|
|
99
101
|
|
|
100
102
|
### Example Configuration
|
|
101
103
|
|
|
@@ -11,19 +11,17 @@ alwaysApply: true
|
|
|
11
11
|
|
|
12
12
|
**Tracks**: TypeScript `^6.0.3` (stable).
|
|
13
13
|
TypeScript 7.0 Beta (`@typescript/native-preview`, binary `tsgo`) is available but **not
|
|
14
|
-
yet production-ready
|
|
14
|
+
yet production-ready**—do not adopt for shipped builds.
|
|
15
15
|
|
|
16
16
|
**Related**:
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
14-day package-age rule applies to every TypeScript dependency (`zod`, `commander`,
|
|
26
|
-
`vitest`, `eslint`, type packages, etc.).
|
|
18
|
+
- `typescript-cli-tool-rules`
|
|
19
|
+
- `typescript-sorting-patterns`
|
|
20
|
+
- `typescript-yaml-handling-rules`
|
|
21
|
+
- `typescript-code-coverage`
|
|
22
|
+
- `pnpm-monorepo-patterns` and `bun-monorepo-patterns`
|
|
23
|
+
- `supply-chain-hardening`—the 14-day package-age rule applies to every TypeScript
|
|
24
|
+
dependency (`zod`, `commander`, `vitest`, `eslint`, type packages, etc.).
|
|
27
25
|
|
|
28
26
|
## Coding Style
|
|
29
27
|
|
|
@@ -352,7 +350,7 @@ yet production-ready** — do not adopt for shipped builds.
|
|
|
352
350
|
|
|
353
351
|
- **Barrel files:** The rules differ for libraries vs applications.
|
|
354
352
|
|
|
355
|
-
**For libraries:** Use exactly ONE barrel file
|
|
353
|
+
**For libraries:** Use exactly ONE barrel file—the root `index.ts` that defines the
|
|
356
354
|
public API. This is essential for consumers who `import { X } from 'your-library'`. Do
|
|
357
355
|
NOT create module-level barrels (like `utils/index.ts` or `harness/index.ts`).
|
|
358
356
|
Internal code should import directly from source files.
|
|
@@ -5,7 +5,7 @@ author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
|
5
5
|
---
|
|
6
6
|
# TypeScript Sorting Patterns
|
|
7
7
|
|
|
8
|
-
**Related**: `
|
|
8
|
+
**Related**: `typescript-rules`, `general-testing-rules`
|
|
9
9
|
|
|
10
10
|
## 1. Always Make Sorting Deterministic
|
|
11
11
|
|
|
@@ -9,14 +9,14 @@ globs: "*.ts"
|
|
|
9
9
|
**Last Updated**: 2026-05-21
|
|
10
10
|
|
|
11
11
|
**Tracks**: `yaml@^2.8.4` (latest stable; 2026-05-02). The `yaml@3.0.0-1` release is
|
|
12
|
-
tagged `next` (pre-release)
|
|
12
|
+
tagged `next` (pre-release)—do not adopt yet.
|
|
13
13
|
Zod 4.x is the recommended validation companion.
|
|
14
14
|
|
|
15
15
|
**Related**:
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
17
|
+
- `typescript-rules`
|
|
18
|
+
- `supply-chain-hardening`—follow the 14-day package-age rule for `yaml`, `zod`, and
|
|
19
|
+
`gray-matter`.
|
|
20
20
|
|
|
21
21
|
These guidelines ensure consistent, safe, and readable YAML handling across TypeScript
|
|
22
22
|
codebases. YAML is deceptively tricky—inconsistent quoting, serialization differences,
|
|
@@ -203,8 +203,8 @@ const output = `---\n${stringifyYaml(data)}---\n\n${content}`;
|
|
|
203
203
|
|
|
204
204
|
## Related Guidelines
|
|
205
205
|
|
|
206
|
-
- For general TypeScript rules, see `
|
|
207
|
-
- For error handling patterns, see `
|
|
206
|
+
- For general TypeScript rules, see `typescript-rules`
|
|
207
|
+
- For error handling patterns, see `error-handling-rules`
|
|
208
208
|
|
|
209
209
|
<!-- This document follows common-doc-guidelines.md.
|
|
210
210
|
See github.com/jlevy/practical-prose and review guidelines before editing.
|
|
@@ -53,6 +53,20 @@ Examples: `code-review-and-commit`, `new-plan-spec`, `review-code-typescript`
|
|
|
53
53
|
- **Reference, don’t duplicate**: Point to `tbd shortcut/guidelines/template` commands
|
|
54
54
|
- **Trust the agent**: They’ll adapt to context
|
|
55
55
|
|
|
56
|
+
## Referencing Other Shortcuts
|
|
57
|
+
|
|
58
|
+
Refer to other shortcuts, guidelines, and templates by **name**, using the command that
|
|
59
|
+
surfaces them — never by file path:
|
|
60
|
+
|
|
61
|
+
- Another shortcut: `tbd shortcut <name>` (e.g. `tbd shortcut precommit-process`)
|
|
62
|
+
- A guideline: `tbd guidelines <name>` (e.g. `tbd guidelines typescript-rules`)
|
|
63
|
+
- A template: `tbd template <name>` (e.g. `tbd template plan-spec`)
|
|
64
|
+
|
|
65
|
+
The name stays valid wherever the file ends up — read directly, served via
|
|
66
|
+
`tbd shortcut`, or embedded in another tool.
|
|
67
|
+
File paths and relative markdown links break when shortcuts are flattened into the
|
|
68
|
+
`.tbd` cache or relocated, so don’t use them to point at other shortcuts.
|
|
69
|
+
|
|
56
70
|
## Testing
|
|
57
71
|
|
|
58
72
|
```bash
|
|
@@ -64,7 +64,10 @@ If this fails for any reason, follow the steps below.
|
|
|
64
64
|
|
|
65
65
|
Set `GH_TOKEN` environment variable with a GitHub personal access token **before**
|
|
66
66
|
starting the session.
|
|
67
|
-
|
|
67
|
+
Create a [Personal Access Token](https://github.com/settings/tokens?type=beta)
|
|
68
|
+
(fine-grained recommended) with **Contents** and **Pull requests** read/write
|
|
69
|
+
permissions, then export it (e.g. add `export GH_TOKEN=...` to your shell profile or set
|
|
70
|
+
it in your agent environment).
|
|
68
71
|
|
|
69
72
|
## Quick Reference
|
|
70
73
|
|
|
@@ -24,6 +24,20 @@ These may include:
|
|
|
24
24
|
- File operations and git workflows
|
|
25
25
|
- Prompts for gathering information from the user
|
|
26
26
|
|
|
27
|
+
## Referencing Other Shortcuts, Guidelines, and Templates
|
|
28
|
+
|
|
29
|
+
Shortcuts refer to each other by **name**, using the command that surfaces them:
|
|
30
|
+
|
|
31
|
+
- Another shortcut: `tbd shortcut <name>` (e.g. `tbd shortcut precommit-process`)
|
|
32
|
+
- A guideline: `tbd guidelines <name>` (e.g. `tbd guidelines typescript-rules`)
|
|
33
|
+
- A template: `tbd template <name>` (e.g. `tbd template plan-spec`)
|
|
34
|
+
|
|
35
|
+
Always reference by name, never by file path.
|
|
36
|
+
The name is stable wherever the shortcut lives, so the reference stays valid whether the
|
|
37
|
+
file is read directly, served via `tbd shortcut`, or embedded in another tool.
|
|
38
|
+
File paths (and relative markdown links) break when shortcuts are flattened into the
|
|
39
|
+
`.tbd` cache or relocated, so avoid them inside shortcut bodies.
|
|
40
|
+
|
|
27
41
|
## Example Workflow
|
|
28
42
|
|
|
29
43
|
User: “I want to create a new research brief”
|
|
@@ -37,7 +51,8 @@ Agent:
|
|
|
37
51
|
|
|
38
52
|
Shortcuts are loaded from directories in the doc path (searched in order):
|
|
39
53
|
|
|
40
|
-
- `.tbd/docs/shortcuts/system/` - Core system docs (skill
|
|
54
|
+
- `.tbd/docs/shortcuts/system/` - Core system docs (skill-baseline,
|
|
55
|
+
shortcut-explanation, etc.)
|
|
41
56
|
- `.tbd/docs/shortcuts/standard/` - Standard workflow shortcuts
|
|
42
57
|
|
|
43
58
|
Directories earlier in the doc path take precedence.
|
|
@@ -9,7 +9,7 @@ description: Full tbd workflow guide for agents
|
|
|
9
9
|
Drop-in replacement for `bd`.
|
|
10
10
|
2. **Spec-Driven Workflows**: Plan features → break into beads → implement
|
|
11
11
|
systematically.
|
|
12
|
-
3. **Knowledge Injection**:
|
|
12
|
+
3. **Knowledge Injection**: 25+ engineering guidelines (TypeScript, Python, TDD,
|
|
13
13
|
testing, Convex, monorepos) available on demand.
|
|
14
14
|
4. **Shortcuts**: Reusable instruction templates for common workflows (code review,
|
|
15
15
|
commits, PRs, cleanup, handoffs).
|
|
@@ -71,6 +71,7 @@ or want help → run `tbd shortcut welcome-user`
|
|
|
71
71
|
| “Create a PR” / “File a PR” | `tbd shortcut create-or-update-pr-simple` |
|
|
72
72
|
| “Merge main into my branch” | `tbd shortcut merge-upstream` |
|
|
73
73
|
| **Guidelines & Knowledge** | |
|
|
74
|
+
| *(any engineering work)* | Load the **General engineering** group first (see below) |
|
|
74
75
|
| “Use TypeScript best practices” | `tbd guidelines typescript-rules` |
|
|
75
76
|
| “Use Python best practices” | `tbd guidelines python-rules` |
|
|
76
77
|
| “Build a TypeScript CLI” | `tbd guidelines typescript-cli-tool-rules` |
|
|
@@ -89,6 +90,12 @@ or want help → run `tbd shortcut welcome-user`
|
|
|
89
90
|
| “Check out this library’s source” | `tbd shortcut checkout-third-party-repo` |
|
|
90
91
|
| *(your choice whenever appropriate)* | `tbd list`, `tbd dep add`, `tbd close`, `tbd sync`, etc. |
|
|
91
92
|
|
|
93
|
+
**Loading guidelines for engineering work:** Before writing or reviewing code, load the
|
|
94
|
+
**General engineering** group—the `general-*` rules plus `error-handling-rules`—since
|
|
95
|
+
these apply to all code regardless of language.
|
|
96
|
+
Then load the group for the language or framework in use (TypeScript, Python, Convex,
|
|
97
|
+
etc.). Run `tbd guidelines --list` to see all available guidelines.
|
|
98
|
+
|
|
92
99
|
**Note:** Never gitignore `.tbd/workspaces/` — the outbox must be committed to your
|
|
93
100
|
working branch. See `tbd guidelines tbd-sync-troubleshooting` for details.
|
|
94
101
|
|
package/dist/docs/tbd-design.md
CHANGED
|
@@ -18,8 +18,7 @@ agents.
|
|
|
18
18
|
- [1. Introduction](#1-introduction)
|
|
19
19
|
- [1.1 What is tbd?](#11-what-is-tbd)
|
|
20
20
|
- [1.2 When to Use tbd vs Beads](#12-when-to-use-tbd-vs-beads)
|
|
21
|
-
- [1.3 Why Replace Beads?
|
|
22
|
-
(Architecture Comparison)](#13-why-replace-beads-architecture-comparison)
|
|
21
|
+
- [1.3 Why Replace Beads? (Architecture Comparison)](#13-why-replace-beads-architecture-comparison)
|
|
23
22
|
- [1.4 Design Goals](#14-design-goals)
|
|
24
23
|
- [1.5 Design Principles](#15-design-principles)
|
|
25
24
|
- [1.6 Non-Goals](#16-non-goals)
|
|
@@ -235,23 +234,23 @@ on demand.
|
|
|
235
234
|
|
|
236
235
|
tbd provides **three integrated capabilities**:
|
|
237
236
|
|
|
238
|
-
1. **Task tracking (beads)
|
|
237
|
+
1. **Task tracking (beads)**—Git-native issues, bugs, epics, and dependencies that
|
|
239
238
|
persist across sessions.
|
|
240
239
|
This alone is a step change in what agents can do.
|
|
241
|
-
2. **Spec-driven planning
|
|
242
|
-
|
|
243
|
-
3. **Instant knowledge injection
|
|
244
|
-
Python, Convex, monorepo architecture, TDD, and more
|
|
240
|
+
2. **Spec-driven planning**—Workflows for writing specs, breaking them into issues, and
|
|
241
|
+
implementing systematically.
|
|
242
|
+
3. **Instant knowledge injection**—17+ detailed guideline docs covering TypeScript,
|
|
243
|
+
Python, Convex, monorepo architecture, TDD, and more—injected into the agent’s
|
|
245
244
|
context on demand via shortcuts, guidelines, and templates.
|
|
246
245
|
|
|
247
246
|
The **issue tracking layer** has four core principles:
|
|
248
247
|
|
|
249
|
-
- **Durable storage in git
|
|
250
|
-
|
|
251
|
-
- **Works in almost any environment
|
|
248
|
+
- **Durable storage in git**—Issues are version-controlled and distributed via standard
|
|
249
|
+
git
|
|
250
|
+
- **Works in almost any environment**—No daemon, no SQLite, no file locking issues on
|
|
252
251
|
network drives
|
|
253
|
-
- **Simple, self-documenting CLI
|
|
254
|
-
- **Transparent internal format
|
|
252
|
+
- **Simple, self-documenting CLI**—Designed for both AI agents and humans
|
|
253
|
+
- **Transparent internal format**—Markdown/YAML files that are debuggable and friendly
|
|
255
254
|
to other tooling
|
|
256
255
|
|
|
257
256
|
It does *not* aim to be a full solution for real-time agent coordination.
|
|
@@ -291,17 +290,17 @@ layered on top of tbd or handled by other tools.
|
|
|
291
290
|
|
|
292
291
|
**Related Projects:**
|
|
293
292
|
|
|
294
|
-
- [Beads](https://github.com/steveyegge/beads)
|
|
295
|
-
|
|
296
|
-
- [Agent Mail](https://github.com/Dicklesworthstone/mcp_agent_mail)
|
|
293
|
+
- [Beads](https://github.com/steveyegge/beads)—The original git-backed issue tracker tbd
|
|
294
|
+
is designed to replace
|
|
295
|
+
- [Agent Mail](https://github.com/Dicklesworthstone/mcp_agent_mail)—Real-time agent
|
|
297
296
|
messaging via MCP (complementary to tbd for coordination)
|
|
298
|
-
- [Gas Town](https://github.com/steveyegge/gastown)
|
|
297
|
+
- [Gas Town](https://github.com/steveyegge/gastown)—Multi-agent orchestration platform
|
|
299
298
|
(complementary to tbd for real-time coordination)
|
|
300
|
-
- [ticket](https://github.com/wedow/ticket)
|
|
299
|
+
- [ticket](https://github.com/wedow/ticket)—Bash-based Markdown+YAML tracker (~1900
|
|
301
300
|
tickets in production)
|
|
302
|
-
- [git-bug](https://github.com/git-bug/git-bug)
|
|
303
|
-
- [git-issue](https://github.com/dspinellis/git-issue)
|
|
304
|
-
|
|
301
|
+
- [git-bug](https://github.com/git-bug/git-bug)—Issues stored as git objects
|
|
302
|
+
- [git-issue](https://github.com/dspinellis/git-issue)—Shell-based with optional GitHub
|
|
303
|
+
sync
|
|
305
304
|
|
|
306
305
|
### 1.2 When to Use tbd vs Beads
|
|
307
306
|
|
|
@@ -659,6 +658,7 @@ serialization:
|
|
|
659
658
|
> directory.
|
|
660
659
|
|
|
661
660
|
> **Why canonical format?** Deterministic serialization ensures:
|
|
661
|
+
>
|
|
662
662
|
> 1. Git diffs show only actual content changes (no spurious whitespace/ordering noise)
|
|
663
663
|
> 2. Testing is reliable (same input produces same output)
|
|
664
664
|
> 3. Future caching/deduplication can use content hashes if needed
|
|
@@ -790,10 +790,10 @@ $GIT_COMMON_DIR/tbd/
|
|
|
790
790
|
└── meta.yml # Metadata (schema version)
|
|
791
791
|
```
|
|
792
792
|
|
|
793
|
-
> **Future: Simple Mode
|
|
794
|
-
>
|
|
795
|
-
>
|
|
796
|
-
>
|
|
793
|
+
> **Future: Simple Mode**—For users who don’t need multi-machine sync, tbd could support
|
|
794
|
+
> a “simple mode” where `data-sync/` is committed directly to main instead of using a
|
|
795
|
+
> worktree. This would be enabled by removing `data-sync` from `.tbd/.gitignore`. Not
|
|
796
|
+
> implemented in V1, but the naming structure supports this future option.
|
|
797
797
|
|
|
798
798
|
**Why this structure?**
|
|
799
799
|
|
|
@@ -887,7 +887,7 @@ backups/
|
|
|
887
887
|
> Both differ from `.tbd/data-sync/attic/` on the sync branch which stores merge
|
|
888
888
|
> conflict losers.
|
|
889
889
|
>
|
|
890
|
-
> **Note:** `workspaces/` must not be gitignored
|
|
890
|
+
> **Note:** `workspaces/` must not be gitignored—it stores outbox data that must be
|
|
891
891
|
> committed to the working branch.
|
|
892
892
|
|
|
893
893
|
#### .tbd/.gitattributes Contents
|
|
@@ -904,7 +904,7 @@ that directory.
|
|
|
904
904
|
```
|
|
905
905
|
|
|
906
906
|
> **Why this is needed:** When a feature branch with outbox changes is merged back to
|
|
907
|
-
> main (which has no outbox), git’s 3-way merge can delete `ids.yml` entirely
|
|
907
|
+
> main (which has no outbox), git’s 3-way merge can delete `ids.yml` entirely—treating
|
|
908
908
|
> “no file” on main as the correct state.
|
|
909
909
|
> This causes all tbd commands to crash with “No short ID mapping found”.
|
|
910
910
|
> The `merge=union` built-in merge driver keeps all lines from both sides, preventing
|
|
@@ -1037,8 +1037,8 @@ async function checkWorktreeHealth(baseDir: string): Promise<{
|
|
|
1037
1037
|
|
|
1038
1038
|
| Term | Path | Purpose |
|
|
1039
1039
|
| --- | --- | --- |
|
|
1040
|
-
| **Worktree path** | `$GIT_COMMON_DIR/tbd/data-sync-worktree/.tbd/data-sync/` | **Production path
|
|
1041
|
-
| **Direct path** | `.tbd/data-sync/` | **Legacy fallback path
|
|
1040
|
+
| **Worktree path** | `$GIT_COMMON_DIR/tbd/data-sync-worktree/.tbd/data-sync/` | **Production path**—inside hidden worktree checkout |
|
|
1041
|
+
| **Direct path** | `.tbd/data-sync/` | **Legacy fallback path**—gitignored on main, should NEVER contain data in production |
|
|
1042
1042
|
|
|
1043
1043
|
**Invariant:** In production, the worktree path is the ONLY correct path for issue data.
|
|
1044
1044
|
The direct path exists ONLY for test fixtures that don’t use git.
|
|
@@ -1082,7 +1082,7 @@ async function resolveDataSyncDir(
|
|
|
1082
1082
|
|
|
1083
1083
|
1. Production code MUST call `resolveDataSyncDir()` without `allowFallback`
|
|
1084
1084
|
2. Only test code may use `allowFallback: true`
|
|
1085
|
-
3. If `.tbd/data-sync/issues/` contains data on main branch, this indicates a bug
|
|
1085
|
+
3. If `.tbd/data-sync/issues/` contains data on main branch, this indicates a bug—data
|
|
1086
1086
|
was written to wrong location due to missing worktree
|
|
1087
1087
|
|
|
1088
1088
|
#### Worktree Error Classes
|
|
@@ -1114,7 +1114,7 @@ export class SyncBranchError extends TbdError {
|
|
|
1114
1114
|
Workspaces are directories under `.tbd/workspaces/` that store issue data for sync
|
|
1115
1115
|
failure recovery, backups, and bulk editing workflows.
|
|
1116
1116
|
|
|
1117
|
-
> **Note:** `.tbd/workspaces/` must not be gitignored
|
|
1117
|
+
> **Note:** `.tbd/workspaces/` must not be gitignored—outbox data must be committed to
|
|
1118
1118
|
> the working branch.
|
|
1119
1119
|
|
|
1120
1120
|
#### Workspace Structure
|
|
@@ -2147,7 +2147,7 @@ SYNC(options):
|
|
|
2147
2147
|
```
|
|
2148
2148
|
|
|
2149
2149
|
**Critical Invariant:** All operations in steps 1-6 MUST use the resolved `dataSyncDir`
|
|
2150
|
-
path consistently. Never read from or write to `.tbd/data-sync/` directly
|
|
2150
|
+
path consistently. Never read from or write to `.tbd/data-sync/` directly—always go
|
|
2151
2151
|
through the shared worktree at `$GIT_COMMON_DIR/tbd/data-sync-worktree/.tbd/data-sync/`.
|
|
2152
2152
|
|
|
2153
2153
|
**Why most syncs are trivial (no merge needed):**
|
|
@@ -2290,7 +2290,7 @@ const issueMergeRules: MergeRules<Issue> = {
|
|
|
2290
2290
|
created_by: { strategy: 'preserve_oldest' },
|
|
2291
2291
|
closed_at: { strategy: 'lww' }, // See status/closed_at rules below
|
|
2292
2292
|
close_reason: { strategy: 'lww' },
|
|
2293
|
-
child_order_hints: { strategy: '
|
|
2293
|
+
child_order_hints: { strategy: 'union' }, // Append-only set of child IDs; union (dedupe)
|
|
2294
2294
|
};
|
|
2295
2295
|
```
|
|
2296
2296
|
|
|
@@ -2374,8 +2374,8 @@ The CLI Layer provides a Beads-compatible command interface.
|
|
|
2374
2374
|
|
|
2375
2375
|
All tbd commands require the repository to be initialized, except:
|
|
2376
2376
|
|
|
2377
|
-
- `tbd init
|
|
2378
|
-
- `tbd import --from-beads
|
|
2377
|
+
- `tbd init`—Creates a new tbd repository
|
|
2378
|
+
- `tbd import --from-beads`—Can initialize and import in one step (auto-runs init if
|
|
2379
2379
|
needed)
|
|
2380
2380
|
|
|
2381
2381
|
**Behavior when not initialized:**
|
|
@@ -2572,8 +2572,8 @@ Options:
|
|
|
2572
2572
|
created/updated: newest first).
|
|
2573
2573
|
The tiebreaker for issues with equal primary values is the internal ULID, which sorts
|
|
2574
2574
|
lexicographically in chronological creation order.
|
|
2575
|
-
This ensures deterministic, stable ordering
|
|
2576
|
-
|
|
2575
|
+
This ensures deterministic, stable ordering—issues created earlier always appear before
|
|
2576
|
+
issues created later within the same priority level.
|
|
2577
2577
|
|
|
2578
2578
|
**Examples:**
|
|
2579
2579
|
|
|
@@ -3498,9 +3498,9 @@ This follows the same convention as `git`, `ls`, `grep`, and other Unix tools.
|
|
|
3498
3498
|
The actor name (used for `created_by` and recorded in sync commits) is resolved in this
|
|
3499
3499
|
order:
|
|
3500
3500
|
|
|
3501
|
-
1. `--actor <name>` CLI flag (highest priority)
|
|
3501
|
+
1. `--actor <name>` CLI flag (highest priority)—*not yet implemented*
|
|
3502
3502
|
|
|
3503
|
-
2. `TBD_ACTOR` environment variable
|
|
3503
|
+
2. `TBD_ACTOR` environment variable—*not yet implemented*
|
|
3504
3504
|
|
|
3505
3505
|
3. Git user.email from git config
|
|
3506
3506
|
|
|
@@ -4571,8 +4571,8 @@ all environments including cloud sandboxes.
|
|
|
4571
4571
|
|
|
4572
4572
|
Claude Code hooks are always installed to the **project-local** `.claude/` directory,
|
|
4573
4573
|
adjacent to `.git/` and `.tbd/` at the git repository root.
|
|
4574
|
-
There is no global/user-level installation
|
|
4575
|
-
|
|
4574
|
+
There is no global/user-level installation—this avoids confusion and ensures hooks work
|
|
4575
|
+
in any environment (local dev, Claude Code Cloud, etc.).
|
|
4576
4576
|
|
|
4577
4577
|
**A. JSON Settings Hooks** (installed to `.claude/settings.json` at project root)
|
|
4578
4578
|
|
|
@@ -4674,7 +4674,7 @@ Options:
|
|
|
4674
4674
|
- `tbd list --status=in_progress` - Your active work
|
|
4675
4675
|
- `tbd show <id>` - Detailed issue view with dependencies
|
|
4676
4676
|
|
|
4677
|
-
### Creating
|
|
4677
|
+
### Creating and Updating
|
|
4678
4678
|
- `tbd create "title" --type=task|bug|feature --priority=P2` - New issue
|
|
4679
4679
|
- Priority: P0-P4 (P0=critical, P2=medium, P4=backlog)
|
|
4680
4680
|
- `tbd update <id> --status=in_progress` - Claim work
|
|
@@ -4682,12 +4682,12 @@ Options:
|
|
|
4682
4682
|
- `tbd close <id>` - Mark complete
|
|
4683
4683
|
- `tbd close <id> --reason "explanation"` - Close with reason
|
|
4684
4684
|
|
|
4685
|
-
### Dependencies
|
|
4685
|
+
### Dependencies and Blocking
|
|
4686
4686
|
- `tbd dep add <issue> <depends-on>` - Add dependency
|
|
4687
4687
|
- `tbd blocked` - Show all blocked issues
|
|
4688
4688
|
- `tbd show <id>` - See what's blocking/blocked by this issue
|
|
4689
4689
|
|
|
4690
|
-
### Sync
|
|
4690
|
+
### Sync and Collaboration
|
|
4691
4691
|
- `tbd sync` - Sync with git remote (run at session end)
|
|
4692
4692
|
- `tbd sync --status` - Check sync status without syncing
|
|
4693
4693
|
|
package/dist/docs/tbd-docs.md
CHANGED
|
@@ -30,7 +30,7 @@ Why a separate branch?
|
|
|
30
30
|
- No conflicts across main or feature branches
|
|
31
31
|
- Issues shared across all branches
|
|
32
32
|
|
|
33
|
-
## File
|
|
33
|
+
## File Format
|
|
34
34
|
|
|
35
35
|
You usually don’t need to worry about where issues are stored, but it may be comforting
|
|
36
36
|
to know that internally it’s very simple and transparent.
|
package/dist/docs/tbd-prime.md
CHANGED
|
@@ -52,7 +52,7 @@ Every session must end with tbd in a clean state:
|
|
|
52
52
|
- `tbd show <id>` - Detailed issue view with dependencies
|
|
53
53
|
- Auto-displays parent context for child issues (use `--no-parent` to suppress)
|
|
54
54
|
|
|
55
|
-
### Creating
|
|
55
|
+
### Creating and Updating
|
|
56
56
|
|
|
57
57
|
- `tbd create "title" --type task|bug|feature --priority 2` - New issue
|
|
58
58
|
- Priority: 0-4 (0=critical, 2=medium, 4=backlog).
|
|
@@ -63,13 +63,13 @@ Every session must end with tbd in a clean state:
|
|
|
63
63
|
- `tbd close <id> --reason "explanation"` - Close with reason
|
|
64
64
|
- **Tip**: When creating multiple issues, use parallel subagents for efficiency
|
|
65
65
|
|
|
66
|
-
### Dependencies
|
|
66
|
+
### Dependencies and Blocking
|
|
67
67
|
|
|
68
68
|
- `tbd dep add <issue> <depends-on>` - Add dependency (issue depends on depends-on)
|
|
69
69
|
- `tbd blocked` - Show all blocked issues
|
|
70
70
|
- `tbd show <id>` - See what’s blocking/blocked by this issue
|
|
71
71
|
|
|
72
|
-
### Sync
|
|
72
|
+
### Sync and Collaboration
|
|
73
73
|
|
|
74
74
|
- `tbd sync` - Sync with git remote (run at session end)
|
|
75
75
|
- `tbd sync --status` - Check sync status without syncing
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { A as Priority, C as IssueSchema, D as LocalStateSchema, E as LOCAL_STATE_FIELD_ORDER, F as Version, M as SyncStorage, N as Timestamp, O as META_FIELD_ORDER, P as Ulid, S as IssueKind, T as IssueTitle, _ as ISSUE_BODY_MAX_LENGTH, a as CONFIG_FIELD_ORDER, b as IdMappingYamlSchema, c as DATA_SYNC_SCHEMA_VERSION, d as DocCacheConfigSchema, f as DocsCacheSchema, g as GitRemoteName, h as GitBranchName, i as COMMON_DIR_LAYOUT_FIELD_ORDER, j as ShortId, k as MetaSchema, l as Dependency, m as ExternalIssueIdInput, n as AtticEntrySchema, o as CommonDirLayoutSchema, p as EntityType, r as BaseEntity, s as ConfigSchema, t as ATTIC_ENTRY_FIELD_ORDER, u as DependencyRelationType, v as ISSUE_FIELD_ORDER, w as IssueStatus, x as IssueId, y as ISSUE_TITLE_MAX_LENGTH } from "./schemas-f0EcuAVu.mjs";
|
|
2
|
-
import { c as noopLogger, i as serializeIssue, n as parseIssue, t as VERSION } from "./src-
|
|
2
|
+
import { c as noopLogger, i as serializeIssue, n as parseIssue, t as VERSION } from "./src-DTyyuaG_.mjs";
|
|
3
3
|
|
|
4
4
|
export { ATTIC_ENTRY_FIELD_ORDER, AtticEntrySchema, BaseEntity, COMMON_DIR_LAYOUT_FIELD_ORDER, CONFIG_FIELD_ORDER, CommonDirLayoutSchema, ConfigSchema, DATA_SYNC_SCHEMA_VERSION, Dependency, DependencyRelationType, DocCacheConfigSchema, DocsCacheSchema, EntityType, ExternalIssueIdInput, GitBranchName, GitRemoteName, ISSUE_BODY_MAX_LENGTH, ISSUE_FIELD_ORDER, ISSUE_TITLE_MAX_LENGTH, IdMappingYamlSchema, IssueId, IssueKind, IssueSchema, IssueStatus, IssueTitle, LOCAL_STATE_FIELD_ORDER, LocalStateSchema, META_FIELD_ORDER, MetaSchema, Priority, ShortId, SyncStorage, Timestamp, Ulid, VERSION, Version, noopLogger, parseIssue, serializeIssue };
|