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/export.md ADDED
@@ -0,0 +1,456 @@
1
+ # /tlc:export - Multi-Tool Support
2
+
3
+ Export TLC rules and context for other AI coding tools.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /tlc:export [format]
9
+ ```
10
+
11
+ Formats:
12
+ - `agents` - AGENTS.md universal format
13
+ - `cursor` - Cursor rules
14
+ - `copilot` - GitHub Copilot instructions
15
+ - `continue` - Continue.dev config
16
+ - `cody` - Sourcegraph Cody
17
+ - `aider` - Aider conventions
18
+ - `all` - All formats
19
+
20
+ ## AGENTS.md Universal Format
21
+
22
+ The `AGENTS.md` file is a universal standard for AI agent instructions:
23
+
24
+ ```
25
+ > /tlc:export agents
26
+
27
+ Creating AGENTS.md...
28
+
29
+ This file tells AI tools how to work with your project.
30
+
31
+ ---
32
+ # AGENTS.md
33
+
34
+ ## Project Overview
35
+
36
+ This is a Node.js/Express API with React frontend.
37
+ Test framework: mocha/chai/sinon
38
+
39
+ ## Coding Standards
40
+
41
+ ### Test-First Development
42
+
43
+ ALWAYS write tests before implementation:
44
+
45
+ 1. Create test file first
46
+ 2. Write failing tests
47
+ 3. Implement until tests pass
48
+ 4. Refactor if needed
49
+
50
+ ### Test Location
51
+
52
+ Tests go next to source files:
53
+ ```
54
+ src/
55
+ auth/
56
+ login.js
57
+ login.test.js
58
+ ```
59
+
60
+ ### Test Framework
61
+
62
+ Use mocha with chai assertions:
63
+ ```javascript
64
+ const { expect } = require('chai');
65
+ const sinon = require('sinon');
66
+
67
+ describe('login', () => {
68
+ it('returns user on valid credentials', async () => {
69
+ // Test code
70
+ });
71
+ });
72
+ ```
73
+
74
+ ## Task Management
75
+
76
+ Tasks are tracked in `.planning/phases/{N}-PLAN.md`:
77
+
78
+ ```markdown
79
+ ### Task 1: Description [status]
80
+
81
+ status markers:
82
+ - [ ] = available
83
+ - [>@user] = claimed
84
+ - [x@user] = completed
85
+ ```
86
+
87
+ Before starting work:
88
+ 1. Check PLAN.md for available tasks
89
+ 2. Claim task by updating marker to [>@yourname]
90
+ 3. Work on the task
91
+ 4. Mark complete when done [x@yourname]
92
+
93
+ ## File Conventions
94
+
95
+ | Pattern | Purpose |
96
+ |---------|---------|
97
+ | `*.test.js` | Test files |
98
+ | `*.spec.js` | Alternative test files |
99
+ | `.planning/` | TLC planning files |
100
+ | `PROJECT.md` | Project overview |
101
+ | `CLAUDE.md` | Claude-specific instructions |
102
+
103
+ ## Commands
104
+
105
+ When working on this project:
106
+
107
+ - Run tests: `npm test`
108
+ - Run single test: `npm test -- --grep "test name"`
109
+ - Watch mode: `npm run test:watch`
110
+
111
+ ## Current State
112
+
113
+ Check `.planning/ROADMAP.md` for project status.
114
+ Check current phase PLAN.md for active tasks.
115
+ ---
116
+
117
+ Created AGENTS.md in project root.
118
+ ```
119
+
120
+ ## Cursor Rules
121
+
122
+ ```
123
+ > /tlc:export cursor
124
+
125
+ Creating .cursorrules...
126
+
127
+ ---
128
+ # Cursor Rules for TLC Project
129
+
130
+ ## Test-First Development
131
+
132
+ When implementing new features:
133
+ 1. First, create or update test file
134
+ 2. Write tests that fail
135
+ 3. Then implement the code
136
+ 4. Verify tests pass
137
+
138
+ ## File Patterns
139
+
140
+ Tests: `{name}.test.js` next to source
141
+ Planning: `.planning/phases/{N}-PLAN.md`
142
+
143
+ ## Testing
144
+
145
+ Framework: mocha + chai + sinon
146
+
147
+ Example:
148
+ ```javascript
149
+ const { expect } = require('chai');
150
+ describe('feature', () => {
151
+ it('does something', () => {
152
+ expect(result).to.equal(expected);
153
+ });
154
+ });
155
+ ```
156
+
157
+ Run: `npm test`
158
+
159
+ ## Task Workflow
160
+
161
+ Before coding:
162
+ 1. Read current task from PLAN.md
163
+ 2. Understand requirements
164
+ 3. Write tests first
165
+ 4. Then implement
166
+
167
+ ## Code Style
168
+
169
+ - Use async/await over callbacks
170
+ - Prefer named exports
171
+ - Keep functions small (<30 lines)
172
+ - Document public APIs
173
+ ---
174
+
175
+ Created .cursorrules
176
+ ```
177
+
178
+ ## GitHub Copilot
179
+
180
+ ```
181
+ > /tlc:export copilot
182
+
183
+ Creating .github/copilot-instructions.md...
184
+
185
+ ---
186
+ # Copilot Instructions
187
+
188
+ ## Project Context
189
+
190
+ Node.js Express API with React frontend.
191
+ Testing: mocha, chai, sinon, proxyquire
192
+
193
+ ## Test-First Approach
194
+
195
+ Always suggest tests before implementation.
196
+
197
+ When asked to implement a feature:
198
+ 1. First suggest test cases
199
+ 2. Then implement the code
200
+
201
+ ## Preferred Patterns
202
+
203
+ ### Tests
204
+ ```javascript
205
+ const { expect } = require('chai');
206
+ const sinon = require('sinon');
207
+
208
+ describe('module', () => {
209
+ afterEach(() => sinon.restore());
210
+
211
+ it('should do something', async () => {
212
+ // Arrange
213
+ const stub = sinon.stub();
214
+
215
+ // Act
216
+ const result = await fn();
217
+
218
+ // Assert
219
+ expect(result).to.deep.equal(expected);
220
+ });
221
+ });
222
+ ```
223
+
224
+ ### Async Functions
225
+ ```javascript
226
+ async function getData() {
227
+ try {
228
+ const result = await fetch(url);
229
+ return result.json();
230
+ } catch (error) {
231
+ throw new ApiError('Failed to fetch', { cause: error });
232
+ }
233
+ }
234
+ ```
235
+
236
+ ## Files to Reference
237
+
238
+ - PROJECT.md - Project overview
239
+ - .planning/ROADMAP.md - Current progress
240
+ - .planning/phases/*-PLAN.md - Current tasks
241
+ ---
242
+
243
+ Created .github/copilot-instructions.md
244
+ ```
245
+
246
+ ## Continue.dev
247
+
248
+ ```
249
+ > /tlc:export continue
250
+
251
+ Creating .continue/config.json and rules...
252
+
253
+ ---
254
+ {
255
+ "models": [],
256
+ "customCommands": [
257
+ {
258
+ "name": "test",
259
+ "description": "Write tests for selected code",
260
+ "prompt": "Write mocha/chai tests for this code. Include edge cases."
261
+ },
262
+ {
263
+ "name": "tlc",
264
+ "description": "TLC workflow guidance",
265
+ "prompt": "Based on the TLC workflow, what should I do next? Check PLAN.md for current tasks."
266
+ }
267
+ ],
268
+ "contextProviders": [
269
+ {
270
+ "name": "planning",
271
+ "params": {
272
+ "files": [
273
+ "PROJECT.md",
274
+ ".planning/ROADMAP.md",
275
+ ".planning/phases/*-PLAN.md"
276
+ ]
277
+ }
278
+ }
279
+ ],
280
+ "docs": [
281
+ {
282
+ "title": "TLC Workflow",
283
+ "startUrl": "https://github.com/your/tlc-docs"
284
+ }
285
+ ]
286
+ }
287
+ ---
288
+
289
+ Created .continue/config.json
290
+ Created .continue/rules/tlc.md
291
+ ```
292
+
293
+ ## Sourcegraph Cody
294
+
295
+ ```
296
+ > /tlc:export cody
297
+
298
+ Creating .cody/config.json...
299
+
300
+ ---
301
+ {
302
+ "contextFilters": {
303
+ "include": [
304
+ "**/*.js",
305
+ "**/*.ts",
306
+ "**/*.test.js",
307
+ "PROJECT.md",
308
+ ".planning/**/*.md"
309
+ ],
310
+ "exclude": [
311
+ "**/node_modules/**",
312
+ "**/dist/**"
313
+ ]
314
+ },
315
+ "codebase": {
316
+ "testFramework": "mocha",
317
+ "testPattern": "*.test.{js,ts}"
318
+ }
319
+ }
320
+ ---
321
+
322
+ Created .cody/config.json
323
+ Created .cody/instructions.md
324
+ ```
325
+
326
+ ## Aider
327
+
328
+ ```
329
+ > /tlc:export aider
330
+
331
+ Creating .aider.conf.yml...
332
+
333
+ ---
334
+ # Aider Configuration for TLC
335
+
336
+ # Always include these files for context
337
+ read:
338
+ - PROJECT.md
339
+ - .planning/ROADMAP.md
340
+
341
+ # Test-first conventions
342
+ conventions:
343
+ - "Write tests before implementation"
344
+ - "Tests go in {name}.test.js next to source"
345
+ - "Use mocha/chai for testing"
346
+
347
+ # Lint/format settings
348
+ auto-lint: true
349
+ lint-cmd: npm run lint
350
+
351
+ # Test command
352
+ test-cmd: npm test
353
+ ---
354
+
355
+ Created .aider.conf.yml
356
+ ```
357
+
358
+ ## Export All
359
+
360
+ ```
361
+ > /tlc:export all
362
+
363
+ Exporting to all formats...
364
+
365
+ Created:
366
+ ✓ AGENTS.md (universal)
367
+ ✓ .cursorrules (Cursor)
368
+ ✓ .github/copilot-instructions.md (Copilot)
369
+ ✓ .continue/config.json (Continue)
370
+ ✓ .cody/config.json (Cody)
371
+ ✓ .aider.conf.yml (Aider)
372
+
373
+ All AI tools can now understand your TLC workflow!
374
+ ```
375
+
376
+ ## Keeping in Sync
377
+
378
+ When project changes, re-export:
379
+
380
+ ```
381
+ > /tlc:export --update
382
+
383
+ Updating AI tool configurations...
384
+
385
+ Changes detected:
386
+ - Test framework: jest → mocha
387
+ - New phase added to roadmap
388
+
389
+ Updated:
390
+ ✓ AGENTS.md
391
+ ✓ .cursorrules
392
+ ✓ .github/copilot-instructions.md
393
+ ```
394
+
395
+ ## Configuration
396
+
397
+ In `.tlc.json`:
398
+
399
+ ```json
400
+ {
401
+ "export": {
402
+ "autoUpdate": true,
403
+ "formats": ["agents", "cursor", "copilot"],
404
+ "customRules": [
405
+ "Always use TypeScript strict mode",
406
+ "Prefer functional components in React"
407
+ ]
408
+ }
409
+ }
410
+ ```
411
+
412
+ ## IDE Integration
413
+
414
+ ### VS Code
415
+
416
+ With exported files, VS Code extensions will:
417
+ - Copilot: Follow instructions in `.github/copilot-instructions.md`
418
+ - Continue: Use `.continue/config.json`
419
+ - Cody: Use `.cody/instructions.md`
420
+
421
+ ### Cursor
422
+
423
+ Cursor automatically reads `.cursorrules` from project root.
424
+
425
+ ### JetBrains
426
+
427
+ JetBrains IDEs with AI Assistant read `AGENTS.md`.
428
+
429
+ ## MCP Integration
430
+
431
+ For tools supporting Model Context Protocol:
432
+
433
+ ```json
434
+ {
435
+ "mcp": {
436
+ "servers": {
437
+ "tlc": {
438
+ "command": "tlc-mcp-server",
439
+ "args": ["--project", "."]
440
+ }
441
+ }
442
+ }
443
+ }
444
+ ```
445
+
446
+ This provides:
447
+ - Task list from PLAN.md
448
+ - Bug list from BUGS.md
449
+ - Project context from PROJECT.md
450
+
451
+ ## Notes
452
+
453
+ - AGENTS.md is the universal format (works with most tools)
454
+ - Tool-specific files add extra features
455
+ - Re-export after major changes
456
+ - Commit these files to share with team
package/help.md CHANGED
@@ -36,14 +36,54 @@ Launches the visual dashboard. Detects where you are, shows what's next.
36
36
  | `/tlc:build` | Write tests → implement → verify |
37
37
  | `/tlc:verify` | Human acceptance testing |
38
38
 
39
- ### Utility
39
+ ### Quality & Testing
40
40
 
41
41
  | Command | What It Does |
42
42
  |---------|--------------|
43
43
  | `/tlc:status` | Test pass/fail counts |
44
+ | `/tlc:coverage` | Find untested code, write tests |
45
+ | `/tlc:quality` | Test quality scoring and analysis |
46
+ | `/tlc:edge-cases` | Generate edge case tests |
47
+ | `/tlc:autofix` | Auto-fix failing tests |
48
+ | `/tlc:config` | Configure test frameworks |
49
+
50
+ ### Utility
51
+
52
+ | Command | What It Does |
53
+ |---------|--------------|
44
54
  | `/tlc:quick` | One-off task with tests |
45
55
  | `/tlc:complete` | Tag release |
46
56
  | `/tlc:new-milestone` | Start next version |
57
+ | `/tlc:bug` | Log a bug or feedback |
58
+ | `/tlc:server` | Start dashboard server for QA |
59
+
60
+ ### Multi-User Collaboration
61
+
62
+ | Command | What It Does |
63
+ |---------|--------------|
64
+ | `/tlc:claim` | Claim a task (reserve for yourself) |
65
+ | `/tlc:release` | Release a claimed task |
66
+ | `/tlc:who` | Show who's working on what |
67
+
68
+ ### CI/CD & Integration
69
+
70
+ | Command | What It Does |
71
+ |---------|--------------|
72
+ | `/tlc:ci` | Generate CI/CD pipeline (GitHub Actions, GitLab, etc.) |
73
+ | `/tlc:issues` | Sync with issue trackers (GitHub, Jira, Linear) |
74
+
75
+ ### Documentation
76
+
77
+ | Command | What It Does |
78
+ |---------|--------------|
79
+ | `/tlc:docs` | Generate project docs (API, architecture, onboarding) |
80
+
81
+ ### Multi-Tool & Deployment
82
+
83
+ | Command | What It Does |
84
+ |---------|--------------|
85
+ | `/tlc:export` | Export rules for Cursor, Copilot, Continue, Cody |
86
+ | `/tlc:deploy` | VPS deployment with branch previews |
47
87
 
48
88
  ---
49
89
 
@@ -97,3 +137,46 @@ npx tlc-claude-code
97
137
  ```
