android2harmony 0.1.7 → 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.
Files changed (226) hide show
  1. package/agents/api-analyzer.md +113 -0
  2. package/agents/app-action.md +122 -0
  3. package/agents/code-reviewer.md +191 -295
  4. package/agents/coder.md +377 -0
  5. package/agents/self-tester.md +8 -8
  6. package/agents/spec-designer.md +56 -0
  7. package/package.json +1 -1
  8. package/skills/a2h-app-req-gen/SKILL.md +174 -0
  9. package/skills/a2h-app-req-gen/references/spec-handoff.md +99 -0
  10. package/skills/a2h-app-req-gen/references/subagent-render.md +115 -0
  11. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/build.gradle.kts +41 -0
  12. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradle/wrapper/gradle-wrapper.jar +0 -0
  13. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradle/wrapper/gradle-wrapper.properties +8 -0
  14. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradle.properties +3 -0
  15. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradlew +251 -0
  16. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/gradlew.bat +94 -0
  17. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/settings.gradle.kts +17 -0
  18. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawAnalysisDetector.java +1911 -0
  19. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawIssueRegistry.java +37 -0
  20. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawJson.java +146 -0
  21. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawLocation.java +96 -0
  22. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/java/dev/reqgen/analyzer/jvm/RawRecordWriter.java +227 -0
  23. 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
  24. package/skills/a2h-app-req-gen/scripts/reqgen/analyzer-jvm/src/main/resources/dev/reqgen/analyzer/jvm/raw-record-v1.schema.json +93 -0
  25. package/skills/a2h-app-req-gen/scripts/reqgen/assets/dashboard.html +151 -0
  26. package/skills/a2h-app-req-gen/scripts/reqgen/gradle/reqgen-lint.init.gradle +60 -0
  27. package/skills/a2h-app-req-gen/scripts/reqgen/gradle/reqgen-model.init.gradle +204 -0
  28. package/skills/a2h-app-req-gen/scripts/reqgen/package.json +14 -0
  29. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/backend.js +323 -0
  30. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/cli.js +811 -0
  31. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/gap-audit-link.js +62 -0
  32. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/index.js +66 -0
  33. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/merge.js +605 -0
  34. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/name-trace.js +153 -0
  35. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/orchestrate.js +1324 -0
  36. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/output-parse.js +50 -0
  37. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/overview.js +10 -0
  38. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/pool.js +23 -0
  39. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/post-merge-fix.js +146 -0
  40. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/prompt-loader.js +51 -0
  41. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/prompt.js +967 -0
  42. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/prompts.md +301 -0
  43. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/serve.js +78 -0
  44. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/short-id.js +46 -0
  45. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/snapshot.js +267 -0
  46. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/types.js +1 -0
  47. package/skills/a2h-app-req-gen/scripts/reqgen/src/agent-render/validate.js +122 -0
  48. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/callback-call-sites.js +62 -0
  49. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/gap-audit/build.js +1291 -0
  50. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/gap-audit/index.js +1 -0
  51. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/area-ownership.js +392 -0
  52. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/build.js +1995 -0
  53. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/callback-flow.js +277 -0
  54. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/component-variants.js +725 -0
  55. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/graph/index.js +15 -0
  56. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/names/index.js +12 -0
  57. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/names/policy.js +469 -0
  58. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/names/traceability.js +468 -0
  59. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/req-model/build.js +1066 -0
  60. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/req-model/index.js +1 -0
  61. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/android-interaction-registry.js +174 -0
  62. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/android.js +1062 -0
  63. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/area-titles.js +678 -0
  64. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/builder.js +350 -0
  65. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/compose-api-registry.js +395 -0
  66. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/compose-call-sites.js +2008 -0
  67. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/compose.js +9059 -0
  68. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/dynamic-repeated-call-sites.js +529 -0
  69. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/index.js +1 -0
  70. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/interaction-effects.js +1149 -0
  71. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/jvm.js +6272 -0
  72. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/normalize.js +33 -0
  73. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/pending-intents.js +565 -0
  74. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/resource-id.js +42 -0
  75. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/route-state-variants.js +781 -0
  76. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/state.js +234 -0
  77. package/skills/a2h-app-req-gen/scripts/reqgen/src/analysis/source-facts/types.js +1 -0
  78. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/extract.js +40 -0
  79. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/index.js +6 -0
  80. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/manifest.js +513 -0
  81. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/resources.js +398 -0
  82. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/types.js +1 -0
  83. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/views.js +447 -0
  84. package/skills/a2h-app-req-gen/scripts/reqgen/src/android/xml-parser.js +175 -0
  85. package/skills/a2h-app-req-gen/scripts/reqgen/src/cli.js +398 -0
  86. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/area-graph.js +1 -0
  87. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/artifact.js +1 -0
  88. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/common.js +16 -0
  89. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/diagnostic.js +10 -0
  90. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/gap-audit.js +14 -0
  91. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/index.js +11 -0
  92. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/name-traceability.js +26 -0
  93. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/raw-fact.js +40 -0
  94. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/req-model.js +1 -0
  95. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/run.js +19 -0
  96. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/semantic-completeness.js +11 -0
  97. package/skills/a2h-app-req-gen/scripts/reqgen/src/contracts/source-facts.js +1 -0
  98. package/skills/a2h-app-req-gen/scripts/reqgen/src/core/output-guard.js +41 -0
  99. package/skills/a2h-app-req-gen/scripts/reqgen/src/core/stable-id.js +92 -0
  100. package/skills/a2h-app-req-gen/scripts/reqgen/src/dashboard-cli.js +169 -0
  101. package/skills/a2h-app-req-gen/scripts/reqgen/src/diagnostics.js +104 -0
  102. package/skills/a2h-app-req-gen/scripts/reqgen/src/dump/dump.js +1028 -0
  103. package/skills/a2h-app-req-gen/scripts/reqgen/src/dump/index.js +1 -0
  104. package/skills/a2h-app-req-gen/scripts/reqgen/src/dump-cli.js +251 -0
  105. package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/artifacts.js +49 -0
  106. package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/index.js +18 -0
  107. package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/quality-report.js +125 -0
  108. package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/render.js +353 -0
  109. package/skills/a2h-app-req-gen/scripts/reqgen/src/generation/types.js +2 -0
  110. package/skills/a2h-app-req-gen/scripts/reqgen/src/graph/paths.js +474 -0
  111. package/skills/a2h-app-req-gen/scripts/reqgen/src/jvm/index.js +15 -0
  112. package/skills/a2h-app-req-gen/scripts/reqgen/src/jvm/protocol.js +408 -0
  113. package/skills/a2h-app-req-gen/scripts/reqgen/src/jvm/runner.js +452 -0
  114. package/skills/a2h-app-req-gen/scripts/reqgen/src/pipeline/index.js +8 -0
  115. package/skills/a2h-app-req-gen/scripts/reqgen/src/pipeline/output.js +165 -0
  116. package/skills/a2h-app-req-gen/scripts/reqgen/src/pipeline/run-stage1.js +891 -0
  117. package/skills/a2h-app-req-gen/scripts/reqgen/src/project/discovery.js +299 -0
  118. package/skills/a2h-app-req-gen/scripts/reqgen/src/project/gradle-model.js +358 -0
  119. package/skills/a2h-app-req-gen/scripts/reqgen/src/project/gradle-runner.js +165 -0
  120. package/skills/a2h-app-req-gen/scripts/reqgen/src/project/resource-profile.js +60 -0
  121. package/skills/a2h-app-req-gen/scripts/reqgen/src/project/types.js +1 -0
  122. package/skills/a2h-app-req-gen/scripts/reqgen/src/spec-handoff-cli.js +151 -0
  123. package/skills/a2h-app-req-gen/scripts/reqgen/src/spec-handoff.js +1004 -0
  124. package/skills/a2h-app-req-gen/scripts/reqgen/src/stage2-cli.js +109 -0
  125. package/skills/a2h-app-req-gen/scripts/reqgen/src/stage2-input.js +419 -0
  126. package/skills/a2h-app-req-gen/scripts/reqgen/src/stage2-name-trace-input.js +95 -0
  127. package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/area-graph.js +444 -0
  128. package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/index.js +7 -0
  129. package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/req-model.js +580 -0
  130. package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/req-text.js +195 -0
  131. package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/semantic-area-graph.js +1431 -0
  132. package/skills/a2h-app-req-gen/scripts/reqgen/src/validation/types.js +1 -0
  133. package/skills/a2h-app-req-gen/scripts/reqgen-audit.mjs +298 -0
  134. package/skills/a2h-app-req-gen/scripts/reqgen-selfcheck.mjs +555 -0
  135. package/skills/a2h-code-review/SKILL.md +379 -0
  136. package/skills/{hmos-integration-test → a2h-integration-test}/README.md +6 -6
  137. package/skills/{hmos-integration-test → a2h-integration-test}/SKILL.md +6 -6
  138. package/skills/{hmos-integration-test → a2h-integration-test}/scripts/report-tool.mjs +1 -1
  139. package/skills/a2h-spec-design/SKILL.md +330 -0
  140. package/skills/a2h-spec-design/scripts/inspect_spec_design_inputs.mjs +207 -0
  141. package/skills/a2h-spec-design/scripts/move_spec_technical_reference.mjs +198 -0
  142. package/skills/a2h-spec-design/scripts/validate_spec_design_output.mjs +256 -0
  143. package/skills/a2h-spec-generate/SKILL.md +696 -0
  144. package/skills/a2h-spec-generate/references/trace-template.md +115 -0
  145. package/skills/a2h-spec-generate/scripts/parse_requirements.mjs +537 -0
  146. package/skills/a2h-spec-generate/template/REQ.txt +22 -0
  147. package/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
  148. package/skills/a2h-spec-implement/SKILL.md +548 -0
  149. package/skills/a2h-spec-implement/references/harmony-pitfalls.md +186 -0
  150. package/skills/a2h-spec-implement/references/l1-unit-test.md +185 -0
  151. package/skills/a2h-spec-implement/references/l3-e2e-uitest.md +167 -0
  152. package/skills/a2h-spec-implement/references/test-core.md +132 -0
  153. package/skills/a2h-spec-implement/rules/arkts/arkts-standards.md +184 -0
  154. package/skills/a2h-spec-implement/rules/arkts/conventions/coding-style.md +96 -0
  155. package/skills/a2h-spec-implement/rules/arkts/conventions/security.md +126 -0
  156. package/skills/a2h-spec-implement/rules/arkts/language/arkts-rules.md +650 -0
  157. package/skills/a2h-spec-implement/rules/arkts/language/arkui-structure-rules.md +173 -0
  158. package/skills/a2h-spec-implement/rules/arkts/language/ts-to-arkts-rewrites.md +58 -0
  159. 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
  160. 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
  161. 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
  162. 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
  163. 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
  164. 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
  165. 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
  166. 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
  167. 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
  168. 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
  169. 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
  170. 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
  171. 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
  172. 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
  173. 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
  174. 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
  175. 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
  176. 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
  177. 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
  178. 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
  179. 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
  180. 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
  181. 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
  182. 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
  183. 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
  184. 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
  185. 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
  186. 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
  187. 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
  188. 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
  189. package/skills/a2h-spec-implement/rules/arkts/ui/component-cookbook.md +431 -0
  190. package/skills/a2h-spec-implement/rules/arkts/ui/state-management.md +152 -0
  191. package/skills/a2h-spec-implement/rules/arkts/ui/ui-quality.md +67 -0
  192. package/skills/a2h-spec-implement/rules/arkts/ui/ui-runtime-diagnosis.md +32 -0
  193. package/skills/a2h-spec-implement/rules/pipeline/build/package-set-collection.md +43 -0
  194. package/skills/a2h-spec-implement/scripts/_lib/common.mjs +97 -0
  195. package/skills/a2h-spec-implement/scripts/_lib/config.mjs +70 -0
  196. package/skills/a2h-spec-implement/scripts/_lib/lessons_cli.mjs +48 -0
  197. package/skills/a2h-spec-implement/scripts/build_lessons.mjs +24 -0
  198. package/skills/a2h-spec-implement/scripts/code_pattern_lessons.mjs +26 -0
  199. package/skills/a2h-spec-implement/scripts/device_ui.mjs +433 -0
  200. package/skills/a2h-spec-implement/scripts/device_ui_core.mjs +895 -0
  201. package/skills/a2h-spec-implement/scripts/ledger/aggregate_run.mjs +207 -0
  202. package/skills/a2h-spec-implement/scripts/manifest/emit_summary_line.mjs +37 -0
  203. package/skills/a2h-spec-implement/scripts/manifest/finalize_run.mjs +115 -0
  204. package/skills/a2h-spec-implement/scripts/manifest/render_final_summary.mjs +78 -0
  205. package/skills/a2h-spec-implement/scripts/manifest/root_mirror.mjs +137 -0
  206. package/skills/a2h-spec-implement/scripts/package.json +12 -0
  207. package/skills/a2h-spec-implement/scripts/state_propagation_check.mjs +676 -0
  208. package/skills/a2h-spec-implement/scripts/test/l2_run.mjs +244 -0
  209. package/skills/a2h-spec-implement/scripts/test/tp_coverage.mjs +231 -0
  210. package/skills/a2h-spec-implement/scripts/ui_memory.mjs +161 -0
  211. package/skills/a2h-spec-implement/scripts/utils/ensure_app.mjs +134 -0
  212. package/skills/a2h-ui-transfer/SKILL.md +2 -2
  213. package/skills/hmos-convert-pipeline/SKILL.md +7 -5
  214. package/skills/hmos-incremental-ui-align/README.md +7 -7
  215. package/skills/hmos-incremental-ui-align/SKILL.md +1 -1
  216. package/skills/hmos-incremental-ui-align/page_align.md +1 -1
  217. package/skills/hmos-spec-generate/SKILL.md +2 -2
  218. package/skills/hmos-spec-generate/scripts/parse_requirements.mjs +537 -0
  219. package/skills/hmos-fix-build-errors/SKILL.md +0 -266
  220. package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +0 -219
  221. package/skills/hmos-fix-build-errors/references/known-patterns.md +0 -157
  222. package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +0 -131
  223. package/skills/hmos-spec-generate/scripts/parse_requirements.ts +0 -515
  224. /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/resolve-metadata-tool.mjs +0 -0
  225. /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/self-test-runner.mjs +0 -0
  226. /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/testcases-tool.mjs +0 -0
