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,350 @@
|
|
|
1
|
+
import { createStableId } from "../../core/stable-id.js";
|
|
2
|
+
const confidenceOrder = {
|
|
3
|
+
low: 0,
|
|
4
|
+
medium: 1,
|
|
5
|
+
high: 2,
|
|
6
|
+
};
|
|
7
|
+
function normalizePath(path) {
|
|
8
|
+
const normalized = path
|
|
9
|
+
.trim()
|
|
10
|
+
.replaceAll("\\", "/")
|
|
11
|
+
.replace(/^\.\/+/u, "")
|
|
12
|
+
.replace(/\/{2,}/gu, "/");
|
|
13
|
+
if (
|
|
14
|
+
normalized.length === 0 ||
|
|
15
|
+
normalized.startsWith("/") ||
|
|
16
|
+
/^[A-Za-z]:\//u.test(normalized) ||
|
|
17
|
+
normalized.split("/").includes("..")
|
|
18
|
+
) {
|
|
19
|
+
throw new Error(`Evidence path must be project-relative: ${path}`);
|
|
20
|
+
}
|
|
21
|
+
return normalized;
|
|
22
|
+
}
|
|
23
|
+
function normalizeLocation(location) {
|
|
24
|
+
const startLine = Math.max(1, location.range.startLine);
|
|
25
|
+
const endLine = Math.max(startLine, location.range.endLine);
|
|
26
|
+
const startColumn = location.range.startColumn;
|
|
27
|
+
const endColumn = location.range.endColumn;
|
|
28
|
+
return {
|
|
29
|
+
sourceKind: location.sourceKind,
|
|
30
|
+
path: normalizePath(location.path),
|
|
31
|
+
anchor: location.anchor.trim(),
|
|
32
|
+
range: {
|
|
33
|
+
startLine,
|
|
34
|
+
endLine,
|
|
35
|
+
...(startColumn !== undefined && startColumn >= 1 ? { startColumn } : {}),
|
|
36
|
+
...(endColumn !== undefined && endColumn >= 1 ? { endColumn } : {}),
|
|
37
|
+
},
|
|
38
|
+
...(location.symbol?.trim() ? { symbol: location.symbol.trim() } : {}),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function sortStrings(values) {
|
|
42
|
+
return [...new Set(values)].sort((left, right) =>
|
|
43
|
+
left.localeCompare(right, "en"),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function supportKey(support) {
|
|
47
|
+
return `${support.evidenceRef}\u0000${support.role}`;
|
|
48
|
+
}
|
|
49
|
+
function mergeSupports(left, right) {
|
|
50
|
+
const map = new Map();
|
|
51
|
+
[...left, ...right].forEach((support) => {
|
|
52
|
+
map.set(supportKey(support), support);
|
|
53
|
+
});
|
|
54
|
+
const result = [...map.values()].sort((a, b) =>
|
|
55
|
+
supportKey(a).localeCompare(supportKey(b), "en"),
|
|
56
|
+
);
|
|
57
|
+
if (result.length === 0) {
|
|
58
|
+
throw new Error("A source fact must have at least one support link");
|
|
59
|
+
}
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
function mergeData(existing, incoming) {
|
|
63
|
+
return {
|
|
64
|
+
...existing,
|
|
65
|
+
...incoming,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function factSortKey(fact) {
|
|
69
|
+
return `${fact.kind}\u0000${fact.id}`;
|
|
70
|
+
}
|
|
71
|
+
function strongFactRefs(fact) {
|
|
72
|
+
switch (fact.kind) {
|
|
73
|
+
case "component":
|
|
74
|
+
case "resource-value":
|
|
75
|
+
return [];
|
|
76
|
+
case "component-variant":
|
|
77
|
+
return [
|
|
78
|
+
fact.data.componentKey,
|
|
79
|
+
...fact.data.conditionKeys,
|
|
80
|
+
...fact.data.entryCallbackKeys,
|
|
81
|
+
...(fact.data.visibleElementKeys ?? []),
|
|
82
|
+
];
|
|
83
|
+
case "entry-point":
|
|
84
|
+
return [
|
|
85
|
+
fact.data.componentKey,
|
|
86
|
+
...fact.data.conditionKeys,
|
|
87
|
+
...(fact.data.preconditionKeys ?? []),
|
|
88
|
+
...(fact.data.parentEntryKey ? [fact.data.parentEntryKey] : []),
|
|
89
|
+
];
|
|
90
|
+
case "ui-element":
|
|
91
|
+
case "ui-property":
|
|
92
|
+
case "callback":
|
|
93
|
+
case "condition":
|
|
94
|
+
return [fact.data.ownerKey];
|
|
95
|
+
case "container-binding":
|
|
96
|
+
return [
|
|
97
|
+
fact.data.hostKey,
|
|
98
|
+
...fact.data.contentKeys,
|
|
99
|
+
...(fact.data.initialContentKey ? [fact.data.initialContentKey] : []),
|
|
100
|
+
];
|
|
101
|
+
case "interaction-binding":
|
|
102
|
+
return [fact.data.elementKey, fact.data.callbackKey];
|
|
103
|
+
case "callback-flow":
|
|
104
|
+
return [
|
|
105
|
+
fact.data.fromCallbackKey,
|
|
106
|
+
fact.data.toCallbackKey,
|
|
107
|
+
...(fact.data.conditionKeys ?? []),
|
|
108
|
+
];
|
|
109
|
+
case "behavior-effect":
|
|
110
|
+
return [
|
|
111
|
+
fact.data.callbackKey,
|
|
112
|
+
...(fact.data.targetKey ? [fact.data.targetKey] : []),
|
|
113
|
+
...(fact.data.conditionKeys ?? []),
|
|
114
|
+
];
|
|
115
|
+
case "navigation-target":
|
|
116
|
+
return [
|
|
117
|
+
fact.data.effectKey,
|
|
118
|
+
...(fact.data.targetKey ? [fact.data.targetKey] : []),
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export class SourceFactsBuilder {
|
|
123
|
+
caseId;
|
|
124
|
+
analysisContext;
|
|
125
|
+
evidenceById = new Map();
|
|
126
|
+
factsById = new Map();
|
|
127
|
+
unresolvedById = new Map();
|
|
128
|
+
constructor(caseId, analysisContext) {
|
|
129
|
+
this.caseId = caseId;
|
|
130
|
+
this.analysisContext = analysisContext;
|
|
131
|
+
}
|
|
132
|
+
stableId(namespace, entityKind, identity) {
|
|
133
|
+
return createStableId({
|
|
134
|
+
namespace,
|
|
135
|
+
caseId: this.caseId,
|
|
136
|
+
entityKind,
|
|
137
|
+
identity,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
addEvidence(location) {
|
|
141
|
+
const normalized = normalizeLocation(location);
|
|
142
|
+
if (normalized.anchor.length === 0) {
|
|
143
|
+
throw new Error(`Evidence anchor must not be blank: ${normalized.path}`);
|
|
144
|
+
}
|
|
145
|
+
const identity = [
|
|
146
|
+
{ kind: "resource", value: normalized.path },
|
|
147
|
+
{ kind: "semantic-key", value: normalized.anchor },
|
|
148
|
+
/*
|
|
149
|
+
* Evidence is a physical citation, not a product entity. Repeated,
|
|
150
|
+
* textually identical calls can legitimately share the same semantic
|
|
151
|
+
* anchor and symbol, so the exact normalized span must distinguish
|
|
152
|
+
* their citations. Fact IDs remain independent of source position.
|
|
153
|
+
*/
|
|
154
|
+
{
|
|
155
|
+
kind: "semantic-position",
|
|
156
|
+
value: JSON.stringify({
|
|
157
|
+
sourceKind: normalized.sourceKind,
|
|
158
|
+
range: normalized.range,
|
|
159
|
+
}),
|
|
160
|
+
},
|
|
161
|
+
...(normalized.symbol
|
|
162
|
+
? [{ kind: "symbol", value: normalized.symbol }]
|
|
163
|
+
: []),
|
|
164
|
+
];
|
|
165
|
+
const id = this.stableId("evidence", "source", identity);
|
|
166
|
+
const existing = this.evidenceById.get(id);
|
|
167
|
+
if (!existing) {
|
|
168
|
+
this.evidenceById.set(id, { id, ...normalized });
|
|
169
|
+
}
|
|
170
|
+
return id;
|
|
171
|
+
}
|
|
172
|
+
addFact(kind, input) {
|
|
173
|
+
const id = this.stableId("fact", kind, input.identity);
|
|
174
|
+
const support = input.support.map(({ location, role }) => ({
|
|
175
|
+
evidenceRef: this.addEvidence(location),
|
|
176
|
+
role,
|
|
177
|
+
}));
|
|
178
|
+
const existing = this.factsById.get(id);
|
|
179
|
+
const confidence =
|
|
180
|
+
existing &&
|
|
181
|
+
confidenceOrder[existing.confidence] > confidenceOrder[input.confidence]
|
|
182
|
+
? existing.confidence
|
|
183
|
+
: input.confidence;
|
|
184
|
+
const fact = {
|
|
185
|
+
id,
|
|
186
|
+
kind,
|
|
187
|
+
confidence,
|
|
188
|
+
support: existing ? mergeSupports(existing.support, support) : support,
|
|
189
|
+
data: existing ? mergeData(existing.data, input.data) : input.data,
|
|
190
|
+
...((existing?.relatedFactRefs?.length ?? 0) > 0 ||
|
|
191
|
+
(input.relatedFactRefs?.length ?? 0) > 0
|
|
192
|
+
? {
|
|
193
|
+
relatedFactRefs: sortStrings([
|
|
194
|
+
...(existing?.relatedFactRefs ?? []),
|
|
195
|
+
...(input.relatedFactRefs ?? []),
|
|
196
|
+
]),
|
|
197
|
+
}
|
|
198
|
+
: {}),
|
|
199
|
+
...(existing?.unresolvedRefs?.length
|
|
200
|
+
? { unresolvedRefs: existing.unresolvedRefs }
|
|
201
|
+
: {}),
|
|
202
|
+
};
|
|
203
|
+
this.factsById.set(id, fact);
|
|
204
|
+
return id;
|
|
205
|
+
}
|
|
206
|
+
addUnresolved(input) {
|
|
207
|
+
const evidenceRefs = sortStrings(input.evidenceRefs ?? []);
|
|
208
|
+
const identity = [
|
|
209
|
+
{ kind: "semantic-key", value: input.ownerRef },
|
|
210
|
+
{ kind: "semantic-key", value: input.fieldPath },
|
|
211
|
+
{ kind: "semantic-key", value: input.reasonCode },
|
|
212
|
+
...(input.originRef
|
|
213
|
+
? [{ kind: "semantic-key", value: input.originRef }]
|
|
214
|
+
: []),
|
|
215
|
+
];
|
|
216
|
+
const id = this.stableId("unresolved", "source", identity);
|
|
217
|
+
const item = {
|
|
218
|
+
id,
|
|
219
|
+
ownerRef: input.ownerRef,
|
|
220
|
+
fieldPath: input.fieldPath,
|
|
221
|
+
reasonCode: input.reasonCode,
|
|
222
|
+
message: input.message,
|
|
223
|
+
evidenceRefs,
|
|
224
|
+
candidates: input.candidates ?? [],
|
|
225
|
+
impact: sortStrings(input.impact),
|
|
226
|
+
...(input.originRef ? { originRef: input.originRef } : {}),
|
|
227
|
+
};
|
|
228
|
+
this.unresolvedById.set(id, item);
|
|
229
|
+
const fact = this.factsById.get(input.ownerRef);
|
|
230
|
+
if (fact) {
|
|
231
|
+
this.factsById.set(input.ownerRef, {
|
|
232
|
+
...fact,
|
|
233
|
+
unresolvedRefs: sortStrings([...(fact.unresolvedRefs ?? []), id]),
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return id;
|
|
237
|
+
}
|
|
238
|
+
fact(id) {
|
|
239
|
+
return this.factsById.get(id);
|
|
240
|
+
}
|
|
241
|
+
mergeFactData(kind, id, patch) {
|
|
242
|
+
const fact = this.factsById.get(id);
|
|
243
|
+
if (!fact || fact.kind !== kind) {
|
|
244
|
+
throw new Error(`Cannot update missing ${kind} source fact ${id}`);
|
|
245
|
+
}
|
|
246
|
+
this.factsById.set(id, {
|
|
247
|
+
...fact,
|
|
248
|
+
data: {
|
|
249
|
+
...fact.data,
|
|
250
|
+
...patch,
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
removeUnresolvedOwnedBy(ownerRef, reasonCodes) {
|
|
255
|
+
const removed = new Set(
|
|
256
|
+
[...this.unresolvedById.values()].flatMap((item) =>
|
|
257
|
+
item.ownerRef === ownerRef && reasonCodes.has(item.reasonCode)
|
|
258
|
+
? [item.id]
|
|
259
|
+
: [],
|
|
260
|
+
),
|
|
261
|
+
);
|
|
262
|
+
if (removed.size === 0) return;
|
|
263
|
+
for (const id of removed) this.unresolvedById.delete(id);
|
|
264
|
+
const owner = this.factsById.get(ownerRef);
|
|
265
|
+
if (!owner?.unresolvedRefs) return;
|
|
266
|
+
const retained = owner.unresolvedRefs.filter((id) => !removed.has(id));
|
|
267
|
+
this.factsById.set(ownerRef, {
|
|
268
|
+
...owner,
|
|
269
|
+
...(retained.length > 0
|
|
270
|
+
? { unresolvedRefs: retained }
|
|
271
|
+
: {
|
|
272
|
+
unresolvedRefs: undefined,
|
|
273
|
+
}),
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
facts(kind) {
|
|
277
|
+
return [...this.factsById.values()]
|
|
278
|
+
.filter((fact) => kind === undefined || fact.kind === kind)
|
|
279
|
+
.sort((left, right) =>
|
|
280
|
+
factSortKey(left).localeCompare(factSortKey(right), "en"),
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
finish() {
|
|
284
|
+
const facts = this.facts();
|
|
285
|
+
const factIds = new Set(facts.map((fact) => fact.id));
|
|
286
|
+
for (const fact of facts) {
|
|
287
|
+
for (const reference of [
|
|
288
|
+
...(fact.relatedFactRefs ?? []),
|
|
289
|
+
...strongFactRefs(fact),
|
|
290
|
+
]) {
|
|
291
|
+
if (!factIds.has(reference)) {
|
|
292
|
+
throw new Error(
|
|
293
|
+
`Source fact ${fact.id} has missing strong reference ${reference}`,
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
for (const support of fact.support) {
|
|
298
|
+
if (!this.evidenceById.has(support.evidenceRef)) {
|
|
299
|
+
throw new Error(
|
|
300
|
+
`Source fact ${fact.id} has missing evidence ${support.evidenceRef}`,
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
for (const unresolvedRef of fact.unresolvedRefs ?? []) {
|
|
305
|
+
if (!this.unresolvedById.has(unresolvedRef)) {
|
|
306
|
+
throw new Error(
|
|
307
|
+
`Source fact ${fact.id} has missing unresolved ${unresolvedRef}`,
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
for (const unresolved of this.unresolvedById.values()) {
|
|
313
|
+
if (!factIds.has(unresolved.ownerRef)) {
|
|
314
|
+
throw new Error(
|
|
315
|
+
`Unresolved item ${unresolved.id} has missing owner ${unresolved.ownerRef}`,
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
for (const evidenceRef of unresolved.evidenceRefs) {
|
|
319
|
+
if (!this.evidenceById.has(evidenceRef)) {
|
|
320
|
+
throw new Error(
|
|
321
|
+
`Unresolved item ${unresolved.id} has missing evidence ${evidenceRef}`,
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
for (const candidate of unresolved.candidates) {
|
|
326
|
+
for (const evidenceRef of candidate.supportRefs) {
|
|
327
|
+
if (!this.evidenceById.has(evidenceRef)) {
|
|
328
|
+
throw new Error(
|
|
329
|
+
`Unresolved item ${unresolved.id} candidate has missing ` +
|
|
330
|
+
`evidence ${evidenceRef}`,
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return {
|
|
337
|
+
schemaVersion: "1.0.0",
|
|
338
|
+
artifactKind: "source-facts",
|
|
339
|
+
caseId: this.caseId,
|
|
340
|
+
analysisContext: this.analysisContext,
|
|
341
|
+
evidence: [...this.evidenceById.values()].sort((left, right) =>
|
|
342
|
+
left.id.localeCompare(right.id, "en"),
|
|
343
|
+
),
|
|
344
|
+
facts,
|
|
345
|
+
unresolved: [...this.unresolvedById.values()].sort((left, right) =>
|
|
346
|
+
left.id.localeCompare(right.id, "en"),
|
|
347
|
+
),
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
}
|