@caddis/cli 0.3.0 → 0.4.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/bundles/antigravity-plugin/agents/knowledge-transfer.md +17 -32
- package/bundles/antigravity-plugin/caddis_statusline.py +25 -3
- package/bundles/antigravity-plugin/guard_agy.py +41 -9
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/caddis_inventory.py +73 -3
- package/bundles/antigravity-plugin/scripts/caddis_statusline.py +25 -3
- package/bundles/antigravity-plugin/scripts/claudster_config.py +0 -5
- package/bundles/antigravity-plugin/scripts/hook_log.py +1 -1
- package/bundles/antigravity-plugin/scripts/new-machine.ps1 +170 -0
- package/bundles/antigravity-plugin/scripts/oss_ask.py +1 -1
- package/bundles/antigravity-plugin/scripts/oss_model.py +10 -2
- package/bundles/antigravity-plugin/scripts/oss_review.py +1 -1
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +9 -6
- package/bundles/antigravity-plugin/session_end_agy.py +31 -6
- package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +44 -0
- package/bundles/antigravity-plugin/skills/code-review/SKILL.md +11 -0
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +21 -0
- package/bundles/antigravity-plugin/skills/gate-review/SKILL.md +11 -0
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +36 -0
- package/bundles/antigravity-plugin/skills/security-review/SKILL.md +9 -0
- package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +31 -0
- package/bundles/antigravity-plugin/warm_start_agy.py +96 -9
- package/bundles/antigravity-plugin-extras/plugin.json +1 -1
- package/bundles/codex/.codex/config.toml.example +36 -0
- package/bundles/codex/.codex/skills/coding/api-design/SKILL.md +249 -0
- package/bundles/codex/.codex/skills/coding/backend-development/SKILL.md +305 -0
- package/bundles/codex/.codex/skills/coding/code-review/SKILL.md +140 -0
- package/bundles/codex/.codex/skills/coding/codebase-audit/SKILL.md +204 -0
- package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/SKILL.md +132 -0
- package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/scripts/perf_sweep.py +249 -0
- package/bundles/codex/.codex/skills/coding/error-handling/SKILL.md +260 -0
- package/bundles/codex/.codex/skills/coding/fastapi-dev/SKILL.md +300 -0
- package/bundles/codex/.codex/skills/coding/javascript-typescript/SKILL.md +142 -0
- package/bundles/codex/.codex/skills/coding/python/SKILL.md +388 -0
- package/bundles/codex/.codex/skills/coding/refactoring/SKILL.md +486 -0
- package/bundles/codex/.codex/skills/coding/security-review/SKILL.md +205 -0
- package/bundles/codex/.codex/skills/coding/sql/SKILL.md +321 -0
- package/bundles/codex/.codex/skills/data/database-design/SKILL.md +177 -0
- package/bundles/codex/.codex/skills/data/db-diagram/SKILL.md +148 -0
- package/bundles/codex/.codex/skills/data/db-diagram/scripts/sql_to_graph.py +1212 -0
- package/bundles/codex/.codex/skills/devops/ci-cd-pipeline/SKILL.md +315 -0
- package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +195 -0
- package/bundles/codex/.codex/skills/devops/git-commit/SKILL.md +285 -0
- package/bundles/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +217 -0
- package/bundles/codex/.codex/skills/devops/windows-deployment/SKILL.md +880 -0
- package/bundles/codex/.codex/skills/docs/code-documentation/SKILL.md +271 -0
- package/bundles/codex/.codex/skills/docs/explainer-doc/SKILL.md +97 -0
- package/bundles/codex/.codex/skills/docs/technical-writing/SKILL.md +286 -0
- package/bundles/codex/.codex/skills/docs/writing-plans/SKILL.md +387 -0
- package/bundles/codex/.codex/skills/frontend/css-architecture/SKILL.md +305 -0
- package/bundles/codex/.codex/skills/frontend/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
- package/bundles/codex/.codex/skills/frontend/frontend-design/SKILL.md +193 -0
- package/bundles/codex/.codex/skills/frontend/frontend-design/references/my-tech-stack.md +127 -0
- package/bundles/codex/.codex/skills/frontend/mockup/SKILL.md +242 -0
- package/bundles/codex/.codex/skills/frontend/react-best-practices/SKILL.md +269 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/README.md +404 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/SKILL.md +459 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/examples/generic-components.md +579 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/examples/server-components.md +579 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/references/event-handlers.md +574 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/references/hooks.md +456 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/references/react-19-patterns.md +638 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/references/react-router.md +1002 -0
- package/bundles/codex/.codex/skills/frontend/react-dev/references/tanstack-router.md +587 -0
- package/bundles/codex/.codex/skills/frontend/ui-review/SKILL.md +176 -0
- package/bundles/codex/.codex/skills/frontend/ui-review/references/framework-fixes.md +471 -0
- package/bundles/codex/.codex/skills/frontend/ui-review/references/visual-checklist.md +236 -0
- package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
- package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
- package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/SKILL.md +732 -0
- package/bundles/codex/.codex/skills/media/draw-io/SKILL.md +162 -0
- package/bundles/codex/.codex/skills/media/draw-io/references/aws-icons.md +677 -0
- package/bundles/codex/.codex/skills/media/draw-io/references/layout-guidelines.md +142 -0
- package/bundles/codex/.codex/skills/media/draw-io/references/troubleshooting.md +118 -0
- package/bundles/codex/.codex/skills/media/draw-io/references/workflows.md +103 -0
- package/bundles/codex/.codex/skills/media/draw-io/scripts/convert-drawio-to-png.sh +25 -0
- package/bundles/codex/.codex/skills/media/draw-io/scripts/find_aws_icon.py +79 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/SKILL.md +292 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/advanced-features.md +556 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/architecture-diagrams.md +192 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/c4-diagrams.md +410 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/class-diagrams.md +361 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/erd-diagrams.md +510 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/flowcharts.md +450 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/sequence-diagrams.md +394 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/troubleshooting.md +335 -0
- package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/workflows.md +418 -0
- package/bundles/codex/.codex/skills/media/particle-art/SKILL.md +243 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/canvas-utils.ts +171 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/dot-field.template.tsx +203 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/flow-field.template.tsx +263 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/node-shape.template.tsx +261 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/shape-sampler.ts +281 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/stipple-morph.template.tsx +167 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/stipple.template.tsx +175 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/trail-ghost.template.tsx +266 -0
- package/bundles/codex/.codex/skills/media/particle-art/references/usage-examples.md +320 -0
- package/bundles/codex/.codex/skills/testing/playwright/API_REFERENCE.md +653 -0
- package/bundles/codex/.codex/skills/testing/playwright/SKILL.md +454 -0
- package/bundles/codex/.codex/skills/testing/playwright/lib/helpers.js +441 -0
- package/bundles/codex/.codex/skills/testing/playwright/package.json +26 -0
- package/bundles/codex/.codex/skills/testing/playwright/run.js +228 -0
- package/bundles/codex/.codex/skills/testing/tdd-workflow/SKILL.md +188 -0
- package/bundles/codex/.codex/skills/testing/test-strategy/SKILL.md +155 -0
- package/bundles/codex/.codex/skills/testing/webapp-testing/LICENSE.txt +202 -0
- package/bundles/codex/.codex/skills/testing/webapp-testing/SKILL.md +97 -0
- package/bundles/codex/.codex/skills/testing/webapp-testing/examples/console_logging.py +35 -0
- package/bundles/codex/.codex/skills/testing/webapp-testing/examples/element_discovery.py +40 -0
- package/bundles/codex/.codex/skills/testing/webapp-testing/examples/static_html_automation.py +33 -0
- package/bundles/codex/.codex/skills/testing/webapp-testing/scripts/with_server.py +106 -0
- package/bundles/codex/.codex/skills/workflow/advisory-hub/SKILL.md +227 -0
- package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/context-template.md +214 -0
- package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/hub-handbook.md +233 -0
- package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/report-contract.md +94 -0
- package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/succession.md +118 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/SKILL.md +500 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/agents/best-practices-referencer.md +263 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/agents/codebase-context-builder.md +326 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/agents/task-intent-analyzer.md +245 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/references/anti-patterns.md +571 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/references/before-after-examples.md +1114 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/references/best-practices-guide.md +513 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/references/common-workflows.md +692 -0
- package/bundles/codex/.codex/skills/workflow/best-practices/references/prompt-patterns.md +547 -0
- package/bundles/codex/.codex/skills/workflow/brainstorming/SKILL.md +57 -0
- package/bundles/codex/.codex/skills/workflow/context-curator/SKILL.md +157 -0
- package/bundles/codex/.codex/skills/workflow/golden-plan/SKILL.md +586 -0
- package/bundles/codex/.codex/skills/workflow/preflight/SKILL.md +440 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/LICENSE.txt +202 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/SKILL.md +491 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/agents/analyzer.md +274 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/agents/comparator.md +202 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/agents/grader.md +223 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/assets/eval_review.html +146 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/references/schemas.md +430 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/__init__.py +0 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/generate_report.py +326 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/improve_description.py +247 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/package_skill.py +136 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/quick_validate.py +103 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_eval.py +310 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_loop.py +328 -0
- package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/utils.py +47 -0
- package/bundles/codex/AGENTS.md +146 -0
- package/bundles/manifest.json +4 -3
- package/dist/claude-deepseek.js +2 -2
- package/dist/claude-glm.js +2 -2
- package/dist/claude-oss.js +2 -2
- package/dist/cli.js +187 -56
- package/package.json +1 -1
- package/bundles/antigravity-plugin/scripts/dream_capture.py +0 -249
- package/bundles/antigravity-plugin/scripts/dream_memory.py +0 -438
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +0 -94
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +0 -93
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-documentation
|
|
3
|
+
description: Writing effective code documentation - API docs, README files, inline comments, and technical guides. Use for documenting codebases, APIs, or writing developer guides.
|
|
4
|
+
source: wshobson/agents
|
|
5
|
+
license: MIT
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Code Documentation
|
|
9
|
+
|
|
10
|
+
## Document Metadata
|
|
11
|
+
|
|
12
|
+
For standalone Markdown docs such as README files, guides, ADRs, and API reference pages, apply `.github/instructions/document-frontmatter.instructions.md` before the first heading.
|
|
13
|
+
|
|
14
|
+
- **New docs**: add `Original Author`, `Creation Date`, and `Creating Model`.
|
|
15
|
+
- **Updated docs**: preserve the original fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
|
|
16
|
+
- Use full ISO 8601 UTC timestamps for `Creation Date` and `Last Updated` values.
|
|
17
|
+
|
|
18
|
+
## README Structure
|
|
19
|
+
|
|
20
|
+
### Standard README Template
|
|
21
|
+
```markdown
|
|
22
|
+
# Project Name
|
|
23
|
+
|
|
24
|
+
Brief description of what this project does.
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
\`\`\`bash
|
|
29
|
+
npm install
|
|
30
|
+
npm run dev
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
Detailed installation instructions...
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
\`\`\`typescript
|
|
40
|
+
import { something } from 'project';
|
|
41
|
+
|
|
42
|
+
// Example usage
|
|
43
|
+
const result = something.doThing();
|
|
44
|
+
\`\`\`
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### `functionName(param: Type): ReturnType`
|
|
49
|
+
|
|
50
|
+
Description of what the function does.
|
|
51
|
+
|
|
52
|
+
**Parameters:**
|
|
53
|
+
- `param` - Description of parameter
|
|
54
|
+
|
|
55
|
+
**Returns:** Description of return value
|
|
56
|
+
|
|
57
|
+
**Example:**
|
|
58
|
+
\`\`\`typescript
|
|
59
|
+
const result = functionName('value');
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
## Configuration
|
|
63
|
+
|
|
64
|
+
| Option | Type | Default | Description |
|
|
65
|
+
|--------|------|---------|-------------|
|
|
66
|
+
| `option1` | `string` | `'default'` | What it does |
|
|
67
|
+
|
|
68
|
+
## Contributing
|
|
69
|
+
|
|
70
|
+
How to contribute...
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## API Documentation
|
|
78
|
+
|
|
79
|
+
### JSDoc/TSDoc Style
|
|
80
|
+
```typescript
|
|
81
|
+
/**
|
|
82
|
+
* Creates a new user account.
|
|
83
|
+
*
|
|
84
|
+
* @param userData - The user data for account creation
|
|
85
|
+
* @param options - Optional configuration
|
|
86
|
+
* @returns The created user object
|
|
87
|
+
* @throws {ValidationError} If email is invalid
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const user = await createUser({
|
|
91
|
+
* email: 'user@example.com',
|
|
92
|
+
* name: 'John'
|
|
93
|
+
* });
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
async function createUser(
|
|
97
|
+
userData: UserInput,
|
|
98
|
+
options?: CreateOptions
|
|
99
|
+
): Promise<User> {
|
|
100
|
+
// Implementation
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Configuration options for the API client.
|
|
105
|
+
*/
|
|
106
|
+
interface ClientConfig {
|
|
107
|
+
/** The API base URL */
|
|
108
|
+
baseUrl: string;
|
|
109
|
+
/** Request timeout in milliseconds @default 5000 */
|
|
110
|
+
timeout?: number;
|
|
111
|
+
/** Custom headers to include in requests */
|
|
112
|
+
headers?: Record<string, string>;
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### OpenAPI/Swagger
|
|
117
|
+
```yaml
|
|
118
|
+
openapi: 3.0.0
|
|
119
|
+
info:
|
|
120
|
+
title: My API
|
|
121
|
+
version: 1.0.0
|
|
122
|
+
|
|
123
|
+
paths:
|
|
124
|
+
/users:
|
|
125
|
+
post:
|
|
126
|
+
summary: Create a user
|
|
127
|
+
description: Creates a new user account
|
|
128
|
+
requestBody:
|
|
129
|
+
required: true
|
|
130
|
+
content:
|
|
131
|
+
application/json:
|
|
132
|
+
schema:
|
|
133
|
+
$ref: '#/components/schemas/UserInput'
|
|
134
|
+
responses:
|
|
135
|
+
'201':
|
|
136
|
+
description: User created successfully
|
|
137
|
+
content:
|
|
138
|
+
application/json:
|
|
139
|
+
schema:
|
|
140
|
+
$ref: '#/components/schemas/User'
|
|
141
|
+
'400':
|
|
142
|
+
description: Invalid input
|
|
143
|
+
|
|
144
|
+
components:
|
|
145
|
+
schemas:
|
|
146
|
+
UserInput:
|
|
147
|
+
type: object
|
|
148
|
+
required:
|
|
149
|
+
- email
|
|
150
|
+
- name
|
|
151
|
+
properties:
|
|
152
|
+
email:
|
|
153
|
+
type: string
|
|
154
|
+
format: email
|
|
155
|
+
name:
|
|
156
|
+
type: string
|
|
157
|
+
User:
|
|
158
|
+
type: object
|
|
159
|
+
properties:
|
|
160
|
+
id:
|
|
161
|
+
type: string
|
|
162
|
+
email:
|
|
163
|
+
type: string
|
|
164
|
+
name:
|
|
165
|
+
type: string
|
|
166
|
+
createdAt:
|
|
167
|
+
type: string
|
|
168
|
+
format: date-time
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Inline Comments
|
|
172
|
+
|
|
173
|
+
### When to Comment
|
|
174
|
+
```typescript
|
|
175
|
+
// GOOD: Explain WHY, not WHAT
|
|
176
|
+
|
|
177
|
+
// Use binary search because the list is always sorted and
|
|
178
|
+
// can contain millions of items - O(log n) vs O(n)
|
|
179
|
+
const index = binarySearch(items, target);
|
|
180
|
+
|
|
181
|
+
// GOOD: Explain complex business logic
|
|
182
|
+
// Users get 20% discount if they've been members for 2+ years
|
|
183
|
+
// AND have made 10+ purchases (per marketing team decision Q4 2024)
|
|
184
|
+
if (user.memberYears >= 2 && user.purchaseCount >= 10) {
|
|
185
|
+
applyDiscount(0.2);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// GOOD: Document workarounds
|
|
189
|
+
// HACK: Safari doesn't support this API, fallback to polling
|
|
190
|
+
// TODO: Remove when Safari adds support (tracking: webkit.org/b/12345)
|
|
191
|
+
if (!window.IntersectionObserver) {
|
|
192
|
+
startPolling();
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### When NOT to Comment
|
|
197
|
+
```typescript
|
|
198
|
+
// BAD: Stating the obvious
|
|
199
|
+
// Increment counter by 1
|
|
200
|
+
counter++;
|
|
201
|
+
|
|
202
|
+
// BAD: Explaining clear code
|
|
203
|
+
// Check if user is admin
|
|
204
|
+
if (user.role === 'admin') { ... }
|
|
205
|
+
|
|
206
|
+
// BAD: Outdated comments (worse than no comment)
|
|
207
|
+
// Returns the user's full name <-- Actually returns email now!
|
|
208
|
+
function getUserIdentifier(user) {
|
|
209
|
+
return user.email;
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Architecture Documentation
|
|
214
|
+
|
|
215
|
+
### ADR (Architecture Decision Record)
|
|
216
|
+
```markdown
|
|
217
|
+
# ADR-001: Use PostgreSQL for Primary Database
|
|
218
|
+
|
|
219
|
+
## Status
|
|
220
|
+
Accepted
|
|
221
|
+
|
|
222
|
+
## Context
|
|
223
|
+
We need a database for storing user data and transactions.
|
|
224
|
+
Options considered: PostgreSQL, MySQL, MongoDB, DynamoDB.
|
|
225
|
+
|
|
226
|
+
## Decision
|
|
227
|
+
Use PostgreSQL with Supabase hosting.
|
|
228
|
+
|
|
229
|
+
## Rationale
|
|
230
|
+
- Strong ACID compliance needed for financial data
|
|
231
|
+
- Team has PostgreSQL experience
|
|
232
|
+
- Supabase provides auth and realtime features
|
|
233
|
+
- pgvector extension for future AI features
|
|
234
|
+
|
|
235
|
+
## Consequences
|
|
236
|
+
- Need to manage schema migrations
|
|
237
|
+
- May need read replicas for scale
|
|
238
|
+
- Team needs to learn Supabase-specific features
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Component Documentation
|
|
242
|
+
```markdown
|
|
243
|
+
## Authentication Module
|
|
244
|
+
|
|
245
|
+
### Overview
|
|
246
|
+
Handles user authentication using JWT tokens with refresh rotation.
|
|
247
|
+
|
|
248
|
+
### Flow
|
|
249
|
+
1. User submits credentials to `/auth/login`
|
|
250
|
+
2. Server validates and returns access + refresh tokens
|
|
251
|
+
3. Access token used for API requests (15min expiry)
|
|
252
|
+
4. Refresh token used to get new access token (7d expiry)
|
|
253
|
+
|
|
254
|
+
### Dependencies
|
|
255
|
+
- `jsonwebtoken` - Token generation/validation
|
|
256
|
+
- `bcrypt` - Password hashing
|
|
257
|
+
- `redis` - Refresh token storage
|
|
258
|
+
|
|
259
|
+
### Configuration
|
|
260
|
+
- `JWT_SECRET` - Secret for signing tokens
|
|
261
|
+
- `ACCESS_TOKEN_EXPIRY` - Access token lifetime
|
|
262
|
+
- `REFRESH_TOKEN_EXPIRY` - Refresh token lifetime
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Documentation Principles
|
|
266
|
+
|
|
267
|
+
1. **Write for your audience** - New devs vs API consumers
|
|
268
|
+
2. **Keep it close to code** - Docs in same repo, near relevant code
|
|
269
|
+
3. **Update with code** - Stale docs are worse than none
|
|
270
|
+
4. **Examples over explanations** - Show, don't just tell
|
|
271
|
+
5. **Progressive disclosure** - Quick start first, details later
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explainer-doc
|
|
3
|
+
context: fork
|
|
4
|
+
description: Write a document that hands off work to a team who did NOT do the investigation — an external vendor, another team, a contractor — and who must be able to act on it alone. Use when the user says "write a spec for the X team", "document this for someone outside the team", "explainer doc", "implementation spec for a vendor", "hand this off to Y", or is about to write a design doc whose primary reader did not live through the debugging/design process. NOT for internal specs where the reader already has full context (use technical-writing or writing-plans instead) — this is specifically for the "stranger must follow it alone" case.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# explainer-doc — write for the reader who has no other context
|
|
8
|
+
|
|
9
|
+
A spec written by the people who did the investigation is unreadable by the team who must implement
|
|
10
|
+
it. The authors compress away the reasoning, so every design choice looks arbitrary, and the reader
|
|
11
|
+
either follows it blindly or argues with it. **The fix is not "add more detail" — it is to lead with
|
|
12
|
+
*why*, and to make the document survive being read alone.**
|
|
13
|
+
|
|
14
|
+
Proven in anger on a Genesys→ETL cutover spec handed to an external vendor team. The user's verdict:
|
|
15
|
+
*"nailed it — the document was perfect, simple, this should be the standard for explainer documents."*
|
|
16
|
+
Reference implementation to study: `serve-sight/docs/genesys-cutover/etl-implementation-spec.md` (full
|
|
17
|
+
spec) and `pega-cticallid-change-request.md` (the same pattern compressed to one page for a single ask).
|
|
18
|
+
|
|
19
|
+
## When this is NOT the right skill
|
|
20
|
+
|
|
21
|
+
If the reader already lived through the investigation (a teammate, your future self, an internal
|
|
22
|
+
handoff with shared context), use `technical-writing` or `writing-plans` instead — those are lighter
|
|
23
|
+
and don't need the "assume zero shared context" discipline below. Reach for `explainer-doc` specifically
|
|
24
|
+
when the reader is a **stranger to the problem**: an external vendor, a different team, a contractor,
|
|
25
|
+
anyone who will act on the document with no one in the room to ask.
|
|
26
|
+
|
|
27
|
+
## The shape — in order. The order IS the pattern
|
|
28
|
+
|
|
29
|
+
Do not reorder these. Each section's position is load-bearing: later sections lean on earlier ones for
|
|
30
|
+
their justification, and a reader working top-to-bottom needs the "why" before the "what."
|
|
31
|
+
|
|
32
|
+
| § | Section | Why it must come here |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| 1 | **Why this exists** — what broke, in a diagram | Every later decision is justified by this. Lead with the failure, not the solution. |
|
|
35
|
+
| 2 | **What we're asking for, in one picture** + a size table | The reader decides here whether the ask is reasonable. Include what you are explicitly **not** asking for. |
|
|
36
|
+
| 3 | **Understanding the source data** — the 3-5 things that catch people out | Each one should have already caused a real bug. Not a data dictionary. |
|
|
37
|
+
| 4 | **The one thing that matters most** | Usually not the new build. Say so plainly, with the number that proves it. |
|
|
38
|
+
| 5 | **Where it runs** + access needed | The blocker nobody writes down until the first deploy fails. |
|
|
39
|
+
| 6 | **What to build**, with the reasoning *beside* each choice | Not in an appendix. Next to the DDL / the query / the config. |
|
|
40
|
+
| 6b | **Changes to what already exists** | Always under-specified. Ask "what did I only half-mention?" — this is where the gaps hide. |
|
|
41
|
+
| 7-8 | The actual implementation (extract/build queries, load procedure, etc.) | |
|
|
42
|
+
| 9 | Schedule / retention / first load | The one-off backfill is always forgotten. |
|
|
43
|
+
| 10 | **Validation, with EXPECTED VALUES** | "Run this, expect ~64%" beats "verify the data." |
|
|
44
|
+
| 11 | Priority · acceptance (who signs off) · **what we excluded** | The exclusion list stops speculative building. |
|
|
45
|
+
| 12 | **Glossary** | Every acronym, inline. Not a link. |
|
|
46
|
+
|
|
47
|
+
Adapt section names to the domain (this table is ETL-flavored from its origin; a UI handoff, an API
|
|
48
|
+
contract, or an infra runbook will rename §6-9) — but keep the **order and the intent of each slot**.
|
|
49
|
+
|
|
50
|
+
## The ten rules
|
|
51
|
+
|
|
52
|
+
1. **Self-contained.** If the reader needs another document to follow this one, the document has
|
|
53
|
+
failed. Companions are optional background, stated as such — never load-bearing.
|
|
54
|
+
2. **Lead with the failure mode, not the solution.** State what actually went wrong, concretely, before
|
|
55
|
+
proposing anything. Everything cautious later inherits its justification from that paragraph.
|
|
56
|
+
3. **Reasoning beside the artefact, not in an appendix.** "Cluster on the date not the GUID" with the
|
|
57
|
+
3-row comparison table right there. An appendix is never read.
|
|
58
|
+
4. **Every number carries its measurement date and a way to reproduce it.** "1.4% of reality (measured
|
|
59
|
+
2026-07-14, `SELECT ...`)" — not "a small fraction."
|
|
60
|
+
5. **Say what you are NOT asking for.** Prevents speculative work and pre-answers "why not X?" before
|
|
61
|
+
it's asked.
|
|
62
|
+
6. **Name what is not the reader's fault.** If a gap traces to a third system or a decision made
|
|
63
|
+
elsewhere, say so explicitly. Saves the reader a week of misdirected chasing and buys credibility for
|
|
64
|
+
the rest of the document.
|
|
65
|
+
7. **Diagrams for the shape, tables for the detail, prose only for judgement.** No diagram should repeat
|
|
66
|
+
what a table already says better.
|
|
67
|
+
8. **Validation states expected values.** "It ran" and "it is right" must be two different checks — give
|
|
68
|
+
the reader the number to compare against.
|
|
69
|
+
9. **Route by owner.** If an item belongs to a third team, mark it as theirs, explicitly, in the document
|
|
70
|
+
— don't let it read as part of the reader's scope.
|
|
71
|
+
10. **Glossary inline.** The reader will not follow a link mid-implementation; every acronym gets defined
|
|
72
|
+
where it's used, plus a glossary section as the fallback lookup.
|
|
73
|
+
|
|
74
|
+
## Process
|
|
75
|
+
|
|
76
|
+
1. **Confirm the reader.** Ask (or infer from context) who this is actually for and how much they
|
|
77
|
+
already know. If they have real shared context, stop and suggest `technical-writing`/`writing-plans`
|
|
78
|
+
instead — this skill's discipline is overhead they don't need.
|
|
79
|
+
2. **Draft §1 first, alone, and get it right before writing anything else.** Every other section's
|
|
80
|
+
justification traces back to it. If you can't state the failure mode plainly and concretely, the
|
|
81
|
+
rest of the document will inherit that vagueness.
|
|
82
|
+
3. **Write the shape table above as your outline**, adapting section names to the domain, then fill it
|
|
83
|
+
in top to bottom. Keep reasoning next to the artefact it justifies (rule 3), not in a separate
|
|
84
|
+
"design decisions" section.
|
|
85
|
+
4. **Before sending, ask the two questions below** — they are an exit gate, not a suggestion.
|
|
86
|
+
|
|
87
|
+
## The two-question exit gate
|
|
88
|
+
|
|
89
|
+
Ask both, honestly, before the document ships:
|
|
90
|
+
|
|
91
|
+
- **"Could someone who has read nothing else follow this end to end?"** If the answer requires "well,
|
|
92
|
+
they'd also need to know X" — X is either missing or should be a stated, explicit companion doc.
|
|
93
|
+
- **"What did I mention once and never specify?"** This is the question that surfaces the gaps — in the
|
|
94
|
+
origin case it found an entire missing section (§6b, changes to existing infrastructure) that had been
|
|
95
|
+
gestured at once and never actually written.
|
|
96
|
+
|
|
97
|
+
If either question fails, fix the document — don't ship it and hope the reader asks.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-writing
|
|
3
|
+
context: fork
|
|
4
|
+
description: Technical documentation best practices for READMEs, API docs, architecture docs, runbooks, and developer guides. Use when writing or reviewing documentation, creating onboarding guides, or establishing documentation standards.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Technical Writing Skill
|
|
8
|
+
|
|
9
|
+
Good documentation is the difference between a project that scales and one that stalls. Write for the reader who has zero context.
|
|
10
|
+
|
|
11
|
+
## 1. When to Apply This Skill
|
|
12
|
+
|
|
13
|
+
**Trigger conditions:**
|
|
14
|
+
- Writing or updating a README
|
|
15
|
+
- Creating API documentation
|
|
16
|
+
- Writing architecture decision records (ADRs)
|
|
17
|
+
- Building runbooks or incident playbooks
|
|
18
|
+
- Creating onboarding/developer guides
|
|
19
|
+
- Reviewing documentation for clarity
|
|
20
|
+
|
|
21
|
+
## 2. Document Types and Templates
|
|
22
|
+
|
|
23
|
+
### Document Provenance Frontmatter
|
|
24
|
+
|
|
25
|
+
All descriptive Markdown docs must follow `.github/instructions/document-frontmatter.instructions.md`.
|
|
26
|
+
|
|
27
|
+
- **New docs**: include `Original Author`, `Creation Date`, and `Creating Model` in YAML frontmatter.
|
|
28
|
+
- **Updated docs**: preserve those original fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
|
|
29
|
+
- Use full ISO 8601 UTC timestamps for `Creation Date` and `Last Updated` values.
|
|
30
|
+
- Merge these fields into existing frontmatter instead of replacing document-specific metadata.
|
|
31
|
+
|
|
32
|
+
### README Structure
|
|
33
|
+
|
|
34
|
+
Every project README follows this order:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# Project Name
|
|
38
|
+
One-sentence description of what this does and who it's for.
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
Minimum steps to run the project locally (≤5 commands).
|
|
42
|
+
|
|
43
|
+
## Prerequisites
|
|
44
|
+
- Runtime versions (Python 3.12+, Node 22+)
|
|
45
|
+
- Required tools (Docker, pnpm)
|
|
46
|
+
- Required accounts/access
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
Step-by-step setup with copy-pasteable commands.
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
Common tasks with examples.
|
|
53
|
+
|
|
54
|
+
## Architecture
|
|
55
|
+
Brief overview with a diagram (link to detailed docs).
|
|
56
|
+
|
|
57
|
+
## Contributing
|
|
58
|
+
How to submit changes, run tests, and follow conventions.
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Rules:**
|
|
64
|
+
- Quick Start must work on a fresh machine in under 5 minutes
|
|
65
|
+
- Every command must be copy-pasteable (no `<placeholder>` without explanation)
|
|
66
|
+
- Test the README by following it literally on a clean environment
|
|
67
|
+
|
|
68
|
+
### Architecture Decision Record (ADR)
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
# ADR-{NNN}: {Decision Title}
|
|
72
|
+
|
|
73
|
+
## Status
|
|
74
|
+
Accepted | Superseded by ADR-{NNN} | Deprecated
|
|
75
|
+
|
|
76
|
+
## Context
|
|
77
|
+
What problem are we solving? What constraints exist?
|
|
78
|
+
|
|
79
|
+
## Decision
|
|
80
|
+
What did we decide and why?
|
|
81
|
+
|
|
82
|
+
## Alternatives Considered
|
|
83
|
+
| Option | Pros | Cons | Why Not |
|
|
84
|
+
|--------|------|------|---------|
|
|
85
|
+
|
|
86
|
+
## Consequences
|
|
87
|
+
What changes as a result? What new constraints are introduced?
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Runbook/Playbook
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
# Runbook: {Incident Type}
|
|
94
|
+
|
|
95
|
+
## Symptoms
|
|
96
|
+
What does the user/monitor see?
|
|
97
|
+
|
|
98
|
+
## Impact
|
|
99
|
+
Who is affected? What's the blast radius?
|
|
100
|
+
|
|
101
|
+
## Diagnosis Steps
|
|
102
|
+
1. Check {metric/log/dashboard} — expected: {value}
|
|
103
|
+
2. Run `{command}` — look for {pattern}
|
|
104
|
+
3. ...
|
|
105
|
+
|
|
106
|
+
## Resolution Steps
|
|
107
|
+
1. {Step with exact command}
|
|
108
|
+
2. {Verification step}
|
|
109
|
+
3. ...
|
|
110
|
+
|
|
111
|
+
## Escalation
|
|
112
|
+
If not resolved in {time}, contact {team/person}.
|
|
113
|
+
|
|
114
|
+
## Post-Incident
|
|
115
|
+
- [ ] Update this runbook with new learnings
|
|
116
|
+
- [ ] File ticket for permanent fix
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 3. Writing Principles
|
|
120
|
+
|
|
121
|
+
### Know Your Reader
|
|
122
|
+
|
|
123
|
+
| Reader | Needs | Writing Style |
|
|
124
|
+
|--------|-------|--------------|
|
|
125
|
+
| **New developer** | Setup, concepts, where things are | Step-by-step, no assumptions |
|
|
126
|
+
| **Experienced dev** | API reference, edge cases, configuration | Concise, scannable, tables |
|
|
127
|
+
| **Ops/SRE** | Runbooks, monitoring, deployment | Commands, checklists, decision trees |
|
|
128
|
+
| **Stakeholder** | What it does, status, decisions | High-level, diagrams, outcomes |
|
|
129
|
+
|
|
130
|
+
### The Inverted Pyramid
|
|
131
|
+
|
|
132
|
+
Put the most important information first. Readers scan, they don't read.
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
┌─────────────────────────┐
|
|
136
|
+
│ What + Why (lead) │ ← First paragraph answers the key question
|
|
137
|
+
├─────────────────────────┤
|
|
138
|
+
│ How (details) │ ← Supporting details, steps, configuration
|
|
139
|
+
├─────────────────────────┤
|
|
140
|
+
│ Reference (appendix) │ ← Edge cases, history, alternatives
|
|
141
|
+
└─────────────────────────┘
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Plain Language Rules
|
|
145
|
+
|
|
146
|
+
| Do | Don't |
|
|
147
|
+
|----|-------|
|
|
148
|
+
| "This function returns the user's name" | "This function facilitates the retrieval of the nomenclature associated with the user entity" |
|
|
149
|
+
| "Run `npm install`" | "Execute the package installation command" |
|
|
150
|
+
| "Fails if the file doesn't exist" | "In the event that the specified file is not present in the filesystem, the operation will not succeed" |
|
|
151
|
+
| Short sentences (< 25 words) | Run-on sentences with multiple clauses |
|
|
152
|
+
| Active voice | Passive voice |
|
|
153
|
+
|
|
154
|
+
## 4. Code Examples in Documentation
|
|
155
|
+
|
|
156
|
+
### Rules for Code Samples
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
# ✅ GOOD: Complete, runnable example with imports
|
|
160
|
+
from datetime import datetime
|
|
161
|
+
from myapp.models import User
|
|
162
|
+
|
|
163
|
+
def create_user(name: str, email: str) -> User:
|
|
164
|
+
"""Create a user and return the saved instance."""
|
|
165
|
+
user = User(name=name, email=email, created_at=datetime.now())
|
|
166
|
+
user.save()
|
|
167
|
+
return user
|
|
168
|
+
|
|
169
|
+
# Usage
|
|
170
|
+
user = create_user("Alice", "alice@example.com")
|
|
171
|
+
print(user.id) # => "usr_abc123"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
# ❌ BAD: Incomplete snippet, no context
|
|
176
|
+
def create_user(name, email):
|
|
177
|
+
user = User(name=name, email=email) # What is User? Where is it imported?
|
|
178
|
+
user.save() # Does this return something?
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Rules:**
|
|
182
|
+
- Include imports
|
|
183
|
+
- Show expected output in comments
|
|
184
|
+
- Use realistic data (not "foo", "bar", "test")
|
|
185
|
+
- Every example must be copy-pasteable and runnable
|
|
186
|
+
|
|
187
|
+
## 5. Diagrams
|
|
188
|
+
|
|
189
|
+
Use diagrams for architecture, data flow, and sequences. Text alone fails for spatial relationships.
|
|
190
|
+
|
|
191
|
+
### When to Use Each Type
|
|
192
|
+
|
|
193
|
+
| Diagram | Use For |
|
|
194
|
+
|---------|---------|
|
|
195
|
+
| **Flowchart** | Decision trees, process flows |
|
|
196
|
+
| **Sequence** | API call chains, auth flows |
|
|
197
|
+
| **Architecture** | System overview, service boundaries |
|
|
198
|
+
| **ERD** | Database schema relationships |
|
|
199
|
+
| **State** | Lifecycle transitions (order, ticket) |
|
|
200
|
+
|
|
201
|
+
### Diagram Rules
|
|
202
|
+
- Label every arrow (what data flows, what triggers the transition)
|
|
203
|
+
- Include a legend if using color coding
|
|
204
|
+
- Keep to 7±2 elements — decompose larger diagrams
|
|
205
|
+
- Store diagrams as code (Mermaid, PlantUML) for version control
|
|
206
|
+
|
|
207
|
+
## 6. API Documentation
|
|
208
|
+
|
|
209
|
+
### Endpoint Documentation Template
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
### `POST /api/v1/customers`
|
|
213
|
+
|
|
214
|
+
Create a new customer record.
|
|
215
|
+
|
|
216
|
+
**Auth:** Bearer token required
|
|
217
|
+
|
|
218
|
+
**Request Body:**
|
|
219
|
+
| Field | Type | Required | Description |
|
|
220
|
+
|-------|------|----------|-------------|
|
|
221
|
+
| name | string | Yes | Customer full name (1-200 chars) |
|
|
222
|
+
| email | string | Yes | Valid email address |
|
|
223
|
+
|
|
224
|
+
**Response:** `201 Created`
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"data": { "id": "cust_abc", "name": "Alice", "email": "alice@example.com" }
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Errors:**
|
|
232
|
+
| Code | When |
|
|
233
|
+
|------|------|
|
|
234
|
+
| 400 | Missing required field |
|
|
235
|
+
| 409 | Email already exists |
|
|
236
|
+
| 422 | Invalid email format |
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## 7. Documentation Maintenance
|
|
240
|
+
|
|
241
|
+
### Keep Docs Near Code
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
src/
|
|
245
|
+
auth/
|
|
246
|
+
login.py
|
|
247
|
+
README.md ← Auth module docs live with auth code
|
|
248
|
+
docs/
|
|
249
|
+
architecture.md ← System-level docs in docs/
|
|
250
|
+
runbooks/ ← Operational docs
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Freshness Rules
|
|
254
|
+
|
|
255
|
+
| Trigger | Action |
|
|
256
|
+
|---------|--------|
|
|
257
|
+
| API endpoint changed | Update API docs in same PR |
|
|
258
|
+
| New environment variable | Update README + .env.example |
|
|
259
|
+
| Architecture decision | Write or update ADR |
|
|
260
|
+
| Production incident | Update or create runbook |
|
|
261
|
+
| New developer onboarded | Test README, fix gaps found |
|
|
262
|
+
|
|
263
|
+
## 8. Review Checklist
|
|
264
|
+
|
|
265
|
+
When reviewing documentation:
|
|
266
|
+
|
|
267
|
+
- [ ] Answers "what does this do?" in the first paragraph
|
|
268
|
+
- [ ] Document frontmatter is present and current
|
|
269
|
+
- [ ] Code examples are complete and runnable
|
|
270
|
+
- [ ] Commands are copy-pasteable
|
|
271
|
+
- [ ] No stale references to old code, endpoints, or config
|
|
272
|
+
- [ ] Diagrams are up to date
|
|
273
|
+
- [ ] Written for the target audience (not the author)
|
|
274
|
+
- [ ] No jargon without definition
|
|
275
|
+
- [ ] Links work and point to current resources
|
|
276
|
+
|
|
277
|
+
## 9. Anti-Patterns
|
|
278
|
+
|
|
279
|
+
| Anti-Pattern | Problem | Fix |
|
|
280
|
+
|---|---|---|
|
|
281
|
+
| Docs written once, never updated | Stale docs are worse than no docs | Update in same PR as code changes |
|
|
282
|
+
| Wall of text | Nobody reads it | Use headings, tables, code blocks, diagrams |
|
|
283
|
+
| Documenting obvious code | Noise, maintenance burden | Document "why", not "what" |
|
|
284
|
+
| Screenshots of terminal output | Can't copy-paste, hard to update | Use code blocks with text output |
|
|
285
|
+
| "See the code for details" | Reader has to reverse-engineer | Write the explanation |
|
|
286
|
+
| Assuming reader context | "Just run the usual setup" | Spell out every step |
|