@caddis/cli 0.4.52 → 0.4.53

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.
Files changed (100) hide show
  1. package/bundles/antigravity-plugin/CADDIS-GLOSSARY.md +1 -0
  2. package/bundles/antigravity-plugin/plugin.json +1 -1
  3. package/bundles/antigravity-plugin/repo_freshness.py +132 -5
  4. package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +223 -0
  5. package/bundles/antigravity-plugin/scripts/caddis_docs_pr.py +284 -0
  6. package/bundles/antigravity-plugin/scripts/caddis_exit.py +2 -0
  7. package/bundles/antigravity-plugin/scripts/caddis_frontmatter.py +1 -0
  8. package/bundles/antigravity-plugin/scripts/caddis_gate.py +226 -195
  9. package/bundles/antigravity-plugin/scripts/caddis_glossary.py +3 -3
  10. package/bundles/antigravity-plugin/scripts/caddis_governor.py +48 -4
  11. package/bundles/antigravity-plugin/scripts/caddis_inventory.py +38 -0
  12. package/bundles/antigravity-plugin/scripts/caddis_lanes.py +294 -127
  13. package/bundles/antigravity-plugin/scripts/caddis_lineage_publish.py +458 -0
  14. package/bundles/antigravity-plugin/scripts/caddis_merge_chain.py +237 -0
  15. package/bundles/antigravity-plugin/scripts/caddis_notify.py +121 -0
  16. package/bundles/antigravity-plugin/scripts/caddis_prod_check.py +380 -0
  17. package/bundles/antigravity-plugin/scripts/caddis_redact.py +99 -0
  18. package/bundles/antigravity-plugin/scripts/caddis_relay_git.py +2 -2
  19. package/bundles/antigravity-plugin/scripts/caddis_review.py +1309 -0
  20. package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +2056 -0
  21. package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +2572 -0
  22. package/bundles/antigravity-plugin/scripts/caddis_routing.py +3 -2
  23. package/bundles/antigravity-plugin/scripts/caddis_rows.py +476 -0
  24. package/bundles/antigravity-plugin/scripts/caddis_spawn.py +8 -9
  25. package/bundles/antigravity-plugin/scripts/caddis_spend.py +415 -0
  26. package/bundles/antigravity-plugin/scripts/caddis_tidy.py +357 -20
  27. package/bundles/antigravity-plugin/scripts/caddis_todo.py +55 -0
  28. package/bundles/antigravity-plugin/scripts/caddis_workstreams.py +178 -19
  29. package/bundles/antigravity-plugin/scripts/caddis_worktree_close.py +349 -0
  30. package/bundles/antigravity-plugin/scripts/check_doc_coverage.py +0 -56
  31. package/bundles/antigravity-plugin/scripts/claudster_doctor.py +1 -1
  32. package/bundles/antigravity-plugin/scripts/enforcement_inventory.py +0 -1
  33. package/bundles/antigravity-plugin/scripts/oss_review.py +2 -2
  34. package/bundles/antigravity-plugin/scripts/roadmap-recheck.ps1 +89 -0
  35. package/bundles/antigravity-plugin/scripts/roadmap-run.ps1 +88 -0
  36. package/bundles/antigravity-plugin/scripts/setup_project_ai.py +43 -1
  37. package/bundles/antigravity-plugin/session_end_agy.py +3 -3
  38. package/bundles/antigravity-plugin/skills/_registry.md +2 -6
  39. package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +1 -1
  40. package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +1 -1
  41. package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +1 -1
  42. package/bundles/antigravity-plugin/skills/catchup/SKILL.md +7 -0
  43. package/bundles/antigravity-plugin/skills/cloud-phases/SKILL.md +1 -1
  44. package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +5 -2
  45. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +29 -83
  46. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +77 -48
  47. package/bundles/antigravity-plugin/skills/implement/SKILL.md +87 -147
  48. package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +1 -1
  49. package/bundles/antigravity-plugin/skills/mmr/SKILL.md +5 -2
  50. package/bundles/antigravity-plugin/skills/office-documents-official/SKILL.md +24 -0
  51. package/bundles/antigravity-plugin/skills/park/SKILL.md +0 -1
  52. package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +8 -14
  53. package/bundles/antigravity-plugin/skills/prd/SKILL.md +2 -10
  54. package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +259 -0
  55. package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +77 -0
  56. package/bundles/antigravity-plugin/skills/roadmap/assets/render-check.template.mjs +68 -0
  57. package/bundles/antigravity-plugin/skills/roadmap/assets/review-protocol.md +78 -0
  58. package/bundles/antigravity-plugin/skills/roadmap/assets/roadmap.template.md +32 -0
  59. package/bundles/antigravity-plugin/skills/roadmap/assets/value-check.template.py +161 -0
  60. package/bundles/antigravity-plugin/skills/ship/SKILL.md +14 -14
  61. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +6 -0
  62. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +33 -14
  63. package/bundles/antigravity-plugin/skills/spawn-session/SKILL.md +4 -8
  64. package/bundles/antigravity-plugin/warm_start_agy.py +1 -3
  65. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  66. package/bundles/antigravity-plugin-extras/skills/_registry.md +1 -2
  67. package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +5 -5
  68. package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +5 -2
  69. package/bundles/antigravity-plugin-extras/skills/runner-move/SKILL.md +214 -0
  70. package/bundles/codex/.codex/skills/docs/office-documents-official/SKILL.md +24 -0
  71. package/bundles/codex/.codex/skills/workflow/best-practices/agents/best-practices-referencer.md +1 -1
  72. package/bundles/codex/.codex/skills/workflow/best-practices/agents/codebase-context-builder.md +1 -1
  73. package/bundles/codex/.codex/skills/workflow/best-practices/agents/task-intent-analyzer.md +1 -1
  74. package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +259 -0
  75. package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +77 -0
  76. package/bundles/codex/.codex/skills/workflow/roadmap/assets/render-check.template.mjs +68 -0
  77. package/bundles/codex/.codex/skills/workflow/roadmap/assets/review-protocol.md +78 -0
  78. package/bundles/codex/.codex/skills/workflow/roadmap/assets/roadmap.template.md +32 -0
  79. package/bundles/codex/.codex/skills/workflow/roadmap/assets/value-check.template.py +161 -0
  80. package/bundles/codex/AGENTS.md +5 -4
  81. package/bundles/manifest.json +3 -3
  82. package/package.json +1 -1
  83. package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +0 -233
  84. package/bundles/antigravity-plugin/skills/advisory-hub/reference/context-template.md +0 -214
  85. package/bundles/antigravity-plugin/skills/advisory-hub/reference/hub-handbook.md +0 -233
  86. package/bundles/antigravity-plugin/skills/advisory-hub/reference/report-contract.md +0 -94
  87. package/bundles/antigravity-plugin/skills/advisory-hub/reference/succession.md +0 -118
  88. package/bundles/antigravity-plugin/skills/resume/SKILL.md +0 -6
  89. package/bundles/antigravity-plugin/skills/review/SKILL.md +0 -6
  90. package/bundles/antigravity-plugin/skills/spawn-hub/SKILL.md +0 -341
  91. package/bundles/antigravity-plugin/skills/statusline/SKILL.md +0 -6
  92. package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +0 -143
  93. package/bundles/antigravity-plugin-extras/skills/data-lineage/SKILL.md +0 -158
  94. package/bundles/antigravity-plugin-extras/skills/data-lineage/scripts/convert_doc_to_confluence.py +0 -1430
  95. package/bundles/antigravity-plugin-extras/skills/golden-plan/SKILL.md +0 -586
  96. package/bundles/codex/.codex/skills/workflow/advisory-hub/SKILL.md +0 -233
  97. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/context-template.md +0 -214
  98. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/hub-handbook.md +0 -233
  99. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/report-contract.md +0 -94
  100. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/succession.md +0 -118
