@wrongstack/core 0.308.0 → 0.308.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.
Files changed (53) hide show
  1. package/dist/coordination/agents/index.js +4 -4
  2. package/dist/coordination/index.js +5 -4
  3. package/dist/core/index.js +1 -1
  4. package/dist/defaults/index.js +5 -4
  5. package/dist/execution/index.js +4 -4
  6. package/dist/index.js +7 -5
  7. package/dist/storage/index.js +1 -0
  8. package/dist/tools/index.js +4 -4
  9. package/dist/types/config/ui.d.ts +1 -1
  10. package/dist/types/index.js +2 -1
  11. package/dist/types/runtime-capability-manifest.d.ts +1 -1
  12. package/instructions/agents/backend.md +3 -0
  13. package/instructions/agents/bug-hunter.md +3 -0
  14. package/instructions/agents/code-reviewer.md +1 -0
  15. package/instructions/agents/frontend.md +2 -0
  16. package/instructions/agents/test.md +2 -0
  17. package/instructions/modes/code-reviewer.md +1 -1
  18. package/instructions/modes/debugger.md +2 -2
  19. package/instructions/modes/refactorer.md +2 -2
  20. package/instructions/modes/tester.md +2 -2
  21. package/instructions/system-lite.md +37 -33
  22. package/instructions/system-pro.md +23 -7
  23. package/instructions/system.md +33 -11
  24. package/package.json +4 -3
  25. package/skills/api-design/SKILL.md +26 -1
  26. package/skills/audit-log/SKILL.md +22 -1
  27. package/skills/auto-review/SKILL.md +21 -1
  28. package/skills/bug-hunter/SKILL.md +8 -0
  29. package/skills/chimera/SKILL.md +9 -0
  30. package/skills/data-governance/SKILL.md +25 -1
  31. package/skills/design-system/SKILL.md +19 -1
  32. package/skills/docker-deploy/SKILL.md +26 -1
  33. package/skills/git-flow/SKILL.md +26 -1
  34. package/skills/mailbox-bridge/SKILL.md +25 -1
  35. package/skills/mnemosyne/SKILL.md +25 -2
  36. package/skills/multi-agent/SKILL.md +12 -0
  37. package/skills/node-modern/SKILL.md +28 -1
  38. package/skills/observability/SKILL.md +25 -1
  39. package/skills/output-standards/SKILL.md +28 -1
  40. package/skills/plugin-author/SKILL.md +31 -1
  41. package/skills/prompt-engineering/SKILL.md +27 -1
  42. package/skills/react-modern/SKILL.md +29 -1
  43. package/skills/refactor-planner/SKILL.md +10 -0
  44. package/skills/research-web/SKILL.md +28 -1
  45. package/skills/sdd/SKILL.md +18 -0
  46. package/skills/security-scanner/SKILL.md +25 -1
  47. package/skills/skill-creator/SKILL.md +25 -1
  48. package/skills/tech-stack/SKILL.md +25 -1
  49. package/skills/testing/SKILL.md +25 -1
  50. package/skills/typescript-strict/SKILL.md +30 -1
  51. package/skills/wrongstack-kanban/SKILL.md +24 -0
  52. package/skills/wrongstack-mailbox/SKILL.md +29 -1
  53. package/skills/wrongstack-mailbox-mcp/SKILL.md +30 -3
@@ -32,9 +32,18 @@ This parse is **internal reasoning**, not something you output. It keeps you anc
32
32
  ## Core principles
33
33
 
34
34
  1. **Read before you write.** Inspect the relevant files before proposing changes — assumptions about code you haven't read are bugs in waiting. When unsure about a file's current state, read it rather than guessing.
35
+ <!--ws:if tool=codebase-skeleton-->
36
+ Inspect signatures, exports, and types with `codebase-skeleton` before a full file `read` to preserve context.
37
+ <!--ws:end-->
38
+ <!--ws:if tool=codebase-search-->
39
+ Search code symbols and concepts with `codebase-search` before broad `grep`/`glob`/`tree`.
40
+ <!--ws:end-->
35
41
  <!--ws:if tool=codebase-incoming-calls-->
36
42
  When refactoring or tracing usages of a function/symbol, use `codebase-incoming-calls` instead of `grep` to find all callers instantly.
37
43
  <!--ws:end-->
44
+ <!--ws:if tool=codebase-impact-analysis-->
45
+ Run `codebase-impact-analysis` before changing a public signature or type to gauge blast radius.
46
+ <!--ws:end-->
38
47
  <!--ws:if tool=edit,write-->
39
48
  2. **Prefer surgical edits over rewrites.** Modify existing files with the live mutation tools; prefer a surgical edit over a full replacement.
40
49
  <!--ws:else-->
@@ -121,7 +130,7 @@ Parking records that a card needs something you do not have; it never sheds scop
121
130
 
122
131
  | Need | Tool | When |
123
132
  |---|---|---|
124
- | **Any actionable project work** | **`kanban`** | Mandatory durable execution record, from one atomic leaf to a multi-board programme |
133
+ | **Substantial or multi-step project work** | **`kanban`** | Mandatory durable execution record, from one atomic leaf to a multi-board program |
125
134
  | Compact active-task view | `todo` | UI projection of real Kanban task ids; never a second task store |
126
135
  | Strategic explanation | `plan` | Optional roadmap linked to the board; execution remains in Kanban |
127
136
  | Cross-session reference | `task` | Optional external reference; the executable work remains in Kanban |
@@ -192,9 +201,12 @@ No task-tracking tool is registered in this request. Keep multi-step work visibl
192
201
 
193
202
  Your capabilities arrive as tool groups, each with a distinct purpose. The groups below are the ones registered for **this** request; a group whose tools are absent is omitted rather than described. The live provider tool definitions remain authoritative for exact names and parameters.
194
203
 
195
- <!--ws:if tool=read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,codebase-search,codebase-incoming-calls,codebase-outgoing-calls,codebase-skeleton,codebase-repo-map,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check-->
204
+ <!--ws:if tool=read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,clarify,codebase-search,codebase-incoming-calls,codebase-outgoing-calls,codebase-skeleton,codebase-repo-map,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check-->
196
205
  ### Filesystem & Project insight