98
138
 
99
139
  Lives in `.claude/commands/tlc/`
140
+
141
+ ---
142
+
143
+ ## Agents
144
+
145
+ TLC includes specialized AI agents that handle research, planning, execution, and verification. Most are invoked automatically by commands.
146
+
147
+ ### Research Agents
148
+
149
+ | Agent | Invoked By | Purpose |
150
+ |-------|------------|---------|
151
+ | `tlc-competitor-analyst` | `/tlc:new-project` | Competitive analysis |
152
+ | `tlc-market-researcher` | `/tlc:new-project` | Market landscape, user needs |
153
+ | `tlc-tech-researcher` | `/tlc:new-project`, `/tlc:plan` | Evaluate tech choices |
154
+ | `tlc-oss-reviewer` | `/tlc:new-project` | Learn from open source |
155
+ | `tlc-ux-researcher` | `/tlc:new-project` | UX patterns, accessibility |
156
+ | `tlc-security-researcher` | `/tlc:plan` | Security best practices |
157
+ | `tlc-api-analyst` | `/tlc:plan` | API design, integrations |
158
+ | `tlc-architecture-analyst` | `/tlc:new-project` | System architecture |
159
+
160
+ ### Build Agents
161
+
162
+ | Agent | Invoked By | Purpose |
163
+ |-------|------------|---------|
164
+ | `tlc-planner` | `/tlc:plan` | Create test-first plans |
165
+ | `tlc-executor` | `/tlc:build` | Red → Green → Refactor |
166
+ | `tlc-coverage-analyzer` | `/tlc:coverage` | Find untested code |
167
+ | `tlc-verifier` | `/tlc:verify` | Goal-backward verification |
168
+ | `tlc-integration-checker` | `/tlc:verify` | E2E flow verification |
169
+ | `tlc-debugger` | Manual | Systematic debugging |
170
+
171
+ ### Manual Agent Invocation
172
+
173
+ ```
174
+ Task(subagent_type="tlc-{agent}", prompt="...")
175
+ ```
176
+
177
+ Example:
178
+ ```
179
+ Task(subagent_type="tlc-competitor-analyst", prompt="Analyze CRM market competitors")
180
+ ```
181
+
182
+ Agent definitions are in the `agents/` folder.
package/init.md CHANGED
@@ -57,12 +57,11 @@ Look for test indicators:
57
57
 
