@caddis/cli 0.2.1 → 0.2.2
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/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +10 -0
- package/bundles/antigravity-plugin/skills/kb/SKILL.md +16 -2
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/antigravity-plugin-extras/skills/_registry.md +1 -1
- package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +135 -1
- package/bundles/manifest.json +3 -3
- package/package.json +1 -1
|
@@ -92,6 +92,15 @@ A tier can be served by an OSS provider instead of Anthropic (cheat sheet:
|
|
|
92
92
|
(Claude or GLM implemented) or `--provider glm` / a Claude `code-reviewer` pass (DeepSeek-adjacent
|
|
93
93
|
work). Never same-vendor.
|
|
94
94
|
|
|
95
|
+
### Flag high-risk phases (`risk:` — a marker, not a mechanism)
|
|
96
|
+
Each phase may carry **`risk: normal|high`** (default `normal` — omit the line unless the phase is
|
|
97
|
+
`high`), meaning only "this is a phase where a wrong answer is expensive" — security/authz, a
|
|
98
|
+
correctness-critical algorithm, an ambiguous spec, or an irreversible change. It is **inert**: it
|
|
99
|
+
selects no model, spawns no agents, and implies no fan-out — it exists so the executor can decide **at
|
|
100
|
+
runtime** whether an extra cross-check is worth it. Do not emit orchestration, lane fan-out, or
|
|
101
|
+
`Workflow` scripts from this command; the runtime decision rules and the intent→model map live in one
|
|
102
|
+
place, the `agent-orchestration` skill's *Multi-model fan-out* section.
|
|
103
|
+
|
|
95
104
|
## Step 3 — Write the plan to `.caddis/plans/<feature-slug>.md`
|
|
96
105
|
|
|
97
106
|
Create `.caddis/plans/` if it doesn't exist.
|
|
@@ -127,6 +136,7 @@ Creating Model: <model-id>
|
|
|
127
136
|
**Model:** <tier> (`/model <alias>`) — <one-line rationale tied to this phase's difficulty>
|
|
128
137
|
**Lane:** claude — this session | glm-headless — `claude-glm -p "/caddis:implement <this plan's path> — Phase 1 only"`
|
|
129
138
|
**Session:** continue | **fresh** (start a new session for this phase — note why: lane change / heavy context)
|
|
139
|
+
**Risk:** high — token-verification seam; a wrong answer here is a silent auth bypass *(omit this line when normal)*
|
|
130
140
|
**Goal:** <one sentence>
|
|
131
141
|
**Touches:** `<files>`
|
|
132
142
|
**TDD:**
|
|
@@ -46,8 +46,9 @@ surface the `[DOC-MAP]` "read the index first" pointer for future sessions in th
|
|
|
46
46
|
|
|
47
47
|
## KB note format (OKF-lite — mandatory for every new note)
|
|
48
48
|
|
|
49
|
-
Every new `.caddis/kb/*.md` note starts with this frontmatter block
|
|
50
|
-
|
|
49
|
+
Every new `.caddis/kb/*.md` note starts with this frontmatter block. **`type` is the only required
|
|
50
|
+
field**; everything else is recommended. `DOC-MAP.md` is the index, not a note — it stays
|
|
51
|
+
frontmatter-free:
|
|
51
52
|
|
|
52
53
|
```yaml
|
|
53
54
|
---
|
|
@@ -56,5 +57,18 @@ title: <human title>
|
|
|
56
57
|
description: <one line — keep it identical to the note's DOC-MAP row description>
|
|
57
58
|
tags: [topic, topic]
|
|
58
59
|
timestamp: 2026-01-01 # ISO date of last substantive update
|
|
60
|
+
# --- OKF v0.2 trust signals (all optional; omit rather than guess) ---
|
|
61
|
+
status: stable # draft | stable | deprecated (absent reads as stable)
|
|
62
|
+
stale_after: 2026-12-31 # re-verify by this date; nothing auto-acts on it
|
|
63
|
+
verified: # who CONFIRMED it (not who wrote it); append, never rewrite
|
|
64
|
+
- { by: human:handle, at: 2026-07-28T10:00:00Z }
|
|
65
|
+
generated: { by: caddis/<model-id>, at: 2026-07-28T09:00:00Z }
|
|
59
66
|
---
|
|
60
67
|
```
|
|
68
|
+
|
|
69
|
+
The full schema, the caddis↔OKF `status` mapping, and what caddis deliberately skips from OKF v0.2
|
|
70
|
+
(`sources:`, `Attested Computation`) live in
|
|
71
|
+
[`.github/instructions/document-frontmatter.instructions.md`](../../.github/instructions/document-frontmatter.instructions.md).
|
|
72
|
+
|
|
73
|
+
**Backward compatible:** an existing note with no trust fields is still correct. Do not bulk-migrate
|
|
74
|
+
old notes — add the fields as notes are next touched.
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
| Skill | Path | When to Use |
|
|
137
137
|
|-------|------|-------------|
|
|
138
138
|
| Agent Md Refactor | `agent-md-refactor/` | Refactor bloated agent instruction files (AGENTS.md, .cursorrules, .github/ files, etc.) to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation. |
|
|
139
|
-
| Agent Orchestration | `agent-orchestration/` | End-to-end blueprint for orchestrating the full agent pipeline — from spec intake through planning, implementation, testing, and debugging |
|
|
139
|
+
| Agent Orchestration | `agent-orchestration/` | End-to-end blueprint for orchestrating the full agent pipeline — from spec intake through planning, implementation, testing, and debugging — plus the multi-model fan-out rules (when a second model is worth it, the intent→model map, and the cost guardrails) |
|
|
140
140
|
| Ask Questions If Underspecified | `asking-questions/` | Clarify requirements before implementing. Do not use automatically, only when invoked explicitly. |
|
|
141
141
|
| Data Contract Pipeline | `data-contract-pipeline/` | **WORKFLOW SKILL** - Build, audit, and validate data-to-UI contracts for apps. Use whenever the user mentions data mapping, UI lineage, DB-to-UI, DisplayDTOs, source-to-screen mapping, data contracts, schema drift, typed API responses, frontend type alignment, mockup grounding, requirements-to-UI mapping, or asks whether a UI is backed by real DB/file data. Works for DBs, JSON, Markdown, CSV, XLSX, YAML, APIs, and UI mockups. |
|
|
142
142
|
| Developer Growth Analysis | `developer-growth-analysis/` | Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-orchestration
|
|
3
|
-
description: "End-to-end blueprint for orchestrating the full agent pipeline — from spec intake through planning, implementation, testing, and debugging"
|
|
3
|
+
description: "End-to-end blueprint for orchestrating the full agent pipeline — from spec intake through planning, implementation, testing, and debugging — plus the multi-model fan-out rules (when a second model is worth it, the intent→model map, and the cost guardrails)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agent Orchestration Blueprint
|
|
@@ -52,6 +52,11 @@ The operator (human) acts as **orchestrator**. Agents act as an **advisory board
|
|
|
52
52
|
|
|
53
53
|
Every stage produces a **persistent artefact** (markdown file, commit, test run) that the next stage can consume without relying on conversation memory. This is what makes multi-session execution reliable.
|
|
54
54
|
|
|
55
|
+
> The pipeline below is the **sequential** axis — which agent, in what order. There is a second,
|
|
56
|
+
> independent axis: **how many models** work a given stage. That is deliberately rationed — see
|
|
57
|
+
> [Multi-model fan-out](#multi-model-fan-out-the-second-axis-how-many-models) before reaching for a
|
|
58
|
+
> second model.
|
|
59
|
+
|
|
55
60
|
| Stage | Artefact | Location |
|
|
56
61
|
|-------|----------|----------|
|
|
57
62
|
| Requirements | Spec / feature file | Supplied by operator (e.g. `nextprompt.md`) |
|
|
@@ -392,10 +397,138 @@ The plan document should contain **copy-paste prompts** for each phase. This rem
|
|
|
392
397
|
|
|
393
398
|
---
|
|
394
399
|
|
|
400
|
+
## Multi-model fan-out (the second axis: how many models)
|
|
401
|
+
|
|
402
|
+
> ### ⚠️ If you are not Claude Code, treat this section as ADVISORY and execute solo.
|
|
403
|
+
> The `Agent` tool, its per-agent `model:` override, the `Workflow` tool, and the `/glm`,
|
|
404
|
+
> `/deepseek`, `/caddis:cross-review` commands described below are **Claude-Code-only**. On Codex,
|
|
405
|
+
> Copilot, Antigravity/agy, or any other host: take the *judgement* from this section — default solo,
|
|
406
|
+
> cheapest deterministic check first, don't trust a single model on a security invariant — and
|
|
407
|
+
> **ignore the mechanics**. Do not attempt to emulate fan-out by hand, do not tell the user to run
|
|
408
|
+
> tools your host does not have, and do not treat the model map below as instructions you can execute.
|
|
409
|
+
> Solo execution is a correct, complete outcome here.
|
|
410
|
+
|
|
411
|
+
Everything above is *sequential*: one model, one stage at a time, operator in the loop. **Fan-out** —
|
|
412
|
+
running two or more models on the same work and reconciling their output — is a separate axis, and it
|
|
413
|
+
is **expensive in three currencies at once**: provider quota, the orchestrator's own context, and the
|
|
414
|
+
human's attention. It earns its cost rarely. The rules below are ordered; apply them in order.
|
|
415
|
+
|
|
416
|
+
### Rule 0 — default SOLO
|
|
417
|
+
|
|
418
|
+
**One model does the work. That is the default and it is right most of the time.** Fan out only when
|
|
419
|
+
the work is genuinely high-risk *or* high-uncertainty:
|
|
420
|
+
|
|
421
|
+
| Fan out | Stay solo |
|
|
422
|
+
|---|---|
|
|
423
|
+
| Security-sensitive code — authn/authz, crypto, secret handling, input trust boundaries | Boilerplate, CRUD, scaffolding |
|
|
424
|
+
| Correctness-critical algorithms where a subtle wrong answer looks right (concurrency, money, dates/timezones, migrations, dedup/merge logic) | Mechanical refactors with a green suite either side |
|
|
425
|
+
| Ambiguous specs — where the risk is that *everyone* misreads the requirement the same way | Anything a test, type-checker, or linter can decide |
|
|
426
|
+
| Verifying a frontier model's **own** risky output — a model is the worst reviewer of its own reasoning | Work already covered by an existing review gate |
|
|
427
|
+
| Irreversible / wide blast radius — a drop, a flag day, a fleet-wide sweep | Work you can trivially revert |
|
|
428
|
+
|
|
429
|
+
Two failure modes, both real: **fanning out on size** (a big mechanical task is still solo — split it
|
|
430
|
+
across *sessions*, not models) and **fanning out for reassurance** (a second opinion you have already
|
|
431
|
+
decided to ignore is pure cost).
|
|
432
|
+
|
|
433
|
+
### Rule 1 — cheapest check first
|
|
434
|
+
|
|
435
|
+
**Never spend a second model on something a deterministic check can decide.** Climb this ladder and
|
|
436
|
+
stop at the first rung that answers the question:
|
|
437
|
+
|
|
438
|
+
1. **Tests / types / linters / the build.** If a failing test, `mypy`/`tsc`, or a lint rule confirms
|
|
439
|
+
the concern, you are done — that is a *fact*, not an opinion, and it costs nothing.
|
|
440
|
+
2. **Read the code.** A targeted grep or a five-line read beats any model's guess about what the code
|
|
441
|
+
does.
|
|
442
|
+
3. **A subagent on the same model** (`code-reviewer`, `security-analyst`, `anchor`, `preflight`) — a
|
|
443
|
+
fresh context, not a fresh vendor. Catches most "did we miss something" cases.
|
|
444
|
+
4. **A different tier** — escalate one model tier for the hard part only.
|
|
445
|
+
5. **Cross-vendor.** The last rung, and the rationed one (see the guardrails).
|
|
446
|
+
|
|
447
|
+
If a deterministic check *can* be written but doesn't exist yet, **write the check** — it is cheaper
|
|
448
|
+
than the model call and it keeps paying.
|
|
449
|
+
|
|
450
|
+
### Rule 2 — name the INTENT, not the model
|
|
451
|
+
|
|
452
|
+
Talk about lanes by what they are *for*, so plans, prompts, and reviews survive model releases and the
|
|
453
|
+
LiteLLM cutover. **This table is the single place the intent→model mapping lives** — everything else
|
|
454
|
+
(plans, commands, skills) refers to the intent name and points here.
|
|
455
|
+
|
|
456
|
+
| Intent | What it's for | Current model | Claude Code mechanics | Cost |
|
|
457
|
+
|---|---|---|---|---|
|
|
458
|
+
| **deepest** | Subtle correctness, security invariants, novel architecture, judgment-heavy seams | `opus` | `/model opus`; `Agent(model: "opus")` | **High** — Anthropic plan quota |
|
|
459
|
+
| **broad** | Wide parallel coverage of a large but not-subtle surface; the workhorse | `sonnet` | `/model sonnet`; `Agent(model: "sonnet")` | Medium — the default; budget for several |
|
|
460
|
+
| **mechanical** | Fully-specced, repeat-of-a-known-pattern, no judgment required | `haiku` | `/model haiku`; `Agent(model: "haiku")` | Low |
|
|
461
|
+
| **cross-vendor-reviewer** | A *different vendor's* blind spots on a diff — **code review only** | `deepseek` (default), `glm` | `/caddis:cross-review`, `/glm`, `/deepseek` | **Scarce** — separate starter-tier subscription, NOT Anthropic quota. Ration it. |
|
|
462
|
+
| **synthesis / long-horizon** | Orchestrating many lanes, or work that can't self-verify across a large codebase | `fable` | `/model fable` | **Very high** — ~2× opus's rate-limit burn. RARE. |
|
|
463
|
+
|
|
464
|
+
**Update this table, not the callers**, when a model is added, retired, or re-tiered. A plan that says
|
|
465
|
+
"cross-vendor-reviewer" keeps working; a plan that says "deepseek-chat" rots.
|
|
466
|
+
|
|
467
|
+
### Hard guardrails
|
|
468
|
+
|
|
469
|
+
These are constraints, not preferences. Each exists because breaking it produced a real cost.
|
|
470
|
+
|
|
471
|
+
1. **DeepSeek and GLM are the CODE-REVIEW lane, and nothing else.** Map them to cross-vendor review of
|
|
472
|
+
a diff or a concrete file set. **Never** general audit, research, planning, architecture, or
|
|
473
|
+
open-ended subagent work — they are unreliable outside that lane, and an unreliable lane's output
|
|
474
|
+
still costs a full synthesis pass to disprove.
|
|
475
|
+
2. **Ration cross-vendor to ~one consolidated pass per task.** One review of the whole change, not one
|
|
476
|
+
agent per area. Alternate vendors *between* tasks (DeepSeek this diff, GLM the next) — different
|
|
477
|
+
families have different blind spots and alternation maximises what the pair catches over time.
|
|
478
|
+
3. **Degrade to solo when a lane's quota is exhausted.** A 402/429/quota error on GLM or DeepSeek is a
|
|
479
|
+
**downgrade, not a blocker**: log that the cross-vendor pass was skipped, continue with the
|
|
480
|
+
same-vendor reviewer, and say so in the report. Never stall the task waiting on a rationed lane,
|
|
481
|
+
and never silently drop the pass — an unrun check that reads as "reviewed" is worse than no check.
|
|
482
|
+
4. **Name the synthesis cost before you add a lane.** N lanes do not cost N model calls — they cost N
|
|
483
|
+
calls **plus** reconciling N reports, which burns the orchestrator's frontier context (the scarcest
|
|
484
|
+
thing in the session) **and** the human's attention on the write-up. So:
|
|
485
|
+
- **Default cap: 3 lanes.** Above that, write the synthesis budget down first — who reconciles, on
|
|
486
|
+
what model, and what the human is expected to read.
|
|
487
|
+
- **Hard ceiling ~8**, and only for a one-off audit of a genuinely partitioned surface. The 8-lane
|
|
488
|
+
migration audit that motivated these rules produced a 272-line report that still needed a human
|
|
489
|
+
read and a main-thread re-verification of every HIGH finding. That tail is the real cost.
|
|
490
|
+
- If you cannot say what you would *do differently* based on lane N's output, lane N is not worth
|
|
491
|
+
running.
|
|
492
|
+
5. **Lanes advise; they do not write.** Fan-out agents are read-only — they return findings, the main
|
|
493
|
+
thread applies them. This is the same rule as "agents never chain autonomously without review", and
|
|
494
|
+
it is what keeps parallel lanes from clobbering each other.
|
|
495
|
+
6. **Verify high-severity findings in the main thread before acting.** A finding from a lane is a
|
|
496
|
+
*claim*. Re-read the cited file/line yourself. Subagent reports are confidently wrong often enough
|
|
497
|
+
that acting on an unverified HIGH is how fan-out turns into net-negative work.
|
|
498
|
+
|
|
499
|
+
### Running it — existing mechanisms only
|
|
500
|
+
|
|
501
|
+
Invent no new machinery. Everything needed already ships:
|
|
502
|
+
|
|
503
|
+
| Need | Use |
|
|
504
|
+
|---|---|
|
|
505
|
+
| Second opinion, same vendor, fresh context | `Agent` tool → `code-reviewer` / `security-analyst` / `anchor` / `preflight` |
|
|
506
|
+
| A different tier for one lane only | The `Agent` tool's `model:` override (per-agent; does not change the session model) |
|
|
507
|
+
| 2–4 lanes in parallel | Several `Agent` calls **in one message** — they run concurrently. This is enough; you do not need anything heavier. |
|
|
508
|
+
| Deterministic multi-stage orchestration (fan out over a discovered list, loop until dry, adversarial verify stages) | The `Workflow` tool — **only when the human explicitly asks for it**; it can spawn dozens of agents |
|
|
509
|
+
| Cross-vendor review of a diff | `/caddis:cross-review` (or `python .github/tools/oss_review.py --provider deepseek\|glm --range <range>`) |
|
|
510
|
+
| Cross-vendor opinion that needs to read the repo | `/glm <prompt>` or `/deepseek <prompt>` |
|
|
511
|
+
| Cross-vendor one-shot, no repo context | `/ask-glm` / `/ask-deepseek` |
|
|
512
|
+
| Per-phase model + lane assignment in a plan | `/caddis:feature-plan` — every phase already carries **Model**, **Lane**, and a cross-review provider |
|
|
513
|
+
|
|
514
|
+
**Reviewer rule (standing):** the reviewer is always a different vendor than whoever wrote the code.
|
|
515
|
+
Claude or GLM implemented → DeepSeek reviews (or swap). Never same-vendor.
|
|
516
|
+
|
|
517
|
+
Full command/billing decision table: `docs/guide/multi-model-workflow.md`.
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
395
521
|
## Anti-Patterns to Avoid
|
|
396
522
|
|
|
397
523
|
| ❌ Anti-Pattern | ✅ Instead |
|
|
398
524
|
|----------------|-----------|
|
|
525
|
+
| Fanning out because the task is *big* | Fan out for **risk**, not size — split a big mechanical task across sessions, not models |
|
|
526
|
+
| Spending a cross-vendor pass before the tests have run | Cheapest check first — deterministic gates decide it for free |
|
|
527
|
+
| One cross-vendor agent per area | One consolidated cross-vendor pass per task — the lane is rationed |
|
|
528
|
+
| Using DeepSeek/GLM for audit, research, or planning | Code-review lane only — they are unreliable outside it |
|
|
529
|
+
| Adding an Nth lane without budgeting the synthesis | Cap the lanes; reconciling N reports lands on you *and* the human |
|
|
530
|
+
| Acting on a subagent's HIGH finding as reported | Re-verify it in the main thread against the cited file/line first |
|
|
531
|
+
| Blocking the task when a rationed lane is out of quota | Degrade to solo, log the skipped pass, continue |
|
|
399
532
|
| Jumping straight to code without a plan | Triage → ADR (if needed) → Plan → Implement |
|
|
400
533
|
| Implementing all phases in one session | One phase per session — clean context, focused work |
|
|
401
534
|
| Letting agents edit the plan document | Only the Planner agent (or operator) edits plans |
|
|
@@ -493,6 +626,7 @@ A well-orchestrated session should produce:
|
|
|
493
626
|
| Session continuation context | `.github/skills/workflow/relay/SKILL.md` |
|
|
494
627
|
| Verifying code before committing | `.github/skills/workflow/verification-loop/SKILL.md` |
|
|
495
628
|
| Writing implementation plans | `.github/skills/docs/writing-plans/SKILL.md` |
|
|
629
|
+
| Running the cross-vendor review lane | `.github/skills/coding/cross-review/SKILL.md` |
|
|
496
630
|
| Creating new reusable skills | `.github/skills/workflow/skill-creator/SKILL.md` |
|
|
497
631
|
| Best practices reference | `.github/skills/workflow/best-practices/SKILL.md` |
|
|
498
632
|
|
package/bundles/manifest.json
CHANGED
package/package.json
CHANGED