@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.
- package/LICENSE +21 -0
- package/README.md +150 -1
- package/bundles/antigravity-plugin/agents/code-reviewer.md +47 -0
- package/bundles/antigravity-plugin/agents/preflight.md +53 -0
- package/bundles/antigravity-plugin/guard_agy.py +338 -0
- package/bundles/antigravity-plugin/hooks.json +36 -0
- package/bundles/antigravity-plugin/mcp_config.json +8 -0
- package/bundles/antigravity-plugin/mcp_ping_server.py +55 -0
- package/bundles/antigravity-plugin/plugin.json +5 -0
- package/bundles/antigravity-plugin/session_end_agy.py +57 -0
- package/bundles/antigravity-plugin/skills/_registry.md +115 -0
- package/bundles/antigravity-plugin/skills/add-rules/SKILL.md +45 -0
- package/bundles/antigravity-plugin/skills/api-design/SKILL.md +249 -0
- package/bundles/antigravity-plugin/skills/backend-development/SKILL.md +305 -0
- package/bundles/antigravity-plugin/skills/best-practices/SKILL.md +500 -0
- package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +263 -0
- package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +326 -0
- package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +245 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/anti-patterns.md +571 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/before-after-examples.md +1114 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/best-practices-guide.md +513 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/common-workflows.md +692 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/prompt-patterns.md +547 -0
- package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +57 -0
- package/bundles/antigravity-plugin/skills/ci-cd-pipeline/SKILL.md +315 -0
- package/bundles/antigravity-plugin/skills/code-documentation/SKILL.md +271 -0
- package/bundles/antigravity-plugin/skills/code-review/SKILL.md +122 -0
- package/bundles/antigravity-plugin/skills/codebase-audit/SKILL.md +204 -0
- package/bundles/antigravity-plugin/skills/context-curator/SKILL.md +157 -0
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +40 -0
- package/bundles/antigravity-plugin/skills/css-architecture/SKILL.md +305 -0
- package/bundles/antigravity-plugin/skills/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
- package/bundles/antigravity-plugin/skills/database-design/SKILL.md +177 -0
- package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +148 -0
- package/bundles/antigravity-plugin/skills/db-diagram/scripts/sql_to_graph.py +1212 -0
- package/bundles/antigravity-plugin/skills/digress/SKILL.md +61 -0
- package/bundles/antigravity-plugin/skills/draw-io/SKILL.md +162 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/aws-icons.md +677 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/layout-guidelines.md +142 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/troubleshooting.md +118 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/workflows.md +103 -0
- package/bundles/antigravity-plugin/skills/draw-io/scripts/convert-drawio-to-png.sh +25 -0
- package/bundles/antigravity-plugin/skills/draw-io/scripts/find_aws_icon.py +79 -0
- package/bundles/antigravity-plugin/skills/error-handling/SKILL.md +260 -0
- package/bundles/antigravity-plugin/skills/excalidraw-db/SKILL.md +38 -0
- package/bundles/antigravity-plugin/skills/fastapi-dev/SKILL.md +300 -0
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +198 -0
- package/bundles/antigravity-plugin/skills/frontend-design/SKILL.md +193 -0
- package/bundles/antigravity-plugin/skills/frontend-design/references/my-tech-stack.md +127 -0
- package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +195 -0
- package/bundles/antigravity-plugin/skills/git-commit/SKILL.md +285 -0
- package/bundles/antigravity-plugin/skills/golden-plan/SKILL.md +577 -0
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +100 -0
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +114 -0
- package/bundles/antigravity-plugin/skills/javascript-typescript/SKILL.md +142 -0
- package/bundles/antigravity-plugin/skills/kb/SKILL.md +60 -0
- package/bundles/antigravity-plugin/skills/mermaid-db/SKILL.md +33 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/SKILL.md +236 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/advanced-features.md +556 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/architecture-diagrams.md +192 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/c4-diagrams.md +410 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/class-diagrams.md +361 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/erd-diagrams.md +510 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/flowcharts.md +450 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/sequence-diagrams.md +394 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/troubleshooting.md +335 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/workflows.md +418 -0
- package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +68 -0
- package/bundles/antigravity-plugin/skills/mockup/SKILL.md +242 -0
- package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +243 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/canvas-utils.ts +171 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/dot-field.template.tsx +203 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/flow-field.template.tsx +263 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/node-shape.template.tsx +261 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/shape-sampler.ts +281 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/stipple-morph.template.tsx +167 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/stipple.template.tsx +175 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/trail-ghost.template.tsx +266 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/usage-examples.md +320 -0
- package/bundles/antigravity-plugin/skills/playwright/API_REFERENCE.md +653 -0
- package/bundles/antigravity-plugin/skills/playwright/SKILL.md +454 -0
- package/bundles/antigravity-plugin/skills/playwright/lib/helpers.js +441 -0
- package/bundles/antigravity-plugin/skills/playwright/package.json +26 -0
- package/bundles/antigravity-plugin/skills/playwright/run.js +228 -0
- package/bundles/antigravity-plugin/skills/prd/SKILL.md +107 -0
- package/bundles/antigravity-plugin/skills/preflight/SKILL.md +435 -0
- package/bundles/antigravity-plugin/skills/python/SKILL.md +388 -0
- package/bundles/antigravity-plugin/skills/react-best-practices/SKILL.md +269 -0
- package/bundles/antigravity-plugin/skills/react-dev/README.md +404 -0
- package/bundles/antigravity-plugin/skills/react-dev/SKILL.md +459 -0
- package/bundles/antigravity-plugin/skills/react-dev/examples/generic-components.md +579 -0
- package/bundles/antigravity-plugin/skills/react-dev/examples/server-components.md +579 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/event-handlers.md +574 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/hooks.md +456 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/react-19-patterns.md +638 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/react-router.md +1002 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/tanstack-router.md +587 -0
- package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +486 -0
- package/bundles/antigravity-plugin/skills/resume/SKILL.md +36 -0
- package/bundles/antigravity-plugin/skills/security-review/SKILL.md +196 -0
- package/bundles/antigravity-plugin/skills/setup-project-ai/SKILL.md +61 -0
- package/bundles/antigravity-plugin/skills/ship/SKILL.md +107 -0
- package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +103 -0
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +102 -0
- package/bundles/antigravity-plugin/skills/skill-creator/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin/skills/skill-creator/SKILL.md +491 -0
- package/bundles/antigravity-plugin/skills/skill-creator/agents/analyzer.md +274 -0
- package/bundles/antigravity-plugin/skills/skill-creator/agents/comparator.md +202 -0
- package/bundles/antigravity-plugin/skills/skill-creator/agents/grader.md +223 -0
- package/bundles/antigravity-plugin/skills/skill-creator/assets/eval_review.html +146 -0
- package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bundles/antigravity-plugin/skills/skill-creator/references/schemas.md +430 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/__init__.py +0 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/generate_report.py +326 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/improve_description.py +247 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/package_skill.py +136 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_eval.py +310 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_loop.py +328 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/utils.py +47 -0
- package/bundles/antigravity-plugin/skills/sql/SKILL.md +321 -0
- package/bundles/antigravity-plugin/skills/tdd/SKILL.md +37 -0
- package/bundles/antigravity-plugin/skills/tdd-workflow/SKILL.md +188 -0
- package/bundles/antigravity-plugin/skills/technical-writing/SKILL.md +286 -0
- package/bundles/antigravity-plugin/skills/test-strategy/SKILL.md +155 -0
- package/bundles/antigravity-plugin/skills/ui-brief/SKILL.md +84 -0
- package/bundles/antigravity-plugin/skills/ui-review/SKILL.md +176 -0
- package/bundles/antigravity-plugin/skills/ui-review/references/framework-fixes.md +471 -0
- package/bundles/antigravity-plugin/skills/ui-review/references/visual-checklist.md +236 -0
- package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +77 -0
- package/bundles/antigravity-plugin/skills/use-model/SKILL.md +64 -0
- package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +217 -0
- package/bundles/antigravity-plugin/skills/version/SKILL.md +18 -0
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +732 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/SKILL.md +97 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/examples/console_logging.py +35 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/scripts/with_server.py +106 -0
- package/bundles/antigravity-plugin/skills/windows-deployment/SKILL.md +880 -0
- package/bundles/antigravity-plugin/skills/writing-plans/SKILL.md +384 -0
- package/bundles/antigravity-plugin/statusline-command-agy.sh +91 -0
- package/bundles/antigravity-plugin/warm_start_agy.py +149 -0
- package/bundles/manifest.json +6 -0
- package/dist/cli.js +5363 -0
- package/package.json +61 -4
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: digress
|
|
3
|
+
description: Park the current workstream on the stack and switch to a new task — without losing the original
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /caddis:digress — park the current task, switch, never lose the thread
|
|
7
|
+
|
|
8
|
+
You are about to leave the current task for a related-but-different one (a design decision, a sub-feature,
|
|
9
|
+
or a blocker that must be fixed first). This command **records the original task on a workstream stack** so
|
|
10
|
+
neither you nor the user has to remember and re-state it later — `/resume` pops it back with its exact
|
|
11
|
+
resume point, and every SessionStart surfaces it (`⛏ Parked workstream: …`).
|
|
12
|
+
|
|
13
|
+
The reason for the detour is **$ARGUMENTS** (if empty, derive a one-line reason yourself from what the
|
|
14
|
+
user just asked for).
|
|
15
|
+
|
|
16
|
+
## Step 1 — identify the CURRENT workstream (the thing being parked)
|
|
17
|
+
Determine the active plan, in this order:
|
|
18
|
+
1. The `.caddis/plans/*.md` this session has been executing.
|
|
19
|
+
2. Else the plan named in `.caddis/relay.md`'s `## Next step`.
|
|
20
|
+
3. Else — and ONLY if still ambiguous — ask the user which plan to park. This is the **single permitted
|
|
21
|
+
question**; do not ask anything else.
|
|
22
|
+
|
|
23
|
+
Read that plan's `## Tracker` (or its phase headings) to find the **current phase** (the in-progress or
|
|
24
|
+
next-not-started one).
|
|
25
|
+
|
|
26
|
+
## Step 2 — write a one-line `resumePointer`
|
|
27
|
+
The single next concrete action for the parked task — copy it from the plan's Tracker or from relay.md's
|
|
28
|
+
`## Next step`. Example: `next: wire the parser to the staging table (see plan Tracker row 2)`.
|
|
29
|
+
|
|
30
|
+
## Step 3 — push the frame onto `.caddis/workstreams.json`
|
|
31
|
+
The state file is a JSON object `{"version": 1, "stack": [ … ]}`; `stack` is LIFO (last element = most
|
|
32
|
+
recently parked). Each frame has exactly these fields:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"plan": ".caddis/plans/<slug>.md",
|
|
37
|
+
"phase": "<current phase>",
|
|
38
|
+
"resumePointer": "<the one-line next action from Step 2>",
|
|
39
|
+
"reason": "<$ARGUMENTS or your derived one-liner>",
|
|
40
|
+
"repo": null,
|
|
41
|
+
"pushedAt": "<now, ISO-8601 UTC>"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- `repo`: `null` means "the plan lives in THIS repo". If the parked plan lives in a **different** repo, set
|
|
46
|
+
`repo` to that repo's absolute path (the digression spanned repos).
|
|
47
|
+
- Read the file (create `{"version": 1, "stack": []}` if absent). **Idempotency guard:** if the
|
|
48
|
+
top-of-stack frame's `plan` already equals the plan you are parking, UPDATE that frame in place (refresh
|
|
49
|
+
`phase`, `resumePointer`, `reason`, `pushedAt`) instead of pushing a duplicate. Otherwise APPEND the new
|
|
50
|
+
frame. Preserve any unknown fields already present. Write the whole file back (pretty-printed is fine).
|
|
51
|
+
|
|
52
|
+
## Step 4 — confirm, then continue
|
|
53
|
+
Tell the user: `Parked: <plan> @ <phase>. Now switching to: <the new task>.` Then proceed with whatever the
|
|
54
|
+
user asked — the digression IS the new work.
|
|
55
|
+
|
|
56
|
+
## Rules
|
|
57
|
+
- **Never** run a destructive or history-rewriting git action (no `git checkout`, `git reset`, `git stash`,
|
|
58
|
+
branch switches). Parking is metadata-only; the working tree is untouched.
|
|
59
|
+
- Only real paths and verified facts in the frame. If you truly cannot determine the phase, write `"?"` —
|
|
60
|
+
never invent one.
|
|
61
|
+
- This command records state and switches focus; it does not commit code.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: draw-io
|
|
3
|
+
context: fork
|
|
4
|
+
description: draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# draw.io Diagram Skill
|
|
8
|
+
|
|
9
|
+
**Works with:** Any AI coding agent (Claude, Cursor, GitHub Copilot, Windsurf, etc.)
|
|
10
|
+
|
|
11
|
+
## Quick Reference
|
|
12
|
+
|
|
13
|
+
| Task | Command |
|
|
14
|
+
|------|---------|
|
|
15
|
+
| Convert to PNG | `bash scripts/convert-drawio-to-png.sh file.drawio` |
|
|
16
|
+
| Find AWS icon | `python scripts/find_aws_icon.py ec2` |
|
|
17
|
+
| List all icons | `python scripts/find_aws_icon.py --list-all` |
|
|
18
|
+
| Direct export | `drawio -x -f png -s 2 -t -o out.png in.drawio` |
|
|
19
|
+
|
|
20
|
+
## Core Rules
|
|
21
|
+
|
|
22
|
+
### File Handling
|
|
23
|
+
- Edit only `.drawio` files (XML format)
|
|
24
|
+
- Never edit `.drawio.png` directly
|
|
25
|
+
- Always verify PNG output after changes
|
|
26
|
+
- After edits, validate XML structure before handing off
|
|
27
|
+
|
|
28
|
+
### Fonts
|
|
29
|
+
- Set `defaultFontFamily` in `<mxGraphModel>` tag
|
|
30
|
+
- Set `fontFamily` in each text element's style
|
|
31
|
+
- Use 18px+ for presentations, 14px minimum
|
|
32
|
+
|
|
33
|
+
### Background
|
|
34
|
+
- Remove `background="#ffffff"` attribute
|
|
35
|
+
- Use `page="0"` for transparent background
|
|
36
|
+
|
|
37
|
+
### Arrows
|
|
38
|
+
- **Critical**: Place arrows after title, before other elements
|
|
39
|
+
- Maintain 20px clearance from labels
|
|
40
|
+
- Use explicit coordinates for text element connections
|
|
41
|
+
- For flow edges, set explicit arrowheads and stroke styling:
|
|
42
|
+
- `endArrow=block;endFill=1`
|
|
43
|
+
- `strokeColor=<visible color>;strokeWidth>=1`
|
|
44
|
+
|
|
45
|
+
### XML Structure (Critical)
|
|
46
|
+
- **Never nest `mxCell` inside another `mxCell`; all `mxCell` entries must be direct children of `<root>`.**
|
|
47
|
+
- **Edge labels must be separate sibling `mxCell` nodes with `parent` set to the edge id.**
|
|
48
|
+
- Keep only geometry/content tags (for example `mxGeometry`) inside a given `mxCell`.
|
|
49
|
+
|
|
50
|
+
### Viewport and Coordinates
|
|
51
|
+
- Use sane viewport defaults: keep `dx`/`dy` near 0.
|
|
52
|
+
- Ensure page dimensions cover the full drawing bounds (`pageWidth`/`pageHeight` large enough).
|
|
53
|
+
- Keep nodes/points in positive in-canvas coordinates unless there is an explicit reason not to.
|
|
54
|
+
- If a diagram opens off-screen, normalize coordinates and reset `dx`/`dy` before finalizing.
|
|
55
|
+
|
|
56
|
+
### Container Margins
|
|
57
|
+
- **Must**: 30px minimum margin from frame boundaries
|
|
58
|
+
- Calculate: element top ≥ frame.y + 30
|
|
59
|
+
- Calculate: element bottom ≤ frame.y + frame.height - 30
|
|
60
|
+
|
|
61
|
+
### Text Width
|
|
62
|
+
- English: ~10px per character + 20px padding
|
|
63
|
+
- For "Application Server" (18 chars): ~200px width
|
|
64
|
+
|
|
65
|
+
## XML Structure
|
|
66
|
+
|
|
67
|
+
```xml
|
|
68
|
+
<mxGraphModel defaultFontFamily="Arial" page="0">
|
|
69
|
+
<!-- Title (always first) -->
|
|
70
|
+
<mxCell id="title" value="Diagram Title" .../>
|
|
71
|
+
|
|
72
|
+
<!-- Arrows (back layer) -->
|
|
73
|
+
<mxCell id="arrow1" style="edgeStyle=..." edge="1">
|
|
74
|
+
<mxGeometry relative="1">
|
|
75
|
+
<mxPoint x="100" y="200" as="sourcePoint"/>
|
|
76
|
+
<mxPoint x="500" y="200" as="targetPoint"/>
|
|
77
|
+
</mxGeometry>
|
|
78
|
+
</mxCell>
|
|
79
|
+
|
|
80
|
+
<!-- Elements (front layer) -->
|
|
81
|
+
<mxCell id="box1" .../>
|
|
82
|
+
</mxGraphModel>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## AWS Icons
|
|
86
|
+
|
|
87
|
+
Use latest `mxgraph.aws4.*` icons:
|
|
88
|
+
|
|
89
|
+
```xml
|
|
90
|
+
<!-- Resource icon -->
|
|
91
|
+
style="shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ec2;"
|
|
92
|
+
|
|
93
|
+
<!-- Official names -->
|
|
94
|
+
value="Amazon ECS" <!-- Not "ECS" -->
|
|
95
|
+
value="AWS Lambda" <!-- Not "Lambda" -->
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Find icons: `python scripts/find_aws_icon.py <service>`
|
|
99
|
+
|
|
100
|
+
## Layout Calculations
|
|
101
|
+
|
|
102
|
+
**Align elements vertically:**
|
|
103
|
+
```
|
|
104
|
+
Box 1: y=100, height=80 → center = y + h/2 = 140
|
|
105
|
+
Box 2: y=120, height=40 → center = y + h/2 = 140
|
|
106
|
+
Result: Aligned ✓
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Container margin check:**
|
|
110
|
+
```
|
|
111
|
+
Frame: y=20, height=400 → range 20-420
|
|
112
|
+
Element: y=50 → margin from top = 50-20 = 30px ✓
|
|
113
|
+
Element: y+h=390 → margin from bottom = 420-390 = 30px ✓
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Common Fixes
|
|
117
|
+
|
|
118
|
+
**Overlapping arrows:** Move arrow XML after title, before elements
|
|
119
|
+
**Text cut off:** Increase `width` in mxGeometry
|
|
120
|
+
**No PNG output:** Check `drawio --version`, install if missing
|
|
121
|
+
**Element overflow:** Verify 30px margins from container
|
|
122
|
+
**Could not add object for mxCell:** flatten malformed nested `mxCell` nodes into root-level siblings
|
|
123
|
+
**Diagram opens out of sight:** reset `dx`/`dy` close to 0 and move all key geometries to positive coordinates
|
|
124
|
+
**Arrows not visible:** add `endArrow=block;endFill=1` and explicit `strokeColor` on each flow edge
|
|
125
|
+
|
|
126
|
+
## Required Validation (Post-Edit)
|
|
127
|
+
|
|
128
|
+
Run these checks after every `.drawio` XML edit:
|
|
129
|
+
|
|
130
|
+
1. **Well-formed XML parse**
|
|
131
|
+
- Parse the file with an XML parser and ensure no syntax errors.
|
|
132
|
+
2. **Nested-`mxCell` structural check**
|
|
133
|
+
- Confirm no `mxCell` contains a child `mxCell`.
|
|
134
|
+
3. **Viewport/canvas sanity check**
|
|
135
|
+
- Verify `dx`/`dy` are sane and geometry coordinates are not unintentionally far negative.
|
|
136
|
+
4. **Edge visibility check**
|
|
137
|
+
- For flow diagrams, confirm edges include explicit arrowheads and visible stroke colors.
|
|
138
|
+
5. **Visual open test**
|
|
139
|
+
- Open in draw.io and ensure diagram is visible at normal zoom without manual panning.
|
|
140
|
+
|
|
141
|
+
## Quality Checklist
|
|
142
|
+
|
|
143
|
+
- [ ] `page="0"` (no background)
|
|
144
|
+
- [ ] Font size 18px+ for presentations
|
|
145
|
+
- [ ] Arrows at back layer
|
|
146
|
+
- [ ] Flow edges use explicit arrowheads (`endArrow=block;endFill=1`) and visible stroke colors
|
|
147
|
+
- [ ] 30px+ margins from frames
|
|
148
|
+
- [ ] No nested `mxCell` nodes (all cells are root-level siblings)
|
|
149
|
+
- [ ] Edge labels are sibling `mxCell` nodes with `parent=<edge_id>`
|
|
150
|
+
- [ ] `dx`/`dy` near 0 and page size fits diagram bounds
|
|
151
|
+
- [ ] Main nodes/points are in positive in-canvas coordinates
|
|
152
|
+
- [ ] Official service names (Amazon ECS, AWS Lambda)
|
|
153
|
+
- [ ] Latest icons (aws4, not aws3)
|
|
154
|
+
- [ ] PNG visually verified
|
|
155
|
+
|
|
156
|
+
## Extended Documentation
|
|
157
|
+
|
|
158
|
+
See `references/` directory for:
|
|
159
|
+
- Layout patterns and best practices
|
|
160
|
+
- Complete AWS icon catalog
|
|
161
|
+
- Detailed troubleshooting
|
|
162
|
+
- CI/CD integration examples
|