tlc-claude-code 2.4.8 → 2.4.9
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/init.md +37 -0
- package/package.json +1 -1
|
@@ -19,6 +19,42 @@ For brand new projects with no code, use `/tlc:new-project` instead.
|
|
|
19
19
|
|
|
20
20
|
## Process
|
|
21
21
|
|
|
22
|
+
### 0. Upgrade Check (runs first, always)
|
|
23
|
+
|
|
24
|
+
**Before anything else**, check if this is already a TLC project:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Check for existing TLC markers
|
|
28
|
+
if [ -f ".tlc.json" ] || [ -f "CLAUDE.md" ] || [ -d ".claude/hooks" ]; then
|
|
29
|
+
# This is an existing TLC project — run upgrade path
|
|
30
|
+
fi
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**If `.tlc.json` exists**, this is a **re-init / upgrade**. Do the following automatically:
|
|
34
|
+
|
|
35
|
+
1. **Compare hook versions**: Read the installed `tlc-claude-code` version (`npm ls -g tlc-claude-code --json 2>/dev/null`). Compare against the hooks currently in `.claude/hooks/`. If the package is newer, **re-copy all hooks** from the package to `.claude/hooks/`, overwriting stale copies.
|
|
36
|
+
|
|
37
|
+
2. **Update CLAUDE.md**: Re-generate the CLAUDE.md template from the latest init template. If the user has customized CLAUDE.md (check for a `<!-- TLC-MANAGED -->` marker at the top), replace only the TLC-managed sections. If no marker, append missing sections (like the memory routing rules) without overwriting user content.
|
|
38
|
+
|
|
39
|
+
3. **Update `.claude/settings.json`**: Merge any new hook entries (like the memory routing enforcement) into the existing settings. Don't remove user-added permissions or hooks.
|
|
40
|
+
|
|
41
|
+
4. **Report what changed**:
|
|
42
|
+
```
|
|
43
|
+
TLC Upgrade (v2.4.5 → v2.4.8)
|
|
44
|
+
───────────────────────────────
|
|
45
|
+
✓ Updated 6 hooks (memory routing, review loop)
|
|
46
|
+
✓ Updated CLAUDE.md (added memory routing rules)
|
|
47
|
+
✓ Updated settings.json (added new hook matchers)
|
|
48
|
+
○ .tlc.json unchanged
|
|
49
|
+
○ PROJECT.md unchanged
|
|
50
|
+
|
|
51
|
+
All up to date. Run /tlc:progress to continue.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
5. **Then stop** — do not run the full init flow. The project is already set up, we just needed to upgrade the TLC tooling.
|
|
55
|
+
|
|
56
|
+
**If `.tlc.json` does NOT exist**, continue with the full init flow below.
|
|
57
|
+
|
|
22
58
|
### 1. Scan for Existing Code
|
|
23
59
|
|
|
24
60
|
Check for source files:
|
|
@@ -223,6 +259,7 @@ const results = await injectStandards(projectPath);
|
|
|
223
259
|
Create `CLAUDE.md` to enforce TLC workflow over Claude's default behaviors:
|
|
224
260
|
|
|
225
261
|
```markdown
|
|
262
|
+
<!-- TLC-MANAGED: Do not remove this marker. TLC uses it to upgrade this file. -->
|
|
226
263
|
# CLAUDE.md - TLC Project Instructions
|
|
227
264
|
|
|
228
265
|
## Planning System: TLC
|