tlc-claude-code 1.5.3 → 1.5.4

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 (43) hide show
  1. package/.claude/commands/tlc/audit.md +129 -0
  2. package/.claude/commands/tlc/autofix.md +217 -0
  3. package/.claude/commands/tlc/bug.md +255 -0
  4. package/.claude/commands/tlc/build.md +731 -0
  5. package/.claude/commands/tlc/checklist.md +212 -0
  6. package/.claude/commands/tlc/ci.md +414 -0
  7. package/.claude/commands/tlc/claim.md +189 -0
  8. package/.claude/commands/tlc/cleanup.md +187 -0
  9. package/.claude/commands/tlc/complete.md +160 -0
  10. package/.claude/commands/tlc/config.md +395 -0
  11. package/.claude/commands/tlc/coverage.md +222 -0
  12. package/.claude/commands/tlc/deploy.md +723 -0
  13. package/.claude/commands/tlc/discuss.md +185 -0
  14. package/.claude/commands/tlc/docs.md +194 -0
  15. package/.claude/commands/tlc/edge-cases.md +241 -0
  16. package/.claude/commands/tlc/export.md +456 -0
  17. package/.claude/commands/tlc/help.md +169 -0
  18. package/.claude/commands/tlc/import-project.md +246 -0
  19. package/.claude/commands/tlc/init.md +443 -0
  20. package/.claude/commands/tlc/issues.md +376 -0
  21. package/.claude/commands/tlc/llm.md +111 -0
  22. package/.claude/commands/tlc/new-milestone.md +172 -0
  23. package/.claude/commands/tlc/new-project.md +399 -0
  24. package/.claude/commands/tlc/next.md +129 -0
  25. package/.claude/commands/tlc/outdated.md +200 -0
  26. package/.claude/commands/tlc/plan.md +224 -0
  27. package/.claude/commands/tlc/progress.md +153 -0
  28. package/.claude/commands/tlc/quality.md +185 -0
  29. package/.claude/commands/tlc/quick.md +52 -0
  30. package/.claude/commands/tlc/refactor.md +190 -0
  31. package/.claude/commands/tlc/release.md +135 -0
  32. package/.claude/commands/tlc/review-pr.md +184 -0
  33. package/.claude/commands/tlc/review.md +200 -0
  34. package/.claude/commands/tlc/security.md +195 -0
  35. package/.claude/commands/tlc/server.md +19 -0
  36. package/.claude/commands/tlc/start.md +137 -0
  37. package/.claude/commands/tlc/status.md +65 -0
  38. package/.claude/commands/tlc/sync.md +652 -0
  39. package/.claude/commands/tlc/tlc.md +279 -0
  40. package/.claude/commands/tlc/verify.md +159 -0
  41. package/.claude/commands/tlc/who.md +151 -0
  42. package/bin/postinstall.js +54 -0
  43. package/package.json +3 -1
