tlc-claude-code 0.6.1 → 0.6.2

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/PROJECT.md ADDED
@@ -0,0 +1,46 @@
1
+ # TLC - Test Led Coding
2
+
3
+ ## Overview
4
+
5
+ TLC is a Claude Code workflow that enforces test-driven development. It provides slash commands (`/tlc`, `/tlc:new-project`, `/tlc:init`, etc.) that guide developers to write tests before implementation.
6
+
7
+ ## Tech Stack
8
+
9
+ - **Runtime:** Node.js
10
+ - **Package:** npm (tlc-claude-code)
11
+ - **Dashboard:** React + Ink (terminal UI)
12
+ - **Testing:** Vitest
13
+ - **Language:** TypeScript
14
+
15
+ ## Project Structure
16
+
17
+ ```
18
+ TLC/
19
+ ├── bin/
20
+ │ └── install.js # CLI installer (npx tlc-claude-code)
21
+ ├── dashboard/
22
+ │ └── src/
23
+ │ ├── App.tsx # Main TUI app
24
+ │ ├── index.tsx # Entry point
25
+ │ └── components/ # UI panes (Chat, GitHub, Agents, etc.)
26
+ ├── *.md # Slash command definitions
27
+ └── package.json # npm package config
28
+ ```
29
+
30
+ ## Development Methodology: Test-Led Development
31
+
32
+ This project uses TLC. All new implementation follows Red -> Green -> Refactor:
33
+
34
+ 1. **Red**: Write failing tests that define expected behavior
35
+ 2. **Green**: Write minimum code to make tests pass
36
+ 3. **Refactor**: Clean up while keeping tests green
37
+
38
+ Tests are written BEFORE implementation, not after.
39
+
40
+ ## Test Framework
41
+
42
+ - **Framework:** Vitest
43
+ - **Run tests:** `cd dashboard && npm test`
44
+ - **Watch mode:** `cd dashboard && npm run test:watch`
45
+ - **Test directory:** `dashboard/src/` (co-located with source)
46
+ - **Pattern:** `*.test.ts`, `*.test.tsx`
package/README.md CHANGED
@@ -227,6 +227,12 @@ Options:
227
227
 
228
228
  ---
229
229
 
