4runr-cursor-setup 0.1.17 → 0.1.19

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 CHANGED
@@ -1,6 +1,34 @@
1
1
  # 4runr-cursor-setup
2
2
 
3
- **Full Git usage guide:** [docs/USAGE_GIT.md](docs/USAGE_GIT.md)
3
+ **Documentation:**
4
+ - [Command Reference](docs/COMMANDS.md) — Complete command and flag documentation
5
+ - [Git Usage Guide](docs/USAGE_GIT.md) — End-to-end Git repo usage guide
6
+
7
+ ## New Repo Quick Start
8
+
9
+ **PowerShell:**
10
+ ```powershell
11
+ # Step 1: Repair / normalize repo (safe)
12
+ npx -y 4runr-cursor-setup@latest doctor --fix --purge-orphans --strict
13
+
14
+ # Step 2: Install core commands
15
+ npx -y 4runr-cursor-setup@latest add core
16
+
17
+ # Step 3: Verify health
18
+ npx -y 4runr-cursor-setup@latest doctor --strict
19
+ ```
20
+
21
+ **Bash:**
22
+ ```bash
23
+ # Step 1: Repair / normalize repo (safe)
24
+ npx -y 4runr-cursor-setup@latest doctor --fix --purge-orphans --strict
25
+
26
+ # Step 2: Install core commands
27
+ npx -y 4runr-cursor-setup@latest add core
28
+
29
+ # Step 3: Verify health
30
+ npx -y 4runr-cursor-setup@latest doctor --strict
31
+ ```
4
32
 
5
33
  ## Golden Path
6
34
 
@@ -8,14 +36,14 @@
8
36
  # Repair / normalize any repo (safe)
9
37
  npx -y 4runr-cursor-setup@latest doctor --fix --purge-orphans --strict
10
38
 
11
- # Install core commands
12
- npx -y 4runr-cursor-setup@latest add core
39
+ # Install core commands (updates if already installed)
40
+ npx -y 4runr-cursor-setup@latest add core --force
13
41
 
14
42
  # CI / health check (fails if issues)
15
43
  npx -y 4runr-cursor-setup@latest doctor --strict
16
44
 
