tlc-claude-code 0.6.4 → 0.7.1

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/CLAUDE.md ADDED
@@ -0,0 +1,59 @@
1
+ # CLAUDE.md - TLC Project Instructions
2
+
3
+ ## Planning System: TLC
4
+
5
+ This project uses **TLC (Test-Led Coding)** for all planning and development.
6
+
7
+ **DO NOT use Claude's internal task tools** (TaskCreate, TaskUpdate, TaskList) for project planning.
8
+
9
+ Instead, use TLC's file-based system:
10
+
11
+ | Purpose | TLC Location |
12
+ |---------|--------------|
13
+ | Project overview | `PROJECT.md` |
14
+ | Roadmap & phases | `.planning/ROADMAP.md` |
15
+ | Phase plans | `.planning/phases/{N}-PLAN.md` |
16
+ | Task status | Markers in PLAN.md: `[ ]`, `[>@user]`, `[x@user]` |
17
+ | Bugs/feedback | `.planning/BUGS.md` |
18
+ | Test status | `.planning/phases/{N}-TESTS.md` |
19
+ | Config | `.tlc.json` |
20
+
21
+ ## Before Starting Work
22
+
23
+ Always run `/tlc:progress` or `/tlc` to understand current state.
24
+
25
+ ## Workflow Commands
26
+
27
+ | Action | Command |
28
+ |--------|---------|
29
+ | See status | `/tlc` or `/tlc:progress` |
30
+ | Plan a phase | `/tlc:plan` |
31
+ | Build (test-first) | `/tlc:build` |
32
+ | Verify with human | `/tlc:verify` |
33
+ | Log a bug | `/tlc:bug` |
34
+ | Claim a task | `/tlc:claim` |
35
+ | Release a task | `/tlc:release` |
36
+ | See team status | `/tlc:who` |
37
+
38
+ ## Test-First Development
39
+
40
+ All implementation follows **Red → Green → Refactor**:
41
+
42
+ 1. **Red**: Write failing tests that define expected behavior
43
+ 2. **Green**: Write minimum code to make tests pass
44
+ 3. **Refactor**: Clean up while keeping tests green
45
+
46
+ Tests are written BEFORE implementation, not after.
47
+
48
+ ## After TLC Updates
49
+
50
+ If TLC command files are updated, re-read them before executing. Check version in `package.json`.
51
+
52
+ ## Multi-User Collaboration
53
+
54
+ When working with teammates:
55
+ - Claim tasks before starting: `/tlc:claim`
56
+ - Release if blocked: `/tlc:release`
57
+ - Check team status: `/tlc:who`
58
+ - Pull before claiming: `git pull`
59
+ - Push after claiming: `git push`
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # TLC
2
2
 