@@ -1,233 +0,0 @@
1
- # Advisory Hub — how the Hub actually validates — verdict template, checklist, techniques, plan drift
2
-
3
- > **Loaded by:** `/caddis:validate-phase` Step 2
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
- ## §C — the Hub verdict
13
-
14
- ```
15
- === HUB VERDICT — PHASE <n> ===
16
- REPORT: .caddis/advisory-hub-reports/phase-NN.report.md
17
- VALIDATED BY: <hub session model/lane> on <ISO 8601 UTC>
18
- VERDICT: ACCEPT | ACCEPT-WITH-CORRECTION | REJECT
19
-
20
- --- RE-DERIVATION (what the HUB ran itself, not what the report said) ---
21
- CLAIM: <…>
22
- HUB RAN: <the literal command the Hub executed>
23
- HUB GOT: <…>
24
- AGREES: YES | NO | UNVERIFIABLE — <why> (repeat per claim)
25
-
26
- --- GATES RE-RUN ---
27
- $ <command>
28
- <output>
29
- RESULT: PASS | FAIL | NOT RE-RUN — <why>
30
-
31
- --- COMMITS AUDITED ---
32
- $ git show --stat <sha>
33
- MATCHES THE PHASE'S CLAIMED TOUCHES: YES | NO — <what was unexpected>
34
-
35
- --- SAFETY-RULE RE-CHECK ---
36
- <per rule in advisory-context §5, or N/A — none declared>
37
-
38
- --- DEVIATIONS ADJUDICATED ---
39
- <deviation> → touches locked decision <#>? YES | NO
40
- → Hub ruling: allowed | reverted | plan amended — <reason>
41
-
42
- --- PLAN CORRECTIONS LANDED ---
43
- <what was edited in the plan file itself, section by section — or NONE>
44
-
45
- --- CORRECTIONS REQUIRED BEFORE THE NEXT PHASE ---
46
- 1. <exact fix, not a direction>
47
-
48
- --- WHAT IS NOW STRUCTURAL --- (MANDATORY — a verdict without this is incomplete)
49
- | Correction | Where it now lives (file + section) | The failure that earned it |
50
- |---|---|---|
51
-
52
- NEXT PHASE MAY START: YES | NO
53
- === END VERDICT ===
54
- ```
55
-
56
- **Where does a correction live so it cannot recur?**
57
- - **Telling the implementing session** — worthless. That session ends and the lesson dies with it.
58
- - **Putting it in the next phase's prompt** — barely better. It works once, and the Hub must remember to
59
- repeat it every phase. It won't, eventually.
60
- - **Putting it in the durable artifact** (`advisory-context.md`) — correct. It binds every future phase
61
- whether or not anyone remembers it, and it carries the failure that earned it so a later reader knows
62
- why it exists rather than deleting it as noise.
63
-
64
- **A verdict that does not end in "what is now structural" is half a verdict.** And **the Hub is not
65
- exempt from its own contract**: if a correction traces back to advice the Hub itself gave earlier, the
66
- verdict says so plainly rather than attributing it to the implementer.
67
-
68
- ---
69
-
70
- ## §D — Hub validation checklist
71
-
72
- 1. **Re-derive every VALUE CHECK.** Run the re-derivation yourself. Do not read the reported result.
73
- 2. **Re-run the exit gates**, at minimum the fast ones (unit tests, lint, type-check). Reported output can
74
- be stale even when it was honestly captured.
75
- **And re-run them in a DIFFERENT ENVIRONMENT from the implementer's** — see §E's
76
- "re-running a gate identically is not independent verification". Re-running the same way
77
- reproduces the blind spot instead of testing it. This is the sharpest known limit on the
78
- Hub's one rule, and it cost a failed production deploy to learn.
79
- 3. **`git log` / `git show --stat` the commits** — do the changes match the phase's claimed touches?
80
- Anything unexpected, especially tooling/config/CI files that never appeared in DEVIATIONS?
81
- 4. **Re-check every rule in advisory-context §5** — or record `N/A — none declared`.
82
- 5. **Any deviation** → is it a §4 locked decision? If so it is the Hub's call, not the implementer's.
83
- 6. **Any surprise** → does the plan's `## Current state` need correcting? Correct it **now, in the plan
84
- file** (§F).
85
- 7. **Deployed-environment smoke test at milestone boundaries** — against the environment the change
86
- actually ships to, not dev. Skip cleanly when the project has no deployed environment.
87
-
88
- ---
89
-
90
- ## §E — Hub techniques that actually catch things
91
-
92
- ### Re-running a gate *identically* is not independent verification
93
-
94
- The Hub's rule is "re-derive, don't trust". Its sharpest limit: **re-deriving the same way
95
- reproduces the implementer's blind spot instead of testing it.**
96
-
97
- Worked example. A Hub accepted a milestone partly on *"gates genuinely ran — I re-ran the test
98
- suite myself, 310 passed."* The very next deploy failed on that same suite. A dependency-injected
99
- service built a database client **before request validation ran**, so an invalid query parameter
100
- returned 500 instead of 422 — but *only on the CI runner*, because the local env file is
101
- gitignored and every developer machine supplied it. Implementer green. Hub green. CI red.
102
-
103
- > **The rule:** for any phase touching config, a data-store seam, or a dependency-injection
104
- > boundary, re-run the gate under the *deprived* environment, not just again.
105
- > `mv <env file> aside && <test command> && mv back` is a one-step runner reproduction.
106
-
107
- Two corollaries, both earned:
108
- - **A regression test for this class must not depend on ambient environment.** The test that broke
109
- CI was structurally incapable of catching its own bug locally. Its replacement monkeypatches the
110
- dependency to raise, so it bites everywhere.
111
- - **Construct nothing expensive in a dependency provider or a service `__init__`.** A validation
112
- error must never need a database.
113
-
114
- ### Mutate the phase's riskiest DECISION, not just its named tests
115
-
116
- A phase ran three mutations; one — swapping two deliberately-different windows for each other —
117
- **broke nothing**, because every fixture was single-day so the two windows coincided. The suite
118
- looked thorough and had a hole exactly where the phase's most consequential choice lived.
119
-
120
- > When a phase's headline claim is *"these two things are deliberately different"*, mutate them
121
- > into being the same and check that something fails.
122
-
123
- ### Mutate the GUARDRAIL, with evasion variants — not just the obvious violation
124
-
125
- A security phase shipped a guard asserting a visibility-only permission could never become a real
126
- gate. The Hub mutated it three ways:
127
-
128
- | Variant | Caught? |
129
- |---|---|
130
- | `require("nav.x")` — the obvious one | yes |
131
- | `require(SOME_CONST)` — indirection | yes, by a *different* test |
132
- | `require("""nav.x""")` — **triple-quoted** | **no — full evasion** |
133
-
134
- The third planted a live gate on an all-roles key and the entire suite plus both lint gates stayed
135
- green. Root cause: the guard was a regex plus a substring scan, kept "two ways on purpose" — but
136
- **both read the source as text, so they shared a blind spot rather than covering for each other.**
137
-
138
- > **Two checks that can be fooled by the same trick are one check.** Parse the language, don't
139
- > pattern-match its surface syntax — the parser hands back the *resolved* value, so every quoting
140
- > style, including ones nobody has thought of, collapses into a single comparison.
141
-
142
- Test a guardrail the way an adversary would, not the way its author imagined. On a phase whose
143
- whole risk is "a gate that looks real and isn't", the guard against fake gates being itself fake is
144
- the failure that matters most.
145
-
146
- ### A test asserting the OUTCOME does not pin the INVARIANT
147
-
148
- Same phase. A documented invariant read *"break-glass admin resolves **before any database
149
- lookup**"*. Two tests covered it — and both created the tables first, then asserted the returned
150
- value. Moving the short-circuit *below* the query left every test green while destroying the
151
- invariant outright.
152
-
153
- > If the invariant is *"X happens without Y"*, the test must **withhold Y**. Asserting the result
154
- > in a world where Y is present proves only that the result is reachable, not that it is
155
- > independent. Here the fix was one test that never creates the tables — the omission *is* the test.
156
-
157
- ### A render/build check proves it mounted, not that it is right
158
-
159
- A headless render returned `OK, 0 console errors` for a bar chart drawn upside down. Read the
160
- screenshot, not the exit code.
161
-
162
- ### Mutation testing — the highest-value check the Hub does
163
-
164
- **A test that passes but would not fail on the bug is worthless.** Reading a test tells you almost
165
- nothing; breaking the code and watching the test fail tells you everything.
166
-
167
- ```
168
- 1. Back up the file the test claims to prove something about.
169
- 2. Remove exactly the behaviour under test — the smallest possible break
170
- (delete the branch, drop the argument, invert the condition).
171
- 3. Run the project's test command for that test file. IT MUST FAIL.
172
- 4. Restore the file.
173
- 5. Re-run. IT MUST PASS AGAIN.
174
- ```
175
-
176
- Do this for **every** phase that adds a test claiming to prove a behaviour. It takes about a minute, and
177
- it is the difference between "6 passed" and "6 tests that mean something." **Always restore and re-run —
178
- never leave a mutation in the tree.** The specific trap worth naming: dropping an argument that has a
179
- default silently changes behaviour *without erroring* — exactly what a mutation test catches and a code
180
- read does not.
181
-
182
- ### A reproduction harness can DOWNGRADE a finding — build it anyway
183
-
184
- A filed finding (GLM executing an injected relay's leftover task before its own prompt) had three
185
- live observations behind it on one docket, and read as confirmed. Building the harness the note itself
186
- demanded — replay the real hook's captured stdout into a clean arena via a `--settings` SessionStart
187
- hook, so the installed plugin can't contaminate the arm — ran it **six** times, three as baselines
188
- matched to the reported conditions. **Not one reproduced.** The finding was downgraded to "not
189
- established," not closed: the fixes were kept anyway (cheap, and one is structural), but the writeup
190
- now says so plainly instead of letting three anecdotes read as a measurement.
191
-
192
- > **Three observations on one project is a pattern, not a measurement.** A harness that fails to
193
- > reproduce is not a wasted harness — it is the finding doing its job. Build the falsifiable test even
194
- > when the finding already feels certain; "confirmed by re-reading the report" and "confirmed by trying
195
- > to break it and failing" are different claims, and only the second is durable.
196
-
197
- **The reusable A/B method, for testing a hook whose fix is already installed:** capture the real hook's
198
- actual stdout (pre-fix and post-fix, run for real against a repo holding the test condition), then
199
- replay each capture into a **clean arena** via a `--settings` SessionStart hook. Keep the arena's own
200
- plugin relay-free, so the only relay text in play is the one under test — otherwise the installed
201
- (possibly still-unpatched) plugin injects its own and contaminates the result. Each arena is its own
202
- git repo, so the evidence is files and commits, not a transcript read.
203
-
204
- ### Re-run the cross-review yourself
205
-
206
- A report's own internal contradiction (CLEAN in one section, "pending" in another) is settled in one
207
- command by just running it directly. **If a cross-review provider times out, try the other configured
208
- provider before recording "inconclusive."** A single provider's outage is not grounds for skipping
209
- independent review — on the reference run, the second provider found the real bug the first had missed.
210
-
211
- ### Read the copy, don't trust "verbatim copy"
212
-
213
- When a phase claims to have copied a function/config/pattern verbatim, read it line by line against the
214
- original. The easiest thing to drop silently is an argument with a default — dropping it changes
215
- behaviour without erroring.
216
-
217
- ### Check the report against itself
218
-
219
- Read the report once as a *document* before validating a single claim. Internal contradictions — a
220
- verdict field disagreeing with a details field, a model name that doesn't match the claimed lane — have
221
- found real problems as often as checking the code has.
222
-
223
- ---
224
-
225
- ## §F — Plan drift is the Hub's job
226
-
227
- Nothing else in caddis owns *"the plan turned out to be wrong, correct it mid-flight."* The Hub is the
228
- natural owner, and it is the step most likely to be skipped. Any SURPRISE that contradicts the plan's own
229
- `## Current state` gets corrected **in the plan file, now** — not noted in the verdict for later, not
230
- left for the next reader to reconcile.
231
-
232
- ---
233
-
@@ -1,94 +0,0 @@
1
- # Advisory Hub — the phase report contract — what an implementing session must file, verbatim
2
-
3
- > **Loaded by:** `/caddis:implement`, in Advisory-Hub mode, at report-filing time
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
- ## §B — the phase report contract
13
-
14
- Every implementation phase, in Advisory-Hub mode, ends by writing this block **to a file**
15
- (`.caddis/advisory-hub-reports/phase-NN.report.md` — §H), never just to chat. **A report without re-derivable
16
- evidence is not a report.**
17
-
18
- ```
19
- === PHASE REPORT FOR ADVISORY HUB ===
20
- PLAN: <path to the plan file>
21
- ADVISORY CTX: <path to <slug>-advisory-context.md>
22
- PHASE: <n> — <title>
23
- MILESTONE: <M<n>, or N/A>
24
- MODEL/LANE: <tier> / <lane> (the model you ACTUALLY ran on)
25
- DATE: <ISO 8601 UTC>
26
- STATUS: COMPLETE | BLOCKED | PARTIAL
27
-
28
- --- COMMITS ---
29
- <sha> <subject> (one line per commit — including tooling,
30
- config, and non-source files)
31
- FILES CHANGED: <n> (+<added>/-<removed>)
32
-
33
- --- EXIT GATE: verbatim command + verbatim output ---
34
- $ <the literal command the plan names>
35
- <paste the real terminal output — do not summarise, retype, or tidy it>
36
- RESULT: PASS | FAIL (repeat this triple per gate)
37
-
38
- --- VALUE CHECK ---
39
- CLAIM: <the number or behaviour this phase asserts>
40
- RE-DERIVED BY: <the exact independent query/command/script — copy-pasteable,
41
- not a description of one>
42
- RE-DERIVATION RETURNED: <what it actually returned>
43
- MATCH: YES | NO
44
-
45
- --- PROJECT SAFETY RULES ---
46
- RULES IN SCOPE: <rule ids from advisory-context §5, or NONE DECLARED>
47
- RULE <id>: APPLIES THIS PHASE: YES | NO — <why>
48
- EVIDENCE: <the check that was run + its output, or N/A>
49
- RESULT: PASS | FAIL | N/A (repeat per rule)
50
-
51
- --- CROSS-REVIEW ---
52
- PROVIDER: <deepseek | glm | …> VERDICT: CLEAN | ISSUES | NOT RUN (+ why)
53
- ISSUES ADDRESSED: <list, or NONE>
54
-
55
- --- DEVIATIONS FROM PLAN ---
56
- <each deviation + why, or NONE>
57
-
58
- --- SURPRISES / CONTRADICTIONS ---
59
- <anything the real data or code contradicted in the plan's `## Current state`, or NONE>
60
- <<< STOP CONDITION: if this section is non-empty, STOP after this phase.
61
- The Hub owns the plan correction — you do not. >>>
62
-
63
- --- NOT DONE ---
64
- <anything in the phase left undone + why, or NONE>
65
-
66
- --- NEXT PHASE READY: YES | NO ---
67
- === END REPORT ===
68
- ```
69
-
70
- ### Non-negotiables for the report itself — each earned by a real failure
71
-
72
- - **Verbatim means verbatim.** A phase once filed a fabricated framework stack-trace line — one that
73
- wasn't even valid syntax in that language — in the one section whose entire value is being trustworthy.
74
- Once output is reconstructed, the Hub has to re-run everything, which defeats the section's whole
75
- point. If output genuinely cannot be captured, **say so** — that is fine. Inventing it is not.
76
- - **Reconcile the report against itself before filing.** One report's CROSS-REVIEW said `CLEAN` while its
77
- DEVIATIONS said "verdict pending" — both cannot be true. Read your own report once as a document before
78
- submitting it.
79
- - **Report the model/lane you actually ran on.** One report named a first-party model for a session
80
- actually running on a third-party lane. The Hub uses this field to judge whether a lane is trustworthy
81
- for later phases; get it wrong here and the whole lane experiment is uninterpretable.
82
- - **Report every commit**, including tooling, config, CI, and non-source files. A phase once shipped a
83
- deploy-pipeline change that never appeared in its own DEVIATIONS section.
84
- - **Never edit the plan to make your own gate pass.** Run it, report the failure and why, and let the Hub
85
- fix the plan.
86
- - **A re-derivation crib's numbers must match the final committed diff, not an earlier point in
87
- implementation.** One crib was true when written against a 6-test file, then stale by filing time
88
- because a late fix added 2 more tests — the same mutation against the final 8-test file gave a
89
- different result. The crib wasn't fabricated or self-contradictory (none of the other five rules would
90
- have caught it) — it was just stale. **If a late change touches what a crib measured, re-run the crib's
91
- own commands before filing.**
92
-
93
- ---
94
-
@@ -1,118 +0,0 @@
1
- # Advisory Hub — handing the role over — the mechanical audit, the self-check trap, the carried-open ledger
2
-
3
- > **Loaded by:** `/caddis:spawn-hub` · `/caddis:handoff` Step 2b
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
- ## §G — The mechanical handoff audit
13
-
14
- **A context doc is written BEFORE the work happens, so it is ALWAYS stale by the time it is needed.** The
15
- outgoing Hub's honest first instinct, asked "can we hand off," is always *"yes, the context doc is
16
- designed for exactly this"* — and that instinct has been measured and found wrong: a real audit found
17
- seven gaps in a context file the outgoing Hub believed was current, including the single highest-value
18
- technique the Hub had developed by then.
19
-
20
- **Do not ask "are there gaps?" Assume there are, and find them mechanically:**
21
-
22
- 1. **List every technique, decision, and correction you actually used this session** — from your own
23
- actions in this transcript, not from re-reading the context doc. Candidates: did you re-run something
24
- with a second provider after a timeout? mutation-test a seam? apply a fix instead of only flagging it?
25
- adjudicate a deviation against a locked decision? correct the plan? fix an index/README in passing?
26
- 2. **For each, check whether the context doc's *instruction itself* already covers it** — not whether the
27
- word merely appears somewhere. Would a fresh Hub, reading only that file, be told to do the same
28
- thing?
29
- 3. **The caveat that will burn you:** a literal-string grep over prose produces **false MISSINGs**. A
30
- `0 matches` result means "this exact string isn't here," **not** "this isn't covered" — real content is
31
- often phrased differently than the search term. **Read the section before trusting a grep's absence.**
32
- Search by concept, read the surrounding paragraph, don't stop at the first non-match.
33
- 4. **Land every real gap as a durable rule** in the right section of the advisory-context, carrying the
34
- specific failure that earned it. A note left "for later" is not a fix.
35
-
36
- `/caddis:handoff` runs this audit as its Step 2b, whenever the active plan has a companion
37
- `advisory-context.md` — see that command for the wiring.
38
-
39
- ---
40
-
41
- ## §I — Hub succession: the Hub is a ROLE, not a conversation
42
-
43
- A long plan outlives any one session. The Hub runs as a **numbered series**, each handing to the
44
- next through *files* — never chat history. **Write this convention down at the start, not when
45
- someone asks.** On the reference project three Hubs had already run on hand-written prompts before
46
- anyone noticed there was no convention; it was written only when the user asked "what were the
47
- rules for spawning a new Hub?" and the answer was *there aren't any*.
48
-
49
- Keep a table in `advisory-context.md`:
50
-
51
- | Hub | Covered | Ended because |
52
- |---|---|---|
53
- | 1 | pre-Phase-0 setup | context |
54
- | 2 | Phases 0–1 | context |
55
- | 3 | Phases 2–6, two deploys | context |
56
- | 4 | Phases 7+ | — |
57
-
58
- ### What a new Hub does before validating anything
59
-
60
- 1. **Read, in order:** `advisory-context.md` (all of it) → the plan's milestones, execution protocol
61
- and tracker → the project's rate/measurement rules → the most recent 2–3 verdicts.
62
- 2. **Prove the context landed** by answering a self-check *before* touching a phase (§J).
63
- 3. **Verify the tree independently.** `git fetch`, then count divergence yourself — never trust a
64
- relay file's number. Also **`git status` and diff any dirty file before treating it as
65
- authority**: a plan's working copy was once found carrying an *uncommitted revert* that deleted
66
- the rules a Hub was about to read, behind a clean-looking `git log`. A committed rule is only as
67
- durable as the working copy the next session opens.
68
- 4. **Run the mechanical handoff audit (§G) early**, while context is still thick — not at the end.
69
-
70
- ### A Hub may amend its predecessor's verdict — that is the mechanism working
71
-
72
- Amend **in place, in the verdict file, with an attributed block**, so the record shows both the
73
- original judgement and why it moved. On the reference project a fresh Hub — working only from files,
74
- with no shared history — downgraded its predecessor's ACCEPT to ACCEPT-WITH-CORRECTION *and* caught
75
- a deploy-blocking bug that the implementer, two cross-review passes and the prior Hub had all
76
- missed. **That is the single strongest argument for this pattern.**
77
-
78
- ---
79
-
80
- ## §J — The context self-check, with a deliberate trap
81
-
82
- The handoff prompt must force an incoming Hub to *prove* the context landed. Ask it to:
83
-
84
- - **re-derive one anchor number live** (not quote it);
85
- - name the decisions that are **accepted but reversible**, and what would reverse them;
86
- - state where the next deploy gate is **and how it determined that**;
87
- - say what it must do before its own handoff;
88
- - name one thing a green automated check does **not** prove.
89
-
90
- **Include at least one question whose naive answer is wrong.** The reference project's is *"what is
91
- the funnel's `offered` count, and why is it NOT `SUM(OfferedInd)`?"* — the naive read gives 3,814,
92
- the correct one 4,783, because the raw flags do not nest. A Hub that only skimmed **fails visibly
93
- instead of silently**, which is the entire point.
94
-
95
- ### Four rules that make the self-check mean something
96
-
97
- Shared with `/caddis:spawn-session`, which transfers the WORK where this transfers the ROLE. Both
98
- run on `scripts/caddis_spawn.py`, so a fix lands in both.
99
-
100
- 1. **DERIVE the questions from what CHANGED. Do not choose them.** An agent picking its own exam
101
- picks what it remembers, which is the thing under test. Spread them: oldest settled decisions
102
- catch a successor that read only the recent sections; the newest changes catch one that read only
103
- the summary.
104
- 2. **A SUPERSEDED fact is the highest-signal question there is**, because the obvious answer is the
105
- stale one. The measured discriminator was *"which model serves chat?"* — the answer had changed
106
- **twice**, and naming only the most recent replacement proved the history had not been read.
107
- 3. **Every question must be answerable from a committed file**, verified with
108
- `caddis_spawn.py verify-question`, not assumed. A question whose answer is not written down tests
109
- memory — the thing this mechanism replaces.
110
- 4. **Store NO answer key. Re-derive at validation time.** A stored key freezes the outgoing agent's
111
- belief: if it was wrong, the key is wrong and the check certifies the error. Re-deriving validates
112
- the DOCUMENT as well as the reader — and validating only the reader is precisely what failed, when
113
- a Hub passed a thirteen-question check on a handover containing four factual errors.
114
-
115
- **Six questions maximum.** Past six the successor writes an essay and the outgoing agent skims it.
116
-
117
- ---
118
-