17
- # Machine-readable audit (for automation)
18
- npx -y 4runr-cursor-setup@latest doctor --json
45
+ # Read-only audit plan (for reviews)
46
+ npx -y 4runr-cursor-setup@latest doctor --plan
19
47
  ```
20
48
 
21
49
  ## Contract / Invariants
@@ -72,26 +100,138 @@ npx -y 4runr-cursor-setup@latest add core --dry-run
72
100
  - `governance`: Governance commands (decision, scope-change)
73
101
  - `debugging`: Debugging commands (repro, verify)
74
102
 
75
- ## Troubleshooting
103
+ ## What `/close` Means
76
104
 
77
- ### npx Cache Issues
105
+ The `/close` command (from the `core` group) produces a session handoff summary. **It is a reflection of verified repo state, not a progress generator.**
78
106
 
79
- If `npx -y 4runr-cursor-setup@latest` fails with `ETARGET` but the version exists on npm:
107
+ ### Key Rules
80
108
 
81
- This is an npx cache desync. Clear the cache and retry:
109
+ - **Evidence-gated:** Every claimed change must be proven with repo evidence (git status, git diff, file paths, quoted snippets)
110
+ - **Read-only sessions:** If no files were changed, `/close` must explicitly state: "No files were created, modified, or deleted. This session was read-only inspection only."
111
+ - **No hallucination:** The command cannot invent work, summarize changes without evidence, or list files that don't exist
112
+ - **Clean repo → clean close:** A clean repository results in a read-only close output
82
113
 
83
- **PowerShell:**
114
+ ### Verification Block
115
+
116
+ Every `/close` output starts with a mandatory verification block:
117
+ - `git status` output
118
+ - `git diff --name-only` output
119
+ - Explicit list of modified files (or "NONE")
120
+
121
+ If evidence is unavailable, the output must state "NOT AVAILABLE" rather than guessing.
122
+
123
+ ### What It Does
124
+
125
+ - **With changes:** Lists verified changes with evidence (file paths, diffs, quotes)
126
+ - **Without changes:** States explicitly that the session was read-only
127
+ - **Always:** Provides next steps and project memory updates (docs/status.md, docs/todo.md, docs/decisions.md)
128
+
129
+ **Important:** `/close` reflects only what actually happened in the repo. It does not generate progress or invent improvements.
130
+
131
+ ### Upgrading Existing Repos
132
+
133
+ To update the `/close` template (and other core commands) in an existing repo:
134
+
135
+ ```bash
136
+ npx -y 4runr-cursor-setup@latest add core --force
137
+ ```
138
+
139
+ This updates the templates to the latest version while preserving your project structure.
140
+
141
+ ## Common Scenarios
142
+
143
+ ### "0 files written" When Adding a Group
144
+
145
+ **Reasons and exact next steps:**
146
+
147
+ 1. **Already installed and managed** (normal)
148
+ - Files exist, have marker, and are in manifest
149
+ - **Action:** Nothing to do. This is expected.
150
+
151
+ 2. **Orphan marker files**
152
+ - Files have marker but aren't in manifest
153
+ - **Fix:**
154
+ ```bash
155
+ npx -y 4runr-cursor-setup@latest doctor --purge-orphans
156
+ npx -y 4runr-cursor-setup@latest add planning
157
+ ```
158
+ (Replace `planning` with the actual group name)
159
+
160
+ 3. **Unmanaged collision**
161
+ - Files exist without marker (user-created)
162
+ - Tool will never overwrite these
163
+ - **Fix (manual):**
164
+ ```bash
165
+ # Rename or move the colliding file
166
+ mv .cursor/commands/4runr-start.md .cursor/commands/4runr-start.md.backup
167
+ # Then re-run add
168
+ npx -y 4runr-cursor-setup@latest add core
169
+ ```
170
+
171
+ ### Orphan Marker Files
172
+
173
+ **What they are:**
174
+ - Files in `.cursor/commands/` with the managed marker (`<!-- managed-by: 4runr-cursor-setup -->`) but not listed in the manifest
175
+
176
+ **Why they exist:**
177
+ - Manifest was deleted or reset
178
+ - Files were manually created with marker
179
+ - Manifest drift
180
+
181
+ **Fix:**
182
+ ```bash
183
+ npx -y 4runr-cursor-setup@latest doctor --purge-orphans
184
+ ```
185
+
186
+ **What it does:**
187
+ - Deletes only orphan marker files (safe)
188
+ - Never deletes managed files or unmarked files
189
+
190
+ ### Unmanaged Collision
191
+
192
+ **What it is:**
193
+ - A file exists at a path where the tool wants to install a template, but the file doesn't have the managed marker
194
+
195
+ **Why it happens:**
196
+ - User created a file manually
197
+ - File was created before tool installation
198
+
199
+ **Resolution (manual):**
200
+ 1. Rename or move the colliding file:
201
+ ```bash
202
+ mv .cursor/commands/4runr-start.md .cursor/commands/4runr-start.md.backup
203
+ ```
204
+ 2. Re-run add:
205
+ ```bash
206
+ npx -y 4runr-cursor-setup@latest add core
207
+ ```
208
+
209
+ **Important:** The tool will never overwrite unmanaged files, even with `--force`.
210
+
211
+ ### ETARGET / npx Cache Desync
212
+
213
+ **Symptom:**
214
+ - `npx -y 4runr-cursor-setup@latest` fails with `ETARGET` but the version exists on npm
215
+
216
+ **Cause:**
217
+ - npx cache is out of sync with npm registry
218
+
219
+ **Fix (PowerShell):**
84
220
  ```powershell
85
221
  npm cache clean --force
86
222
  Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx" -ErrorAction SilentlyContinue
87
223
  ```
88
224
 
89
- **Bash:**
225
+ **Fix (Bash):**
90
226
  ```bash
91
227
  npm cache clean --force
92
228
  rm -rf ~/.npm/_npx
