archgen-skill 0.0.2 → 0.0.4
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.md +29 -3
- package/bin/archgen.mjs +146 -12
- package/lib/block.js +197 -8
- package/lib/config.js +96 -0
- package/lib/doctor.js +283 -0
- package/lib/init.js +130 -27
- package/lib/install.js +105 -14
- package/lib/migrate.js +88 -0
- package/lib/migrations/001-stamp-provenance.mjs +77 -0
- package/lib/migrations/index.mjs +170 -0
- package/lib/restore.js +239 -0
- package/lib/store.js +161 -0
- package/lib/uninstall-project.js +95 -0
- package/lib/version-stamp.js +47 -0
- package/lib/version.js +23 -0
- package/package.json +37 -9
- package/vendor/skills/archgen/SKILL.md +252 -73
- package/vendor/skills/archgen/archgen.config.json +16 -0
- package/vendor/skills/archgen/assets/skill-registry.json +4 -3
- package/vendor/skills/archgen/references/artifact-templates.md +251 -7
- package/vendor/skills/archgen/references/interview.md +180 -16
- package/vendor/skills/archgen/references/mcp-and-skills.md +88 -17
- package/vendor/skills/archgen/references/orchestration.md +102 -39
- package/vendor/skills/archgen/references/platforms.md +18 -14
- package/vendor/skills/archgen/scripts/doc-index.mjs +457 -0
- package/vendor/skills/archgen/scripts/impact.mjs +14 -1
- package/vendor/skills/archgen/scripts/lib/graph.mjs +82 -3
- package/vendor/skills/archgen/scripts/lib/scope.mjs +65 -0
- package/vendor/skills/archgen/scripts/lib/yaml.mjs +19 -3
- package/vendor/skills/archgen/scripts/plan-graph.mjs +329 -0
- package/vendor/skills/archgen/scripts/set-status.mjs +26 -6
- package/vendor/skills/archgen/scripts/update-agents.mjs +204 -0
- package/vendor/skills/archgen/scripts/validate.mjs +18 -1
- package/vendor/skills/archgen/scripts/verify-plan.mjs +8 -3
|
@@ -4,43 +4,114 @@
|
|
|
4
4
|
|
|
5
5
|
1. **Identify** the platform (SKILL.md Step 0), load its row from
|
|
6
6
|
references/platforms.md section MCP: config file, top-level key, quirks.
|
|
7
|
-
2. **
|
|
8
|
-
|
|
7
|
+
2. **Discover** — when the correct installation method or config shape for
|
|
8
|
+
the detected harness is not confidently known, web-search the CURRENT
|
|
9
|
+
official installation docs/command FIRST. Never trust potentially-stale
|
|
10
|
+
memorized commands or invented config shapes; uncertainty triggers search,
|
|
11
|
+
not guessing.
|
|
12
|
+
3. **Scope** — choose and state the install scope explicitly:
|
|
13
|
+
- **GLOBAL** — server types that are global entries (npx/npm-based MCP
|
|
14
|
+
servers usable across harnesses). Recommended for universally-useful
|
|
15
|
+
servers (codegraph is the canonical example) unless the user prefers
|
|
16
|
+
project-local.
|
|
17
|
+
- **HARNESS-SPECIFIC** — write into the detected platform's config only.
|
|
18
|
+
Recommended when the server only matters to that platform.
|
|
19
|
+
The user's approval covers the stated scope.
|
|
20
|
+
4. **Prefer the platform CLI** where the table lists one, passing the scope
|
|
21
|
+
flag that matches the chosen scope:
|
|
9
22
|
- `claude mcp add --scope project --transport http <name> <url>`
|
|
10
23
|
- `codex mcp add <name> --url <url>` or `codex mcp add <n> -- cmd args`
|
|
11
24
|
- `gemini mcp add -s project -t http <name> <url>`
|
|
12
|
-
|
|
25
|
+
5. No CLI available: draft the exact config diff against the platform's real
|
|
13
26
|
shape (see assets/mcp-template.json for annotated canonical forms) and SHOW
|
|
14
27
|
it to the user. **USER APPROVAL GATE** — wait for an explicit yes before any
|
|
15
28
|
write; approval is never inferred from earlier steps.
|
|
16
|
-
|
|
17
|
-
|
|
29
|
+
6. Apply, then apply the restart semantics from the platforms table.
|
|
30
|
+
7. Verify the tool is visible after reload; report failure modes honestly.
|
|
18
31
|
|
|
19
32
|
Never write MCP configs silently. Never invent config shapes — the four known
|
|
20
33
|
top-level keys are mcpServers / servers / mcp / context_servers; remote URL
|
|
21
|
-
fields vary (url vs serverUrl vs httpUrl) per the platforms table.
|
|
34
|
+
fields vary (url vs serverUrl vs httpUrl) per the platforms table. Uncertainty
|
|
35
|
+
triggers web-search of current official docs, never invention.
|
|
22
36
|
|
|
23
37
|
## FETCH-SKILL procedure
|
|
24
38
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
Capability-skill loading is **REQUIRED, not opportunistic**. Whenever planned
|
|
40
|
+
work touches a registry `matches` domain, the matching skill MUST be loaded —
|
|
41
|
+
during planning (GENERATE / BROWNFIELD / UPDATE) AND re-verified during
|
|
42
|
+
execution (worker dispatch). UI/design/frontend/animation/component/
|
|
43
|
+
landing-page work REQUIRES the design skills (`ui-skills`, `policy:
|
|
44
|
+
"required"`) loaded first. Referenced from elsewhere as:
|
|
45
|
+
*see references/mcp-and-skills.md § FETCH-SKILL procedure*.
|
|
46
|
+
|
|
47
|
+
0. **WHEN** — mandatory, twice per matched task:
|
|
48
|
+
- **Pre-planning scan**: while planning, check every task's title, summary,
|
|
49
|
+
and `file_ownership` against the registry BEFORE the plan is finalized;
|
|
50
|
+
fetch any matched skill at that point.
|
|
51
|
+
- **Pre-dispatch verification**: immediately before dispatching each worker,
|
|
52
|
+
re-verify its match; if the skill is missing from the platform skill dir,
|
|
53
|
+
install it before dispatch proceeds.
|
|
54
|
+
1. **MATCH** — read assets/skill-registry.json. Test every task's title,
|
|
55
|
+
summary, and file_ownership globs against each entry's `matches` patterns
|
|
56
|
+
using case-insensitive substring matching (e.g. a task titled "polish
|
|
57
|
+
landing page hero" matches ui-skills via `"landing page"`). One hit = this
|
|
58
|
+
procedure is mandatory for that task.
|
|
59
|
+
2. **RESOLVE** — determine the CURRENT platform's skill dir from
|
|
60
|
+
references/platforms.md § Skill install paths. That table owns the paths;
|
|
61
|
+
never duplicate them here.
|
|
62
|
+
3. **INSTALL once if absent** — cached check first: if the skill is already
|
|
63
|
+
present in the resolved platform skill dir, skip reinstall and go to step 4.
|
|
64
|
+
Otherwise run the entry's `install` command (generic fallback:
|
|
65
|
+
`npx skills add <owner>/<repo>`; `-g` for global; entry-specific commands
|
|
66
|
+
like `npx ui-skills get baseline-ui` when present). Then VERIFY presence:
|
|
67
|
+
confirm the skill directory/SKILL.md landed where platforms.md says it
|
|
68
|
+
should. Fetch happens ONCE per project; later runs are cache hits.
|
|
69
|
+
4. **INTEGRATE** — inject the follow-instruction into (a) the planning context
|
|
70
|
+
so tasks reference the skill's standards, and (b) EVERY affected worker
|
|
71
|
+
prompt, using this sentence template:
|
|
72
|
+
|
|
73
|
+
> `<Domain> work: follow <skill-dir>/SKILL.md (installed via FETCH-SKILL) — apply its standards to every relevant decision.`
|
|
74
|
+
|
|
75
|
+
Concrete design instantiation for ui-skills:
|
|
76
|
+
|
|
77
|
+
> `Design work: follow <skill-dir>/SKILL.md (installed via FETCH-SKILL) — apply its component/motion/baseline standards to every visual decision.`
|
|
78
|
+
|
|
79
|
+
5. **AUDIT** — workers MUST state in their completion report whether they
|
|
80
|
+
followed the injected skill, one auditable line, e.g.:
|
|
81
|
+
`Skill compliance: followed ui-skills (<skill-dir>/SKILL.md)` or
|
|
82
|
+
`Skill compliance: NOT followed — <reason>`.
|
|
83
|
+
6. **MISSING CAPABILITY** — unmatched-but-obvious domain (user says "make it
|
|
84
|
+
pretty" with no registry entry): web-search reputable skill repos, propose
|
|
85
|
+
to user, on approval append an entry to the registry (PR or local edit).
|
|
86
|
+
Never add registry entries without explicit user approval.
|
|
35
87
|
|
|
36
88
|
## Registry entry shape
|
|
37
89
|
|
|
90
|
+
Canonical keys, in order — there are no others. Notably there is NO
|
|
91
|
+
`npxCommand` field anywhere in the registry; the executable command lives in
|
|
92
|
+
`install` (with optional `direct_fetch`):
|
|
93
|
+
|
|
38
94
|
```json
|
|
39
95
|
{
|
|
40
96
|
"name": "short-name",
|
|
41
97
|
"purpose": "when to reach for it",
|
|
42
98
|
"repo": "owner/repo",
|
|
43
99
|
"install": "npx skills add owner/repo",
|
|
44
|
-
"
|
|
100
|
+
"direct_fetch": "optional per-skill fetch command",
|
|
101
|
+
"browse": "optional listing command",
|
|
102
|
+
"mcp_endpoint": "optional MCP URL",
|
|
103
|
+
"matches": ["frontend", "ui", "design"],
|
|
104
|
+
"policy": "required"
|
|
45
105
|
}
|
|
46
106
|
```
|
|
107
|
+
|
|
108
|
+
- `matches[]`: case-insensitive substrings tested against task titles,
|
|
109
|
+
summaries, and file_ownership during the FETCH-SKILL domain scan (step 1).
|
|
110
|
+
- `policy` (`required` | `on-demand`) — how mandatory loading is:
|
|
111
|
+
- `"required"`: loading is MANDATORY whenever work touches any of the
|
|
112
|
+
entry's `matches` domains — pre-planning fetch plus pre-dispatch
|
|
113
|
+
verification (FETCH-SKILL steps 0–5 all apply). Currently only ui-skills
|
|
114
|
+
carries this; design/UI/frontend work must not proceed without it.
|
|
115
|
+
- `"on-demand"`: fetched only when a task explicitly names the installer or
|
|
116
|
+
another registry entry lacks a usable command (e.g.
|
|
117
|
+
vercel-skills-installer).
|
|
@@ -39,9 +39,63 @@ Dispatch AFTER artifacts exist and validate.mjs passes. The verifier:
|
|
|
39
39
|
Orchestrator fixes issues (edits artifacts) and re-dispatches. Loop until
|
|
40
40
|
APPROVE — never present to the user before verifier approval.
|
|
41
41
|
|
|
42
|
+
## §plan-review — post-plan review stage
|
|
43
|
+
|
|
44
|
+
Run AFTER verify-plan returns APPROVE and BEFORE the user gate. Dispatch one
|
|
45
|
+
or more REVIEWER sub-agents; count scales with the right-sizing class:
|
|
46
|
+
|
|
47
|
+
- SMALL: main-agent self-review acceptable if no reviewer mechanism exists.
|
|
48
|
+
- MEDIUM: 1 reviewer.
|
|
49
|
+
- LARGE: 2–3 reviewers split by concern (correctness / ordering / docs).
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
TASK: Review the plan in .archgen/<slug>/ READ-ONLY.
|
|
53
|
+
EXAMINE:
|
|
54
|
+
- edge cases per module
|
|
55
|
+
- task ordering / parallelization sanity (waves vs real dependencies)
|
|
56
|
+
- cross-module contract mismatches (interfaces, paths, naming)
|
|
57
|
+
- enhancement recommendations
|
|
58
|
+
- documentation completeness
|
|
59
|
+
DELIVERABLE: numbered findings list; each finding = what + where + why.
|
|
60
|
+
You NEVER edit files. Report only.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Reviewers are read-only and report-only — they never edit artifacts or code.
|
|
64
|
+
The orchestrator fixes the artifacts itself, re-runs validate.mjs + re-dispatches
|
|
65
|
+
the verifier gate after every change, and loops until zero findings remain or
|
|
66
|
+
findings are explicitly waived by the user.
|
|
67
|
+
|
|
68
|
+
## §investigate — root-cause protocol
|
|
69
|
+
|
|
70
|
+
Triggered when the USER reports repetitive/recurring issues AFTER implementation
|
|
71
|
+
waves completed. Do NOT patch-fix under this protocol. Complexity-sized dispatch:
|
|
72
|
+
|
|
73
|
+
- SMALL scope: main agent investigates directly.
|
|
74
|
+
- MEDIUM/LARGE: 1–3 investigator sub-agents split by suspected subsystem.
|
|
75
|
+
|
|
76
|
+
Investigators produce ALL four:
|
|
77
|
+
|
|
78
|
+
1. Root cause statement — one sentence naming the actual defect.
|
|
79
|
+
2. Evidence — files/lines/repro steps.
|
|
80
|
+
3. Blast radius — which tasks/artifacts are affected.
|
|
81
|
+
4. Remediation plan — routed through the normal gates: new fix tasks get fresh
|
|
82
|
+
ids inheriting the affected task's ownership globs.
|
|
83
|
+
|
|
84
|
+
Token discipline: investigators read narrowly around evidence, not whole-repo
|
|
85
|
+
sweeps. Patch-fixes without a root-cause statement are forbidden under this
|
|
86
|
+
protocol.
|
|
87
|
+
|
|
42
88
|
## §dispatch — wave execution
|
|
43
89
|
|
|
44
|
-
|
|
90
|
+
Dispatch policy: dispatch each task to the harness's NATIVE sub-agent mechanism
|
|
91
|
+
when available AND functional. If sub-agents do not exist on this platform, or
|
|
92
|
+
the sub-agent fails, or lacks required tool permissions (read/write/etc.), the
|
|
93
|
+
MAIN AGENT executes the task ITSELF — sequentially, respecting waves and
|
|
94
|
+
ownership globs. Cross-harness/platform delegation is allowed ONLY through an
|
|
95
|
+
explicit user gate (below). There is NO automatic fallback to other harnesses,
|
|
96
|
+
platforms, or CLIs — ever.
|
|
97
|
+
|
|
98
|
+
### Native sub-agents (preferred)
|
|
45
99
|
|
|
46
100
|
- Claude Code: background Agent tool per task; add worktree isolation for
|
|
47
101
|
tasks whose ownership might brush shared files.
|
|
@@ -51,55 +105,64 @@ APPROVE — never present to the user before verifier approval.
|
|
|
51
105
|
- Gemini CLI: parallel @agents are hub-and-spoke only AND have no isolation →
|
|
52
106
|
use them ONLY for read-only/research waves unless wrapping in worktrees.
|
|
53
107
|
|
|
54
|
-
###
|
|
108
|
+
### When sub-agents are unavailable or fail
|
|
55
109
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
local body; body="$(cat "$pf")
|
|
64
|
-
|
|
65
|
-
You own exactly the file_ownership globs listed for this task in tasks.yaml. Follow archgen code-standards. On success run: node \"$SKILL/scripts/set-status.mjs\" .archgen/$SLUG/tasks.yaml \"$id\" done ; on failure set-status failed."
|
|
66
|
-
case "$ARCHGEN_HARNESS" in
|
|
67
|
-
claude) claude -p "$body" --output-format json --permission-mode acceptEdits > "$log" 2>&1 ;;
|
|
68
|
-
opencode) opencode run "$body" --auto --format json > "$log" 2>&1 ;;
|
|
69
|
-
codex) codex exec --sandbox workspace-write --json -o "$log.final" "$body" > "$log" 2>&1 ;;
|
|
70
|
-
gemini) gemini --output-format json "$body" > "$log" 2>&1 ;;
|
|
71
|
-
agy) agy -p --output-format json --print-timeout 15m "$body" > "$log" 2>&1 ;;
|
|
72
|
-
*) echo "unknown harness: $ARCHGEN_HARNESS" >&2; return 9 ;;
|
|
73
|
-
esac
|
|
74
|
-
|
|
75
|
-
You own exactly: $(node "$SKILL/scripts/impact.mjs" .archgen/$SLUG/tasks.yaml "$id" >/dev/null 2>&1 && echo 'see tasks.yaml file_ownership'). Follow archgen code-standards. On success run: node "$SKILL/scripts/set-status.mjs" .archgen/$SLUG/tasks.yaml "$id" done ; on failure set-status failed." \
|
|
76
|
-
}
|
|
77
|
-
# Wave N: launch all frontier tasks in parallel…
|
|
78
|
-
for t in $(node "$SKILL/scripts/next-tasks.mjs" .archgen/$SLUG/tasks.yaml \
|
|
79
|
-
| node -e 'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>console.log(JSON.parse(d).waves[0].map(t=>t.id).join(" ")))'); do
|
|
80
|
-
run_task "$t" ".archgen/$SLUG/results/$t.prompt" & pids="$pids $!"
|
|
81
|
-
done
|
|
82
|
-
fail=0; for p in $pids; do wait "$p" || fail=1; done
|
|
83
|
-
exit $fail # orchestrator inspects statuses before next wave
|
|
84
|
-
```
|
|
110
|
+
Detect first — one of:
|
|
111
|
+
|
|
112
|
+
- mechanism missing on this platform;
|
|
113
|
+
- spawn failure (sub-agent never started / crashed at launch);
|
|
114
|
+
- tool-permission gaps (sub-agent runs but cannot read/write/edit files).
|
|
115
|
+
|
|
116
|
+
Then, in order:
|
|
85
117
|
|
|
86
|
-
|
|
118
|
+
1. DEFAULT — main agent executes the task itself, sequentially, respecting
|
|
119
|
+
waves and file_ownership globs. No user permission needed for this.
|
|
120
|
+
2. USER GATE — cross-harness/platform delegation ONLY. When the sub-agent
|
|
121
|
+
problem looks platform-specific, STOP and tell the user the concrete issue,
|
|
122
|
+
propose using another platform/harness for that specific task (name the
|
|
123
|
+
harness + its command shape), and proceed ONLY after the user explicitly
|
|
124
|
+
allows it. Log the user's choice in the final report.
|
|
125
|
+
|
|
126
|
+
Never silently switch harnesses. Never ask permission to fall back for routine
|
|
127
|
+
failures the main agent can simply do itself.
|
|
128
|
+
|
|
129
|
+
A sub-agent MECHANISM failure (missing/spawn/permissions) is not a TASK
|
|
130
|
+
failure — run the diagnose-and-ask flow above first. Mark a task failed only
|
|
131
|
+
after execution was actually attempted (by sub-agent or main agent) and did
|
|
132
|
+
not complete.
|
|
133
|
+
|
|
134
|
+
Isolation for native sub-agents when ownership borders are tight:
|
|
87
135
|
|
|
88
136
|
```bash
|
|
89
137
|
git worktree add ".worktrees/$id" -b "task-$id"
|
|
90
|
-
#
|
|
138
|
+
# point the sub-agent's cwd at .worktrees/$id, then merge task-$id on success
|
|
91
139
|
```
|
|
92
140
|
|
|
93
|
-
### Worker prompt contract
|
|
141
|
+
### Worker prompt contract
|
|
142
|
+
|
|
143
|
+
Every worker receives ALL of:
|
|
144
|
+
|
|
145
|
+
- task id + title;
|
|
146
|
+
- its acceptance criteria VERBATIM;
|
|
147
|
+
- its file_ownership globs ("edit NOTHING outside these");
|
|
148
|
+
- the code-standards reference (`references/code-standards.md`);
|
|
149
|
+
- instruction to run set-status done/failed immediately upon finishing:
|
|
150
|
+
`node <skill>/scripts/set-status.mjs .archgen/<slug>/tasks.yaml <id> done|failed`;
|
|
151
|
+
- commit guidance: commit completed work scoped to the owned files;
|
|
152
|
+
- BEFORE writing code run
|
|
153
|
+
`node <skill>/scripts/plan-graph.mjs --node <task-id> --tasks <tasks.yaml>`
|
|
154
|
+
and honor every connected dependency shown;
|
|
155
|
+
- all file paths come from tasks.yaml/architecture.yaml VERBATIM — never
|
|
156
|
+
reconstruct paths from memory.
|
|
94
157
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
reference, and the done/failed status-update command. Workers do NOT talk to
|
|
98
|
-
each other; coordination happens only through tasks.yaml state.
|
|
158
|
+
Workers do NOT talk to each other; coordination happens only through
|
|
159
|
+
tasks.yaml state.
|
|
99
160
|
|
|
100
161
|
## Failure policy
|
|
101
162
|
|
|
102
|
-
-
|
|
163
|
+
- Sub-agent mechanism failure (missing/spawn/permissions) → §dispatch
|
|
164
|
+
diagnose-and-ask flow FIRST. It is not yet a task failure.
|
|
165
|
+
- Task exit ≠ 0 OR status=failed → leave it failed. NEVER auto-retry.
|
|
103
166
|
- Downstream tasks stay blocked by the resolver (blockedByFailure).
|
|
104
167
|
- Report to user: failed id, log path, proposed fix-task description.
|
|
105
168
|
[wait for user] A fix task gets fresh id, depends_on=[], ownership of the
|
|
@@ -23,6 +23,23 @@ confirmed. The orchestrator loads ONLY the row matching Step-0 detection.
|
|
|
23
23
|
Universal fallback: `.agents/skills/` project + `~/.agents/skills/` user works
|
|
24
24
|
across most harnesses. Primary distribution: `npx skills add <repo>` (75+ agents).
|
|
25
25
|
|
|
26
|
+
## archgen installed layout
|
|
27
|
+
|
|
28
|
+
`install.sh` / `npx archgen-skill install` maintain ONE canonical store plus
|
|
29
|
+
thin bridges — the skill is never copied twice:
|
|
30
|
+
|
|
31
|
+
| Path | Role |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `.agents/skills/archgen/` | Canonical store — `SKILL.md`, `scripts/`, `references/`, `assets/` |
|
|
34
|
+
| `.claude/skills/archgen` | Optional symlink → canonical store, for Claude Code discovery |
|
|
35
|
+
| `CLAUDE.md` | One-line `@AGENTS.md` bridge only — no content of its own |
|
|
36
|
+
| `AGENTS.md` | The hub every harness reads; hosts the features registry between `<!-- archgen:features:start -->` and `<!-- archgen:features:end -->` |
|
|
37
|
+
|
|
38
|
+
The registry table (`| Feature | Status | Updated |`, one row per
|
|
39
|
+
`.archgen/<slug>/`) is machine-maintained by `scripts/update-agents.mjs` after
|
|
40
|
+
every generate/plan/wave run — never hand-edit it; edit `.archgen/` state and
|
|
41
|
+
re-run the script instead.
|
|
42
|
+
|
|
26
43
|
## MCP configuration
|
|
27
44
|
|
|
28
45
|
Four different top-level keys exist — NEVER assume `mcpServers`:
|
|
@@ -52,24 +69,11 @@ Claude Code project-scope servers.
|
|
|
52
69
|
|---|---|---|---|
|
|
53
70
|
| Claude Code | `Agent` tool + subagent_type; `.claude/agents/*.md` | Yes (default since v2.1.198; cap ~20) | BEST: `isolation: worktree` frontmatter; `/batch` |
|
|
54
71
|
| OpenCode | task/subagent tool + subagent_type | Yes (fg + background) | None in core → use file-ownership discipline or team-mode plugin worktrees |
|
|
55
|
-
| Codex CLI | model-mediated `spawn_agent`; max_depth=1 | Yes but children can't nest | None →
|
|
72
|
+
| Codex CLI | model-mediated `spawn_agent`; max_depth=1 | Yes but children can't nest | None built-in → flatten plans into top-level `spawn_agent` calls (children cannot nest); add manual git worktrees if edits collide |
|
|
56
73
|
| Gemini CLI | subagents-as-tools; `@agent-name` | Yes BUT strictly hub-and-spoke (no nested calls) | None → restrict parallel workers to read-only roles unless given external worktrees |
|
|
57
74
|
| Cursor | Subagents w/ `is_background` frontmatter; `/multitask` | Yes | Opt-in per-subagent worktree or cloud VM |
|
|
58
75
|
| Antigravity | `invoke_subagent` (async by design); `/fork` | Yes | `/fork` workspace separation; per-subagent worktrees UNVERIFIED |
|
|
59
76
|
|
|
60
|
-
## Headless invocation templates (fallback workers)
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
claude claude -p "<prompt>" --output-format json --permission-mode acceptEdits
|
|
64
|
-
opencode opencode run "<prompt>" --auto --format json
|
|
65
|
-
codex codex exec --sandbox workspace-write --json -o <out-file> "<prompt>"
|
|
66
|
-
gemini gemini --output-format json "<prompt>"
|
|
67
|
-
agy agy -p --output-format json --print-timeout 15m "<prompt>"
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Completion signal = process exit (Claude documents 0/non-zero contract).
|
|
71
|
-
NEVER pass secrets as arguments. Feature-detect old binaries via `--version`.
|
|
72
|
-
|
|
73
77
|
## Unknown platform procedure
|
|
74
78
|
|
|
75
79
|
1. WEB SEARCH: `<platform> official docs MCP configuration` and
|