@mohammadhprp/system-prompt 0.10.1
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 +35 -0
- package/bin/system-prompt.js +8 -0
- package/framework/README.md +163 -0
- package/framework/agents/README.md +49 -0
- package/framework/agents/backend-architect.md +146 -0
- package/framework/agents/researcher.md +79 -0
- package/framework/agents/reviewer.md +183 -0
- package/framework/agents/security-auditor.md +131 -0
- package/framework/commands/README.md +43 -0
- package/framework/commands/changelog.md +44 -0
- package/framework/commands/commit.md +31 -0
- package/framework/commands/learn.md +24 -0
- package/framework/commands/mr.md +46 -0
- package/framework/commands/pr.md +39 -0
- package/framework/commands/release.md +34 -0
- package/framework/commands/review.md +24 -0
- package/framework/commands/summarize-changes.md +49 -0
- package/framework/mcps/README.md +78 -0
- package/framework/mcps/excalidraw/README.md +37 -0
- package/framework/mcps/excalidraw/capabilities.md +54 -0
- package/framework/mcps/excalidraw/configs/opencode.json +8 -0
- package/framework/mcps/excalidraw/install.md +92 -0
- package/framework/mcps/excalidraw/troubleshooting.md +67 -0
- package/framework/mcps/figma-mcp-go/README.md +51 -0
- package/framework/mcps/figma-mcp-go/capabilities.md +190 -0
- package/framework/mcps/figma-mcp-go/configs/opencode.json +9 -0
- package/framework/mcps/figma-mcp-go/install.md +74 -0
- package/framework/mcps/figma-mcp-go/troubleshooting.md +99 -0
- package/framework/mcps/github-mcp/README.md +51 -0
- package/framework/mcps/github-mcp/capabilities.md +83 -0
- package/framework/mcps/github-mcp/configs/.env.example +1 -0
- package/framework/mcps/github-mcp/configs/opencode.json +13 -0
- package/framework/mcps/github-mcp/install.md +60 -0
- package/framework/mcps/github-mcp/troubleshooting.md +79 -0
- package/framework/mcps/gitlab-mcp/README.md +54 -0
- package/framework/mcps/gitlab-mcp/capabilities.md +216 -0
- package/framework/mcps/gitlab-mcp/configs/.env.example +2 -0
- package/framework/mcps/gitlab-mcp/configs/opencode.json +13 -0
- package/framework/mcps/gitlab-mcp/install.md +99 -0
- package/framework/mcps/gitlab-mcp/troubleshooting.md +116 -0
- package/framework/mcps/jira-mcp/README.md +53 -0
- package/framework/mcps/jira-mcp/capabilities.md +79 -0
- package/framework/mcps/jira-mcp/configs/.env.example +2 -0
- package/framework/mcps/jira-mcp/configs/opencode.json +13 -0
- package/framework/mcps/jira-mcp/install.md +94 -0
- package/framework/mcps/jira-mcp/troubleshooting.md +113 -0
- package/framework/mcps/laravel-boost/README.md +53 -0
- package/framework/mcps/laravel-boost/capabilities.md +92 -0
- package/framework/mcps/laravel-boost/configs/opencode.json +9 -0
- package/framework/mcps/laravel-boost/install.md +106 -0
- package/framework/mcps/laravel-boost/troubleshooting.md +119 -0
- package/framework/mcps/notion-mcp/README.md +58 -0
- package/framework/mcps/notion-mcp/capabilities.md +118 -0
- package/framework/mcps/notion-mcp/configs/opencode.json +9 -0
- package/framework/mcps/notion-mcp/install.md +70 -0
- package/framework/mcps/notion-mcp/troubleshooting.md +95 -0
- package/framework/mcps/playwright-mcp/README.md +50 -0
- package/framework/mcps/playwright-mcp/capabilities.md +149 -0
- package/framework/mcps/playwright-mcp/configs/opencode.json +9 -0
- package/framework/mcps/playwright-mcp/install.md +136 -0
- package/framework/mcps/playwright-mcp/troubleshooting.md +154 -0
- package/framework/mcps/supabase-mcp/README.md +66 -0
- package/framework/mcps/supabase-mcp/capabilities.md +127 -0
- package/framework/mcps/supabase-mcp/configs/opencode.json +9 -0
- package/framework/mcps/supabase-mcp/install.md +85 -0
- package/framework/mcps/supabase-mcp/troubleshooting.md +113 -0
- package/framework/memory/README.md +17 -0
- package/framework/memory/codebase-insights.md +6 -0
- package/framework/memory/user-preferences.md +5 -0
- package/framework/modes/README.md +52 -0
- package/framework/modes/audit.md +88 -0
- package/framework/plugins/README.md +65 -0
- package/framework/plugins/opencode-goal-plugin/README.md +45 -0
- package/framework/plugins/opencode-goal-plugin/capabilities.md +127 -0
- package/framework/plugins/opencode-goal-plugin/install.md +71 -0
- package/framework/plugins/opencode-goal-plugin/troubleshooting.md +112 -0
- package/framework/plugins/ponytail/README.md +44 -0
- package/framework/plugins/ponytail/capabilities.md +112 -0
- package/framework/plugins/ponytail/install.md +77 -0
- package/framework/plugins/ponytail/troubleshooting.md +116 -0
- package/framework/references/standards/api.md +44 -0
- package/framework/references/standards/architecture.md +43 -0
- package/framework/references/standards/database.md +43 -0
- package/framework/references/standards/debugging.md +44 -0
- package/framework/references/standards/documentation.md +43 -0
- package/framework/references/standards/logging.md +43 -0
- package/framework/references/standards/naming.md +43 -0
- package/framework/references/standards/observability.md +43 -0
- package/framework/references/standards/performance.md +43 -0
- package/framework/references/standards/pull-requests.md +43 -0
- package/framework/references/standards/security.md +43 -0
- package/framework/references/standards/testing.md +43 -0
- package/framework/references/templates/adr.md +28 -0
- package/framework/references/templates/api-spec.md +56 -0
- package/framework/references/templates/design-document.md +39 -0
- package/framework/references/templates/incident-report.md +38 -0
- package/framework/references/templates/postmortem.md +41 -0
- package/framework/references/templates/pull-request.md +34 -0
- package/framework/references/templates/runbook.md +48 -0
- package/framework/references/templates/task.md +27 -0
- package/framework/skills/README.md +68 -0
- package/framework/skills/agent-browser/SKILL.md +51 -0
- package/framework/skills/backend-best-practices/SKILL.md +136 -0
- package/framework/skills/backend-best-practices/examples.md +31 -0
- package/framework/skills/backend-best-practices/references/api-design.md +79 -0
- package/framework/skills/backend-best-practices/references/architecture-review.md +77 -0
- package/framework/skills/backend-best-practices/references/database-design.md +78 -0
- package/framework/skills/backend-best-practices/references/debugging.md +76 -0
- package/framework/skills/backend-best-practices/references/observability.md +78 -0
- package/framework/skills/backend-best-practices/references/performance.md +78 -0
- package/framework/skills/backend-best-practices/references/refactoring.md +77 -0
- package/framework/skills/backend-best-practices/references/security.md +80 -0
- package/framework/skills/backend-best-practices/references/testing.md +77 -0
- package/framework/skills/backend-engineer/SKILL.md +76 -0
- package/framework/skills/backend-engineer/examples.md +31 -0
- package/framework/skills/brainstorming/SKILL.md +159 -0
- package/framework/skills/brainstorming/examples.md +49 -0
- package/framework/skills/brainstorming/scripts/frame-template.html +213 -0
- package/framework/skills/brainstorming/scripts/helper.js +167 -0
- package/framework/skills/brainstorming/scripts/server.cjs +723 -0
- package/framework/skills/brainstorming/scripts/start-server.sh +209 -0
- package/framework/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/framework/skills/brainstorming/visual-companion.md +291 -0
- package/framework/skills/brand-guidelines/LICENSE.txt +202 -0
- package/framework/skills/brand-guidelines/SKILL.md +73 -0
- package/framework/skills/code-review/SKILL.md +72 -0
- package/framework/skills/code-review/examples.md +31 -0
- package/framework/skills/design/SKILL.md +399 -0
- package/framework/skills/design/examples.md +34 -0
- package/framework/skills/diagram-design/SKILL.md +485 -0
- package/framework/skills/diagram-design/assets/example-architecture-dark.html +180 -0
- package/framework/skills/diagram-design/assets/example-architecture-full.html +192 -0
- package/framework/skills/diagram-design/assets/example-architecture.html +181 -0
- package/framework/skills/diagram-design/assets/example-bar-dark.html +127 -0
- package/framework/skills/diagram-design/assets/example-bar-full.html +103 -0
- package/framework/skills/diagram-design/assets/example-bar.html +127 -0
- package/framework/skills/diagram-design/assets/example-data-flow-dark.html +143 -0
- package/framework/skills/diagram-design/assets/example-data-flow-full.html +185 -0
- package/framework/skills/diagram-design/assets/example-data-flow.html +143 -0
- package/framework/skills/diagram-design/assets/example-datalake-dark.html +241 -0
- package/framework/skills/diagram-design/assets/example-datalake-full.html +246 -0
- package/framework/skills/diagram-design/assets/example-datalake.html +267 -0
- package/framework/skills/diagram-design/assets/example-dp-integration-dark.html +78 -0
- package/framework/skills/diagram-design/assets/example-dp-integration-full.html +88 -0
- package/framework/skills/diagram-design/assets/example-dp-integration.html +78 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix-dark.html +31 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix-full.html +32 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix.html +88 -0
- package/framework/skills/diagram-design/assets/example-er-dark.html +200 -0
- package/framework/skills/diagram-design/assets/example-er-full.html +203 -0
- package/framework/skills/diagram-design/assets/example-er.html +200 -0
- package/framework/skills/diagram-design/assets/example-flowchart-dark.html +154 -0
- package/framework/skills/diagram-design/assets/example-flowchart-full.html +157 -0
- package/framework/skills/diagram-design/assets/example-flowchart.html +154 -0
- package/framework/skills/diagram-design/assets/example-gantt-dark.html +135 -0
- package/framework/skills/diagram-design/assets/example-gantt-full.html +125 -0
- package/framework/skills/diagram-design/assets/example-gantt.html +135 -0
- package/framework/skills/diagram-design/assets/example-high-level-dark.html +249 -0
- package/framework/skills/diagram-design/assets/example-high-level-full.html +245 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical-dark.html +272 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical-full.html +250 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical.html +323 -0
- package/framework/skills/diagram-design/assets/example-high-level.html +299 -0
- package/framework/skills/diagram-design/assets/example-it-state-dark.html +90 -0
- package/framework/skills/diagram-design/assets/example-it-state-full.html +69 -0
- package/framework/skills/diagram-design/assets/example-it-state.html +128 -0
- package/framework/skills/diagram-design/assets/example-layers-dark.html +121 -0
- package/framework/skills/diagram-design/assets/example-layers-full.html +124 -0
- package/framework/skills/diagram-design/assets/example-layers.html +121 -0
- package/framework/skills/diagram-design/assets/example-line-dark.html +109 -0
- package/framework/skills/diagram-design/assets/example-line-full.html +103 -0
- package/framework/skills/diagram-design/assets/example-line.html +109 -0
- package/framework/skills/diagram-design/assets/example-loop-dark.html +100 -0
- package/framework/skills/diagram-design/assets/example-loop-full.html +137 -0
- package/framework/skills/diagram-design/assets/example-loop-terminal.html +347 -0
- package/framework/skills/diagram-design/assets/example-loop.html +100 -0
- package/framework/skills/diagram-design/assets/example-medallion-dark.html +159 -0
- package/framework/skills/diagram-design/assets/example-medallion-full.html +201 -0
- package/framework/skills/diagram-design/assets/example-medallion.html +159 -0
- package/framework/skills/diagram-design/assets/example-nested-dark.html +130 -0
- package/framework/skills/diagram-design/assets/example-nested-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-nested.html +134 -0
- package/framework/skills/diagram-design/assets/example-org-chart-dark.html +45 -0
- package/framework/skills/diagram-design/assets/example-org-chart-full.html +45 -0
- package/framework/skills/diagram-design/assets/example-org-chart.html +45 -0
- package/framework/skills/diagram-design/assets/example-process-dark.html +62 -0
- package/framework/skills/diagram-design/assets/example-process-full.html +72 -0
- package/framework/skills/diagram-design/assets/example-process.html +62 -0
- package/framework/skills/diagram-design/assets/example-pyramid-dark.html +117 -0
- package/framework/skills/diagram-design/assets/example-pyramid-full.html +120 -0
- package/framework/skills/diagram-design/assets/example-pyramid.html +117 -0
- package/framework/skills/diagram-design/assets/example-quadrant-consultant.html +164 -0
- package/framework/skills/diagram-design/assets/example-quadrant-dark.html +133 -0
- package/framework/skills/diagram-design/assets/example-quadrant-full.html +136 -0
- package/framework/skills/diagram-design/assets/example-quadrant.html +133 -0
- package/framework/skills/diagram-design/assets/example-radar-dark.html +137 -0
- package/framework/skills/diagram-design/assets/example-radar-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-radar.html +137 -0
- package/framework/skills/diagram-design/assets/example-scatter-dark.html +139 -0
- package/framework/skills/diagram-design/assets/example-scatter-full.html +114 -0
- package/framework/skills/diagram-design/assets/example-scatter.html +139 -0
- package/framework/skills/diagram-design/assets/example-sequence-dark.html +220 -0
- package/framework/skills/diagram-design/assets/example-sequence-full.html +386 -0
- package/framework/skills/diagram-design/assets/example-sequence.html +220 -0
- package/framework/skills/diagram-design/assets/example-state-dark.html +145 -0
- package/framework/skills/diagram-design/assets/example-state-full.html +148 -0
- package/framework/skills/diagram-design/assets/example-state.html +145 -0
- package/framework/skills/diagram-design/assets/example-swimlane-dark.html +170 -0
- package/framework/skills/diagram-design/assets/example-swimlane-full.html +173 -0
- package/framework/skills/diagram-design/assets/example-swimlane.html +170 -0
- package/framework/skills/diagram-design/assets/example-timeline-dark.html +133 -0
- package/framework/skills/diagram-design/assets/example-timeline-full.html +136 -0
- package/framework/skills/diagram-design/assets/example-timeline.html +133 -0
- package/framework/skills/diagram-design/assets/example-tree-dark.html +171 -0
- package/framework/skills/diagram-design/assets/example-tree-full.html +174 -0
- package/framework/skills/diagram-design/assets/example-tree.html +171 -0
- package/framework/skills/diagram-design/assets/example-venn-dark.html +130 -0
- package/framework/skills/diagram-design/assets/example-venn-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-venn.html +108 -0
- package/framework/skills/diagram-design/assets/icons.html +230 -0
- package/framework/skills/diagram-design/assets/index.html +333 -0
- package/framework/skills/diagram-design/assets/template-dark.html +82 -0
- package/framework/skills/diagram-design/assets/template-full.html +410 -0
- package/framework/skills/diagram-design/assets/template-terminal.html +170 -0
- package/framework/skills/diagram-design/assets/template.html +83 -0
- package/framework/skills/diagram-design/references/export.md +107 -0
- package/framework/skills/diagram-design/references/onboarding.md +268 -0
- package/framework/skills/diagram-design/references/primitive-annotation.md +36 -0
- package/framework/skills/diagram-design/references/primitive-icons.md +821 -0
- package/framework/skills/diagram-design/references/primitive-sketchy.md +43 -0
- package/framework/skills/diagram-design/references/primitive-terminal.md +76 -0
- package/framework/skills/diagram-design/references/style-guide.md +139 -0
- package/framework/skills/diagram-design/references/type-architecture.md +78 -0
- package/framework/skills/diagram-design/references/type-bar.md +48 -0
- package/framework/skills/diagram-design/references/type-data-flow.md +374 -0
- package/framework/skills/diagram-design/references/type-dp-integration.md +410 -0
- package/framework/skills/diagram-design/references/type-dp-security-matrix.md +379 -0
- package/framework/skills/diagram-design/references/type-er.md +23 -0
- package/framework/skills/diagram-design/references/type-flowchart.md +23 -0
- package/framework/skills/diagram-design/references/type-gantt.md +45 -0
- package/framework/skills/diagram-design/references/type-high-level.md +458 -0
- package/framework/skills/diagram-design/references/type-it-state.md +470 -0
- package/framework/skills/diagram-design/references/type-layers.md +26 -0
- package/framework/skills/diagram-design/references/type-line.md +44 -0
- package/framework/skills/diagram-design/references/type-loop.md +223 -0
- package/framework/skills/diagram-design/references/type-medallion.md +356 -0
- package/framework/skills/diagram-design/references/type-nested.md +22 -0
- package/framework/skills/diagram-design/references/type-org-chart.md +44 -0
- package/framework/skills/diagram-design/references/type-process.md +495 -0
- package/framework/skills/diagram-design/references/type-pyramid.md +33 -0
- package/framework/skills/diagram-design/references/type-quadrant.md +81 -0
- package/framework/skills/diagram-design/references/type-radar.md +80 -0
- package/framework/skills/diagram-design/references/type-scatter.md +39 -0
- package/framework/skills/diagram-design/references/type-sequence.md +35 -0
- package/framework/skills/diagram-design/references/type-state.md +21 -0
- package/framework/skills/diagram-design/references/type-swimlane.md +20 -0
- package/framework/skills/diagram-design/references/type-timeline.md +20 -0
- package/framework/skills/diagram-design/references/type-tree.md +24 -0
- package/framework/skills/diagram-design/references/type-venn.md +26 -0
- package/framework/skills/documentation/SKILL.md +74 -0
- package/framework/skills/documentation/examples.md +31 -0
- package/framework/skills/find-skills/SKILL.md +141 -0
- package/framework/skills/find-skills/examples.md +35 -0
- package/framework/skills/gitlab-mcp/SKILL.md +83 -0
- package/framework/skills/gitlab-mcp/examples.md +31 -0
- package/framework/skills/gitlab-mcp/references/code-review.md +110 -0
- package/framework/skills/gitlab-mcp/references/issues.md +141 -0
- package/framework/skills/gitlab-mcp/references/merge-requests.md +120 -0
- package/framework/skills/gitlab-mcp/references/pipelines.md +67 -0
- package/framework/skills/gitlab-mcp/references/search.md +17 -0
- package/framework/skills/gitlab-mcp/references/webhooks.md +32 -0
- package/framework/skills/gitlab-mcp/references/work-items.md +50 -0
- package/framework/skills/jira-mcp/SKILL.md +57 -0
- package/framework/skills/jira-mcp/examples.md +31 -0
- package/framework/skills/jira-mcp/references/comments.md +27 -0
- package/framework/skills/jira-mcp/references/issues.md +97 -0
- package/framework/skills/jira-mcp/references/projects.md +39 -0
- package/framework/skills/laravel-best-practices/SKILL.md +229 -0
- package/framework/skills/laravel-best-practices/examples.md +31 -0
- package/framework/skills/laravel-best-practices/references/advanced-queries.md +106 -0
- package/framework/skills/laravel-best-practices/references/architecture.md +202 -0
- package/framework/skills/laravel-best-practices/references/blade-views.md +36 -0
- package/framework/skills/laravel-best-practices/references/caching.md +70 -0
- package/framework/skills/laravel-best-practices/references/collections.md +44 -0
- package/framework/skills/laravel-best-practices/references/config.md +73 -0
- package/framework/skills/laravel-best-practices/references/db-performance.md +192 -0
- package/framework/skills/laravel-best-practices/references/eloquent.md +148 -0
- package/framework/skills/laravel-best-practices/references/error-handling.md +72 -0
- package/framework/skills/laravel-best-practices/references/events-notifications.md +52 -0
- package/framework/skills/laravel-best-practices/references/http-client.md +160 -0
- package/framework/skills/laravel-best-practices/references/mail.md +27 -0
- package/framework/skills/laravel-best-practices/references/migrations.md +121 -0
- package/framework/skills/laravel-best-practices/references/passport.md +197 -0
- package/framework/skills/laravel-best-practices/references/pennant.md +61 -0
- package/framework/skills/laravel-best-practices/references/pest-testing.md +166 -0
- package/framework/skills/laravel-best-practices/references/pulse.md +196 -0
- package/framework/skills/laravel-best-practices/references/queue-jobs.md +144 -0
- package/framework/skills/laravel-best-practices/references/routing.md +99 -0
- package/framework/skills/laravel-best-practices/references/scheduling.md +39 -0
- package/framework/skills/laravel-best-practices/references/scout.md +176 -0
- package/framework/skills/laravel-best-practices/references/security.md +198 -0
- package/framework/skills/laravel-best-practices/references/spatie-laravel-backup.md +222 -0
- package/framework/skills/laravel-best-practices/references/spatie-laravel-permission.md +272 -0
- package/framework/skills/laravel-best-practices/references/spatie-medialibrary.md +672 -0
- package/framework/skills/laravel-best-practices/references/style.md +125 -0
- package/framework/skills/laravel-best-practices/references/tailwindcss.md +112 -0
- package/framework/skills/laravel-best-practices/references/testing.md +43 -0
- package/framework/skills/laravel-best-practices/references/validation.md +75 -0
- package/framework/skills/lavish/SKILL.md +67 -0
- package/framework/skills/lavish/examples.md +31 -0
- package/framework/skills/notion-mcp/SKILL.md +57 -0
- package/framework/skills/notion-mcp/examples.md +31 -0
- package/framework/skills/notion-mcp/references/comments.md +112 -0
- package/framework/skills/notion-mcp/references/databases.md +193 -0
- package/framework/skills/notion-mcp/references/pages.md +235 -0
- package/framework/skills/skill-creator/LICENSE.txt +202 -0
- package/framework/skills/skill-creator/SKILL.md +485 -0
- package/framework/skills/skill-creator/agents/analyzer.md +274 -0
- package/framework/skills/skill-creator/agents/comparator.md +202 -0
- package/framework/skills/skill-creator/agents/grader.md +223 -0
- package/framework/skills/skill-creator/assets/eval_review.html +146 -0
- package/framework/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/framework/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/framework/skills/skill-creator/examples.md +31 -0
- package/framework/skills/skill-creator/references/schemas.md +430 -0
- package/framework/skills/skill-creator/scripts/__init__.py +0 -0
- package/framework/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/framework/skills/skill-creator/scripts/generate_report.py +326 -0
- package/framework/skills/skill-creator/scripts/improve_description.py +247 -0
- package/framework/skills/skill-creator/scripts/package_skill.py +136 -0
- package/framework/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/framework/skills/skill-creator/scripts/run_eval.py +310 -0
- package/framework/skills/skill-creator/scripts/run_loop.py +328 -0
- package/framework/skills/skill-creator/scripts/utils.py +47 -0
- package/framework/styles/README.md +35 -0
- package/framework/styles/linear/DESIGN.md +478 -0
- package/framework/styles/linear/README.md +36 -0
- package/framework/styles/linear/assets/preview.jpg +0 -0
- package/framework/styles/raycast/DESIGN.md +495 -0
- package/framework/styles/raycast/README.md +35 -0
- package/framework/styles/raycast/assets/preview.jpg +0 -0
- package/package.json +33 -0
- package/src/agent-configs.js +96 -0
- package/src/catalog.js +145 -0
- package/src/cli.js +254 -0
- package/src/installer.js +303 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Loop
|
|
2
|
+
|
|
3
|
+
**Best for:** reinforcing cycles, flywheels, feedback loops, and operating loops — anything where the last step feeds the first and a shared hub accumulates state. Use Loop when the reader must see both motions at once: work advances clockwise around the ring, while each pass writes durable state back to one common center.
|
|
4
|
+
|
|
5
|
+
Prefer **Flowchart** when the path ends, branches toward an outcome, or never truly returns to its first step. Prefer **Cycle** when the center does not accumulate shared state. The dashed write-back spokes are the defining signal here: remove them and the figure is only a circular process.
|
|
6
|
+
|
|
7
|
+
This type is **parametric**. The inputs in §1 determine station count, angles, edge intersections, connector paths, and viewBox bounds. Identical inputs should produce identical geometry.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Inputs — the parameter contract
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
title: "The self-improving loop"
|
|
15
|
+
subtitle: "Every pass improves the shared operating record"
|
|
16
|
+
|
|
17
|
+
hub: # exactly one
|
|
18
|
+
name: "Shared memory"
|
|
19
|
+
sublabel: "one record, every loop"
|
|
20
|
+
|
|
21
|
+
stations: # 5..8, clockwise from top
|
|
22
|
+
- { name: "Capture", sublabel: "signals in", spoke_label: "SIGNALS" }
|
|
23
|
+
- { name: "Research", sublabel: "evidence pulled" }
|
|
24
|
+
- { name: "Decide", sublabel: "human approves", focal: true }
|
|
25
|
+
- { name: "Act", sublabel: "work ships", spoke_label: "OUTCOMES" }
|
|
26
|
+
- { name: "Measure", sublabel: "outcomes logged" }
|
|
27
|
+
- { name: "Learn", sublabel: "playbook updated" }
|
|
28
|
+
|
|
29
|
+
station_w: 160
|
|
30
|
+
station_h: 64
|
|
31
|
+
hub_w: 200
|
|
32
|
+
hub_h: 104
|
|
33
|
+
radius: 240
|
|
34
|
+
margin: 64
|
|
35
|
+
dark: false
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Budget (hard):** **5–8 stations plus exactly one hub.** Above 8 stations, split the subject into an overview Loop and one or more detail diagrams. Exactly one hub — a loop with two hubs is two diagrams. At most one station may set `focal: true`; zero is allowed when no editorial gate deserves emphasis.
|
|
39
|
+
|
|
40
|
+
Station order is semantic. `stations[0]` is the top station, then entries proceed clockwise. The last station always connects back to station 0; if that return would be false, use a Flowchart instead.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 2. Layout math — deterministic geometry
|
|
45
|
+
|
|
46
|
+
Use SVG coordinates, where positive y points downward. Let the hub center be `C = (cx, cy)`, station count be `N`, station ring radius be `R`, station half-size be `a = station_w/2`, `b = station_h/2`, and hub half-size be `A = hub_w/2`, `B = hub_h/2`.
|
|
47
|
+
|
|
48
|
+
### 2.1 Station centers
|
|
49
|
+
|
|
50
|
+
For zero-indexed station `k`:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
theta_k = -90deg + k * (360deg / N)
|
|
54
|
+
u_k = (cos(theta_k), sin(theta_k))
|
|
55
|
+
P_k = C + R * u_k
|
|
56
|
+
|
|
57
|
+
station_center_x(k) = cx + R * cos(theta_k)
|
|
58
|
+
station_center_y(k) = cy + R * sin(theta_k)
|
|
59
|
+
station_x(k) = station_center_x(k) - station_w/2
|
|
60
|
+
station_y(k) = station_center_y(k) - station_h/2
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Thus station 1 sits at the top, and increasing `k` moves clockwise. Round station rectangles to the nearest 4px grid point after computing the ideal geometry; preserve symmetry when rounding paired stations. Keep ring-circle intersection points to three decimal places so every arc remains on the same circle.
|
|
64
|
+
|
|
65
|
+
### 2.2 Solid ring-flow endpoints
|
|
66
|
+
|
|
67
|
+
Ring connectors travel from station `k` to station `j = (k + 1) mod N` as circular SVG arcs on the station circle itself. Every segment uses the same center `C`, radius `R`, and clockwise sweep. The station boxes interrupt the circle; connectors begin at the circle's clockwise exit from the source box and end just before its counterclockwise entry into the destination box, so the marker tip lands on the destination stroke.
|
|
68
|
+
|
|
69
|
+
Find the circle/rectangle intersections against all four edges of station `k`. For vertical edge `x = x_e`:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
y = cy +/- sqrt(R^2 - (x_e - cx)^2)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Keep only candidates whose `y` lies within the edge. For horizontal edge `y = y_e`:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
x = cx +/- sqrt(R^2 - (y_e - cy)^2)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Keep only candidates whose `x` lies within the edge. The two surviving points are classified by their normalized polar angles around `C`:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
q_entry(k) = circle/box intersection immediately before theta_k clockwise
|
|
85
|
+
q_exit(k) = circle/box intersection immediately after theta_k clockwise
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Compensate for the marker tip before emitting the destination endpoint. With the canonical marker (`refX=7`, polygon tip at `x=8`) and ring stroke width `1.2`, `marker_overhang = 1.2`:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
phi_entry = atan2(q_entry(j).y - cy, q_entry(j).x - cx)
|
|
92
|
+
phi_end = phi_entry - marker_overhang / R
|
|
93
|
+
q_end = C + R * (cos(phi_end), sin(phi_end))
|
|
94
|
+
|
|
95
|
+
M q_exit(k).x q_exit(k).y
|
|
96
|
+
A R R 0 0 1 q_end.x q_end.y
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The large-arc flag is `0` because adjacent-station gaps are less than 180 degrees; the sweep flag is always `1` for clockwise motion in SVG coordinates. The arrowhead overhang completes the final 1.2px to `q_entry(j)`, landing on the box edge without crossing its stroke. The closing connector from station `N-1` to station 0 uses the identical formula.
|
|
100
|
+
|
|
101
|
+
Loop's circular ring arcs are a documented type-specific exception to SKILL.md §6 rule 1, following the same precedent as Medallion's promotion arcs. A Loop never mixes cubic, straight, or rounded-orthogonal segments into its ring: the six visible gaps must read as pieces of one continuous circle.
|
|
102
|
+
|
|
103
|
+
### 2.3 Dashed write-back spoke endpoints
|
|
104
|
+
|
|
105
|
+
Each spoke runs inward from the station edge toward the hub. Use the same ray/box intersection formula, now on the radial vector `u_k`:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
box_distance(v, half_w, half_h) = min(half_w / abs(v.x), half_h / abs(v.y))
|
|
109
|
+
# ignore a term whose denominator is zero
|
|
110
|
+
|
|
111
|
+
d_station = box_distance(u_k, a, b)
|
|
112
|
+
d_hub = box_distance(u_k, A, B)
|
|
113
|
+
marker_gap = 6 # 4..8px; 6px canonical
|
|
114
|
+
|
|
115
|
+
spoke_start(k) = P_k - d_station * u_k
|
|
116
|
+
hub_edge(k) = C + d_hub * u_k
|
|
117
|
+
spoke_end(k) = C + (d_hub + marker_gap) * u_k
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Because the arrow travels from the station toward `C`, adding `marker_gap` leaves the endpoint just outside the hub boundary. The lighter arrowhead stops before the hub stroke instead of colliding with it. Radial spokes are the type-specific exception to the general ban on slanted straight connectors; they must remain true radii, must not cross one another, and may touch only their source station and the hub.
|
|
121
|
+
|
|
122
|
+
Labels are optional when the station sublabel already names the write-back. When used, they follow the `arrow-label` role, stay to one side of the spoke, and receive an opaque `paper` mask with a visible 6–10px gap from the stroke. Label a curated subset rather than forcing six labels into the hub halo.
|
|
123
|
+
|
|
124
|
+
### 2.4 ViewBox sizing
|
|
125
|
+
|
|
126
|
+
The viewBox must include the full station rectangles, outer ring curves, arrowheads, and at least `margin` breathing room:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
left <= cx - R - station_w/2 - margin
|
|
130
|
+
right >= cx + R + station_w/2 + margin
|
|
131
|
+
top <= cy - R - station_h/2 - margin
|
|
132
|
+
bottom >= cy + R + station_h/2 + margin
|
|
133
|
+
|
|
134
|
+
viewBox_w = right - left
|
|
135
|
+
viewBox_h = bottom - top
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Include the full circle extrema `cx +/- R`, `cy +/- R` plus station bounds and marker clearance when checking these limits. Never shrink the canvas until a station stroke, marker, or ring arc clips. For the six-station canonical example, `viewBox="0 0 1040 680"`, `C=(520,340)`, `R=240`, station size `160×64`, and hub size `200×104` leave generous outer clearance.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 3. Visual grammar
|
|
143
|
+
|
|
144
|
+
| Element | Treatment |
|
|
145
|
+
|---|---|
|
|
146
|
+
| Station | Standard node: `paper` fill, `ink` stroke, `radius-md`; name in `node-name`, sublabel in `sublabel` |
|
|
147
|
+
| Hub | The one dark element: `ink` fill, `paper` text; slightly larger than a station |
|
|
148
|
+
| Focal station | At most one: `accent-tint` fill, `accent` stroke; station name may use `accent` |
|
|
149
|
+
| Ring flow | Circular `A R R 0 0 1` arcs on the station circle, solid `muted` stroke, default arrowhead at the destination; clockwise only |
|
|
150
|
+
| Write-back spoke | Dashed `soft` stroke at reduced emphasis, `stroke-dasharray="5,4"`, with a `soft` arrowhead |
|
|
151
|
+
| Spoke label | `arrow-label` role, `soft`, uppercase, paper mask, 6–10px clear of the connector |
|
|
152
|
+
|
|
153
|
+
Draw in this order: paper or optional dot grid → ring arrows → dashed spokes → spoke-label masks and labels → station boxes → hub → text. The nodes mask microscopic connector overshoot, while every intended endpoint still lands on an edge.
|
|
154
|
+
|
|
155
|
+
The hub is not a seventh process step. It is accumulated state: memory, standards, evidence, policy, or a shared operating record. Keep its copy to one name plus one short sublabel.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 4. Connector rules (mandatory)
|
|
160
|
+
|
|
161
|
+
SKILL.md §6 applies in full except for the two Loop-specific connector primitives: circular ring arcs (§2.2) and straight radial spokes (§2.3). Like Medallion's promotion arcs, these replace §6 rule 1 for this diagram type:
|
|
162
|
+
|
|
163
|
+
- Ring arrows are same-radius circular arcs, solid, and clockwise. Every path uses `A R R 0 0 1`; destination markers land on station edges and no connector ends at a center point.
|
|
164
|
+
- Spokes are dashed and point inward. A solid spoke destroys the visual distinction between operating flow and write-back.
|
|
165
|
+
- Labels use opaque masks and maintain a visible 6–10px connector gap. Never place text on the stroke.
|
|
166
|
+
- No ring connector or spoke may overlap another connector. Ring paths remain outside the hub; spokes occupy distinct radial routes.
|
|
167
|
+
- When two spokes must leave the same station edge, fan their attach points by the §6 formula with at least 12px separation. The normal Loop has one spoke per station; use a second only when the semantics cannot be merged.
|
|
168
|
+
- If a ring route would cross the hub, increase `R` or split the diagram. Do not thread flow through shared state or substitute an orthogonal route.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 5. Dark variant — token swap
|
|
173
|
+
|
|
174
|
+
Apply the style-guide inversion rule; do not invent a second palette.
|
|
175
|
+
|
|
176
|
+
| Role | Light | Dark |
|
|
177
|
+
|---|---|---|
|
|
178
|
+
| Canvas and station fill | `paper` | dark `paper` |
|
|
179
|
+
| Primary text and station stroke | `ink` | inverted `ink` |
|
|
180
|
+
| Hub fill / hub text | `ink` / `paper` | inverted `ink` / dark `paper` |
|
|
181
|
+
| Ring flow | `muted` | dark `muted` |
|
|
182
|
+
| Write-back spokes and labels | `soft` | dark `soft` |
|
|
183
|
+
| Focal fill / stroke | `accent-tint` / `accent` | dark `accent-tint` / brighter dark `accent` |
|
|
184
|
+
| Rule and dot grid | `rule` | inverted `rule` at the same opacity |
|
|
185
|
+
|
|
186
|
+
The semantic relationship stays unchanged in dark mode: one `ink`-filled hub, one optional `accent` station, neutral solid ring arrows, and lighter dashed write-backs.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 6. Reproducibility checklist
|
|
191
|
+
|
|
192
|
+
1. Station count is 5–8 and hub count is exactly one.
|
|
193
|
+
2. Station 0 is at `-90deg`; all others use equal `360/N` steps clockwise.
|
|
194
|
+
3. Every solid ring arrow connects adjacent stations with `A R R 0 0 1`, using the same `R`; the last returns to the first.
|
|
195
|
+
4. Every ring marker lands on a station edge, not its center.
|
|
196
|
+
5. Every dashed spoke begins on a station's inner edge and stops `marker_gap` before the hub stroke.
|
|
197
|
+
6. Ring connectors stay outside the hub; spokes do not cross or overlap.
|
|
198
|
+
7. At most one station uses `accent-tint` + `accent`; the hub alone uses the dark `ink` fill.
|
|
199
|
+
8. Spoke labels, if present, use `arrow-label`, an opaque mask, and a 6–10px gap.
|
|
200
|
+
9. The viewBox includes station boxes, strokes, curves, markers, and margins without clipping.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 7. Anti-patterns
|
|
205
|
+
|
|
206
|
+
| Anti-pattern | Why it fails / correction |
|
|
207
|
+
|---|---|
|
|
208
|
+
| Two hubs | Two accumulated states create two systems. Draw two diagrams. |
|
|
209
|
+
| Solid spokes | They look like primary flow and kill the dashed return signal. Use dashed `soft` write-backs. |
|
|
210
|
+
| Stations at uneven angles without reason | The ring stops reading as one operating cadence. Use equal `360/N` spacing unless a documented phase grouping requires a deliberate gap. |
|
|
211
|
+
| Mixed arc + orthogonal ring segments | The ring becomes a rounded rectangle. Every segment must be a circular arc of the same radius so the ring reads as one continuous circle. |
|
|
212
|
+
| Connectors crossing the hub | Flow becomes confused with state. Route the ring outside or enlarge the radius. |
|
|
213
|
+
| Accent on multiple stations | The editorial gate disappears. Keep one focal station at most. |
|
|
214
|
+
| More than 8 stations | Labels and spokes crowd the hub. Split into overview + detail. |
|
|
215
|
+
| A cycle that never actually returns | That is a Flowchart arranged in a circle. Use Flowchart and show the real endpoint. |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 8. Examples
|
|
220
|
+
|
|
221
|
+
- `assets/example-loop.html` — minimal light: six-station self-improving operating loop.
|
|
222
|
+
- `assets/example-loop-dark.html` — the same geometry under the dark token inversion.
|
|
223
|
+
- `assets/example-loop-full.html` — editorial page with the flagship loop, three summary cards, and colophon.
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# Medallion
|
|
2
|
+
|
|
3
|
+
**Best for:** documenting a multi-tier data-storage layout where each tier is a distinct *quality / access level* of the same dataset — typically raw landing zone, anonymised, staging/cleaned, aggregated business indicators, and cold archive. Used when the reader needs to see at a glance *what each bucket contains*, *who writes it*, *with what tool and format*, and *how data is promoted between tiers*.
|
|
4
|
+
|
|
5
|
+
Prefer **Process** if the subject is a workflow with role lanes. Prefer **High-Level** if the subject is the cluster architecture rather than the storage tier organisation.
|
|
6
|
+
|
|
7
|
+
This type is **parametric** — the inputs schema in §1 drives every coordinate via the formulas in §2. Two generations from the same inputs must produce visually identical SVG. The rule shapes mirror `type-process.md` and `type-data-flow.md` so color override, focal rule, and reproducibility checklist read identically across types.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Inputs — the parameter contract
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
title: "Five-Tier Medallion Architecture"
|
|
15
|
+
subtitle: "Quarterly survey through Raw → Anonymized → Staging → Aggregated → Archive"
|
|
16
|
+
|
|
17
|
+
tiers: # 3..6 tier columns, ordered left → right
|
|
18
|
+
- { name: "Raw", bucket: "raw-bucket", style: "outer",
|
|
19
|
+
fields: { tool: "NiFi · raw write", format: "CSV · Parquet · JSON", writer: "Data Engineer",
|
|
20
|
+
example: ["Q1 dump · w/ PII", "verbatim CAPI export"] } }
|
|
21
|
+
- { name: "Anonymized", bucket: "anon-bucket", style: "default",
|
|
22
|
+
fields: { tool: "Trino INSERT", format: "Iceberg · partitioned", writer: "Data Engineer",
|
|
23
|
+
example: ["no name · address", "stable household ID"] } }
|
|
24
|
+
- { name: "Staging", bucket: "staging-bucket", style: "default", color: "#c9a23a", # warm yellow — analytical working zone
|
|
25
|
+
fields: { tool: "Trino · JupyterHub", format: "Iceberg · cleaned", writer: "Data Scientist",
|
|
26
|
+
example: ["weighted records", "harmonised codings"] } }
|
|
27
|
+
- { name: "Aggregated", bucket: "aggregated-bucket", style: "focal", focal: true,
|
|
28
|
+
fields: { tool: "Trino INSERT · SAS JDBC", format: "Iceberg · indicators", writer: "Data Scientist",
|
|
29
|
+
example: ["unemployment rate", "labour participation"] } }
|
|
30
|
+
- { name: "Archive", bucket: "archive-bucket", style: "cold",
|
|
31
|
+
fields: { tool: "MinIO lifecycle", format: "cold tier · immutable", writer: "Data Administrator",
|
|
32
|
+
example: ["historical Q1–Q4 sets", "5+ years retained"] } }
|
|
33
|
+
|
|
34
|
+
example_label: "Quarterly survey example" # bottom field label (varies per domain)
|
|
35
|
+
|
|
36
|
+
promotions: # adjacent-tier arrows; len = n_tiers - 1
|
|
37
|
+
- { from: 0, to: 1, label: "PII REMOVE", style: "normal" }
|
|
38
|
+
- { from: 1, to: 2, label: "CLEAN+WEIGHT", style: "normal" }
|
|
39
|
+
- { from: 2, to: 3, label: "AGGREGATE", style: "focal" } # auto-accent because target is focal
|
|
40
|
+
- { from: 3, to: 4, label: "LIFECYCLE", style: "lifecycle" } # dashed
|
|
41
|
+
|
|
42
|
+
paths: # 0..2 write-method cards at the bottom (optional)
|
|
43
|
+
- { tag: "SQL PATH", title: "Trino INSERT INTO … SELECT",
|
|
44
|
+
sub: "filter · reshape · join · aggregate — set-based transforms" }
|
|
45
|
+
- { tag: "NOTEBOOK PATH", title: "DuckDB + Python/R in JupyterHub",
|
|
46
|
+
sub: "stats · ML · interactive analysis — row-iterative work" }
|
|
47
|
+
|
|
48
|
+
dark: false
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Reserved field semantics:**
|
|
52
|
+
- `tiers[i].style` — one of `outer`, `default`, `focal`, `cold`. Drives the card's fill/stroke palette (§2.4).
|
|
53
|
+
- `tiers[i].focal: true` — exactly **one** tier may declare this. Overrides `style` to `focal` and switches the promotion arrow *into* this tier to `focal` automatically.
|
|
54
|
+
- `tiers[i].fields` — `{tool, format, writer, example}`. `example` is a 1- or 2-item list; the section heading uses `example_label`.
|
|
55
|
+
- `tiers[i].color` — optional `"#hex"` per-tier color override. See §4.
|
|
56
|
+
- `promotions[].style` — `normal` | `focal` | `lifecycle`. The connector rule (§3) binds each style to fixed stroke / dash / marker.
|
|
57
|
+
- `paths` — 0–2 entries. When 0 entries, the bottom row is omitted and `viewBox_h` shrinks accordingly.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 2. Layout formulas — deterministic geometry
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
# Tier dimensions
|
|
65
|
+
tier_w = 172
|
|
66
|
+
tier_h = 380
|
|
67
|
+
tier_gap = 16
|
|
68
|
+
left_pad = 16
|
|
69
|
+
right_pad = 100
|
|
70
|
+
n_tiers = len(tiers)
|
|
71
|
+
|
|
72
|
+
# Canvas
|
|
73
|
+
viewBox_w = left_pad + n_tiers * tier_w + (n_tiers - 1) * tier_gap + right_pad
|
|
74
|
+
# 5 tiers → 16 + 860 + 64 + 100 = 1040
|
|
75
|
+
arc_band_h = 80 # space above tiers reserved for promotion arcs
|
|
76
|
+
path_h = 56
|
|
77
|
+
path_gap = 16 # gap between tier row and path row
|
|
78
|
+
bottom_pad = 16
|
|
79
|
+
viewBox_h = arc_band_h + tier_h + (path_gap + path_h if paths else 0) + bottom_pad
|
|
80
|
+
# with paths → 80+380+72+16 = 548
|
|
81
|
+
# without paths → 80+380+16 = 476
|
|
82
|
+
|
|
83
|
+
# Tier positions
|
|
84
|
+
tier_x(i) = left_pad + i * (tier_w + tier_gap) # 16, 204, 392, 580, 768
|
|
85
|
+
tier_y = arc_band_h # 80 — tier tops sit just below the arc band
|
|
86
|
+
tier_cx(i) = tier_x(i) + tier_w/2 # 102, 290, 478, 666, 854
|
|
87
|
+
|
|
88
|
+
# Promotion arcs (between adjacent tiers — over the top, anchored at tier top-centers)
|
|
89
|
+
arc_src_x(i) = tier_cx(i) # top-center of tier i (102, 290, 478, 666)
|
|
90
|
+
arc_dst_x(i) = tier_cx(i+1) # top-center of tier i+1 (290, 478, 666, 854)
|
|
91
|
+
arc_peak_x(i) = (arc_src_x(i) + arc_dst_x(i)) / 2 # midpoint (196, 384, 572, 760)
|
|
92
|
+
arc_label_y = 50 # label sits inside the arc, 30px below tier top
|
|
93
|
+
|
|
94
|
+
# Path row (bottom)
|
|
95
|
+
path_y = tier_y + tier_h + path_gap # 476
|
|
96
|
+
path_w = (viewBox_w - 2*left_pad - path_gap) / 2 if len(paths) == 2 else (viewBox_w - 2*left_pad)
|
|
97
|
+
# Canonical 5-tier shape uses path_w=460 explicitly (see §2.5)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 2.1 Background
|
|
101
|
+
|
|
102
|
+
Solid paper fill across the full viewBox. No dot pattern.
|
|
103
|
+
|
|
104
|
+
### 2.2 Tier card (172 × 380)
|
|
105
|
+
|
|
106
|
+
Each tier renders as a rounded-rect card with a tinted header band, a centered bucket name, four labeled field rows, and a separated `example_label` section near the bottom.
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
tier_x(i), tier_y = card top-left (tier_y = 80, just below the arc band)
|
|
110
|
+
header_band_h = 40 # band from y=tier_y to y=tier_y+40 (i.e., 80..120)
|
|
111
|
+
header_band_extra = 10 # 10-px extension below band, same tint
|
|
112
|
+
|
|
113
|
+
# Inside the card (absolute y; tier_y = 80):
|
|
114
|
+
title_text at (tier_cx(i), 106) # node-name role, 13px, weight 700, ink
|
|
115
|
+
bucket_text at (tier_cx(i), 144) # sublabel role, muted (accent on focal tier)
|
|
116
|
+
|
|
117
|
+
field_x = tier_x(i) + 16 # 16-px left inset for field text
|
|
118
|
+
field_w = 140 # 172-px tier_w minus two 16-px insets
|
|
119
|
+
field rows (absolute y):
|
|
120
|
+
tool_label at 180, tool_value at 186 (foreignObject, height 24)
|
|
121
|
+
format_label at 220, format_value at 226 (foreignObject, height 24)
|
|
122
|
+
writer_label at 260, writer_value at 266 (foreignObject, height 24)
|
|
123
|
+
# gap (open whitespace below writer row, above the example section)
|
|
124
|
+
example_label_text at 360, example_line_0 at 374, example_line_1 at 388
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Field-value wrapping rule:** field values (tool / format / writer) render inside an SVG `<foreignObject>` with an HTML `<div>` so they auto-wrap when text exceeds 140 px. Each `foreignObject` is 140 wide × 24 tall (fits 2 lines in the `sublabel` role at 1.25 line-height). The 26-px gap to the next field's label absorbs the second line cleanly.
|
|
128
|
+
|
|
129
|
+
```svg
|
|
130
|
+
<foreignObject x="{field_x}" y="{value_top}" width="140" height="24">
|
|
131
|
+
<div xmlns="http://www.w3.org/1999/xhtml"
|
|
132
|
+
style="font-family: {sublabel}; color: {muted}; line-height: 1.25;">
|
|
133
|
+
{field_value}
|
|
134
|
+
</div>
|
|
135
|
+
</foreignObject>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The HTML namespace declaration on the `<div>` is required for SVG to render the inline content. Browsers and Playwright/Chromium render this faithfully; if your export target doesn't support `<foreignObject>` (some older Inkscape builds), hand-split long values into two `<tspan>` lines instead.
|
|
139
|
+
|
|
140
|
+
Field labels use the `node-name` role at 11px in ink. Field values use the `sublabel` role in muted. Bucket and field values can be retinted by `color` override (§4).
|
|
141
|
+
|
|
142
|
+
### 2.3 Tier styles
|
|
143
|
+
|
|
144
|
+
Four canonical styles, picked per tier via `tiers[i].style`. Default mapping if `style` is omitted: tier 0 → `outer`, last tier → `cold`, focal tier (if any) → `focal`, others → `default`.
|
|
145
|
+
|
|
146
|
+
| `style` | Card fill | Card stroke | Header band fill | Bucket text | Example value text |
|
|
147
|
+
|---|---|---|---|---|---|
|
|
148
|
+
| `outer` | `#FFFFFF` | `muted` 1.0 solid | `muted @ 0.10` | `muted` | `muted` |
|
|
149
|
+
| `default` | `#FFFFFF` | `ink` 1.0 solid | `ink @ 0.06` | `muted` | `muted` |
|
|
150
|
+
| `focal` | `accent @ 0.07` | `accent` 1.6 solid | `accent @ 0.14` | `accent` | `accent` |
|
|
151
|
+
| `cold` | `paper-2` | `muted` 1.0 dashed `5,3` | `muted @ 0.18` | `muted` | `muted` |
|
|
152
|
+
|
|
153
|
+
`rx = 6` on all card rects.
|
|
154
|
+
|
|
155
|
+
**Focal styling note:** the focal tier's accent treatment cascades — its bucket text and its example-value lines render in accent. Other field values (tool/format/writer) stay muted; only the bucket name and the example payload carry the focal signal so the tier card doesn't fully drown in coral.
|
|
156
|
+
|
|
157
|
+
### 2.4 Promotion arcs (over the top of the tiers)
|
|
158
|
+
|
|
159
|
+
Each promotion is a **cubic Bézier arc** anchored at the **top-center** of each adjacent tier — `(tier_cx(i), tier_y)` to `(tier_cx(i+1), tier_y)`. The arc rises into the 80-px `arc_band` above the cards, peaking at y ≈ 20. Both the connector and its label remain fully visible — no paper masks, no overlap with card content.
|
|
160
|
+
|
|
161
|
+
```svg
|
|
162
|
+
<path d="M {tier_cx(i)},{tier_y} C {tier_cx(i)},0 {tier_cx(i+1)},0 {tier_cx(i+1)},{tier_y}"
|
|
163
|
+
fill="none" stroke="…" stroke-width="…" marker-end="…"/>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Concrete for the canonical 5-tier shape (`tier_y = 80`, tier centers at x = 102, 290, 478, 666, 854):
|
|
167
|
+
- 0→1: `M 102,80 C 102,0 290,0 290,80`
|
|
168
|
+
- 1→2: `M 290,80 C 290,0 478,0 478,80`
|
|
169
|
+
- 2→3: `M 478,80 C 478,0 666,0 666,80` (focal — accent)
|
|
170
|
+
- 3→4: `M 666,80 C 666,0 854,0 854,80` (lifecycle — dashed)
|
|
171
|
+
|
|
172
|
+
The cubic geometry: anchor y = 80 (tier top), control y = 0 (top of viewBox). Curve peak at t=0.5 sits at y ≈ 20 (computed from `0.125·80 + 0.375·0 + 0.375·0 + 0.125·80 = 20`). Each arc spans one full tier-stride (188 px on the canonical layout), giving the connector a clearly visible vertical excursion.
|
|
173
|
+
|
|
174
|
+
**Marker orientation:** `marker-end` with `orient="auto"` rotates the arrow to match the path tangent at the endpoint. The control point sits directly above the anchor so the tangent at landing is straight **down** — the arrowhead enters the top-center of tier *i+1* cleanly, pointing into the header band.
|
|
175
|
+
|
|
176
|
+
**Chained anchors:** consecutive arcs share their meeting points (arc 0→1 ends at the same `(tier_cx(1), 80)` where arc 1→2 begins). Visually each tier's top-center acts as a "joint" — data arrives at the top of the card, gets transformed inside, and leaves out the top toward the next tier. The arrow-head plunge plus the next arc's straight-up emergence read as a single payload-handoff motion.
|
|
177
|
+
|
|
178
|
+
| `style` | Stroke | Width | Dash | Marker |
|
|
179
|
+
|---|---|---|---|---|
|
|
180
|
+
| `normal` | `muted` | 1.4 | — | `arrow` |
|
|
181
|
+
| `focal` | `accent` | 1.6 | — | `arrow-accent` |
|
|
182
|
+
| `lifecycle` | `muted` | 1.4 | `4,3` | `arrow` |
|
|
183
|
+
|
|
184
|
+
**Auto-style rules:**
|
|
185
|
+
- If `promotions[k].to` references the **focal tier**, the style auto-promotes to `focal` (accent, width 1.6, `arrow-accent` marker).
|
|
186
|
+
- If `promotions[k].to` references a tier with a **`color` override** (§4), the arrow inherits that hex — stroke = `C`, label fill = `C`, marker-end uses a color-matched marker (e.g., `arrow-yellow` for `#c9a23a`). Width stays at 1.4 — the color override is a "concern" signal, not a focal promotion. Lifecycle/dashed arrows keep their dash but adopt the color.
|
|
187
|
+
- Focal wins if both apply (a colored tier marked focal still uses accent).
|
|
188
|
+
|
|
189
|
+
**Label inside the arc:**
|
|
190
|
+
- Anchored at `(arc_peak_x(k), arc_label_y)` = `((arc_src_x + arc_dst_x) / 2, 50)`.
|
|
191
|
+
- `arrow-label` role at 10px with `letter-spacing=0.08em`, uppercase. Color matches the arrow stroke.
|
|
192
|
+
- **No mask rect needed** — the cubic curve peaks at y ≈ 20 and the label sits at y=50, well below the curve. The label floats inside the open space *enclosed* by the arc, reading "X transforms into Y" with the arc itself as the visual frame.
|
|
193
|
+
|
|
194
|
+
For shorter inter-tier gaps (if `tier_gap` is overridden below the default 16 px), the arc anchors `arc_inset` may need to shrink correspondingly to keep the arc visible.
|
|
195
|
+
|
|
196
|
+
### 2.5 Path row (bottom, optional)
|
|
197
|
+
|
|
198
|
+
Up to **2** write-method cards. The canonical 5-tier shape (with `arc_band_h = 80`):
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
path_y = 476 # tier_y + tier_h + path_gap = 80 + 380 + 16
|
|
202
|
+
path_h = 56
|
|
203
|
+
path_x[0] = 16
|
|
204
|
+
path_w[0] = 460
|
|
205
|
+
path_x[1] = 16 + 460 + 16 = 492
|
|
206
|
+
path_w[1] = 460
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
(Both paths land 460-wide despite the viewBox being 1040 — the right pad is taken from the card's tier strip, not the path strip. Keep `path_w=460` for the canonical 5-tier shape. For other tier counts, derive `path_w = (viewBox_w - 2*left_pad - path_gap) / 2`.)
|
|
210
|
+
|
|
211
|
+
Per-card content:
|
|
212
|
+
- Container rect: white fill, `ink @ 0.20` stroke width 1, `rx=6`.
|
|
213
|
+
- Tag chip: rect at `(path_x + 8, path_y + 6)`, `h=12 rx=2`, fill transparent, stroke `ink @ 0.30` width 0.8. Tag text centered inside in the `eyebrow` role with letter-spacing 0.08em, ink.
|
|
214
|
+
- Title at `(path_x + 80, path_y + 30)`: `node-name` role at 11px, ink.
|
|
215
|
+
- Sub at `(path_x + 80, path_y + 46)`: `sublabel` role, muted.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 3. Connector rules (mandatory)
|
|
220
|
+
|
|
221
|
+
Three styles, bound to topology. Mirror §3 of `type-process.md` so the rule reads identically.
|
|
222
|
+
|
|
223
|
+
```svg
|
|
224
|
+
<defs>
|
|
225
|
+
<marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="{muted}"/></marker>
|
|
226
|
+
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="{accent}"/></marker>
|
|
227
|
+
<!-- Per-color markers: declare one per custom tier color in use. -->
|
|
228
|
+
<marker id="arrow-yellow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#c9a23a"/></marker>
|
|
229
|
+
</defs>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Add a new `<marker>` for each `color` override used in the diagram. Naming convention: `arrow-{semantic}` (e.g., `arrow-yellow`, `arrow-slate`, `arrow-red`) — matches the recommended palette so the marker id reads cleanly in source.
|
|
233
|
+
|
|
234
|
+
**Z-order:** promotion arcs draw **before** any tier card rect, so the cards layer on top and any arc overshoot is masked inside the cards.
|
|
235
|
+
|
|
236
|
+
**Arc shape rule:** medallion promotions are always **cubic arcs over the top** of the tier strip, anchored at the **top-center** of source and target tiers; control points directly above anchors at y=0. No horizontal "through the gap" lines — the arc-over-top is what makes connector + label both clearly visible.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 4. Component color override
|
|
241
|
+
|
|
242
|
+
Any tier or path entry accepts an optional `color: "#hex"`. Mirrors `type-process.md` §4 / `type-data-flow.md` §4.
|
|
243
|
+
|
|
244
|
+
### 4.1 Per-tier `color`
|
|
245
|
+
|
|
246
|
+
Applied to:
|
|
247
|
+
|
|
248
|
+
| Element | Light | Dark |
|
|
249
|
+
|---|---|---|
|
|
250
|
+
| Card fill | `rgba(C, 0.07)` | `rgba(C_light, 0.10)` |
|
|
251
|
+
| Card stroke | `C` (width 1.4) | `C_light` (width 1.4) |
|
|
252
|
+
| Header band fill | `rgba(C, 0.14)` | `rgba(C_light, 0.18)` |
|
|
253
|
+
| Title text | ink (unchanged — title stays readable) | ink (unchanged) |
|
|
254
|
+
| Bucket text | `C` | `C_light` |
|
|
255
|
+
| Example values | `C` | `C_light` |
|
|
256
|
+
| Field labels / field values | **unchanged** (ink / muted) | **unchanged** |
|
|
257
|
+
| Connectors touching this tier | **unchanged** — topology-driven | **unchanged** |
|
|
258
|
+
|
|
259
|
+
`C_light` = the same hex lightened ~15% for dark-mode contrast.
|
|
260
|
+
|
|
261
|
+
### 4.2 Per-path `color`
|
|
262
|
+
|
|
263
|
+
Replaces the path card's stroke with `rgba(C, 0.45)` and the tag chip stroke with `rgba(C, 0.55)`. Tag text and title text use `C`. Sub stays muted.
|
|
264
|
+
|
|
265
|
+
### 4.3 Rules
|
|
266
|
+
|
|
267
|
+
- **Never on focal tiers.** The accent already carries that signal — a `color` on the focal tier is ignored.
|
|
268
|
+
- **Never on the `cold` tier in addition to its dashed treatment.** Pick either dashed-cold or a custom color, not both.
|
|
269
|
+
- **Cap at 2 custom-colored elements** per diagram (tier or path), in addition to the focal tier.
|
|
270
|
+
- **Promotion arrows inherit the target tier's color** (§3 auto-style rule). A `color: "#c9a23a"` on the Staging tier means the CLEAN+WEIGHT arc landing in Staging is also rendered in yellow — connector, label, and arrowhead match. This keeps visual coherence: the colored tier and its incoming flow read as a single "concern" group. Arrows do **not** inherit color from the source tier — only the target — so the arc *out of* a colored tier reverts to muted (or to the next target's color/style).
|
|
271
|
+
|
|
272
|
+
### 4.4 Semantic palette (recommended)
|
|
273
|
+
|
|
274
|
+
Same palette as the other parametric types so a reader scanning multiple diagrams sees the same colors meaning the same thing:
|
|
275
|
+
|
|
276
|
+
- `#b85450` rust-red — Security / Identity / Governance (PII-bearing tiers, audit tiers)
|
|
277
|
+
- `#5a7d9a` slate-blue — Observability / Quality (validated tiers, monitored zones)
|
|
278
|
+
- `#7a8c47` olive-green — Data Products / Publication (consumer-facing aggregates, public-release tiers)
|
|
279
|
+
- `#c9a23a` warm yellow / gold — Analytical / Working zones (staging tier, scientist sandbox, intermediate computation surface)
|
|
280
|
+
- `#8c6d3f` warm-brown — Backup / DR / Archive (alternative cold-tier styling)
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 5. Focal rule
|
|
285
|
+
|
|
286
|
+
Exactly **one** focal tier per diagram. Defaults to the tier marked `focal: true` in inputs; if none is marked, defaults to the analytical pivot tier (typically `Aggregated` or whichever tier downstream consumers query).
|
|
287
|
+
|
|
288
|
+
The focal tier:
|
|
289
|
+
- Uses `style: focal` (accent fill + stroke 1.6 + accent header band).
|
|
290
|
+
- Renders bucket text and example-value lines in accent.
|
|
291
|
+
- Has its **incoming** promotion arrow auto-promoted to `style: focal` (accent).
|
|
292
|
+
- Has its **outgoing** promotion arrow (if any) — typically into the cold archive — kept at the user-declared style (usually `lifecycle` dashed).
|
|
293
|
+
|
|
294
|
+
If zero or >1 tiers carry `focal: true`, halt and ask the user.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## 6. Dark mode
|
|
299
|
+
|
|
300
|
+
| Token | Light | Dark |
|
|
301
|
+
|---|---|---|
|
|
302
|
+
| Paper | `paper` | `ink` |
|
|
303
|
+
| Ink | `ink` | `paper` |
|
|
304
|
+
| Muted | `muted` | `soft` |
|
|
305
|
+
| Accent | `accent` | `accent` |
|
|
306
|
+
| Fog (cold tier fill) | `paper-2` | `paper @ 0.06` |
|
|
307
|
+
| White (default card fill) | `#FFFFFF` | `paper @ 0.04` |
|
|
308
|
+
| Card stroke ink (default style) | `ink` | `paper @ 0.30` |
|
|
309
|
+
| Header band ink-tint | `ink @ 0.06` | `paper @ 0.08` |
|
|
310
|
+
| Header band muted-tint | `muted @ 0.10` | `soft @ 0.16` |
|
|
311
|
+
| Header band cold-tint | `muted @ 0.18` | `soft @ 0.24` |
|
|
312
|
+
| Header band accent-tint | `accent @ 0.14` | `accent @ 0.20` |
|
|
313
|
+
| Custom component colors | `C` | `C_light` (lighten ~15%) |
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## 7. Reproducibility checklist (taste gate)
|
|
318
|
+
|
|
319
|
+
Before emitting SVG, verify **every** item:
|
|
320
|
+
|
|
321
|
+
1. `viewBox = "0 0 {viewBox_w} {viewBox_h}"` derived via §2 (5 tiers + 2 paths → 1040 × 548).
|
|
322
|
+
2. Each tier card at `(tier_x(i), 80)` size `172 × 380`, `rx=6`.
|
|
323
|
+
3. Tier header band fills `(tier_x(i), 80, 172, 40)` plus a 10-px extension under the band.
|
|
324
|
+
4. Exactly **one** focal tier; its incoming arc auto-styled to `focal`.
|
|
325
|
+
5. Promotion arcs render as cubic Béziers over the top of adjacent tiers; anchors at `(tier_cx(i), 80)` → `(tier_cx(i+1), 80)`, controls at y=0. Label inside the arc at `(arc_peak_x, 50)`, no mask.
|
|
326
|
+
6. Bottom path row only present when `len(paths) > 0`. Cards at `y=476`, height 56.
|
|
327
|
+
7. Custom component colors ≤ 2 in addition to the focal tier. Never on arrows.
|
|
328
|
+
8. All promotion arrows + label masks emitted **before** any tier rect (z-order rule — cards mask the line ends inside the cards).
|
|
329
|
+
9. The focal tier's bucket text and example values render in accent; the rest stay muted.
|
|
330
|
+
10. `rx=6` on every tier and path card; `rx=2` on tag chips.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 8. Anti-patterns
|
|
335
|
+
|
|
336
|
+
- **More than one focal tier** — focal exists to mark the central analytical surface; >1 erases the signal.
|
|
337
|
+
- **Cold styling on a non-archive tier** — the dashed fog look is reserved for retention/archive tiers.
|
|
338
|
+
- **Bidirectional promotion arrows** — promotions always flow left → right. Backflow (e.g., an aggregate writing back to raw) is wrong for this type; use a different diagram.
|
|
339
|
+
- **Custom-colored arrows** — connectors are topology-driven; color on a tier never spreads to its edges.
|
|
340
|
+
- **Path cards explaining tier semantics** — paths describe *write methods* (how data moves between tiers), not what each tier holds. If you find yourself writing "Raw stores …" in a path card, that content belongs in the Raw tier's fields.
|
|
341
|
+
- **Missing `example_label` content** — every tier should show a concrete example payload (quarterly survey rows, customer records, claims, …). Without it the diagram becomes abstract and stops earning its space.
|
|
342
|
+
- **Promotion arrow label longer than the tier-gap label mask** — keep labels to ≤ 14 chars in the uppercase `arrow-label` role. Long verbs ("CALCULATE & SUMMARIZE") break the rhythm; shorten to "AGGREGATE" or split into two diagrams.
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## 9. Examples
|
|
347
|
+
|
|
348
|
+
- `assets/example-medallion.html` — minimal light (NatStat quarterly survey: 5 tiers, 2 path cards, Aggregated focal). Gallery default.
|
|
349
|
+
- `assets/example-medallion-dark.html` — same, dark skin.
|
|
350
|
+
- `assets/example-medallion-full.html` — same, editorial-card frame with subtitle + summary cards.
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## 10. Worked YAML
|
|
355
|
+
|
|
356
|
+
The YAML in §1 is the **complete** inputs definition for the shipped `example-medallion.html`. Every coordinate in that file's SVG is derivable from §2 applied to those inputs. The same YAML is embedded as a top-of-file HTML comment inside `example-medallion.html` so source view shows the parametric inputs immediately above the SVG.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Nested Containment
|
|
2
|
+
|
|
3
|
+
**Best for:** hierarchy through containment — scope boundaries, CLAUDE.md cascade, trust zones, folder nesting, blast radius. Outer = broader, inner = more specific.
|
|
4
|
+
|
|
5
|
+
## Layout conventions
|
|
6
|
+
- 3–5 rounded rectangles (`rx=8`), nested with consistent inset padding (24–32px horizontal, 32–36px vertical recommended).
|
|
7
|
+
- Each level labeled at the top-left in Geist Mono eyebrow style (7–8px, letter-spacing 0.14em). Labels sit on a paper-colored mask rect over the ring's top border.
|
|
8
|
+
- Stroke hierarchy: outer rings faint (`rgba(..,0.30–0.45)`), progressing to muted, to ink, to coral at the innermost focal.
|
|
9
|
+
- Fills step up in opacity from outer to inner: `rgba(..,0.015)` → `rgba(..,0.025)` → accent-tint on the innermost.
|
|
10
|
+
- Optional file-icon glyph (folded-corner rect) inside each level hints at scope content.
|
|
11
|
+
- Italic Instrument Serif callouts (see `references/primitive-annotation.md`) — 1–2 max.
|
|
12
|
+
|
|
13
|
+
## Anti-patterns
|
|
14
|
+
- More than 6 levels (information disappears inward).
|
|
15
|
+
- Irregular padding between levels — unaligned nesting looks accidental.
|
|
16
|
+
- Content inside rings that isn't part of the hierarchy — use a sibling diagram.
|
|
17
|
+
- Coral on multiple levels — hierarchy collapses.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
- `assets/example-nested.html` — minimal light
|
|
21
|
+
- `assets/example-nested-dark.html` — minimal dark
|
|
22
|
+
- `assets/example-nested-full.html` — full editorial
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Org Chart / Responsibility Map
|
|
2
|
+
|
|
3
|
+
**Best for:** human teams, agent teams, support escalation maps, role ownership, routing maps, and any hierarchy where the reader needs to know *who owns what* rather than just parent → child structure.
|
|
4
|
+
|
|
5
|
+
Use **Org Chart** instead of **Tree** when the nodes are people, agents, teams, roles, or accountable owners. A tree shows generic hierarchy. An org chart shows responsibility, invocation paths, and coverage gaps.
|
|
6
|
+
|
|
7
|
+
## Layout conventions
|
|
8
|
+
- Root owner or front door at top center. Use one coral focal node for the person/team/agent that receives ambiguous work.
|
|
9
|
+
- Tier 1 nodes are departments, pods, queues, or primary routing buckets. Keep them horizontally aligned.
|
|
10
|
+
- Tier 2 nodes are responsible owners or specialists. If there are more than 8 specialists, group them under pod nodes instead of making one giant row.
|
|
11
|
+
- Use orthogonal connectors: vertical drop from parent → horizontal bus → vertical drops to children. No diagonal lines.
|
|
12
|
+
- Each node should answer three questions when space allows:
|
|
13
|
+
1. **Name** — human-readable role/person/agent in Geist sans.
|
|
14
|
+
2. **How to invoke** — Slack handle, queue, issue prefix, or trigger in Geist Mono.
|
|
15
|
+
3. **Scope** — 2–4 terse ownership words, not a paragraph.
|
|
16
|
+
- Show non-Slack / not-yet-live owners with dashed optional styling rather than hiding them. Missing routes are operationally important.
|
|
17
|
+
- Put escalation / approval rules in a small side callout or footer strip, not as extra org nodes.
|
|
18
|
+
|
|
19
|
+
## Node treatments
|
|
20
|
+
- **Front door / command center:** focal treatment (`accent-tint` + `accent`).
|
|
21
|
+
- **Team / pod / department:** backend treatment (white + `ink`).
|
|
22
|
+
- **Individual agent / owner:** store or external treatment depending on whether it is active in the system.
|
|
23
|
+
- **Gap / needs setup:** optional dashed treatment.
|
|
24
|
+
- **Approval gate:** security treatment, separate from reporting hierarchy.
|
|
25
|
+
|
|
26
|
+
## Complexity budget
|
|
27
|
+
- Max visible org nodes: 12. If more, create an overview org chart plus separate detail charts per pod.
|
|
28
|
+
- Max depth: 4 tiers.
|
|
29
|
+
- Max direct reports under one parent: 5. If there are more, introduce grouping nodes.
|
|
30
|
+
- Max coral nodes: 1. The org chart's job is clarity, not highlighting everything.
|
|
31
|
+
- Max side callouts: 2.
|
|
32
|
+
|
|
33
|
+
## Anti-patterns
|
|
34
|
+
- Using a swimlane when the user's real question is "who does what?" Swimlanes explain process; org charts explain ownership.
|
|
35
|
+
- Drawing every person/agent as an identical box. It hides the front door, specialists, gaps, and escalation paths.
|
|
36
|
+
- Cramming full job descriptions into nodes. Keep scope phrases short and move detail to summary cards below.
|
|
37
|
+
- Showing unavailable / not-yet-wired agents as normal active owners. Use dashed optional styling so gaps are visible.
|
|
38
|
+
- Repeating Slack handles in body paragraphs when a node sublabel can carry the invocation path.
|
|
39
|
+
- Floating legends in the org area. Use the standard bottom legend strip.
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
- `assets/example-org-chart.html` — minimal light
|
|
43
|
+
- `assets/example-org-chart-dark.html` — minimal dark
|
|
44
|
+
- `assets/example-org-chart-full.html` — full editorial
|