@caddis/cli 0.0.0 → 0.1.0

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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +150 -1
  3. package/bundles/antigravity-plugin/agents/code-reviewer.md +47 -0
  4. package/bundles/antigravity-plugin/agents/preflight.md +53 -0
  5. package/bundles/antigravity-plugin/guard_agy.py +338 -0
  6. package/bundles/antigravity-plugin/hooks.json +36 -0
  7. package/bundles/antigravity-plugin/mcp_config.json +8 -0
  8. package/bundles/antigravity-plugin/mcp_ping_server.py +55 -0
  9. package/bundles/antigravity-plugin/plugin.json +5 -0
  10. package/bundles/antigravity-plugin/session_end_agy.py +57 -0
  11. package/bundles/antigravity-plugin/skills/_registry.md +115 -0
  12. package/bundles/antigravity-plugin/skills/add-rules/SKILL.md +45 -0
  13. package/bundles/antigravity-plugin/skills/api-design/SKILL.md +249 -0
  14. package/bundles/antigravity-plugin/skills/backend-development/SKILL.md +305 -0
  15. package/bundles/antigravity-plugin/skills/best-practices/SKILL.md +500 -0
  16. package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +263 -0
  17. package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +326 -0
  18. package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +245 -0
  19. package/bundles/antigravity-plugin/skills/best-practices/references/anti-patterns.md +571 -0
  20. package/bundles/antigravity-plugin/skills/best-practices/references/before-after-examples.md +1114 -0
  21. package/bundles/antigravity-plugin/skills/best-practices/references/best-practices-guide.md +513 -0
  22. package/bundles/antigravity-plugin/skills/best-practices/references/common-workflows.md +692 -0
  23. package/bundles/antigravity-plugin/skills/best-practices/references/prompt-patterns.md +547 -0
  24. package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +57 -0
  25. package/bundles/antigravity-plugin/skills/ci-cd-pipeline/SKILL.md +315 -0
  26. package/bundles/antigravity-plugin/skills/code-documentation/SKILL.md +271 -0
  27. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +122 -0
  28. package/bundles/antigravity-plugin/skills/codebase-audit/SKILL.md +204 -0
  29. package/bundles/antigravity-plugin/skills/context-curator/SKILL.md +157 -0
  30. package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +40 -0
  31. package/bundles/antigravity-plugin/skills/css-architecture/SKILL.md +305 -0
  32. package/bundles/antigravity-plugin/skills/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
  33. package/bundles/antigravity-plugin/skills/database-design/SKILL.md +177 -0
  34. package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +148 -0
  35. package/bundles/antigravity-plugin/skills/db-diagram/scripts/sql_to_graph.py +1212 -0
  36. package/bundles/antigravity-plugin/skills/digress/SKILL.md +61 -0
  37. package/bundles/antigravity-plugin/skills/draw-io/SKILL.md +162 -0
  38. package/bundles/antigravity-plugin/skills/draw-io/references/aws-icons.md +677 -0
  39. package/bundles/antigravity-plugin/skills/draw-io/references/layout-guidelines.md +142 -0
  40. package/bundles/antigravity-plugin/skills/draw-io/references/troubleshooting.md +118 -0
  41. package/bundles/antigravity-plugin/skills/draw-io/references/workflows.md +103 -0
  42. package/bundles/antigravity-plugin/skills/draw-io/scripts/convert-drawio-to-png.sh +25 -0
  43. package/bundles/antigravity-plugin/skills/draw-io/scripts/find_aws_icon.py +79 -0
  44. package/bundles/antigravity-plugin/skills/error-handling/SKILL.md +260 -0
  45. package/bundles/antigravity-plugin/skills/excalidraw-db/SKILL.md +38 -0
  46. package/bundles/antigravity-plugin/skills/fastapi-dev/SKILL.md +300 -0
  47. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +198 -0
  48. package/bundles/antigravity-plugin/skills/frontend-design/SKILL.md +193 -0
  49. package/bundles/antigravity-plugin/skills/frontend-design/references/my-tech-stack.md +127 -0
  50. package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +195 -0
  51. package/bundles/antigravity-plugin/skills/git-commit/SKILL.md +285 -0
  52. package/bundles/antigravity-plugin/skills/golden-plan/SKILL.md +577 -0
  53. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +100 -0
  54. package/bundles/antigravity-plugin/skills/implement/SKILL.md +114 -0
  55. package/bundles/antigravity-plugin/skills/javascript-typescript/SKILL.md +142 -0
  56. package/bundles/antigravity-plugin/skills/kb/SKILL.md +60 -0
  57. package/bundles/antigravity-plugin/skills/mermaid-db/SKILL.md +33 -0
  58. package/bundles/antigravity-plugin/skills/mermaid-diagrams/SKILL.md +236 -0
  59. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
  60. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
  61. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/advanced-features.md +556 -0
  62. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  63. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/c4-diagrams.md +410 -0
  64. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/class-diagrams.md +361 -0
  65. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/erd-diagrams.md +510 -0
  66. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/flowcharts.md +450 -0
  67. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  68. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/troubleshooting.md +335 -0
  69. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/workflows.md +418 -0
  70. package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +68 -0
  71. package/bundles/antigravity-plugin/skills/mockup/SKILL.md +242 -0
  72. package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +243 -0
  73. package/bundles/antigravity-plugin/skills/particle-art/references/canvas-utils.ts +171 -0
  74. package/bundles/antigravity-plugin/skills/particle-art/references/dot-field.template.tsx +203 -0
  75. package/bundles/antigravity-plugin/skills/particle-art/references/flow-field.template.tsx +263 -0
  76. package/bundles/antigravity-plugin/skills/particle-art/references/node-shape.template.tsx +261 -0
  77. package/bundles/antigravity-plugin/skills/particle-art/references/shape-sampler.ts +281 -0
  78. package/bundles/antigravity-plugin/skills/particle-art/references/stipple-morph.template.tsx +167 -0
  79. package/bundles/antigravity-plugin/skills/particle-art/references/stipple.template.tsx +175 -0
  80. package/bundles/antigravity-plugin/skills/particle-art/references/trail-ghost.template.tsx +266 -0
  81. package/bundles/antigravity-plugin/skills/particle-art/references/usage-examples.md +320 -0
  82. package/bundles/antigravity-plugin/skills/playwright/API_REFERENCE.md +653 -0
  83. package/bundles/antigravity-plugin/skills/playwright/SKILL.md +454 -0
  84. package/bundles/antigravity-plugin/skills/playwright/lib/helpers.js +441 -0
  85. package/bundles/antigravity-plugin/skills/playwright/package.json +26 -0
  86. package/bundles/antigravity-plugin/skills/playwright/run.js +228 -0
  87. package/bundles/antigravity-plugin/skills/prd/SKILL.md +107 -0
  88. package/bundles/antigravity-plugin/skills/preflight/SKILL.md +435 -0
  89. package/bundles/antigravity-plugin/skills/python/SKILL.md +388 -0
  90. package/bundles/antigravity-plugin/skills/react-best-practices/SKILL.md +269 -0
  91. package/bundles/antigravity-plugin/skills/react-dev/README.md +404 -0
  92. package/bundles/antigravity-plugin/skills/react-dev/SKILL.md +459 -0
  93. package/bundles/antigravity-plugin/skills/react-dev/examples/generic-components.md +579 -0
  94. package/bundles/antigravity-plugin/skills/react-dev/examples/server-components.md +579 -0
  95. package/bundles/antigravity-plugin/skills/react-dev/references/event-handlers.md +574 -0
  96. package/bundles/antigravity-plugin/skills/react-dev/references/hooks.md +456 -0
  97. package/bundles/antigravity-plugin/skills/react-dev/references/react-19-patterns.md +638 -0
  98. package/bundles/antigravity-plugin/skills/react-dev/references/react-router.md +1002 -0
  99. package/bundles/antigravity-plugin/skills/react-dev/references/tanstack-router.md +587 -0
  100. package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +486 -0
  101. package/bundles/antigravity-plugin/skills/resume/SKILL.md +36 -0
  102. package/bundles/antigravity-plugin/skills/security-review/SKILL.md +196 -0
  103. package/bundles/antigravity-plugin/skills/setup-project-ai/SKILL.md +61 -0
  104. package/bundles/antigravity-plugin/skills/ship/SKILL.md +107 -0
  105. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +103 -0
  106. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +102 -0
  107. package/bundles/antigravity-plugin/skills/skill-creator/LICENSE.txt +202 -0
  108. package/bundles/antigravity-plugin/skills/skill-creator/SKILL.md +491 -0
  109. package/bundles/antigravity-plugin/skills/skill-creator/agents/analyzer.md +274 -0
  110. package/bundles/antigravity-plugin/skills/skill-creator/agents/comparator.md +202 -0
  111. package/bundles/antigravity-plugin/skills/skill-creator/agents/grader.md +223 -0
  112. package/bundles/antigravity-plugin/skills/skill-creator/assets/eval_review.html +146 -0
  113. package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  114. package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  115. package/bundles/antigravity-plugin/skills/skill-creator/references/schemas.md +430 -0
  116. package/bundles/antigravity-plugin/skills/skill-creator/scripts/__init__.py +0 -0
  117. package/bundles/antigravity-plugin/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  118. package/bundles/antigravity-plugin/skills/skill-creator/scripts/generate_report.py +326 -0
  119. package/bundles/antigravity-plugin/skills/skill-creator/scripts/improve_description.py +247 -0
  120. package/bundles/antigravity-plugin/skills/skill-creator/scripts/package_skill.py +136 -0
  121. package/bundles/antigravity-plugin/skills/skill-creator/scripts/quick_validate.py +103 -0
  122. package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_eval.py +310 -0
  123. package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_loop.py +328 -0
  124. package/bundles/antigravity-plugin/skills/skill-creator/scripts/utils.py +47 -0
  125. package/bundles/antigravity-plugin/skills/sql/SKILL.md +321 -0
  126. package/bundles/antigravity-plugin/skills/tdd/SKILL.md +37 -0
  127. package/bundles/antigravity-plugin/skills/tdd-workflow/SKILL.md +188 -0
  128. package/bundles/antigravity-plugin/skills/technical-writing/SKILL.md +286 -0
  129. package/bundles/antigravity-plugin/skills/test-strategy/SKILL.md +155 -0
  130. package/bundles/antigravity-plugin/skills/ui-brief/SKILL.md +84 -0
  131. package/bundles/antigravity-plugin/skills/ui-review/SKILL.md +176 -0
  132. package/bundles/antigravity-plugin/skills/ui-review/references/framework-fixes.md +471 -0
  133. package/bundles/antigravity-plugin/skills/ui-review/references/visual-checklist.md +236 -0
  134. package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +77 -0
  135. package/bundles/antigravity-plugin/skills/use-model/SKILL.md +64 -0
  136. package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +217 -0
  137. package/bundles/antigravity-plugin/skills/version/SKILL.md +18 -0
  138. package/bundles/antigravity-plugin/skills/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
  139. package/bundles/antigravity-plugin/skills/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
  140. package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +732 -0
  141. package/bundles/antigravity-plugin/skills/webapp-testing/LICENSE.txt +202 -0
  142. package/bundles/antigravity-plugin/skills/webapp-testing/SKILL.md +97 -0
  143. package/bundles/antigravity-plugin/skills/webapp-testing/examples/console_logging.py +35 -0
  144. package/bundles/antigravity-plugin/skills/webapp-testing/examples/element_discovery.py +40 -0
  145. package/bundles/antigravity-plugin/skills/webapp-testing/examples/static_html_automation.py +33 -0
  146. package/bundles/antigravity-plugin/skills/webapp-testing/scripts/with_server.py +106 -0
  147. package/bundles/antigravity-plugin/skills/windows-deployment/SKILL.md +880 -0
  148. package/bundles/antigravity-plugin/skills/writing-plans/SKILL.md +384 -0
  149. package/bundles/antigravity-plugin/statusline-command-agy.sh +91 -0
  150. package/bundles/antigravity-plugin/warm_start_agy.py +149 -0
  151. package/bundles/manifest.json +6 -0
  152. package/dist/cli.js +5363 -0
  153. package/package.json +61 -4
