跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

nacl-sa-validate

Validate NaCl SA graph consistency, connectivity, requirements, form-domain traceability, UC-form coverage, cross-module rules, feature requests, staleness closure, decision provenance, screen state machines, behavior slices, domain error taxonomy, cache & degradation policies, and BA-to-SA coverage. Use when checking SA quality or says `/nacl-sa-validate`.

ITSalt · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ITSalt/NaCl --skill nacl-sa-validate

技能说明


name: nacl-sa-validate description: | Validate NaCl SA graph consistency, connectivity, requirements, form-domain traceability, UC-form coverage, cross-module rules, feature requests, staleness closure, decision provenance, screen state machines, behavior slices, domain error taxonomy, cache & degradation policies, and BA-to-SA coverage. Use when checking SA quality or says /nacl-sa-validate.

NaCl SA Validate For Codex

Validate the SA graph without writing to it. This workflow reports findings and coverage only; repairs belong to the relevant SA skill and require confirmation.

Read ../nacl-core/SKILL.md, ../references/migration-rules.md, and ../references/verification-vocabulary.md before using this workflow.

Goal Compatibility

This skill can be a target behind nacl-goal only through the validate:module:<MOD-ID> alias. Reference ../nacl-goal/SKILL.md and ../references/goal-codex-contract.md.

Codex itself must not claim that Anthropic /goal ran unless the runtime exposes it and evidence exists. Load the packaged validate proof method as an internal reference only; it is not a project-cwd command. Validation truth is surfaced through GOAL_PROOF. Use the closed Codex status vocabulary when the wrapper cannot run.

Workflow

Levels:

  • internal: SA-only checks.
  • ba-cross: BA-to-SA traceability checks.
  • full: internal plus BA-to-SA checks.
  • Scoped validation may limit checks to specific modules, use cases, entities, or feature requests when the user provides scope.

Pre-flight:

  1. Verify graph read tooling.
  2. Count canonical SA nodes and report whether the graph has data. The canonical set includes the SA-extension labels: Decision, the screen-machine labels, Slice, DomainError/ErrorPresentation, CachePolicy/DegradationRule, and APIEndpoint; a future L14+ level must extend this set in the same change.
  3. Detect schema drift by comparing labels and relationship types with the SA schema when introspection is available. Known neighbor-layer labels (BA family incl. EntityState/GlossaryTerm/SystemContext; TL family Task/Wave/IntakeItem; legacy RuntimeContract) and zero-count constraint-registered label tokens are NOT drift findings.
  4. Check BA layer availability before BA-to-SA levels. When full is requested but the BA layer is empty, run the complete internal set (L1-L13) and skip the BA-to-SA cross-checks with a warning in the report.
  5. Audit exemption properties used by deeper checks: has_ui, system_only, shared, internal, field_category, and anchor_exempt (L3.7).

Internal checks:

  • L1 data consistency: required ids, names, property types, duplicate ids, and orphan nodes.
  • L2 connectivity: modules contain use cases and entities, entities have attributes, enums connect to attributes, and core edges are present.
  • L3 requirements: use cases have requirements, requirements are typed and linked, and BA rules mapped to requirements are not orphaned. L3.7 (CRITICAL): every must-anchor requirement (class functional|validation|behavioral|interface, read as coalesce(rq.rq_type,rq.req_type,rq.type,'unknown') — real graphs store the class in any of the three) has a REALIZED_BY edge to the step/field/form that implements it — functional/behavioral -> ActivityStep, validation -> FormField, interface -> Form|Screen; the overloaded reserved type values (nfr|adr|question|assumption) and nodes flagged anchor_exempt=true are exempt. L3.7b (WARNING) cross-checks the target label against the class; L3.8 (WARNING, opt-in once any REALIZED_BY exists) flags System steps no requirement realizes.
  • L4 form-domain traceability: input fields have MAPS_TO, attributes used by forms exist, and internal attributes are exempt only when flagged.
  • L5 UC-form validation: UI use cases have forms, user steps reference forms when appropriate, and forms are linked to use cases.
  • L6 cross-module consistency: entities are owned by one module unless marked shared, relationships crossing modules are intentional, and dependencies are recorded.
  • L7 feature request consistency: FeatureRequest ids are collision-free, linked UCs exist, and requested new or modified scope is traceable.
  • L8 staleness closure: no node carries review_status='stale' (read with coalesce(n.review_status,'current')). A stale node is a downstream of an upstream change that was never re-synced; stale_origin/stale_since give the lineage. CRITICAL. In scoped runs, restrict to the changed node's dependents.
  • L9 decision provenance: every active FeatureRequest has IMPLEMENTS -> :Decision; every non-superseded :Decision has a JUSTIFIES edge and a non-empty rationale; superseded decisions carry status='superseded'. L9.1–L9.3 CRITICAL, L9.4 WARNING. L9.1 exempts grandfathered FRs via coalesce(fr.decision_exempt,false)=false; L9.5 (INFO) lists grandfathered FRs so the debt stays visible. Decisions are the graph-native "why" — never stored as standalone markdown. Closing this gap on a pre-provenance project follows the provenance-gap-closure runbook (honest backfill from the FR's own recorded rationale; grandfather only when none is recoverable).
  • L10 screen state machines (SA-extension connectivity): no orphaned Screen/ScreenState/ScreenEvent/Transition/ScreenEffect/AnalyticsEvent nodes; every extension node has its required parent edge (HAS_SCREEN, HAS_STATE, HAS_EVENT, HAS_TRANSITION, TRIGGERS, EMITS); every Screen has RENDERS -> Form (exempt via coalesce(scr.formless,false)=false); load/mutate effects have CALLS -> APIEndpoint, navigate effects NAVIGATES_TO -> Screen, analytics effects EMITS -> AnalyticsEvent; every reified Transition has exactly one same-screen FROM_STATE/TO_STATE/ON_EVENT; no two transitions share `(from_state, on_
阅读完整来源 ↗