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 +59 -0
- package/README.md +164 -121
- package/autofix.md +327 -0
- package/bin/install.js +23 -2
- package/bug.md +255 -0
- package/build.md +167 -21
- package/ci.md +414 -0
- package/claim.md +189 -0
- package/config.md +236 -0
- package/deploy.md +516 -0
- package/docs.md +494 -0
- package/edge-cases.md +340 -0
- package/export.md +456 -0
- package/help.md +84 -1
- package/init.md +56 -7
- package/issues.md +376 -0
- package/new-project.md +68 -4
- package/package.json +4 -2
- package/plan.md +15 -1
- package/progress.md +17 -0
- package/quality.md +273 -0
- package/release.md +135 -0
- package/server/dashboard/index.html +708 -0
- package/server/index.js +406 -0
- package/server/lib/plan-parser.js +146 -0
- package/server/lib/project-detector.js +301 -0
- package/server/package.json +19 -0
- package/server.md +742 -0
- package/who.md +151 -0
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
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/tlc-claude-code)
|
|
4
|
+
[](https://www.npmjs.com/package/tlc-claude-code)
|
|
5
|
+
[](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
|
-
##
|
|
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
|
|
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
|
-
##
|
|
35
|
+
## Quick Start
|
|
34
36
|
|
|
35
37
|
### New Project
|
|
36
38
|
|
|
37
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
```
|
|
45
|
+
```bash
|
|
53
46
|
/tlc:init
|
|
54
47
|
```
|
|
55
48
|
|
|
56
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
51
|
+
```bash
|
|
66
52
|
/tlc
|
|
67
53
|
```
|
|
68
54
|
|
|
69
|
-
TLC knows where you are and what's next.
|
|
55
|
+
TLC knows where you are and what's next.
|
|
70
56
|
|
|
71
57
|
---
|
|
72
58
|
|
|
73
|
-
##
|
|
59
|
+
## Features
|
|
74
60
|
|
|
75
|
-
|
|
61
|
+
### For Solo Developers
|
|
76
62
|
|
|
77
|
-
|
|
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
|
-
|
|
68
|
+
### For Teams
|
|
80
69
|
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
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
|
-
|
|
90
|
-
```
|
|
77
|
+
### For Enterprise
|
|
91
78
|
|
|
92
|
-
|
|
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
|
-
|
|
83
|
+
---
|
|
95
84
|
|
|
96
|
-
|
|
85
|
+
## Commands
|
|
97
86
|
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
97
|
+
### Team Commands
|
|
103
98
|
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
108
|
-
- src/auth/session.ts ← security
|
|
109
|
-
- src/payments/charge.ts ← money
|
|
106
|
+
### Integration Commands
|
|
110
107
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
116
|
-
```
|
|
115
|
+
[**See all commands →**](help.md)
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
---
|
|
119
118
|
|
|
120
|
-
|
|
119
|
+
## Team Collaboration
|
|
121
120
|
|
|
122
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
142
|
-
|
|
143
|
-
### 1. Tests First, Always
|
|
139
|
+
## Dev Server
|
|
144
140
|
|
|
145
|
-
|
|
141
|
+
Launch a mini-Replit for your team:
|
|
146
142
|
|
|
147
|
-
|
|
143
|
+
```bash
|
|
144
|
+
/tlc:server
|
|
145
|
+
```
|
|
148
146
|
|
|
149
|
-
|
|
147
|
+
```
|
|
148
|
+
Dashboard: http://localhost:3147
|
|
149
|
+
Share: http://192.168.1.x:3147
|
|
150
|
+
```
|
|
150
151
|
|
|
151
|
-
|
|
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
|
-
|
|
157
|
+
---
|
|
154
158
|
|
|
155
|
-
|
|
159
|
+
## Test Quality
|
|
156
160
|
|
|
157
|
-
|
|
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
|
-
|
|
165
|
-
|
|
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
|
-
|
|
177
|
+
AI-generated tests for null, boundaries, unicode, security.
|
|
178
|
+
|
|
179
|
+
### Auto-Fix
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
/tlc:autofix
|
|
183
|
+
```
|
|
169
184
|
|
|
170
|
-
|
|
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
|
-
##
|
|
189
|
+
## Test Framework
|
|
178
190
|
|
|
179
|
-
|
|
191
|
+
TLC defaults to **mocha + chai + sinon + proxyquire**.
|
|
180
192
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
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
|
-
|
|
209
|
+
## Architecture
|
|
198
210
|
|
|
199
211
|
```
|
|
200
|
-
|
|
201
|
-
/
|
|
202
|
-
|
|
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
|
-
##
|
|
224
|
+
## Works With
|
|
208
225
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
254
|
+
## Documentation
|
|
231
255
|
|
|
232
|
-
**
|
|
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>
|