@wrongstack/core 0.277.2 → 0.280.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/{agent-bridge-BFJ2ODzI.d.ts → agent-bridge-DXC6QDJ4.d.ts} +1 -1
- package/dist/{agent-subagent-runner-BimKihiC.d.ts → agent-subagent-runner-PoqNKiR4.d.ts} +563 -471
- package/dist/{compactor-D3BGw26y.d.ts → compactor-U3agvUIG.d.ts} +1 -1
- package/dist/{config-DAOjriz9.d.ts → config-Cr3312zc.d.ts} +102 -4
- package/dist/coordination/index.d.ts +1087 -998
- package/dist/coordination/index.js +12235 -12052
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +31 -30
- package/dist/defaults/index.js +403 -189
- package/dist/defaults/index.js.map +1 -1
- package/dist/{brain-CCfuEOdp.d.ts → events-Bs2fmldo.d.ts} +117 -112
- package/dist/execution/index.d.ts +27 -19
- package/dist/execution/index.js +216 -63
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/execution/prompt-enhancer.js.map +1 -1
- package/dist/extension/index.d.ts +8 -7
- package/dist/{global-mailbox-Dr4cTKqL.d.ts → global-mailbox-Ct7IorLJ.d.ts} +84 -6
- package/dist/{goal-store-C1uH4srH.d.ts → goal-store-C4F6DjC0.d.ts} +1 -1
- package/dist/hq/index.d.ts +504 -7
- package/dist/hq/index.js +1069 -20
- package/dist/hq/index.js.map +1 -1
- package/dist/{index-DJXj-dcr.d.ts → index-kidebiDh.d.ts} +8 -5
- package/dist/{index-cMEmzCVN.d.ts → index-nP09-oP2.d.ts} +2 -2
- package/dist/index.d.ts +153 -76
- package/dist/index.js +5791 -3163
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +7 -6
- package/dist/kernel/index.d.ts +14 -13
- package/dist/kernel/index.js +31 -15
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mailbox-types-DTl7bRH3.d.ts → mailbox-types-BGZWrYTJ.d.ts} +38 -0
- package/dist/{mcp-servers-CFb60-pH.d.ts → mcp-servers-D910X5_r.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-5Ufn7f2m.d.ts → models-registry-CLkoOcHk.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-CcrcncvG.d.ts → multi-agent-coordinator-CieyUoEL.d.ts} +1 -1
- package/dist/{null-fleet-bus-C9KsYyrI.d.ts → null-fleet-bus-DkdmZJ_W.d.ts} +464 -464
- package/dist/observability/index.d.ts +3 -2
- package/dist/{path-resolver-CEeX9I7O.d.ts → path-resolver-XfZ9eLxG.d.ts} +3 -3
- package/dist/{permission-DbsGOA1C.d.ts → permission-Dx6dIqS2.d.ts} +2 -7
- package/dist/{permission-policy-BpEea3r7.d.ts → permission-policy-C8vJcnX5.d.ts} +2 -2
- package/dist/{pipeline-CEjBjzVA.d.ts → pipeline-BwAP21_4.d.ts} +9 -4
- package/dist/{provider-model-resolve-BpfXp3Jj.d.ts → provider-model-resolve-CwQNZWt_.d.ts} +3 -3
- package/dist/{provider-runner-CnOSr5BN.d.ts → provider-runner-CYHFImzV.d.ts} +3 -3
- package/dist/{retry-policy-Git9WF6d.d.ts → retry-policy-D4feSLk3.d.ts} +1 -1
- package/dist/sdd/index.d.ts +11 -10
- package/dist/sdd/index.js +2 -2
- package/dist/sdd/index.js.map +1 -1
- package/dist/secret-scrubber-3MHDDAtm.d.ts +6 -0
- package/dist/{secret-vault-DDSMHqIm.d.ts → secret-vault-CImt2XrR.d.ts} +1 -1
- package/dist/security/index.d.ts +6 -5
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-Cq72C0Oy.d.ts → selector-Dy-MzKp1.d.ts} +1 -1
- package/dist/{session-event-bridge-DG94B3Bk.d.ts → session-event-bridge-CqdiGnfU.d.ts} +1 -1
- package/dist/{session-reader-BzT-iMQT.d.ts → session-reader-Hk0WbNm9.d.ts} +1 -1
- package/dist/{skill-DGIXCtdv.d.ts → skill-DHniprNl.d.ts} +15 -1
- package/dist/skills/index.d.ts +472 -26
- package/dist/skills/index.js +872 -129
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +27 -14
- package/dist/storage/index.js +264 -85
- package/dist/storage/index.js.map +1 -1
- package/dist/{strategy-compactor-Bt_ZH6R0.d.ts → strategy-compactor-CQwhbErd.d.ts} +32 -17
- package/dist/{todos-checkpoint-CH1pcua9.d.ts → todos-checkpoint-Bk2uP7Ex.d.ts} +6 -6
- package/dist/{context-DPlA6kid.d.ts → tool-BkOgs_KL.d.ts} +306 -286
- package/dist/{tool-executor-SVFq7IOR.d.ts → tool-executor-SiE1wlZo.d.ts} +9 -9
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +22 -21
- package/dist/types/index.js +7 -9
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +30 -4
- package/dist/utils/index.js +50 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{worktree-manager-C4YIf1Fa.d.ts → worktree-manager-BjOFF6bt.d.ts} +1 -1
- package/dist/{wstack-paths-_NrRovdr.d.ts → wstack-paths-CMl_cYgq.d.ts} +8 -0
- package/package.json +1 -1
- package/skills/mailbox-bridge/SKILL.md +1 -0
- package/skills/plugin-author/SKILL.md +350 -0
- package/skills/sdd/SKILL.md +134 -134
- package/skills/skill-creator/SKILL.md +45 -7
- package/skills/wrongstack-mailbox/SKILL.md +40 -21
|
@@ -3,14 +3,14 @@ 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.2.0
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Skill Creator — WrongStack
|
|
10
10
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
|
-
Guides the creation of new WrongStack skills. A skill is a Markdown file with YAML frontmatter — the first sentence of the description is the trigger. You are the wizard: ask questions, validate answers, write the file.
|
|
13
|
+
Guides the creation of new WrongStack skills. A skill is a Markdown file with YAML frontmatter — the first sentence of the description is the trigger. You are the wizard: ask questions, validate answers, write the file. Use the `/skill-gen` sub-commands to do the mechanical parts (validation, scaffolding) deterministically.
|
|
14
14
|
|
|
15
15
|
## Rules
|
|
16
16
|
|
|
@@ -22,6 +22,22 @@ Guides the creation of new WrongStack skills. A skill is a Markdown file with YA
|
|
|
22
22
|
6. End with "Skills in scope" listing related skills for delegation.
|
|
23
23
|
7. Don't let skill names collide with existing skills.
|
|
24
24
|
|
|
25
|
+
## Authoring commands (use these)
|
|
26
|
+
|
|
27
|
+
The `/skill-gen` command is a toolkit — pick the right sub-command for the job instead of writing files by hand:
|
|
28
|
+
|
|
29
|
+
| Sub-command | When to use |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `/skill-gen` (bare) | Open-ended creation: you (the agent) ask questions one at a time, then write the file. Best for nuanced skills. |
|
|
32
|
+
| `/skill-gen skeleton <name> --desc "..." --trigger a,b` | Quick scaffold: generates a valid SKILL.md skeleton the user edits. Use when the name + trigger are already known. |
|
|
33
|
+
| `/skill-gen from-prompt "<text>"` | Turn an existing prompt/instruction into a skill draft. Use when the user hands you a prompt and says "make this a skill". |
|
|
34
|
+
| `/skill-gen validate <name>` | Validate a name (format + collisions) before writing. **Always run this before creating a file.** |
|
|
35
|
+
| `/skill-gen view <name>` | Read-only: show a skill's body. |
|
|
36
|
+
| `/skill-gen edit <name>` | Open the skill in `$EDITOR`/`$VISUAL`. |
|
|
37
|
+
| `/skill-gen list` | List skills with their source layer. |
|
|
38
|
+
|
|
39
|
+
After writing a skill with the wizard flow, run `/skill-gen validate <name>` to confirm it loads cleanly.
|
|
40
|
+
|
|
25
41
|
## Patterns
|
|
26
42
|
|
|
27
43
|
### Do
|
|
@@ -95,16 +111,38 @@ What this skill does.
|
|
|
95
111
|
2. Step two
|
|
96
112
|
```
|
|
97
113
|
|
|
98
|
-
## File
|
|
114
|
+
## File structure
|
|
115
|
+
|
|
116
|
+
A skill is a directory containing `SKILL.md` plus optional resource subdirectories (the agentskills.io layout):
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
<name>/
|
|
120
|
+
SKILL.md ← required: metadata + instructions
|
|
121
|
+
scripts/ ← optional: executable code (run via bash)
|
|
122
|
+
references/ ← optional: docs loaded on demand (REFERENCE.md, …)
|
|
123
|
+
assets/ ← optional: templates, data, snippets
|
|
124
|
+
… ← any other subdirectories
|
|
125
|
+
```
|
|
99
126
|
|
|
100
|
-
Skills live
|
|
127
|
+
Skills live under these paths (priority order, first-seen wins by name):
|
|
101
128
|
|
|
102
|
-
1. **Project**: `<project>/.wrongstack/skills/<name
|
|
103
|
-
2. **
|
|
104
|
-
3. **
|
|
129
|
+
1. **Project**: `<project>/.wrongstack/skills/<name>/`
|
|
130
|
+
2. **Project foreign**: `<project>/.claude/skills/<name>/`, `<project>/.{codex,cursor,agents,…}/skills/<name>/`
|
|
131
|
+
3. **User global**: `~/.wrongstack/skills/<name>/`
|
|
132
|
+
4. **User foreign**: `~/.claude/skills/<name>/`, `~/.{codex,cursor,agents,…}/skills/<name>/`
|
|
133
|
+
5. **Bundled**: `packages/core/skills/<name>/` (read-only, core team)
|
|
105
134
|
|
|
106
135
|
For user-created skills: always use path 1 (project level).
|
|
107
136
|
|
|
137
|
+
## Resource files (scripts / references / assets)
|
|
138
|
+
|
|
139
|
+
Bundled resources are NOT injected into the prompt — the agent loads them on demand via the `skill` tool (agentskills.io progressive disclosure, tier 3):
|
|
140
|
+
|
|
141
|
+
- `skill({ name: "<name>" })` → lists every bundled file (scripts/, references/, assets/, any subdir, recursively).
|
|
142
|
+
- `skill({ name: "<name>", resource: "references/REF.md" })` → returns that file's content. Scripts come back with an absolute path so the agent runs them via `bash`.
|
|
143
|
+
|
|
144
|
+
Keep `SKILL.md` under ~500 lines; move deep reference material into `references/`. Reference files with relative paths from the skill root. Scripts must be self-contained and safe to run. Only add the subdirectories a skill actually needs — empty directories don't persist in git, so create a file (e.g. `scripts/README.md`) if you want the directory tracked.
|
|
145
|
+
|
|
108
146
|
## Workflow
|
|
109
147
|
|
|
110
148
|
1. **Ask the name** — suggest kebab-case, validate format
|
|
@@ -374,38 +374,35 @@ setInterval(() => {
|
|
|
374
374
|
### Poll, don't long-poll
|
|
375
375
|
|
|
376
376
|
The bridge does not support long-polling or websockets. Poll for new
|
|
377
|
-
messages on a 5–10 s interval
|
|
378
|
-
|
|
377
|
+
messages on a 5–10 s interval. Don't poll faster than 1 Hz — that's noisy
|
|
378
|
+
and gives nothing useful.
|
|
379
379
|
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
For normal inbox catch-up, prefer `/mailbox/check` over manual
|
|
381
|
+
`/mailbox/query` + `/mailbox/ack-many`. It checks direct mail,
|
|
382
|
+
`baseId` alias mail, and broadcasts in one call, dedupes messages, and
|
|
383
|
+
can optionally mark them read or completed via one batch ack.
|
|
382
384
|
|
|
385
|
+
```ts
|
|
383
386
|
async function pollOnce(): Promise<void> {
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
+
const result = await mb('/mailbox/check', {
|
|
388
|
+
agentId,
|
|
389
|
+
baseId: 'claude-code', // optional: your bare alias
|
|
387
390
|
limit: 50,
|
|
388
|
-
};
|
|
389
|
-
if (lastSeen !== undefined) args['since'] = lastSeen;
|
|
390
|
-
const result = await mb('/mailbox/query', args) as { data: MailboxMessage[] };
|
|
391
|
+
}) as { data: MailboxMessage[] };
|
|
391
392
|
|
|
392
393
|
for (const m of result.data) {
|
|
393
394
|
console.log(`[${m.type}] from=${m.from} subject=${m.subject}`);
|
|
394
395
|
// ...handle the message...
|
|
395
|
-
await mb('/mailbox/ack', {
|
|
396
|
-
messageId: m.id,
|
|
397
|
-
readerId: agentId,
|
|
398
|
-
read: true,
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
if (result.data.length > 0) {
|
|
402
|
-
lastSeen = result.data[result.data.length - 1]!.timestamp;
|
|
403
396
|
}
|
|
404
397
|
}
|
|
405
398
|
|
|
406
399
|
setInterval(pollOnce, 5_000);
|
|
407
400
|
```
|
|
408
401
|
|
|
402
|
+
Use `/mailbox/query` directly when you need custom searches such as
|
|
403
|
+
`from`, `type`, `since`, or `minPriority` filters rather than inbox
|
|
404
|
+
catch-up.
|
|
405
|
+
|
|
409
406
|
### Reply with `replyTo`
|
|
410
407
|
|
|
411
408
|
Set `replyTo` to the id of the message you're replying to. The original
|
|
@@ -424,11 +421,32 @@ await mb('/mailbox/send', {
|
|
|
424
421
|
});
|
|
425
422
|
```
|
|
426
423
|
|
|
424
|
+
### Complete messages while checking inbox
|
|
425
|
+
|
|
426
|
+
If handling a message finishes the requested work, mark it completed in the
|
|
427
|
+
same `/mailbox/check` call. This preserves read receipts and completion
|
|
428
|
+
state with one batch ack:
|
|
429
|
+
|
|
430
|
+
```ts
|
|
431
|
+
const result = await mb('/mailbox/check', {
|
|
432
|
+
agentId,
|
|
433
|
+
baseId: 'claude-code',
|
|
434
|
+
completed: true,
|
|
435
|
+
outcome: 'handled',
|
|
436
|
+
}) as { data: MailboxMessage[] };
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Use `markRead: false` to peek without consuming messages:
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
await mb('/mailbox/check', { agentId, markRead: false });
|
|
443
|
+
```
|
|
444
|
+
|
|
427
445
|
### Ack in batches
|
|
428
446
|
|
|
429
|
-
If you've just consumed a backlog
|
|
430
|
-
`/mailbox/ack-many` — one HTTP request,
|
|
431
|
-
JSONL rewrite inside WrongStack:
|
|
447
|
+
If you've just consumed a backlog through custom `/mailbox/query` filters,
|
|
448
|
+
don't ack them one at a time. Use `/mailbox/ack-many` — one HTTP request,
|
|
449
|
+
one file-lock acquisition, one JSONL rewrite inside WrongStack:
|
|
432
450
|
|
|
433
451
|
```ts
|
|
434
452
|
await mb('/mailbox/ack-many', {
|
|
@@ -488,6 +506,7 @@ All routes take JSON bodies on POST (or no body on GET). All require
|
|
|
488
506
|
|--------|------|---------|
|
|
489
507
|
| POST | `/mailbox/send` | Send a message |
|
|
490
508
|
| POST | `/mailbox/query` | Query messages (filters: `to`, `from`, `unreadBy`, `type`, `minPriority`, `incompleteOnly`, `limit`, `since`) |
|
|
509
|
+
| POST | `/mailbox/check` | Read inbox mail for `agentId`/`baseId` plus broadcasts; optionally `markRead=false`, `completed=true`, `outcome` |
|
|
491
510
|
| POST | `/mailbox/ack` | Acknowledge one message |
|
|
492
511
|
| POST | `/mailbox/ack-many` | Acknowledge many in one batch |
|
|
493
512
|
| POST | `/mailbox/unread-count` | Count unread for an agent |
|