3
- **Test Led Coding. Tests before code. Automatically.**
3
+ [![npm version](https://img.shields.io/npm/v/tlc-claude-code.svg)](https://www.npmjs.com/package/tlc-claude-code)
4
+ [![npm downloads](https://img.shields.io/npm/dm/tlc-claude-code.svg)](https://www.npmjs.com/package/tlc-claude-code)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ **Test Led Coding for Claude Code. Tests before code. Automatically.**
4
8
 
5
9
  ```bash
6
10
  npx tlc-claude-code
@@ -12,227 +16,266 @@ npx tlc-claude-code
12
16
 
13
17
  ---
14
18
 
15
- ## The Problem
19
+ ## Why TLC?
16
20
 
17
21
  You tell Claude to build something. It builds it. You test it manually. It's broken. You debug. Repeat.
18
22
 
19
23
  **That's backwards.**
20
24
 
21
- ## The Solution
22
-
23
25
  TLC writes tests *before* code exists. Every feature has a spec. Every spec is executable. When the code works, you know — because the tests pass.
24
26
 
25
27
  ```
26
- You describe → Tests are written → Code is implemented → Tests pass → Done
28
+ You describe → Tests written → Code implemented → Tests pass → Done
27
29
  ```
28
30
 
29
31
  No manual testing. No "does this work?" No vibes.
30
32
 
31
33
  ---
32
34
 
33
- ## Getting Started
35
+ ## Quick Start
34
36
 
35
37
  ### New Project
36
38
 
37
- Starting from scratch? TLC guides you through everything.
38
-
39
- ```
39
+ ```bash
40
40
  /tlc:new-project
41
41
  ```
42
42
 
43
- 1. **Discuss requirements** — What are you building? Who uses it? What scale?
44
- 2. **Choose stack** — TLC suggests tech based on your answers, you approve or adjust
45
- 3. **Create roadmap** — Break work into phases
46
- 4. **Build with tests** — Each phase: write tests first, then implement
47
-
48
43
  ### Existing Project
49
44
 
50
- Have code already? TLC adds test coverage without disrupting your workflow.
51
-
52
- ```
45
+ ```bash
53
46
  /tlc:init
54
47
  ```
55
48
 
56
- 1. **Scan codebase** — TLC detects your stack, test framework, project structure
57
- 2. **Find gaps** — Identifies files without tests, prioritizes critical paths
58
- 3. **Write tests** — Adds tests one file at a time, starting with highest priority
59
- 4. **Continue normally** — New features use test-first approach going forward
60
-
61
- ### After Setup
49
+ ### Then Just Run
62
50
 
63
- Once initialized, just run:
64
-
65
- ```
51
+ ```bash
66
52
  /tlc
67
53
  ```
68
54
 
69
- TLC knows where you are and what's next. No phase numbers to remember.
55
+ TLC knows where you are and what's next.
70
56
 
71
57
  ---
72
58
 
73
- ## Handling Untested Code
59
+ ## Features
74
60
 
75
- Code comes from many sources. Not all of it has tests.
61
+ ### For Solo Developers
76
62
 
77
- ### External PRs / Other Developers
63
+ - **Test-first by default** Claude writes tests before code
64
+ - **Smart dashboard** — See progress, run actions
65
+ - **Coverage gaps** — Find and fix untested code
66
+ - **Auto-fix** — Automatically repair failing tests
78
67
 
79
- Someone pushes code without tests? TLC catches it.
68
+ ### For Teams
80
69
 
81
- ```
82
- > /tlc
70
+ - **Task claiming** — Prevent duplicate work across engineers
71
+ - **Bug tracking** — QA submits bugs, engineers fix them
72
+ - **Dev server** — Mini-Replit with live preview and logs
73
+ - **Issue sync** — GitHub, Jira, Linear integration
83
74
 
84
- Found 3 new files without tests:
85
- - src/api/webhooks.ts (added 2 days ago)
86
- - src/utils/retry.ts (added 2 days ago)
87
- - src/services/notify.ts (added yesterday)
75
+ > **📄 [Team Workflow Guide](docs/team-workflow.md)** — How 3 engineers + PO + QA collaborate with TLC
88
76
 
89
- Add tests now? (Y/n)
90
- ```
77
+ ### For Enterprise
91
78
 
92
- TLC tracks what's tested. When new untested code appears, it flags it.
79
+ - **CI/CD pipelines** GitHub Actions, GitLab, Azure, CircleCI
80
+ - **VPS deployment** — Branch previews with auth & Slack webhooks
81
+ - **Multi-tool export** — Works with Cursor, Copilot, Continue, Cody
93
82
 
94
- ### After "Vibe Coding" Sessions
83
+ ---
95
84
 
96
- Built something fast without tests? No judgment. Run:
85
+ ## Commands
97
86
 
98
- ```
99
- /tlc:coverage
100
- ```
87
+ | Command | What It Does |
88
+ |---------|--------------|
89
+ | `/tlc` | **Smart entry point — knows what's next** |
90
+ | `/tlc:new-project` | Start new project with roadmap |
91
+ | `/tlc:init` | Add TLC to existing codebase |
92
+ | `/tlc:build` | Write tests → implement → verify |
93
+ | `/tlc:coverage` | Find and fix untested code |
94
+ | `/tlc:quality` | Test quality scoring |
95
+ | `/tlc:autofix` | Auto-repair failing tests |
101
96
 
102
- TLC scans everything, creates a prioritized backlog:
97
+ ### Team Commands
103
98
 
104
- ```
105
- Coverage: 67% (24/36 files)
99
+ | Command | What It Does |
100
+ |---------|--------------|
101
+ | `/tlc:claim` | Reserve a task |
102
+ | `/tlc:who` | See who's working on what |
103
+ | `/tlc:bug` | Log a bug |
104
+ | `/tlc:server` | Start dev server with dashboard |
106
105
 
107
- Critical (no tests):
108
- - src/auth/session.ts ← security
109
- - src/payments/charge.ts ← money
106
+ ### Integration Commands
110
107
 
111
- High priority:
112
- - src/api/users.ts
113
- - src/api/orders.ts
108
+ | Command | What It Does |
109
+ |---------|--------------|
110
+ | `/tlc:ci` | Generate CI/CD pipeline |
111
+ | `/tlc:issues` | Sync with GitHub/Jira/Linear |
112
+ | `/tlc:export` | Export for Cursor/Copilot/etc |
113
+ | `/tlc:deploy` | VPS deployment |
114
114
 
115
- Add to backlog and start? (Y/n)
116
- ```
115
+ [**See all commands →**](help.md)
117
116
 
118
- ### Continuous Coverage
117
+ ---
119
118
 
120
- TLC integrates with your workflow:
119
+ ## Team Collaboration
121
120
 
122
- - **Before builds** `/tlc:status` shows pass/fail counts
123
- - **Before releases** — `/tlc:coverage` ensures nothing slipped through
124
- - **Daily habit** — `/tlc` reminds you of untested code
121
+ TLC supports distributed teams with git-based coordination.
125
122
 
126
- ---
123
+ ```markdown
124
+ ### Task 1: Create schema [x@alice] ← completed by alice
125
+ ### Task 2: Add validation [>@bob] ← bob is working
126
+ ### Task 3: Write tests [ ] ← available
127
+ ```
127
128
 
128
- ## Commands
129
+ ```bash
130
+ /tlc:claim 2 # Reserve task 2
131
+ /tlc:who # See team status
132
+ /tlc:server # Start dashboard for QA
133
+ ```
129
134
 
130
- | Command | What |
131
- |---------|------|
132
- | `/tlc` | **Smart entry point. Knows what's next.** |
133
- | `/tlc:new-project` | Start fresh. Discuss stack, scaffold. |
134
- | `/tlc:init` | Add TLC to existing codebase. |
135
- | `/tlc:coverage` | Find untested code, write tests. |
136
- | `/tlc:status` | Test pass/fail counts. |
137
- | `/tlc:quick` | One-off task with tests. |
135
+ **📄 [Full Team Workflow Guide →](docs/team-workflow.md)**
138
136
 
139
137
  ---
140
138
 
141
- ## What Makes This Different
142
-
143
- ### 1. Tests First, Always
139
+ ## Dev Server
144
140
 
145
- Other workflows: plan build → "hope it works"
141
+ Launch a mini-Replit for your team:
146
142
 
147
- TLC: plan → **write failing tests** → build until tests pass
143
+ ```bash
144
+ /tlc:server
145
+ ```
148
146
 
149
- The tests *are* the spec. No ambiguity.
147
+ ```
148
+ Dashboard: http://localhost:3147
149
+ Share: http://192.168.1.x:3147
150
+ ```
150
151
 
151
- ### 2. Catches Coverage Gaps
152
+ - **Live preview** Your app embedded in dashboard
153
+ - **Real-time logs** — App, tests, git activity
154
+ - **Bug submission** — Web form for QA
155
+ - **Task board** — Who's working on what
152
156
 
153
- New code without tests? TLC notices. External PRs? Flagged. Post-hackathon cleanup? Prioritized backlog ready.
157
+ ---
154
158
 
155
- ### 3. Smart Stack Selection
159
+ ## Test Quality
156
160
 
157
- Don't pick tech in a vacuum. TLC asks what you're building, who uses it, what scale — then suggests the right stack.
161
+ ### Quality Scoring
158
162
 
163
+ ```bash
164
+ /tlc:quality
159
165
  ```
160
- Building: Internal dashboard
161
- Scale: Small team
162
- Data: Simple CRUD
163
166
 
164
- Suggested: Next.js + SQLite + Vercel
165
- Why: Fast to build, cheap to host, fits your needs
167
+ - Coverage (lines, branches, functions)
168
+ - Edge case detection
169
+ - Mutation testing score
170
+
171
+ ### Edge Case Generation
172
+
173
+ ```bash
174
+ /tlc:edge-cases src/auth/login.ts
166
175
  ```
167
176
 
168
- ### 4. Works With Your Team
177
+ AI-generated tests for null, boundaries, unicode, security.
178
+
179
+ ### Auto-Fix
180
+
181
+ ```bash
182
+ /tlc:autofix
183
+ ```
169
184
 
170
- TLC doesn't require everyone to use it. You can:
171
- - Add TLC to a project others contribute to
172
- - Catch untested code from any source
173
- - Gradually improve coverage over time
185
+ Automatically repair failing tests with retry loop.
174
186
 
175
187
  ---
176
188
 
177
- ## Workflow Examples
189
+ ## Test Framework
178
190
 
179
- ### Solo Developer, New Project
191
+ TLC defaults to **mocha + chai + sinon + proxyquire**.
180
192
 
181
- ```
182
- /tlc:new-project → Discuss requirements, choose stack
183
- /tlc → Build phase 1 (tests first)
184
- /tlc → Build phase 2 (tests first)
185
- ...
186
- /tlc:complete → Tag release
193
+ Configure in `.tlc.json`:
194
+
195
+ ```json
196
+ {
197
+ "testFrameworks": {
198
+ "primary": "mocha",
199
+ "installed": ["mocha", "chai", "sinon", "proxyquire"],
200
+ "run": ["mocha"]
201
+ }
202
+ }
187
203
  ```
188
204
 
189
- ### Team Project, Existing Codebase
205
+ Also supports Jest, Vitest, and others via `/tlc:config`.
190
206
 
191
- ```
192
- /tlc:init → Set up TLC, scan codebase
193
- /tlc:coverage → Write tests for critical paths
194
- /tlc → Continue with test-first for new work
195
- ```
207
+ ---
196
208
 
197
- ### After External Contributions
209
+ ## Architecture
198
210
 
199
211
  ```
200
- git pull → Get latest changes
201
- /tlc → "Found 2 untested files. Add tests?"
202
- y → Tests written for new code
212
+ PROJECT.md Project overview
213
+ .planning/
214
+ ROADMAP.md Phases and progress
215
+ BUGS.md Bug tracker
216
+ phases/
217
+ 1-PLAN.md Phase 1 tasks
218
+ 2-PLAN.md Phase 2 tasks
219
+ .tlc.json Configuration
203
220
  ```
204
221
 
205
222
  ---
206
223
 
207
- ## Philosophy
224
+ ## Works With
208
225
 
209
- **Tests define behavior. Code makes tests pass.**
210
-
211
- - Tests written BEFORE code (for new features)
212
- - Untested code gets flagged (for external contributions)
213
- - Coverage gaps get prioritized (for legacy code)
214
- - Human verification still happens tests catch logic errors, you catch "not what I meant"
226
+ | Tool | Support |
227
+ |------|---------|
228
+ | **Claude Code** | Native (slash commands) |
229
+ | **Cursor** | Via `/tlc:export` `.cursorrules` |
230
+ | **GitHub Copilot** | Via `/tlc:export` `.github/copilot-instructions.md` |
231
+ | **Continue** | Via `/tlc:export` `.continue/config.json` |
232
+ | **Cody** | Via `/tlc:export` → `.cody/instructions.md` |
233
+ | **Aider** | Via `/tlc:export` → `.aider.conf.yml` |
215
234
 
216
235
  ---
217
236
 
218
237
  ## Install
219
238
 
220
239
  ```bash
240
+ # Interactive (choose global or local)
221
241
  npx tlc-claude-code
242
+
243
+ # Global (all projects)
244
+ npx tlc-claude-code --global
245
+
246
+ # Local (this project only)
247
+ npx tlc-claude-code --local
222
248
  ```
223
249
 
224
- Options:
225
- - `--global` — Available in all projects
226
- - `--local` — This project only
250
+ Commands install to `.claude/commands/tlc/`
227
251
 
228
252
  ---
229
253
 
230
- ## See Also
254
+ ## Documentation
231
255
 
232
- **Using GSD?** Check out [TDD Workflow](https://github.com/jurgencalleja/tdd) — same philosophy, integrates with GSD.
256
+ - **[Help / All Commands](help.md)**Complete command reference
257
+ - **[Team Workflow](docs/team-workflow.md)** — Guide for teams (engineers + PO + QA)
258
+ - **[Server Spec](server.md)** — Dev server documentation
259
+
260
+ ---
261
+
262
+ ## Philosophy
263
+
264
+ **Tests define behavior. Code makes tests pass.**
265
+
266
+ - Tests written BEFORE code
267
+ - Untested code gets flagged
268
+ - Coverage gaps get prioritized
269
+ - Human verification still happens
233
270
 
234
271
  ---
235
272
 
236
273
  ## License
237
274
 
238
275
  MIT
276
+
277
+ ---
278
+
279
+ <p align="center">
280
+ <sub>Built for <a href="https://claude.ai/code">Claude Code</a></sub>
281
+ </p>