@@ -0,0 +1,204 @@
1
+ ---
2
+ name: codebase-audit
3
+ context: fork
4
+ description: Systematic codebase audit methodology for unfamiliar codebases before architecture or implementation work. Use for new codebase, unfamiliar codebase, pre-implementation audit, codebase review, technical due diligence, or onboarding to an existing project. Produces AUDIT-FINDINGS.md and QUESTIONS.md. Routes to Architect, Planner, or Code Reviewer agents.
5
+ ---
6
+
7
+ # Codebase Audit Skill
8
+
9
+ Systematic 6-step audit for entering an unfamiliar codebase before architecture changes, major features, or refactoring. Do not guess patterns — audit first.
10
+
11
+ ## 1. When to Apply This Skill
12
+
13
+ **Trigger conditions:**
14
+ - "I'm new to this codebase"
15
+ - "Audit this project before we start building"
16
+ - "I need to understand what's here before changing it"
17
+ - "Pre-implementation review"
18
+ - Any major feature in a codebase you haven't worked in this session
19
+
20
+ **Do not skip the audit** even when the task seems small — hidden coupling causes broken assumptions.
21
+
22
+ ## 2. Audit Scope — 20 Areas
23
+
24
+ | # | Area | What to Look For |
25
+ |---|---|---|
26
+ | 1 | **Architecture** | Monolith/microservice/monorepo, layer separation, module boundaries |
27
+ | 2 | **Entry Points** | Main files, router setup, CLI entry, exports index |
28
+ | 3 | **Framework & Runtime** | React version, Next.js, FastAPI, Django, Node version, Python version |
29
+ | 4 | **Dependencies** | `package.json`/`pyproject.toml` — packages, versions, peer deps, outdated |
30
+ | 5 | **Code Quality** | Lint config, formatter, TypeScript strict mode, type coverage |
31
+ | 6 | **Testing** | Test runner, coverage %, which layers are tested, missing tests |
32
+ | 7 | **Security Posture** | Auth implementation, env var usage, hardcoded secrets, CORS |
33
+ | 8 | **Documentation** | README completeness, inline comments, API docs |
34
+ | 9 | **Performance Signals** | Caching, lazy loading, database indexes, N+1 queries |
35
+ | 10 | **DevOps / CI** | Build commands, CI config, deployment method, Dockerfile |
36
+ | 11 | **API Design** | REST conventions, versioning, error response format, input validation |
37
+ | 12 | **Data Layer** | ORM vs raw SQL, migration strategy, schema location |
38
+ | 13 | **State Management** | Client state (Zustand, Redux, Context), server state (React Query) |
39
+ | 14 | **Error Handling** | Global error boundary, unhandled promise rejections, logging |
40
+ | 15 | **Environment Config** | `.env.example`, `pydantic-settings`, config validation on startup |
41
+ | 16 | **Dead Code / Tech Debt** | TODOs, commented-out code, unused packages, deprecated calls |
42
+ | 17 | **Naming Conventions** | Consistent file/folder naming, component vs module patterns |
43
+ | 18 | **Shared Libraries** | Utility functions, hooks, services — shared vs duplicated |
44
+ | 19 | **Accessibility** | ARIA usage, keyboard nav, color contrast, skip-nav |
45
+ | 20 | **Observability** | Logging format, tracing, health endpoints, error reporting |
46
+
47
+ ## 3. 6-Step Audit Method
48
+
49
+ ### Step 1 — Map the Repository
50
+ ```
51
+ actions:
52
+ - List top-level directories and understand intent of each
53
+ - Identify the project type (app, library, monorepo, microservice)
54
+ - Read README.md fully — note setup instructions, known issues
55
+ - Check for CONTRIBUTING.md, ARCHITECTURE.md, or ADR folders
56
+ ```
57
+
58
+ ### Step 2 — Find Entry Points
59
+ ```
60
+ actions:
61
+ - Identify main application entry (main.py, app.py, src/index.ts, src/main.ts)
62
+ - Trace the request lifecycle from entry to response (1 complete path)
63
+ - Identify router/controller/handler layers
64
+ - Find test entry (jest.config.ts, vite.config.ts, pytest.ini/pyproject.toml)
65
+ - Find build entry (package.json scripts, Makefile, Dockerfile)
66
+ ```
67
+
68
+ ### Step 3 — Dependencies and Versions
69
+ ```
70
+ actions:
71
+ - Read package.json / pyproject.toml — note major dependencies and versions
72
+ - Check for deprecated or significantly outdated packages
73
+ - Identify direct vs transitive dependency conflicts
74
+ - Note peer dependency version mismatches
75
+ - Check for security advisories (mental note or npm audit / pip-audit)
76
+ ```
77
+
78
+ ### Step 4 — Audit by Severity
79
+ ```
80
+ For each area in §2, assign:
81
+ 🔴 CRITICAL — Security vulnerability, data loss risk, broken functionality
82
+ 🟡 WARNING — Performance issue, tech debt, missing validation
83
+ 🟢 NOTE — Style inconsistency, minor improvement opportunity
84
+ ⚪ OK — Meets expectations, no action needed
85
+ ```
86
+
87
+ ### Step 5 — Compile Questions
88
+ ```
89
+ For every assumption or ambiguity discovered:
90
+ - Business context: "Why does X exist? Is it still needed?"
91
+ - Architecture: "Is this pattern intentional or historical?"
92
+ - Implementation: "Is there a newer pattern preferred for this?"
93
+ - Scope: "Which areas are off-limits for this change?"
94
+ ```
95
+
96
+ ### Step 6 — Write Deliverables
97
+ Write two files in the project root (or `docs/` if it exists):
98
+ - `AUDIT-FINDINGS.md`
99
+ - `QUESTIONS.md`
100
+
101
+ ## 4. Output Templates
102
+
103
+ ### `AUDIT-FINDINGS.md`
104
+ ```markdown
105
+ # Codebase Audit Findings
106
+
107
+ **Project**: [name]
108
+ **Audited**: [date]
109
+ **Scope**: [what was covered]
110
+
111
+ ## Summary
112
+ [2–3 sentence high-level assessment]
113
+
114
+ ## Critical Findings 🔴
115
+
116
+ ### CRIT-001: [Title]
117
+ **File**: `path/to/file.ts` (line N)
118
+ **Issue**: [What is wrong and why]
119
+ **Risk**: [What can go wrong]
120
+ **Recommendation**: [Specific fix]
121
+
122
+ ## Warnings 🟡
123
+
124
+ ### WARN-001: [Title]
125
+ **File**: `path/to/file.py`
126
+ **Issue**: [What needs attention]
127
+ **Recommendation**: [Specific improvement]
128
+
129
+ ## Notes 🟢
130
+
131
+ - [Minor observations, style, preferences]
132
+
133
+ ## Architecture Overview
134
+ [Brief description of what was found — layers, patterns, notable design decisions]
135
+
136
+ ## Scope for Current Task
137
+ Based on the requested change, these areas are in scope: …
138
+ These areas should NOT be touched: …
139
+ ```
140
+
141
+ ### `QUESTIONS.md`
142
+ ```markdown
143
+ # Pre-Implementation Questions
144
+
145
+ **For**: [next agent or human reviewer]
146
+ **Context**: [what we're about to build]
147
+
148
+ ## Blocking Questions (must answer before code changes)
149
+
150
+ ### Q1: [Question]
151
+ **Context**: [why this matters]
152
+ **Impact if wrong**: [what breaks]
153
+
154
+ ### Q2: [Question]
155
+
156
+ ## Advisory Questions (inform decisions but don't block)
157
+
158
+ ### Q3: [Question]
159
+
160
+ ## Assumptions Made
161
+ If we proceed without answers, these assumptions apply:
162
+ - [assumption 1]
163
+ - [assumption 2]
164
+ ```
165
+
166
+ ## 5. Severity Tags
167
+
168
+ | Tag | Code | Meaning |
169
+ |---|---|---|
170
+ | 🔴 Critical | `CRIT-NNN` | Fix before any changes proceed |
171
+ | 🟡 Warning | `WARN-NNN` | Address in current or next sprint |
172
+ | 🟢 Note | `NOTE-NNN` | Backlog item or stylistic observation |
173
+ | ⚪ OK | — | No action needed |
174
+
175
+ ## 6. Handoff Guidance
176
+
177
+ After completing the audit:
178
+
179
+ | Finding Type | Route To |
180
+ |---|---|
181
+ | Architecture redesign needed | `@Architect` — provide `AUDIT-FINDINGS.md` |
182
+ | Implementation can proceed with caution | `@Planner` — provide findings + questions |
183
+ | Major quality/security issues | `@Code-Reviewer` + `@Security-Analyst` |
184
+ | Only minor notes, clear path | Proceed directly with `@Implement` or `@Anchor` |
185
+
186
+ ### Prompt template for handoff:
187
+ ```
188
+ @[Agent]: I've completed a codebase audit.
189
+ Findings: [link or inline AUDIT-FINDINGS.md]
190
+ Blocking questions: [key Q from QUESTIONS.md]
191
+ The task is: [original task description]
192
+ Please [design solution / create plan / review / implement] with these findings in mind.
193
+ ```
194
+
195
+ ## 7. Checklist
196
+
197
+ - [ ] README.md read fully
198
+ - [ ] Entry point traced end-to-end (one complete request/render cycle)
199
+ - [ ] All 20 audit areas assessed (even if just ⚪ OK)
200
+ - [ ] Critical findings have file + line citation
201
+ - [ ] `AUDIT-FINDINGS.md` written to disk
202
+ - [ ] `QUESTIONS.md` written to disk
203
+ - [ ] Blocking questions identified separately
204
+ - [ ] Agent handoff prompt prepared
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: context-curator
3
+ description: Compress and prioritize codebase context before handing work to reasoning agents, minimizing token waste while preserving the required decision inputs.
4
+ ---
5
+
6
+ # Context Curator Skill
7
+
8
+ **Skill ID:** `workflow/context-curator`
9
+ **Used by:** Architect, Plan, Debug, Security Analyst, Orchestrator
10
+ **Purpose:** Compress and prioritise codebase context before feeding it to reasoning agents. Prevents context bloat and token waste on long-running projects with large codebases.
11
+
12
+ ---
13
+
14
+ ## When to Use This Skill
15
+
16
+ Load this skill when:
17
+ - A reasoning agent (Architect, Plan, Debug, Security) is about to start and the codebase is large (>50 files)
18
+ - The previous context window was exhausted or truncated
19
+ - Starting a new pipeline stage on an existing feature (context needs refreshing)
20
+ - A handoff has occurred and the new agent needs a clean, relevant context package
21
+
22
+ ---
23
+
24
+ ## The Context Bloat Problem
25
+
26
+ In long-running projects, agents accumulate unnecessary context:
27
+ - Full file contents when only function signatures are needed
28
+ - Historical artefacts superseded by newer versions
29
+ - Unrelated modules with no bearing on the current task
30
+ - Duplicate information across PRD, architecture, and plan docs
31
+
32
+ This skill provides a structured protocol to curate a **minimum sufficient context package** for any given task.
33
+
34
+ ---
35
+
36
+ ## Step 1 — Identify the Task Scope
37
+
38
+ Before curating context, answer these questions:
39
+ 1. **What is the current pipeline stage?** (read `pipeline-state.json`)
40
+ 2. **What is the feature being worked on?** (read Intent Document or `pipeline-state.json → feature`)
41
+ 3. **What specific files/modules will be touched?** (read the Plan if available)
42
+ 4. **What upstream artefacts are required?** (check agent's Context Priority Order)
43
+
44
+ ---
45
+
46
+ ## Step 2 — Build the Context Package
47
+
48
+ Collect ONLY these items, in this order:
49
+
50
+ If the context package is written as a standalone Markdown handoff or context document, apply `.github/instructions/document-frontmatter.instructions.md`. New context documents require `Original Author`, `Creation Date`, and `Creating Model`; updated context documents must preserve those fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
51
+
52
+ ### Tier 1 — Always Include (MUST READ)
53
+ | Item | Source | What to extract |
54
+ |------|--------|-----------------|
55
+ | Intent Document | `agent-docs/intents/<feature>.md` | Goal, Constraints, Success Criteria |
56
+ | Pipeline state | `.github/pipeline-state.json` | Current stage, approved gates |
57
+ | Project config | `project-config.md` | Tech stack, constraints, brand tokens |
58
+ | Current plan step | `.github/plans/<feature>.md` | Current phase/step only |
59
+
60
+ ### Tier 2 — Include When Relevant (SHOULD READ)
61
+ | Item | Source | What to extract |
62
+ |------|--------|-----------------|
63
+ | Previous artefact | `stages[previous_stage].artefact` | Key decisions and output fields |
64
+ | Architecture doc | `agent-docs/architecture/<feature>.md` | Section relevant to current task |
65
+ | PRD | `agent-docs/prd/<feature>.md` | FRs and NFRs for the affected area |
66
+
67
+ ### Tier 3 — Include Only If Room (READ IF NEEDED)
68
+ | Item | Source | What to extract |
69
+ |------|--------|-----------------|
70
+ | Related source files | As specified by plan step | Function signatures + docstrings only |
71
+ | Test files | `tests/` | Failing test names and error messages |
72
+ | Escalations | `agent-docs/escalations/` | Blocking items only |
73
+
74
+ ---
75
+
76
+ ## Step 3 — Compress Each Item
77
+
78
+ Apply these compression rules:
79
+
80
+ ### For Markdown Documents
81
+ - Extract only the sections relevant to the current task
82
+ - Summarise lists longer than 5 items as: `[N items — <category>]`
83
+ - Drop historical context (superseded requirements, old decisions)
84
+ - Replace repeated boilerplate with `[standard section — omitted]`
85
+
86
+ ### For Source Code Files
87
+ - Include function/class signatures and docstrings only
88
+ - Replace function bodies with `# [body — <N lines>]`
89
+ - Include full body ONLY for functions directly touched by the current task
90
+ - List imports as a single-line summary: `# imports: os, sys, sqlalchemy, ...`
91
+
92
+ ### For JSON/Config Files
93
+ - Include only the keys relevant to the current task
94
+ - Replace unrelated sections with `// [N keys omitted]`
95
+
96
+ ---
97
+
98
+ ## Step 4 — Assemble the Context Summary
99
+
100
+ Produce a structured **Context Summary Block** to prepend to the agent's task prompt:
101
+
102
+ ```markdown
103
+ ## Context Package — <feature-slug> / <stage>
104
+ **Generated:** <ISO-timestamp>
105
+ **Curated for:** @<AgentName>
106
+
107
+ ### Active Task
108
+ <One sentence describing what the agent must do right now>
109
+
110
+ ### Key Constraints (from Intent + project-config)
111
+ - <constraint 1>
112
+ - <constraint 2>
113
+ - <constraint 3>
114
+
115
+ ### Upstream Decision Summary
116
+ - **<PRD/Arch/Plan>:** <one sentence summarising the key decision>
117
+ - **Gate status:** <gate_name>: approved | pending
118
+
119
+ ### Files in Scope
120
+ - `<file path>` — <what it does / why it's relevant>
121
+ - `<file path>` — <what it does / why it's relevant>
122
+
123
+ ### Do NOT touch
124
+ - `<file/module>` — <reason>
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Step 5 — Validate the Package
130
+
131
+ Before handing the context package to the agent, verify:
132
+
133
+ - [ ] Total context fits comfortably within the model's context window (leave 40% headroom for the agent's output)
134
+ - [ ] No superseded artefacts included (check `agent-docs/ARTIFACTS.md` for supersession notes)
135
+ - [ ] No sensitive data (credentials, PII) included in the package
136
+ - [ ] All required Tier 1 items are present
137
+
138
+ If context still exceeds the window after compression:
139
+ 1. Drop all Tier 3 items
140
+ 2. Summarise Tier 2 architecture doc to section headings only
141
+ 3. If still too large — split the task into smaller sub-tasks and curate one context package per sub-task
142
+
143
+ ---
144
+
145
+ ## Supersession Check
146
+
147
+ Before including any artefact, check `agent-docs/ARTIFACTS.md`:
148
+ - If the artefact is listed as `superseded_by: <newer-file>`, use the newer file instead
149
+ - Never include a superseded artefact in a context package
150
+
151
+ ---
152
+
153
+ ## Output
154
+
155
+ The Context Curator does not produce a persistent artefact. It produces an in-memory Context Summary Block that is passed to the downstream agent as the first section of their task prompt.
156
+
157
+ If the Context Curator is run by the Orchestrator, the Orchestrator prepends the Context Summary Block to the routing message sent to the next agent.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: cross-review
3
+ description: Cross-vendor code review of the current diff — a second-vendor model (DeepSeek/GLM/any OpenAI-compatible endpoint) reviews your changes to catch bugs a same-vendor reviewer misses
4
+ ---
5
+
6
+ # /caddis:cross-review — a second-vendor set of eyes on your diff
7
+
8
+ Run a cross-vendor review of the current changes with a DIFFERENT model family than the one that wrote them
9
+ (default **DeepSeek** — the cheapest + most architecturally distinct-from-Claude option). Use after a phase
10
+ is green and before you commit, or for a second opinion on a risky diff. This is the *cross-vendor*
11
+ complement to `/caddis:code-review`, not a replacement.
12
+
13
+ ## Prerequisite (one-time)
14
+ A provider key must be resolvable. Precedence: `REVIEW_API_KEY` > the provider's own env var
15
+ (`DEEPSEEK_API_KEY` / `GLM_API_KEY`) > `OSS_API_KEY` > the keys file (`~/.claudster/keys.env`,
16
+ overridable via `CADDIS_KEYS_FILE`). If your keys file is populated, no env setup is needed.
17
+ Details: the `coding/cross-review` skill and the **Providers & keys** guide.
18
+
19
+ ## Run it
20
+ The tool ships at `.github/tools/oss_review.py` (stdlib-only, no install):
21
+ ```
22
+ python .github/tools/oss_review.py # DeepSeek eyes (default)
23
+ python .github/tools/oss_review.py --provider glm # GLM eyes
24
+ python .github/tools/oss_review.py --range $ARGUMENTS # review a git range, e.g. origin/main..HEAD
25
+ ```
26
+ Optional: `--base-url <url>`, `--model <id>` (env always overrides the preset).
27
+ **Alternate the provider between reviews** (DeepSeek one diff, GLM the next) — different model
28
+ families have different blind spots, and alternation maximizes what the pair catches over time.
29
+
30
+ ## Interpret the exit code
31
+ - **0 — REVIEW: CLEAN** → no blocking issues. Proceed.
32
+ - **1 — REVIEW: BLOCKING** → read the printed findings, then **FIX each blocking item** (or explicitly
33
+ justify why one is a false positive). Re-run until CLEAN.
34
+ - **2 — error** → no verdict parsed, or a git/endpoint failure. Read stderr; do NOT treat as clean.
35
+ - **3 — misconfigured** → `REVIEW_API_KEY` is unset. Set it (see Prerequisite) and re-run.
36
+
37
+ ## Rules
38
+ - Read-only second opinion — the tool never edits, commits, or pushes. YOU apply fixes in the main thread.
39
+ - Treat exit 2/3 as blocking-unknown, never as approval (the tool is fail-closed by design).
40
+ - A different vendor means a different style; weigh its findings on merit, don't cargo-cult them.