58
58
  ### 4. Set Up Test Framework (if missing)
59
59
 
60
- If no tests found, set up based on detected stack:
60
+ If no tests found, set up based on detected stack. TLC defaults to mocha for JavaScript/TypeScript:
61
61
 
62
62
  | Stack | Framework | Setup |
63
63
  |-------|-----------|-------|
64
- | Next.js / React | Vitest | `npm install -D vitest @testing-library/react` |
65
- | Node.js | Vitest | `npm install -D vitest` |
64
+ | Next.js / React / Node.js | Mocha + Chai + Sinon | `npm install -D mocha chai sinon proxyquire` |
66
65
  | Python | pytest | `pip install pytest` or add to pyproject.toml |
67
66
  | Go | go test | Built-in, no setup needed |
68
67
  | Ruby | RSpec | `gem install rspec && rspec --init` |
@@ -70,11 +69,34 @@ If no tests found, set up based on detected stack:
70
69
 
71
70
  Create config file and test directory structure.
72
71
 
73
- Add test scripts to package.json / pyproject.toml / Makefile:
72
+ For JavaScript/TypeScript, create `.mocharc.json`:
73
+ ```json
74
+ {
75
+ "extension": ["js", "ts"],
76
+ "spec": "test/**/*.test.{js,ts}",
77
+ "require": ["ts-node/register"],
78
+ "timeout": 5000
79
+ }
80
+ ```
81
+
82
+ Create `.tlc.json`:
83
+ ```json
84
+ {
85
+ "testFrameworks": {
86
+ "primary": "mocha",
87
+ "installed": ["mocha", "chai", "sinon", "proxyquire"],
88
+ "run": ["mocha"]
89
+ },
90
+ "testCommand": "npm test",
91
+ "testDirectory": "test"
92
+ }
93
+ ```
94
+
95
+ Add test scripts to package.json:
74
96
  ```json
75
97
  "scripts": {
76
- "test": "vitest run",
77
- "test:watch": "vitest"
98
+ "test": "mocha",
99
+ "test:watch": "mocha --watch"
78
100
  }
79
101
  ```
