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,212 @@
1
+ # /tlc:checklist - Full Project Checklist
2
+
3
+ **TLC v1.4.9**
4
+
5
+ Shows the complete project status across all phases with best practices checklist.
6
+
7
+ ## What This Does
8
+
9
+ Displays a comprehensive view of:
10
+ 1. Project setup status
11
+ 2. All phases with workflow completion
12
+ 3. Skipped steps across the project
13
+ 4. Quality metrics summary
14
+ 5. Recommended actions
15
+
16
+ ## Output Format
17
+
18
+ ```
19
+ TLC v1.4.9 Project Checklist
20
+ ═══════════════════════════════════════════════════════════════════════════
21
+
22
+ PROJECT SETUP
23
+ ─────────────────────────────────────────────────────────────────────────────
24
+ [x] PROJECT.md exists
25
+ [x] .tlc.json configured
26
+ [x] Git repository initialized
27
+ [x] Main branch: main
28
+
29
+ Test Infrastructure:
30
+ [x] Unit test framework: mocha
31
+ [x] E2E framework: playwright
32
+ [ ] CI/CD configured
33
+
34
+ Quality Gates:
35
+ [x] Coverage threshold: 80%
36
+ [x] Quality score threshold: 75
37
+
38
+ ═══════════════════════════════════════════════════════════════════════════
39
+
40
+ PHASE OVERVIEW
41
+ ─────────────────────────────────────────────────────────────────────────────
42
+
43
+ Phase 1: Authentication [COMPLETE] ✓
44
+ ─────────────────────────────────────────────────────
45
+ [x] Discussed [x] Planned [x] Unit Tests
46
+ [x] E2E Tests [x] Implemented [x] Verified
47
+
48
+ Phase 2: User Dashboard [IN PROGRESS]
49
+ ─────────────────────────────────────────────────────
50
+ [x] Discussed [x] Planned [ ] Unit Tests
51
+ [ ] E2E Tests [ ] Implemented [ ] Verified
52
+
53
+ ⚠️ Skipped: E2E scenarios not in plan
54
+
55
+ Phase 3: Reports [PENDING]
56
+ ─────────────────────────────────────────────────────
57
+ [ ] Discussed [ ] Planned [ ] Unit Tests
58
+ [ ] E2E Tests [ ] Implemented [ ] Verified
59
+
60
+ Phase 4: Admin Panel [PENDING]
61
+ ─────────────────────────────────────────────────────
62
+ [ ] Discussed [ ] Planned [ ] Unit Tests
63
+ [ ] E2E Tests [ ] Implemented [ ] Verified
64
+
65
+ ═══════════════════════════════════════════════════════════════════════════
66
+
67
+ QUALITY SUMMARY
68
+ ─────────────────────────────────────────────────────────────────────────────
69
+
70
+ Test Coverage:
71
+ ──────────────
72
+ Overall: 72% (target: 80%) ⚠️ BELOW TARGET
73
+
74
+ Phase 1: 89% ✓
75
+ Phase 2: 45% ⚠️
76
+ Phase 3: --
77
+ Phase 4: --
78
+
79
+ Test Counts:
80
+ ────────────
81
+ Unit tests: 47 passing, 0 failing
82
+ E2E tests: 12 passing, 0 failing
83
+
84
+ Quality Score: 78/100 (target: 75) ✓
85
+
86
+ ═══════════════════════════════════════════════════════════════════════════
87
+
88
+ SKIPPED STEPS (ACTION NEEDED)
89
+ ─────────────────────────────────────────────────────────────────────────────
90
+
91
+ 1. Phase 2: No E2E scenarios defined
92
+ → Add E2E section to .planning/phases/2-PLAN.md
93
+
94
+ 2. Phase 2: Coverage below threshold (45%)
95
+ → Run /tlc:coverage to identify gaps
96
+
97
+ 3. Project: No CI/CD configured
98
+ → Run /tlc:ci to generate pipeline
99
+
100
+ ═══════════════════════════════════════════════════════════════════════════
101
+
102
+ RECOMMENDED WORKFLOW
103
+ ─────────────────────────────────────────────────────────────────────────────
104
+
105
+ For each phase, follow this order:
106
+
107
+ 1. /tlc:discuss Shape the implementation approach
108
+ 2. /tlc:plan Break into tasks with test cases + E2E scenarios
109
+ 3. /tlc:build Write tests → implement → run E2E
110
+ 4. /tlc:verify Human acceptance testing
111
+ 5. /tlc:coverage Check test coverage meets threshold
112
+
113
+ Before release:
114
+ 6. /tlc:quality Ensure quality score meets threshold
115
+ 7. /tlc:complete Tag release
116
+
117
+ ═══════════════════════════════════════════════════════════════════════════
118
+
119
+ Quick Actions:
120
+ [1] Continue current phase → /tlc
121
+ [2] Fix skipped steps → Shows fix menu
122
+ [3] Run coverage check → /tlc:coverage
123
+ [4] Show all commands → /tlc:help
124
+
125
+ Choice [1/2/3/4]: _
126
+ ```
127
+
128
+ ## Process
129
+
130
+ ### Step 1: Load Project Config
131
+
132
+ ```bash
133
+ # Read .tlc.json
134
+ config=$(cat .tlc.json)
135
+
136
+ # Extract settings
137
+ unitFramework=$(echo $config | jq -r '.testFrameworks.primary // "not configured"')
138
+ e2eFramework=$(echo $config | jq -r '.e2e.framework // "not configured"')
139
+ coverageThreshold=$(echo $config | jq -r '.quality.coverageThreshold // 80')
140
+ qualityThreshold=$(echo $config | jq -r '.quality.qualityScoreThreshold // 75')
141
+ mainBranch=$(echo $config | jq -r '.git.mainBranch // "main"')
142
+ ```
143
+
144
+ ### Step 2: Scan All Phases
145
+
146
+ ```bash
147
+ # Parse ROADMAP.md for all phases
148
+ phases=$(grep -E '^\s*-\s*\[' .planning/ROADMAP.md)
149
+
150
+ # For each phase, check artifacts
151
+ for phase in 1 2 3 4 5; do
152
+ discussion=".planning/phases/${phase}-DISCUSSION.md"
153
+ plan=".planning/phases/${phase}-PLAN.md"
154
+ tests=".planning/phases/${phase}-TESTS.md"
155
+ e2e="tests/e2e/phase-${phase}.spec.ts"
156
+ verified=".planning/phases/${phase}-VERIFIED.md"
157
+
158
+ # Check existence
159
+ [ -f "$discussion" ] && discussed="[x]" || discussed="[ ]"
160
+ [ -f "$plan" ] && planned="[x]" || planned="[ ]"
161
+ # ... etc
162
+ done
163
+ ```
164
+
165
+ ### Step 3: Collect Skipped Steps
166
+
167
+ Build list of all skipped/missing steps across project:
168
+
169
+ ```
170
+ Skipped Step Categories:
171
+ ─────────────────────────
172
+
173
+ 1. Missing artifacts (DISCUSSION.md, PLAN.md, etc.)
174
+ 2. E2E scenarios not defined in plans
175
+ 3. Coverage below threshold
176
+ 4. Quality score below threshold
177
+ 5. CI/CD not configured
178
+ 6. Phases not verified
179
+ 7. Tests written after code (detected by commit order)
180
+ ```
181
+
182
+ ### Step 4: Calculate Quality Metrics
183
+
184
+ ```bash
185
+ # Run test coverage
186
+ npm run test:coverage 2>/dev/null
187
+
188
+ # Parse coverage report
189
+ coverage=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
190
+
191
+ # Run quality scorer
192
+ qualityScore=$(node -e "require('./server/lib/quality-scorer').score()" 2>/dev/null)
193
+ ```
194
+
195
+ ### Step 5: Display and Prompt
196
+
197
+ Show the full checklist and offer actions.
198
+
199
+ ## Usage
200
+
201
+ ```
202
+ /tlc:checklist
203
+ ```
204
+
205
+ No arguments. Shows complete project status.
206
+
207
+ ## When to Use
208
+
209
+ - Starting a work session (see overall status)
210
+ - Before release (ensure nothing skipped)
211
+ - Onboarding new team member (show project health)
212
+ - Sprint planning (identify gaps to address)
@@ -0,0 +1,414 @@
1
+ # /tlc:ci - CI/CD Integration
2
+
3
+ Generate CI/CD pipeline configuration for your TLC project.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /tlc:ci [provider]
9
+ ```
10
+
11
+ Providers: `github`, `gitlab`, `bitbucket`, `azure`, `circle`
12
+
13
+ If no provider specified, auto-detects from git remote.
14
+
15
+ ## What This Does
16
+
17
+ 1. Detects your CI/CD platform from git remote
18
+ 2. Generates appropriate config file
19
+ 3. Includes test-first validation
20
+ 4. Adds regression test gates
21
+
22
+ ## GitHub Actions
23
+
24
+ Creates `.github/workflows/tlc.yml`:
25
+
26
+ ```yaml
27
+ name: TLC Pipeline
28
+
29
+ on:
30
+ push:
31
+ branches: [main, develop]
32
+ pull_request:
33
+ branches: [main]
34
+
35
+ jobs:
36
+ test:
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+
41
+ - name: Setup Node.js
42
+ uses: actions/setup-node@v4
43
+ with:
44
+ node-version: '20'
45
+ cache: 'npm'
46
+
47
+ - name: Install dependencies
48
+ run: npm ci
49
+
50
+ - name: Run tests
51
+ run: npm test
52
+
53
+ - name: Upload coverage
54
+ uses: codecov/codecov-action@v4
55
+ if: always()
56
+
57
+ lint:
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ - uses: actions/setup-node@v4
62
+ with:
63
+ node-version: '20'
64
+ cache: 'npm'
65
+ - run: npm ci
66
+ - run: npm run lint
67
+
68
+ regression:
69
+ runs-on: ubuntu-latest
70
+ needs: [test]
71
+ if: github.event_name == 'pull_request'
72
+ steps:
73
+ - uses: actions/checkout@v4
74
+ with:
75
+ fetch-depth: 0
76
+
77
+ - uses: actions/setup-node@v4
78
+ with:
79
+ node-version: '20'
80
+ cache: 'npm'
81
+
82
+ - run: npm ci
83
+
84
+ - name: Check for untested code
85
+ run: |
86
+ # Get changed files
87
+ CHANGED=$(git diff --name-only origin/main...HEAD | grep -E '\.(ts|js|tsx|jsx)$' | grep -v '\.test\.' || true)
88
+
89
+ if [ -n "$CHANGED" ]; then
90
+ echo "Changed source files:"
91
+ echo "$CHANGED"
92
+
93
+ # Check each has corresponding test
94
+ for file in $CHANGED; do
95
+ testfile="${file%.*}.test.${file##*.}"
96
+ if [ ! -f "$testfile" ]; then
97
+ echo "::warning file=$file::No test file found for $file"
98
+ fi
99
+ done
100
+ fi
101
+
102
+ - name: Run regression tests
103
+ run: npm test -- --coverage
104
+
105
+ - name: Coverage diff
106
+ run: |
107
+ # Compare coverage with base branch
108
+ echo "Coverage report generated"
109
+ ```
110
+
111
+ ## GitLab CI
112
+
113
+ Creates `.gitlab-ci.yml`:
114
+
115
+ ```yaml
116
+ stages:
117
+ - test
118
+ - regression
119
+
120
+ default:
121
+ image: node:20
122
+ cache:
123
+ paths:
124
+ - node_modules/
125
+
126
+ test:
127
+ stage: test
128
+ script:
129
+ - npm ci
130
+ - npm test
131
+ coverage: '/Lines\s*:\s*(\d+\.?\d*)%/'
132
+ artifacts:
133
+ reports:
134
+ coverage_report:
135
+ coverage_format: cobertura
136
+ path: coverage/cobertura-coverage.xml
137
+
138
+ lint:
139
+ stage: test
140
+ script:
141
+ - npm ci
142
+ - npm run lint
143
+ allow_failure: true
144
+
145
+ regression:
146
+ stage: regression
147
+ only:
148
+ - merge_requests
149
+ script:
150
+ - npm ci
151
+ - |
152
+ CHANGED=$(git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA...HEAD | grep -E '\.(ts|js)$' | grep -v '\.test\.' || true)
153
+ if [ -n "$CHANGED" ]; then
154
+ echo "Checking tests for changed files..."
155
+ for file in $CHANGED; do
156
+ testfile="${file%.*}.test.${file##*.}"
157
+ if [ ! -f "$testfile" ]; then
158
+ echo "WARNING: No test file for $file"
159
+ fi
160
+ done
161
+ fi
162
+ - npm test -- --coverage
163
+ ```
164
+
165
+ ## Bitbucket Pipelines
166
+
167
+ Creates `bitbucket-pipelines.yml`:
168
+
169
+ ```yaml
170
+ image: node:20
171
+
172
+ definitions:
173
+ caches:
174
+ npm: ~/.npm
175
+
176
+ pipelines:
177
+ default:
178
+ - step:
179
+ name: Test
180
+ caches:
181
+ - npm
182
+ script:
183
+ - npm ci
184
+ - npm test
185
+
186
+ pull-requests:
187
+ '**':
188
+ - step:
189
+ name: Test
190
+ caches:
191
+ - npm
192
+ script:
193
+ - npm ci
194
+ - npm test
195
+ - step:
196
+ name: Regression Check
197
+ caches:
198
+ - npm
199
+ script:
200
+ - npm ci
201
+ - npm test -- --coverage
202
+ ```
203
+
204
+ ## Azure Pipelines
205
+
206
+ Creates `azure-pipelines.yml`:
207
+
208
+ ```yaml
209
+ trigger:
210
+ - main
211
+ - develop
212
+
213
+ pool:
214
+ vmImage: 'ubuntu-latest'
215
+
216
+ stages:
217
+ - stage: Test
218
+ jobs:
219
+ - job: Test
220
+ steps:
221
+ - task: NodeTool@0
222
+ inputs:
223
+ versionSpec: '20.x'
224
+
225
+ - script: npm ci
226
+ displayName: Install dependencies
227
+
228
+ - script: npm test
229
+ displayName: Run tests
230
+
231
+ - task: PublishCodeCoverageResults@2
232
+ inputs:
233
+ summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
234
+
235
+ - stage: Regression
236
+ condition: eq(variables['Build.Reason'], 'PullRequest')
237
+ jobs:
238
+ - job: Regression
239
+ steps:
240
+ - task: NodeTool@0
241
+ inputs:
242
+ versionSpec: '20.x'
243
+ - script: npm ci
244
+ - script: npm test -- --coverage
245
+ displayName: Regression tests
246
+ ```
247
+
248
+ ## CircleCI
249
+
250
+ Creates `.circleci/config.yml`:
251
+
252
+ ```yaml
253
+ version: 2.1
254
+
255
+ executors:
256
+ node:
257
+ docker:
258
+ - image: cimg/node:20.0
259
+
260
+ jobs:
261
+ test:
262
+ executor: node
263
+ steps:
264
+ - checkout
265
+ - restore_cache:
266
+ keys:
267
+ - npm-{{ checksum "package-lock.json" }}
268
+ - run: npm ci
269
+ - save_cache:
270
+ paths:
271
+ - node_modules
272
+ key: npm-{{ checksum "package-lock.json" }}
273
+ - run: npm test
274
+ - store_test_results:
275
+ path: test-results
276
+ - store_artifacts:
277
+ path: coverage
278
+
279
+ regression:
280
+ executor: node
281
+ steps:
282
+ - checkout
283
+ - restore_cache:
284
+ keys:
285
+ - npm-{{ checksum "package-lock.json" }}
286
+ - run: npm ci
287
+ - run:
288
+ name: Check for untested code
289
+ command: |
290
+ CHANGED=$(git diff --name-only origin/main...HEAD | grep -E '\.(ts|js)$' | grep -v '\.test\.' || true)
291
+ if [ -n "$CHANGED" ]; then
292
+ echo "Changed files: $CHANGED"
293
+ fi
294
+ - run: npm test -- --coverage
295
+
296
+ workflows:
297
+ test-and-deploy:
298
+ jobs:
299
+ - test
300
+ - regression:
301
+ filters:
302
+ branches:
303
+ ignore: main
304
+ ```
305
+
306
+ ## Regression Test Features
307
+
308
+ ### Automatic Detection
309
+
310
+ The CI config includes regression checks that:
311
+
312
+ 1. **Identify changed files** in the PR/MR
313
+ 2. **Verify test coverage** for changed files
314
+ 3. **Run full test suite** to catch regressions
315
+ 4. **Report coverage diff** vs base branch
316
+
317
+ ### Configuring Regression Behavior
318
+
319
+ In `.tlc.json`:
320
+
321
+ ```json
322
+ {
323
+ "ci": {
324
+ "requireTestsForNewFiles": true,
325
+ "coverageThreshold": 80,
326
+ "failOnCoverageDecrease": true,
327
+ "regressionOnPR": true
328
+ }
329
+ }
330
+ ```
331
+
332
+ ### Coverage Requirements
333
+
334
+ Set minimum coverage in `package.json`:
335
+
336
+ ```json
337
+ {
338
+ "jest": {
339
+ "coverageThreshold": {
340
+ "global": {
341
+ "branches": 80,
342
+ "functions": 80,
343
+ "lines": 80,
344
+ "statements": 80
345
+ }
346
+ }
347
+ }
348
+ }
349
+ ```
350
+
351
+ Or for mocha with nyc:
352
+
353
+ ```json
354
+ {
355
+ "nyc": {
356
+ "check-coverage": true,
357
+ "lines": 80,
358
+ "functions": 80,
359
+ "branches": 80
360
+ }
361
+ }
362
+ ```
363
+
364
+ ## Import/Merge Regression
365
+
366
+ When importing external code (`/tlc:import-project`), automatically run regression:
367
+
368
+ ```
369
+ > /tlc:import-project ../legacy-api
370
+
371
+ Importing legacy-api...
372
+
373
+ Found 47 source files without tests.
374
+
375
+ Running regression tests on merge...
376
+ ✓ 23 existing tests pass
377
+ ⚠ 12 new files need tests
378
+
379
+ Create tasks for missing tests? (Y/n)
380
+ ```
381
+
382
+ ## Example Session
383
+
384
+ ```
385
+ > /tlc:ci
386
+
387
+ Detecting CI/CD platform...
388
+ Remote: git@github.com:acme/myproject.git
389
+ Platform: GitHub
390
+
391
+ Generating .github/workflows/tlc.yml...
392
+
393
+ Created CI pipeline with:
394
+ ✓ Test job (runs on all pushes)
395
+ ✓ Lint job (runs on all pushes)
396
+ ✓ Regression job (runs on PRs)
397
+ ✓ Coverage reporting (Codecov)
398
+
399
+ Commit this file? (Y/n) y
400
+
401
+ Committed: ci: add TLC GitHub Actions pipeline
402
+
403
+ Next steps:
404
+ 1. Push to GitHub
405
+ 2. Add CODECOV_TOKEN secret (optional)
406
+ 3. PRs will now require passing tests
407
+ ```
408
+
409
+ ## Notes
410
+
411
+ - CI config respects `.tlc.json` settings
412
+ - Coverage thresholds match project config
413
+ - Regression checks are PR-only by default
414
+ - Use `/tlc:ci --dry-run` to preview without creating files