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,234 @@
|
|
|
1
|
+
import { resourceIdAliases } from "./resource-id.js";
|
|
2
|
+
export class NormalizationState {
|
|
3
|
+
builder;
|
|
4
|
+
applicationId;
|
|
5
|
+
componentByQualifiedName = new Map();
|
|
6
|
+
componentTypeById = new Map();
|
|
7
|
+
layoutOwners = new Map();
|
|
8
|
+
uiByResourceId = new Map();
|
|
9
|
+
uiByLayout = new Map();
|
|
10
|
+
rootUiByLayout = new Map();
|
|
11
|
+
repeatedContainerIdsByLayoutOwner = new Map();
|
|
12
|
+
uiOwnerById = new Map();
|
|
13
|
+
callbackBySymbol = new Map();
|
|
14
|
+
fragmentByNavigationId = new Map();
|
|
15
|
+
navigationTargetByActionId = new Map();
|
|
16
|
+
navigationHostsByGraph = new Map();
|
|
17
|
+
activityAliasTargetByQualifiedName = new Map();
|
|
18
|
+
conditionalSurfacesByStateSymbol = new Map();
|
|
19
|
+
/**
|
|
20
|
+
* Compose surfaces whose visibility is controlled through a resolved state
|
|
21
|
+
* object API, for example DrawerState.open()/close(). The key is the same
|
|
22
|
+
* structured symbol identity used by expression normalization.
|
|
23
|
+
*/
|
|
24
|
+
statefulSurfacesByStateSymbol = new Map();
|
|
25
|
+
/**
|
|
26
|
+
* Exact resolved state-object methods whose semantics were established by
|
|
27
|
+
* the surface call site itself (for example, a method matching the boolean
|
|
28
|
+
* `expanded` accessor or the method invoked by `onDismissRequest`).
|
|
29
|
+
*/
|
|
30
|
+
statefulSurfaceTransitionsByStateSymbol = new Map();
|
|
31
|
+
/**
|
|
32
|
+
* Records the canonical effect emitted for a resolved UAST call. Kotlin
|
|
33
|
+
* property writes can be reported both as a synthetic setter call and as an
|
|
34
|
+
* assignment; the later assignment pass uses this registry to prove that
|
|
35
|
+
* both raw records describe the same mutation before suppressing the less
|
|
36
|
+
* precise duplicate.
|
|
37
|
+
*/
|
|
38
|
+
effectByResolvedCall = new Map();
|
|
39
|
+
callbackByRawCallable = new Map();
|
|
40
|
+
constructor(builder, applicationId) {
|
|
41
|
+
this.builder = builder;
|
|
42
|
+
this.applicationId = applicationId?.trim() || undefined;
|
|
43
|
+
}
|
|
44
|
+
ensureComponent(
|
|
45
|
+
qualifiedName,
|
|
46
|
+
componentType,
|
|
47
|
+
location,
|
|
48
|
+
role,
|
|
49
|
+
confidence,
|
|
50
|
+
details = {},
|
|
51
|
+
) {
|
|
52
|
+
const normalizedName = qualifiedName.trim();
|
|
53
|
+
const existingId = this.componentByQualifiedName.get(normalizedName);
|
|
54
|
+
const existingType = existingId
|
|
55
|
+
? this.componentTypeById.get(existingId)
|
|
56
|
+
: undefined;
|
|
57
|
+
const type =
|
|
58
|
+
existingType && existingType !== "other" ? existingType : componentType;
|
|
59
|
+
const id = this.builder.addFact("component", {
|
|
60
|
+
identity: [{ kind: "component", value: normalizedName }],
|
|
61
|
+
confidence,
|
|
62
|
+
support: [{ location, role }],
|
|
63
|
+
data: {
|
|
64
|
+
componentType: type,
|
|
65
|
+
qualifiedName: normalizedName,
|
|
66
|
+
applicationModule: this.builder.analysisContext.applicationModule,
|
|
67
|
+
...(details.uiTechnology ? { uiTechnology: details.uiTechnology } : {}),
|
|
68
|
+
...(details.layoutResource
|
|
69
|
+
? { layoutResource: details.layoutResource }
|
|
70
|
+
: {}),
|
|
71
|
+
...(details.exported !== undefined
|
|
72
|
+
? { exported: details.exported }
|
|
73
|
+
: {}),
|
|
74
|
+
...(details.manifestProvenance
|
|
75
|
+
? { manifestProvenance: details.manifestProvenance }
|
|
76
|
+
: {}),
|
|
77
|
+
...(details.analysisRole ? { analysisRole: details.analysisRole } : {}),
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
this.componentByQualifiedName.set(normalizedName, id);
|
|
81
|
+
this.componentTypeById.set(id, type);
|
|
82
|
+
return id;
|
|
83
|
+
}
|
|
84
|
+
ensureLayoutSurrogate(layout, location) {
|
|
85
|
+
return this.ensureComponent(
|
|
86
|
+
`@layout/${layout}`,
|
|
87
|
+
"widget",
|
|
88
|
+
location,
|
|
89
|
+
"layout owner surrogate",
|
|
90
|
+
"medium",
|
|
91
|
+
{
|
|
92
|
+
uiTechnology: "views",
|
|
93
|
+
layoutResource: layout,
|
|
94
|
+
},
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
addLayoutOwner(layout, componentRef) {
|
|
98
|
+
const owners = this.layoutOwners.get(layout) ?? new Set();
|
|
99
|
+
owners.add(componentRef);
|
|
100
|
+
this.layoutOwners.set(layout, owners);
|
|
101
|
+
}
|
|
102
|
+
registerRepeatedLayoutContainer(layout, componentRef, resourceId) {
|
|
103
|
+
const key = `${layout}\u0000${componentRef}`;
|
|
104
|
+
const ids = this.repeatedContainerIdsByLayoutOwner.get(key) ?? new Set();
|
|
105
|
+
ids.add(resourceId);
|
|
106
|
+
this.repeatedContainerIdsByLayoutOwner.set(key, ids);
|
|
107
|
+
}
|
|
108
|
+
repeatedLayoutResourceId(layout, componentRef) {
|
|
109
|
+
const ids = [
|
|
110
|
+
...(this.repeatedContainerIdsByLayoutOwner.get(
|
|
111
|
+
`${layout}\u0000${componentRef}`,
|
|
112
|
+
) ?? []),
|
|
113
|
+
].sort();
|
|
114
|
+
return ids.length === 1 ? `${ids[0]}/item` : undefined;
|
|
115
|
+
}
|
|
116
|
+
registerUi(resourceId, factId) {
|
|
117
|
+
if (!resourceId) return;
|
|
118
|
+
for (const alias of resourceIdAliases(resourceId)) {
|
|
119
|
+
const facts = this.uiByResourceId.get(alias) ?? new Set();
|
|
120
|
+
facts.add(factId);
|
|
121
|
+
this.uiByResourceId.set(alias, facts);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
registerLayoutUi(layout, factId, isRoot) {
|
|
125
|
+
const facts = this.uiByLayout.get(layout) ?? new Set();
|
|
126
|
+
facts.add(factId);
|
|
127
|
+
this.uiByLayout.set(layout, facts);
|
|
128
|
+
if (!isRoot) return;
|
|
129
|
+
const roots = this.rootUiByLayout.get(layout) ?? new Set();
|
|
130
|
+
roots.add(factId);
|
|
131
|
+
this.rootUiByLayout.set(layout, roots);
|
|
132
|
+
}
|
|
133
|
+
registerCallback(symbol, factId) {
|
|
134
|
+
this.callbackBySymbol.set(symbol, factId);
|
|
135
|
+
}
|
|
136
|
+
callbackForRawCallable(rawCallableRef) {
|
|
137
|
+
return this.callbackByRawCallable.get(rawCallableRef);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* A raw callable is one source-level declaration and therefore has one
|
|
141
|
+
* normalized callback identity, even when more than one normalizer observes
|
|
142
|
+
* it. The first registration is retained deterministically; callers must
|
|
143
|
+
* query before creating a new callback fact.
|
|
144
|
+
*/
|
|
145
|
+
registerRawCallableCallback(rawCallableRef, callbackRef) {
|
|
146
|
+
const rawRef = rawCallableRef.trim();
|
|
147
|
+
if (rawRef.length === 0) {
|
|
148
|
+
throw new Error("rawCallableRef must not be blank");
|
|
149
|
+
}
|
|
150
|
+
const fact = this.builder.fact(callbackRef);
|
|
151
|
+
if (!fact || fact.kind !== "callback") {
|
|
152
|
+
throw new Error(
|
|
153
|
+
`Raw callable ${rawRef} must reference a callback fact: ${callbackRef}`,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
const existing = this.callbackByRawCallable.get(rawRef);
|
|
157
|
+
if (existing) return existing;
|
|
158
|
+
this.callbackByRawCallable.set(rawRef, callbackRef);
|
|
159
|
+
return callbackRef;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Replaces an earlier use-site identity with the declaration-owned identity.
|
|
163
|
+
* Compose is normalized before JVM declarations, so a method reference can
|
|
164
|
+
* legitimately be observed first under its UI owner. The JVM declaration is
|
|
165
|
+
* the canonical callable once it becomes available.
|
|
166
|
+
*/
|
|
167
|
+
canonicalizeRawCallableCallback(rawCallableRef, callbackRef) {
|
|
168
|
+
const rawRef = rawCallableRef.trim();
|
|
169
|
+
if (rawRef.length === 0) {
|
|
170
|
+
throw new Error("rawCallableRef must not be blank");
|
|
171
|
+
}
|
|
172
|
+
const fact = this.builder.fact(callbackRef);
|
|
173
|
+
if (!fact || fact.kind !== "callback") {
|
|
174
|
+
throw new Error(
|
|
175
|
+
`Raw callable ${rawRef} must reference a callback fact: ${callbackRef}`,
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
this.callbackByRawCallable.set(rawRef, callbackRef);
|
|
179
|
+
}
|
|
180
|
+
registerResolvedCallEffect(rawCallRef, effectRef) {
|
|
181
|
+
const rawRef = rawCallRef.trim();
|
|
182
|
+
if (rawRef.length === 0) {
|
|
183
|
+
throw new Error("rawCallRef must not be blank");
|
|
184
|
+
}
|
|
185
|
+
const fact = this.builder.fact(effectRef);
|
|
186
|
+
if (!fact || fact.kind !== "behavior-effect") {
|
|
187
|
+
throw new Error(
|
|
188
|
+
`Raw call ${rawRef} must reference a behavior-effect fact: ${effectRef}`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
this.effectByResolvedCall.set(rawRef, effectRef);
|
|
192
|
+
}
|
|
193
|
+
effectForResolvedCall(rawCallRef) {
|
|
194
|
+
return this.effectByResolvedCall.get(rawCallRef);
|
|
195
|
+
}
|
|
196
|
+
registerConditionalSurfaceState(stateSymbol, surfaceRef, activation) {
|
|
197
|
+
const key = stateSymbol.trim();
|
|
198
|
+
if (key.length === 0) {
|
|
199
|
+
throw new Error("stateSymbol must not be blank");
|
|
200
|
+
}
|
|
201
|
+
const surfaces =
|
|
202
|
+
this.conditionalSurfacesByStateSymbol.get(key) ?? new Map();
|
|
203
|
+
surfaces.set(surfaceRef, activation);
|
|
204
|
+
this.conditionalSurfacesByStateSymbol.set(key, surfaces);
|
|
205
|
+
}
|
|
206
|
+
registerStatefulSurfaceState(stateSymbol, surfaceRef) {
|
|
207
|
+
const key = stateSymbol.trim();
|
|
208
|
+
if (key.length === 0) {
|
|
209
|
+
throw new Error("stateSymbol must not be blank");
|
|
210
|
+
}
|
|
211
|
+
const surfaces = this.statefulSurfacesByStateSymbol.get(key) ?? new Set();
|
|
212
|
+
surfaces.add(surfaceRef);
|
|
213
|
+
this.statefulSurfacesByStateSymbol.set(key, surfaces);
|
|
214
|
+
}
|
|
215
|
+
registerStatefulSurfaceTransition(stateSymbol, targetSignature, transition) {
|
|
216
|
+
const key = stateSymbol.trim();
|
|
217
|
+
const signature = targetSignature.trim();
|
|
218
|
+
if (key.length === 0 || signature.length === 0) {
|
|
219
|
+
throw new Error("stateSymbol and targetSignature must not be blank");
|
|
220
|
+
}
|
|
221
|
+
const methods =
|
|
222
|
+
this.statefulSurfaceTransitionsByStateSymbol.get(key) ?? new Map();
|
|
223
|
+
const transitions = methods.get(signature) ?? new Set();
|
|
224
|
+
transitions.add(transition);
|
|
225
|
+
methods.set(signature, transitions);
|
|
226
|
+
this.statefulSurfaceTransitionsByStateSymbol.set(key, methods);
|
|
227
|
+
}
|
|
228
|
+
statefulSurfaceTransition(stateSymbol, targetSignature) {
|
|
229
|
+
const transitions = this.statefulSurfaceTransitionsByStateSymbol
|
|
230
|
+
.get(stateSymbol.trim())
|
|
231
|
+
?.get(targetSignature.trim());
|
|
232
|
+
return transitions?.size === 1 ? [...transitions][0] : undefined;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { extractMergedManifest } from "./manifest.js";
|
|
2
|
+
import { selectAndroidResources } from "./resources.js";
|
|
3
|
+
import { ANDROID_XML_CONTRACT_VERSION } from "./types.js";
|
|
4
|
+
import { extractAndroidViews } from "./views.js";
|
|
5
|
+
export function extractAndroidXml(input) {
|
|
6
|
+
const selection = selectAndroidResources(
|
|
7
|
+
input.selected,
|
|
8
|
+
input.resourceConfiguration,
|
|
9
|
+
);
|
|
10
|
+
const manifest = extractMergedManifest(
|
|
11
|
+
input.selected,
|
|
12
|
+
input.mergedManifestPath,
|
|
13
|
+
);
|
|
14
|
+
const xml = extractAndroidViews(input.selected, selection, manifest);
|
|
15
|
+
return {
|
|
16
|
+
contractVersion: ANDROID_XML_CONTRACT_VERSION,
|
|
17
|
+
target: {
|
|
18
|
+
applicationModule: input.selected.applicationModule.gradlePath,
|
|
19
|
+
buildVariant: input.selected.variant.name,
|
|
20
|
+
resourceConfiguration: input.resourceConfiguration,
|
|
21
|
+
},
|
|
22
|
+
manifest: {
|
|
23
|
+
...manifest,
|
|
24
|
+
entries: [...manifest.entries, ...xml.shortcutEntries].sort(
|
|
25
|
+
(left, right) =>
|
|
26
|
+
`${left.kind}:${left.componentName}:${left.uri ?? ""}:${left.data.shortcutId ?? ""}`.localeCompare(
|
|
27
|
+
`${right.kind}:${right.componentName}:${right.uri ?? ""}:${right.data.shortcutId ?? ""}`,
|
|
28
|
+
"en",
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
values: selection.values,
|
|
33
|
+
resources: selection.resources,
|
|
34
|
+
views: xml.views,
|
|
35
|
+
fragments: xml.fragments,
|
|
36
|
+
includes: xml.includes,
|
|
37
|
+
navigationTargets: xml.navigationTargets,
|
|
38
|
+
appWidgetLayouts: xml.appWidgetLayouts,
|
|
39
|
+
};
|
|
40
|
+
}
|