AGENTIC_SPEC_FORGE/spec_stage_skill/execspec_compile/constraints-generator/SKILL.md
生成ExecSpecMasterConstraints_L*.md权威约束文件,定义Phase/SubPlan/Round命名规范、目录结构、环境策略和质量门禁阈值。当需要创建 ExecSpec Master Plan 的约束文档、定义命名规范、定义质量门禁、定义HITL检查点时使用。
npx skillsauth add tikazyq/agentic-spec-forge constraints-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scope: EXECSPEC_COMPILE — Compile ExecSpec(编译 ExecSpec)
版本: 1.0.0 | 创建日期: 2025-02-03
Constraints Generator 生成权威约束文件,定义 ExecSpec 通路(编译 + 落实)的所有规范和阈值。
核心职责:
Why:
对应 Build_Exec_Spec_Plans: Step 5 (约束文件生成)
spec/build/scaffold_analysis_report.md(项目类型、测试框架)spec/build/environment_config_checklist.md(环境策略)_exec_specs/ExecSpecMasterConstraints_L1.md(或L2/L3)文件包含6个核心章节:
Read SPEC level input (L1/L2/L3)
Load level-specific templates:
- L1: STREAMLINED (最小配置)
- L2: BALANCED (标准配置)
- L3: RIGOROUS (完整配置)
Define naming rules:
- Phase: Phase_{{N}}
- SubPlan: {{Phase}}.SubPlan_{{N}}
- Round: Round_{{N}}_{{Stage}}
- Integration: INTEGRATION_PHASE, INTEGRATION_FINAL
Generate examples for each rule
Define _exec_specs/ structure:
- Master-level files (Plan/Constraints/Dashboard)
- SubPlan files (ExecSpecSubPlan_*.md)
Generate directory tree in markdown format
Read environment_config_checklist.md
Extract environment list (dev/test/staging/prod)
For each environment:
- Define purpose
- Define data characteristics
- Define access policy
Based on SPEC level:
L1: Code Coverage ≥70%, Test Pass ≥95%, Lint (optional)
L2: Code Coverage ≥80%, Test Pass ≥98%, Lint (required), Security Scan (optional)
L3: Code Coverage ≥90%, Test Pass ≥100%, Lint (required), Security Scan (required), Performance Benchmark (required)
Format as table with thresholds
Based on SPEC level:
L1: High-risk SubPlan + Integration Phase
L2: L1 + Dependency conflicts + External API integration
L3: L2 + Security-sensitive changes + Performance degradation
Define escalation strategy (E1/E2/E3)
Write `_exec_specs/ExecSpecMasterConstraints_L{level}.md`
Include all 6 sections
Add metadata (creation date, SPEC level, reference links)
开发者需要确定项目使用L1/L2/L3哪个级别。
///constraints-generator
Level: L1
查看 _exec_specs/ExecSpecMasterConstraints_L1.md(或L2/L3)。
所有SubPlan必须在开头引用约束文件:
**约束**: 生成后见 `_exec_specs/ExecSpecMasterConstraints_L1.md`(或 L2/L3)
预计耗时: 2-3分钟
ExecSpecMasterConstraints_L1.md包含以下章节:
不支持:
依赖:
development
提供网页应用全栈架构思考框架,涵盖前端渲染策略、后端 API 设计、基础设施部署、安全防护、性能优化五大维度。当需要设计完整 Web 应用、评审网页系统架构、或需要全局视角审视前后端协同设计时使用。支持 SPA/MPA、SSR/CSR、REST/GraphQL、容器/Serverless 等多种技术栈决策。
development
提供移动应用全链路架构思考框架,涵盖技术选型、离线同步、平台适配、性能优化、发布流程五大维度。当需要设计移动 APP、评审客户端架构、或需要全局视角审视原生/跨平台方案时使用。支持 Native/React Native/Flutter、推送通知、数据同步、iOS/Android 双平台等移动端特有场景决策。
development
提供微服务分布式架构思考框架,涵盖服务拆分、通信机制、基础设施、治理策略、可观测性五大维度。当需要设计微服务系统、评审分布式架构、或需要全局视角审视服务边界与协同时使用。支持 DDD 领域建模、同步/异步通信、API Gateway、服务网格、熔断降级等分布式系统关键决策。
tools
提供嵌入式系统软硬件协同思考框架,涵盖硬件层、软件架构、资源约束、实时性、测试调试五大维度。当需要设计嵌入式应用、评审物联网系统、或需要全局视角审视 MCU/MPU 与软件配合时使用。支持裸机/RTOS 选型、功耗优化、内存预算、中断响应、OTA 升级等嵌入式特有场景决策。