@@ -0,0 +1,279 @@
1
+ # /tlc - Smart Entry Point
2
+
3
+ One command. Context-aware. Visual dashboard.
4
+
5
+ ## What This Does
6
+
7
+ Launches the TLC dashboard - a visual interface showing project state, phases, tests, and next actions.
8
+
9
+ ## Process
10
+
11
+ ### Step 1: Launch Dashboard
12
+
13
+ Run the TLC dashboard:
14
+
15
+ ```bash
16
+ # If in TLC repo (development)
17
+ cd dashboard && npm run dev
18
+
19
+ # If installed globally
20
+ tlc-dashboard
21
+ ```
22
+
23
+ The dashboard shows:
24
+ - Project overview (from PROJECT.md)
25
+ - Phase progress (from ROADMAP.md)
26
+ - Test status (pass/fail counts)
27
+ - Available actions
28
+
29
+ ### Step 2: Fallback to Text Mode
30
+
31
+ If the dashboard cannot be launched (not installed, dependencies missing), fall back to text-based status:
32
+
33
+ Check what exists:
34
+
35
+ ```
36
+ □ PROJECT.md exists?
37
+ □ .planning/ directory exists?
38
+ □ .planning/ROADMAP.md exists?
39
+ □ Test framework configured? (vitest.config.*, pytest.ini, etc.)
40
+ □ Test files exist?
41
+ □ Source files exist?
42
+ ```
43
+
44
+ ### Step 3: Route Based on State (Text Fallback)
45
+
46
+ **No PROJECT.md → New or Init**
47
+ ```
48
+ No project detected.
49
+
50
+ 1) Start new project (/tlc:new-project)
51
+ 2) Add TLC to existing code (/tlc:init)
52
+ ```
53
+
54
+ **PROJECT.md exists, no roadmap → Need Planning**
55
+ ```
56
+ Project exists but no roadmap.
57
+
58
+ Let's break your project into phases.
59
+
60
+ What's the first feature to build?
61
+ ```
62
+ Then create ROADMAP.md with phases based on discussion.
63
+
64
+ **Roadmap exists → Check Phase Status**
65
+
66
+ Parse ROADMAP.md to find:
67
+ - Completed phases: `[x]` or `[completed]`
68
+ - Current phase: `[>]` or `[in progress]` or `[current]`
69
+ - Next pending phase: first without marker
70
+
71
+ ### Step 4: Determine Current Phase Action
72
+
73
+ For the current/next phase, check what exists:
74
+
75
+ ```
76
+ Phase {N}: {Name}
77
+ □ DISCUSSION.md exists? (.planning/phases/{N}-DISCUSSION.md)
78
+ □ PLAN.md exists? (.planning/phases/{N}-*-PLAN.md)
79
+ □ Tests written? (.planning/phases/{N}-TESTS.md or test files)
80
+ □ Implementation done? (check if tests pass)
81
+ □ Verified? (.planning/phases/{N}-VERIFIED.md)
82
+ ```
83
+
84
+ ### Step 5: Present Contextual Action
85
+
86
+ Based on phase state, show ONE clear action:
87
+
88
+ **Phase not discussed:**
89
+ ```
90
+ Phase 2: User Dashboard
91
+
92
+ Ready to discuss implementation approach.
93
+
94
+ → Continue? (Y/n)
95
+ ```
96
+ Then run discuss flow.
97
+
98
+ **Discussed but not planned:**
99
+ ```
100
+ Phase 2: User Dashboard
101
+
102
+ Discussion complete. Ready to create task plan.
103
+
104
+ → Continue? (Y/n)
105
+ ```
106
+ Then run plan flow.
107
+
108
+ **Planned but no tests:**
109
+ ```
110
+ Phase 2: User Dashboard
111
+
112
+ Plan ready. 4 tasks to implement.
113
+
114
+ Next: Write tests, then build.
115
+
116
+ → Continue? (Y/n)
117
+ ```
118
+ Then run build flow (tests first).
119
+
120
+ **Tests written, not implemented:**
121
+ ```
122
+ Phase 2: User Dashboard
123
+
124
+ Tests ready (12 tests, all failing - expected).
125
+
126
+ Next: Implement to make tests pass.
127
+
128
+ → Continue? (Y/n)
129
+ ```
130
+ Then run implementation.
131
+
132
+ **Implemented, not verified:**
133
+ ```
134
+ Phase 2: User Dashboard
135
+
136
+ Tests passing (12/12)
137
+
138
+ Next: Human verification.
139
+
140
+ → Continue? (Y/n)
141
+ ```
142
+ Then run verify flow.
143
+
144
+ **Phase complete:**
145
+ ```
146
+ Phase 2: User Dashboard - Complete
147
+
148
+ Moving to Phase 3: Reports
149
+
150
+ → Continue? (Y/n)
151
+ ```
152
+
153
+ ### Step 6: Check Claude Permissions (One-Time)
154
+
155
+ Check if `.claude/settings.json` exists with TLC permissions:
156
+
157
+ ```bash
158
+ if [ ! -f ".claude/settings.json" ]; then
159
+ # First time - offer setup
160
+ fi
161
+ ```
162
+
163
+ **Skip if already configured.** Only ask once per project.
164
+
165
+ If missing, offer to set up:
166
+
167
+ ```
168
+ TLC works best with pre-approved bash commands.
169
+ This avoids prompts for every test run and git commit.
170
+
171
+ Allow TLC to run commands without prompts? (Y/n)
172
+ ```
173
+
174
+ If yes, create `.claude/settings.json`:
175
+ ```json
176
+ {
177
+ "permissions": {
178
+ "allow": [
179
+ "Bash(npm test*)",
180
+ "Bash(npm run test*)",
181
+ "Bash(npx vitest*)",
182
+ "Bash(npx mocha*)",
183
+ "Bash(pytest*)",
184
+ "Bash(go test*)",
185
+ "Bash(git status*)",
186
+ "Bash(git add *)",
187
+ "Bash(git commit *)",
188
+ "Bash(git diff*)",
189
+ "Bash(git log*)",
190
+ "Bash(git pull*)",
191
+ "Bash(git checkout*)",
192
+ "Bash(git branch*)",
193
+ "Bash(npm install*)",
194
+ "Bash(npm run build*)"
195
+ ]
196
+ }
197
+ }
198
+ ```
199
+
200
+ **IMPORTANT:** `git push` is NOT included - always ask before pushing to remote.
201
+
202
+ ### Step 6b: Check Docs Setup (One-Time)
203
+
204
+ Check if documentation automation is configured:
205
+
206
+ ```bash
207
+ if [ ! -f ".github/workflows/docs-sync.yml" ] && [ -d ".git" ]; then
208
+ # First time - offer docs setup
209
+ fi
210
+ ```
211
+
212
+ **Skip if already configured or no git repo.** Only ask once per project.
213
+
214
+ If missing, offer to set up:
215
+
216
+ ```
217
+ Documentation Automation
218
+
219
+ TLC can automatically maintain your docs:
220
+ • Update version references on push
221
+ • Sync to GitHub Wiki
222
+ • Generate API documentation
223
+ • Capture app screenshots
224
+
225
+ Set up documentation automation? (Y/n)
226
+ ```
227
+
228
+ If yes, run `/tlc:docs setup`:
229
+ - Creates `docs/` directory
230
+ - Adds `.github/workflows/docs-sync.yml`
231
+ - Adds npm scripts for docs
232
+ - Creates starter documentation
233
+
234
+ ### Step 7: Check for Untested Code
235
+
236
+ If project has source files without tests:
237
+
238
+ ```
239
+ Found 5 files without tests:
240
+ - src/utils/helpers.ts
241
+ - src/api/users.ts
242
+ - src/services/email.ts
243
+ ...
244
+
245
+ Add tests for existing code? (Y/n)
246
+ ```
247
+
248
+ If yes, run `/tlc:coverage` flow.
249
+
250
+ ### Step 8: All Phases Complete
251
+
252
+ ```
253
+ All phases complete!
254
+
255
+ Milestone ready for release.
256
+
257
+ 1) Tag release (/tlc:complete)
258
+ 2) Start next milestone (/tlc:new-milestone)
259
+ 3) Check test coverage (/tlc:coverage)
260
+ 4) Update documentation (/tlc:docs)
261
+ ```
262
+
263
+ ## Usage
264
+
265
+ ```
266
+ /tlc
267
+ ```
268
+
269
+ No arguments. Auto-detects everything. Launches dashboard when available.
270
+
271
+ ## Why This Exists
272
+
273
+ Instead of remembering:
274
+ - `/tlc:discuss 2`
275
+ - `/tlc:plan 2`
276
+ - `/tlc:build 2`
277
+ - `/tlc:verify 2`
278
+
279
+ Just run `/tlc`. It knows where you are.
@@ -0,0 +1,159 @@
1
+ # /tlc:verify - Human Acceptance Testing
2
+
3
+ Verify the phase works as expected — with your own eyes.
4
+
5
+ ## What This Does
6
+
7
+ 1. Runs tests to confirm code works
8
+ 2. Walks you through each deliverable
9
+ 3. Captures issues for fixing
10
+ 4. Marks phase as verified when done
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /tlc:verify [phase_number]
16
+ ```
17
+
18
+ If no phase number, auto-detect current phase.
19
+
20
+ ## Process
21
+
22
+ ### Step 1: Run Tests
23
+
24
+ ```bash
25
+ npm test # or pytest, go test, etc.
26
+ ```
27
+
28
+ - ✅ All pass → Continue to human verification
29
+ - ❌ Some fail → Report failures, suggest fixing first
30
+
31
+ ### Step 2: Load Phase Deliverables
32
+
33
+ Read from `.planning/phases/{N}-PLAN.md`:
34
+ - Extract acceptance criteria from each task
35
+ - Build verification checklist
36
+
37
+ ### Step 3: Walk Through Each Deliverable
38
+
39
+ For each testable feature:
40
+
41
+ ```
42
+ Phase 1: Authentication
43
+
44
+ Verifying 3 deliverables:
45
+
46
+ [1/3] User login with email/password
47
+
48
+ Can you:
49
+ 1. Go to /login
50
+ 2. Enter valid credentials
51
+ 3. Get redirected to dashboard
52
+
53
+ Works as expected? (Y/n/describe issue)
54
+ >
55
+ ```
56
+
57
+ ### Step 4: Handle Issues
58
+
59
+ If user reports issue:
60
+ ```
61
+ > n - login works but no error message for wrong password
62
+
63
+ Got it. Creating fix task:
64
+
65
+ Issue: No error message for wrong password
66
+ Location: Login form
67
+ Expected: Show "Invalid credentials" message
68
+
69
+ Add to current phase as fix task? (Y/n)
70
+ ```
71
+
72
+ ### Step 5: Mark Verified or Loop
73
+
74
+ **All verified:**
75
+ ```
76
+ ✅ Phase 1 verified
77
+
78
+ All 3 deliverables confirmed working.
79
+
80
+ Creating .planning/phases/1-VERIFIED.md
81
+
82
+ Ready for next phase? (Y/n)
83
+ ```
84
+
85
+ **Issues found:**
86
+ ```
87
+ Phase 1 verification incomplete
88
+
89
+ Issues found:
90
+ 1. No error message for wrong password
91
+ 2. Session doesn't persist on refresh
92
+
93
+ Fix tasks added to phase. Run /tlc:build 1 to implement fixes.
94
+ ```
95
+
96
+ ### Step 6: Create Verification Record
97
+
98
+ Save to `.planning/phases/{N}-VERIFIED.md`:
99
+
100
+ ```markdown
101
+ # Phase {N}: {Name} - Verification
102
+
103
+ Verified: {date}
104
+
105
+ ## Deliverables
106
+
107
+ - [x] User login with email/password
108
+ - [x] Session persistence
109
+ - [x] Logout functionality
110
+
111
+ ## Issues Found & Fixed
112
+
113
+ - Login error message (fixed in commit abc123)
114
+ - Session refresh (fixed in commit def456)
115
+
116
+ ## Notes
117
+
118
+ {Any additional observations}
119
+ ```
120
+
121
+ ## Why Human Verification?
122
+
123
+ **Tests verify code works.**
124
+ **You verify it works the way you wanted.**
125
+
126
+ Tests catch:
127
+ - Logic errors
128
+ - Regressions
129
+ - Edge cases
130
+
131
+ You catch:
132
+ - "Technically correct but wrong layout"
133
+ - "Works but confusing UX"
134
+ - "Missing something I forgot to specify"
135
+
136
+ Both matter.
137
+
138
+ ## Example
139
+
140
+ ```
141
+ > /tlc:verify 1
142
+
143
+ Running tests... ✅ 11 passing
144
+
145
+ Phase 1: Authentication
146
+
147
+ [1/3] Login with email/password
148
+ Works? (Y/n) > y
149
+
150
+ [2/3] Session persists across page refresh
151
+ Works? (Y/n) > y
152
+
153
+ [3/3] Logout clears session
154
+ Works? (Y/n) > y
155
+
156
+ ✅ Phase 1 verified!
157
+
158
+ Moving to Phase 2: Dashboard
159
+ ```
@@ -0,0 +1,151 @@
1
+ # /tlc:who - Team Status
2
+
3
+ See who's working on what in the current phase.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /tlc:who
9
+ ```
10
+
11
+ ## Process
12
+
13
+ ### Step 1: Find Current Phase
14
+
15
+ 1. Read `.planning/ROADMAP.md`
16
+ 2. Find phase marked `[>]` or `[current]`
17
+ 3. Load `.planning/phases/{N}-*-PLAN.md`
18
+
19
+ ### Step 2: Parse Task Markers
20
+
21
+ Extract status from task headings:
22
+
23
+ | Marker | Status | Owner |
24
+ |--------|--------|-------|
25
+ | `[ ]` | available | - |
26
+ | `[>@user]` | working | @user |
27
+ | `[x@user]` | done | @user |
28
+
29
+ ### Step 3: Identify Current User
30
+
31
+ ```bash
32
+ if [ -n "$TLC_USER" ]; then
33
+ user=$TLC_USER
34
+ else
35
+ user=$(git config user.name | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
36
+ fi
37
+ ```
38
+
39
+ ### Step 4: Display Team Status
40
+
41
+ ```
42
+ Phase 2: User Dashboard
43
+
44
+ | Task | Description | Status | Owner |
45
+ |------|-------------|--------|-------|
46
+ | 1 | Create layout | done | @alice |
47
+ | 2 | Fetch data hook | available | - |
48
+ | 3 | Add charts | working | @bob |
49
+ | 4 | Loading states | available | - |
50
+
51
+ Team Activity:
52
+ @alice: 1 done
53
+ @bob: 1 working
54
+
55
+ You (@alice): No active tasks
56
+ Available: 2, 4
57
+ ```
58
+
59
+ ## Output Format
60
+
61
+ ### Table View
62
+
63
+ Shows all tasks with status:
64
+
65
+ ```
66
+ Phase 1: Authentication
67
+
68
+ | # | Task | Status | Owner |
69
+ |---|------|--------|-------|
70
+ | 1 | Create user schema | done | @alice |
71
+ | 2 | Add validation | working | @bob |
72
+ | 3 | Write migrations | done | @alice |
73
+ | 4 | Integration tests | available | - |
74
+ ```
75
+
76
+ ### Summary
77
+
78
+ After the table:
79
+
80
+ ```
81
+ Summary:
82
+ Done: 2 tasks (@alice: 2)
83
+ Working: 1 task (@bob: 1)
84
+ Available: 1 task
85
+
86
+ You (@charlie):
87
+ No tasks claimed
88
+ Available to claim: 4
89
+ ```
90
+
91
+ ### Your Status
92
+
93
+ Highlights what you're working on:
94
+
95
+ ```
96
+ You (@bob):
97
+ Working on: Task 2 - Add validation
98
+
99
+ Next: Continue with /tlc:build or /tlc:release if blocked
100
+ ```
101
+
102
+ ## Example Output
103
+
104
+ ```
105
+ > /tlc:who
106
+
107
+ Phase 2: User Dashboard
108
+
109
+ Tasks:
110
+ 1. Create layout [x@alice] done
111
+ 2. Fetch data hook [ ] available
112
+ 3. Add charts [>@bob] working
113
+ 4. Loading states [ ] available
114
+ 5. Error boundaries [x@alice] done
115
+
116
+ Team:
117
+ @alice 2 done
118
+ @bob 1 working
119
+
120
+ You (@bob):
121
+ → Task 3: Add charts (in progress)
122
+
123
+ Available tasks: 2, 4
124
+ ```
125
+
126
+ ## No Activity
127
+
128
+ If no one has claimed anything:
129
+
130
+ ```
131
+ > /tlc:who
132
+
133
+ Phase 1: Authentication
134
+
135
+ All 4 tasks available:
136
+ 1. Create user schema [ ]
137
+ 2. Add validation [ ]
138
+ 3. Write migrations [ ]
139
+ 4. Integration tests [ ]
140
+
141
+ No team activity yet.
142
+ Run /tlc:claim to get started.
143
+ ```
144
+
145
+ ## Notes
146
+
147
+ - Shows current phase only
148
+ - Pull latest first for accurate status: `git pull`
149
+ - Task numbers match PLAN.md task numbers
150
+ - Use `/tlc:claim N` to claim an available task
151
+ - Use `/tlc:release N` to release your task
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ // Get source and destination directories
8
+ const srcDir = path.join(__dirname, '..', '.claude', 'commands', 'tlc');
9
+ const destDir = path.join(os.homedir(), '.claude', 'commands', 'tlc');
10
+
11
+ // Create destination directory if it doesn't exist
12
+ function ensureDir(dir) {
13
+ if (!fs.existsSync(dir)) {
14
+ fs.mkdirSync(dir, { recursive: true });
15
+ }
16
+ }
17
+
18
+ // Copy all .md files from source to destination
19
+ function copyCommands() {
20
+ try {
21
+ // Ensure destination exists
22
+ ensureDir(destDir);
23
+
24
+ // Check if source exists
25
+ if (!fs.existsSync(srcDir)) {
26
+ // Silent exit if source doesn't exist (might be dev install)
27
+ return;
28
+ }
29
+
30
+ // Get all .md files
31
+ const files = fs.readdirSync(srcDir).filter(f => f.endsWith('.md'));
32
+
33
+ let copied = 0;
34
+ for (const file of files) {
35
+ const src = path.join(srcDir, file);
36
+ const dest = path.join(destDir, file);
37
+
38
+ // Copy file (overwrite if exists)
39
+ fs.copyFileSync(src, dest);
40
+ copied++;
41
+ }
42
+
43
+ if (copied > 0) {
44
+ console.log(`\x1b[32m✓\x1b[0m TLC: Installed ${copied} commands to ~/.claude/commands/tlc/`);
45
+ }
46
+ } catch (err) {
47
+ // Silent fail - don't break npm install
48
+ if (process.env.DEBUG) {
49
+ console.error('TLC postinstall error:', err.message);
50
+ }
51
+ }
52
+ }
53
+
54
+ copyCommands();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tlc-claude-code",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "TLC - Test Led Coding for Claude Code",
5
5
  "bin": {
6
6
  "tlc": "./bin/tlc.js",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "files": [
11
11
  "bin/",
12
+ ".claude/commands/",
12
13
  "dashboard/dist/",
13
14
  "dashboard/package.json",
14
15
  "server/index.js",
@@ -28,6 +29,7 @@
28
29
  ".gitattributes"
29
30
  ],
30
31
  "scripts": {
32
+ "postinstall": "node bin/postinstall.js",
31
33
  "build": "cd dashboard && npm run build",
32
34
  "prepublishOnly": "npm run build",
33
35
  "docs": "node scripts/docs-update.js",