一键导入
validate-build
Validate a completed package against its spec. Checks patterns, types, exports, dependencies, and test coverage after building a package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate a completed package against its spec. Checks patterns, types, exports, dependencies, and test coverage after building a package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Agentic harness diagnostic + improvement loop. Probes the framework with real model runs, uses the rax-diagnose CLI to root-cause failures from structured trace data, ships ONE coordinated architectural fix, verifies via before/after diff, commits with empirical evidence. Use at the start of any harness improvement session — replaces ad-hoc grep + log-spelunking with a deterministic feedback loop.
Use when the architecture may have drifted from documentation, packages have grown complex, dead code or disabled systems are suspected, or before planning a major refactor — scoped to the reactive-agents-ts 22-package monorepo.
Reactive Agents framework architecture — layer stack, dependency graph, build order, and package structure. Use when planning work, understanding package relationships, or determining build dependencies.
Use when analyzing the Reactive Agents codebase for architectural improvements, abstraction opportunities, composability gaps, or Effect-TS engineering quality — before proposing refactors, during design reviews, or when codebase complexity is growing.
LLMService API contract — the correct signatures for complete(), stream(), embed(), and response types. Use when calling LLMService from any layer, writing reasoning strategies, or building LLM-dependent features.
LLM provider streaming patterns and per-provider quirks. Use when adding a new provider, implementing adapter hooks, or debugging streaming tool call behavior in packages/llm-provider.
| name | validate-build |
| description | Validate a completed package against its spec. Checks patterns, types, exports, dependencies, and test coverage after building a package. |
| disable-model-invocation | true |
| argument-hint | <package-name> |
Run this checklist after building a package to ensure it conforms to the spec and project patterns.
Verify the package directory matches the spec's Package Structure section:
find packages/$ARGUMENTS/src -type f -name "*.ts" | sort
Compare the output against the file list in the spec. Every file listed in the spec must exist.
Read packages/$ARGUMENTS/package.json and verify:
"type": "module" is set"effect": "^3.10.0" is in dependencies"workspace:*" (e.g., "@reactive-agents/core": "workspace:*")lancedb, no nomic)tsconfig.json extends ../../tsconfig.jsonSearch the package source for anti-patterns:
# Should find ZERO matches for these anti-patterns:
grep -rn "throw new" packages/$ARGUMENTS/src/ || echo "✅ No throw"
grep -rn "^interface " packages/$ARGUMENTS/src/ | grep -v "Input\b" || echo "✅ No plain interfaces (note: interface is acceptable for strategy input types like ReactiveInput, PlanExecuteInput, etc. that carry Effect types)"
grep -rn "let " packages/$ARGUMENTS/src/ || echo "✅ No let declarations"
grep -rn "new Error" packages/$ARGUMENTS/src/ || echo "✅ No new Error"
grep -rn "await " packages/$ARGUMENTS/src/ || echo "✅ No raw await"
grep -rn "Promise<" packages/$ARGUMENTS/src/ | grep -v "runPromise\|test" || echo "✅ No raw Promises"
# Should find matches for required patterns:
grep -rn "Schema.Struct" packages/$ARGUMENTS/src/ && echo "✅ Uses Schema.Struct"
grep -rn "Data.TaggedError" packages/$ARGUMENTS/src/ && echo "✅ Uses Data.TaggedError"
grep -rn "Context.Tag" packages/$ARGUMENTS/src/ && echo "✅ Uses Context.Tag"
grep -rn "Layer.effect\|Layer.scoped" packages/$ARGUMENTS/src/ && echo "✅ Uses Layer.effect/scoped"
grep -rn "Ref.make\|Ref.get\|Ref.update" packages/$ARGUMENTS/src/ && echo "✅ Uses Ref for state"
If changes are in packages/reasoning/src/kernel/, run:
# Phases must follow the exact type signature — no extra arguments
grep -n "export const.*Phase" packages/reasoning/src/kernel/capabilities/ -r
# Guards must return GuardOutcome — not boolean, not void
grep -n "export const.*Guard\b" packages/reasoning/src/kernel/capabilities/act/guard.ts
# MetaTool registry entries must be in act.ts only
grep -n "metaToolRegistry" packages/reasoning/src/kernel/ -r
FAIL if:
(state: KernelState, context: KernelContext) => Effect<KernelState, never, LLMService>{ allow: true } or { block: true; reason: string }kernel-runner.ts main loop was modified to add per-turn logic (use phases instead)context-engine.ts dead sections (buildDynamicContext, buildStaticContext) were modified or re-enabledDead code areas — never touch:
buildDynamicContext / buildStaticContext in context-engine.ts (~560 LOC, disabled behind flag)context-engine.ts dead text-assembly functions (~690 LOC total)For every service in the package, verify:
Context.Tag("ServiceName")<...>()readonlyEffect.Effect<T, E>Layer.effect(Tag, Effect.gen(...))yield* OtherServiceVerify src/runtime.ts:
createXxxLayer() functionLayer.mergeAll() to combine servicesLayer.provide() to wire dependenciesVerify src/index.ts exports:
Data.TaggedError classesContext.Tag classes*Live layer implementationscreateXxxLayer() factory functionVerify tests exist and pass:
bun test packages/$ARGUMENTS
Check:
Effect.provide(testLayer) pattern# Type checking
bun run --filter "@reactive-agents/$ARGUMENTS" typecheck
# Build with tsup (produces dist/ output)
cd packages/$ARGUMENTS && bun run build
Both must complete with zero errors.
After building, verify that dist/ contains the expected output:
ls packages/$ARGUMENTS/dist/
Check:
dist/ directory existsindex.js (ESM bundle) is presentindex.d.ts (type declarations) is presentRead through the spec one final time and verify:
If this package is consumed by others:
@reactive-agents/$ARGUMENTSLayer.provide() in downstream packagesAfter completing all checks, summarize: