@trycore/spec-build-harness 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/GOVERNANCE.md +27 -2
- package/INSTALL.md +6 -4
- package/METODOLOGIA.md +68 -12
- package/README.md +11 -15
- package/VERSION +1 -1
- package/agents/build/build-orchestrator.md +39 -5
- package/agents/build/dor-dod-gatekeeper.md +28 -7
- package/agents/build/ux-fidelity-reviewer.md +68 -0
- package/agents/build/wiring-adversarial-verifier.md +59 -0
- package/commands/build/onboard.md +38 -4
- package/dist/lib/settings-merge.js +1 -1
- package/dist/lib/state-seed.js +1 -0
- package/docs/agents.md +26 -2
- package/docs/customization/mcp-extensions.md +16 -5
- package/docs/getting-started.md +64 -209
- package/docs/hooks.md +12 -6
- package/hooks/build/design-source-guard.sh +52 -0
- package/hooks/build/load-build-state.sh +17 -1
- package/hooks/build-harness.json +4 -0
- package/package.json +1 -1
- package/skills/building-a-slice/SKILL.md +57 -3
- package/skills/building-a-slice/references/dod.md +14 -0
- package/skills/building-a-slice/references/dor.md +9 -3
- package/skills/building-a-slice/references/integration-check.md +27 -0
- package/skills/building-a-slice/references/mcp-map.md +1 -0
- package/skills/building-a-slice/references/state-protocol.md +21 -4
- package/state/README.md +31 -2
- package/state/build-state.schema.json +66 -3
- package/state/build-state.template.json +8 -0
- package/templates/CLAUDE.md.template +8 -3
- package/templates/integration-check.sh.template +65 -0
- package/templates/settings-hooks.template.json +1 -1
|
@@ -7,7 +7,7 @@ Este proyecto usa el arnés `@trycore/spec-build-harness` para **construir** sob
|
|
|
7
7
|
(compañero de `@trycore/spec-product-flow`: Discovery → Construcción). Modelo de **dos loops**:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
Inner loop (por épica EP-XXX): DoR → OpenSpec change → TDD → journey-smoke → api/data → DoD → PR + archive
|
|
10
|
+
Inner loop (por épica EP-XXX): DoR → OpenSpec change → TDD → journey-smoke → api/data → verificación adversarial → DoD → PR + archive
|
|
11
11
|
Outer loop (por release): Release Gate (seguridad · diseño · UX · coherencia triple · arquitectura · integración)
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -30,12 +30,16 @@ Outer loop (por release): Release Gate (seguridad · diseño · UX · cohe
|
|
|
30
30
|
2. El enlace change↔épica va en el bloque `## Trazabilidad` del `proposal.md`, **nunca** en frontmatter YAML (rompe `openspec validate`).
|
|
31
31
|
3. Las dependencias se vigilan contra `.claude/config/stack-allowlist.json` (hook `stack-guard.sh`), derivado de la sección de requisitos técnicos del PRD.
|
|
32
32
|
4. Las revisiones pesadas (seguridad/diseño/UX/coherencia triple/arquitectura/integración) corren **una vez por release** (outer loop), no por épica.
|
|
33
|
-
5.
|
|
33
|
+
5. **Producto completo, no MVP.** El alcance acordado se construye **entero**. **Recortar o diferir es bloqueante explícito** que requiere acuerdo del equipo — **nunca** una decisión del modelo. No se "deja para después" ni se deriva en lo complejo. La verificación es **ejecutada, no por inspección** (correr la suite, cargar la página, leer la consola).
|
|
34
|
+
6. **Cierre verificado, no declarado.** `dod` exige el gate `wiring_verified`: un subagente **adversarial independiente** (`wiring-adversarial-verifier`, contexto virgen) intenta refutar el slice (stubs, rutas sin cablear, AC sin test) antes de cerrar. El estado del cableado vive en disco (`wiring_checklist[]` + `progress_log[]`) para que una sesión fresca retome sin "creer que ya está".
|
|
35
|
+
7. **Fidelidad por verificación visual real.** Para slices con UI, el gate `fidelity` solo cierra observando la salida real vía MCP de devtools de navegador (screenshot app vs prototipo); sin verificación visual queda `false` (no "INCONCLUSO pasa").
|
|
36
|
+
8. **Cimiento antes que negocio y unidades pequeñas.** Las épicas de cimiento (auth, datos, arquitectura base, design-system) se construyen antes que las de negocio; una épica grande (>3 HU ó ≥3 capas) se descompone en sub-slices construidos de a uno.
|
|
37
|
+
9. Si una regla del arnés contradice la metodología Trycore (`METODOLOGIA.md`), **gana la metodología**.
|
|
34
38
|
|
|
35
39
|
### Bloque de dominio (lo resuelve `/build:onboard`)
|
|
36
40
|
|
|
37
41
|
Estos puntos de extensión los leen los agentes `security-reviewer`, `stack-guardian`,
|
|
38
|
-
`data-consistency-checker`, `ux-krug-reviewer` y `
|
|
42
|
+
`data-consistency-checker`, `ux-krug-reviewer`, `simple-design-reviewer` y `ux-fidelity-reviewer`:
|
|
39
43
|
|
|
40
44
|
- **PRD técnico (fuente del stack)**: {{PRD_TECH_PATH}}
|
|
41
45
|
- **Capa de servicios externos / IA (frontera)**: {{EXTERNAL_SERVICE_LAYER}}
|
|
@@ -43,6 +47,7 @@ Estos puntos de extensión los leen los agentes `security-reviewer`, `stack-guar
|
|
|
43
47
|
- **Categorías de datos sensibles / PII reguladas**: {{SENSITIVE_DATA_CATEGORIES}}
|
|
44
48
|
- **Secretos server-side**: {{SERVER_SIDE_SECRETS}}
|
|
45
49
|
- **Decisiones de alto impacto que exigen explicabilidad UX**: {{HIGH_STAKES_DECISIONS}}
|
|
50
|
+
- **Fuente de diseño / referencia visual**: {{DESIGN_SOURCE}}
|
|
46
51
|
|
|
47
52
|
(Si aparecen como `{{...}}`, ejecuta `/build:onboard` para parametrizarlos.)
|
|
48
53
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# integration-check.sh — runner determinista FUERA DE CHAT para cerrar `journey_smoke` (inner loop).
|
|
3
|
+
#
|
|
4
|
+
# Qué es: un gate determinista que ejecuta build + suite completa + un journey-smoke end-to-end y
|
|
5
|
+
# emite un REPORTE de integración a disco, con salida 0 (verde) / ≠0 (rojo). Está pensado para correr
|
|
6
|
+
# en una **sesión/contexto virgen** distinta de la que escribió el código (el agente que cableó no es
|
|
7
|
+
# juez de su propio cableado), y para el **fix-loop** (lo corres, lees el reporte, arreglas, repites).
|
|
8
|
+
#
|
|
9
|
+
# Por qué un script y no un agente: el cableado end-to-end no se acredita "por inspección" sino
|
|
10
|
+
# EJECUTANDO. Mantenerlo fuera del chat lo hace reproducible y barato en contexto.
|
|
11
|
+
#
|
|
12
|
+
# AGNÓSTICO: este es un TEMPLATE. El arnés no asume tu stack. Ajusta los comandos marcados con
|
|
13
|
+
# «# ADAPTA» a tu proyecto (lenguaje, package manager, comando de e2e). Cópialo a tu repo
|
|
14
|
+
# (p.ej. tools/loop/integration-check.sh) y hazlo ejecutable.
|
|
15
|
+
#
|
|
16
|
+
# NO crea ningún gate nuevo en build-state.json: alimenta el gate EXISTENTE `journey_smoke` del slice.
|
|
17
|
+
# El gate `integration` con dependencias reales sigue siendo del Release Gate (outer loop), no de aquí.
|
|
18
|
+
set -uo pipefail
|
|
19
|
+
|
|
20
|
+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "${CLAUDE_PROJECT_DIR:-$(pwd)}")"
|
|
21
|
+
REPORT_DIR="$ROOT/.claude/state"
|
|
22
|
+
REPORT="$REPORT_DIR/integration-report.txt"
|
|
23
|
+
mkdir -p "$REPORT_DIR"
|
|
24
|
+
|
|
25
|
+
# Detecta el package manager si hay package.json (Node). ADAPTA para otros stacks.
|
|
26
|
+
PM="npm"
|
|
27
|
+
if [ -f "$ROOT/pnpm-lock.yaml" ]; then PM="pnpm";
|
|
28
|
+
elif [ -f "$ROOT/yarn.lock" ]; then PM="yarn"; fi
|
|
29
|
+
|
|
30
|
+
fail=0
|
|
31
|
+
log() { printf '%s\n' "$*" | tee -a "$REPORT"; }
|
|
32
|
+
|
|
33
|
+
: > "$REPORT"
|
|
34
|
+
log "== integration-check =="
|
|
35
|
+
log "root: $ROOT"
|
|
36
|
+
log "pm: $PM"
|
|
37
|
+
log "ts: (sin timestamp determinista; lo estampa quien invoca)"
|
|
38
|
+
log ""
|
|
39
|
+
|
|
40
|
+
run() { # run <etiqueta> <comando...>
|
|
41
|
+
local label="$1"; shift
|
|
42
|
+
log "▶ $label: $*"
|
|
43
|
+
if "$@" >>"$REPORT" 2>&1; then
|
|
44
|
+
log " ✓ $label OK"
|
|
45
|
+
else
|
|
46
|
+
log " ✗ $label FALLÓ"
|
|
47
|
+
fail=1
|
|
48
|
+
fi
|
|
49
|
+
log ""
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# --- Fases del runner (ADAPTA los comandos a tu stack) ---
|
|
53
|
+
# 1) Build: el proyecto compila/construye sin error.
|
|
54
|
+
run "build" $PM run build # ADAPTA (p.ej. cargo build, ./gradlew build, make)
|
|
55
|
+
# 2) Suite completa: todos los tests, no un subconjunto.
|
|
56
|
+
run "tests" $PM test # ADAPTA (p.ej. pytest, go test ./..., cargo test)
|
|
57
|
+
# 3) Journey-smoke end-to-end: recorre el backbone-hasta-aquí. ADAPTA al e2e de tu proyecto.
|
|
58
|
+
# Si tu e2e necesita la app levantada, levántala aquí (y bájala al salir).
|
|
59
|
+
# run "e2e" $PM run test:e2e # ADAPTA / descomenta
|
|
60
|
+
|
|
61
|
+
log "== resultado: $([ "$fail" -eq 0 ] && echo VERDE || echo ROJO) =="
|
|
62
|
+
log "Reporte: $REPORT"
|
|
63
|
+
|
|
64
|
+
# Salida determinista: 0 verde, 1 rojo. El gate journey_smoke solo se marca true con salida 0.
|
|
65
|
+
exit "$fail"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"PreToolUse": [
|
|
15
15
|
{ "matcher": "Bash", "hooks": [ { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/gitflow-guard.sh\"" } ] },
|
|
16
|
-
{ "matcher": "Write|Edit|MultiEdit", "hooks": [ { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/stack-guard.sh\"" }, { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/scaffold-guard.sh\"" } ] }
|
|
16
|
+
{ "matcher": "Write|Edit|MultiEdit", "hooks": [ { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/stack-guard.sh\"" }, { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/scaffold-guard.sh\"" }, { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/design-source-guard.sh\"" } ] }
|
|
17
17
|
],
|
|
18
18
|
"PostToolUse": [
|
|
19
19
|
{ "matcher": "Write|Edit|MultiEdit", "hooks": [ { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/lint-typecheck.sh\"" }, { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR/.claude}/hooks/build/coherence-flag.sh\"" } ] }
|