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.
Files changed (227) 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 +20 -9
  213. package/skills/a2h-ui-transfer/scripts/arkts_static_check.js +80 -0
  214. package/skills/hmos-convert-pipeline/SKILL.md +7 -5
  215. package/skills/hmos-incremental-ui-align/README.md +7 -7
  216. package/skills/hmos-incremental-ui-align/SKILL.md +1 -1
  217. package/skills/hmos-incremental-ui-align/page_align.md +1 -1
  218. package/skills/hmos-spec-generate/SKILL.md +2 -2
  219. package/skills/hmos-spec-generate/scripts/parse_requirements.mjs +537 -0
  220. package/skills/hmos-fix-build-errors/SKILL.md +0 -266
  221. package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +0 -219
  222. package/skills/hmos-fix-build-errors/references/known-patterns.md +0 -157
  223. package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +0 -131
  224. package/skills/hmos-spec-generate/scripts/parse_requirements.ts +0 -515
  225. /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/resolve-metadata-tool.mjs +0 -0
  226. /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/self-test-runner.mjs +0 -0
  227. /package/skills/{hmos-integration-test → a2h-integration-test}/scripts/testcases-tool.mjs +0 -0
@@ -0,0 +1,37 @@
1
+ package dev.reqgen.analyzer.jvm;
2
+
3
+ import com.android.tools.lint.client.api.IssueRegistry;
4
+ import com.android.tools.lint.client.api.Vendor;
5
+ import com.android.tools.lint.detector.api.ApiKt;
6
+ import com.android.tools.lint.detector.api.Issue;
7
+ import java.util.List;
8
+ import org.jetbrains.annotations.NotNull;
9
+
10
+ public final class RawIssueRegistry extends IssueRegistry {
11
+ @Override
12
+ public int getApi() {
13
+ return ApiKt.CURRENT_API;
14
+ }
15
+
16
+ @Override
17
+ public int getMinApi() {
18
+ return 14;
19
+ }
20
+
21
+ @NotNull
22
+ @Override
23
+ public List<Issue> getIssues() {
24
+ return List.of(RawAnalysisDetector.ISSUE);
25
+ }
26
+
27
+ @NotNull
28
+ @Override
29
+ public Vendor getVendor() {
30
+ return new Vendor(
31
+ "Mobile App ReqGen",
32
+ "mobile-app-reqgen",
33
+ "https://github.com/openai/codex",
34
+ "openai"
35
+ );
36
+ }
37
+ }
@@ -0,0 +1,146 @@
1
+ package dev.reqgen.analyzer.jvm;
2
+
3
+ import java.lang.reflect.Array;
4
+ import java.util.ArrayList;
5
+ import java.util.LinkedHashMap;
6
+ import java.util.List;
7
+ import java.util.Map;
8
+
9
+ final class RawJson {
10
+ private RawJson() {
11
+ }
12
+
13
+ static Map<String, Object> object(Object... keysAndValues) {
14
+ if (keysAndValues.length % 2 != 0) {
15
+ throw new IllegalArgumentException("JSON object needs key/value pairs");
16
+ }
17
+ Map<String, Object> result = new LinkedHashMap<>();
18
+ for (int index = 0; index < keysAndValues.length; index += 2) {
19
+ Object key = keysAndValues[index];
20
+ if (!(key instanceof String stringKey)) {
21
+ throw new IllegalArgumentException("JSON object key must be a string");
22
+ }
23
+ result.put(stringKey, keysAndValues[index + 1]);
24
+ }
25
+ return result;
26
+ }
27
+
28
+ static List<Object> array(Object... values) {
29
+ List<Object> result = new ArrayList<>(values.length);
30
+ for (Object value : values) {
31
+ result.add(value);
32
+ }
33
+ return result;
34
+ }
35
+
36
+ static String encode(Object value) {
37
+ StringBuilder output = new StringBuilder();
38
+ append(output, value);
39
+ return output.toString();
40
+ }
41
+
42
+ private static void append(StringBuilder output, Object value) {
43
+ if (value == null) {
44
+ output.append("null");
45
+ return;
46
+ }
47
+ if (value instanceof String text) {
48
+ appendString(output, text);
49
+ return;
50
+ }
51
+ if (isNonFiniteNumber(value)) {
52
+ throw new IllegalArgumentException(
53
+ "JSON does not support non-finite numbers: " + value
54
+ );
55
+ }
56
+ if (value instanceof Boolean || value instanceof Number) {
57
+ output.append(value);
58
+ return;
59
+ }
60
+ if (value instanceof Enum<?> enumValue) {
61
+ appendString(output, enumValue.name());
62
+ return;
63
+ }
64
+ if (value instanceof Map<?, ?> map) {
65
+ output.append('{');
66
+ boolean first = true;
67
+ for (Map.Entry<?, ?> entry : map.entrySet()) {
68
+ if (!(entry.getKey() instanceof String key)) {
69
+ throw new IllegalArgumentException(
70
+ "JSON object key must be a string"
71
+ );
72
+ }
73
+ if (!first) {
74
+ output.append(',');
75
+ }
76
+ first = false;
77
+ appendString(output, key);
78
+ output.append(':');
79
+ append(output, entry.getValue());
80
+ }
81
+ output.append('}');
82
+ return;
83
+ }
84
+ if (value instanceof Iterable<?> iterable) {
85
+ output.append('[');
86
+ boolean first = true;
87
+ for (Object item : iterable) {
88
+ if (!first) {
89
+ output.append(',');
90
+ }
91
+ first = false;
92
+ append(output, item);
93
+ }
94
+ output.append(']');
95
+ return;
96
+ }
97
+ if (value.getClass().isArray()) {
98
+ output.append('[');
99
+ int length = Array.getLength(value);
100
+ for (int index = 0; index < length; index += 1) {
101
+ if (index > 0) {
102
+ output.append(',');
103
+ }
104
+ append(output, Array.get(value, index));
105
+ }
106
+ output.append(']');
107
+ return;
108
+ }
109
+ throw new IllegalArgumentException(
110
+ "Unsupported JSON value: " + value.getClass().getName()
111
+ );
112
+ }
113
+
114
+ static boolean isNonFiniteNumber(Object value) {
115
+ return (
116
+ value instanceof Double doubleValue &&
117
+ !Double.isFinite(doubleValue)
118
+ ) || (
119
+ value instanceof Float floatValue && !Float.isFinite(floatValue)
120
+ );
121
+ }
122
+
123
+ private static void appendString(StringBuilder output, String value) {
124
+ output.append('"');
125
+ for (int index = 0; index < value.length(); index += 1) {
126
+ char character = value.charAt(index);
127
+ switch (character) {
128
+ case '"' -> output.append("\\\"");
129
+ case '\\' -> output.append("\\\\");
130
+ case '\b' -> output.append("\\b");
131
+ case '\f' -> output.append("\\f");
132
+ case '\n' -> output.append("\\n");
133
+ case '\r' -> output.append("\\r");
134
+ case '\t' -> output.append("\\t");
135
+ default -> {
136
+ if (character < 0x20) {
137
+ output.append(String.format("\\u%04x", (int) character));
138
+ } else {
139
+ output.append(character);
140
+ }
141
+ }
142
+ }
143
+ }
144
+ output.append('"');
145
+ }
146
+ }
@@ -0,0 +1,96 @@
1
+ package dev.reqgen.analyzer.jvm;
2
+
3
+ import com.android.tools.lint.detector.api.Context;
4
+ import com.android.tools.lint.detector.api.Location;
5
+ import com.android.tools.lint.detector.api.Position;
6
+ import java.io.File;
7
+ import java.nio.file.Path;
8
+ import java.util.Map;
9
+
10
+ record RawLocation(
11
+ String path,
12
+ int startLine,
13
+ int startColumn,
14
+ int endLine,
15
+ int endColumn,
16
+ int startOffset,
17
+ int endOffset
18
+ ) {
19
+ static RawLocation from(Context context, Location location) {
20
+ Position start = location.getStart();
21
+ Position end = location.getEnd();
22
+ return new RawLocation(
23
+ relativePath(context),
24
+ oneBased(start == null ? -1 : start.getLine()),
25
+ oneBased(start == null ? -1 : start.getColumn()),
26
+ oneBased(end == null ? -1 : end.getLine()),
27
+ oneBased(end == null ? -1 : end.getColumn()),
28
+ start == null ? -1 : start.getOffset(),
29
+ end == null ? -1 : end.getOffset()
30
+ );
31
+ }
32
+
33
+ static RawLocation forFile(Context context) {
34
+ return new RawLocation(
35
+ relativePath(context),
36
+ 1,
37
+ 1,
38
+ -1,
39
+ -1,
40
+ 0,
41
+ -1
42
+ );
43
+ }
44
+
45
+ static String relativePath(Context context) {
46
+ Path source = context.file.toPath().toAbsolutePath().normalize();
47
+ Path configured = configuredRoot();
48
+ if (configured != null && source.startsWith(configured)) {
49
+ return posix(configured.relativize(source));
50
+ }
51
+
52
+ File projectDirectory = context.getProject().getDir();
53
+ Path project = projectDirectory.toPath().toAbsolutePath().normalize();
54
+ if (source.startsWith(project)) {
55
+ return posix(project.relativize(source));
56
+ }
57
+
58
+ Path parent = project.getParent();
59
+ if (parent != null && source.startsWith(parent)) {
60
+ return posix(parent.relativize(source));
61
+ }
62
+ return context.file.getName().replace('\\', '/');
63
+ }
64
+
65
+ Map<String, Object> toJson() {
66
+ return RawJson.object(
67
+ "path", path,
68
+ "startLine", startLine,
69
+ "startColumn", startColumn,
70
+ "endLine", endLine,
71
+ "endColumn", endColumn,
72
+ "startOffset", startOffset,
73
+ "endOffset", endOffset
74
+ );
75
+ }
76
+
77
+ private static Path configuredRoot() {
78
+ String value = RawRecordWriter.configuredValue(
79
+ RawRecordWriter.SOURCE_ROOT_PROPERTY,
80
+ RawRecordWriter.SOURCE_ROOT_ENVIRONMENT
81
+ );
82
+ if (value == null || value.isBlank()) {
83
+ return null;
84
+ }
85
+ return Path.of(value).toAbsolutePath().normalize();
86
+ }
87
+
88
+ private static int oneBased(int value) {
89
+ return value < 0 ? -1 : value + 1;
90
+ }
91
+
92
+ private static String posix(Path path) {
93
+ String value = path.toString().replace('\\', '/');
94
+ return value.isBlank() ? "." : value;
95
+ }
96
+ }
@@ -0,0 +1,227 @@
1
+ package dev.reqgen.analyzer.jvm;
2
+
3
+ import com.android.tools.lint.detector.api.Context;
4
+ import java.io.BufferedWriter;
5
+ import java.io.IOException;
6
+ import java.nio.charset.StandardCharsets;
7
+ import java.nio.file.Files;
8
+ import java.nio.file.Path;
9
+ import java.nio.file.StandardOpenOption;
10
+ import java.security.MessageDigest;
11
+ import java.security.NoSuchAlgorithmException;
12
+ import java.util.HashSet;
13
+ import java.util.Map;
14
+ import java.util.Set;
15
+ import java.util.TreeMap;
16
+
17
+ final class RawRecordWriter implements AutoCloseable {
18
+ static final String OUTPUT_PROPERTY = "reqgen.raw.output";
19
+ static final String SOURCE_ROOT_PROPERTY = "reqgen.source.root";
20
+ static final String OUTPUT_ENVIRONMENT = "REQGEN_RAW_OUTPUT";
21
+ static final String SOURCE_ROOT_ENVIRONMENT = "REQGEN_SOURCE_ROOT";
22
+ static final String PROTOCOL = "mobile-app-reqgen.raw-jvm";
23
+ static final String SCHEMA_VERSION = "1.0.0";
24
+ static final String ENGINE_VERSION = "0.1.0";
25
+
26
+ private final BufferedWriter output;
27
+ private final boolean enabled;
28
+ private final Map<String, Integer> counts = new TreeMap<>();
29
+ private final Set<String> emittedIds = new HashSet<>();
30
+ private final Set<String> emittedFiles = new HashSet<>();
31
+ private boolean closed;
32
+ private int bodyRecordCount;
33
+
34
+ private RawRecordWriter(BufferedWriter output, boolean enabled) {
35
+ this.output = output;
36
+ this.enabled = enabled;
37
+ }
38
+
39
+ static RawRecordWriter open(Context context) {
40
+ String configuredOutput = configuredValue(
41
+ OUTPUT_PROPERTY,
42
+ OUTPUT_ENVIRONMENT
43
+ );
44
+ if (configuredOutput == null || configuredOutput.isBlank()) {
45
+ return new RawRecordWriter(null, false);
46
+ }
47
+
48
+ Path path = Path.of(configuredOutput).toAbsolutePath().normalize();
49
+ try {
50
+ Path parent = path.getParent();
51
+ if (parent != null) {
52
+ Files.createDirectories(parent);
53
+ }
54
+ // Source text may contain lone surrogates (e.g. an emoji cut in
55
+ // half by UAST source extraction). The default encoder REPORTs
56
+ // malformed input, which aborts analysis; REPLACE keeps writing.
57
+ java.nio.charset.CharsetEncoder encoder = StandardCharsets.UTF_8
58
+ .newEncoder()
59
+ .onMalformedInput(java.nio.charset.CodingErrorAction.REPLACE)
60
+ .onUnmappableCharacter(java.nio.charset.CodingErrorAction.REPLACE);
61
+ BufferedWriter writer = new BufferedWriter(
62
+ new java.io.OutputStreamWriter(
63
+ Files.newOutputStream(
64
+ path,
65
+ StandardOpenOption.CREATE,
66
+ StandardOpenOption.TRUNCATE_EXISTING,
67
+ StandardOpenOption.WRITE
68
+ ),
69
+ encoder
70
+ )
71
+ );
72
+ RawRecordWriter result = new RawRecordWriter(writer, true);
73
+ result.writeEnvelope(
74
+ "analysis-header",
75
+ "header:android-lint-uast",
76
+ null,
77
+ RawJson.object(
78
+ "engine", "android-lint-uast",
79
+ "engineVersion", ENGINE_VERSION,
80
+ "protocolVersion", SCHEMA_VERSION,
81
+ "project", context.getProject().getName()
82
+ )
83
+ );
84
+ return result;
85
+ } catch (IOException error) {
86
+ throw new IllegalStateException(
87
+ "Cannot open raw JVM analyzer output " + path,
88
+ error
89
+ );
90
+ }
91
+ }
92
+
93
+ synchronized String emit(
94
+ String kind,
95
+ RawLocation location,
96
+ String discriminator,
97
+ Map<String, Object> data
98
+ ) {
99
+ String id = stableId(kind, location, discriminator);
100
+ if (!enabled || !emittedIds.add(id)) {
101
+ return id;
102
+ }
103
+ writeEnvelope(kind, id, location, data);
104
+ bodyRecordCount += 1;
105
+ counts.merge(kind, 1, Integer::sum);
106
+ return id;
107
+ }
108
+
109
+ synchronized void emitSourceFileOnce(
110
+ Context context,
111
+ String language,
112
+ Map<String, Object> extraData
113
+ ) {
114
+ if (!enabled) {
115
+ return;
116
+ }
117
+ String path = RawLocation.relativePath(context);
118
+ if (!emittedFiles.add(path)) {
119
+ return;
120
+ }
121
+ Map<String, Object> data = RawJson.object(
122
+ "language", language,
123
+ "fileName", context.file.getName()
124
+ );
125
+ data.putAll(extraData);
126
+ RawLocation location = RawLocation.forFile(context);
127
+ emit("source-file", location, path, data);
128
+ }
129
+
130
+ String stableId(
131
+ String kind,
132
+ RawLocation location,
133
+ String discriminator
134
+ ) {
135
+ String locationKey = location == null
136
+ ? ""
137
+ : location.path()
138
+ + ":"
139
+ + location.startOffset()
140
+ + ":"
141
+ + location.endOffset();
142
+ String input = kind + "|" + locationKey + "|" + discriminator;
143
+ try {
144
+ byte[] digest = MessageDigest.getInstance("SHA-256")
145
+ .digest(input.getBytes(StandardCharsets.UTF_8));
146
+ StringBuilder result = new StringBuilder("raw:");
147
+ for (int index = 0; index < 12; index += 1) {
148
+ result.append(String.format("%02x", digest[index]));
149
+ }
150
+ return result.toString();
151
+ } catch (NoSuchAlgorithmException error) {
152
+ throw new IllegalStateException("JDK does not provide SHA-256", error);
153
+ }
154
+ }
155
+
156
+ boolean isEnabled() {
157
+ return enabled;
158
+ }
159
+
160
+ static String configuredValue(String property, String environment) {
161
+ String value = System.getProperty(property);
162
+ if (value == null || value.isBlank()) {
163
+ value = System.getenv(environment);
164
+ }
165
+ return value;
166
+ }
167
+
168
+ @Override
169
+ public synchronized void close() {
170
+ if (closed) {
171
+ return;
172
+ }
173
+ closed = true;
174
+ if (!enabled) {
175
+ return;
176
+ }
177
+ writeEnvelope(
178
+ "analysis-footer",
179
+ "footer:android-lint-uast",
180
+ null,
181
+ RawJson.object(
182
+ "complete", true,
183
+ "recordCount", bodyRecordCount,
184
+ "countsByKind", counts
185
+ )
186
+ );
187
+ try {
188
+ output.flush();
189
+ output.close();
190
+ } catch (IOException error) {
191
+ throw new IllegalStateException(
192
+ "Cannot close raw JVM analyzer output",
193
+ error
194
+ );
195
+ }
196
+ }
197
+
198
+ private void writeEnvelope(
199
+ String kind,
200
+ String id,
201
+ RawLocation location,
202
+ Map<String, Object> data
203
+ ) {
204
+ if (!enabled) {
205
+ return;
206
+ }
207
+ Map<String, Object> envelope = RawJson.object(
208
+ "protocol", PROTOCOL,
209
+ "schemaVersion", SCHEMA_VERSION,
210
+ "kind", kind,
211
+ "id", id
212
+ );
213
+ if (location != null) {
214
+ envelope.put("location", location.toJson());
215
+ }
216
+ envelope.put("data", data);
217
+ try {
218
+ output.write(RawJson.encode(envelope));
219
+ output.newLine();
220
+ } catch (IOException error) {
221
+ throw new IllegalStateException(
222
+ "Cannot write raw JVM analyzer record " + id + ": " + error,
223
+ error
224
+ );
225
+ }
226
+ }
227
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mobile-app-reqgen.local/schemas/raw-jvm/v1/record.schema.json",
4
+ "title": "Raw JVM analyzer NDJSON record v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["protocol", "schemaVersion", "kind", "id", "data"],
8
+ "properties": {
9
+ "protocol": {
10
+ "const": "mobile-app-reqgen.raw-jvm"
11
+ },
12
+ "schemaVersion": {
13
+ "const": "1.0.0"
14
+ },
15
+ "kind": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "x-knownKinds": [
19
+ "analysis-header",
20
+ "source-file",
21
+ "class-declaration",
22
+ "method-declaration",
23
+ "lambda-declaration",
24
+ "callable-reference",
25
+ "resolved-call",
26
+ "unresolved-call",
27
+ "call-argument-binding",
28
+ "assignment",
29
+ "return",
30
+ "condition",
31
+ "xml-element",
32
+ "xml-attribute",
33
+ "analysis-footer"
34
+ ]
35
+ },
36
+ "id": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "location": {
41
+ "$ref": "#/$defs/location"
42
+ },
43
+ "data": {
44
+ "type": "object"
45
+ }
46
+ },
47
+ "$defs": {
48
+ "location": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "path",
53
+ "startLine",
54
+ "startColumn",
55
+ "endLine",
56
+ "endColumn",
57
+ "startOffset",
58
+ "endOffset"
59
+ ],
60
+ "properties": {
61
+ "path": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\).+$"
65
+ },
66
+ "startLine": {
67
+ "type": "integer",
68
+ "minimum": -1
69
+ },
70
+ "startColumn": {
71
+ "type": "integer",
72
+ "minimum": -1
73
+ },
74
+ "endLine": {
75
+ "type": "integer",
76
+ "minimum": -1
77
+ },
78
+ "endColumn": {
79
+ "type": "integer",
80
+ "minimum": -1
81
+ },
82
+ "startOffset": {
83
+ "type": "integer",
84
+ "minimum": -1
85
+ },
86
+ "endOffset": {
87
+ "type": "integer",
88
+ "minimum": -1
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }