forge-server 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/worktree-create.sh +64 -0
- package/.claude/hooks/worktree-remove.sh +57 -0
- package/.claude/settings.local.json +29 -0
- package/.forge/knowledge/conventions.yaml +1 -0
- package/.forge/knowledge/decisions.yaml +1 -0
- package/.forge/knowledge/gotchas.yaml +1 -0
- package/.forge/knowledge/patterns.yaml +1 -0
- package/.forge/manifest.yaml +6 -0
- package/CLAUDE.md +144 -0
- package/bin/setup-forge.sh +132 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +553 -0
- package/dist/cli.js.map +1 -0
- package/dist/context/codebase.d.ts +57 -0
- package/dist/context/codebase.d.ts.map +1 -0
- package/dist/context/codebase.js +301 -0
- package/dist/context/codebase.js.map +1 -0
- package/dist/context/injector.d.ts +147 -0
- package/dist/context/injector.d.ts.map +1 -0
- package/dist/context/injector.js +533 -0
- package/dist/context/injector.js.map +1 -0
- package/dist/context/memory.d.ts +32 -0
- package/dist/context/memory.d.ts.map +1 -0
- package/dist/context/memory.js +140 -0
- package/dist/context/memory.js.map +1 -0
- package/dist/context/session-index.d.ts +54 -0
- package/dist/context/session-index.d.ts.map +1 -0
- package/dist/context/session-index.js +265 -0
- package/dist/context/session-index.js.map +1 -0
- package/dist/context/session.d.ts +42 -0
- package/dist/context/session.d.ts.map +1 -0
- package/dist/context/session.js +121 -0
- package/dist/context/session.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/ingestion/chunker.d.ts +19 -0
- package/dist/ingestion/chunker.d.ts.map +1 -0
- package/dist/ingestion/chunker.js +189 -0
- package/dist/ingestion/chunker.js.map +1 -0
- package/dist/ingestion/embedder.d.ts +45 -0
- package/dist/ingestion/embedder.d.ts.map +1 -0
- package/dist/ingestion/embedder.js +152 -0
- package/dist/ingestion/embedder.js.map +1 -0
- package/dist/ingestion/git-analyzer.d.ts +77 -0
- package/dist/ingestion/git-analyzer.d.ts.map +1 -0
- package/dist/ingestion/git-analyzer.js +437 -0
- package/dist/ingestion/git-analyzer.js.map +1 -0
- package/dist/ingestion/indexer.d.ts +79 -0
- package/dist/ingestion/indexer.d.ts.map +1 -0
- package/dist/ingestion/indexer.js +766 -0
- package/dist/ingestion/indexer.js.map +1 -0
- package/dist/ingestion/markdown-chunker.d.ts +19 -0
- package/dist/ingestion/markdown-chunker.d.ts.map +1 -0
- package/dist/ingestion/markdown-chunker.js +243 -0
- package/dist/ingestion/markdown-chunker.js.map +1 -0
- package/dist/ingestion/markdown-knowledge.d.ts +21 -0
- package/dist/ingestion/markdown-knowledge.d.ts.map +1 -0
- package/dist/ingestion/markdown-knowledge.js +129 -0
- package/dist/ingestion/markdown-knowledge.js.map +1 -0
- package/dist/ingestion/parser.d.ts +20 -0
- package/dist/ingestion/parser.d.ts.map +1 -0
- package/dist/ingestion/parser.js +429 -0
- package/dist/ingestion/parser.js.map +1 -0
- package/dist/ingestion/watcher.d.ts +28 -0
- package/dist/ingestion/watcher.d.ts.map +1 -0
- package/dist/ingestion/watcher.js +147 -0
- package/dist/ingestion/watcher.js.map +1 -0
- package/dist/knowledge/hydrator.d.ts +37 -0
- package/dist/knowledge/hydrator.d.ts.map +1 -0
- package/dist/knowledge/hydrator.js +220 -0
- package/dist/knowledge/hydrator.js.map +1 -0
- package/dist/knowledge/registry.d.ts +129 -0
- package/dist/knowledge/registry.d.ts.map +1 -0
- package/dist/knowledge/registry.js +361 -0
- package/dist/knowledge/registry.js.map +1 -0
- package/dist/knowledge/search.d.ts +114 -0
- package/dist/knowledge/search.d.ts.map +1 -0
- package/dist/knowledge/search.js +428 -0
- package/dist/knowledge/search.js.map +1 -0
- package/dist/knowledge/store.d.ts +76 -0
- package/dist/knowledge/store.d.ts.map +1 -0
- package/dist/knowledge/store.js +230 -0
- package/dist/knowledge/store.js.map +1 -0
- package/dist/learning/confidence.d.ts +30 -0
- package/dist/learning/confidence.d.ts.map +1 -0
- package/dist/learning/confidence.js +165 -0
- package/dist/learning/confidence.js.map +1 -0
- package/dist/learning/patterns.d.ts +52 -0
- package/dist/learning/patterns.d.ts.map +1 -0
- package/dist/learning/patterns.js +290 -0
- package/dist/learning/patterns.js.map +1 -0
- package/dist/learning/trajectory.d.ts +55 -0
- package/dist/learning/trajectory.d.ts.map +1 -0
- package/dist/learning/trajectory.js +200 -0
- package/dist/learning/trajectory.js.map +1 -0
- package/dist/memory/memory-compat.d.ts +100 -0
- package/dist/memory/memory-compat.d.ts.map +1 -0
- package/dist/memory/memory-compat.js +146 -0
- package/dist/memory/memory-compat.js.map +1 -0
- package/dist/memory/observation-store.d.ts +57 -0
- package/dist/memory/observation-store.d.ts.map +1 -0
- package/dist/memory/observation-store.js +154 -0
- package/dist/memory/observation-store.js.map +1 -0
- package/dist/memory/session-tracker.d.ts +81 -0
- package/dist/memory/session-tracker.d.ts.map +1 -0
- package/dist/memory/session-tracker.js +262 -0
- package/dist/memory/session-tracker.js.map +1 -0
- package/dist/pipeline/engine.d.ts +179 -0
- package/dist/pipeline/engine.d.ts.map +1 -0
- package/dist/pipeline/engine.js +691 -0
- package/dist/pipeline/engine.js.map +1 -0
- package/dist/pipeline/events.d.ts +54 -0
- package/dist/pipeline/events.d.ts.map +1 -0
- package/dist/pipeline/events.js +157 -0
- package/dist/pipeline/events.js.map +1 -0
- package/dist/pipeline/parallel.d.ts +83 -0
- package/dist/pipeline/parallel.d.ts.map +1 -0
- package/dist/pipeline/parallel.js +277 -0
- package/dist/pipeline/parallel.js.map +1 -0
- package/dist/pipeline/state-machine.d.ts +65 -0
- package/dist/pipeline/state-machine.d.ts.map +1 -0
- package/dist/pipeline/state-machine.js +176 -0
- package/dist/pipeline/state-machine.js.map +1 -0
- package/dist/query/graph-queries.d.ts +84 -0
- package/dist/query/graph-queries.d.ts.map +1 -0
- package/dist/query/graph-queries.js +216 -0
- package/dist/query/graph-queries.js.map +1 -0
- package/dist/query/hybrid-search.d.ts +34 -0
- package/dist/query/hybrid-search.d.ts.map +1 -0
- package/dist/query/hybrid-search.js +263 -0
- package/dist/query/hybrid-search.js.map +1 -0
- package/dist/query/intent-detector.d.ts +35 -0
- package/dist/query/intent-detector.d.ts.map +1 -0
- package/dist/query/intent-detector.js +115 -0
- package/dist/query/intent-detector.js.map +1 -0
- package/dist/query/ranking.d.ts +57 -0
- package/dist/query/ranking.d.ts.map +1 -0
- package/dist/query/ranking.js +109 -0
- package/dist/query/ranking.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +291 -0
- package/dist/server.js.map +1 -0
- package/dist/storage/falkordb-store.d.ts +73 -0
- package/dist/storage/falkordb-store.d.ts.map +1 -0
- package/dist/storage/falkordb-store.js +346 -0
- package/dist/storage/falkordb-store.js.map +1 -0
- package/dist/storage/file-cache.d.ts +32 -0
- package/dist/storage/file-cache.d.ts.map +1 -0
- package/dist/storage/file-cache.js +115 -0
- package/dist/storage/file-cache.js.map +1 -0
- package/dist/storage/interfaces.d.ts +151 -0
- package/dist/storage/interfaces.d.ts.map +1 -0
- package/dist/storage/interfaces.js +7 -0
- package/dist/storage/interfaces.js.map +1 -0
- package/dist/storage/qdrant-store.d.ts +110 -0
- package/dist/storage/qdrant-store.d.ts.map +1 -0
- package/dist/storage/qdrant-store.js +467 -0
- package/dist/storage/qdrant-store.js.map +1 -0
- package/dist/storage/schema.d.ts +4 -0
- package/dist/storage/schema.d.ts.map +1 -0
- package/dist/storage/schema.js +136 -0
- package/dist/storage/schema.js.map +1 -0
- package/dist/storage/sqlite.d.ts +35 -0
- package/dist/storage/sqlite.d.ts.map +1 -0
- package/dist/storage/sqlite.js +132 -0
- package/dist/storage/sqlite.js.map +1 -0
- package/dist/tools/collaboration-tools.d.ts +111 -0
- package/dist/tools/collaboration-tools.d.ts.map +1 -0
- package/dist/tools/collaboration-tools.js +174 -0
- package/dist/tools/collaboration-tools.js.map +1 -0
- package/dist/tools/context-tools.d.ts +293 -0
- package/dist/tools/context-tools.d.ts.map +1 -0
- package/dist/tools/context-tools.js +437 -0
- package/dist/tools/context-tools.js.map +1 -0
- package/dist/tools/graph-tools.d.ts +129 -0
- package/dist/tools/graph-tools.d.ts.map +1 -0
- package/dist/tools/graph-tools.js +237 -0
- package/dist/tools/graph-tools.js.map +1 -0
- package/dist/tools/ingestion-tools.d.ts +96 -0
- package/dist/tools/ingestion-tools.d.ts.map +1 -0
- package/dist/tools/ingestion-tools.js +90 -0
- package/dist/tools/ingestion-tools.js.map +1 -0
- package/dist/tools/learning-tools.d.ts +168 -0
- package/dist/tools/learning-tools.d.ts.map +1 -0
- package/dist/tools/learning-tools.js +158 -0
- package/dist/tools/learning-tools.js.map +1 -0
- package/dist/tools/memory-tools.d.ts +183 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +197 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/phase-tools.d.ts +954 -0
- package/dist/tools/phase-tools.d.ts.map +1 -0
- package/dist/tools/phase-tools.js +1215 -0
- package/dist/tools/phase-tools.js.map +1 -0
- package/dist/tools/pipeline-tools.d.ts +140 -0
- package/dist/tools/pipeline-tools.d.ts.map +1 -0
- package/dist/tools/pipeline-tools.js +162 -0
- package/dist/tools/pipeline-tools.js.map +1 -0
- package/dist/tools/registration-tools.d.ts +220 -0
- package/dist/tools/registration-tools.d.ts.map +1 -0
- package/dist/tools/registration-tools.js +391 -0
- package/dist/tools/registration-tools.js.map +1 -0
- package/dist/util/circuit-breaker.d.ts +75 -0
- package/dist/util/circuit-breaker.d.ts.map +1 -0
- package/dist/util/circuit-breaker.js +159 -0
- package/dist/util/circuit-breaker.js.map +1 -0
- package/dist/util/config.d.ts +23 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js +164 -0
- package/dist/util/config.js.map +1 -0
- package/dist/util/logger.d.ts +13 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +45 -0
- package/dist/util/logger.js.map +1 -0
- package/dist/util/token-counter.d.ts +24 -0
- package/dist/util/token-counter.d.ts.map +1 -0
- package/dist/util/token-counter.js +48 -0
- package/dist/util/token-counter.js.map +1 -0
- package/dist/util/types.d.ts +525 -0
- package/dist/util/types.d.ts.map +1 -0
- package/dist/util/types.js +5 -0
- package/dist/util/types.js.map +1 -0
- package/docker-compose.yml +20 -0
- package/docs/plans/2026-02-27-swarm-coordination/architecture.md +203 -0
- package/docs/plans/2026-02-27-swarm-coordination/vision.md +57 -0
- package/docs/plans/completed/2026-02-26-forge-plugin-bundling/architecture.md +1 -0
- package/docs/plans/completed/2026-02-26-forge-plugin-bundling/vision.md +300 -0
- package/docs/plans/completed/2026-02-27-forge-swarm-learning/architecture.md +480 -0
- package/docs/plans/completed/2026-02-27-forge-swarm-learning/verification-checklist.md +462 -0
- package/docs/plans/completed/2026-02-27-git-history-atlassian/git-jira-plan.md +181 -0
- package/package.json +39 -0
- package/plugin/.claude-plugin/plugin.json +8 -0
- package/plugin/.mcp.json +15 -0
- package/plugin/README.md +134 -0
- package/plugin/agents/architect.md +367 -0
- package/plugin/agents/backend-specialist.md +263 -0
- package/plugin/agents/brainstormer.md +122 -0
- package/plugin/agents/data-specialist.md +266 -0
- package/plugin/agents/designer.md +408 -0
- package/plugin/agents/frontend-specialist.md +241 -0
- package/plugin/agents/inspector.md +406 -0
- package/plugin/agents/knowledge-keeper.md +443 -0
- package/plugin/agents/platform-engineer.md +326 -0
- package/plugin/agents/product-manager.md +268 -0
- package/plugin/agents/product-owner.md +438 -0
- package/plugin/agents/pulse-checker.md +73 -0
- package/plugin/agents/qa-strategist.md +500 -0
- package/plugin/agents/self-improver.md +310 -0
- package/plugin/agents/strategist.md +360 -0
- package/plugin/agents/supervisor.md +380 -0
- package/plugin/commands/brainstorm.md +25 -0
- package/plugin/commands/forge.md +88 -0
- package/plugin/docs/atlassian-integration.md +110 -0
- package/plugin/docs/workflow.md +126 -0
- package/plugin/skills/agent-development/.skillfish.json +10 -0
- package/plugin/skills/agent-development/SKILL.md +415 -0
- package/plugin/skills/agent-development/examples/agent-creation-prompt.md +238 -0
- package/plugin/skills/agent-development/examples/complete-agent-examples.md +427 -0
- package/plugin/skills/agent-development/references/agent-creation-system-prompt.md +207 -0
- package/plugin/skills/agent-development/references/system-prompt-design.md +411 -0
- package/plugin/skills/agent-development/references/triggering-examples.md +491 -0
- package/plugin/skills/agent-development/scripts/validate-agent.sh +217 -0
- package/plugin/skills/agent-handoff/SKILL.md +335 -0
- package/plugin/skills/anti-stub/SKILL.md +317 -0
- package/plugin/skills/brainstorm/SKILL.md +31 -0
- package/plugin/skills/debugging/SKILL.md +276 -0
- package/plugin/skills/fix/SKILL.md +62 -0
- package/plugin/skills/frontend-design/.skillfish.json +10 -0
- package/plugin/skills/frontend-design/SKILL.md +42 -0
- package/plugin/skills/gotchas/SKILL.md +61 -0
- package/plugin/skills/graph-orchestrator/SKILL.md +38 -0
- package/plugin/skills/history/SKILL.md +58 -0
- package/plugin/skills/impact/SKILL.md +59 -0
- package/plugin/skills/implementation-execution/SKILL.md +291 -0
- package/plugin/skills/index-repo/SKILL.md +55 -0
- package/plugin/skills/interviewing/SKILL.md +225 -0
- package/plugin/skills/knowledge-curation/SKILL.md +393 -0
- package/plugin/skills/learn/SKILL.md +69 -0
- package/plugin/skills/mcp-integration/.skillfish.json +10 -0
- package/plugin/skills/mcp-integration/SKILL.md +554 -0
- package/plugin/skills/mcp-integration/examples/http-server.json +20 -0
- package/plugin/skills/mcp-integration/examples/sse-server.json +19 -0
- package/plugin/skills/mcp-integration/examples/stdio-server.json +26 -0
- package/plugin/skills/mcp-integration/references/authentication.md +549 -0
- package/plugin/skills/mcp-integration/references/server-types.md +536 -0
- package/plugin/skills/mcp-integration/references/tool-usage.md +538 -0
- package/plugin/skills/nestjs/.skillfish.json +10 -0
- package/plugin/skills/nestjs/SKILL.md +669 -0
- package/plugin/skills/nestjs/drizzle-reference.md +1894 -0
- package/plugin/skills/nestjs/reference.md +1447 -0
- package/plugin/skills/nestjs/workflow-optimization.md +229 -0
- package/plugin/skills/parallel-dispatch/SKILL.md +308 -0
- package/plugin/skills/project-discovery/SKILL.md +304 -0
- package/plugin/skills/search/SKILL.md +56 -0
- package/plugin/skills/security-audit/SKILL.md +362 -0
- package/plugin/skills/skill-development/.skillfish.json +10 -0
- package/plugin/skills/skill-development/SKILL.md +637 -0
- package/plugin/skills/skill-development/references/skill-creator-original.md +209 -0
- package/plugin/skills/tdd/SKILL.md +273 -0
- package/plugin/skills/terminal-presentation/SKILL.md +395 -0
- package/plugin/skills/test-strategy/SKILL.md +365 -0
- package/plugin/skills/verification-protocol/SKILL.md +256 -0
- package/plugin/skills/visual-explainer/CHANGELOG.md +97 -0
- package/plugin/skills/visual-explainer/LICENSE +21 -0
- package/plugin/skills/visual-explainer/README.md +137 -0
- package/plugin/skills/visual-explainer/SKILL.md +352 -0
- package/plugin/skills/visual-explainer/banner.png +0 -0
- package/plugin/skills/visual-explainer/package.json +11 -0
- package/plugin/skills/visual-explainer/prompts/diff-review.md +68 -0
- package/plugin/skills/visual-explainer/prompts/fact-check.md +63 -0
- package/plugin/skills/visual-explainer/prompts/generate-slides.md +18 -0
- package/plugin/skills/visual-explainer/prompts/generate-web-diagram.md +10 -0
- package/plugin/skills/visual-explainer/prompts/plan-review.md +86 -0
- package/plugin/skills/visual-explainer/prompts/project-recap.md +61 -0
- package/plugin/skills/visual-explainer/references/css-patterns.md +1188 -0
- package/plugin/skills/visual-explainer/references/libraries.md +470 -0
- package/plugin/skills/visual-explainer/references/responsive-nav.md +212 -0
- package/plugin/skills/visual-explainer/references/slide-patterns.md +1403 -0
- package/plugin/skills/visual-explainer/templates/architecture.html +596 -0
- package/plugin/skills/visual-explainer/templates/data-table.html +540 -0
- package/plugin/skills/visual-explainer/templates/mermaid-flowchart.html +435 -0
- package/plugin/skills/visual-explainer/templates/slide-deck.html +913 -0
- package/src/cli.ts +655 -0
- package/src/context/.gitkeep +0 -0
- package/src/context/codebase.ts +393 -0
- package/src/context/injector.ts +797 -0
- package/src/context/memory.ts +187 -0
- package/src/context/session-index.ts +327 -0
- package/src/context/session.ts +152 -0
- package/src/index.ts +47 -0
- package/src/ingestion/.gitkeep +0 -0
- package/src/ingestion/chunker.ts +277 -0
- package/src/ingestion/embedder.ts +167 -0
- package/src/ingestion/git-analyzer.ts +545 -0
- package/src/ingestion/indexer.ts +984 -0
- package/src/ingestion/markdown-chunker.ts +337 -0
- package/src/ingestion/markdown-knowledge.ts +175 -0
- package/src/ingestion/parser.ts +475 -0
- package/src/ingestion/watcher.ts +182 -0
- package/src/knowledge/.gitkeep +0 -0
- package/src/knowledge/hydrator.ts +246 -0
- package/src/knowledge/registry.ts +463 -0
- package/src/knowledge/search.ts +565 -0
- package/src/knowledge/store.ts +262 -0
- package/src/learning/.gitkeep +0 -0
- package/src/learning/confidence.ts +193 -0
- package/src/learning/patterns.ts +360 -0
- package/src/learning/trajectory.ts +268 -0
- package/src/memory/.gitkeep +0 -0
- package/src/memory/memory-compat.ts +233 -0
- package/src/memory/observation-store.ts +224 -0
- package/src/memory/session-tracker.ts +332 -0
- package/src/pipeline/.gitkeep +0 -0
- package/src/pipeline/engine.ts +1139 -0
- package/src/pipeline/events.ts +253 -0
- package/src/pipeline/parallel.ts +394 -0
- package/src/pipeline/state-machine.ts +199 -0
- package/src/query/.gitkeep +0 -0
- package/src/query/graph-queries.ts +262 -0
- package/src/query/hybrid-search.ts +337 -0
- package/src/query/intent-detector.ts +131 -0
- package/src/query/ranking.ts +161 -0
- package/src/server.ts +352 -0
- package/src/storage/.gitkeep +0 -0
- package/src/storage/falkordb-store.ts +388 -0
- package/src/storage/file-cache.ts +141 -0
- package/src/storage/interfaces.ts +201 -0
- package/src/storage/qdrant-store.ts +557 -0
- package/src/storage/schema.ts +139 -0
- package/src/storage/sqlite.ts +168 -0
- package/src/tools/.gitkeep +0 -0
- package/src/tools/collaboration-tools.ts +208 -0
- package/src/tools/context-tools.ts +493 -0
- package/src/tools/graph-tools.ts +295 -0
- package/src/tools/ingestion-tools.ts +122 -0
- package/src/tools/learning-tools.ts +181 -0
- package/src/tools/memory-tools.ts +234 -0
- package/src/tools/phase-tools.ts +1452 -0
- package/src/tools/pipeline-tools.ts +188 -0
- package/src/tools/registration-tools.ts +450 -0
- package/src/util/.gitkeep +0 -0
- package/src/util/circuit-breaker.ts +193 -0
- package/src/util/config.ts +177 -0
- package/src/util/logger.ts +53 -0
- package/src/util/token-counter.ts +52 -0
- package/src/util/types.ts +710 -0
- package/tests/context/.gitkeep +0 -0
- package/tests/integration/.gitkeep +0 -0
- package/tests/knowledge/.gitkeep +0 -0
- package/tests/learning/.gitkeep +0 -0
- package/tests/pipeline/.gitkeep +0 -0
- package/tests/tools/.gitkeep +0 -0
- package/tsconfig.json +21 -0
- package/vitest.config.ts +10 -0
- package/vscode-extension/.vscodeignore +7 -0
- package/vscode-extension/README.md +43 -0
- package/vscode-extension/out/edge-collector.js +274 -0
- package/vscode-extension/out/edge-collector.js.map +1 -0
- package/vscode-extension/out/extension.js +264 -0
- package/vscode-extension/out/extension.js.map +1 -0
- package/vscode-extension/out/forge-client.js +318 -0
- package/vscode-extension/out/forge-client.js.map +1 -0
- package/vscode-extension/package-lock.json +59 -0
- package/vscode-extension/package.json +71 -0
- package/vscode-extension/src/edge-collector.ts +320 -0
- package/vscode-extension/src/extension.ts +269 -0
- package/vscode-extension/src/forge-client.ts +364 -0
- package/vscode-extension/tsconfig.json +19 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.0] - 2026-02-26
|
|
4
|
+
|
|
5
|
+
### Anti-Slop Guardrails
|
|
6
|
+
- Added explicit "Anti-Patterns (AI Slop)" section to SKILL.md with forbidden patterns
|
|
7
|
+
- Removed "Neon dashboard" and "Gradient mesh" from allowed aesthetics — they always produce generic output
|
|
8
|
+
- Categorized aesthetics as "Constrained" (safer) vs "Flexible" (use with caution)
|
|
9
|
+
- Explicit forbidden fonts: Inter, Roboto, Arial, Helvetica, system-ui as primary
|
|
10
|
+
- Explicit forbidden colors: indigo/violet range (`#8b5cf6`, `#7c3aed`, `#a78bfa`), cyan-magenta-pink combination
|
|
11
|
+
- Explicit forbidden effects: gradient text on headings, animated glowing box-shadows, emoji section headers
|
|
12
|
+
- Added "The Slop Test" — 7-point checklist to catch AI-generated patterns before delivery
|
|
13
|
+
- Strengthened typography guidance with 5 explicit good pairings to use
|
|
14
|
+
- Strengthened color guidance with 5 explicit good palettes to use
|
|
15
|
+
- Referenced `websocket-implementation-plan.html` as positive example of Blueprint aesthetic
|
|
16
|
+
|
|
17
|
+
### Template Fixes
|
|
18
|
+
- Replaced violet secondary colors in `mermaid-flowchart.html` with sky blue to match anti-slop guidelines
|
|
19
|
+
- Updated Mermaid themeVariables example in `libraries.md` to use teal/slate palette instead of violet
|
|
20
|
+
|
|
21
|
+
## [0.2.0] - 2026-02-25
|
|
22
|
+
|
|
23
|
+
### Slide Deck Mode
|
|
24
|
+
- New output format: magazine-quality slide deck presentations as self-contained HTML files
|
|
25
|
+
- 10 slide types: Title, Section Divider, Content, Split, Diagram, Dashboard, Table, Code, Quote, Full-Bleed
|
|
26
|
+
- SlideEngine JS: keyboard/touch/wheel navigation, progress bar, nav dots, slide counter, keyboard hints with auto-fade
|
|
27
|
+
- Cinematic transitions: fade + translateY + scale on slide entrance, staggered child reveals via IntersectionObserver
|
|
28
|
+
- 4 curated presets: Midnight Editorial, Warm Signal, Terminal Mono, Swiss Clean (each with full light/dark palette)
|
|
29
|
+
- Event delegation: Mermaid zoom, scrollable code/tables don't trigger slide navigation
|
|
30
|
+
- Responsive height breakpoints (700px, 600px, 500px) for projection and small viewports
|
|
31
|
+
- Typography scale 2–3× larger than scrollable pages (80–120px display, 28–48px headings, 16–24px body)
|
|
32
|
+
- Per-slide background variation, SVG decorative accents, compositional variety rules
|
|
33
|
+
- Proactive imagery: surf-cli integration for title/full-bleed backgrounds, inline sparklines, mini-charts
|
|
34
|
+
- New `/generate-slides` prompt template; existing prompts support `--slides` flag via SKILL.md workflow
|
|
35
|
+
- Unified `autoFit()` post-render function: auto-scales Mermaid SVGs, KPI values, and long blockquotes to fit their containers
|
|
36
|
+
- Fix Mermaid diagrams rendering tiny in slide containers (flex shrink-wrap + inline max-width)
|
|
37
|
+
- Fix KPI card overflow for text values (white-space + transform scale)
|
|
38
|
+
- Fix quote slides with long text (proportional font-size reduction)
|
|
39
|
+
|
|
40
|
+
### Files
|
|
41
|
+
- `references/slide-patterns.md` — slide engine CSS, all 10 type layouts, transitions, nav chrome, content density limits, presets
|
|
42
|
+
- `templates/slide-deck.html` — reference template demonstrating all 10 types in Midnight Editorial preset
|
|
43
|
+
- `prompts/generate-slides.md` — slash command for generating slide decks
|
|
44
|
+
- `SKILL.md` — new "Slide Deck Mode" section with slide routing, `--slides` flag detection, visual richness guidance
|
|
45
|
+
|
|
46
|
+
## [0.1.4] - 2026-02-24
|
|
47
|
+
|
|
48
|
+
- Removed Mermaid `handDrawn` mode — Rough.js hachure fills are hardcoded and render unreadable diagonal scribbles inside nodes with no user-facing override. All diagrams now use `look: 'classic'` with custom `themeVariables` for visual distinction.
|
|
49
|
+
- Added `package.json` for `pi install` support — installs the skill and all slash commands in one step instead of `git clone` + manual `cp`
|
|
50
|
+
|
|
51
|
+
## [0.1.3] - 2026-02-24
|
|
52
|
+
|
|
53
|
+
- Extended `classDef` color warning to also cover per-node `style` directives — both hardcode text color that breaks in the opposite color scheme
|
|
54
|
+
- Renamed `.node` card classes to `.ve-card` to fix CSS collision with Mermaid's internal `.node` class that broke diagram layout (PR #7)
|
|
55
|
+
|
|
56
|
+
## [0.1.2] - 2026-02-19
|
|
57
|
+
|
|
58
|
+
- Added sequence diagram syntax guidance to "Writing Valid Mermaid" — curly braces, brackets, and ampersands in message labels silently break rendering
|
|
59
|
+
|
|
60
|
+
## [0.1.1] - 2026-02-19
|
|
61
|
+
|
|
62
|
+
- Prompts no longer require the `pi-prompt-template-model` extension — each prompt now explicitly loads the skill itself
|
|
63
|
+
- Added "Writing Valid Mermaid" section to `libraries.md` (quoting special chars, simple IDs, max node count, arrow styles, pipe escaping)
|
|
64
|
+
- Fixed mobile scroll offset in `responsive-nav.md` — section headings now clear the sticky nav bar via `scroll-margin-top`
|
|
65
|
+
- Added video preview to README
|
|
66
|
+
|
|
67
|
+
## [0.1.0] - 2026-02-16
|
|
68
|
+
|
|
69
|
+
Initial release.
|
|
70
|
+
|
|
71
|
+
### Skill
|
|
72
|
+
- Core workflow: Think (pick aesthetic) → Structure (read template) → Style (apply design) → Deliver (write + open)
|
|
73
|
+
- 11 diagram types with rendering approach routing (Mermaid, CSS Grid, HTML tables, Chart.js)
|
|
74
|
+
- 9 aesthetic directions (monochrome terminal, editorial, blueprint, neon, paper/ink, sketch, IDE-inspired, data-dense, gradient mesh)
|
|
75
|
+
- Mermaid deep theming with `theme: 'base'` + `themeVariables`, hand-drawn mode, ELK layout
|
|
76
|
+
- Zoom controls (buttons, scroll-to-zoom, drag-to-pan) required on all Mermaid containers
|
|
77
|
+
- Proactive table rendering — agent generates HTML instead of ASCII for complex tables
|
|
78
|
+
- Optional AI-generated illustrations via surf-cli + Gemini Nano Banana Pro
|
|
79
|
+
- Both light and dark themes via CSS custom properties and `prefers-color-scheme`
|
|
80
|
+
- Quality checks: squint test, swap test, overflow protection, zoom controls verification
|
|
81
|
+
|
|
82
|
+
### References
|
|
83
|
+
- `css-patterns.md` — theme setup, depth tiers, node cards, grid layouts, data tables, status badges, KPI cards, before/after panels, connectors, animations (fadeUp, fadeScale, drawIn, countUp), collapsible sections, overflow protection, generated image containers
|
|
84
|
+
- `libraries.md` — Mermaid (CDN, ELK, deep theming, hand-drawn mode, CSS overrides, diagram examples), Chart.js, anime.js, Google Fonts with 13 font pairings
|
|
85
|
+
- `responsive-nav.md` — sticky sidebar TOC on desktop, horizontal scrollable bar on mobile, scroll spy
|
|
86
|
+
|
|
87
|
+
### Templates
|
|
88
|
+
- `architecture.html` — CSS Grid card layout, terracotta/sage palette, depth tiers, flow arrows, pipeline with parallel branches
|
|
89
|
+
- `mermaid-flowchart.html` — Mermaid flowchart with ELK + handDrawn mode, teal/cyan palette, zoom controls
|
|
90
|
+
- `data-table.html` — HTML table with KPI cards, status badges, collapsible details, rose/cranberry palette
|
|
91
|
+
|
|
92
|
+
### Prompt Templates
|
|
93
|
+
- `/generate-web-diagram` — generate a diagram for any topic
|
|
94
|
+
- `/diff-review` — visual diff review with architecture comparison, KPI dashboard, code review, decision log
|
|
95
|
+
- `/plan-review` — plan vs. codebase with current/planned architecture, risk assessment, understanding gaps
|
|
96
|
+
- `/project-recap` — project mental model snapshot for context-switching
|
|
97
|
+
- `/fact-check` — verify factual accuracy of review pages and plan docs against actual code
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Nico Bailon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<p>
|
|
2
|
+
<img src="banner.png" alt="visual-explainer" width="1100">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# visual-explainer
|
|
6
|
+
|
|
7
|
+
**An agent skill that turns complex terminal output into styled HTML pages you actually want to read.**
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
Ask your agent to explain a system architecture, review a diff, or compare requirements against a plan. Instead of ASCII art and box-drawing tables, it generates a self-contained HTML page and opens it in your browser:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
> draw a diagram of our authentication flow
|
|
15
|
+
> /diff-review
|
|
16
|
+
> /plan-review ~/docs/refactor-plan.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Each one produces a single `.html` file with real typography, dark/light theme support, and interactive Mermaid diagrams with zoom and pan. No build step, no dependencies beyond a browser.
|
|
20
|
+
|
|
21
|
+
https://github.com/user-attachments/assets/55ebc81b-8732-40f6-a4b1-7c3781aa96ec
|
|
22
|
+
|
|
23
|
+
## Why
|
|
24
|
+
|
|
25
|
+
Every coding agent defaults to ASCII art when you ask for a diagram. Box-drawing characters, monospace alignment hacks, text arrows. It works for trivial cases, but anything beyond a 3-box flowchart turns into an unreadable mess that nobody would put in a presentation or share with a team.
|
|
26
|
+
|
|
27
|
+
Tables are worse. Ask the agent to compare 15 requirements against a plan and you get a wall of pipes and dashes that wraps and breaks in the terminal. The data is there but it's painful to read.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
### Pi
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Installs the skill and all slash commands in one step
|
|
35
|
+
pi install https://github.com/nicobailon/visual-explainer
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If you prefer a manual install, clone the repo and copy the prompts:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git clone https://github.com/nicobailon/visual-explainer.git ~/.pi/agent/skills/visual-explainer
|
|
42
|
+
mkdir -p ~/.pi/agent/prompts
|
|
43
|
+
cp ~/.pi/agent/skills/visual-explainer/prompts/*.md ~/.pi/agent/prompts/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Claude Code
|
|
47
|
+
|
|
48
|
+
Clone the skill, then copy the prompt templates so they register as slash commands:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git clone https://github.com/nicobailon/visual-explainer.git ~/.claude/skills/visual-explainer
|
|
52
|
+
mkdir -p ~/.claude/commands
|
|
53
|
+
cp ~/.claude/skills/visual-explainer/prompts/*.md ~/.claude/commands/
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If you have [surf-cli](https://github.com/nicobailon/surf-cli) installed, the skill can also generate illustrations via Gemini and embed them in pages. The agent detects surf automatically and skips image generation if it's not there.
|
|
57
|
+
|
|
58
|
+
## Usage
|
|
59
|
+
|
|
60
|
+
The agent loads the skill when you mention diagrams, architecture, flowcharts, schemas, or visualizations. It also kicks in automatically when it's about to dump a complex table in the terminal (4+ rows or 3+ columns) — it renders HTML instead and opens it in the browser. Output goes to `~/.agent/diagrams/`.
|
|
61
|
+
|
|
62
|
+
The skill ships with six prompt templates:
|
|
63
|
+
|
|
64
|
+
| Command | What it does |
|
|
65
|
+
|---------|-------------|
|
|
66
|
+
| `/generate-web-diagram` | Generate an HTML diagram for any topic |
|
|
67
|
+
| `/generate-slides` | Generate a magazine-quality slide deck for any topic |
|
|
68
|
+
| `/diff-review` | Visual diff review with architecture comparison, code review, decision log |
|
|
69
|
+
| `/plan-review` | Compare a plan against the codebase with risk assessment |
|
|
70
|
+
| `/project-recap` | Mental model snapshot for context-switching back to a project |
|
|
71
|
+
| `/fact-check` | Verify accuracy of a review page or plan doc against actual code |
|
|
72
|
+
|
|
73
|
+
https://github.com/user-attachments/assets/342d3558-5fcf-4fb2-bc03-f0dd5b9e35dc
|
|
74
|
+
|
|
75
|
+
Any prompt that produces a scrollable page also supports a `--slides` flag to generate a slide deck instead:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
/diff-review --slides # slide deck version of a diff review
|
|
79
|
+
/project-recap --slides 2w # slide deck recap of last 2 weeks
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`/diff-review` is probably the most useful. Run it with no arguments to diff against `main`, or pass any git ref:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
/diff-review # feature branch vs main (default)
|
|
86
|
+
/diff-review abc123 # single commit
|
|
87
|
+
/diff-review main..HEAD # committed changes only
|
|
88
|
+
/diff-review #42 # pull request
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
It generates a full page with before/after architecture diagrams, KPI dashboard, structured Good/Bad/Ugly code review, decision log with confidence indicators, and re-entry context for your future self.
|
|
92
|
+
|
|
93
|
+
`/plan-review` does something similar but for implementation plans — pass it a plan file and it cross-references every claim against the actual codebase, produces current vs. planned architecture diagrams, and flags risks and gaps:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/plan-review ~/docs/refactor-plan.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`/project-recap` is designed for context-switching back to a project after days away. It scans recent git activity and produces an architecture snapshot, decision log, and cognitive debt hotspots. `/fact-check` takes any document that makes claims about code and verifies every one of them.
|
|
100
|
+
|
|
101
|
+
## How It Works
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
SKILL.md (workflow + design principles)
|
|
105
|
+
↓
|
|
106
|
+
references/ ← agent reads before each generation
|
|
107
|
+
├── css-patterns.md (layouts, animations, theming, depth tiers)
|
|
108
|
+
├── libraries.md (Mermaid theming, Chart.js, anime.js, font pairings)
|
|
109
|
+
├── responsive-nav.md (sticky sidebar TOC for multi-section pages)
|
|
110
|
+
└── slide-patterns.md (slide engine, 10 slide types, transitions, presets)
|
|
111
|
+
↓
|
|
112
|
+
templates/ ← agent reads the matching reference template
|
|
113
|
+
├── architecture.html (CSS Grid cards — terracotta/sage palette)
|
|
114
|
+
├── mermaid-flowchart.html (Mermaid + ELK — teal/cyan palette)
|
|
115
|
+
├── data-table.html (tables with KPIs and badges — rose/cranberry palette)
|
|
116
|
+
└── slide-deck.html (viewport-fit slides — midnight editorial palette)
|
|
117
|
+
↓
|
|
118
|
+
~/.agent/diagrams/filename.html → opens in browser
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The agent picks an aesthetic direction, reads the right reference template, generates a self-contained HTML file with both light and dark themes, and opens it. The four templates use deliberately different palettes so the agent learns variety rather than defaulting to one look. The skill handles 11 diagram types — Mermaid for anything with connections (flowcharts, sequences, ER, state machines, mind maps), CSS Grid for text-heavy architecture overviews, HTML tables for data, Chart.js for dashboards — and routes to the right approach automatically.
|
|
122
|
+
|
|
123
|
+
To customize the output directory, browser command, or add your own diagram types and CSS patterns, edit the files directly. The agent reads them fresh each time.
|
|
124
|
+
|
|
125
|
+
## Limitations
|
|
126
|
+
|
|
127
|
+
- Requires a browser to view — no inline terminal rendering
|
|
128
|
+
- Switching OS theme requires a page refresh for Mermaid SVGs (CSS-styled elements respond instantly)
|
|
129
|
+
- Results vary by model capability — the skill provides design guidance, not pixel-perfect specs
|
|
130
|
+
|
|
131
|
+
## Credits
|
|
132
|
+
|
|
133
|
+
Borrows ideas from [Anthropic's frontend-design skill](https://github.com/anthropics/skills) and [interface-design](https://github.com/Dammyjay93/interface-design), adapted for one-shot diagram generation.
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
MIT
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-explainer
|
|
3
|
+
description: Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires a browser to view generated HTML files. Optional surf-cli for AI image generation.
|
|
6
|
+
metadata:
|
|
7
|
+
author: nicobailon
|
|
8
|
+
version: "0.2.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Visual Explainer
|
|
12
|
+
|
|
13
|
+
Generate self-contained HTML files for technical diagrams, visualizations, and data tables. Always open the result in the browser. Never fall back to ASCII art when this skill is loaded.
|
|
14
|
+
|
|
15
|
+
**Proactive table rendering.** When you're about to present tabular data as an ASCII box-drawing table in the terminal (comparisons, audits, feature matrices, status reports, any structured rows/columns), generate an HTML page instead. The threshold: if the table has 4+ rows or 3+ columns, it belongs in the browser. Don't wait for the user to ask — render it as HTML automatically and tell them the file path. You can still include a brief text summary in the chat, but the table itself should be the HTML page. Store the resulting page in the local project documentation if you have that context.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
### 1. Think (5 seconds, not 5 minutes)
|
|
20
|
+
|
|
21
|
+
Before writing HTML, commit to a direction. Don't default to "dark theme with blue accents" every time.
|
|
22
|
+
|
|
23
|
+
**Who is looking?** A developer understanding a system? A PM seeing the big picture? A team reviewing a proposal? This shapes information density and visual complexity.
|
|
24
|
+
|
|
25
|
+
**What type of diagram?** Architecture, flowchart, sequence, data flow, schema/ER, state machine, mind map, data table, timeline, or dashboard. Each has distinct layout needs and rendering approaches (see Diagram Types below).
|
|
26
|
+
|
|
27
|
+
**What aesthetic?** Pick one and commit. The constrained aesthetics (Blueprint, Editorial, Paper/ink) are safer — they have specific requirements that prevent generic output. The flexible ones (IDE-inspired) require more discipline.
|
|
28
|
+
|
|
29
|
+
**Constrained aesthetics (prefer these):**
|
|
30
|
+
- Blueprint (technical drawing feel, subtle grid background, deep slate/blue palette, monospace labels, precise borders) — see `websocket-implementation-plan.html` for reference
|
|
31
|
+
- Editorial (serif headlines like Instrument Serif or Crimson Pro, generous whitespace, muted earth tones or deep navy + gold)
|
|
32
|
+
- Paper/ink (warm cream `#faf7f5` background, terracotta/sage accents, informal feel)
|
|
33
|
+
- Monochrome terminal (green/amber on near-black, monospace everything, CRT glow optional)
|
|
34
|
+
|
|
35
|
+
**Flexible aesthetics (use with caution):**
|
|
36
|
+
- IDE-inspired (borrow a real, named color scheme: Dracula, Nord, Catppuccin Mocha/Latte, Solarized Dark/Light, Gruvbox, One Dark, Rosé Pine) — commit to the actual palette, don't approximate
|
|
37
|
+
- Data-dense (small type, tight spacing, maximum information, muted colors)
|
|
38
|
+
|
|
39
|
+
**Explicitly forbidden:**
|
|
40
|
+
- Neon dashboard (cyan + magenta + purple on dark) — always produces AI slop
|
|
41
|
+
- Gradient mesh (pink/purple/cyan blobs) — too generic
|
|
42
|
+
- Any combination of Inter font + violet/indigo accents + gradient text
|
|
43
|
+
|
|
44
|
+
Vary the choice each time. If the last diagram was dark and technical, make the next one light and editorial. The swap test: if you replaced your styling with a generic dark theme and nobody would notice the difference, you haven't designed anything.
|
|
45
|
+
|
|
46
|
+
### 2. Structure
|
|
47
|
+
|
|
48
|
+
**Read the reference template** before generating. Don't memorize it — read it each time to absorb the patterns.
|
|
49
|
+
- For text-heavy architecture overviews (card content matters more than topology): read `./templates/architecture.html`
|
|
50
|
+
- For flowcharts, sequence diagrams, ER, state machines, mind maps: read `./templates/mermaid-flowchart.html`
|
|
51
|
+
- For data tables, comparisons, audits, feature matrices: read `./templates/data-table.html`
|
|
52
|
+
- For slide deck presentations (when `--slides` flag is present or `/generate-slides` is invoked): read `./templates/slide-deck.html` and `./references/slide-patterns.md`
|
|
53
|
+
|
|
54
|
+
**For CSS/layout patterns and SVG connectors**, read `./references/css-patterns.md`.
|
|
55
|
+
|
|
56
|
+
**For pages with 4+ sections** (reviews, recaps, dashboards), also read `./references/responsive-nav.md` for section navigation with sticky sidebar TOC on desktop and horizontal scrollable bar on mobile.
|
|
57
|
+
|
|
58
|
+
**Choosing a rendering approach:**
|
|
59
|
+
|
|
60
|
+
| Diagram type | Approach | Why |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| Architecture (text-heavy) | CSS Grid cards + flow arrows | Rich card content (descriptions, code, tool lists) needs CSS control |
|
|
63
|
+
| Architecture (topology-focused) | **Mermaid** | Visible connections between components need automatic edge routing |
|
|
64
|
+
| Flowchart / pipeline | **Mermaid** | Automatic node positioning and edge routing |
|
|
65
|
+
| Sequence diagram | **Mermaid** | Lifelines, messages, and activation boxes need automatic layout |
|
|
66
|
+
| Data flow | **Mermaid** with edge labels | Connections and data descriptions need automatic edge routing |
|
|
67
|
+
| ER / schema diagram | **Mermaid** | Relationship lines between many entities need auto-routing |
|
|
68
|
+
| State machine | **Mermaid** | State transitions with labeled edges need automatic layout |
|
|
69
|
+
| Mind map | **Mermaid** | Hierarchical branching needs automatic positioning |
|
|
70
|
+
| Data table | HTML `<table>` | Semantic markup, accessibility, copy-paste behavior |
|
|
71
|
+
| Timeline | CSS (central line + cards) | Simple linear layout doesn't need a layout engine |
|
|
72
|
+
| Dashboard | CSS Grid + Chart.js | Card grid with embedded charts |
|
|
73
|
+
|
|
74
|
+
**Mermaid theming:** Always use `theme: 'base'` with custom `themeVariables` so colors match your page palette. Use `layout: 'elk'` for complex graphs (requires the `@mermaid-js/layout-elk` package — see `./references/libraries.md` for the CDN import). Override Mermaid's SVG classes with CSS for pixel-perfect control. See `./references/libraries.md` for full theming guide.
|
|
75
|
+
|
|
76
|
+
**Mermaid zoom controls:** Always add zoom controls (+/−/reset buttons) to every `.mermaid-wrap` container. Complex diagrams render at small sizes and need zoom to be readable. Include Ctrl/Cmd+scroll zoom on the container. See the zoom controls pattern in `./references/css-patterns.md` and the reference template at `./templates/mermaid-flowchart.html`.
|
|
77
|
+
|
|
78
|
+
**Mermaid CSS class collision constraint:** Never define `.node` as a page-level CSS class. Mermaid.js uses `.node` internally on SVG `<g>` elements with `transform: translate(x, y)` for positioning. Page-level `.node` styles (hover transforms, box-shadows) leak into diagrams and break layout. Use the namespaced `.ve-card` class for card components instead. The only safe way to style Mermaid's `.node` is scoped under `.mermaid` (e.g., `.mermaid .node rect`).
|
|
79
|
+
|
|
80
|
+
**AI-generated illustrations (optional).** If [surf-cli](https://github.com/nicobailon/surf-cli) is available, you can generate images via Gemini and embed them in the page for creative, illustrative, explanatory, educational, or decorative purposes. Check availability with `which surf`. If available:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Generate to a temp file (use --aspect-ratio for control)
|
|
84
|
+
surf gemini "descriptive prompt" --generate-image /tmp/ve-img.png --aspect-ratio 16:9
|
|
85
|
+
|
|
86
|
+
# Base64 encode for self-containment (macOS)
|
|
87
|
+
IMG=$(base64 -i /tmp/ve-img.png)
|
|
88
|
+
# Linux: IMG=$(base64 -w 0 /tmp/ve-img.png)
|
|
89
|
+
|
|
90
|
+
# Embed in HTML and clean up
|
|
91
|
+
# <img src="data:image/png;base64,${IMG}" alt="descriptive alt text">
|
|
92
|
+
rm /tmp/ve-img.png
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
See `./references/css-patterns.md` for image container styles (hero banners, inline illustrations, captions).
|
|
96
|
+
|
|
97
|
+
**When to use:** Hero banners that establish the page's visual tone. Conceptual illustrations for abstract systems that Mermaid can't express (physical infrastructure, user journeys, mental models). Educational diagrams that benefit from artistic or photorealistic rendering. Decorative accents that reinforce the aesthetic.
|
|
98
|
+
|
|
99
|
+
**When to skip:** Anything Mermaid or CSS handles well. Generic decoration that doesn't convey meaning. Data-heavy pages where images would distract. Always degrade gracefully — if surf isn't available, skip images without erroring. The page should stand on its own with CSS and typography alone.
|
|
100
|
+
|
|
101
|
+
**Prompt craft:** Match the image to the page's palette and aesthetic direction. Specify the style (3D render, technical illustration, watercolor, isometric, flat vector, etc.) and mention dominant colors from your CSS variables. Use `--aspect-ratio 16:9` for hero banners, `--aspect-ratio 1:1` for inline illustrations. Keep prompts specific — "isometric illustration of a message queue with cyan nodes on dark navy background" beats "a diagram of a queue."
|
|
102
|
+
|
|
103
|
+
### 3. Style
|
|
104
|
+
|
|
105
|
+
Apply these principles to every diagram:
|
|
106
|
+
|
|
107
|
+
**Typography is the diagram.** Pick a distinctive font pairing from the list in `./references/libraries.md`. Every page should use a different pairing from recent generations.
|
|
108
|
+
|
|
109
|
+
**Forbidden as `--font-body`:** Inter, Roboto, Arial, Helvetica, system-ui alone. These are AI slop signals.
|
|
110
|
+
|
|
111
|
+
**Good pairings (use these):**
|
|
112
|
+
- DM Sans + Fira Code (technical, precise)
|
|
113
|
+
- Instrument Serif + JetBrains Mono (editorial, refined)
|
|
114
|
+
- IBM Plex Sans + IBM Plex Mono (reliable, readable)
|
|
115
|
+
- Bricolage Grotesque + Fragment Mono (bold, characterful)
|
|
116
|
+
- Plus Jakarta Sans + Azeret Mono (rounded, approachable)
|
|
117
|
+
|
|
118
|
+
Load via `<link>` in `<head>`. Include a system font fallback in the `font-family` stack for offline resilience.
|
|
119
|
+
|
|
120
|
+
**Color tells a story.** Use CSS custom properties for the full palette. Define at minimum: `--bg`, `--surface`, `--border`, `--text`, `--text-dim`, and 3-5 accent colors. Each accent should have a full and a dim variant (for backgrounds). Name variables semantically when possible (`--pipeline-step` not `--blue-3`). Support both themes.
|
|
121
|
+
|
|
122
|
+
**Forbidden accent colors:** `#8b5cf6` `#7c3aed` `#a78bfa` (indigo/violet), `#d946ef` (fuchsia), the cyan-magenta-pink combination. These are Tailwind defaults that signal zero design intent.
|
|
123
|
+
|
|
124
|
+
**Good accent palettes (use these):**
|
|
125
|
+
- Terracotta + sage (`#c2410c`, `#65a30d`) — warm, earthy
|
|
126
|
+
- Teal + slate (`#0891b2`, `#0369a1`) — technical, precise
|
|
127
|
+
- Rose + cranberry (`#be123c`, `#881337`) — editorial, refined
|
|
128
|
+
- Amber + emerald (`#d97706`, `#059669`) — data-focused
|
|
129
|
+
- Deep blue + gold (`#1e3a5f`, `#d4a73a`) — premium, sophisticated
|
|
130
|
+
|
|
131
|
+
Put your primary aesthetic in `:root` and the alternate in the media query:
|
|
132
|
+
|
|
133
|
+
```css
|
|
134
|
+
/* Light-first (editorial, paper/ink, blueprint): */
|
|
135
|
+
:root { /* light values */ }
|
|
136
|
+
@media (prefers-color-scheme: dark) { :root { /* dark values */ } }
|
|
137
|
+
|
|
138
|
+
/* Dark-first (neon, IDE-inspired, terminal): */
|
|
139
|
+
:root { /* dark values */ }
|
|
140
|
+
@media (prefers-color-scheme: light) { :root { /* light values */ } }
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Surfaces whisper, they don't shout.** Build depth through subtle lightness shifts (2-4% between levels), not dramatic color changes. Borders should be low-opacity rgba (`rgba(255,255,255,0.08)` in dark mode, `rgba(0,0,0,0.08)` in light) — visible when you look, invisible when you don't.
|
|
144
|
+
|
|
145
|
+
**Backgrounds create atmosphere.** Don't use flat solid colors for the page background. Subtle gradients, faint grid patterns via CSS, or gentle radial glows behind focal areas. The background should feel like a space, not a void.
|
|
146
|
+
|
|
147
|
+
**Visual weight signals importance.** Not every section deserves equal visual treatment. Executive summaries and key metrics should dominate the viewport on load (larger type, more padding, subtle accent-tinted background zone). Reference sections (file maps, dependency lists, decision logs) should be compact and stay out of the way. Use `<details>/<summary>` for sections that are useful but not primary — the collapsible pattern is in `./references/css-patterns.md`.
|
|
148
|
+
|
|
149
|
+
**Surface depth creates hierarchy.** Vary card depth to signal what matters. Hero sections get elevated shadows and accent-tinted backgrounds (`ve-card--hero` pattern). Body content stays flat (default `.ve-card`). Code blocks and secondary content feel recessed (`ve-card--recessed`). See the depth tiers in `./references/css-patterns.md`. Don't make everything elevated — when everything pops, nothing does.
|
|
150
|
+
|
|
151
|
+
**Animation earns its place.** Staggered fade-ins on page load are almost always worth it — they guide the eye through the diagram's hierarchy. Mix animation types by role: `fadeUp` for cards, `fadeScale` for KPIs and badges, `drawIn` for SVG connectors, `countUp` for hero numbers. Hover transitions on interactive-feeling elements make the diagram feel alive. Always respect `prefers-reduced-motion`. CSS transitions and keyframes handle most cases. For orchestrated multi-element sequences, anime.js via CDN is available (see `./references/libraries.md`).
|
|
152
|
+
|
|
153
|
+
**Forbidden animations:**
|
|
154
|
+
- Animated glowing box-shadows (`@keyframes glow { box-shadow: 0 0 20px... }`) — this is AI slop
|
|
155
|
+
- Pulsing/breathing effects on static content
|
|
156
|
+
- Continuous animations that run after page load (except for progress indicators)
|
|
157
|
+
|
|
158
|
+
Keep animations purposeful: entrance reveals, hover feedback, and user-initiated interactions. Nothing should glow or pulse on its own.
|
|
159
|
+
|
|
160
|
+
### 4. Deliver
|
|
161
|
+
|
|
162
|
+
**Output location:** Write to `~/.agent/diagrams/`. Use a descriptive filename based on content: `modem-architecture.html`, `pipeline-flow.html`, `schema-overview.html`. The directory persists across sessions.
|
|
163
|
+
|
|
164
|
+
**Open in browser:**
|
|
165
|
+
- macOS: `open ~/.agent/diagrams/filename.html`
|
|
166
|
+
- Linux: `xdg-open ~/.agent/diagrams/filename.html`
|
|
167
|
+
|
|
168
|
+
**Tell the user** the file path so they can re-open or share it.
|
|
169
|
+
|
|
170
|
+
## Diagram Types
|
|
171
|
+
|
|
172
|
+
### Architecture / System Diagrams
|
|
173
|
+
Two approaches depending on what matters more:
|
|
174
|
+
|
|
175
|
+
**Text-heavy overviews** (card content matters more than connections): CSS Grid with explicit row/column placement. Sections as rounded cards with colored borders and monospace labels. Vertical flow arrows between sections. Nested grids for subsystems. The reference template at `./templates/architecture.html` demonstrates this pattern. Use when cards need descriptions, code references, tool lists, or other rich content that Mermaid nodes can't hold.
|
|
176
|
+
|
|
177
|
+
**Topology-focused diagrams** (connections matter more than card content): **Use Mermaid.** A `graph TD` or `graph LR` with custom `themeVariables` produces proper diagrams with automatic edge routing. Use when the point is showing how components connect rather than describing what each component does in detail.
|
|
178
|
+
|
|
179
|
+
### Flowcharts / Pipelines
|
|
180
|
+
**Use Mermaid.** Automatic node positioning and edge routing produces proper diagrams with connecting lines, decision diamonds, and parallel branches — dramatically better than CSS flexbox with arrow characters. Use `graph TD` for top-down or `graph LR` for left-right. Color-code node types with Mermaid's `classDef` or rely on `themeVariables` for automatic styling.
|
|
181
|
+
|
|
182
|
+
### Sequence Diagrams
|
|
183
|
+
**Use Mermaid.** Lifelines, messages, activation boxes, notes, and loops all need automatic layout. Use Mermaid's `sequenceDiagram` syntax. Style actors and messages via CSS overrides on `.actor`, `.messageText`, `.activation` classes.
|
|
184
|
+
|
|
185
|
+
### Data Flow Diagrams
|
|
186
|
+
**Use Mermaid.** Data flow diagrams emphasize connections over boxes — exactly what Mermaid excels at. Use `graph LR` or `graph TD` with edge labels for data descriptions. Thicker, colored edges for primary flows. Source/sink nodes styled differently from transform nodes via Mermaid's `classDef`.
|
|
187
|
+
|
|
188
|
+
### Schema / ER Diagrams
|
|
189
|
+
**Use Mermaid.** Relationship lines between entities need automatic routing. Use Mermaid's `erDiagram` syntax with entity attributes. Style via `themeVariables` and CSS overrides on `.er.entityBox` and `.er.relationshipLine`.
|
|
190
|
+
|
|
191
|
+
### State Machines / Decision Trees
|
|
192
|
+
**Use Mermaid.** Use `stateDiagram-v2` for states with labeled transitions. Supports nested states, forks, joins, and notes. Decision trees can use `graph TD` with diamond decision nodes.
|
|
193
|
+
|
|
194
|
+
**`stateDiagram-v2` label caveat:** Transition labels have a strict parser — colons, parentheses, `<br/>`, HTML entities, and most special characters cause silent parse failures ("Syntax error in text"). If your labels need any of these (e.g., `cancel()`, `curate: true`, multi-line labels), use `flowchart LR` instead with rounded nodes and quoted edge labels (`|"label text"|`). Flowcharts handle all special characters and support `<br/>` for line breaks. Reserve `stateDiagram-v2` for simple single-word or plain-text labels.
|
|
195
|
+
|
|
196
|
+
### Mind Maps / Hierarchical Breakdowns
|
|
197
|
+
**Use Mermaid.** Use `mindmap` syntax for hierarchical branching from a root node. Mermaid handles the radial layout automatically. Style with `themeVariables` to control node colors at each depth level.
|
|
198
|
+
|
|
199
|
+
### Data Tables / Comparisons / Audits
|
|
200
|
+
Use a real `<table>` element — not CSS Grid pretending to be a table. Tables get accessibility, copy-paste behavior, and column alignment for free. The reference template at `./templates/data-table.html` demonstrates all patterns below.
|
|
201
|
+
|
|
202
|
+
**Use proactively.** Any time you'd render an ASCII box-drawing table in the terminal, generate an HTML table instead. This includes: requirement audits (request vs plan), feature comparisons, status reports, configuration matrices, test result summaries, dependency lists, permission tables, API endpoint inventories — any structured rows and columns.
|
|
203
|
+
|
|
204
|
+
Layout patterns:
|
|
205
|
+
- Sticky `<thead>` so headers stay visible when scrolling long tables
|
|
206
|
+
- Alternating row backgrounds via `tr:nth-child(even)` (subtle, 2-3% lightness shift)
|
|
207
|
+
- First column optionally sticky for wide tables with horizontal scroll
|
|
208
|
+
- Responsive wrapper with `overflow-x: auto` for tables wider than the viewport
|
|
209
|
+
- Column width hints via `<colgroup>` or `th` widths — let text-heavy columns breathe
|
|
210
|
+
- Row hover highlight for scanability
|
|
211
|
+
|
|
212
|
+
Status indicators (use styled `<span>` elements, never emoji):
|
|
213
|
+
- Match/pass/yes: colored dot or checkmark with green background
|
|
214
|
+
- Gap/fail/no: colored dot or cross with red background
|
|
215
|
+
- Partial/warning: amber indicator
|
|
216
|
+
- Neutral/info: dim text or muted badge
|
|
217
|
+
|
|
218
|
+
Cell content:
|
|
219
|
+
- Wrap long text naturally — don't truncate or force single-line
|
|
220
|
+
- Use `<code>` for technical references within cells
|
|
221
|
+
- Secondary detail text in `<small>` with dimmed color
|
|
222
|
+
- Keep numeric columns right-aligned with `tabular-nums`
|
|
223
|
+
|
|
224
|
+
### Timeline / Roadmap Views
|
|
225
|
+
Vertical or horizontal timeline with a central line (CSS pseudo-element). Phase markers as circles on the line. Content cards branching left/right (alternating) or all to one side. Date labels on the line. Color progression from past (muted) to future (vivid).
|
|
226
|
+
|
|
227
|
+
### Dashboard / Metrics Overview
|
|
228
|
+
Card grid layout. Hero numbers large and prominent. Sparklines via inline SVG `<polyline>`. Progress bars via CSS `linear-gradient` on a div. For real charts (bar, line, pie), use **Chart.js via CDN** (see `./references/libraries.md`). KPI cards with trend indicators (up/down arrows, percentage deltas).
|
|
229
|
+
|
|
230
|
+
## Slide Deck Mode
|
|
231
|
+
|
|
232
|
+
An alternative output format for presenting content as a magazine-quality slide presentation instead of a scrollable page. **Opt-in only** — the agent generates slides when the user invokes `/generate-slides`, passes `--slides` to an existing prompt (e.g., `/diff-review --slides`), or explicitly asks for a slide deck. Never auto-select slide format.
|
|
233
|
+
|
|
234
|
+
**Before generating slides**, read `./references/slide-patterns.md` (engine CSS, slide types, transitions, nav chrome, presets) and `./templates/slide-deck.html` (reference template showing all 10 types). Also read `./references/css-patterns.md` for shared patterns and `./references/libraries.md` for Mermaid/Chart.js theming.
|
|
235
|
+
|
|
236
|
+
**Slides are not pages reformatted.** They're a different medium. Each slide is exactly one viewport tall (100dvh) with no scrolling. Typography is 2–3× larger. Compositions are bolder. The agent composes a narrative arc (impact → context → deep dive → resolution) rather than mechanically paginating the source.
|
|
237
|
+
|
|
238
|
+
**Content completeness.** Changing the medium does not mean dropping content. Follow the "Planning a Deck from a Source Document" process in `slide-patterns.md` before writing any HTML: inventory the source, map every item to slides, verify coverage. Every section, decision, data point, specification, and collapsible detail from the source must appear in the deck. If a plan has 7 sections, the deck covers all 7. If there are 6 decisions, present all 6 — not the 2 that fit on one slide. Collapsible details in the source become their own slides. Add more slides rather than cutting content. A 22-slide deck that covers everything beats a 13-slide deck that looks polished but is missing 40% of the source.
|
|
239
|
+
|
|
240
|
+
**Slide types (10):** Title, Section Divider, Content, Split, Diagram, Dashboard, Table, Code, Quote, Full-Bleed. Each has a defined layout in `slide-patterns.md`. Content that exceeds a slide's density limit splits across multiple slides — never scrolls within a slide.
|
|
241
|
+
|
|
242
|
+
**Visual richness:** Check `which surf` at the start. If surf-cli is available, generate 2–4 images (title slide background, full-bleed background, optional content illustrations) before writing HTML — see the Proactive Imagery section in `slide-patterns.md` for the workflow. Also use SVG decorative accents, per-slide background gradients, inline sparklines, and small Mermaid diagrams. Visual-first, text-second.
|
|
243
|
+
|
|
244
|
+
**Compositional variety:** Consecutive slides must vary spatial approach — centered, left-heavy, right-heavy, split, edge-aligned, full-bleed. Three centered slides in a row means push one off-axis.
|
|
245
|
+
|
|
246
|
+
**Curated presets:** Four slide-specific presets as starting points (Midnight Editorial, Warm Signal, Terminal Mono, Swiss Clean) plus the existing 8 aesthetic directions adapted for slides. Pick one and commit. See `slide-patterns.md` for preset CSS values.
|
|
247
|
+
|
|
248
|
+
**`--slides` flag on existing prompts:** When a user passes `--slides` to `/diff-review`, `/plan-review`, `/project-recap`, or other prompts, the agent gathers data using the prompt's normal data-gathering instructions, then presents the content as a slide deck instead of a scrollable page. The slide version tells the same story with different structure and pacing — but the same breadth of coverage. Don't use the slide format as an excuse to summarize or skip sections that the scrollable version would have included.
|
|
249
|
+
|
|
250
|
+
## File Structure
|
|
251
|
+
|
|
252
|
+
Every diagram is a single self-contained `.html` file. No external assets except CDN links (fonts, optional libraries). Structure:
|
|
253
|
+
|
|
254
|
+
```html
|
|
255
|
+
<!DOCTYPE html>
|
|
256
|
+
<html lang="en">
|
|
257
|
+
<head>
|
|
258
|
+
<meta charset="UTF-8">
|
|
259
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
260
|
+
<title>Descriptive Title</title>
|
|
261
|
+
<link href="https://fonts.googleapis.com/css2?family=...&display=swap" rel="stylesheet">
|
|
262
|
+
<style>
|
|
263
|
+
/* CSS custom properties, theme, layout, components — all inline */
|
|
264
|
+
</style>
|
|
265
|
+
</head>
|
|
266
|
+
<body>
|
|
267
|
+
<!-- Semantic HTML: sections, headings, lists, tables, inline SVG -->
|
|
268
|
+
<!-- No script needed for static CSS-only diagrams -->
|
|
269
|
+
<!-- Optional: <script> for Mermaid, Chart.js, or anime.js when used -->
|
|
270
|
+
</body>
|
|
271
|
+
</html>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Quality Checks
|
|
275
|
+
|
|
276
|
+
Before delivering, verify:
|
|
277
|
+
- **The squint test**: Blur your eyes. Can you still perceive hierarchy? Are sections visually distinct?
|
|
278
|
+
- **The swap test**: Would replacing your fonts and colors with a generic dark theme make this indistinguishable from a template? If yes, push the aesthetic further.
|
|
279
|
+
- **Both themes**: Toggle your OS between light and dark mode. Both should look intentional, not broken.
|
|
280
|
+
- **Information completeness**: Does the diagram actually convey what the user asked for? Pretty but incomplete is a failure.
|
|
281
|
+
- **No overflow**: Resize the browser to different widths. No content should clip or escape its container. Every grid and flex child needs `min-width: 0`. Side-by-side panels need `overflow-wrap: break-word`. Never use `display: flex` on `<li>` for marker characters — it creates anonymous flex items that can't shrink, causing lines with many inline `<code>` badges to overflow. Use absolute positioning for markers instead. See the Overflow Protection section in `./references/css-patterns.md`.
|
|
282
|
+
- **Mermaid zoom controls**: Every `.mermaid-wrap` container must have zoom controls (+/−/reset buttons), Ctrl/Cmd+scroll zoom, and click-and-drag panning. Complex diagrams render too small without them. The cursor should change to `grab` when zoomed in and `grabbing` while dragging. See `./references/css-patterns.md` for the full pattern.
|
|
283
|
+
- **File opens cleanly**: No console errors, no broken font loads, no layout shifts.
|
|
284
|
+
|
|
285
|
+
## Anti-Patterns (AI Slop)
|
|
286
|
+
|
|
287
|
+
These patterns are explicitly forbidden. They signal "AI-generated template" and undermine the skill's purpose of producing distinctive, high-quality diagrams. Review every generated page against this list.
|
|
288
|
+
|
|
289
|
+
### Typography
|
|
290
|
+
|
|
291
|
+
**Forbidden fonts as primary `--font-body`:**
|
|
292
|
+
- Inter — the single most overused AI default
|
|
293
|
+
- Roboto, Arial, Helvetica — generic system fallbacks promoted to primary
|
|
294
|
+
- system-ui, sans-serif alone — no character, no intent
|
|
295
|
+
|
|
296
|
+
**Required:** Pick from the font pairings in `./references/libraries.md`. Every generation should use a different pairing from the last.
|
|
297
|
+
|
|
298
|
+
### Color Palette
|
|
299
|
+
|
|
300
|
+
**Forbidden accent colors:**
|
|
301
|
+
- Indigo-500/violet-500 (`#8b5cf6`, `#7c3aed`, `#a78bfa`) — Tailwind's default purple range
|
|
302
|
+
- The cyan + magenta + pink neon gradient combination (`#06b6d4` → `#d946ef` → `#f472b6`)
|
|
303
|
+
- Any palette that could be described as "Tailwind defaults with purple/pink/cyan accents"
|
|
304
|
+
|
|
305
|
+
**Forbidden color effects:**
|
|
306
|
+
- Gradient text on headings (`background: linear-gradient(...); background-clip: text;`) — this screams AI-generated
|
|
307
|
+
- Animated glowing box-shadows on cards (`box-shadow: 0 0 20px var(--glow); animation: glow 2s...`)
|
|
308
|
+
- Multiple overlapping radial glows in accent colors creating a "neon haze"
|
|
309
|
+
|
|
310
|
+
**Required:** Build palettes from the reference templates (terracotta/sage, teal/cyan, rose/cranberry, slate/blue) or derive from real IDE themes (Dracula, Nord, Solarized, Gruvbox, Catppuccin). Accents should feel intentional, not default.
|
|
311
|
+
|
|
312
|
+
### Section Headers
|
|
313
|
+
|
|
314
|
+
**Forbidden:**
|
|
315
|
+
- Emoji icons in section headers (🏗️, ⚙️, 📁, 💻, 📅, 🔗, ⚡, 🔧, 📦, 🚀, etc.)
|
|
316
|
+
- Section headers that all use the same icon-in-rounded-box pattern
|
|
317
|
+
|
|
318
|
+
**Required:** Use styled monospace labels with colored dot indicators (see `.section-label` in templates), numbered badges (`section__num` pattern), or asymmetric section dividers. If an icon is genuinely needed, use an inline SVG that matches the palette — not emoji.
|
|
319
|
+
|
|
320
|
+
### Layout & Hierarchy
|
|
321
|
+
|
|
322
|
+
**Forbidden:**
|
|
323
|
+
- Perfectly centered everything with uniform padding
|
|
324
|
+
- All cards styled identically with the same border-radius, shadow, and spacing
|
|
325
|
+
- Every section getting equal visual treatment — no hero/primary vs. secondary distinction
|
|
326
|
+
- Symmetric layouts where left and right halves mirror each other
|
|
327
|
+
|
|
328
|
+
**Required:** Vary visual weight. Hero sections should dominate (larger type, more padding, accent-tinted background). Reference sections should feel compact. Use the depth tiers (hero → elevated → default → recessed). Asymmetric layouts create interest.
|
|
329
|
+
|
|
330
|
+
### Template Patterns
|
|
331
|
+
|
|
332
|
+
**Forbidden:**
|
|
333
|
+
- Three-dot window chrome (red/yellow/green dots) on code blocks — this is a cliché
|
|
334
|
+
- KPI cards where every metric has identical gradient text treatment
|
|
335
|
+
- "Neon Dashboard" as an aesthetic choice — it always produces generic results
|
|
336
|
+
- Gradient meshes with pink/purple/cyan blobs in the background
|
|
337
|
+
|
|
338
|
+
**Required:** Code blocks use a simple header with filename or language label. KPI cards vary by importance — hero numbers for the primary metric, subdued treatment for supporting metrics. Pick aesthetics with natural constraints: Blueprint (must feel technical/precise), Editorial (must have generous whitespace and serif typography), Paper/ink (must feel warm and informal).
|
|
339
|
+
|
|
340
|
+
### The Slop Test
|
|
341
|
+
|
|
342
|
+
Before delivering, apply this test: **Would a developer looking at this page immediately think "AI generated this"?** The telltale signs:
|
|
343
|
+
|
|
344
|
+
1. Inter or Roboto font with purple/violet gradient accents
|
|
345
|
+
2. Every heading has `background-clip: text` gradient
|
|
346
|
+
3. Emoji icons leading every section
|
|
347
|
+
4. Glowing cards with animated shadows
|
|
348
|
+
5. Cyan-magenta-pink color scheme on dark background
|
|
349
|
+
6. Perfectly uniform card grid with no visual hierarchy
|
|
350
|
+
7. Three-dot code block chrome
|
|
351
|
+
|
|
352
|
+
If two or more of these are present, the page is slop. Regenerate with a different aesthetic direction — Editorial, Blueprint, Paper/ink, or a specific IDE theme. These constrained aesthetics are harder to mess up because they have specific visual requirements that prevent defaulting to generic patterns.
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "visual-explainer",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Agent skill that generates beautiful HTML pages for diagrams, diff reviews, plan reviews, and data tables",
|
|
5
|
+
"keywords": ["pi-package"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"pi": {
|
|
8
|
+
"skills": ["./"],
|
|
9
|
+
"prompts": ["./prompts"]
|
|
10
|
+
}
|
|
11
|
+
}
|