197
- {{tools:read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check}}
206
+ {{tools:read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,clarify,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check}}
207
+ <!--ws:if tool=clarify-->
208
+ - `clarify` only when an architectural fork is truly irreversible or destructive with no obvious standard default. Otherwise, autonomously apply industry best practices, advance through next steps, and state decisions in your final response.
209
+ <!--ws:end-->
198
210
  <!--ws:if tool=codebase-search-->
199
211
  - Prefer `codebase-search` before broad `grep`/`glob`/`tree` exploration for code understanding.
200
212
  <!--ws:else-->
@@ -234,10 +246,13 @@ Your capabilities arrive as tool groups, each with a distinct purpose. The group
234
246
  <!--ws:end-->
235
247
  <!--ws:end-->
236
248
 
237
- <!--ws:if tool=lint,format,typecheck,test,codebase-targeted-test,e2e_plan,language,language_info,language_package-->
249
+ <!--ws:if tool=lint,format,typecheck,test,codebase-targeted-test,security-ast-scan,e2e_plan,language,language_info,language_package-->
238
250
  ### Code quality
239
- {{tools:lint,format,typecheck,test,codebase-targeted-test,e2e_plan,language,language_info,language_package}}
251
+ {{tools:lint,format,typecheck,test,codebase-targeted-test,security-ast-scan,e2e_plan,language,language_info,language_package}}
240
252
  - Run the narrowest appropriate verification from the tools above before calling changed code complete.
253
+ <!--ws:if tool=security-ast-scan-->
254
+ - `security-ast-scan` to detect contract-based security and performance flaws (N+1 database queries, SQL injection, hardcoded secrets, prototype pollution, ReDoS, unsafe eval) on new or edited code.
255
+ <!--ws:end-->
241
256
  <!--ws:if tool=codebase-targeted-test-->
242
257
  - `codebase-targeted-test` immediately after mutating a symbol or file — run only the covering suites.
243
258
  <!--ws:end-->
@@ -252,12 +267,15 @@ Your capabilities arrive as tool groups, each with a distinct purpose. The group
252
267
  <!--ws:end-->
253
268
  <!--ws:end-->
254
269
 
255
- <!--ws:if tool=bash,exec-->
270
+ <!--ws:if tool=bash,exec,pwsh-->
256
271
  ### Execution
257
- {{tools:bash,exec}}
272
+ {{tools:bash,exec,pwsh}}
258
273
  <!--ws:if tool=exec-->
259
274
  - `exec` is the safer shell tool — use it when the command is allowlisted (node, git, pnpm, tsc, etc.) and needs no pipes/redirection.
260
275
  <!--ws:end-->
276
+ <!--ws:if tool=pwsh-->
277
+ - `pwsh` to run PowerShell 7 commands on Windows in a stateless process with native paths (`C:\...`), `$env:VAR`, and core cmdlets. Pass `workdir` instead of `cd`.
278
+ <!--ws:end-->
261
279
  <!--ws:if tool=bash-->
262
280
  - `bash` for everything else — pipes, redirection, full shell access.
263
281
  <!--ws:end-->
@@ -275,9 +293,9 @@ Your capabilities arrive as tool groups, each with a distinct purpose. The group
275
293
  <!--ws:end-->
276
294
  <!--ws:end-->
277
295
 
278
- <!--ws:if tool=remember,forget,memory_search,memory_graph,memory_update,memory_delete,pin_add,pin_remove,pin_list-->
296
+ <!--ws:if tool=remember,forget,memory_search,memory_graph,memory_update,memory_delete,memory_candidates,memory_for_file,memory_for_path,pin_add,pin_remove,pin_list-->
279
297
  ### Memory & Knowledge
280
- {{tools:remember,forget,memory_search,memory_graph,memory_update,memory_delete,pin_add,pin_remove,pin_list}}
298
+ {{tools:remember,forget,memory_search,memory_graph,memory_update,memory_delete,memory_candidates,memory_for_file,memory_for_path,pin_add,pin_remove,pin_list}}
281
299
  <!--ws:if tool=remember-->
282
300
  - Use **remember** for durable conventions, decisions, preferences, and important codebase facts — not for every transient detail.
283
301
  <!--ws:end-->
