@a13xu/lucid 1.13.0 → 1.16.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/README.md +147 -21
- package/build/compression/semantic.d.ts +31 -0
- package/build/compression/semantic.js +196 -0
- package/build/config.d.ts +15 -0
- package/build/http/routes.d.ts +3 -0
- package/build/http/routes.js +56 -0
- package/build/http/server.d.ts +7 -0
- package/build/http/server.js +11 -0
- package/build/index.js +176 -0
- package/build/lucid-sync.d.ts +15 -0
- package/build/lucid-sync.js +72 -0
- package/build/retrieval/context.js +6 -0
- package/build/retrieval/qdrant.d.ts +1 -1
- package/build/retrieval/qdrant.js +11 -2
- package/build/tools/compress.d.ts +15 -0
- package/build/tools/compress.js +18 -0
- package/build/tools/init.js +16 -1
- package/build/tools/model-advisor.d.ts +9 -0
- package/build/tools/model-advisor.js +30 -0
- package/build/tools/smart-context.d.ts +16 -0
- package/build/tools/smart-context.js +54 -0
- package/build/tools/sync.js +8 -0
- package/package.json +64 -59
- package/skills/lucid-audit/SKILL.md +43 -23
- package/skills/lucid-context/SKILL.md +54 -20
- package/skills/lucid-plan/SKILL.md +25 -33
- package/skills/lucid-security/SKILL.md +22 -40
- package/skills/lucid-start/SKILL.md +70 -0
- package/skills/lucid-webdev/SKILL.md +31 -109
package/package.json
CHANGED
|
@@ -1,59 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@a13xu/lucid",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Token-efficient memory, code indexing, and validation for Claude Code agents — SQLite + FTS5, TF-IDF + Qdrant retrieval, AST skeleton pruning, diff-aware context, Logic Guardian drift detection",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"lucid": "./build/index.js"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"build/**/*.
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"claude
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@a13xu/lucid",
|
|
3
|
+
"version": "1.16.1",
|
|
4
|
+
"description": "Token-efficient memory, code indexing, and validation for Claude Code agents — SQLite + FTS5, TF-IDF + Qdrant retrieval, AST skeleton pruning, diff-aware context, Logic Guardian drift detection",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"lucid": "./build/index.js",
|
|
8
|
+
"lucid-sync": "./build/lucid-sync.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"build/**/*.js",
|
|
12
|
+
"build/**/*.d.ts",
|
|
13
|
+
"skills/**/*.md",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"claude",
|
|
23
|
+
"claude-code",
|
|
24
|
+
"memory",
|
|
25
|
+
"sqlite",
|
|
26
|
+
"knowledge-graph",
|
|
27
|
+
"code-indexing",
|
|
28
|
+
"logic-guardian",
|
|
29
|
+
"drift-detection",
|
|
30
|
+
"tfidf",
|
|
31
|
+
"qdrant",
|
|
32
|
+
"token-optimization",
|
|
33
|
+
"context-pruning",
|
|
34
|
+
"ai",
|
|
35
|
+
"anthropic"
|
|
36
|
+
],
|
|
37
|
+
"author": "a13xu",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/a13xu/lucid.git"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/a13xu/lucid#readme",
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=18"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@huggingface/transformers": "^4.0.0",
|
|
52
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
|
+
"better-sqlite3": "^12.0.0",
|
|
54
|
+
"chokidar": "^4.0.3",
|
|
55
|
+
"express": "^5.2.1",
|
|
56
|
+
"zod": "^3.23.8"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/better-sqlite3": "^7.6.11",
|
|
60
|
+
"@types/express": "^5.0.6",
|
|
61
|
+
"@types/node": "^22.0.0",
|
|
62
|
+
"typescript": "^5.4.0"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,53 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lucid-audit
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "[file path or 'all']"
|
|
3
|
+
description: MANDATORY before marking any task done — runs Logic Guardian + Code Quality checks. HARD-GATE blocks completion without validation.
|
|
4
|
+
argument-hint: "[file path or 'all changed files']"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<HARD-GATE>
|
|
8
|
+
You are about to say "done", "fixed", "complete", or "implemented".
|
|
9
|
+
STOP. You have NOT verified the code yet.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Do NOT mark any task as done, do NOT commit, do NOT say the work is complete
|
|
12
|
+
until you have run BOTH validators below and fixed all 🔴 CRITICAL issues.
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
-
|
|
14
|
+
"It looks correct" is not verification. Run the tools.
|
|
15
|
+
</HARD-GATE>
|
|
16
|
+
|
|
17
|
+
## When to invoke
|
|
18
|
+
|
|
19
|
+
**INVOKE when:** about to say done/fixed/complete/implemented, before committing, before creating a PR
|
|
20
|
+
**DO NOT INVOKE for:** read-only tasks, pure research, config changes with no logic
|
|
13
21
|
|
|
14
22
|
## Steps
|
|
15
23
|
|
|
24
|
+
```dot
|
|
25
|
+
digraph lucid_audit {
|
|
26
|
+
"About to say done?" -> "validate_file(path)";
|
|
27
|
+
"validate_file(path)" -> "Critical issues?";
|
|
28
|
+
"Critical issues?" -> "Fix issues" [label="yes 🔴"];
|
|
29
|
+
"Fix issues" -> "validate_file(path)";
|
|
30
|
+
"Critical issues?" -> "check_code_quality(path)" [label="no ✓"];
|
|
31
|
+
"check_code_quality(path)" -> "HIGH issues?";
|
|
32
|
+
"HIGH issues?" -> "Fix if safe" [label="yes 🟠"];
|
|
33
|
+
"Fix if safe" -> "Mark done ✓";
|
|
34
|
+
"HIGH issues?" -> "Mark done ✓" [label="no ✓"];
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 0. Get model recommendation
|
|
39
|
+
```
|
|
40
|
+
suggest_model(task_description="<paste the file path or description of what was written>")
|
|
41
|
+
```
|
|
42
|
+
Say: **"Using [model] — [reasoning]"** then proceed.
|
|
43
|
+
|
|
16
44
|
### 1. Validate logic correctness
|
|
17
45
|
```
|
|
18
46
|
validate_file(path="<file you wrote or modified>")
|
|
19
47
|
```
|
|
20
|
-
Fix
|
|
48
|
+
Fix every 🔴 CRITICAL issue. Re-run until clean.
|
|
21
49
|
|
|
22
50
|
### 2. Validate code quality
|
|
23
51
|
```
|
|
24
52
|
check_code_quality(path="<same file>")
|
|
25
53
|
```
|
|
26
|
-
Fix
|
|
54
|
+
Fix 🔴 HIGH severity issues. Address 🟠 MEDIUM where practical.
|
|
27
55
|
|
|
28
|
-
### 3.
|
|
56
|
+
### 3. For complex logic — get the full checklist
|
|
29
57
|
```
|
|
30
|
-
|
|
58
|
+
get_checklist()
|
|
31
59
|
```
|
|
60
|
+
Run all 5 mental passes before marking done.
|
|
32
61
|
|
|
33
|
-
### 4.
|
|
62
|
+
### 4. Pre-write validation (before writing to disk)
|
|
34
63
|
```
|
|
35
|
-
|
|
64
|
+
check_drift(code="<your code snippet>", language="typescript")
|
|
36
65
|
```
|
|
37
|
-
Use this when changes are complex or involve critical business logic.
|
|
38
66
|
|
|
39
67
|
## Severity guide
|
|
40
68
|
|
|
41
69
|
| Icon | Level | Action |
|
|
42
70
|
|---|---|---|
|
|
43
|
-
| 🔴 | Critical/High | Fix immediately — do not
|
|
44
|
-
| 🟠 | Medium
|
|
71
|
+
| 🔴 | Critical/High | Fix immediately — do not proceed |
|
|
72
|
+
| 🟠 | Medium | Fix if the refactor is safe |
|
|
45
73
|
| 🔵 | Low/Info | Note for future cleanup |
|
|
46
|
-
|
|
47
|
-
## What each tool catches
|
|
48
|
-
|
|
49
|
-
| Tool | Catches |
|
|
50
|
-
|---|---|
|
|
51
|
-
| `validate_file` | Logic inversions, silent exceptions, null propagation, type confusion, stale closures |
|
|
52
|
-
| `check_code_quality` | Files >500 lines, functions >100 lines, vague names, nesting >4 levels, dead code, React/Vue component anti-patterns |
|
|
53
|
-
| `check_drift` | Same as validate_file but on inline snippets — use before writing |
|
|
@@ -1,35 +1,69 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lucid-context
|
|
3
|
-
description: Use
|
|
3
|
+
description: Use BEFORE starting any coding task — retrieves relevant context via smart_context (code + knowledge graph). HARD-GATE: do not read files manually before calling smart_context.
|
|
4
4
|
argument-hint: "[what you are working on]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<HARD-GATE>
|
|
8
|
+
Do NOT open any source file, read any code, or start implementation
|
|
9
|
+
until you have called smart_context and reviewed the result.
|
|
10
|
+
Reading files manually when Lucid is available wastes tokens and misses context.
|
|
11
|
+
</HARD-GATE>
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
## When to invoke this skill
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
**INVOKE when:** about to work on a feature, fix a bug, understand a module, or any coding task
|
|
16
|
+
**DO NOT INVOKE for:** pure conversation, reading docs, non-code questions
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
get_context(query="<what you are working on>", maxTokens=4000)
|
|
16
|
-
```
|
|
18
|
+
## Steps
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
```dot
|
|
21
|
+
digraph lucid_context {
|
|
22
|
+
"Describe task" -> "suggest_model";
|
|
23
|
+
"suggest_model" -> "call smart_context";
|
|
24
|
+
"call smart_context" -> "Result relevant?";
|
|
25
|
+
"Result relevant?" -> "call reward()" [label="yes"];
|
|
26
|
+
"Result relevant?" -> "call penalize()" [label="no — note what was missing"];
|
|
27
|
+
"reward()" -> "Start coding";
|
|
28
|
+
"penalize()" -> "Start coding";
|
|
29
|
+
}
|
|
30
|
+
```
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
### 0. Get model recommendation
|
|
33
|
+
```
|
|
34
|
+
suggest_model(task_description="<concise description of what you are working on>")
|
|
35
|
+
```
|
|
36
|
+
Say: **"Using [model] — [reasoning]"**
|
|
21
37
|
|
|
22
|
-
|
|
38
|
+
### 1. Call smart_context
|
|
39
|
+
```
|
|
40
|
+
smart_context(query="<concise description of what you are working on>", task_type="moderate")
|
|
41
|
+
```
|
|
23
42
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
Use `dirs` to narrow scope and `task_type` to adjust budget:
|
|
44
|
+
```
|
|
45
|
+
smart_context(query="...", dirs=["src/api"], task_type="simple")
|
|
46
|
+
```
|
|
28
47
|
|
|
29
|
-
|
|
48
|
+
### 2. Review results and give feedback
|
|
30
49
|
|
|
31
|
-
|
|
|
50
|
+
| Result quality | Action |
|
|
32
51
|
|---|---|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
52
|
+
| Included the files you needed | `reward()` |
|
|
53
|
+
| Missed important files you had to find manually | `penalize(note="missed: src/path/file.ts")` |
|
|
54
|
+
| Partially useful | no action |
|
|
55
|
+
|
|
56
|
+
### 3. Supplement if needed
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
grep_code(pattern="functionName") # locate specific usages
|
|
60
|
+
get_recent(hours=2) # after git pull — see what changed
|
|
61
|
+
recall(query="<topic>") # search accumulated knowledge
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 4. After finishing — sync
|
|
65
|
+
|
|
66
|
+
After every Write/Edit:
|
|
67
|
+
```
|
|
68
|
+
sync_file(path="<modified file>")
|
|
69
|
+
```
|
|
@@ -1,60 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lucid-plan
|
|
3
|
-
description:
|
|
3
|
+
description: MANDATORY before writing code for any non-trivial feature — creates a persisted plan with tasks. HARD-GATE: no coding without a plan.
|
|
4
4
|
argument-hint: "[feature or task description]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<HARD-GATE>
|
|
8
|
+
You are about to write code for a feature or fix.
|
|
9
|
+
STOP. Create a plan first. Plans survive session restarts.
|
|
10
|
+
Do NOT write implementation code until a plan exists and tasks are defined.
|
|
11
|
+
</HARD-GATE>
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
## When to invoke
|
|
14
|
+
|
|
15
|
+
**INVOKE when:** implementing a feature, fixing a non-trivial bug, any task with 3+ steps
|
|
16
|
+
**DO NOT INVOKE for:** single-line fixes, config changes, documentation-only tasks
|
|
10
17
|
|
|
11
18
|
## Steps
|
|
12
19
|
|
|
20
|
+
### 0. Get model recommendation
|
|
21
|
+
```
|
|
22
|
+
suggest_model(task_description="<paste the user's task description>")
|
|
23
|
+
```
|
|
24
|
+
Say: **"Using [model] — [reasoning]"** then proceed.
|
|
25
|
+
|
|
13
26
|
### 1. Create the plan
|
|
14
27
|
```
|
|
15
28
|
plan_create(
|
|
16
|
-
title="<short title>",
|
|
17
|
-
description="<what this
|
|
29
|
+
title="<short descriptive title>",
|
|
30
|
+
description="<what this accomplishes>",
|
|
18
31
|
user_story="As a <user>, I want <goal>, so that <benefit>.",
|
|
19
32
|
tasks=[
|
|
20
|
-
{ title: "Task 1", description: "...", test_criteria: "How to verify done" },
|
|
33
|
+
{ title: "Task 1", description: "...", test_criteria: "How to verify it's done" },
|
|
21
34
|
{ title: "Task 2", description: "...", test_criteria: "..." },
|
|
22
35
|
]
|
|
23
36
|
)
|
|
24
37
|
```
|
|
25
38
|
Returns a `plan_id` and task IDs (format: `planId * 100 + sequence`).
|
|
26
39
|
|
|
27
|
-
### 2.
|
|
28
|
-
For each task, mark it in progress when you start:
|
|
40
|
+
### 2. Mark tasks in progress / done as you work
|
|
29
41
|
```
|
|
30
42
|
plan_update_task(task_id=101, status="in_progress")
|
|
43
|
+
plan_update_task(task_id=101, status="done", note="Decision made: used X instead of Y")
|
|
31
44
|
```
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
### 3. Resume a session
|
|
34
47
|
```
|
|
35
|
-
|
|
48
|
+
plan_list() # all active plans
|
|
49
|
+
plan_get(plan_id=1) # full details + task status
|
|
36
50
|
```
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### 3. Resume a session — check plan status
|
|
41
|
-
```
|
|
42
|
-
plan_list() # see all active plans
|
|
43
|
-
plan_get(plan_id=1) # see full details + task status
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Task statuses
|
|
47
|
-
|
|
48
|
-
| Status | When to use |
|
|
49
|
-
|---|---|
|
|
50
|
-
| `pending` | Not started yet |
|
|
51
|
-
| `in_progress` | Currently working on it |
|
|
52
|
-
| `done` | Completed and verified |
|
|
53
|
-
| `blocked` | Waiting on external dependency |
|
|
54
|
-
|
|
55
|
-
## Tips
|
|
56
|
-
|
|
57
|
-
- Define `test_criteria` clearly — it becomes your acceptance test
|
|
58
|
-
- Use `plan_get` when resuming to quickly re-orient yourself
|
|
59
|
-
- Keep tasks small (1–4 hours each); use more tasks rather than fewer
|
|
60
|
-
- Notes are append-only — use them to document decisions made during implementation
|
|
52
|
+
## Task statuses: `pending` → `in_progress` → `done` | `blocked`
|
|
@@ -1,59 +1,41 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lucid-security
|
|
3
|
-
description: Run
|
|
4
|
-
argument-hint: "[file path or
|
|
3
|
+
description: Run before merging any code that handles user input, auth, or external data — security scan + drift check for injection, XSS, and credential exposure.
|
|
4
|
+
argument-hint: "[file path or directory]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<HARD-GATE>
|
|
8
|
+
Before merging code that:
|
|
9
|
+
- Handles user input (forms, query params, file uploads)
|
|
10
|
+
- Implements auth, tokens, sessions, or permissions
|
|
11
|
+
- Calls external APIs or parses external data
|
|
12
|
+
- Manages files or runs shell commands
|
|
8
13
|
|
|
9
|
-
Run this skill
|
|
14
|
+
Run this skill. No exceptions.
|
|
15
|
+
</HARD-GATE>
|
|
10
16
|
|
|
11
17
|
## Steps
|
|
12
18
|
|
|
13
|
-
###
|
|
19
|
+
### 0. Get model recommendation
|
|
14
20
|
```
|
|
15
|
-
|
|
16
|
-
code="<file contents or snippet>",
|
|
17
|
-
language="typescript", # javascript | typescript | html | vue
|
|
18
|
-
context="backend" # frontend | backend | api
|
|
19
|
-
)
|
|
21
|
+
suggest_model(task_description="<paste the user's task description>")
|
|
20
22
|
```
|
|
21
|
-
|
|
23
|
+
Say: **"Using [model] — [reasoning]"** then proceed.
|
|
22
24
|
|
|
23
|
-
###
|
|
25
|
+
### 1. Security scan
|
|
24
26
|
```
|
|
25
|
-
|
|
27
|
+
security_scan(code="<file contents or snippet>", language="typescript", context="backend")
|
|
26
28
|
```
|
|
27
|
-
Catches security-adjacent logic bugs: wrong condition direction, silent exception swallowing, null propagation into auth checks.
|
|
28
29
|
|
|
29
|
-
###
|
|
30
|
+
### 2. Drift check for security-sensitive snippets
|
|
30
31
|
```
|
|
31
|
-
|
|
32
|
+
check_drift(code="<auth/input-handling code>", language="typescript")
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
### 3. Fix all CRITICAL issues before merging
|
|
35
36
|
|
|
36
|
-
|
|
|
37
|
-
|---|---|---|
|
|
38
|
-
| 🔴 Critical | XSS, eval, hardcoded secret, SQL injection | Fix before any commit |
|
|
39
|
-
| 🟠 High | Open redirect, path traversal, prototype pollution | Fix before merge |
|
|
40
|
-
| 🟡 Medium | Wildcard CORS, missing CSRF protection | Fix before production |
|
|
41
|
-
| 🔵 Low | console.log, minor info leakage | Fix when convenient |
|
|
42
|
-
|
|
43
|
-
## Common patterns to watch
|
|
44
|
-
|
|
45
|
-
| Pattern | Risk |
|
|
37
|
+
| Severity | Action |
|
|
46
38
|
|---|---|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
| `res.redirect(req.query.url)` | Open redirect — validate against allowlist |
|
|
51
|
-
| `readFile(req.params.filename)` | Path traversal — use `path.resolve` + bounds check |
|
|
52
|
-
| `Access-Control-Allow-Origin: *` | Overly permissive CORS |
|
|
53
|
-
|
|
54
|
-
## Note
|
|
55
|
-
|
|
56
|
-
Static scanning finds patterns, not all vulnerabilities. Complement with:
|
|
57
|
-
- Manual code review for business logic flaws
|
|
58
|
-
- DAST (dynamic testing) for runtime issues
|
|
59
|
-
- Dependency audit: `npm audit` / `pip-audit`
|
|
39
|
+
| 🔴 CRITICAL | Block merge — fix immediately |
|
|
40
|
+
| 🟠 HIGH | Fix before merge |
|
|
41
|
+
| 🔵 MEDIUM/LOW | Track, fix in follow-up |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lucid-start
|
|
3
|
+
description: MANDATORY at every session start and before any coding task — loads project context via Lucid before Claude reads any file or writes any code
|
|
4
|
+
argument-hint: "[optional: what you are about to work on]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<HARD-GATE>
|
|
8
|
+
You MUST complete ALL steps below BEFORE:
|
|
9
|
+
- Reading any source file
|
|
10
|
+
- Writing or editing any code
|
|
11
|
+
- Answering any coding question
|
|
12
|
+
- Creating any plan or task
|
|
13
|
+
|
|
14
|
+
This is not optional. There are no exceptions. "I'll do it after" is not acceptable.
|
|
15
|
+
</HARD-GATE>
|
|
16
|
+
|
|
17
|
+
## Steps (all mandatory, in order)
|
|
18
|
+
|
|
19
|
+
### 0. Get model recommendation
|
|
20
|
+
```
|
|
21
|
+
suggest_model(task_description="<paste the user's task description>")
|
|
22
|
+
```
|
|
23
|
+
Say: **"Using [model] — [reasoning]"** then proceed.
|
|
24
|
+
|
|
25
|
+
### 1. Check what changed recently
|
|
26
|
+
```
|
|
27
|
+
get_recent(hours=48)
|
|
28
|
+
```
|
|
29
|
+
This shows files modified since your last session. Review the list.
|
|
30
|
+
|
|
31
|
+
### 2. If working on a specific task — load relevant context
|
|
32
|
+
```
|
|
33
|
+
smart_context(query="<describe what you are about to work on>", task_type="moderate")
|
|
34
|
+
```
|
|
35
|
+
If the user's request involves code, call smart_context. For purely conversational exchanges with zero code involvement, this step may be omitted.
|
|
36
|
+
|
|
37
|
+
### 3. Announce readiness
|
|
38
|
+
Say: "✓ Lucid active — context loaded"
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## After EVERY file write or edit
|
|
43
|
+
|
|
44
|
+
Call `sync_file` IMMEDIATELY after the tool call completes:
|
|
45
|
+
```
|
|
46
|
+
sync_file(path="<exact path of file you just wrote or edited>")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Do this before anything else.** Before the next file. Before the next thought. Now.
|
|
50
|
+
|
|
51
|
+
If you modified multiple files (refactor, git pull): call `sync_project()` instead.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Before marking any task as done
|
|
56
|
+
|
|
57
|
+
Run /lucid-audit before saying "done", "fixed", "complete", or "implemented".
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Trigger conditions
|
|
62
|
+
|
|
63
|
+
**USE this skill:**
|
|
64
|
+
- At the start of every new conversation
|
|
65
|
+
- When resuming work after a break
|
|
66
|
+
- When the user says "let's work on X" or similar
|
|
67
|
+
|
|
68
|
+
**DO NOT USE for:**
|
|
69
|
+
- Pure conversation with no code involved
|
|
70
|
+
- Answering theoretical questions
|