@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.
- package/dist/coordination/agents/index.js +4 -4
- package/dist/coordination/index.js +5 -4
- package/dist/core/index.js +1 -1
- package/dist/defaults/index.js +5 -4
- package/dist/execution/index.js +4 -4
- package/dist/index.js +7 -5
- package/dist/storage/index.js +1 -0
- package/dist/tools/index.js +4 -4
- package/dist/types/config/ui.d.ts +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/runtime-capability-manifest.d.ts +1 -1
- package/instructions/agents/backend.md +3 -0
- package/instructions/agents/bug-hunter.md +3 -0
- package/instructions/agents/code-reviewer.md +1 -0
- package/instructions/agents/frontend.md +2 -0
- package/instructions/agents/test.md +2 -0
- package/instructions/modes/code-reviewer.md +1 -1
- package/instructions/modes/debugger.md +2 -2
- package/instructions/modes/refactorer.md +2 -2
- package/instructions/modes/tester.md +2 -2
- package/instructions/system-lite.md +37 -33
- package/instructions/system-pro.md +23 -7
- package/instructions/system.md +33 -11
- package/package.json +4 -3
- package/skills/api-design/SKILL.md +26 -1
- package/skills/audit-log/SKILL.md +22 -1
- package/skills/auto-review/SKILL.md +21 -1
- package/skills/bug-hunter/SKILL.md +8 -0
- package/skills/chimera/SKILL.md +9 -0
- package/skills/data-governance/SKILL.md +25 -1
- package/skills/design-system/SKILL.md +19 -1
- package/skills/docker-deploy/SKILL.md +26 -1
- package/skills/git-flow/SKILL.md +26 -1
- package/skills/mailbox-bridge/SKILL.md +25 -1
- package/skills/mnemosyne/SKILL.md +25 -2
- package/skills/multi-agent/SKILL.md +12 -0
- package/skills/node-modern/SKILL.md +28 -1
- package/skills/observability/SKILL.md +25 -1
- package/skills/output-standards/SKILL.md +28 -1
- package/skills/plugin-author/SKILL.md +31 -1
- package/skills/prompt-engineering/SKILL.md +27 -1
- package/skills/react-modern/SKILL.md +29 -1
- package/skills/refactor-planner/SKILL.md +10 -0
- package/skills/research-web/SKILL.md +28 -1
- package/skills/sdd/SKILL.md +18 -0
- package/skills/security-scanner/SKILL.md +25 -1
- package/skills/skill-creator/SKILL.md +25 -1
- package/skills/tech-stack/SKILL.md +25 -1
- package/skills/testing/SKILL.md +25 -1
- package/skills/typescript-strict/SKILL.md +30 -1
- package/skills/wrongstack-kanban/SKILL.md +24 -0
- package/skills/wrongstack-mailbox/SKILL.md +29 -1
- package/skills/wrongstack-mailbox-mcp/SKILL.md +30 -3
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
or when setting up observability for a new feature. Triggers: user says
|
|
6
6
|
"log", "trace", "metrics", "observability", "instrument", "structured logging",
|
|
7
7
|
"opentelemetry", "log level", "debug", "monitoring".
|
|
8
|
-
version: 1.
|
|
8
|
+
version: 1.1.0
|
|
9
9
|
required-capabilities: [filesystem.read, filesystem.write]
|
|
10
10
|
required-tools: []
|
|
11
11
|
optional-capabilities: [code.inspect]
|
|
@@ -129,6 +129,30 @@ Every log should include:
|
|
|
129
129
|
- **Redaction**: Use `redactKeys()` helper — never log `Authorization`, `token`, `apiKey`, `secret`.
|
|
130
130
|
- **Tool tracing**: Each tool wrapper should emit a structured log on start and end.
|
|
131
131
|
|
|
132
|
+
## Out of scope
|
|
133
|
+
|
|
134
|
+
- **Don't log secrets, tokens, or PII.** Redact at the boundary. A single `Authorization` header in a log line is a credential leak; redact `token`, `apiKey`, `secret`, `Authorization` keys before they reach the stream.
|
|
135
|
+
- **Don't use plain text logs.** JSON to stdout is the contract. `console.log('User logged in')` is unsearchable and breaks log aggregators.
|
|
136
|
+
- **Don't emit logs without a `traceId`.** Correlation across tools is the whole point. A log without a trace is an event with no story.
|
|
137
|
+
- **Don't use DEBUG level in production.** DEBUG is dev-only. Production logs are `INFO`, `WARN`, `ERROR`; DEBUG in prod is noise that hides real signals.
|
|
138
|
+
- **Don't log and ignore.** Every log entry should answer: what happened, what context, what was the outcome. A `console.log('done')` after a side effect is process for process's sake.
|
|
139
|
+
- **Don't write to file logs from app code.** CI captures stdout. File logs bypass the pipeline and become unsearchable tribal knowledge.
|
|
140
|
+
- **Don't skip trace spans on tool calls.** Every tool wrapper should open a span on start and end it on completion, with timing. Without spans, latency questions are unanswerable.
|
|
141
|
+
- **Don't conflate counters and gauges.** Counters increment (`tool.executions`); gauges track current state (`session.iterations`). Mixing them produces nonsense dashboards.
|
|
142
|
+
- **Don't include exception objects in span attributes.** `span.recordException(err)` is the OpenTelemetry path; serialization into a JSON log is its own discipline.
|
|
143
|
+
|
|
144
|
+
## Before returning
|
|
145
|
+
|
|
146
|
+
- [ ] All logs are JSON to stdout, never plain text or file logs
|
|
147
|
+
- [ ] Every entry has `level`, `traceId`, `event`, `timestamp`, `outcome`
|
|
148
|
+
- [ ] No secrets, tokens, `Authorization`, `apiKey`, or PII in any log line
|
|
149
|
+
- [ ] DEBUG level only in dev; production uses `INFO` / `WARN` / `ERROR`
|
|
150
|
+
- [ ] Tool wrappers emit structured start + end events with `duration_ms`
|
|
151
|
+
- [ ] OpenTelemetry spans opened on tool entry, closed on exit with status
|
|
152
|
+
- [ ] Counters vs. gauges respected; histograms used for latency
|
|
153
|
+
- [ ] Redaction centralized at the serialization boundary, not per call site
|
|
154
|
+
- [ ] Log volume and pattern sanity-checked against `audit-log` skill's metrics
|
|
155
|
+
|
|
132
156
|
## Skills in scope
|
|
133
157
|
|
|
134
158
|
- `audit-log` — for analyzing the logs this skill produces
|
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when defining or enforcing output formatting standards for agent
|
|
5
5
|
responses in WrongStack. Triggers: user says "next steps format", "output standard",
|
|
6
6
|
"response format", "final message format", "standardize next steps".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.1.0
|
|
8
8
|
required-capabilities: []
|
|
9
9
|
required-tools: []
|
|
10
10
|
---
|
|
@@ -156,6 +156,33 @@ When a **subagent** completes its task, it MUST:
|
|
|
156
156
|
- **Don't assign manual work to the user** — "manually check if X is correct yourself" is not a valid next prompt; when tools permit it, use an agent-directed prompt such as "Use the browser tools to verify X and fix any issue you find"
|
|
157
157
|
- **Don't include `<nextsteps>` in subagent output** — subagents report findings, leaders produce next steps
|
|
158
158
|
|
|
159
|
+
## Out of scope
|
|
160
|
+
|
|
161
|
+
- **Don't include `<nextsteps>` in subagent output.** Subagents report findings; the leader produces the unified tag. A subagent that emits `<nextsteps>` is stepping on the leader's lane.
|
|
162
|
+
- **Don't emit parseable-looking prose instead of the tag.** "Next steps:", "Suggested next:", "Let me know if you want..." all look like the tag to the parser and break the `/next` workflow.
|
|
163
|
+
- **Don't put human-only actions in `<nextsteps>`.** "Open DevTools yourself", "manually check the browser console" — those are informational, not agent prompts. They go outside the tag as plain text.
|
|
164
|
+
- **Don't put markdown inside the tag.** Plain text only, one item per line. `**bold**`, code spans, headings — all break the parser.
|
|
165
|
+
- **Don't use dashes or asterisks inside the tag.** Numbered items only: `1.`, `2.`, `3.`. Dash and asterisk bullets are wrong and silently fail the parser.
|
|
166
|
+
- **Don't put `auto="true"` on items 2+.** Only item 1 may carry the marker. The marker on later items is parsed-and-discarded.
|
|
167
|
+
- **Don't write vague prompts.** "Fix bugs" is not a prompt; "fix auth/session.ts:42 and add a regression test" is. The selected text is submitted verbatim — vague prompts are vague runs.
|
|
168
|
+
- **Don't exceed 5 items without reason.** If the list is over 5, it's probably not a single task. Split it or hand off.
|
|
169
|
+
- **Don't emit `<nextsteps>` while `ctx.todos` has open items.** The in-flight todo list isn't done; new prompt options race the todo loop. Finish the list first, re-arm the tag on the turn where the last todo flips to `completed`.
|
|
170
|
+
- **Don't address the user inside the tag.** Items are agent-directed prompt inputs. Imperative wording is valid when it tells the agent what to do.
|
|
171
|
+
|
|
172
|
+
## Before returning
|
|
173
|
+
|
|
174
|
+
- [ ] Only the leader emits `<nextsteps>`; subagents return findings only
|
|
175
|
+
- [ ] Tag is well-formed: `<nextsteps>...</nextsteps>`, no attributes on the tags
|
|
176
|
+
- [ ] Plain text only inside the tag; no markdown, dashes, or asterisks
|
|
177
|
+
- [ ] Numbered items `1.`, `2.`, `3.`; one prompt per line
|
|
178
|
+
- [ ] At most one `auto="true"`, and only on item 1
|
|
179
|
+
- [ ] Items are agent-directed prompts, not human-only actions
|
|
180
|
+
- [ ] Items are specific enough to submit verbatim (file:line + concrete action)
|
|
181
|
+
- [ ] At most 5 items unless a single task genuinely requires more
|
|
182
|
+
- [ ] Tag omitted if `ctx.todos` still has pending or in_progress items
|
|
183
|
+
- [ ] Leader output synthesized from subagent findings, deduplicated and re-prioritized
|
|
184
|
+
- [ ] Human-only actions sit outside the tag as plain text, not inside it
|
|
185
|
+
|
|
159
186
|
## Skills in scope
|
|
160
187
|
|
|
161
188
|
- `bug-hunter` — inherits output-standards for bug reports
|
|
@@ -7,7 +7,7 @@ description: |
|
|
|
7
7
|
data, and the entry-point registration steps (package.json and index.ts).
|
|
8
8
|
Triggers: user says "new plugin", "add a plugin", "plugin teardown", "plugin
|
|
9
9
|
health", "register a tool", "PluginAPI extension".
|
|
10
|
-
version: 1.
|
|
10
|
+
version: 1.1.0
|
|
11
11
|
required-capabilities: [filesystem.read, filesystem.write, execution.shell]
|
|
12
12
|
required-tools: [bash, cron_cancel, cron_list, cron_schedule, edit, fetch, git, git_autocommit, json, read, search, secret_scanner_test, semver_bump, semver_changelog, semver_current, todo, watch_list, watch_start, watch_stop, write]
|
|
13
13
|
optional-capabilities: [verification.run]
|
|
@@ -336,6 +336,36 @@ For the H1 pattern, extend `tests/plugin-teardown.test.ts` with a
|
|
|
336
336
|
8. **Run verification**: `pnpm --filter @wrongstack/plugins test` + `pnpm --filter @wrongstack/plugins typecheck` + `pnpm --filter @wrongstack/plugins build`
|
|
337
337
|
9. **Update `src/index.ts` doc comment** — bump the plugin count
|
|
338
338
|
|
|
339
|
+
## Out of scope
|
|
340
|
+
|
|
341
|
+
- **Don't put state in the `setup()` closure.** State must live at module scope; the Plugin interface does not thread state from `setup()` to `teardown()`. Closure state leaks on reload.
|
|
342
|
+
- **Don't ship a plugin without `teardown()` and `health()`.** Even stateless plugins add both. The H1 audit pattern is the floor; `/diag plugins` exposes the gap.
|
|
343
|
+
- **Don't make `setup()` non-idempotent.** Calling `setup()` twice must leave a clean slate. Hot-reload must not accumulate state.
|
|
344
|
+
- **Don't delete on-disk state in `teardown()`.** File-based plugins leave the file in place. Only in-memory counters and resource handles (timers, watchers) are cleaned.
|
|
345
|
+
- **Don't collide with built-in tool names.** `read`, `write`, `bash`, `edit`, `fetch`, `search`, `json`, `todo`, `git` are reserved. Pick unique names; `api.tools.register()` enforces uniqueness.
|
|
346
|
+
- **Don't bump `apiVersion` for additive changes.** New optional fields on `PluginAPI` don't break the contract. Bump only when the surface breaks.
|
|
347
|
+
- **Don't read config from `config.plugins`.** Config options go under `config.extensions['<plugin-name>']`. The loader's `buildPluginOptions` merges both, but the convention is `extensions`.
|
|
348
|
+
- **Don't block `setup()` with async hydration.** Use `void (async () => { ... })()` for fire-and-forget. The first call should fall through to fallback if the async hasn't completed.
|
|
349
|
+
- **Don't skip the test files.** `tests/<name>.test.ts` (unit) and `tests/<name>-exec.test.ts` (integration) are required. Plugins without tests rot fast.
|
|
350
|
+
- **Don't lower-case-skip the model and config keys.** Case-insensitive lookup is the convention; `model.toLowerCase()` everywhere.
|
|
351
|
+
|
|
352
|
+
## Before returning
|
|
353
|
+
|
|
354
|
+
- [ ] `name`, `version`, `apiVersion: '^0.1.x'` (current), description, capabilities set
|
|
355
|
+
- [ ] Module-scope state, never in `setup()` closure
|
|
356
|
+
- [ ] `setup()` idempotent: clears state before re-initializing
|
|
357
|
+
- [ ] `teardown()` releases every resource acquired in `setup()`, never deletes on-disk state
|
|
358
|
+
- [ ] `health()` returns `{ ok, message, invocationCount, lastRun? }`
|
|
359
|
+
- [ ] Tool names are unique `snake_case`; no collision with built-ins
|
|
360
|
+
- [ ] Config read from `api.config.extensions['<plugin-name>']`, validated by `configSchema`
|
|
361
|
+
- [ ] Hooks are registered via `api.registerHook(...)` with the correct event/matcher; `HookOutcome` shape honored
|
|
362
|
+
- [ ] `src/index.ts` re-exports the plugin; `package.json` adds the subpath export
|
|
363
|
+
- [ ] `packages/cli/src/wiring/plugins.ts` adds the built-in factory
|
|
364
|
+
- [ ] Tests: `<name>.test.ts` + `<name>-exec.test.ts` + `plugin-teardown.test.ts` block
|
|
365
|
+
- [ ] Verification: `pnpm --filter @wrongstack/plugins test && typecheck && build` all pass
|
|
366
|
+
- [ ] `src/index.ts` doc comment updated with the new plugin count
|
|
367
|
+
- [ ] `<nextsteps>` lists each open follow-up (config, hooks, tests, build)
|
|
368
|
+
|
|
339
369
|
## Skills in scope
|
|
340
370
|
|
|
341
371
|
- `skill-creator` — for the SKILL.md format and frontmatter rules
|
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when designing, critiquing, or fixing system prompts,
|
|
5
5
|
tool descriptions, skill definitions, or LLM instruction text in WrongStack.
|
|
6
6
|
Triggers: user mentions "prompt", "system instruction", "skill description", "tool hint", "usage hint", "system prompt".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.2.0
|
|
8
8
|
required-capabilities: [filesystem.read, filesystem.write]
|
|
9
9
|
required-tools: []
|
|
10
10
|
---
|
|
@@ -131,6 +131,32 @@ See `skill-creator` skill for the format. Key points:
|
|
|
131
131
|
- Include concrete code examples in "Do" and "Don't" sections
|
|
132
132
|
- End with "Skills in scope" so agents know to delegate
|
|
133
133
|
|
|
134
|
+
## Out of scope
|
|
135
|
+
|
|
136
|
+
- **Don't ship filler in prompts.** "Please be helpful", "Sure, I'd be happy to", "You are a helpful AI" — every filler line costs tokens and adds no signal. Strip it.
|
|
137
|
+
- **Don't write vague trigger sentences.** "This skill is about Docker" matches nothing. "Use this skill when deploying Docker containers to a production cluster" matches.
|
|
138
|
+
- **Don't describe a tool by what it does alone.** Tool descriptions need when to use, key parameters, and what it returns. "Search files" is incomplete; "Search file contents with regex. Pattern is regex. Use output_mode to select…" is the bar.
|
|
139
|
+
- **Don't put volatile content before static content.** Cache-friendly prompts put identity, tools, and instructions first; session state and recent errors last. Reversing the order costs tokens per turn.
|
|
140
|
+
- **Don't write a long preamble before the question.** The model reads the preamble, then the question. Put the question first.
|
|
141
|
+
- **Don't use ambiguous pronouns.** "Do it again" — which tool, which file? Name the specific thing.
|
|
142
|
+
- **Don't claim trigger keywords cover a domain they don't.** Trigger keywords must be specific. Generic phrases like "improve" or "help with" match too much and the loader can't disambiguate.
|
|
143
|
+
- **Don't re-invent the agent's identity.** WrongStack's system prompt already establishes who the agent is. Don't repeat it; layer domain-specific instruction on top.
|
|
144
|
+
- **Don't design prompts the way you'd write a doc.** Prompts are instruction; docs are reference. Reference material goes in skill `references/`, not in the trigger-matching body.
|
|
145
|
+
|
|
146
|
+
## Before returning
|
|
147
|
+
|
|
148
|
+
- [ ] No filler ("Please be helpful", "Sure, I'd be happy to", "You are a helpful AI")
|
|
149
|
+
- [ ] Skill description's first sentence is a concrete trigger; trigger keywords follow
|
|
150
|
+
- [ ] Tool descriptions cover when to use, key parameters, what it returns
|
|
151
|
+
- [ ] Static content first; volatile content last
|
|
152
|
+
- [ ] No long preamble before the actual question
|
|
153
|
+
- [ ] No ambiguous pronouns; specific things named
|
|
154
|
+
- [ ] Trigger keywords specific enough to disambiguate
|
|
155
|
+
- [ ] Skill body under ~500 lines; deep material in `references/`
|
|
156
|
+
- [ ] Concrete `Do` / `Don't` examples, not abstract principles
|
|
157
|
+
- [ ] `Skill in scope` lists the hand-off targets with a reason for each
|
|
158
|
+
- [ ] `<nextsteps>` mirrors open follow-up prompt-tuning tasks in priority order
|
|
159
|
+
|
|
134
160
|
## Skills in scope
|
|
135
161
|
|
|
136
162
|
- `skill-creator` — for creating new skills (primary — prompt-engineering feeds into skill creation)
|
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when writing or reviewing React 19+ code in WrongStack.
|
|
5
5
|
Triggers: user mentions "React", "component", "useState", "useEffect",
|
|
6
6
|
"Server Component", "Client Component", "Suspense", "useTransition", "use hook".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.2.0
|
|
8
8
|
required-capabilities: [filesystem.read, filesystem.write]
|
|
9
9
|
required-tools: []
|
|
10
10
|
optional-capabilities: [verification.run]
|
|
@@ -207,6 +207,34 @@ const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => { ... };
|
|
|
207
207
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
+
## Out of scope
|
|
211
|
+
|
|
212
|
+
- **Don't default to Client Components.** Server Components are the default in React 19+. Mark `'use client'` only for interactive code; the boundary carries a serialization cost.
|
|
213
|
+
- **Don't reach for `useEffect` when fetching data.** Use Server Components or `use(promise)`. The `useEffect` + fetch + `setState` dance is the pattern React 19 replaced.
|
|
214
|
+
- **Don't reach for `forwardRef` in new code.** `ref` is a regular prop in React 19. `forwardRef` is the old way; the new way is `function Button({ ref, ...props })`.
|
|
215
|
+
- **Don't use default exports for components.** Named exports only. Default exports hinder refactoring and tree-shaking; named exports are the convention.
|
|
216
|
+
- **Don't use class components in new code.** Function components + hooks. Class components are deprecated in modern React.
|
|
217
|
+
- **`useEffect` is the wrong tool for syncing props to state.** It causes an extra render and stale data. Lift state or use a controlled component.
|
|
218
|
+
- **`useMemo` is overkill for trivial calculations.** `useMemo(() => count * 2, [count])` is more expensive than the multiplication. Measure before memoizing.
|
|
219
|
+
- **Don't reach for `useCallback` when deps change every render.** `useCallback(fn, [obj])` where `obj` is fresh each render provides no stability. Reach for it only when child deps actually benefit.
|
|
220
|
+
- **Don't mix Server/Client boundaries carelessly.** Serialization errors at the boundary are some of the hardest to debug. Keep the boundary clean.
|
|
221
|
+
- **Don't call React's `use()` outside component render.** It's a render-only hook.
|
|
222
|
+
|
|
223
|
+
## Before returning
|
|
224
|
+
|
|
225
|
+
- [ ] Server Components by default; `'use client'` only for interactive code
|
|
226
|
+
- [ ] No `useEffect` for data fetching; Server Components or `use(promise)` instead
|
|
227
|
+
- [ ] No `forwardRef` in new code; `ref` is a regular prop
|
|
228
|
+
- [ ] Named exports for components; no default exports
|
|
229
|
+
- [ ] No class components in new code; function components + hooks only
|
|
230
|
+
- [ ] Event handlers carry explicit types (`React.MouseEvent<HTMLButtonElement>`)
|
|
231
|
+
- [ ] `useState` for local state; `useReducer` for state machines
|
|
232
|
+
- [ ] `useTransition` for non-urgent updates; `useDeferredValue` for expensive search
|
|
233
|
+
- [ ] `useMemo` / `useCallback` only where profiling showed a need
|
|
234
|
+
- [ ] `useEffect` reserved for side effects (subscriptions, manual DOM, focus); not for derived state or data fetching
|
|
235
|
+
- [ ] Props interface explicit; no `any` or `Function`
|
|
236
|
+
- [ ] `<nextsteps>` mirrors any open follow-up (boundary cleanup, hook refactor, prop typing)
|
|
237
|
+
|
|
210
238
|
## Skills in scope
|
|
211
239
|
|
|
212
240
|
- `typescript-strict` — for TypeScript patterns
|
|
@@ -306,6 +306,16 @@ parallelizes.
|
|
|
306
306
|
|
|
307
307
|
---
|
|
308
308
|
|
|
309
|
+
## Out of scope
|
|
310
|
+
|
|
311
|
+
- **Don't start refactoring while planning.** A half-done refactor with no graph behind it is the failure this skill exists to prevent. Plan first, hand the plan to the executing agent phase by phase.
|
|
312
|
+
- **Don't write code or apply edits.** This skill produces a plan, not a diff. If the user wants the refactor done, the executing agent picks it up; this skill's deliverable is the phased plan.
|
|
313
|
+
- **Don't skip the dependency graph.** Ordering without a graph is guessing. Imports are the truth; build the graph from `import` statements, not from directory layout or someone's mental model.
|
|
314
|
+
- **Don't ignore cycles.** A cycle means no valid ordering. List cycles explicitly, schedule their breaking first. A plan over a cycle is fiction.
|
|
315
|
+
- **Don't refactor modules under 50% coverage blind.** Phase 1 of any such module is characterization tests, not the refactor itself. The safety argument is "behavior preserved" — without tests, there is no safety net.
|
|
316
|
+
- **Don't over-phase.** Tasks under 1h merge with related tasks. A 12-phase plan for a 3-day refactor is process for process's sake.
|
|
317
|
+
- **Don't write exit criteria that aren't checkable.** "Code is cleaner" is not an exit criterion. `pnpm test passes` is. If a phase has no checkable exit, it never formally ends.
|
|
318
|
+
|
|
309
319
|
## Skills in scope
|
|
310
320
|
|
|
311
321
|
- `bug-hunter` — for finding bugs exposed by the refactor
|
|
@@ -8,7 +8,7 @@ description: |
|
|
|
8
8
|
Triggers: user says "research", "current version", "is this still true",
|
|
9
9
|
"latest", "what's new in", "breaking changes", "find current",
|
|
10
10
|
"web research", "search the web", "look up".
|
|
11
|
-
version: 1.
|
|
11
|
+
version: 1.1.0
|
|
12
12
|
required-capabilities: [web.research]
|
|
13
13
|
required-tools: [context_manager, delegate, fetch, search]
|
|
14
14
|
optional-capabilities: [runtime.admin]
|
|
@@ -335,6 +335,33 @@ Agent: search("TypeScript null check best practices") // NO
|
|
|
335
335
|
7. CITE — In your response, cite sources for every factual claim
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
+
## Out of scope
|
|
339
|
+
|
|
340
|
+
- **Don't claim a version, deprecation, or API surface from training memory.** Verify against a live source. The cutoff is wrong; the registry is right.
|
|
341
|
+
- **Don't research-loop.** 2–3 searches + 1–2 fetches per topic. If the answer isn't there after that, surface the ambiguity, don't keep searching.
|
|
342
|
+
- **Don't re-research what you've already injected.** Once a finding is in `context_manager` notes, future turns see it. Re-searching the same topic is a context-bloat failure.
|
|
343
|
+
- **Don't fetch URLs you guessed.** Search first, fetch the result. `fetch("https://react.dev/blog/2025/03/15/...")` is a 404 waiting to happen.
|
|
344
|
+
- **Don't inject raw search results.** Inject a structured summary, not a JSON dump of `search(...)`. Future turns need to parse, not re-read.
|
|
345
|
+
- **Don't cite a single source as fact.** Two-source minimum for a claim; one-source is tentative. Tertiary sources (Reddit, SO, LLM-generated content) need corroboration.
|
|
346
|
+
- **Don't accept a Medium post as ground truth.** Source tiers matter: primary (official docs, GitHub, registries) is fact; secondary is "according to"; tertiary needs corroboration.
|
|
347
|
+
- **Don't research during tactical work.** "Fix the null deref" doesn't need web search. Research mode is for analysis and discussion phases, not bug fixes.
|
|
348
|
+
- **Don't skip the null-result note.** A "no current changes found" note prevents the next turn from re-researching the same topic. Always include it.
|
|
349
|
+
- **Don't spend $0.50 on a version check.** Cost awareness: a quick lookup is 1 search + 1 fetch ≈ 2000 tokens. Landscape surveys justify $2.00; version checks don't.
|
|
350
|
+
|
|
351
|
+
## Before returning
|
|
352
|
+
|
|
353
|
+
- [ ] Every claim cites a source URL; domain minimum, date when visible
|
|
354
|
+
- [ ] Two-source minimum for important claims; single-source labeled tentative
|
|
355
|
+
- [ ] Tertiary sources corroborated before citing
|
|
356
|
+
- [ ] Recency checked: version claims ≤ 6 months old; ecosystem trends from current year
|
|
357
|
+
- [ ] Findings injected via `context_manager` `add_note` with structured summary
|
|
358
|
+
- [ ] Null-result note included when no current changes found
|
|
359
|
+
- [ ] Search→fetch→validate→inject→cite workflow followed
|
|
360
|
+
- [ ] Stop rule honored: 2–3 searches + 1–2 fetches per topic; no loops
|
|
361
|
+
- [ ] Cost aligned with answer value; no $0.50 version checks
|
|
362
|
+
- [ ] No research done for tactical work that doesn't need it
|
|
363
|
+
- [ ] `<nextsteps>` lists any open follow-up research or pending validation
|
|
364
|
+
|
|
338
365
|
## Skills in scope
|
|
339
366
|
|
|
340
367
|
- `tech-stack` — for package version verification and ecosystem validation
|
package/skills/sdd/SKILL.md
CHANGED
|
@@ -129,6 +129,24 @@ Stage shown in real-time. Pause stops after current iteration completes.
|
|
|
129
129
|
- **Spec without acceptance criteria** — how do you know when it's done?
|
|
130
130
|
- **Skipping /sdd for urgent tasks** — the spec is what makes "urgent" possible
|
|
131
131
|
|
|
132
|
+
## Out of scope
|
|
133
|
+
|
|
134
|
+
- **Don't start coding before the spec exists.** You'll rewrite the code anyway — the spec is what makes the rewrite possible. SDD comes first or the spec is fiction.
|
|
135
|
+
- **Don't accept a spec without acceptance criteria.** "Done" must be a checkable state. Without criteria, the task has no formal end and the verifier has nothing to run.
|
|
136
|
+
- **Don't write vague requirements.** "Improve auth" is not a requirement; "Users authenticate via OAuth2 with PKCE, sessions expire after 24h" is. If a requirement can't be tested, it's not a requirement.
|
|
137
|
+
- **Don't skip `/sdd` because the task is urgent.** Urgency without a spec produces urgency-shaped rework. The spec is what makes "urgent" possible to ship correctly.
|
|
138
|
+
- **Don't start a multi-file refactor from SDD.** When the spec reveals a refactor, delegate to `refactor-planner` for the phased plan. SDD defines the goal; refactor-planner sequences the work.
|
|
139
|
+
- **Don't execute the task graph yourself unless the user asks.** SDD produces the plan and task graph; an executor (the leader, a subagent, or the user) picks it up.
|
|
140
|
+
|
|
141
|
+
## Before returning
|
|
142
|
+
|
|
143
|
+
- [ ] Spec has explicit acceptance criteria the verifier can run as commands
|
|
144
|
+
- [ ] Every requirement is specific enough to be tested, not "improve X"
|
|
145
|
+
- [ ] Tasks have dependencies; no orphan tasks at the leaves
|
|
146
|
+
- [ ] Spec template matches the work type (feature/bugfix/refactor/infra/integration/cli-command)
|
|
147
|
+
- [ ] Multi-file refactors are routed to `refactor-planner`, not absorbed into SDD tasks
|
|
148
|
+
- [ ] Critical path called out; bottlenecks named; parallel groups identified
|
|
149
|
+
|
|
132
150
|
## Skills in scope
|
|
133
151
|
|
|
134
152
|
- `refactor-planner` — when the spec reveals a multi-file refactor
|
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when scanning code or configuration for security vulnerabilities
|
|
5
5
|
in WrongStack. Triggers: user says "security", "vulnerability", "CVE", "secret",
|
|
6
6
|
"injection", "XSS", "SQL injection", "audit security", "supply chain".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.3.0
|
|
8
8
|
required-capabilities: [filesystem.read, code.inspect]
|
|
9
9
|
required-tools: []
|
|
10
10
|
optional-capabilities: [dependencies.manage]
|
|
@@ -167,6 +167,30 @@ element.textContent = userInput;
|
|
|
167
167
|
</nextsteps>
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
+
## Out of scope
|
|
171
|
+
|
|
172
|
+
- **Don't echo a full secret in the report.** Redact. A `ghp_…36 chars` is enough for the reader to find and rotate it. The unredacted value in a report is itself a leak.
|
|
173
|
+
- **Don't flag a `file:line` you haven't read.** Generic patterns cause false positives; verify the line is real before reporting. No "looks like a secret" findings.
|
|
174
|
+
- **Don't flag test fixtures as leaked secrets.** Mock credentials in `tests/` and `__fixtures__` are expected. Skip them; flag leaks in production code.
|
|
175
|
+
- **Don't scan `node_modules`.** Use `npm audit` / `pnpm audit` for supply chain. Grepping `node_modules` is a noise machine.
|
|
176
|
+
- **Don't report without remediation.** "Found X" without "do Y" is a finding the user has to research themselves. Always include the fix.
|
|
177
|
+
- **Don't claim CRITICAL without proof of exploitability.** Severity ladders are real. A pattern hit is a lead, not a warrant. State the input that triggers the bug and the consequence.
|
|
178
|
+
- **Don't bypass dependency audit.** Supply chain is an attack vector; skipping `npm audit` / lockfile review is skipping the scanner.
|
|
179
|
+
- **Don't disable TLS or relax auth configs as a "config option" without flagging CRITICAL.** TLS disabled in production is a CRITICAL, not a config note.
|
|
180
|
+
|
|
181
|
+
## Before returning
|
|
182
|
+
|
|
183
|
+
- [ ] Every `file:line` opened and confirmed; no flag from a regex guess
|
|
184
|
+
- [ ] Secrets redacted in the report (prefix + char count, never the value)
|
|
185
|
+
- [ ] Test fixtures skipped for secrets; flagged only for leak/unawaited patterns
|
|
186
|
+
- [ ] `node_modules` not scanned; supply chain via `npm audit` / lockfile review
|
|
187
|
+
- [ ] Every finding carries a remediation; "found X" without "do Y" not shipped
|
|
188
|
+
- [ ] Severity passes the ladder; CRITICAL reserved for proven exploitability
|
|
189
|
+
- [ ] Dependency audit included; CVE/version drift covered
|
|
190
|
+
- [ ] TLS / HTTP / CORS / rate-limit configuration checked and reported
|
|
191
|
+
- [ ] False-positive rate called out with a cause when it exceeds 30%
|
|
192
|
+
- [ ] Summary counts match the findings listed; `<nextsteps>` mirrors them in severity order
|
|
193
|
+
|
|
170
194
|
## Skills in scope
|
|
171
195
|
|
|
172
196
|
- `bug-hunter` — for general code quality bugs found during security scan
|
|
@@ -3,7 +3,7 @@ name: skill-creator
|
|
|
3
3
|
description: |
|
|
4
4
|
Use this skill when the user wants to create a new AI skill in WrongStack.
|
|
5
5
|
Triggers: user says "create a skill", "new skill", "add a skill", "skill definition".
|
|
6
|
-
version: 1.
|
|
6
|
+
version: 1.3.0
|
|
7
7
|
required-capabilities: [filesystem.write, runtime.admin]
|
|
8
8
|
required-tools: [bash, skill]
|
|
9
9
|
---
|
|
@@ -162,6 +162,30 @@ Before writing the file, verify:
|
|
|
162
162
|
- [ ] Content is actionable (rules, patterns, not just prose)
|
|
163
163
|
- [ ] File will be placed in `.wrongstack/skills/`
|
|
164
164
|
|
|
165
|
+
## Out of scope
|
|
166
|
+
|
|
167
|
+
- **Don't write skills without running `/skill-gen validate <name>` first.** A name that collides with an existing skill or breaks the kebab-case rule is a wall hit after the file is written. Validate first, always.
|
|
168
|
+
- **Don't ship a skill with a vague description.** "This skill is about Docker" matches nothing. First sentence = trigger; rest = `Triggers: user says "..."` listing concrete keywords.
|
|
169
|
+
- **Don't name skills in PascalCase or with underscores.** `MySkill` and `my_skill` are wrong; only `my-skill` (kebab-case) loads. The loader rejects the others.
|
|
170
|
+
- **Don't place project skills outside `.wrongstack/skills/<name>/`.** Bundled, user-profile, and foreign paths are for other owners. User-created skills always go in the project directory.
|
|
171
|
+
- **Don't write prose-only skills.** Rules, patterns, anti-patterns, code examples — the content has to be actionable. Prose without a checkable rule does not constrain the model.
|
|
172
|
+
- **Don't skip "Skills in scope".** Without the hand-off list, the model doesn't know where to delegate adjacent questions. The list is what makes the skill part of a system.
|
|
173
|
+
- **Don't forget to bump the version on structural change.** New section, scope change, rule change → major or minor bump. Patch only for wording.
|
|
174
|
+
- **Don't move work into the skill that belongs in `/skill-gen`.** The sub-commands are the deterministic layer: validation, scaffolding, from-prompt conversion. The wizard is for the parts they can't do.
|
|
175
|
+
|
|
176
|
+
## Before returning
|
|
177
|
+
|
|
178
|
+
- [ ] Name is kebab-case; `/skill-gen validate <name>` passed
|
|
179
|
+
- [ ] Name doesn't collide with bundled, project, or user-profile skills
|
|
180
|
+
- [ ] First sentence of `description` is a concrete trigger; trigger keywords follow
|
|
181
|
+
- [ ] File path is `.wrongstack/skills/<name>/SKILL.md` for project skills
|
|
182
|
+
- [ ] Content is actionable: rules, patterns, anti-patterns, code examples
|
|
183
|
+
- [ ] "Out of scope" lists what the skill is NOT for and where to hand off
|
|
184
|
+
- [ ] "Before returning" gives the model a mechanical completion check
|
|
185
|
+
- [ ] "Skills in scope" names the hand-off targets and the reason for each
|
|
186
|
+
- [ ] Version bumped appropriately; change recorded in CHANGELOG.md
|
|
187
|
+
- [ ] `/skill-gen validate <name>` re-run after writing; loads cleanly
|
|
188
|
+
|
|
165
189
|
## Skills in scope
|
|
166
190
|
|
|
167
191
|
- `prompt-engineering` — for crafting the skill description and prompt text
|
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when validating package versions, checking for outdated dependencies,
|
|
5
5
|
or evaluating third-party libraries in WrongStack. Triggers: user says "dependency",
|
|
6
6
|
"package version", "outdated", "npm audit", "deprecated package", "tech stack".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.3.0
|
|
8
8
|
required-capabilities: [dependencies.manage]
|
|
9
9
|
required-tools: []
|
|
10
10
|
optional-capabilities: [web.research]
|
|
@@ -112,6 +112,30 @@ When APPROVED:
|
|
|
112
112
|
</nextsteps>
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
## Out of scope
|
|
116
|
+
|
|
117
|
+
- **Don't trust version numbers from the model.** Training data is stale. The registry is the truth; fetch the latest version from the registry, not from memory.
|
|
118
|
+
- **Don't recursively analyze transitive dependencies.** This skill is single-shot. 1–2 iterations: detect → search registry → verify → report. Deep dependency analysis is a different workflow.
|
|
119
|
+
- **Don't greenlight prehistoric technology.** Anything superseded ≥5 years ago is rejected by default. Use the per-ecosystem built-in preference map.
|
|
120
|
+
- **Don't add a third-party package when the standard library covers it.** Prefer built-in. Every modern runtime ships an obsoleting API; check the built-in map before greenlighting any dependency.
|
|
121
|
+
- **Don't accept a dead package.** A package with no release in >2 years and unresolved critical issues is dead; suggest a maintained replacement. "Deprecated" / "yanked" / "archived" are the dead signals, not opinions.
|
|
122
|
+
- **Don't pick a random ecosystem.** Detect from project files first; ask when multiple markers exist; default to JavaScript only when `package.json` is present and nothing else is.
|
|
123
|
+
- **Don't deep-dive CVEs.** Known-CVE work is `security-scanner`'s lane. This skill validates existence, version, and deprecation — not vulnerability surface.
|
|
124
|
+
- **Don't approve without a registry URL.** The reader needs to verify; cite the registry endpoint that was actually fetched.
|
|
125
|
+
|
|
126
|
+
## Before returning
|
|
127
|
+
|
|
128
|
+
- [ ] Ecosystem detected (explicit or via project file scan)
|
|
129
|
+
- [ ] Registry endpoint fetched; package existence verified
|
|
130
|
+
- [ ] Latest version pulled from the registry, not from training memory
|
|
131
|
+
- [ ] Dead-package signals checked (`deprecated`, yanked, archived)
|
|
132
|
+
- [ ] Prehistoric-tech check ran against the per-ecosystem preference map
|
|
133
|
+
- [ ] Built-in vs. third-party preference map consulted
|
|
134
|
+
- [ ] Status is APPROVED / REJECTED / NEEDS_INVESTIGATION with one-sentence verdict
|
|
135
|
+
- [ ] On REJECTED, modern alternative named with a migration step
|
|
136
|
+
- [ ] Registry URL cited so the reader can verify
|
|
137
|
+
- [ ] No transitive dependency recursion; single-shot budget honored
|
|
138
|
+
|
|
115
139
|
## Skills in scope
|
|
116
140
|
|
|
117
141
|
- `node-modern` — for Node.js built-in vs. third-party decisions
|
package/skills/testing/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when writing, reviewing, or improving tests in WrongStack.
|
|
5
5
|
Triggers: user says "test", "unit test", "integration test", "e2e", "mock",
|
|
6
6
|
"vitest", "coverage", "assert", "expect", "test strategy", "write tests".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.1.0
|
|
8
8
|
required-capabilities: [filesystem.read, verification.run]
|
|
9
9
|
required-tools: []
|
|
10
10
|
optional-capabilities: [execution.shell]
|
|
@@ -165,6 +165,30 @@ coverageThreshold: {
|
|
|
165
165
|
- **pnpm workspaces**: Run `pnpm test` in the package root, or `pnpm -r test` for all packages.
|
|
166
166
|
- **Vitest config**: Each package has its own `vitest.config.ts`.
|
|
167
167
|
|
|
168
|
+
## Out of scope
|
|
169
|
+
|
|
170
|
+
- **Don't test internal modules.** Test the public API surface. Mocking `../src/internal/helper` couples the test to implementation; the moment the helper moves, the test breaks for the wrong reason.
|
|
171
|
+
- **Don't commit test-only deps to `dependencies`.** Devs install `devDependencies`. Test-only deps in `dependencies` bloat the production install and can leak into runtime code.
|
|
172
|
+
- **Don't lower the coverage gate to make tests pass.** New code carries its own ≥70% coverage; existing coverage never decreases. A passing test suite with sinking coverage is regression, not progress.
|
|
173
|
+
- **Don't write async tests without a timeout.** `test(..., { timeout: 5000 })` is mandatory. A hang in CI is a worse failure than a flapping test.
|
|
174
|
+
- **Don't mock `node:fs` and forget cleanup.** `vi.restoreAllMocks()` and `vi.useRealTimers()` in `afterEach` are mandatory. Mocks leaking across tests are how unit tests go red in a clean checkout.
|
|
175
|
+
- **`setTimeout` is the wrong timeout primitive in tests.** `AbortSignal.timeout()` is the WrongStack convention. A timer, not a signal, bypasses the abort plumbing.
|
|
176
|
+
- **Don't import from `dist/`.** Subpath exports are the entry point. `dist/` is build output; tests against it depend on the build having been run.
|
|
177
|
+
- **Don't report a coverage percentage from a partial run.** Coverage is the full suite, not a subset. A 90% on 60% of the files is not 90%.
|
|
178
|
+
|
|
179
|
+
## Before returning
|
|
180
|
+
|
|
181
|
+
- [ ] Tests co-located: `src/foo.ts` → `tests/foo.test.ts` in the same package
|
|
182
|
+
- [ ] Public API only; no internal-module mocks
|
|
183
|
+
- [ ] Async tests carry an explicit timeout (`{ timeout: 5000 }` or appropriate)
|
|
184
|
+
- [ ] `vi.restoreAllMocks()` and `vi.useRealTimers()` in `afterEach`
|
|
185
|
+
- [ ] `AbortSignal.timeout()` used for timeouts, not `setTimeout`
|
|
186
|
+
- [ ] No new `dependencies` entries for test-only packages
|
|
187
|
+
- [ ] Coverage gate met: new code ≥70%, existing coverage not reduced
|
|
188
|
+
- [ ] Coverage from full suite, not partial run
|
|
189
|
+
- [ ] Failing tests pair with the code under test, not staged in a separate commit
|
|
190
|
+
- [ ] `<nextsteps>` mirrors the open test gaps in priority order
|
|
191
|
+
|
|
168
192
|
## Skills in scope
|
|
169
193
|
|
|
170
194
|
- `bug-hunter` — for turning test failures into concrete bugs
|
|
@@ -4,7 +4,7 @@ description: |
|
|
|
4
4
|
Use this skill when writing or reviewing TypeScript code with strict mode
|
|
5
5
|
in WrongStack. Triggers: user mentions "TypeScript", "strict", "type error",
|
|
6
6
|
"type safety", "narrowing", "branded type", "discriminated union", "noUncheckedIndexedAccess".
|
|
7
|
-
version: 1.
|
|
7
|
+
version: 1.2.0
|
|
8
8
|
required-capabilities: [filesystem.read, filesystem.write]
|
|
9
9
|
required-tools: []
|
|
10
10
|
optional-capabilities: [verification.run]
|
|
@@ -235,6 +235,35 @@ const len: number = str?.length ?? 0;
|
|
|
235
235
|
console.log(name!.toUpperCase());
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
+
## Out of scope
|
|
239
|
+
|
|
240
|
+
- **Don't use `as any` or double assertions to silence errors.** Validate or narrow values at trust boundaries. A cast that hides a real type error is a bug surfaced later in runtime.
|
|
241
|
+
- **Don't use `!` non-null assertion.** `name!.toUpperCase()` silences the type checker without explanation. Use a narrow check or an assertion function.
|
|
242
|
+
- **`Function` and `Object` types are too broad.** They're `any`-shaped in disguise. Be specific.
|
|
243
|
+
- **Don't return `Promise<any>`.** `Promise<unknown>` or a generic. `Promise<any>` loses the type information the caller needs.
|
|
244
|
+
- **Don't omit return types on exported functions.** Without an explicit return type, exported functions hide errors and let callers assume any shape. Annotate public APIs.
|
|
245
|
+
- **Don't use optional chaining chains to dodge narrowing.** `a?.b?.c?.d` is "I don't know what `a` is" with a costume. Verify with `if (a)` first.
|
|
246
|
+
- **Don't loosen `noUncheckedIndexedAccess` to make tests pass.** It is the safety net. Once it's off, array access silently returns `T` instead of `T | undefined` and `undefined` slips through.
|
|
247
|
+
- **Don't mix `enum` and union types.** Pick one per project. `enum` is the legacy form; const-asserted string unions are the modern form.
|
|
248
|
+
- **Don't write code that compiles under `strict: false`.** WrongStack runs with `strict`, `noUncheckedIndexedAccess`, `noImplicitReturns`, and `exactOptionalPropertyTypes`. Code that only compiles under relaxed flags is the kind of debt this skill exists to prevent.
|
|
249
|
+
- **Don't accept `unknown` without narrowing at the use site.** `unknown` is the safe top type; leaving it un-narrowed is a typed-any escape hatch.
|
|
250
|
+
|
|
251
|
+
## Before returning
|
|
252
|
+
|
|
253
|
+
- [ ] No `as any` or double assertions; validation/narrowing at boundaries
|
|
254
|
+
- [ ] No `!` non-null assertion; narrow checks or assertion functions instead
|
|
255
|
+
- [ ] No `Function` or `Object`; specific function/object types used
|
|
256
|
+
- [ ] No `Promise<any>`; `Promise<unknown>` or generic
|
|
257
|
+
- [ ] Exported functions carry explicit return types
|
|
258
|
+
- [ ] `noUncheckedIndexedAccess` honored; `T | undefined` handled at every index access
|
|
259
|
+
- [ ] `exactOptionalPropertyTypes` honored; `prop?: T` and `prop: T | undefined` distinguished
|
|
260
|
+
- [ ] Discriminated unions used over optional fields where state is finite
|
|
261
|
+
- [ ] `assertNever` in `default:` of exhaustive switches
|
|
262
|
+
- [ ] Branded types for invariant strings (`UserId`, `SessionId`)
|
|
263
|
+
- [ ] `strict`, `noUncheckedIndexedAccess`, `noImplicitReturns`, `exactOptionalPropertyTypes` in `tsconfig.json`
|
|
264
|
+
- [ ] `pnpm run typecheck` passes before merge
|
|
265
|
+
- [ ] `<nextsteps>` mirrors open follow-ups (cast removals, narrowing gaps, tsconfig tightening)
|
|
266
|
+
|
|
238
267
|
## Skills in scope
|
|
239
268
|
|
|
240
269
|
- `node-modern` — for TypeScript + ESM patterns
|
|
@@ -6,6 +6,7 @@ description: |
|
|
|
6
6
|
managed Backlog→Todo→Running→Review→Done lifecycle, lease-fenced dispatch,
|
|
7
7
|
and what "verified" means before a card reaches Done.
|
|
8
8
|
trigger: working with the kanban tool, managing project work through boards, or advancing a managed card's lifecycle
|
|
9
|
+
version: 1.0.0
|
|
9
10
|
required-capabilities: [work.plan]
|
|
10
11
|
required-tools: [kanban]
|
|
11
12
|
---
|
|
@@ -127,6 +128,29 @@ filled in as it becomes known.
|
|
|
127
128
|
| Omitting unfinished Todo/task/plan rows | Requirement identity and coverage would be lost |
|
|
128
129
|
| Inventing subtasks for a leaf card | Recursive decomposition to satisfy process, not the work |
|
|
129
130
|
|
|
131
|
+
## Out of scope
|
|
132
|
+
|
|
133
|
+
- **Don't create a card for trivial work.** A quick read, a one-line fix, or a question does not need a card. Resume the existing card for the same request instead of creating a duplicate.
|
|
134
|
+
- **Don't claim a task is done in chat without a board mutation.** Chat-only completion is fake progress. Persist via `kanban` actions; the board is the shared record.
|
|
135
|
+
- **Don't skip lifecycle stages on a managed board.** Managed cards move exactly one stage at a time. The guard rejects jumps; trying to bypass it is a bug.
|
|
136
|
+
- **Don't work an unclaimed card.** Another agent may be working it. Take `claim_task` first (via `kanban`), or let the Director's queue claim for you.
|
|
137
|
+
- **Don't lose the lease.** Heartbeat before the lease expires. An expired lease is recovered by the supervisor and the card returns to the queue.
|
|
138
|
+
- **Don't fence-less write.** Pass `expectedLeaseId` on every `mark_assignment` and `heartbeat_assignment`. If your lease was recovered, an unfenced write corrupts the successor's state.
|
|
139
|
+
- **Don't invent children for a leaf card.** Atomic work is one childless leaf. Recursive decomposition to satisfy process is process for process's sake.
|
|
140
|
+
- **Don't try to influence dispatch order.** Selection is deterministic by priority, column, order, and creation time. Shuffling tasks or boards doesn't change it.
|
|
141
|
+
- **Don't block on Kanban persistence.** If a board write fails, say so and keep working. The board follows the work; the work does not wait on the board.
|
|
142
|
+
|
|
143
|
+
## Before returning
|
|
144
|
+
|
|
145
|
+
- [ ] Substantial work has a card with `description`, `assignee`, and `successCriteria` set
|
|
146
|
+
- [ ] Card claimed via `claim_task` (or Director queue) before any work started
|
|
147
|
+
- [ ] Lease heartbeated within the lease window
|
|
148
|
+
- [ ] Every material action produced a board mutation (no chat-only claims of progress)
|
|
149
|
+
- [ ] `mark_assignment` and `heartbeat_assignment` carried `expectedLeaseId`
|
|
150
|
+
- [ ] Completion went through the verifier; "Done" means the verifier actually ran
|
|
151
|
+
- [ ] Todo/task/plan rows preserve `kanbanBoardId` / `kanbanTaskId` bindings in full-list updates
|
|
152
|
+
- [ ] Card count scaled to the size of the work; no invented subtasks
|
|
153
|
+
|
|
130
154
|
## Related skills
|
|
131
155
|
|
|
132
156
|
- `sdd` — spec-driven development creates boards from task graphs
|
|
@@ -8,7 +8,7 @@ description: |
|
|
|
8
8
|
mailbox", "send to WrongStack", "wrongstack mail", "broadcast to the
|
|
9
9
|
fleet", "tell the wrongstack agents", "is anyone online in
|
|
10
10
|
wrongstack", or "register me with wrongstack".
|
|
11
|
-
version: 1.
|
|
11
|
+
version: 1.1.0
|
|
12
12
|
required-capabilities: []
|
|
13
13
|
required-tools: [mailbox]
|
|
14
14
|
optional-capabilities: [mcp.dynamic, web.research]
|
|
@@ -738,6 +738,34 @@ mailbox serve` standalone all work. The first one to come up for a
|
|
|
738
738
|
given project starts the bridge; subsequent surfaces join it via the
|
|
739
739
|
per-project lock.
|
|
740
740
|
|
|
741
|
+
## Out of scope
|
|
742
|
+
|
|
743
|
+
- **Don't open Mailbox files directly.** No `_mailbox.sqlite`, no legacy JSONL, no bridge locks, no token files. The bridge and `mb()` / `mbWithBootstrap()` are the only paths; bypassing them breaks trust and audit.
|
|
744
|
+
- **Don't impersonate `hq@...` or another agent.** Use a stable, honest `agentId` for your own identity. The bridge does not enforce sender identity; impersonation is on you, and it's the kind of thing that gets the bridge shut down.
|
|
745
|
+
- **Don't hardcode the token.** Read it from `.mailbox.token`, `.mailbox-bridge.lock`, or accept it from the user. Re-read after a 401. Tokens rotate on every fresh bridge start.
|
|
746
|
+
- **Don't let requests hang.** `AbortSignal.timeout(10_000)` is mandatory. The mailbox is local; 10 s is generous, and a hung bridge will wedge the agent.
|
|
747
|
+
- **Don't poll faster than 1 Hz.** The bridge enforces 120 req/min/token. Polling at sub-second rates hits the limit and looks like a flooding attempt.
|
|
748
|
+
- **Don't use SSE events as authoritative.** `GET /mailbox/events` is a wake-up hint, not a snapshot. After every event, reconcile through `/mailbox/query` or `/mailbox/check`.
|
|
749
|
+
- **Don't broadcast without thinking.** `to: "*"` reaches every online agent. One broadcast per task, with a clear subject. The WebUI marks broadcasts with a different color and humans notice noise.
|
|
750
|
+
- **Don't ack in a loop when `ack-many` fits.** If you have more than one unread message, use `/mailbox/ack-many` — one request, one lock, one rewrite.
|
|
751
|
+
- **Don't skip `register_self`.** Without registration, the WebUI can't show you as online, and heartbeats are unreconciled.
|
|
752
|
+
- **Don't randomize your `agentId`.** Read receipts and history break if your id changes every poll. Pick a stable convention and reuse it.
|
|
753
|
+
- **Don't promise features the bridge doesn't expose.** The bridge is mailbox only. For the full WrongStack tool surface, use `wstack mcp serve`; for SMTP/IMAP, push back — WrongStack's mailbox is internal.
|
|
754
|
+
|
|
755
|
+
## Before returning
|
|
756
|
+
|
|
757
|
+
- [ ] No Mailbox files opened or edited directly; bridge and `mb()` only
|
|
758
|
+
- [ ] Stable, honest `agentId`; no impersonation of `hq@...` or other agents
|
|
759
|
+
- [ ] Token read from `.mailbox.token` or `.mailbox-bridge.lock`, not hardcoded
|
|
760
|
+
- [ ] `mbWithBootstrap()` used for discovery when env vars aren't set
|
|
761
|
+
- [ ] All requests carry `AbortSignal.timeout(10_000)`
|
|
762
|
+
- [ ] `register_self` called with stable name and role before any traffic
|
|
763
|
+
- [ ] Heartbeat every 30 s; `deregister_self` on clean shutdown
|
|
764
|
+
- [ ] SSE preferred for real-time; polling ≥ 1 Hz, ≤ 5–10 s
|
|
765
|
+
- [ ] `ack-many` used when more than one message needs acknowledgement
|
|
766
|
+
- [ ] Broadcast only with clear subject, at most once per task
|
|
767
|
+
- [ ] Bridge health (`/healthz`) probed before relying on routes
|
|
768
|
+
|
|
741
769
|
## Skills in scope
|
|
742
770
|
|
|
743
771
|
- `node-modern` — `AbortSignal.timeout`, ESM-only imports.
|