@caddis/cli 0.4.52 → 0.4.54

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 (111) hide show
  1. package/bundles/antigravity-plugin/CADDIS-GLOSSARY.md +1 -0
  2. package/bundles/antigravity-plugin/guard_agy.py +184 -0
  3. package/bundles/antigravity-plugin/plugin.json +1 -1
  4. package/bundles/antigravity-plugin/repo_freshness.py +132 -5
  5. package/bundles/antigravity-plugin/scripts/caddis_budget.py +283 -0
  6. package/bundles/antigravity-plugin/scripts/caddis_checkout_guard.py +227 -0
  7. package/bundles/antigravity-plugin/scripts/caddis_docs_pr.py +284 -0
  8. package/bundles/antigravity-plugin/scripts/caddis_exit.py +2 -0
  9. package/bundles/antigravity-plugin/scripts/caddis_fleet.py +439 -0
  10. package/bundles/antigravity-plugin/scripts/caddis_frontmatter.py +1 -0
  11. package/bundles/antigravity-plugin/scripts/caddis_gate.py +255 -195
  12. package/bundles/antigravity-plugin/scripts/caddis_glossary.py +3 -3
  13. package/bundles/antigravity-plugin/scripts/caddis_governor.py +48 -4
  14. package/bundles/antigravity-plugin/scripts/caddis_inventory.py +38 -0
  15. package/bundles/antigravity-plugin/scripts/caddis_lanes.py +411 -127
  16. package/bundles/antigravity-plugin/scripts/caddis_lineage_publish.py +458 -0
  17. package/bundles/antigravity-plugin/scripts/caddis_merge_chain.py +237 -0
  18. package/bundles/antigravity-plugin/scripts/caddis_notify.py +125 -0
  19. package/bundles/antigravity-plugin/scripts/caddis_prod_check.py +380 -0
  20. package/bundles/antigravity-plugin/scripts/caddis_redact.py +99 -0
  21. package/bundles/antigravity-plugin/scripts/caddis_relay_git.py +2 -2
  22. package/bundles/antigravity-plugin/scripts/caddis_review.py +1309 -0
  23. package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +2109 -0
  24. package/bundles/antigravity-plugin/scripts/caddis_roadmap_page.py +676 -0
  25. package/bundles/antigravity-plugin/scripts/caddis_roadmap_run.py +2605 -0
  26. package/bundles/antigravity-plugin/scripts/caddis_routing.py +7 -6
  27. package/bundles/antigravity-plugin/scripts/caddis_rows.py +476 -0
  28. package/bundles/antigravity-plugin/scripts/caddis_spawn.py +8 -9
  29. package/bundles/antigravity-plugin/scripts/caddis_spend.py +415 -0
  30. package/bundles/antigravity-plugin/scripts/caddis_tidy.py +357 -20
  31. package/bundles/antigravity-plugin/scripts/caddis_todo.py +55 -0
  32. package/bundles/antigravity-plugin/scripts/caddis_workstreams.py +178 -19
  33. package/bundles/antigravity-plugin/scripts/caddis_worktree_close.py +349 -0
  34. package/bundles/antigravity-plugin/scripts/check_doc_coverage.py +0 -56
  35. package/bundles/antigravity-plugin/scripts/claudster_doctor.py +1 -1
  36. package/bundles/antigravity-plugin/scripts/enforcement_inventory.py +0 -1
  37. package/bundles/antigravity-plugin/scripts/oss_review.py +2 -2
  38. package/bundles/antigravity-plugin/scripts/roadmap-recheck.ps1 +89 -0
  39. package/bundles/antigravity-plugin/scripts/roadmap-run.ps1 +88 -0
  40. package/bundles/antigravity-plugin/scripts/setup_project_ai.py +43 -1
  41. package/bundles/antigravity-plugin/session_end_agy.py +3 -3
  42. package/bundles/antigravity-plugin/skills/_registry.md +4 -6
  43. package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +1 -1
  44. package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +1 -1
  45. package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +1 -1
  46. package/bundles/antigravity-plugin/skills/catchup/SKILL.md +11 -0
  47. package/bundles/antigravity-plugin/skills/cloud-phases/SKILL.md +1 -1
  48. package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +5 -2
  49. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +35 -83
  50. package/bundles/antigravity-plugin/skills/fleet-close/SKILL.md +167 -0
  51. package/bundles/antigravity-plugin/skills/fleet-open/SKILL.md +110 -0
  52. package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +2 -1
  53. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +177 -48
  54. package/bundles/antigravity-plugin/skills/implement/SKILL.md +87 -147
  55. package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +4 -3
  56. package/bundles/antigravity-plugin/skills/mmr/SKILL.md +5 -2
  57. package/bundles/antigravity-plugin/skills/office-documents-official/SKILL.md +24 -0
  58. package/bundles/antigravity-plugin/skills/park/SKILL.md +0 -1
  59. package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +28 -20
  60. package/bundles/antigravity-plugin/skills/prd/SKILL.md +2 -10
  61. package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +2 -1
  62. package/bundles/antigravity-plugin/skills/review-pr/SKILL.md +1 -1
  63. package/bundles/antigravity-plugin/skills/roadmap/SKILL.md +260 -0
  64. package/bundles/antigravity-plugin/skills/roadmap/assets/plan-resume-prompt.md +77 -0
  65. package/bundles/antigravity-plugin/skills/roadmap/assets/render-check.template.mjs +68 -0
  66. package/bundles/antigravity-plugin/skills/roadmap/assets/review-protocol.md +78 -0
  67. package/bundles/antigravity-plugin/skills/roadmap/assets/roadmap.template.md +32 -0
  68. package/bundles/antigravity-plugin/skills/roadmap/assets/value-check.template.py +161 -0
  69. package/bundles/antigravity-plugin/skills/ship/SKILL.md +16 -16
  70. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +15 -5
  71. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +36 -16
  72. package/bundles/antigravity-plugin/skills/spawn-session/SKILL.md +4 -8
  73. package/bundles/antigravity-plugin/warm_start_agy.py +1 -3
  74. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  75. package/bundles/antigravity-plugin-extras/skills/_registry.md +1 -2
  76. package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +5 -5
  77. package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +5 -2
  78. package/bundles/antigravity-plugin-extras/skills/runner-move/SKILL.md +214 -0
  79. package/bundles/codex/.codex/skills/coding/refactoring/SKILL.md +2 -1
  80. package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +2 -1
  81. package/bundles/codex/.codex/skills/docs/office-documents-official/SKILL.md +24 -0
  82. package/bundles/codex/.codex/skills/workflow/best-practices/agents/best-practices-referencer.md +1 -1
  83. package/bundles/codex/.codex/skills/workflow/best-practices/agents/codebase-context-builder.md +1 -1
  84. package/bundles/codex/.codex/skills/workflow/best-practices/agents/task-intent-analyzer.md +1 -1
  85. package/bundles/codex/.codex/skills/workflow/roadmap/SKILL.md +260 -0
  86. package/bundles/codex/.codex/skills/workflow/roadmap/assets/plan-resume-prompt.md +77 -0
  87. package/bundles/codex/.codex/skills/workflow/roadmap/assets/render-check.template.mjs +68 -0
  88. package/bundles/codex/.codex/skills/workflow/roadmap/assets/review-protocol.md +78 -0
  89. package/bundles/codex/.codex/skills/workflow/roadmap/assets/roadmap.template.md +32 -0
  90. package/bundles/codex/.codex/skills/workflow/roadmap/assets/value-check.template.py +161 -0
  91. package/bundles/codex/AGENTS.md +5 -4
  92. package/bundles/manifest.json +3 -3
  93. package/package.json +1 -1
  94. package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +0 -233
  95. package/bundles/antigravity-plugin/skills/advisory-hub/reference/context-template.md +0 -214
  96. package/bundles/antigravity-plugin/skills/advisory-hub/reference/hub-handbook.md +0 -233
  97. package/bundles/antigravity-plugin/skills/advisory-hub/reference/report-contract.md +0 -94
  98. package/bundles/antigravity-plugin/skills/advisory-hub/reference/succession.md +0 -118
  99. package/bundles/antigravity-plugin/skills/resume/SKILL.md +0 -6
  100. package/bundles/antigravity-plugin/skills/review/SKILL.md +0 -6
  101. package/bundles/antigravity-plugin/skills/spawn-hub/SKILL.md +0 -341
  102. package/bundles/antigravity-plugin/skills/statusline/SKILL.md +0 -6
  103. package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +0 -143
  104. package/bundles/antigravity-plugin-extras/skills/data-lineage/SKILL.md +0 -158
  105. package/bundles/antigravity-plugin-extras/skills/data-lineage/scripts/convert_doc_to_confluence.py +0 -1430
  106. package/bundles/antigravity-plugin-extras/skills/golden-plan/SKILL.md +0 -586
  107. package/bundles/codex/.codex/skills/workflow/advisory-hub/SKILL.md +0 -233
  108. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/context-template.md +0 -214
  109. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/hub-handbook.md +0 -233
  110. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/report-contract.md +0 -94
  111. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/succession.md +0 -118
