一键导入
generator-validate
Validate SEA generators produce correct, deterministic output matching their specifications. Use after creating or modifying generators.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate SEA generators produce correct, deterministic output matching their specifications. Use after creating or modifying generators.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends AI agent capabilities with specialized knowledge, workflows, or tool integrations.
Use when creating, scaffolding, or updating the repository AI harness in VS Code. Trigger on requests to bootstrap or refresh instructions, prompts, agents, hooks, skills, or memory layers while preserving useful existing structure and avoiding monolithic always-on context.
Canonical SEA-Forge release workflow for release preparation, validation, branch promotion, tagging, rollback, and release-gate evidence. Use when preparing a release, promoting dev to stage or stage to main, cutting a version tag, validating release readiness, handling hotfix forward-merges, planning rollback, or executing a full end-to-end release. Prefer existing just recipes and evidence-producing gates over ad hoc deployment steps.
Use when SEA work touches specs, generators, manifests, semantic fixtures, regeneration, `src/gen`, or behavior projected from ADR/PRD/SDS/SEA authority.
Use when a SEA context has valid specs and generated contracts but lacks handwritten logic, runtime wiring, persistence, integration, tests, or executable proof.
Create concise, copy-paste-ready bridge prompts between a repo-aware coding agent and an external strategic reasoning agent such as S1 ArchDevAgent. Use when the user wants to offload architecture, research, large refactor planning, migration design, plan critique, implementation-spec drafting, test-strategy design, whole-repo analysis, or diff review to an external agent while keeping repo inspection and implementation in the coding agent. Also use when the user says "use S1", "ask S1", "make a prompt for S1", "bridge this to my external agent", "prepare a context packet", or "validate this S1 response".
| name | generator-validate |
| description | Validate SEA generators produce correct, deterministic output matching their specifications. Use after creating or modifying generators. |
Use this skill when:
Verify the generator source is valid:
# Check generator structure
ls -la generators/bounded-context/
ls -la generators/adapter/
# Validate generator schema
cat generators/bounded-context/schema.json | jq .
# Check generator implementation
cat generators/bounded-context/generator.ts
Required generator components:
schema.json - Input validation schemagenerator.ts or generator.py - Implementationfiles/ directory - Template filesREADME.md - DocumentationRun generator in dry-run mode:
# Nx generator dry run
pnpm exec nx g @sea/bounded-context-generator:gen --dry-run --name=TestContext
# Or with just command
just gen bounded-context --dry-run --name=TestContext
Expected output:
Run generator multiple times and verify output is identical:
# First run
rm -rf tmp/gen-test-1
pnpm exec nx g @sea/bounded-context-generator:gen --name=TestGen1 --output-dir=tmp/gen-test-1
find tmp/gen-test-1 -type f -exec sha256sum {} \; > tmp/sha1.txt
# Second run with same input
rm -rf tmp/gen-test-2
pnpm exec nx g @sea/bounded-context-generator:gen --name=TestGen1 --output-dir=tmp/gen-test-2
find tmp/gen-test-2 -type f -exec sha256sum {} \; > tmp/sha2.txt
# Compare
diff tmp/sha1.txt tmp/sha2.txt
Expected: No differences (deterministic output)
Validate generated output matches spec:
# Generate actual output
pnpm exec nx g @sea/bounded-context-generator:gen --name=ValidateMe
# Check generated structure
find apps/validate-me -type f
# Validate against spec
# - Check all required files exist
# - Validate file content matches patterns
# - Check imports and references
Verify generated output complies with governing spec:
# Find related spec
find docs/specs -name "*bounded-context*" -o -name "*adapter*"
# Validate with calm if CALM spec
calm validate docs/specs/bounded-context-v1.md
# Check generated output follows spec patterns
# - Architecture matches spec
# - API surface matches spec
# - Naming conventions match
Symptoms: Different files generated for same input
Causes:
Fix:
Symptoms: Expected files not generated
Causes:
files/ directoryFix:
Symptoms: Generated code differs from specification
Causes:
Fix:
## Generator Validation Report
**Generator**: {name}
**Version**: {version}
**Date**: {timestamp}
### Source Validation
- Schema: ✅/❌
- Implementation: ✅/❌
- Templates: ✅/❌
- Documentation: ✅/❌
### Dry Run
- Status: ✅/❌
- Files to create: {count}
### Determinism Check
- Status: ✅/❌
- SHA256 match: ✅/❌
### Output Validation
- Files generated: {count}/{expected}
- Content valid: ✅/❌
- Spec compliant: ✅/❌
### Issues Found
{list of issues}
### Recommendation
{pass/fail with notes}
Invoke after generator changes:
Claude invokes automatically when:
just validate-generatorsspec-guardian for generated zone enforcementgovernance-validation for spec compliance