iso-explainer 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +110 -2
  3. package/README.pt-BR.md +88 -0
  4. package/bin/iso-explainer.mjs +75 -0
  5. package/package.json +37 -4
  6. package/skills/iso-explainer/SKILL.md +92 -0
  7. package/skills/iso-explainer/assets/fonts/OFL.txt +93 -0
  8. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  9. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  10. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
  11. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-700-normal.woff2 +0 -0
  12. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-800-normal.woff2 +0 -0
  13. package/skills/iso-explainer/assets/runtime/LUCIDE-LICENSE.txt +43 -0
  14. package/skills/iso-explainer/assets/runtime/app.js +687 -0
  15. package/skills/iso-explainer/assets/runtime/engine.js +1177 -0
  16. package/skills/iso-explainer/assets/runtime/icons.js +205 -0
  17. package/skills/iso-explainer/assets/runtime/styles.css +447 -0
  18. package/skills/iso-explainer/assets/runtime/template.html +29 -0
  19. package/skills/iso-explainer/assets/templates/starter.course.json +134 -0
  20. package/skills/iso-explainer/examples/arquitetura-pedidos.docs.json +1743 -0
  21. package/skills/iso-explainer/examples/engenharia-na-pratica.course.json +2074 -0
  22. package/skills/iso-explainer/examples/figures/token-bucket.html +98 -0
  23. package/skills/iso-explainer/examples/historia-pedidos.story.json +1872 -0
  24. package/skills/iso-explainer/references/architecture-mode.md +82 -0
  25. package/skills/iso-explainer/references/design-system.md +58 -0
  26. package/skills/iso-explainer/references/engine.md +64 -0
  27. package/skills/iso-explainer/references/entities.md +70 -0
  28. package/skills/iso-explainer/references/flows.md +67 -0
  29. package/skills/iso-explainer/references/inside.md +64 -0
  30. package/skills/iso-explainer/references/layout.md +122 -0
  31. package/skills/iso-explainer/references/schema.md +157 -0
  32. package/skills/iso-explainer/references/story-mode.md +72 -0
  33. package/skills/iso-explainer/references/storytelling.md +56 -0
  34. package/skills/iso-explainer/scripts/build.mjs +80 -0
  35. package/skills/iso-explainer/scripts/harvest.mjs +240 -0
  36. package/skills/iso-explainer/scripts/lib/resolve.mjs +251 -0
  37. package/skills/iso-explainer/scripts/snapshot.mjs +97 -0
  38. package/skills/iso-explainer/scripts/validate.mjs +41 -0
