@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,341 +0,0 @@
1
- ---
2
- name: spawn-hub
3
- description: 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
4
- ---
5
-
6
- # /caddis:spawn-hub — hand the Hub role to a fresh session
7
-
8
- > **The Hub is a ROLE, not a conversation.** It outlives any one session and hands to the next through
9
- > **files** — never chat history. This command is the handoff. Until it existed, every Hub was spawned
10
- > by a hand-written prompt, which meant the pattern only worked for someone who already knew what to
11
- > put in one.
12
-
13
- **This command does not start the new session.** It leaves the outgoing Hub's context in a state a
14
- fresh one can pick up, then prints the prompt to paste. The human runs it.
15
-
16
- ---
17
-
18
- ## When to spawn — do not guess, and do not wait for the crash
19
-
20
- **The default seam is a MILESTONE BOUNDARY.** A milestone ends with a deploy, a smoke test and a
21
- handoff; that is already the plan's own `/handoff` → `/clear` point. Carrying a Hub across a deploy is
22
- where staleness bites — the outgoing Hub's picture of prod is exactly what just changed.
23
-
24
- **Spawn at the next milestone boundary if ANY of these is true:**
25
-
26
- - the current Hub has validated **≥5 phases**
27
- - it has executed **≥2 deploys**
28
- - it has done substantial work *outside* phase validation (fleet changes, tooling, plugin releases) —
29
- that consumes context far faster than validation does
30
- - **its own context is filling** — this one overrides the milestone seam entirely
31
-
32
- > **Observed, not theorised:** on the reference project, Hubs 1–4 each ended because context ran out,
33
- > never because a milestone did. A Hub covers roughly **4–6 phases / 1–2 milestones** before that
34
- > happens. So treat the milestone as the *planned* seam and context as the *real* constraint, and run
35
- > this command at whichever arrives first.
36
-
37
- **Do not wait until context is nearly gone.** Step 1 is a real audit that needs room to run, and the
38
- outgoing Hub is the only session that can do it. A handoff written from a nearly-full context is the
39
- one most likely to omit exactly what the next Hub needs.
40
-
41
- ---
42
-
43
- ## Step 0 — resolve the context file, and refuse cleanly when you cannot
44
-
45
- Use `$ARGUMENTS` if given. Otherwise look for `<plan-stem>-advisory-context.md` beside every plan in
46
- `.caddis/plans/`.
47
-
48
- - **None found → STOP and say so.** This project is not running an Advisory Hub, so there is no role to
49
- hand over. Do not scaffold one here: that decision belongs to `/caddis:feature-plan` Step 3b, at
50
- planning time, when the phase count and risk are actually known.
51
- - **More than one → ask which**, listing them with each plan's status. Never guess: handing over the
52
- wrong plan's Hub is worse than not handing over.
53
- - **Already handed over?** Check the succession table. If the last row has no end reason, this is a
54
- fresh handover. **If the last row is already closed and a new one opened, STOP** — a previous run
55
- completed and re-running would double-close it and re-open a duplicate. Re-running this command is
56
- safe only when the tree still shows the outgoing Hub as current.
57
-
58
- ## Step 1 — the mechanical audit (MANDATORY, and it is not a formality)
59
-
60
- **Do not ask yourself "are there gaps?" — assume there are, and find them mechanically.** The outgoing
61
- Hub's instinct is always *"yes, this is ready"*, because it is judging against its own memory of the
62
- session rather than against the document. **That instinct is wrong by default.** On the reference
63
- project the first answer to "can we hand off" was yes; a mechanical audit then found **seven gaps** —
64
- including that mutation testing, by then the single highest-value technique in use, was written down
65
- nowhere a fresh Hub would find it.
66
-
67
- 1. **List every technique, decision and correction actually used this session** — from your own
68
- actions, not from the context doc. Re-ran a cross-review with a second provider after a timeout?
69
- Mutation-tested a seam? Fixed something directly rather than only flagging it? Corrected a gate
70
- rather than the code? Each is a candidate line item.
71
- 2. **For each, check whether the advisory context already tells a fresh Hub to do the same thing.**
72
- Not "does the word appear" — whether *the instruction* is there.
73
- 3. **Land every real gap as a durable rule** in the advisory context — its *Standing gotchas*,
74
- *Hub techniques*, *Environment facts* or *Succession* section. **Cite sections BY NAME, never by
75
- number:** numbers drift between a project's hand-grown file and the shipped template, and this
76
- command previously named §7/§9/§13, which matched one project and no template.
77
- **A correction that lives only in a verdict file dies with the session that wrote it.**
78
- 4. **Audit in BOTH directions.** As well as what is missing, look for what is now **obsolete** — a
79
- gotcha since promoted to `AGENTS.md`, or one a committed test now enforces, compresses to a line
80
- and a pointer. The context doc is append-only by design and every incoming Hub must read it end to
81
- end; without a diet it becomes the thing it exists to prevent.
82
-
83
- > **The caveat that will burn you: a literal-string grep over prose throws false MISSINGs.** The same
84
- > audit that found seven real gaps also produced three false negatives — content that *was* present,
85
- > phrased differently. `0 matches` means "not this exact string", not "not covered". Search by concept
86
- > and read the surrounding paragraph.
87
-
88
- ## Step 2 — close the record
89
-
90
- - Every validated phase has a **verdict file**, and its `verdict:` frontmatter is one of
91
- `accept` / `accept-with-correction` / `reject`.
92
- - Every **ACCEPT-WITH-CORRECTION** either has its corrections landed, or they are in the carried-open
93
- list. An unlanded correction that nobody is tracking is the worst thing to hand over.
94
- - The plan's **Tracker rows** match reality. Check them; they get silently skipped, and on the
95
- reference project four completed rows were reverted to "not started" by a stray staged edit and only
96
- caught two milestones later.
97
- - `git status` is clean, or every uncommitted change is deliberate and named in the handoff.
98
-
99
- ## Step 3 — update the succession table
100
-
101
- In the advisory context's succession section: close the outgoing Hub's row (what it covered, why it
102
- ended) and open the next one.
103
-
104
- **Then update the carried-open list — APPEND AND CLOSE, never rewrite.**
105
-
106
- Each Hub used to *rewrite* this list, which means an open item can vanish between generations with
107
- nothing to show it ever existed. Nobody notices, because the only evidence was the list itself.
108
-
109
- So: every item gets a stable id and is **never deleted**.
110
-
111
- ```markdown
112
- - **[C7] Break-glass is DB-engine-dependent** — raised Hub 4. <what, and enough to act on>
113
- → **CLOSED by Hub 6**: fixed in `abc1234`, verified on prod.
114
- - **[C9] `files.py` sibling-prefix traversal** — raised Hub 4. <detail>
115
- → still open.
116
- ```
117
-
118
- Closing an item requires **saying who closed it and why** — a line, not a deletion. That makes a
119
- disappearance impossible: an item either carries a close reason or it is still open, and both are
120
- visible. It also lets a later Hub see that something was closed *wrongly*, which a deletion hides
121
- forever.
122
-
123
- **ARTIFACT CONSERVATION — the same check, for the files you wrote.** The ledger check above catches
124
- an id that *disappeared*. Nothing caught a file that *exists and is invisible*, which is the inverted
125
- failure and just as silent:
126
-
127
- ```bash
128
- python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" hub-artifacts --reports .caddis/advisory-hub-reports
129
- ```
130
-
131
- Exit 1 means you wrote a phase prompt the successor will never learn about. It will find no prompt,
132
- write a fresh one, and lose whatever reasoning yours carried — plausibly and completely. Name every
133
- prompt you authored in this spawn doc before handing over. (Degrades open: no handover yet, or no
134
- script, means proceed.)
135
-
136
- **CONSERVATION CHECK — mechanical, and it fails the spawn.** Every id in the predecessor's ledger
137
- must appear in the outgoing one as either still-open or closed-with-a-reason. An id that is simply
138
- absent is a silent loss: **stop and restore it before handing over.** Do not ask "did anything
139
- vanish?" — diff the ids. That is the same design move as the handoff audit, for the same reason.
140
-
141
- **One ledger, one home.** A verdict may *raise* an item, but it is not raised until it has an id in
142
- the context doc's ledger, in the same commit. Two uncoordinated lists drift, and the drift is
143
- invisible.
144
-
145
- Carry the whole list forward, closed items included. It is short, and its history is the cheapest
146
- audit trail this pattern has.
147
-
148
- ## Step 4 — generate the prompt
149
-
150
- **"From the files, not from memory" is an instruction you cannot follow by intending to. Run the
151
- generator:**
152
-
153
- ```
154
- python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" preflight
155
- python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_inventory.py" --with-tests
156
- ```
157
-
158
- `preflight` **refuses on a dirty tree**: the incoming Hub pulls, so uncommitted work is invisible to
159
- it. Commit first, or name every uncommitted file in the handover.
160
- (falls back to `scripts/caddis_inventory.py` in a source checkout; skip the step if absent — it
161
- degrades open like every other machine step here.)
162
-
163
- Paste its output into the prompt as a **Repository inventory** section, verbatim. It enumerates
164
- plans, PRDs, prompts, handoffs, KB notes, the parking-lot backlog, open comms, every script and its
165
- purpose, and any generated artefact committed before its generator last changed. `--with-tests`
166
- runs the suite instead of reporting a remembered number — one handover claimed 20 tests when there
167
- were 19, and the incoming Hub found the discrepancy before anyone else.
168
-
169
- **Why a generator and not care.** Nine corrective round trips were needed to bring one Hub to a
170
- usable state, and the user caught six of the nine: no reports listed, no documents, no KB notes, no
171
- scripts, planned work absent, and confusion over which of two prompts actually existed. Every one of
172
- those is a directory listing. They were missed because an outgoing agent recalls *what it did*
173
- rather than enumerating *what exists* — and the incoming Hub cannot know what it was not told.
174
-
175
- Then write the judgement half yourself. It must contain:
176
-
177
- 1. **The role and the one rule** — re-derive, do not trust; validate, do not implement.
178
- 2. **The read order**: advisory context (all of it, especially the succession section and the
179
- carried-open list) → the plan's milestones / execution protocol / tracker → the project's
180
- measurement rules → the most recent 2–3 verdicts.
181
- 3. **A context self-check the new Hub must answer BEFORE touching a phase**, from the files, including:
182
- - re-derive **one anchor number live** (not quote it)
183
- - name the decisions that are **accepted but reversible**, and what would reverse them
184
- - state **where the next deploy gate is and how it determined that** (read the milestone table —
185
- never state a deploy boundary from memory)
186
- - name **one thing a green automated check does NOT prove**, with the example that taught it
187
- - **verify the tree independently** — `git fetch`, count divergence, and `git status`/diff any dirty
188
- file before treating it as authority
189
- > **THE NEW HUB MUST NOT MARK ITS OWN SELF-CHECK.** Until 2026-09-08 nothing graded these
190
- > answers: this command does not start the new session, so nothing routed them back. A
191
- > self-marked exam tests willingness, not comprehension. Run the handshake instead — the
192
- > incoming Hub answers, **you re-derive each answer from the files**, then you send the
193
- > verdict:
194
- >
195
- > ```bash
196
- > python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" handshake open --id <id>
197
- > python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" handshake status --id <id>
198
- > python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" handshake record --id <id> --event answers
199
- > python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" handshake close --id <id>
200
- > ```
201
- >
202
- > It reports whether this runtime can message a peer at all and falls back to the paste route
203
- > on agy and Codex, which have no `SendMessage`. `close` refuses until the incoming Hub has
204
- > acknowledged the verdict. See `/caddis:spawn-session` for the full direction table and the
205
- > chase rule.
206
- >
207
- > **This does not soften the single-writer rule below.** You stay ALIVE to grade; you stop
208
- > WRITING when the prompt is issued. Both hold.
209
-
210
- 4. **At least one question whose naive answer is WRONG.** This is the load-bearing part. A Hub that
211
- only skimmed must fail *visibly* rather than silently.
212
-
213
- > **USE A DIFFERENT TRAP THAN THE PREVIOUS HUB'S.** Check the last spawn prompt in
214
- > `.caddis/advisory-hub-reports/` and pick a fresh one. A trap reused across generations stops
215
- > testing comprehension and starts testing whether the new Hub read the old prompt — which it can
216
- > pass while understanding nothing. Rotate it, and prefer a fact the *most recent* milestone
217
- > established, since that is what the incoming Hub is least likely to have absorbed.
218
-
219
- > **DERIVE the questions from what CHANGED — do not choose them.** An agent that picks its own
220
- > exam picks what it remembers, which is the thing under test. Spread them: the oldest settled
221
- > decisions catch a Hub that read only the recent sections; the most recent changes catch one
222
- > that read only the summary; **a SUPERSEDED fact is the highest-signal question of all**,
223
- > because the obvious answer is the stale one.
224
-
225
- > **Every question must be answerable from a committed file. Prove it, do not assume it:**
226
- >
227
- > ```
228
- > python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" verify-question \
229
- > --answer-in .caddis/kb/some-note.md --needle "the phrase that answers it"
230
- > ```
231
- >
232
- > A question whose answer is not written down tests memory — the thing this mechanism exists to
233
- > replace. It is not a harder question; it is the old failure wearing an exam's clothes.
234
-
235
- > **Store NO answer key.** Re-derive each answer from the repo when the incoming Hub replies. A
236
- > stored key freezes your belief at capture time: if you were wrong, the key is wrong and the
237
- > check certifies the error. Re-deriving validates the DOCUMENT as well as the reader — which is
238
- > exactly what `.caddis/parking-lot/done/004-*` found missing, where a Hub passed a
239
- > thirteen-question check on a handover carrying four factual errors.
240
-
241
- Good traps share a shape: a figure that looks obvious, a correct value that differs, and a reason
242
- rooted in the data rather than in the code. On the reference project, one generation asked why the
243
- funnel's `offered` is not `SUM(OfferedInd)` (naive 3,814, correct 4,783 — the raw flags do not
244
- nest); the next asked why an abandonment rate moved from 7.6% to 5.9% (the old figure was not a
245
- rate at all — 72% of its numerator sat outside its own denominator).
246
- 5. **What is carried open — INLINE THE OPEN ITEMS VERBATIM, do not link to them.** (Closed items stay
247
- in the context file for the audit trail; they do not belong in the prompt.) A pointer costs a file hop at
248
- exactly the moment the new Hub has least context, and a carried-open item that is not read is
249
- indistinguishable from one that was closed.
250
- 6. **The next work**, with its batching (`Session: continue` = batchable, `fresh` = not) and any
251
- standing constraint the new Hub would not otherwise know — a stalled upstream load, a deploy hold,
252
- an environment that is mid-change.
253
- 7. **The standing authorisations**: deploys are user-authorised **every time**; a previous yes does not
254
- carry.
255
- 8. **What comes after this, and why the order matters.** Not only what is done and what is carried
256
- open — **what this is building towards**, for the next two or three phases. A Hub that does not
257
- know what comes next can design the current phase in a way that blocks it, and it will never find
258
- out, because nothing it can read says so. One live handover omitted a planned model comparison
259
- entirely; the user caught it. A section covering only the past reads complete and is not.
260
- 9. **The deliverable.** Name the thing this workstream must eventually produce, and the step that
261
- produces it. One handover carried every phase faithfully and never mentioned the report that was
262
- the whole point of the exercise. The user caught that too.
263
- 10. **A standing instruction to maintain the tracker.** Put this in the prompt, in these words or
264
- close to them:
265
-
266
- > **Maintain the tracker.** Your in-session task list does not survive this session.
267
- > `.caddis/relay.md` does. Mirror your working list into it as you go, and include its current
268
- > state in every progress report. Anything not written there is lost.
269
-
270
- The succession table records **who held the role**; `relay.md` records **where the work is**. The
271
- table is written when a Hub *ends*, so nothing covers the hours while a Hub is *working* — which
272
- is the whole period this mechanism exists to protect. A real spawned Hub read `relay.md`,
273
- answered a thirteen-question context check correctly, found four genuine defects in its
274
- handover, **and created no tracker at all**, because nothing asked it to.
275
-
276
- Note for the incoming Hub: `relay.md` is gitignored and machine-local. Anything a successor **on
277
- another machine** will need belongs in the advisory context or the next spawn prompt, not only
278
- there.
279
- 11. **`.caddis/kb/environment-map.md`, INLINE AND VERBATIM.** Hosts, which login works, where other
280
- repositories actually live. It is short, it is the first thing an incoming Hub needs, and it is
281
- the category most often missing — one incoming Hub searched the filesystem for a repository that
282
- lived in Gitea, and the user had to stop it. A pointer is not enough here: this is exactly the
283
- file a cold session does not know to open.
284
-
285
- **Write it to `.caddis/advisory-hub-reports/hub-NN.spawn.md`** (frontmatter `type: hub-spawn`,
286
- `hub: NN`), then print it. Until this file existed, every succession prompt lived and died in chat —
287
- which made two of this command's own instructions unimplementable: "rotate the trap by checking the
288
- last spawn prompt" had nothing to check, and the ledger conservation check below had nothing to diff
289
- against.
290
-
291
- Print the prompt in a fenced block, ready to paste. **Say plainly that it starts a NEW session** — a
292
- Hub spawned inside the outgoing session's context inherits exactly the staleness this whole mechanism
293
- exists to shed.
294
-
295
- ### Check the prompt before you hand it over
296
-
297
- ```
298
- python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" handover-check \
299
- --doc .caddis/advisory-hub-reports/hub-NN.spawn.md
300
- python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_spawn.py" check \
301
- --doc .caddis/advisory-hub-reports/hub-NN.spawn.md
302
- ```
303
-
304
- The second one blocks on a **commit hash or test count given as current state**. Both go stale
305
- within the hour — measured twice — and the fix is never a fresher number, it is to write the command
306
- that produces it. A historical hash is only noted, not blocked: those are durable, and flagging them
307
- is how a check earns a reputation for crying wolf.
308
-
309
- It fails when the prompt names a file that does not exist. **Validate the DOCUMENT, not just the
310
- reader.** The context self-check in Step 4 proves the incoming Hub read carefully; it proves nothing
311
- about whether what it read was true. One incoming Hub passed a thirteen-question check on a handover
312
- containing four factual errors — it found them *despite* the check, not because of it.
313
-
314
- ### The single-writer rule — state it in the prompt
315
-
316
- **The outgoing Hub stops writing to the repository the moment the succession prompt is issued.** Say
317
- so in the prompt itself, so both sides know which one owns the tree.
318
-
319
- This is not tidiness. Two sessions committed to one repository concurrently and the incoming Hub's
320
- work landed inside the outgoing Hub's commit. Only committed objects are safe from another session's
321
- checkout; a shared working tree is process-shared state, not session-private.
322
-
323
- ## Step 5 — report
324
-
325
- Output: the audit result (candidates → gaps → where each landed), the succession table update, what is
326
- carried open, and the prompt. Then stop.
327
-
328
- **Do not begin validating the next phase.** You are the outgoing Hub; that work belongs to the session
329
- about to be spawned, and doing it here re-creates the context problem you just solved.
330
-
331
- ---
332
-
333
- ## Anti-patterns
334
-
335
- - **Spawning without the audit.** The prompt will look fine and quietly omit the session's best
336
- technique.
337
- - **Writing the prompt from memory.** Build it from the files; memory is what is being discarded.
338
- - **Handing over a stale carried-open list.** An item that was closed hours ago and still appears
339
- teaches the new Hub to distrust the whole list.
340
- - **Waiting until context is nearly gone.** The audit needs room. Spawn early and cheaply.
341
- - **Continuing to work after generating the prompt.** Two Hubs holding the role is worse than one.
@@ -1,6 +0,0 @@
1
- ---
2
- name: statusline
3
- description: Renamed to /caddis:install-statusline (alias, removed next release)
4
- ---
5
-
6
- This command was renamed to /caddis:install-statusline. Run /caddis:install-statusline now with the same arguments ($ARGUMENTS), and tell the user once: "/caddis:statusline is renamed to /caddis:install-statusline; the old name will be removed in the next release."
@@ -1,143 +0,0 @@
1
- ---
2
- name: validate-phase
3
- description: Advisory Hub phase validation — consume a phase report, RE-DERIVE its claims independently, and return ACCEPT / ACCEPT-WITH-CORRECTION / REJECT
4
- ---
5
-
6
- # /caddis:validate-phase — the Advisory Hub validates a phase (never trusts it)
7
-
8
- > **THE RULE: re-derive, do not trust.** A phase report is a self-assessment. Reading it and nodding
9
- > makes you a rubber stamp, and a rubber stamp is worse than no check at all — it manufactures false
10
- > confidence. Every step below exists to prevent exactly that. Skipping the re-derivation is the one way
11
- > this command can fail at its actual job while still producing a plausible-looking verdict.
12
-
13
- Full methodology, templates, and rationale: the **`advisory-hub`** skill. This command is the thin,
14
- operational driver — run it after an implementing session (usually `/caddis:implement` in Advisory-Hub
15
- mode) has filed a phase report.
16
-
17
- ## Step 0 — resolve inputs
18
-
19
- Use **$ARGUMENTS** if given. Otherwise, find the newest `phase-*.report.md` file in
20
- `.caddis/advisory-hub-reports/` that has no matching `phase-NN.verdict.md` sibling yet — that is the
21
- one awaiting validation. Read its `PLAN:` and `ADVISORY CTX:` header fields and load both files.
22
-
23
- **If no `<slug>-advisory-context.md` exists** for the plan named in the report: say so explicitly, offer
24
- to bootstrap one from the `advisory-hub` skill's §A template, and continue in **degraded mode** — state in
25
- the verdict exactly which checks (§4 locked-decision adjudication, §5 safety-rule re-check) were
26
- unavailable without it. Never silently skip a check without recording that you skipped it.
27
-
28
- **A degraded verdict must be machine-distinguishable, not just annotated in prose.** Write
29
- `verdict: accept-degraded` (not plain `accept`) in the frontmatter. `/caddis:implement` reads only the
30
- `verdict:` field to decide whether the next phase may start, so a degraded accept spelled `accept` is
31
- indistinguishable from a full one — the gate cannot tell a partial check from a real one, which is
32
- precisely the false confidence this whole pattern exists to prevent. Use `reject-degraded` likewise if
33
- you are rejecting without the context doc.
34
-
35
- ## Step 1 — read the report once as a document
36
-
37
- Before validating a single claim, check the report against itself: does CROSS-REVIEW agree with
38
- DEVIATIONS? Does MODEL/LANE name a vendor's model that doesn't match the claimed lane? On the reference
39
- run this pattern's design was validated against, two of three real findings in one phase came from
40
- exactly this kind of internal contradiction — not from re-checking the code.
41
-
42
- ## Step 2 — re-derive (the Hub validation checklist)
43
-
44
- Run every item in the `advisory-hub` skill's §D checklist yourself:
45
- 1. Re-derive every VALUE CHECK using the method advisory-context §3a names — actually run it, don't read
46
- the reported result.
47
- 2. Re-run the exit gates, at minimum the fast ones (unit tests, lint, type-check).
48
- 3. `git log` / `git show --stat` the commits — do they match the phase's claimed touches? Anything
49
- unexpected, especially tooling/config/CI that never appeared in DEVIATIONS?
50
- 4. Re-check every rule in advisory-context §5, or record `N/A — none declared`.
51
- 5. Flag any deviation that touches a §4 locked decision — this is step 3 below, not your call to make here.
52
- 6. Flag any surprise that contradicts the plan's `## Current state` — this is step 4 below.
53
- 7. If this milestone boundary ships to a real deployed environment, smoke-test it there, not in dev.
54
-
55
- Also apply the `advisory-hub` skill's §E techniques where they fit — mutation-test any seam a new test
56
- claims to prove, and if a cross-review provider timed out, try the other configured provider before
57
- recording "inconclusive."
58
-
59
- ## Step 3 — adjudicate deviations
60
-
61
- For each deviation the report lists: is it a locked decision in advisory-context §4? If so, this is a
62
- **Hub decision, never the implementer's** — rule allowed / reverted / plan amended, and record the reason.
63
-
64
- ## Step 4 — plan drift
65
-
66
- If the report's SURPRISES / CONTRADICTIONS section is non-empty: correct the plan file's
67
- `## Current state` **now, in this step** — do not defer it to a note in the verdict. This is the Hub's
68
- job and the step most likely to be skipped (`advisory-hub` skill §F).
69
-
70
- ## Step 5 — write the verdict
71
-
72
- Write `.caddis/advisory-hub-reports/phase-NN.verdict.md` beside the report, using the `advisory-hub`
73
- skill's §C template in full, including the mandatory **WHAT IS NOW STRUCTURAL** table.
74
-
75
- > **Give it OKF frontmatter — `type` is REQUIRED and its absence is a defect.**
76
- > Keep it flat (scalar `key: value` only; nested maps and lists defeat simple parsers):
77
- > ```yaml
78
- > ---
79
- > type: phase-verdict
80
- > plan: <path to the plan>
81
- > phase: 12 # or 10-11 for a batched pair
82
- > milestone: M4
83
- > verdict: accept | accept-with-correction | reject
84
- > ---
85
- > ```
86
- > `verdict` is the one field a tool can read to answer *"was this phase signed off"* without parsing prose — and a prose scraper gets that wrong quietly.
87
-
88
-
89
- ## Step 6 — push every correction into `advisory-context.md`
90
-
91
- A correction that lives only in this verdict file dies with the session that reads it; a correction told
92
- to the implementing session dies with that session too, which has already closed. Every correction in
93
- "WHAT IS NOW STRUCTURAL" must actually be landed in the named section of `advisory-context.md` in this
94
- step, not just described.
95
-
96
- ## Step 7 — update the reports-directory index
97
-
98
- Add or update this phase's row in `.caddis/advisory-hub-reports/README.md` (Phase | Report | Verdict |
99
- Outcome | Date).
100
-
101
- ## Step 8 — tell the implementing session (Claude Code only, optional)
102
-
103
- The verdict file is the decision. This step only saves the user from carrying it by hand.
104
-
105
- If `ListAgents` is available, look for a peer session whose name starts with **this repo's directory
106
- name** — sessions are auto-named `<repo-dir>-<hash>`, so in a repo directory called `acme-api`,
107
- `acme-api-91` is a session in this repo and `other-project-e8` is not. If exactly one such peer
108
- exists, it is the implementer:
109
-
110
- ```
111
- SendMessage({to: "<peer-name>", summary: "phase-05 verdict",
112
- message: "phase-05.verdict.md written — verdict: accept-with-correction. "
113
- "Corrections are in the file and in advisory-context.md."})
114
- ```
115
-
116
- Send the **headline and the filename**, never the whole verdict. The file is the record; the message
117
- is a doorbell. A chat message cannot be re-read next week; `phase-05.verdict.md` can.
118
-
119
- **Do not do any of this if:**
120
-
121
- - there is no `ListAgents` — caddis also runs on agy and Codex, which have no cross-session
122
- messaging. The file-based flow is the portable one and works everywhere. This step is an
123
- accelerant, not a requirement.
124
- - **more than one** same-repo peer is listed. Guessing which is the implementer is worse than not
125
- sending — say so to the user and let them name it.
126
- - you are headless. There is no one to save a copy-paste for.
127
-
128
- **Never ask the peer to run something your own session was denied.** Permission boundaries are
129
- per-session; routing blocked work through another session launders the user's decision. Route it back
130
- to the user instead.
131
-
132
- ## Rules
133
-
134
- - **Fail closed.** A gate you could not re-run is `NOT RE-RUN`, never `PASS`. A claim you could not
135
- reproduce is `UNVERIFIABLE`, never `AGREES: YES`.
136
- - **Never accept a claim on the report's own word.** That is the one failure mode this command exists to
137
- prevent.
138
- - If a cross-review provider times out, try the other configured provider before recording
139
- "inconclusive" — a single provider's outage is not grounds for skipping independent review.
140
- - **The Hub is not exempt from its own contract.** If a fault traces back to advice the Hub itself gave
141
- earlier, the verdict says so plainly rather than attributing it to the implementer.
142
- - Read-only toward the implementing session — it has already closed. Corrections land in files
143
- (`advisory-context.md`, the plan), never fed back to a session that no longer exists.
@@ -1,158 +0,0 @@
1
- ---
2
- name: data-lineage
3
- description: Generates End-to-End Data Lineage and Telemetry Specifications linking UI pages, API routes, database datasets, and ETL/SP producers for watch-sight observability.
4
- ---
5
-
6
- # Data Lineage Skill
7
-
8
- This skill generates End-to-End Data Lineage and Telemetry Specifications for enterprise applications. It bridges the gap between frontend user surfaces, backend API routes, relational database objects, and upstream data producers (ETLs, Stored Procedures, and SQL Agent jobs).
9
-
10
- The resulting specifications serve as the ground truth for estate-wide observability in **watch-sight** to enable automated dependency graphs, health probing, and blast-radius impact analysis.
11
-
12
- ---
13
-
14
- ## Mandatory Workflow Steps
15
-
16
- ### Step 1: Codebase & Infrastructure Discovery
17
- Conduct targeted research across the target application and observability repositories:
18
- 1. **Frontend Surfaces:** Inspect `frontend/src/routes/` or router configurations to identify all user-facing pages, views, and navigation tabs.
19
- 2. **API Routes:** Inspect `src/api/routes/` or API routers to map every HTTP endpoint invoked by each frontend page.
20
- 3. **Database Repositories & SQL Queries:** Trace API controllers into data services and repositories to identify exact SQL tables, views, and columns accessed.
21
- 4. **Data Producers & Execution Timings (DB Server SPs & ETLs):** Identify the scheduled jobs, batch Python scripts, and SQL Server Stored Procedures that populate, calculate, or refresh each dataset. Discover their exact execution timings, run frequencies, and triggers (e.g. SQL Server Agent schedules, Windows Task Scheduler jobs, cron expressions, email triggers, or polling loops from runbooks and pipeline schedule references).
22
- 5. **Physical Estate Host Resolution:** Query `E:\Projects\watch-sight\config\monitor-targets.json` and `docs/runbooks/estate-pipelines/` to resolve physical server hostnames, IP addresses, ports, database instances, and service accounts.
23
-
24
- ### Step 2: Markdown Document Authoring
25
- Draft the canonical Data Lineage Markdown file:
26
- `docs/<app>/<app>-data-lineage.md`
27
-
28
- Follow the standard 5-section lineage structure detailed below.
29
-
30
- ### Step 3: Confluence XHTML Compilation & Verification
31
- Compile the Markdown document into Confluence Storage Format XHTML using:
32
- ```powershell
33
- python scripts/convert_doc_to_confluence.py docs/<app>/<app>-data-lineage.md --output docs/<app>/<app>-data-lineage.html --diagram-type plantuml
34
- ```
35
- Verify that the output compiles as well-formed XML without errors.
36
-
37
- ---
38
-
39
- ## Standard Lineage Document Structure (Markdown)
40
-
41
- Every lineage document must follow this standardized 5-section structure:
42
-
43
- ```markdown
44
- ---
45
- type: lineage
46
- status: current
47
- feature: <app>-data-lineage
48
- creation-agent: caddis
49
- Creating Model: <active model ID, e.g. gemini-3.8-flash>
50
- ---
51
-
52
- # <App Title> — End-to-End Data Lineage & Telemetry Specification
53
-
54
- ## 1. Physical Estate & Host Infrastructure
55
- Detail the physical hosts, IP addresses, ports, database instances, and network access paths:
56
- - Application Host (Web server, reverse proxy, ports)
57
- - Primary Database Host (SQL Server, database instance, port, auth mechanism)
58
- - Ingestion & Staging Host (Batch runner, scheduled jobs, agent services)
59
- - External Feeds & Gateways (SFTP drops, upstream BSS/mediation systems)
60
-
61
- ## 2. End-to-End Dependency & Impact Flowchart
62
- Provide a colorful, professional Mermaid diagram (`flowchart TD` or `flowchart LR`) illustrating the 5-tier dependency pipeline:
63
- Upstream Ingestion -> Processing / DB Stored Procedures -> Database Tables/Views -> API Routes -> Frontend UI Pages.
64
- - Use explicit classDef pastel styles (never raw yellow boxes).
65
- - Group layers into clear subgraphs.
66
-
67
- ## 3. Comprehensive Database Lineage Matrix
68
- A comprehensive table specifying the complete end-to-end data lineage across the following mandatory columns:
69
- | App | UI Page | API Route | Dataset (Tables / Views) | Producer (ETL / SP / Job) | Execution Timing / Trigger | Database | Physical Host |
70
- |---|---|---|---|---|---|---|---|
71
- | ... | ... | ... | ... | ... | ... | ... | ... |
72
-
73
- Column specifications:
74
- - **App:** Application identifier (e.g. `billing-portal`).
75
- - **UI Page:** User interface page path and title (e.g. `/runs (Run Monitor)`).
76
- - **API Route:** HTTP method and endpoint (e.g. `GET /api/runs`).
77
- - **Dataset:** Schema-qualified tables or views read (e.g. `[dbo].[CDR_RUN_LOG]`).
78
- - **Producer:** Exact SQL Agent job name, batch ETL script, or DB Stored Procedure that populates or refreshes the dataset.
79
- - **Execution Timing / Trigger:** Exact schedule, frequency, and trigger mechanism (e.g. `Daily 07:00 UTC (SQL Agent)`, `Nightly 08:00 UTC (Task Scheduler)`, `Every 5 min polling (Background Service)`).
80
- - **Database:** Target database name (e.g. `CDR`, `CERILLION`).
81
- - **Physical Host:** Hostname and IP (e.g. `iegew3ccdr01 (100.126.185.4)`).
82
-
83
- ## 4. Stored Procedures & Producer Execution Catalog
84
- Catalog the database server stored procedures and scheduled jobs that populate the datamart:
85
- - Sequential execution order reference table detailing every job in execution order, execution time, host machine, scheduler, and dependencies.
86
- - Detailed procedure profiles: Procedure Name, database instance, trigger mechanism, exact schedule, parameters, source tables read, and target tables written.
87
-
88
- ## 5. watch-sight Telemetry Ingestion Contract
89
- Provide a machine-readable JSON specification block aligned with `watch-sight/config/monitor-targets.json` implementing the **Three-Tier Real-Time Schedule Discovery Hierarchy**:
90
- - **All Producers Represented:** Every single producer (ETL script, SQL Agent job, Stored Procedure) cataloged in Section 4 must be represented in the telemetry contract.
91
- - **Tier 1 (Live Scheduler Discovery):** Define authoritative real-time queries against OS and DB schedulers (`msdb.dbo.sysschedules` / `msdb.dbo.sysjobschedules` for SQL Agent jobs; PowerShell `Get-ScheduledTaskInfo` for Windows Task Scheduler) so monitoring automatically tracks schedule changes made by operators in real time without documentation drift.
92
- - **Tier 2 (Execution Audit Telemetry):** Define queries against application execution audit tables where available (`[dbo].[ETL_AUDIT_LOG]`, `[dbo].[CDR_LOAD_LOG]`, `[dbo].[cdr_validation_run]`, `msdb.dbo.sysjobhistory`) for actual runtime watermarks, durations, and status. If an application lacks audit tables, Tier 2 is omitted and Tier 1 scheduler status is used.
93
- - **Tier 3 (Static Baseline Fallback):** Define static baseline fallback schedules and maximum allowable runtimes as a safety guardrail when live probes are momentarily unreachable.
94
- - `hosts` & `db_ping_targets`
95
- - `pipeline_producers` (with Tier 1, Tier 2, and Tier 3 blocks)
96
- - `continuous_services`
97
- - `application_components`
98
- - `blast_radius_rules`
99
- ```
100
-
101
- ---
102
-
103
- ## Diagram and Conversion Standards (Expert Systems Architect & Mermaid Designer)
104
-
105
- ### 🎨 Design & Styling Principles
106
- 1. **Color Palette & Semantic Styling (Standard/Impact/Existing):**
107
- - Use desaturated, modern executive colors. Do not use highly saturated primary colors.
108
- - Define exactly 3-4 standard semantic class styles at the top of every diagram:
109
- - `existingStyle`: Clean Blue (`fill:#EFF6FF,stroke:#2563EB,stroke-width:2px,color:#1E40AF`) for legacy/established components.
110
- - `newStyle`: Warm Red/Crimson (`fill:#FEF2F2,stroke:#DC2626,stroke-width:2px,color:#991B1B`) for greenfield/new components.
111
- - `impactedStyle`: Amber/Gold (`fill:#FFFBEB,stroke:#D97706,stroke-width:2px,color:#92400E`) for modified/impacted systems.
112
- - Apply classes consistently to the nodes using the triple colon notation (e.g., `NodeName:::newStyle`).
113
- 2. **Diagram Scalability Settings (Initialization Block):**
114
- - Always prepend diagrams with a configuration initialization block to control sizing and font scales:
115
- ```mermaid
116
- %%{init: {
117
- 'theme': 'default',
118
- 'themeVariables': { 'fontSize': '14px', 'subgraphTitleSize': '16px' },
119
- 'flowchart': { 'useMaxWidth': false, 'htmlLabels': true, 'curve': 'basis' }
120
- } }%%
121
- ```
122
- 3. **Readable Text Wrapping:**
123
- - Never let a single node have a long horizontal text block. Use `<br/>` tags to stack text vertically.
124
- - Format nodes with clear visual hierarchy: Use bolding for titles, bracket notation for IDs, and italics for status:
125
- `NodeName["📅 <b>Windows Scheduler</b><br/>[SYS_03]<br/><i>New Component</i>"]`
126
-
127
- ### 📐 Layout & Real Estate Rules
128
- 1. **The 3-Column Kanban Layout (Side-by-Side):**
129
- - When sequential phases are required (e.g., Phase 1 | Phase 2 | Phase 3) but need to prevent horizontal text compression, utilize a "Hybrid Columnar Layout".
130
- - **Rule:** Set the top-level flow to Left-to-Right (`flowchart LR`) to align parent containers horizontally, but enforce vertical stacking (`direction TB`) *inside* each subgraph container.
131
- - **Example Structure:**
132
- ```mermaid
133
- flowchart LR
134
- subgraph Phase1["Phase 1"]
135
- direction TB
136
- A --> B --> C
137
- end
138
- subgraph Phase2["Phase 2"]
139
- direction TB
140
- D --> E --> F
141
- end
142
- Phase1 --> Phase2
143
- ```
144
- 2. **The Two-Line Grid Layout (Row Stacking):**
145
- - When a 3-pillar horizontal layout spans too wide, stack them into rows by setting the top-level structure to Top-to-Bottom (`flowchart TD`).
146
- - Group the lower pillars (Phase 2 and Phase 3) side-by-side inside a helper subgraph container that uses `direction LR`. This forces Phase 2 to wrap onto a new line directly below Phase 1.
147
- 3. **Component Types:**
148
- - Use standard flowchart shapes to represent structural entities:
149
- - `[(Database Node)]` for persistent storage, tables, or file outputs.
150
- - `["Application Node"]` for processing scripts, APIs, or services.
151
- - `["🖥️ UI Node"]` for user interfaces.
152
- 4. **Dynamic Layout & Sizing:** Do not fix exclusively to Left-to-Right (`flowchart LR`) or Top-to-Bottom (`flowchart TD`). Choose the layout dynamically based on component count and readability:
153
- - Use `flowchart LR` for simple linear flows with few components.
154
- - Use `flowchart TD` or mixed subgraphs when there are many layers or components to prevent excessive horizontal stretching.
155
- 5. **PlantUML Engine & Crisp Proportioning:** Diagrams convert via `convert_doc_to_confluence.py` using `scale 1.2` for flowcharts, `scale max 2000 width` for sequence diagrams, `skinparam defaultFontSize 11` (no `skinparam dpi 200` to prevent blowout), natural curved splines (omit `polyline` / `ortho`), tightened whitespace (`nodesep 24`, `ranksep 28`, package `Padding 10`), distinct 1.5px border outlines (`#FEF2F2;line:DC2626` for crimson red impacted borders, `#EFF6FF;line:2563EB` for deep blue existing borders), and cross-package `norank` connectors to guarantee sharp, readable, properly proportioned text in Confluence.
156
- 6. **No Cluttered Labels or Overlapping Text:** Omit stereotypes (`<<impacted>>`, `<<service>>`) and status tags (`(New Component)`, `(Existing Platform)`) from component boxes and arrow labels. Multi-line edge labels must be wrapped at ~24 characters.
157
- 7. **No Leaked Tags:** Never emit `<#ghost>` or unsupported formatting tags into Confluence macros. Component and connection classification is handled by the bottom legend.
158
- 8. **Simplified Technical English (ASD-STE100):** Short sentences, active voice, and clear technical descriptions.