@@ -0,0 +1,151 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>reqgen render-ai 进度看板</title>
6
+ <style>
7
+ body { font-family: -apple-system, "Segoe UI", sans-serif; margin: 2rem; color: #1a1a1a; }
8
+ h1 { font-size: 1.2rem; }
9
+ .summary { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
10
+ .summary div { padding: 0.5rem 1rem; border-radius: 6px; background: #f0f0f0; }
11
+ table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
12
+ th, td { border-bottom: 1px solid #ddd; padding: 0.4rem 0.6rem; text-align: left; }
13
+ th { background: #fafafa; }
14
+ .status-ok { color: #1a7f37; }
15
+ .status-error { color: #c62828; }
16
+ .status-running { color: #9a6700; }
17
+ .status-retrying { color: #b35c00; }
18
+ .kind-normal { color: #57606a; }
19
+ .kind-unreachable { color: #9a3412; font-weight: 600; }
20
+ #paths-meta { color: #666; font-size: 0.8rem; margin-bottom: 0.15rem; }
21
+ #meta { color: #666; font-size: 0.8rem; margin-bottom: 0.3rem; }
22
+ #updated { color: #666; font-size: 0.8rem; }
23
+ </style>
24
+ </head>
25
+ <body>
26
+ <h1>reqgen render-ai 进度看板</h1>
27
+ <div id="paths-meta"></div>
28
+ <div id="meta"></div>
29
+ <div id="updated">尚未加载</div>
30
+ <div class="summary" id="summary"></div>
31
+ <table>
32
+ <thead><tr><th>ID</th><th>类型</th><th>状态</th><th>尝试次数</th><th>耗时</th></tr></thead>
33
+ <tbody id="rows"></tbody>
34
+ </table>
35
+ <script>
36
+ if (location.protocol === "file:") {
37
+ document.getElementById("updated").textContent =
38
+ "此页面是通过 file:// 直接打开的——浏览器会无条件阻止 fetch() 读取本地文件," +
39
+ "不管 status.ndjson 是否在同一目录下都无法读取。请运行 pnpm dashboard " +
40
+ "(或 node src/dashboard-cli.js)启动本地服务并打开此页面。";
41
+ }
42
+
43
+ function formatDuration(ms) {
44
+ return (ms / 1000).toFixed(1) + "s";
45
+ }
46
+
47
+ async function poll() {
48
+ if (location.protocol === "file:") return;
49
+ let text;
50
+ try {
51
+ text = await (await fetch("status.ndjson", { cache: "no-store" })).text();
52
+ } catch (error) {
53
+ document.getElementById("updated").textContent = "读取 status.ndjson 失败: " + error.message;
54
+ return;
55
+ }
56
+ const events = text.split("\n").filter(Boolean).map((line) => { try { return JSON.parse(line); } catch { return null; } }).filter(Boolean);
57
+ const now = Date.now();
58
+ let total = null;
59
+ let mode = null;
60
+ let perFeature = null;
61
+ let projectRoot = null;
62
+ let inputDirectory = null;
63
+ let outputDirectory = null;
64
+ let overviewEvent = null;
65
+ let retryCount = 0;
66
+ const byRequirement = new Map();
67
+ for (const event of events) {
68
+ if (event.phase === "plan") {
69
+ total = event.total;
70
+ mode = event.mode ?? null;
71
+ perFeature = event.perFeature ?? null;
72
+ projectRoot = event.projectRoot ?? null;
73
+ inputDirectory = event.inputDirectory ?? null;
74
+ outputDirectory = event.outputDirectory ?? null;
75
+ continue;
76
+ }
77
+ if (event.phase === "retry-scheduled") { retryCount++; }
78
+ if (event.phase === "overview") { overviewEvent = event; continue; }
79
+ const id = "requirementId" in event ? event.requirementId : event.areaId;
80
+ const entry = byRequirement.get(id) ?? { id, firstStart: null, attempt: 1, state: "running", kind: "normal" };
81
+ if (event.phase === "start") {
82
+ if (entry.firstStart == null) entry.firstStart = event.timestamp;
83
+ entry.attempt = event.attempt;
84
+ entry.state = "running";
85
+ entry.retryAt = null;
86
+ if (event.kind) entry.kind = event.kind;
87
+ } else if (event.phase === "retry-scheduled") {
88
+ entry.state = "retrying";
89
+ entry.attempt = event.attempt;
90
+ entry.retryAt = event.retryAt;
91
+ entry.reason = event.reason;
92
+ } else if (event.phase === "finish") {
93
+ entry.state = "done";
94
+ entry.status = event.status;
95
+ entry.finishedAt = event.timestamp;
96
+ }
97
+ byRequirement.set(id, entry);
98
+ }
99
+ const rows = [...byRequirement.values()];
100
+ const launchLabel = mode === "shell" ? "shell(统一自检协议)"
101
+ : mode === "shell-legacy" ? "shell-legacy(内联 prompt 协议)"
102
+ : mode === "subagent" ? "subagent(Task 子任务派发)"
103
+ : mode ?? "未知";
104
+ const renderLabel = perFeature === true ? "per-feature(每个 Feature 一个会话)"
105
+ : perFeature === false ? "per-area(每个 Area 一个会话)"
106
+ : "未知";
107
+ document.getElementById("paths-meta").textContent =
108
+ "安卓项目路径: " + (projectRoot ?? "未知") +
109
+ " | 输入路径: " + (inputDirectory ?? "未知") +
110
+ " | 输出路径: " + (outputDirectory ?? "未知");
111
+ document.getElementById("meta").textContent = "启动模式:" + launchLabel + " | 渲染粒度:" + renderLabel;
112
+
113
+ const done = rows.filter((row) => row.state === "done");
114
+ const ok = done.filter((row) => row.status === "ok").length;
115
+ const error = done.filter((row) => row.status !== "ok").length;
116
+ const totalCount = total ?? rows.length;
117
+ const running = totalCount - done.length;
118
+ document.getElementById("summary").innerHTML =
119
+ "<div>总计 " + totalCount + "</div><div class=\"status-ok\">成功 " + ok + "</div><div class=\"status-error\">失败/兜底 " + error + "</div><div class=\"status-running\">进行中 " + running + "</div>";
120
+ document.getElementById("rows").innerHTML = rows.map((row) => {
121
+ let cls, label;
122
+ if (row.state === "done") {
123
+ cls = row.status === "ok" ? "ok" : "error";
124
+ label = row.status === "ok" ? "成功" : ("失败/兜底 (" + row.status + ")");
125
+ } else if (row.state === "retrying") {
126
+ cls = "retrying";
127
+ const secondsLeft = Math.max(0, Math.ceil((row.retryAt - now) / 1000));
128
+ label = "在 " + secondsLeft + "s 后重试(原因:" + row.reason + ")";
129
+ } else {
130
+ cls = "running";
131
+ label = "运行中";
132
+ }
133
+ const duration = row.finishedAt ? formatDuration(row.finishedAt - row.firstStart) : "";
134
+ const kindLabel = row.kind === "unreachable" ? "不可达兜底" : "普通";
135
+ return "<tr><td>" + row.id + "</td><td class=\"kind-" + row.kind + "\">" + kindLabel + "</td><td class=\"status-" + cls + "\">" + label + "</td><td>" + row.attempt + "</td><td>" + duration + "</td></tr>";
136
+ }).join("") + (overviewEvent ? (
137
+ "<tr style=\"border-top:2px solid #999\"><td>overview</td><td>审计概览</td>" +
138
+ "<td class=\"status-" + (overviewEvent.status === "ok" ? "ok" : "error") + "\">" +
139
+ (overviewEvent.status === "ok" ? "通过" : (overviewEvent.issues + " 个问题")) +
140
+ " " + (overviewEvent.unquotedUiText || 0) + " / " + (overviewEvent.quotedCodeIdent || 0) + " / " + (overviewEvent.formatIssues || 0) +
141
+ "</td><td>" + (overviewEvent.attempt || 1) + "</td><td>" +
142
+ (overviewEvent.durationMs ? (overviewEvent.durationMs / 1000).toFixed(1) + "s" : "") +
143
+ "</td></tr>"
144
+ ) : "");
145
+ document.getElementById("updated").textContent = "最后更新: " + new Date().toLocaleTimeString();
146
+ }
147
+ poll();
148
+ setInterval(poll, 1500);
149
+ </script>
150
+ </body>
151
+ </html>
@@ -0,0 +1,60 @@
1
+ def reqgenLintJar = System.getProperty("reqgen.lint.jar")
2
+ def reqgenApplicationModule = System.getProperty(
3
+ "reqgen.application.module"
4
+ )
5
+ def reqgenLintTask = System.getProperty("reqgen.lint.task")
6
+
7
+ if (reqgenLintJar == null || reqgenLintJar.trim().isEmpty()) {
8
+ throw new GradleException(
9
+ "Missing -Dreqgen.lint.jar=<absolute-jar-path>"
10
+ )
11
+ }
12
+ if (
13
+ reqgenApplicationModule == null ||
14
+ reqgenApplicationModule.trim().isEmpty()
15
+ ) {
16
+ throw new GradleException(
17
+ "Missing -Dreqgen.application.module=<gradle-project-path>"
18
+ )
19
+ }
20
+ if (reqgenLintTask == null || reqgenLintTask.trim().isEmpty()) {
21
+ throw new GradleException(
22
+ "Missing -Dreqgen.lint.task=<absolute-gradle-task-path>"
23
+ )
24
+ }
25
+
26
+ gradle.projectsLoaded {
27
+ gradle.rootProject.allprojects { candidate ->
28
+ candidate.tasks.configureEach { task ->
29
+ if (task.path == reqgenLintTask.trim()) {
30
+ // The NDJSON path is external to the Android Lint task's
31
+ // declared outputs. Force only this exact task to execute so
32
+ // it writes the current run, while its compilation
33
+ // dependencies remain eligible for Gradle reuse.
34
+ task.outputs.upToDateWhen { false }
35
+ task.outputs.cacheIf { false }
36
+ }
37
+ }
38
+
39
+ def attachReqgenLint = {
40
+ if (candidate.path == reqgenApplicationModule.trim()) {
41
+ candidate.dependencies.add(
42
+ "lintChecks",
43
+ candidate.files(reqgenLintJar)
44
+ )
45
+ }
46
+ }
47
+
48
+ candidate.plugins.withId("com.android.application") {
49
+ attachReqgenLint()
50
+ }
51
+
52
+ candidate.plugins.withId("com.android.library") {
53
+ attachReqgenLint()
54
+ }
55
+
56
+ candidate.plugins.withId("com.android.dynamic-feature") {
57
+ attachReqgenLint()
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,204 @@
1
+ import groovy.json.JsonOutput
2
+
3
+ def reqgenModules = []
4
+
5
+ // Registers variant collection using the AGP 7+ Variant API
6
+ // (androidComponents.onVariants). AGP 9 removed the legacy
7
+ // applicationVariants/libraryVariants accessors, so the old path is kept
8
+ // only as a fallback for older AGP versions.
9
+ def registerVariants = { candidate, module, boolean isApplication ->
10
+ def android = candidate.extensions.findByName("android")
11
+ def androidComponents = candidate.extensions.findByName("androidComponents")
12
+ if (androidComponents != null) {
13
+ androidComponents.onVariants(androidComponents.selector().all()) { variant ->
14
+ def entry = [
15
+ name: variant.name,
16
+ buildType: variant.buildType?.toString(),
17
+ productFlavors: variant.productFlavors.collect { pair ->
18
+ [name: pair.first?.toString(), dimension: pair.second?.toString()]
19
+ }
20
+ ]
21
+ if (isApplication) {
22
+ try {
23
+ entry.applicationId = variant.applicationId.orNull?.toString()
24
+ } catch (ignored) {
25
+ entry.applicationId = null
26
+ }
27
+ }
28
+ module.variants << entry
29
+ }
30
+ return
31
+ }
32
+ if (isApplication) {
33
+ android.applicationVariants.all { variant ->
34
+ module.variants << [
35
+ name: variant.name,
36
+ buildType: variant.buildType.name,
37
+ productFlavors: variant.productFlavors.collect {
38
+ [name: it.name, dimension: it.dimension]
39
+ },
40
+ applicationId: variant.applicationId
41
+ ]
42
+ }
43
+ } else {
44
+ android.libraryVariants.all { variant ->
45
+ module.variants << [
46
+ name: variant.name,
47
+ buildType: variant.buildType.name,
48
+ productFlavors: variant.productFlavors.collect {
49
+ [name: it.name, dimension: it.dimension]
50
+ }
51
+ ]
52
+ }
53
+ }
54
+ }
55
+
56
+ def registerSourceSets = { candidate, module ->
57
+ def android = candidate.extensions.findByName("android")
58
+ android.sourceSets.all { sourceSet ->
59
+ module.sourceSets << [
60
+ name: sourceSet.name,
61
+ java: sourceSet.java.srcDirs.collect { it.absolutePath }.sort(),
62
+ res: sourceSet.res.srcDirs.collect { it.absolutePath }.sort(),
63
+ manifest: sourceSet.manifest.srcFile.absolutePath
64
+ ]
65
+ }
66
+ }
67
+
68
+ allprojects { candidate ->
69
+ candidate.plugins.withId("com.android.application") {
70
+ def module = [
71
+ gradlePath: candidate.path,
72
+ directory: candidate.projectDir.absolutePath,
73
+ buildFile: candidate.buildFile.absolutePath,
74
+ kind: "application",
75
+ namespace: null,
76
+ variants: [],
77
+ sourceSets: [],
78
+ localProjectDependencies: []
79
+ ]
80
+ registerVariants(candidate, module, true)
81
+ registerSourceSets(candidate, module)
82
+ reqgenModules << module
83
+ }
84
+ candidate.plugins.withId("com.android.library") {
85
+ def module = [
86
+ gradlePath: candidate.path,
87
+ directory: candidate.projectDir.absolutePath,
88
+ buildFile: candidate.buildFile.absolutePath,
89
+ kind: "library",
90
+ namespace: null,
91
+ variants: [],
92
+ sourceSets: [],
93
+ localProjectDependencies: []
94
+ ]
95
+ registerVariants(candidate, module, false)
96
+ registerSourceSets(candidate, module)
97
+ reqgenModules << module
98
+ }
99
+ // A local dependency may be a plain JVM library (no Android Gradle
100
+ // Plugin) — for example a vendored API client shared with non-Android
101
+ // consumers. It contributes no Manifest/resources/variants, so it is
102
+ // registered only so the dependency closure walk in gradle-model.ts
103
+ // finds it (LOCAL_MODULE_MISSING) instead of hard-failing; its source is
104
+ // deliberately not fed into JVM analysis (no lintAnalyze task exists for
105
+ // it — see reqgen-lint.init.gradle).
106
+ candidate.plugins.withId("java") {
107
+ if (
108
+ !candidate.plugins.hasPlugin("com.android.application") &&
109
+ !candidate.plugins.hasPlugin("com.android.library")
110
+ ) {
111
+ reqgenModules << [
112
+ gradlePath: candidate.path,
113
+ directory: candidate.projectDir.absolutePath,
114
+ buildFile: candidate.buildFile.absolutePath,
115
+ kind: "non-android-library",
116
+ namespace: null,
117
+ variants: [],
118
+ sourceSets: [],
119
+ localProjectDependencies: []
120
+ ]
121
+ }
122
+ }
123
+ }
124
+
125
+ gradle.projectsEvaluated {
126
+ // A local project dependency may carry no recognizable plugin at all —
127
+ // for example a vendored prebuilt .aar exposed only via
128
+ // `artifacts.add(...)` (no source, no compileJava task possible; see
129
+ // docs/glossary.md "非Android本地模块依赖", which already defines this
130
+ // kind as "未应用 com.android.application / com.android.library 插件").
131
+ // Evaluated here (not in the allprojects{} block above) because plugin
132
+ // application is only guaranteed complete once all projects have been
133
+ // evaluated. Checked against the three recognized plugin ids rather than
134
+ // `plugins.isEmpty()` — Gradle auto-applies HelpTasksPlugin to every
135
+ // project internally, so the plugin set is never truly empty. Treated
136
+ // the same as the java-plugin non-android-library case: present but
137
+ // contributing no source facts, so the dependency closure walk in
138
+ // gradle-model.ts finds it instead of hard-failing on
139
+ // LOCAL_MODULE_MISSING.
140
+ def knownPaths = reqgenModules.collect { it.gradlePath } as Set
141
+ rootProject.allprojects.each { candidate ->
142
+ if (
143
+ candidate != rootProject &&
144
+ !candidate.plugins.hasPlugin("com.android.application") &&
145
+ !candidate.plugins.hasPlugin("com.android.library") &&
146
+ !candidate.plugins.hasPlugin("java") &&
147
+ !knownPaths.contains(candidate.path)
148
+ ) {
149
+ reqgenModules << [
150
+ gradlePath: candidate.path,
151
+ directory: candidate.projectDir.absolutePath,
152
+ buildFile: candidate.buildFile.absolutePath,
153
+ kind: "non-android-library",
154
+ namespace: null,
155
+ variants: [],
156
+ sourceSets: [],
157
+ localProjectDependencies: []
158
+ ]
159
+ }
160
+ }
161
+
162
+ rootProject.tasks.register("reqgenProjectModel") {
163
+ group = "reqgen"
164
+ description = "Writes the Android module and variant model used by reqgen."
165
+ doLast {
166
+ def output = System.getProperty("reqgen.model.output")
167
+ if (output == null || output.trim().isEmpty()) {
168
+ throw new GradleException(
169
+ "Missing -Dreqgen.model.output=<absolute-json-path>"
170
+ )
171
+ }
172
+ def normalized = reqgenModules.collect { module ->
173
+ def moduleProject = rootProject.findProject(module.gradlePath)
174
+ def android = moduleProject.extensions.findByName("android")
175
+ try {
176
+ module.namespace = android?.namespace?.toString()
177
+ } catch (ignored) {
178
+ module.namespace = null
179
+ }
180
+ module.localProjectDependencies = moduleProject.configurations
181
+ .collectMany { configuration ->
182
+ configuration.dependencies.findAll { dependency ->
183
+ dependency.hasProperty("dependencyProject") &&
184
+ dependency.dependencyProject.path != moduleProject.path
185
+ }.collect { dependency ->
186
+ dependency.dependencyProject.path
187
+ }
188
+ }
189
+ .unique()
190
+ .sort()
191
+ module.variants = module.variants.sort { it.name }
192
+ module.sourceSets = module.sourceSets.sort { it.name }
193
+ module
194
+ }.sort { it.gradlePath }
195
+ def target = file(output)
196
+ target.parentFile.mkdirs()
197
+ target.text = JsonOutput.prettyPrint(JsonOutput.toJson([
198
+ schemaVersion: "1.0.0",
199
+ projectRoot: rootProject.projectDir.absolutePath,
200
+ modules: normalized
201
+ ])) + System.lineSeparator()
202
+ }
203
+ }
204
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "a2h-app-req-gen-runtime",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "packageManager": "pnpm@10.17.0",
7
+ "scripts": {
8
+ "stage1": "node src/cli.js stage1",
9
+ "stage2": "node src/stage2-cli.js",
10
+ "spec-handoff": "node src/spec-handoff-cli.js",
11
+ "dashboard": "node src/dashboard-cli.js",
12
+ "dump": "node src/dump-cli.js"
13
+ }
14
+ }