@scotthamilton77/sidekick 0.1.2 → 0.1.4
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/assets/sidekick/defaults/features/reminders.defaults.yaml +256 -0
- package/assets/sidekick/prompts/session-summary.prompt.txt +38 -0
- package/assets/sidekick/reminders/vc-build.yaml +15 -0
- package/assets/sidekick/reminders/vc-lint.yaml +15 -0
- package/assets/sidekick/reminders/vc-test.yaml +15 -0
- package/assets/sidekick/reminders/vc-typecheck.yaml +15 -0
- package/assets/sidekick/reminders/verify-completion.yaml +5 -20
- package/dist/bin.js +419 -87
- package/dist/daemon.js +455 -178
- package/package.json +1 -1
|
@@ -63,6 +63,262 @@ settings:
|
|
|
63
63
|
# -1 = unlimited (default), 0 = disabled, positive = exact limit
|
|
64
64
|
max_verification_cycles: -1
|
|
65
65
|
|
|
66
|
+
# Per-tool verification tracking.
|
|
67
|
+
# Each tool category tracks whether its verification command has been run.
|
|
68
|
+
# When source files are edited, tools transition to STAGED (needing re-run).
|
|
69
|
+
# When the tool's command is observed, it transitions to VERIFIED.
|
|
70
|
+
# After VERIFIED, a configurable number of file edits (clearing_threshold) triggers re-staging.
|
|
71
|
+
#
|
|
72
|
+
# Pattern fields:
|
|
73
|
+
# tool_id: stable key for override/removal by project or user config
|
|
74
|
+
# tool: token pattern for matching (null = disabled)
|
|
75
|
+
# scope: metadata — project, package, or file
|
|
76
|
+
verification_tools:
|
|
77
|
+
build:
|
|
78
|
+
enabled: true
|
|
79
|
+
patterns:
|
|
80
|
+
# TypeScript/JavaScript
|
|
81
|
+
- tool_id: tsc
|
|
82
|
+
tool: "tsc"
|
|
83
|
+
scope: project
|
|
84
|
+
- tool_id: esbuild
|
|
85
|
+
tool: "esbuild"
|
|
86
|
+
scope: file
|
|
87
|
+
- tool_id: pnpm-filter-build
|
|
88
|
+
tool: "pnpm --filter * build"
|
|
89
|
+
scope: package
|
|
90
|
+
- tool_id: pnpm-build
|
|
91
|
+
tool: "pnpm build"
|
|
92
|
+
scope: project
|
|
93
|
+
- tool_id: npm-build
|
|
94
|
+
tool: "npm run build"
|
|
95
|
+
scope: project
|
|
96
|
+
- tool_id: yarn-workspace-build
|
|
97
|
+
tool: "yarn workspace * build"
|
|
98
|
+
scope: package
|
|
99
|
+
- tool_id: yarn-build
|
|
100
|
+
tool: "yarn build"
|
|
101
|
+
scope: project
|
|
102
|
+
# Python
|
|
103
|
+
- tool_id: python-setup-build
|
|
104
|
+
tool: "python setup.py build"
|
|
105
|
+
scope: project
|
|
106
|
+
- tool_id: pip-install
|
|
107
|
+
tool: "pip install"
|
|
108
|
+
scope: project
|
|
109
|
+
- tool_id: poetry-build
|
|
110
|
+
tool: "poetry build"
|
|
111
|
+
scope: project
|
|
112
|
+
# JVM
|
|
113
|
+
- tool_id: mvn-compile
|
|
114
|
+
tool: "mvn compile"
|
|
115
|
+
scope: project
|
|
116
|
+
- tool_id: mvn-package
|
|
117
|
+
tool: "mvn package"
|
|
118
|
+
scope: project
|
|
119
|
+
- tool_id: gradle-build
|
|
120
|
+
tool: "gradle build"
|
|
121
|
+
scope: project
|
|
122
|
+
- tool_id: gradlew-build
|
|
123
|
+
tool: "./gradlew build"
|
|
124
|
+
scope: project
|
|
125
|
+
# Go
|
|
126
|
+
- tool_id: go-build
|
|
127
|
+
tool: "go build"
|
|
128
|
+
scope: project
|
|
129
|
+
# Rust
|
|
130
|
+
- tool_id: cargo-build
|
|
131
|
+
tool: "cargo build"
|
|
132
|
+
scope: project
|
|
133
|
+
# C/C++
|
|
134
|
+
- tool_id: make-build
|
|
135
|
+
tool: "make build"
|
|
136
|
+
scope: project
|
|
137
|
+
- tool_id: make-default
|
|
138
|
+
tool: "make"
|
|
139
|
+
scope: project
|
|
140
|
+
- tool_id: cmake-build
|
|
141
|
+
tool: "cmake --build"
|
|
142
|
+
scope: project
|
|
143
|
+
# Containers
|
|
144
|
+
- tool_id: docker-build
|
|
145
|
+
tool: "docker build"
|
|
146
|
+
scope: project
|
|
147
|
+
clearing_threshold: 3
|
|
148
|
+
clearing_patterns:
|
|
149
|
+
- "**/*.ts"
|
|
150
|
+
- "**/*.tsx"
|
|
151
|
+
- "**/*.js"
|
|
152
|
+
- "**/*.jsx"
|
|
153
|
+
- "**/*.py"
|
|
154
|
+
- "**/*.java"
|
|
155
|
+
- "**/*.kt"
|
|
156
|
+
- "**/*.go"
|
|
157
|
+
- "**/*.rs"
|
|
158
|
+
- "**/*.c"
|
|
159
|
+
- "**/*.cpp"
|
|
160
|
+
- "**/*.cs"
|
|
161
|
+
typecheck:
|
|
162
|
+
enabled: true
|
|
163
|
+
patterns:
|
|
164
|
+
- tool_id: tsc-noEmit
|
|
165
|
+
tool: "tsc --noEmit"
|
|
166
|
+
scope: project
|
|
167
|
+
- tool_id: pnpm-filter-typecheck
|
|
168
|
+
tool: "pnpm --filter * typecheck"
|
|
169
|
+
scope: package
|
|
170
|
+
- tool_id: pnpm-typecheck
|
|
171
|
+
tool: "pnpm typecheck"
|
|
172
|
+
scope: project
|
|
173
|
+
- tool_id: npm-typecheck
|
|
174
|
+
tool: "npm run typecheck"
|
|
175
|
+
scope: project
|
|
176
|
+
- tool_id: yarn-workspace-typecheck
|
|
177
|
+
tool: "yarn workspace * typecheck"
|
|
178
|
+
scope: package
|
|
179
|
+
- tool_id: yarn-typecheck
|
|
180
|
+
tool: "yarn typecheck"
|
|
181
|
+
scope: project
|
|
182
|
+
- tool_id: mypy
|
|
183
|
+
tool: "mypy"
|
|
184
|
+
scope: project
|
|
185
|
+
- tool_id: pyright
|
|
186
|
+
tool: "pyright"
|
|
187
|
+
scope: project
|
|
188
|
+
- tool_id: pytype
|
|
189
|
+
tool: "pytype"
|
|
190
|
+
scope: project
|
|
191
|
+
- tool_id: go-vet
|
|
192
|
+
tool: "go vet"
|
|
193
|
+
scope: project
|
|
194
|
+
clearing_threshold: 3
|
|
195
|
+
clearing_patterns:
|
|
196
|
+
- "**/*.ts"
|
|
197
|
+
- "**/*.tsx"
|
|
198
|
+
- "**/*.py"
|
|
199
|
+
- "**/*.go"
|
|
200
|
+
test:
|
|
201
|
+
enabled: true
|
|
202
|
+
patterns:
|
|
203
|
+
- tool_id: vitest
|
|
204
|
+
tool: "vitest"
|
|
205
|
+
scope: project
|
|
206
|
+
- tool_id: jest
|
|
207
|
+
tool: "jest"
|
|
208
|
+
scope: project
|
|
209
|
+
- tool_id: pnpm-filter-test
|
|
210
|
+
tool: "pnpm --filter * test"
|
|
211
|
+
scope: package
|
|
212
|
+
- tool_id: pnpm-test
|
|
213
|
+
tool: "pnpm test"
|
|
214
|
+
scope: project
|
|
215
|
+
- tool_id: npm-test
|
|
216
|
+
tool: "npm test"
|
|
217
|
+
scope: project
|
|
218
|
+
- tool_id: yarn-workspace-test
|
|
219
|
+
tool: "yarn workspace * test"
|
|
220
|
+
scope: package
|
|
221
|
+
- tool_id: yarn-test
|
|
222
|
+
tool: "yarn test"
|
|
223
|
+
scope: project
|
|
224
|
+
- tool_id: pytest
|
|
225
|
+
tool: "pytest"
|
|
226
|
+
scope: project
|
|
227
|
+
- tool_id: python-pytest
|
|
228
|
+
tool: "python -m pytest"
|
|
229
|
+
scope: project
|
|
230
|
+
- tool_id: python-unittest
|
|
231
|
+
tool: "python -m unittest"
|
|
232
|
+
scope: project
|
|
233
|
+
- tool_id: mvn-test
|
|
234
|
+
tool: "mvn test"
|
|
235
|
+
scope: project
|
|
236
|
+
- tool_id: gradle-test
|
|
237
|
+
tool: "gradle test"
|
|
238
|
+
scope: project
|
|
239
|
+
- tool_id: gradlew-test
|
|
240
|
+
tool: "./gradlew test"
|
|
241
|
+
scope: project
|
|
242
|
+
- tool_id: go-test
|
|
243
|
+
tool: "go test"
|
|
244
|
+
scope: project
|
|
245
|
+
- tool_id: cargo-test
|
|
246
|
+
tool: "cargo test"
|
|
247
|
+
scope: project
|
|
248
|
+
- tool_id: dotnet-test
|
|
249
|
+
tool: "dotnet test"
|
|
250
|
+
scope: project
|
|
251
|
+
- tool_id: make-test
|
|
252
|
+
tool: "make test"
|
|
253
|
+
scope: project
|
|
254
|
+
clearing_threshold: 3
|
|
255
|
+
clearing_patterns:
|
|
256
|
+
- "**/*.ts"
|
|
257
|
+
- "**/*.tsx"
|
|
258
|
+
- "**/*.js"
|
|
259
|
+
- "**/*.jsx"
|
|
260
|
+
- "**/*.py"
|
|
261
|
+
- "**/*.java"
|
|
262
|
+
- "**/*.kt"
|
|
263
|
+
- "**/*.go"
|
|
264
|
+
- "**/*.rs"
|
|
265
|
+
- "**/*.test.*"
|
|
266
|
+
- "**/*.spec.*"
|
|
267
|
+
- "**/test_*"
|
|
268
|
+
lint:
|
|
269
|
+
enabled: true
|
|
270
|
+
patterns:
|
|
271
|
+
- tool_id: eslint
|
|
272
|
+
tool: "eslint"
|
|
273
|
+
scope: project
|
|
274
|
+
- tool_id: pnpm-filter-lint
|
|
275
|
+
tool: "pnpm --filter * lint"
|
|
276
|
+
scope: package
|
|
277
|
+
- tool_id: pnpm-lint
|
|
278
|
+
tool: "pnpm lint"
|
|
279
|
+
scope: project
|
|
280
|
+
- tool_id: npm-lint
|
|
281
|
+
tool: "npm run lint"
|
|
282
|
+
scope: project
|
|
283
|
+
- tool_id: yarn-workspace-lint
|
|
284
|
+
tool: "yarn workspace * lint"
|
|
285
|
+
scope: package
|
|
286
|
+
- tool_id: yarn-lint
|
|
287
|
+
tool: "yarn lint"
|
|
288
|
+
scope: project
|
|
289
|
+
- tool_id: ruff
|
|
290
|
+
tool: "ruff"
|
|
291
|
+
scope: project
|
|
292
|
+
- tool_id: flake8
|
|
293
|
+
tool: "flake8"
|
|
294
|
+
scope: project
|
|
295
|
+
- tool_id: pylint
|
|
296
|
+
tool: "pylint"
|
|
297
|
+
scope: project
|
|
298
|
+
- tool_id: golangci-lint
|
|
299
|
+
tool: "golangci-lint"
|
|
300
|
+
scope: project
|
|
301
|
+
- tool_id: cargo-clippy
|
|
302
|
+
tool: "cargo clippy"
|
|
303
|
+
scope: project
|
|
304
|
+
- tool_id: ktlint
|
|
305
|
+
tool: "ktlint"
|
|
306
|
+
scope: project
|
|
307
|
+
- tool_id: dotnet-format
|
|
308
|
+
tool: "dotnet format"
|
|
309
|
+
scope: project
|
|
310
|
+
clearing_threshold: 5
|
|
311
|
+
clearing_patterns:
|
|
312
|
+
- "**/*.ts"
|
|
313
|
+
- "**/*.tsx"
|
|
314
|
+
- "**/*.js"
|
|
315
|
+
- "**/*.jsx"
|
|
316
|
+
- "**/*.py"
|
|
317
|
+
- "**/*.java"
|
|
318
|
+
- "**/*.kt"
|
|
319
|
+
- "**/*.go"
|
|
320
|
+
- "**/*.rs"
|
|
321
|
+
|
|
66
322
|
# Smart completion detection settings
|
|
67
323
|
# Classifies assistant's stopping intent to avoid blocking when not claiming completion
|
|
68
324
|
completion_detection:
|
|
@@ -126,6 +126,44 @@ Users often specify both a methodology and a goal. The methodology is NOT the ti
|
|
|
126
126
|
If removing these leaves nothing meaningful, dig deeper into the transcript for the actual goal.
|
|
127
127
|
</heuristic>
|
|
128
128
|
</outcome_vs_approach>
|
|
129
|
+
<title_stability>
|
|
130
|
+
CRITICAL: The session title is an ANCHOR, not a weather vane.
|
|
131
|
+
|
|
132
|
+
When previousConfidence is >0.8, the title has been validated. It should only change
|
|
133
|
+
if the user genuinely pivots to a different task — not because they issued a
|
|
134
|
+
procedural or mechanical instruction.
|
|
135
|
+
|
|
136
|
+
<procedural_instructions>
|
|
137
|
+
These are session-ending mechanics, NOT session-defining work:
|
|
138
|
+
- Git operations: commit, push, pull, rebase, merge, stash, checkout, branch
|
|
139
|
+
- PR/review: create PR, open PR, merge PR, request review, approve
|
|
140
|
+
- Deployment: deploy, publish, release, push to remote
|
|
141
|
+
- Housekeeping: clean up, close issues, update status, run linters
|
|
142
|
+
|
|
143
|
+
When the most recent user message is procedural:
|
|
144
|
+
- session_title: KEEP the established title (do not change)
|
|
145
|
+
- latest_intent: Freely reflect the procedural action
|
|
146
|
+
- pivot_detected: false
|
|
147
|
+
</procedural_instructions>
|
|
148
|
+
|
|
149
|
+
<stability_bias>
|
|
150
|
+
Title change threshold scales with confidence:
|
|
151
|
+
- previousConfidence >0.8: Only change on genuine task pivot (new domain, new goal)
|
|
152
|
+
- previousConfidence 0.6-0.8: Refine freely (more specific on same topic),
|
|
153
|
+
but only pivot if the new direction is clearly unrelated
|
|
154
|
+
- previousConfidence <=0.5: Change freely — direction is still forming
|
|
155
|
+
|
|
156
|
+
Ask: "If someone reviewed this session tomorrow, would they say the user
|
|
157
|
+
switched projects — or just finished up their current one?"
|
|
158
|
+
</stability_bias>
|
|
159
|
+
|
|
160
|
+
<edge_cases>
|
|
161
|
+
- "Set up CI/CD pipeline" after working on a feature -> IS a pivot (new goal)
|
|
162
|
+
- "Push it" after working on a feature -> NOT a pivot (finishing current work)
|
|
163
|
+
- "Now let's work on the auth bug" -> IS a pivot (explicitly new task)
|
|
164
|
+
- "Create a PR for this" -> NOT a pivot (shipping current work)
|
|
165
|
+
</edge_cases>
|
|
166
|
+
</title_stability>
|
|
129
167
|
</session_title_rules>
|
|
130
168
|
|
|
131
169
|
<latest_intent_rules>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# vc-build.yaml
|
|
2
|
+
# Per-tool verification reminder: build step
|
|
3
|
+
id: vc-build
|
|
4
|
+
blocking: true
|
|
5
|
+
priority: 50
|
|
6
|
+
persistent: false
|
|
7
|
+
|
|
8
|
+
additionalContext: |
|
|
9
|
+
<vc-build>
|
|
10
|
+
You have modified source files but have not run a build step.
|
|
11
|
+
Run the project's build command before claiming completion.
|
|
12
|
+
</vc-build>
|
|
13
|
+
|
|
14
|
+
userMessage: "Verification needed: build not run since last code changes"
|
|
15
|
+
reason: "Source files modified without subsequent build verification"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# vc-lint.yaml
|
|
2
|
+
# Per-tool verification reminder: linting
|
|
3
|
+
id: vc-lint
|
|
4
|
+
blocking: true
|
|
5
|
+
priority: 50
|
|
6
|
+
persistent: false
|
|
7
|
+
|
|
8
|
+
additionalContext: |
|
|
9
|
+
<vc-lint>
|
|
10
|
+
You have modified source files but have not run the linter.
|
|
11
|
+
Run the project's lint command before claiming completion.
|
|
12
|
+
</vc-lint>
|
|
13
|
+
|
|
14
|
+
userMessage: "Verification needed: lint not run since last code changes"
|
|
15
|
+
reason: "Source files modified without subsequent lint verification"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# vc-test.yaml
|
|
2
|
+
# Per-tool verification reminder: test suite
|
|
3
|
+
id: vc-test
|
|
4
|
+
blocking: true
|
|
5
|
+
priority: 50
|
|
6
|
+
persistent: false
|
|
7
|
+
|
|
8
|
+
additionalContext: |
|
|
9
|
+
<vc-test>
|
|
10
|
+
You have modified source files but have not run tests.
|
|
11
|
+
Run the relevant test suite before claiming completion.
|
|
12
|
+
</vc-test>
|
|
13
|
+
|
|
14
|
+
userMessage: "Verification needed: tests not run since last code changes"
|
|
15
|
+
reason: "Source files modified without subsequent test verification"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# vc-typecheck.yaml
|
|
2
|
+
# Per-tool verification reminder: type checking
|
|
3
|
+
id: vc-typecheck
|
|
4
|
+
blocking: true
|
|
5
|
+
priority: 50
|
|
6
|
+
persistent: false
|
|
7
|
+
|
|
8
|
+
additionalContext: |
|
|
9
|
+
<vc-typecheck>
|
|
10
|
+
You have modified source files but have not run a type check.
|
|
11
|
+
Run the project's typecheck command before claiming completion.
|
|
12
|
+
</vc-typecheck>
|
|
13
|
+
|
|
14
|
+
userMessage: "Verification needed: typecheck not run since last code changes"
|
|
15
|
+
reason: "Source files modified without subsequent typecheck verification"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# verify-completion.yaml
|
|
2
|
-
#
|
|
2
|
+
# Wrapper reminder that aggregates per-tool VC reminders.
|
|
3
|
+
# Priority 51 ensures this is primary (consumed first); per-tool reminders at 50 are secondaries.
|
|
3
4
|
id: verify-completion
|
|
4
5
|
blocking: true
|
|
5
|
-
priority:
|
|
6
|
+
priority: 51
|
|
6
7
|
persistent: false
|
|
7
8
|
|
|
8
9
|
additionalContext: |
|
|
@@ -14,24 +15,8 @@ additionalContext: |
|
|
|
14
15
|
- The verification evidence is done just before this reminder was triggered.
|
|
15
16
|
- You're not claiming "done" but stopping to give an update or ask for more info.
|
|
16
17
|
|
|
17
|
-
Otherwise, this step is mandatory
|
|
18
|
-
|
|
19
|
-
For significant (more than just a few lines) code changes (only if not already done recently):
|
|
20
|
-
- Run build: `pnpm build` (excludes test files - both required)
|
|
21
|
-
- Run relevant tests: `pnpm test` (targeted tests for changed code)
|
|
22
|
-
- Run the `code-simplifier` agent to simplify and refine the code for clarity and maintainability.
|
|
23
|
-
- Run the `code-reviewer` agent to review your changes against the plan and coding standards.
|
|
24
|
-
- If your changes impact existing documentation that you haven't already updated,
|
|
25
|
-
inform the user and ask whether this should be updated as a next step.
|
|
26
|
-
|
|
27
|
-
General:
|
|
28
|
-
- Confirm all requirements from the original request are met
|
|
29
|
-
- Check for unintended side effects or regressions
|
|
30
|
-
- Ensure no temporary files, debug code, or stray changes remain
|
|
31
|
-
- DON'T COMMIT unless explicitly instructed. User says "make changes" ≠ "commit changes". Wait for explicit approval.
|
|
18
|
+
Otherwise, this step is mandatory. The following verification steps are outstanding:
|
|
32
19
|
</completion-verification-required>
|
|
33
|
-
For Code Changes:
|
|
34
20
|
|
|
35
21
|
userMessage: "Asking the agent to verify completion before stopping..."
|
|
36
|
-
|
|
37
|
-
reason: "Verify completion before stopping - did you run tests and checks?"
|
|
22
|
+
reason: "Verify completion before stopping - outstanding verification steps detected"
|