230
+ ## See Also
231
+
232
+ **Using GSD?** Check out [TDD Workflow](https://github.com/jurgencalleja/tdd) — same philosophy, integrates with GSD.
233
+
234
+ ---
235
+
230
236
  ## License
231
237
 
232
238
  MIT
package/bin/install.js CHANGED
@@ -31,6 +31,7 @@ const COMMANDS = [
31
31
  'tlc.md',
32
32
  'new-project.md',
33
33
  'init.md',
34
+ 'import-project.md',
34
35
  'coverage.md',
35
36
  'discuss.md',
36
37
  'plan.md',
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "tdd-dashboard",
3
+ "version": "0.1.0",
4
+ "description": "TUI dashboard for TDD workflow",
5
+ "type": "module",
6
+ "bin": {
7
+ "tdd-dashboard": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "dev": "tsx src/index.tsx",
11
+ "build": "tsc",
12
+ "start": "node dist/index.js",
13
+ "test": "vitest run",
14
+ "test:watch": "vitest"
15
+ },
16
+ "dependencies": {
17
+ "chalk": "^5.3.0",
18
+ "dockerode": "^4.0.2",
19
+ "ink": "^5.0.1",
20
+ "ink-spinner": "^5.0.0",
21
+ "ink-text-input": "^6.0.0",
22
+ "react": "^18.3.1"
23
+ },
24
+ "devDependencies": {
25
+ "@types/dockerode": "^3.3.31",
26
+ "@types/node": "^22.10.0",
27
+ "@types/react": "^18.3.12",
28
+ "ink-testing-library": "^4.0.0",
29
+ "memfs": "^4.56.10",
30
+ "tsx": "^4.19.2",
31
+ "typescript": "^5.7.2",
32
+ "vitest": "^4.0.18"
33
+ }
34
+ }
package/help.md CHANGED
@@ -1,115 +1,99 @@
1
- # /tlc:help - Test-Led Development Commands
2
-
3
- ## Quick Start
4
-
5
- ```
6
- /tlc
7
- ```
8
-
9
- That's it. Detects where you are, tells you what's next.
10
-
11
- ---
12
-
13
- ## All Commands
14
-
15
- ### The Smart One
16
-
17
- | Command | What It Does |
18
- |---------|--------------|
19
- | `/tlc` | **Context-aware entry point. Knows what to do next.** |
20
-
21
- ### Setup
22
-
23
- | Command | What It Does |
24
- |---------|--------------|
25
- | `/tlc:new-project` | Start new project (discusses stack, creates roadmap) |
26
- | `/tlc:init` | Add TLC to existing code |
27
- | `/tlc:coverage` | Find untested code, write tests |
28
-
29
- ### Build (rarely needed directly)
30
-
31
- | Command | What It Does |
32
- |---------|--------------|
33
- | `/tlc:discuss` | Shape implementation approach |
34
- | `/tlc:plan` | Create task plan |
35
- | `/tlc:build` | Write tests implement → verify |
36
- | `/tlc:verify` | Human acceptance testing |
37
-
38
- ### Utility
39
-
40
- | Command | What It Does |
41
- |---------|--------------|
42
- | `/tlc:status` | Test pass/fail counts |
43
- | `/tlc:quick` | One-off task with tests |
44
- | `/tlc:complete` | Tag release |
45
- | `/tlc:new-milestone` | Start next version |
46
-
47
- ---
48
-
49
- ## Workflow
50
-
51
- **Simple version:**
52
- ```
53
- /tlc <- just keep running this
54
- ```
55
-
56
- **Detailed version:**
57
- ```
58
- /tlc:new-project New project
59
-
60
- /tlc Guides you through each phase:
61
- discuss plan → build → verify
62
-
63
- /tlc:complete Tag release
64
- ```
65
-
66
- ---
67
-
68
- ## What `/tlc` Does
69
-
70
- Checks project state and presents ONE action:
71
-
72
- ```
73
- > /tlc
74
-
75
- Phase 2: User Dashboard
76
- Status: Planned, not built
77
-
78
- 4 tasks ready. Tests will be written first.
79
-
80
- → Build phase 2? (Y/n)
81
- ```
82
-
83
- Or if you have untested code:
84
-
85
- ```
86
- > /tlc
87
-
88
- Found 3 files without tests:
89
- - src/utils/format.ts
90
- - src/api/health.ts
91
- - src/middleware/auth.ts
92
-
93
- Add tests? (Y/n)
94
- ```
95
-
96
- ---
97
-
98
- ## Philosophy
99
-
100
- **Tests define behavior. Code makes tests pass.**
101
-
102
- - Tests written BEFORE code
103
- - Tests are the spec, not afterthought
104
- - Human verification still happens
105
- - No phase numbers to remember
106
-
107
- ---
108
-
109
- ## Installation
110
-
111
- ```bash
112
- npx tlc-claude-code
113
- ```
114
-
115
- Lives in `.claude/commands/tlc/`
1
+ # /tlc:help - Test-Led Development Commands
2
+
3
+ ## Quick Start
4
+
5
+ ```
6
+ /tlc
7
+ ```
8
+
9
+ Launches the visual dashboard. Detects where you are, shows what's next.
10
+
11
+ ---
12
+
13
+ ## All Commands
14
+
15
+ ### The Smart One
16
+
17
+ | Command | What It Does |
18
+ |---------|--------------|
19
+ | `/tlc` | **Visual dashboard. Context-aware. Knows what to do next.** |
20
+
21
+ ### Setup
22
+
23
+ | Command | What It Does |
24
+ |---------|--------------|
25
+ | `/tlc:new-project` | Start new project (discusses stack, creates roadmap) |
26
+ | `/tlc:init` | Add TLC to existing code |
27
+ | `/tlc:import-project` | Import multi-repo microservices architecture |
28
+ | `/tlc:coverage` | Find untested code, write tests |
29
+
30
+ ### Build (rarely needed directly)
31
+
32
+ | Command | What It Does |
33
+ |---------|--------------|
34
+ | `/tlc:discuss` | Shape implementation approach |
35
+ | `/tlc:plan` | Create task plan |
36
+ | `/tlc:build` | Write tests implement → verify |
37
+ | `/tlc:verify` | Human acceptance testing |
38
+
39
+ ### Utility
40
+
41
+ | Command | What It Does |
42
+ |---------|--------------|
43
+ | `/tlc:status` | Test pass/fail counts |
44
+ | `/tlc:quick` | One-off task with tests |
45
+ | `/tlc:complete` | Tag release |
46
+ | `/tlc:new-milestone` | Start next version |
47
+
48
+ ---
49
+
50
+ ## Workflow
51
+
52
+ **Simple version:**
53
+ ```
54
+ /tlc <- just keep running this
55
+ ```
56
+
57
+ **Detailed version:**
58
+ ```
59
+ /tlc:new-project New project
60
+
61
+ /tlc Guides you through each phase:
62
+ → discuss → plan → build → verify
63
+
64
+ /tlc:complete Tag release
65
+ ```
66
+
67
+ ---
68
+
69
+ ## What `/tlc` Does
70
+
71
+ Launches a visual terminal dashboard showing:
72
+ - Project overview and current phase
73
+ - Test status (pass/fail counts)
74
+ - Available actions
75
+
76
+ Navigate with keyboard, select actions directly from the UI.
77
+
78
+ Falls back to text mode if dashboard unavailable.
79
+
80
+ ---
81
+
82
+ ## Philosophy
83
+
84
+ **Tests define behavior. Code makes tests pass.**
85
+
86
+ - Tests written BEFORE code
87
+ - Tests are the spec, not afterthought
88
+ - Human verification still happens
89
+ - No phase numbers to remember
90
+
91
+ ---
92
+
93
+ ## Installation
94
+
95
+ ```bash
96
+ npx tlc-claude-code
97
+ ```
98
+
99
+ Lives in `.claude/commands/tlc/`
@@ -0,0 +1,246 @@
1
+ # /tlc:import-project - Import Multi-Repo Architecture
2
+
3
+ Scan multiple GitHub repositories, analyze test coverage, create unified project view.
4
+
5
+ ## What This Does
6
+
7
+ 1. Clones private repos to temp directory (shallow clone)
8
+ 2. Detects stack & test framework per repo
9
+ 3. Runs coverage analysis per repo
10
+ 4. Generates unified coverage report
11
+ 5. Creates multi-service PROJECT.md
12
+ 6. Identifies critical untested paths across all services
13
+
14
+ ## When to Use
15
+
16
+ - Inheriting a multi-repo microservices codebase
17
+ - Verifying "coverage is good" claims
18
+ - Managing multiple services as one TLC project
19
+ - Onboarding to unfamiliar architecture
20
+
21
+ ## Prerequisites
22
+
23
+ - GitHub CLI authenticated: `gh auth status`
24
+ - Access to all repos: `gh repo list {org} --limit 100`
25
+
26
+ ## Process
27
+
28
+ ### Step 1: Gather Repos
29
+
30
+ Ask user for repos. Accept:
31
+ - GitHub org name (scan all repos)
32
+ - Comma-separated repo URLs
33
+ - Path to file with repo list
34
+
35
+ ```bash
36
+ gh repo list {org} --json name,url --limit 100
37
+ ```
38
+
39
+ ### Step 2: Clone Each Repo (Shallow)
40
+
41
+ For each repo:
42
+ ```bash
43
+ gh repo clone {owner}/{repo} .tlc-scan/{repo} -- --depth=1
44
+ ```
45
+
46
+ ### Step 3: Detect Stack Per Repo
47
+
48
+ Check for indicators:
49
+ | File | Stack |
50
+ |------|-------|
51
+ | package.json | Node.js |
52
+ | pyproject.toml | Python |
53
+ | go.mod | Go |
54
+ | Cargo.toml | Rust |
55
+
56
+ Check for test framework:
57
+ | Indicator | Framework |
58
+ |-----------|-----------|
59
+ | vitest.config.* | Vitest |
60
+ | jest.config.* | Jest |
61
+ | pytest.ini / [tool.pytest] | pytest |
62
+ | *_test.go | go test |
63
+
64
+ ### Step 4: Run Coverage Per Repo
65
+
66
+ Execute framework-specific coverage:
67
+ - **Node.js (vitest):** `npm test -- --coverage --reporter=json`
68
+ - **Node.js (jest):** `npm test -- --coverage --json`
69
+ - **Python:** `pytest --cov --cov-report=json`
70
+ - **Go:** `go test -coverprofile=coverage.out ./...`
71
+
72
+ Parse coverage reports:
73
+ - Node.js: `coverage/coverage-final.json`
74
+ - Python: `coverage.json`
75
+ - Go: parse `coverage.out`
76
+
77
+ ### Step 5: Identify Untested Critical Paths
78
+
79
+ Scan for keywords indicating critical code:
80
+ - **Auth:** login, logout, session, token, password, oauth, jwt
81
+ - **Payments:** payment, billing, charge, stripe, invoice
82
+ - **Data mutations:** create, update, delete, save
83
+ - **Security:** validate, sanitize, permission, role
84
+
85
+ Flag any file with these keywords that lacks corresponding test.
86
+
87
+ ### Step 6: Generate Unified Report
88
+
89
+ Create `.planning/COVERAGE-REPORT.md`:
90
+
91
+ ```markdown
92
+ # Coverage Report - Multi-Service Architecture
93
+
94
+ Generated: {timestamp}
95
+
96
+ ## Summary
97
+
98
+ | Metric | Value |
99
+ |--------|-------|
100
+ | Total Repos | 12 |
101
+ | Avg Coverage | 67% |
102
+ | Critical Gaps | 4 |
103
+
104
+ ## Per-Service Coverage
105
+
106
+ | Service | Stack | Coverage | Tests | Critical Gaps |
107
+ |---------|-------|----------|-------|---------------|
108
+ | auth-service | Node.js | 87% | 45 | 0 |
109
+ | payment-service | Node.js | 23% | 8 | 2 (charge, refund) |
110
+ | user-service | Python | 91% | 112 | 0 |
111
+ | notification-svc | Node.js | 0% | 0 | 1 (send) |
112
+
113
+ ## Critical Gaps (Priority Order)
114
+
115
+ ### 1. payment-service/src/charge.ts
116
+ - Handles: Credit card charging
117
+ - Risk: Money handling with no tests
118
+ - Action: Write tests for charge flow
119
+
120
+ ### 2. payment-service/src/refund.ts
121
+ - Handles: Refund processing
122
+ - Risk: Money handling with no tests
123
+ - Action: Write tests for refund flow
124
+
125
+ ...
126
+ ```
127
+
128
+ ### Step 7: Create Multi-Service PROJECT.md
129
+
130
+ Create `.planning/PROJECT.md`:
131
+
132
+ ```markdown
133
+ # {Project Name} - Multi-Service Architecture
134
+
135
+ ## Overview
136
+
137
+ {Inferred from repo names and README files}
138
+
139
+ ## Services
140
+
141
+ ### auth-service
142
+ - **Path:** github.com/{org}/auth-service
143
+ - **Stack:** Node.js + Express
144
+ - **Test Framework:** Vitest
145
+ - **Coverage:** 87%
146
+ - **Role:** Authentication & session management
147
+
148
+ ### payment-service
149
+ - **Path:** github.com/{org}/payment-service
150
+ - **Stack:** Node.js + Stripe
151
+ - **Test Framework:** Jest
152
+ - **Coverage:** 23%
153
+ - **Role:** Payment processing
154
+
155
+ ...
156
+
157
+ ## Architecture
158
+
159
+ ```
160
+ [API Gateway]
161
+ |-- [Auth Service] --> [User DB]
162
+ |-- [User Service] --> [User DB]
163
+ |-- [Payment Service] --> [Stripe API]
164
+ +-- [Notification Service] --> [Email/SMS]
165
+ ```
166
+
167
+ ## Development Methodology: Test-Led Development
168
+
169
+ All services follow TLC. New code requires tests first.
170
+
171
+ ## Next Steps
172
+
173
+ 1. Fix critical coverage gaps (see COVERAGE-REPORT.md)
174
+ 2. Run `/tlc:coverage` per service for detailed backlog
175
+ 3. Use `/tlc` for new features
176
+ ```
177
+
178
+ ### Step 8: Create Test Backlog
179
+
180
+ Create `.planning/BACKLOG.md`:
181
+
182
+ ```markdown
183
+ # Test Backlog - Multi-Service
184
+
185
+ ## Critical (Security/Money)
186
+
187
+ - [ ] payment-service: src/charge.ts
188
+ - [ ] payment-service: src/refund.ts
189
+ - [ ] auth-service: src/password-reset.ts (if untested)
190
+
191
+ ## High Priority (Core Business Logic)
192
+
193
+ - [ ] user-service: src/registration.ts
194
+ - [ ] order-service: src/checkout.ts
195
+
196
+ ## Standard
197
+
198
+ - [ ] notification-svc: all files (0% coverage)
199
+ ```
200
+
201
+ ### Step 9: Cleanup
202
+
203
+ Remove temp directory:
204
+ ```bash
205
+ rm -rf .tlc-scan/
206
+ ```
207
+
208
+ ### Step 10: Report Summary
209
+
210
+ ```
211
+ Import complete for {org}
212
+
213
+ Repos scanned: 12
214
+ Total coverage: 67% average
215
+
216
+ Critical findings:
217
+ - payment-service: 23% coverage (handles money!)
218
+ - notification-svc: 0% coverage
219
+
220
+ Files created:
221
+ .planning/PROJECT.md
222
+ .planning/COVERAGE-REPORT.md
223
+ .planning/BACKLOG.md
224
+
225
+ Next: Run /tlc:build backlog to write tests for critical gaps
226
+ ```
227
+
228
+ ## Usage
229
+
230
+ ```bash
231
+ # Scan entire GitHub org
232
+ /tlc:import-project myorg
233
+
234
+ # Scan specific repos
235
+ /tlc:import-project myorg/auth-service,myorg/payment-service
236
+
237
+ # Scan from file
238
+ /tlc:import-project --file repos.txt
239
+ ```
240
+
241
+ ## Notes
242
+
243
+ - Requires `gh` CLI authenticated with access to private repos
244
+ - Shallow clones only (--depth=1) to minimize bandwidth
245
+ - Temp files cleaned up after scan
246
+ - Re-run anytime to update coverage report
package/package.json CHANGED
@@ -1,15 +1,22 @@
1
1
  {
2
2
  "name": "tlc-claude-code",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "TLC - Test Led Coding for Claude Code",
5
5
  "bin": {
6
- "tlc-claude-code": "./bin/install.js"
6
+ "tlc-claude-code": "./bin/install.js",
7
+ "tlc-dashboard": "./dashboard/dist/index.js"
7
8
  },
8
9
  "files": [
9
10
  "bin/",
11
+ "dashboard/dist/",
12
+ "dashboard/package.json",
10
13
  "*.md",
11
14
  "install.sh"
12
15
  ],
16
+ "scripts": {
17
+ "build": "cd dashboard && npm run build",
18
+ "prepublishOnly": "npm run build"
19
+ },
13
20
  "repository": {
14
21
  "type": "git",
15
22
  "url": "git+https://github.com/jurgencalleja/TLC.git"
package/tlc.md CHANGED
@@ -1,217 +1,197 @@
1
- # /tlc - Smart Entry Point
2
-
3
- One command. Context-aware. Tells you what to do next.
4
-
5
- ## What This Does
6
-
7
- Detects project state and suggests the right action. No memorizing commands.
8
-
9
- ## Process
10
-
11
- ### Step 1: Detect Project State
12
-
13
- Check what exists:
14
-
15
- ```
16
- PROJECT.md exists?
17
- .planning/ directory exists?
18
- □ .planning/ROADMAP.md exists?
19
- Test framework configured? (vitest.config.*, pytest.ini, etc.)
20
- □ Test files exist?
21
- □ Source files exist?
22
- ```
23
-
24
- ### Step 2: Route Based on State
25
-
26
- **No PROJECT.md New or Init**
27
- ```
28
- No project detected.
29
-
30
- 1) Start new project (/tlc:new-project)
31
- 2) Add TLC to existing code (/tlc:init)
32
- ```
33
-
34
- **PROJECT.md exists, no roadmap → Need Planning**
35
- ```
36
- Project exists but no roadmap.
37
-
38
- Let's break your project into phases.
39
-
40
- What's the first feature to build?
41
- ```
42
- Then create ROADMAP.md with phases based on discussion.
43
-
44
- **Roadmap exists Check Phase Status**
45
-
46
- Parse ROADMAP.md to find:
47
- - Completed phases: `[x]` or `[completed]`
48
- - Current phase: `[>]` or `[in progress]` or `[current]`
49
- - Next pending phase: first without marker
50
-
51
- ### Step 3: Determine Current Phase Action
52
-
53
- For the current/next phase, check what exists:
54
-
55
- ```
56
- Phase {N}: {Name}
57
- □ DISCUSSION.md exists? (.planning/phases/{N}-DISCUSSION.md)
58
- PLAN.md exists? (.planning/phases/{N}-*-PLAN.md)
59
- □ Tests written? (.planning/phases/{N}-TESTS.md or test files)
60
- Implementation done? (check if tests pass)
61
- □ Verified? (.planning/phases/{N}-VERIFIED.md)
62
- ```
63
-
64
- ### Step 4: Present Contextual Action
65
-
66
- Based on phase state, show ONE clear action:
67
-
68
- **Phase not discussed:**
69
- ```
70
- Phase 2: User Dashboard
71
-
72
- Ready to discuss implementation approach.
73
-
74
- → Continue? (Y/n)
75
- ```
76
- Then run discuss flow.
77
-
78
- **Discussed but not planned:**
79
- ```
80
- Phase 2: User Dashboard
81
-
82
- Discussion complete. Ready to create task plan.
83
-
84
- Continue? (Y/n)
85
- ```
86
- Then run plan flow.
87
-
88
- **Planned but no tests:**
89
- ```
90
- Phase 2: User Dashboard
91
-
92
- Plan ready. 4 tasks to implement.
93
-
94
- Next: Write tests, then build.
95
-
96
- Continue? (Y/n)
97
- ```
98
- Then run build flow (tests first).
99
-
100
- **Tests written, not implemented:**
101
- ```
102
- Phase 2: User Dashboard
103
-
104
- Tests ready (12 tests, all failing - expected).
105
-
106
- Next: Implement to make tests pass.
107
-
108
- Continue? (Y/n)
109
- ```
110
- Then run implementation.
111
-
112
- **Implemented, not verified:**
113
- ```
114
- Phase 2: User Dashboard
115
-
116
- Tests passing (12/12 ✓)
117
-
118
- Next: Human verification.
119
-
120
- Continue? (Y/n)
121
- ```
122
- Then run verify flow.
123
-
124
- **Phase complete:**
125
- ```
126
- Phase 2: User Dashboard Complete
127
-
128
- Moving to Phase 3: Reports
129
-
130
- Continue? (Y/n)
131
- ```
132
-
133
- ### Step 5: Check for Untested Code
134
-
135
- If project has source files without tests:
136
-
137
- ```
138
- Found 5 files without tests:
139
- - src/utils/helpers.ts
140
- - src/api/users.ts
141
- - src/services/email.ts
142
- ...
143
-
144
- Add tests for existing code? (Y/n)
145
- ```
146
-
147
- If yes, run `/tlc:coverage` flow.
148
-
149
- ### Step 6: All Phases Complete
150
-
151
- ```
152
- All phases complete! 🎉
153
-
154
- Milestone ready for release.
155
-
156
- 1) Tag release (/tlc:complete)
157
- 2) Start next milestone (/tlc:new-milestone)
158
- 3) Check test coverage (/tlc:coverage)
159
- ```
160
-
161
- ## Examples
162
-
163
- **Fresh directory:**
164
- ```
165
- > /tlc
166
-
167
- No project detected.
168
-
169
- What would you like to do?
170
- 1) Start new project
171
- 2) Add TLC to existing code
172
- ```
173
-
174
- **Mid-project:**
175
- ```
176
- > /tlc
177
-
178
- Phase 2: User Dashboard
179
- Status: Planned, not built
180
-
181
- 4 tasks ready. Tests will be written first.
182
-
183
- → Build phase 2? (Y/n)
184
- ```
185
-
186
- **Has untested code:**
187
- ```
188
- > /tlc
189
-
190
- Phase 3: Reports [current]
191
-
192
- Also found: 3 files without test coverage
193
- - src/utils/format.ts
194
- - src/api/health.ts
195
- - src/middleware/auth.ts
196
-
197
- 1) Continue with Phase 3
198
- 2) Add tests to existing code first
199
- ```
200
-
201
- ## Usage
202
-
203
- ```
204
- /tlc
205
- ```
206
-
207
- No arguments. Auto-detects everything.
208
-
209
- ## Why This Exists
210
-
211
- Instead of remembering:
212
- - `/tlc:discuss 2`
213
- - `/tlc:plan 2`
214
- - `/tlc:build 2`
215
- - `/tlc:verify 2`
216
-
217
- Just run `/tlc`. It knows where you are.
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 for Untested Code
154
+
155
+ If project has source files without tests:
156
+
157
+ ```
158
+ Found 5 files without tests:
159
+ - src/utils/helpers.ts
160
+ - src/api/users.ts
161
+ - src/services/email.ts
162
+ ...
163
+
164
+ Add tests for existing code? (Y/n)
165
+ ```
166
+
167
+ If yes, run `/tlc:coverage` flow.
168
+
169
+ ### Step 7: All Phases Complete
170
+
171
+ ```
172
+ All phases complete!
173
+
174
+ Milestone ready for release.
175
+
176
+ 1) Tag release (/tlc:complete)
177
+ 2) Start next milestone (/tlc:new-milestone)
178
+ 3) Check test coverage (/tlc:coverage)
179
+ ```
180
+
181
+ ## Usage
182
+
183
+ ```
184
+ /tlc
185
+ ```
186
+
187
+ No arguments. Auto-detects everything. Launches dashboard when available.
188
+
189
+ ## Why This Exists
190
+
191
+ Instead of remembering:
192
+ - `/tlc:discuss 2`
193
+ - `/tlc:plan 2`
194
+ - `/tlc:build 2`
195
+ - `/tlc:verify 2`
196
+
197
+ Just run `/tlc`. It knows where you are.