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,353 @@
|
|
|
1
|
+
import {
|
|
2
|
+
areaDescriptionMustMarkPending,
|
|
3
|
+
featureDescriptionMustMarkPending,
|
|
4
|
+
} from "../validation/req-text.js";
|
|
5
|
+
function oneLine(value) {
|
|
6
|
+
return value.trim().replace(/\s+/gu, " ");
|
|
7
|
+
}
|
|
8
|
+
function sentence(value) {
|
|
9
|
+
const text = oneLine(value);
|
|
10
|
+
if (text.length === 0) return text;
|
|
11
|
+
return /[。!?.!?]$/u.test(text) ? text : `${text}。`;
|
|
12
|
+
}
|
|
13
|
+
function withPendingMarker(value, required) {
|
|
14
|
+
const description = sentence(value);
|
|
15
|
+
if (!required || description.includes("待确认")) return description;
|
|
16
|
+
return `${description}相关信息待确认。`;
|
|
17
|
+
}
|
|
18
|
+
export function resolvedName(value, fallback) {
|
|
19
|
+
return value.status === "resolved" ? oneLine(value.value) : fallback;
|
|
20
|
+
}
|
|
21
|
+
function renderedValue(value) {
|
|
22
|
+
if (typeof value === "boolean") return value ? "开启" : "关闭";
|
|
23
|
+
if (value === null) return "空";
|
|
24
|
+
if (typeof value === "string") return oneLine(value);
|
|
25
|
+
if (typeof value === "number" || typeof value === "bigint") {
|
|
26
|
+
return String(value);
|
|
27
|
+
}
|
|
28
|
+
const serialized = JSON.stringify(value);
|
|
29
|
+
return serialized === undefined ? "值待确认" : oneLine(serialized);
|
|
30
|
+
}
|
|
31
|
+
function actionPhrase(action) {
|
|
32
|
+
switch (action) {
|
|
33
|
+
case "click":
|
|
34
|
+
return "点击";
|
|
35
|
+
case "long-press":
|
|
36
|
+
return "长按";
|
|
37
|
+
case "select":
|
|
38
|
+
return "选择";
|
|
39
|
+
case "toggle":
|
|
40
|
+
return "切换";
|
|
41
|
+
case "text-input":
|
|
42
|
+
return "输入";
|
|
43
|
+
case "text-submit":
|
|
44
|
+
return "提交";
|
|
45
|
+
case "back":
|
|
46
|
+
return "返回";
|
|
47
|
+
case "swipe":
|
|
48
|
+
return "滑动";
|
|
49
|
+
case "drag":
|
|
50
|
+
return "拖动";
|
|
51
|
+
default:
|
|
52
|
+
return oneLine(action);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function looksLikeCode(value) {
|
|
56
|
+
const text = value.trim();
|
|
57
|
+
return (
|
|
58
|
+
/(?:===?|!==?|>=|<=|&&|\|\||=>|\?\.|::)/u.test(text) ||
|
|
59
|
+
/\b(?:null|true|false)\b/iu.test(text) ||
|
|
60
|
+
/\b[A-Za-z_$][A-Za-z0-9_$]*(?:\.[A-Za-z_$][A-Za-z0-9_$]*)+\b/u.test(text) ||
|
|
61
|
+
/\b[A-Za-z_$][A-Za-z0-9_$]*\s*\(/u.test(text)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function conditionPhrase(conditions) {
|
|
65
|
+
if (conditions.length === 0) return "";
|
|
66
|
+
const values = [
|
|
67
|
+
...new Set(
|
|
68
|
+
conditions.map((item) =>
|
|
69
|
+
looksLikeCode(item.text) ? "满足特定条件" : oneLine(item.text),
|
|
70
|
+
),
|
|
71
|
+
),
|
|
72
|
+
];
|
|
73
|
+
return `在${values.join(",且")}时,`;
|
|
74
|
+
}
|
|
75
|
+
function targetNames(target) {
|
|
76
|
+
if ("status" in target) return ["目标待确认"];
|
|
77
|
+
if (target.kind === "history-back") return ["上一界面"];
|
|
78
|
+
if (target.kind === "alternative-target-set") {
|
|
79
|
+
const names = target.branches.map((branch) =>
|
|
80
|
+
"status" in branch.target
|
|
81
|
+
? "目标待确认"
|
|
82
|
+
: resolvedName(branch.target.displayName, "目标待确认"),
|
|
83
|
+
);
|
|
84
|
+
return [...new Set(names)];
|
|
85
|
+
}
|
|
86
|
+
return [resolvedName(target.displayName, "目标待确认")];
|
|
87
|
+
}
|
|
88
|
+
function interactionDescription(interaction) {
|
|
89
|
+
const effects = [
|
|
90
|
+
...new Set(
|
|
91
|
+
interaction.effects
|
|
92
|
+
.map((effect) => oneLine(effect.text))
|
|
93
|
+
.filter((text) => text.length > 0),
|
|
94
|
+
),
|
|
95
|
+
];
|
|
96
|
+
const targets =
|
|
97
|
+
interaction.target === undefined ? [] : targetNames(interaction.target);
|
|
98
|
+
const knownTargets = targets.filter((name) => name !== "目标待确认");
|
|
99
|
+
const effectText = effects.join(";");
|
|
100
|
+
const needsTarget = knownTargets.some((name) => !effectText.includes(name));
|
|
101
|
+
const details = [...effects];
|
|
102
|
+
if (needsTarget) details.push(`目标为“${knownTargets.join("”或“")}”`);
|
|
103
|
+
if (targets.includes("目标待确认") && !effectText.includes("待确认")) {
|
|
104
|
+
details.push("目标待确认");
|
|
105
|
+
}
|
|
106
|
+
if (details.length === 0) details.push("执行对应操作");
|
|
107
|
+
return sentence(
|
|
108
|
+
`${conditionPhrase(interaction.conditions)}` +
|
|
109
|
+
`${actionPhrase(interaction.trigger)}后,${details.join(";")}`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
function featureDescription(feature) {
|
|
113
|
+
const parts = [];
|
|
114
|
+
if (feature.enabled?.status === "resolved") {
|
|
115
|
+
parts.push(feature.enabled.value ? "该控件可用。" : "该控件不可用。");
|
|
116
|
+
}
|
|
117
|
+
if (feature.defaultValue?.status === "resolved") {
|
|
118
|
+
parts.push(`默认值为“${renderedValue(feature.defaultValue.value)}”。`);
|
|
119
|
+
}
|
|
120
|
+
if (feature.options.length > 0) {
|
|
121
|
+
parts.push(
|
|
122
|
+
`可选项包括${feature.options
|
|
123
|
+
.map((option) => `“${oneLine(option.value)}”`)
|
|
124
|
+
.join("、")}。`,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const interactions =
|
|
128
|
+
feature.interactions && feature.interactions.length > 0
|
|
129
|
+
? feature.interactions
|
|
130
|
+
: [
|
|
131
|
+
{
|
|
132
|
+
id: `${feature.id}:legacy-interaction`,
|
|
133
|
+
actionRef: feature.id,
|
|
134
|
+
trigger: feature.trigger,
|
|
135
|
+
conditions: feature.conditions,
|
|
136
|
+
effects: feature.effects,
|
|
137
|
+
...(feature.target === undefined ? {} : { target: feature.target }),
|
|
138
|
+
unresolvedRefs: feature.unresolvedRefs,
|
|
139
|
+
supportRefs: feature.supportRefs,
|
|
140
|
+
},
|
|
141
|
+
];
|
|
142
|
+
parts.push(...new Set(interactions.map(interactionDescription)));
|
|
143
|
+
return withPendingMarker(
|
|
144
|
+
parts.join(""),
|
|
145
|
+
featureDescriptionMustMarkPending(feature),
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function areaDescription(area) {
|
|
149
|
+
const technicalFallback =
|
|
150
|
+
/^.+?是一个\s+[A-Za-z][A-Za-z0-9-]*\s+类型的交互区域[。.]?$/u;
|
|
151
|
+
const descriptions = [
|
|
152
|
+
...new Set(
|
|
153
|
+
area.descriptionItems
|
|
154
|
+
.map((item) => oneLine(item.text))
|
|
155
|
+
.filter((text) => text.length > 0 && !technicalFallback.test(text)),
|
|
156
|
+
),
|
|
157
|
+
];
|
|
158
|
+
const base =
|
|
159
|
+
descriptions.length > 0
|
|
160
|
+
? descriptions.map(sentence).join("")
|
|
161
|
+
: area.features.length > 0
|
|
162
|
+
? "该区域包含以下可交互功能。"
|
|
163
|
+
: "该区域用于展示相关内容。";
|
|
164
|
+
return withPendingMarker(base, areaDescriptionMustMarkPending(area));
|
|
165
|
+
}
|
|
166
|
+
function startupPrefix(area, graph) {
|
|
167
|
+
const canonicalPath = area.canonicalPath;
|
|
168
|
+
if (canonicalPath.status !== "resolved") return undefined;
|
|
169
|
+
const graphPath = graph.paths.find(
|
|
170
|
+
(path) => path.id === canonicalPath.pathRef,
|
|
171
|
+
);
|
|
172
|
+
const entry = graph.entryPoints.find(
|
|
173
|
+
(candidate) => candidate.id === graphPath?.rootEntryRef,
|
|
174
|
+
);
|
|
175
|
+
if (!entry) return undefined;
|
|
176
|
+
const launcher = entry.launcherAreaRef;
|
|
177
|
+
const visibleRoots = entry.rootAreaRefs.filter((ref) => ref !== launcher);
|
|
178
|
+
const visibleArea =
|
|
179
|
+
visibleRoots.length === 1
|
|
180
|
+
? graph.areas.find((candidate) => candidate.id === visibleRoots[0])
|
|
181
|
+
: undefined;
|
|
182
|
+
const visibleName =
|
|
183
|
+
visibleArea === undefined
|
|
184
|
+
? undefined
|
|
185
|
+
: resolvedName(visibleArea.name, "默认区域待确认");
|
|
186
|
+
if (entry.category === "normal" && entry.startupRole === "default") {
|
|
187
|
+
return visibleName === undefined
|
|
188
|
+
? "打开应用 - 进入主界面"
|
|
189
|
+
: `打开应用 - 进入"${visibleName}"`;
|
|
190
|
+
}
|
|
191
|
+
if (entry.category === "normal" && entry.startupRole === "conditional") {
|
|
192
|
+
return visibleName === undefined
|
|
193
|
+
? "满足启动条件后进入主界面"
|
|
194
|
+
: `满足启动条件后进入"${visibleName}"`;
|
|
195
|
+
}
|
|
196
|
+
if (entry.startupRole === "override") {
|
|
197
|
+
return visibleName === undefined
|
|
198
|
+
? "通过替代启动入口进入应用"
|
|
199
|
+
: `通过替代启动入口进入"${visibleName}"`;
|
|
200
|
+
}
|
|
201
|
+
return undefined;
|
|
202
|
+
}
|
|
203
|
+
export function renderedPath(area, graph) {
|
|
204
|
+
const areaName = resolvedName(area.displayName, "Area 名称待确认");
|
|
205
|
+
const path = area.canonicalPath;
|
|
206
|
+
if (path.status === "unresolved") return `${areaName} 的访问路径待确认`;
|
|
207
|
+
if (path.status === "unreachable") {
|
|
208
|
+
return `从正常启动流程无法到达 ${areaName}`;
|
|
209
|
+
}
|
|
210
|
+
if (path.segments.length === 0) return `${areaName} 的访问路径待确认`;
|
|
211
|
+
const startup = startupPrefix(area, graph);
|
|
212
|
+
const firstArea = oneLine(path.segments[0].areaName);
|
|
213
|
+
const parts = [startup ?? `打开应用 - 进入"${firstArea}"`];
|
|
214
|
+
for (const segment of path.segments) {
|
|
215
|
+
const action =
|
|
216
|
+
segment.action === undefined ? undefined : actionPhrase(segment.action);
|
|
217
|
+
const control =
|
|
218
|
+
segment.controlName === undefined
|
|
219
|
+
? undefined
|
|
220
|
+
: `"${oneLine(segment.controlName)}"`;
|
|
221
|
+
const target =
|
|
222
|
+
segment.targetAreaName === undefined
|
|
223
|
+
? undefined
|
|
224
|
+
: `"${oneLine(segment.targetAreaName)}"`;
|
|
225
|
+
if (action !== undefined && control !== undefined) {
|
|
226
|
+
parts.push(`${action}${control}`);
|
|
227
|
+
}
|
|
228
|
+
if (action !== undefined && target !== undefined && control === undefined) {
|
|
229
|
+
parts.push(`${action}`);
|
|
230
|
+
}
|
|
231
|
+
if (target !== undefined) {
|
|
232
|
+
parts.push(`进入${target}`);
|
|
233
|
+
} else if (
|
|
234
|
+
action !== undefined &&
|
|
235
|
+
control === undefined &&
|
|
236
|
+
target === undefined
|
|
237
|
+
) {
|
|
238
|
+
parts.push(`${action}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return parts.join(" - ");
|
|
242
|
+
}
|
|
243
|
+
function assertSameRun(reqModel, graph) {
|
|
244
|
+
if (
|
|
245
|
+
reqModel.caseId !== graph.caseId ||
|
|
246
|
+
JSON.stringify(reqModel.analysisContext) !==
|
|
247
|
+
JSON.stringify(graph.analysisContext)
|
|
248
|
+
) {
|
|
249
|
+
throw new Error("REQ draft inputs do not describe the same analysis run");
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/** The deterministic content of one Area: head lines (访问路径/前置条件/
|
|
253
|
+
* 区域说明) and its Features' {title, body}. Shared by renderReqDraft (flat
|
|
254
|
+
* text) and renderReqMarkdown (Area-blocked Markdown) so the two never
|
|
255
|
+
* diverge. */
|
|
256
|
+
function buildAreaContent(area, graph) {
|
|
257
|
+
const areaName = resolvedName(area.displayName, "Area 名称待确认");
|
|
258
|
+
const headerLines = [`访问路径:${renderedPath(area, graph)}`];
|
|
259
|
+
if (area.preconditions.length > 0) {
|
|
260
|
+
headerLines.push(
|
|
261
|
+
`前置条件:${area.preconditions
|
|
262
|
+
.map((item) => oneLine(item.text))
|
|
263
|
+
.join(";")}`,
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
headerLines.push(`区域说明:${areaDescription(area)}`);
|
|
267
|
+
const features = area.features.map((feature) => ({
|
|
268
|
+
title: `${areaName} - ${resolvedName(feature.displayName, "控件名称待确认")}`,
|
|
269
|
+
body: featureDescription(feature),
|
|
270
|
+
}));
|
|
271
|
+
return { headerLines, features };
|
|
272
|
+
}
|
|
273
|
+
/** Render a complete, deterministic draft. No model or network is involved. */
|
|
274
|
+
export function renderReqDraft(reqModel, graph) {
|
|
275
|
+
assertSameRun(reqModel, graph);
|
|
276
|
+
const lines = [];
|
|
277
|
+
reqModel.areas.forEach((area, areaIndex) => {
|
|
278
|
+
const content = buildAreaContent(area, graph);
|
|
279
|
+
lines.push(...content.headerLines);
|
|
280
|
+
for (const feature of content.features) {
|
|
281
|
+
lines.push("", feature.title, feature.body);
|
|
282
|
+
}
|
|
283
|
+
if (areaIndex < reqModel.areas.length - 1) lines.push("");
|
|
284
|
+
});
|
|
285
|
+
return `${lines.join("\n")}\n`;
|
|
286
|
+
}
|
|
287
|
+
/** Serializes per-Area {headerLines, features} content into the Area-blocked
|
|
288
|
+
* Markdown form: head lines stay as prose, Features are grouped into one
|
|
289
|
+
* fenced code block per Area. Operates on already-structured entries (never
|
|
290
|
+
* re-parses flattened text), so an Agent-rendered body may safely contain
|
|
291
|
+
* embedded blank lines or multiple lines (e.g. Law 4's 枚举行 per `options`
|
|
292
|
+
* entry in prompt.ts) without breaking block boundaries. */
|
|
293
|
+
export function serializeReqMarkdown(areas) {
|
|
294
|
+
const outBlocks = areas.map(({ headerLines, features }) => {
|
|
295
|
+
if (features.length === 0) return headerLines.join("\n");
|
|
296
|
+
const featureEntries = features.map(
|
|
297
|
+
(feature) => `${feature.title}\n${feature.body}`,
|
|
298
|
+
);
|
|
299
|
+
return `${headerLines.join("\n")}\n\n\`\`\`\n${featureEntries.join("\n\n")}\n\`\`\``;
|
|
300
|
+
});
|
|
301
|
+
return `${outBlocks.join("\n\n")}\n`;
|
|
302
|
+
}
|
|
303
|
+
/** Render the complete, deterministic draft directly as Area-blocked
|
|
304
|
+
* Markdown — the req.md counterpart of renderReqDraft. */
|
|
305
|
+
export function renderReqMarkdown(reqModel, graph) {
|
|
306
|
+
assertSameRun(reqModel, graph);
|
|
307
|
+
return serializeReqMarkdown(
|
|
308
|
+
reqModel.areas.map((area) => buildAreaContent(area, graph)),
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
// ============================================================================
|
|
312
|
+
// Plain-text per-Area format (req-{idx}.txt)
|
|
313
|
+
// ============================================================================
|
|
314
|
+
/** Build per-Area content for plain-text output:
|
|
315
|
+
* - Access path inlined into each Feature's title
|
|
316
|
+
* - Area description discarded
|
|
317
|
+
* - Preconditions kept as a header line (no markdown syntax) */
|
|
318
|
+
export function buildAreaContentTxt(area, graph) {
|
|
319
|
+
const areaName = resolvedName(area.displayName, "Area 名称待确认");
|
|
320
|
+
const accessPath = renderedPath(area, graph);
|
|
321
|
+
const headerLines = [];
|
|
322
|
+
if (area.preconditions.length > 0) {
|
|
323
|
+
headerLines.push(
|
|
324
|
+
`前置条件:${area.preconditions
|
|
325
|
+
.map((item) => oneLine(item.text))
|
|
326
|
+
.join(";")}`,
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
const features = area.features.map((feature) => ({
|
|
330
|
+
title: `${accessPath} - ${areaName} - ${resolvedName(feature.displayName, "控件名称待确认")}`,
|
|
331
|
+
body: featureDescription(feature),
|
|
332
|
+
}));
|
|
333
|
+
return { headerLines, features };
|
|
334
|
+
}
|
|
335
|
+
/** Serialize one Area's content as plain text (no markdown fences, no
|
|
336
|
+
* "访问路径:" prefix, no "区域说明:" line). */
|
|
337
|
+
export function serializeReqTxtAreaContent(content) {
|
|
338
|
+
const lines = [...content.headerLines];
|
|
339
|
+
for (const feature of content.features) {
|
|
340
|
+
if (lines.length > 0) lines.push("");
|
|
341
|
+
lines.push(feature.title, feature.body);
|
|
342
|
+
}
|
|
343
|
+
return `${lines.join("\n")}\n`;
|
|
344
|
+
}
|
|
345
|
+
/** Render one Area as plain text. */
|
|
346
|
+
export function renderReqTxtArea(area, graph) {
|
|
347
|
+
return serializeReqTxtAreaContent(buildAreaContentTxt(area, graph));
|
|
348
|
+
}
|
|
349
|
+
/** Render all Areas, returning one plain-text string per Area. */
|
|
350
|
+
export function renderAllReqTxt(reqModel, graph) {
|
|
351
|
+
assertSameRun(reqModel, graph);
|
|
352
|
+
return reqModel.areas.map((area) => renderReqTxtArea(area, graph));
|
|
353
|
+
}
|