93
229
  ```
94
230
 
231
+ **Then retry your command.**
232
+
233
+ ## Troubleshooting
234
+
95
235
  ### PowerShell Error: The '<' operator is reserved for future use
96
236
 
97
237
  **Cause:** Copied placeholder like `GROUP` from documentation without replacing it.
@@ -4,28 +4,99 @@
4
4
 
5
5
  We are ending this session. Produce a clean handoff.
6
6
 
7
- ## Hard rules
8
- - No emojis
9
- - No assumptions
10
- - No "this should work"
7
+ ## 🔒 CRITICAL: Evidence-Gated Close (Non-Negotiable)
8
+
9
+ **You MUST prove every claimed change with repo evidence. If you cannot prove it, you must not claim it occurred.**
10
+
11
+ ### Anti-Hallucination Rules
12
+
13
+ - **Do NOT infer or summarize changes unless you can point to the exact file and evidence.**
14
+ - **Do NOT describe "improvements", "fixes", or "updates" without proof.**
15
+ - **Do NOT list files unless they actually exist or were modified.**
16
+ - **If unsure, state uncertainty explicitly.**
17
+
18
+ ## Mandatory Verification Block
19
+
20
+ **You MUST start your output with this verification block:**
21
+
22
+ ```
23
+ VERIFICATION
24
+ - git status: [run `git status` and report: clean / modified files / not run]
25
+ - git diff --name-only: [run `git diff --name-only` and list files or "none"]
26
+ - Files modified: [explicit list of file paths or "NONE"]
27
+ ```
28
+
29
+ **If you cannot populate this truthfully, you must say "NOT AVAILABLE" for that field.**
30
+
31
+ ## Output Format
32
+
33
+ ### Mode A: Evidence Mode (Changes Exist)
34
+
35
+ **Use this ONLY if you have evidence of changes:**
11
36
 
12
- ## Output format
13
- ### 1) What changed
14
- - Bullet list
37
+ 1. **VERIFICATION** (mandatory, at top)
38
+ - git status: [actual output or "not run"]
39
+ - git diff --name-only: [list or "none"]
40
+ - Files modified: [explicit list or "NONE"]
15
41
 
16
- ### 2) Files involved
17
- - Exact file paths
42
+ 2. **What changed** (evidence-required)
43
+ - For each claimed change, include:
44
+ - File path
45
+ - What changed (specific, not vague)
46
+ - Evidence: diff snippet, command output, or exact file content quote
18
47
 
19
- ### 3) Decisions (if any)
20
- - Decision
21
- - Why
22
- - Trade-offs
48
+ 3. **Files involved**
49
+ - Exact file paths (only files that exist or were modified)
23
50
 
24
- ### 4) Next steps
25
- - 3–7 steps, atomic
51
+ 4. **Decisions** (if any)
52
+ - Decision
53
+ - Why
54
+ - Trade-offs
26
55
 
27
- ### 5) Project memory updates
28
- Provide copy-paste text for:
29
- - docs/status.md
30
- - docs/todo.md
31
- - docs/decisions.md (only if needed)
56
+ 5. **Next steps**
57
+ - 3–7 steps, atomic
58
+
59
+ 6. **Project memory updates**
60
+ - Provide copy-paste text for:
61
+ - docs/status.md
62
+ - docs/todo.md
63
+ - docs/decisions.md (only if needed)
64
+
65
+ ### Mode B: Read-Only Mode (No Changes)
66
+
67
+ **Use this if no evidence of changes exists:**
68
+
69
+ 1. **VERIFICATION** (mandatory, at top)
70
+ - git status: [actual output]
71
+ - git diff --name-only: [actual output]
72
+ - Files modified: NONE
73
+
74
+ 2. **Session summary**
75
+ - **MUST state explicitly:**
76
+ ```
77
+ No files were created, modified, or deleted.
78
+ This session was read-only inspection only.
79
+ ```
80
+
81
+ 3. **What was inspected** (optional, only if relevant)
82
+ - Files read
83
+ - Commands run
84
+ - Information gathered
85
+
86
+ 4. **Next steps** (if any)
87
+ - 3–7 steps, atomic
88
+
89
+ 5. **Project memory updates** (if any changes to understanding)
90
+ - Provide copy-paste text for:
91
+ - docs/status.md
92
+ - docs/todo.md
93
+ - docs/decisions.md (only if needed)
94
+
95
+ ## Hard Rules
96
+
97
+ - No emojis
98
+ - No assumptions
99
+ - No "this should work"
100
+ - No vague summaries without evidence
101
+ - No claiming changes without proof
102
+ - Clean repo → clean close (read-only mode)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "4runr-cursor-setup",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,28 +4,99 @@
4
4
 
5
5
  We are ending this session. Produce a clean handoff.
6
6
 
7
- ## Hard rules
8
- - No emojis
9
- - No assumptions
10
- - No "this should work"
7
+ ## 🔒 CRITICAL: Evidence-Gated Close (Non-Negotiable)
8
+
9
+ **You MUST prove every claimed change with repo evidence. If you cannot prove it, you must not claim it occurred.**
10
+
11
+ ### Anti-Hallucination Rules
12
+
13
+ - **Do NOT infer or summarize changes unless you can point to the exact file and evidence.**
14
+ - **Do NOT describe "improvements", "fixes", or "updates" without proof.**
15
+ - **Do NOT list files unless they actually exist or were modified.**
16
+ - **If unsure, state uncertainty explicitly.**
17
+
18
+ ## Mandatory Verification Block
19
+
20
+ **You MUST start your output with this verification block:**
21
+
22
+ ```
23
+ VERIFICATION
24
+ - git status: [run `git status` and report: clean / modified files / not run]
25
+ - git diff --name-only: [run `git diff --name-only` and list files or "none"]
26
+ - Files modified: [explicit list of file paths or "NONE"]
27
+ ```
28
+
29
+ **If you cannot populate this truthfully, you must say "NOT AVAILABLE" for that field.**
30
+
31
+ ## Output Format
32
+
33
+ ### Mode A: Evidence Mode (Changes Exist)
34
+
35
+ **Use this ONLY if you have evidence of changes:**
11
36
 
12
- ## Output format
13
- ### 1) What changed
14
- - Bullet list
37
+ 1. **VERIFICATION** (mandatory, at top)
38
+ - git status: [actual output or "not run"]
39
+ - git diff --name-only: [list or "none"]
40
+ - Files modified: [explicit list or "NONE"]
15
41
 
16
- ### 2) Files involved
17
- - Exact file paths
42
+ 2. **What changed** (evidence-required)
43
+ - For each claimed change, include:
44
+ - File path
45
+ - What changed (specific, not vague)
46
+ - Evidence: diff snippet, command output, or exact file content quote
18
47
 
19
- ### 3) Decisions (if any)
20
- - Decision
21
- - Why
22
- - Trade-offs
48
+ 3. **Files involved**
49
+ - Exact file paths (only files that exist or were modified)
23
50
 
24
- ### 4) Next steps
25
- - 3–7 steps, atomic
51
+ 4. **Decisions** (if any)
52
+ - Decision
53
+ - Why
54
+ - Trade-offs
26
55
 
27
- ### 5) Project memory updates
28
- Provide copy-paste text for:
29
- - docs/status.md
30
- - docs/todo.md
31
- - docs/decisions.md (only if needed)
56
+ 5. **Next steps**
57
+ - 3–7 steps, atomic
58
+
59
+ 6. **Project memory updates**
60
+ - Provide copy-paste text for:
61
+ - docs/status.md
62
+ - docs/todo.md
63
+ - docs/decisions.md (only if needed)
64
+
65
+ ### Mode B: Read-Only Mode (No Changes)
66
+
67
+ **Use this if no evidence of changes exists:**
68
+
69
+ 1. **VERIFICATION** (mandatory, at top)
70
+ - git status: [actual output]
71
+ - git diff --name-only: [actual output]
72
+ - Files modified: NONE
73
+
74
+ 2. **Session summary**
75
+ - **MUST state explicitly:**
76
+ ```
77
+ No files were created, modified, or deleted.
78
+ This session was read-only inspection only.
79
+ ```
80
+
81
+ 3. **What was inspected** (optional, only if relevant)
82
+ - Files read
83
+ - Commands run
84
+ - Information gathered
85
+
86
+ 4. **Next steps** (if any)
87
+ - 3–7 steps, atomic
88
+
89
+ 5. **Project memory updates** (if any changes to understanding)
90
+ - Provide copy-paste text for:
91
+ - docs/status.md
92
+ - docs/todo.md
93
+ - docs/decisions.md (only if needed)
94
+
95
+ ## Hard Rules
96
+
97
+ - No emojis
98
+ - No assumptions
99
+ - No "this should work"
100
+ - No vague summaries without evidence
101
+ - No claiming changes without proof
102
+ - Clean repo → clean close (read-only mode)