aiblueprint-cli 1.4.95 → 1.4.96

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.
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: use-delegate
3
+ description: "Delegation mode: the host agent (Claude or Codex) plans and reviews while heavy work runs on cheap executors: OpenCode Kimi K3, Codex GPT-5.6 terra/sol. Use when the user invokes /use-delegate, says 'use delegate', 'delegate mode', 'orchestrator mode', or wants to save tokens/rate limits."
4
+ ---
5
+
6
+ # Use Delegate
7
+
8
+ The host agent (Claude Code or Codex, whichever is running this skill) is the thinker, never the typist. Its tokens are scarce; the executors below are cheap and steerable. The host decides **what** to do and judges **whether it was done well**: everything token-hungry runs elsewhere and reports back.
9
+
10
+ ## Core rule
11
+
12
+ The host does not execute. It may: read a few targeted files, search, inspect git state, think, plan, decompose, write specs and delegation prompts, review diffs and reports, judge outputs, and talk to the user.
13
+
14
+ The host must NOT directly do:
15
+
16
+ - Implementation, refactors, migrations, test writing (any multi-file or >~15-line change)
17
+ - Codebase-wide exploration or analysis (reading many files to "understand")
18
+ - Computer use, browser automation, UI/UX verification
19
+ - Log triage, data analysis, bulk mechanical edits
20
+ - Running long build/test loops and reading their full output
21
+
22
+ The only direct edits allowed: trivial single-file tweaks (a config value, a typo, a one-liner) where writing a delegation prompt would cost more than the edit itself.
23
+
24
+ ## Executors
25
+
26
+ | Executor | Command | Use for |
27
+ |---|---|---|
28
+ | OpenCode · Kimi K3 | `opencode run "<prompt>" -m kimi-for-coding/k3` | Default general executor: implementation, refactors, tests, bulk edits |
29
+ | Codex · GPT-5.6 terra (high) | `codex exec -m gpt-5.6-terra "<prompt>"` | Low-stakes tasks: mechanical edits, scripts, quick investigations, log triage |
30
+ | Codex · GPT-5.6 sol (high) | `codex exec "<prompt>"` (config default = sol + high) | Compute-heavy tasks: hard bugs, migrations, architecture-sensitive changes, computer use / UI verification |
31
+ | Host-native subagents | Claude `Agent` tool / Codex collab threads | Exploration summaries the host plans from; taste-sensitive work (UI, copy, API design) |
32
+
33
+ Read-only investigation: `codex exec -s read-only`, `opencode run --agent plan` (built-in read-only agent).
34
+
35
+ Model rankings move fast: current DeepSWE scores, API pricing, and the refresh protocol live in `references/models.md`. Check its `Last verified` date before planning a big batch; if older than 14 days, delegate a refresh first (DeepSWE leaderboard + pricing pages), never guess rankings from memory.
36
+
37
+ ## Invocation mechanics
38
+
39
+ Both CLIs: always end the command with `< /dev/null` and run in background (codex hangs forever on open stdin: full codex mechanics in `~/.claude/rules/launch-codex.md`).
40
+
41
+ **Codex** (background):
42
+
43
+ ```bash
44
+ codex exec -C <repo-root> -m gpt-5.6-terra \
45
+ --output-last-message <scratchpad>/codex-<task>.md \
46
+ "<self-contained prompt>" < /dev/null
47
+ ```
48
+
49
+ Effort override: `-c model_reasoning_effort=high`. Non-git dir: `--skip-git-repo-check`.
50
+
51
+ **OpenCode** (background):
52
+
53
+ ```bash
54
+ opencode run "<self-contained prompt>" \
55
+ -m kimi-for-coding/k3 --title "<task>" \
56
+ > <scratchpad>/oc-<task>.log 2>&1 < /dev/null
57
+ ```
58
+
59
+ - Final answer = tail of the log; `--format json` for machine-readable events.
60
+ - Steer or continue a session: `opencode run -s <sessionID> "<follow-up>"`.
61
+ - Standalone specialized agent: `--agent <name>`: the `~/.config/opencode/agent/` roster (worker, explore-fast, verifier, snipper, code-reviewer…) runs standalone with any `-m` model.
62
+ - Permissions are pre-allowed in the user config (build agent allows all); no interactive prompt will block a non-interactive run.
63
+
64
+ ## Batch / multi-process
65
+
66
+ - **Parallel processes** (verified): launch N independent `opencode run` / `codex exec` in background; each opencode run spins up its own server + session, results stay isolated.
67
+ - **Shared server** for large batches: `opencode serve --port <p>` once, then N × `opencode run --attach http://localhost:<p> --dir <workdir> ...`: one server, many sessions, less startup overhead. Kill the serve process when done.
68
+ - **In-executor subagents**: Kimi in opencode spawns its own task-tool subagents; codex spawns collab threads (config caps 6). Prefer one executor process per independent task over one giant prompt.
69
+
70
+ ## The loop
71
+
72
+ 1. **Think.** Understand the request. Missing context → delegate the exploration, think on the summaries.
73
+ 2. **Spec.** Write a self-contained delegation prompt: exact files, goal, constraints, and what "done" looks like (tests pass, lint clean, behavior X). The executor can't see this conversation: spell everything out.
74
+ 3. **Delegate.** Fire independent tasks in parallel in background. Stay available to steer.
75
+ 4. **Verify.** Delegate verification too: read-only pass, test run, or `verifier` agent. The host reads the report and the diff, not the whole tree.
76
+ 5. **Judge.** Output misses the bar → refine the spec and re-delegate (better prompts beat manual fixes). Escalate terra → Kimi K3 → sol → host-native only when the cheaper tier keeps failing.
77
+
78
+ ## Delegation prompt checklist
79
+
80
+ - Names exact files/paths and the repo root
81
+ - States the goal in one sentence, then constraints (style, deletion safety: `trash` not `rm -rf`, no scope creep)
82
+ - Defines done: commands to run, expected results
83
+ - Asks for a report: changed files, what was done, tests run, risks
84
+
85
+ ## Anti-patterns
86
+
87
+ - "It's faster if I just do it": beyond a trivial tweak it isn't, and it burns the budget the whole session depends on.
88
+ - Reading 10 files to plan: delegate exploration, plan from the summary.
89
+ - Fixing an executor's output by hand: refine the prompt and rerun.
90
+ - Serializing independent delegations: parallelize.
91
+ - Escalating everything to sol or the host: terra and Kimi K3 handle most well-spec'd work.
92
+
93
+ If no delegation path works (CLIs unavailable, Bash denied), say so explicitly and ask the user before falling back to direct execution: never silently drop out of the mode.
@@ -0,0 +1,32 @@
1
+ # Delegation models: current rankings and pricing
2
+
3
+ Last verified: 2026-07-20
4
+
5
+ **Refresh protocol**: if the date above is older than 14 days, refresh BEFORE planning a big delegation batch. Delegate the research (exa-search skill or a read-only executor): pull the DeepSWE leaderboard (https://deepswe.datacurve.ai/) and the provider pricing pages, then update both tables and the date. DeepSWE is the reference signal: 113 original long-horizon engineering tasks, contamination-free, cost-per-task published per model.
6
+
7
+ ## DeepSWE leaderboard (best config per model, snapshot 2026-07-17)
8
+
9
+ | Model | Pass@1 | Avg cost/task | Read |
10
+ |---|---|---|---|
11
+ | gpt-5.6-sol [max] | 73% | $8.39 | Top score, best cost among frontier |
12
+ | claude-fable-5 [max] | 70% | $21.63 | Host tier: 2.6x sol cost, never a delegation target |
13
+ | gpt-5.6-terra [max] | 70% | $4.95 | Sol-level score at 59% of the cost |
14
+ | kimi-k3 [max] | 69% | $4.65 | Within noise of terra/sol, cheapest of the top pack |
15
+ | gpt-5.6-luna [max] | 67% | $3.03 | Acceptable floor for trivial bulk work |
16
+ | gpt-5.5 [xhigh] | 67% | $7.23 | Superseded by the 5.6 family |
17
+ | claude-opus-4.8 [max] | 59% | $13.22 | Dominated: lower score, higher cost |
18
+
19
+ ## API list pricing (per 1M tokens)
20
+
21
+ | Model | Input | Cached input | Output | Context |
22
+ |---|---|---|---|---|
23
+ | Kimi K3 (Moonshot) | $3.00 | $0.30 | $15.00 | 1M |
24
+ | GPT-5.6 Sol | $5.00 | $0.50 | $30.00 | 1.05M |
25
+ | GPT-5.6 Terra | $2.50 | $0.25 | $15.00 | 1.05M |
26
+ | GPT-5.6 Luna | $1.00 | ~$0.10 | $6.00 | 1.05M |
27
+
28
+ ## Access notes (this machine)
29
+
30
+ - Kimi K3: flat-rate through the kimi-for-coding subscription in opencode (`-m kimi-for-coding/k3`), so marginal cost per delegation is ~zero. The opencode-go gateway is unfunded (insufficient balance): do not route through it. Open weights due 2026-07-27; 1M context; native vision; Terminal-Bench 88.3.
31
+ - GPT-5.6 sol/terra/luna: covered by the Codex subscription (`codex exec -m gpt-5.6-<tier>`); config default is sol + effort high.
32
+ - Current call (2026-07-20): Kimi K3 is the default executor (top-pack score, subscription-covered). Terra for low-stakes tasks. Sol for compute-heavy work. Luna only for trivial bulk edits.
package/dist/cli.js CHANGED
@@ -33746,7 +33746,11 @@ async function hasContent(folderPath) {
33746
33746
  async function copyManagedFolder(source, destination) {
33747
33747
  await import_fs_extra7.default.copy(source, destination, {
33748
33748
  overwrite: true,
33749
- dereference: os10.platform() === "win32"
33749
+ dereference: os10.platform() === "win32",
33750
+ filter: async (sourcePath) => {
33751
+ const stat = await import_fs_extra7.default.lstat(sourcePath);
33752
+ return !(stat.isSocket() || stat.isFIFO() || stat.isCharacterDevice() || stat.isBlockDevice());
33753
+ }
33750
33754
  });
33751
33755
  }
33752
33756
  async function writeMetadata(snapshotPath, metadata) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiblueprint-cli",
3
- "version": "1.4.95",
3
+ "version": "1.4.96",
4
4
  "description": "AIBlueprint CLI for setting up AI coding configurations",
5
5
  "author": "AIBlueprint",
6
6
  "license": "MIT",
@@ -1,64 +0,0 @@
1
- ---
2
- name: use-fable
3
- description: "Orchestrator mode for Fable: Fable thinks, plans, and reviews while Codex CLI and subagents execute all heavy work. Use when the user invokes /use-fable, says 'use fable', 'fable mode', 'orchestrator mode', or wants to save Fable tokens/rate limits."
4
- ---
5
-
6
- # Use Fable
7
-
8
- Fable is the thinker, never the typist. Its tokens are scarce and expensive; Codex (GPT-5.5) is effectively free and highly steerable. In this mode, Fable's job is deciding **what** to do and judging **whether it was done well** — everything token-hungry runs elsewhere and reports back.
9
-
10
- Model rankings, Codex mechanics, and effort settings live in `~/.claude/rules/models.md` (already in context). This skill is the enforcement layer.
11
-
12
- ## Core rule
13
-
14
- Fable does not execute. Fable may: read a few targeted files, search, inspect git state, think, plan, decompose, write specs and delegation prompts, review diffs and reports, judge outputs, and talk to the user.
15
-
16
- Fable must NOT directly do:
17
-
18
- - Implementation, refactors, migrations, test writing (any multi-file or >~15-line change)
19
- - Codebase-wide exploration or analysis (reading many files to "understand")
20
- - Computer use, browser automation, UI/UX verification
21
- - Log triage, data analysis, bulk mechanical edits
22
- - Running long build/test loops and reading their full output
23
-
24
- The only direct edits allowed: trivial single-file tweaks (a config value, a typo, a one-liner) where writing a delegation prompt would cost more than the edit itself.
25
-
26
- ## Who executes what
27
-
28
- | Task | Executor |
29
- |------|----------|
30
- | Well-spec'd implementation, refactors, migrations, bulk edits | Codex: `codex exec "<prompt>"` |
31
- | Investigation, codebase analysis, log/data triage (no writes) | Codex: `codex exec -s read-only "<prompt>"` |
32
- | Computer use, UI/UX verification, browser checks | Codex (way better at it) or `verifier`/`dev-browser` subagent |
33
- | Codebase exploration to inform a plan | `Explore` or `explore-fast` subagent — Fable reads the summary, not the files |
34
- | User-facing taste work (UI, copy, API design) | Claude subagent with `model: "opus"` |
35
- | Plan/implementation review | Fable itself (its core job), optionally + Codex as second perspective |
36
- | Inside a Workflow | thin `sonnet`/`effort: low` wrapper agent that runs `codex exec` via Bash and returns output verbatim |
37
-
38
- Claude subagents always get `model: "opus"` unless the wrapper-for-Codex pattern applies. Never Haiku.
39
-
40
- ## The loop
41
-
42
- 1. **Think.** Understand the request. If context is missing, delegate the exploration (don't read the codebase yourself) and think on the summaries.
43
- 2. **Spec.** Write a self-contained delegation prompt: exact files, goal, constraints, and what "done" looks like (tests pass, lint clean, behavior X). Codex can't see this conversation — spell everything out. See `/codex:gpt-5-4-prompting` for hard cases.
44
- 3. **Delegate.** Fire independent tasks in parallel (multiple `codex exec` in background, or multiple subagents in one message). Stay available to steer.
45
- 4. **Verify.** Delegate verification too — Codex read-only pass, test run, or `verifier` agent. Fable reads the report and the diff, not the whole tree.
46
- 5. **Judge.** If the output misses the bar: refine the spec and re-delegate (Codex is steerable — better prompts beat manual fixes), or escalate to an opus subagent for taste-sensitive work. Do not "just fix it quickly" yourself — that's how the mode dies.
47
-
48
- ## Delegation prompt checklist (for Codex)
49
-
50
- - Names exact files/paths and the repo root
51
- - States the goal in one sentence, then constraints (style, deletion safety: `trash` not `rm -rf`, no scope creep)
52
- - Defines done: commands to run, expected results
53
- - Asks for a report: changed files, what was done, tests run, risks
54
- - Non-git/untrusted dir → add `--skip-git-repo-check`
55
-
56
- ## Anti-patterns
57
-
58
- - "It's faster if I just do it" — for anything beyond a trivial tweak, it isn't: it burns the budget the whole session depends on.
59
- - Reading 10 files to plan — delegate exploration, plan from the summary.
60
- - Fixing Codex's output by hand — refine the prompt and rerun instead.
61
- - Serializing independent delegations — parallelize.
62
- - Verifying UI by taking screenshots yourself — Codex does computer use and UI verification better and cheaper.
63
-
64
- If no delegation path works (Codex unavailable, Bash denied), say so explicitly and ask the user before falling back to direct execution — never silently drop out of the mode.