@wrongstack/core 0.302.2 → 0.305.0

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 (97) hide show
  1. package/README.md +1 -1
  2. package/dist/chronicle/index.js +117 -30
  3. package/dist/chronicle/project-server.js +12 -5
  4. package/dist/coordination/agents/index.js +4645 -3448
  5. package/dist/coordination/agents/project-agent-auto-optimize.d.ts +116 -0
  6. package/dist/coordination/agents/project-agent-capture-window.d.ts +29 -0
  7. package/dist/coordination/agents/project-agent-config-io.d.ts +11 -0
  8. package/dist/coordination/agents/project-agent-consolidation.d.ts +34 -2
  9. package/dist/coordination/agents/project-agent-directive-outcome.d.ts +57 -0
  10. package/dist/coordination/agents/project-agent-files.d.ts +12 -3
  11. package/dist/coordination/agents/project-agent-identity-types.d.ts +4 -0
  12. package/dist/coordination/agents/project-agent-identity.d.ts +38 -11
  13. package/dist/coordination/agents/project-agent-learning-entries.d.ts +8 -2
  14. package/dist/coordination/agents/project-agent-learning-policy.d.ts +22 -1
  15. package/dist/coordination/agents/project-agent-learning-structured.d.ts +72 -1
  16. package/dist/coordination/agents/project-agent-optimizer.d.ts +49 -0
  17. package/dist/coordination/agents/project-agent-quarantine.d.ts +63 -0
  18. package/dist/coordination/agents/project-agent-skill-layer.d.ts +146 -0
  19. package/dist/coordination/agents/role-skills.d.ts +11 -1
  20. package/dist/coordination/agents/types.d.ts +10 -2
  21. package/dist/coordination/director-prompts.d.ts +19 -6
  22. package/dist/coordination/director-tools.d.ts +2 -2
  23. package/dist/coordination/fleet.d.ts +0 -6
  24. package/dist/coordination/index.d.ts +1 -1
  25. package/dist/coordination/index.js +5746 -4326
  26. package/dist/coordination/mail-tools.d.ts +1 -1
  27. package/dist/core/agent-types.d.ts +4 -2
  28. package/dist/core/agent.d.ts +1 -0
  29. package/dist/core/context.d.ts +19 -0
  30. package/dist/core/conversation-state.d.ts +14 -0
  31. package/dist/core/fallback-profile-manager.d.ts +70 -2
  32. package/dist/core/index.js +317 -108
  33. package/dist/core/system-prompt-blocks.d.ts +1 -1
  34. package/dist/core/system-prompt-builder.d.ts +13 -1
  35. package/dist/core/system-prompt-glossary.d.ts +73 -0
  36. package/dist/core/system-prompt-memory-skills.d.ts +2 -2
  37. package/dist/defaults/index.js +1635 -1120
  38. package/dist/execution/council-orchestrator.d.ts +3 -13
  39. package/dist/execution/index.js +3136 -2706
  40. package/dist/execution/one-shot-llm.d.ts +5 -0
  41. package/dist/goal/index.js +7 -0
  42. package/dist/hq/index.js +17 -7
  43. package/dist/hq/protocol/kanban.d.ts +21 -0
  44. package/dist/hq/protocol.js +5 -1
  45. package/dist/hq/redaction.d.ts +14 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +5502 -3483
  48. package/dist/infrastructure/index.js +247 -122
  49. package/dist/kernel/events/agent-events.d.ts +28 -0
  50. package/dist/plugin/index.js +111 -7
  51. package/dist/registry/index.js +11 -0
  52. package/dist/registry/tool-registry.d.ts +8 -0
  53. package/dist/replay/hash.d.ts +9 -0
  54. package/dist/replay/index.js +14 -4
  55. package/dist/replay/replay-provider-runner.d.ts +31 -1
  56. package/dist/security/index.js +92 -21
  57. package/dist/security/kanban-boundary.d.ts +5 -1
  58. package/dist/security/secret-vault.d.ts +2 -0
  59. package/dist/session-catalog/index.js +86 -10
  60. package/dist/session-catalog/project-server.js +100 -17
  61. package/dist/session-catalog/protocol.d.ts +20 -4
  62. package/dist/session-catalog/store.d.ts +19 -3
  63. package/dist/storage/index.js +305 -69
  64. package/dist/storage/memory-consolidator.d.ts +4 -2
  65. package/dist/storage/plan-store.d.ts +1 -1
  66. package/dist/storage/session-resume-validation.d.ts +24 -0
  67. package/dist/storage/session-store/directory-scan.d.ts +5 -1
  68. package/dist/storage/session-store/fork-session.d.ts +13 -1
  69. package/dist/storage/session-store/load-cache.d.ts +11 -0
  70. package/dist/storage/session-store/prune-helpers.d.ts +5 -0
  71. package/dist/storage/session-store.d.ts +18 -0
  72. package/dist/tasking/index.js +5 -0
  73. package/dist/tools/index.js +1151 -831
  74. package/dist/types/config/mcp-features.d.ts +31 -1
  75. package/dist/types/config/root.d.ts +23 -1
  76. package/dist/types/config/skills-fleet-brain.d.ts +34 -0
  77. package/dist/types/config/tools.d.ts +22 -0
  78. package/dist/types/config/ui.d.ts +14 -0
  79. package/dist/types/config.d.ts +1 -0
  80. package/dist/types/default-config.d.ts +1 -0
  81. package/dist/types/index.d.ts +2 -2
  82. package/dist/types/index.js +23 -0
  83. package/dist/types/multi-agent.d.ts +7 -0
  84. package/dist/types/session.d.ts +9 -1
  85. package/dist/types/task-graph.d.ts +2 -0
  86. package/dist/types/tool-executor.d.ts +2 -0
  87. package/dist/utils/index.d.ts +1 -0
  88. package/dist/utils/index.js +217 -76
  89. package/dist/utils/project-state-guard.d.ts +21 -0
  90. package/dist/utils/session-scoped-path.d.ts +17 -0
  91. package/dist/utils/todos-format.d.ts +20 -0
  92. package/instructions/leader-after-task.md +3 -4
  93. package/instructions/system-lite.md +17 -14
  94. package/instructions/system-pro.md +29 -30
  95. package/instructions/system.md +29 -28
  96. package/package.json +3 -3
  97. package/skills/wrongstack-kanban/SKILL.md +95 -93
