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
@@ -0,0 +1,88 @@
1
+ #!/bin/bash
2
+ # Automated GitHub CLI setup for Claude Code sessions
3
+ # This script runs on SessionStart to ensure gh CLI is available and authenticated
4
+
5
+ set -e
6
+
7
+ # Add common binary locations to PATH
8
+ export PATH="$HOME/.local/bin:$HOME/bin:/usr/local/bin:$PATH"
9
+
10
+ # Check if gh is already installed
11
+ if command -v gh &> /dev/null; then
12
+ echo "[gh] CLI found at $(which gh)"
13
+ else
14
+ echo "[gh] CLI not found, installing..."
15
+
16
+ # Detect platform
17
+ OS=$(uname -s | tr '[:upper:]' '[:lower:]')
18
+ ARCH=$(uname -m)
19
+ [ "$ARCH" = "x86_64" ] && ARCH="amd64"
20
+ [ "$ARCH" = "aarch64" ] && ARCH="arm64"
21
+
22
+ echo "[gh] Detected platform: ${OS}_${ARCH}"
23
+
24
+ # Get latest version from GitHub API (with fallback)
25
+ GH_VERSION=$(curl -fsSL https://api.github.com/repos/cli/cli/releases/latest 2>/dev/null \
26
+ | grep -o '"tag_name": *"v[^"]*"' | head -1 | sed 's/.*"v\([^"]*\)".*/\1/')
27
+
28
+ # Fallback version if API fails
29
+ GH_VERSION=${GH_VERSION:-2.83.1}
30
+
31
+ echo "[gh] Version: ${GH_VERSION}"
32
+
33
+ # Build download URL based on platform
34
+ if [ "$OS" = "darwin" ]; then
35
+ DOWNLOAD_URL="https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_macOS_${ARCH}.zip"
36
+ ARCHIVE_EXT="zip"
37
+ else
38
+ DOWNLOAD_URL="https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_${OS}_${ARCH}.tar.gz"
39
+ ARCHIVE_EXT="tar.gz"
40
+ fi
41
+
42
+ echo "[gh] Downloading from ${DOWNLOAD_URL}..."
43
+
44
+ # Download
45
+ curl -fsSL -o "/tmp/gh.${ARCHIVE_EXT}" "$DOWNLOAD_URL"
46
+
47
+ # Extract based on archive type
48
+ if [ "$ARCHIVE_EXT" = "zip" ]; then
49
+ unzip -q "/tmp/gh.zip" -d /tmp
50
+ EXTRACT_DIR="/tmp/gh_${GH_VERSION}_macOS_${ARCH}"
51
+ else
52
+ tar -xzf "/tmp/gh.tar.gz" -C /tmp
53
+ EXTRACT_DIR="/tmp/gh_${GH_VERSION}_${OS}_${ARCH}"
54
+ fi
55
+
56
+ # Install to ~/.local/bin (works in cloud and local)
57
+ mkdir -p ~/.local/bin
58
+ cp "${EXTRACT_DIR}/bin/gh" ~/.local/bin/gh
59
+ chmod +x ~/.local/bin/gh
60
+
61
+ # Clean up
62
+ rm -rf "${EXTRACT_DIR}" "/tmp/gh.${ARCHIVE_EXT}"
63
+
64
+ echo "[gh] Installed to ~/.local/bin/gh"
65
+ fi
66
+
67
+ # Verify gh is now in PATH
68
+ if ! command -v gh &> /dev/null; then
69
+ echo "[gh] ERROR: gh CLI still not found in PATH after installation"
70
+ echo "[gh] Ensure ~/.local/bin is in your PATH"
71
+ exit 1
72
+ fi
73
+
74
+ # Check authentication status
75
+ if [ -n "$GH_TOKEN" ]; then
76
+ # GH_TOKEN is set, verify it works
77
+ if gh auth status &> /dev/null; then
78
+ echo "[gh] Authenticated successfully"
79
+ else
80
+ echo "[gh] WARNING: GH_TOKEN is set but authentication check failed"
81
+ echo "[gh] Token may be invalid or expired"
82
+ fi
83
+ else
84
+ echo "[gh] NOTE: GH_TOKEN not set - some operations may require authentication"
85
+ echo "[gh] See: docs/general/agent-setup/github-cli-setup.md"
86
+ fi
87
+
88
+ exit 0
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: Commit Code
3
+ description: Run pre-commit checks, review changes, and commit code
4
+ ---
5
+ Shortcut: Run Pre-Commit Rules, Review, and Commit
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Follow the `tbd shortcut precommit-process` steps to review and run pre-commit
15
+ checks.
16
+
17
+ 2. If there are issues, ask for guidance.
18
+ Otherwise, commit directly using the commit message format from
19
+ `tbd guidelines commit-conventions`. Do NOT ask the user for permission to commit
20
+ unless there are problems.
21
+
22
+ 3. If commit is successful and if there is a PR already filed, update the PR
23
+ description.
@@ -0,0 +1,29 @@
1
+ ---
2
+ title: Create or Update PR (Simple)
3
+ description: Create or update a pull request with a concise summary
4
+ ---
5
+ Shortcut: Create or Update PR (Simple)
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Check if a PR already exists for this branch using `gh pr view`. If it does, you’ll
15
+ be updating it. If not, you’ll create one.
16
+
17
+ 2. Review all commits on this branch since it diverged from main:
18
+ - Run `git log main..HEAD --oneline` to see commits
19
+ - Run `git diff main...HEAD` to see all changes
20
+
21
+ 3. Write a PR title and description:
22
+ - Title should be concise and describe the change (e.g., “Add user authentication”)
23
+ - Description should have a brief summary of what changed and why
24
+
25
+ 4. Create or update the PR:
26
+ - If creating: `gh pr create --title "..." --body "..."`
27
+ - If updating: `gh pr edit --title "..." --body "..."`
28
+
29
+ 5. Report the PR URL to the user.
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: Create or Update PR with Validation Plan
3
+ description: Create or update a pull request with a detailed test/validation plan
4
+ ---
5
+ Shortcut: Create or Update PR with Validation Plan
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Check if a PR already exists for this branch using `gh pr view`. If it does, you’ll
15
+ be updating it. If not, you’ll create one.
16
+
17
+ 2. Review all commits on this branch since it diverged from main:
18
+ - Run `git log main..HEAD --oneline` to see commits
19
+ - Run `git diff main...HEAD` to see all changes
20
+ - Review any related specs in docs/project/specs/active/
21
+
22
+ 3. Write a PR title and description with these sections:
23
+
24
+ ## Summary
25
+
26
+ Brief description of the changes (2-3 sentences).
27
+
28
+ ## Changes
29
+
30
+ Bulleted list of specific changes made.
31
+
32
+ ## Test Plan
33
+
34
+ Detailed validation checklist:
35
+ - [ ] Unit tests pass (`npm test`)
36
+ - [ ] Build succeeds (`npm run build`)
37
+ - [ ] Manual testing steps (list specific scenarios to test)
38
+ - [ ] Edge cases considered (list any)
39
+
40
+ ## Related Issues
41
+
42
+ Link any related tbd issues using their IDs.
43
+
44
+ 4. Create or update the PR:
45
+ - If creating: `gh pr create --title "..." --body "..."`
46
+ - If updating: `gh pr edit --title "..." --body "..."`
47
+
48
+ 5. Report the PR URL to the user and summarize the validation plan.
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Implement Beads
3
+ description: Implement issues from a spec, following TDD and project rules
4
+ ---
5
+ Shortcut: Implement Beads
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Run `tbd guidelines --list` to see available guidelines, then review relevant ones
15
+ for implementing this spec.
16
+ In particular run `tbd guidelines general-tdd-guidelines` to understand project and
17
+ testing rules.
18
+
19
+ 2. IMPORTANT: *Track all work with issues using tbd.* Use `tbd create` to create issues,
20
+ `tbd ready` to find work, and `tbd close` when done.
21
+
22
+ 3. Implement issues specified by the user, highest priority first.
23
+ If the user did not specify which issues, check all open issues with `tbd ready`.
24
+ Issues are usually linked to specs so be sure to find specs that are relevant (for
25
+ that issue or an umbrella issue) for each if possible and review those specs.
26
+ Follow all rules and workflows and follow `tbd shortcut precommit-process` to commit
27
+ code and commit or sync issue changes after each issue.
28
+
29
+ 4. Repeat this for all issues where you know how to fix them.
30
+ If unsure about an issue let the user know at the end of all work which issues had
31
+ problems.
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: New Architecture Doc
3
+ description: Create an architecture document for a system or component design
4
+ ---
5
+ Shortcut: New Architecture Doc
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Clarify the architecture scope with the user:
15
+ - What system or component are we designing?
16
+ - Is this a new design or documenting existing architecture?
17
+ - What level of detail is needed?
18
+
19
+ 2. Review existing architecture docs in docs/project/architecture/ if available.
20
+ Also review any related specs in docs/project/specs/active/.
21
+
22
+ 3. Create the architecture document using the template:
23
+ ```
24
+ tbd template architecture-doc > docs/project/architecture/arch-YYYY-MM-DD-component-name.md
25
+ ```
26
+ (Fill in the date and an appropriate component name.)
27
+
28
+ 4. If documenting existing architecture, review the codebase to ensure accuracy.
29
+ If designing new architecture, iterate with the user on the design.
30
+
31
+ 5. Summarize the architecture and ask the user to review.
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: New Implementation Beads from Spec
3
+ description: Create implementation issues (beads) from a feature planning spec
4
+ ---
5
+ Shortcut: New Implementation Beads from Spec
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Make sure it’s clear what plan spec will be used for this implementation.
15
+ The user should provide it and you should find it in docs/project/specs/active/ with
16
+ a plan- prefix (e.g., plan-YYYY-MM-DD-\*.md).
17
+ If isn’t clear, stop and ask!
18
+
19
+ 2. Create a new top-level issue for this work using `tbd create`, referencing the spec.
20
+ Reference any other related specs or docs too.
21
+
22
+ 3. Then using all the context you now have, begin to plan the implementation step by
23
+ step, step by step, reviewing existing code carefully as you go and creating issues
24
+ with `tbd create`. Always double-check all referenced code fits with the spec code
25
+ you write. Be sure to track dependencies between issues correctly.
26
+
27
+ 4. Summarize what you have done and ask the user to review and if you should begin
28
+ implementation using `tbd shortcut implement-beads`.
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: New Plan Spec
3
+ description: Create a new feature planning specification document
4
+ ---
5
+ Shortcut: New Plan Spec
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Review docs/project/specs/active/ to see the list of recent feature specs, feature
15
+ plans, and implementation spec docs.
16
+
17
+ 2. Create the spec file using the template:
18
+ ```
19
+ tbd template plan-spec > docs/project/specs/active/plan-YYYY-MM-DD-feature-name.md
20
+ ```
21
+ (Fill in the date and an appropriate feature name.)
22
+
23
+ 3. Begin to fill in the new feature plan doc based on the user’s instructions, stopping
24
+ and asking for clarifications as soon as you need them.
25
+
26
+ Rules:
27
+
28
+ - You may break work into a few phases (phases) if it helps with incremental testing.
29
+ But **use as few phases as possible.** If it is straightforward, use one phase.
30
+
31
+ - NEVER GIVE TIME FRAMES IN PLANS, like “4-6 hours” or “1 week”.
32
+ Work will be done in one day.
33
+
34
+ 4. After completing the spec, link issues to it using the `--spec` flag:
35
+ ```
36
+ tbd create "Implement feature X" --spec docs/project/specs/active/plan-YYYY-MM-DD-feature-name.md
37
+ ```
38
+ Or use just the filename for brevity:
39
+ ```
40
+ tbd create "Implement feature X" --spec plan-YYYY-MM-DD-feature-name.md
41
+ ```
42
+ You can also update an existing issue to link it to a spec:
43
+ ```
44
+ tbd update <id> --spec plan-YYYY-MM-DD-feature-name.md
45
+ ```
46
+ To clear a spec link: `tbd update <id> --spec ""`
47
+
48
+ 5. To list issues linked to a spec, use `tbd list --spec` (see `tbd list --help` for
49
+ details on filtering and path matching).
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: New Research Doc
3
+ description: Create a research document for investigating a topic or technology
4
+ ---
5
+ Shortcut: New Research Doc
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Clarify the research topic with the user:
15
+ - What question or problem are we investigating?
16
+ - What is the scope and depth needed?
17
+ - Are there specific technologies or approaches to evaluate?
18
+
19
+ 2. Review existing research in docs/project/research/ if available.
20
+
21
+ 3. Create the research document using the template:
22
+ ```
23
+ tbd template research-brief > docs/project/research/research-YYYY-MM-DD-topic.md
24
+ ```
25
+ (Fill in the date and an appropriate topic name.)
26
+
27
+ 4. Begin research, updating the document as you learn.
28
+ Ask the user for guidance when you need clarification or hit decision points.
29
+
30
+ 5. Summarize findings and ask the user to review.
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: New Validation Plan
3
+ description: Create a validation/test plan for a feature or change
4
+ ---
5
+ Shortcut: New Validation Plan
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Identify the feature or change that needs a validation plan:
15
+ - Review the relevant spec in docs/project/specs/active/ if available
16
+ - Understand the scope of changes
17
+
18
+ 2. Create a validation plan with these sections:
19
+
20
+ ## Overview
21
+
22
+ Brief description of what’s being validated.
23
+
24
+ ## Automated Testing
25
+
26
+ - [ ] Unit tests cover new functionality
27
+ - [ ] Integration tests cover component interactions
28
+ - [ ] Edge cases have test coverage
29
+
30
+ ## Manual Testing Checklist
31
+
32
+ List specific scenarios to manually verify:
33
+ - [ ] Happy path scenarios
34
+ - [ ] Error handling scenarios
35
+ - [ ] Edge cases and boundary conditions
36
+
37
+ ## Performance Considerations
38
+
39
+ - [ ] No performance regressions
40
+ - [ ] Load testing if applicable
41
+
42
+ ## Rollback Plan
43
+
44
+ How to revert if issues are found in production.
45
+
46
+ 3. Ask the user where to save the validation plan:
47
+ - In the PR description (use `tbd shortcut create-or-update-pr-with-validation-plan`)
48
+ - As a separate document in docs/project/specs/active/
49
+ - Both
50
+
51
+ 4. Create the validation plan in the chosen location(s).
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: Pre-Commit Process
3
+ description: Full pre-commit checklist including spec sync, code review, and testing
4
+ ---
5
+ Shortcut: Pre-Commit Process
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ This process must be followed before committing code!
13
+
14
+ Create a to-do list with the following items then perform all of them:
15
+
16
+ 1. **Confirm spec is in sync:**
17
+
18
+ If the work has been done using a feature spec or bugfix spec (typically in
19
+ docs/project/specs/active/) review and make any updates to the spec to be sure it is
20
+ current with respect to the current code.
21
+
22
+ Add any status updates to the spec to include accomplished tasks and remaining tasks,
23
+ if any.
24
+
25
+ 2. **Code style enforcement:**
26
+
27
+ Before code is committed all changes must be reviewed and ensure they comply with the
28
+ coding rules. Run `tbd guidelines --list` to see available guidelines.
29
+
30
+ 3. **Code review:**
31
+
32
+ Read all changes and ensure they follow best practices for modern TypeScript.
33
+ Code should be clean, with brief and maintainable comments.
34
+
35
+ You must review all outstanding changes that are not committed in the current repo.
36
+
37
+ For background, read the project README.md and the package.json files.
38
+
39
+ Make a checklist for this review based on the following list, then go through the
40
+ checklist one step at a time.
41
+
42
+ - Step 3.1: Ensure code follows general rules:
43
+
44
+ - `tbd guidelines general-eng-assistant-rules`
45
+
46
+ - `tbd guidelines general-coding-rules`
47
+
48
+ - `tbd guidelines general-comment-rules`
49
+
50
+ - `tbd guidelines general-style-rules`
51
+
52
+ - `tbd guidelines general-testing-rules`
53
+
54
+ - Step 3.2: Ensure code follows language-specific rules:
55
+ - `tbd guidelines typescript-rules`
56
+
57
+ - Step 3.3: Ensure code follows framework-specific rules (if applicable):
58
+ - `tbd guidelines convex-rules`
59
+
60
+ - Step 3.4: Ensure code follows backward-compatibility rules:
61
+ - `tbd guidelines backward-compatibility-rules`
62
+
63
+ 4. **Unit testing and integration testing:**
64
+
65
+ BE SURE YOU RUN ALL TESTS (npm run precommit) as this includes codegen, formatting,
66
+ linting, unit tests and integration tests.
67
+
68
+ Read docs/development.md for additional background on test workflows.
69
+
70
+ After any significant changes, ALWAYS run the precommit check:
71
+
72
+ ```
73
+ npm run precommit # Runs: codegen, format, lint, test:unit, test:integration
74
+ ```
75
+
76
+ This will generate code, auto-format, lint, and run unit and integration tests.
77
+
78
+ Then YOU MUST FIX all issues found.
79
+
80
+ 5. **Review spec once more:**
81
+
82
+ Make any updates to the spec based on the fixes or issues discovered during review
83
+ and testing.
84
+
85
+ 6. **Summarize and commit:** Summarize what was done and write a clear commit message
86
+ following `tbd guidelines commit-conventions` (use conventional commits format with
87
+ appropriate type). If all checks pass, commit directly.
88
+ Only ask the user if there are unresolved issues or problems.
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: Review Code (Python)
3
+ description: Perform a code review for Python code following best practices
4
+ ---
5
+ Shortcut: Review Code (Python)
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Identify the code to review:
15
+ - If changes are staged, review `git diff --cached`
16
+ - If changes are unstaged, review `git diff`
17
+ - Or review specific files the user mentions
18
+
19
+ 2. Review the Python rules and guidelines:
20
+ - Run `tbd guidelines python-rules` for language-specific rules
21
+ - Run `tbd guidelines general-coding-rules` for general rules
22
+
23
+ 3. Check for common Python issues:
24
+ - [ ] Type hints are used for function signatures
25
+ - [ ] Docstrings follow conventions (Google/NumPy style)
26
+ - [ ] Exception handling is appropriate (not bare except)
27
+ - [ ] Context managers used for resources (with statements)
28
+ - [ ] No mutable default arguments
29
+ - [ ] Imports are organized (stdlib, third-party, local)
30
+
31
+ 4. Check for code quality:
32
+ - [ ] Functions are small and focused
33
+ - [ ] Names follow PEP 8 conventions
34
+ - [ ] No code duplication
35
+ - [ ] Appropriate use of Python idioms
36
+ - [ ] List comprehensions used where appropriate
37
+
38
+ 5. Check for security issues:
39
+ - [ ] No hardcoded secrets or credentials
40
+ - [ ] Input validation where needed
41
+ - [ ] Safe handling of user data
42
+ - [ ] No use of eval() or exec() with untrusted input
43
+
44
+ 6. Summarize findings:
45
+ - List issues found (if any) with file:line references
46
+ - Suggest specific fixes
47
+ - Note any patterns that should be addressed
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Review Code (TypeScript)
3
+ description: Perform a code review for TypeScript code following best practices
4
+ ---
5
+ Shortcut: Review Code (TypeScript)
6
+
7
+ We track issues with tbd.
8
+ Run `tbd` for more on using tbd and current status.
9
+
10
+ Instructions:
11
+
12
+ Create a to-do list with the following items then perform all of them:
13
+
14
+ 1. Identify the code to review:
15
+ - If changes are staged, review `git diff --cached`
16
+ - If changes are unstaged, review `git diff`
17
+ - Or review specific files the user mentions
18
+
19
+ 2. Review the TypeScript rules and guidelines:
20
+ - Run `tbd guidelines typescript-rules` for language-specific rules
21
+ - Run `tbd guidelines general-coding-rules` for general rules
22
+
23
+ 3. Check for common TypeScript issues:
24
+ - [ ] Types are properly defined (avoid `any` unless necessary)
25
+ - [ ] Interfaces/types are used for complex objects
26
+ - [ ] Null/undefined handled properly (strict null checks)
27
+ - [ ] Async/await used correctly (no floating promises)
28
+ - [ ] Error handling is appropriate
29
+ - [ ] No unused imports or variables
30
+
31
+ 4. Check for code quality:
32
+ - [ ] Functions are small and focused
33
+ - [ ] Names are descriptive and consistent
34
+ - [ ] Comments explain “why” not “what”
35
+ - [ ] No code duplication
36
+ - [ ] Appropriate use of TypeScript features
37
+
38
+ 5. Check for security issues:
39
+ - [ ] No hardcoded secrets or credentials
40
+ - [ ] Input validation where needed
41
+ - [ ] Safe handling of user data
42
+
43
+ 6. Summarize findings:
44
+ - List issues found (if any) with file:line references
45
+ - Suggest specific fixes
46
+ - Note any patterns that should be addressed
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: Welcome User
3
+ description: Welcome message for users after tbd installation or setup
4
+ ---
5
+ # Welcome User After tbd Setup
6
+
7
+ Welcome the user with the message below.
8
+ This applies whether this is a new installation or the user is joining an existing
9
+ project.
10
+
11
+ ## Instructions
12
+
13
+ First, run `tbd status` to check the current state.
14
+ Give a brief summary of the status (repository, sync status, integrations).
15
+
16
+ Then show the welcome message:
17
+
18
+ * * *
19
+
20
+ **Welcome! tbd is ready for this project.**
21
+
22
+ tbd helps you ship code with greater speed, quality, and discipline.
23
+ It tracks work as **beads** (issues) and provides shortcuts for common workflows.
24
+
25
+ Here are examples of things you can say and what happens:
26
+
27
+ ### Beads (Issues)
28
+
29
+ | What You Can Say | What Happens |
30
+ | --- | --- |
31
+ | "There's a bug where ..." | Creates and tracks a bug bead (`tbd create`) |
32
+ | "Let's work on current issues" | Shows ready beads to tackle (`tbd ready`) |
33
+ | "Track this as a task" | Creates a task bead (`tbd create`) |
34
+
35
+ ### Shortcuts and Workflows
36
+
37
+ | What You Can Say | What Happens |
38
+ | --- | --- |
39
+ | "Let's plan a new feature" | Walks you through creating a planning spec (`tbd shortcut new-plan-spec`) |
40
+ | "Break the spec into issues" | Creates implementation beads from your spec (`tbd shortcut new-implementation-beads-from-spec`) |
41
+ | "Implement these issues" | Works through beads systematically (`tbd shortcut implement-beads`) |
42
+ | "Commit this code" | Reviews changes and commits properly (`tbd shortcut commit-code`) |
43
+ | "Create a PR" | Creates a pull request with summary (`tbd shortcut create-or-update-pr-simple`) |
44
+ | "Review this for best practices" | Performs a code review with guidelines |
45
+
46
+ ### Guidelines
47
+
48
+ | What You Can Say | What Happens |
49
+ | --- | --- |
50
+ | "I'm building a TypeScript CLI" | Applies TypeScript CLI guidelines |
51
+ | "Help me set up better testing" | Applies testing guidelines |
52
+ | "What are the Python best practices?" | Applies Python guidelines |
53
+
54
+ **Tips:**
55
+
56
+ - Say **“Use beads to …”** and I will track everything with beads.
57
+ This works much better than the usual to-do lists for long lists of tasks.
58
+
59
+ - Say **“Is there a shortcut for ...?”** or **“Use the shortcut to …”** and I’ll look
60
+ for the shortcut for that workflow.
61
+
62
+ * * *
63
+
64
+ Then ask if they’d like to explore any of tbd’s capabilities or get started on
65
+ something.