android2harmony 0.1.6 → 0.1.8
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/agents/api-analyzer.md +113 -0
- package/agents/app-action.md +122 -0
- package/agents/code-reviewer.md +191 -295
- package/agents/coder.md +377 -0
- package/agents/self-tester.md +8 -8
- package/agents/spec-designer.md +56 -0
- package/package.json +1 -1
- package/skills/a2h-app-req-gen/SKILL.md +174 -0
- package/skills/a2h-app-req-gen/references/spec-handoff.md +99 -0
- package/skills/a2h-app-req-gen/references/subagent-render.md +115 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/build.gradle.kts +41 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradle.properties +3 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradlew +251 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradlew.bat +94 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/settings.gradle.kts +17 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawAnalysisDetector.java +1911 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawIssueRegistry.java +37 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawJson.java +146 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawLocation.java +96 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawRecordWriter.java +227 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/resources/dev/reqgen/analyzer/jvm/raw-record-v1.schema.json +93 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/assets/dashboard.html +151 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/gradle/reqgen-lint.init.gradle +60 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/gradle/reqgen-model.init.gradle +204 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/package.json +14 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/backend.js +323 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/cli.js +811 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/gap-audit-link.js +62 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/index.js +66 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/merge.js +605 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/name-trace.js +153 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/orchestrate.js +1324 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/output-parse.js +50 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/overview.js +10 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/pool.js +23 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/post-merge-fix.js +146 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/prompt-loader.js +51 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/prompt.js +967 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/prompts.md +301 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/serve.js +78 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/short-id.js +46 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/snapshot.js +267 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/types.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/validate.js +122 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/callback-call-sites.js +62 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/gap-audit/build.js +1291 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/gap-audit/index.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/area-ownership.js +392 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/build.js +1995 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/callback-flow.js +277 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/component-variants.js +725 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/index.js +15 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/names/index.js +12 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/names/policy.js +469 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/names/traceability.js +468 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/req-model/build.js +1066 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/req-model/index.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/android-interaction-registry.js +174 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/android.js +1062 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/area-titles.js +678 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/builder.js +350 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/compose-api-registry.js +395 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/compose-call-sites.js +2008 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/compose.js +9059 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/dynamic-repeated-call-sites.js +529 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/index.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/interaction-effects.js +1149 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/jvm.js +6272 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/normalize.js +33 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/pending-intents.js +565 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/resource-id.js +42 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/route-state-variants.js +781 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/state.js +234 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/types.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/extract.js +40 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/index.js +6 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/manifest.js +513 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/resources.js +398 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/types.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/views.js +447 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/android/xml-parser.js +175 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/cli.js +398 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/area-graph.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/artifact.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/common.js +16 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/diagnostic.js +10 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/gap-audit.js +14 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/index.js +11 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/name-traceability.js +26 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/raw-fact.js +40 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/req-model.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/run.js +19 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/semantic-completeness.js +11 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/source-facts.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/core/output-guard.js +41 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/core/stable-id.js +92 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/dashboard-cli.js +169 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/diagnostics.js +104 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/dump/dump.js +1028 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/dump/index.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/dump-cli.js +251 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/artifacts.js +49 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/index.js +18 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/quality-report.js +125 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/render.js +353 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/types.js +2 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/graph/paths.js +474 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/jvm/index.js +15 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/jvm/protocol.js +408 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/jvm/runner.js +452 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/pipeline/index.js +8 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/pipeline/output.js +165 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/pipeline/run-stage1.js +891 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/project/discovery.js +299 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/project/gradle-model.js +358 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/project/gradle-runner.js +165 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/project/resource-profile.js +60 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/project/types.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/spec-handoff-cli.js +151 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/spec-handoff.js +1004 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/stage2-cli.js +109 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/stage2-input.js +419 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/stage2-name-trace-input.js +95 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/area-graph.js +444 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/index.js +7 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/req-model.js +580 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/req-text.js +195 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/semantic-area-graph.js +1431 -0
- package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/types.js +1 -0
- package/skills/a2h-app-req-gen/scripts/reqgen-audit.mjs +298 -0
- package/skills/a2h-app-req-gen/scripts/reqgen-selfcheck.mjs +555 -0
- package/skills/a2h-code-review/SKILL.md +379 -0
- package/skills/{hmos-integration-test → a2h-integration-test}/README.md +6 -6
- package/skills/{hmos-integration-test → a2h-integration-test}/SKILL.md +6 -6
- package/skills/{hmos-integration-test → a2h-integration-test}/scripts/report-tool.mjs +1 -1
- package/skills/a2h-spec-design/SKILL.md +330 -0
- package/skills/a2h-spec-design/scripts/inspect_spec_design_inputs.mjs +207 -0
- package/skills/a2h-spec-design/scripts/move_spec_technical_reference.mjs +198 -0
- package/skills/a2h-spec-design/scripts/validate_spec_design_output.mjs +256 -0
- package/skills/a2h-spec-generate/SKILL.md +696 -0
- package/skills/a2h-spec-generate/references/trace-template.md +115 -0
- package/skills/a2h-spec-generate/scripts/parse_requirements.mjs +537 -0
- package/skills/a2h-spec-generate/template/REQ.txt +22 -0
- package/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
- package/skills/a2h-spec-implement/SKILL.md +548 -0
- package/skills/a2h-spec-implement/references/harmony-pitfalls.md +186 -0
- package/skills/a2h-spec-implement/references/l1-unit-test.md +185 -0
- package/skills/a2h-spec-implement/references/l3-e2e-uitest.md +167 -0
- package/skills/a2h-spec-implement/references/test-core.md +132 -0
- package/skills/a2h-spec-implement/rules/arkts/arkts-standards.md +184 -0
- package/skills/a2h-spec-implement/rules/arkts/conventions/coding-style.md +96 -0
- package/skills/a2h-spec-implement/rules/arkts/conventions/security.md +126 -0
- package/skills/a2h-spec-implement/rules/arkts/language/arkts-rules.md +650 -0
- package/skills/a2h-spec-implement/rules/arkts/language/arkui-structure-rules.md +173 -0
- package/skills/a2h-spec-implement/rules/arkts/language/ts-to-arkts-rewrites.md +58 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2089 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +903 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md +911 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +355 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v1//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +216 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +442 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +169 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +763 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +2088 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +1258 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Once/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +175 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Param/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +850 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +862 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +110 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +301 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1411 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +1392 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/getTarget/346/216/245/345/217/243/357/274/232/350/216/267/345/217/226/347/212/266/346/200/201/347/256/241/347/220/206/346/241/206/346/236/266/344/273/243/347/220/206/345/211/215/347/232/204/345/216/237/345/247/213/345/257/271/350/261/241.md +288 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2/makeObserved/346/216/245/345/217/243/357/274/232/345/260/206/351/235/236/350/247/202/345/257/237/346/225/260/346/215/256/345/217/230/344/270/272/345/217/257/350/247/202/345/257/237/346/225/260/346/215/256.md +768 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/222/214V2/346/267/267/347/224/250/346/214/207/345/257/274/357/274/210API version 19/345/217/212/344/271/213/345/220/216/357/274/211.md" +829 -0
- package/skills/a2h-spec-implement/rules/arkts/official/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206/346/246/202/350/277/260.md +184 -0
- package/skills/a2h-spec-implement/rules/arkts/ui/component-cookbook.md +431 -0
- package/skills/a2h-spec-implement/rules/arkts/ui/state-management.md +152 -0
- package/skills/a2h-spec-implement/rules/arkts/ui/ui-quality.md +67 -0
- package/skills/a2h-spec-implement/rules/arkts/ui/ui-runtime-diagnosis.md +32 -0
- package/skills/a2h-spec-implement/rules/pipeline/build/package-set-collection.md +43 -0
- package/skills/a2h-spec-implement/scripts/_lib/common.mjs +97 -0
- package/skills/a2h-spec-implement/scripts/_lib/config.mjs +70 -0
- package/skills/a2h-spec-implement/scripts/_lib/lessons_cli.mjs +48 -0
- package/skills/a2h-spec-implement/scripts/build_lessons.mjs +24 -0
- package/skills/a2h-spec-implement/scripts/code_pattern_lessons.mjs +26 -0
- package/skills/a2h-spec-implement/scripts/device_ui.mjs +433 -0
- package/skills/a2h-spec-implement/scripts/device_ui_core.mjs +895 -0
- package/skills/a2h-spec-implement/scripts/ledger/aggregate_run.mjs +207 -0
- package/skills/a2h-spec-implement/scripts/manifest/emit_summary_line.mjs +37 -0
- package/skills/a2h-spec-implement/scripts/manifest/finalize_run.mjs +115 -0
- package/skills/a2h-spec-implement/scripts/manifest/render_final_summary.mjs +78 -0
- package/skills/a2h-spec-implement/scripts/manifest/root_mirror.mjs +137 -0
- package/skills/a2h-spec-implement/scripts/package.json +12 -0
- package/skills/a2h-spec-implement/scripts/state_propagation_check.mjs +676 -0
- package/skills/a2h-spec-implement/scripts/test/l2_run.mjs +244 -0
- package/skills/a2h-spec-implement/scripts/test/tp_coverage.mjs +231 -0
- package/skills/a2h-spec-implement/scripts/ui_memory.mjs +161 -0
- package/skills/a2h-spec-implement/scripts/utils/ensure_app.mjs +134 -0
- package/skills/a2h-ui-transfer/SKILL.md +20 -9
- package/skills/a2h-ui-transfer/scripts/arkts_static_check.js +80 -0
- package/skills/hmos-convert-pipeline/SKILL.md +7 -5
- package/skills/hmos-incremental-ui-align/README.md +7 -7
- package/skills/hmos-incremental-ui-align/SKILL.md +1 -1
- package/skills/hmos-incremental-ui-align/page_align.md +1 -1
- package/skills/hmos-spec-generate/SKILL.md +2 -2
- package/skills/hmos-spec-generate/scripts/parse_requirements.mjs +537 -0
- package/skills/hmos-fix-build-errors/SKILL.md +0 -266
- package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +0 -219
- package/skills/hmos-fix-build-errors/references/known-patterns.md +0 -157
- package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +0 -131
- package/skills/hmos-spec-generate/scripts/parse_requirements.ts +0 -515
- /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/resolve-metadata-tool.mjs +0 -0
- /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/self-test-runner.mjs +0 -0
- /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/testcases-tool.mjs +0 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
function issue(issues, code, path, message) {
|
|
2
|
+
issues.push({ code, path, message });
|
|
3
|
+
}
|
|
4
|
+
function duplicateIds(values, path, issues) {
|
|
5
|
+
const seen = new Set();
|
|
6
|
+
values.forEach((value, index) => {
|
|
7
|
+
if (seen.has(value.id)) {
|
|
8
|
+
issue(
|
|
9
|
+
issues,
|
|
10
|
+
"DUPLICATE_ID",
|
|
11
|
+
`/${path}/${index}/id`,
|
|
12
|
+
`Duplicate ${path} ID: ${value.id}`,
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
seen.add(value.id);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function validatePath(graph, path, index, issues) {
|
|
19
|
+
const base = `/paths/${index}`;
|
|
20
|
+
const areaIds = new Set(graph.areas.map((area) => area.id));
|
|
21
|
+
const edgeById = new Map(graph.edges.map((edge) => [edge.id, edge]));
|
|
22
|
+
const controlById = new Map(
|
|
23
|
+
graph.controls.map((control) => [control.id, control]),
|
|
24
|
+
);
|
|
25
|
+
const entry = path.rootEntryRef
|
|
26
|
+
? graph.entryPoints.find((item) => item.id === path.rootEntryRef)
|
|
27
|
+
: undefined;
|
|
28
|
+
if (!areaIds.has(path.targetAreaRef)) {
|
|
29
|
+
issue(
|
|
30
|
+
issues,
|
|
31
|
+
"PATH_TARGET_MISSING",
|
|
32
|
+
`${base}/targetAreaRef`,
|
|
33
|
+
`Unknown path target ${path.targetAreaRef}`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
if (path.kind !== "unreachable" && (!path.rootEntryRef || !entry)) {
|
|
37
|
+
issue(
|
|
38
|
+
issues,
|
|
39
|
+
"PATH_ENTRY_MISSING",
|
|
40
|
+
`${base}/rootEntryRef`,
|
|
41
|
+
"Reachable paths require an existing root entry",
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
if (path.kind === "unreachable" && path.steps.length > 0) {
|
|
45
|
+
issue(
|
|
46
|
+
issues,
|
|
47
|
+
"UNREACHABLE_PATH_HAS_STEPS",
|
|
48
|
+
`${base}/steps`,
|
|
49
|
+
"An unreachable path cannot contain steps",
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const expectedReachability =
|
|
53
|
+
path.kind === "unreachable"
|
|
54
|
+
? "unreachable"
|
|
55
|
+
: path.preconditions.length > 0
|
|
56
|
+
? "conditional"
|
|
57
|
+
: "unconditional";
|
|
58
|
+
if (path.reachability !== expectedReachability) {
|
|
59
|
+
issue(
|
|
60
|
+
issues,
|
|
61
|
+
"PATH_REACHABILITY_MISMATCH",
|
|
62
|
+
`${base}/reachability`,
|
|
63
|
+
`Expected ${expectedReachability} for ${path.kind} path`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
let expectedSources = new Set(entry?.rootAreaRefs ?? []);
|
|
67
|
+
path.steps.forEach((step, stepIndex) => {
|
|
68
|
+
const stepPath = `${base}/steps/${stepIndex}`;
|
|
69
|
+
const edge = edgeById.get(step.edgeRef);
|
|
70
|
+
if (!edge) {
|
|
71
|
+
issue(
|
|
72
|
+
issues,
|
|
73
|
+
"PATH_EDGE_MISSING",
|
|
74
|
+
`${stepPath}/edgeRef`,
|
|
75
|
+
`Unknown edge ${step.edgeRef}`,
|
|
76
|
+
);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (
|
|
80
|
+
edge.sourceAreaRef !== step.sourceAreaRef ||
|
|
81
|
+
edge.controlRef !== step.controlRef ||
|
|
82
|
+
edge.actionRef !== step.actionRef ||
|
|
83
|
+
"status" in edge.target ||
|
|
84
|
+
edge.target.kind !== "area" ||
|
|
85
|
+
edge.target.ref !== step.targetAreaRef
|
|
86
|
+
) {
|
|
87
|
+
issue(
|
|
88
|
+
issues,
|
|
89
|
+
"PATH_STEP_EDGE_MISMATCH",
|
|
90
|
+
stepPath,
|
|
91
|
+
`Path step does not reproduce edge ${edge.id}`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
const edgeControl = controlById.get(edge.controlRef);
|
|
95
|
+
if (
|
|
96
|
+
edgeControl?.enabled?.status === "resolved" &&
|
|
97
|
+
edgeControl.enabled.value === false
|
|
98
|
+
) {
|
|
99
|
+
issue(
|
|
100
|
+
issues,
|
|
101
|
+
"PATH_DISABLED_CONTROL",
|
|
102
|
+
`${stepPath}/controlRef`,
|
|
103
|
+
`Path step uses statically disabled Control ${edge.controlRef}`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
if (!expectedSources.has(step.sourceAreaRef)) {
|
|
107
|
+
issue(
|
|
108
|
+
issues,
|
|
109
|
+
"PATH_NOT_CONTIGUOUS",
|
|
110
|
+
`${stepPath}/sourceAreaRef`,
|
|
111
|
+
`Unexpected path source ${step.sourceAreaRef}`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
expectedSources = new Set([step.targetAreaRef]);
|
|
115
|
+
});
|
|
116
|
+
if (
|
|
117
|
+
path.steps.length === 0 &&
|
|
118
|
+
entry &&
|
|
119
|
+
!entry.rootAreaRefs.includes(path.targetAreaRef)
|
|
120
|
+
) {
|
|
121
|
+
issue(
|
|
122
|
+
issues,
|
|
123
|
+
"ZERO_STEP_PATH_TARGET_MISMATCH",
|
|
124
|
+
`${base}/targetAreaRef`,
|
|
125
|
+
"A zero-step path must target one of its entry roots",
|
|
126
|
+
);
|
|
127
|
+
} else if (
|
|
128
|
+
path.steps.length > 0 &&
|
|
129
|
+
path.steps[path.steps.length - 1].targetAreaRef !== path.targetAreaRef
|
|
130
|
+
) {
|
|
131
|
+
issue(
|
|
132
|
+
issues,
|
|
133
|
+
"PATH_FINAL_TARGET_MISMATCH",
|
|
134
|
+
`${base}/targetAreaRef`,
|
|
135
|
+
"The last step does not reach the path target",
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export function validateAreaGraph(graph) {
|
|
140
|
+
const issues = [];
|
|
141
|
+
const collections = [
|
|
142
|
+
["areas", graph.areas],
|
|
143
|
+
["controls", graph.controls],
|
|
144
|
+
["actions", graph.actions],
|
|
145
|
+
["effects", graph.effects],
|
|
146
|
+
["edges", graph.edges],
|
|
147
|
+
["externalEndpoints", graph.externalEndpoints],
|
|
148
|
+
["entryPoints", graph.entryPoints],
|
|
149
|
+
["paths", graph.paths],
|
|
150
|
+
["unresolved", graph.unresolved],
|
|
151
|
+
];
|
|
152
|
+
collections.forEach(([path, values]) => duplicateIds(values, path, issues));
|
|
153
|
+
const areaById = new Map(graph.areas.map((area) => [area.id, area]));
|
|
154
|
+
const controlById = new Map(
|
|
155
|
+
graph.controls.map((control) => [control.id, control]),
|
|
156
|
+
);
|
|
157
|
+
const actionById = new Map(
|
|
158
|
+
graph.actions.map((action) => [action.id, action]),
|
|
159
|
+
);
|
|
160
|
+
const effectById = new Map(
|
|
161
|
+
graph.effects.map((effect) => [effect.id, effect]),
|
|
162
|
+
);
|
|
163
|
+
const externalIds = new Set(
|
|
164
|
+
graph.externalEndpoints.map((endpoint) => endpoint.id),
|
|
165
|
+
);
|
|
166
|
+
const unresolvedById = new Map(
|
|
167
|
+
graph.unresolved.map((item) => [item.id, item]),
|
|
168
|
+
);
|
|
169
|
+
const unresolvedIds = new Set(unresolvedById.keys());
|
|
170
|
+
const pathById = new Map(graph.paths.map((path) => [path.id, path]));
|
|
171
|
+
graph.areas.forEach((area, areaIndex) => {
|
|
172
|
+
area.controlRefs.forEach((controlRef) => {
|
|
173
|
+
const control = controlById.get(controlRef);
|
|
174
|
+
if (!control || control.areaRef !== area.id) {
|
|
175
|
+
issue(
|
|
176
|
+
issues,
|
|
177
|
+
"AREA_CONTROL_BACKREF_INVALID",
|
|
178
|
+
`/areas/${areaIndex}/controlRefs`,
|
|
179
|
+
`Area ${area.id} has invalid control ${controlRef}`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
if (area.canonicalPathRef) {
|
|
184
|
+
const path = pathById.get(area.canonicalPathRef);
|
|
185
|
+
if (
|
|
186
|
+
!path ||
|
|
187
|
+
path.targetAreaRef !== area.id ||
|
|
188
|
+
(path.kind !== "canonical" && path.kind !== "unreachable")
|
|
189
|
+
) {
|
|
190
|
+
issue(
|
|
191
|
+
issues,
|
|
192
|
+
"AREA_CANONICAL_PATH_INVALID",
|
|
193
|
+
`/areas/${areaIndex}/canonicalPathRef`,
|
|
194
|
+
`Area ${area.id} has invalid canonical path`,
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
graph.controls.forEach((control, controlIndex) => {
|
|
200
|
+
const owner = areaById.get(control.areaRef);
|
|
201
|
+
if (!owner || !owner.controlRefs.includes(control.id)) {
|
|
202
|
+
issue(
|
|
203
|
+
issues,
|
|
204
|
+
"CONTROL_AREA_BACKREF_INVALID",
|
|
205
|
+
`/controls/${controlIndex}/areaRef`,
|
|
206
|
+
`Control ${control.id} has invalid Area owner`,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
control.actionRefs.forEach((actionRef) => {
|
|
210
|
+
const action = actionById.get(actionRef);
|
|
211
|
+
if (!action || action.controlRef !== control.id) {
|
|
212
|
+
issue(
|
|
213
|
+
issues,
|
|
214
|
+
"CONTROL_ACTION_BACKREF_INVALID",
|
|
215
|
+
`/controls/${controlIndex}/actionRefs`,
|
|
216
|
+
`Control ${control.id} has invalid action ${actionRef}`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
if (control.enabled?.status === "resolved") {
|
|
221
|
+
if (typeof control.enabled.value !== "boolean") {
|
|
222
|
+
issue(
|
|
223
|
+
issues,
|
|
224
|
+
"CONTROL_ENABLED_VALUE_INVALID",
|
|
225
|
+
`/controls/${controlIndex}/enabled/value`,
|
|
226
|
+
"A resolved Control enabled value must be boolean",
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
} else if (
|
|
230
|
+
control.enabled?.status === "unresolved" &&
|
|
231
|
+
!unresolvedIds.has(control.enabled.unresolvedRef)
|
|
232
|
+
) {
|
|
233
|
+
issue(
|
|
234
|
+
issues,
|
|
235
|
+
"CONTROL_ENABLED_UNRESOLVED_MISSING",
|
|
236
|
+
`/controls/${controlIndex}/enabled/unresolvedRef`,
|
|
237
|
+
`Unknown unresolved item ${control.enabled.unresolvedRef}`,
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
graph.actions.forEach((action, actionIndex) => {
|
|
242
|
+
const owner = controlById.get(action.controlRef);
|
|
243
|
+
if (!owner || !owner.actionRefs.includes(action.id)) {
|
|
244
|
+
issue(
|
|
245
|
+
issues,
|
|
246
|
+
"ACTION_CONTROL_BACKREF_INVALID",
|
|
247
|
+
`/actions/${actionIndex}/controlRef`,
|
|
248
|
+
`Action ${action.id} has invalid Control owner`,
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
if (action.effectRefs.length === 0) {
|
|
252
|
+
issue(
|
|
253
|
+
issues,
|
|
254
|
+
"ACTION_EFFECT_MISSING",
|
|
255
|
+
`/actions/${actionIndex}/effectRefs`,
|
|
256
|
+
`Action ${action.id} must reference at least one Effect`,
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
action.effectRefs.forEach((effectRef) => {
|
|
260
|
+
const effect = effectById.get(effectRef);
|
|
261
|
+
if (!effect || effect.actionRef !== action.id) {
|
|
262
|
+
issue(
|
|
263
|
+
issues,
|
|
264
|
+
"ACTION_EFFECT_BACKREF_INVALID",
|
|
265
|
+
`/actions/${actionIndex}/effectRefs`,
|
|
266
|
+
`Action ${action.id} has invalid effect ${effectRef}`,
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
if (action.preconditionAlternatives) {
|
|
271
|
+
const common =
|
|
272
|
+
action.preconditionAlternatives.length === 0
|
|
273
|
+
? []
|
|
274
|
+
: action.preconditionAlternatives[0].conditionRefs
|
|
275
|
+
.filter((conditionRef) =>
|
|
276
|
+
action.preconditionAlternatives?.every((alternative) =>
|
|
277
|
+
alternative.conditionRefs.includes(conditionRef),
|
|
278
|
+
),
|
|
279
|
+
)
|
|
280
|
+
.sort();
|
|
281
|
+
if (
|
|
282
|
+
JSON.stringify(common) !==
|
|
283
|
+
JSON.stringify([...action.preconditionRefs].sort())
|
|
284
|
+
) {
|
|
285
|
+
issue(
|
|
286
|
+
issues,
|
|
287
|
+
"ACTION_PRECONDITION_ALTERNATIVES_INVALID",
|
|
288
|
+
`/actions/${actionIndex}/preconditionAlternatives`,
|
|
289
|
+
"Action preconditionRefs must be the intersection of its alternatives",
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
graph.effects.forEach((effect, effectIndex) => {
|
|
295
|
+
const owner = actionById.get(effect.actionRef);
|
|
296
|
+
if (!owner || !owner.effectRefs.includes(effect.id)) {
|
|
297
|
+
issue(
|
|
298
|
+
issues,
|
|
299
|
+
"EFFECT_ACTION_BACKREF_INVALID",
|
|
300
|
+
`/effects/${effectIndex}/actionRef`,
|
|
301
|
+
`Effect ${effect.id} has invalid Action owner`,
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
if (effect.kind === "unknown") {
|
|
305
|
+
const descriptionRef =
|
|
306
|
+
effect.description.status === "unresolved"
|
|
307
|
+
? effect.description.unresolvedRef
|
|
308
|
+
: undefined;
|
|
309
|
+
const unresolvedItem = descriptionRef
|
|
310
|
+
? unresolvedById.get(descriptionRef)
|
|
311
|
+
: undefined;
|
|
312
|
+
if (
|
|
313
|
+
!descriptionRef ||
|
|
314
|
+
!effect.unresolvedRefs?.includes(descriptionRef) ||
|
|
315
|
+
!unresolvedItem ||
|
|
316
|
+
(unresolvedItem.ownerRef !== effect.id &&
|
|
317
|
+
unresolvedItem.ownerRef !== effect.actionRef)
|
|
318
|
+
) {
|
|
319
|
+
issue(
|
|
320
|
+
issues,
|
|
321
|
+
"UNKNOWN_EFFECT_UNRESOLVED_MISSING",
|
|
322
|
+
`/effects/${effectIndex}/unresolvedRefs`,
|
|
323
|
+
`Unknown Effect ${effect.id} must reference its owning unresolved item`,
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
for (const [field, value] of [
|
|
328
|
+
["stateKey", effect.stateKey],
|
|
329
|
+
["value", effect.value],
|
|
330
|
+
]) {
|
|
331
|
+
if (
|
|
332
|
+
value?.status === "unresolved" &&
|
|
333
|
+
!unresolvedIds.has(value.unresolvedRef)
|
|
334
|
+
) {
|
|
335
|
+
issue(
|
|
336
|
+
issues,
|
|
337
|
+
"EFFECT_VALUE_UNRESOLVED_MISSING",
|
|
338
|
+
`/effects/${effectIndex}/${field}/unresolvedRef`,
|
|
339
|
+
`Unknown unresolved item ${value.unresolvedRef}`,
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
graph.edges.forEach((edge, edgeIndex) => {
|
|
345
|
+
const control = controlById.get(edge.controlRef);
|
|
346
|
+
const action = actionById.get(edge.actionRef);
|
|
347
|
+
if (
|
|
348
|
+
!areaById.has(edge.sourceAreaRef) ||
|
|
349
|
+
!control ||
|
|
350
|
+
control.areaRef !== edge.sourceAreaRef ||
|
|
351
|
+
!action ||
|
|
352
|
+
action.controlRef !== control.id ||
|
|
353
|
+
!control.actionRefs.includes(action.id)
|
|
354
|
+
) {
|
|
355
|
+
issue(
|
|
356
|
+
issues,
|
|
357
|
+
"EDGE_OWNER_CHAIN_INVALID",
|
|
358
|
+
`/edges/${edgeIndex}`,
|
|
359
|
+
`Edge ${edge.id} does not preserve Area→Control→Action ownership`,
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
const hasTransitionEffect =
|
|
363
|
+
action?.effectRefs.some((effectRef) => {
|
|
364
|
+
const effect = effectById.get(effectRef);
|
|
365
|
+
return (
|
|
366
|
+
effect?.actionRef === action.id &&
|
|
367
|
+
(effect.kind === "navigate-area" ||
|
|
368
|
+
effect.kind === "open-external" ||
|
|
369
|
+
effect.kind === "business-action" ||
|
|
370
|
+
effect.kind === "show-surface" ||
|
|
371
|
+
effect.kind === "close-surface")
|
|
372
|
+
);
|
|
373
|
+
}) ?? false;
|
|
374
|
+
if (!hasTransitionEffect) {
|
|
375
|
+
issue(
|
|
376
|
+
issues,
|
|
377
|
+
"EDGE_ACTION_NAVIGATION_EFFECT_MISSING",
|
|
378
|
+
`/edges/${edgeIndex}/actionRef`,
|
|
379
|
+
`Edge ${edge.id} Action has no Area transition or external Effect`,
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
if ("status" in edge.target) {
|
|
383
|
+
if (!unresolvedIds.has(edge.target.unresolvedRef)) {
|
|
384
|
+
issue(
|
|
385
|
+
issues,
|
|
386
|
+
"EDGE_UNRESOLVED_MISSING",
|
|
387
|
+
`/edges/${edgeIndex}/target`,
|
|
388
|
+
`Unknown unresolved item ${edge.target.unresolvedRef}`,
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
} else if (
|
|
392
|
+
(edge.target.kind === "area" && !areaById.has(edge.target.ref)) ||
|
|
393
|
+
(edge.target.kind === "external" && !externalIds.has(edge.target.ref))
|
|
394
|
+
) {
|
|
395
|
+
issue(
|
|
396
|
+
issues,
|
|
397
|
+
"EDGE_TARGET_MISSING",
|
|
398
|
+
`/edges/${edgeIndex}/target`,
|
|
399
|
+
`Unknown ${edge.target.kind} target ${edge.target.ref}`,
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
if (
|
|
403
|
+
edge.conditionAlternatives?.some((alternative) =>
|
|
404
|
+
alternative.conditionRefs.some(
|
|
405
|
+
(conditionRef) => !edge.conditions.includes(conditionRef),
|
|
406
|
+
),
|
|
407
|
+
)
|
|
408
|
+
) {
|
|
409
|
+
issue(
|
|
410
|
+
issues,
|
|
411
|
+
"EDGE_CONDITION_ALTERNATIVES_INVALID",
|
|
412
|
+
`/edges/${edgeIndex}/conditionAlternatives`,
|
|
413
|
+
"Every alternative condition must also appear in Edge conditions",
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
graph.entryPoints.forEach((entry, entryIndex) => {
|
|
418
|
+
entry.rootAreaRefs.forEach((areaRef) => {
|
|
419
|
+
if (!areaById.has(areaRef)) {
|
|
420
|
+
issue(
|
|
421
|
+
issues,
|
|
422
|
+
"ENTRY_ROOT_MISSING",
|
|
423
|
+
`/entryPoints/${entryIndex}/rootAreaRefs`,
|
|
424
|
+
`Unknown entry root ${areaRef}`,
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
if (
|
|
429
|
+
entry.launcherAreaRef !== undefined &&
|
|
430
|
+
!areaById.has(entry.launcherAreaRef)
|
|
431
|
+
) {
|
|
432
|
+
issue(
|
|
433
|
+
issues,
|
|
434
|
+
"ENTRY_LAUNCHER_AREA_MISSING",
|
|
435
|
+
`/entryPoints/${entryIndex}/launcherAreaRef`,
|
|
436
|
+
`Unknown launcher shell Area ${entry.launcherAreaRef}`,
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
graph.paths.forEach((path, index) =>
|
|
441
|
+
validatePath(graph, path, index, issues),
|
|
442
|
+
);
|
|
443
|
+
return { ok: issues.length === 0, issues };
|
|
444
|
+
}
|