@@ -1,132 +1,134 @@
1
1
  ---
2
2
  name: wrongstack-kanban
3
- description: >-
4
- Monitor and manage a WrongStack project's IPC-backed Kanban through the
5
- dedicated tool actions. Enforces deterministic task lifecycle, prevents
6
- fake-progress, and ensures every card carries verifiable evidence before
7
- completion. Use this skill whenever working with Kanban boards, tasks,
8
- dispatch, verification, or the kanban tool.
9
- triggers:
10
- - user says "kanban", "board", "task dispatch", "kanban queue"
11
- - working with the kanban tool or kanban_queue
12
- - managing project work through boards
3
+ description: |
4
+ Record substantial project work on WrongStack's IPC-backed Kanban board so it
5
+ survives the session and other agents can see it. Covers card detail, the
6
+ managed Backlog→Todo→Running→Review→Done lifecycle, lease-fenced dispatch,
7
+ and what "verified" means before a card reaches Done.
8
+ trigger: working with the kanban tool, managing project work through boards, or advancing a managed card's lifecycle
13
9
  required-capabilities: [work.plan]
14
- required-tools: [kanban, kanban_queue]
10
+ required-tools: [kanban]
15
11
  ---
16
12
 
17
- # WrongStack Kanban — Deterministic Enforcement Skill
13
+ # WrongStack Kanban
18
14
 
19
- ## Core contract
15
+ ## What the board is for
20
16
 
21
- The Kanban board is the **single source of truth** for tracked work. Chat
22
- messages, session logs, and agent self-reports are **not** completion evidence.
23
- Only persisted board mutations with verifiable evidence count.
17
+ The board tells whoever picks the work up what is in flight, what it depends
18
+ on, and what already happened. **It is a record, not a checkpoint.** Put
19
+ substantial or multi-step work on it so the state outlives the session; a
20
+ trivial edit, a quick read, or a question does not need a card. Resume the
21
+ existing card for the same request instead of creating a duplicate.
24
22
 
25
- ## Anti-fake-progress rules
26
-
27
- 1. **Never claim a task is "done" in chat without a board mutation.**
28
- If you completed work, you must call `kanban` with `action: "mark_assignment"`
29
- or `action: "transition_task"` to persist the result. A chat-only claim of
30
- completion is fake progress.
31
-
32
- 2. **Never mark a task "completed" without verification.**
33
- On managed boards, `mark_assignment(completed)` parks the card in Review —
34
- it does not complete it. Only `verifyTaskCompletion` passing (or reviewer
35
- acceptance) moves a card to Done.
23
+ **The board follows the work; the work does not wait on the board.** If Kanban
24
+ persistence fails, say so and keep working — do not stall.
36
25
 
37
- 3. **Never skip lifecycle stages.**
38
- Managed cards move exactly one stage at a time: Backlog Todo Running
39
- Review Done. Jumping stages is a deterministic violation that the lifecycle
40
- guard rejects.
26
+ If board or card identity is unclear, call `kanban` with action `workbench`
27
+ first. Its Now / Next / Blocked / Review lanes and alerts are navigation over
28
+ authoritative boards; follow the selected card back to its board before
29
+ mutating it, and never treat the Workbench projection as a second task store.
41
30
 