@@ -387,9 +405,9 @@ A worker that realizes its task will run long should mail the leader (type `stee
387
405
  - Automatically injected raw mail is visible for one model evaluation only. Preserve a concise conclusion/action when it matters later; otherwise absorb it and continue without quoting or restating it.
388
406
  <!--ws:end-->
389
407
 
390
- <!--ws:if tool=browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_screenshot,browser_evaluate-->
408
+ <!--ws:if tool=browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_select,browser_press,browser_screenshot,browser_close,browser_evaluate-->
391
409
  ### Browser (E2E / UI testing)
392
- {{tools:browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_screenshot,browser_evaluate}}
410
+ {{tools:browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_select,browser_press,browser_screenshot,browser_close,browser_evaluate}}
393
411
  <!--ws:if tool=browser_open-->
394
412
  - Use `browser_open` to launch an isolated Playwright session.
395
413
  <!--ws:end-->
@@ -399,6 +417,9 @@ A worker that realizes its task will run long should mail the leader (type `stee
399
417
  <!--ws:if tool=browser_screenshot-->
400
418
  - `browser_screenshot` for visual verification.
401
419
  <!--ws:end-->
420
+ <!--ws:if tool=browser_select,browser_press,browser_close-->
421
+ - `browser_select` / `browser_press` for form-like interactions; `browser_close` when the session is no longer needed.
422
+ <!--ws:end-->
402
423
  <!--ws:end-->
403
424
 
404
425
  <!--ws:if tool=tool_search,tool_help,batch_tool_use,tool_use,set_working_dir,context_manager,mcp_control,mcp_use-->
@@ -749,6 +770,7 @@ Call live tools directly and let the permission flow decide — don't pre-announ
749
770
  - **Empty results are successes, not failures.** No matches / no lines / no output means the call worked and found nothing. Never repeat the identical call — interpret the result (empty read at offset = end of file; empty grep = no matches) and adjust.
750
771
  - **A denial is final.** If the user denies a tool call via the permission prompt, do not retry it and do not work around it with another tool. Acknowledge the denial and ask: "What would you like me to do instead?"
751
772
  - **Two failures in the same place means your model is wrong.** Stop iterating on the fix and re-read the source or the actual error — a third identical attempt is never the answer.
773
+ - **Never expose or request secrets unnecessarily.** Refer to secrets by name or path, not by value, in logs, reports, and messages.
752
774
  <!--ws:if tool=context_manager-->
753
775
  - **Context filling up** → use `context_manager` proactively.
754
776
  <!--ws:else-->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/core",
3
- "version": "0.308.0",
3
+ "version": "0.308.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack core: kernel, types, defaults, and shared utilities for the WrongStack CLI agent.",
6
6
  "repository": {
@@ -181,8 +181,8 @@
181
181
  "wrongstackApiVersion": "0.1.10",
182
182
  "dependencies": {
183
183
  "zod": "4.4.3",
184
- "@wrongstack/persistence": "0.308.0",
185
- "@wrongstack/kanban": "0.308.0"
184
+ "@wrongstack/kanban": "0.308.1",
185
+ "@wrongstack/persistence": "0.308.1"
186
186
  },
187
187
  "devDependencies": {
188
188
  "@types/node": "^26.2.0",
@@ -198,6 +198,7 @@
198
198
  "build": "node ../../scripts/build-package.mjs",
199
199
  "build:prompts": "node scripts/build-prompts.mjs",
200
200
  "typecheck": "tsc --noEmit",
201
+ "test": "vitest run --root ../.. packages/core/tests",
201
202
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
202
203
  }
203
204
  }
@@ -4,7 +4,7 @@ description: |
4
4
  Use this skill when designing, reviewing, or refactoring REST APIs in WrongStack.
5
5
  Triggers: user says "API", "endpoint", "REST", "request", "response", "JSON",
6
6
  "HTTP", "status code", "pagination", "query params", "request body".
7
- version: 1.0.0
7
+ version: 1.1.0
8
8
  required-capabilities: [filesystem.read]
9
9
  required-tools: []
10
10
  optional-capabilities: [filesystem.write, verification.run]
@@ -134,6 +134,31 @@ Body: { "status": "paused" }
134
134
  - **Session management**: Sessions are created/managed via the CLI, not a public REST API.
135
135
  - **MCP tools**: MCP servers expose tools, not REST endpoints — this skill is for any HTTP APIs WrongStack exposes.
136
136
 
137
+ ## Out of scope
138
+
139
+ - **Don't design MCP tool surfaces here.** MCP servers expose tools, not REST endpoints. For tool registration, plugin contract, and tool description, see the `plugin-author` skill instead.
140
+ - **Don't design WrongStack session management as a public API.** Sessions are created and managed through the CLI's internal tool wrappers, not a public REST surface. This skill is for the HTTP APIs WrongStack exposes outward.
141
+ - **Don't ship inconsistent error shapes.** Every error uses `{ "error": { "code", "message", "details?" } }`. Variations break automation that depends on the shape.
142
+ - **Don't put secrets in URLs.** `?apiKey=…` is a leak. Headers — `Authorization` and `X-API-Key` — are the only auth channels.
143
+ - **Don't use offset pagination for large datasets.** Cursor-based only. Offset pagination breaks on insert/delete; gaps and duplicates follow.
144
+ - **Don't return 200 for errors.** The status code is the contract; `200` with an error body lies about the outcome. Use the right code.
145
+ - **Don't use singular nouns for collections.** `/sessions` not `/session`. The resource is the set; the item is `/sessions/:id`.
146
+ - **Don't ship breaking changes without a `/v1/` prefix.** Versioning is a contract with the consumer; renames are breaking.
147
+ - **Don't accept client-side validation as a substitute.** Validate on the server, return `400` with field-level errors. The client is an untrusted input source.
148
+
149
+ ## Before returning
150
+
151
+ - [ ] Conventional HTTP status codes used; no `200` for errors
152
+ - [ ] Error shape consistent: `{ "error": { "code", "message", "details? } }`
153
+ - [ ] Plural nouns for resources; `/v1/` prefix for breaking-change endpoints
154
+ - [ ] Cursor-based pagination for large datasets, not offset
155
+ - [ ] Auth in headers (`Authorization: Bearer`, `X-API-Key`); no secrets in URLs
156
+ - [ ] Server-side validation with `400` + field-level errors
157
+ - [ ] Idempotency rules followed: `POST` creates, `PUT` replaces
158
+ - [ ] `sdd` spec opened for non-trivial endpoints before coding
159
+ - [ ] `security-scanner` run on the implementation
160
+ - [ ] `<nextsteps>` mirrors the open follow-ups in priority order
161
+
137
162
  ## Skills in scope
138
163
 
139
164
  - `sdd` — for spec-driven API design with acceptance criteria
@@ -4,7 +4,7 @@ description: |
4
4
  Use this skill when analyzing WrongStack session logs, event streams, or
5
5
  system traces to surface patterns, anomalies, or operational insights.
6
6
  Triggers: user says "audit", "session analysis", "log analysis", "usage patterns".
7
- version: 1.2.0
7
+ version: 1.3.0
8
8
  required-capabilities: [filesystem.read, code.inspect]
9
9
  required-tools: [bash, exec, grep, read]
10
10
  ---
@@ -170,6 +170,27 @@ Investigate iterations 14–20 in the session log for the bash command timeout p
170
170
  - **Don't ignore cost trends** — growing costs indicate context bloat
171
171
  - **Don't ignore repeated failures** — same tool failing 5x = real issue
172
172
 
173
+ ## Out of scope
174
+
175
+ - **Don't summarize sessions you didn't parse.** Cite the data: iteration, tool name, error message. Reports without counts and citations are guesses.
176
+ - **Don't mix sessions without labeling.** Either analyze one session at a time, or aggregate with clear per-session breakdown. Combined-with-no-labels is fake coverage.
177
+ - **Don't treat repeated failures as noise.** Same tool failing 5+ times is a real issue, not background. Report the concentration.
178
+ - **Don't ignore cost trends.** A spike from $0.04/iter to $0.11/iter means context growth, not a model change. Cost trend is a leading indicator.
179
+ - **Don't claim a cost cause you didn't verify.** "Probably the model is more expensive" is not analysis. State the iteration, the token count, the file reads, and the cause the data supports.
180
+ - **Don't run live session mutations.** This skill is read-only over the JSONL stream. No state changes to sessions, no live editing of logs.
181
+ - **Don't bypass session boundaries.** Each session's events stand on their own; cross-session analysis is a separate scope, not a free hand to mix.
182
+
183
+ ## Before returning
184
+
185
+ - [ ] Parsed from the source JSONL, not from summaries or memory
186
+ - [ ] One session analyzed at a time, or aggregate with explicit per-session labels
187
+ - [ ] Every claim cites the data: iteration number, tool name, error message, cost figure
188
+ - [ ] Repeated failures (same tool, 5+ times) called out, not folded into noise
189
+ - [ ] Cost trend reported in context of iteration count, not in isolation
190
+ - [ ] No session log mutated; read-only held
191
+ - [ ] Summary counts match the findings listed; nothing padded
192
+ - [ ] Anomalies named with a probable cause the data supports
193
+
173
194
  ## Skills in scope
174
195
 
175
196
  - `bug-hunter` — for turning audit findings into concrete bugs to fix
@@ -6,7 +6,7 @@ description: |
6
6
  code change during a session.
7
7
  Triggers: user says "auto review", "otomatik review", "auto code review",
8
8
  "her değişiklikte review", "/auto-review".
9
- version: 2.0.0
9
+ version: 2.1.0
10
10
  required-capabilities: [version-control.manage]
11
11
  required-tools: [git]
12
12
  optional-capabilities: [fleet.delegate, verification.run]
@@ -106,6 +106,26 @@ and `maxCascadeDepth` config values are compatibility-only and resolve to the
106
106
  passive policy. The user can inspect the mailbox and explicitly ask the leader
107
107
  to act later.
108
108
 
109
+ ## Out of scope
110
+
111
+ - **Don't enable auto-review without `--director`.** The subagent pipeline requires Director mode; without it, review events silently skip. Verify the director is on before flipping the plugin.
112
+ - **Don't start the plugin while a session is mid-flight without a clear contract.** Auto-review dispatches reviewers at trailing-quiet windows; the user has to know it's running.
113
+ - **Don't read untracked files.** `??` files are never reviewed. If a reviewer needs a file, the workflow must have it staged or tracked first.
114
+ - **Don't manually trigger a fix from a report.** Auto-review is passive — the report goes to the mailbox and notifies UIs. A follow-up fix is a separate user-initiated turn.
115
+ - **Don't re-route the report to mailbox peers or the leader.** Runtime handles persistence and notification. Manual mailbox traffic from auto-review is double-handling.
116
+ - **Don't tune `maxFilesPerBatch` above 15** without measuring cost. Larger batches cut parallelism gains and inflate single-review latency.
117
+ - **Don't set the debounce below 5s.** Too-aggressive debounce starts reviews while the user is still mid-edit; they hit a reviewer they didn't ask for.
118
+
119
+ ## Before reporting
120
+
121
+ - [ ] `--director` mode is on (auto-review requires it)
122
+ - [ ] `enabled: true` is set in `config.extensions['wstack-auto-review']`
123
+ - [ ] `git` is available in the session working directory
124
+ - [ ] Only git-tracked files are reviewed; untracked files skipped
125
+ - [ ] Reports go to the mailbox + `chimera.report_available` notification, not to peer mail
126
+ - [ ] No mutating follow-up spawned from the report (passive completion)
127
+ - [ ] Debounce and `maxFilesPerBatch` tuned for the workload, not at default
128
+
109
129
  ## Skills in scope
110
130
 
111
131
  - `chimera` — for the review output format and severity rules
@@ -280,6 +280,14 @@ sizing and briefing rules before dispatching.
280
280
 
281
281
  ---
282
282
 
283
+ ## Out of scope
284
+
285
+ - **Don't fix the bugs you find in default mode.** Standalone scans produce a report only. Apply fixes only when the user explicitly asks, or when the runtime dispatches you as a cascade agent behind chimera.
286
+ - **Don't review code quality, design, or style.** Wrong file, wrong skill. Quality and design are `chimera`'s read-only lane; style is the linter's job. Hand off to `chimera` for read-only quality review, or to `refactor-planner` for multi-file restructuring.
287
+ - **Don't run dependency audits or scan `node_modules`.** Supply chain and lockfile scanning are `security-scanner`'s lane. Hand off cleanly.
288
+ - **Don't write tests for the bugs you find.** Test authoring is `testing`'s lane. State the failing test that would catch the bug; don't write it.
289
+ - **Don't start a `multi-agent` fan-out on your own.** The leader decides when fan-out is the right tool. Report the size of the target; let the leader dispatch.
290
+
283
291
  ## Skills in scope
284
292
 
285
293
  - `security-scanner` — for hardcoded secrets and injection vectors
@@ -246,6 +246,15 @@ files you were never shown is worse than an honest gap.
246
246
 
247
247
  ---
248
248
 
249
+ ## Out of scope
250
+
251
+ - **Don't mutate files.** This skill is strictly read-only. If the user wants fixes applied, hand the report to `bug-hunter` (cascade mode) or `security-scanner`. Never edit, write, format, rename, or delete.
252
+ - **Don't review code style, formatting, naming, or lint findings.** Those are the linter's job and add noise without value. Quality and behavioral findings only.
253
+ - **Don't re-litigate decisions the session already discussed.** If the session chose a tradeoff, the choice is final for this review. Cite "session discussed" in the fix line and move on.
254
+ - **Don't expand scope to files outside the provided list.** The file list is the boundary. Pre-existing code in a changed file is fair game only when the change made it reachable, worse, or invalidated its assumptions — say so.
255
+ - **Don't send mailbox messages to peers, the user, or broadcast.** Runtime handles persistence and notification. Mail to `to="leader"` with `audience="leaders"` is the only acceptable exception, and only when a blocker cannot wait.
256
+ - **Don't trigger a re-review loop, fix agent, or mutating follow-up.** The report is terminal. Legacy `autoFix`/`cascadeOn`/`maxCascadeDepth` do not authorize a leader turn.
257
+
249
258
  ## Skills in scope
250
259
 
251
260
  - `bug-hunter` — for systematic bug detection patterns
@@ -6,7 +6,7 @@ description: |
6
6
  WrongStack services and stores.
7
7
  Triggers: user says "data governance", "PII", "schema ownership", "retention policy", "data lineage", "migration safety".
8
8
  trigger: Use when designing or reviewing schema ownership, PII handling, retention, data lineage, access policy, or migration safety.
9
- version: 1.0.0
9
+ version: 1.1.0
10
10
  required-capabilities: [filesystem.read]
11
11
  required-tools: []
12
12
  optional-capabilities: [code.inspect]
@@ -87,6 +87,30 @@ db.query('SELECT email FROM users WHERE ...'); // from a service that doesn't ow
87
87
  - **Don't ship destructive migrations without rollback** — every change is reversible until proven otherwise
88
88
  - **Don't treat "internal" as "not sensitive"** — internal data still needs access policy and retention
89
89
 
90
+ ## Out of scope
91
+
92
+ - **Don't log restricted fields at any call site.** Redaction lives at the serialization boundary, not at each `logger.info(user)`. A single missed redaction is a PII leak.
93
+ - **Don't share tables across services.** Cross-service reads against a table you don't own bypass the owning service's policy. Use the owning service's API.
94
+ - **Don't ship destructive migrations without a rollback plan.** One-phase drops are not policy. Deprecate → drop across releases, with a documented rollback.
95
+ - **Don't classify "internal" as "not sensitive".** Internal data still needs access policy and retention. The four classes are `public`, `internal`, `sensitive`, `restricted` — they each carry different obligations.
96
+ - **Don't design retention ad hoc.** Every persisted entity has an explicit TTL or purge cadence, and an honored right-to-erase path. "Keep forever" is not a policy.
97
+ - **Don't invent lineage in the application code.** Derived data records its source columns and versions in the schema, not in scattered comments. Lineage is queryable.
98
+ - **Don't accept "two services writing the same table" as a stopgap.** Orphaned ownership is a finding, not a workaround. Pick an owner; migrate the other side to the API.
99
+ - **Don't pass through the migration without a dry-run.** Phase 1 forward + Phase 1 rollback + verification are required before Phase 2 ships.
100
+
101
+ ## Before returning
102
+
103
+ - [ ] Every persisted entity has exactly one owning service; cross-service access goes through that service's API
104
+ - [ ] Every field classified as public / internal / sensitive / restricted
105
+ - [ ] Restricted fields encrypted at rest; redacted at the serialization boundary
106
+ - [ ] No restricted fields in logs, errors, or stack traces
107
+ - [ ] Schema changes have forward migration + documented rollback
108
+ - [ ] Destructive changes are two-phase: deprecate → drop across releases
109
+ - [ ] Retention TTL/purge cadence explicit per entity; right-to-erase path verifiable
110
+ - [ ] Derived data records source columns/versions; lineage queryable
111
+ - [ ] Dry-run run on the migration before Phase 2 ships
112
+ - [ ] `<nextsteps>` lists each open migration, classification gap, or retention fix
113
+
90
114
  ## Skills in scope
91
115
 
92
116
  - `security-scanner` — for encryption-at-rest, secret handling, and access-control review
@@ -15,7 +15,7 @@ description: |
15
15
  "make it look better", "clean up the layout", "it looks generic", "match our
16
16
  brand", "add dark mode". Trigger even when the user never says the word
17
17
  "design" — if the output has pixels, this skill runs first.
18
- version: 2.0.0
18
+ version: 2.1.0
19
19
  required-capabilities: [filesystem.read, filesystem.write, documentation.author]
20
20
  required-tools: [design]
21
21
  optional-capabilities: [browser.interact]
@@ -291,6 +291,16 @@ made and re-litigating them wastes everyone's time.
291
291
 
292
292
  ---
293
293
 
294
+ ## Out of scope
295
+
296
+ - **Don't ship unstyled framework defaults.** Default Tailwind, default shadcn, stock Bootstrap, or "I'll pick colors as I go" all produce forgettable UI with no source of truth. The Design Studio engine is the path; skipping it is a fail.
297
+ - **Don't write UI before committing a kit.** Picking a kit is the first step. Code that exists before a kit has been committed is exactly the code that needs restyling, not patching.
298
+ - **Don't hand-tune individual tokens to fix one-off screens.** Knobs (`radius`, `density`, `font`, `motion`) rescale the whole system coherently. A hand-edited radius leaves five scale steps untouched; the result reads as sloppy.
299
+ - **Don't use framework palette colors directly.** `bg-blue-500`, `text-gray-700`, `dark:bg-slate-900` are not part of the kit and break dark mode. Use the semantic tokens the materialized file exposes.
300
+ - **Don't override foundations.** Accessibility, responsiveness, reduced motion, and WCAG 2.2 AA are the floor. No kit or user override lowers them.
301
+ - **Don't restyle shadcn primitives per-usage.** They inherit the kit once the theme file is imported. Restyle at the token level, not per screen.
302
+ - **Don't deliver a UI without light + dark + every interactive state.** Default, hover, `:focus-visible`, active, disabled, loading, empty, error. A happy-path-only screen is an unfinished screen.
303
+
294
304
  ## Before saying you're done
295
305
 
296
306
  - Kit committed with the correct `stack`, and named to the user.
@@ -300,3 +310,11 @@ made and re-litigating them wastes everyone's time.
300
310
  - Interactive states and empty/loading/error states present.
301
311
  - Keyboard path works; focus rings visible.
302
312
  - `design {action:"verify"}` clean.
313
+
314
+ ## Skills in scope
315
+
316
+ - `react-modern` — for React 19+ component patterns that consume the tokens
317
+ - `typescript-strict` — for typing theme constants, `lightTheme` / `darkTheme` exports
318
+ - `plugin-author` — when shipping a tool that emits design-system output
319
+ - `output-standards` — for the `<nextsteps>` shape in design audit / verify reports
320
+ - `sdd` — for spec-driven design system work that crosses packages
@@ -5,7 +5,7 @@ description: |
5
5
  with Docker. Triggers: user says "docker", "container", "dockerfile",
6
6
  "image", "docker-compose", "deploy", "containerize", "registry",
7
7
  "multi-stage", "distroless".
8
- version: 1.0.0
8
+ version: 1.1.0
9
9
  required-capabilities: [filesystem.read, filesystem.write, execution.shell]
10
10
  required-tools: []
11
11
  ---
@@ -149,6 +149,31 @@ trivy image --exit-code 1 --ignore-unfixed --severity HIGH,CRITICAL wrongstack:$
149
149
  - **Session storage**: Sessions are stored at `WRONGSTACK_SESSION_ROOT` — mount a volume for persistence.
150
150
  - **Config**: Config is at `WRONGSTACK_CONFIG_DIR` — mount for config persistence across restarts.
151
151
 
152
+ ## Out of scope
153
+
154
+ - **Don't run as root in the container.** A non-root user is mandatory. A container compromise that lands root on the host is the failure this rule exists to prevent.
155
+ - **Don't use `node:latest` or unversioned base images.** Pin to `node:22-alpine` (or current). Reproducibility starts at the base.
156
+ - **Don't bake secrets into the image.** Pass via environment variables at runtime. A `RUN echo $API_KEY > /app/config.key` is a permanent secret in the image layer.
157
+ - **Don't skip the `.dockerignore`.** Without it, `node_modules`, `dist`, `.git`, and `*.test.ts` end up in the image — bigger, slower, more attack surface.
158
+ - **Don't tag production images `latest`.** Tag with the git SHA. `latest` is a moving target; production needs a specific commit.
159
+ - **Don't ship without a `HEALTHCHECK`.** Orchestrators need a probe; an image without one can't be load-balanced cleanly.
160
+ - **Don't skip image scanning.** `trivy image` or `docker scout` before push. Critical vulnerabilities are blocking.
161
+ - **Don't mix build and runtime stages.** Multi-stage is the rule: build with dev deps, runtime with production deps only. A 1GB image is a build hygiene failure.
162
+ - **Don't deploy without persistent volume mounts.** Sessions at `WRONGSTACK_SESSION_ROOT` and config at `WRONGSTACK_CONFIG_DIR` need volumes; container restarts lose data otherwise.
163
+
164
+ ## Before returning
165
+
166
+ - [ ] Multi-stage build; runtime stage is production-deps only
167
+ - [ ] Base image pinned to a specific tag (`node:22-alpine`, not `latest`)
168
+ - [ ] Non-root user; `USER wrongstack` set before `ENTRYPOINT`
169
+ - [ ] Secrets via env at runtime, not baked into the image
170
+ - [ ] `.dockerignore` excludes `node_modules`, `dist`, `.git`, `*.test.ts`
171
+ - [ ] Image tagged with git SHA, not `latest`
172
+ - [ ] `HEALTHCHECK` directive points to the CLI's self-check command
173
+ - [ ] `trivy image` or `docker scout` run before push; critical vulns blocked
174
+ - [ ] Volumes mounted for `WRONGSTACK_SESSION_ROOT` and `WRONGSTACK_CONFIG_DIR`
175
+ - [ ] Build runs from repo root with `pnpm build` before `docker build` (workspace order)
176
+
152
177
  ## Skills in scope
153
178
 
154
179
  - `security-scanner` — for scanning Dockerfiles and container configs for vulnerabilities
@@ -4,7 +4,7 @@ description: |
4
4
  Use this skill when proposing, reviewing, or troubleshooting git commits,
5
5
  branches, pull requests, or merge strategies in a WrongStack project session.
6
6
  Triggers: user mentions "commit", "branch", "PR", "merge", "rebase", "stash", "diff".
7
- version: 1.2.0
7
+ version: 1.3.0
8
8
  required-capabilities: [version-control.manage]
9
9
  required-tools: [test]
10
10
  ---
@@ -154,6 +154,31 @@ git rebase main && git merge --ff-only feature
154
154
  Open a PR at GitHub linking to issue #123 with the commit message describing the fix.
155
155
  ```
156
156
 
157
+ ## Out of scope
158
+
159
+ - **Don't force-push shared branches.** `--force-with-lease` on your own branch is the cap; shared branches get a PR + merge, never a force.
160
+ - **Don't commit lockfile changes with logic changes.** Separate commits, separate rollbacks. A lockfile muddied with a feature commit is impossible to bisect.
161
+ - **Don't make "Update stuff" mega-commits.** One concern per commit. 15 packages in one commit is process for process's sake.
162
+ - **Don't branch from branches.** Always branch from `main` or a stable release tag. Branching from a feature branch is git history debt.
163
+ - **Don't write a "what" commit message.** "fix: fixed bug" tells the reader nothing. Subject ≤ 72 chars, imperative mood, body explains why.
164
+ - **Don't `git reset --hard` with uncommitted work.** Stash first. A hard reset that loses work is the kind of incident a `git-flow` skill exists to prevent.
165
+ - **Don't amend a pushed commit.** It rewrites shared history. Open a follow-up commit or revert.
166
+ - **Don't leave WIP commits on `main`.** Use `git stash` or a feature branch, not a commit message like "WIP".
167
+ - **Don't skip self-review.** Self-review the diff before requesting review. Sending a diff the author hasn't read wastes the reviewer's time.
168
+
169
+ ## Before returning
170
+
171
+ - [ ] Branch is from `main` or a stable release tag, not from another feature branch
172
+ - [ ] One concern per commit; lockfile changes isolated
173
+ - [ ] Subject ≤ 72 chars, imperative, no trailing period; body explains why
174
+ - [ ] Issue reference included (`Fix #123` or `Closes GH-456`)
175
+ - [ ] Self-review done before requesting review
176
+ - [ ] No `git push --force` to shared branches; `--force-with-lease` only on own branch
177
+ - [ ] Branch deleted after merge (unless shared or releasing)
178
+ - [ ] PR title follows commit format; body links the issue and lists changed files
179
+ - [ ] No `WIP` or "Update stuff" commits in the history
180
+ - [ ] `<nextsteps>` mirrors the recommended commit/PR actions
181
+
157
182
  ## Skills in scope
158
183
 
159
184
  - `refactor-planner` — when a refactor involves multiple git-managed changes
@@ -8,7 +8,7 @@ description: |
8
8
  bridge". Starts a loopback HTTP façade over the same GlobalMailbox that
9
9
  WrongStack-internal agents already share, so any agent with curl or
10
10
  fetch can read, send, and acknowledge messages.
11
- version: 1.0.0
11
+ version: 1.1.0
12
12
  required-capabilities: [execution.shell]
13
13
  required-tools: []
14
14
  optional-capabilities: [web.research]
@@ -342,6 +342,30 @@ is 15 s.
342
342
  audit trails of which external agent called which route are needed,
343
343
  the agent itself should log them client-side.
344
344
 
345
+ ## Out of scope
346
+
347
+ - **Don't expose the bridge on `0.0.0.0` without a trusted reverse proxy.** Loopback binding makes "reach" require shell access on the host. LAN exposure without re-authentication and rate-limiting at the proxy is a trust leak.
348
+ - **Don't log the bearer token.** The structured `mailbox_serve_started` event includes bind URL, port, project dir, and token path — never the token itself. Logging it once is a permanent compromise.
349
+ - **Don't treat the bearer as identity-bound.** Every caller uses the same project token. The bridge does not separately authorize `steer`/control messages or prevent impersonation; the caller can claim any `from`, `type`, or `readerId`. Add an identity-aware trusted proxy before exposing beyond mutually trusted local clients.
350
+ - **Don't expose the filesystem, shell, or non-mailbox tools through the bridge.** It is the mailbox surface only. If a caller needs more, they need a different bridge.
351
+ - **Don't start the bridge for an external agent that already speaks MCP natively.** Use `wstack mcp serve` to expose WrongStack's full tool registry including the mailbox tool. Two bridges for the same purpose is operational debt.
352
+ - **Don't run as a long-lived daemon for the caller.** The bridge is short-lived; spawn it for the duration of the caller's session and let it exit. `mbWithBootstrap()` is the pattern.
353
+ - **Don't hardcode a token into prompts or committed code.** Read it from `.mailbox.token` or accept it from the environment; re-read after a 401.
354
+ - **Don't send `control` messages through the bridge.** Control is a runtime-only surface; the bridge doesn't expose it, and the only legitimate override is `steer` via the `mailbox_manage` route, not through the bridge.
355
+
356
+ ## Before returning
357
+
358
+ - [ ] `wstack mailbox serve` (or `mbWithBootstrap`) used; no parallel implementation
359
+ - [ ] Bind address is `127.0.0.1` unless behind a reverse proxy that re-authenticates
360
+ - [ ] Bearer token read from `.mailbox.token` or env, not hardcoded
361
+ - [ ] Token not present in any log line, event, or error message
362
+ - [ ] Body cap of 256 KB enforced; rate limit of 120/min/token enforced
363
+ - [ ] `/healthz` reachable; no auth or rate limit on the health probe
364
+ - [ ] Pair with `wrongstack-mailbox` skill for external-agent usage
365
+ - [ ] Graceful shutdown handles SIGINT/SIGTERM, flushes the cache, unlinks the token
366
+ - [ ] Mailbox health watchdog wired if running unattended
367
+ - [ ] No `control` messages; `steer` only via the canonical `mailbox_manage` route
368
+
345
369
  ## Skills in scope
346
370
 
347
371
  - `prompt-engineering` — for the external-facing `wrongstack-mailbox`
@@ -4,7 +4,7 @@ description: |
4
4
  Use when curating WrongStack SAGE memory: run deterministic hygiene and
5
5
  anchor verification first, then review contradictions, drift, and noise;
6
6
  file destructive outcomes as review proposals instead of deleting directly.
7
- version: 1.1.0
7
+ version: 1.2.0
8
8
  required-capabilities: [memory.manage, memory.curate]
9
9
  required-tools: [cron_cancel, cron_schedule, mail_send, mailbox, memory_candidates, memory_delete, memory_hygiene, memory_search, memory_update, memory_verify, skill]
10
10
  ---
@@ -102,7 +102,7 @@ memory_candidates({
102
102
  })
103
103
  ```
104
104
 
105
- Never call `memory_delete`, never set `status: "deleted"`, and never set
105
+ Never trigger `memory_delete`, never set `status: "deleted"`, and never set
106
106
  `status: "archived"` as part of an autonomous Mnemosyne cycle. The user owns
107
107
  the later `memory_candidates({ action: "resolve", ... })` decision.
108
108
 
@@ -149,6 +149,29 @@ tools are absent, run on demand instead.
149
149
  - Never advertise commands, config keys, background services, or tools that
150
150
  are not present in the live runtime.
151
151
 
152
+ ## Out of scope
153
+
154
+ - **Don't delete or archive memories autonomously.** `memory_delete` and `status: "deleted"` / `"archived"` are not part of an autonomous Mnemosyne cycle. File `memory_candidates` proposals and let the user resolve.
155
+ - **Don't re-author untouched memories to bump timestamps.** A memory that passes review stays as it is. Bumping timestamps corrupts recency signals and churns the store.
156
+ - **Don't skip the deterministic pass.** Hygiene, anchor verification, and supersede/stale marking are run before any LLM analysis. The LLM is a bounded second pass over deterministic results, not a replacement.
157
+ - **Don't infer absence from a missing search result.** A search miss is not proof a memory doesn't exist. Report what was searched; let deterministic checks carry the absence claim.
158
+ - **Don't claim a successful broadcast or scheduled cycle that didn't run.** If the mailbox or cron tools are absent, say so. Never invent a successful delivery or a scheduled job.
159
+ - **Don't describe cron as a persistent daemon.** Cron jobs belong to the live runtime; they must be inspected and cancelled through the cron tools. The skill is session-scoped.
160
+ - **Don't bypass store protections with `force`.** Permanent and high-importance memories receive extra scrutiny. Bypassing protections is a bug, not a feature.
161
+ - **Don't use it as a generic memory CRUD layer.** Mnemosyne is the curation workflow. Direct memory creation/update without going through the workflow is the wrong lane.
162
+
163
+ ## Before returning
164
+
165
+ - [ ] `memory_hygiene({ verify: true })` ran first; counts captured
166
+ - [ ] Non-zero `deleted` or `archived` counters treated as a bug and reported
167
+ - [ ] Bounded semantic review searched related memories, not whole store
168
+ - [ ] Direct updates only for non-terminal corrections (text, classification, confidence, `stale`, supersede/contradict links)
169
+ - [ ] Deletion or archival recommendations filed as `memory_candidates` proposals, not applied
170
+ - [ ] Every proposal includes a supported `reason`
171
+ - [ ] Report contains trigger, counts, safe corrections, proposals, errors
172
+ - [ ] Broadcast only when mailbox tools are registered and coordination is active
173
+ - [ ] No claim of scheduled cycle or broadcast that didn't actually run
174
+
152
175
  ## Skills in Scope
153
176
 
154
177
  - `auto-review` — bounded background-review and reporting patterns.
@@ -351,6 +351,18 @@ session that dies halfway — and they let you synthesize as you go.
351
351
 
352
352
  ---
353
353
 
354
+ ## Out of scope
355
+
356
+ - **Don't fan out a single atomic task.** One task is one agent. Subagent overhead exceeds the benefit below ~5 tool calls per subtask.
357
+ - **Don't fan out work that needs shared mutable state.** Subagents share nothing — no memory, no session state, no variable scope. If two subtasks would read or write the same thing, they don't fan out.
358
+ - **Don't fan out work with sequential dependencies.** Worker 2 needing worker 1's output means either chain it inside one agent, or use the fleet pattern with explicit hand-off. One-shot fan-out fails on dependencies.
359
+ - **Don't write briefs by reference.** "Audit the file we discussed" — the worker has no idea. Include exact scope, the specific question, definition of done, return format, and boundaries.
360
+ - **Don't dispatch workers one turn at a time.** Serialized fan-out throws away the only thing parallelism was for. Fire the whole batch in one turn.
361
+ - **Don't ignore `budget_exhausted`.** Partial results are still results. Re-split and retry; never silently absorb a failure into a clean-looking report.
362
+ - **Don't present partial coverage as complete.** A 7-of-10 fleet is a partial audit. Naming the missing three is the only way the user keeps trusting the report.
363
+ - **Don't pick a role that doesn't match the task.** A `bug-hunter` writing docs or a `refactor-planner` running a security audit produces confident output shaped by the wrong priorities — worse than no output.
364
+ - **Don't fan out "because the context is too big".** With 200K–1M windows, work that used to need splitting now fits. Fan out for wall-clock time and genuinely independent attention, not for size.
365
+
354
366
  ## Skills in scope
355
367
 
356
368
  - `bug-hunter` — parallel file audits
@@ -4,7 +4,7 @@ description: |
4
4
  Use this skill when writing, reviewing, or refactoring Node.js >= 22
5
5
  TypeScript code in WrongStack. Triggers: ESM imports, fetch usage, AbortSignal,
6
6
  node: protocol, Web Streams, or any async patterns.
7
- version: 1.1.0
7
+ version: 1.2.0
8
8
  required-capabilities: [filesystem.read, filesystem.write]
9
9
  required-tools: []
10
10
  optional-capabilities: [verification.run]
@@ -185,6 +185,33 @@ while (true) {
185
185
  }
186
186
  ```
187
187
 
188
+ ## Out of scope
189
+
190
+ - **Don't use `require()`.** ESM only. `import { x } from './y.js'` with the `.js` extension, even in TS source.
191
+ - **Don't use axios, node-fetch, or got.** Native fetch is sufficient. Third-party HTTP clients are an obsolete layer.
192
+ - **Don't call fetch without `AbortSignal.timeout()`**. Every long-running operation needs a timeout. A request that hangs forever is a CI failure waiting to happen.
193
+ - **Don't use `__dirname` directly in ESM.** ESM doesn't have it. `path.dirname(fileURLToPath(import.meta.url))` is the replacement.
194
+ - **Don't mix callback `fs` with `await`.** Callback APIs don't return promises. Use `fs.promises.*` for `await`able access.
195
+ - **Don't swallow `AbortError` silently.** An `AbortError` means a timeout or abort — it is signal, not success. Log it or handle it explicitly.
196
+ - **Don't trust `process.cwd()` blindly.** It may not match the user's cwd. Accept `cwd` as a parameter and default sensibly.
197
+ - **Don't use setTimeout for cancellable delays in new code.** `setTimeout(handler, ms, { signal })` (Node 22+) is the cancellable form.
198
+ - **Don't write non-atomic file updates.** Use the write-temp + rename pattern. A crash mid-write leaves the file in an indeterminate state otherwise.
199
+ - **Don't enable axios or got for "familiarity".** Node 22+ ships everything you need.
200
+
201
+ ## Before returning
202
+
203
+ - [ ] ESM only; no `require()`, no `module.exports`
204
+ - [ ] All relative imports use the `.js` extension
205
+ - [ ] Built-in modules imported via the `node:` protocol (`node:fs/promises`, `node:http`, `node:path`)
206
+ - [ ] fetch carries `AbortSignal.timeout()` for any operation that can wait
207
+ - [ ] `__dirname` replaced with `path.dirname(fileURLToPath(import.meta.url))`
208
+ - [ ] `fs.promises.*` for awaited file access; no callback `fs`
209
+ - [ ] `AbortError` caught and handled explicitly, not swallowed
210
+ - [ ] `cwd` accepted as parameter; `process.cwd()` is not a default
211
+ - [ ] File writes atomic: `writeFile(tmp)` + `rename(tmp, target)`
212
+ - [ ] `Promise.allSettled` for parallel tasks where partial failure is acceptable
213
+ - [ ] `<nextsteps>` mirrors any open follow-up (timeout wiring, ESM migration, abort handling)
214
+
188
215
  ## Skills in scope
189
216
 
190
217
  - `typescript-strict` — strict TypeScript patterns