package/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alex Roberto Schmitt
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.
22
+
23
+ Third-party assets bundled in skills/iso-explainer/assets keep their own licenses:
24
+ Lucide icons (ISC) and JetBrains Mono (SIL Open Font License 1.1).
package/README.md CHANGED
@@ -1,3 +1,111 @@
1
- # Temporary Holding Version
1
+ # iso-explainer
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![ci](https://github.com/actus7/iso-explainer/actions/workflows/ci.yml/badge.svg)](https://github.com/actus7/iso-explainer/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/iso-explainer.svg)](https://www.npmjs.com/package/iso-explainer)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
+
7
+ > 🇧🇷 [Leia em português](README.pt-BR.md)
8
+
9
+ An **agent skill** that turns a system, an architecture or a project's history into an **animated, step-by-step isometric explainer**. Blocks drop onto the stage, links draw themselves, request packets flow, servers overheat and fail, HUD metrics count to their new values, and a side panel explains *why* each change happens.
10
+
11
+ Your agent writes **one typed JSON file**. A deterministic compiler turns it into **one self-contained `index.html`** (~400 KB, with fonts, icons and engine inlined) that works offline and deploys anywhere.
12
+
13
+ **[▶ Live demos](https://actus7.github.io/iso-explainer/)** (the examples are in Portuguese; the UI also ships in English and Spanish)
14
+
15
+ ![Architecture tour](docs/img/arquitetura.png)
16
+
17
+ ## Install
18
+
19
+ **Claude Code**
20
+
21
+ ```bash
22
+ npx iso-explainer install # ~/.claude/skills/iso-explainer (every project)
23
+ npx iso-explainer install --project # ./.claude/skills/iso-explainer (commit it with the repo)
24
+ ```
25
+
26
+ **Codex, Cursor, OpenCode, Gemini CLI and other agents** (via the open [skills CLI](https://github.com/vercel-labs/skills)):
27
+
28
+ ```bash
29
+ npx skills add actus7/iso-explainer -g
30
+ ```
31
+
32
+ **claude.ai**: download `iso-explainer.zip` from the [latest release](https://github.com/actus7/iso-explainer/releases/latest) and upload it under *Customize → Skills → + → Upload skill*.
33
+
34
+ **Any folder**: `npx iso-explainer install --dir <skills-folder>`. Add `--force` to update an existing install.
35
+
36
+ Requires Node.js ≥ 18. Visual QA (`snapshot`) also needs Playwright *or* an installed Chrome/Edge.
37
+
38
+ ## Three modes
39
+
40
+ | Mode | For | Demo |
41
+ |---|---|---|
42
+ | **Course** (default) | teaching a concept: problem → technique → solution → trade-off | [Engenharia na Prática](https://actus7.github.io/iso-explainer/curso.html) |
43
+ | **Docs** (`mode: "docs"`) | showing how an existing system works, flow by flow, focusing on one part per step | [Plataforma de Pedidos: architecture](https://actus7.github.io/iso-explainer/arquitetura.html) |
44
+ | **Story** (`mode: "story"`) | why the system is the way it is: each decision with context, rejected alternatives, consequences and sources (ADRs, RFCs, PRs, agent sessions) | [Plataforma de Pedidos: the story](https://actus7.github.io/iso-explainer/historia.html) |
45
+
46
+ In every mode, a box can have an **`inside`**: a magnifier appears on it and clicking dives the camera into an internal view. That view is either a mini diagram with its own steps or an interactive mechanism figure (token bucket, LSM tree, circuit breaker…).
47
+
48
+ <p>
49
+ <img src="docs/img/curso.png" width="49%" alt="Course mode"> <img src="docs/img/historia.png" width="49%" alt="Story mode with a decision record">
50
+ </p>
51
+ <p><img src="docs/img/inside.png" width="98%" alt="Inside view of a component"></p>
52
+
53
+ ## Asking your agent
54
+
55
+ ```text
56
+ Use the iso-explainer skill to give a tour of this repository's architecture (docs mode):
57
+ the main view is the path of an order; give the billing worker an "inside".
58
+ ```
59
+
60
+ ```text
61
+ Use iso-explainer in story mode: run the harvest on this repository and tell the story
62
+ of the 2025 architecture decisions, citing ADRs, PRs and sessions.
63
+ ```
64
+
65
+ ```text
66
+ Use iso-explainer to build a lesson on why we need queues, in 8 steps.
67
+ ```
68
+
69
+ ## CLI
70
+
71
+ The skill's scripts also run standalone, with nothing installed:
72
+
73
+ ```bash
74
+ npx iso-explainer validate course.json # errors with JSON paths + geometry and text checks
75
+ npx iso-explainer build course.json -o dist/index.html # --fonts inline|google|none
76
+ npx iso-explainer snapshot dist/index.html --viewport all --theme both # per-step screenshots + layout audit
77
+ npx iso-explainer harvest ./my-repo --out dossier # ADRs, RFCs, git, agent sessions → redacted dossier
78
+ ```
79
+
80
+ Start from [`starter.course.json`](skills/iso-explainer/assets/templates/starter.course.json). The full schema is in [`references/schema.md`](skills/iso-explainer/references/schema.md).
81
+
82
+ ## What's in the skill
83
+
84
+ ```
85
+ skills/iso-explainer/
86
+ SKILL.md workflow and quality rules for the agent
87
+ references/ schema, entities, layout, flows, storytelling, docs, story, inside, design system, engine
88
+ scripts/validate.mjs validates the course (JSON-path errors, geometry, text length)
89
+ scripts/build.mjs course → single index.html
90
+ scripts/snapshot.mjs per-step screenshots + layout audit (Playwright or installed Chrome/Edge)
91
+ scripts/harvest.mjs chronological dossier from ADRs, RFCs, git and Claude Code/Codex sessions (secrets masked)
92
+ assets/runtime/ isometric engine, shell, styles, icons
93
+ examples/ a course, an architecture tour, a project story and a mechanism figure
94
+ ```
95
+
96
+ The scripts are plain Node with zero dependencies.
97
+
98
+ ## Development
99
+
100
+ ```bash
101
+ npm test # validates and builds every example and tests the installer
102
+ ```
103
+
104
+ Before opening a PR that touches the runtime, build an example and run `snapshot` on it at every viewport, in both themes.
105
+
106
+ Releasing: bump `version` in `package.json`, update `CHANGELOG.md`, then `git tag vX.Y.Z && git push --tags` (attaches the claude.ai ZIP) and `npm publish`.
107
+
108
+ ## License
109
+
110
+ MIT. [Lucide](https://lucide.dev) icons (ISC) and [JetBrains Mono](https://www.jetbrains.com/lp/mono/) (OFL) keep their own licenses.
111
+ Inspired by the visual language of interactive system design courses and by [Archify](https://github.com/tt-a1i/archify)'s JSON → HTML flow. No code from those projects was copied.
@@ -0,0 +1,88 @@
1
+ # iso-explainer
2
+
3
+ > 🇺🇸 [Read in English](README.md)
4
+
5
+ **Skill para agentes de IA que transforma sistemas, arquiteturas e a história de um projeto em diagramas isométricos animados, passo a passo.**
6
+
7
+ O agente escreve um JSON tipado; um compilador gera **um único `index.html`** autocontido, que funciona offline e pode ser publicado em qualquer lugar.
8
+
9
+ ![Tour de arquitetura](docs/img/arquitetura.png)
10
+
11
+ ## Instalar
12
+
13
+ **Claude Code**
14
+
15
+ ```bash
16
+ npx iso-explainer install # ~/.claude/skills/iso-explainer (todos os projetos)
17
+ npx iso-explainer install --project # ./.claude/skills/iso-explainer (versionada com o repo)
18
+ ```
19
+
20
+ Para atualizar, rode de novo com `--force`. Os scripts também rodam sem instalar: `npx iso-explainer validate|build|snapshot|harvest …`.
21
+
22
+ **Codex, Cursor, OpenCode, Gemini CLI e outros agentes compatíveis** (via [skills CLI](https://github.com/vercel-labs/skills)):
23
+
24
+ ```bash
25
+ npx skills add actus7/iso-explainer -g
26
+ ```
27
+
28
+ **claude.ai**: baixe `iso-explainer.zip` na [última release](../../releases/latest) e envie em *Personalizar → Skills → + → Criar skill → Enviar skill*.
29
+
30
+ **Manual**: copie `skills/iso-explainer/` para a pasta de skills do seu agente (ex.: `~/.claude/skills/iso-explainer`).
31
+
32
+ Requer Node.js ≥ 18 para os scripts. Playwright é opcional (só para a conferência visual).
33
+
34
+ Para figuras de mecanismos dentro das caixas, instale também a skill irmã [anatomy](https://github.com/wheresryan22/anatomy):
35
+
36
+ ```bash
37
+ npx skills add wheresryan22/anatomy -g
38
+ ```
39
+
40
+ ## Três modos
41
+
42
+ | Modo | Para quê | Demo |
43
+ |---|---|---|
44
+ | **Curso** | ensinar um conceito: problema → técnica → solução → trade-off | [Engenharia na Prática](https://actus7.github.io/iso-explainer/curso.html) |
45
+ | **Documentação** (`mode: "docs"`) | mostrar como um sistema existente funciona, fluxo por fluxo, com foco no trecho de cada passo | [Plataforma de Pedidos: arquitetura](https://actus7.github.io/iso-explainer/arquitetura.html) |
46
+ | **História** (`mode: "story"`) | contar por que o sistema é assim: cada decisão com contexto, alternativas descartadas, consequências e fontes (ADRs, RFCs, PRs, sessões de agentes) | [Plataforma de Pedidos: a história](https://actus7.github.io/iso-explainer/historia.html) |
47
+
48
+ Em qualquer modo, uma caixa pode ter **`inside`**: uma lupa aparece nela e, ao clicar, a câmera mergulha e abre a visão interna. Pode ser um mini-diagrama com passos próprios ou uma figura interativa de mecanismo feita com o anatomy.
49
+
50
+ <p>
51
+ <img src="docs/img/curso.png" width="49%" alt="Modo curso"> <img src="docs/img/historia.png" width="49%" alt="Modo história com registro de decisão">
52
+ </p>
53
+ <p><img src="docs/img/inside.png" width="98%" alt="Visão interna de um componente"></p>
54
+
55
+ ## Como pedir ao agente
56
+
57
+ ```text
58
+ Use a skill iso-explainer para fazer um tour da arquitetura deste repositório (modo docs):
59
+ a visão principal é o caminho de um pedido; dê "inside" ao worker de cobrança.
60
+ ```
61
+
62
+ ```text
63
+ Use iso-explainer em modo story: rode o harvest neste repositório e conte a história
64
+ das decisões de arquitetura de 2025, citando ADRs, PRs e sessões.
65
+ ```
66
+
67
+ ```text
68
+ Use iso-explainer para criar uma aula sobre por que precisamos de filas, com 8 passos.
69
+ ```
70
+
71
+ ## O que vem na skill
72
+
73
+ ```
74
+ skills/iso-explainer/
75
+ SKILL.md fluxo de trabalho e regras de qualidade para o agente
76
+ references/ esquema, entidades, layout, fluxos, roteiro, docs, história, inside, design system, motor
77
+ scripts/validate.mjs valida o curso (erros com caminho JSON, geometria, textos)
78
+ scripts/build.mjs curso → index.html único
79
+ scripts/snapshot.mjs screenshots por passo + auditoria de layout (Playwright)
80
+ scripts/harvest.mjs dossiê cronológico de ADRs, RFCs, git e sessões do Claude Code/Codex (segredos mascarados)
81
+ assets/runtime/ motor isométrico, shell, estilos, ícones
82
+ examples/ um curso, um tour de arquitetura, uma história e uma figura de mecanismo
83
+ ```
84
+
85
+ ## Licença
86
+
87
+ MIT. Ícones [Lucide](https://lucide.dev) (ISC) e fonte [JetBrains Mono](https://www.jetbrains.com/lp/mono/) (OFL) mantêm suas licenças.
88
+ Inspirado na linguagem visual de cursos interativos de system design e no fluxo JSON → HTML do [Archify](https://github.com/tt-a1i/archify). Nenhum código desses projetos foi copiado.
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+ // iso-explainer CLI — install the skill, or run its scripts without installing.
3
+ // npx iso-explainer install [--project] [--dir <path>] [--force]
4
+ // npx iso-explainer build|validate|snapshot|harvest <args…>
5
+ import fs from 'node:fs';
6
+ import os from 'node:os';
7
+ import path from 'node:path';
8
+ import { fileURLToPath, pathToFileURL } from 'node:url';
9
+
10
+ const PKG = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
11
+ const ROOT = path.join(PKG, 'skills', 'iso-explainer');
12
+ const COMMANDS = ['build', 'validate', 'snapshot', 'harvest'];
13
+ const { version } = JSON.parse(fs.readFileSync(path.join(PKG, 'package.json'), 'utf8'));
14
+
15
+ const HELP = `iso-explainer ${version}
16
+
17
+ Usage:
18
+ npx iso-explainer install install the skill for Claude Code (~/.claude/skills/iso-explainer)
19
+ npx iso-explainer install --project install into ./.claude/skills/iso-explainer (commit it with your repo)
20
+ npx iso-explainer install --dir <path> install into <path>/iso-explainer (any agent's skills folder)
21
+ --force overwrite an existing install
22
+ npx iso-explainer validate course.json
23
+ npx iso-explainer build course.json -o dist/index.html
24
+ npx iso-explainer snapshot dist/index.html --out shots --viewport all --theme both
25
+ npx iso-explainer harvest <repo> --out dossier
26
+
27
+ Other agents (Codex, Cursor, Gemini CLI…): npx skills add actus7/iso-explainer
28
+ `;
29
+
30
+ export function install(dest, { force = false } = {}) {
31
+ if (fs.existsSync(dest)) {
32
+ if (!force) throw new Error(`${dest} already exists. Pass --force to overwrite.`);
33
+ fs.rmSync(dest, { recursive: true, force: true });
34
+ }
35
+ fs.mkdirSync(dest, { recursive: true });
36
+ fs.cpSync(ROOT, dest, { recursive: true, filter: (src) => path.basename(src) !== 'node_modules' });
37
+ return dest;
38
+ }
39
+
40
+ function installDir(args) {
41
+ const i = args.indexOf('--dir');
42
+ if (i >= 0) {
43
+ if (!args[i + 1]) throw new Error('--dir needs a path');
44
+ return path.resolve(args[i + 1]);
45
+ }
46
+ if (args.includes('--project')) return path.resolve('.claude', 'skills');
47
+ return path.join(process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude'), 'skills');
48
+ }
49
+
50
+ async function main([cmd, ...rest]) {
51
+ if (!cmd || cmd === '-h' || cmd === '--help') { console.log(HELP); return cmd ? 0 : 2; }
52
+ if (cmd === '-v' || cmd === '--version') { console.log(version); return 0; }
53
+ if (cmd === 'install') {
54
+ try {
55
+ const dest = install(path.join(installDir(rest), 'iso-explainer'), { force: rest.includes('--force') });
56
+ console.log(`✓ iso-explainer ${version} installed → ${dest}\n Restart your agent, then ask: "explain our checkout architecture as an isometric diagram".`);
57
+ return 0;
58
+ } catch (e) { console.error(`✗ ${e.message}`); return 1; }
59
+ }
60
+ if (COMMANDS.includes(cmd)) {
61
+ // The scripts read process.argv themselves and set their own exit code.
62
+ const script = path.join(ROOT, 'scripts', `${cmd}.mjs`);
63
+ process.argv = [process.argv[0], script, ...rest];
64
+ await import(pathToFileURL(script).href);
65
+ return undefined;
66
+ }
67
+ console.error(`Unknown command "${cmd}".\n\n${HELP}`);
68
+ return 2;
69
+ }
70
+
71
+ const isMain = process.argv[1] && fs.realpathSync(process.argv[1]) === fileURLToPath(import.meta.url);
72
+ if (isMain) {
73
+ const code = await main(process.argv.slice(2));
74
+ if (code !== undefined) process.exit(code);
75
+ }
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "iso-explainer",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Agent skill that turns a system, an architecture or a project's history into an animated, step-by-step isometric explainer: one self-contained HTML file from typed JSON.",
5
+ "keywords": [
6
+ "agent-skill",
7
+ "claude-code",
8
+ "claude-skill",
9
+ "skills",
10
+ "isometric",
11
+ "architecture",
12
+ "system-design",
13
+ "diagram",
14
+ "explainer",
15
+ "documentation"
16
+ ],
17
+ "license": "MIT",
18
+ "author": "Alex Roberto Schmitt (https://github.com/actus7)",
19
+ "homepage": "https://github.com/actus7/iso-explainer#readme",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/actus7/iso-explainer.git"
23
+ },
24
+ "bugs": "https://github.com/actus7/iso-explainer/issues",
25
+ "type": "module",
26
+ "bin": {
27
+ "iso-explainer": "bin/iso-explainer.mjs"
28
+ },
29
+ "files": [
30
+ "bin",
31
+ "skills/iso-explainer"
32
+ ],
33
+ "engines": {
34
+ "node": ">=18.17"
35
+ },
36
+ "scripts": {
37
+ "test": "node --test"
38
+ }
39
+ }
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: iso-explainer
3
+ description: "Diagramas isométricos animados passo a passo (JSON → um HTML): ensinar system design, documentar a arquitetura de um repo ou contar a história das decisões. Use para explicar fluxos e pipelines."
4
+ ---
5
+
6
+ # iso-explainer
7
+
8
+ Transforma um sistema, uma arquitetura ou um fluxo de trabalho em uma **aula interativa**: cada ideia é um diagrama isométrico animado que a pessoa percorre passo a passo. Blocos caem na cena, links se desenham, pacotes de requisição circulam, servidores esquentam e caem, métricas do HUD contam até o novo valor, e um painel lateral narra o porquê de cada mudança.
9
+
10
+ O agente escreve **um JSON tipado** (o curso). Um compilador determinístico gera **um único `index.html`** autocontido (fontes, ícones e motor embutidos, ~350 KB), pronto para abrir offline, publicar como artifact ou fazer deploy na Vercel/Netlify/GitHub Pages.
11
+
12
+ Use quando pedirem: explicar uma arquitetura, "mostrar como o fluxo funciona", demonstrar um pipeline (webhook → fila → worker, CI/CD, agente com ferramentas, ETL), comparar antes/depois de uma refatoração, ensinar system design, documentar um incidente passo a passo, ou "fazer algo tipo o archify / designed-to-scale".
13
+
14
+ ## Três modos
15
+
16
+ - **Curso** (padrão): ensina um conceito. Arco problema → técnica → solução → trade-off → resumo. Progresso, lições concluídas, "Você vai aprender".
17
+ - **Documentação** (`"meta": { "mode": "docs" }`): **mostra como um sistema existente funciona** — para chefe, time, cliente, onboarding, revisão de arquitetura. Mesmo visual; vocabulário vira Sistema / Visões / Neste fluxo / Pontos-chave, some o que é de curso, capítulos de arquitetura (visão geral, componente, fluxo, dados, integração, falha, decisão, risco, proposta) e o padrão de **foco** (`dim`) para destacar um trecho por passo. Leia `references/architecture-mode.md`.
18
+
19
+ - **História** (`"meta": { "mode": "story" }`): **conta como o sistema chegou até aqui** — cada passo é um momento datado (incidente, motivação, decisão, consequência) com o registro da decisão (contexto, alternativas descartadas, consequências) e as **fontes** citadas; a arquitetura no palco é a daquela época. Material vem de `scripts/harvest.mjs` (ADRs, RFCs, git, sessões do Claude Code/Codex, exports). Leia `references/story-mode.md`.
20
+
21
+ Nos três modos, qualquer caixa pode ter **`inside`**: uma lupa aparece nela e, ao clicar, a câmera mergulha e abre a visão interna — um mini-diagrama com passos próprios ou uma figura interativa de mecanismo feita com a skill **anatomy** (token bucket, LSM tree, circuit breaker…). Leia `references/inside.md`.
22
+
23
+ Escolha pelo pedido: "explicar/ensinar X" → curso; "mostrar/documentar/apresentar o nosso sistema / como ficou a arquitetura" → docs; "contar a história / por que decidimos / evolução / onboarding com contexto" → história.
24
+
25
+ ## O que o resultado tem (já pronto, não reimplemente)
26
+
27
+ - Palco isométrico SVG com 8 entidades: `block` (serviço), `device` (laptop/celular), `db` (cilindro com nível), `crowd` (multidão), `queue` (fila de bolinhas), `zone` (região tracejada), `ghost` (planejado), `panel` (cartão de informações ancorado num canto).
28
+ - Transições automáticas entre passos: o que sai some, o que muda é interpolado, o que entra cai com bounce e escalonamento, links se desenham, a câmera reenquadra sozinha e destaca o que é novo.
29
+ - Pacotes animados em rotas de links: requisição/resposta (`bounce`), espera (`hold`), falha probabilística (`fail`), rodízio ou pesos entre rotas, fan-out, 14 tipos visuais.
30
+ - Estados de entidade: `cpu` (medidor), `heat` (sobrecarga pulsando), `dead` (cinza com X), `dim`, `tags` (pílulas), `lift`.
31
+ - Shell completo: árvore de módulos/lições com progresso, cabeçalho, HUD de métricas com níveis bom/alerta/ruim e contagem animada, legenda, timeline de passos, painel do passo (capítulo colorido, texto, callout, "o que mudou"), objetivos que vão sendo marcados, busca ⌘K, tema claro/escuro (remapeamento automático de cores), leitura em voz alta, atalhos (← → R Espaço 0), rotas `#/licao/passo`, zoom/pan/pinça, swipe no celular, tela cheia, layouts desktop/tablet/celular, i18n pt-BR/en/es.
32
+
33
+ ## Fluxo de trabalho
34
+
35
+ `SKILL_DIR` = a pasta deste arquivo. Os scripts precisam de Node ≥ 18.
36
+
37
+ 0. **Modo história?** Rode primeiro `node SKILL_DIR/scripts/harvest.mjs <repo> --out dossier` e leia `dossier.md` (ver `references/story-mode.md`).
38
+ 1. **Entenda o sistema e o objetivo da aula.** Uma lição responde *uma* pergunta ("por que precisamos de fila?"). Se o material for um repositório, leia o código antes de desenhar — nunca invente componentes.
39
+ 2. **Escreva o roteiro antes do JSON.** Curso: 6–12 passos no arco *problema → técnica(s) → solução → trade-off → resumo* (`references/storytelling.md`). Docs: visão geral completa → um passo de foco por fluxo/componente → decisões (`references/architecture-mode.md`). Cada passo muda **uma** coisa visível.
40
+ 3. **Profundidade:** em docs/história, **toda caixa principal** ganha `inside`; em curso, as peças cujo mecanismo é o assunto. Sistema interno → visão nativa; mecanismo/algoritmo → figura do anatomy.
41
+ 4. **Planeje o layout.** Escolha coordenadas com as receitas de `references/layout.md` (eixos isométricos, espaçamentos, roteamento de links). Desenhe a cena *final* primeiro e derive as anteriores removendo peças — assim nada precisa mudar de lugar.
42
+ 5. **Escreva o curso.** Comece de `assets/templates/starter.course.json` (ou de `examples/engenharia-na-pratica.course.json`, que mostra tudo). Use `defs` + herança entre passos para manter o JSON curto. Esquema completo em `references/schema.md`; entidades em `references/entities.md`.
43
+ 6. **Valide:** `node SKILL_DIR/scripts/validate.mjs curso.json` — corrija todos os erros e leia os avisos (sobreposições, textos longos, rotas inválidas).
44
+ 7. **Compile:** `node SKILL_DIR/scripts/build.mjs curso.json -o dist/index.html`
45
+ 8. **Confira visualmente** (se houver Playwright/Chromium): `node SKILL_DIR/scripts/snapshot.mjs dist/index.html --out shots --viewport all --theme both`. Abra os PNGs, leia `shots/report.json` (sobreposições de rótulos, coisas sob o HUD, erros de console) e ajuste coordenadas até ficar limpo. O script usa o Chromium do Playwright ou, na falta dele, o Chrome/Edge instalado (ou `CHROME_PATH`). Sem Playwright, abra o HTML num navegador e percorra os passos.
46
+ 9. **Entregue** o `index.html` (ou publique). Deploy: `references/engine.md#deploy`.
47
+
48
+ ## Regras de qualidade (o que separa uma aula boa de um diagrama qualquer)
49
+
50
+ - **Um conceito por passo.** Se o "o que mudou" tem mais de 3 linhas, divida o passo.
51
+ - **Mostre, depois explique.** A cena tem que tornar o problema *visível* (pacotes lentos, `heat`, `dead`, falhas `fail`, fila crescendo) antes do texto dar a solução.
52
+ - **Números contam a história.** 3–5 métricas no HUD que mudam de forma significativa entre passos (latência, vazão, erros, custo, profundidade da fila). Use `good`/`warn` para colorir.
53
+ - **Texto curto.** Título ≤ 48 caracteres; `body` = 1–2 parágrafos, ≤ 70 palavras; `short` ≤ 14 caracteres; rótulos de link ≤ 28; no máximo um `callout`.
54
+ - **Até ~12 entidades por cena** e ≤ 8 pílulas no total. Detalhe vai para o texto ou para um `panel`.
55
+ - **Espaço:** ≥ 3 unidades de grade entre footprints; ≥ 6 quando houver pílulas/rótulos entre eles. Pílulas `tags`/`cpu` ficam *acima* do bloco — deixe espaço em cima ou use `"pills": "below"`.
56
+ - Curso: **primeiro passo = problema**, último = **resumo** (com `panel`). Docs: **primeiro = visão geral** com a cena completa, último = decisões/resumo. Metas (`goals`) apontam para os passos onde cada ideia aparece.
57
+ - Docs: **fidelidade** — só componentes e nomes que existem no código/infra; números só se medidos (senão omita `metrics`).
58
+ - **Consistência espacial:** uma entidade mantém o id e a posição ao longo da lição; mude estado (`cpu`, `dead`, `tags`), não lugar — salvo quando o movimento *é* a explicação.
59
+ - **Nunca** copie textos, marcas ou logotipos de terceiros para o curso; marca e créditos vêm de `meta`.
60
+
61
+ ## Referências (carregue só o que precisar)
62
+
63
+ | Arquivo | Quando ler |
64
+ |---|---|
65
+ | `references/schema.md` | Sempre, ao escrever o JSON: curso, módulos, lições, passos, cena, herança, `defs`, métricas, legenda, glossário. |
66
+ | `references/entities.md` | Ao escolher/configurar entidades, cores, glifos (ícones Lucide), estados e tamanhos. |
67
+ | `references/layout.md` | Ao posicionar: sistema de coordenadas, receitas (pipeline, fan-out, camadas, zonas), roteamento de links e rótulos, câmera. |
68
+ | `references/storytelling.md` | Ao roteirizar um curso: arco da lição, capítulos, padrões de passo, como escrever, como escolher métricas, anti-padrões. |
69
+ | `references/inside.md` | Ao dar profundidade a uma caixa: `inside` nativo (passos internos) ou figura HTML/SVG da skill anatomy. |
70
+ | `references/story-mode.md` | Ao contar a evolução/decisões de um projeto: `mode: "story"`, coletor `harvest.mjs`, registro de decisão, fontes, como narrar. |
71
+ | `references/architecture-mode.md` | Ao documentar/apresentar um sistema existente: `mode: "docs"`, visões recomendadas, capítulos de arquitetura, padrão de foco, fidelidade ao código. |
72
+ | `references/flows.md` | Ao animar tráfego: rotas, tipos de pacote, `bounce`/`hold`/`fail`/pesos/fan-out, estilos de link. |
73
+ | `references/design-system.md` | Ao mudar marca/tema: tokens, componentes, tipografia, tema escuro, layouts responsivos. |
74
+ | `references/engine.md` | Ao estender o motor (nova entidade, novo pacote, novo formato de métrica), embutir, automatizar ou fazer deploy. |
75
+
76
+ ## Arquivos
77
+
78
+ ```
79
+ SKILL.md
80
+ scripts/validate.mjs valida o curso (erros com caminho JSON + checagens de geometria)
81
+ scripts/build.mjs curso → HTML único (--fonts inline|google|none, --force)
82
+ scripts/snapshot.mjs screenshots por passo + auditoria de layout (Playwright)
83
+ scripts/harvest.mjs dossiê cronológico de ADRs/RFCs/git/sessões de agentes (segredos mascarados)
84
+ scripts/lib/resolve.mjs expansão de defs/herança/coordenadas (usado pelos dois acima)
85
+ assets/runtime/ motor (engine.js), shell (app.js), styles.css, icons.js, template.html
86
+ assets/fonts/ JetBrains Mono (OFL)
87
+ assets/templates/starter.course.json ponto de partida mínimo
88
+ examples/engenharia-na-pratica.course.json curso completo com 2 lições (system design + workflow)
89
+ examples/arquitetura-pedidos.docs.json tour de arquitetura em modo docs (foco, falhas, decisões)
90
+ examples/historia-pedidos.story.json a história do mesmo sistema em modo story (ADRs, fontes, datas)
91
+ examples/figures/token-bucket.html figura de mecanismo usada como `inside` (no lugar de uma figura do anatomy)
92
+ ```
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,43 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 Lucide Icons and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ ---
18
+
19
+ The following Lucide icons are derived from the Feather project:
20
+
21
+ airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
22
+
23
+ The MIT License (MIT) (for the icons listed above)
24
+
25
+ Copyright (c) 2013-present Cole Bemis
26
+
27
+ Permission is hereby granted, free of charge, to any person obtaining a copy
28
+ of this software and associated documentation files (the "Software"), to deal
29
+ in the Software without restriction, including without limitation the rights
30
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31
+ copies of the Software, and to permit persons to whom the Software is
32
+ furnished to do so, subject to the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be included in all
35
+ copies or substantial portions of the Software.
36
+
37
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
+ SOFTWARE.