Skip to content

feat(tbd-cli): Update issue prefix convention and require prefix during init#8

Merged
jlevy merged 5 commits into
mainfrom
claude/fix-ci-failures-2ghXh
Jan 17, 2026
Merged

feat(tbd-cli): Update issue prefix convention and require prefix during init#8
jlevy merged 5 commits into
mainfrom
claude/fix-ci-failures-2ghXh

Conversation

@jlevy
Copy link
Copy Markdown
Owner

@jlevy jlevy commented Jan 17, 2026

Summary

This PR updates the issue ID prefix convention, making the prefix a required project-specific setting rather than a hardcoded default. It also fixes CI failures by updating all tryscript tests to work with the new required --prefix option.

Closes: #7 (supersedes and includes all changes from PR #7)

Changes

Prefix Convention (from #7)

  • Updated all documentation examples from bd- to proj- prefix to clarify that the prefix is project-specific
  • Made display.id_prefix a required field (no default) in the ConfigSchema
  • Updated tbd init command to require --prefix=<name> option
  • Added prefix auto-detection when importing from beads via tbd import --from-beads
  • Updated the design document and implementation spec to reflect these requirements

Documentation (from #7)

  • README.md, tbd-docs.md, packages/tbd-cli/README.md: Changed all example prefixes from bd- to proj-
  • tbd-design-v3.md: Updated init command docs, ID display examples, and config schema
  • valid-2026-01-15-tbd-v1-implementation.md: Updated validation plan with prefix configuration changes

Code (from #7)

  • schemas.ts: display.id_prefix is now required (no default)
  • config.ts: initConfig() requires a prefix parameter
  • init.ts: Added --prefix option (required), shows helpful error if omitted
  • import.ts: Added detectBeadsPrefix() to auto-detect prefix from beads issues during import
  • All commands: Updated to read prefix from config using loadDataContext() utility
  • dataContext.ts: New shared utility for consistent loading of dataSyncDir, mapping, config, and prefix
  • setup.ts: Replaced hard-coded bd-42 examples with generic <id> placeholders

Test Fixes (this PR)

  • Updated all tryscript tests to use --prefix=test or --prefix=bd in tbd init calls
  • Fixed expected output patterns to match the configured prefix (test- or bd-)
  • Updated cli-advanced, cli-color-modes, cli-edge-cases, cli-id-format, cli-import, cli-import-autoinit, cli-prime, cli-setup, cli-status, cli-uninitialized, cli-uninstall tests
  • Updated init help output to include new --prefix option
  • Increased Windows performance test threshold from 100ms to 500ms for cold start tolerance

Test plan

  • All 188 unit tests pass
  • All 466 tryscript integration tests pass
  • Verified tbd init without --prefix shows helpful error message
  • Verified tbd init --prefix=myproj creates config with correct prefix
  • Verified tbd import --from-beads auto-detects prefix from beads issues
  • All commands use the configured prefix for display IDs
  • No hard-coded bd- prefixes remain in source code
  • Pre-commit hooks (format, typecheck, lint) pass
  • Pre-push hook (full test suite) passes
  • CI passes on all platforms (ubuntu, macos, windows)

🤖 Generated with Claude Code

claude and others added 4 commits January 17, 2026 19:54
…ng init

- Change documentation examples from 'bd-' to 'proj-' prefix
- Make display.id_prefix required (no default) in ConfigSchema
- Update init command to require --prefix option
- Update import command to auto-detect prefix from beads issues
- Update design document to reflect new prefix requirements
- Update tests to use 'tbd' as fallback prefix instead of 'bd'

This ensures each project has a meaningful, project-specific prefix
rather than defaulting to beads compatibility. When importing from
beads, the prefix is automatically detected from the existing issues.
… tests

- Update all commands to read display prefix from config.display.id_prefix
- Add shared loadDataContext() utility for consistent data loading
- Fix tryscript tests to use --prefix=test notation consistently
- Replace hard-coded bd-42 examples in setup.ts with generic <id>
- Add prefix configuration to latest validation summary
- Update test examples to use --prefix=<name> syntax
- Add prefix config row to validation checklist
Update all tryscript tests to use --prefix when calling tbd init,
and fix expected output patterns to match the configured prefix:
- Tests using --prefix=test expect test- prefix in output
- Tests using --prefix=bd expect bd- prefix in output

Also update init help output to show the new --prefix option.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 17, 2026

Coverage Report for packages/tbd-cli

Status Category Percentage Covered / Total
🔵 Lines 12.43% 659 / 5298
🔵 Statements 12.43% 659 / 5298
🔵 Functions 38.18% 42 / 110
🔵 Branches 79.68% 153 / 192
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/tbd-cli/src/cli/commands/attic.ts 0% 0% 0% 0% 1-307
packages/tbd-cli/src/cli/commands/blocked.ts 0% 0% 0% 0% 1-136
packages/tbd-cli/src/cli/commands/close.ts 0% 0% 0% 0% 1-92
packages/tbd-cli/src/cli/commands/create.ts 0% 0% 0% 0% 1-159
packages/tbd-cli/src/cli/commands/dep.ts 0% 0% 0% 0% 1-290
packages/tbd-cli/src/cli/commands/import.ts 0% 0% 0% 0% 1-717
packages/tbd-cli/src/cli/commands/init.ts 0% 0% 0% 0% 1-122
packages/tbd-cli/src/cli/commands/label.ts 0% 0% 0% 0% 1-227
packages/tbd-cli/src/cli/commands/list.ts 0% 0% 0% 0% 1-230
packages/tbd-cli/src/cli/commands/ready.ts 0% 0% 0% 0% 1-135
packages/tbd-cli/src/cli/commands/reopen.ts 0% 0% 0% 0% 1-98
packages/tbd-cli/src/cli/commands/search.ts 0% 0% 0% 0% 1-257
packages/tbd-cli/src/cli/commands/setup.ts 0% 0% 0% 0% 1-564
packages/tbd-cli/src/cli/commands/show.ts 0% 0% 0% 0% 1-127
packages/tbd-cli/src/cli/commands/stale.ts 0% 0% 0% 0% 1-140
packages/tbd-cli/src/cli/commands/update.ts 0% 0% 0% 0% 1-237
packages/tbd-cli/src/cli/lib/dataContext.ts 0% 0% 0% 0% 1-60
packages/tbd-cli/src/file/config.ts 82.69% 100% 80% 82.69% 91-99
packages/tbd-cli/src/lib/ids.ts 93.9% 100% 83.33% 93.9% 125-126, 235-237
packages/tbd-cli/src/lib/schemas.ts 100% 100% 100% 100%
Generated in workflow #82 for commit b00a406 by the Vitest Coverage Report Action

Windows CI can have slow cold start times for file I/O.
Increased threshold from 100ms to 500ms to account for this variance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jlevy jlevy changed the title fix: Update tryscript tests for required --prefix option feat(tbd-cli): Update issue prefix convention and require prefix during init Jan 17, 2026
@jlevy jlevy merged commit c98b460 into main Jan 17, 2026
5 checks passed
jlevy pushed a commit that referenced this pull request Feb 1, 2026
Key changes:
- Use tbd short ID directly as Markform option ID (e.g., `<!-- #proj-a1b2 -->`)
- Remove dual-ID system (`#markform_id tbd:issue_id` -> just `#proj-xxxx`)
- Update all code examples to reflect simplified format
- Add spec_path and child_order_hints from new tbd features
- Update open questions #7 and #8 to reflect resolved decisions

The simplification makes plan files cleaner and eliminates mapping
between separate ID namespaces since tbd short IDs are guaranteed
unique and valid as Markform identifiers.
jlevy pushed a commit that referenced this pull request May 7, 2026
The user pointed out the new Design Principles in the docs-config plan
should be cross-referenced and consolidated with the existing tbd-design
principles. Three changes:

1. tbd-design.md §1.5 (Design Principles) extended from 6 to 10:
   - #1 (Simplicity first) extended to spell out "simple things simple,
     complex things possible".
   - #3 (Git for sync) extended with the reproducible-from-config
     contract.
   - #7 added: Auth is always out-of-band — tbd never holds credentials.
   - #8 added: Hard cuts on format versions with reliable migration —
     already practiced for f02→f03; making it an explicit principle.
   - #9 added: Spec ↔ implementation synchrony via tests.
   - #10 added: Layered architecture, separable artifacts.

   These four new principles emerged from the docs-config redesign work
   but apply tbd-wide.

2. tbd-design.md §1.4 Design Goals: added goal #8 (extensible knowledge
   subsystem), which links forward to the plan-spec and the docref/
   docmap design docs as the authoritative location for that subsystem's
   design.

3. plan-spec Design Principles intro: now explicitly notes that P1, P5,
   P6, P7, P8, P9 are restatements/elaborations of tbd-design §1.5
   principles, while P2, P3, P4 are docs/config-specific and have no
   direct system-wide analog. Each restated principle gets an inline
   "(extends tbd-design §1.5 #N)" cross-reference. tbd-design.md is
   declared authoritative for system-wide values.

This consolidates principles in one foundational location (tbd-design.md)
while keeping the docs-config plan readable on its own.

https://claude.ai/code/session_01PhbYdWX7DUBpUBVuUesVuP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants