@caddis/cli 0.2.4 → 0.2.5
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 +11 -0
- package/bundles/antigravity-plugin/agents/claude-md-curator.md +7 -4
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/skills/_registry.md +6 -0
- package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +183 -0
- package/bundles/antigravity-plugin/skills/advisory-hub/reference/context-template.md +214 -0
- package/bundles/antigravity-plugin/skills/advisory-hub/reference/hub-handbook.md +233 -0
- package/bundles/antigravity-plugin/skills/advisory-hub/reference/report-contract.md +94 -0
- package/bundles/antigravity-plugin/skills/advisory-hub/reference/succession.md +96 -0
- package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/code-review/SKILL.md +7 -0
- package/bundles/antigravity-plugin/skills/context-curator/SKILL.md +1 -1
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +71 -14
- package/bundles/antigravity-plugin/skills/dashboard-perf-sweep/SKILL.md +18 -18
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +164 -9
- package/bundles/antigravity-plugin/skills/gate-preflight/SKILL.md +34 -0
- package/bundles/antigravity-plugin/skills/gate-review/SKILL.md +36 -0
- package/bundles/antigravity-plugin/skills/golden-plan/SKILL.md +22 -13
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +78 -0
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +182 -3
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/SKILL.md +57 -1
- package/bundles/antigravity-plugin/skills/park/SKILL.md +126 -0
- package/bundles/antigravity-plugin/skills/prd/SKILL.md +4 -2
- package/bundles/antigravity-plugin/skills/preflight/SKILL.md +5 -0
- package/bundles/antigravity-plugin/skills/spawn-hub/SKILL.md +287 -0
- package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +112 -0
- package/bundles/antigravity-plugin/skills/writing-plans/SKILL.md +7 -4
- package/bundles/antigravity-plugin/warm_start_agy.py +28 -2
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +9 -9
- package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +56 -6
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/SKILL.md +1 -1
- package/bundles/antigravity-plugin-extras/skills/schema-migration/SKILL.md +2 -2
- package/bundles/antigravity-plugin-extras/skills/state-tracking/SKILL.md +4 -4
- package/bundles/manifest.json +3 -3
- package/dist/cli.js +55 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,6 +84,17 @@ Summary
|
|
|
84
84
|
`--strict` exits non-zero when something needs fixing (for CI). Detected-but-unsupported agents are
|
|
85
85
|
information, not failures, and never trip `--strict`. `--json` gives machine-readable output.
|
|
86
86
|
|
|
87
|
+
**`doctor` also checks whether `@caddis/cli` itself is behind npm** (a 5s `npm view` lookup, opt-in to
|
|
88
|
+
`doctor` only — `status`/`init`/`update` stay network-free by default so they never feel hung offline).
|
|
89
|
+
This matters because every per-agent drift check above compares against the pool bundled in *this*
|
|
90
|
+
install — a CLI that is itself stale can under-report drift even though each individual comparison is
|
|
91
|
+
correct. When behind, doctor adds:
|
|
92
|
+
```
|
|
93
|
+
▲ @caddis/cli 0.2.3 → 0.2.4 available
|
|
94
|
+
npm i -g @caddis/cli@latest
|
|
95
|
+
```
|
|
96
|
+
and counts it as a `--strict`-tripping problem, same as an agent gap.
|
|
97
|
+
|
|
87
98
|
### `caddis status`
|
|
88
99
|
|
|
89
100
|
The same facts as a glanceable table. Running bare `caddis` does this.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claude-md-curator
|
|
3
|
-
description: Use this agent periodically (every few weeks, or when any AGENTS.md exceeds ~
|
|
3
|
+
description: Use this agent periodically (every few weeks, or when any AGENTS.md exceeds ~200 lines) to prune and consolidate the project's AGENTS.md rules files (the canonical rules; CLAUDE.md is a thin @AGENTS.md import shim). Flags staleness, bloat, duplication, misrouted how-to content, and CLAUDE.md shims that have grown rules of their own. Proposes a curated version — never writes without showing the diff to the main thread first.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
You are the rules-file maintenance agent. **`AGENTS.md` is the canonical rules file** (root + each
|
|
@@ -90,14 +90,17 @@ propose deletion — they're copy-paste artifacts and don't affect the live, plu
|
|
|
90
90
|
|
|
91
91
|
## Step 3 — Size budget check
|
|
92
92
|
|
|
93
|
-
An AGENTS.md over
|
|
93
|
+
An AGENTS.md over 200 lines (`AGENTS_MD_BUDGET` — the one enforced value, in
|
|
94
|
+
`scripts/claudster_doctor.py` and mirrored in `scripts/check_doc_coverage.py`; do not restate a
|
|
95
|
+
different number here) almost certainly contains bloat. Flag the file and count:
|
|
94
96
|
- Lines that pass the "keep" bar
|
|
95
97
|
- Lines that should be deleted
|
|
96
98
|
- Lines that should be moved to a runbook
|
|
97
99
|
|
|
98
100
|
> The pre-push doc-coverage checker (`scripts/check_doc_coverage.py`) also *warns* on an oversize
|
|
99
|
-
> always-loaded rules file (`AGENTS.md` + its `CLAUDE.md` shim; `agents_md_budget`)
|
|
100
|
-
>
|
|
101
|
+
> always-loaded rules file (`AGENTS.md` + its `CLAUDE.md` shim; `agents_md_budget`), and a
|
|
102
|
+
> `PostToolUse` hook (`hooks/rules_budget_nudge.py`) re-warns mid-session on every edit to one that's
|
|
103
|
+
> already over — this agent is the deeper consolidation pass that actually fixes it.
|
|
101
104
|
|
|
102
105
|
## Step 4 — Return proposed changes (never write)
|
|
103
106
|
|
|
@@ -71,20 +71,25 @@
|
|
|
71
71
|
| Digress | `digress/` | Park the current workstream on the stack and switch to a new task — without losing the original |
|
|
72
72
|
| Excalidraw Db | `excalidraw-db/` | Turn a SQL artifact into an Excalidraw diagram for a design review / ARB pack / slide — higher-level, drag-the-boxes format |
|
|
73
73
|
| Feature Plan | `feature-plan/` | Create a phased, TDD-structured implementation plan that acts as the durable spine for multi-session work |
|
|
74
|
+
| Gate Preflight | `gate-preflight/` | Deterministic headless preflight — validates a plan against the actual codebase, self-contained (never depends on a skill activating) |
|
|
75
|
+
| Gate Review | `gate-review/` | Deterministic headless code review — adversarial diff review, self-contained (never depends on a skill activating) |
|
|
74
76
|
| Handoff | `handoff/` | End-of-session handoff — capture exact state so the next session resumes with zero re-discovery |
|
|
75
77
|
| Implement | `implement/` | Headless plan executor — implement an approved plan phase-by-phase on the current feature branch, TDD-first, committing per phase |
|
|
76
78
|
| Kb | `kb/` | Rebuild the KB index (.caddis/kb/DOC-MAP.md) — create it if missing, index un-indexed notes, report dangling links |
|
|
77
79
|
| Mermaid Db | `mermaid-db/` | Turn a SQL artifact (proc, view, query, .sql file, or table name) into a Mermaid diagram that explains it — git-diffable, saved as .md |
|
|
78
80
|
| Migrate Dir | `migrate-dir/` | Rename this repo's legacy `.claudster/` artifact dir to `.caddis/` — dry-run first, `git mv` to keep history, merges a straggler dir, rewrites live refs. Opt-in, never automatic. |
|
|
81
|
+
| Park | `park/` | File a future-work item in the one backlog — .caddis/parking-lot/ — or list what is open |
|
|
79
82
|
| Prd | `prd/` | Capture requirements through structured discovery and write a PRD |
|
|
80
83
|
| Resume | `resume/` | Pop the most recently parked workstream off the stack and resume it at its exact resume point |
|
|
81
84
|
| Ship | `ship/` | Commit, push, and monitor the deploy pipeline (auto-detects Gitea, GitHub Actions, or local-only) |
|
|
82
85
|
| Ship Merge | `ship-merge/` | Merge an already-green, already-reviewed PR behind an explicit deploy-confirm, monitor the deploy, validate prod, then clean up the branch — only on green. |
|
|
83
86
|
| Ship Pr | `ship-pr/` | Open a reviewed PR for the current feature branch — rebase-safe push, PR create/update, monitor CI, STOP at green. Never merges, never deploys (that's /ship-merge). |
|
|
87
|
+
| Spawn Hub | `spawn-hub/` | Hand the Advisory Hub role to a fresh session — run the mechanical audit, then generate the succession prompt with a context self-check the new Hub must pass |
|
|
84
88
|
| Tdd | `tdd/` | Run a strict red-green-refactor TDD cycle for a unit of behavior |
|
|
85
89
|
| Ui Brief | `ui-brief/` | Design-first UI brief — lock the aesthetic before writing any code |
|
|
86
90
|
| Usage Review | `usage-review/` | Review local caddis usage over a window, surface prioritised recommendations, and apply config changes in one step |
|
|
87
91
|
| Use Model | `use-model/` | Explain (or apply) the model lanes — claude / claude-glm / cross-review — key resolution, and how to add a provider |
|
|
92
|
+
| Validate Phase | `validate-phase/` | Advisory Hub phase validation — consume a phase report, RE-DERIVE its claims independently, and return ACCEPT / ACCEPT-WITH-CORRECTION / REJECT |
|
|
88
93
|
| Version | `version/` | Report the installed caddis version |
|
|
89
94
|
|
|
90
95
|
### Media
|
|
@@ -108,6 +113,7 @@
|
|
|
108
113
|
|
|
109
114
|
| Skill | Path | When to Use |
|
|
110
115
|
|-------|------|-------------|
|
|
116
|
+
| Advisory Hub | `advisory-hub/` | Cross-session phase validation for multi-phase implementation plans — a long-lived "Hub" session RE-DERIVES each implementation phase's claims independently instead of trusting its self-assessment. Use when the user says "advisory hub", "validate this phase", "phase report", "hub verdict", "advisory context", "who checks the implementing session", "the plan turned out to be wrong", "hand off the hub", "re-derive don't trust", or when a long, multi-session plan with expensive-to-reverse decisions (a migration, a security change, anything touching production data correctness) needs an independent session that verifies every phase before the next one starts. NOT for a three-phase feature — it costs a full extra session's context per phase, and a skill that doesn't say so gets applied everywhere and resented. Every Hub artefact belongs in `.caddis/advisory-hub-reports/` — a succession prompt is `hub-NN.spawn.md` there, never a generic prompts folder, even when you write it by hand instead of running `/caddis:spawn-hub`. |
|
|
111
117
|
| Best Practices | `best-practices/` | >- |
|
|
112
118
|
| Brainstorming | `brainstorming/` | You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation. |
|
|
113
119
|
| Context Curator | `context-curator/` | Compress and prioritize codebase context before handing work to reasoning agents, minimizing token waste while preserving the required decision inputs. |
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: advisory-hub
|
|
3
|
+
description: Cross-session phase validation for multi-phase implementation plans — a long-lived "Hub" session RE-DERIVES each implementation phase's claims independently instead of trusting its self-assessment. Use when the user says "advisory hub", "validate this phase", "phase report", "hub verdict", "advisory context", "who checks the implementing session", "the plan turned out to be wrong", "hand off the hub", "re-derive don't trust", or when a long, multi-session plan with expensive-to-reverse decisions (a migration, a security change, anything touching production data correctness) needs an independent session that verifies every phase before the next one starts. NOT for a three-phase feature — it costs a full extra session's context per phase, and a skill that doesn't say so gets applied everywhere and resented. Every Hub artefact belongs in `.caddis/advisory-hub-reports/` — a succession prompt is `hub-NN.spawn.md` there, never a generic prompts folder, even when you write it by hand instead of running `/caddis:spawn-hub`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Advisory Hub — cross-session phase validation
|
|
7
|
+
|
|
8
|
+
## The whole model, in four statements
|
|
9
|
+
|
|
10
|
+
> **1. Re-derive, don't trust — and re-derive DIFFERENTLY than the implementer did.**
|
|
11
|
+
> **2. Two roles, four files.** The implementer writes only the report. The Hub writes everything else.
|
|
12
|
+
> **3. The memory IS the switch.** `<plan-stem>-advisory-context.md` turns the mode on *and* is the
|
|
13
|
+
> Hub's brain. An empty file buys a rubber stamp.
|
|
14
|
+
> **4. Nothing is fixed until it lands in the context doc.** A correction living in a verdict or a
|
|
15
|
+
> chat dies with the session that wrote it.
|
|
16
|
+
|
|
17
|
+
### 1. The rule, and the correction to it
|
|
18
|
+
|
|
19
|
+
A phase report is a **self-assessment**. When it says *"VALUE CHECK passed: endpoint 11,126 = SQL
|
|
20
|
+
11,126,"* the Hub **runs the query itself**. A Hub that reads reports and nods is *worse than no Hub*
|
|
21
|
+
— it manufactures false confidence.
|
|
22
|
+
|
|
23
|
+
**But re-running a gate *identically* is not independent verification** — it reproduces the
|
|
24
|
+
implementer's blind spot. That cost a failed production deploy: implementer and Hub both ran the same
|
|
25
|
+
suite, both green, and CI then failed on a dependency-injection bug the gitignored local env file had
|
|
26
|
+
been masking. **For anything touching config, a data seam, or dependency injection, deprive the
|
|
27
|
+
environment:** `mv <env-file> aside && <test command> && mv back`.
|
|
28
|
+
|
|
29
|
+
### 2. Two roles, four files
|
|
30
|
+
|
|
31
|
+
| File | Written by | When | What is lost without it |
|
|
32
|
+
|---|---|---|---|
|
|
33
|
+
| `<plan-stem>-advisory-context.md` | scaffolded at planning; **owned and maintained by the Hub** | before | The Hub's memory — re-derivation access, locked decisions *and their non-obvious reasons*, the disproved-claims list. Nothing else survives a Hub crash or compaction |
|
|
34
|
+
| `.caddis/advisory-hub-reports/phase-NN.prompt.md` | **the Hub** | **BEFORE the phase runs** | What the implementer was *told*. Without it, "the implementer deviated" and "the plan was wrong" are both unfalsifiable |
|
|
35
|
+
| `.caddis/advisory-hub-reports/phase-NN.report.md` | the implementing session | after | The only evidence a phase's claims were ever checkable rather than merely asserted |
|
|
36
|
+
| `.caddis/advisory-hub-reports/phase-NN.verdict.md` | **the Hub** | after | A later reader sees a self-assessment and no evidence anyone checked it |
|
|
37
|
+
|
|
38
|
+
**Role separation is not decoration.** An implementer that writes its own verdict has produced a
|
|
39
|
+
self-assessment wearing a verdict's name — worse than no verdict, because it *looks* like a check
|
|
40
|
+
happened. Diligence is no substitute: an implementer can re-derive its own claims honestly and still
|
|
41
|
+
produce a worthless verdict.
|
|
42
|
+
|
|
43
|
+
Where a `phase-NN.prompt.md` exists it is **the instruction of record** — `/caddis:implement` reads it,
|
|
44
|
+
and deviations are measured against it, not against the plan alone.
|
|
45
|
+
|
|
46
|
+
**The launch command does not belong in `phase-NN.prompt.md`.** That file is read by the implementer,
|
|
47
|
+
i.e. *after* launch — a file instructing you to spawn GLM is one GLM only reads once it has already
|
|
48
|
+
been spawned. Observed on a real plan, and the skill said nothing either way, so it will recur.
|
|
49
|
+
Surface the launch command to whoever is **orchestrating** (the human, or the session that will spawn
|
|
50
|
+
the phase). What the phase prompt SHOULD carry is a one-line **lane declaration** — *"This phase must
|
|
51
|
+
run on `<lane>`"* — so a mis-launched session can self-detect and act on it.
|
|
52
|
+
|
|
53
|
+
The lane a phase gets is also **provisional until this file is written.** Writing the phase prompt is
|
|
54
|
+
the first time anyone but the spec's author reads the spec; if the phase turns out to need judgment a
|
|
55
|
+
no-escalation lane cannot supply, downgrade it here.
|
|
56
|
+
|
|
57
|
+
### 3. The switch
|
|
58
|
+
|
|
59
|
+
`<plan-stem>-advisory-context.md`, beside the plan. `/caddis:implement`, `/caddis:handoff` and
|
|
60
|
+
`/caddis:validate-phase` all check for it. **No file → zero behaviour change, in every command, ever.**
|
|
61
|
+
|
|
62
|
+
Do not `touch` an empty one to "turn it on". The switch and the memory are deliberately the same file:
|
|
63
|
+
it should be structurally impossible to enable the Hub without giving it a brain.
|
|
64
|
+
|
|
65
|
+
**The verdict gates the next phase, by machine.** In Advisory-Hub mode, before starting phase N,
|
|
66
|
+
`/caddis:implement` requires `phase-(N-1).verdict.md` carrying `verdict: accept` or
|
|
67
|
+
`accept-with-correction`. Missing, or `reject` → stop and report `blocked-pending-hub`.
|
|
68
|
+
|
|
69
|
+
### 4. Corrections land structurally
|
|
70
|
+
|
|
71
|
+
Every correction the Hub issues must be asked: *where does this live so it cannot recur?* Telling the
|
|
72
|
+
implementing session is worthless — that session is closing. Putting it in the next phase's prompt
|
|
73
|
+
works exactly once. **Put it in the context doc**, where it binds every future phase whether or not
|
|
74
|
+
anyone remembers it. Each verdict therefore ends with *"what is now structural."*
|
|
75
|
+
|
|
76
|
+
Corollary: **feed the generic form back to this skill's parking lot.** Project facts stay in the
|
|
77
|
+
project; role mechanics come back here, or the skill never improves.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## When it earns its keep
|
|
82
|
+
|
|
83
|
+
**The cost is a full extra session's context, per phase.** Do not reach for this because it sounds
|
|
84
|
+
rigorous — reach for it when a mistake is expensive enough that the cost is cheap by comparison.
|
|
85
|
+
|
|
86
|
+
> **REQUIRED: the work is expensive to reverse** — a migration, a security change, production data
|
|
87
|
+
> correctness, or numbers published to stakeholders. **No stakes → no Hub, whatever else is true.**
|
|
88
|
+
>
|
|
89
|
+
> **PLUS at least one of:** the plan has **≥8 phases** · it is implemented across **sessions that will
|
|
90
|
+
> not share context**.
|
|
91
|
+
|
|
92
|
+
A three-phase feature hits none of this. `/caddis:feature-plan` Step 3b runs this test and **offers**;
|
|
93
|
+
it never creates the file silently. This is the test's only home — do not restate the thresholds
|
|
94
|
+
elsewhere, or the copies drift.
|
|
95
|
+
|
|
96
|
+
## Succession is not the same as a standing validator
|
|
97
|
+
|
|
98
|
+
Two things look alike from outside and are not:
|
|
99
|
+
|
|
100
|
+
- **`/caddis:spawn-hub` is SUCCESSION.** The outgoing Hub **ends**. It hands the role to a fresh
|
|
101
|
+
session and stops. There is one Hub afterwards, not two.
|
|
102
|
+
- **`/caddis:validate-phase` assumes a Hub that PERSISTS** across phases, checking each one.
|
|
103
|
+
|
|
104
|
+
Conflating them builds a review loop that has to be unwound. One session kept Hub-1 alive to check
|
|
105
|
+
Hub-2, then dismantled the arrangement when the user said they were closing Hub-1. Both models are
|
|
106
|
+
reasonable; running both at once is not.
|
|
107
|
+
|
|
108
|
+
## Every Hub artefact has one home
|
|
109
|
+
|
|
110
|
+
`.caddis/advisory-hub-reports/`. A succession prompt is `hub-NN.spawn.md` there, with frontmatter
|
|
111
|
+
`type: hub-spawn`. **This holds even when you write one by hand** rather than running
|
|
112
|
+
`/caddis:spawn-hub` — and by hand is exactly when it gets missed, because the instruction lives
|
|
113
|
+
inside the command you skipped.
|
|
114
|
+
|
|
115
|
+
The knock-on is the part that bites. `spawn-hub` rotates its comprehension trap by reading the last
|
|
116
|
+
spawn prompt from that directory. A prompt filed anywhere else is invisible to it, so rotation
|
|
117
|
+
silently runs against an empty set — the failure the artefact file was introduced to prevent,
|
|
118
|
+
returning through a different door. `check_doc_coverage.py` now warns on a `type: hub-spawn` file
|
|
119
|
+
found outside that directory.
|
|
120
|
+
|
|
121
|
+
## The Hub is a ROLE, not a conversation
|
|
122
|
+
|
|
123
|
+
It outlives any one session and hands over through **files**, never chat history. Hand over with
|
|
124
|
+
`/caddis:spawn-hub` — at a milestone boundary, or sooner if context is filling.
|
|
125
|
+
|
|
126
|
+
**Your instinct that the context doc is current is measured-wrong.** Asked *"can we hand off?"*, an
|
|
127
|
+
outgoing Hub's honest first answer was yes; a mechanical audit then found **seven gaps** — including
|
|
128
|
+
that the single highest-value technique then in use was written down nowhere a fresh Hub would find it.
|
|
129
|
+
|
|
130
|
+
## While you hold the role — maintain `relay.md`, not just the succession table
|
|
131
|
+
|
|
132
|
+
**The succession table records WHO HELD THE ROLE. `.caddis/relay.md` records WHERE THE WORK IS. A
|
|
133
|
+
Hub maintains both; they are not substitutes.**
|
|
134
|
+
|
|
135
|
+
The succession table is written when a Hub **ends**. Nothing else covers the hours while a Hub is
|
|
136
|
+
**working** — and that is the whole period this mechanism exists to protect, because its entire
|
|
137
|
+
purpose is surviving session death.
|
|
138
|
+
|
|
139
|
+
> **Mirror your working list into `.caddis/relay.md` as you go.** Your in-session task list does not
|
|
140
|
+
> survive this session. `relay.md` does. Anything not written there is lost when the window closes.
|
|
141
|
+
|
|
142
|
+
This gap was real. A spawned Hub read `relay.md`, answered a thirteen-question context check
|
|
143
|
+
correctly, found four genuine defects in its handover — **and created no tracker at all**, because
|
|
144
|
+
nothing asked it to. The user noticed before the agent did: *"I don't see it creating any todo list
|
|
145
|
+
yet."* The work was only recoverable because the OUTGOING Hub had written a tracker into `relay.md`
|
|
146
|
+
an hour earlier, on its own initiative.
|
|
147
|
+
|
|
148
|
+
**`relay.md` is gitignored and machine-local.** That is deliberate — it is per-machine session state,
|
|
149
|
+
not a shared artefact — but it has two consequences a Hub must plan around. It never reaches another
|
|
150
|
+
machine, so anything a *successor on a different box* needs belongs in the advisory context or the
|
|
151
|
+
spawn prompt instead. And no gate can check it through git, so keeping it current is a discipline,
|
|
152
|
+
not something a build will catch for you.
|
|
153
|
+
|
|
154
|
+
## Where the detail lives
|
|
155
|
+
|
|
156
|
+
Each file below is loaded by a **named command step**, at the moment it is needed. This is not optional
|
|
157
|
+
reading — it is deferred reading.
|
|
158
|
+
|
|
159
|
+
| Load this | For | Loaded by |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| `reference/context-template.md` | scaffolding or maintaining the context doc | `feature-plan` 3b · `validate-phase` 0 · `spawn-hub` 3 |
|
|
162
|
+
| `reference/report-contract.md` | filing a phase report | `implement`, at report time |
|
|
163
|
+
| `reference/hub-handbook.md` | validating a phase — verdict template, checklist, techniques, plan drift | `validate-phase` 2 |
|
|
164
|
+
| `reference/succession.md` | handing the role over — audit, self-check trap, carried-open ledger | `spawn-hub` · `handoff` 2b |
|
|
165
|
+
|
|
166
|
+
Naming, frontmatter and directory rules ship as an `AGENTS.md` **inside**
|
|
167
|
+
`.caddis/advisory-hub-reports/`, so they bind every agent that writes there — including agents that
|
|
168
|
+
never loaded this skill.
|
|
169
|
+
|
|
170
|
+
## Not to be confused with
|
|
171
|
+
|
|
172
|
+
`.github/prompts/advisory-hub.prompt.md` and `.github/instructions/advisory-mode.instructions.md` use
|
|
173
|
+
the same name for an older, unrelated Copilot chat-mode pipeline. It never ships to the Claude Code
|
|
174
|
+
plugin.
|
|
175
|
+
|
|
176
|
+
## Anti-patterns
|
|
177
|
+
|
|
178
|
+
- **Rubber-stamping.** A verdict with no re-derivation is not a verdict.
|
|
179
|
+
- **Re-running a gate the same way and calling it independent verification.** Change the environment.
|
|
180
|
+
- **An implementer writing its own verdict.** The roles exist for exactly this.
|
|
181
|
+
- **An empty context doc.** The switch *is* the memory.
|
|
182
|
+
- **Applying this to a short feature.** State the cost, every time, before adopting it.
|
|
183
|
+
- **A correction that lives only in a verdict file.** It dies with the session that wrote it.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Advisory Hub — the `advisory-context.md` template — the Hub's memory AND its on/off switch
|
|
2
|
+
|
|
3
|
+
> **Loaded by:** `/caddis:feature-plan` Step 3b (scaffold) · `/caddis:validate-phase` Step 0 (bootstrap) · `/caddis:spawn-hub` Step 3
|
|
4
|
+
>
|
|
5
|
+
> Reference for `.github/skills/workflow/advisory-hub/SKILL.md`. The core card carries the
|
|
6
|
+
> model; this carries the detail for one moment of use. Every rule here was earned by a
|
|
7
|
+
> specific failure — the failure is stated alongside it, so a later reader can tell a hard-won
|
|
8
|
+
> rule from an opinion.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## §A — the `advisory-context.md` template
|
|
13
|
+
|
|
14
|
+
Copy this in full when you (the Hub) start guarding a new plan. It is a **committed** peer of the plan,
|
|
15
|
+
not of `relay.md`.
|
|
16
|
+
|
|
17
|
+
````markdown
|
|
18
|
+
---
|
|
19
|
+
type: advisory-context
|
|
20
|
+
status: active
|
|
21
|
+
feature: <slug>
|
|
22
|
+
Original Author: <human or agent>
|
|
23
|
+
Creation Date: <ISO 8601 UTC>
|
|
24
|
+
Creating Model: <model/lane>
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Advisory Context — <Feature Name>
|
|
28
|
+
|
|
29
|
+
**Companion to `<path to the plan>`.** The plan says *what to build*. This says *why it is shaped that
|
|
30
|
+
way, what was measured, and what has already been disproved* — the things a reader of the plan alone
|
|
31
|
+
would re-litigate.
|
|
32
|
+
|
|
33
|
+
**Who this is for:** the **Advisory Hub** — the long-lived session that validates each implementation
|
|
34
|
+
phase. If the Hub session dies or compacts, a new one is reconstituted from: this file → the plan → the
|
|
35
|
+
project's own rules file (`AGENTS.md`). Nothing else is required.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 1. The Hub's job, and its one rule
|
|
40
|
+
|
|
41
|
+
Implementation sessions run phases and report. The Hub **validates**.
|
|
42
|
+
|
|
43
|
+
> **THE RULE: re-derive, do not trust.** A phase report is a self-assessment; accepting it at face value
|
|
44
|
+
> makes the Hub a rubber stamp.
|
|
45
|
+
|
|
46
|
+
The Hub's verdict is one of:
|
|
47
|
+
- **ACCEPT** — re-derived numbers match; gates genuinely ran; move to the next phase.
|
|
48
|
+
- **ACCEPT WITH CORRECTION** — work is sound but something is wrong or missing; the Hub states the exact
|
|
49
|
+
fix and it lands before the next phase.
|
|
50
|
+
- **REJECT** — a gate was skipped, a number does not reproduce, or a locked decision was violated. The
|
|
51
|
+
phase is redone.
|
|
52
|
+
|
|
53
|
+
The Hub also protects the plan from drift (§6 below) — a deviation from a locked decision (§4) is a
|
|
54
|
+
*Hub* decision, never the implementer's.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 2. Baseline state as of <date>
|
|
59
|
+
|
|
60
|
+
The state every validation starts from — anything that changed out-of-band, before Phase 0/1 ran, that a
|
|
61
|
+
fresh Hub needs to know about (environment changes, migrations already applied, services restarted).
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 3. The measured facts (re-derivable — do not accept a contradiction without re-measuring)
|
|
66
|
+
|
|
67
|
+
### 3a. RE-DERIVATION ACCESS
|
|
68
|
+
|
|
69
|
+
The literal, copy-pasteable command (or script, query, API call, test invocation) that reproduces this
|
|
70
|
+
plan's anchor numbers from this repo, and roughly how long it takes. **The Hub's one rule is unaffordable
|
|
71
|
+
without this** — if reproducing a number takes twenty minutes of setup, the Hub will quietly stop doing
|
|
72
|
+
it. Include every environment prerequisite; nothing here should require reconstruction.
|
|
73
|
+
|
|
74
|
+
### 3b. The anchor numbers
|
|
75
|
+
|
|
76
|
+
| Fact | Value |
|
|
77
|
+
|---|---|
|
|
78
|
+
| <the numbers the plan's claims will be checked against> | |
|
|
79
|
+
|
|
80
|
+
### 3c. The findings that shaped the plan most
|
|
81
|
+
|
|
82
|
+
<the 1-3 measured findings that most determined the plan's shape, and why no simpler approach works>
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 4. Locked decisions — an implementer may not change these unilaterally
|
|
87
|
+
|
|
88
|
+
| # | Decision | The reason that is NOT obvious from the plan |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| D1 | | |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 5. Project safety conventions this Hub enforces
|
|
95
|
+
|
|
96
|
+
If this project's rules file (`AGENTS.md`/`CLAUDE.md`) or its docs declare standing correctness
|
|
97
|
+
conventions that a phase could silently violate, list them here with an id, a one-line statement, and
|
|
98
|
+
**the check that proves compliance**. The phase report carries a slot per rule; the Hub re-checks each.
|
|
99
|
+
**If this project declares none, write `NONE DECLARED`** — both the report section and the Hub's
|
|
100
|
+
re-check become `N/A`, and this costs nothing.
|
|
101
|
+
|
|
102
|
+
| Rule id | What it requires | The check that proves it | Scope (docs only, or `src/` too) |
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
|
|
105
|
+
*Worked example — a project that computes rates or percentages typically declares something like: every
|
|
106
|
+
rate-bearing field must name its population, must carry its coverage denominator, and must have a
|
|
107
|
+
nested-subset test that would actually fail if the denominator drifted. Other common shapes: a
|
|
108
|
+
date-window boundary convention; a required migration-reversibility check; a mandatory secret-scan on any
|
|
109
|
+
config change.* This section exists because the Hub's core distrust — re-derive, don't trust — applies to
|
|
110
|
+
process as much as to arithmetic; where a project has already codified that distrust as a rule, the Hub
|
|
111
|
+
enforces it every phase rather than hoping the implementer remembered.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 6. Already disproved — do not re-raise
|
|
116
|
+
|
|
117
|
+
| Claim | Status |
|
|
118
|
+
|---|---|
|
|
119
|
+
| <a claim two reviewers independently raised, that a live check settled as false> | **FALSE** — <the evidence> |
|
|
120
|
+
|
|
121
|
+
A Hub without this memory reopens the same false blocker every phase a new reviewer raises it.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 7. The phase report contract
|
|
126
|
+
|
|
127
|
+
Canonical definition: the `advisory-hub` skill's §B. This project's local additions (if any) and the
|
|
128
|
+
specific failures that earned them:
|
|
129
|
+
|
|
130
|
+
<none yet, or list them here as they're discovered>
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 8. Standing gotchas that bite every phase
|
|
135
|
+
|
|
136
|
+
<durable, non-obvious rules a fresh implementing session needs and would not discover from the code>
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 9. Hub techniques that actually caught something here
|
|
141
|
+
|
|
142
|
+
<which of §E's techniques (mutation testing, re-running cross-review, reading the copy) found a real
|
|
143
|
+
problem on this plan, and what it found>
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 10. Environment facts a fresh Hub will not otherwise know
|
|
148
|
+
|
|
149
|
+
| Fact | Why it matters |
|
|
150
|
+
|---|---|
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 11. Gotchas discovered while implementing (not in the plan)
|
|
155
|
+
|
|
156
|
+
<implementation-time surprises worth a durable rule, even though the plan didn't anticipate them>
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 12. Hub self-handoff — the mechanical audit is mandatory, not optional
|
|
161
|
+
|
|
162
|
+
This file exists so a fresh Hub session can take over without the conversation. That only works if it
|
|
163
|
+
stays current — and the outgoing Hub's instinct is always "yes, this is ready," because it's judging
|
|
164
|
+
against its own memory of the session, not against this document. **That instinct is wrong by default.**
|
|
165
|
+
Run the audit in §G before every handoff; do not skip it because the file "looks current."
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Changelog
|
|
170
|
+
- **<date>** — created.
|
|
171
|
+
````
|
|
172
|
+
|
|
173
|
+
**Why this file, not the plan:** a fresh session has the plan but not the *why* — and will re-litigate
|
|
174
|
+
settled questions. §4's *reason* column is the load-bearing part; the decision alone invites a second
|
|
175
|
+
reviewer to reopen it. §6 exists because on the reference implementation of this pattern, two independent
|
|
176
|
+
cross-review models both raised the same blocker — only a live probe closed it, and a Hub without that
|
|
177
|
+
memory would have reopened it every subsequent phase. §3a is kept separate from §3b because the numbers
|
|
178
|
+
are worthless if a future Hub can't cheaply reproduce them.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Succession — the Hub is a role, not a conversation
|
|
183
|
+
|
|
184
|
+
| Hub | Covered | Ended because |
|
|
185
|
+
|---|---|---|
|
|
186
|
+
| 1 | <phases> | <context / milestone / handover> |
|
|
187
|
+
|
|
188
|
+
## Carried open — APPEND AND CLOSE, never rewrite
|
|
189
|
+
|
|
190
|
+
Every item keeps a stable id and is **never deleted**. Closing one requires saying who closed it and
|
|
191
|
+
why — a line, not a deletion. That makes a disappearance impossible: an item either carries a close
|
|
192
|
+
reason or is still open, and both are visible. It also lets a later Hub see something was closed
|
|
193
|
+
*wrongly*, which a deletion hides forever.
|
|
194
|
+
|
|
195
|
+
`/caddis:spawn-hub` runs a **conservation check** against this table at every handover: an id present
|
|
196
|
+
in the predecessor's ledger and absent here fails the spawn.
|
|
197
|
+
|
|
198
|
+
| id | raised by | item | status |
|
|
199
|
+
|---|---|---|---|
|
|
200
|
+
| C1 | Hub 1 | <enough detail to act on without archaeology> | open |
|
|
201
|
+
| C2 | Hub 1 | <…> | **closed by Hub 3** — <why> |
|
|
202
|
+
|
|
203
|
+
A verdict may *raise* an item, but it is not raised until it has an id here, in the same commit.
|
|
204
|
+
Closed rows compress to one line; they leave for the changelog only when the plan ships.
|
|
205
|
+
|
|
206
|
+
## Lane trust — what each execution lane has actually earned
|
|
207
|
+
|
|
208
|
+
Phase reports carry `MODEL/LANE` so the Hub can judge whether a lane is trustworthy for later phases.
|
|
209
|
+
Nothing accumulated that judgement, so each Hub re-formed it from scratch or lost it.
|
|
210
|
+
|
|
211
|
+
| lane | phases run | notable |
|
|
212
|
+
|---|---|---|
|
|
213
|
+
| claude | | |
|
|
214
|
+
| glm-headless | | |
|