refactor: cut over to the Astro build
Merges refactor/task-20-cutover. Task 20 steps 1, 2, and 5; publishing is
not included.
The hand-written site is gone: 32 files deleted, including app.js,
responsive.css, and all ten route index.html files. Twelve more could not
be deleted -- the Astro pages import them and the build fails without
them -- so they moved to legacy/ verbatim, outside the reach of
check-tokens.mjs, which sweeps src/ and would demand a token migration
these files have not had.
Before anything was deleted, rendered-text-diff swept all ten routes plus
both Portuguese pages at full parity, 0 missing and 0 extra. That
comparison stops being possible once the legacy files are gone, which is
why it ran first. computed-style-diff on /full-guide/ is unchanged at 32.
verify.mjs no longer reads app.js and holds at 84 assertions.
audit-ui.mjs reads dist/. Docs across README, AGENTS.md, GATES.md, the
architecture context, and the operations guide now describe the built
site rather than the hand-written one.
origin/pages is unchanged at 37a1e480c6.
The publish job is still gated to manual dispatch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,45 +1,47 @@
|
|||||||
# Context: architecture, current and target
|
# Context: architecture
|
||||||
|
|
||||||
## Current (no build step)
|
## Current (Astro, static output)
|
||||||
|
|
||||||
Ten hand-written HTML pages, each linking its own CSS and one ES module:
|
Ten routes, one `src/pages/` entry each, built to `dist/`:
|
||||||
|
|
||||||
| Route | Page | Script | Stylesheets |
|
| Route | Page | Islands |
|
||||||
| -------------------- | -------------------------- | ---------------------- | --------------------------------------------- |
|
| -------------------- | ------------------------------- | ----------------------------------------------- |
|
||||||
| `/` | `index.html` | — | `chapters.css`, `landing.css` |
|
| `/` | `src/pages/index.astro` | — |
|
||||||
| `/full-guide/` | `full-guide/index.html` | `app.js` (50 KB) | `styles.css`, `responsive.css`, `audit.css` |
|
| `/full-guide/` | `src/pages/full-guide.astro` | `GuideSelector`, `LanguageToggle`, `CopyPrompt` |
|
||||||
| `/summary/` | `summary/index.html` | — | `chapters.css` |
|
| `/summary/` | `src/pages/summary.astro` | — |
|
||||||
| `/models/` | `models/index.html` | — | `chapters.css` |
|
| `/models/` | `src/pages/models.astro` | — |
|
||||||
| `/agents/` | `agents/index.html` | — | `chapters.css` |
|
| `/agents/` | `src/pages/agents.astro` | — |
|
||||||
| `/skills/` | `skills/index.html` | `skills/app.js` | `skills/styles.css` |
|
| `/skills/` | `src/pages/skills.astro` | `SkillPackageExplorer` |
|
||||||
| `/rules/` | `rules/index.html` | `rules/app.js` | `rules/styles.css` |
|
| `/rules/` | `src/pages/rules.astro` | `RulesInteractive` |
|
||||||
| `/skills-review/` | `skills-review/index.html` | `skills-review/app.js` | `skills-review/styles.css`, `change-lens.css` |
|
| `/skills-review/` | `src/pages/skills-review.astro` | `legacy/skills-review/app.js` |
|
||||||
| `/hands-on/starter/` | lab fixture | own | own |
|
| `/hands-on/starter/` | `public/` lab fixture | own |
|
||||||
| `/hands-on/rules/` | lab fixture | own | own |
|
| `/hands-on/rules/` | `public/` lab fixture | own |
|
||||||
|
|
||||||
Weight is concentrated: `app.js` 50 KB, `responsive.css` 30 KB,
|
## What is still unmigrated
|
||||||
`skills-review/catalog.js` 27 KB, `skills-review/submitted-catalog.js` 18 KB.
|
|
||||||
|
|
||||||
### What each big file actually is
|
`legacy/` holds the parts the migration did not componentize. They are not dead
|
||||||
|
files — the pages listed above import them, and the build fails without them.
|
||||||
|
|
||||||
- **`app.js`** — not really application code. It is a **bilingual content
|
- **`legacy/styles/guide.css`** (was `styles.css`) — the editorial visual
|
||||||
database** (`phases`, `handsOnPrompts`, `modelGuide`, `skillSources`,
|
system, imported by `full-guide.astro`.
|
||||||
`skillInstallPrompts`, each keyed `{en, pt}`) plus ~12 small `render*`
|
- **`legacy/styles/audit.css`** (was `full-guide/audit.css`) — responsive audit
|
||||||
functions that swap `innerHTML` on tab clicks. ~50 `en:` keys. The content
|
overrides, imported by `full-guide.astro`.
|
||||||
should become data; only the tab behaviour is interactive.
|
- **`legacy/styles/chapters.css`** — imported by `ChapterLayout.astro`.
|
||||||
- **`responsive.css`** — a 30 KB append-only layer of overrides bolted on top of
|
- **`legacy/styles/skills.css`**, **`skills-review.css`**, **`change-lens.css`**
|
||||||
`styles.css`. Expect large parts to be dead once layout moves into components.
|
— imported by their respective pages.
|
||||||
Do not port it verbatim.
|
- **`legacy/skills-review/`** — `app.js` and the module graph under it
|
||||||
- **`skills-review/catalog.js`** — the real data model of the review desk: one
|
(`catalog.js`, `submitted-catalog.js`, `files.js`, `submitted-files.js`,
|
||||||
entry per submitted skill with `id`, `author`, `title`, `status`, `focus`,
|
`vote.js`). `catalog.js` + `submitted-catalog.js` are the review desk's real
|
||||||
`wins[]`, `improve[]`, `extras`, `improved` (full markdown). 24 entries across
|
data model, 24 entries; they are a content collection in all but name.
|
||||||
`catalog.js` + `submitted-catalog.js`. This is already a content collection in
|
|
||||||
all but name.
|
|
||||||
- **`skills-review/files.js` / `submitted-files.js`** — generated file
|
|
||||||
manifests.
|
|
||||||
- **`vote.js`** — the vote widget island; talks to `vote-service/`.
|
|
||||||
|
|
||||||
## Target (Astro)
|
These sit outside `src/` deliberately: `check-tokens.mjs` sweeps `src`, and
|
||||||
|
these files are full of raw hex and unnamed breakpoints. Moving one into `src/`
|
||||||
|
means migrating it to tokens in the same change, not adding an exclusion.
|
||||||
|
|
||||||
|
`responsive.css`, `landing.css`, `app.js`, `rules/app.js`, `rules/styles.css`,
|
||||||
|
and `skills/app.js` were deleted at cutover: their content lives in components.
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
```
|
```
|
||||||
src/
|
src/
|
||||||
@@ -52,15 +54,15 @@ public/
|
|||||||
hands-on/ lab fixtures copied verbatim, never processed
|
hands-on/ lab fixtures copied verbatim, never processed
|
||||||
```
|
```
|
||||||
|
|
||||||
### Non-negotiables for the target
|
### Non-negotiables
|
||||||
|
|
||||||
- **URLs do not change.** `/full-guide/`, `/skills-review/`,
|
- **URLs do not change.** `/full-guide/`, `/skills-review/`,
|
||||||
`/hands-on/starter/` and the rest must resolve exactly as they do now,
|
`/hands-on/starter/` and the rest must resolve exactly as they do now,
|
||||||
trailing slash included. Existing links (including `docs/`, SilverBullet, and
|
trailing slash included. Existing links (including `docs/`, SilverBullet, and
|
||||||
shared URLs with `?author=…&skill=…&view=…` query params) must keep working.
|
shared URLs with `?author=…&skill=…&view=…` query params) must keep working.
|
||||||
- **Zero JS by default.** Seven of the ten pages ship no JavaScript today. They
|
- **Zero JS by default.** Seven of the ten pages ship no JavaScript. They must
|
||||||
must still ship none. Islands are opt-in, per component, and justified.
|
still ship none. Islands are opt-in, per component, and justified.
|
||||||
- **`hands-on/` stays vanilla.** It goes in `public/` untouched. It is a lab
|
- **`hands-on/` stays vanilla.** It lives in `public/` untouched. It is a lab
|
||||||
fixture, not a component.
|
fixture, not a component.
|
||||||
- **No external runtime requests.** `audit-ui.mjs` enforces this and it is part
|
- **No external runtime requests.** `audit-ui.mjs` enforces this and it is part
|
||||||
of the site's thesis. Self-host anything you add.
|
of the site's thesis. Self-host anything you add.
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ const PROPERTIES = [
|
|||||||
'overflow',
|
'overflow',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// The legacy pages were deleted at cutover; run this from a pre-cutover
|
||||||
|
// worktree, or the legacy side will 404.
|
||||||
const legacyPath = route === 'index' ? 'index.html' : `${route}/index.html`;
|
const legacyPath = route === 'index' ? 'index.html' : `${route}/index.html`;
|
||||||
const astroPath = route === 'index' ? '' : `${route}/`;
|
const astroPath = route === 'index' ? '' : `${route}/`;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
// bilingual pair, so the two sides line up.
|
// bilingual pair, so the two sides line up.
|
||||||
//
|
//
|
||||||
// Requires playwright (devDependency) and two static servers; it starts both.
|
// Requires playwright (devDependency) and two static servers; it starts both.
|
||||||
|
//
|
||||||
|
// The legacy pages were deleted at cutover, so this needs a pre-cutover tree:
|
||||||
|
// git worktree add /tmp/vanilla <pre-cutover-sha>
|
||||||
|
// and run from there, or run it from a checkout that still has them.
|
||||||
import { spawn } from 'node:child_process';
|
import { spawn } from 'node:child_process';
|
||||||
import { cpSync, mkdtempSync, rmSync } from 'node:fs';
|
import { cpSync, mkdtempSync, rmSync } from 'node:fs';
|
||||||
import { tmpdir } from 'node:os';
|
import { tmpdir } from 'node:os';
|
||||||
|
|||||||
@@ -12,8 +12,12 @@ description:
|
|||||||
|
|
||||||
The snapshot is the only objective evidence that no content was lost.
|
The snapshot is the only objective evidence that no content was lost.
|
||||||
|
|
||||||
|
The vanilla site was deleted at cutover. To compare against it, check the
|
||||||
|
pre-cutover tree out into a scratch worktree first:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm run serve & # vanilla site on :4173
|
git worktree add /tmp/vanilla <pre-cutover-sha>
|
||||||
|
(cd /tmp/vanilla && python3 -m http.server 4173) &
|
||||||
node .agents/scripts/snapshot-route.mjs http://localhost:4173/models/ \
|
node .agents/scripts/snapshot-route.mjs http://localhost:4173/models/ \
|
||||||
> .agents/snapshots/models.txt
|
> .agents/snapshots/models.txt
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ a bug.
|
|||||||
```bash
|
```bash
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
import re
|
import re
|
||||||
files=['styles.css','chapters.css','landing.css','rules/styles.css','skills/styles.css',
|
files=['legacy/styles/guide.css','legacy/styles/chapters.css','legacy/styles/skills.css',
|
||||||
'skills-review/styles.css','hands-on/starter/styles.css','hands-on/rules/styles.css']
|
'legacy/styles/skills-review.css','legacy/styles/change-lens.css',
|
||||||
|
'legacy/styles/audit.css','public/hands-on/starter/styles.css',
|
||||||
|
'public/hands-on/rules/styles.css']
|
||||||
seen={}
|
seen={}
|
||||||
for f in files:
|
for f in files:
|
||||||
for m in re.finditer(r'--([a-z-]+):\s*([^;}]+)', open(f).read()):
|
for m in re.finditer(r'--([a-z-]+):\s*([^;}]+)', open(f).read()):
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ with sync_playwright() as p:
|
|||||||
browser.close()
|
browser.close()
|
||||||
```
|
```
|
||||||
|
|
||||||
Run once against the vanilla site (`pnpm run serve`), once against
|
Run once against `pnpm run preview`. To compare against the vanilla site, serve
|
||||||
`pnpm run preview`. Keep both sets.
|
a pre-cutover worktree on :4173 first — those files are no longer on `main`.
|
||||||
|
Keep both sets.
|
||||||
|
|
||||||
## Compare
|
## Compare
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
[
|
||||||
|
"01 frota",
|
||||||
|
"02 worktrees",
|
||||||
|
"03 modelos",
|
||||||
|
"04 skills",
|
||||||
|
"05 criar",
|
||||||
|
"06 kit de campo",
|
||||||
|
"07 prática",
|
||||||
|
"ENGENHARIA DE IA <i></i> 01 / 2026",
|
||||||
|
"Uma apresentação para quem entrega software",
|
||||||
|
"Você não precisa de um exército de modelos. Precisa de um sistema: uma mente para enquadrar o trabalho, várias mãos para executá-lo e uma fronteira clara entre cada tarefa.",
|
||||||
|
"NOTA DE CAMPO / 001",
|
||||||
|
"Entregue o<br /><em>sistema.</em>",
|
||||||
|
"Skills · agentes · worktrees · evidências",
|
||||||
|
"modelo forte<br />para ambiguidade",
|
||||||
|
"workers delimitados<br />em paralelo",
|
||||||
|
"iterações<br />com evidências",
|
||||||
|
"Leia isto como um mapa de rota, não como uma receita de prompt.",
|
||||||
|
"REGRA ZERO",
|
||||||
|
"Modelo forte para ambiguidade.<br />Modelo leve para trabalho delimitado.",
|
||||||
|
"Uma pequena frota",
|
||||||
|
"coordenação antes do paralelismo",
|
||||||
|
"ORQUESTRADOR",
|
||||||
|
"Decide o que<br />precisa acontecer.",
|
||||||
|
"Componentes e estados visuais",
|
||||||
|
"Casos de aceitação",
|
||||||
|
"Guia e exemplos",
|
||||||
|
"O orquestrador preserva a intenção, escreve pequenos contratos e reúne resultados verificáveis. Ele não precisa digitar cada linha.",
|
||||||
|
"Por que a fronteira importa",
|
||||||
|
"uma tarefa vaga / três falhas previsíveis",
|
||||||
|
"Sopa de contexto",
|
||||||
|
"Cada worker lê tudo. Ninguém sabe quais fatos são essenciais.",
|
||||||
|
"Colisão de branches",
|
||||||
|
"Dois agentes usam o mesmo checkout. O caminho mais rápido vira resolução de conflitos.",
|
||||||
|
"Desvio confiante",
|
||||||
|
"O diff parece ótimo, mas ninguém verifica se resolveu o problema original.",
|
||||||
|
"O ciclo de subagentes",
|
||||||
|
"Clique em uma fase.<br /><em>Veja a passagem.</em>",
|
||||||
|
"Delegar é mover uma tarefa delimitada para um contexto menor — não abrir mão da responsabilidade.",
|
||||||
|
"O que atravessa contextos",
|
||||||
|
"brief → diff → evidência",
|
||||||
|
"Pacote",
|
||||||
|
"Contém",
|
||||||
|
"Por que importa",
|
||||||
|
"Git worktrees",
|
||||||
|
"Uma branch<br />por <em>mão.</em>",
|
||||||
|
"Um worktree é outro diretório ligado ao mesmo repositório. Cada agente recebe seu próprio checkout e índice; o histórico continua compartilhado.",
|
||||||
|
"Selecione um nó para inspecionar checkout, responsável e próxima ação.",
|
||||||
|
"topologia do repositório",
|
||||||
|
"<i></i> 4 checkouts",
|
||||||
|
"RAIZ",
|
||||||
|
"AGENTE DE UI",
|
||||||
|
"AGENTE DE TESTES",
|
||||||
|
"AGENTE DE DOCS",
|
||||||
|
"● limpo",
|
||||||
|
"3 arquivos · trabalhando",
|
||||||
|
"8 verificações · pronto",
|
||||||
|
"2 páginas · revisão",
|
||||||
|
"Roteamento de modelos",
|
||||||
|
"Não pague por<br />raciocínio onde precisa<br />de <em>ritmo.</em>",
|
||||||
|
"Escolha um trabalho para entender por que o perfil do modelo muda.",
|
||||||
|
"Trabalho",
|
||||||
|
"Perfil",
|
||||||
|
"Formato do prompt",
|
||||||
|
"Planejar",
|
||||||
|
"Construir",
|
||||||
|
"Explorar",
|
||||||
|
"Revisar",
|
||||||
|
"Skills",
|
||||||
|
"Escreva do jeito certo<br /><em>uma vez.</em>",
|
||||||
|
"Uma skill é um procedimento reutilizável. Ela pode carregar instruções, referências, scripts e assets. Não é memória mágica e não substitui critérios de aceitação.",
|
||||||
|
"01 / defina o gatilho",
|
||||||
|
"02 / carregue detalhes sob demanda",
|
||||||
|
"03 / devolva evidências",
|
||||||
|
"PACOTE DE SKILL",
|
||||||
|
"Skills comuns",
|
||||||
|
"escolha o comportamento antes do modelo",
|
||||||
|
"O kit de campo",
|
||||||
|
"Trabalhos diferentes.<br />Instintos <em>diferentes.</em>",
|
||||||
|
"Uma skill muda como o agente aborda o trabalho. Algumas moldam a comunicação. Outras impõem pesquisa, diagnóstico, revisão ou disciplina de conclusão. Selecione uma para inspecionar sua regra operacional.",
|
||||||
|
"SIMPLIFICAR",
|
||||||
|
"código mínimo que funciona",
|
||||||
|
"COMUNICAR",
|
||||||
|
"sinal sem excesso",
|
||||||
|
"CONCLUIR",
|
||||||
|
"gates e evidências",
|
||||||
|
"INVESTIGAR",
|
||||||
|
"fontes primárias primeiro",
|
||||||
|
"DIAGNOSTICAR",
|
||||||
|
"ciclo curto de feedback",
|
||||||
|
"REVISAR",
|
||||||
|
"padrões × especificação",
|
||||||
|
"ECONOMIZAR",
|
||||||
|
"comprima saídas ruidosas",
|
||||||
|
"UM LOADOUT PRÁTICO",
|
||||||
|
"<b>PLANEJAR</b> unlazy <i>→</i> <b>CONSTRUIR</b> ponytail-lite <i>→</i> <b>DIAGNOSTICAR</b> diagnosing-bugs <i>→</i> <b>REPORTAR</b> caveman",
|
||||||
|
"O PAPEL HUMANO",
|
||||||
|
"O agente pode ser autônomo na execução. Intenção, limites e evidências continuam sendo seus.",
|
||||||
|
"COMECE AQUI",
|
||||||
|
"Comece com um agente e uma skill. Adicione paralelismo apenas quando as tarefas forem realmente independentes.",
|
||||||
|
"Continue aprendendo",
|
||||||
|
"12 novas leituras + documentação primária",
|
||||||
|
"Aprofunde com documentação oficial, casos de produção, Medium e fluxos de praticantes. <a href=\"rules/\">Estudo de caso sobre regras e enforcement →</a> <a href=\"docs/references/README.md\">Referências primárias →</a> <a href=\"docs/references/additional-reading.md\">Trilha com 12 leituras →</a>"
|
||||||
|
]
|
||||||
@@ -40,11 +40,11 @@ jobs:
|
|||||||
# back in once it can actually diff. See task 03's report.
|
# back in once it can actually diff. See task 03's report.
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
# Until the migration finishes, `dist/` holds only /summary/ and the two
|
# `dist/` now holds all ten routes, so the stub hazard that forced this to
|
||||||
# hands-on fixtures, while the live `pages` branch serves ten pages.
|
# manual dispatch is gone. It stays manual anyway: the step below is a
|
||||||
# Publishing on every push to main would take the site down to a stub, so
|
# force-push over the live `pages` branch, and making it fire on every push
|
||||||
# this job runs only when a human asks for it. Make it unconditional on
|
# to main means every merge republishes with no human in the loop. Flipping
|
||||||
# main again at task 20 (cutover), not before.
|
# it to `push` on main is a deliberate decision, not a leftover TODO.
|
||||||
if: github.event_name == 'workflow_dispatch' && inputs.publish
|
if: github.event_name == 'workflow_dispatch' && inputs.publish
|
||||||
needs: gate
|
needs: gate
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
+5
-17
@@ -9,21 +9,9 @@ vote-service
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
public/submitted-skills
|
public/submitted-skills
|
||||||
|
|
||||||
# Legacy site sources, slated for deletion at cutover (task 20). These are
|
# Unmigrated legacy sources, kept verbatim under `legacy/`. These are
|
||||||
# hand-written files with very long lines; prettier re-wraps them into hundreds
|
# hand-written files with very long lines; prettier re-wraps them into hundreds
|
||||||
# of changed lines the moment any agent stages one. Task 15 touched app.js to
|
# of changed lines the moment any agent stages one. Task 15 touched the old
|
||||||
# add four lines and produced an 829-line diff. verify.mjs asserts substrings
|
# app.js to add four lines and produced an 829-line diff. A reformat here is
|
||||||
# against several of these, so a reformat is churn at best and a broken
|
# churn at best.
|
||||||
# assertion at worst.
|
/legacy/
|
||||||
#
|
|
||||||
# Root-anchored on purpose: a bare `rules` would also swallow .agents/rules/,
|
|
||||||
# whose markdown we do want formatted.
|
|
||||||
/app.js
|
|
||||||
/styles.css
|
|
||||||
/landing.css
|
|
||||||
/chapters.css
|
|
||||||
/responsive.css
|
|
||||||
/skills-review/
|
|
||||||
/rules/
|
|
||||||
/skills/
|
|
||||||
/full-guide/
|
|
||||||
|
|||||||
+6
-13
@@ -7,23 +7,16 @@ public/submitted-skills
|
|||||||
skill-reviews
|
skill-reviews
|
||||||
vote-service
|
vote-service
|
||||||
|
|
||||||
# Legacy site sources, slated for deletion at cutover (task 20). Same list and
|
# Unmigrated legacy stylesheets, kept verbatim under `legacy/`. Same list and
|
||||||
# same reasoning as .prettierignore: these are minified, single-line
|
# same reasoning as .prettierignore: these are minified, single-line
|
||||||
# stylesheets. stylelint's `declaration-block-single-line-max-declarations`
|
# stylesheets. stylelint's `declaration-block-single-line-max-declarations`
|
||||||
# fires once per rule in them — ~180 errors for `styles.css` alone — so staging
|
# fires once per rule in them — ~180 errors for `guide.css` alone — so staging
|
||||||
# one to change a single declaration blocks the commit outright. The rule is
|
# one to change a single declaration blocks the commit outright. The rule is
|
||||||
# about hand-written source readability and says nothing useful about minified
|
# about hand-written source readability and says nothing useful about minified
|
||||||
# output that is about to be deleted.
|
# legacy output. Migrating one of these into `src/` means bringing it up to the
|
||||||
|
# design system in the same change, at which point it gets linted like any
|
||||||
|
# other source file.
|
||||||
#
|
#
|
||||||
# `public/fonts/fonts.css` is deliberately NOT here: it is new, hand-written,
|
# `public/fonts/fonts.css` is deliberately NOT here: it is new, hand-written,
|
||||||
# and must stay linted.
|
# and must stay linted.
|
||||||
#
|
/legacy/
|
||||||
# Root-anchored on purpose: a bare `rules` would also swallow .agents/rules/.
|
|
||||||
/styles.css
|
|
||||||
/landing.css
|
|
||||||
/chapters.css
|
|
||||||
/responsive.css
|
|
||||||
/skills-review/
|
|
||||||
/rules/
|
|
||||||
/skills/
|
|
||||||
/full-guide/
|
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ rules, and verification.** It is published as a static site on a self-hosted
|
|||||||
Gitea Pages Server, and it doubles as its own teaching artifact: the hands-on
|
Gitea Pages Server, and it doubles as its own teaching artifact: the hands-on
|
||||||
labs are dependency-free HTML/CSS/JS that workshop attendees point an agent at.
|
labs are dependency-free HTML/CSS/JS that workshop attendees point an agent at.
|
||||||
|
|
||||||
- **Current stack**: hand-written HTML + CSS + ES modules, no build step, no
|
- **Stack**: Astro, static output, no runtime dependencies. The migration
|
||||||
dependencies
|
recorded in [`plans/astro-refactor/`](plans/astro-refactor/README.md) is
|
||||||
- **Target stack**: Astro (see
|
complete; the hand-written pages it replaced are gone. What remains unmigrated
|
||||||
[`plans/astro-refactor/`](plans/astro-refactor/README.md)) — migration in
|
is the editorial CSS and the review-desk modules under `legacy/`, still
|
||||||
progress
|
imported by the pages that need them.
|
||||||
- **Languages**: English and Brazilian Portuguese, toggled client-side
|
- **Languages**: English and Brazilian Portuguese, toggled client-side
|
||||||
- **Companion service**: `vote-service/` (Go + Kubernetes) — separate lifecycle,
|
- **Companion service**: `vote-service/` (Go + Kubernetes) — separate lifecycle,
|
||||||
see its own README
|
see its own README
|
||||||
@@ -24,33 +24,34 @@ labs are dependency-free HTML/CSS/JS that workshop attendees point an agent at.
|
|||||||
## Essential commands
|
## Essential commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm run verify # content + interaction contracts (scripts/verify.mjs) — the gate
|
pnpm run dev # http://localhost:4321/ai-for-dummies/
|
||||||
|
pnpm run build # writes dist/ — every check below reads it
|
||||||
|
bash .agents/scripts/gate.sh # the full gate: check, build, verify, audit, tokens
|
||||||
|
pnpm run verify # content + interaction contracts (scripts/verify.mjs)
|
||||||
node scripts/audit-ui.mjs # responsive / no-external-dependency audit
|
node scripts/audit-ui.mjs # responsive / no-external-dependency audit
|
||||||
node scripts/build-skill-review.mjs # regenerate skill-reviews/improved/ from src/content/reviews/
|
node scripts/build-skill-review.mjs # regenerate skill-reviews/improved/ from src/content/reviews/
|
||||||
pnpm run serve # python3 -m http.server 4173
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`pnpm run verify` is not a formality. It is a set of ~42 string-token assertions
|
`pnpm run verify` is not a formality. It is a set of 84 string-token assertions
|
||||||
that pin the site's real content and interactions. **A refactor that "passes" by
|
that pin the site's real content and interactions, read from the built output.
|
||||||
deleting assertions has failed.** See
|
**A refactor that "passes" by deleting assertions has failed.** See
|
||||||
[`.agents/context/verification.md`](.agents/context/verification.md).
|
[`.agents/context/verification.md`](.agents/context/verification.md).
|
||||||
|
|
||||||
## Publishing
|
## Publishing
|
||||||
|
|
||||||
`main` is the source of truth. The `pages` branch is what the Gitea Pages Server
|
`main` is the source of truth. The `pages` branch is what the Gitea Pages Server
|
||||||
actually serves, and its tree must end up identical to `main`'s. The full
|
actually serves, and it now carries **build output**, not a copy of `main`'s
|
||||||
procedure — including why `merge --ff-only` does _not_ work here — is in
|
tree. The publish job force-pushes `dist/` over it. The full procedure is in
|
||||||
[`docs/operations-guide.md`](docs/operations-guide.md).
|
[`docs/operations-guide.md`](docs/operations-guide.md); read
|
||||||
|
[`.agents/context/publishing.md`](.agents/context/publishing.md) before changing
|
||||||
Adding a build step changes this contract. Read
|
it.
|
||||||
[`.agents/context/publishing.md`](.agents/context/publishing.md) before doing
|
|
||||||
so.
|
|
||||||
|
|
||||||
## Never touch
|
## Never touch
|
||||||
|
|
||||||
- `hands-on/starter/` and `hands-on/rules/` — **lab fixtures.** The exercise
|
- `public/hands-on/starter/` and `public/hands-on/rules/` — **lab fixtures.**
|
||||||
_is_ that they are dependency-free vanilla HTML/CSS/JS an attendee can hand to
|
The exercise _is_ that they are dependency-free vanilla HTML/CSS/JS an
|
||||||
an agent. Componentizing them destroys the lesson. They ship as static assets.
|
attendee can hand to an agent. Componentizing them destroys the lesson. They
|
||||||
|
ship as static assets.
|
||||||
- `submitted-skills/` — other people's submitted work, reproduced verbatim
|
- `submitted-skills/` — other people's submitted work, reproduced verbatim
|
||||||
- `skill-reviews/improved/` — generated; edit `src/content/reviews/*.md` instead
|
- `skill-reviews/improved/` — generated; edit `src/content/reviews/*.md` instead
|
||||||
- `vote-service/` — separate deploy lifecycle; do not fold into the site build
|
- `vote-service/` — separate deploy lifecycle; do not fold into the site build
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
# Gates: review desk privacy and improved-draft audit
|
# Gates: review desk privacy and improved-draft audit
|
||||||
|
|
||||||
OWNS: skills-review/**, submitted-skills/Anonymous Operational Submission/**,
|
OWNS: src/pages/skills-review.astro, src/components/blocks/{ReviewDetail,
|
||||||
|
ChangeLens,VoteWidget,PreviewPane,FileTabs}.astro, legacy/skills-review/**,
|
||||||
|
submitted-skills/Anonymous Operational Submission/**,
|
||||||
skill-reviews/improved/ndo-repro/**, scripts/verify.mjs
|
skill-reviews/improved/ndo-repro/**, scripts/verify.mjs
|
||||||
|
|
||||||
|
The gate commands below now read `dist/`; run `pnpm run build` before them.
|
||||||
|
|
||||||
Scope: Redact the operational submission's identity and URLs from the published
|
Scope: Redact the operational submission's identity and URLs from the published
|
||||||
review desk, keep package files usable in either preview mode, and explain each
|
review desk, keep package files usable in either preview mode, and explain each
|
||||||
improved draft as a concrete diff.
|
improved draft as a concrete diff.
|
||||||
|
|||||||
@@ -15,39 +15,50 @@ skill links to a pinned source with an approval-first installation prompt.
|
|||||||
|
|
||||||
## Run locally
|
## Run locally
|
||||||
|
|
||||||
This is a dependency-free static site:
|
This is an Astro static site. It builds to `dist/` and ships no runtime
|
||||||
|
dependencies.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m http.server 4173
|
pnpm install
|
||||||
|
pnpm run dev # http://localhost:4321/ai-for-dummies/
|
||||||
|
pnpm run build # writes dist/
|
||||||
|
pnpm run preview # serves the built output
|
||||||
```
|
```
|
||||||
|
|
||||||
Then open <http://localhost:4173>.
|
|
||||||
|
|
||||||
Verify the content and interaction contracts with:
|
Verify the content and interaction contracts with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm run verify
|
pnpm run verify # reads dist/, so build first
|
||||||
|
```
|
||||||
|
|
||||||
|
The full gate — `astro check`, `astro build`, `verify.mjs`, `audit-ui.mjs`,
|
||||||
|
`check-tokens.mjs`, and the assertion-count floor — runs as:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash .agents/scripts/gate.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Project structure
|
## Project structure
|
||||||
|
|
||||||
- `index.html` — default route map and focused chapter navigation
|
- `src/pages/` — one file per route: the landing route map, the complete
|
||||||
- `full-guide/` — the complete bilingual presentation, with responsive audit
|
bilingual `full-guide`, the chapter pages, `rules`, `skills`, and
|
||||||
overrides
|
`skills-review`
|
||||||
- `styles.css` / `app.js` — editorial visual system and bilingual field-guide
|
- `src/components/` — blocks and islands; the interactive diagrams, selectors,
|
||||||
interactions
|
and the language toggle
|
||||||
- `responsive.css` — interactive diagrams and Full HD-to-4K adaptations
|
- `src/content/` — the content collections every page renders from
|
||||||
|
- `src/styles/tokens.css` — the design tokens
|
||||||
|
- `legacy/` — the editorial visual system and the review-desk modules, not yet
|
||||||
|
migrated into components. Still imported by the pages that need them; see
|
||||||
|
`.agents/context/architecture.md`
|
||||||
|
- `public/` — assets copied to the site root verbatim: fonts, the hands-on labs,
|
||||||
|
and `submitted-skills/`
|
||||||
- `docs/references/` — bundled research sources and notes
|
- `docs/references/` — bundled research sources and notes
|
||||||
- `docs/operations-guide.md` — canonical SilverBullet operations and skills
|
- `docs/operations-guide.md` — canonical SilverBullet operations and skills
|
||||||
guide
|
guide
|
||||||
- `hands-on/starter/` — dependency-free Tiny Tasks exercise
|
- `public/hands-on/starter/` — dependency-free Tiny Tasks exercise
|
||||||
- `hands-on/rules/` — dependency-free Guardrails lab; toggles rule sources into
|
- `public/hands-on/rules/` — dependency-free Guardrails lab; toggles rule
|
||||||
the prompt
|
sources into the prompt
|
||||||
- `rules/` — bilingual case study of skills, CLI ratchets, Husky, and PR review
|
- `skills/` — reusable design and rules-case-study skills
|
||||||
- `skills/` — reusable design and rules-case-study skills, plus an interactive
|
|
||||||
package anatomy explorer
|
|
||||||
- `skills-review/` — static review desk for submitted skills; its reader vote
|
|
||||||
widget calls the separate `vote-service`
|
|
||||||
- `vote-service/` — small Go API + Kubernetes manifests backing the
|
- `vote-service/` — small Go API + Kubernetes manifests backing the
|
||||||
skills-review vote widget (see `vote-service/README.md`)
|
skills-review vote widget (see `vote-service/README.md`)
|
||||||
- `GATES.md` — acceptance ledger for the project
|
- `GATES.md` — acceptance ledger for the project
|
||||||
@@ -55,7 +66,9 @@ pnpm run verify
|
|||||||
## Publishing
|
## Publishing
|
||||||
|
|
||||||
The Gitea instance has a Pages Server configured to publish a repository’s
|
The Gitea instance has a Pages Server configured to publish a repository’s
|
||||||
`pages` branch under `pages.marcospaulo.dev.br`. The intended site address is:
|
`pages` branch under `pages.marcospaulo.dev.br`. `pages` now carries the
|
||||||
|
**built** site — the contents of `dist/` — not a copy of `main`. The intended
|
||||||
|
site address is:
|
||||||
|
|
||||||
<https://netcracker.pages.marcospaulo.dev.br/ai-for-dummies/>
|
<https://netcracker.pages.marcospaulo.dev.br/ai-for-dummies/>
|
||||||
|
|
||||||
@@ -74,7 +87,7 @@ calls a separate stateful service — `vote-service/`, a small Go API on its own
|
|||||||
pod, one vote per visitor enforced server-side by IP (a MAC address is never
|
pod, one vote per visitor enforced server-side by IP (a MAC address is never
|
||||||
visible to a server across the internet, so it cannot be used). See
|
visible to a server across the internet, so it cannot be used). See
|
||||||
[vote-service/README.md](vote-service/README.md) for the API, the anti-abuse
|
[vote-service/README.md](vote-service/README.md) for the API, the anti-abuse
|
||||||
design, and the build/push/deploy steps; `skills-review/index.html` sets
|
design, and the build/push/deploy steps; `src/pages/skills-review.astro` sets
|
||||||
`window.SKILLS_REVIEW_VOTE_API` to point at it once deployed.
|
`window.SKILLS_REVIEW_VOTE_API` to point at it once deployed.
|
||||||
|
|
||||||
## Research
|
## Research
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>AI For Dummies — Agents and trees</title><link rel="stylesheet" href="../chapters.css"></head><body><main><header class="top"><a href="../summary/">← ROUTE MAP</a><span>02 / AGENTS & TREES</span><a href="../full-guide/">field guide ↗</a></header><section class="hero"><p class="eyebrow">Subagent workflow</p><h1>One branch<br>per <em>hand.</em></h1><p>Agents work when roles, files, and evidence are bounded. A worktree gives each worker its own checkout while the orchestrator protects intent.</p></section><section class="pipeline"><div><p class="eyebrow">The tree</p><h2>Split at<br>the <em>seam.</em></h2></div><div class="panel"><strong>MAIN / ORCHESTRATOR</strong><code>├── agent/ui → components + visual states · ├── agent/tests → acceptance + regressions · └── agent/docs → guide + examples · merge after each leaf returns a diff and evidence</code></div></section><section class="grid"><article class="card"><b>FRAME</b><h2>Orchestrator</h2><p>Owns scope, task graph, boundaries, and integration.</p></article><article class="card"><b>HAND OFF</b><h2>Worker</h2><p>Owns one coherent slice and one worktree.</p></article><article class="card"><b>PROVE</b><h2>Verifier</h2><p>Re-runs gates and reports remaining gaps.</p></article></section><section class="practice"><div><p class="eyebrow">Handoff</p><h2>Context that<br>can <em>travel.</em></h2></div><div class="steps"><article><b>01</b><div><strong>Brief</strong><span>Goal, owned files, dependencies, non-goals, acceptance.</span></div></article><article><b>02</b><div><strong>Isolation</strong><span>One branch and worktree per independent change.</span></div></article><article><b>03</b><div><strong>Evidence</strong><span>Commands, result, changed files, screenshots, gaps.</span></div></article></div></section><nav class="links"><a href="../models/">Previous: models →</a><a href="../rules/">Rules case study →</a><a href="../hands-on/rules/">Try the rules lab →</a></nav></main></body></html>
|
|
||||||
@@ -1,411 +0,0 @@
|
|||||||
const phases = {
|
|
||||||
plan: { model: { en: 'OPUS / REASONING', pt: 'OPUS / RACIOCÍNIO' }, title: { en: 'Turn ambiguity into work', pt: 'Transforme ambiguidade em trabalho' }, copy: { en: 'Inspect the repository, choose the architecture, split the request, and write acceptance criteria.', pt: 'Inspecione o repositório, escolha a arquitetura, divida o pedido e escreva critérios de aceitação.' }, code: { en: 'plan → decompose → define acceptance', pt: 'planejar → decompor → definir aceitação' } },
|
|
||||||
build: { model: { en: 'SONNET, HAIKU, OR EQUIVALENT', pt: 'SONNET, HAIKU OU EQUIVALENTE' }, title: { en: 'Execute one bounded slice', pt: 'Execute uma fatia delimitada' }, copy: { en: 'Give each worker enough context, one responsibility, and its own worktree. Less context; less collision.', pt: 'Dê a cada worker contexto suficiente, uma responsabilidade e seu próprio worktree. Menos contexto; menos colisões.' }, code: { en: 'brief + worktree → implement → test', pt: 'brief + worktree → implementar → testar' } },
|
|
||||||
review: { model: { en: 'STRONG MODEL OR HUMAN', pt: 'MODELO FORTE OU HUMANO' }, title: { en: 'Reconnect result to intent', pt: 'Reconecte o resultado à intenção' }, copy: { en: 'Check the diff against the original brief, run the checks, then merge, request changes, or discard.', pt: 'Compare o diff com o brief original, execute as verificações e então faça merge, peça mudanças ou descarte.' }, code: { en: 'diff + checks → review → merge / iterate', pt: 'diff + verificações → revisar → merge / iterar' } }
|
|
||||||
};
|
|
||||||
|
|
||||||
const handsOnPrompts = {
|
|
||||||
en: {
|
|
||||||
basic: [
|
|
||||||
'Work only in hands-on/starter. It is dependency-free HTML, CSS, and JavaScript.',
|
|
||||||
'',
|
|
||||||
'Add an All / Open / Done filter to Tiny Tasks.',
|
|
||||||
'',
|
|
||||||
'Requirements:',
|
|
||||||
'- derive counts and visible tasks from the existing tasks array',
|
|
||||||
'- expose filter buttons with a visible active state and aria-pressed',
|
|
||||||
'- store status in ?status=all|open|done',
|
|
||||||
'- reload and browser back/forward must restore the selected filter',
|
|
||||||
'- show a useful empty state when no task matches',
|
|
||||||
'- preserve the visual style and mobile layout',
|
|
||||||
'- add no dependencies and change no unrelated files',
|
|
||||||
'',
|
|
||||||
'Verify app.js syntax and exercise every filter plus URL navigation.',
|
|
||||||
'Return changed files, checks run, results, and remaining risk.'
|
|
||||||
].join('\n'),
|
|
||||||
skills: [
|
|
||||||
'Use $ponytail-lite and $webapp-testing.',
|
|
||||||
'Work only in hands-on/starter. It is dependency-free HTML, CSS, and JavaScript.',
|
|
||||||
'',
|
|
||||||
'Add an All / Open / Done filter to Tiny Tasks.',
|
|
||||||
'',
|
|
||||||
'Apply $ponytail-lite: inspect first, reuse the current render flow, prefer native URL and button APIs, and avoid dependencies or abstractions.',
|
|
||||||
'Apply $webapp-testing: verify all filters, aria-pressed, reload, browser back/forward, empty state, and one mobile viewport.',
|
|
||||||
'',
|
|
||||||
'Acceptance:',
|
|
||||||
'- counts and visible tasks come from the existing tasks array',
|
|
||||||
'- ?status=all|open|done is the source of truth',
|
|
||||||
'- invalid status falls back safely to all',
|
|
||||||
'- style remains consistent; unrelated files remain untouched',
|
|
||||||
'',
|
|
||||||
'Return the smallest working diff and concrete verification evidence.'
|
|
||||||
].join('\n')
|
|
||||||
},
|
|
||||||
pt: {
|
|
||||||
basic: [
|
|
||||||
'Trabalhe apenas em hands-on/starter. É HTML, CSS e JavaScript sem dependências.',
|
|
||||||
'',
|
|
||||||
'Adicione um filtro Todos / Abertos / Concluídos ao Tiny Tasks.',
|
|
||||||
'',
|
|
||||||
'Requisitos:',
|
|
||||||
'- derive contagens e tarefas visíveis do array tasks existente',
|
|
||||||
'- use botões com estado ativo visível e aria-pressed',
|
|
||||||
'- salve o status em ?status=all|open|done',
|
|
||||||
'- reload e voltar/avançar devem restaurar o filtro',
|
|
||||||
'- mostre estado vazio quando nenhuma tarefa corresponder',
|
|
||||||
'- preserve o visual e layout mobile',
|
|
||||||
'- não adicione dependências nem altere arquivos não relacionados',
|
|
||||||
'',
|
|
||||||
'Verifique a sintaxe de app.js e teste filtros e navegação por URL.',
|
|
||||||
'Retorne arquivos alterados, checks, resultados e risco restante.'
|
|
||||||
].join('\n'),
|
|
||||||
skills: [
|
|
||||||
'Use $ponytail-lite e $webapp-testing.',
|
|
||||||
'Trabalhe apenas em hands-on/starter. É HTML, CSS e JavaScript sem dependências.',
|
|
||||||
'',
|
|
||||||
'Adicione um filtro Todos / Abertos / Concluídos ao Tiny Tasks.',
|
|
||||||
'',
|
|
||||||
'Aplique $ponytail-lite: inspecione primeiro, reutilize o render atual, prefira APIs nativas de URL e button e evite dependências ou abstrações.',
|
|
||||||
'Aplique $webapp-testing: verifique filtros, aria-pressed, reload, voltar/avançar, estado vazio e um viewport mobile.',
|
|
||||||
'',
|
|
||||||
'Aceitação:',
|
|
||||||
'- contagens e tarefas visíveis vêm do array tasks existente',
|
|
||||||
'- ?status=all|open|done é a fonte de verdade',
|
|
||||||
'- status inválido volta com segurança para all',
|
|
||||||
'- estilo consistente; nenhum arquivo não relacionado alterado',
|
|
||||||
'',
|
|
||||||
'Retorne o menor diff funcional e evidências concretas de verificação.'
|
|
||||||
].join('\n')
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const modelGuide = {
|
|
||||||
providers: {
|
|
||||||
openai: {
|
|
||||||
label: 'OpenAI', source: 'https://developers.openai.com/api/docs/guides/latest-model',
|
|
||||||
title: { en: 'Sol · Terra · Luna', pt: 'Sol · Terra · Luna' },
|
|
||||||
copy: { en: 'GPT-5.6 separates capability tier from reasoning effort. Sol is flagship, Terra balances performance and cost, and Luna targets efficient high-volume work.', pt: 'O GPT-5.6 separa o nível de capacidade do esforço de raciocínio. Sol é flagship, Terra equilibra desempenho e custo, e Luna atende trabalho eficiente em alto volume.' },
|
|
||||||
tiers: [
|
|
||||||
['STRONG', 'Sol', { en: 'orchestration + hard judgment', pt: 'orquestração + julgamento difícil' }],
|
|
||||||
['BALANCED', 'Terra', { en: 'normal implementation', pt: 'implementação normal' }],
|
|
||||||
['FAST', 'Luna', { en: 'bounded, high-volume work', pt: 'trabalho delimitado e volumoso' }]
|
|
||||||
],
|
|
||||||
config: 'reasoning: { effort: "medium" }'
|
|
||||||
},
|
|
||||||
claude: {
|
|
||||||
label: 'Claude', source: 'https://docs.anthropic.com/en/docs/claude-code/model-config',
|
|
||||||
title: { en: 'Opus · Sonnet · Haiku', pt: 'Opus · Sonnet · Haiku' },
|
|
||||||
copy: { en: 'Claude Code exposes memorable aliases. Opus handles complex reasoning, Sonnet everyday coding, and Haiku simple fast work. The opusplan alias can plan with Opus and execute with Sonnet.', pt: 'Claude Code oferece aliases fáceis de lembrar. Opus cuida de raciocínio complexo, Sonnet do código cotidiano e Haiku de trabalho simples e rápido. O alias opusplan pode planejar com Opus e executar com Sonnet.' },
|
|
||||||
tiers: [
|
|
||||||
['STRONG', 'Opus', { en: 'planning + architecture', pt: 'planejamento + arquitetura' }],
|
|
||||||
['BALANCED', 'Sonnet', { en: 'everyday coding', pt: 'código cotidiano' }],
|
|
||||||
['FAST', 'Haiku', { en: 'simple, fast tasks', pt: 'tarefas simples e rápidas' }]
|
|
||||||
],
|
|
||||||
config: '/model opus · /model sonnet · /model haiku'
|
|
||||||
},
|
|
||||||
gemini: {
|
|
||||||
label: 'Gemini', source: 'https://ai.google.dev/gemini-api/docs/thinking',
|
|
||||||
title: { en: 'Pro · Flash · Flash-Lite', pt: 'Pro · Flash · Flash-Lite' },
|
|
||||||
copy: { en: 'Gemini uses model families rather than interchangeable aliases. Pro targets complex reasoning, Flash balances capability and throughput, and Flash-Lite prioritizes latency and cost.', pt: 'Gemini usa famílias de modelos, não aliases intercambiáveis. Pro mira raciocínio complexo, Flash equilibra capacidade e throughput, e Flash-Lite prioriza latência e custo.' },
|
|
||||||
tiers: [
|
|
||||||
['STRONG', 'Pro', { en: 'complex reasoning', pt: 'raciocínio complexo' }],
|
|
||||||
['BALANCED', 'Flash', { en: 'capability + throughput', pt: 'capacidade + throughput' }],
|
|
||||||
['FAST', 'Flash-Lite', { en: 'latency + cost', pt: 'latência + custo' }]
|
|
||||||
],
|
|
||||||
config: 'thinkingConfig: { thinkingLevel: "MEDIUM" }'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
efforts: {
|
|
||||||
low: { en: ['LOW', 'Use for formatting, lookup, narrow edits, and well-specified worker tasks. Optimize for fast feedback.', 'bounded task → low'], pt: ['BAIXO', 'Use para formatação, consulta, edições estreitas e tarefas de worker bem especificadas. Otimize para feedback rápido.', 'tarefa delimitada → baixo'] },
|
|
||||||
medium: { en: ['MEDIUM', 'Balanced starting point for normal implementation, tests, and review. Measure before moving up.', 'normal build → medium'], pt: ['MÉDIO', 'Ponto inicial equilibrado para implementação normal, testes e revisão. Meça antes de subir.', 'build normal → médio'] },
|
|
||||||
high: { en: ['HIGH', 'Use for architecture, orchestration, hard debugging, and consequential review where added latency is justified.', 'ambiguity + risk → high'], pt: ['ALTO', 'Use para arquitetura, orquestração, diagnóstico difícil e revisão importante quando a latência extra se justifica.', 'ambiguidade + risco → alto'] }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const skillSources = {
|
|
||||||
ponytail: 'https://github.com/ilindaniel/ponytail-lite/blob/e7b42dc2d384a702240dea4d52a7bf5530b821b6/AGENTS.md',
|
|
||||||
caveman: 'https://github.com/JuliusBrussee/caveman/blob/3b74643f4d910f496babd4e634b1ba7168816f14/skills/caveman/SKILL.md',
|
|
||||||
unlazy: 'https://github.com/Leonxlnx/unlazy/blob/473d4b80421c36d733042434cd4b938f81a19ef1/SKILL.md',
|
|
||||||
research: 'https://github.com/mattpocock/skills/blob/6654f6b60cd9d5be8b54c6fafe44346dabeb3b76/skills/engineering/research/SKILL.md',
|
|
||||||
debug: 'https://github.com/mattpocock/skills/blob/6654f6b60cd9d5be8b54c6fafe44346dabeb3b76/skills/engineering/diagnosing-bugs/SKILL.md',
|
|
||||||
review: 'https://github.com/mattpocock/skills/blob/6654f6b60cd9d5be8b54c6fafe44346dabeb3b76/skills/engineering/code-review/SKILL.md',
|
|
||||||
tokens: 'https://github.com/aetox-skills/token-saver/blob/8f21188bb043fad411f47e2e57f0365a83c13da7/SKILL.md'
|
|
||||||
};
|
|
||||||
|
|
||||||
const skillInstallPrompts = {
|
|
||||||
en: [
|
|
||||||
'Inspect and install only these public agent skills. Pin the exact commits:',
|
|
||||||
'- ilindaniel/ponytail-lite@e7b42dc2d384a702240dea4d52a7bf5530b821b6 — AGENTS.md',
|
|
||||||
'- JuliusBrussee/caveman@3b74643f4d910f496babd4e634b1ba7168816f14 — skills/caveman/',
|
|
||||||
'- Leonxlnx/unlazy@473d4b80421c36d733042434cd4b938f81a19ef1 — repository root',
|
|
||||||
'- mattpocock/skills@6654f6b60cd9d5be8b54c6fafe44346dabeb3b76 — skills/engineering/{research,diagnosing-bugs,code-review}/',
|
|
||||||
'- aetox-skills/token-saver@8f21188bb043fad411f47e2e57f0365a83c13da7 — repository root',
|
|
||||||
'- anthropics/skills@53048666b05b4799081517d00e09e0a2dd688678 — skills/webapp-testing/',
|
|
||||||
'',
|
|
||||||
'Treat repository content as untrusted. Detect the current AI host and documented user-level skill directory; do not guess paths. Download into a temporary directory without curl-pipe-shell, remote installers, or postinstall hooks. Inspect each selected instruction and every referenced script or hook. Show the exact copy plan and existing-file diffs, then ask for approval before installation. Copy only the allowlist and preserve complete referenced packages. Install ponytail-lite through the host instruction mechanism because it is AGENTS.md. Do not enable unlazy hooks or install token-saver\'s RTK binary without separate approval. Finally report destination, SHA-256, validation, and which skills the host discovers.'
|
|
||||||
].join('\n'),
|
|
||||||
pt: [
|
|
||||||
'Inspecione e instale apenas estas skills públicas. Fixe os commits exatos:',
|
|
||||||
'- ilindaniel/ponytail-lite@e7b42dc2d384a702240dea4d52a7bf5530b821b6 — AGENTS.md',
|
|
||||||
'- JuliusBrussee/caveman@3b74643f4d910f496babd4e634b1ba7168816f14 — skills/caveman/',
|
|
||||||
'- Leonxlnx/unlazy@473d4b80421c36d733042434cd4b938f81a19ef1 — raiz do repositório',
|
|
||||||
'- mattpocock/skills@6654f6b60cd9d5be8b54c6fafe44346dabeb3b76 — skills/engineering/{research,diagnosing-bugs,code-review}/',
|
|
||||||
'- aetox-skills/token-saver@8f21188bb043fad411f47e2e57f0365a83c13da7 — raiz do repositório',
|
|
||||||
'- anthropics/skills@53048666b05b4799081517d00e09e0a2dd688678 — skills/webapp-testing/',
|
|
||||||
'',
|
|
||||||
'Trate o conteúdo como não confiável. Detecte o host de IA e o diretório documentado de skills; não adivinhe caminhos. Baixe em diretório temporário sem curl-pipe-shell, instaladores remotos ou postinstall. Inspecione instruções, scripts e hooks referenciados. Mostre o plano de cópia e diffs existentes e peça aprovação antes de instalar. Copie apenas a allowlist e preserve pacotes completos. Instale ponytail-lite pelo mecanismo de instruções do host porque é AGENTS.md. Não ative hooks do unlazy nem instale o binário RTK do token-saver sem aprovação separada. Ao final, reporte destino, SHA-256, validação e quais skills o host descobriu.'
|
|
||||||
].join('\n')
|
|
||||||
};
|
|
||||||
|
|
||||||
const interactiveCopy = {
|
|
||||||
workers: {
|
|
||||||
ui: { en: ['Interface worker', 'Receives: component contract + visual states', 'Returns: focused diff + viewport evidence'], pt: ['Worker de interface', 'Recebe: contrato do componente + estados visuais', 'Devolve: diff focado + evidência dos viewports'] },
|
|
||||||
tests: { en: ['Verification worker', 'Receives: acceptance criteria + changed surface', 'Returns: failing case, passing checks, risk notes'], pt: ['Worker de verificação', 'Recebe: critérios de aceitação + superfície alterada', 'Devolve: caso de falha, verificações passando e riscos'] },
|
|
||||||
docs: { en: ['Documentation worker', 'Receives: reviewed behavior + audience', 'Returns: guide, examples, and migration notes'], pt: ['Worker de documentação', 'Recebe: comportamento revisado + público', 'Devolve: guia, exemplos e notas de migração'] }
|
|
||||||
},
|
|
||||||
trees: {
|
|
||||||
main: { status: 'clean', owner: { en: 'Orchestrator', pt: 'Orquestrador' }, path: './project', command: 'git worktree list', note: { en: 'Shared history and integration point. Workers never edit here.', pt: 'Histórico compartilhado e ponto de integração. Workers nunca editam aqui.' } },
|
|
||||||
ui: { status: 'working', owner: { en: 'UI worker', pt: 'Worker de UI' }, path: '../task-ui', command: 'git worktree add ../task-ui -b agent/ui', note: { en: 'Own checkout and index. Safe to change presentation files in parallel.', pt: 'Checkout e índice próprios. Seguro para alterar a apresentação em paralelo.' } },
|
|
||||||
tests: { status: 'ready', owner: { en: 'Test worker', pt: 'Worker de testes' }, path: '../task-tests', command: 'git diff main...agent/tests', note: { en: 'Checks are green. Review the diff before merging into main.', pt: 'Verificações passaram. Revise o diff antes do merge em main.' } },
|
|
||||||
docs: { status: 'review', owner: { en: 'Docs worker', pt: 'Worker de docs' }, path: '../task-docs', command: 'git merge --no-ff agent/docs', note: { en: 'Review requested. Merge, request changes, or discard without touching another checkout.', pt: 'Revisão solicitada. Faça merge, peça mudanças ou descarte sem tocar em outro checkout.' } }
|
|
||||||
},
|
|
||||||
routes: {
|
|
||||||
plan: { score: 92, label: { en: 'High ambiguity', pt: 'Alta ambiguidade' }, why: { en: 'Architecture and decomposition have a wide error surface. Spend reasoning here.', pt: 'Arquitetura e decomposição têm grande superfície de erro. Invista raciocínio aqui.' } },
|
|
||||||
build: { score: 38, label: { en: 'Bounded execution', pt: 'Execução delimitada' }, why: { en: 'The brief already removed ambiguity. Optimize for speed and tight feedback.', pt: 'O brief já removeu a ambiguidade. Otimize para velocidade e feedback curto.' } },
|
|
||||||
explore: { score: 22, label: { en: 'Read-only discovery', pt: 'Descoberta somente leitura' }, why: { en: 'Search, map, and report. A lightweight model can return facts without editing.', pt: 'Busque, mapeie e reporte. Um modelo leve devolve fatos sem editar.' } },
|
|
||||||
review: { score: 74, label: { en: 'Independent judgment', pt: 'Julgamento independente' }, why: { en: 'Reconnect the diff to intent with fresh context and adversarial attention.', pt: 'Reconecte o diff à intenção com contexto novo e atenção crítica.' } }
|
|
||||||
},
|
|
||||||
skillFiles: {
|
|
||||||
skill: { icon: '◇', title: 'SKILL.md', en: 'Trigger, procedure, constraints, and the exact evidence the agent must return.', pt: 'Gatilho, procedimento, restrições e a evidência exata que o agente deve devolver.' },
|
|
||||||
references: { icon: '≡', title: 'references/', en: 'Stable facts loaded only when the procedure needs them. Keep the main instruction lean.', pt: 'Fatos estáveis carregados apenas quando o procedimento precisa. Mantenha a instrução principal enxuta.' },
|
|
||||||
scripts: { icon: '›_', title: 'scripts/', en: 'Deterministic checks and repeated operations. Prefer executable proof over prose.', pt: 'Verificações determinísticas e operações repetidas. Prefira prova executável a prosa.' },
|
|
||||||
assets: { icon: '▧', title: 'assets/', en: 'Templates and examples the agent can copy without reinventing the expected shape.', pt: 'Templates e exemplos que o agente pode copiar sem reinventar o formato esperado.' }
|
|
||||||
},
|
|
||||||
skillWorkflow: {
|
|
||||||
observe: { number: '01', title: { en: 'Start from repeated friction', pt: 'Comece pelo atrito repetido' }, question: { en: 'Which non-obvious decision keeps being rediscovered?', pt: 'Qual decisão não óbvia continua sendo redescoberta?' }, action: { en: 'Collect two or three realistic requests. Separate durable judgment from one project’s temporary details.', pt: 'Colete dois ou três pedidos realistas. Separe julgamento durável dos detalhes temporários de um projeto.' }, output: { en: 'A narrow capability and concrete examples.', pt: 'Uma capacidade estreita e exemplos concretos.' }, proof: { en: 'Without the skill, agents repeatedly make the same avoidable mistake.', pt: 'Sem a skill, agentes repetem o mesmo erro evitável.' } },
|
|
||||||
trigger: { number: '02', title: { en: 'Make discovery precise', pt: 'Torne a descoberta precisa' }, question: { en: 'When should this load—and when should it stay out?', pt: 'Quando isto deve carregar — e quando deve ficar de fora?' }, action: { en: 'Choose a short action-oriented name. Write a discriminating description that names the task and meaningful boundary.', pt: 'Escolha um nome curto orientado à ação. Escreva uma descrição discriminante que nomeie a tarefa e seu limite.' }, output: { en: 'YAML name + description in SKILL.md.', pt: 'Nome + descrição YAML em SKILL.md.' }, proof: { en: 'Relevant prompts select it; nearby unrelated prompts do not.', pt: 'Prompts relevantes selecionam; prompts próximos mas não relacionados, não.' } },
|
|
||||||
scaffold: { number: '03', title: { en: 'Choose only useful anatomy', pt: 'Escolha apenas a anatomia útil' }, question: { en: 'What must be instructions, executable, consulted, or copied?', pt: 'O que deve ser instrução, executável, consultado ou copiado?' }, action: { en: 'Keep shared guidance in SKILL.md. Add scripts for repeated deterministic work, references for conditional facts, and assets for generated output.', pt: 'Mantenha orientação comum em SKILL.md. Adicione scripts para trabalho determinístico, referências para fatos condicionais e assets para saída.' }, output: { en: 'Smallest folder structure that supports the workflow.', pt: 'A menor estrutura de pastas que sustenta o fluxo.' }, proof: { en: 'Every file has a real caller; no placeholder directories.', pt: 'Cada arquivo tem um consumidor real; nenhuma pasta placeholder.' } },
|
|
||||||
write: { number: '04', title: { en: 'Write what changes decisions', pt: 'Escreva o que muda decisões' }, question: { en: 'What would a capable agent still get wrong?', pt: 'O que um agente capaz ainda erraria?' }, action: { en: 'State outcome, non-obvious constraints, routing, and stopping conditions. Remove generic advice, duplicate facts, and speculative rules.', pt: 'Declare resultado, restrições não óbvias, roteamento e condições de parada. Remova conselhos genéricos, fatos duplicados e regras especulativas.' }, output: { en: 'Lean SKILL.md with progressive links.', pt: 'SKILL.md enxuto com links progressivos.' }, proof: { en: 'Another agent can act correctly without loading irrelevant detail.', pt: 'Outro agente consegue agir corretamente sem carregar detalhes irrelevantes.' } },
|
|
||||||
validate: { number: '05', title: { en: 'Test behavior, then sharpen', pt: 'Teste comportamento, depois refine' }, question: { en: 'Did the skill improve a realistic outcome?', pt: 'A skill melhorou um resultado realista?' }, action: { en: 'Run structural validation, execute every new script, and forward-test realistic requests. Fix observed failures with the narrowest rule.', pt: 'Execute validação estrutural, rode cada script novo e teste pedidos realistas. Corrija falhas observadas com a regra mais estreita.' }, output: { en: 'Validated package plus evidence from real use.', pt: 'Pacote validado mais evidência de uso real.' }, proof: { en: 'quick_validate passes and behavior improves without unrelated side effects.', pt: 'quick_validate passa e o comportamento melhora sem efeitos colaterais.' } }
|
|
||||||
},
|
|
||||||
commonSkills: {
|
|
||||||
ponytail: { number: '01', kind: { en: 'SIMPLIFICATION INSTINCT', pt: 'INSTINTO DE SIMPLIFICAÇÃO' }, title: 'ponytail-lite', rule: { en: 'Stop at the first rung that holds.', pt: 'Pare no primeiro degrau que sustenta.' }, use: { en: 'Use when a request invites frameworks, dependencies, abstractions, or speculative scaffolding. It checks reuse, standard library, and native platform features before adding code.', pt: 'Use quando um pedido convida frameworks, dependências, abstrações ou scaffolding especulativo. Verifica reúso, biblioteca padrão e recursos nativos antes de adicionar código.' }, example: { en: 'Date picker? Start with <input type="date">.', pt: 'Seletor de data? Comece com <input type="date">.' }, caution: { en: 'Never simplify away security, accessibility, validation, or real edge cases.', pt: 'Nunca simplifique segurança, acessibilidade, validação ou casos extremos reais.' } },
|
|
||||||
caveman: { number: '02', kind: { en: 'COMMUNICATION STYLE', pt: 'ESTILO DE COMUNICAÇÃO' }, title: 'caveman', rule: { en: 'Signal first. Drop filler.', pt: 'Sinal primeiro. Corte o excesso.' }, use: { en: 'Use for routine status, handoffs, and technical summaries where speed matters. Short fragments make actions and evidence easy to scan.', pt: 'Use em status, handoffs e resumos técnicos rotineiros onde velocidade importa. Fragmentos curtos facilitam localizar ações e evidências.' }, example: { en: 'Built. Tests pass. Published.', pt: 'Feito. Testes passaram. Publicado.' }, caution: { en: 'Drop the style for security warnings, irreversible actions, and sequences where terse wording can be misread.', pt: 'Abandone o estilo em alertas de segurança, ações irreversíveis e sequências onde concisão pode causar erro.' } },
|
|
||||||
unlazy: { number: '03', kind: { en: 'COMPLETION DISCIPLINE', pt: 'DISCIPLINA DE CONCLUSÃO' }, title: 'unlazy', rule: { en: 'Define observable gates. Finish against evidence.', pt: 'Defina gates observáveis. Termine com evidências.' }, use: { en: 'Use for substantial autonomous builds, audits, and parallel work where quiet omissions are expensive. It turns “done” into runnable acceptance checks.', pt: 'Use em builds autônomos grandes, auditorias e trabalho paralelo onde omissões custam caro. Transforma “pronto” em verificações executáveis.' }, example: { en: 'Gate: language toggle persists. Check: browser reload. Expect: pt-BR.', pt: 'Gate: idioma persiste. Check: recarregar navegador. Esperado: pt-BR.' }, caution: { en: 'Too heavy for trivial edits or factual answers.', pt: 'Pesado demais para edições triviais ou respostas factuais.' } },
|
|
||||||
research: { number: '04', kind: { en: 'SOURCE DISCIPLINE', pt: 'DISCIPLINA DE FONTES' }, title: 'research', rule: { en: 'Trace claims to owners.', pt: 'Leve afirmações até suas fontes.' }, use: { en: 'Use when APIs, standards, architecture facts, or current behavior must be verified. Capture findings in a cited note, prioritizing primary sources.', pt: 'Use quando APIs, padrões, fatos de arquitetura ou comportamento atual precisam ser verificados. Registre achados citados, priorizando fontes primárias.' }, example: { en: 'Git behavior → git-scm.com docs, not a remembered blog summary.', pt: 'Comportamento do Git → documentação git-scm.com, não memória de um blog.' }, caution: { en: 'Practitioner articles add context; they do not override official behavior.', pt: 'Artigos de praticantes dão contexto; não substituem comportamento oficial.' } },
|
|
||||||
debug: { number: '05', kind: { en: 'DIAGNOSTIC LOOP', pt: 'CICLO DE DIAGNÓSTICO' }, title: 'diagnosing-bugs', rule: { en: 'No red-capable loop, no theory.', pt: 'Sem ciclo capaz de falhar, sem teoria.' }, use: { en: 'Use for hard bugs, flakes, and regressions. First build a fast deterministic reproduction, then minimize, rank hypotheses, instrument, and fix the root cause.', pt: 'Use para bugs difíceis, flakes e regressões. Primeiro crie reprodução rápida e determinística; depois minimize, ranqueie hipóteses, instrumente e corrija a causa raiz.' }, example: { en: 'One command reproduces the exact symptom before any fix.', pt: 'Um comando reproduz o sintoma exato antes de qualquer correção.' }, caution: { en: 'Do not jump from error message straight to a patch.', pt: 'Não pule da mensagem de erro direto para um patch.' } },
|
|
||||||
review: { number: '06', kind: { en: 'INDEPENDENT REVIEW', pt: 'REVISÃO INDEPENDENTE' }, title: 'code-review', rule: { en: 'Check standards and intent separately.', pt: 'Verifique padrões e intenção separadamente.' }, use: { en: 'Use on a branch or PR. One axis checks repository standards; another checks whether the change actually satisfies its originating specification.', pt: 'Use em branch ou PR. Um eixo verifica padrões do repositório; outro verifica se a mudança realmente satisfaz a especificação original.' }, example: { en: 'Clean code can still solve the wrong problem.', pt: 'Código limpo ainda pode resolver o problema errado.' }, caution: { en: 'Pin the comparison point and source specification before reviewing.', pt: 'Fixe o ponto de comparação e a especificação antes de revisar.' } },
|
|
||||||
tokens: { number: '07', kind: { en: 'CONTEXT ECONOMY', pt: 'ECONOMIA DE CONTEXTO' }, title: 'token-saver', rule: { en: 'Keep signal. Strip command noise.', pt: 'Mantenha sinal. Corte ruído de comandos.' }, use: { en: 'Use around verbose tests, builds, Git output, and logs. Filtering preserves context for reasoning while retaining full failure output for recovery.', pt: 'Use em testes, builds, saídas Git e logs verbosos. Filtragem preserva contexto para raciocínio e mantém falhas completas para recuperação.' }, example: { en: '200 passing-test lines → one result; failures keep their trace.', pt: '200 linhas de testes passando → um resultado; falhas mantêm o trace.' }, caution: { en: 'Read raw output when exact wording or full diffs matter.', pt: 'Leia saída bruta quando texto exato ou diffs completos importarem.' } }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const translations = {
|
|
||||||
pt: {
|
|
||||||
'.chapter-links a:nth-child(1)': '01 frota', '.chapter-links a:nth-child(2)': '02 worktrees', '.chapter-links a:nth-child(3)': '03 modelos', '.chapter-links a:nth-child(4)': '04 skills', '.chapter-links a:nth-child(5)': '05 criar', '.chapter-links a:nth-child(6)': '06 kit de campo', '.chapter-links a:nth-child(7)': '07 prática', '.edition': 'ENGENHARIA DE IA <i></i> 01 / 2026',
|
|
||||||
'.hero .eyebrow': 'Uma apresentação para quem entrega software', '.lede': 'Você não precisa de um exército de modelos. Precisa de um sistema: uma mente para enquadrar o trabalho, várias mãos para executá-lo e uma fronteira clara entre cada tarefa.', '.hero-index span': 'NOTA DE CAMPO / 001', '.hero-index strong': 'Entregue o<br /><em>sistema.</em>', '.hero-index small': 'Skills · agentes · worktrees · evidências',
|
|
||||||
'.hero-stats div:nth-child(1) span': 'modelo forte<br />para ambiguidade', '.hero-stats div:nth-child(2) span': 'workers delimitados<br />em paralelo', '.hero-stats div:nth-child(3) span': 'iterações<br />com evidências', '.hero-stats p': 'Leia isto como um mapa de rota, não como uma receita de prompt.',
|
|
||||||
'.thesis span': 'REGRA ZERO', '.thesis strong': 'Modelo forte para ambiguidade.<br />Modelo leve para trabalho delimitado.', '.fleet .section-label span:nth-child(1)': 'Uma pequena frota', '.fleet .section-label span:nth-child(2)': 'coordenação antes do paralelismo', '.captain span': 'ORQUESTRADOR', '.captain h2': 'Decide o que<br />precisa acontecer.', '.worker-card[data-worker="ui"] strong': 'Componentes e estados visuais', '.worker-card[data-worker="tests"] strong': 'Casos de aceitação', '.worker-card[data-worker="docs"] strong': 'Guia e exemplos', '.caption': 'O orquestrador preserva a intenção, escreve pequenos contratos e reúne resultados verificáveis. Ele não precisa digitar cada linha.',
|
|
||||||
'.failure-map .section-label span:nth-child(1)': 'Por que a fronteira importa', '.failure-map .section-label span:nth-child(2)': 'uma tarefa vaga / três falhas previsíveis', '.failure-grid article:nth-child(1) strong': 'Sopa de contexto', '.failure-grid article:nth-child(1) p': 'Cada worker lê tudo. Ninguém sabe quais fatos são essenciais.', '.failure-grid article:nth-child(2) strong': 'Colisão de branches', '.failure-grid article:nth-child(2) p': 'Dois agentes usam o mesmo checkout. O caminho mais rápido vira resolução de conflitos.', '.failure-grid article:nth-child(3) strong': 'Desvio confiante', '.failure-grid article:nth-child(3) p': 'O diff parece ótimo, mas ninguém verifica se resolveu o problema original.',
|
|
||||||
'.workflow .eyebrow': 'O ciclo de subagentes', '#workflow-title': 'Clique em uma fase.<br /><em>Veja a passagem.</em>', '.workflow .copy > p:last-child': 'Delegar é mover uma tarefa delimitada para um contexto menor — não abrir mão da responsabilidade.', '.handoff .section-label span:nth-child(1)': 'O que atravessa contextos', '.handoff .section-label span:nth-child(2)': 'brief → diff → evidência', '.handoff thead th:nth-child(1)': 'Pacote', '.handoff thead th:nth-child(2)': 'Contém', '.handoff thead th:nth-child(3)': 'Por que importa',
|
|
||||||
'.worktrees .eyebrow': 'Git worktrees', '.worktrees h2': 'Uma branch<br />por <em>mão.</em>', '.worktree-intro > p:nth-of-type(2)': 'Um worktree é outro diretório ligado ao mesmo repositório. Cada agente recebe seu próprio checkout e índice; o histórico continua compartilhado.', '.worktree-intro .interaction-hint': 'Selecione um nó para inspecionar checkout, responsável e próxima ação.', '.tree-toolbar > span:first-child': 'topologia do repositório', '.tree-live': '<i></i> 4 checkouts', '.tree-node.root span': 'RAIZ', '.tree-node.ui span': 'AGENTE DE UI', '.tree-node.tests span': 'AGENTE DE TESTES', '.tree-node.docs span': 'AGENTE DE DOCS', '.tree-node.root small': '● limpo', '.tree-node.ui small': '3 arquivos · trabalhando', '.tree-node.tests small': '8 verificações · pronto', '.tree-node.docs small': '2 páginas · revisão', '.routing .eyebrow': 'Roteamento de modelos', '.routing h2': 'Não pague por<br />raciocínio onde precisa<br />de <em>ritmo.</em>', '.routing .interaction-hint': 'Escolha um trabalho para entender por que o perfil do modelo muda.', '.route-table .head span:nth-child(1)': 'Trabalho', '.route-table .head span:nth-child(2)': 'Perfil', '.route-table .head span:nth-child(3)': 'Formato do prompt', '.route-table [data-route="plan"] strong': 'Planejar', '.route-table [data-route="build"] strong': 'Construir', '.route-table [data-route="explore"] strong': 'Explorar', '.route-table [data-route="review"] strong': 'Revisar', '.skills .eyebrow': 'Skills', '.skills h2': 'Escreva do jeito certo<br /><em>uma vez.</em>', '.skills > div:first-child > p': 'Uma skill é um procedimento reutilizável. Ela pode carregar instruções, referências, scripts e assets. Não é memória mágica e não substitui critérios de aceitação.',
|
|
||||||
'.skill-principles span:nth-child(1)': '01 / defina o gatilho', '.skill-principles span:nth-child(2)': '02 / carregue detalhes sob demanda', '.skill-principles span:nth-child(3)': '03 / devolva evidências', '.skill-package > span': 'PACOTE DE SKILL', '.skill-catalog .section-label span:nth-child(1)': 'Skills comuns', '.skill-catalog .section-label span:nth-child(2)': 'escolha o comportamento antes do modelo', '.catalog-intro .eyebrow': 'O kit de campo', '.catalog-intro h2': 'Trabalhos diferentes.<br />Instintos <em>diferentes.</em>', '.catalog-intro > p': 'Uma skill muda como o agente aborda o trabalho. Algumas moldam a comunicação. Outras impõem pesquisa, diagnóstico, revisão ou disciplina de conclusão. Selecione uma para inspecionar sua regra operacional.', '[data-common-skill="ponytail"] span': 'SIMPLIFICAR', '[data-common-skill="ponytail"] small': 'código mínimo que funciona', '[data-common-skill="caveman"] span': 'COMUNICAR', '[data-common-skill="caveman"] small': 'sinal sem excesso', '[data-common-skill="unlazy"] span': 'CONCLUIR', '[data-common-skill="unlazy"] small': 'gates e evidências', '[data-common-skill="research"] span': 'INVESTIGAR', '[data-common-skill="research"] small': 'fontes primárias primeiro', '[data-common-skill="debug"] span': 'DIAGNOSTICAR', '[data-common-skill="debug"] small': 'ciclo curto de feedback', '[data-common-skill="review"] span': 'REVISAR', '[data-common-skill="review"] small': 'padrões × especificação', '[data-common-skill="tokens"] span': 'ECONOMIZAR', '[data-common-skill="tokens"] small': 'comprima saídas ruidosas', '.skill-loadout > span': 'UM LOADOUT PRÁTICO', '.skill-loadout > div': '<b>PLANEJAR</b> unlazy <i>→</i> <b>CONSTRUIR</b> ponytail-lite <i>→</i> <b>DIAGNOSTICAR</b> diagnosing-bugs <i>→</i> <b>REPORTAR</b> caveman', '.rule span': 'O PAPEL HUMANO', '.rule strong': 'O agente pode ser autônomo na execução. Intenção, limites e evidências continuam sendo seus.', '.callout span': 'COMECE AQUI', '.callout strong': 'Comece com um agente e uma skill. Adicione paralelismo apenas quando as tarefas forem realmente independentes.', '.sources .section-label span:nth-child(1)': 'Continue aprendendo', '.sources .section-label span:nth-child(2)': '12 novas leituras + documentação primária', '.sources p': 'Aprofunde com documentação oficial, casos de produção, Medium e fluxos de praticantes. <a href="rules/">Estudo de caso sobre regras e enforcement →</a> <a href="docs/references/README.md">Referências primárias →</a> <a href="docs/references/additional-reading.md">Trilha com 12 leituras →</a>'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Object.assign(translations.pt, {
|
|
||||||
'.model-gearbox .section-label span:nth-child(1)': 'Câmbio de modelos', '.model-gearbox .section-label span:nth-child(2)': 'nível de capacidade × esforço de raciocínio',
|
|
||||||
'.gearbox-intro .eyebrow': 'Dois controles separados', '.gearbox-intro h2': 'Escolha o motor.<br />Depois escolha a <em>marcha.</em>',
|
|
||||||
'.gearbox-intro > p': 'Um modelo mais forte muda o teto de capacidade. Mais esforço de raciocínio dá mais espaço para esse modelo trabalhar. Comece com a combinação mais leve que passa seus checks e mova um controle por vez.',
|
|
||||||
'.effort-rail > span': 'RACIOCÍNIO / PENSAMENTO', '[data-effort="low"] b': 'BAIXO', '[data-effort="low"] small': 'delimitado + rápido', '[data-effort="medium"] b': 'MÉDIO', '[data-effort="medium"] small': 'ponto inicial', '[data-effort="high"] b': 'ALTO', '[data-effort="high"] small': 'complexo + custoso',
|
|
||||||
'.gearbox-rule span': 'REGRA DE ROTEAMENTO', '.gearbox-rule strong': 'Use modelos fortes para ambiguidade e julgamento. Use modelos leves para execução delimitada. Aumente o esforço apenas quando a avaliação mostrar ganho.',
|
|
||||||
'.skill-builder .section-label span:nth-child(1)': 'Criar uma skill',
|
|
||||||
'.skill-builder .section-label span:nth-child(2)': 'atrito repetido → julgamento reutilizável',
|
|
||||||
'.builder-intro .eyebrow': 'A forja de skills',
|
|
||||||
'.builder-intro h2': 'Ensine a decisão.<br />Mantenha o contexto <em>leve.</em>',
|
|
||||||
'.builder-intro > p': 'Não empacote tudo o que você sabe. Capture as escolhas não óbvias que melhoram resultados repetidamente e prove que a skill muda o comportamento.',
|
|
||||||
'[data-skill-step="observe"] span': 'Observar', '[data-skill-step="observe"] small': 'encontre atrito repetido',
|
|
||||||
'[data-skill-step="trigger"] span': 'Definir gatilho', '[data-skill-step="trigger"] small': 'roteie com precisão',
|
|
||||||
'[data-skill-step="scaffold"] span': 'Escolher anatomia', '[data-skill-step="scaffold"] small': 'apenas arquivos necessários',
|
|
||||||
'[data-skill-step="write"] span': 'Escrever orientação', '[data-skill-step="write"] small': 'decisões, não trivialidades',
|
|
||||||
'[data-skill-step="validate"] span': 'Validar', '[data-skill-step="validate"] small': 'teste comportamento real',
|
|
||||||
'.artifact-head span': 'SAÍDA / PACOTE DE SKILL', '.artifact-command span': 'VALIDAR',
|
|
||||||
'.builder-loop > span': 'APÓS USO REAL',
|
|
||||||
'.builder-loop > div': '<b>observar falha</b><i>→</i><b>refinar uma regra</b><i>→</i><b>retestar comportamento</b><i>→</i><b>manter estreita</b>',
|
|
||||||
'.install-skills header span': 'PACOTE DE INSTALAÇÃO', '.install-skills header strong': 'Peça ao seu agente para verificar, instalar e validar as skills.',
|
|
||||||
'.install-skills footer': 'Revise cada fonte antes da instalação. Skills locais existentes devem ser preservadas.',
|
|
||||||
'.hands-on .section-label span:nth-child(1)': 'Prática', '.hands-on .section-label span:nth-child(2)': '10 minutos / uma feature ausente',
|
|
||||||
'.hands-intro .eyebrow': 'Laboratório Tiny Tasks', '.hands-intro h2': 'Mesma tarefa.<br />Melhor <em>sistema operacional.</em>',
|
|
||||||
'.hands-intro > div:last-child > p': 'Comece com um quadro estático propositalmente incompleto. Execute um prompt, restaure e execute a versão com skills. Compare tamanho do diff, evidências e complexidade desnecessária.',
|
|
||||||
'.starter-link': 'Abrir o projeto inicial →', '.exercise-brief > span': 'A FEATURE AUSENTE',
|
|
||||||
'.exercise-brief > strong': 'Adicione filtros Todos / Abertos / Concluídos que sobrevivem reload e navegação.',
|
|
||||||
'.exercise-brief > div': '<b>STACK</b> HTML · CSS · JavaScript <b>DEPENDÊNCIAS</b> nenhuma <b>ARQUIVOS</b> 3',
|
|
||||||
'.prompt-card:first-child header strong': 'Bom prompt', '.prompt-card.enhanced header strong': 'Bom prompt + skills',
|
|
||||||
'.prompt-card:first-child footer': 'Contexto claro · restrições · aceitação · evidência', '.prompt-card.enhanced footer': 'Mesmo contrato · métodos explícitos · prova mais forte',
|
|
||||||
'.comparison-strip > span': 'COMPARE AS EXECUÇÕES', '.comparison-strip > div:nth-child(2)': '<b>01</b> Arquivos alterados', '.comparison-strip > div:nth-child(3)': '<b>02</b> Novas dependências', '.comparison-strip > div:nth-child(4)': '<b>03</b> Checks executados', '.comparison-strip > div:nth-child(5)': '<b>04</b> Evidências retornadas'
|
|
||||||
});
|
|
||||||
|
|
||||||
const panel = document.querySelector('#phase-panel');
|
|
||||||
const buttons = document.querySelectorAll('[data-phase]');
|
|
||||||
const originals = new Map();
|
|
||||||
let currentLanguage = 'en';
|
|
||||||
|
|
||||||
function setText(selector, value) {
|
|
||||||
const nodes = document.querySelectorAll(selector);
|
|
||||||
if (!nodes.length) return;
|
|
||||||
if (!originals.has(selector)) originals.set(selector, [...nodes].map((node) => node.innerHTML));
|
|
||||||
nodes.forEach((node) => { node.innerHTML = value; });
|
|
||||||
}
|
|
||||||
|
|
||||||
function render(id) {
|
|
||||||
const phase = phases[id];
|
|
||||||
panel.innerHTML = `<div class="phase-meta"><span>${phase.model[currentLanguage]}</span><small>${currentLanguage === 'pt' ? 'contexto: isolado' : 'context: isolated'}</small></div><h3>${phase.title[currentLanguage]}</h3><p>${phase.copy[currentLanguage]}</p><code>${phase.code[currentLanguage]}</code>`;
|
|
||||||
buttons.forEach((button) => { const active = button.dataset.phase === id; button.classList.toggle('active', active); button.setAttribute('aria-selected', String(active)); });
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectButtons(selector, activeValue, key) {
|
|
||||||
document.querySelectorAll(selector).forEach((button) => {
|
|
||||||
const active = button.dataset[key] === activeValue;
|
|
||||||
button.classList.toggle('active', active);
|
|
||||||
button.setAttribute(button.hasAttribute('aria-selected') ? 'aria-selected' : 'aria-pressed', String(active));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderWorker(id) {
|
|
||||||
const item = interactiveCopy.workers[id][currentLanguage];
|
|
||||||
document.querySelector('#worker-detail').innerHTML = `<span>${item[0]}</span><strong>${item[1]}</strong><small>${item[2]}</small>`;
|
|
||||||
selectButtons('[data-worker]', id, 'worker');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderTree(id) {
|
|
||||||
const item = interactiveCopy.trees[id];
|
|
||||||
const language = currentLanguage;
|
|
||||||
document.querySelector('#tree-detail').innerHTML = `<div><span>${language === 'pt' ? 'RESPONSÁVEL' : 'OWNER'}</span><strong>${item.owner[language]}</strong></div><div><span>CHECKOUT</span><strong>${item.path}</strong></div><p>${item.note[language]}</p><code>${item.command}</code>`;
|
|
||||||
selectButtons('[data-tree]', id, 'tree');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderRoute(id) {
|
|
||||||
const item = interactiveCopy.routes[id];
|
|
||||||
const language = currentLanguage;
|
|
||||||
document.querySelector('#route-detail').innerHTML = `<div class="route-meter"><span style="--score:${item.score}%"></span></div><div><small>${language === 'pt' ? 'CARGA DE RACIOCÍNIO' : 'REASONING LOAD'} · ${item.score}</small><strong>${item.label[language]}</strong><p>${item.why[language]}</p></div>`;
|
|
||||||
selectButtons('[data-route]', id, 'route');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderModelProvider(id) {
|
|
||||||
const item = modelGuide.providers[id];
|
|
||||||
const language = currentLanguage;
|
|
||||||
const sourceLabel = language === 'pt' ? 'FONTE OFICIAL ↗' : 'OFFICIAL SOURCE ↗';
|
|
||||||
const kindLabels = language === 'pt' ? { STRONG: 'FORTE', BALANCED: 'EQUILÍBRIO', FAST: 'RÁPIDO' } : {};
|
|
||||||
const tiers = item.tiers.map(([kind, name, note]) => `<div><span>${kindLabels[kind] || kind}</span><strong>${name}</strong><small>${note[language]}</small></div>`).join('');
|
|
||||||
document.querySelector('#provider-detail').innerHTML = `<header><span>${item.label}</span><a href="${item.source}" target="_blank" rel="noopener">${sourceLabel}</a></header><h3>${item.title[language]}</h3><p>${item.copy[language]}</p><div class="model-ladder">${tiers}</div>`;
|
|
||||||
selectButtons('[data-model-provider]', id, 'modelProvider');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderEffort(id) {
|
|
||||||
const item = modelGuide.efforts[id][currentLanguage];
|
|
||||||
const provider = modelGuide.providers[document.querySelector('[data-model-provider].active')?.dataset.modelProvider || 'openai'];
|
|
||||||
document.querySelector('#effort-detail').innerHTML = `<span>${item[0]}</span><p>${item[1]}</p><code>${provider.config}</code>`;
|
|
||||||
selectButtons('[data-effort]', id, 'effort');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderSkillFile(id) {
|
|
||||||
const item = interactiveCopy.skillFiles[id];
|
|
||||||
document.querySelector('#skill-detail').innerHTML = `<span>${item.icon}</span><div><strong>${item.title}</strong><p>${item[currentLanguage]}</p><small>${currentLanguage === 'pt' ? 'clique em outro arquivo para explorar' : 'select another file to explore'}</small></div>`;
|
|
||||||
selectButtons('[data-skill-file]', id, 'skillFile');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderSkillWorkflow(id) {
|
|
||||||
const item = interactiveCopy.skillWorkflow[id];
|
|
||||||
const language = currentLanguage;
|
|
||||||
const labels = language === 'pt'
|
|
||||||
? ['PERGUNTA', 'AÇÃO', 'ARTEFATO', 'PROVA']
|
|
||||||
: ['QUESTION', 'ACTION', 'ARTIFACT', 'PROOF'];
|
|
||||||
document.querySelector('#builder-detail').innerHTML = `<header><span>${item.number}</span><small>${labels[0]}</small></header><h3>${item.title[language]}</h3><blockquote>${item.question[language]}</blockquote><div class="builder-action"><span>${labels[1]}</span><p>${item.action[language]}</p></div><footer><div><span>${labels[2]}</span><strong>${item.output[language]}</strong></div><div><span>${labels[3]}</span><strong>${item.proof[language]}</strong></div></footer>`;
|
|
||||||
selectButtons('[data-skill-step]', id, 'skillStep');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderCommonSkill(id) {
|
|
||||||
const item = interactiveCopy.commonSkills[id];
|
|
||||||
const language = currentLanguage;
|
|
||||||
const labels = language === 'pt'
|
|
||||||
? ['QUANDO USAR', 'EXEMPLO', 'CUIDADO']
|
|
||||||
: ['WHEN TO USE', 'EXAMPLE', 'WATCH OUT'];
|
|
||||||
const sourceLabel = language === 'pt' ? 'FONTE NO GITHUB ↗' : 'GITHUB SOURCE ↗';
|
|
||||||
document.querySelector('#common-skill-detail').innerHTML = `<header><span>${item.number}</span><small>${item.kind[language]}</small></header><h3>${item.title}</h3><blockquote>${item.rule[language]}</blockquote><div class="common-skill-notes"><div><span>${labels[0]}</span><p>${item.use[language]}</p></div><div><span>${labels[1]}</span><p>${item.example[language]}</p></div><div><span>${labels[2]}</span><p>${item.caution[language]}</p></div></div><a class="skill-source" href="${skillSources[id]}" target="_blank" rel="noopener">${sourceLabel}</a>`;
|
|
||||||
selectButtons('[data-common-skill]', id, 'commonSkill');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderHandsOn() {
|
|
||||||
document.querySelector('#prompt-basic').textContent = handsOnPrompts[currentLanguage].basic;
|
|
||||||
document.querySelector('#prompt-skills').textContent = handsOnPrompts[currentLanguage].skills;
|
|
||||||
document.querySelector('#prompt-install-skills').textContent = skillInstallPrompts[currentLanguage];
|
|
||||||
document.querySelectorAll('[data-copy-target] span').forEach((label) => { label.textContent = currentLanguage === 'pt' ? 'COPIAR' : 'COPY'; });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function copyPrompt(button) {
|
|
||||||
const text = document.querySelector(`#${button.dataset.copyTarget}`).textContent;
|
|
||||||
let copied = false;
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(text);
|
|
||||||
copied = true;
|
|
||||||
} catch (error) {
|
|
||||||
const helper = document.createElement('textarea');
|
|
||||||
helper.value = text;
|
|
||||||
helper.setAttribute('readonly', '');
|
|
||||||
helper.style.position = 'fixed';
|
|
||||||
helper.style.opacity = '0';
|
|
||||||
document.body.appendChild(helper);
|
|
||||||
helper.select();
|
|
||||||
copied = document.execCommand('copy');
|
|
||||||
helper.remove();
|
|
||||||
}
|
|
||||||
const status = document.querySelector('#copy-status');
|
|
||||||
status.textContent = copied
|
|
||||||
? (currentLanguage === 'pt' ? 'Prompt copiado. Cole em uma nova sessão de agente.' : 'Prompt copied. Paste it into a fresh agent session.')
|
|
||||||
: (currentLanguage === 'pt' ? 'Não foi possível copiar. Selecione o texto manualmente.' : 'Copy unavailable. Select the text manually.');
|
|
||||||
if (copied) {
|
|
||||||
button.classList.add('copied');
|
|
||||||
button.querySelector('span').textContent = currentLanguage === 'pt' ? 'COPIADO' : 'COPIED';
|
|
||||||
window.setTimeout(() => { button.classList.remove('copied'); button.querySelector('span').textContent = currentLanguage === 'pt' ? 'COPIAR' : 'COPY'; }, 1800);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderInteractive() {
|
|
||||||
renderWorker(document.querySelector('[data-worker].active')?.dataset.worker || 'ui');
|
|
||||||
renderTree(document.querySelector('[data-tree].active')?.dataset.tree || 'main');
|
|
||||||
renderRoute(document.querySelector('[data-route].active')?.dataset.route || 'plan');
|
|
||||||
renderModelProvider(document.querySelector('[data-model-provider].active')?.dataset.modelProvider || 'openai');
|
|
||||||
renderEffort(document.querySelector('[data-effort].active')?.dataset.effort || 'medium');
|
|
||||||
renderSkillFile(document.querySelector('[data-skill-file].active')?.dataset.skillFile || 'skill');
|
|
||||||
renderSkillWorkflow(document.querySelector('[data-skill-step].active')?.dataset.skillStep || 'observe');
|
|
||||||
renderCommonSkill(document.querySelector('[data-common-skill].active')?.dataset.commonSkill || 'ponytail');
|
|
||||||
renderHandsOn();
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyLanguage(language) {
|
|
||||||
currentLanguage = language === 'pt' ? 'pt' : 'en';
|
|
||||||
document.documentElement.lang = currentLanguage === 'pt' ? 'pt-BR' : 'en';
|
|
||||||
if (currentLanguage === 'pt') Object.entries(translations.pt).forEach(([selector, value]) => setText(selector, value));
|
|
||||||
else originals.forEach((values, selector) => document.querySelectorAll(selector).forEach((node, index) => { node.innerHTML = values[index]; }));
|
|
||||||
document.querySelectorAll('[data-lang]').forEach((button) => { const active = button.dataset.lang === currentLanguage; button.classList.toggle('active', active); button.setAttribute('aria-pressed', String(active)); });
|
|
||||||
render(document.querySelector('[data-phase].active')?.dataset.phase || 'plan');
|
|
||||||
renderInteractive();
|
|
||||||
try { localStorage.setItem('ai-for-dummies-language', currentLanguage); } catch (error) { /* previews may disable storage */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
buttons.forEach((button) => button.addEventListener('click', () => render(button.dataset.phase)));
|
|
||||||
document.querySelectorAll('[data-lang]').forEach((button) => button.addEventListener('click', () => applyLanguage(button.dataset.lang)));
|
|
||||||
document.querySelectorAll('[data-worker]').forEach((button) => button.addEventListener('click', () => renderWorker(button.dataset.worker)));
|
|
||||||
document.querySelectorAll('[data-tree]').forEach((button) => button.addEventListener('click', () => renderTree(button.dataset.tree)));
|
|
||||||
document.querySelectorAll('[data-route]').forEach((button) => button.addEventListener('click', () => renderRoute(button.dataset.route)));
|
|
||||||
document.querySelectorAll('[data-model-provider]').forEach((button) => button.addEventListener('click', () => { renderModelProvider(button.dataset.modelProvider); renderEffort(document.querySelector('[data-effort].active')?.dataset.effort || 'medium'); }));
|
|
||||||
document.querySelectorAll('[data-effort]').forEach((button) => button.addEventListener('click', () => renderEffort(button.dataset.effort)));
|
|
||||||
document.querySelectorAll('[data-skill-file]').forEach((button) => button.addEventListener('click', () => renderSkillFile(button.dataset.skillFile)));
|
|
||||||
document.querySelectorAll('[data-skill-step]').forEach((button) => button.addEventListener('click', () => renderSkillWorkflow(button.dataset.skillStep)));
|
|
||||||
document.querySelectorAll('[data-common-skill]').forEach((button) => button.addEventListener('click', () => renderCommonSkill(button.dataset.commonSkill)));
|
|
||||||
document.querySelectorAll('[data-copy-target]').forEach((button) => button.addEventListener('click', () => copyPrompt(button)));
|
|
||||||
window.addEventListener('scroll', () => { const height = document.documentElement.scrollHeight - window.innerHeight; document.querySelector('.reading-progress span').style.width = `${height > 0 ? (window.scrollY / height) * 100 : 0}%`; }, { passive: true });
|
|
||||||
|
|
||||||
let savedLanguage = 'en';
|
|
||||||
try { savedLanguage = localStorage.getItem('ai-for-dummies-language') || 'en'; } catch (error) { /* previews may disable storage */ }
|
|
||||||
render('plan');
|
|
||||||
applyLanguage(savedLanguage);
|
|
||||||
+13
-11
@@ -427,17 +427,19 @@ paths, and confidence notes.
|
|||||||
|
|
||||||
## Hands-on lab
|
## Hands-on lab
|
||||||
|
|
||||||
The presentation includes a dependency-free starter at `hands-on/starter/`. It
|
The presentation includes a dependency-free starter at
|
||||||
renders a small task board but intentionally omits the All / Open / Done filter.
|
`public/hands-on/starter/`. It renders a small task board but intentionally
|
||||||
|
omits the All / Open / Done filter. Attendees clone it from the `pages` branch,
|
||||||
|
where the build places it at `hands-on/starter/`.
|
||||||
|
|
||||||
Run it from the repository root:
|
Run it from the repository root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m http.server 4173
|
pnpm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Open
|
Open
|
||||||
[http://localhost:4173/hands-on/starter/](http://localhost:4173/hands-on/starter/).
|
[http://localhost:4321/ai-for-dummies/hands-on/starter/](http://localhost:4321/ai-for-dummies/hands-on/starter/).
|
||||||
In a fresh coding-agent session, copy **Run A — Good prompt** from the
|
In a fresh coding-agent session, copy **Run A — Good prompt** from the
|
||||||
presentation. Record changed files, dependencies, checks, and evidence. Restore
|
presentation. Record changed files, dependencies, checks, and evidence. Restore
|
||||||
the starter, then repeat with **Run B — Good prompt + skills**.
|
the starter, then repeat with **Run B — Good prompt + skills**.
|
||||||
@@ -464,20 +466,20 @@ Compare:
|
|||||||
|
|
||||||
### Hands-on rules lab
|
### Hands-on rules lab
|
||||||
|
|
||||||
A second lab at `hands-on/rules/` mirrors the starter's visual system and runs
|
A second lab at `public/hands-on/rules/` mirrors the starter's visual system and
|
||||||
the same exercise against rule sources. It lists five toggleable rule sources —
|
runs the same exercise against rule sources. It lists five toggleable rule
|
||||||
`AGENTS.md`, the `gate-discipline` skill body, the Husky `pre-commit` hook, the
|
sources — `AGENTS.md`, the `gate-discipline` skill body, the Husky `pre-commit`
|
||||||
`check-ui-contract.mjs` enforcer, and `commitlint` — and rebuilds the **ruled**
|
hook, the `check-ui-contract.mjs` enforcer, and `commitlint` — and rebuilds the
|
||||||
prompt live as each toggle flips.
|
**ruled** prompt live as each toggle flips.
|
||||||
|
|
||||||
Run it:
|
Run it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m http.server 4173
|
pnpm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Open
|
Open
|
||||||
[http://localhost:4173/hands-on/rules/](http://localhost:4173/hands-on/rules/).
|
[http://localhost:4321/ai-for-dummies/hands-on/rules/](http://localhost:4321/ai-for-dummies/hands-on/rules/).
|
||||||
Compare the **naive** and **ruled** prompt panels. Toggle rules off to shrink
|
Compare the **naive** and **ruled** prompt panels. Toggle rules off to shrink
|
||||||
the prompt; toggle them on to add more guards. Copy the final prompt and run it
|
the prompt; toggle them on to add more guards. Copy the final prompt and run it
|
||||||
against a real coding agent.
|
against a real coding agent.
|
||||||
|
|||||||
+2
-4
@@ -6,15 +6,12 @@ export default [
|
|||||||
ignores: [
|
ignores: [
|
||||||
'.agents/**',
|
'.agents/**',
|
||||||
'.astro/**',
|
'.astro/**',
|
||||||
'app.js',
|
|
||||||
'dist/**',
|
'dist/**',
|
||||||
'full-guide/**',
|
|
||||||
'hands-on/**',
|
'hands-on/**',
|
||||||
|
'legacy/**',
|
||||||
'public/hands-on/**',
|
'public/hands-on/**',
|
||||||
'rules/**',
|
|
||||||
'scripts/**',
|
'scripts/**',
|
||||||
'skill-reviews/**',
|
'skill-reviews/**',
|
||||||
'skills-review/**',
|
|
||||||
'skills/**',
|
'skills/**',
|
||||||
'submitted-skills/**',
|
'submitted-skills/**',
|
||||||
'vote-service/**',
|
'vote-service/**',
|
||||||
@@ -26,6 +23,7 @@ export default [
|
|||||||
ignores: [
|
ignores: [
|
||||||
'dist/**',
|
'dist/**',
|
||||||
'hands-on/**',
|
'hands-on/**',
|
||||||
|
'legacy/**',
|
||||||
'public/hands-on/**',
|
'public/hands-on/**',
|
||||||
'submitted-skills/**',
|
'submitted-skills/**',
|
||||||
'skill-reviews/**',
|
'skill-reviews/**',
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="../responsive.css" />
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="description" content="AI For Dummies: a field guide to skills, models, subagents, and worktrees." />
|
|
||||||
<title>AI For Dummies — Field Guide</title>
|
|
||||||
<link rel="stylesheet" href="../styles.css" />
|
|
||||||
<link rel="stylesheet" href="audit.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="reading-progress" aria-hidden="true"><span></span></div>
|
|
||||||
<main>
|
|
||||||
<header class="topbar"><a class="brand" href="#top"><span class="mark">A</span> field guide</a><nav class="chapter-links" aria-label="Chapter sections"><a href="#fleet">01 fleet</a><a href="#worktrees">02 worktrees</a><a href="#models">03 models</a><a href="#skills">04 skills</a><a href="#create-skill">05 create</a><a href="#field-kit">06 field kit</a><a href="#hands-on">07 hands-on</a><a href="#verification">08 verify</a></nav><div class="topbar-tools"><a class="skills-review-link" href="../skills-review/">review submissions ↗</a><div class="lang-switch" aria-label="Language"><button class="active" data-lang="en" aria-pressed="true">EN</button><span>/</span><button data-lang="pt" aria-pressed="false">PT</button></div><span class="edition">AI ENGINEERING <i></i> 01 / 2026</span></div></header>
|
|
||||||
<section class="hero" id="top"><div><p class="eyebrow">A presentation for humans who ship</p><h1>AI for<br /><em>dummies.</em></h1><p class="lede">You do not need an army of models. You need a system: one mind to frame the work, several hands to execute it, and a clean boundary between every task.</p></div><aside class="hero-index"><span>FIELD NOTE / 001</span><strong>Ship the<br /><em>system.</em></strong><small>Skills · agents · worktrees · proof</small></aside></section>
|
|
||||||
<section class="hero-stats" aria-label="Chapter summary"><div><strong>01</strong><span>strong model<br />for ambiguity</span></div><div><strong>03</strong><span>bounded workers<br />in parallel</span></div><div><strong>∞</strong><span>iterations<br />with evidence</span></div><p>Read this as a route map, not a prompt recipe.</p></section>
|
|
||||||
<section class="thesis"><div><span>RULE ZERO</span><strong>Strong model for ambiguity.<br />Light model for bounded work.</strong></div><div class="signal" aria-hidden="true"><b>THINK</b><i></i><i></i><i></i><b>MAKE</b></div></section>
|
|
||||||
<section class="fleet" id="fleet"><div class="section-label"><span>A small fleet</span><span>coordination before parallelism</span></div><div class="fleet-grid"><article class="captain"><span>ORCHESTRATOR</span><h2>Decides what<br />needs to happen.</h2><code>Opus / reasoning</code></article><div class="arrow">→</div><div class="workers" role="group" aria-label="Worker agents"><button class="worker-card active" data-worker="ui" aria-pressed="true"><span>UI</span><strong>Component and visual states</strong><code>agent/ui</code></button><button class="worker-card" data-worker="tests" aria-pressed="false"><span>TEST</span><strong>Acceptance cases</strong><code>agent/tests</code></button><button class="worker-card" data-worker="docs" aria-pressed="false"><span>DOCS</span><strong>Guide and examples</strong><code>agent/docs</code></button></div></div><div class="worker-detail" id="worker-detail" aria-live="polite"></div><p class="caption">The orchestrator preserves intent, writes small contracts, and gathers results that can be verified. It does not need to type every line.</p></section>
|
|
||||||
<section class="failure-map"><div class="section-label"><span>Why the boundary matters</span><span>one vague task / three predictable failures</span></div><div class="failure-grid"><article><span>01</span><strong>Context soup</strong><p>Every worker reads everything. Nobody knows which facts are load-bearing.</p></article><article><span>02</span><strong>Branch collision</strong><p>Two agents touch the same checkout. The fastest path becomes conflict resolution.</p></article><article><span>03</span><strong>Confident drift</strong><p>The diff is polished, but no one checks whether it solved the original problem.</p></article></div></section>
|
|
||||||
<section class="workflow" aria-labelledby="workflow-title"><div class="copy"><p class="eyebrow">The subagent loop</p><h2 id="workflow-title">Click a phase.<br /><em>See the handoff.</em></h2><p>Delegation means moving one bounded task into a smaller context—not giving away responsibility.</p></div><div class="phase-tabs" role="tablist" aria-label="Workflow phases"><button class="active" data-phase="plan" role="tab" aria-selected="true"><b>01</b> PLAN</button><button data-phase="build" role="tab" aria-selected="false"><b>02</b> BUILD</button><button data-phase="review" role="tab" aria-selected="false"><b>03</b> REVIEW</button></div><article class="phase-panel" id="phase-panel" aria-live="polite"></article></section>
|
|
||||||
<section class="handoff"><div class="section-label"><span>What crosses contexts</span><span>brief → diff → evidence</span></div><table><thead><tr><th>Package</th><th>Contains</th><th>Why it matters</th></tr></thead><tbody><tr><th scope="row">Brief</th><td>goal, files, boundaries</td><td>stops the worker inventing the problem</td></tr><tr><th scope="row">Worktree</th><td>branch and isolated checkout</td><td>parallel edits do not collide</td></tr><tr><th scope="row">Checks</th><td>tests, build, criteria</td><td>turns “looks good” into evidence</td></tr><tr><th scope="row">Diff</th><td>small, reviewable change</td><td>integration and discard stay cheap</td></tr></tbody></table></section>
|
|
||||||
<section class="worktrees" id="worktrees"><div class="worktree-intro"><p class="eyebrow">Git worktrees</p><h2>One branch<br />per <em>hand.</em></h2><p>A worktree is another directory linked to the same repository. Each agent gets its own checkout and index; history remains shared.</p><p class="interaction-hint">Select a node to inspect its checkout, owner, and next action.</p></div><div class="tree-lab"><div class="tree-toolbar"><span>repository topology</span><span class="tree-live"><i></i> 4 checkouts</span></div><div class="tree-stage" role="tree" aria-label="Repository worktree topology"><svg viewBox="0 0 760 330" preserveAspectRatio="none" aria-hidden="true"><path class="tree-edge trunk" d="M380 48 V118"/><path class="tree-edge" d="M380 118 C380 170 110 150 110 224"/><path class="tree-edge" d="M380 118 V224"/><path class="tree-edge" d="M380 118 C380 170 650 150 650 224"/></svg><button class="tree-node root active" data-tree="main" role="treeitem" aria-selected="true"><span>ROOT</span><strong>main</strong><small>● clean</small></button><button class="tree-node branch ui" data-tree="ui" role="treeitem" aria-selected="false"><span>UI AGENT</span><strong>agent/ui</strong><small>3 files · working</small></button><button class="tree-node branch tests" data-tree="tests" role="treeitem" aria-selected="false"><span>TEST AGENT</span><strong>agent/tests</strong><small>8 checks · ready</small></button><button class="tree-node branch docs" data-tree="docs" role="treeitem" aria-selected="false"><span>DOCS AGENT</span><strong>agent/docs</strong><small>2 pages · review</small></button></div><article class="tree-detail" id="tree-detail" aria-live="polite"></article></div></section>
|
|
||||||
<section class="routing"><div><p class="eyebrow">Model routing</p><h2>Do not pay for<br />reasoning where<br />you need <em>rhythm.</em></h2><p class="interaction-hint">Choose a job to see why the model profile changes.</p></div><div class="route-console"><div class="route-table"><div class="head"><span>Work</span><span>Profile</span><span>Prompt shape</span></div><button class="active" data-route="plan" aria-pressed="true"><strong>Plan</strong><b>strong / broad</b><small>What changes? What can break?</small></button><button data-route="build" aria-pressed="false"><strong>Build</strong><b>fast / focused</b><small>Implement this slice. Run these checks.</small></button><button data-route="explore" aria-pressed="false"><strong>Explore</strong><b>read-only / light</b><small>Find where this contract is used.</small></button><button data-route="review" aria-pressed="false"><strong>Review</strong><b>independent</b><small>Does the diff satisfy the brief?</small></button></div><article class="route-detail" id="route-detail" aria-live="polite"></article></div></section>
|
|
||||||
<section class="model-gearbox" id="models"><div class="section-label"><span>Model gearbox</span><span>capability tier × thinking effort</span></div><div class="gearbox-intro"><div><p class="eyebrow">Two separate knobs</p><h2>Choose the engine.<br />Then choose the <em>gear.</em></h2></div><p>A stronger model changes the capability ceiling. Higher reasoning effort gives that model more room to work. Start with the lightest combination that passes your real checks, then move one knob at a time.</p></div><div class="gearbox"><div class="provider-tabs" role="tablist" aria-label="Model providers"><button class="active" data-model-provider="openai" role="tab" aria-selected="true">OPENAI</button><button data-model-provider="claude" role="tab" aria-selected="false">CLAUDE</button><button data-model-provider="gemini" role="tab" aria-selected="false">GEMINI</button></div><article class="provider-detail" id="provider-detail" aria-live="polite"></article><div class="effort-rail"><span>REASONING / THINKING</span><button data-effort="low" aria-pressed="false"><b>LOW</b><small>bounded + fast</small></button><button class="active" data-effort="medium" aria-pressed="true"><b>MEDIUM</b><small>default start</small></button><button data-effort="high" aria-pressed="false"><b>HIGH</b><small>complex + costly</small></button></div><article class="effort-detail" id="effort-detail" aria-live="polite"></article></div><div class="gearbox-rule"><span>ROUTING RULE</span><strong>Use strong models for ambiguity and judgment. Use lighter models for bounded execution. Raise effort only when evaluation shows a gain.</strong></div></section>
|
|
||||||
<section class="skills" id="skills"><div><p class="eyebrow">Skills</p><h2>Write the right way<br /><em>once.</em></h2><p>A skill is a reusable procedure. It can carry instructions, references, scripts, and assets. It is not magical memory, and it does not replace acceptance criteria.</p><div class="skill-principles"><span>01 / trigger clearly</span><span>02 / load detail on demand</span><span>03 / return evidence</span></div></div><div class="skill-explorer"><div class="skill-package" role="tree" aria-label="Skill package files"><span>SKILL PACKAGE</span><button class="active" data-skill-file="skill" role="treeitem" aria-selected="true"><code>SKILL.md</code><small>procedure and limits</small></button><button data-skill-file="references" role="treeitem" aria-selected="false"><code>references/</code><small>facts to consult</small></button><button data-skill-file="scripts" role="treeitem" aria-selected="false"><code>scripts/</code><small>repeatable checks</small></button><button data-skill-file="assets" role="treeitem" aria-selected="false"><code>assets/</code><small>templates and examples</small></button></div><article class="skill-detail" id="skill-detail" aria-live="polite"></article></div><pre><code>name: review-ui · check focus, mobile, reduced motion · run verification · return evidence</code></pre></section>
|
|
||||||
<section class="skill-builder" id="create-skill"><div class="section-label"><span>Create a skill</span><span>repeatable pain → reusable judgment</span></div><div class="builder-intro"><div><p class="eyebrow">The skill forge</p><h2>Teach the decision.<br />Keep the context <em>light.</em></h2></div><p>Do not package everything you know. Capture the non-obvious choices that repeatedly improve an outcome, then prove the skill changes behavior.</p></div><div class="builder-workbench"><nav class="builder-steps" role="tablist" aria-label="Skill creation workflow"><button class="active" data-skill-step="observe" role="tab" aria-selected="true"><b>01</b><span>Observe</span><small>find repeated friction</small></button><button data-skill-step="trigger" role="tab" aria-selected="false"><b>02</b><span>Define trigger</span><small>route precisely</small></button><button data-skill-step="scaffold" role="tab" aria-selected="false"><b>03</b><span>Choose anatomy</span><small>only needed files</small></button><button data-skill-step="write" role="tab" aria-selected="false"><b>04</b><span>Write guidance</span><small>decisions, not trivia</small></button><button data-skill-step="validate" role="tab" aria-selected="false"><b>05</b><span>Validate</span><small>test real behavior</small></button></nav><article class="builder-detail" id="builder-detail" aria-live="polite"></article><aside class="builder-artifact"><div class="artifact-head"><span>OUTPUT / SKILL PACKAGE</span><i></i></div><pre aria-label="Example skill structure"><code>review-ui/<br />├── SKILL.md<br />├── agents/<br />│ └── openai.yaml<br />├── references/<br />│ └── accessibility.md<br />└── scripts/<br /> └── verify.mjs</code></pre><div class="artifact-command"><span>VALIDATE</span><code>quick_validate.py ./review-ui</code></div></aside></div><div class="builder-loop"><span>AFTER REAL USE</span><div><b>observe failure</b><i>→</i><b>sharpen one rule</b><i>→</i><b>retest behavior</b><i>→</i><b>keep it narrow</b></div></div></section>
|
|
||||||
<section class="skill-catalog" id="field-kit"><div class="section-label"><span>Common skills</span><span>choose behavior before model</span></div><div class="catalog-intro"><div><p class="eyebrow">The field kit</p><h2>Different jobs.<br />Different <em>instincts.</em></h2></div><p>A skill changes how an agent approaches work. Some shape communication. Others enforce research, debugging, review, or completion discipline. Select one to inspect its operating rule and verified source.</p></div><div class="skill-deck"><div class="skill-index" role="tablist" aria-label="Common agent skills"><button class="active" data-common-skill="ponytail" role="tab" aria-selected="true"><span>SIMPLIFY</span><strong>ponytail-lite</strong><small>minimum code that holds</small></button><button data-common-skill="caveman" role="tab" aria-selected="false"><span>COMMUNICATE</span><strong>caveman</strong><small>signal without filler</small></button><button data-common-skill="unlazy" role="tab" aria-selected="false"><span>COMPLETE</span><strong>unlazy</strong><small>gates and evidence</small></button><button data-common-skill="research" role="tab" aria-selected="false"><span>INVESTIGATE</span><strong>research</strong><small>primary sources first</small></button><button data-common-skill="debug" role="tab" aria-selected="false"><span>DIAGNOSE</span><strong>diagnosing-bugs</strong><small>tight feedback loop</small></button><button data-common-skill="review" role="tab" aria-selected="false"><span>REVIEW</span><strong>code-review</strong><small>standards × spec</small></button><button data-common-skill="tokens" role="tab" aria-selected="false"><span>ECONOMIZE</span><strong>token-saver</strong><small>compress noisy output</small></button></div><article class="common-skill-detail" id="common-skill-detail" aria-live="polite"></article></div><div class="skill-loadout"><span>ONE PRACTICAL LOADOUT</span><div><b>PLAN</b> unlazy <i>→</i> <b>BUILD</b> ponytail-lite <i>→</i> <b>DEBUG</b> diagnosing-bugs <i>→</i> <b>REPORT</b> caveman</div></div><article class="install-skills"><header><div><span>INSTALL PACK</span><strong>Ask your coding agent to verify, install, and validate the skills.</strong></div><button data-copy-target="prompt-install-skills"><span>COPY</span><i aria-hidden="true">↗</i></button></header><pre><code id="prompt-install-skills"></code></pre><footer>Review every source before installation. Existing local skills must be preserved.</footer></article></section>
|
|
||||||
<section class="hands-on" id="hands-on"><div class="section-label"><span>Hands-on</span><span>10 minutes / one missing feature</span></div><div class="hands-intro"><div><p class="eyebrow">Tiny Tasks lab</p><h2>Same task.<br />Better <em>operating system.</em></h2></div><div><p>Start with a deliberately incomplete static task board. Run one prompt as written, reset, then run the skill-enabled version. Compare diff size, verification evidence, and unnecessary complexity.</p><div class="starter-links"><div class="starter-link-group"><a href="../hands-on/starter/" class="starter-link">Open the starter →</a><a href="https://git.marcospaulo.dev.br/netcracker/ai-for-dummies/src/branch/pages/hands-on/starter" class="starter-link starter-link-source">Clone from Gitea →</a></div><div class="starter-link-group"><a href="../hands-on/rules/" class="starter-link">Open the rules lab →</a><a href="https://git.marcospaulo.dev.br/netcracker/ai-for-dummies/src/branch/pages/hands-on/rules" class="starter-link starter-link-source">Clone from Gitea →</a></div></div></div></div><div class="exercise-brief"><span>THE MISSING FEATURE</span><strong>Add All / Open / Done filters that survive reload and browser navigation.</strong><div><b>STACK</b> HTML · CSS · JavaScript <b>DEPENDENCIES</b> none <b>FILES</b> 3</div></div><div class="prompt-compare"><article class="prompt-card"><header><div><span>RUN A</span><strong>Good prompt</strong></div><button data-copy-target="prompt-basic"><span>COPY</span><i aria-hidden="true">↗</i></button></header><pre><code id="prompt-basic"></code></pre><footer>Clear context · constraints · acceptance · evidence</footer></article><article class="prompt-card enhanced"><header><div><span>RUN B</span><strong>Good prompt + skills</strong></div><button data-copy-target="prompt-skills"><span>COPY</span><i aria-hidden="true">↗</i></button></header><pre><code id="prompt-skills"></code></pre><footer>Same contract · explicit working methods · stronger proof</footer></article></div><div class="comparison-strip"><span>COMPARE THE RUNS</span><div><b>01</b> Files changed</div><div><b>02</b> New dependencies</div><div><b>03</b> Checks actually run</div><div><b>04</b> Evidence returned</div></div><p class="copy-status" id="copy-status" role="status" aria-live="polite"></p></section>
|
|
||||||
<aside class="rule"><span>THE HUMAN JOB</span><strong>The agent may be autonomous in execution. Intent, boundaries, and evidence remain yours.</strong></aside><aside class="callout"><span>START HERE</span><strong>Begin with one agent and one skill. Add parallelism only when the tasks are truly independent.</strong></aside>
|
|
||||||
<section class="verification" id="verification"><div class="section-label"><span>Verification</span><span>run each gate separately</span></div><div class="verify-intro"><div><p class="eyebrow">Checks become evidence</p><h2>Three layers.<br />Run each one alone.</h2></div><p>Run a gate on its own line, print its exit code, attach the output. The result is the deliverable.</p></div><div class="verify-layers"><article><span>01 · STATIC</span><h3>Lint and types</h3><p>Format, lint, type-check. Fast and scoped to one file. Run on every save.</p><code>pnpm lint; echo "lint=$?"
|
|
||||||
pnpm typecheck; echo "typecheck=$?"</code></article><article><span>02 · BEHAVIOR</span><h3>Unit and contract</h3><p>Tests that repeat. Run before claiming done.</p><code>pnpm test; echo "test=$?"
|
|
||||||
cd services/api && go test ./...</code></article><article><span>03 · INTEGRATION</span><h3>Real UI and API</h3><p>Drive the actual UI, API, or browser. Slower and flakier — only this catches mobile overflow and a missing 404.</p><code>pnpm check:ui; echo "ui=$?"
|
|
||||||
TURBO_FORCE=true pnpm e2e</code></article></div><div class="verify-antipatterns"><span>FOUR WAYS A GREEN REPORT IS FALSE</span><div class="ap-grid"><article><b>1</b><div><strong>Pipe a gate</strong><p>tail, grep, or head hide the real exit code — a pipeline returns the last command's status.</p></div></article><article><b>2</b><div><strong>Swallow a rejection</strong><p>A silent <code>.catch(() => {})</code> hides a panic, an upstream limit, or a partial failure.</p></div></article><article><b>3</b><div><strong>Trust the cache</strong><p>Turbo caches results. A gate that "passes" may not have run — use <code>TURBO_FORCE=true</code>.</p></div></article><article><b>4</b><div><strong>Skip the third layer</strong><p>Lint and unit can both be green while the page breaks on mobile and the API never returns 404.</p></div></article></div></div><article class="verify-cta"><span>RUN IT YOURSELF · two labs, under 10 minutes each</span><div class="verify-cta-grid"><a href="../hands-on/starter/" class="verify-card"><strong>Path A · verification lab</strong><p>Fill the four-row comparison strip on the starter. Run A naively, Run B with <code>$gate-discipline</code> and <code>$webapp-testing</code>.</p><small>Open the starter →</small><small class="verify-card-source">Clone ↗ <span>git.marcospaulo.dev.br/.../src/branch/pages/hands-on/starter</span></small></a><a href="../hands-on/rules/" class="verify-card"><strong>Path B · rules lab</strong><p>Toggle every rule off, run the prompt. Toggle every rule on, run it again. Compare diff size, gate invocations, and the names of checks the agent names back.</p><small>Open the rules lab →</small><small class="verify-card-source">Clone ↗ <span>git.marcospaulo.dev.br/.../src/branch/pages/hands-on/rules</span></small></a></div></article></section>
|
|
||||||
<section class="sources"><div class="section-label"><span>Keep learning</span><span>12 new readings + primary docs</span></div><p>Go deeper with official documentation, production case studies, Medium, and practitioner workflows. <a href="../rules/">Rules and enforcement case study →</a> <a href="../skills-review/">Skills review desk →</a> <a href="../docs/references/README.md">Primary references →</a> <a href="../docs/references/additional-reading.md">12-part reading path →</a></p></section>
|
|
||||||
<section class="chapter-route"><div class="section-label"><span>Navigate by idea</span><span>short chapters / one system</span></div><p>Prefer a focused chapter? Start with the <a href="../summary/">route map</a>, then jump directly to <a href="../models/">models</a>, <a href="../agents/">agents and worktrees</a>, <a href="../skills/">skill creation</a>, <a href="../rules/">rules</a>, or the <a href="../skills-review/">skills review desk</a>.</p></section></main><script src="../app.js" defer></script>
|
|
||||||
</body></html>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Hands-on · Rules
|
|
||||||
|
|
||||||
A tiny, zero-dependency demo showing how rule sources reshape the same prompt.
|
|
||||||
|
|
||||||
## Run
|
|
||||||
|
|
||||||
Open `index.html` directly. No build, no server, no `npm install`.
|
|
||||||
|
|
||||||
## What it shows
|
|
||||||
|
|
||||||
- Five rule sources, taken from a real monorepo (`netcracker/interview`):
|
|
||||||
- `AGENTS.md` — repo-wide instruction file.
|
|
||||||
- `.agents/skills/gate-discipline/SKILL.md` — skill body loaded on demand.
|
|
||||||
- `.husky/pre-commit` — git hook that runs other enforcers.
|
|
||||||
- `scripts/check-ui-contract.mjs` — custom CLI enforcer (ratchet).
|
|
||||||
- `commitlint.config.cjs` — commit-msg linter.
|
|
||||||
- Each rule has an on/off switch. Toggling a rule prepends its body to the **ruled** prompt.
|
|
||||||
- EN ↔ PT toggle keeps both languages useful.
|
|
||||||
- "Copy ruled prompt" copies the current ruled-prompt text to clipboard.
|
|
||||||
- Responsive on mobile, Full HD, and 4K (one column under 720 px).
|
|
||||||
|
|
||||||
## Mirror of `/hands-on/starter`
|
|
||||||
|
|
||||||
Same visual system as the starter (`--paper`, `--ink`, `--blue`, `--gold`). Drop-in replacement under `hands-on/rules/`.
|
|
||||||
|
|
||||||
## Token budget
|
|
||||||
|
|
||||||
Page weight: ~5 KB total, no framework, no fetch.
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
// Five rule sources lifted from netcracker/interview.
|
|
||||||
// Toggling a rule injects its body into the ruled prompt.
|
|
||||||
const RULES = [
|
|
||||||
{
|
|
||||||
id: 'agents',
|
|
||||||
name: 'AGENTS.md',
|
|
||||||
kind: 'Repo-wide instruction',
|
|
||||||
path: 'AGENTS.md',
|
|
||||||
en: 'Read AGENTS.md before touching this repo. Stack: pnpm + turbo monorepo, Go API, Next.js apps. Gates run from the monorepo root: pnpm lint, typecheck, test.',
|
|
||||||
pt: 'Leia AGENTS.md antes de tocar neste repo. Stack: pnpm + turbo monorepo, API em Go, apps Next.js. Gates rodam da raiz: pnpm lint, typecheck, test.'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'skill',
|
|
||||||
name: 'gate-discipline skill',
|
|
||||||
kind: 'Skill body',
|
|
||||||
path: '.agents/skills/gate-discipline/SKILL.md',
|
|
||||||
en: 'Skill `gate-discipline`: every gate runs separately with `$?`. No `| tail`. `TURBO_FORCE=true` if a pass looks too cheap. Generated code is regenerated, never hand-edited.',
|
|
||||||
pt: 'Skill `gate-discipline`: cada gate roda separado com `$?`. Nada de `| tail`. `TURBO_FORCE=true` se o passar for bom demais. Código gerado se regenera, nunca se edita.'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'husky',
|
|
||||||
name: 'Husky pre-commit',
|
|
||||||
kind: 'Git hook (commit time)',
|
|
||||||
path: '.husky/pre-commit',
|
|
||||||
en: 'Pre-commit runs `pnpm exec lint-staged`, then `node scripts/check-ui-contract.mjs` (UI ratchet), then commitlint. Counts in the baseline may only go DOWN.',
|
|
||||||
pt: 'Pre-commit roda `pnpm exec lint-staged`, depois `node scripts/check-ui-contract.mjs` (ratchet de UI), depois commitlint. Contadores do baseline só podem DIMINUIR.'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'enforcer',
|
|
||||||
name: 'check-ui-contract.mjs',
|
|
||||||
kind: 'Custom enforcer (CLI)',
|
|
||||||
path: 'scripts/check-ui-contract.mjs',
|
|
||||||
en: 'Enforcer scans for raw <button>, silent catches, pages without h1, hardcoded colors, duplicated components. Fails when a count goes UP. Fix = `--accept` to re-baseline lower.',
|
|
||||||
pt: 'Enforcer varre <button> cru, catch silencioso, páginas sem h1, cores hardcoded, componentes duplicados. Falha quando contador SOBE. Corrigir = `--accept` para re-baseline menor.'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'commitlint',
|
|
||||||
name: 'commitlint',
|
|
||||||
kind: 'Commit-msg linter',
|
|
||||||
path: 'commitlint.config.cjs',
|
|
||||||
en: 'Commitlint enforces Conventional Commits. Format: `<type>(<scope>): <subject>`. Types: feat, fix, docs, refactor, test, chore, build, ci, perf, style.',
|
|
||||||
pt: 'Commitlint enforça Commits Convencionais. Formato: `<tipo>(<escopo>): <assunto>`. Tipos: feat, fix, docs, refactor, test, chore, build, ci, perf, style.'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
// The task we're asking the agent to perform.
|
|
||||||
const TASK = {
|
|
||||||
en: { goal: 'Refactor the `getUserById` endpoint to return 404 instead of throwing.', ctx: 'services/api/internal/user/handler.go. No DB schema change.' },
|
|
||||||
pt: { goal: 'Refatorar o endpoint `getUserById` para retornar 404 em vez de lançar exceção.', ctx: 'services/api/internal/user/handler.go. Sem mudança de schema.' }
|
|
||||||
};
|
|
||||||
|
|
||||||
const NAIVE = {
|
|
||||||
en: `Task: ${TASK.en.goal}\nFile: ${TASK.en.ctx}\nPlease make the change and tell me when done.`,
|
|
||||||
pt: `Tarefa: ${TASK.pt.goal}\nArquivo: ${TASK.pt.ctx}\nFaça a mudança e me avise quando terminar.`
|
|
||||||
};
|
|
||||||
|
|
||||||
const state = { enabled: new Set(['agents']), lang: 'en' };
|
|
||||||
|
|
||||||
const ruleList = document.querySelector('#rule-list');
|
|
||||||
const ruleCount = document.querySelector('#rule-count');
|
|
||||||
const promptNaive = document.querySelector('#prompt-naive');
|
|
||||||
const promptRuled = document.querySelector('#prompt-ruled');
|
|
||||||
const copyBtn = document.querySelector('#copy-btn');
|
|
||||||
const langButtons = document.querySelectorAll('.lang-switch button');
|
|
||||||
|
|
||||||
function renderRules() {
|
|
||||||
ruleList.innerHTML = RULES.map((rule) => `
|
|
||||||
<article class="rule" data-id="${rule.id}">
|
|
||||||
<div>
|
|
||||||
<h3>${rule.name}</h3>
|
|
||||||
<p>${rule.kind} <code>${rule.path}</code></p>
|
|
||||||
</div>
|
|
||||||
<span class="rule-tag">${rule.id}</span>
|
|
||||||
<button class="toggle" type="button" data-rule="${rule.id}" aria-pressed="${state.enabled.has(rule.id)}" aria-label="Toggle ${rule.name}"></button>
|
|
||||||
</article>
|
|
||||||
`).join('');
|
|
||||||
ruleCount.textContent = `${state.enabled.size} / ${RULES.length} active`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderPrompts() {
|
|
||||||
const lang = state.lang;
|
|
||||||
promptNaive.textContent = NAIVE[lang];
|
|
||||||
|
|
||||||
const active = RULES.filter((r) => state.enabled.has(r.id));
|
|
||||||
const blocks = active.map((r) => `# ${r.name} (${r.path})\n${r[lang]}`).join('\n\n');
|
|
||||||
const head = `Task: ${TASK[lang].goal}\nFile: ${TASK[lang].ctx}`;
|
|
||||||
const tail = lang === 'en'
|
|
||||||
? '\n\nRun each gate separately and print $? before claiming done.'
|
|
||||||
: '\n\nRode cada gate separado e imprima $? antes de dizer que terminou.';
|
|
||||||
promptRuled.textContent = blocks ? `${head}\n\n${blocks}${tail}` : head + tail;
|
|
||||||
}
|
|
||||||
|
|
||||||
function bind() {
|
|
||||||
ruleList.addEventListener('click', (e) => {
|
|
||||||
const btn = e.target.closest('.toggle');
|
|
||||||
if (!btn) return;
|
|
||||||
const id = btn.dataset.rule;
|
|
||||||
if (state.enabled.has(id)) state.enabled.delete(id); else state.enabled.add(id);
|
|
||||||
btn.setAttribute('aria-pressed', String(state.enabled.has(id)));
|
|
||||||
ruleCount.textContent = `${state.enabled.size} / ${RULES.length} active`;
|
|
||||||
renderPrompts();
|
|
||||||
});
|
|
||||||
|
|
||||||
langButtons.forEach((btn) => btn.addEventListener('click', () => {
|
|
||||||
state.lang = btn.dataset.lang;
|
|
||||||
langButtons.forEach((b) => b.setAttribute('aria-pressed', String(b === btn)));
|
|
||||||
renderPrompts();
|
|
||||||
}));
|
|
||||||
|
|
||||||
copyBtn.addEventListener('click', async () => {
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(promptRuled.textContent);
|
|
||||||
copyBtn.dataset.copied = 'true';
|
|
||||||
copyBtn.textContent = 'Copied';
|
|
||||||
setTimeout(() => { copyBtn.dataset.copied = 'false'; copyBtn.textContent = 'Copy ruled prompt'; }, 1400);
|
|
||||||
} catch {
|
|
||||||
copyBtn.textContent = 'Copy failed — select and copy manually';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
renderRules();
|
|
||||||
renderPrompts();
|
|
||||||
bind();
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<title>Guardrails — Hands-on Rules</title>
|
|
||||||
<link rel="stylesheet" href="styles.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<header>
|
|
||||||
<div><span>HANDS-ON / RULES</span><h1>Guardrails</h1></div>
|
|
||||||
<p>Toggle rules. Same task, different coverage.</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section aria-labelledby="rules-heading">
|
|
||||||
<div class="section-head"><h2 id="rules-heading">Rule sources</h2><span id="rule-count">0 / 5 active</span></div>
|
|
||||||
<div id="rule-list" class="rule-list"></div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section aria-labelledby="prompt-heading">
|
|
||||||
<div class="section-head"><h2 id="prompt-heading">Prompt diff</h2>
|
|
||||||
<div class="lang-switch" role="group" aria-label="Language">
|
|
||||||
<button type="button" data-lang="en" aria-pressed="true">EN</button>
|
|
||||||
<button type="button" data-lang="pt" aria-pressed="false">PT</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="prompt-grid">
|
|
||||||
<article class="prompt-card" data-side="naive">
|
|
||||||
<header><span>NAIVE</span><h3>Plain prompt</h3></header>
|
|
||||||
<pre id="prompt-naive"></pre>
|
|
||||||
</article>
|
|
||||||
<article class="prompt-card" data-side="ruled">
|
|
||||||
<header><span>RULED</span><h3>With guardrails</h3></header>
|
|
||||||
<pre id="prompt-ruled"></pre>
|
|
||||||
<button id="copy-btn" type="button">Copy ruled prompt</button>
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
<script src="app.js" defer></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
:root{--paper:#f4f3ef;--ink:#173044;--muted:#687d8c;--blue:#5683a1;--gold:#efc86d;--line:#d5dde1}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--paper);color:var(--ink);font-family:Arial,sans-serif}main{width:min(880px,calc(100% - 40px));margin:0 auto;padding:70px 0}header,.section-head{display:flex;justify-content:space-between;gap:30px;align-items:end}header{padding-bottom:50px;border-bottom:1px solid var(--line)}header span,.prompt-card>header span{font:10px monospace;letter-spacing:.08em}h1{margin:12px 0 0;font-size:clamp(48px,10vw,100px);letter-spacing:-.08em}header p{max-width:220px;color:var(--muted);line-height:1.5}section{padding-top:45px}h2{font-size:24px}.section-head>span{color:var(--blue);font:11px monospace}.rule-list,.prompt-grid{display:grid;gap:1px;background:var(--line);border:1px solid var(--line)}.rule{display:grid;grid-template-columns:1fr auto auto;gap:20px;padding:22px;background:var(--paper);align-items:center}.rule h3{margin:0 0 6px;font-size:17px}.rule p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}.rule code{font:11px ui-monospace,monospace;color:var(--ink);background:var(--paper);padding:1px 5px;border:1px solid var(--line)}.rule-tag{font:10px monospace;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}.toggle{appearance:none;width:44px;height:24px;border:1px solid var(--line);background:var(--paper);border-radius:12px;position:relative;cursor:pointer;transition:background .15s ease}.toggle::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;background:var(--ink);border-radius:50%;transition:transform .15s ease,background .15s ease}.toggle[aria-pressed="true"]{background:var(--blue);border-color:var(--blue)}.toggle[aria-pressed="true"]::after{transform:translateX(20px);background:var(--gold)}.prompt-grid{grid-template-columns:1fr 1fr;margin-top:18px}.prompt-card{background:var(--paper);padding:22px;display:flex;flex-direction:column;gap:14px}.prompt-card>header{display:flex;justify-content:space-between;align-items:end;padding-bottom:0;border-bottom:0}.prompt-card h3{margin:0;font-size:17px}.prompt-card pre{margin:0;font:12px ui-monospace,monospace;white-space:pre-wrap;word-break:break-word;color:var(--ink);background:var(--paper);border:1px solid var(--line);padding:14px;min-height:160px;line-height:1.5}#copy-btn{align-self:flex-start;appearance:none;border:1px solid var(--ink);background:var(--ink);color:var(--paper);font:11px monospace;letter-spacing:.08em;padding:9px 14px;cursor:pointer;text-transform:uppercase}#copy-btn[data-copied="true"]{background:var(--blue);border-color:var(--blue)}.lang-switch{display:flex;gap:1px;border:1px solid var(--line)}.lang-switch button{appearance:none;border:0;background:var(--paper);color:var(--muted);font:11px monospace;letter-spacing:.08em;padding:6px 10px;cursor:pointer;text-transform:uppercase}.lang-switch button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}@media(max-width:720px){.prompt-grid{grid-template-columns:1fr}.rule{grid-template-columns:1fr}.rule-tag{display:none}}@media(max-width:560px){header{display:block}header p{margin-top:24px}.lang-switch{flex:1}.lang-switch button{flex:1}}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# Tiny Tasks hands-on starter
|
|
||||||
|
|
||||||
A dependency-free HTML/CSS/JavaScript exercise used by the AI For Dummies
|
|
||||||
presentation. The task list renders; status filtering is intentionally absent.
|
|
||||||
|
|
||||||
Run from the repository root:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python3 -m http.server 4173
|
|
||||||
```
|
|
||||||
|
|
||||||
Open <http://localhost:4173/hands-on/starter/> and paste either prompt from the
|
|
||||||
presentation into a fresh coding-agent session rooted at this repository.
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
const tasks = [
|
|
||||||
{ title: 'Review pull request', owner: 'Maya', status: 'open' },
|
|
||||||
{ title: 'Write release notes', owner: 'Theo', status: 'done' },
|
|
||||||
{ title: 'Check mobile layout', owner: 'Lina', status: 'open' }
|
|
||||||
];
|
|
||||||
|
|
||||||
const list = document.querySelector('#task-list');
|
|
||||||
const count = document.querySelector('#task-count');
|
|
||||||
|
|
||||||
function renderTasks() {
|
|
||||||
list.innerHTML = tasks.map((task) => `<article class="task" data-status="${task.status}"><div><h3>${task.title}</h3><p>Owner: ${task.owner}</p></div><span class="task-meta">${task.status}</span></article>`).join('');
|
|
||||||
count.textContent = `${tasks.length} tasks`;
|
|
||||||
}
|
|
||||||
|
|
||||||
renderTasks();
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<title>Tiny Tasks — Hands-on Starter</title>
|
|
||||||
<link rel="stylesheet" href="styles.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<header>
|
|
||||||
<div><span>HANDS-ON / STARTER</span><h1>Tiny Tasks</h1></div>
|
|
||||||
<p>Three tasks. One missing filter.</p>
|
|
||||||
</header>
|
|
||||||
<section aria-labelledby="task-heading">
|
|
||||||
<div class="section-head"><h2 id="task-heading">Today</h2><span id="task-count"></span></div>
|
|
||||||
<div id="task-list" class="task-list"></div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
<script src="app.js" defer></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
:root{--paper:#f4f3ef;--ink:#173044;--muted:#687d8c;--blue:#5683a1;--gold:#efc86d;--line:#d5dde1}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--paper);color:var(--ink);font-family:Arial,sans-serif}main{width:min(880px,calc(100% - 40px));margin:0 auto;padding:70px 0}header,.section-head{display:flex;justify-content:space-between;gap:30px;align-items:end}header{padding-bottom:50px;border-bottom:1px solid var(--line)}header span,.task-meta{font:10px monospace;letter-spacing:.08em}h1{margin:12px 0 0;font-size:clamp(48px,10vw,100px);letter-spacing:-.08em}header p{max-width:220px;color:var(--muted);line-height:1.5}section{padding-top:45px}h2{font-size:24px}.section-head>span{color:var(--blue);font:11px monospace}.task-list{display:grid;gap:1px;background:var(--line);border:1px solid var(--line)}.task{display:grid;grid-template-columns:1fr auto;gap:20px;padding:22px;background:var(--paper)}.task h3{margin:0 0 8px;font-size:17px}.task p{margin:0;color:var(--muted);font-size:13px}.task-meta{align-self:center;padding:7px 9px;color:var(--ink);background:var(--gold)}.task[data-status="done"] .task-meta{color:var(--paper);background:var(--blue)}@media(max-width:560px){header{display:block}header p{margin-top:24px}.task{grid-template-columns:1fr}.task-meta{justify-self:start}}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<meta name="description" content="AI For Dummies: a practical route map for models, agents, worktrees, skills, rules, and verification.">
|
|
||||||
<title>AI For Dummies — Start here</title>
|
|
||||||
<link rel="stylesheet" href="chapters.css">
|
|
||||||
<link rel="stylesheet" href="landing.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<header class="top"><a href="./" aria-current="page">AI FOR DUMMIES</a><span>00 / START HERE</span><a href="skills-review/">review desk ↗</a></header>
|
|
||||||
<section class="hero"><p class="eyebrow">The short route</p><h1>Ship the<br><em>system.</em></h1><p>Start with the map. Then open the one chapter that matches the decision in front of you: model, agent, worktree, skill, rule, or proof.</p><a class="guide-launch" href="full-guide/">Take the full field guide <span>→</span></a></section>
|
|
||||||
<section class="grid route-grid" aria-label="Guide chapters">
|
|
||||||
<article class="card"><b>01</b><h2>Models</h2><p>Capability and effort are separate knobs.</p><a href="models/">Open chapter →</a></article>
|
|
||||||
<article class="card"><b>02</b><h2>Agents & trees</h2><p>Bound roles, handoffs, and worktrees.</p><a href="agents/">Open chapter →</a></article>
|
|
||||||
<article class="card"><b>03</b><h2>Skills</h2><p>Capture repeatable decisions in small packages.</p><a href="skills/">Open chapter →</a></article>
|
|
||||||
<article class="card"><b>04</b><h2>Rules</h2><p>Connect guidance to enforcement.</p><a href="rules/">Open chapter →</a></article>
|
|
||||||
<article class="card"><b>05</b><h2>Hands-on</h2><p>Compare a strong prompt with skill-enabled work.</p><a href="hands-on/starter/">Open lab →</a></article>
|
|
||||||
<article class="card"><b>06</b><h2>Review desk</h2><p>Browse original packages, references, scripts, and improvements.</p><a href="skills-review/">Open desk →</a></article>
|
|
||||||
</section>
|
|
||||||
<section class="landing-note"><span>THE THREAD</span><strong>Frame uncertainty → isolate execution → preserve judgment → verify the change.</strong></section>
|
|
||||||
<footer>The route map is now the default entry. The full guide remains available whenever you want the whole narrative.</footer>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
.guide-launch{display:inline-flex;gap:14px;align-items:center;margin-top:20px;padding:12px 16px;background:var(--ink);color:var(--paper);font:700 12px var(--font-mono);letter-spacing:.06em;text-decoration:none;text-transform:uppercase;transition:transform .2s ease,background .2s ease}.guide-launch:hover{transform:translateY(-3px);background:var(--blue)}.guide-launch span{color:var(--gold);font-size:22px;line-height:0}.route-grid .card{display:flex;min-width:0;flex-direction:column}.route-grid .card a{margin-top:auto}.landing-note{display:grid;grid-template-columns:170px minmax(0,1fr);gap:30px;margin:0 0 70px;padding:25px 0;border-top:1px solid var(--ink);border-bottom:1px solid var(--ink)}.landing-note span{color:var(--red);font:700 11px var(--font-mono);letter-spacing:.1em}.landing-note strong{font-size:clamp(22px,3.2vw,42px);line-height:1.08;letter-spacing:-.04em}@media(max-width:520px){.landing-note{grid-template-columns:1fr;gap:9px;margin-bottom:45px}}@media(prefers-reduced-motion:reduce){.guide-launch{transition:none}.guide-launch:hover{transform:none}}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>AI For Dummies — Models</title><link rel="stylesheet" href="../chapters.css"></head><body><main><header class="top"><a href="../summary/">← ROUTE MAP</a><span>01 / MODELS</span><a href="../full-guide/">field guide ↗</a></header><section class="hero"><p class="eyebrow">Model routing</p><h1>Choose the<br><em>engine.</em></h1><p>A model has a capability ceiling. Effort controls how much room it gets to reason. Route by uncertainty and verification cost.</p></section><section class="grid"><article class="card"><b>LOW</b><h2>Bounded rhythm</h2><p>Lookup, small edits, formatting, and transformations with clear checks.</p></article><article class="card"><b>MEDIUM</b><h2>Default work</h2><p>Normal implementation where the contract is clear but context matters.</p></article><article class="card"><b>HIGH</b><h2>Ambiguity</h2><p>Planning, architecture, security judgment, and hard failures.</p></article></section><section class="model"><div><p class="eyebrow">Two knobs</p><h2>Capability<br>× effort</h2></div><div class="panel"><strong>ROUTING RULE</strong><code>strong model + high effort → frame ambiguity · light model + low effort → bounded execution · raise one knob at a time → compare evidence</code></div></section><section class="practice"><div><p class="eyebrow">Sequence</p><h2>Spend judgment<br>where it <em>compounds.</em></h2></div><div class="steps"><article><b>01</b><div><strong>Plan</strong><span>Strong model: scope, risks, acceptance, and worktree split.</span></div></article><article><b>02</b><div><strong>Build</strong><span>Focused worker: smallest context and lightest model that can pass.</span></div></article><article><b>03</b><div><strong>Review</strong><span>Independent pass when missed issues cost more than the call.</span></div></article></div></section><nav class="links"><a href="../agents/">Next: agents & trees →</a><a href="../rules/">Rules case study →</a></nav></main></body></html>
|
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
"verify": "node scripts/verify.mjs && node scripts/audit-ui.mjs && node .agents/scripts/check-tokens.mjs",
|
"verify": "node scripts/verify.mjs && node scripts/audit-ui.mjs && node .agents/scripts/check-tokens.mjs",
|
||||||
"gate": "./.agents/scripts/gate.sh",
|
"gate": "./.agents/scripts/gate.sh",
|
||||||
"snapshot": "node .agents/scripts/snapshot-route.mjs",
|
"snapshot": "node .agents/scripts/snapshot-route.mjs",
|
||||||
"serve": "python3 -m http.server 4173",
|
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -57,3 +57,81 @@ git rev-parse origin/pages # write it down
|
|||||||
- [ ] Old files deleted; `pnpm run gate` green
|
- [ ] Old files deleted; `pnpm run gate` green
|
||||||
- [ ] Docs match reality
|
- [ ] Docs match reality
|
||||||
- [ ] Previous `pages` SHA recorded for rollback
|
- [ ] Previous `pages` SHA recorded for rollback
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Cutover record
|
||||||
|
|
||||||
|
`origin/pages` before cutover: **`37a1e480c6bffb0bff77ad3854ec068688c17d7b`**
|
||||||
|
("Merge branch 'main' into pages"). Reset `pages` to this SHA to roll back.
|
||||||
|
|
||||||
|
### Step 1 — verification before deletion
|
||||||
|
|
||||||
|
`rendered-text-diff.mjs` compares the _rendered_ DOM of each legacy page against
|
||||||
|
its Astro replacement. Deleting the legacy files makes that comparison
|
||||||
|
impossible, so the full sweep was taken first, against the post-cutover build:
|
||||||
|
|
||||||
|
| Route | Legacy spans | Astro spans | Missing | Extra |
|
||||||
|
| ----------------- | -----------: | ----------: | ------: | ----: |
|
||||||
|
| `/` | 36 | 36 | 0 | 0 |
|
||||||
|
| `/full-guide/` | 432 | 432 | 0 | 0 |
|
||||||
|
| `/summary/` | 34 | 34 | 0 | 0 |
|
||||||
|
| `/models/` | 36 | 36 | 0 | 0 |
|
||||||
|
| `/agents/` | 39 | 39 | 0 | 0 |
|
||||||
|
| `/skills/` | 48 | 48 | 0 | 0 |
|
||||||
|
| `/rules/` | 119 | 119 | 0 | 0 |
|
||||||
|
| `/skills-review/` | 178 | 178 | 0 | 0 |
|
||||||
|
| `/full-guide/` pt | 431 | 431 | 0 | 0 |
|
||||||
|
| `/rules/` pt | 119 | 119 | 0 | 0 |
|
||||||
|
|
||||||
|
`computed-style-diff.mjs full-guide --widths 880,1050` → 32 differences,
|
||||||
|
unchanged from the task 15e result, so the file moves below are style-neutral.
|
||||||
|
|
||||||
|
### Step 2 — what could not be deleted
|
||||||
|
|
||||||
|
The brief assumed every legacy file had been superseded. Seven had not: the
|
||||||
|
Astro build still imports them, and `astro build` fails outright without them.
|
||||||
|
|
||||||
|
| File | Imported by |
|
||||||
|
| ------------------------------- | --------------------------------- |
|
||||||
|
| `styles.css` | `src/pages/full-guide.astro` |
|
||||||
|
| `full-guide/audit.css` | `src/pages/full-guide.astro` |
|
||||||
|
| `chapters.css` | `src/layouts/ChapterLayout.astro` |
|
||||||
|
| `skills/styles.css` | `src/pages/skills.astro` |
|
||||||
|
| `skills-review/styles.css` | `src/pages/skills-review.astro` |
|
||||||
|
| `skills-review/change-lens.css` | `src/pages/skills-review.astro` |
|
||||||
|
| `skills-review/app.js` | `src/pages/skills-review.astro` |
|
||||||
|
|
||||||
|
`app.js` pulls in `catalog.js`, `files.js`, and `vote.js`, which pull in
|
||||||
|
`submitted-catalog.js` and `submitted-files.js` — twelve files in all.
|
||||||
|
|
||||||
|
They were moved to `legacy/`, not into `src/`. `check-tokens.mjs` sweeps `src`,
|
||||||
|
and these files are full of raw hex and unnamed breakpoints; moving one into
|
||||||
|
`src/` should mean migrating it to tokens in the same change, never adding a
|
||||||
|
scan exclusion. `legacy/` keeps the checker's scope honest and stops the files
|
||||||
|
sitting at route-shaped paths next to the routes they no longer serve.
|
||||||
|
|
||||||
|
Deleted outright (32 files): `app.js`, `responsive.css`, `landing.css`,
|
||||||
|
`rules/app.js`, `rules/styles.css`, `skills/app.js`, all ten `index.html` files,
|
||||||
|
and the root `hands-on/` copy — byte-identical to `public/hands-on/`, which is
|
||||||
|
what the build ships.
|
||||||
|
|
||||||
|
### Step 3 — verify.mjs off the legacy source
|
||||||
|
|
||||||
|
Two assertions read `app.js` to parse `translations.pt`. The 102 strings were
|
||||||
|
extracted verbatim before deletion into `.agents/snapshots/full-guide-pt.json` —
|
||||||
|
a legacy capture, not a snapshot of the Astro build, so the check still asserts
|
||||||
|
against an independent source.
|
||||||
|
|
||||||
|
The brace-matching helper went with the file, taking one assertion. It was
|
||||||
|
replaced by a check that no snapshot entry is empty: without it, trimming the
|
||||||
|
snapshot would make the "every string is present" assertion pass vacuously.
|
||||||
|
Count stays at 84.
|
||||||
|
|
||||||
|
`audit-ui.mjs` now reads the ten pages from `dist/`, resolving Astro's
|
||||||
|
base-absolute `/ai-for-dummies/...` hrefs against `dist/`.
|
||||||
|
|
||||||
|
### Not done here
|
||||||
|
|
||||||
|
Steps 3, 4, and 6 — publish, verify on the real host, fast-forward `pages` — are
|
||||||
|
untouched. They need a human present.
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
.topbar-tools{display:flex;align-items:center;gap:24px}
|
|
||||||
.skills-review-link{color:var(--blue);font:700 9px var(--font-mono);letter-spacing:.06em;text-decoration:none;text-transform:uppercase;white-space:nowrap}.skills-review-link:hover{color:var(--accent)}
|
|
||||||
.lang-switch{display:flex;align-items:center;gap:6px;color:var(--muted);font:500 10px var(--font-mono);letter-spacing:.1em}
|
|
||||||
.lang-switch button{padding:0;border:0;color:inherit;background:transparent;font:inherit;cursor:pointer}
|
|
||||||
.lang-switch button.active{color:var(--ink);font-weight:700}
|
|
||||||
.lang-switch button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
|
|
||||||
@media(max-width:800px){.topbar-tools{margin-left:auto}}
|
|
||||||
@media(max-width:600px){.topbar-tools .edition{display:none}}
|
|
||||||
|
|
||||||
/* Interactive operations map */
|
|
||||||
.interaction-hint{margin-top:24px!important;padding-left:18px;border-left:3px solid var(--gold);font:500 11px/1.6 var(--font-mono)!important;color:var(--muted)!important}
|
|
||||||
button{font-family:inherit}
|
|
||||||
.worker-card{display:grid;align-content:space-between;gap:20px;min-height:180px;padding:22px;border:0;color:var(--paper);background:var(--ink);text-align:left;cursor:pointer;transition:background .2s ease,transform .2s ease}
|
|
||||||
.worker-card span{color:#9eabb4;font:500 10px var(--font-mono);letter-spacing:.1em}
|
|
||||||
.worker-card strong{font-size:16px;line-height:1.2}.worker-card code{color:var(--gold);font:11px var(--font-mono)}
|
|
||||||
.worker-card:hover,.worker-card.active{background:#244760}.worker-card.active{box-shadow:inset 0 -4px 0 var(--gold)}.worker-card:active{transform:translateY(2px)}
|
|
||||||
.worker-detail{display:grid;grid-template-columns:.55fr 1.1fr 1.2fr;gap:1px;margin-top:1px;background:var(--line)}
|
|
||||||
.worker-detail>*{margin:0;padding:16px 20px;background:#edf0f1}.worker-detail span,.worker-detail small{font:500 10px/1.5 var(--font-mono);letter-spacing:.06em;text-transform:uppercase}.worker-detail span{color:var(--accent)}.worker-detail strong{font-size:13px}.worker-detail small{color:var(--muted);text-transform:none}
|
|
||||||
|
|
||||||
.tree-lab{min-width:0;border:1px solid #41596b;background:#0b1b27;box-shadow:18px 18px 0 #081621}
|
|
||||||
.tree-toolbar{display:flex;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #41596b;color:#9eabb4;font:500 9px var(--font-mono);letter-spacing:.1em;text-transform:uppercase}
|
|
||||||
.tree-live{display:flex;align-items:center;gap:8px}.tree-live i{display:block;width:7px;height:7px;border-radius:50%;background:#80c69a;box-shadow:0 0 0 4px #80c69a22}
|
|
||||||
.tree-stage{position:relative;height:330px;overflow:hidden;background-image:linear-gradient(#ffffff06 1px,transparent 1px),linear-gradient(90deg,#ffffff06 1px,transparent 1px);background-size:24px 24px}
|
|
||||||
.tree-stage svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.tree-edge{fill:none;stroke:#527f9f;stroke-width:2;stroke-dasharray:5 5;vector-effect:non-scaling-stroke}.tree-edge.trunk{stroke:var(--gold);stroke-dasharray:none;stroke-width:3}
|
|
||||||
.tree-node{position:absolute;z-index:2;display:grid;gap:6px;width:164px;padding:13px 15px;border:1px solid #527085;color:var(--paper);background:#112a3b;text-align:left;cursor:pointer;transition:border-color .2s ease,background .2s ease,transform .2s ease,box-shadow .2s ease}
|
|
||||||
.tree-node span,.tree-node small{font:500 8px var(--font-mono);letter-spacing:.08em}.tree-node span{color:#8ca1af}.tree-node strong{font:600 12px var(--font-mono)}.tree-node small{color:#a9b6be}
|
|
||||||
.tree-node.root{top:25px;left:50%;transform:translateX(-50%);border-color:var(--gold)}.tree-node.branch{top:220px}.tree-node.ui{left:3%}.tree-node.tests{left:50%;transform:translateX(-50%)}.tree-node.docs{right:3%}
|
|
||||||
.tree-node:hover,.tree-node.active{border-color:var(--gold);background:#1c425a;box-shadow:0 0 0 4px #efc76b18}.tree-node.root:hover,.tree-node.root.active{transform:translateX(-50%) translateY(-3px)}.tree-node.tests:hover,.tree-node.tests.active{transform:translateX(-50%) translateY(-3px)}.tree-node.ui:hover,.tree-node.ui.active,.tree-node.docs:hover,.tree-node.docs.active{transform:translateY(-3px)}
|
|
||||||
.tree-detail{display:grid;grid-template-columns:.7fr 1fr 1.6fr;gap:1px;border-top:1px solid #41596b;background:#41596b}.tree-detail>div,.tree-detail>p,.tree-detail>code{margin:0;padding:18px;background:#102536}.tree-detail div{display:grid;gap:8px}.tree-detail span{color:var(--accent);font:500 8px var(--font-mono);letter-spacing:.1em}.tree-detail strong{color:var(--paper);font:500 11px var(--font-mono)}.tree-detail p{color:#aebbc3;font-size:11px;line-height:1.55}.tree-detail code{grid-column:1/-1;color:var(--gold);font:11px var(--font-mono)}
|
|
||||||
|
|
||||||
.route-console{display:grid;gap:14px}.route-table button{display:grid;grid-template-columns:.8fr .9fr 1.4fr;width:100%;padding:0;border:0;color:inherit;background:transparent;text-align:left;cursor:pointer}.route-table button>*{padding:15px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.route-table button:hover,.route-table button.active{background:#e8ecee}.route-table button.active strong{box-shadow:inset 4px 0 0 var(--gold)}
|
|
||||||
.route-detail{display:grid;grid-template-columns:100px 1fr;gap:22px;align-items:center;padding:22px;color:var(--paper);background:var(--deep)}.route-meter{display:grid;align-items:end;width:76px;height:76px;padding:7px;border:1px solid #496274}.route-meter span{display:block;width:100%;height:var(--score);background:var(--gold);transition:height .35s ease}.route-detail>div:last-child{display:grid;gap:7px}.route-detail small{color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.08em}.route-detail strong{font-size:17px}.route-detail p{margin:0;color:#b5c0c7;font-size:12px;line-height:1.5}
|
|
||||||
|
|
||||||
.skill-explorer{display:grid;grid-template-columns:.9fr 1.1fr;min-height:290px;background:var(--blue)}.skill-package button{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:17px 20px;border:0;border-bottom:1px solid #ffffff40;color:var(--paper);background:transparent;text-align:left;cursor:pointer}.skill-package button:hover,.skill-package button.active{background:#315f80}.skill-package button.active{box-shadow:inset 4px 0 0 var(--gold)}.skill-package button code{font:12px var(--font-mono)}.skill-package button small{opacity:.7}
|
|
||||||
.skill-detail{display:grid;grid-template-columns:auto 1fr;gap:18px;align-content:center;padding:28px;color:var(--paper);background:#244760}.skill-detail>span{color:var(--gold);font:42px Georgia,serif}.skill-detail>div{display:grid;gap:13px}.skill-detail strong{font:600 15px var(--font-mono)}.skill-detail p{margin:0;color:#c4cdd3;font-size:12px;line-height:1.65}.skill-detail small{color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.06em;text-transform:uppercase}
|
|
||||||
|
|
||||||
.worker-card:focus-visible,.tree-node:focus-visible,.route-table button:focus-visible,.skill-package button:focus-visible{outline:3px solid var(--gold);outline-offset:-3px}
|
|
||||||
|
|
||||||
/* Model and effort gearbox */
|
|
||||||
.model-gearbox{margin-bottom:150px;padding-top:80px;border-top:1px solid var(--line)}
|
|
||||||
.gearbox-intro{display:grid;grid-template-columns:.9fr 1.1fr;gap:70px;align-items:end;margin:45px 0}.gearbox-intro h2{margin-bottom:0}.gearbox-intro>p{max-width:650px;margin:0;color:var(--muted);font-size:14px;line-height:1.75}
|
|
||||||
.gearbox{display:grid;grid-template-columns:150px minmax(0,1.35fr) minmax(230px,.65fr);grid-template-rows:minmax(410px,auto) auto;border:1px solid var(--line);background:var(--line);gap:1px}
|
|
||||||
.provider-tabs{display:grid;grid-template-rows:repeat(3,1fr);gap:1px;background:var(--line)}.provider-tabs button{border:0;padding:18px;color:var(--ink);background:var(--paper);font:700 10px var(--font-mono);letter-spacing:.08em;cursor:pointer;writing-mode:vertical-rl;transform:rotate(180deg)}.provider-tabs button:hover{background:#eceff0}.provider-tabs button.active{color:var(--paper);background:var(--blue);box-shadow:inset -5px 0 0 var(--gold)}
|
|
||||||
.provider-detail{display:grid;align-content:start;padding:42px clamp(28px,4vw,58px);color:var(--paper);background:var(--deep)}.provider-detail header{display:flex;justify-content:space-between;gap:20px;align-items:center}.provider-detail header span{color:var(--gold);font:500 9px var(--font-mono);letter-spacing:.09em}.provider-detail header a{color:#cbd9e1;font:500 9px var(--font-mono)}.provider-detail h3{margin:34px 0 12px;font-size:clamp(34px,4vw,62px);letter-spacing:-.06em}.provider-detail>p{max-width:730px;margin:0;color:#b7c7d1;font-size:13px;line-height:1.7}.model-ladder{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin-top:34px;background:#ffffff2b}.model-ladder div{padding:18px;background:#18364a}.model-ladder span{display:block;color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.08em}.model-ladder strong{display:block;margin-top:10px;font-size:13px}.model-ladder small{display:block;margin-top:7px;color:#aebfc9;font-size:10px;line-height:1.4}
|
|
||||||
.effort-rail{display:grid;grid-template-rows:auto repeat(3,1fr);background:#e9ecee}.effort-rail>span{padding:17px;color:var(--accent);font:700 8px var(--font-mono);letter-spacing:.08em}.effort-rail button{display:grid;align-content:center;gap:8px;padding:22px;border:0;border-top:1px solid var(--line);color:var(--ink);background:var(--paper);text-align:left;cursor:pointer}.effort-rail button b{font:700 18px var(--font-mono)}.effort-rail button small{color:var(--muted);font-size:10px}.effort-rail button:hover{background:#eceff0}.effort-rail button.active{color:var(--paper);background:var(--accent);box-shadow:inset 5px 0 0 var(--gold)}.effort-rail button.active small{color:#eeedf6}
|
|
||||||
.effort-detail{grid-column:1/-1;display:grid;grid-template-columns:150px 1fr auto;gap:25px;align-items:center;padding:22px 28px;color:var(--paper);background:#132b3b}.effort-detail>span{color:var(--gold);font:500 9px var(--font-mono);letter-spacing:.08em}.effort-detail p{margin:0;font-size:12px;line-height:1.55}.effort-detail code{padding:10px 12px;color:var(--gold);background:#081621;font:10px var(--font-mono)}.gearbox-rule{display:grid;grid-template-columns:150px 1fr;gap:25px;padding:24px 28px;color:var(--ink);background:var(--gold)}.gearbox-rule span{color:var(--accent);font:700 9px var(--font-mono);letter-spacing:.08em}.gearbox-rule strong{font-size:13px;line-height:1.5}.provider-tabs button:focus-visible,.effort-rail button:focus-visible,.provider-detail a:focus-visible{outline:3px solid var(--gold);outline-offset:-3px}
|
|
||||||
|
|
||||||
/* Skill shelf */
|
|
||||||
.skill-builder{margin-bottom:150px;padding-top:80px;border-top:1px solid var(--line)}
|
|
||||||
.builder-intro{display:grid;grid-template-columns:.95fr 1.05fr;gap:70px;align-items:end;margin:45px 0}.builder-intro h2{margin-bottom:0}.builder-intro>p{max-width:620px;margin:0;color:var(--muted);font-size:14px;line-height:1.75}
|
|
||||||
.builder-workbench{display:grid;grid-template-columns:minmax(220px,.65fr) minmax(380px,1.35fr) minmax(270px,.85fr);min-height:570px;border:1px solid var(--line);background:var(--line)}
|
|
||||||
.builder-steps{display:grid;grid-template-rows:repeat(5,1fr);gap:1px;background:var(--line)}.builder-steps button{display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;align-content:center;column-gap:13px;padding:18px;border:0;color:var(--ink);background:var(--paper);text-align:left;cursor:pointer}.builder-steps button b{grid-row:1/-1;align-self:center;color:var(--accent);font:500 11px var(--font-mono)}.builder-steps button span{font:700 12px var(--font-mono)}.builder-steps button small{margin-top:5px;color:var(--muted);font-size:10px}.builder-steps button:hover{background:#eceff0}.builder-steps button.active{color:var(--paper);background:var(--blue);box-shadow:inset 5px 0 0 var(--gold)}.builder-steps button.active b,.builder-steps button.active small{color:var(--gold)}
|
|
||||||
.builder-detail{display:grid;grid-template-rows:auto auto auto 1fr auto;align-content:start;padding:38px clamp(28px,4vw,58px);color:var(--paper);background:var(--deep)}.builder-detail header{display:flex;justify-content:space-between;align-items:center}.builder-detail header span{color:#ffffff30;font:500 54px var(--font-mono)}.builder-detail header small,.builder-action span,.builder-detail footer span{color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.1em}.builder-detail h3{margin:27px 0 14px;font-size:clamp(26px,3vw,44px);line-height:1.05;letter-spacing:-.05em}.builder-detail blockquote{margin:0;padding:0;color:#a9bcc8;font:italic 20px/1.35 Georgia,serif}.builder-action{align-self:center;margin:34px 0}.builder-action p{margin:11px 0 0;color:#d5dde2;font-size:13px;line-height:1.7}.builder-detail footer{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:#ffffff2b}.builder-detail footer>div{display:grid;gap:10px;padding:17px;background:#18364a}.builder-detail footer strong{font-size:11px;line-height:1.5}
|
|
||||||
.builder-artifact{display:grid;grid-template-rows:auto 1fr auto;color:var(--paper);background:#0b1b27}.artifact-head{display:flex;justify-content:space-between;padding:17px;border-bottom:1px solid #344c5d;font:500 8px var(--font-mono);letter-spacing:.09em}.artifact-head i{width:8px;height:8px;border-radius:50%;background:#80c69a;box-shadow:0 0 0 4px #80c69a20}.builder-artifact pre{display:grid;align-items:center;margin:0;padding:28px;overflow:auto;color:#bed0dc;background-image:linear-gradient(#ffffff05 1px,transparent 1px),linear-gradient(90deg,#ffffff05 1px,transparent 1px);background-size:22px 22px}.builder-artifact pre code{font:12px/1.9 var(--font-mono)}.artifact-command{display:grid;gap:9px;padding:18px;border-top:1px solid #344c5d}.artifact-command span{color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.09em}.artifact-command code{font:10px var(--font-mono)}
|
|
||||||
.builder-loop{display:grid;grid-template-columns:200px 1fr;gap:25px;padding:23px 28px;color:var(--ink);background:var(--gold)}.builder-loop>span{font:700 9px var(--font-mono);letter-spacing:.09em}.builder-loop>div{font:600 11px var(--font-mono)}.builder-loop i{margin:0 12px;color:var(--accent);font-style:normal}.builder-steps button:focus-visible{position:relative;z-index:2;outline:3px solid var(--gold);outline-offset:-3px}
|
|
||||||
|
|
||||||
.skill-catalog{margin-bottom:130px;padding-top:80px;border-top:1px solid var(--line)}.verification{padding-top:80px;border-top:1px solid var(--line);margin-bottom:130px}.verify-intro{display:grid;grid-template-columns:.9fr 1.1fr;gap:70px;align-items:end;margin:45px 0}.verify-intro h2{margin-bottom:0}.verify-intro>p{max-width:650px;margin:0;color:var(--muted);font-size:14px;line-height:1.75}.verify-layers{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin-top:1px;background:var(--line);border:1px solid var(--line)}.verify-layers article{background:var(--paper);padding:24px 22px;display:grid;gap:12px;grid-template-rows:auto auto 1fr auto}.verify-layers article>span{font:500 9px var(--font-mono);letter-spacing:.09em;color:var(--accent)}.verify-layers article h3{margin:0;font-size:18px;letter-spacing:-.02em}.verify-layers article p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}.verify-layers article code{font:10.5px var(--font-mono);color:var(--ink);background:var(--paper);border:1px solid var(--line);padding:10px 12px;white-space:pre-wrap;word-break:break-word;line-height:1.55}.verify-antipatterns{margin-top:55px}.verify-antipatterns>span{font:500 9px var(--font-mono);letter-spacing:.09em;color:var(--muted)}.ap-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;margin-top:14px;background:var(--line);border:1px solid var(--line)}.ap-grid article{display:grid;grid-template-columns:auto 1fr;gap:8px 18px;align-items:start;background:var(--paper);padding:18px 20px}.ap-grid article b{font:500 22px var(--font-mono);color:var(--accent);line-height:1;align-self:center}.ap-grid article strong{font-size:15px;letter-spacing:-.01em}.ap-grid article p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.ap-grid article code{font:11px var(--font-mono);color:var(--ink);background:var(--paper);padding:1px 4px;border:1px solid var(--line)}.verify-cta{margin-top:55px;padding:26px 28px;color:var(--paper);background:var(--ink)}.verify-cta>span{font:500 9px var(--font-mono);letter-spacing:.09em;color:var(--gold)}.verify-cta-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin-top:18px;background:#ffffff1f}.verify-card{display:grid;gap:6px;background:var(--ink);padding:20px 22px;color:var(--paper);text-decoration:none;border-bottom:2px solid var(--gold)}.verify-card strong{font-size:17px;letter-spacing:-.01em}.verify-card p{margin:0;color:#bfccd4;font-size:13px;line-height:1.55}.verify-card p code{font:11px var(--font-mono);color:var(--gold);background:#0f2230;padding:1px 5px;border:1px solid #2a4150}.verify-card small{font:500 10px var(--font-mono);color:var(--gold);letter-spacing:.09em}@media(max-width:880px){.verify-layers,.verify-cta-grid{grid-template-columns:1fr}.verify-intro{grid-template-columns:1fr}}@media(max-width:560px){.verify-intro{display:block}.verify-intro>p{margin-top:18px}.ap-grid{grid-template-columns:1fr}.verify-cta{padding:22px 20px}}
|
|
||||||
.catalog-intro{display:grid;grid-template-columns:.9fr 1.1fr;gap:70px;align-items:end;margin:45px 0}.catalog-intro h2{margin-bottom:0}.catalog-intro>p{max-width:620px;margin:0;color:var(--muted);font-size:14px;line-height:1.75}
|
|
||||||
.skill-deck{display:grid;grid-template-columns:minmax(270px,.8fr) minmax(0,1.7fr);min-height:620px;border:1px solid var(--line);background:var(--line)}
|
|
||||||
.skill-index{display:grid;grid-template-rows:repeat(7,1fr);gap:1px;background:var(--line)}
|
|
||||||
.skill-index button{display:grid;grid-template-columns:95px 1fr;grid-template-rows:auto auto;align-content:center;column-gap:18px;padding:16px 20px;border:0;color:var(--ink);background:var(--paper);text-align:left;cursor:pointer;transition:background .2s ease,color .2s ease}
|
|
||||||
.skill-index button span{grid-row:1/-1;align-self:center;color:var(--accent);font:500 8px var(--font-mono);letter-spacing:.08em}.skill-index button strong{font:600 13px var(--font-mono)}.skill-index button small{margin-top:5px;color:var(--muted);font-size:10px}.skill-index button:hover{background:#eceff0}.skill-index button.active{color:var(--paper);background:var(--deep);box-shadow:inset 5px 0 0 var(--gold)}.skill-index button.active span,.skill-index button.active small{color:var(--gold)}
|
|
||||||
.common-skill-detail{display:grid;grid-template-rows:auto auto auto 1fr;align-content:start;padding:44px clamp(30px,5vw,78px);color:var(--paper);background:var(--accent);overflow:hidden}.common-skill-detail header{display:flex;justify-content:space-between;align-items:center;padding-bottom:18px;border-bottom:1px solid #ffffff42}.common-skill-detail header span{font:500 48px var(--font-mono);opacity:.34}.common-skill-detail header small{font:500 9px var(--font-mono);letter-spacing:.1em}.common-skill-detail h3{margin:38px 0 18px;font-size:clamp(30px,4vw,60px);letter-spacing:-.06em}.common-skill-detail blockquote{max-width:720px;margin:0 0 38px;padding:0;border:0;color:var(--gold);font:400 clamp(20px,2.5vw,34px)/1.15 Georgia,serif;font-style:italic}.common-skill-notes{display:grid;grid-template-columns:1.45fr .9fr .9fr;gap:1px;align-self:end;background:#ffffff42}.common-skill-notes>div{padding:20px;background:#6c6898}.common-skill-notes span{color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.08em}.common-skill-notes p{margin:12px 0 0;color:#f1f0f7;font-size:12px;line-height:1.55}.common-skill-notes div:nth-child(2) p{font-family:var(--font-mono);font-size:10px}
|
|
||||||
.skill-loadout{display:grid;grid-template-columns:210px 1fr;gap:25px;padding:24px 28px;color:var(--paper);background:var(--ink)}.skill-loadout>span{color:var(--gold);font:500 9px var(--font-mono);letter-spacing:.09em}.skill-loadout>div{font:500 11px var(--font-mono)}.skill-loadout b{color:var(--accent);font-size:9px}.skill-loadout i{margin:0 10px;color:var(--gold);font-style:normal}.skill-index button:focus-visible{position:relative;z-index:2;outline:3px solid var(--gold);outline-offset:-3px}
|
|
||||||
.skill-source{display:inline-block;margin-top:22px;color:var(--gold);font:700 9px var(--font-mono);letter-spacing:.07em;text-decoration:none;border-bottom:1px solid currentColor}.skill-source:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
|
|
||||||
.install-skills{display:grid;grid-template-rows:auto 1fr auto;margin-top:24px;color:var(--paper);background:var(--deep);border-left:7px solid var(--gold)}.install-skills header{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:20px 24px;border-bottom:1px solid #ffffff2d}.install-skills header>div{display:grid;gap:7px}.install-skills header span,.install-skills footer{color:var(--gold);font:500 8px var(--font-mono);letter-spacing:.08em}.install-skills header strong{font-size:15px}.install-skills button{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #ffffff50;color:var(--paper);background:transparent;cursor:pointer}.install-skills button:hover,.install-skills button.copied{color:var(--ink);border-color:var(--gold);background:var(--gold)}.install-skills button i{font-style:normal}.install-skills pre{max-height:360px;margin:0;padding:24px;overflow:auto;white-space:pre-wrap;background:#0b1b27}.install-skills pre code{font:10px/1.7 var(--font-mono)}.install-skills footer{padding:16px 24px;color:#b9c8d1;border-top:1px solid #ffffff2d}.install-skills button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
|
|
||||||
|
|
||||||
/* Copy-ready hands-on lab */
|
|
||||||
.hands-on{margin-bottom:130px;padding-top:80px;border-top:1px solid var(--line)}.hands-intro{display:grid;grid-template-columns:.9fr 1.1fr;gap:70px;align-items:end;margin:45px 0}.hands-intro h2{margin-bottom:0}.hands-intro>div:last-child>p{max-width:650px;margin:0;color:var(--muted);font-size:14px;line-height:1.75}.starter-link{display:inline-block;margin-top:18px;color:var(--blue);font:700 11px var(--font-mono);text-decoration:none;border-bottom:2px solid var(--gold)}.starter-links{display:flex;flex-wrap:wrap;gap:14px 28px;margin-top:18px}.starter-links .starter-link{margin-top:0}.starter-link-group{display:flex;flex-wrap:wrap;gap:6px 18px;align-items:baseline}.starter-link-source{font-weight:500!important;color:var(--muted)!important;border-bottom-color:transparent!important}.verify-card-source{display:block;margin-top:8px;color:#bfccd4;font-size:10px!important;letter-spacing:.05em;text-transform:none;font-weight:500}.verify-card-source span{font-family:var(--font-mono);color:var(--gold)}
|
|
||||||
.exercise-brief{display:grid;grid-template-columns:190px 1fr;gap:22px;padding:26px 30px;color:var(--paper);background:var(--deep)}.exercise-brief>span{color:var(--gold);font:500 9px var(--font-mono);letter-spacing:.09em}.exercise-brief>strong{font-size:clamp(20px,2.6vw,34px);line-height:1.12}.exercise-brief>div{grid-column:2;color:#afbec7;font:500 9px var(--font-mono);letter-spacing:.05em}.exercise-brief b{margin-left:18px;color:var(--accent)}.exercise-brief b:first-child{margin-left:0}
|
|
||||||
.prompt-compare{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin-top:1px;background:var(--line)}.prompt-card{display:grid;grid-template-rows:auto 1fr auto;min-width:0;min-height:600px;color:var(--paper);background:#19364a}.prompt-card.enhanced{background:#596f9a}.prompt-card header{display:flex;justify-content:space-between;align-items:center;padding:20px 22px;border-bottom:1px solid #ffffff32}.prompt-card header>div{display:grid;gap:6px}.prompt-card header span,.prompt-card footer{font:500 8px var(--font-mono);letter-spacing:.09em}.prompt-card header>div span{color:var(--gold)}.prompt-card header strong{font-size:17px}.prompt-card button{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #ffffff50;color:var(--paper);background:transparent;cursor:pointer}.prompt-card button:hover,.prompt-card button.copied{color:var(--ink);border-color:var(--gold);background:var(--gold)}.prompt-card button i{font-style:normal}.prompt-card pre{margin:0;padding:25px;overflow:auto;white-space:pre-wrap}.prompt-card pre code{font:11px/1.72 var(--font-mono)}.prompt-card footer{padding:17px 22px;color:#bfccd4;border-top:1px solid #ffffff32}.prompt-card.enhanced footer{color:#e5e3ef}.prompt-card button:focus-visible,.starter-link:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
|
|
||||||
.comparison-strip{display:grid;grid-template-columns:190px repeat(4,1fr);gap:1px;background:var(--line)}.comparison-strip>*{padding:18px;background:var(--paper)}.comparison-strip>span{color:var(--accent);font:700 9px var(--font-mono);letter-spacing:.08em}.comparison-strip>div{color:var(--muted);font:500 10px var(--font-mono)}.comparison-strip b{margin-right:8px;color:var(--blue)}.copy-status{min-height:20px;margin:15px 0 0;color:var(--blue);font:600 10px var(--font-mono);text-align:right}
|
|
||||||
@media(min-width:1600px){.tree-stage{height:390px}.tree-stage svg{height:330px;top:30px}.tree-node.root{top:45px}.tree-node.branch{top:255px}.tree-node{width:190px;padding:17px}.tree-detail{grid-template-columns:.6fr .8fr 1.8fr}.worker-card{min-height:210px;padding:28px}}
|
|
||||||
@media(min-width:2200px){main{max-width:2880px;padding-inline:clamp(140px,7vw,280px)}.hero{max-width:1420px}.hero h1{font-size:clamp(150px,7vw,220px)}.tree-stage{height:460px}.tree-stage svg{height:380px;top:45px}.tree-node.root{top:65px}.tree-node.branch{top:305px}.tree-node{width:240px;padding:22px}.tree-node strong{font-size:15px}.tree-detail>*{font-size:14px!important}.fleet,.failure-map{margin-bottom:170px}.workflow,.routing,.skills{margin-bottom:180px}}
|
|
||||||
@media(max-width:1100px){.chapter-links{display:none}.builder-workbench{grid-template-columns:minmax(210px,.65fr) minmax(0,1.35fr)}.builder-artifact{grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:auto}.builder-artifact .artifact-head{grid-column:1/-1}.artifact-command{align-content:center;border-top:0;border-left:1px solid #344c5d}}
|
|
||||||
@media(max-width:1050px){.tree-node{width:145px}.tree-detail{grid-template-columns:1fr 1fr}.tree-detail p{grid-column:1/-1}.skill-explorer{grid-template-columns:1fr}}
|
|
||||||
@media(max-width:800px){.worker-detail{grid-template-columns:1fr}.worktrees{display:block}.worktree-intro{margin-bottom:40px}.tree-lab{box-shadow:9px 9px 0 #081621}.route-table button{min-width:620px}.gearbox-intro,.builder-intro,.catalog-intro,.hands-intro{grid-template-columns:1fr;gap:20px}.gearbox{grid-template-columns:1fr 210px;grid-template-rows:auto auto}.provider-tabs{grid-column:1/-1;grid-template-columns:repeat(3,1fr);grid-template-rows:none}.provider-tabs button{writing-mode:horizontal-tb;transform:none}.provider-tabs button.active{box-shadow:inset 0 -5px 0 var(--gold)}.effort-detail{grid-template-columns:110px 1fr}.effort-detail code{grid-column:2}.skill-explorer{grid-template-columns:1fr 1fr}.builder-workbench{grid-template-columns:1fr}.builder-steps{grid-template-columns:1fr 1fr;grid-template-rows:none}.builder-artifact{grid-column:auto}.skill-deck{grid-template-columns:1fr}.skill-index{grid-template-columns:1fr 1fr;grid-template-rows:none}.common-skill-detail{min-height:600px}.common-skill-notes{grid-template-columns:1fr 1fr}.common-skill-notes>div:first-child{grid-column:1/-1}.prompt-compare{grid-template-columns:1fr}.comparison-strip{grid-template-columns:1fr 1fr}.comparison-strip>span{grid-column:1/-1}.exercise-brief{grid-template-columns:1fr}.exercise-brief>div{grid-column:auto}}
|
|
||||||
@media(max-width:600px){.tree-stage{height:auto;min-height:560px;padding:24px}.tree-stage svg{display:none}.tree-node,.tree-node.root,.tree-node.branch,.tree-node.ui,.tree-node.tests,.tree-node.docs{position:relative;top:auto;right:auto;left:auto;width:100%;margin:0 0 34px;transform:none}.tree-node:not(:last-child)::after{content:'↓';position:absolute;left:50%;bottom:-28px;color:var(--gold)}.tree-node:hover,.tree-node.active,.tree-node.root:hover,.tree-node.root.active,.tree-node.tests:hover,.tree-node.tests.active{transform:translateY(-2px)}.tree-detail{grid-template-columns:1fr}.tree-detail p,.tree-detail code{grid-column:auto}.gearbox{grid-template-columns:1fr}.provider-detail,.effort-rail{grid-column:1}.model-ladder{grid-template-columns:1fr}.effort-rail{grid-template-columns:repeat(3,1fr);grid-template-rows:auto auto}.effort-rail>span{grid-column:1/-1}.effort-rail button{text-align:center;border-top:1px solid var(--line);border-left:1px solid var(--line)}.effort-rail button.active{box-shadow:inset 0 -5px 0 var(--gold)}.effort-detail{grid-template-columns:1fr}.effort-detail code{grid-column:auto;overflow:auto}.gearbox-rule{grid-template-columns:1fr}.skill-explorer{grid-template-columns:1fr}.route-detail{grid-template-columns:70px 1fr}.route-meter{width:56px;height:70px}.builder-steps{grid-template-columns:1fr}.builder-steps button{min-height:78px}.builder-detail{padding:28px 24px}.builder-detail footer{grid-template-columns:1fr}.builder-artifact{grid-template-columns:1fr}.builder-artifact .artifact-head{grid-column:auto}.artifact-command{border-left:0;border-top:1px solid #344c5d}.builder-loop{grid-template-columns:1fr}.builder-loop>div{line-height:2}.builder-loop i{margin-inline:4px}.skill-index{grid-template-columns:1fr}.skill-index button{min-height:78px}.common-skill-detail{min-height:0;padding:30px 24px}.common-skill-notes{grid-template-columns:1fr}.common-skill-notes>div:first-child{grid-column:auto}.skill-loadout{grid-template-columns:1fr}.skill-loadout>div{line-height:2}.skill-loadout i{margin-inline:4px}.install-skills header{align-items:flex-start}.install-skills header strong{font-size:12px}.install-skills pre{max-height:500px}.exercise-brief{padding:22px}.exercise-brief>div{line-height:2}.exercise-brief b{margin-left:7px}.prompt-card{min-height:0}.prompt-card pre{max-height:560px}.comparison-strip{grid-template-columns:1fr}.comparison-strip>span{grid-column:auto}.copy-status{text-align:left}}
|
|
||||||
@media(prefers-reduced-motion:reduce){.worker-card,.tree-node,.route-meter span{transition:none}.reading-progress span{transition:none}}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
const languageCopy = {
|
|
||||||
en: {
|
|
||||||
back: 'field guide', navPipeline: 'Pipeline', navExamples: 'Examples', stageContext: 'CONTEXT', stageReview: 'REVIEW', heroEyebrow: 'A real repository case study', heroTitle: 'Rules that<br />survive the <em>prompt.</em>',
|
|
||||||
heroText: 'Prompts ask for behavior. Repositories preserve it. The interview project combines written context, reusable skills, executable checks, commit hooks, and independent review so the rule is still present when the conversation is gone.',
|
|
||||||
heroAside: '8 skills · 3 agents · 4 enforcement layers', thesisLabel: 'THE SHORT VERSION', thesis: 'A prompt is advice for one run. A repository rule is reusable context plus an executable boundary.',
|
|
||||||
pipelineLabel: 'Enforcement pipeline', pipelineMeta: 'select a checkpoint', pipelineEyebrow: 'From intent to evidence', pipelineTitle: 'Five places<br />a rule can <em>hold.</em>', pipelineText: 'Not every rule belongs in a hook. Put guidance where an agent can discover it, deterministic policy in a command, cheap checks at commit time, and independent judgment at review.',
|
|
||||||
skillsLabel: 'Project-local skills', skillsMeta: 'procedures born from repeated friction', skillsEyebrow: 'Small instruction packages', skillsTitle: 'Teach the trap.<br />Name the <em>trigger.</em>', skillsText: 'These skills are not downloaded magic. They are repository-specific procedures under <code>.agents/skills/</code>, distilled from mistakes, commands, and architectural decisions that kept recurring.', skillGate: 'prove green is real', skillParallel: 'worktree per task', skillRepo: 'query before crawling', skillDebt: 'separate line of work', skillWriter: 'repeat twice, encode once', skillArea: 'stack-specific traps',
|
|
||||||
examplesLabel: 'Concrete examples', examplesMeta: 'open the source, then adapt', ratchetLabel: 'CLI RATCHET', ratchetTitle: 'Debt may go down.<br />Never silently up.', hookTitle: 'Fast checks before history.', commitLabel: 'COMMIT MESSAGE', commitTitle: 'Intent has a grammar.', reviewLabel: 'INDEPENDENT REVIEW', reviewTitle: 'A second reader checks intent.', readChecker: 'Read the checker →', readHook: 'Read the hook →', readCommit: 'Read commitlint config →', readReview: 'Read review policy →',
|
|
||||||
copyLabel: 'COPY / ADAPT', copyTitle: 'Ask your agent to map the enforcement stack.', copyText: 'Use this in the interview repository or adapt the path names to another project.', copyButton: 'COPY PROMPT', deeperLabel: 'GO DEEPER', deeperTitle: 'Read the implementation, not just this summary.', deepContext: 'Repository context', deepSkills: 'Skill catalog', deepAgents: 'Specialist agents', deepPolicy: 'Staged-file policy'
|
|
||||||
},
|
|
||||||
pt: {
|
|
||||||
back: 'guia de campo', navPipeline: 'Pipeline', navExamples: 'Exemplos', stageContext: 'CONTEXTO', stageReview: 'REVISÃO', heroEyebrow: 'Um estudo de caso de repositório real', heroTitle: 'Regras que<br />sobrevivem ao <em>prompt.</em>',
|
|
||||||
heroText: 'Prompts pedem comportamento. Repositórios o preservam. O projeto interview combina contexto escrito, skills reutilizáveis, verificações executáveis, hooks de commit e revisão independente para que a regra continue existindo quando a conversa terminar.',
|
|
||||||
heroAside: '8 skills · 3 agentes · 4 camadas de enforcement', thesisLabel: 'A VERSÃO CURTA', thesis: 'Um prompt orienta uma execução. Uma regra de repositório é contexto reutilizável mais uma fronteira executável.',
|
|
||||||
pipelineLabel: 'Pipeline de enforcement', pipelineMeta: 'selecione um checkpoint', pipelineEyebrow: 'Da intenção à evidência', pipelineTitle: 'Cinco lugares<br />onde a regra <em>segura.</em>', pipelineText: 'Nem toda regra pertence a um hook. Coloque orientação onde o agente descobre, política determinística em um comando, checks baratos no commit e julgamento independente na revisão.',
|
|
||||||
skillsLabel: 'Skills locais do projeto', skillsMeta: 'procedimentos nascidos de atrito repetido', skillsEyebrow: 'Pequenos pacotes de instrução', skillsTitle: 'Ensine a armadilha.<br />Nomeie o <em>gatilho.</em>', skillsText: 'Estas skills não são mágica baixada. São procedimentos específicos do repositório em <code>.agents/skills/</code>, extraídos de erros, comandos e decisões arquiteturais recorrentes.', skillGate: 'prove que o verde é real', skillParallel: 'um worktree por tarefa', skillRepo: 'consulte antes de explorar', skillDebt: 'linha de trabalho separada', skillWriter: 'repita duas vezes, codifique uma', skillArea: 'armadilhas da stack',
|
|
||||||
examplesLabel: 'Exemplos concretos', examplesMeta: 'abra a fonte, depois adapte', ratchetLabel: 'CATRACA CLI', ratchetTitle: 'A dívida pode cair.<br />Nunca subir em silêncio.', hookTitle: 'Checks rápidos antes do histórico.', commitLabel: 'MENSAGEM DE COMMIT', commitTitle: 'A intenção tem gramática.', reviewLabel: 'REVISÃO INDEPENDENTE', reviewTitle: 'Um segundo leitor verifica a intenção.', readChecker: 'Ler o checker →', readHook: 'Ler o hook →', readCommit: 'Ler config do commitlint →', readReview: 'Ler política de revisão →',
|
|
||||||
copyLabel: 'COPIAR / ADAPTAR', copyTitle: 'Peça ao agente para mapear o enforcement.', copyText: 'Use isto no repositório interview ou adapte os caminhos para outro projeto.', copyButton: 'COPIAR PROMPT', deeperLabel: 'APROFUNDE', deeperTitle: 'Leia a implementação, não apenas este resumo.', deepContext: 'Contexto do repositório', deepSkills: 'Catálogo de skills', deepAgents: 'Agentes especialistas', deepPolicy: 'Política dos arquivos staged'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const stages = {
|
|
||||||
context: { number: '01', file: 'AGENTS.md', title: { en: 'Give every agent the same map', pt: 'Dê o mesmo mapa a cada agente' }, text: { en: 'Stack, commands, product boundaries, and known traps load before implementation. This is discoverable guidance—not an executable guarantee.', pt: 'Stack, comandos, limites do produto e armadilhas conhecidas carregam antes da implementação. É orientação descobrível — não garantia executável.' }, code: 'Read AGENTS.md\n→ query .agents/db\n→ load area skill', link: 'https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/AGENTS.md' },
|
|
||||||
skills: { number: '02', file: '.agents/skills/', title: { en: 'Load only the relevant procedure', pt: 'Carregue apenas o procedimento relevante' }, text: { en: 'Frontend, Go API, gate discipline, parallel agents, repo databases, issues, skill writing, and tech debt each have a narrow trigger.', pt: 'Frontend, API Go, disciplina de gates, agentes paralelos, bancos do repo, issues, escrita de skills e dívida técnica têm gatilhos estreitos.' }, code: 'request + description\n→ matching SKILL.md\n→ focused workflow', link: 'https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.agents/skills' },
|
|
||||||
cli: { number: '03', file: 'scripts/check-ui-contract.mjs', title: { en: 'Turn measurable policy into a ratchet', pt: 'Transforme política mensurável em catraca' }, text: { en: 'The UI checker counts known violations and fails only when a count rises. Existing debt can be reduced, but a new change cannot quietly increase it.', pt: 'O checker de UI conta violações conhecidas e falha quando o total sobe. Dívida existente pode cair, mas uma mudança não pode aumentá-la em silêncio.' }, code: 'pnpm check:ui\ncurrent ≤ baseline → pass\ncurrent > baseline → fail', link: 'https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/scripts/check-ui-contract.mjs' },
|
|
||||||
commit: { number: '04', file: '.husky/pre-commit', title: { en: 'Block cheap mistakes at the boundary', pt: 'Bloqueie erros baratos na fronteira' }, text: { en: 'Husky runs lint-staged plus the whole-tree UI ratchet. Commitlint separately enforces Conventional Commit messages.', pt: 'Husky executa lint-staged mais a catraca de UI da árvore inteira. Commitlint aplica Conventional Commits separadamente.' }, code: 'git commit\n├─ lint-staged\n├─ check:ui\n└─ commitlint', link: 'https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.husky/pre-commit' },
|
|
||||||
review: { number: '05', file: '.pr-review.json', title: { en: 'Reserve judgment for the PR', pt: 'Reserve julgamento para o PR' }, text: { en: 'An AI reviewer checks security, generated-code discipline, test quality, scope, and repository-specific traps. A verifier independently reruns gates before merge.', pt: 'Um revisor de IA verifica segurança, código gerado, qualidade dos testes, escopo e armadilhas do repositório. Um verifier roda os gates novamente antes do merge.' }, code: 'diff + house rules + prior review\n→ findings + risks\n→ human merge decision', link: 'https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.pr-review.json' }
|
|
||||||
};
|
|
||||||
|
|
||||||
const skills = {
|
|
||||||
gate: { name: 'gate-discipline', trigger: { en: 'Before commit, PR, or merge.', pt: 'Antes de commit, PR ou merge.' }, lesson: { en: 'Run canonical gates separately, inspect exit codes, distrust convenient cache hits, and prove generated code is current.', pt: 'Rode gates separadamente, leia exit codes, desconfie de cache conveniente e prove que código gerado está atual.' }, example: 'pnpm lint; echo "lint=$?"', path: '.agents/skills/gate-discipline/SKILL.md' },
|
|
||||||
parallel: { name: 'parallel-agents', trigger: { en: 'When independent tasks can run concurrently.', pt: 'Quando tarefas independentes podem rodar juntas.' }, lesson: { en: 'One worktree and file ownership per task; prior-art scout first, verifier last, merge sequentially.', pt: 'Um worktree e ownership por tarefa; prior-art scout primeiro, verifier por último, merges sequenciais.' }, example: 'git worktree add .claude/worktrees/task -b feat/task', path: '.agents/skills/parallel-agents/SKILL.md' },
|
|
||||||
repo: { name: 'repo-db', trigger: { en: 'At task start and before debugging.', pt: 'No início da tarefa e antes de diagnosticar.' }, lesson: { en: 'Query the repo map, canonical commands, and known-issues ledger before crawling thousands of files.', pt: 'Consulte mapa, comandos canônicos e known-issues antes de vasculhar milhares de arquivos.' }, example: "jq -r '.verify[]' .agents/db/commands.json", path: '.agents/skills/repo-db/SKILL.md' },
|
|
||||||
debt: { name: 'tech-debt', trigger: { en: 'When unrelated debt appears mid-task.', pt: 'Quando dívida não relacionada aparece no meio.' }, lesson: { en: 'Do not smuggle cleanup into a feature. Record it, give it its own branch, and finish the underlying condition.', pt: 'Não esconda limpeza em uma feature. Registre, dê uma branch própria e finalize a condição original.' }, example: 'feature diff ≠ debt cleanup', path: '.agents/skills/tech-debt/SKILL.md' },
|
|
||||||
writer: { name: 'skill-writer', trigger: { en: 'When a workflow is explained twice.', pt: 'Quando um fluxo é explicado duas vezes.' }, lesson: { en: 'Procedures become skills; isolated facts become known-issues entries. Keep the body short and the trigger discriminating.', pt: 'Procedimentos viram skills; fatos isolados viram known-issues. Corpo curto e gatilho discriminante.' }, example: '.agents/skills/<name>/SKILL.md', path: '.agents/skills/skill-writer/SKILL.md' },
|
|
||||||
area: { name: 'frontend / go-api', trigger: { en: 'When changing the matching subsystem.', pt: 'Ao alterar o subsistema correspondente.' }, lesson: { en: 'Encode version-specific traps close to the work: Next/React/AntD boundaries, Connect APIs, sqlc types, migrations, and code generation.', pt: 'Codifique armadilhas de versão perto do trabalho: Next/React/AntD, APIs Connect, tipos sqlc, migrations e codegen.' }, example: 'area → local skill → canonical checks', path: '.agents/skills/' }
|
|
||||||
};
|
|
||||||
|
|
||||||
const prompts = {
|
|
||||||
en: `Inspect this repository's enforcement stack before changing code.\n\n1. Read AGENTS.md.\n2. List .agents/skills and select only skills whose descriptions match the task.\n3. Query .agents/db/commands.json and .agents/db/known-issues.json.\n4. Explain what is guidance versus mechanically enforced by scripts, Husky, commitlint, CI, and PR review.\n5. For each relevant rule, cite the source path and the command that proves it.\n6. Identify gaps where documentation claims enforcement but no executable check exists.\n\nDo not modify files. Return a compact map: rule → source → enforcement point → verification command → remaining gap.`,
|
|
||||||
pt: `Inspecione a stack de enforcement deste repositório antes de alterar código.\n\n1. Leia AGENTS.md.\n2. Liste .agents/skills e selecione apenas skills cuja descrição corresponda à tarefa.\n3. Consulte .agents/db/commands.json e .agents/db/known-issues.json.\n4. Explique o que é orientação e o que é imposto mecanicamente por scripts, Husky, commitlint, CI e revisão de PR.\n5. Para cada regra relevante, cite o caminho fonte e o comando que a comprova.\n6. Identifique lacunas onde a documentação promete enforcement sem check executável.\n\nNão modifique arquivos. Retorne um mapa compacto: regra → fonte → ponto de enforcement → comando de verificação → lacuna restante.`
|
|
||||||
};
|
|
||||||
|
|
||||||
let language = localStorage.getItem('rules-language') === 'pt' ? 'pt' : 'en';
|
|
||||||
|
|
||||||
function select(selector, value, key) {
|
|
||||||
document.querySelectorAll(selector).forEach((button) => {
|
|
||||||
const active = button.dataset[key] === value;
|
|
||||||
button.classList.toggle('active', active);
|
|
||||||
button.setAttribute('aria-selected', String(active));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderStage(id) {
|
|
||||||
const item = stages[id];
|
|
||||||
document.querySelector('#stage-detail').innerHTML = `<div class="stage-number">${item.number}</div><div><span>${item.file}</span><h3>${item.title[language]}</h3><p>${item.text[language]}</p><a href="${item.link}">${language === 'pt' ? 'ABRIR FONTE ↗' : 'OPEN SOURCE ↗'}</a></div><pre><code>${item.code}</code></pre>`;
|
|
||||||
select('[data-stage]', id, 'stage');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderSkill(id) {
|
|
||||||
const item = skills[id];
|
|
||||||
document.querySelector('#skill-detail').innerHTML = `<header><span>${language === 'pt' ? 'GATILHO' : 'TRIGGER'}</span><strong>${item.trigger[language]}</strong></header><h3>${item.name}</h3><p>${item.lesson[language]}</p><pre><code>${item.example}</code></pre><a href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/${item.path}">${language === 'pt' ? 'LER SKILL ↗' : 'READ SKILL ↗'}</a>`;
|
|
||||||
select('[data-skill]', id, 'skill');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderLanguage(next) {
|
|
||||||
language = next;
|
|
||||||
document.documentElement.lang = language === 'pt' ? 'pt-BR' : 'en';
|
|
||||||
document.querySelectorAll('[data-copy]').forEach((node) => { node.innerHTML = languageCopy[language][node.dataset.copy]; });
|
|
||||||
document.querySelector('#explore-prompt').textContent = prompts[language];
|
|
||||||
document.querySelectorAll('[data-lang]').forEach((button) => { const active = button.dataset.lang === language; button.classList.toggle('active', active); button.setAttribute('aria-pressed', String(active)); });
|
|
||||||
renderStage(document.querySelector('[data-stage].active')?.dataset.stage || 'context');
|
|
||||||
renderSkill(document.querySelector('[data-skill].active')?.dataset.skill || 'gate');
|
|
||||||
localStorage.setItem('rules-language', language);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function copyPrompt() {
|
|
||||||
const value = prompts[language];
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(value);
|
|
||||||
document.querySelector('#copy-status').textContent = language === 'pt' ? 'Prompt copiado.' : 'Prompt copied.';
|
|
||||||
} catch {
|
|
||||||
document.querySelector('#copy-status').textContent = language === 'pt' ? 'Selecione o texto manualmente.' : 'Select the text manually.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
document.querySelectorAll('[data-stage]').forEach((button) => button.addEventListener('click', () => renderStage(button.dataset.stage)));
|
|
||||||
document.querySelectorAll('[data-skill]').forEach((button) => button.addEventListener('click', () => renderSkill(button.dataset.skill)));
|
|
||||||
document.querySelectorAll('[data-lang]').forEach((button) => button.addEventListener('click', () => renderLanguage(button.dataset.lang)));
|
|
||||||
document.querySelector('[data-copy-prompt]').addEventListener('click', copyPrompt);
|
|
||||||
window.addEventListener('scroll', () => { const height = document.documentElement.scrollHeight - innerHeight; document.querySelector('.progress span').style.width = `${height > 0 ? scrollY / height * 100 : 0}%`; }, { passive: true });
|
|
||||||
renderLanguage(language);
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="description" content="A concise case study of agent skills, CLI ratchets, Husky hooks, and PR review in netcracker/interview." />
|
|
||||||
<title>Rules That Survive the Prompt — AI For Dummies</title>
|
|
||||||
<link rel="stylesheet" href="styles.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="progress" aria-hidden="true"><span></span></div>
|
|
||||||
<header class="topbar">
|
|
||||||
<a class="back" href="../"><b>A</b><span data-copy="back">field guide</span></a>
|
|
||||||
<nav aria-label="Page sections"><a href="#pipeline" data-copy="navPipeline">Pipeline</a><a href="#skills">Skills</a><a href="#examples" data-copy="navExamples">Examples</a></nav>
|
|
||||||
<div class="languages" aria-label="Language"><button class="active" data-lang="en" aria-pressed="true">EN</button><span>/</span><button data-lang="pt" aria-pressed="false">PT</button></div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<section class="hero">
|
|
||||||
<p class="eyebrow" data-copy="heroEyebrow">A real repository case study</p>
|
|
||||||
<h1 data-copy="heroTitle">Rules that<br />survive the <em>prompt.</em></h1>
|
|
||||||
<div class="hero-foot">
|
|
||||||
<p data-copy="heroText">Prompts ask for behavior. Repositories preserve it. The interview project combines written context, reusable skills, executable checks, commit hooks, and independent review so the rule is still present when the conversation is gone.</p>
|
|
||||||
<aside><span>CASE / NETCRACKER</span><strong>interview</strong><small data-copy="heroAside">8 skills · 3 agents · 4 enforcement layers</small></aside>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="thesis">
|
|
||||||
<span data-copy="thesisLabel">THE SHORT VERSION</span>
|
|
||||||
<strong data-copy="thesis">A prompt is advice for one run. A repository rule is reusable context plus an executable boundary.</strong>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="pipeline-section" id="pipeline">
|
|
||||||
<div class="section-label"><span data-copy="pipelineLabel">Enforcement pipeline</span><span data-copy="pipelineMeta">select a checkpoint</span></div>
|
|
||||||
<div class="intro"><div><p class="eyebrow" data-copy="pipelineEyebrow">From intent to evidence</p><h2 data-copy="pipelineTitle">Five places<br />a rule can <em>hold.</em></h2></div><p data-copy="pipelineText">Not every rule belongs in a hook. Put guidance where an agent can discover it, deterministic policy in a command, cheap checks at commit time, and independent judgment at review.</p></div>
|
|
||||||
<div class="pipeline" role="tablist" aria-label="Rule enforcement stages">
|
|
||||||
<button class="active" data-stage="context" role="tab" aria-selected="true"><span>01</span><strong data-copy="stageContext">CONTEXT</strong><small>AGENTS.md</small></button>
|
|
||||||
<i>→</i><button data-stage="skills" role="tab" aria-selected="false"><span>02</span><strong>SKILLS</strong><small>.agents/skills</small></button>
|
|
||||||
<i>→</i><button data-stage="cli" role="tab" aria-selected="false"><span>03</span><strong>CLI</strong><small>check:ui</small></button>
|
|
||||||
<i>→</i><button data-stage="commit" role="tab" aria-selected="false"><span>04</span><strong>COMMIT</strong><small>Husky</small></button>
|
|
||||||
<i>→</i><button data-stage="review" role="tab" aria-selected="false"><span>05</span><strong data-copy="stageReview">REVIEW</strong><small>pragent</small></button>
|
|
||||||
</div>
|
|
||||||
<article class="stage-detail" id="stage-detail" aria-live="polite"></article>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="skill-section" id="skills">
|
|
||||||
<div class="section-label"><span data-copy="skillsLabel">Project-local skills</span><span data-copy="skillsMeta">procedures born from repeated friction</span></div>
|
|
||||||
<div class="intro"><div><p class="eyebrow" data-copy="skillsEyebrow">Small instruction packages</p><h2 data-copy="skillsTitle">Teach the trap.<br />Name the <em>trigger.</em></h2></div><p data-copy="skillsText">These skills are not downloaded magic. They are repository-specific procedures under <code>.agents/skills/</code>, distilled from mistakes, commands, and architectural decisions that kept recurring.</p></div>
|
|
||||||
<div class="skill-console">
|
|
||||||
<div class="skill-list" role="tablist" aria-label="Repository skills">
|
|
||||||
<button class="active" data-skill="gate" role="tab" aria-selected="true"><strong>gate-discipline</strong><small data-copy="skillGate">prove green is real</small></button>
|
|
||||||
<button data-skill="parallel" role="tab" aria-selected="false"><strong>parallel-agents</strong><small data-copy="skillParallel">worktree per task</small></button>
|
|
||||||
<button data-skill="repo" role="tab" aria-selected="false"><strong>repo-db</strong><small data-copy="skillRepo">query before crawling</small></button>
|
|
||||||
<button data-skill="debt" role="tab" aria-selected="false"><strong>tech-debt</strong><small data-copy="skillDebt">separate line of work</small></button>
|
|
||||||
<button data-skill="writer" role="tab" aria-selected="false"><strong>skill-writer</strong><small data-copy="skillWriter">repeat twice, encode once</small></button>
|
|
||||||
<button data-skill="area" role="tab" aria-selected="false"><strong>frontend / go-api</strong><small data-copy="skillArea">stack-specific traps</small></button>
|
|
||||||
</div>
|
|
||||||
<article class="skill-detail" id="skill-detail" aria-live="polite"></article>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="examples" id="examples">
|
|
||||||
<div class="section-label"><span data-copy="examplesLabel">Concrete examples</span><span data-copy="examplesMeta">open the source, then adapt</span></div>
|
|
||||||
<div class="example-grid">
|
|
||||||
<article><span data-copy="ratchetLabel">CLI RATCHET</span><h3 data-copy="ratchetTitle">Debt may go down.<br />Never silently up.</h3><pre><code>pnpm check:ui
|
|
||||||
# raw buttons
|
|
||||||
# swallowed catches
|
|
||||||
# pages without h1
|
|
||||||
# hardcoded colours</code></pre><a data-copy="readChecker" data-source="ratchet" href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/scripts/check-ui-contract.mjs">Read the checker →</a></article>
|
|
||||||
<article><span>HUSKY / PRE-COMMIT</span><h3 data-copy="hookTitle">Fast checks before history.</h3><pre><code>pnpm exec lint-staged
|
|
||||||
node scripts/check-ui-contract.mjs</code></pre><a data-copy="readHook" data-source="hooks" href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.husky/pre-commit">Read the hook →</a></article>
|
|
||||||
<article><span data-copy="commitLabel">COMMIT MESSAGE</span><h3 data-copy="commitTitle">Intent has a grammar.</h3><pre><code>pnpm exec commitlint --edit $1
|
|
||||||
|
|
||||||
feat: add interview timer
|
|
||||||
fix(api): scope session query</code></pre><a data-copy="readCommit" data-source="commit" href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/commitlint.config.cjs">Read commitlint config →</a></article>
|
|
||||||
<article><span data-copy="reviewLabel">INDEPENDENT REVIEW</span><h3 data-copy="reviewTitle">A second reader checks intent.</h3><pre><code>.pr-review.json
|
|
||||||
├── focus
|
|
||||||
├── exclude_paths
|
|
||||||
├── languages
|
|
||||||
└── instructions</code></pre><a data-copy="readReview" data-source="review" href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.pr-review.json">Read review policy →</a></article>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="copy-lab">
|
|
||||||
<div><span data-copy="copyLabel">COPY / ADAPT</span><h2 data-copy="copyTitle">Ask your agent to map the enforcement stack.</h2><p data-copy="copyText">Use this in the interview repository or adapt the path names to another project.</p></div>
|
|
||||||
<article><button data-copy-prompt><span data-copy="copyButton">COPY PROMPT</span><b>↗</b></button><pre><code id="explore-prompt"></code></pre><p id="copy-status" role="status" aria-live="polite"></p></article>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="deeper">
|
|
||||||
<div><span data-copy="deeperLabel">GO DEEPER</span><strong data-copy="deeperTitle">Read the implementation, not just this summary.</strong></div>
|
|
||||||
<nav>
|
|
||||||
<a href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/AGENTS.md"><span>01</span><b data-copy="deepContext">Repository context</b><small>AGENTS.md</small></a>
|
|
||||||
<a href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.agents/skills"><span>02</span><b data-copy="deepSkills">Skill catalog</b><small>.agents/skills/</small></a>
|
|
||||||
<a href="../skills/"><span>03</span><b>Design skills</b><small>skills/</small></a>
|
|
||||||
<a href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.claude/agents"><span>03</span><b data-copy="deepAgents">Specialist agents</b><small>.claude/agents/</small></a>
|
|
||||||
<a href="https://git.marcospaulo.dev.br/netcracker/interview/src/branch/main/.lintstagedrc.cjs"><span>04</span><b data-copy="deepPolicy">Staged-file policy</b><small>.lintstagedrc.cjs</small></a>
|
|
||||||
</nav>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
<script src="app.js" defer></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
File diff suppressed because one or more lines are too long
+20
-13
@@ -1,18 +1,20 @@
|
|||||||
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
||||||
import { dirname, join } from 'node:path';
|
import { dirname, join } from 'node:path';
|
||||||
|
|
||||||
|
const base = '/ai-for-dummies/';
|
||||||
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8');
|
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8');
|
||||||
|
// The legacy hand-written pages are gone; the built output is the site now.
|
||||||
const pages = [
|
const pages = [
|
||||||
'index.html',
|
'dist/index.html',
|
||||||
'full-guide/index.html',
|
'dist/full-guide/index.html',
|
||||||
'summary/index.html',
|
'dist/summary/index.html',
|
||||||
'models/index.html',
|
'dist/models/index.html',
|
||||||
'agents/index.html',
|
'dist/agents/index.html',
|
||||||
'skills/index.html',
|
'dist/skills/index.html',
|
||||||
'rules/index.html',
|
'dist/rules/index.html',
|
||||||
'skills-review/index.html',
|
'dist/skills-review/index.html',
|
||||||
'hands-on/starter/index.html',
|
'dist/hands-on/starter/index.html',
|
||||||
'hands-on/rules/index.html',
|
'dist/hands-on/rules/index.html',
|
||||||
];
|
];
|
||||||
const walk = (path) =>
|
const walk = (path) =>
|
||||||
readdirSync(path).flatMap((name) => {
|
readdirSync(path).flatMap((name) => {
|
||||||
@@ -61,8 +63,13 @@ for (const [kind, values] of Object.entries(baselineValues)) {
|
|||||||
const missing = values.filter((value) => !builtValues[kind].has(value));
|
const missing = values.filter((value) => !builtValues[kind].has(value));
|
||||||
if (missing.length) throw new Error(`built CSS lost ${kind}: ${missing.join(', ')}`);
|
if (missing.length) throw new Error(`built CSS lost ${kind}: ${missing.join(', ')}`);
|
||||||
}
|
}
|
||||||
// Legacy fixtures still ship directly. Resolve every var() from the stylesheets
|
// The hands-on labs still ship their own stylesheet rather than going through
|
||||||
// that page actually links; Astro's tokens cannot mask a broken standalone page.
|
// Astro. Resolve every var() from the stylesheets each page actually links, so
|
||||||
|
// Astro's tokens cannot mask a broken standalone page.
|
||||||
|
// Astro emits base-absolute hrefs (`/ai-for-dummies/_astro/x.css`); those are
|
||||||
|
// rooted at `dist/`, not at the page's own directory.
|
||||||
|
const resolveHref = (page, href) =>
|
||||||
|
href.startsWith(base) ? join('dist', href.slice(base.length)) : join(dirname(page), href);
|
||||||
for (const page of pages) {
|
for (const page of pages) {
|
||||||
const html = read(page);
|
const html = read(page);
|
||||||
const linked = [...html.matchAll(/<link[^>]+rel="stylesheet"[^>]+href="([^"]+)"/gi)].map(
|
const linked = [...html.matchAll(/<link[^>]+rel="stylesheet"[^>]+href="([^"]+)"/gi)].map(
|
||||||
@@ -70,7 +77,7 @@ for (const page of pages) {
|
|||||||
);
|
);
|
||||||
const styles = linked
|
const styles = linked
|
||||||
.filter((href) => !/^https?:/i.test(href))
|
.filter((href) => !/^https?:/i.test(href))
|
||||||
.map((href) => read(join(dirname(page), href)));
|
.map((href) => read(resolveHref(page, href)));
|
||||||
const defined = new Set(styles.flatMap((css) => [...definitions(css)]));
|
const defined = new Set(styles.flatMap((css) => [...definitions(css)]));
|
||||||
const unresolved = new Set(
|
const unresolved = new Set(
|
||||||
styles.flatMap((css) =>
|
styles.flatMap((css) =>
|
||||||
|
|||||||
+10
-26
@@ -46,7 +46,7 @@ const source = {
|
|||||||
read('src/content/providers/claude.json'),
|
read('src/content/providers/claude.json'),
|
||||||
read('src/content/providers/gemini.json'),
|
read('src/content/providers/gemini.json'),
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
starter: read('hands-on/starter/app.js'),
|
starter: read('public/hands-on/starter/app.js'),
|
||||||
voteService: read('vote-service/main.go'),
|
voteService: read('vote-service/main.go'),
|
||||||
ndoReview: read('src/content/reviews/ndo-repro.md'),
|
ndoReview: read('src/content/reviews/ndo-repro.md'),
|
||||||
};
|
};
|
||||||
@@ -73,32 +73,16 @@ if (rendered(html.starter) !== snapshot('hands-on/starter.txt'))
|
|||||||
if (rendered(html.labRules) !== snapshot('hands-on/rules.txt'))
|
if (rendered(html.labRules) !== snapshot('hands-on/rules.txt'))
|
||||||
throw new Error('rules lab rendered-text snapshot changed');
|
throw new Error('rules lab rendered-text snapshot changed');
|
||||||
|
|
||||||
const braceMatch = (source, open) => {
|
// The 102 Portuguese strings were extracted verbatim from the legacy
|
||||||
let depth = 0;
|
// `app.js` `translations.pt` object at cutover, before that file was deleted.
|
||||||
let quote = '';
|
// This is a legacy capture, not a snapshot of the Astro build: it still asserts
|
||||||
let escaped = false;
|
// against an independent source, which is the whole point of the check.
|
||||||
for (let index = open; index < source.length; index += 1) {
|
const portuguese = JSON.parse(read('.agents/snapshots/full-guide-pt.json')).map(rendered);
|
||||||
const character = source[index];
|
|
||||||
if (quote) {
|
|
||||||
if (escaped) escaped = false;
|
|
||||||
else if (character === '\\') escaped = true;
|
|
||||||
else if (character === quote) quote = '';
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (character === "'" || character === '"' || character === '`') quote = character;
|
|
||||||
else if (character === '{') depth += 1;
|
|
||||||
else if (character === '}' && --depth === 0) return index;
|
|
||||||
}
|
|
||||||
throw new Error('could not brace-match legacy Portuguese translations');
|
|
||||||
};
|
|
||||||
const legacyGuide = read('app.js');
|
|
||||||
const translationsStart = legacyGuide.indexOf('const translations =');
|
|
||||||
const objectStart = legacyGuide.indexOf('{', translationsStart);
|
|
||||||
const objectEnd = braceMatch(legacyGuide, objectStart);
|
|
||||||
const translations = Function(`return (${legacyGuide.slice(objectStart, objectEnd + 1)})`)();
|
|
||||||
const portuguese = Object.values(translations.pt).map(rendered);
|
|
||||||
if (portuguese.length !== 102)
|
if (portuguese.length !== 102)
|
||||||
throw new Error('full-guide Portuguese source no longer has 102 translated strings');
|
throw new Error('full-guide Portuguese snapshot no longer has 102 translated strings');
|
||||||
|
// Without this, trimming the snapshot would make the check below pass vacuously.
|
||||||
|
if (portuguese.some((value) => !value.trim()))
|
||||||
|
throw new Error('full-guide Portuguese snapshot has an empty entry');
|
||||||
if (!portuguese.every((value) => rendered(html.guide).includes(value)))
|
if (!portuguese.every((value) => rendered(html.guide).includes(value)))
|
||||||
throw new Error('built full-guide lost a Portuguese translation');
|
throw new Error('built full-guide lost a Portuguese translation');
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="description" content="Friendly reviews and improved drafts for submitted Agent Skills." />
|
|
||||||
<title>Submitted Skills — Review Desk</title>
|
|
||||||
<!-- Bump all review asset versions together when this interface changes. -->
|
|
||||||
<link rel="stylesheet" href="styles.css?v=20260904-vote-widget" />
|
|
||||||
<link rel="stylesheet" href="change-lens.css?v=20260904-vote-widget" />
|
|
||||||
<!-- Vote API origin: set after vote-service is deployed (see /vote-service). Empty = widget shows "voting offline". -->
|
|
||||||
<script>window.SKILLS_REVIEW_VOTE_API = 'https://ai-for-dummies-vote.marcospaulo.dev.br';</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<header class="topbar"><a href="../" class="back">← field guide</a><span>SUBMITTED SKILLS / REVIEW DESK</span><a href="#catalog" id="submission-count">submissions</a></header>
|
|
||||||
<section class="hero">
|
|
||||||
<p class="eyebrow">A friendly path from draft to dependable</p>
|
|
||||||
<h1>Every skill deserves<br><em>a clear job.</em></h1>
|
|
||||||
<p>Read the original, understand what already works, and compare a safer, leaner draft. Nothing here overwrites a submission; revisions live in their own review output.</p>
|
|
||||||
</section>
|
|
||||||
<section class="principles" aria-label="Review principles">
|
|
||||||
<article><b>01</b><strong>Discoverable</strong><span>A precise description tells an agent when to load the skill.</span></article>
|
|
||||||
<article><b>02</b><strong>Useful in context</strong><span>Core workflow stays short; conditional detail loads only when needed.</span></article>
|
|
||||||
<article><b>03</b><strong>Safe by design</strong><span>Commands, secrets, and shared systems have explicit boundaries.</span></article>
|
|
||||||
<article><b>04</b><strong>Proven in use</strong><span>Real prompts and observable checks turn a draft into a reliable tool.</span></article>
|
|
||||||
</section>
|
|
||||||
<section class="method">
|
|
||||||
<div><p class="eyebrow">How to use this desk</p><h2>Compare.<br><em>Then choose.</em></h2></div>
|
|
||||||
<ol><li>Select a submission, or open an author URL.</li><li>Read the gentle review before judging the draft.</li><li>Choose <strong>Preview Markdown</strong> in the file toolbar to render either version.</li><li>Copy or download the version you want, then vote for the draft you would ship.</li></ol>
|
|
||||||
</section>
|
|
||||||
<section class="catalog" id="catalog">
|
|
||||||
<aside><p class="eyebrow">The catalog</p><label for="skill-filter">Find a skill</label><input id="skill-filter" type="search" placeholder="author, skill, topic" autocomplete="off"><p class="count" id="count"></p><div id="skill-list" role="listbox" aria-label="Submitted skills"></div></aside>
|
|
||||||
<article class="detail" id="detail" aria-live="polite"></article>
|
|
||||||
</section>
|
|
||||||
<section class="research">
|
|
||||||
<p class="eyebrow">Why these reviews look this way</p>
|
|
||||||
<p>The recommendations follow the open Agent Skills format: valid frontmatter for discovery, progressive disclosure for context economy, deterministic scripts for fragile repeated mechanics, and behavioral evaluation rather than a checklist of pretty headings.</p>
|
|
||||||
<div><a href="https://agentskills.io/specification" target="_blank" rel="noreferrer">Format specification ↗</a><a href="https://agentskills.io/skill-creation/best-practices" target="_blank" rel="noreferrer">Writing practices ↗</a><a href="https://agentskills.io/skill-creation/evaluating-skills" target="_blank" rel="noreferrer">Evaluation loop ↗</a><a href="https://agentskills.io/skill-creation/using-scripts" target="_blank" rel="noreferrer">Scripts guide ↗</a></div>
|
|
||||||
</section>
|
|
||||||
<footer>Share an author with <code>?author=Name</code>, or one review with <code>?author=Name&skill=skill-id&view=improved</code>. To add a submission later: drop a package under <code>submitted-skills/</code>, add an entry under <code>src/content/reviews/{new-id}.md</code> (and mirror it into <code>skills-review/catalog.js</code> which the desk still reads), then run <code>node scripts/build-skill-review.mjs</code>. Votes call a separate service — see <code>vote-service/</code> — one per visitor, tracked by network source.</footer>
|
|
||||||
</main>
|
|
||||||
<script type="module" src="app.js?v=20260904-vote-widget"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
const packageFiles = {
|
|
||||||
skill: { label: 'SKILL.md', title: 'The operating contract', body: 'The one file that should always be loaded. Define the exact trigger, the ordered workflow, safety limits, and the evidence the agent returns.', code: '---\nname: review-ui\ndescription: Review a changed UI for focus, reflow, and motion.\n---\n\n1. Inspect the changed interaction.\n2. Run the UI checks.\n3. Return findings with evidence.' },
|
|
||||||
references: { label: 'references/', title: 'Facts, only when needed', body: 'Keep conditional detail out of the main instruction. A dialog pattern, framework caveat, or accessibility checklist belongs here when it is not needed for every review.', code: 'references/\n└── accessibility.md\n ├── keyboard interaction patterns\n └── focus and reflow checklist' },
|
|
||||||
scripts: { label: 'scripts/', title: 'Mechanics that should not depend on memory', body: 'Turn deterministic checks into runnable tools. The agent still judges the result, but it should not have to recreate a viewport test or filename rule by hand.', code: 'scripts/\n└── check-reflow.mjs\n └── checks 320px, 1280px, and 4K widths' },
|
|
||||||
assets: { label: 'assets/', title: 'Starting material, not hidden instructions', body: 'Use assets for templates and examples a person or agent can copy. Keep them clearly named so package readers can choose the right starting point.', code: 'assets/\n├── review-report.md\n└── focus-test-fixture.html' }
|
|
||||||
};
|
|
||||||
|
|
||||||
const preview = document.querySelector('#package-preview');
|
|
||||||
const buttons = [...document.querySelectorAll('[data-package-file]')];
|
|
||||||
function renderPackage(file) {
|
|
||||||
const item = packageFiles[file];
|
|
||||||
preview.classList.remove('is-swapping');
|
|
||||||
void preview.offsetWidth;
|
|
||||||
preview.classList.add('is-swapping');
|
|
||||||
preview.innerHTML = `<span>SELECTED / ${item.label}</span><h3>${item.title}</h3><p>${item.body}</p><pre><code>${item.code}</code></pre>`;
|
|
||||||
buttons.forEach((button) => {
|
|
||||||
const selected = button.dataset.packageFile === file;
|
|
||||||
button.classList.toggle('active', selected);
|
|
||||||
button.setAttribute('aria-selected', String(selected));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
buttons.forEach((button) => button.addEventListener('click', () => renderPackage(button.dataset.packageFile)));
|
|
||||||
renderPackage('skill');
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<meta name="description" content="A practical guide to creating compact, reusable AI coding skills.">
|
|
||||||
<title>AI For Dummies — Skills</title>
|
|
||||||
<link rel="stylesheet" href="../chapters.css">
|
|
||||||
<link rel="stylesheet" href="styles.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<header class="top"><a href="../summary/">← ROUTE MAP</a><span>03 / SKILLS</span><a href="../skills-review/">review desk ↗</a></header>
|
|
||||||
<section class="hero"><p class="eyebrow">Reusable judgment</p><h1>Teach the<br><em>decision.</em></h1><p>A skill changes behavior. Keep the trigger precise, put the workflow in <code>SKILL.md</code>, and move conditional facts, scripts, and examples into focused files.</p></section>
|
|
||||||
<section class="pipeline package-anatomy">
|
|
||||||
<div><p class="eyebrow">Package anatomy</p><h2>One job.<br>More than<br>one <em>file.</em></h2><p class="package-hint">Choose a file to see why it belongs in the package.</p></div>
|
|
||||||
<div class="package-workbench" data-package-workbench>
|
|
||||||
<div class="package-tree" role="tablist" aria-label="Files in the review-ui skill package">
|
|
||||||
<p>REVIEW-UI / SKILL PACKAGE</p>
|
|
||||||
<button class="active" data-package-file="skill" role="tab" aria-selected="true"><code>├── SKILL.md</code><small>trigger + workflow</small></button>
|
|
||||||
<button data-package-file="references" role="tab" aria-selected="false"><code>├── references/</code><small>conditional facts</small></button>
|
|
||||||
<button data-package-file="scripts" role="tab" aria-selected="false"><code>├── scripts/</code><small>deterministic checks</small></button>
|
|
||||||
<button data-package-file="assets" role="tab" aria-selected="false"><code>└── assets/</code><small>templates + examples</small></button>
|
|
||||||
</div>
|
|
||||||
<article class="package-preview" id="package-preview" aria-live="polite"></article>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="practice"><div><p class="eyebrow">Create a skill</p><h2>Observe →<br>trigger →<br>validate</h2></div><div class="steps"><article><b>01</b><div><strong>Observe friction</strong><span>Find a repeated decision or failure.</span></div></article><article><b>02</b><div><strong>Define the trigger</strong><span>Say when it should load and when it should stay out.</span></div></article><article><b>03</b><div><strong>Choose anatomy</strong><span>Use references for facts and scripts for deterministic mechanics.</span></div></article><article><b>04</b><div><strong>Evaluate behavior</strong><span>Test realistic prompts, edge cases, safety, and evidence.</span></div></article></div></section>
|
|
||||||
<nav class="links"><a href="../agents/">Agents & trees →</a><a href="../rules/">Rules case study →</a><a href="../skills-review/">Review submitted skills →</a><a href="../full-guide/#create-skill">Full guide: skill forge →</a></nav>
|
|
||||||
</main>
|
|
||||||
<script src="app.js" defer></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -281,7 +281,7 @@ const { branches, initial = 'main', rootLabel = 'ROOT', rootSmall = '● clean'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* token-gap: preserve the legacy full-guide layout threshold; task 20 can retire it with the legacy stylesheet */
|
/* token-gap: preserve the legacy full-guide layout threshold; responsive.css is gone, so this rule is now the only definition of it */
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.tree-stage {
|
.tree-stage {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import BaseLayout from './BaseLayout.astro';
|
import BaseLayout from './BaseLayout.astro';
|
||||||
import TopBar from '../components/blocks/TopBar.astro';
|
import TopBar from '../components/blocks/TopBar.astro';
|
||||||
import SiteFooter from '../components/blocks/SiteFooter.astro';
|
import SiteFooter from '../components/blocks/SiteFooter.astro';
|
||||||
import chaptersStylesheet from '../../chapters.css?url';
|
import chaptersStylesheet from '../../legacy/styles/chapters.css?url';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import CopyPrompt from '../components/islands/CopyPrompt.astro';
|
|||||||
import GuideSelector from '../components/islands/GuideSelector.astro';
|
import GuideSelector from '../components/islands/GuideSelector.astro';
|
||||||
import LanguageToggle from '../components/islands/LanguageToggle.astro';
|
import LanguageToggle from '../components/islands/LanguageToggle.astro';
|
||||||
import ReadingProgress from '../components/islands/ReadingProgress.astro';
|
import ReadingProgress from '../components/islands/ReadingProgress.astro';
|
||||||
import '../../styles.css';
|
import '../../legacy/styles/guide.css';
|
||||||
import '../../full-guide/audit.css';
|
import '../../legacy/styles/audit.css';
|
||||||
|
|
||||||
type Entry<T extends { id: string }> = { data: T };
|
type Entry<T extends { id: string }> = { data: T };
|
||||||
const toRecord = <T extends { id: string }>(entries: Entry<T>[]) =>
|
const toRecord = <T extends { id: string }>(entries: Entry<T>[]) =>
|
||||||
@@ -1464,7 +1464,7 @@ const base = import.meta.env.BASE_URL;
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* token-gap: preserve the legacy full-guide layout threshold; task 20 can retire it with the legacy stylesheet */
|
/* token-gap: preserve the legacy full-guide layout threshold; responsive.css is gone, so this rule is now the only definition of it */
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.topbar-tools .edition {
|
.topbar-tools .edition {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -3083,7 +3083,7 @@ const base = import.meta.env.BASE_URL;
|
|||||||
grid-column: auto;
|
grid-column: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* token-gap: preserve the legacy full-guide layout threshold; task 20 can retire it with the legacy stylesheet */
|
/* token-gap: preserve the legacy full-guide layout threshold; responsive.css is gone, so this rule is now the only definition of it */
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.tree-detail {
|
.tree-detail {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
import { getCollection } from 'astro:content';
|
import { getCollection } from 'astro:content';
|
||||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||||
import reviewStylesheet from '../../skills-review/styles.css?url';
|
import reviewStylesheet from '../../legacy/styles/skills-review.css?url';
|
||||||
import changeLensStylesheet from '../../skills-review/change-lens.css?url';
|
import changeLensStylesheet from '../../legacy/styles/change-lens.css?url';
|
||||||
|
|
||||||
const reviews = await getCollection('reviews');
|
const reviews = await getCollection('reviews');
|
||||||
const reviewOrder = [
|
const reviewOrder = [
|
||||||
@@ -152,6 +152,6 @@ const serializedCatalog = JSON.stringify(catalog).replace(/</g, '\\u003c');
|
|||||||
window.__SKILLS_REVIEW_CATALOG = JSON.parse(serializedCatalog);
|
window.__SKILLS_REVIEW_CATALOG = JSON.parse(serializedCatalog);
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
import '../../skills-review/app.js';
|
import '../../legacy/skills-review/app.js';
|
||||||
</script>
|
</script>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { getEntry } from 'astro:content';
|
|||||||
import ChapterLayout from '../layouts/ChapterLayout.astro';
|
import ChapterLayout from '../layouts/ChapterLayout.astro';
|
||||||
import ChapterHero from '../components/blocks/ChapterHero.astro';
|
import ChapterHero from '../components/blocks/ChapterHero.astro';
|
||||||
import SkillPackageExplorer from '../components/islands/SkillPackageExplorer.astro';
|
import SkillPackageExplorer from '../components/islands/SkillPackageExplorer.astro';
|
||||||
import skillsStylesheet from '../../skills/styles.css?url';
|
import skillsStylesheet from '../../legacy/styles/skills.css?url';
|
||||||
|
|
||||||
// Required-field guard. The chapters schema marks section eyebrow /
|
// Required-field guard. The chapters schema marks section eyebrow /
|
||||||
// panelLabel / panelCode / steps / copy as optional because the schema
|
// panelLabel / panelCode / steps / copy as optional because the schema
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>AI For Dummies — Route map</title><link rel="stylesheet" href="../chapters.css"></head><body><main><header class="top"><a href="../full-guide/">← AI FOR DUMMIES</a><span>00 / ROUTE MAP</span><a href="../skills-review/">review desk ↗</a></header><section class="hero"><p class="eyebrow">Start here</p><h1>Ship the<br><em>system.</em></h1><p>This guide turns AI work into a shape: frame the problem, choose the model and agent, isolate changes, teach repeatable decisions, and verify the result.</p></section><section class="grid"><article class="card"><b>01</b><h2>Models</h2><p>Capability and effort are separate knobs.</p><a href="../models/">Open chapter →</a></article><article class="card"><b>02</b><h2>Agents & trees</h2><p>Bound roles, handoffs, and worktrees.</p><a href="../agents/">Open chapter →</a></article><article class="card"><b>03</b><h2>Skills</h2><p>Capture repeatable decisions.</p><a href="../skills/">Open chapter →</a></article><article class="card"><b>04</b><h2>Rules</h2><p>Connect guidance to enforcement.</p><a href="../rules/">Open chapter →</a></article><article class="card"><b>05</b><h2>Practice</h2><p>Compare prompts and skill-enabled runs.</p><a href="../hands-on/starter/">Open lab →</a></article><article class="card"><b>06</b><h2>Review desk</h2><p>Browse original files and improved drafts.</p><a href="../skills-review/">Open desk →</a></article></section><nav class="links"><a href="../full-guide/">Full field guide</a><a href="../docs/operations-guide.md">Operations guide</a></nav><footer>Each chapter stands alone; the order follows a real task becoming a reliable change.</footer></main></body></html>
|
|
||||||
Reference in New Issue
Block a user