@liendev/lien 0.15.1 → 0.16.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/CURSOR_RULES_TEMPLATE.md +8 -7
- package/dist/index.js +673 -365
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CURSOR_RULES_TEMPLATE.md
CHANGED
|
@@ -15,14 +15,14 @@ You have access to Lien semantic search tools. USE THEM INSTEAD OF grep/ripgrep/
|
|
|
15
15
|
| "Where is X implemented?" | `semantic_search` | grep |
|
|
16
16
|
| "How does X work?" | `semantic_search` | reading random files |
|
|
17
17
|
| "Find all Controllers" | `list_functions` | grep |
|
|
18
|
-
| Edit a file | `
|
|
18
|
+
| Edit a file | `get_files_context` FIRST | direct edit |
|
|
19
19
|
| Find similar code | `find_similar` | manual search |
|
|
20
20
|
|
|
21
21
|
## Before ANY Code Change
|
|
22
22
|
|
|
23
23
|
REQUIRED sequence:
|
|
24
24
|
1. `semantic_search` → find relevant files
|
|
25
|
-
2. `
|
|
25
|
+
2. `get_files_context` → understand the file + check `testAssociations`
|
|
26
26
|
3. Make changes
|
|
27
27
|
4. Remind user to run affected tests
|
|
28
28
|
|
|
@@ -33,10 +33,11 @@ REQUIRED sequence:
|
|
|
33
33
|
- NOT function names (use grep for exact names)
|
|
34
34
|
- Returns relevance category: `highly_relevant`, `relevant`, `loosely_related`, `not_relevant`
|
|
35
35
|
|
|
36
|
-
**`
|
|
36
|
+
**`get_files_context({ filepaths: "path/to/file.ts" })`** or **`get_files_context({ filepaths: ["file1.ts", "file2.ts"] })`**
|
|
37
37
|
- MANDATORY before editing any file
|
|
38
38
|
- Returns `testAssociations`: which tests cover this file
|
|
39
39
|
- Shows file dependencies and relationships
|
|
40
|
+
- Accepts single filepath or array of filepaths for batch operations
|
|
40
41
|
|
|
41
42
|
**`list_functions({ pattern: ".*Controller.*" })`**
|
|
42
43
|
- Fast symbol lookup by naming pattern
|
|
@@ -49,7 +50,7 @@ REQUIRED sequence:
|
|
|
49
50
|
|
|
50
51
|
## Test Associations
|
|
51
52
|
|
|
52
|
-
`
|
|
53
|
+
`get_files_context` returns `testAssociations` showing which tests cover the file.
|
|
53
54
|
ALWAYS check this before modifying source code.
|
|
54
55
|
After changes, remind the user: "This file is covered by [test files] - run these to verify."
|
|
55
56
|
|
|
@@ -59,14 +60,14 @@ After changes, remind the user: "This file is covered by [test files] - run thes
|
|
|
59
60
|
```
|
|
60
61
|
1. semantic_search({ query: "X implementation" })
|
|
61
62
|
2. Review results (check relevance scores)
|
|
62
|
-
3.
|
|
63
|
+
3. get_files_context({ filepaths: "identified/file.ts" })
|
|
63
64
|
4. Answer with specific code locations
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
### Pattern 2: Edit or Change Code
|
|
67
68
|
```
|
|
68
69
|
1. semantic_search({ query: "area being modified" })
|
|
69
|
-
2.
|
|
70
|
+
2. get_files_context({ filepaths: "target/file.ts" })
|
|
70
71
|
3. Check testAssociations in response
|
|
71
72
|
4. Make changes
|
|
72
73
|
5. Tell user which tests to run
|
|
@@ -107,4 +108,4 @@ For everything else: **Lien first.**
|
|
|
107
108
|
|
|
108
109
|
---
|
|
109
110
|
|
|
110
|
-
REMINDER: semantic_search and
|
|
111
|
+
REMINDER: semantic_search and get_files_context FIRST. grep is the fallback, not the default.
|