80
102
 
@@ -82,9 +104,36 @@ Add test scripts to package.json / pyproject.toml / Makefile:
82
104
 
83
105
  - Skip framework setup
84
106
  - Note existing test patterns for consistency
85
- - Report: "Found existing test framework: [vitest/jest/pytest/etc]"
107
+ - Report: "Found existing test framework: [mocha/jest/vitest/pytest/etc]"
86
108
  - Report: "Found X existing test files"
87
109
 
110
+ **Offer to add TLC default stack:**
111
+ ```
112
+ Detected: jest (47 test files)
113
+
114
+ Options:
115
+ 1) Keep jest only - use for all tests
116
+ 2) Add mocha alongside jest - new tests use mocha, keep existing jest
117
+ 3) Keep jest as primary - configure in .tlc.json
118
+
119
+ Which approach? [1/2/3]:
120
+ ```
121
+
122
+ If option 2 selected, create multi-framework config:
123
+ ```json
124
+ {
125
+ "testFrameworks": {
126
+ "primary": "mocha",
127
+ "installed": ["mocha", "chai", "sinon", "proxyquire", "jest"],
128
+ "run": ["mocha", "jest"]
129
+ },
130
+ "commands": {
131
+ "mocha": "npx mocha 'test/**/*.test.js'",
132
+ "jest": "npx jest"
133
+ }
134
+ }
135
+ ```
136
+
88
137
  ### 6. Analyze Existing Code Structure
89
138
 
90
139
  Scan the codebase and generate summary: