@pcircle/memesh 4.0.2 → 4.1.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.
- package/README.de.md +115 -86
- package/README.es.md +107 -78
- package/README.fr.md +111 -82
- package/README.ja.md +117 -88
- package/README.ko.md +111 -82
- package/README.md +54 -3
- package/README.pt.md +103 -74
- package/README.th.md +117 -88
- package/README.vi.md +113 -84
- package/README.zh-CN.md +114 -85
- package/README.zh-TW.md +115 -86
- package/dashboard/dist/index.html +4 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +6 -10
- package/dist/core/config.js.map +1 -1
- package/dist/core/doctor.d.ts +40 -0
- package/dist/core/doctor.d.ts.map +1 -0
- package/dist/core/doctor.js +217 -0
- package/dist/core/doctor.js.map +1 -0
- package/dist/core/embedder.js.map +1 -1
- package/dist/core/install-channel.d.ts +30 -0
- package/dist/core/install-channel.d.ts.map +1 -0
- package/dist/core/install-channel.js +83 -0
- package/dist/core/install-channel.js.map +1 -0
- package/dist/core/schema-export.d.ts.map +1 -1
- package/dist/core/schema-export.js +34 -0
- package/dist/core/schema-export.js.map +1 -1
- package/dist/core/skill-usage-log.d.ts +11 -0
- package/dist/core/skill-usage-log.d.ts.map +1 -0
- package/dist/core/skill-usage-log.js +121 -0
- package/dist/core/skill-usage-log.js.map +1 -0
- package/dist/core/updater.d.ts +11 -0
- package/dist/core/updater.d.ts.map +1 -0
- package/dist/core/updater.js +28 -0
- package/dist/core/updater.js.map +1 -0
- package/dist/core/verifier.d.ts +37 -0
- package/dist/core/verifier.d.ts.map +1 -0
- package/dist/core/verifier.js +142 -0
- package/dist/core/verifier.js.map +1 -0
- package/dist/core/version-check.d.ts +28 -4
- package/dist/core/version-check.d.ts.map +1 -1
- package/dist/core/version-check.js +167 -21
- package/dist/core/version-check.js.map +1 -1
- package/dist/transports/cli/cli.js +154 -16
- package/dist/transports/cli/cli.js.map +1 -1
- package/dist/transports/http/server.d.ts.map +1 -1
- package/dist/transports/http/server.js +48 -1
- package/dist/transports/http/server.js.map +1 -1
- package/dist/transports/mcp/handlers.d.ts +93 -0
- package/dist/transports/mcp/handlers.d.ts.map +1 -1
- package/dist/transports/mcp/handlers.js +51 -1
- package/dist/transports/mcp/handlers.js.map +1 -1
- package/dist/transports/schemas.d.ts +28 -0
- package/dist/transports/schemas.d.ts.map +1 -1
- package/dist/transports/schemas.js +25 -0
- package/dist/transports/schemas.js.map +1 -1
- package/hooks/hooks.json +10 -0
- package/package.json +5 -3
- package/plugin.json +2 -2
- package/scripts/hooks/pre-bash-orchestration-nudge.js +150 -0
- package/scripts/hooks/pre-edit-recall.js +0 -0
- package/scripts/hooks/session-start.js +55 -2
- package/skills/agentic-orchestration/SKILL.md +399 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-orchestration
|
|
3
|
+
description: Experimental working-model protocol shipped with memesh v4.1. Status — protocol present + instrumented; effectiveness in real usage is being collected (see `memesh patterns`), not yet proven. Suggests a user-as-CTO / Claude-as-orchestrator / background-agents-as-engineers split. Claude routes work by verifiability, dispatches parallel background agents for high-verifiability technical work, and stays foreground only for strategic/understanding work that the user must own. Use as a default for non-trivial software tasks; report back when it helps or doesn't.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agentic Orchestration (Experimental Working-Model Protocol)
|
|
8
|
+
|
|
9
|
+
> **Status — experimental, instrumented, validation in progress.** This
|
|
10
|
+
> skill is shipped to begin collecting evidence about whether a structured
|
|
11
|
+
> verifiability-router protocol changes Claude's behavior in ways that
|
|
12
|
+
> measurably help users. `memesh patterns` exposes a local counter so you
|
|
13
|
+
> can see how often the banner is injected and how often
|
|
14
|
+
> `verify_agent_work` is invoked in your real usage. None of that data
|
|
15
|
+
> ever leaves your machine.
|
|
16
|
+
|
|
17
|
+
> **The roles, suggested:**
|
|
18
|
+
> - **User = CTO / PM.** Owns understanding, strategy, product taste, "what is worth building."
|
|
19
|
+
> - **Claude = Orchestrator / engineering manager.** Routes work, dispatches agents, reviews diffs, surfaces decisions, never the bottleneck.
|
|
20
|
+
> - **Background agents = engineering interns.** Execute high-verifiability technical work in parallel.
|
|
21
|
+
|
|
22
|
+
The hypothesis behind this skill: Claude as a single-threaded synchronous
|
|
23
|
+
coding partner spends a meaningful portion of the user's time on work
|
|
24
|
+
that could run in the background. If that hypothesis holds, this skill
|
|
25
|
+
should noticeably reduce wall-clock time on multi-step technical tasks.
|
|
26
|
+
We do not yet have field data either way.
|
|
27
|
+
|
|
28
|
+
**Announce at start:** "Using agentic-orchestration (experimental protocol) to route this work."
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Why this ships with memesh
|
|
33
|
+
|
|
34
|
+
memesh is a local memory layer **and** a working-model activator. Three
|
|
35
|
+
parts compose:
|
|
36
|
+
|
|
37
|
+
1. **This skill** — the protocol document. Loaded by Claude Code's skill
|
|
38
|
+
system when memesh is installed. Discoverable on its own.
|
|
39
|
+
2. **The SessionStart banner hook** — injects the working model into
|
|
40
|
+
Claude's context at session start so it sticks. **Opt-in: set
|
|
41
|
+
`MEMESH_ENABLE_AGENTIC_ORCHESTRATION=1`.**
|
|
42
|
+
3. **The PreToolUse Bash nudge hook** — advisory reminder when Claude is
|
|
43
|
+
about to run a high-verifiability bash command synchronously,
|
|
44
|
+
suggesting `run_in_background: true` instead. **Opt-in: same flag.**
|
|
45
|
+
|
|
46
|
+
Default is OFF for parts 2 and 3 — the core memory features (parts that
|
|
47
|
+
are not "the protocol") work without setting any flag. Opt in to the
|
|
48
|
+
flag if you want to participate in the experiment; doing so also enables
|
|
49
|
+
local-only telemetry (`memesh patterns`) so the protocol's effectiveness
|
|
50
|
+
can later be validated with real usage data.
|
|
51
|
+
|
|
52
|
+
Plus: memesh's self-improving lessons + the `agent_pattern` entity type
|
|
53
|
+
(record what dispatch patterns worked) close the loop — the longer you
|
|
54
|
+
use memesh, the better Claude gets at orchestrating *your* team's
|
|
55
|
+
specific kinds of work.
|
|
56
|
+
|
|
57
|
+
Memory is the substrate. Operating model is what makes Claude Code feel
|
|
58
|
+
different on day one.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## The Verifiability Router
|
|
63
|
+
|
|
64
|
+
Before doing any task, classify it. This decides whether Claude does it
|
|
65
|
+
foreground or dispatches it as a background agent.
|
|
66
|
+
|
|
67
|
+
```dot
|
|
68
|
+
digraph router {
|
|
69
|
+
"New task arrives" [shape=doublecircle];
|
|
70
|
+
"Outcome is checkable by code?" [shape=diamond];
|
|
71
|
+
"Multiple independent subtasks?" [shape=diamond];
|
|
72
|
+
"User must own the decision?" [shape=diamond];
|
|
73
|
+
"Foreground sync (Claude does it now)" [shape=box, style=filled];
|
|
74
|
+
"Single background agent (run_in_background:true)" [shape=box, style=filled];
|
|
75
|
+
"Parallel background agents (one per subtask)" [shape=box, style=filled];
|
|
76
|
+
|
|
77
|
+
"New task arrives" -> "User must own the decision?";
|
|
78
|
+
"User must own the decision?" -> "Foreground sync (Claude does it now)" [label="yes"];
|
|
79
|
+
"User must own the decision?" -> "Outcome is checkable by code?" [label="no"];
|
|
80
|
+
"Outcome is checkable by code?" -> "Foreground sync (Claude does it now)" [label="no"];
|
|
81
|
+
"Outcome is checkable by code?" -> "Multiple independent subtasks?" [label="yes"];
|
|
82
|
+
"Multiple independent subtasks?" -> "Single background agent (run_in_background:true)" [label="no"];
|
|
83
|
+
"Multiple independent subtasks?" -> "Parallel background agents (one per subtask)" [label="yes"];
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Three Tiers — be explicit about which one applies
|
|
88
|
+
|
|
89
|
+
| Tier | What it is | Verification cost | Dispatch verdict |
|
|
90
|
+
|---|---|---|---|
|
|
91
|
+
| **Tier 1 — Machine-verifiable** | tsc, vitest, lint, build, migrate, benchmark, gh run watch | seconds, deterministic | **Background, parallel OK** |
|
|
92
|
+
| **Tier 2 — Review-verifiable** | API shape, schema, public types, generated docs, code review against checklist | minutes, semi-automated | **Background OK + auto-trigger code-review after** |
|
|
93
|
+
| **Tier 3 — Judgment-required** | UX, naming, architecture, strategy, public-facing copy | hours, human only | **Foreground only — do not dispatch** |
|
|
94
|
+
|
|
95
|
+
Operating principle: **anything Tier 1 or Tier 2 should be agentic; verifying it is the bottleneck, not doing it.** If verification of an agent's claim takes longer than the work itself, the dispatch is a net negative — design verification first, then dispatch.
|
|
96
|
+
|
|
97
|
+
### High verifiability (→ background agent)
|
|
98
|
+
|
|
99
|
+
The agent can self-verify because the goal is mechanically checkable.
|
|
100
|
+
|
|
101
|
+
- Build / typecheck / lint passes
|
|
102
|
+
- Test suite passes (unit, integration, e2e)
|
|
103
|
+
- Migration applies cleanly to fresh DB
|
|
104
|
+
- Benchmark reaches a threshold
|
|
105
|
+
- Refactor preserves behaviour (regression tests)
|
|
106
|
+
- Code review of a diff against a checklist
|
|
107
|
+
- Documentation generated from code matches actual signatures
|
|
108
|
+
- Deploy succeeds and a smoke test passes
|
|
109
|
+
- Schema diff between two states is empty
|
|
110
|
+
- "Make CI green" — the agent can loop until green
|
|
111
|
+
|
|
112
|
+
### Low verifiability (→ foreground, user owns)
|
|
113
|
+
|
|
114
|
+
No mechanical check exists. The user's *understanding* is the
|
|
115
|
+
verification.
|
|
116
|
+
|
|
117
|
+
- Strategy, positioning, pricing, audience choice
|
|
118
|
+
- Product feature/scope decisions
|
|
119
|
+
- Naming, taglines, copywriting that represents the brand
|
|
120
|
+
- Whether a result is "publishable" for marketing
|
|
121
|
+
- Whether a proposed direction matches the user's long-term plan
|
|
122
|
+
- Trade-off calls (do A and lose B)
|
|
123
|
+
- Reviewing the *first* surface a user touches
|
|
124
|
+
- Anything that, if Claude got wrong, would damage reputation
|
|
125
|
+
irrecoverably
|
|
126
|
+
|
|
127
|
+
If unsure: **default to foreground**. The cost of a wrong delegation on
|
|
128
|
+
strategic work is much higher than the cost of one extra synchronous
|
|
129
|
+
turn.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Dispatch Patterns
|
|
134
|
+
|
|
135
|
+
### Pattern A — Single background agent (most common)
|
|
136
|
+
|
|
137
|
+
For one self-contained verifiable task that takes ≥10 minutes.
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Task tool:
|
|
141
|
+
subagent_type: general-purpose (or domain-specific)
|
|
142
|
+
description: 3-5 word summary
|
|
143
|
+
prompt: Self-contained brief. Include: goal, context the agent needs,
|
|
144
|
+
what to produce, what NOT to do (e.g. "do not push to remote",
|
|
145
|
+
"do not modify production code"), how to verify success.
|
|
146
|
+
isolation: "worktree" ← if it touches files
|
|
147
|
+
mode: "acceptEdits" ← so the agent can edit existing files
|
|
148
|
+
without permission prompts
|
|
149
|
+
run_in_background: true ← always for ≥10min work
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
After dispatch:
|
|
153
|
+
1. Tell user one sentence: "Dispatched [agent name] in background, will report back."
|
|
154
|
+
2. **Continue with other work** — do NOT poll, do NOT sleep.
|
|
155
|
+
3. When the system delivers a completion notification, surface results.
|
|
156
|
+
4. Trust but verify: read the agent's actual diff, do not just trust its summary.
|
|
157
|
+
|
|
158
|
+
### Pattern B — Parallel background agents
|
|
159
|
+
|
|
160
|
+
For 2+ independent verifiable subtasks. Send all of them in **one
|
|
161
|
+
message with multiple Task tool calls**, not sequentially. Then continue
|
|
162
|
+
with foreground work (e.g. discussing strategy with the user) while
|
|
163
|
+
they run.
|
|
164
|
+
|
|
165
|
+
### Pattern C — Foreground iteration
|
|
166
|
+
|
|
167
|
+
For low-verifiability work where the user must stay in the loop. Stop
|
|
168
|
+
generating long monologues. Send shorter messages. Ask one focused
|
|
169
|
+
question at a time when blocked. Do not make strategic decisions that
|
|
170
|
+
the user did not authorize.
|
|
171
|
+
|
|
172
|
+
### Pattern D — Hybrid (recommended for big tasks)
|
|
173
|
+
|
|
174
|
+
Most real work is mixed. Run them in the right shape:
|
|
175
|
+
- Foreground: "what is the goal, what is in scope, what does success look like"
|
|
176
|
+
- Branch off: dispatch background agents for each verifiable subgoal
|
|
177
|
+
- Foreground: review their outputs, decide what to keep, iterate
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## The Verification Gate (mandatory post-agent procedure)
|
|
182
|
+
|
|
183
|
+
**An agent's summary is not evidence. The diff is. Tests passing locally are.**
|
|
184
|
+
|
|
185
|
+
Before reporting any agent's work as "done" — to the user, to memory, in a commit message, anywhere — the orchestrator MUST run the verification gate. No exceptions for "this agent is reliable" or "I read the prompt carefully." The discipline is mechanical because human trust scales worse than agents do.
|
|
186
|
+
|
|
187
|
+
### Gate sequence (run in order, stop on first failure)
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
1. Reality check — did the claimed changes actually happen?
|
|
191
|
+
git -C <agent_workdir> diff --stat <base>..HEAD
|
|
192
|
+
→ compare against agent's claim of "files changed"
|
|
193
|
+
→ if mismatch: agent fabricated. Discard, do not commit.
|
|
194
|
+
|
|
195
|
+
2. Hard verification — do the deterministic checks pass?
|
|
196
|
+
npm run typecheck # tsc --noEmit
|
|
197
|
+
npm test -- --run # full suite, not "the new tests"
|
|
198
|
+
npm run lint (if exists)
|
|
199
|
+
npm run build (if changes touch build output)
|
|
200
|
+
→ if any fail: agent's work is incomplete. Fix-then-dispatch
|
|
201
|
+
a follow-up, or take over foreground. Do NOT commit broken state.
|
|
202
|
+
|
|
203
|
+
3. Cross-check — do the numbers in the agent's summary match reality?
|
|
204
|
+
"added 5 tests" → grep -c "^\s*it\(" <new test files>
|
|
205
|
+
"77/77 pass" → re-run test count, verify
|
|
206
|
+
"R@5 = 95.40%" → spot-check one or two of the result rows
|
|
207
|
+
→ numbers that match by accident are still verified;
|
|
208
|
+
numbers that the agent calculated must be re-derived independently.
|
|
209
|
+
|
|
210
|
+
4. Independent review (Tier 2 only) — does an outside reviewer see issues?
|
|
211
|
+
Spawn a fresh-context code-review subagent with no memory of the
|
|
212
|
+
original work. Have it review only the diff against the project's
|
|
213
|
+
standards. Surface any non-overlapping findings.
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### What the gate is NOT
|
|
217
|
+
|
|
218
|
+
- Not a replacement for tests written by the agent — it CHECKS that they pass
|
|
219
|
+
- Not "vibes-based" review — every step is a command with deterministic output
|
|
220
|
+
- Not skippable when "I'm in a hurry" — speed comes from parallel dispatch, not from skipping verification
|
|
221
|
+
|
|
222
|
+
### Recursive trust problem (do not fall in)
|
|
223
|
+
|
|
224
|
+
The verification gate's steps must be **deterministic commands**, not LLM judgment. An "LLM that verifies an LLM" is the same risk class as no verification — both can fabricate. The only safe verifiers are:
|
|
225
|
+
|
|
226
|
+
- Compilers and linters
|
|
227
|
+
- Test runners with assertions
|
|
228
|
+
- Diff tools and `git status`
|
|
229
|
+
- File existence + content hash checks
|
|
230
|
+
- HTTP probes that assert response codes/shapes
|
|
231
|
+
- Schema validators (Zod, JSON Schema, Prisma)
|
|
232
|
+
|
|
233
|
+
LLM-as-reviewer is useful for **opinion** ("does this look idiomatic?"), useless for **fact** ("did the test actually run?"). Use it as Tier 2 augmentation, never as Tier 1 substitute.
|
|
234
|
+
|
|
235
|
+
### When verification reveals the agent fabricated
|
|
236
|
+
|
|
237
|
+
Treat as a debugging signal, not a personal failure. Record it:
|
|
238
|
+
1. Stash the agent's diff (don't lose it, in case there is salvage)
|
|
239
|
+
2. Note what it claimed vs what the gate found
|
|
240
|
+
3. Save to memesh as a `lesson_learned`: "When dispatching <pattern>, verification at step <N> caught <fabrication-type>"
|
|
241
|
+
4. Decide: re-dispatch with sharper prompt, or take over foreground
|
|
242
|
+
|
|
243
|
+
This is how the orchestrator learns which dispatch shapes are reliable for the user's stack.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Known limitation — file creation in worktree-isolated agents
|
|
248
|
+
|
|
249
|
+
In current Claude Code (as of memesh 4.1), background agents launched
|
|
250
|
+
with `isolation: "worktree"` can **edit existing files freely** but
|
|
251
|
+
sometimes **cannot create new files** even with `mode: "acceptEdits"`.
|
|
252
|
+
The user's permission system blocks fresh `Write` calls inside the
|
|
253
|
+
isolated worktree.
|
|
254
|
+
|
|
255
|
+
Implication: if a task requires creating multiple new source files
|
|
256
|
+
(e.g., a new module with new tests), foreground that work or use
|
|
257
|
+
`isolation` other than `"worktree"`. For pure-edit tasks (refactors,
|
|
258
|
+
fixes, doc updates) and for benchmark/test tasks that only touch
|
|
259
|
+
existing files plus a `results/` directory, background dispatch works.
|
|
260
|
+
|
|
261
|
+
When in doubt: dispatch one tiny "smoke test" agent that just creates a
|
|
262
|
+
new empty file. If that succeeds, the larger task is safe to dispatch.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## The Orchestrator's Discipline
|
|
267
|
+
|
|
268
|
+
1. **Surface results, not progress.** When an agent finishes, report
|
|
269
|
+
numbers and decisions, not "I'm running step 12 of 17". The user
|
|
270
|
+
does not need a progress bar.
|
|
271
|
+
|
|
272
|
+
2. **Review every agent's actual diff before reporting "done".** Agents
|
|
273
|
+
summarise what they intended; only the diff shows what they did. This
|
|
274
|
+
is the orchestrator's last line of defence against fabricated
|
|
275
|
+
progress.
|
|
276
|
+
|
|
277
|
+
3. **Keep agent prompts self-contained.** Brief them like a smart
|
|
278
|
+
colleague who just walked into the room. Include goal, constraints,
|
|
279
|
+
success criteria, and explicit "do NOT" lines.
|
|
280
|
+
|
|
281
|
+
4. **Do not be afraid of `isolation: "worktree"`.** Agent work in an
|
|
282
|
+
isolated copy is automatically discarded if it produces no useful
|
|
283
|
+
change, and merge-able if it does. There is no downside.
|
|
284
|
+
|
|
285
|
+
5. **Spike → land or drop, same day.** Per CONTRIBUTING.md branch
|
|
286
|
+
lifecycle discipline: a spike that lives past its verdict becomes
|
|
287
|
+
technical debt. Dispatch, review, decide, close.
|
|
288
|
+
|
|
289
|
+
6. **Bias toward delete.** A discarded agent worktree is reflog-recoverable.
|
|
290
|
+
An undeleted speculation accumulates and blocks attention.
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## What This Replaces
|
|
295
|
+
|
|
296
|
+
| Old habit (single-thread Claude) | New habit (orchestrator Claude) |
|
|
297
|
+
|---|---|
|
|
298
|
+
| Read 8 files sequentially in foreground | Dispatch one agent: "read these 8 files and summarise X" |
|
|
299
|
+
| Write a migration in foreground, watch user wait | Dispatch background agent with verification criteria |
|
|
300
|
+
| Run lint/typecheck/tests one at a time | Dispatch one agent with a self-loop until all green |
|
|
301
|
+
| Wait for CI, polling every 30s | `gh run watch` once OR launch a background watcher agent |
|
|
302
|
+
| Sequential PR cleanups, one at a time | Parallel agents, one per PR, dispatched together |
|
|
303
|
+
| Long synchronous "let me read all of memesh-cloud" tour | One Explore agent with focused questions |
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Things That Are NOT Background Agent Work
|
|
308
|
+
|
|
309
|
+
Background agents are not a panacea. The following must stay foreground:
|
|
310
|
+
|
|
311
|
+
- **First-time user-facing changes** (a real human will see this; the
|
|
312
|
+
user must approve before deploy)
|
|
313
|
+
- **Anything visible on the public website** (positioning, copy, prices,
|
|
314
|
+
legal text)
|
|
315
|
+
- **Destructive ops without rollback** (rm, drop database, force-push,
|
|
316
|
+
delete remote branch — these need the user to say yes per action)
|
|
317
|
+
- **Decisions about *what* to build** (only *how* to build can be
|
|
318
|
+
delegated)
|
|
319
|
+
- **Reading the user's emotional state** — if the user is frustrated, an
|
|
320
|
+
agent will not notice; Claude must
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## The Daily Question
|
|
325
|
+
|
|
326
|
+
Every time Claude is about to do a 10+ minute task in foreground, it
|
|
327
|
+
must ask:
|
|
328
|
+
|
|
329
|
+
> "Is this task verifiable? If yes, why am I doing it synchronously
|
|
330
|
+
> instead of dispatching an agent and freeing the user?"
|
|
331
|
+
|
|
332
|
+
If the honest answer is "no good reason — habit / fear of dispatch
|
|
333
|
+
failure / wanting to look responsive" → **dispatch the agent**. The
|
|
334
|
+
user gets their time back.
|
|
335
|
+
|
|
336
|
+
The user's time is the bottleneck. Claude's time is not. Optimise for
|
|
337
|
+
the user's time.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Checklist Before Starting Any Multi-Step Task
|
|
342
|
+
|
|
343
|
+
- [ ] Have I classified each subtask as Tier 1 / 2 / 3?
|
|
344
|
+
- [ ] For Tier 1 / 2 subtasks, have I dispatched them as background
|
|
345
|
+
agents (parallel where independent)?
|
|
346
|
+
- [ ] Did I include `mode: "acceptEdits"` so the agent can act without
|
|
347
|
+
permission prompts?
|
|
348
|
+
- [ ] For Tier 3 subtasks, am I keeping the user in the loop with
|
|
349
|
+
short, focused exchanges?
|
|
350
|
+
- [ ] Am I writing self-contained prompts that the agent can act on
|
|
351
|
+
without further clarification?
|
|
352
|
+
- [ ] Do my prompts include the agent's **own self-verification step**
|
|
353
|
+
("after writing the code, run `npm test -- --run` and report the
|
|
354
|
+
result")?
|
|
355
|
+
- [ ] Do my prompts include explicit "do NOT" boundaries (no push to
|
|
356
|
+
remote, no production-touching changes, no public-surface edits
|
|
357
|
+
without approval)?
|
|
358
|
+
- [ ] Have I told the user, in one sentence, what is running in the
|
|
359
|
+
background and what is foreground?
|
|
360
|
+
|
|
361
|
+
## Checklist Before Reporting Any Agent's Work As "Done"
|
|
362
|
+
|
|
363
|
+
- [ ] Did I run the **Verification Gate** (the four steps above), not
|
|
364
|
+
just read the agent's summary?
|
|
365
|
+
- [ ] Does `git diff --stat` actually show the changes the agent
|
|
366
|
+
claimed?
|
|
367
|
+
- [ ] Did `npm run typecheck && npm test -- --run` pass on my machine,
|
|
368
|
+
not just inside the agent's worktree?
|
|
369
|
+
- [ ] If the agent reported numbers (test count, benchmark score),
|
|
370
|
+
did I re-derive at least one of them independently?
|
|
371
|
+
- [ ] For Tier 2 work, did I run a fresh-context code-review pass
|
|
372
|
+
against the diff?
|
|
373
|
+
- [ ] If the gate failed: did I record the failure mode to memesh as
|
|
374
|
+
a lesson_learned so the next dispatch is sharper?
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## When This Skill Is Wrong For The Moment
|
|
379
|
+
|
|
380
|
+
- **Trivial single-step tasks** (read one file, answer one question, run
|
|
381
|
+
one command). Just do it.
|
|
382
|
+
- **The user is teaching/exploring with you** and explicitly wants to
|
|
383
|
+
see the work happen step by step.
|
|
384
|
+
- **The user has said "do this yourself, don't dispatch."**
|
|
385
|
+
- **High-stakes irreversible operations** where every step needs user
|
|
386
|
+
confirmation.
|
|
387
|
+
|
|
388
|
+
In these cases, announce that you are not using agent dispatch and why.
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## See Also
|
|
393
|
+
|
|
394
|
+
- The `memesh` skill (sibling) — manages the memory layer that records
|
|
395
|
+
agent_patterns, lesson_learned, and project decisions over time. Use
|
|
396
|
+
it together with this one.
|
|
397
|
+
- `CONTRIBUTING.md` Branch Lifecycle Discipline — the three-rule policy
|
|
398
|
+
on dev checkpoints, pivots, and spikes that keeps git tidy as a
|
|
399
|
+
side-effect of agentic orchestration.
|