@@ -1,586 +0,0 @@
1
- ---
2
- name: golden-plan
3
- context: fork
4
- description: "Use when the user asks for a comprehensive multi-phase plan (full-stack, UI + backend), says 'create a plan for building X', 'plan this project', 'I need a detailed plan', 'build plan', 'implementation plan', or attaches a mockup and asks how to build it. Produces an evidence-gated plan with self-contained phase prompts and validation gates."
5
- ---
6
-
7
- # Golden Plan
8
-
9
- > **`/caddis:feature-plan` is the canonical planning entry point.** It writes to `.caddis/plans/`,
10
- > which is what `/caddis:implement`, `/caddis:handoff`, `/caddis:digress` and `/caddis:catchup`
11
- > actually read, and it now carries this skill's evidence gate. Reach for golden-plan when you
12
- > specifically need its heavier apparatus — the data-binding tables, the query catalog, the
13
- > self-sweep. For ordinary multi-phase work, feature-plan is the shorter path to the same place.
14
-
15
- ## When to Use
16
-
17
- Activate this skill when the request is for a **comprehensive implementation plan** that involves:
18
-
19
- - 8 or more phases across a project
20
- - Full-stack work (backend + frontend or data + UI)
21
- - Complex data binding between a backend and a UI (JSON -> React, API -> Streamlit, etc.)
22
- - A visual reference (HTML mockup, Figma, screenshot) that must be matched pixel-for-pixel
23
- - Multiple agents executing different phases in sequence
24
-
25
- Do NOT use for:
26
- - Simple bug fixes or single-file changes (use `large-task-fidelity.instructions.md` alone)
27
- - Exploratory plans with vague scope (use `brainstorming/SKILL.md` first to harden scope)
28
- - Plans that only touch one system in isolation with no data binding (use `docs/writing-plans/SKILL.md`)
29
-
30
- ---
31
-
32
- ## Execution Mode (Required first step)
33
-
34
- Before Phase 0, explicitly choose an execution mode:
35
-
36
- - **Mode A - `generic` (default):** no junai pipeline assumptions, no orchestrator routing requirements, works with default Copilot/default agents.
37
- - **Mode B - `junai-pipeline` (opt-in):** include orchestrator/stage-routing conventions and pipeline artefact conventions.
38
-
39
- If the user does not explicitly request junai pipeline, use `generic`.
40
-
41
- **Document metadata:** Every plan, status tracker, and other descriptive Markdown artefact created by this skill must follow `.github/instructions/document-frontmatter.instructions.md`. The YAML frontmatter block must be the first content in the file. New documents require `Original Author` (the human owner of the plan, not an inferred name — ASK if unknown, never guess), `Creation Date`, `Creating Model`, and `Executing Coding Agent` (the agent + model + persona that will run the plan, e.g. "Copilot coding agent (model Opus 4.8, persona @architect)"); updated documents must preserve those fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
42
-
43
- ---
44
-
45
- ## Phase 0 - Evidence Gathering (REQUIRED before writing any plan content)
46
-
47
- Before writing a single phase, you MUST gather and validate evidence. Do not produce plan output while any BLOCKER evidence item is unresolved.
48
-
49
- Run through the checklist below. For each item, determine its tier:
50
-
51
- - **BLOCKER** - Plan cannot proceed without this. Stop and ask the user for it.
52
- - **WARNING** - Plan can proceed but the affected phases will have noted assumptions. Inform the user what you are assuming.
53
- - **OPTIONAL** - Nice to have. Note its absence but proceed.
54
-
55
- **Free head-start (workspace scan):** if `.caddis/PROJECT-FACTS.md` exists (setup-project-ai extracts it), read it first — it pre-fills E4 (scaffold inventory) plus the run/test/build commands, env-var names, and CI/deploy workflows at zero token cost. Also use it to ground risks rather than guess them: no test setup → regression risk; no CI workflow → local-only gate; auth/migration in scope → security/structural risk.
56
-
57
- ### Evidence Checklist
58
-
59
- #### E1 - Visual Reference
60
- - Does a mockup, wireframe, HTML prototype, or screenshot of the target UI exist?
61
- - If yes: what file/path? Is it frozen (will not change during implementation)?
62
- - **Tier:** BLOCKER for UI-heavy plans. WARNING for backend-only plans.
63
-
64
- #### E2 - Live Data Sample
65
- - Is there a real data sample (JSON file, CSV, DB query result) representative of production data?
66
- - Does it reflect the CURRENT schema (not a stale sample)?
67
- - Can field names be read directly from it (avoid field name guessing)?
68
- - **Tier:** BLOCKER for plans with any data binding. WARNING if schema is defined elsewhere (Pydantic DTOs, TypeScript interfaces).
69
-
70
- #### E3 - API / Backend Contract
71
- - Are endpoints already defined (routes, method, request params, response shape)?
72
- - Do typed DTOs exist (Pydantic models, TypeScript interfaces)?
73
- - Is the serialization convention documented (camelCase vs snake_case)?
74
- - **Tier:** BLOCKER for full-stack plans. WARNING if backend and frontend are built in the same plan (contract will be defined during planning itself - mark those sections clearly as `[DEFINED IN THIS PLAN]`).
75
-
76
- #### E4 - Existing Scaffold Inventory
77
- - What is already built? (List files, packages, installed dependencies.)
78
- - What must NOT be recreated or deleted?
79
- - What needs overhauling vs net-new creation?
80
- - **Tier:** BLOCKER. Without this, the plan will generate conflicting or duplicate code.
81
-
82
- #### E5 - Technology Decisions
83
- - Is the tech stack finalised? (Charts library, state management, routing, test runner, animation, etc.)
84
- - Are any decisions still open?
85
- - **Tier:** BLOCKER for phases that depend on the decision. Open decisions must be flagged as `[TECH-DECISION OPEN]` in affected phases.
86
-
87
- #### E6 - Scope Boundary
88
- - What is explicitly in v1 vs deferred to a future release?
89
- - Are any data fields known to be empty/missing in v1 (dispatch issues, schema gaps, etc.)?
90
- - **Tier:** WARNING. Missing scope boundary causes unbounded implementations.
91
-
92
- #### E7 - Agent / Skill Availability
93
- - Which agents will execute phases? (Or default: `@Implement` for code phases, `@Tester` for test phases.)
94
- - Which model should execute each phase? Add one explicit model recommendation per phase; do not leave this implicit.
95
- - Are the domain skills referenced in phase prompts present on disk? (Verify paths before listing.)
96
- - Which coding-agent HARNESS executes each phase? Distinguish: (a) **Copilot coding agent** — loads custom `.github/agents/*.agent.md` personas + auto-loads skills; pick this when the phase needs your toolset. (b) **Claude coding agent** / **Codex agent** — run their own loop, do NOT load custom personas; pick only for pure-execution phases, and point them at skill FILES by path. Note the model under the chosen harness (Copilot can run Opus/Sonnet/GPT; Claude agent runs Anthropic models; Codex runs GPT models).
97
- - The `Original Author` (human) must be confirmed, not inferred from any name appearing in source documents or commit history. If the owner is unknown, ASK before writing frontmatter.
98
- - **Tier:** OPTIONAL. Skill paths that do not exist should be omitted from phase prompts - do not list phantom skills.
99
-
100
- #### E8 - Output Destination
101
- - Where should the plan file be saved? (Default: `.caddis/plans/<feature-slug>.md`)
102
- - Where should the associated tracker be saved? (Default: `.caddis/plans/tracker/<feature-slug>-tracker.md`)
103
- - Is there a `chain_id` to use? (Format: `FEAT-YYYY-MMDD-{slug}`)
104
- - **Tier:** OPTIONAL. Default path is used if not specified.
105
-
106
- #### E9 - Phase Model Selection
107
- - Every phase MUST include `**Agent:**`, `**Objective:**`, then `**Model:**` in that exact order.
108
- - Every phase MUST include a `**Model:**` line immediately after `**Objective:**`.
109
- - Recommend the best model for the phase, not the cheapest model by default.
110
- - Use premium reasoning/coding models for foundation contracts, backend/API work, SQL/data lineage, performance-sensitive work, broad integration, and final verification.
111
- - Use design-capable frontend models for visual systems, dashboards, animation, responsive layout, and premium UX phases.
112
- - Use lower-cost models only for low-risk documentation, tracker, inventory, route metadata, or repetitive cleanup phases, and only when source-grounding plus validation keeps quality intact.
113
- - Include a one-line rationale explaining the quality/risk tradeoff.
114
- - Valid example recommendations include `GPT-5.4`, `GPT-5.3-Codex`, `Claude Sonnet 4.6`, and `GPT-5.4-Mini`; adapt to the user's available model list when they provide one.
115
- - In the caddis harness, a phase's model may be served by an OSS execution lane: `glm-headless` (`claude-glm -p "/caddis:implement <plan> — Phase N only"`) for mechanical fully-specced phases, with cross-vendor review by a vendor that did NOT implement (`oss_review.py --provider deepseek|glm`). When lanes are used, the plan MUST carry an Execution Protocol section: per-phase handoff, fresh-session boundaries, and a never-push-main ship gate (`/ship-pr` then human go).
116
-
117
- ---
118
-
119
- ### Evidence Gate Decision
120
-
121
- After running the checklist:
122
-
123
- 1. **All BLOCKERs satisfied** -> Proceed to Phase 1 (Pre-flight Scan).
124
- 2. **Any BLOCKER missing** -> Load `.github/skills/workflow/asking-questions/SKILL.md` and follow its question structure (numbered questions, multiple-choice options, fast-path `defaults` reply). Do not generate any plan content yet. Example:
125
-
126
- ```
127
- EVIDENCE GATE - BLOCKED
128
-
129
- Before I can write this plan, I need a few things. Reply with answers
130
- or `defaults` to accept my assumptions.
131
-
132
- 1) Live data sample (E2):
133
- a) [path/to/sample.json] - I'll read it directly
134
- b) Point me to the Pydantic DTO / TypeScript interface file instead
135
- c) Not available yet - assume from field names in the mockup
136
-
137
- 2) Existing scaffold location (E4):
138
- a) [path/to/frontend/] - I'll inventory it
139
- b) Not built yet - plan will be greenfield
140
- c) Not sure - use default (greenfield)
141
-
142
- Once these are answered I will produce the full plan.
143
- ```
144
-
145
- 3. **WARNINGs present** -> Proceed, but note each WARNING at the top of Context & Decisions with a `WARNING: ASSUMPTION:` callout.
146
-
147
- ---
148
-
149
- ## Phase 1 - Pre-flight Scan
150
-
151
- Before writing any phase content, produce a **pre-flight summary** in this exact format:
152
-
153
- ```
154
- ## Pre-Flight Scan
155
-
156
- Phase 0 - Context & Decisions: reference section, depends on none
157
- Phase 1 - [Name]: ~N tasks, depends on [phases or "none"]
158
- Phase 2 - [Name]: ~N tasks, depends on [phases]
159
- ...
160
- Phase N - [Name]: ~N tasks, depends on [phases]
161
- ```
162
-
163
- Commit to an expected task count per phase. Do not start writing phase content until this is complete. The pre-flight is your contract with yourself - use it to enforce equal depth across phases.
164
-
165
- **Dependency sequencing rule:** Phases MUST be listed in execution order — all dependencies of phase N must appear before phase N. No forward dependencies. If phase 3 requires output from phase 4, restructure the order before writing any phase content. The `depends on` column is not decorative; it must reflect real execution constraints. If two phases have no dependency relationship, list the one with higher risk or longer duration first.
166
-
167
- ---
168
-
169
- ## Phase 2 - Plan Construction
170
-
171
- Write the plan to the output file using the template below, section-by-section in order. Keep each section complete before moving to the next.
172
-
173
- Generate the plan file and its execution tracker in the same run. A golden-plan output is incomplete if either file is missing.
174
-
175
- ---
176
-
177
- ### Plan Template
178
-
179
- ````
180
- ---
181
- Original Author: <active author or agent name>
182
- Creation Date: <YYYY-MM-DDTHH:MM:SSZ>
183
- Creating Model: <exact runtime model identifier or display name>
184
- ---
185
-
186
- # Plan: [Project Name] - [Sub-title e.g. "React UI Build" or "Backend API + Data Pipeline"]
187
-
188
- > **Updated:** YYYY-MM-DDTHH:MM:SSZ
189
- > **Status:** READY FOR EXECUTION
190
- > **Execution mode:** `generic` <!-- or `junai-pipeline` -->
191
- > **Visual reference:** [path to mockup or "N/A"]
192
- > **Data source:** [path to canonical data sample or "See E3 - API Contract section"]
193
- > **Output destination:** [path where plan is saved]
194
- > **Execution tracker:** `.caddis/plans/tracker/<feature-slug>-tracker.md`
195
- > **Execution:** Manual - one agent session per phase. See protocol below.
196
-
197
- ---
198
-
199
- ## Pre-Flight Scan
200
-
201
- [Paste output from Phase 1 - Pre-flight Scan here]
202
-
203
- ---
204
-
205
- ## Manual Execution Protocol
206
-
207
- Each phase runs in a **separate chat session**. After each phase, return for
208
- validation before starting the next.
209
-
210
- - In **`generic` mode**, use normal chat + selected agent(s) directly.
211
- - In **`junai-pipeline` mode**, follow orchestrator routing and stage sequencing.
212
-
213
- **Per-phase workflow:**
214
- 1. Open a new chat session with the agent named in the phase header
215
- 2. Load the skills listed under **Skills to load** - tell the agent:
216
- "Read these SKILL.md files before starting: [paths]"
217
- 3. Attach the files listed under **Files to attach**
218
- 4. Also attach this plan file and the associated execution tracker
219
- 5. Paste the **Phase Prompt** exactly as written - it is self-contained
220
- 6. When the agent finishes, validate the phase implementation by running every item in the **Validation Checklist**
221
- 7. After validation passes, create the phase implementation commit with the phase-scoped commit message
222
- 8. Capture the phase implementation commit hash with `git rev-parse HEAD`
223
- 9. Update the associated execution tracker row as complete with status, gate, validation evidence, changed files, commit hash, push state, and useful comments
224
- 10. Commit the tracker update or amend it into the phase commit according to the repository commit policy
225
- 11. Do not consider the phase complete until Step 10 is finished and the tracker row reflects the validated commit hash and comments
226
- 12. Return to advisory chat, share checklist results + errors. Get a green light before proceeding
227
-
228
- **Drift rule:** If a bug or gap is found after Phase N, fix it in the same session before
229
- starting Phase N+1. Never carry debt forward.
230
-
231
- **Large-task fidelity:** Agents implementing large phases must follow
232
- `.github/instructions/large-task-fidelity.instructions.md`.
233
-
234
- **Tracker rule:** A phase is not complete until implementation is validated, the phase implementation commit exists, and the associated execution tracker row is marked complete with that commit hash. The row must record status, gate, validation evidence, changed files, commit hash, push state, and comments. Comments should capture useful implementation notes, unresolved follow-ups, known limitations, or handoff context that does not belong in code.
235
-
236
- ---
237
-
238
- ## 0. Context & Decisions
239
-
240
- ### What this plan builds
241
- [2-4 sentences - what the user will have when all phases are complete]
242
-
243
- ### WARNING Assumptions
244
- [List any E-tier WARNINGs from evidence gathering here. If none, write "None - all evidence verified."]
245
-
246
- ### Technology decisions
247
-
248
- | Concern | Decision | Rationale |
249
- |---------|----------|-----------|
250
- | [e.g. Charts library] | [decision] | [one-line reason] |
251
- | ... | ... | ... |
252
-
253
- ### Data parity assumptions
254
-
255
- List every data domain and its v1 availability:
256
-
257
- | Domain / Tab | Data availability | Strategy |
258
- |---|---|---|
259
- | [e.g. Executive Overview] | Available real data | Live API |
260
- | [e.g. Geography] | Partially available; array is always `[]` in v1 | Live API + empty state with explanation |
261
- | [e.g. Modem platform] | Unavailable; 0% populated | Full empty state (do not build chart) |
262
-
263
- ### Existing scaffold (do NOT recreate)
264
-
265
- | Path | Purpose | Status |
266
- |------|---------|--------|
267
- | [path] | [what it is] | [keep / overhaul / extend] |
268
-
269
- ### Files to modify (not create)
270
-
271
- | File | What changes | Risk of regression |
272
- |------|-------------|-------------------|
273
- | [path] | [description of change] | [low / medium / high - and why] |
274
-
275
- ### API contract
276
-
277
- Only include if the backend exists or is being defined in this plan:
278
-
279
- | Endpoint | Method | Params | Response type | Notes |
280
- |----------|--------|--------|---------------|-------|
281
- | `/api/v1/[resource]` | GET | `period: string` | `[TypeName]` | [serialization notes, e.g. camelCase] |
282
- | ... | ... | ... | ... | ... |
283
-
284
- ---
285
-
286
- [Then repeat the following block for EACH PHASE]
287
-
288
- ## Phase N - [Name]
289
-
290
- **Agent:** `@[AgentName]`
291
- **Objective:** [One sentence - what this phase produces. No implementation detail here.]
292
- **Model:** `[GPT-5.4 | GPT-5.3-Codex | Claude Sonnet 4.6 | GPT-5.4-Mini | other available model]` - [one-line rationale that explains why this model is sufficient for the phase without compromising implementation quality]
293
-
294
- ### Skills to load
295
-
296
- Tell the agent to read these SKILL.md files before starting:
297
- [Only list skills whose paths you have VERIFIED exist on disk]
298
- - `.github/skills/[category]/[name]/SKILL.md` - [one-line description]
299
-
300
- ### Instructions to follow
301
-
302
- - `.github/instructions/[name].instructions.md`
303
-
304
- ### Files to attach
305
-
306
- [All files the agent needs as context to execute this phase]
307
- - `[path]`
308
-
309
- ### Phase Prompt
310
-
311
- [SELF-CONTAINED, COPY-PASTE PROMPT - includes all context needed to execute the phase
312
- without reading any other document. Structure:]
313
-
314
- **Fence rule:** Every generated `### Phase Prompt` must be wrapped in a bare fenced code block. The opening fence must be exactly three backticks with no language label. Do not use labelled fences such as `text`, `markdown`, `bash`, or any other language for phase prompts.
315
-
316
- ```
317
- You are implementing Phase N ([Name]) of the [project name].
318
- Read `[plan file path]` Phase N section in full before making any changes.
319
-
320
- PRINCIPLES: [TDD / KISS / YAGNI / DRY / Readability - adjust per phase]
321
-
322
- SKILLS TO READ FIRST (load these SKILL.md files):
323
- - [paths]
324
-
325
- INSTRUCTIONS TO FOLLOW:
326
- - [paths]
327
-
328
- [CRITICAL context the agent needs to NOT make common mistakes - e.g.
329
- "The API already returns camelCase. Do NOT add a key transformation layer."
330
- "client.ts already exists - do NOT recreate it."
331
- "types/nps.ts has all interfaces - import from there, do not re-declare."]
332
-
333
- Deliverables (in order):
334
- 1. [Specific deliverable - file path + what it exports]
335
- 2. [Specific deliverable]
336
- ...
337
-
338
- When done, run every item in the Validation Checklist and report each result explicitly.
339
- Do not mark done unless all items pass. If any fail, fix and re-verify.
340
-
341
- After all items pass:
342
- 1. Create the phase implementation commit: `git add -A && git commit -m "phase(N): [Name] complete"`.
343
- 2. Capture the phase implementation commit hash with `git rev-parse HEAD`.
344
- 3. Update the associated execution tracker declared in the plan header: `.caddis/plans/tracker/<feature-slug>-tracker.md`.
345
- 4. Mark Phase N complete in the tracker row with status, gate, completed date, executor/model, changed files, validation evidence, commit hash, push state, and comments.
346
- 5. Commit the tracker update or amend it into the phase commit according to the repository's commit policy.
347
- 6. Do not consider the phase complete until the tracker row is updated after validation and commit, and the row includes the commit hash and comments.
348
- ```
349
-
350
- ### What to build
351
-
352
- [For EACH deliverable: write the complete spec with full code/config/values.
353
- NO "similar to above". NO "same as Phase N". NO "...". EVERY deliverable fully spelled out.]
354
-
355
- #### N.1 [Deliverable name]
356
-
357
- **File:** `[exact path]`
358
-
359
- [Full interface/type definitions, implementation spec, code where exact values matter.
360
- If the code is the spec - write the code. Do not describe code, write it.]
361
-
362
- #### N.2 [Deliverable name]
363
- [...]
364
-
365
- ### Validation Checklist - Phase N complete when
366
-
367
- [SPECIFIC, VERIFIABLE assertions - not "does it work?" but exact checks:]
368
- - [ ] `npm run build` succeeds (or `python -m pytest` depending on stack)
369
- - [ ] [Specific file] exists and exports [specific symbol]
370
- - [ ] [Specific behavior] renders/returns [specific value]
371
- - [ ] [Known empty state] returns graceful message, no crash
372
- - [ ] Dark mode: [specific component] renders correctly
373
- - [ ] Zero [hardcoded colors / any types / console.log / etc.]
374
- - [ ] Phase implementation is validated, committed, `git rev-parse HEAD` was captured, and the associated execution tracker row is marked complete with status, gate, changed files, validation evidence, commit hash, push state, and useful comments.
375
-
376
- ### Phase Gate - run after all checklist items pass
377
-
378
- ```bash
379
- # 1. Commit validated phase implementation
380
- git add -A
381
- git commit -m "phase(N): [Name] complete"
382
-
383
- # 2. Capture phase implementation commit hash
384
- git rev-parse HEAD
385
-
386
- # 3. Update tracker
387
- # Use .caddis/plans/tracker/<feature-slug>-tracker.md and mark Phase N complete with:
388
- # status, gate, completed date, executor/model, changed files,
389
- # validation evidence, commit hash, push state, and comments.
390
- ```
391
-
392
- ---
393
-
394
- [After all phases, include these three mandatory reference sections:]
395
-
396
- ## Data Binding Reference
397
-
398
- Maps every UI component to its exact data source path. All implementing agents must
399
- consult this before wiring any component to data.
400
-
401
- ### DB-[SECTION] - [Section Name e.g. "App Shell", "Tab 1 - Overview"]
402
-
403
- | UI Element / Component | Data path | Type | Notes |
404
- |-----------------------|-----------|------|-------|
405
- | [component] | `[json.field.path]` | `type` | [e.g. camelCase, derived, always [] in v1] |
406
-
407
- [Repeat DB-[SECTION] for each logical section / tab / page]
408
-
409
- ---
410
-
411
- ## Query Catalog
412
-
413
- Every DB-backed UI field must trace to a specific executable SQL query.
414
- This section is the authoritative reference for data analysis - it answers
415
- "what query fetches what for the UI?"
416
-
417
- Include one block per repository function. Queries must use **named bind parameters**
418
- (`:param`), be schema-qualified (`{schema}.TableName`, default `dbo`), and include an
419
- `OFFSET+FETCH` or `TOP N` bound - never unbounded.
420
-
421
- ```sql
422
- -- [EntityName] - [repository_module].[function_name]
423
- -- UI fields populated: fieldA, fieldB, embeddedStatus, derivedFromBlob
424
- -- Parameters: :filter_val (optional), :offset (int), :page_size (int)
425
- SELECT
426
- t.column_a AS field_a,
427
- t.column_b AS field_b,
428
- t.payload_col AS payload_col -- NVARCHAR(MAX): parsed by [adapter_name]
429
- FROM {schema}.[SourceTable] AS t
430
- WHERE (:filter_val IS NULL OR t.filter_col = :filter_val)
431
- ORDER BY t.created_at DESC
432
- OFFSET :offset ROWS FETCH NEXT :page_size ROWS ONLY;
433
- ```
434
-
435
- **Derived fields from `payload_col` (extracted by normalizer - not in SQL):**
436
-
437
- | UI field | Payload path / section | Adapter |
438
- |---|---|---|
439
- | `embeddedStatus` | NULL check on `payload_col` | n/a |
440
- | `derivedField1` | `payload_col -> json_key` | `embedded_json_adapter` |
441
- | `derivedField2` | `payload_col -> ## Section Header` | `embedded_markdown_adapter` |
442
-
443
- [Repeat one block per repository function - single-row lookups, filters, aggregates, etc.]
444
-
445
- ---
446
-
447
- ## Derived Values Reference
448
-
449
- Values computed client-side. NOT present in the raw data. All implementing agents must
450
- derive these - never fetch them as separate API calls.
451
-
452
- | Value name | Formula | Used by |
453
- |-----------|---------|---------|
454
- | [e.g. MoM delta] | `currentValue - previousValue` | [component list] |
455
- | [e.g. YTD avg] | `mean(all non-null values in series)` | [component list] |
456
-
457
- ---
458
-
459
- ## Quality Gates
460
-
461
- Every component across all phases must pass these gates before the plan is considered done:
462
-
463
- - [ ] Zero hardcoded colours - always CSS variable tokens or named constants
464
- - [ ] Zero hardcoded data inside components - all data flows from props or hooks
465
- - [ ] TypeScript strict mode - no `any` type anywhere (or Python typing - no untyped params)
466
- - [ ] All empty states render without errors when arrays are `[]` or data is `null`
467
- - [ ] Dark mode: all components render correctly (if applicable)
468
- - [ ] No `console.log` statements in production code
469
- - [ ] No unused imports
470
- - [ ] `npm run build` (or equivalent) produces zero warnings
471
- - [ ] All tests pass
472
- [Add project-specific gate items here]
473
- ````
474
-
475
- ---
476
-
477
- ## Phase 3 - Self-Sweep (Mandatory Final Step)
478
-
479
- After completing the plan document, re-read the **last 40% of the output** before delivering it.
480
-
481
- Search for these decay signals:
482
-
483
- | Pattern | Example |
484
- |---------|---------|
485
- | `\.{3,}` (ellipsis) | `// ... same for other tabs` |
486
- | `same pattern` | `same pattern as Phase 2` |
487
- | `as above` | `as above for remaining endpoints` |
488
- | `\betc\b\.?` | `deriveYtd, deriveMoM, etc.` |
489
- | `{ ?\.\.\. ?}` | `expect(result).toBe({ ... })` |
490
- | `similar to (Phase|Step|Section)` | `similar to Phase 4` |
491
- | `and \d+ more|and others` | `and 3 more endpoints` |
492
- | `repeat for|do the same for` | `repeat for remaining products` |
493
-
494
- **If any match is found:** Expand it in-place - write the full content that was compressed.
495
- **Do not deliver the plan until zero decay signals remain in the last 40%.**
496
-
497
- ---
498
-
499
- ## Mid-Plan Insertion Protocol
500
-
501
- When a new phase must be inserted into an **existing plan** (discovered mid-project):
502
-
503
- 1. **Do NOT renumber** existing phases - renumbering breaks agent prompts that reference phase numbers.
504
- 2. **Use a suffix** for inserted phases: Phase 9 -> Phase 9A, then 9B if another is added later.
505
- 3. **Update the Pre-flight Scan** at the top to include the new phase.
506
- 4. **Add a `## Phase 9A` block** with the full structure (Prompt, What to build, Validation Checklist).
507
- 5. **Update the Output Destination header** to reflect the new `Updated:` date and status.
508
- 6. **Do NOT modify completed phase sections** - treat them as immutable history.
509
- 7. **Update frontmatter metadata** - preserve the original fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
510
-
511
- ---
512
-
513
- ## Output Destination
514
-
515
- Every generated plan MUST have an associated execution tracker. Put the tracker path in the plan header as `> **Execution tracker:** .caddis/plans/tracker/<feature-slug>-tracker.md`.
516
-
517
- Golden-plan must create both files together. Never emit the plan without creating its associated tracker in the same run.
518
-
519
- Save the completed plan to:
520
-
521
- - `.caddis/plans/<feature-slug>.md` - default for both modes
522
- - **Not ready to execute?** It is not a plan yet — file it as one future-work item at
523
- `.caddis/parking-lot/<feature-slug>.md` (`type: parking-lot`, `status: open`), or run
524
- `/caddis:park`. `.caddis/plans/backlog/` is retired: a second backlog location meant no session
525
- could answer "what is left to do?" without knowing both.
526
-
527
- If mode is **`junai-pipeline`**, additionally register the artefact in `.github/agent-docs/ARTIFACTS.md` with `status: current`.
528
-
529
- When revising an existing plan file, preserve `Original Author`, `Creation Date`, and `Creating Model`, then add or update `Last Author`, `Last Updated`, and `Last Model Used`. Use full ISO 8601 UTC timestamps for the date fields.
530
-
531
- ### Plan Status Tracker
532
-
533
- Alongside the plan file, **always** create `.caddis/plans/tracker/<feature-slug>-tracker.md` using
534
- this template (one row per phase, populated from the Pre-Flight Scan). The plan header must reference this exact tracker path:
535
-
536
- ```
537
- ---
538
- Original Author: <active author or agent name>
539
- Creation Date: <YYYY-MM-DDTHH:MM:SSZ>
540
- Creating Model: <exact runtime model identifier or display name>
541
- ---
542
-
543
- # Plan Status - [Project Name]
544
-
545
- > Plan: `.caddis/plans/<feature-slug>.md`
546
- > Tracker: `.caddis/plans/tracker/<feature-slug>-tracker.md`
547
- > Started: YYYY-MM-DDTHH:MM:SSZ
548
- > Last updated: YYYY-MM-DDTHH:MM:SSZ
549
-
550
- | Phase | Name | Agent | Model | Status | Gate | Completed | Changed files | Validation evidence | Commit | Push | Comments |
551
- |---|---|---|---|---|---|---|---|---|---|---|---|
552
- | 0 | Context & Decisions | - | - | Complete | passed | YYYY-MM-DDTHH:MM:SSZ | `.caddis/plans/<feature-slug>.md` | Evidence gate complete | - | not_required | Plan authored |
553
- | 1 | [Name] | @[Agent] | [model] | Pending | not_run | - | | | | unknown | |
554
- | 2 | [Name] | @[Agent] | [model] | Pending | not_run | - | | | | unknown | |
555
- | N | [Name] | @[Agent] | [model] | Pending | not_run | - | | | | unknown | |
556
-
557
- ## Status key
558
- - Pending - not started
559
- - In Progress - agent session open
560
- - Complete - gate passed, committed
561
- - Blocked - gate failed, needs fix
562
- - Skipped - explicitly deferred
563
- ```
564
-
565
- **Gate rule:** The executing agent validates the phase, creates the phase implementation commit, captures that commit hash, then marks the tracker row complete with the hash and comments. Never mark a phase complete before all validation checklist items pass and the phase implementation commit exists.
566
-
567
- **Comments rule:** The `Comments` column is required for completed, blocked, or skipped phases. Use it for concise handoff notes, blockers, decisions, caveats, known limitations, or follow-up context discovered during the phase.
568
-
569
- **Plan Completion Protocol:** When every tracker row has `status: Complete`, the plan is done. The executing agent (or the Janitor backstop) MUST:
570
- 1. Filesystem-move the plan file from `.caddis/plans/<feature-slug>.md` to `.caddis/plans/done/<feature-slug>.md` using `Move-Item`/`mv`/`run_command` — NOT `git mv` (the `done/` folder is gitignored in project repos).
571
- 2. Update the plan frontmatter: set `status: done` and add `Archived: <YYYY-MM-DD>`.
572
- 3. Log the move in the tracker `Comments` field of the last completed phase row.
573
- 4. Never delete plan files — only move to `done/`.
574
-
575
- **Next step after saving:** Load `.github/skills/workflow/preflight/SKILL.md` and run it against the completed plan before any agent begins implementation. Preflight catches wrong endpoints, stale type names, missing dependencies, and field name mismatches that slipped past plan authorship - far cheaper to fix in the plan than mid-implementation.
576
-
577
- ---
578
-
579
- ## Relationship to Other Skills
580
-
581
- | Skill | When to use instead |
582
- |-------|-------------------|
583
- | `docs/writing-plans/SKILL.md` | Smaller plans (< 8 phases), TDD micro-task granularity, single developer session |
584
- | `workflow/brainstorming/SKILL.md` | Scope is still vague - use to harden requirements before this skill |
585
- | `workflow/preflight/SKILL.md` | After the plan is written - validates it against the actual codebase before agents start |
586
- | `large-task-fidelity.instructions.md` | Always apply in addition to this skill during plan OUTPUT - not a substitute |