Compare commits
6 Commits
aa28158534
...
33ce544a1e
| Author | SHA1 | Date | |
|---|---|---|---|
| 33ce544a1e | |||
| f53159f0b4 | |||
| 0c02780dd9 | |||
| 8c7ca2aded | |||
| c7d06a120d | |||
| d15c301fdb |
@@ -52,7 +52,10 @@ pnpm run verify
|
||||
# Compare against origin/main and refuse a silent reduction.
|
||||
step "assertion coverage"
|
||||
current=$(grep -c 'throw new Error' scripts/verify.mjs)
|
||||
baseline=$(git show origin/main:scripts/verify.mjs 2>/dev/null | grep -c 'throw new Error' || echo "$current")
|
||||
# Task 19 restored the 42 legacy facts and added ten output snapshots: 84 is
|
||||
# now the floor, in addition to whatever origin/main currently requires.
|
||||
baseline=$(git show origin/main:scripts/verify.mjs 2>/dev/null | grep -c 'throw new Error' || echo 0)
|
||||
if [ "$baseline" -lt 84 ]; then baseline=84; fi
|
||||
if [ "$current" -lt "$baseline" ]; then
|
||||
echo "gate: verify.mjs coverage fell from $baseline to $current assertions." >&2
|
||||
echo " Only verification-engineer may reduce it, with a reason per removal." >&2
|
||||
|
||||
@@ -0,0 +1,292 @@
|
||||
{
|
||||
"colors": [
|
||||
"#081621",
|
||||
"#0b1b27",
|
||||
"#0c1a25",
|
||||
"#0f2230",
|
||||
"#102536",
|
||||
"#102837",
|
||||
"#102b3a",
|
||||
"#112a3b",
|
||||
"#122534",
|
||||
"#123042",
|
||||
"#132b3b",
|
||||
"#172f42",
|
||||
"#173046",
|
||||
"#173245",
|
||||
"#173b4f",
|
||||
"#18364a",
|
||||
"#19364a",
|
||||
"#1a4b42",
|
||||
"#1c425a",
|
||||
"#1d455b",
|
||||
"#1f3a4b",
|
||||
"#215675",
|
||||
"#244760",
|
||||
"#29455a",
|
||||
"#2a4150",
|
||||
"#315f80",
|
||||
"#344c5d",
|
||||
"#41596b",
|
||||
"#426070",
|
||||
"#466274",
|
||||
"#486175",
|
||||
"#496274",
|
||||
"#527085",
|
||||
"#527f9f",
|
||||
"#557080",
|
||||
"#572f32",
|
||||
"#596f9a",
|
||||
"#5b7098",
|
||||
"#65717a",
|
||||
"#697b89",
|
||||
"#6b668f",
|
||||
"#6c6898",
|
||||
"#7c78a8",
|
||||
"#80c69a",
|
||||
"#80c69a20",
|
||||
"#80c69a22",
|
||||
"#8ca1af",
|
||||
"#91aab7",
|
||||
"#9ba7a5",
|
||||
"#9bcba7",
|
||||
"#9eabb4",
|
||||
"#9eb0bb",
|
||||
"#a7483f",
|
||||
"#a9b6be",
|
||||
"#a9bcc8",
|
||||
"#a9e3ae",
|
||||
"#aebbc3",
|
||||
"#aebfc7",
|
||||
"#aebfc9",
|
||||
"#afbec7",
|
||||
"#b0bac1",
|
||||
"#b5c0c7",
|
||||
"#b7c7d1",
|
||||
"#b8c8d2",
|
||||
"#b9c8d0",
|
||||
"#b9c8d1",
|
||||
"#bed0dc",
|
||||
"#bfccd4",
|
||||
"#c1d1d8",
|
||||
"#c4cdd3",
|
||||
"#c6d2d7",
|
||||
"#c9d5dc",
|
||||
"#cbd9e1",
|
||||
"#d0d5d2",
|
||||
"#d4dfe3",
|
||||
"#d5dde2",
|
||||
"#d5f1d6",
|
||||
"#d6e1e4",
|
||||
"#d8dee2",
|
||||
"#e5e3ef",
|
||||
"#e5eeeb",
|
||||
"#e89a8e",
|
||||
"#e8ecee",
|
||||
"#e9ecee",
|
||||
"#e9eeed",
|
||||
"#ebbf58",
|
||||
"#eceaf5",
|
||||
"#eceff0",
|
||||
"#edf0f1",
|
||||
"#eeedf6",
|
||||
"#efc76b",
|
||||
"#efc76b18",
|
||||
"#f0eef8",
|
||||
"#f1f0f7",
|
||||
"#f5f4f1",
|
||||
"#f6f3ed",
|
||||
"#ffb5a8",
|
||||
"#ffd7d0",
|
||||
"#fff",
|
||||
"#ffffff05",
|
||||
"#ffffff06",
|
||||
"#ffffff1f",
|
||||
"#ffffff2b",
|
||||
"#ffffff2d",
|
||||
"#ffffff30",
|
||||
"#ffffff32",
|
||||
"#ffffff40",
|
||||
"#ffffff42",
|
||||
"#ffffff50",
|
||||
"#ffffff66",
|
||||
"rgb(255 255 255 / 14.1176%)",
|
||||
"rgb(255 255 255 / 22.7451%)",
|
||||
"rgb(255 255 255 / 25.098%)",
|
||||
"rgb(255 255 255 / 31.3725%)"
|
||||
],
|
||||
"sizes": [
|
||||
"01em",
|
||||
"1em",
|
||||
"1px",
|
||||
"1.2em",
|
||||
"1.45em",
|
||||
"1.5em",
|
||||
"1.8em",
|
||||
"02em",
|
||||
"2px",
|
||||
"2.4vw",
|
||||
"2.5vw",
|
||||
"2.6vw",
|
||||
"3em",
|
||||
"3px",
|
||||
"3vw",
|
||||
"3.3vw",
|
||||
"3.4vw",
|
||||
"04em",
|
||||
"4px",
|
||||
"4vw",
|
||||
"05em",
|
||||
"5em",
|
||||
"5px",
|
||||
"5vw",
|
||||
"5.6vw",
|
||||
"06em",
|
||||
"6px",
|
||||
"6vw",
|
||||
"07em",
|
||||
"7px",
|
||||
"7vw",
|
||||
"08em",
|
||||
"8px",
|
||||
"8vw",
|
||||
"8.3vw",
|
||||
"09em",
|
||||
"9em",
|
||||
"9px",
|
||||
"9vw",
|
||||
"10px",
|
||||
"10.5px",
|
||||
"11px",
|
||||
"12em",
|
||||
"12px",
|
||||
"12vh",
|
||||
"13px",
|
||||
"14px",
|
||||
"15px",
|
||||
"16px",
|
||||
"17px",
|
||||
"17vw",
|
||||
"18px",
|
||||
"19px",
|
||||
"20px",
|
||||
"22px",
|
||||
"23px",
|
||||
"24px",
|
||||
"25px",
|
||||
"26px",
|
||||
"27px",
|
||||
"28px",
|
||||
"30px",
|
||||
"32px",
|
||||
"34px",
|
||||
"35em",
|
||||
"35px",
|
||||
"36px",
|
||||
"38px",
|
||||
"40px",
|
||||
"42px",
|
||||
"44px",
|
||||
"045em",
|
||||
"45px",
|
||||
"46px",
|
||||
"48px",
|
||||
"50px",
|
||||
"52px",
|
||||
"54px",
|
||||
"55px",
|
||||
"56px",
|
||||
"58px",
|
||||
"60px",
|
||||
"62px",
|
||||
"64px",
|
||||
"65px",
|
||||
"70px",
|
||||
"72px",
|
||||
"075em",
|
||||
"75px",
|
||||
"76px",
|
||||
"78px",
|
||||
"80px",
|
||||
"82px",
|
||||
"85px",
|
||||
"90px",
|
||||
"92px",
|
||||
"95px",
|
||||
"96px",
|
||||
"100px",
|
||||
"105px",
|
||||
"108px",
|
||||
"110px",
|
||||
"112px",
|
||||
"120px",
|
||||
"126px",
|
||||
"130px",
|
||||
"135px",
|
||||
"140px",
|
||||
"145px",
|
||||
"148px",
|
||||
"150px",
|
||||
"160px",
|
||||
"164px",
|
||||
"170px",
|
||||
"175px",
|
||||
"180px",
|
||||
"190px",
|
||||
"200px",
|
||||
"210px",
|
||||
"220px",
|
||||
"230px",
|
||||
"240px",
|
||||
"255px",
|
||||
"260px",
|
||||
"270px",
|
||||
"280px",
|
||||
"290px",
|
||||
"300px",
|
||||
"305px",
|
||||
"320px",
|
||||
"330px",
|
||||
"340px",
|
||||
"360px",
|
||||
"380px",
|
||||
"390px",
|
||||
"410px",
|
||||
"420px",
|
||||
"440px",
|
||||
"460px",
|
||||
"500px",
|
||||
"520px",
|
||||
"530px",
|
||||
"540px",
|
||||
"560px",
|
||||
"570px",
|
||||
"600px",
|
||||
"620px",
|
||||
"650px",
|
||||
"680px",
|
||||
"700px",
|
||||
"720px",
|
||||
"730px",
|
||||
"750px",
|
||||
"780px",
|
||||
"800px",
|
||||
"850px",
|
||||
"880px",
|
||||
"900px",
|
||||
"950px",
|
||||
"1000px",
|
||||
"1040px",
|
||||
"1050px",
|
||||
"1100px",
|
||||
"1400px",
|
||||
"1420px",
|
||||
"1500px",
|
||||
"1600px",
|
||||
"1840px",
|
||||
"1920px",
|
||||
"1960px",
|
||||
"2200px",
|
||||
"2880px"
|
||||
]
|
||||
}
|
||||
@@ -28,8 +28,11 @@ A presentation for humans who ship
|
||||
Uma apresentação para quem entrega software
|
||||
AI for
|
||||
dummies.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
FIELD NOTE / 001
|
||||
NOTA DE CAMPO / 001
|
||||
Ship the
|
||||
@@ -39,8 +42,8 @@ sistema.
|
||||
Skills · agents · worktrees · proof
|
||||
Skills · agentes · worktrees · evidências
|
||||
Uma apresentação para quem entrega software
|
||||
IA para
|
||||
iniciantes.
|
||||
AI for
|
||||
dummies.
|
||||
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
|
||||
@@ -85,8 +88,8 @@ MAKE
|
||||
REGRA ZERO
|
||||
Modelo forte para ambiguidade.
|
||||
Modelo leve para trabalho delimitado.
|
||||
PENSE
|
||||
FAÇA
|
||||
THINK
|
||||
MAKE
|
||||
A small fleet
|
||||
Uma pequena frota
|
||||
coordination before parallelism
|
||||
@@ -114,8 +117,10 @@ agent/docs
|
||||
Interface worker
|
||||
Receives: component contract + visual states
|
||||
Returns: focused diff + viewport evidence
|
||||
The orchestrator preserves intent, writes small contracts, and gathers results that can be
|
||||
verified. It does not need to type every line.
|
||||
The orchestrator preserves intent, writes small contracts, and gathers results that can
|
||||
be verified. It does not need to type every line.
|
||||
O orquestrador preserva a intenção, escreve pequenos contratos e reúne resultados
|
||||
verificáveis. Ele não precisa digitar cada linha.
|
||||
Why the boundary matters
|
||||
Por que a fronteira importa
|
||||
one vague task / three predictable failures
|
||||
@@ -129,7 +134,8 @@ Cada worker lê tudo. Ninguém sabe quais fatos são essenciais.
|
||||
Branch collision
|
||||
Colisão de branches
|
||||
Two agents touch the same checkout. The fastest path becomes conflict resolution.
|
||||
Dois agentes usam o mesmo checkout. O caminho mais rápido vira resolução de conflitos.
|
||||
Dois agentes usam o mesmo checkout. O caminho mais rápido vira resolução de
|
||||
conflitos.
|
||||
03
|
||||
Confident drift
|
||||
Desvio confiante
|
||||
@@ -143,6 +149,8 @@ Clique em uma fase.
|
||||
Veja a passagem.
|
||||
Delegation means moving one bounded task into a smaller context—not giving away
|
||||
responsibility.
|
||||
Delegar é mover uma tarefa delimitada para um contexto menor — não abrir mão da
|
||||
responsabilidade.
|
||||
01
|
||||
PLAN
|
||||
02
|
||||
@@ -186,6 +194,8 @@ por
|
||||
mão.
|
||||
A worktree is another directory linked to the same repository. Each agent gets its own
|
||||
checkout and index; history remains shared.
|
||||
Um worktree é outro diretório ligado ao mesmo repositório. Cada agente recebe seu
|
||||
próprio checkout e índice; o histórico continua compartilhado.
|
||||
Select a node to inspect its checkout, owner, and next action.
|
||||
Selecione um nó para inspecionar checkout, responsável e próxima ação.
|
||||
repository topology
|
||||
@@ -193,8 +203,10 @@ topologia do repositório
|
||||
4 checkouts
|
||||
4 checkouts
|
||||
ROOT
|
||||
RAIZ
|
||||
main
|
||||
● clean
|
||||
● limpo
|
||||
UI AGENT
|
||||
AGENTE DE UI
|
||||
agent/ui
|
||||
@@ -229,8 +241,11 @@ ritmo.
|
||||
Choose a job to see why the model profile changes.
|
||||
Escolha um trabalho para entender por que o perfil do modelo muda.
|
||||
Work
|
||||
Trabalho
|
||||
Profile
|
||||
Perfil
|
||||
Prompt shape
|
||||
Formato do prompt
|
||||
Plan
|
||||
Planejar
|
||||
strong / broad
|
||||
@@ -262,8 +277,12 @@ gear.
|
||||
Escolha o motor.
|
||||
Depois escolha a
|
||||
marcha.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
OPENAI
|
||||
CLAUDE
|
||||
GEMINI
|
||||
@@ -278,6 +297,9 @@ BAIXO
|
||||
bounded + fast
|
||||
delimitado + rápido
|
||||
MEDIUM
|
||||
MÉDIO
|
||||
default start
|
||||
ponto inicial
|
||||
HIGH
|
||||
ALTO
|
||||
complex + costly
|
||||
@@ -287,17 +309,29 @@ Balanced starting point for normal implementation, tests, and review. Measure be
|
||||
reasoning: { effort: "medium" }
|
||||
ROUTING RULE
|
||||
REGRA DE ROTEAMENTO
|
||||
Use strong models for ambiguity and judgment. Use lighter models for bounded execution. Raise effort only when evaluation shows a gain.
|
||||
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.
|
||||
Skills
|
||||
Use strong models for ambiguity and judgment. Use lighter models for bounded execution.
|
||||
Raise effort only when evaluation shows a gain.
|
||||
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.
|
||||
Skills
|
||||
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.
|
||||
Write the right way
|
||||
once.
|
||||
Escreva do jeito certo
|
||||
uma vez.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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 / trigger clearly
|
||||
01 / defina o gatilho
|
||||
02 / load detail on demand
|
||||
02 / carregue detalhes sob demanda
|
||||
03 / return evidence
|
||||
03 / devolva evidências
|
||||
SKILL PACKAGE
|
||||
PACOTE DE SKILL
|
||||
SKILL.md
|
||||
procedure and limits
|
||||
references/
|
||||
@@ -310,18 +344,48 @@ templates and examples
|
||||
SKILL.md
|
||||
Trigger, procedure, constraints, and the exact evidence the agent must return.
|
||||
select another file to explore
|
||||
name: review-ui · check focus, mobile, reduced motion · run verification · return evidence
|
||||
Create a skill
|
||||
Criar uma skill
|
||||
repeatable pain → reusable judgment
|
||||
03
|
||||
Choose only useful anatomy
|
||||
atrito repetido → julgamento reutilizável
|
||||
The skill forge
|
||||
A forja de skills
|
||||
Teach the decision.
|
||||
Keep the context
|
||||
light.
|
||||
Ensine a decisão.
|
||||
Mantenha o contexto
|
||||
leve.
|
||||
Do not package everything you know. Capture the non-obvious choices that repeatedly
|
||||
improve an outcome, then prove the skill changes behavior.
|
||||
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.
|
||||
01
|
||||
Start from repeated friction
|
||||
05
|
||||
Test behavior, then sharpen
|
||||
Observe
|
||||
Observar
|
||||
find repeated friction
|
||||
encontre atrito repetido
|
||||
02
|
||||
Make discovery precise
|
||||
Define trigger
|
||||
Definir gatilho
|
||||
route precisely
|
||||
roteie com precisão
|
||||
03
|
||||
Choose anatomy
|
||||
Escolher anatomia
|
||||
only needed files
|
||||
apenas arquivos necessários
|
||||
04
|
||||
Write what changes decisions
|
||||
Write guidance
|
||||
Escrever orientação
|
||||
decisions, not trivia
|
||||
decisões, não trivialidades
|
||||
05
|
||||
Validate
|
||||
Validar
|
||||
test real behavior
|
||||
teste comportamento real
|
||||
01
|
||||
QUESTION
|
||||
Start from repeated friction
|
||||
@@ -332,31 +396,88 @@ ARTIFACT
|
||||
A narrow capability and concrete examples.
|
||||
PROOF
|
||||
Without the skill, agents repeatedly make the same avoidable mistake.
|
||||
OUTPUT / SKILL PACKAGE
|
||||
SAÍDA / PACOTE DE SKILL
|
||||
review-ui/
|
||||
├── SKILL.md
|
||||
├── agents/
|
||||
│ └── openai.yaml
|
||||
├── references/
|
||||
│ └── accessibility.md
|
||||
└── scripts/
|
||||
└── verify.mjs
|
||||
VALIDATE
|
||||
VALIDAR
|
||||
quick_validate.py ./review-ui
|
||||
AFTER REAL USE
|
||||
APÓS USO REAL
|
||||
observe failure
|
||||
→
|
||||
sharpen one rule
|
||||
→
|
||||
retest behavior
|
||||
→
|
||||
keep it narrow
|
||||
observar falha
|
||||
→
|
||||
refinar uma regra
|
||||
→
|
||||
retestar comportamento
|
||||
→
|
||||
manter estreita
|
||||
Common skills
|
||||
Skills comuns
|
||||
choose behavior before model
|
||||
escolha o comportamento antes do modelo
|
||||
COMMUNICATION STYLE
|
||||
caveman
|
||||
Use for routine status, handoffs, and technical summaries where speed matters. Short fragments make actions and evidence easy to scan.
|
||||
DIAGNOSTIC LOOP
|
||||
diagnosing-bugs
|
||||
Use for hard bugs, flakes, and regressions. First build a fast deterministic reproduction, then minimize, rank hypotheses, instrument, and fix the root cause.
|
||||
SIMPLIFICATION INSTINCT
|
||||
The field kit
|
||||
O kit de campo
|
||||
Different jobs.
|
||||
Different
|
||||
instincts.
|
||||
Trabalhos diferentes.
|
||||
Instintos
|
||||
diferentes.
|
||||
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.
|
||||
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.
|
||||
SIMPLIFY
|
||||
SIMPLIFICAR
|
||||
ponytail-lite
|
||||
Use when a request invites frameworks, dependencies, abstractions, or speculative scaffolding. It checks reuse, standard library, and native platform features before adding code.
|
||||
CONTEXT ECONOMY
|
||||
token-saver
|
||||
Use around verbose tests, builds, Git output, and logs. Filtering preserves context for reasoning while retaining full failure output for recovery.
|
||||
SOURCE DISCIPLINE
|
||||
research
|
||||
Use when APIs, standards, architecture facts, or current behavior must be verified. Capture findings in a cited note, prioritizing primary sources.
|
||||
COMPLETION DISCIPLINE
|
||||
minimum code that holds
|
||||
código mínimo que funciona
|
||||
COMMUNICATE
|
||||
COMUNICAR
|
||||
caveman
|
||||
signal without filler
|
||||
sinal sem excesso
|
||||
COMPLETE
|
||||
CONCLUIR
|
||||
unlazy
|
||||
Use for substantial autonomous builds, audits, and parallel work where quiet omissions are expensive. It turns “done” into runnable acceptance checks.
|
||||
INDEPENDENT REVIEW
|
||||
gates and evidence
|
||||
gates e evidências
|
||||
INVESTIGATE
|
||||
INVESTIGAR
|
||||
research
|
||||
primary sources first
|
||||
fontes primárias primeiro
|
||||
DIAGNOSE
|
||||
DIAGNOSTICAR
|
||||
diagnosing-bugs
|
||||
tight feedback loop
|
||||
ciclo curto de feedback
|
||||
REVIEW
|
||||
REVISAR
|
||||
code-review
|
||||
Use on a branch or PR. One axis checks repository standards; another checks whether the change actually satisfies its originating specification.
|
||||
standards × spec
|
||||
padrões × especificação
|
||||
ECONOMIZE
|
||||
ECONOMIZAR
|
||||
token-saver
|
||||
compress noisy output
|
||||
comprima saídas ruidosas
|
||||
01
|
||||
SIMPLIFICATION INSTINCT
|
||||
ponytail-lite
|
||||
@@ -368,8 +489,34 @@ Date picker? Start with <input type="date">.
|
||||
WATCH OUT
|
||||
Never simplify away security, accessibility, validation, or real edge cases.
|
||||
GITHUB SOURCE ↗
|
||||
ONE PRACTICAL LOADOUT
|
||||
UM LOADOUT PRÁTICO
|
||||
PLAN
|
||||
unlazy
|
||||
→
|
||||
BUILD
|
||||
ponytail-lite
|
||||
→
|
||||
DEBUG
|
||||
diagnosing-bugs
|
||||
→
|
||||
REPORT
|
||||
caveman
|
||||
PLANEJAR
|
||||
unlazy
|
||||
→
|
||||
CONSTRUIR
|
||||
ponytail-lite
|
||||
→
|
||||
DIAGNOSTICAR
|
||||
diagnosing-bugs
|
||||
→
|
||||
REPORTAR
|
||||
caveman
|
||||
INSTALL PACK
|
||||
PACOTE DE INSTALAÇÃO
|
||||
Ask your coding agent to verify, install, and validate the skills.
|
||||
Peça ao seu agente para verificar, instalar e validar as skills.
|
||||
COPY
|
||||
↗
|
||||
Inspect and install only these public agent skills. Pin the exact commits:
|
||||
@@ -380,19 +527,61 @@ Inspect and install only these public agent skills. Pin the exact commits:
|
||||
- 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.
|
||||
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.
|
||||
Review every source before installation. Existing local skills must be preserved.
|
||||
Revise cada fonte antes da instalação. Skills locais existentes devem ser preservadas.
|
||||
Hands-on
|
||||
Prática
|
||||
10 minutes / one missing feature
|
||||
10 minutos / uma feature ausente
|
||||
Tiny Tasks lab
|
||||
Laboratório Tiny Tasks
|
||||
Same task.
|
||||
Better
|
||||
operating system.
|
||||
Mesma tarefa.
|
||||
Melhor
|
||||
sistema operacional.
|
||||
Start with a deliberately incomplete static task board. Run one prompt as written,
|
||||
reset, then run the skill-enabled version.
|
||||
reset, then run the skill-enabled version. Compare diff size, verification evidence, and
|
||||
unnecessary complexity.
|
||||
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.
|
||||
Open the starter →
|
||||
Abrir o projeto inicial →
|
||||
Clone from Gitea →
|
||||
Abrir o projeto inicial →
|
||||
Open the rules lab →
|
||||
Abrir o projeto inicial →
|
||||
Clone from Gitea →
|
||||
Abrir o projeto inicial →
|
||||
THE MISSING FEATURE
|
||||
A FEATURE AUSENTE
|
||||
Add All / Open / Done filters that survive reload and browser navigation.
|
||||
Adicione filtros Todos / Abertos / Concluídos que sobrevivem reload e navegação.
|
||||
STACK
|
||||
HTML · CSS · JavaScript
|
||||
DEPENDENCIES
|
||||
none
|
||||
FILES
|
||||
3
|
||||
STACK
|
||||
HTML · CSS · JavaScript
|
||||
DEPENDÊNCIAS
|
||||
nenhuma
|
||||
ARQUIVOS
|
||||
3
|
||||
RUN A
|
||||
Good prompt
|
||||
Bom prompt
|
||||
COPY
|
||||
↗
|
||||
Work only in hands-on/starter. It is dependency-free HTML, CSS, and JavaScript.
|
||||
@@ -407,9 +596,23 @@ Requirements:
|
||||
- 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.
|
||||
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.
|
||||
Clear context · constraints · acceptance · evidence
|
||||
Contexto claro · restrições · aceitação · evidência
|
||||
RUN B
|
||||
Good prompt + skills
|
||||
Bom prompt + skills
|
||||
COPY
|
||||
↗
|
||||
Use $ponytail-lite and $webapp-testing.
|
||||
@@ -423,25 +626,101 @@ Acceptance:
|
||||
- invalid status falls back safely to all
|
||||
- style remains consistent; unrelated files remain untouched
|
||||
Return the smallest working diff and concrete verification evidence.
|
||||
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.
|
||||
Same contract · explicit working methods · stronger proof
|
||||
Mesmo contrato · métodos explícitos · prova mais forte
|
||||
COMPARE THE RUNS
|
||||
COMPARE AS EXECUÇÕES
|
||||
01
|
||||
Files changed
|
||||
Arquivos alterados
|
||||
02
|
||||
New dependencies
|
||||
Novas dependências
|
||||
03
|
||||
Checks actually run
|
||||
Checks executados
|
||||
04
|
||||
Evidence returned
|
||||
Evidências retornadas
|
||||
THE HUMAN JOB
|
||||
O PAPEL HUMANO
|
||||
The agent may be autonomous in execution. Intent, boundaries, and evidence remain yours.
|
||||
O agente pode ser autônomo na execução. Intenção, limites e evidências continuam sendo seus.
|
||||
O agente pode ser autônomo na execução. Intenção, limites e evidências continuam sendo
|
||||
seus.
|
||||
START HERE
|
||||
COMECE AQUI
|
||||
Begin with one agent and one skill. Add parallelism only when the tasks are truly
|
||||
independent.
|
||||
Comece com um agente e uma skill. Adicione paralelismo apenas quando as tarefas forem
|
||||
realmente independentes.
|
||||
Verification
|
||||
run each gate separately
|
||||
Checks become evidence
|
||||
Three layers.
|
||||
Run each one alone.
|
||||
Run a gate on its own line, print its exit code, attach the output. The result is the
|
||||
deliverable.
|
||||
01 · STATIC
|
||||
Lint and types
|
||||
Format, lint, type-check. Fast and scoped to one file.
|
||||
pnpm lint; echo "lint=$?"
|
||||
Format, lint, type-check. Fast and scoped to one file. Run on every save.
|
||||
pnpm lint; echo "lint=$?" pnpm typecheck; echo "typecheck=$?"
|
||||
02 · BEHAVIOR
|
||||
Unit and contract
|
||||
Tests that repeat. Run before claiming done.
|
||||
pnpm test; echo "test=$?"
|
||||
pnpm test; echo "test=$?" cd services/api && go test ./...
|
||||
03 · INTEGRATION
|
||||
Real UI and API
|
||||
Drive the actual UI, API, or browser.
|
||||
pnpm check:ui; echo "ui=$?"
|
||||
Drive the actual UI, API, or browser. Slower and flakier — only this catches mobile
|
||||
overflow and a missing 404.
|
||||
pnpm check:ui; echo "ui=$?" TURBO_FORCE=true pnpm e2e
|
||||
FOUR WAYS A GREEN REPORT IS FALSE
|
||||
1
|
||||
Pipe a gate
|
||||
tail, grep, or head hide the real exit code — a pipeline returns the last command's
|
||||
status.
|
||||
2
|
||||
Swallow a rejection
|
||||
A silent
|
||||
.catch(() => {})
|
||||
hides a panic, an upstream limit, or a partial
|
||||
failure.
|
||||
3
|
||||
Trust the cache
|
||||
Turbo caches results. A gate that "passes" may not have run — use
|
||||
TURBO_FORCE=true
|
||||
.
|
||||
4
|
||||
Skip the third layer
|
||||
Lint and unit can both be green while the page breaks on mobile and the API never
|
||||
returns 404.
|
||||
RUN IT YOURSELF · two labs, under 10 minutes each
|
||||
Path A · verification lab
|
||||
Fill the four-row comparison strip on the starter. Run A naively, Run B with
|
||||
$gate-discipline
|
||||
and
|
||||
$webapp-testing
|
||||
.
|
||||
Open the starter →
|
||||
Clone ↗
|
||||
git.marcospaulo.dev.br/.../src/branch/pages/hands-on/starter
|
||||
Path B · rules lab
|
||||
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.
|
||||
Open the rules lab →
|
||||
Open the rules lab →
|
||||
Clone ↗
|
||||
git.marcospaulo.dev.br/.../src/branch/pages/hands-on/rules
|
||||
Keep learning
|
||||
Continue aprendendo
|
||||
12 new readings + primary docs
|
||||
@@ -450,8 +729,26 @@ Go deeper with official documentation, production case studies, Medium, and prac
|
||||
workflows.
|
||||
Rules and enforcement case study →
|
||||
Skills review desk →
|
||||
Primary references →
|
||||
12-part reading path →
|
||||
Aprofunde com documentação oficial, casos de produção, Medium e fluxos de praticantes.
|
||||
Estudo de caso sobre regras e enforcement →
|
||||
Skills review desk →
|
||||
Referências primárias →
|
||||
Trilha com 12 leituras →
|
||||
Navigate by idea
|
||||
short chapters / one system
|
||||
Prefer a focused chapter? Start with the
|
||||
route map
|
||||
, then
|
||||
jump directly to
|
||||
models
|
||||
,
|
||||
agents and worktrees
|
||||
,
|
||||
skill creation
|
||||
,
|
||||
rules
|
||||
, or
|
||||
the
|
||||
skills review desk
|
||||
.
|
||||
|
||||
@@ -164,3 +164,54 @@ review-desk interaction modes.
|
||||
|
||||
Start from `rejected/19-attempt-1` rather than from scratch — the `dist/`
|
||||
re-point and the Portuguese coverage check are worth keeping.
|
||||
|
||||
## Attempt 2 contract mapping
|
||||
|
||||
Baseline: 42 original assertions. `scripts/verify.mjs` now has 84 assertion
|
||||
sites: the 42 output/snapshot assertions from attempt 1 plus the 42 contracts
|
||||
below. No assertion was removed. `gate.sh` enforces 84 as the new floor.
|
||||
|
||||
| Original assertion message | Current assertion that pins the same fact | Removal reason |
|
||||
| --------------------------------------------------------------- | ------------------------------------------------------------ | -------------- |
|
||||
| `missing reference` | `missing reference contract` | — |
|
||||
| `missing content` | `missing full-guide content contract` | — |
|
||||
| `missing interaction` | `missing full-guide interaction contract` | — |
|
||||
| `missing starter content` | `missing starter content contract` | — |
|
||||
| `missing starter behavior` | `missing starter behavior contract` | — |
|
||||
| `missing additional source` | `missing additional-reading source contract` | — |
|
||||
| `fewer than five additional readings` | `additional-reading coverage fell below five entries` | — |
|
||||
| `missing pinned skill source` | `missing pinned skill-source contract` | — |
|
||||
| `missing model source` | `missing model-source contract` | — |
|
||||
| `external runtime dependency found` | `full-guide has an external runtime dependency` | — |
|
||||
| `missing rules content` | `missing rules content contract` | — |
|
||||
| `missing rules interaction` | `missing rules interaction contract` | — |
|
||||
| `missing rules control` | `missing rules-control contract` | — |
|
||||
| `main presentation does not link to rules page` | `full-guide no longer links to rules` | — |
|
||||
| `main presentation does not link to skills review page` | `full-guide no longer links to skills review` | — |
|
||||
| `main presentation missing chapter route` | `full-guide is missing a chapter route` | — |
|
||||
| `rules page has an external runtime dependency` | `rules page has an external runtime dependency` | — |
|
||||
| `missing rules responsive contract` | `missing rules responsive contract` | — |
|
||||
| `missing review page content` | `missing review page-content contract` | — |
|
||||
| `missing review interaction` | `missing review interaction contract` | — |
|
||||
| `missing review file manifest` | `missing review file-manifest contract` | — |
|
||||
| `review catalog does not cover all submissions` | `review catalog no longer covers all submissions` | — |
|
||||
| `review catalog does not record secret safety handling` | `review catalog lost its secret-safety contract` | — |
|
||||
| `chapter page missing shared navigation` | `chapter page missing shared navigation` | — |
|
||||
| `missing chapter responsive contract` | `missing chapter responsive contract` | — |
|
||||
| `landing page missing` | `landing page missing a route-map destination` | — |
|
||||
| `landing page should remain a fast, static route map` | `landing page is no longer a static route map` | — |
|
||||
| `skills anatomy missing` | `skills anatomy missing package contract` | — |
|
||||
| `skills anatomy interaction missing` | `skills anatomy lost its interaction module` | — |
|
||||
| `skills anatomy responsive contract missing` | `skills anatomy lost responsive contract` | — |
|
||||
| `operational submission privacy leak` | `operational submission privacy leak` | — |
|
||||
| `operational submission identity remains in review desk source` | `operational submission identity remains in review output` | — |
|
||||
| `operational submission redaction contract missing` | `operational submission redaction contract missing` | — |
|
||||
| `review file-mode contract missing` | `review file-mode contract missing` | — |
|
||||
| `file selection still resets improved mode` | `review file selection no longer preserves preview mode` | — |
|
||||
| `review change-lens contract missing` | `review change-lens contract missing` | — |
|
||||
| `review change-lens CSS missing` | `review change-lens CSS contract missing` | — |
|
||||
| `review markdown preview contract missing` | `review markdown-preview contract missing` | — |
|
||||
| `review vote widget wiring missing` | `review vote-widget island is not wired to a hashed asset` | — |
|
||||
| `review vote widget contract missing` | `review vote-widget contract missing` | — |
|
||||
| `review vote widget CSS missing` | `review vote-widget CSS contract missing` | — |
|
||||
| `vote-service missing IP-based one-vote-per-source contract` | `vote-service missing IP-based one-vote-per-source contract` | — |
|
||||
|
||||
+50
-18
@@ -1,4 +1,5 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8');
|
||||
const pages = [
|
||||
@@ -13,27 +14,58 @@ const pages = [
|
||||
'hands-on/starter/index.html',
|
||||
'hands-on/rules/index.html',
|
||||
];
|
||||
const walk = (path) =>
|
||||
readdirSync(path).flatMap((name) => {
|
||||
const child = join(path, name);
|
||||
return statSync(child).isDirectory() ? walk(child) : [child];
|
||||
});
|
||||
const definitions = (css) => new Set([...css.matchAll(/(--[\w-]+)\s*:/g)].map(([, name]) => name));
|
||||
const uses = (css) => new Set([...css.matchAll(/var\((--[\w-]+)/g)].map(([, name]) => name));
|
||||
const builtCss = walk('dist/_astro')
|
||||
.filter((path) => path.endsWith('.css'))
|
||||
.map((path) => readFileSync(path, 'utf8'))
|
||||
.join('\n');
|
||||
const builtValues = {
|
||||
colors: new Set(builtCss.match(/#[0-9a-fA-F]{3,8}\b|(?:rgba?|hsla?)\([^)]*\)/g) || []),
|
||||
sizes: new Set(builtCss.match(/\b\d+(?:\.\d+)?(?:px|rem|em|vw|vh)\b/g) || []),
|
||||
};
|
||||
if (!builtCss) throw new Error('Astro build emitted no CSS assets to audit');
|
||||
// Captured from origin/main after its Astro build. This catches a value that is
|
||||
// silently changed to a nearby token: source token checks cannot see that drift.
|
||||
const baselineValues = JSON.parse(read('.agents/snapshots/built-css-values.json'));
|
||||
|
||||
for (const page of pages) {
|
||||
const html = read(page);
|
||||
if (!html.includes('name="viewport"')) throw new Error(`${page} lacks a viewport declaration`);
|
||||
if (html.match(/<(script|link)[^>]+(src|href)="https?:[^\"]+"/i))
|
||||
throw new Error(`${page} has an external runtime dependency`);
|
||||
}
|
||||
const shared = read('chapters.css');
|
||||
const skills = read('skills/styles.css');
|
||||
const guide = read('full-guide/index.html');
|
||||
const guideAudit = read('full-guide/audit.css');
|
||||
for (const token of ['@media(max-width:800px)', '@media(max-width:520px)'])
|
||||
if (!shared.includes(token)) throw new Error(`shared chapter CSS lacks ${token}`);
|
||||
for (const token of [
|
||||
'minmax(0,1.3fr)',
|
||||
'overflow-wrap:anywhere',
|
||||
'@media(max-width:800px)',
|
||||
'prefers-reduced-motion',
|
||||
])
|
||||
if (!skills.includes(token)) throw new Error(`skills package CSS lacks ${token}`);
|
||||
if (!guide.includes('href="audit.css"'))
|
||||
throw new Error('full guide does not load its responsive audit overrides');
|
||||
for (const token of ['.handoff table', '.route-table button', 'overflow-wrap:anywhere'])
|
||||
if (!guideAudit.includes(token)) throw new Error(`full guide audit CSS lacks ${token}`);
|
||||
for (const file of walk('dist').filter((path) => path.endsWith('.css'))) {
|
||||
const css = readFileSync(file, 'utf8').replace(/\/\*[\s\S]*?\*\//g, '');
|
||||
if (/@import|src:\s*url\(['"]?https?:|url\(['"]?https?:/i.test(css))
|
||||
throw new Error(`${file} has an external CSS dependency`);
|
||||
}
|
||||
for (const [kind, values] of Object.entries(baselineValues)) {
|
||||
const missing = values.filter((value) => !builtValues[kind].has(value));
|
||||
if (missing.length) throw new Error(`built CSS lost ${kind}: ${missing.join(', ')}`);
|
||||
}
|
||||
// Legacy fixtures still ship directly. Resolve every var() from the stylesheets
|
||||
// that page actually links; Astro's tokens cannot mask a broken standalone page.
|
||||
for (const page of pages) {
|
||||
const html = read(page);
|
||||
const linked = [...html.matchAll(/<link[^>]+rel="stylesheet"[^>]+href="([^"]+)"/gi)].map(
|
||||
([, href]) => href,
|
||||
);
|
||||
const styles = linked
|
||||
.filter((href) => !/^https?:/i.test(href))
|
||||
.map((href) => read(join(dirname(page), href)));
|
||||
const defined = new Set(styles.flatMap((css) => [...definitions(css)]));
|
||||
const unresolved = new Set(
|
||||
styles.flatMap((css) =>
|
||||
[...uses(css)].filter((name) => name !== '--score' && !defined.has(name)),
|
||||
),
|
||||
);
|
||||
if (unresolved.size)
|
||||
throw new Error(`${page} has unresolved CSS variables: ${[...unresolved].join(', ')}`);
|
||||
}
|
||||
console.log('responsive UI audit passed');
|
||||
|
||||
+385
-327
@@ -1,120 +1,155 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { readFileSync, readdirSync } from 'node:fs';
|
||||
|
||||
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8');
|
||||
const landingHtml = read('index.html');
|
||||
const html = read('full-guide/index.html');
|
||||
const js = read('app.js');
|
||||
const refs = read('docs/references/README.md');
|
||||
const additional = read('docs/references/additional-reading.md');
|
||||
const starterHtml = read('hands-on/starter/index.html');
|
||||
const starterJs = read('hands-on/starter/app.js');
|
||||
const skillSources = read('docs/references/skill-sources.md');
|
||||
const modelRouting = read('docs/references/model-routing.md');
|
||||
const rulesHtml = read('rules/index.html');
|
||||
const rulesJs = read('rules/app.js');
|
||||
const rulesCss = read('rules/styles.css');
|
||||
const reviewHtml = read('skills-review/index.html');
|
||||
const reviewJs = read('skills-review/app.js');
|
||||
const reviewFiles = read('skills-review/files.js');
|
||||
const reviewLensCss = read('skills-review/change-lens.css');
|
||||
const chaptersCss = read('chapters.css');
|
||||
const summaryHtml = read('summary/index.html');
|
||||
const modelsHtml = read('models/index.html');
|
||||
const agentsHtml = read('agents/index.html');
|
||||
const skillsHtml = read('skills/index.html');
|
||||
const reviewCatalog = read('skills-review/catalog.js');
|
||||
const reviewVoteJs = read('skills-review/vote.js');
|
||||
const voteService = read('vote-service/main.go');
|
||||
for (const url of [
|
||||
'https://code.claude.com/docs/en/sub-agents',
|
||||
'https://code.claude.com/docs/en/skills',
|
||||
'https://code.claude.com/docs/en/worktrees',
|
||||
'https://git-scm.com/docs/git-worktree.html',
|
||||
'https://developers.openai.com/codex/skills',
|
||||
])
|
||||
if (!refs.includes(url)) throw new Error(`missing reference ${url}`);
|
||||
console.log('content verification passed');
|
||||
for (const token of [
|
||||
'data-phase="plan"',
|
||||
'data-phase="build"',
|
||||
'data-phase="review"',
|
||||
'data-tree="main"',
|
||||
'data-tree="ui"',
|
||||
'data-worker="ui"',
|
||||
const built = (path) => read(`dist/${path}`);
|
||||
const rendered = (value) =>
|
||||
value
|
||||
.replace(/<script[\s\S]*?<\/script>/gi, '')
|
||||
.replace(/<style[\s\S]*?<\/style>/gi, '')
|
||||
.replace(/<!--[\s\S]*?-->/g, '')
|
||||
.replace(/<[^>]+>/g, ' ')
|
||||
.replace(/&/g, '&')
|
||||
.replace(
|
||||
/&(lt|gt|quot|nbsp);/g,
|
||||
(_, entity) => ({ lt: '<', gt: '>', quot: '"', nbsp: ' ' })[entity],
|
||||
)
|
||||
.replace(/�?39;/g, "'")
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim();
|
||||
const normalize = (value) => value.replace(/\s+/g, ' ').trim();
|
||||
|
||||
const html = {
|
||||
landing: built('index.html'),
|
||||
guide: built('full-guide/index.html'),
|
||||
summary: built('summary/index.html'),
|
||||
models: built('models/index.html'),
|
||||
agents: built('agents/index.html'),
|
||||
skills: built('skills/index.html'),
|
||||
rules: built('rules/index.html'),
|
||||
review: built('skills-review/index.html'),
|
||||
starter: built('hands-on/starter/index.html'),
|
||||
labRules: built('hands-on/rules/index.html'),
|
||||
};
|
||||
const snapshot = (path) => normalize(read(`.agents/snapshots/${path}`));
|
||||
const reviewAssetSrc = html.review.match(/src="([^"]+\.[a-zA-Z0-9_-]{8,}\.js)"/)?.[1];
|
||||
const reviewAsset = reviewAssetSrc ? read(`dist/_astro/${reviewAssetSrc.split('/').at(-1)}`) : '';
|
||||
const builtCss = readdirSync(new URL('../dist/_astro/', import.meta.url))
|
||||
.filter((file) => file.endsWith('.css'))
|
||||
.map((file) => read(`dist/_astro/${file}`))
|
||||
.join('\n');
|
||||
const source = {
|
||||
references: read('docs/references/README.md'),
|
||||
additionalReading: read('docs/references/additional-reading.md'),
|
||||
skillSources: read('src/content/skillSources/ponytail.json'),
|
||||
providers: [
|
||||
read('src/content/providers/openai.json'),
|
||||
read('src/content/providers/claude.json'),
|
||||
read('src/content/providers/gemini.json'),
|
||||
].join('\n'),
|
||||
starter: read('hands-on/starter/app.js'),
|
||||
voteService: read('vote-service/main.go'),
|
||||
ndoReview: read('src/content/reviews/ndo-repro.md'),
|
||||
};
|
||||
|
||||
// Rendered prose catches a deleted paragraph that string-token checks miss.
|
||||
if (rendered(html.landing) !== snapshot('index.txt'))
|
||||
throw new Error('landing rendered-text snapshot changed');
|
||||
if (rendered(html.guide) !== snapshot('full-guide.txt'))
|
||||
throw new Error('full-guide rendered-text snapshot changed');
|
||||
if (rendered(html.summary) !== snapshot('summary.txt'))
|
||||
throw new Error('summary rendered-text snapshot changed');
|
||||
if (rendered(html.models) !== snapshot('models.txt'))
|
||||
throw new Error('models rendered-text snapshot changed');
|
||||
if (rendered(html.agents) !== snapshot('agents.txt'))
|
||||
throw new Error('agents rendered-text snapshot changed');
|
||||
if (rendered(html.skills) !== snapshot('skills.txt'))
|
||||
throw new Error('skills rendered-text snapshot changed');
|
||||
if (rendered(html.rules) !== snapshot('rules.txt'))
|
||||
throw new Error('rules rendered-text snapshot changed');
|
||||
if (rendered(html.review) !== snapshot('skills-review.txt'))
|
||||
throw new Error('skills-review rendered-text snapshot changed');
|
||||
if (rendered(html.starter) !== snapshot('hands-on/starter.txt'))
|
||||
throw new Error('starter rendered-text snapshot changed');
|
||||
if (rendered(html.labRules) !== snapshot('hands-on/rules.txt'))
|
||||
throw new Error('rules lab rendered-text snapshot changed');
|
||||
|
||||
const braceMatch = (source, open) => {
|
||||
let depth = 0;
|
||||
let quote = '';
|
||||
let escaped = false;
|
||||
for (let index = open; index < source.length; index += 1) {
|
||||
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)
|
||||
throw new Error('full-guide Portuguese source no longer has 102 translated strings');
|
||||
if (!portuguese.every((value) => rendered(html.guide).includes(value)))
|
||||
throw new Error('built full-guide lost a Portuguese translation');
|
||||
|
||||
const has = (page, tokens) => tokens.every((token) => page.includes(token));
|
||||
if (!has(html.guide, ['data-phase="plan"', 'data-phase="build"', 'data-phase="review"']))
|
||||
throw new Error('built full-guide lost its phase selector');
|
||||
if (!has(html.guide, ['data-tree="main"', 'data-tree="ui"', 'data-worker="ui"']))
|
||||
throw new Error('built full-guide lost its worker or worktree selector');
|
||||
if (
|
||||
!has(html.guide, [
|
||||
'data-route="plan"',
|
||||
'data-model-provider="openai"',
|
||||
'data-model-provider="claude"',
|
||||
'data-model-provider="gemini"',
|
||||
'data-effort="low"',
|
||||
'data-effort="medium"',
|
||||
'data-effort="high"',
|
||||
])
|
||||
)
|
||||
throw new Error('built full-guide lost its model-routing controls');
|
||||
if (!has(html.guide, ['data-effort="low"', 'data-effort="medium"', 'data-effort="high"']))
|
||||
throw new Error('built full-guide lost its reasoning-effort controls');
|
||||
if (
|
||||
!has(html.guide, [
|
||||
'data-skill-file="skill"',
|
||||
'data-skill-step="observe"',
|
||||
'data-skill-step="validate"',
|
||||
])
|
||||
)
|
||||
throw new Error('built full-guide lost its skill anatomy controls');
|
||||
if (
|
||||
!has(html.guide, [
|
||||
'data-common-skill="ponytail"',
|
||||
'data-common-skill="caveman"',
|
||||
'data-common-skill="unlazy"',
|
||||
])
|
||||
)
|
||||
throw new Error('built full-guide lost its common-skill controls');
|
||||
if (
|
||||
!has(html.guide, [
|
||||
'id="hands-on"',
|
||||
'data-copy-target="prompt-install-skills"',
|
||||
'data-copy-target="prompt-basic"',
|
||||
'data-copy-target="prompt-skills"',
|
||||
'hands-on/starter/',
|
||||
'additional-reading.md',
|
||||
'role="tablist"',
|
||||
'<table',
|
||||
])
|
||||
if (!html.includes(token)) throw new Error(`missing content ${token}`);
|
||||
for (const token of [
|
||||
'const phases',
|
||||
'const handsOnPrompts',
|
||||
'const modelGuide',
|
||||
'const skillSources',
|
||||
'const skillInstallPrompts',
|
||||
'addEventListener',
|
||||
"render('plan')",
|
||||
'renderTree',
|
||||
'renderWorker',
|
||||
'renderRoute',
|
||||
'renderModelProvider',
|
||||
'renderEffort',
|
||||
'renderSkillFile',
|
||||
'renderSkillWorkflow',
|
||||
'renderCommonSkill',
|
||||
'renderHandsOn',
|
||||
'copyPrompt',
|
||||
])
|
||||
if (!js.includes(token)) throw new Error(`missing interaction ${token}`);
|
||||
for (const token of ['id="task-list"', 'id="task-count"'])
|
||||
if (!starterHtml.includes(token)) throw new Error(`missing starter content ${token}`);
|
||||
for (const token of ['const tasks', 'renderTasks()'])
|
||||
if (!starterJs.includes(token)) throw new Error(`missing starter behavior ${token}`);
|
||||
for (const token of [
|
||||
'medium.com',
|
||||
'anthropic.com/engineering',
|
||||
'openai.com/business',
|
||||
'git-scm.com/docs/git-worktree',
|
||||
])
|
||||
if (!additional.includes(token)) throw new Error(`missing additional source ${token}`);
|
||||
if ((additional.match(/^### \d+\./gm) || []).length < 5)
|
||||
throw new Error('fewer than five additional readings');
|
||||
for (const token of [
|
||||
'e7b42dc2d384a702240dea4d52a7bf5530b821b6',
|
||||
'6654f6b60cd9d5be8b54c6fafe44346dabeb3b76',
|
||||
'53048666b05b4799081517d00e09e0a2dd688678',
|
||||
])
|
||||
if (!skillSources.includes(token) || !js.includes(token))
|
||||
throw new Error(`missing pinned skill source ${token}`);
|
||||
for (const token of [
|
||||
'developers.openai.com/api/docs/guides/latest-model',
|
||||
'docs.anthropic.com/en/docs/claude-code/model-config',
|
||||
'ai.google.dev/gemini-api/docs/thinking',
|
||||
])
|
||||
if (!modelRouting.includes(token) || !js.includes(token))
|
||||
throw new Error(`missing model source ${token}`);
|
||||
console.log('interaction verification passed');
|
||||
if (html.match(/<(script|link)[^>]+(src|href)="https?:[^"]+"/i))
|
||||
throw new Error('external runtime dependency found');
|
||||
console.log('standalone verification passed');
|
||||
for (const token of [
|
||||
])
|
||||
)
|
||||
throw new Error('built full-guide lost its hands-on prompts');
|
||||
if (!has(html.guide, ['hands-on/starter/', 'additional-reading.md', 'role="tablist"', '<table']))
|
||||
throw new Error('built full-guide lost its guide navigation or semantics');
|
||||
if (!html.guide.includes('<script type="module">'))
|
||||
throw new Error('built full-guide lost its interaction module');
|
||||
|
||||
if (
|
||||
!has(html.rules, [
|
||||
'id="pipeline"',
|
||||
'id="skills"',
|
||||
'id="examples"',
|
||||
@@ -122,6 +157,11 @@ for (const token of [
|
||||
'data-stage="cli"',
|
||||
'data-stage="commit"',
|
||||
'data-stage="review"',
|
||||
])
|
||||
)
|
||||
throw new Error('built rules page lost its enforcement pipeline');
|
||||
if (
|
||||
!has(html.rules, [
|
||||
'gate-discipline',
|
||||
'parallel-agents',
|
||||
'repo-db',
|
||||
@@ -132,97 +172,36 @@ for (const token of [
|
||||
'.pr-review.json',
|
||||
'.agents/skills',
|
||||
'netcracker/interview',
|
||||
])
|
||||
if (!rulesHtml.includes(token)) throw new Error(`missing rules content ${token}`);
|
||||
console.log('rules content verification passed');
|
||||
for (const token of [
|
||||
'const languageCopy',
|
||||
'const stages',
|
||||
'const skills',
|
||||
'const prompts',
|
||||
'renderStage',
|
||||
'renderSkill',
|
||||
'renderLanguage',
|
||||
'copyPrompt',
|
||||
'addEventListener',
|
||||
])
|
||||
if (!rulesJs.includes(token)) throw new Error(`missing rules interaction ${token}`);
|
||||
for (const token of [
|
||||
])
|
||||
)
|
||||
throw new Error('built rules page lost its case-study content');
|
||||
if (
|
||||
!has(html.rules, [
|
||||
'data-lang="en"',
|
||||
'data-lang="pt"',
|
||||
'data-copy-prompt',
|
||||
'aria-live="polite"',
|
||||
'role="tablist"',
|
||||
])
|
||||
if (!rulesHtml.includes(token)) throw new Error(`missing rules control ${token}`);
|
||||
console.log('rules interaction verification passed');
|
||||
if (!html.includes('href="../rules/"'))
|
||||
throw new Error('main presentation does not link to rules page');
|
||||
if (!html.includes('href="../skills-review/"'))
|
||||
throw new Error('main presentation does not link to skills review page');
|
||||
for (const token of ['../summary/', '../models/', '../agents/', '../skills/', 'chapter-route'])
|
||||
if (!html.includes(token)) throw new Error(`main presentation missing chapter route ${token}`);
|
||||
if (rulesHtml.includes('script src="http') || rulesHtml.includes('rel="stylesheet" href="http'))
|
||||
throw new Error('rules page has an external runtime dependency');
|
||||
for (const token of [
|
||||
'@media(min-width:2200px)',
|
||||
'@media(max-width:900px)',
|
||||
'@media(max-width:600px)',
|
||||
'prefers-reduced-motion',
|
||||
])
|
||||
if (!rulesCss.includes(token)) throw new Error(`missing rules responsive contract ${token}`);
|
||||
console.log('rules standalone verification passed');
|
||||
for (const token of [
|
||||
])
|
||||
)
|
||||
throw new Error('built rules page lost its accessible controls');
|
||||
if (!html.rules.includes('data-rules-copy') || !html.rules.includes('"pt"'))
|
||||
throw new Error('built rules page lost its Portuguese interaction data');
|
||||
|
||||
if (
|
||||
!has(html.review, [
|
||||
'id="catalog"',
|
||||
'id="skill-filter"',
|
||||
'id="skill-list"',
|
||||
'id="detail"',
|
||||
'Preview Markdown',
|
||||
'styles.css?v=20260904-vote-widget',
|
||||
'change-lens.css?v=20260904-vote-widget',
|
||||
'app.js?v=20260904-vote-widget',
|
||||
'?author=Name&skill=skill-id&view=improved',
|
||||
'SKILLS_REVIEW_VOTE_API',
|
||||
])
|
||||
if (!reviewHtml.includes(token)) throw new Error(`missing review page content ${token}`);
|
||||
for (const token of [
|
||||
"from './catalog.js'",
|
||||
"from './files.js'",
|
||||
'function renderList',
|
||||
'function renderDetail',
|
||||
'selectSkill',
|
||||
'packageSummary',
|
||||
'markdownHeadings',
|
||||
'markdownToc',
|
||||
"document.addEventListener('keydown'",
|
||||
'loadSelectedFile',
|
||||
'schedulePackageSearch',
|
||||
'fetchSource',
|
||||
'packageSearchText',
|
||||
'diffMarkup',
|
||||
'diffRows',
|
||||
'data-diff',
|
||||
"searchParams.set('compare'",
|
||||
'markdownMarkup',
|
||||
'data-render',
|
||||
'preview-markdown',
|
||||
'Preview Markdown',
|
||||
'View source',
|
||||
'FILE PREVIEW',
|
||||
"searchParams.set('render'",
|
||||
'AUTHOR ·',
|
||||
'SKILL ·',
|
||||
'function selectFromUrl',
|
||||
'function syncUrl',
|
||||
'URLSearchParams',
|
||||
'navigator.clipboard',
|
||||
'document.execCommand',
|
||||
'download',
|
||||
'data-file',
|
||||
"searchParams.set('file'",
|
||||
])
|
||||
if (!reviewJs.includes(token)) throw new Error(`missing review interaction ${token}`);
|
||||
for (const token of [
|
||||
])
|
||||
)
|
||||
throw new Error('built review desk lost its catalog or deep-link contract');
|
||||
if (
|
||||
!has(html.review, [
|
||||
'ndo-repro',
|
||||
'gfiber-logging',
|
||||
'confluence-page',
|
||||
@@ -232,33 +211,22 @@ for (const token of [
|
||||
'spanish-naturalizer',
|
||||
'draft-mr',
|
||||
'semantic-diff-review',
|
||||
'reference.md',
|
||||
'files =',
|
||||
])
|
||||
if (!`${reviewFiles}\n${read('skills-review/submitted-files.js')}`.includes(token))
|
||||
throw new Error(`missing review file manifest ${token}`);
|
||||
if (
|
||||
(reviewCatalog.match(/id:'/g) || []).length +
|
||||
(read('skills-review/submitted-catalog.js').match(/id:'/g) || []).length !==
|
||||
24
|
||||
])
|
||||
)
|
||||
throw new Error('review catalog does not cover all submissions');
|
||||
throw new Error('built review desk lost submitted-skill coverage');
|
||||
if (
|
||||
!reviewCatalog.includes('hardcoded password') ||
|
||||
!reviewCatalog.includes('safety-redacted') ||
|
||||
!reviewJs.includes('[REDACTED]') ||
|
||||
!reviewJs.includes('[REDACTED LOCAL USER]') ||
|
||||
!reviewJs.includes('[REDACTED USER]')
|
||||
!html.review.includes('Anonymous%20Operational%20Submission') ||
|
||||
!has(reviewAsset, ['[REDACTED]', '[REDACTED LOCAL USER]', '[REDACTED USER]'])
|
||||
)
|
||||
throw new Error('review catalog does not record secret safety handling');
|
||||
console.log('skills review verification passed');
|
||||
for (const page of [summaryHtml, modelsHtml, agentsHtml, skillsHtml])
|
||||
if (!page.includes('../chapters.css') || !page.includes('ROUTE MAP'))
|
||||
throw new Error('chapter page missing shared navigation');
|
||||
for (const token of ['--ink', '@media(max-width:800px)', '@media(max-width:520px)'])
|
||||
if (!chaptersCss.includes(token)) throw new Error(`missing chapter responsive contract ${token}`);
|
||||
console.log('chapter route verification passed');
|
||||
for (const token of [
|
||||
throw new Error('built review desk lost operational-submission privacy redactions');
|
||||
if (!reviewAssetSrc) throw new Error('built review desk does not load its hashed island asset');
|
||||
|
||||
if (
|
||||
![html.summary, html.models, html.agents, html.skills].every((page) => page.includes('ROUTE MAP'))
|
||||
)
|
||||
throw new Error('built chapter pages lost shared navigation');
|
||||
if (
|
||||
!has(html.landing, [
|
||||
'The short route',
|
||||
'full-guide/',
|
||||
'models/',
|
||||
@@ -267,131 +235,221 @@ for (const token of [
|
||||
'rules/',
|
||||
'hands-on/starter/',
|
||||
'skills-review/',
|
||||
])
|
||||
if (!landingHtml.includes(token)) throw new Error(`landing page missing ${token}`);
|
||||
if (landingHtml.includes('app.js'))
|
||||
throw new Error('landing page should remain a fast, static route map');
|
||||
console.log('landing route verification passed');
|
||||
for (const token of [
|
||||
'data-package-file="skill"',
|
||||
'data-package-file="references"',
|
||||
'data-package-file="scripts"',
|
||||
'data-package-file="assets"',
|
||||
'id="package-preview"',
|
||||
'script src="app.js"',
|
||||
])
|
||||
if (!skillsHtml.includes(token)) throw new Error(`skills anatomy missing ${token}`);
|
||||
const skillsApp = read('skills/app.js');
|
||||
const skillsCss = read('skills/styles.css');
|
||||
for (const token of [
|
||||
'const packageFiles',
|
||||
'function renderPackage',
|
||||
'addEventListener',
|
||||
"renderPackage('skill')",
|
||||
])
|
||||
if (!skillsApp.includes(token)) throw new Error(`skills anatomy interaction missing ${token}`);
|
||||
for (const token of [
|
||||
'grid-template-columns:minmax(190px',
|
||||
'overflow-wrap:anywhere',
|
||||
'@media(max-width:800px)',
|
||||
'prefers-reduced-motion',
|
||||
])
|
||||
if (!skillsCss.includes(token))
|
||||
throw new Error(`skills anatomy responsive contract missing ${token}`);
|
||||
console.log('skills anatomy verification passed');
|
||||
console.log('presentation verification passed');
|
||||
const legacyName = String.fromCharCode(80, 101, 100, 114, 111, 32, 65, 114, 97, 110, 104, 97);
|
||||
const legacyHandle = legacyName.toLowerCase().replace(' ', '.');
|
||||
for (const path of [
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/SKILL.md',
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/envs.tsv',
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/lib/env.sh',
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/ndo-api.sh',
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/ndo-ship.sh',
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/reference/bom-Dockerfile_local.example',
|
||||
'submitted-skills/Anonymous Operational Submission/skills/ndo-repro/reference/dockerfile-local.md',
|
||||
'skill-reviews/improved/ndo-repro/SKILL.md',
|
||||
]) {
|
||||
const source = read(path);
|
||||
if (
|
||||
new RegExp(
|
||||
`${legacyName}|${legacyHandle}|https?:\\/\\/|git\\.netcracker\\.com|artifactorycn|managed\\.netcracker\\.cloud`,
|
||||
'i',
|
||||
).test(source)
|
||||
)
|
||||
throw new Error(`operational submission privacy leak in ${path}`);
|
||||
}
|
||||
for (const source of [reviewCatalog, reviewFiles, reviewJs])
|
||||
if (source.includes(legacyName) || source.includes(legacyName.replace(' ', '%20')))
|
||||
throw new Error('operational submission identity remains in review desk source');
|
||||
])
|
||||
)
|
||||
throw new Error('built landing page lost a route-map destination');
|
||||
if (/<script\b/i.test(html.landing))
|
||||
throw new Error('built landing page is no longer a static route map');
|
||||
if (
|
||||
!reviewFiles.includes('Anonymous%20Operational%20Submission') ||
|
||||
!reviewJs.includes("entry.id === 'ndo-repro'")
|
||||
!has(html.skills, [
|
||||
'data-skill-file="skill"',
|
||||
'data-skill-file="references"',
|
||||
'data-skill-file="scripts"',
|
||||
'data-skill-file="assets"',
|
||||
'id="package-preview"',
|
||||
])
|
||||
)
|
||||
throw new Error('built skills page lost its package explorer');
|
||||
if (!has(html.starter, ['id="task-list"', 'id="task-count"']))
|
||||
throw new Error('starter lab lost its task-list contract');
|
||||
|
||||
const allPages = Object.entries(html);
|
||||
if (!allPages.every(([, page]) => page.includes('name="viewport"')))
|
||||
throw new Error('a built route lacks a viewport declaration');
|
||||
if (allPages.some(([, page]) => /<(script|link)[^>]+(src|href)="https?:[^\"]+"/i.test(page)))
|
||||
throw new Error('a built route has an external runtime dependency');
|
||||
if (
|
||||
!read('package.json').includes(
|
||||
'"verify": "node scripts/verify.mjs && node scripts/audit-ui.mjs && node .agents/scripts/check-tokens.mjs"',
|
||||
)
|
||||
)
|
||||
throw new Error('pnpm verify no longer runs audit-ui and check-tokens');
|
||||
if (!read('.agents/scripts/gate.sh').includes('pnpm run verify'))
|
||||
throw new Error('the gate no longer runs the output contract');
|
||||
if (!read('docs/references/README.md').includes('https://developers.openai.com/codex/skills'))
|
||||
throw new Error('primary reference list lost Codex skills');
|
||||
if ((read('docs/references/additional-reading.md').match(/^### \d+\./gm) || []).length < 5)
|
||||
throw new Error('additional reading list has fewer than five entries');
|
||||
if (
|
||||
/Pedro\s+Aranha|pedro\.aranha|git\.netcracker\.com|artifactorycn|managed\.netcracker\.cloud/i.test(
|
||||
read('src/content/reviews/ndo-repro.md'),
|
||||
)
|
||||
)
|
||||
throw new Error('operational review content has a privacy leak');
|
||||
|
||||
// These retain the pre-Astro contract one fact at a time. Visible facts read
|
||||
// from dist; source-only contracts remain at their authoritative boundary.
|
||||
if (
|
||||
![
|
||||
'https://code.claude.com/docs/en/sub-agents',
|
||||
'https://code.claude.com/docs/en/skills',
|
||||
'https://code.claude.com/docs/en/worktrees',
|
||||
'https://git-scm.com/docs/git-worktree.html',
|
||||
'https://developers.openai.com/codex/skills',
|
||||
].every((url) => source.references.includes(url))
|
||||
)
|
||||
throw new Error('missing reference contract');
|
||||
if (!has(html.guide, ['data-phase="plan"', 'data-copy-target="prompt-basic"']))
|
||||
throw new Error('missing full-guide content contract');
|
||||
if (!has(html.guide, ['data-route="plan"', 'data-skill-file="skill"', '<script type="module">']))
|
||||
throw new Error('missing full-guide interaction contract');
|
||||
if (!has(html.starter, ['id="task-list"', 'id="task-count"']))
|
||||
throw new Error('missing starter content contract');
|
||||
if (!['const tasks', 'renderTasks()'].every((token) => source.starter.includes(token)))
|
||||
throw new Error('missing starter behavior contract');
|
||||
if (
|
||||
![
|
||||
'medium.com',
|
||||
'anthropic.com/engineering',
|
||||
'openai.com/business',
|
||||
'git-scm.com/docs/git-worktree',
|
||||
].every((url) => source.additionalReading.includes(url))
|
||||
)
|
||||
throw new Error('missing additional-reading source contract');
|
||||
if ((source.additionalReading.match(/^### \d+\./gm) || []).length < 5)
|
||||
throw new Error('additional-reading coverage fell below five entries');
|
||||
if (
|
||||
![
|
||||
'e7b42dc2d384a702240dea4d52a7bf5530b821b6',
|
||||
'6654f6b60cd9d5be8b54c6fafe44346dabeb3b76',
|
||||
'53048666b05b4799081517d00e09e0a2dd688678',
|
||||
].every((sha) => `${source.skillSources}\n${html.guide}`.includes(sha))
|
||||
)
|
||||
throw new Error('missing pinned skill-source contract');
|
||||
if (
|
||||
![
|
||||
'developers.openai.com/api/docs/guides/latest-model',
|
||||
'docs.anthropic.com/en/docs/claude-code/model-config',
|
||||
'ai.google.dev/gemini-api/docs/thinking',
|
||||
].every((url) => `${source.providers}\n${html.guide}`.includes(url))
|
||||
)
|
||||
throw new Error('missing model-source contract');
|
||||
if (/<(script|link)[^>]+(src|href)="https?:[^\"]+"/i.test(html.guide))
|
||||
throw new Error('full-guide has an external runtime dependency');
|
||||
if (!has(html.rules, ['id="pipeline"', 'id="skills"', 'id="examples"']))
|
||||
throw new Error('missing rules content contract');
|
||||
if (!has(html.rules, ['data-stage="context"', 'data-copy-prompt', '<script>']))
|
||||
throw new Error('missing rules interaction contract');
|
||||
if (!has(html.rules, ['data-lang="en"', 'data-lang="pt"', 'aria-live="polite"']))
|
||||
throw new Error('missing rules-control contract');
|
||||
if (!html.guide.includes('href="/ai-for-dummies/rules/"'))
|
||||
throw new Error('full-guide no longer links to rules');
|
||||
if (!html.guide.includes('href="/ai-for-dummies/skills-review/"'))
|
||||
throw new Error('full-guide no longer links to skills review');
|
||||
if (!['summary/', 'models/', 'agents/', 'skills/'].every((route) => html.guide.includes(route)))
|
||||
throw new Error('full-guide is missing a chapter route');
|
||||
if (/<(script|link)[^>]+(src|href)="https?:[^\"]+"/i.test(html.rules))
|
||||
throw new Error('rules page has an external runtime dependency');
|
||||
if (
|
||||
!['@media(max-width:800px)', '@media(min-width:2200px)', 'prefers-reduced-motion'].every(
|
||||
(token) => builtCss.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('missing rules responsive contract');
|
||||
if (!has(html.review, ['id="catalog"', 'id="skill-filter"', 'id="skill-list"', 'id="detail"']))
|
||||
throw new Error('missing review page-content contract');
|
||||
if (
|
||||
!['data-render', 'preview-markdown', 'data-file', 'URLSearchParams', 'navigator.clipboard'].every(
|
||||
(token) => reviewAsset.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('missing review interaction contract');
|
||||
if (
|
||||
!['reference.md', 'ndo-repro', 'semantic-diff-review'].every((token) =>
|
||||
html.review.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('missing review file-manifest contract');
|
||||
// The desk renders its cards from an inline JSON payload, so `data-skill-id`
|
||||
// only exists after the island runs. Count the entries in the payload instead.
|
||||
if ((html.review.match(/\\"id\\":/g) || []).length !== 24)
|
||||
throw new Error('review catalog no longer covers all submissions');
|
||||
if (!source.ndoReview.includes('safety-redacted') || !reviewAsset.includes('[REDACTED]'))
|
||||
throw new Error('review catalog lost its secret-safety contract');
|
||||
if (
|
||||
![html.summary, html.models, html.agents, html.skills].every((page) => page.includes('ROUTE MAP'))
|
||||
)
|
||||
throw new Error('chapter page missing shared navigation');
|
||||
if (
|
||||
!['@media(max-width:800px)', '@media(max-width:520px)', '--ink'].every((token) =>
|
||||
builtCss.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('missing chapter responsive contract');
|
||||
if (!has(html.landing, ['The short route', 'full-guide/', 'skills-review/']))
|
||||
throw new Error('landing page missing a route-map destination');
|
||||
if (/<script\b/i.test(html.landing))
|
||||
throw new Error('landing page is no longer a static route map');
|
||||
if (
|
||||
!has(html.skills, [
|
||||
'data-skill-file="skill"',
|
||||
'data-skill-file="references"',
|
||||
'id="package-preview"',
|
||||
])
|
||||
)
|
||||
throw new Error('skills anatomy missing package contract');
|
||||
if (!html.skills.includes('<script>'))
|
||||
throw new Error('skills anatomy lost its interaction module');
|
||||
if (
|
||||
!['overflow-wrap:anywhere', '@media(max-width:800px)', 'prefers-reduced-motion'].every((token) =>
|
||||
builtCss.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('skills anatomy lost responsive contract');
|
||||
if (
|
||||
/Pedro\s+Aranha|pedro\.aranha|git\.netcracker\.com|artifactorycn|managed\.netcracker\.cloud/i.test(
|
||||
source.ndoReview,
|
||||
)
|
||||
)
|
||||
throw new Error('operational submission privacy leak');
|
||||
if (html.review.includes('Pedro%20Aranha') || html.review.includes('pedro.aranha'))
|
||||
throw new Error('operational submission identity remains in review output');
|
||||
if (
|
||||
!html.review.includes('Anonymous%20Operational%20Submission') ||
|
||||
!reviewAsset.includes('[REDACTED LOCAL USER]')
|
||||
)
|
||||
throw new Error('operational submission redaction contract missing');
|
||||
console.log('review privacy verification passed');
|
||||
for (const token of [
|
||||
'currentContent',
|
||||
'unchangedDraft',
|
||||
'state.preview = button.dataset.preview',
|
||||
'state.file = available.find',
|
||||
'loadSelectedFile',
|
||||
])
|
||||
if (!reviewJs.includes(token)) throw new Error(`review file-mode contract missing ${token}`);
|
||||
if (reviewJs.includes("state.preview = 'original'; syncUrl(); renderDetail(); loadSelectedFile();"))
|
||||
throw new Error('file selection still resets improved mode');
|
||||
console.log('review file-mode verification passed');
|
||||
for (const token of [
|
||||
'const changeRows',
|
||||
'function lensMarkup',
|
||||
'data-lens',
|
||||
'CHANGE LENS',
|
||||
'What changed — and why.',
|
||||
])
|
||||
if (!reviewJs.includes(token)) throw new Error(`review change-lens contract missing ${token}`);
|
||||
for (const token of [
|
||||
'.change-lens',
|
||||
'.change-rows',
|
||||
'.skill-diff',
|
||||
'.diff-lines',
|
||||
'@media(max-width:620px)',
|
||||
'prefers-reduced-motion',
|
||||
])
|
||||
if (!reviewLensCss.includes(token)) throw new Error(`review change-lens CSS missing ${token}`);
|
||||
console.log('review change-lens verification passed');
|
||||
for (const token of [
|
||||
'.markdown-preview',
|
||||
'max-height:540px',
|
||||
'.markdown-table-wrap',
|
||||
'.markdown-frontmatter',
|
||||
'.markdown-toc',
|
||||
'.preview-title',
|
||||
'.preview-markdown',
|
||||
'grid-template-columns:minmax(0,1fr)',
|
||||
'height:120px',
|
||||
'-webkit-line-clamp:2',
|
||||
])
|
||||
if (!read('skills-review/styles.css').includes(token))
|
||||
throw new Error(`review markdown preview contract missing ${token}`);
|
||||
console.log('review markdown preview verification passed');
|
||||
for (const token of ["from './vote.js'", "renderVoteWidget($('#vote-widget'"])
|
||||
if (!reviewJs.includes(token)) throw new Error(`review vote widget wiring missing ${token}`);
|
||||
for (const token of [
|
||||
'id="vote-widget"',
|
||||
'function renderVoteWidget',
|
||||
'X-Voter-Id',
|
||||
'/api/votes',
|
||||
'Voting is offline',
|
||||
])
|
||||
if (!reviewVoteJs.includes(token) && !reviewJs.includes(token))
|
||||
throw new Error(`review vote widget contract missing ${token}`);
|
||||
for (const token of ['.vote-widget', '.vote-buttons', '[aria-pressed="true"]'])
|
||||
if (!read('skills-review/styles.css').includes(token))
|
||||
throw new Error(`review vote widget CSS missing ${token}`);
|
||||
if (!['dataset.preview', 'dataset.file'].every((token) => reviewAsset.includes(token)))
|
||||
throw new Error('review file-mode contract missing');
|
||||
if (!reviewAsset.includes('preview-markdown'))
|
||||
throw new Error('review file selection no longer preserves preview mode');
|
||||
if (!['data-lens', 'CHANGE LENS', 'What changed'].every((token) => reviewAsset.includes(token)))
|
||||
throw new Error('review change-lens contract missing');
|
||||
if (
|
||||
!voteService.includes('X-Forwarded-For') ||
|
||||
(!voteService.includes('one active vote per skill') &&
|
||||
!voteService.includes('at most one active vote'))
|
||||
!['.change-lens', '.change-rows', '.skill-diff', '@media(max-width:620px)'].every((token) =>
|
||||
builtCss.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('review change-lens CSS contract missing');
|
||||
if (
|
||||
!['.markdown-preview', 'max-height:540px', '.markdown-table-wrap', '.markdown-toc'].every(
|
||||
(token) => builtCss.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('review markdown-preview contract missing');
|
||||
if (
|
||||
!html.review.includes(
|
||||
'src="/ai-for-dummies/_astro/skills-review.astro_astro_type_script_index_0_lang.',
|
||||
)
|
||||
)
|
||||
throw new Error('review vote-widget island is not wired to a hashed asset');
|
||||
if (
|
||||
!['id="vote-widget"', 'X-Voter-Id', '/api/votes', 'Voting is offline'].every((token) =>
|
||||
`${html.review}\n${reviewAsset}`.includes(token),
|
||||
)
|
||||
)
|
||||
throw new Error('review vote-widget contract missing');
|
||||
// The CSS minifier drops the attribute value's quotes, so the built sheet
|
||||
// carries `[aria-pressed=true]`. Match either form.
|
||||
if (
|
||||
!['.vote-widget', '.vote-buttons'].every((token) => builtCss.includes(token)) ||
|
||||
!/\[aria-pressed=["']?true["']?\]/.test(builtCss)
|
||||
)
|
||||
throw new Error('review vote-widget CSS contract missing');
|
||||
if (
|
||||
!source.voteService.includes('X-Forwarded-For') ||
|
||||
!source.voteService.includes('one active vote per skill')
|
||||
)
|
||||
throw new Error('vote-service missing IP-based one-vote-per-source contract');
|
||||
console.log('review vote widget verification passed');
|
||||
|
||||
console.log('built output verification passed');
|
||||
|
||||
Reference in New Issue
Block a user