tlc-claude-code 1.8.5 → 2.1.0
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/commands/tlc/bootstrap.md +77 -0
- package/.claude/commands/tlc/build.md +20 -6
- package/.claude/commands/tlc/deploy.md +194 -2
- package/.claude/commands/tlc/e2e-verify.md +214 -0
- package/.claude/commands/tlc/guard.md +191 -0
- package/.claude/commands/tlc/help.md +32 -0
- package/.claude/commands/tlc/init.md +73 -37
- package/.claude/commands/tlc/llm.md +19 -4
- package/.claude/commands/tlc/preflight.md +134 -0
- package/.claude/commands/tlc/recall.md +87 -0
- package/.claude/commands/tlc/remember.md +71 -0
- package/.claude/commands/tlc/review.md +17 -4
- package/.claude/commands/tlc/watchci.md +159 -0
- package/.claude/hooks/tlc-block-tools.sh +41 -0
- package/.claude/hooks/tlc-capture-exchange.sh +50 -0
- package/.claude/hooks/tlc-post-build.sh +38 -0
- package/.claude/hooks/tlc-post-push.sh +22 -0
- package/.claude/hooks/tlc-prompt-guard.sh +69 -0
- package/.claude/hooks/tlc-session-init.sh +123 -0
- package/CLAUDE.md +96 -201
- package/bin/install.js +171 -2
- package/bin/postinstall.js +45 -26
- package/dashboard-web/dist/assets/index-CdS5CHqu.css +1 -0
- package/dashboard-web/dist/assets/index-CwNPPVpg.js +483 -0
- package/dashboard-web/dist/assets/index-CwNPPVpg.js.map +1 -0
- package/dashboard-web/dist/index.html +2 -2
- package/docker-compose.dev.yml +18 -12
- package/package.json +3 -1
- package/server/index.js +240 -1
- package/server/lib/bug-writer.js +204 -0
- package/server/lib/bug-writer.test.js +279 -0
- package/server/lib/capture-bridge.js +242 -0
- package/server/lib/capture-bridge.test.js +363 -0
- package/server/lib/capture-guard.js +140 -0
- package/server/lib/capture-guard.test.js +182 -0
- package/server/lib/claude-cascade.js +247 -0
- package/server/lib/claude-cascade.test.js +245 -0
- package/server/lib/command-runner.js +159 -0
- package/server/lib/command-runner.test.js +92 -0
- package/server/lib/context-injection.js +121 -0
- package/server/lib/context-injection.test.js +340 -0
- package/server/lib/conversation-chunker.js +320 -0
- package/server/lib/conversation-chunker.test.js +573 -0
- package/server/lib/deploy/runners/dependency-runner.js +106 -0
- package/server/lib/deploy/runners/dependency-runner.test.js +148 -0
- package/server/lib/deploy/runners/secrets-runner.js +174 -0
- package/server/lib/deploy/runners/secrets-runner.test.js +127 -0
- package/server/lib/deploy/security-gates.js +11 -24
- package/server/lib/deploy/security-gates.test.js +9 -2
- package/server/lib/deploy-engine.js +182 -0
- package/server/lib/deploy-engine.test.js +147 -0
- package/server/lib/docker-api.js +137 -0
- package/server/lib/docker-api.test.js +202 -0
- package/server/lib/docker-client.js +297 -0
- package/server/lib/docker-client.test.js +308 -0
- package/server/lib/embedding-client.js +160 -0
- package/server/lib/embedding-client.test.js +243 -0
- package/server/lib/global-config.js +198 -0
- package/server/lib/global-config.test.js +288 -0
- package/server/lib/inherited-search.js +184 -0
- package/server/lib/inherited-search.test.js +343 -0
- package/server/lib/input-sanitizer.js +86 -0
- package/server/lib/input-sanitizer.test.js +117 -0
- package/server/lib/launchd-agent.js +225 -0
- package/server/lib/launchd-agent.test.js +185 -0
- package/server/lib/memory-api.js +182 -0
- package/server/lib/memory-api.test.js +320 -0
- package/server/lib/memory-bridge-e2e.test.js +160 -0
- package/server/lib/memory-committer.js +18 -4
- package/server/lib/memory-committer.test.js +21 -0
- package/server/lib/memory-hooks-capture.test.js +415 -0
- package/server/lib/memory-hooks-integration.test.js +98 -0
- package/server/lib/memory-hooks.js +139 -0
- package/server/lib/memory-inheritance.js +179 -0
- package/server/lib/memory-inheritance.test.js +360 -0
- package/server/lib/memory-store-adapter.js +105 -0
- package/server/lib/memory-store-adapter.test.js +141 -0
- package/server/lib/memory-wiring-e2e.test.js +93 -0
- package/server/lib/nginx-config.js +114 -0
- package/server/lib/nginx-config.test.js +82 -0
- package/server/lib/ollama-health.js +91 -0
- package/server/lib/ollama-health.test.js +74 -0
- package/server/lib/plan-writer.js +196 -0
- package/server/lib/plan-writer.test.js +298 -0
- package/server/lib/port-guard.js +44 -0
- package/server/lib/port-guard.test.js +65 -0
- package/server/lib/project-scanner.js +302 -0
- package/server/lib/project-scanner.test.js +541 -0
- package/server/lib/project-status.js +302 -0
- package/server/lib/project-status.test.js +470 -0
- package/server/lib/projects-registry.js +237 -0
- package/server/lib/projects-registry.test.js +275 -0
- package/server/lib/recall-command.js +207 -0
- package/server/lib/recall-command.test.js +306 -0
- package/server/lib/remember-command.js +98 -0
- package/server/lib/remember-command.test.js +288 -0
- package/server/lib/rich-capture.js +221 -0
- package/server/lib/rich-capture.test.js +312 -0
- package/server/lib/roadmap-api.js +200 -0
- package/server/lib/roadmap-api.test.js +318 -0
- package/server/lib/security/crypto-utils.test.js +2 -2
- package/server/lib/semantic-recall.js +242 -0
- package/server/lib/semantic-recall.test.js +463 -0
- package/server/lib/setup-generator.js +315 -0
- package/server/lib/setup-generator.test.js +303 -0
- package/server/lib/ssh-client.js +184 -0
- package/server/lib/ssh-client.test.js +127 -0
- package/server/lib/test-inventory.js +112 -0
- package/server/lib/test-inventory.test.js +360 -0
- package/server/lib/vector-indexer.js +246 -0
- package/server/lib/vector-indexer.test.js +459 -0
- package/server/lib/vector-store.js +260 -0
- package/server/lib/vector-store.test.js +706 -0
- package/server/lib/vps-api.js +184 -0
- package/server/lib/vps-api.test.js +208 -0
- package/server/lib/vps-bootstrap.js +124 -0
- package/server/lib/vps-bootstrap.test.js +79 -0
- package/server/lib/vps-monitor.js +126 -0
- package/server/lib/vps-monitor.test.js +98 -0
- package/server/lib/workspace-api.js +992 -0
- package/server/lib/workspace-api.test.js +1217 -0
- package/server/lib/workspace-bootstrap.js +164 -0
- package/server/lib/workspace-bootstrap.test.js +503 -0
- package/server/lib/workspace-context.js +129 -0
- package/server/lib/workspace-context.test.js +214 -0
- package/server/lib/workspace-detector.js +162 -0
- package/server/lib/workspace-detector.test.js +193 -0
- package/server/lib/workspace-init.js +307 -0
- package/server/lib/workspace-init.test.js +244 -0
- package/server/lib/workspace-snapshot.js +236 -0
- package/server/lib/workspace-snapshot.test.js +444 -0
- package/server/lib/workspace-watcher.js +162 -0
- package/server/lib/workspace-watcher.test.js +257 -0
- package/server/package-lock.json +1306 -17
- package/server/package.json +7 -0
- package/dashboard-web/dist/assets/index-B1I_joSL.js +0 -393
- package/dashboard-web/dist/assets/index-B1I_joSL.js.map +0 -1
- package/dashboard-web/dist/assets/index-Trhg1C1Y.css +0 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# /tlc:guard - TLC Process Guard
|
|
2
|
+
|
|
3
|
+
Validates that TLC planning and building were done properly. Catches process shortcuts before they become problems.
|
|
4
|
+
|
|
5
|
+
## What This Does
|
|
6
|
+
|
|
7
|
+
1. **Checks planning quality** — phase files exist, tasks are properly broken down, acceptance criteria present
|
|
8
|
+
2. **Checks build quality** — test-first was followed, coverage exists, no implementation without tests
|
|
9
|
+
3. **Reports violations** with specific fixes
|
|
10
|
+
4. **Optionally auto-fixes** structural issues
|
|
11
|
+
|
|
12
|
+
Run this before marking anything as "done."
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/tlc:guard
|
|
18
|
+
/tlc:guard plan 42 # check planning for phase 42
|
|
19
|
+
/tlc:guard build 42 # check build compliance for phase 42
|
|
20
|
+
/tlc:guard --fix # auto-fix what can be fixed
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Planning Guard
|
|
24
|
+
|
|
25
|
+
### What Gets Checked
|
|
26
|
+
|
|
27
|
+
Read `.planning/phases/{N}-PLAN.md` and validate:
|
|
28
|
+
|
|
29
|
+
**Structure (required):**
|
|
30
|
+
- [ ] Phase file exists at `.planning/phases/{N}-PLAN.md`
|
|
31
|
+
- [ ] Has a clear title with phase number
|
|
32
|
+
- [ ] Has a goal/objective section
|
|
33
|
+
- [ ] Has task breakdown (not just a wall of text)
|
|
34
|
+
|
|
35
|
+
**Task Quality (required):**
|
|
36
|
+
- [ ] Each task has a checkbox marker (`[ ]`, `[>@user]`, or `[x@user]`)
|
|
37
|
+
- [ ] Tasks are small enough to implement in one sitting (no mega-tasks)
|
|
38
|
+
- [ ] Tasks have acceptance criteria or clear "done" definition
|
|
39
|
+
- [ ] Tasks are ordered by dependency (prerequisites first)
|
|
40
|
+
|
|
41
|
+
**Completeness (recommended):**
|
|
42
|
+
- [ ] Technical approach is specified (not just "build X")
|
|
43
|
+
- [ ] File paths are mentioned where relevant
|
|
44
|
+
- [ ] Edge cases are considered
|
|
45
|
+
- [ ] No vague tasks like "improve performance" or "fix bugs" (too broad)
|
|
46
|
+
|
|
47
|
+
### Planning Violations
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/tlc:guard plan 42
|
|
51
|
+
|
|
52
|
+
Checking phase 42 plan...
|
|
53
|
+
|
|
54
|
+
❌ VIOLATIONS:
|
|
55
|
+
1. Task 3 has no acceptance criteria: "Implement auth module"
|
|
56
|
+
→ Add: what endpoints, what auth method, what response format?
|
|
57
|
+
|
|
58
|
+
2. Task 5 is too broad: "Handle all error cases"
|
|
59
|
+
→ Break into specific error scenarios
|
|
60
|
+
|
|
61
|
+
3. No dependency ordering — Task 4 depends on Task 2 but comes first
|
|
62
|
+
|
|
63
|
+
⚠️ WARNINGS:
|
|
64
|
+
1. No file paths mentioned — harder to review later
|
|
65
|
+
2. Task 1 and Task 6 look like they could be one task
|
|
66
|
+
|
|
67
|
+
Fix these before running /tlc:build.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Build Guard
|
|
71
|
+
|
|
72
|
+
### What Gets Checked
|
|
73
|
+
|
|
74
|
+
For a phase that's been (partially) built, verify TLC compliance:
|
|
75
|
+
|
|
76
|
+
**Test-First (critical):**
|
|
77
|
+
- [ ] Test files exist for all implemented source files
|
|
78
|
+
- [ ] Git log shows test commits BEFORE implementation commits (check timestamps and diffs)
|
|
79
|
+
- [ ] No source file was added without a corresponding test file in the same or earlier commit
|
|
80
|
+
|
|
81
|
+
**Coverage:**
|
|
82
|
+
- [ ] Run tests and check they all pass
|
|
83
|
+
- [ ] Coverage meets threshold from `.tlc.json` (default 80%)
|
|
84
|
+
- [ ] New code specifically has coverage (not just overall project average)
|
|
85
|
+
|
|
86
|
+
**Code Quality:**
|
|
87
|
+
- [ ] No `console.log` debugging left in production code
|
|
88
|
+
- [ ] No `TODO` or `FIXME` comments that should be tracked as tasks
|
|
89
|
+
- [ ] No hardcoded secrets, URLs, or credentials (check for patterns)
|
|
90
|
+
- [ ] No skipped tests (`.skip`, `xit`, `xdescribe`)
|
|
91
|
+
|
|
92
|
+
**Process:**
|
|
93
|
+
- [ ] Phase plan exists and tasks are checked off
|
|
94
|
+
- [ ] Implementation matches what was planned (no scope creep)
|
|
95
|
+
- [ ] Commits reference the phase/task they belong to
|
|
96
|
+
|
|
97
|
+
### Build Violations
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
/tlc:guard build 42
|
|
101
|
+
|
|
102
|
+
Checking phase 42 build compliance...
|
|
103
|
+
|
|
104
|
+
❌ VIOLATIONS:
|
|
105
|
+
1. TEST-FIRST BREACH: server/lib/auth/auth.service.js was committed
|
|
106
|
+
BEFORE server/lib/auth/auth.test.js
|
|
107
|
+
→ Commits: abc123 (service) came before def456 (test)
|
|
108
|
+
|
|
109
|
+
2. MISSING TEST: server/lib/auth/token-utils.js has no test file
|
|
110
|
+
→ Expected: server/lib/auth/token-utils.test.js
|
|
111
|
+
|
|
112
|
+
3. SKIPPED TEST: server/lib/auth/auth.test.js line 45 — test.skip()
|
|
113
|
+
→ Either fix the test or remove it
|
|
114
|
+
|
|
115
|
+
⚠️ WARNINGS:
|
|
116
|
+
1. console.log found in server/lib/auth/auth.service.js:23
|
|
117
|
+
2. TODO comment in server/lib/auth/auth.service.js:67
|
|
118
|
+
3. Coverage for new files: 72% (below 80% threshold)
|
|
119
|
+
|
|
120
|
+
Run /tlc:autofix to resolve skipped tests.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Auto-Fix Mode
|
|
124
|
+
|
|
125
|
+
With `--fix`, the guard can resolve some issues automatically:
|
|
126
|
+
|
|
127
|
+
**Can auto-fix:**
|
|
128
|
+
- Remove `console.log` statements (non-intentional ones)
|
|
129
|
+
- Convert `TODO`/`FIXME` to tasks in the phase plan
|
|
130
|
+
- Create skeleton test files for untested source files
|
|
131
|
+
- Fix task checkbox formatting in plan files
|
|
132
|
+
|
|
133
|
+
**Cannot auto-fix (reports only):**
|
|
134
|
+
- Test-first order violations (that ship has sailed)
|
|
135
|
+
- Missing acceptance criteria (needs human input)
|
|
136
|
+
- Scope creep (needs human judgment)
|
|
137
|
+
- Low coverage (needs more test cases written)
|
|
138
|
+
|
|
139
|
+
## Combined Guard
|
|
140
|
+
|
|
141
|
+
Running `/tlc:guard` without arguments checks everything for the current/latest phase:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
/tlc:guard
|
|
145
|
+
|
|
146
|
+
Detecting current phase... Phase 42: Auth Module
|
|
147
|
+
|
|
148
|
+
=== PLANNING GUARD ===
|
|
149
|
+
✅ Plan structure: OK
|
|
150
|
+
✅ Task breakdown: 6 tasks, all with criteria
|
|
151
|
+
⚠️ Task 5 seems broad — consider splitting
|
|
152
|
+
|
|
153
|
+
=== BUILD GUARD ===
|
|
154
|
+
✅ Test-first: All tests committed before implementation
|
|
155
|
+
✅ Coverage: 87% (above 80% threshold)
|
|
156
|
+
❌ 1 skipped test found
|
|
157
|
+
⚠️ 2 console.log statements
|
|
158
|
+
|
|
159
|
+
Overall: 1 violation, 3 warnings
|
|
160
|
+
|
|
161
|
+
Run /tlc:guard --fix to auto-resolve what's possible.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Integration with Other Commands
|
|
165
|
+
|
|
166
|
+
This guard should be consulted:
|
|
167
|
+
- **Before `/tlc:verify`** — don't verify code that wasn't built properly
|
|
168
|
+
- **Before `/tlc:complete`** — don't complete a milestone with process violations
|
|
169
|
+
- **After `/tlc:build`** — as a final check before moving on
|
|
170
|
+
- **After `/tlc:plan`** — validate the plan before building
|
|
171
|
+
|
|
172
|
+
## Example Full Flow
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
/tlc:plan 42 # Create the plan
|
|
176
|
+
/tlc:guard plan 42 # Validate the plan ← catches bad plans early
|
|
177
|
+
/tlc:build 42 # Build test-first
|
|
178
|
+
/tlc:guard build 42 # Validate the build ← catches process shortcuts
|
|
179
|
+
/tlc:e2e-verify # Visual verification
|
|
180
|
+
/tlc:watchci # CI verification
|
|
181
|
+
/tlc:verify 42 # Human acceptance
|
|
182
|
+
/tlc:complete # Mark done
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## When to Use
|
|
186
|
+
|
|
187
|
+
- After planning, before building
|
|
188
|
+
- After building, before verification
|
|
189
|
+
- When you suspect process was skipped
|
|
190
|
+
- As a pre-push check
|
|
191
|
+
- When onboarding — validates that TLC discipline is being followed
|
|
@@ -57,6 +57,38 @@ Launches the visual dashboard. Detects where you are, shows what's next.
|
|
|
57
57
|
| `/tlc:release` | Release a claimed task |
|
|
58
58
|
| `/tlc:who` | Show who's working on what |
|
|
59
59
|
|
|
60
|
+
### Plugins (auto-run via hooks)
|
|
61
|
+
|
|
62
|
+
**After `/tlc:build`** (code written):
|
|
63
|
+
guard → preflight → review (Claude + Codex) → if APPROVED → push + PR
|
|
64
|
+
|
|
65
|
+
**After `git push`** (CI triggered):
|
|
66
|
+
watchci (monitor GH Actions) → if green → e2e-verify (screenshots + logs)
|
|
67
|
+
|
|
68
|
+
| Command | What It Does |
|
|
69
|
+
|---------|--------------|
|
|
70
|
+
| `/tlc:guard` | Validates TLC process: plan quality, test-first compliance, coverage thresholds |
|
|
71
|
+
| `/tlc:preflight` | Completeness check — all references, registries, configs, distribution paths |
|
|
72
|
+
| `/tlc:review` | Multi-LLM review gate — Claude + Codex must both APPROVE before push |
|
|
73
|
+
| `/tlc:watchci` | After push: monitors GH Actions, reads failure logs, fixes until green |
|
|
74
|
+
| `/tlc:e2e-verify` | After CI green: Playwright screenshots, visual inspection, log checking |
|
|
75
|
+
|
|
76
|
+
These fire automatically via PostToolUse hooks. You can also invoke them manually.
|
|
77
|
+
|
|
78
|
+
### Code Quality
|
|
79
|
+
|
|
80
|
+
| Command | What It Does |
|
|
81
|
+
|---------|--------------|
|
|
82
|
+
| `/tlc:review` | Review current branch |
|
|
83
|
+
| `/tlc:review-pr` | Review a pull request |
|
|
84
|
+
| `/tlc:refactor` | Step-by-step standards refactoring |
|
|
85
|
+
| `/tlc:cleanup` | Automatic standards cleanup |
|
|
86
|
+
| `/tlc:audit` | Check coding standards compliance |
|
|
87
|
+
| `/tlc:security` | Security audit |
|
|
88
|
+
| `/tlc:outdated` | Check outdated dependencies |
|
|
89
|
+
| `/tlc:edge-cases` | Generate edge case tests |
|
|
90
|
+
| `/tlc:quality` | Test quality scoring |
|
|
91
|
+
|
|
60
92
|
### Enterprise (v1.4+)
|
|
61
93
|
|
|
62
94
|
| Command | What It Does |
|
|
@@ -262,9 +262,21 @@ All implementation follows **Red → Green → Refactor**:
|
|
|
262
262
|
3. **Refactor**: Clean up while keeping tests green
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
### 9b. Create Claude Settings
|
|
265
|
+
### 9b. Create Claude Settings with Permissions AND Hooks (Automatic)
|
|
266
266
|
|
|
267
|
-
**Always create `.claude/settings.json` during init.** This is not optional — TLC requires
|
|
267
|
+
**Always create `.claude/settings.json` during init.** This is not optional — TLC requires permissions for uninterrupted work AND hooks for the plugin system (enforcement, auto-verification, memory capture).
|
|
268
|
+
|
|
269
|
+
**Also create `.claude/hooks/` directory** and copy all hook scripts from the TLC package. The hooks power the plugin system — without them, TLC is commands-only with no automation.
|
|
270
|
+
|
|
271
|
+
Create `.claude/hooks/` with these scripts (copy from the installed TLC package at `~/.claude/hooks/` or from the npm package):
|
|
272
|
+
- `tlc-block-tools.sh` — Blocks non-TLC planning tools (EnterPlanMode, TaskCreate, etc.)
|
|
273
|
+
- `tlc-prompt-guard.sh` — Smart intent detection: parses user message for plan/build/fix/deploy intent and routes to the correct TLC command
|
|
274
|
+
- `tlc-session-init.sh` — Initializes TLC state and ensures server is running
|
|
275
|
+
- `tlc-post-push.sh` — Auto-triggers CI monitoring after `git push`
|
|
276
|
+
- `tlc-post-build.sh` — Auto-triggers guard + e2e verification after build/plan
|
|
277
|
+
- `tlc-capture-exchange.sh` — Captures conversations to team memory
|
|
278
|
+
|
|
279
|
+
Make all hook scripts executable: `chmod +x .claude/hooks/*.sh`
|
|
268
280
|
|
|
269
281
|
Create `.claude/settings.json`:
|
|
270
282
|
|
|
@@ -272,46 +284,70 @@ Create `.claude/settings.json`:
|
|
|
272
284
|
{
|
|
273
285
|
"permissions": {
|
|
274
286
|
"allow": [
|
|
275
|
-
"Bash(npm *)",
|
|
276
|
-
"Bash(
|
|
277
|
-
"Bash(
|
|
278
|
-
"Bash(
|
|
279
|
-
"Bash(
|
|
280
|
-
"Bash(
|
|
281
|
-
"Bash(
|
|
282
|
-
"Bash(
|
|
283
|
-
"Bash(
|
|
284
|
-
"Bash(wget *)",
|
|
285
|
-
"Bash(docker *)",
|
|
286
|
-
"Bash(docker-compose *)",
|
|
287
|
-
"Bash(pytest*)",
|
|
288
|
-
"Bash(python *)",
|
|
289
|
-
"Bash(pip *)",
|
|
290
|
-
"Bash(go *)",
|
|
291
|
-
"Bash(cargo *)",
|
|
292
|
-
"Bash(make *)",
|
|
293
|
-
"Bash(cat *)",
|
|
294
|
-
"Bash(ls *)",
|
|
295
|
-
"Bash(pwd*)",
|
|
296
|
-
"Bash(cd *)",
|
|
297
|
-
"Bash(mkdir *)",
|
|
298
|
-
"Bash(cp *)",
|
|
299
|
-
"Bash(mv *)",
|
|
300
|
-
"Bash(which *)",
|
|
301
|
-
"Bash(echo *)",
|
|
302
|
-
"Bash(jq *)",
|
|
303
|
-
"Bash(wc *)",
|
|
304
|
-
"Bash(head *)",
|
|
305
|
-
"Bash(tail *)",
|
|
306
|
-
"Bash(sort *)",
|
|
307
|
-
"Bash(uniq *)",
|
|
308
|
-
"Bash(xargs *)"
|
|
287
|
+
"Bash(npm *)", "Bash(npx *)", "Bash(node *)", "Bash(git *)",
|
|
288
|
+
"Bash(gh *)", "Bash(ssh *)", "Bash(scp *)", "Bash(rsync *)",
|
|
289
|
+
"Bash(curl *)", "Bash(wget *)", "Bash(docker *)", "Bash(docker-compose *)",
|
|
290
|
+
"Bash(pytest*)", "Bash(python *)", "Bash(pip *)", "Bash(go *)",
|
|
291
|
+
"Bash(cargo *)", "Bash(make *)", "Bash(cat *)", "Bash(ls *)",
|
|
292
|
+
"Bash(pwd*)", "Bash(cd *)", "Bash(mkdir *)", "Bash(cp *)",
|
|
293
|
+
"Bash(mv *)", "Bash(which *)", "Bash(echo *)", "Bash(jq *)",
|
|
294
|
+
"Bash(wc *)", "Bash(head *)", "Bash(tail *)", "Bash(sort *)",
|
|
295
|
+
"Bash(uniq *)", "Bash(xargs *)"
|
|
309
296
|
]
|
|
297
|
+
},
|
|
298
|
+
"hooks": {
|
|
299
|
+
"PreToolUse": [{
|
|
300
|
+
"matcher": "EnterPlanMode|TaskCreate|TaskUpdate|TaskList|TaskGet|ExitPlanMode",
|
|
301
|
+
"hooks": [{
|
|
302
|
+
"type": "command",
|
|
303
|
+
"command": "bash $CLAUDE_PROJECT_DIR/.claude/hooks/tlc-block-tools.sh",
|
|
304
|
+
"timeout": 5
|
|
305
|
+
}]
|
|
306
|
+
}],
|
|
307
|
+
"UserPromptSubmit": [{
|
|
308
|
+
"hooks": [{
|
|
309
|
+
"type": "command",
|
|
310
|
+
"command": "bash $CLAUDE_PROJECT_DIR/.claude/hooks/tlc-prompt-guard.sh",
|
|
311
|
+
"timeout": 5
|
|
312
|
+
}]
|
|
313
|
+
}],
|
|
314
|
+
"SessionStart": [{
|
|
315
|
+
"hooks": [{
|
|
316
|
+
"type": "command",
|
|
317
|
+
"command": "bash $CLAUDE_PROJECT_DIR/.claude/hooks/tlc-session-init.sh",
|
|
318
|
+
"timeout": 5
|
|
319
|
+
}]
|
|
320
|
+
}],
|
|
321
|
+
"PostToolUse": [
|
|
322
|
+
{
|
|
323
|
+
"matcher": "Bash",
|
|
324
|
+
"hooks": [{
|
|
325
|
+
"type": "command",
|
|
326
|
+
"command": "bash $CLAUDE_PROJECT_DIR/.claude/hooks/tlc-post-push.sh",
|
|
327
|
+
"timeout": 5
|
|
328
|
+
}]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"matcher": "Skill",
|
|
332
|
+
"hooks": [{
|
|
333
|
+
"type": "command",
|
|
334
|
+
"command": "bash $CLAUDE_PROJECT_DIR/.claude/hooks/tlc-post-build.sh",
|
|
335
|
+
"timeout": 5
|
|
336
|
+
}]
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"Stop": [{
|
|
340
|
+
"hooks": [{
|
|
341
|
+
"type": "command",
|
|
342
|
+
"command": "bash \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/tlc-capture-exchange.sh",
|
|
343
|
+
"timeout": 30
|
|
344
|
+
}]
|
|
345
|
+
}]
|
|
310
346
|
}
|
|
311
347
|
}
|
|
312
348
|
```
|
|
313
349
|
|
|
314
|
-
If `.claude/settings.json` already exists, merge
|
|
350
|
+
If `.claude/settings.json` already exists, merge: preserve existing permissions (union), add hooks section if missing (don't overwrite existing hooks).
|
|
315
351
|
|
|
316
352
|
### 10. Create or Update PROJECT.md
|
|
317
353
|
|
|
@@ -28,20 +28,35 @@ Interactive setup to configure providers in `.tlc.json`:
|
|
|
28
28
|
|
|
29
29
|
### /tlc:llm status
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Read from **`.tlc/.router-state.json`** (persistent state) and `.tlc.json` (config):
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
+
LLM Router Status
|
|
35
|
+
══════════════════════════════════════════════
|
|
36
|
+
|
|
37
|
+
State: .tlc/.router-state.json
|
|
38
|
+
Probed: 2026-03-20T02:15:00Z (12 min ago)
|
|
39
|
+
TTL: 3600s (fresh)
|
|
40
|
+
|
|
34
41
|
Providers:
|
|
35
42
|
claude ✓ /usr/local/bin/claude [review, code-gen, refactor]
|
|
36
43
|
codex ✓ /usr/local/bin/codex [review, code-gen]
|
|
37
44
|
gemini ✗ not found [design, vision]
|
|
38
45
|
|
|
39
46
|
Capabilities:
|
|
40
|
-
review → claude, codex (fallback: claude)
|
|
41
|
-
code-gen → claude
|
|
42
|
-
vision → gemini (unavailable)
|
|
47
|
+
review → claude, codex (fallback: claude) 2/2 available
|
|
48
|
+
code-gen → claude 1/1 available
|
|
49
|
+
vision → gemini (unavailable) 0/1 available
|
|
50
|
+
|
|
51
|
+
Pipeline Integration:
|
|
52
|
+
Post-build review: claude + codex (consensus required)
|
|
53
|
+
Post-push e2e: claude (in-session)
|
|
43
54
|
```
|
|
44
55
|
|
|
56
|
+
The state file is written by the `SessionStart` hook and re-probed every hour. All skills read from this file — no ad-hoc `which` calls.
|
|
57
|
+
|
|
58
|
+
**Force re-probe:** `/tlc:llm probe` (deletes state file, next skill invocation re-probes)
|
|
59
|
+
|
|
45
60
|
### /tlc:llm models
|
|
46
61
|
|
|
47
62
|
List models available from each provider.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# /tlc:preflight - Completeness Check Before Done
|
|
2
|
+
|
|
3
|
+
Never declare a task complete without running this. Catches gaps, loose ends, and half-solutions before they ship.
|
|
4
|
+
|
|
5
|
+
## Philosophy
|
|
6
|
+
|
|
7
|
+
**Assume nothing is complete.** Every task has edges you didn't think about. This skill forces you to actively look for what's missing rather than confirming what's present.
|
|
8
|
+
|
|
9
|
+
## When This Runs
|
|
10
|
+
|
|
11
|
+
This is a **plugin** — it fires automatically via PostToolUse hook whenever Claude is about to declare work "done." You don't invoke it manually.
|
|
12
|
+
|
|
13
|
+
It also runs:
|
|
14
|
+
- After `/tlc:build` (via guard + preflight chain)
|
|
15
|
+
- After any multi-file change
|
|
16
|
+
- Before recommending a commit or push
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### Step 1: Inventory What Was Changed
|
|
21
|
+
|
|
22
|
+
List every file that was created, modified, or deleted in this session. For each one:
|
|
23
|
+
- What was the intent?
|
|
24
|
+
- Was the change completed or left partial?
|
|
25
|
+
|
|
26
|
+
### Step 2: Trace All References
|
|
27
|
+
|
|
28
|
+
For every file changed, check:
|
|
29
|
+
- **Is it registered/imported where needed?** (e.g., new module added to an index, new command added to a commands array, new route added to a router)
|
|
30
|
+
- **Does anything else reference it?** (e.g., config files, package.json, install scripts, documentation)
|
|
31
|
+
- **Are there parallel systems that need the same update?** (e.g., install.js AND postinstall.js, package.json `files` AND `bin`, CLAUDE.md AND help.md)
|
|
32
|
+
|
|
33
|
+
This is the #1 source of half-solutions: changing the thing but not updating everything that points to the thing.
|
|
34
|
+
|
|
35
|
+
### Step 3: Check Consistency Across Layers
|
|
36
|
+
|
|
37
|
+
For each change, verify consistency across ALL layers:
|
|
38
|
+
|
|
39
|
+
| Layer | Check |
|
|
40
|
+
|-------|-------|
|
|
41
|
+
| **Source files** | Does the code do what was intended? |
|
|
42
|
+
| **Tests** | Do tests exist and pass? |
|
|
43
|
+
| **Config** | Are config files updated (package.json, .tlc.json, settings.json)? |
|
|
44
|
+
| **Distribution** | Will this ship to end users? (files array, install scripts, postinstall) |
|
|
45
|
+
| **Documentation** | Is the change reflected in docs, help text, command tables? |
|
|
46
|
+
| **Integration** | Do other systems that depend on this still work? |
|
|
47
|
+
|
|
48
|
+
### Step 4: Ask the Hard Questions
|
|
49
|
+
|
|
50
|
+
Before declaring done, explicitly answer each:
|
|
51
|
+
|
|
52
|
+
1. **"If someone installs this fresh right now, will it work?"**
|
|
53
|
+
- Not "does it work on my machine" — does it work from a clean install?
|
|
54
|
+
|
|
55
|
+
2. **"What did I assume exists that might not?"**
|
|
56
|
+
- Files, directories, env vars, running services, permissions
|
|
57
|
+
|
|
58
|
+
3. **"What's the blast radius?"**
|
|
59
|
+
- What else touches the same files/systems I changed?
|
|
60
|
+
- Did I update ALL of those touchpoints?
|
|
61
|
+
|
|
62
|
+
4. **"Is there a parallel path I forgot?"**
|
|
63
|
+
- Two install scripts? Two config files? Multiple places the same list appears?
|
|
64
|
+
|
|
65
|
+
5. **"What would a user try that I didn't test?"**
|
|
66
|
+
- Edge cases in usage, not just happy path
|
|
67
|
+
|
|
68
|
+
### Step 5: Report
|
|
69
|
+
|
|
70
|
+
**If gaps found:**
|
|
71
|
+
```
|
|
72
|
+
PREFLIGHT CHECK — GAPS FOUND
|
|
73
|
+
|
|
74
|
+
Changes made: 3 files created, 2 files modified
|
|
75
|
+
|
|
76
|
+
Gaps:
|
|
77
|
+
1. Created new-feature.md but not added to COMMANDS array in install.js
|
|
78
|
+
2. Modified settings.json but init.md template not updated to match
|
|
79
|
+
3. No test file for new utility function
|
|
80
|
+
|
|
81
|
+
Fix these before declaring done.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**If clean:**
|
|
85
|
+
```
|
|
86
|
+
PREFLIGHT CHECK — CLEAR
|
|
87
|
+
|
|
88
|
+
Changes made: 3 files created, 2 files modified
|
|
89
|
+
All references updated: ✅
|
|
90
|
+
Distribution verified: ✅
|
|
91
|
+
Tests exist: ✅
|
|
92
|
+
Config consistent: ✅
|
|
93
|
+
|
|
94
|
+
Task is complete.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Common Gap Patterns
|
|
98
|
+
|
|
99
|
+
These are the most frequent gaps this skill catches:
|
|
100
|
+
|
|
101
|
+
| Pattern | Example |
|
|
102
|
+
|---------|---------|
|
|
103
|
+
| **Registry miss** | New file created but not added to install array, export list, or index |
|
|
104
|
+
| **Parallel system miss** | Updated install.js but not postinstall.js |
|
|
105
|
+
| **Config drift** | Changed settings.json but init.md still generates the old version |
|
|
106
|
+
| **Distribution miss** | File exists in repo but won't ship (not in package.json files) |
|
|
107
|
+
| **Doc drift** | New command added but not in CLAUDE.md dispatch table or help.md |
|
|
108
|
+
| **Test miss** | New code without corresponding test |
|
|
109
|
+
| **Cross-reference miss** | Renamed something but didn't grep for all references |
|
|
110
|
+
|
|
111
|
+
## Example
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
PREFLIGHT CHECK — GAPS FOUND
|
|
115
|
+
|
|
116
|
+
Session changes:
|
|
117
|
+
+ .claude/commands/tlc/watchci.md (new skill)
|
|
118
|
+
+ .claude/commands/tlc/e2e-verify.md (new skill)
|
|
119
|
+
+ .claude/commands/tlc/guard.md (new skill)
|
|
120
|
+
+ .claude/hooks/tlc-post-push.sh (new hook)
|
|
121
|
+
+ .claude/hooks/tlc-post-build.sh (new hook)
|
|
122
|
+
~ .claude/settings.json (added PostToolUse hooks)
|
|
123
|
+
~ CLAUDE.md (added dispatch entries)
|
|
124
|
+
|
|
125
|
+
Gaps:
|
|
126
|
+
❌ watchci.md, e2e-verify.md, guard.md not in COMMANDS array (bin/install.js)
|
|
127
|
+
❌ .claude/hooks/ not in package.json files array — won't ship
|
|
128
|
+
❌ postinstall.js doesn't copy hooks — fresh install broken
|
|
129
|
+
❌ init.md settings template doesn't include new hooks
|
|
130
|
+
❌ help.md doesn't list new commands
|
|
131
|
+
❌ bootstrap.md was already missing from COMMANDS array (pre-existing gap)
|
|
132
|
+
|
|
133
|
+
6 gaps found. Fix before declaring done.
|
|
134
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# /tlc:recall - Semantic Memory Search
|
|
2
|
+
|
|
3
|
+
Search your project's memory by meaning. "What did we decide about X?"
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/tlc:recall <query>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What This Does
|
|
12
|
+
|
|
13
|
+
1. Searches the vector memory store using semantic similarity
|
|
14
|
+
2. Ranks results by: similarity (50%) + recency (25%) + project relevance (25%)
|
|
15
|
+
3. Returns top-5 results with scores, types, and excerpts
|
|
16
|
+
4. Permanent memories get a 1.2x boost in scoring
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
/tlc:recall database architecture
|
|
22
|
+
/tlc:recall --scope workspace authentication approach
|
|
23
|
+
/tlc:recall --type decision deployment strategy
|
|
24
|
+
/tlc:recall --limit 10 API design
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Flag | Values | Default | Description |
|
|
28
|
+
|------|--------|---------|-------------|
|
|
29
|
+
| `--scope` | `project`, `workspace`, `global` | `project` | Search scope (auto-widens if few results) |
|
|
30
|
+
| `--type` | `decision`, `gotcha`, `conversation`, `all` | `all` | Filter by memory type |
|
|
31
|
+
| `--limit` | 1-20 | 5 | Maximum results |
|
|
32
|
+
|
|
33
|
+
## Process
|
|
34
|
+
|
|
35
|
+
### Step 1: Parse Query
|
|
36
|
+
|
|
37
|
+
Extract the search query and any flags from the arguments.
|
|
38
|
+
|
|
39
|
+
### Step 2: Semantic Search
|
|
40
|
+
|
|
41
|
+
1. Generate embedding for the query
|
|
42
|
+
2. Search vector store for nearest neighbors
|
|
43
|
+
3. Score results: `similarity * 0.5 + recency * 0.25 + projectRelevance * 0.25`
|
|
44
|
+
4. Boost permanent memories by 1.2x
|
|
45
|
+
5. Apply scope, type, and limit filters
|
|
46
|
+
|
|
47
|
+
### Step 3: Display Results
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
## Memory Recall: "database architecture"
|
|
51
|
+
|
|
52
|
+
1. **Use SQLite for vector storage** (92% match) [decision]
|
|
53
|
+
Date: 2026-02-09
|
|
54
|
+
Zero infrastructure, single file, ships with TLC
|
|
55
|
+
Source: memory/decisions/2026-02-09-use-sqlite-for-vector-storage.md
|
|
56
|
+
|
|
57
|
+
2. **[PERMANENT] Always use WAL mode** (87% match) [gotcha]
|
|
58
|
+
Date: 2026-02-08
|
|
59
|
+
WAL mode required for concurrent reads during indexing
|
|
60
|
+
Source: memory/gotchas/2026-02-08-always-use-wal-mode.md
|
|
61
|
+
|
|
62
|
+
3. **Database migration strategy** (81% match) [conversation]
|
|
63
|
+
Date: 2026-02-07
|
|
64
|
+
Discussed migration approach, decided on schema-first
|
|
65
|
+
Source: memory/conversations/2026-02-07-database-migration.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 4: Fallback
|
|
69
|
+
|
|
70
|
+
If the vector store is unavailable (Ollama not running, no embeddings):
|
|
71
|
+
- Falls back to keyword-based text search
|
|
72
|
+
- Shows a notice that semantic search is unavailable
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
/tlc:recall what database should we use
|
|
78
|
+
/tlc:recall deployment strategy --scope global
|
|
79
|
+
/tlc:recall --type decision authentication
|
|
80
|
+
/tlc:recall testing approach --limit 10
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Graceful Degradation
|
|
84
|
+
|
|
85
|
+
- **No Ollama**: Falls back to text search with keyword matching
|
|
86
|
+
- **Empty store**: Shows "No memories indexed yet" with guidance to run `/tlc:remember`
|
|
87
|
+
- **No results**: Shows "No matching memories" with search suggestions
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# /tlc:remember - Permanent Memory Capture
|
|
2
|
+
|
|
3
|
+
Save important context permanently so it survives context compaction.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/tlc:remember <text>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or without arguments to capture recent exchanges:
|
|
12
|
+
```
|
|
13
|
+
/tlc:remember
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## What This Does
|
|
17
|
+
|
|
18
|
+
1. Captures the provided text (or recent conversation) as a **permanent memory**
|
|
19
|
+
2. Writes it to `memory/conversations/` with `[PERMANENT]` prefix and `permanent: true` frontmatter
|
|
20
|
+
3. Indexes it in the vector store for semantic recall
|
|
21
|
+
4. Permanent memories are **never pruned** and get a **1.2x boost** in recall scoring
|
|
22
|
+
|
|
23
|
+
## Process
|
|
24
|
+
|
|
25
|
+
### Step 1: Determine What to Remember
|
|
26
|
+
|
|
27
|
+
**With text argument:**
|
|
28
|
+
- Use the provided text as the memory content
|
|
29
|
+
|
|
30
|
+
**Without arguments:**
|
|
31
|
+
- Capture the recent conversation exchanges from the current session
|
|
32
|
+
- Generate a summary from the exchanges
|
|
33
|
+
|
|
34
|
+
### Step 2: Write Permanent Memory
|
|
35
|
+
|
|
36
|
+
1. Create a conversation chunk with `permanent: true`
|
|
37
|
+
2. Title prefixed with `[PERMANENT]`
|
|
38
|
+
3. Write to `memory/conversations/YYYY-MM-DD-{slug}.md`
|
|
39
|
+
4. YAML frontmatter includes `permanent: true`
|
|
40
|
+
|
|
41
|
+
### Step 3: Index in Vector Store
|
|
42
|
+
|
|
43
|
+
1. Generate embedding for the memory content
|
|
44
|
+
2. Store in vector database with `permanent = 1` flag
|
|
45
|
+
3. This memory will be boosted 1.2x in future recall searches
|
|
46
|
+
|
|
47
|
+
### Step 4: Confirm
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Remembered permanently: {summary}
|
|
51
|
+
File: memory/conversations/2026-02-09-always-use-utc.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
/tlc:remember Always use UTC timestamps in the database, never local time
|
|
58
|
+
|
|
59
|
+
/tlc:remember The API rate limit is 100 requests per minute per user
|
|
60
|
+
|
|
61
|
+
/tlc:remember
|
|
62
|
+
(captures recent conversation context)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## When to Use
|
|
66
|
+
|
|
67
|
+
- **Architecture decisions** that should never be forgotten
|
|
68
|
+
- **Environment gotchas** that are hard to rediscover
|
|
69
|
+
- **Team conventions** that must be consistent
|
|
70
|
+
- **Critical constraints** from stakeholders
|
|
71
|
+
- Any knowledge you want to survive across sessions and context compaction
|