42
- 4. **Never create empty tasks on managed boards.**
43
- Every managed-board task must have at minimum a `description`. A title-only
44
- card is rejected at creation time.
31
+ ## Proportional hierarchy
45
32
 
46
- 5. **Never report work as "in progress" without a board assignment.**
47
- If work is being done, the card must have an active assignment with lease
48
- metadata. Chat claims of "working on X" without a board assignment are not
49
- tracked work.
33
+ - A genuinely atomic request is **one childless leaf card**. It does not need
34
+ invented children.
35
+ - Composite work is a parent plus dependency-ordered children created with the
36
+ `kanban` action `split_atomic`. Only a parent marked `atomic: true` needs
37
+ `childTaskIds`.
38
+ - Scale card count to the size of the work. Never let card bookkeeping become
39
+ the task.
50
40
 
51
- ## Task detail requirements
41
+ ## Card detail
52
42
 
53
- Before a managed card can leave Backlog (transition to Todo), it must have:
43
+ What a managed board actually enforces before a card leaves Backlog:
54
44
 
55
45
  | Field | Required | Why |
56
46
  |-------|----------|-----|
57
47
  | `description` | **Yes** | A title alone is not actionable scope |
58
- | `assignee` | **Yes** | Work without an owner is untracked |
59
- | `dueDate` | **Yes** | Work without a deadline drifts indefinitely |
60
- | `labels` | **Yes** (≥1) | Tags categorize and filter work |
61
- | `childTaskIds` | **Yes** (≥1) | Every task is decomposed into subtasks |
48
+ | `assignee` (or `assignedAgent` / assignment identity) | **Yes** | Work without an owner is untracked |
62
49
  | `successCriteria` | **Yes** | Acceptance criteria define "done" before work starts |
50
+ | `childTaskIds` | Only when `atomic: true` | A composite parent must name its children; a leaf stays childless |
63
51
 
64
- The lifecycle guard enforces these mechanically. Do not attempt to bypass them.
52
+ `dueDate`, `labels`, `priority` and `estimatedHours` are available and used when
53
+ set, but **not required** — a thirty-line fix has no genuine deadline, and
54
+ demanding one only teaches you to invent a date to clear the gate. The Kanban
55
+ Cleaner still lists them as advisory suggestions; that is not a block.
65
56
 
66
- ## Dispatch contract
57
+ Fill what is genuinely known. A thin card beats untracked work, and the rest is
58
+ filled in as it becomes known.
67
59
 
68
- 1. **Dispatch is deterministic.** The system selects tasks by priority, column,
69
- order, and creation time — not randomly. Do not attempt to influence dispatch
70
- order by shuffling tasks or boards.
60
+ ## Anti-fake-progress rules
71
61
 
72
- 2. **Claim before working.** Call `kanban_queue`, or call `kanban` with the
73
- `claim_task` action, before starting
74
- work. Working on an unclaimed card means another agent may also be working on
62
+ 1. **Never claim a task is done in chat without a board mutation.** If you
63
+ completed work, call `kanban` with `mark_assignment` or `transition_task` to
64
+ persist it. A chat-only completion claim is fake progress.
65
+ 2. **Never mark a task completed without verification.** On a managed board
66
+ `mark_assignment(completed)` moves the card to Review — it does not complete
75
67
  it.
68
+ 3. **Never skip lifecycle stages.** Managed cards move exactly one stage at a
69
+ time. The guard rejects jumps.
70
+ 4. **Never report work as in progress without a board assignment.** If work is
71
+ happening, the card must carry an active assignment with lease metadata.
72
+ 5. **Never shrink tracked scope by omission.** Todo, task and plan rows are
73
+ identity-bearing projections of Kanban cards. Keep every unfinished row and
74
+ its `kanbanBoardId`/`kanbanTaskId` binding in full-list updates.
76
75
 
77
- 3. **Heartbeat or lose the lease.** If you hold a lease, you must call `kanban`
78
- with the `heartbeat_assignment` action before it expires. Expired leases are recovered by the
79
- system and the task is reassigned.
76
+ ## Dispatch contract
80
77
 
81
- 4. **Fence your writes.** Include `expectedLeaseId` in every `mark_assignment`
82
- and `heartbeat_assignment` call. If your lease was recovered, your write
83
- becomes a safe no-op instead of corrupting the successor's state.
78
+ 1. **Dispatch is deterministic.** Selection is by priority, column, order and
79
+ creation time child cards before composite parents. Do not try to
80
+ influence it by shuffling tasks or boards.
81
+ 2. **Claim before working.** Call `kanban` with `claim_task` (or let the
82
+ Director's queue tool claim for you) before starting. Working an unclaimed
83
+ card means another agent may be working it too.
84
+ 3. **Heartbeat or lose the lease.** Call `kanban` with `heartbeat_assignment`
85
+ before the lease expires. Expired leases are recovered by the supervisor and
86
+ the task is returned to the queue for reassignment.
87
+ 4. **Fence your writes.** Pass `expectedLeaseId` on every `mark_assignment` and
88
+ `heartbeat_assignment`. If your lease was recovered, the write becomes a safe
89
+ no-op instead of corrupting the successor's state.
84
90
 
85
91
  ## Completion contract
86
92
 
87
- 1. **"Done" means verified.** The completion gate runs `verifyTaskCompletion()`,
88
- which executes success criteria checks deterministically. A passed gate is
89
- the only path to Done on managed boards.
90
-
91
- 2. **Chat evidence is not board evidence.** Saying "tests pass" in chat does not
92
- verify a task. The verifier runs the actual test command and records the
93
- result.
94
-
95
- 3. **File-scope is checked.** If `expectedFileChanges` is set, the verifier
93
+ 1. **"Done" means verified.** The completion gate runs the verifier, which
94
+ executes success-criteria checks deterministically tests and commands are
95
+ actually run, not asserted.
96
+ 2. **Chat evidence is not board evidence.** Saying "tests pass" verifies
97
+ nothing. The verifier runs the real command and records the result.
98
+ 3. **File scope is checked.** When `expectedFileChanges` is set, the verifier
96
99
  compares the actual git diff against the expected paths. Unexpected changes
97
100
  fail the scope check.
98
-
99
- 4. **Review is mandatory.** Even after verification passes, a reviewer must
100
- accept the card (transition Review Done with action text and an attachment).
101
- Worker completion alone never reaches Done.
102
-
103
- ## Event tracking
104
-
105
- Every material action must produce a board mutation:
106
-
107
- | Action | Required board mutation |
108
- |--------|------------------------|
109
- | Start work | `mark_assignment(running)` + `transition_task(running)` |
110
- | Complete work | `mark_assignment(completed)` + `transition_task(review)` |
111
- | Fail work | `mark_assignment(failed)` with error |
101
+ 4. **Acceptance depends on board policy.** When verification passes, a managed
102
+ board auto-accepts Review Done by default. A board that sets
103
+ `lifecycle.autoAccept: false` holds the card in Review for an explicit
104
+ reviewer `transition_task`. Either way, a failing or absent verdict never
105
+ reaches Done on its own.
106
+
107
+ ## Every material action produces a board mutation
108
+
109
+ | Action | Required mutation |
110
+ |--------|-------------------|
111
+ | Start work | `mark_assignment(running)` — a managed card advances to Running with it |
112
+ | Complete work | `mark_assignment(completed)` a managed card advances to Review |
113
+ | Fail work | `mark_assignment(failed)` with `error` |
112
114
  | Split scope | `split_task` or `split_atomic` |
113
115
  | Add evidence | `add_note` or `add_link` |
114
116
  | Change plan | `update_task` or `add_dependency` |
117
+ | Tick a criterion | `update_check` with `checkStatus: "passed"` (read ids from `get_task`) |
115
118
 
116
119
  ## Prohibited patterns
117
120
 
118
- | Anti-pattern | Why it's prohibited |
119
- |--------------|---------------------|
120
- | Creating title-only tasks on managed boards | Rejected at creation; no description = not actionable |
121
- | Reporting "done" without board evidence | Fake progress; board is source of truth |
121
+ | Anti-pattern | Why |
122
+ |--------------|-----|
123
+ | Creating title-only cards on a managed board | Rejected at creation; no description means no actionable scope |
124
+ | Reporting done without board evidence | Fake progress; the board is the shared record |
122
125
  | Randomizing task selection | Dispatch is deterministic by design |
123
- | Skipping Review | Reviewer acceptance is mandatory before Done |
124
- | Working without a lease | Untracked; may conflict with another agent |
125
- | Soft-completing on managed boards | Gate enforcement is strict; soft is not honored |
126
+ | Working without a lease | Untracked, and may collide with another agent |
127
+ | Omitting unfinished Todo/task/plan rows | Requirement identity and coverage would be lost |
128
+ | Inventing subtasks for a leaf card | Recursive decomposition to satisfy process, not the work |
126
129
 
127
- ## Skills in scope
130
+ ## Related skills
128
131
 
129
- - `sdd` — Spec-driven development creates boards from task graphs
130
- - `bug-hunter` — Findings can be tracked as Kanban cards
131
- - `chimera` — Post-session review updates board cards
132
- - `multi-agent` — Parallel dispatch through kanban_queue
132
+ - `sdd` — spec-driven development creates boards from task graphs
133
+ - `bug-hunter` — findings can be tracked as cards
134
+ - `multi-agent` — parallel dispatch through the Director's queue tool