@buaa_smat/hometrans 0.1.17 → 0.1.19
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/README.md +120 -56
- package/agents/code-reviewer.md +321 -65
- package/agents/logic-coder.md +113 -88
- package/agents/logic-context-builder.md +47 -29
- package/agents/scripts/hmos-precheck/backends/arkts.mjs +567 -0
- package/agents/scripts/hmos-precheck/backends/arkts_diff.mjs +159 -0
- package/agents/scripts/hmos-precheck/backends/arkts_project_rules.mjs +398 -0
- package/agents/scripts/hmos-precheck/backends/codelinter.mjs +250 -0
- package/agents/scripts/hmos-precheck/backends/project_integrity.mjs +321 -0
- package/agents/scripts/hmos-precheck/backends/static_precheck.mjs +247 -0
- package/agents/scripts/hmos-precheck/core/config.mjs +184 -0
- package/agents/scripts/hmos-precheck/core/diagnostic_scope.mjs +20 -0
- package/agents/scripts/hmos-precheck/core/process_adapter.mjs +47 -0
- package/agents/scripts/hmos-precheck/core/project_catalog.mjs +50 -0
- package/agents/scripts/hmos-precheck/core/result_projection.mjs +147 -0
- package/agents/scripts/hmos-precheck/core/scope_plan.mjs +131 -0
- package/agents/scripts/hmos-precheck/core/sdk_context.mjs +67 -0
- package/agents/scripts/hmos-precheck/docs/architecture.md +37 -0
- package/agents/scripts/hmos-precheck/docs/performance-optimization.md +28 -0
- package/agents/scripts/hmos-precheck/docs/upstream-reference.json +19 -0
- package/agents/scripts/hmos-precheck/docs/validation.md +50 -0
- package/agents/scripts/hmos-precheck/index.mjs +17 -0
- package/agents/scripts/hmos-precheck/invocation.mjs +231 -0
- package/agents/scripts/hmos-precheck/rules/rule_case_matrix.csv +32 -0
- package/agents/scripts/hmos-precheck/rules/rule_inventory.csv +64 -0
- package/agents/scripts/hmos-precheck/rules/rule_inventory.mjs +59 -0
- package/agents/scripts/hmos-precheck/rules/rule_policy.mjs +54 -0
- package/agents/scripts/platform_query.mjs +626 -0
- package/agents/scripts/platform_query.test.mjs +422 -0
- package/agents/self-test-fixer.md +36 -34
- package/agents/self-tester.md +123 -143
- package/agents/test-case-generation-generator.md +317 -0
- package/agents/test-case-generation-validator.md +231 -0
- package/dist/cli/config-store.js +16 -63
- package/dist/cli/env-vars.js +1 -3
- package/dist/cli/index.js +0 -11
- package/dist/cli/init.js +123 -204
- package/dist/cli/uninstall.js +3 -127
- package/dist/utils/regex.js +8 -0
- package/env-requirements.json +55 -54
- package/package.json +6 -6
- package/resource/convert_pipeline_process.svg +103 -0
- package/resource/project_architecture.svg +122 -0
- package/resource/title_dark.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +345 -43
- package/skills/hmos-batch-ui-align/references/conversion-procedure.md +661 -180
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-batch-ui-align/references/mvvm/@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 -648
- package/skills/hmos-batch-ui-align/references/mvvm/@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 +2088 -2088
- package/skills/hmos-batch-ui-align/references/mvvm/@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 -1033
- package/skills/hmos-batch-ui-align/references/mvvm/@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 -1183
- package/skills/hmos-batch-ui-align/references/mvvm/@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 -576
- package/skills/hmos-batch-ui-align/references/mvvm/@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 -297
- package/skills/hmos-batch-ui-align/references/mvvm/@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 -395
- package/skills/hmos-batch-ui-align/references/mvvm/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 +902 -902
- package/skills/hmos-batch-ui-align/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-batch-ui-align/references/mvvm/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 -1178
- package/skills/hmos-batch-ui-align/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md +911 -911
- package/skills/hmos-batch-ui-align/references/mvvm/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 +354 -354
- package/skills/hmos-batch-ui-align/references/mvvm//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 -11
- package/skills/hmos-batch-ui-align/references/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +206 -0
- package/skills/hmos-batch-ui-align/references/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 +373 -0
- package/skills/hmos-batch-ui-align/references/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 +158 -0
- package/skills/hmos-batch-ui-align/references/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 +750 -0
- package/skills/hmos-batch-ui-align/references/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 +1704 -0
- package/skills/hmos-batch-ui-align/references/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 +1012 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Once/350/243/205/351/245/260/345/231/250/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 +164 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +840 -0
- package/skills/hmos-batch-ui-align/references/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 +856 -0
- package/skills/hmos-batch-ui-align/references/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 +83 -0
- package/skills/hmos-batch-ui-align/references/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 +294 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1407 -0
- package/skills/hmos-batch-ui-align/references/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 +1220 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +47 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +133 -0
- package/skills/hmos-batch-ui-align/references/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +840 -0
- package/skills/hmos-batch-ui-align/scripts/android_parse_fast.ts +1798 -0
- package/skills/hmos-batch-ui-align/scripts/arkts_static_check.ts +1592 -0
- package/skills/hmos-batch-ui-align/scripts/measure_pack.ts +752 -0
- package/skills/hmos-convert-pipeline/SKILL.md +168 -121
- package/skills/hmos-fix-build-errors/SKILL.md +87 -67
- package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +219 -219
- package/skills/hmos-fix-build-errors/references/known-patterns.md +157 -157
- package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +131 -131
- package/skills/hmos-incremental-ui-align/README.md +53 -36
- package/skills/hmos-incremental-ui-align/SKILL.md +179 -23
- package/skills/hmos-incremental-ui-align/diff_analysis.md +52 -52
- package/skills/hmos-incremental-ui-align/page_align.md +62 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +38 -2
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 +2088 -2088
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@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 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/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 +902 -902
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/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 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +911 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/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 +354 -354
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//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 -11
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +206 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +373 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +158 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +750 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +1704 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +1012 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Once/350/243/205/351/245/260/345/231/250/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 +164 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +840 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +856 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@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 +83 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/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 +294 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md +1407 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/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 +1220 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +47 -0
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +840 -0
- package/skills/hmos-incremental-ui-align/references/State_Model_Template.md +74 -0
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +34 -4
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.ts +937 -0
- package/skills/hmos-incremental-ui-align/scripts/extract_checklist.ts +343 -0
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +44 -5
- package/skills/hmos-incremental-ui-align/scripts/page_capture.ts +977 -0
- package/skills/hmos-incremental-ui-align/scripts/page_capture_burst.ts +188 -0
- package/skills/hmos-integration-test/README.md +61 -70
- package/skills/hmos-integration-test/SKILL.md +128 -111
- package/skills/hmos-resources-convert/SKILL.md +334 -66
- package/skills/hmos-resources-convert/references/code-vector-icon-rules.md +335 -0
- package/skills/hmos-resources-convert/references/conversion-rules.md +676 -663
- package/skills/hmos-resources-convert/references/dependency-analysis-rules.md +410 -388
- package/skills/hmos-resources-convert/references/lottie-conversion-rules.md +219 -0
- package/skills/hmos-resources-convert/references/resource-mapping-rules.md +482 -457
- package/skills/hmos-resources-convert/references/xml-drawable-to-svg-rules.md +592 -513
- package/skills/hmos-resources-convert/scripts/a2h_resource_convert.ts +2163 -0
- package/skills/hmos-resources-convert/scripts/code_vector_icons.ts +591 -0
- package/skills/hmos-resources-convert/scripts/svg_fidelity_check.ts +632 -0
- package/skills/hmos-spec-generate/SKILL.md +293 -214
- package/skills/hmos-spec-generate/scripts/parse_requirements.ts +515 -0
- package/skills/hmos-spec-generate/template/REQ.txt +22 -0
- package/skills/hmos-spec-generate/template/REQ.xlsx +0 -0
- package/skills/hmos-test-case-generation/README.md +241 -0
- package/skills/hmos-test-case-generation/SKILL.md +324 -0
- package/skills/hmos-test-case-generation/references/contract.md +315 -0
- package/skills/hmos-test-case-generation/references/review-notes-template.md +84 -0
- package/skills/hmos-test-case-generation/references/ui-elements-schema.md +142 -0
- package/skills/hmos-test-case-generation/tools/convert_to_ui_elements.ts +550 -0
- package/skills/hmos-test-case-generation/tools/validate.ts +1312 -0
- package/tools/bfs-crawl/README.md +73 -0
- package/tools/bfs-crawl/android_viewtree_bfs_crawler.ts +1662 -0
- package/tools/test-tools/autotest/config.ts +175 -0
- package/tools/test-tools/autotest/deps/autotest-agent-0.1.1.tgz +0 -0
- package/tools/test-tools/autotest/docs/README.md +266 -0
- package/tools/test-tools/autotest/{testcases_schema.md → docs/testcases_schema.md} +1 -1
- package/tools/test-tools/autotest/engine/batch-launcher.ts +327 -0
- package/tools/test-tools/autotest/engine/report-tool.ts +773 -0
- package/tools/test-tools/autotest/engine/self-test-runner.ts +961 -0
- package/tools/test-tools/autotest/engine/testcases-tool.ts +246 -0
- package/tools/test-tools/autotest/paths.ts +41 -0
- package/tools/test-tools/autotest/resolve-metadata-tool.ts +143 -0
- package/tools/test-tools/autotest/runner/logger.ts +45 -0
- package/tools/test-tools/autotest/runner/process-utils.ts +41 -0
- package/tools/test-tools/autotest/validate.ts +167 -0
- package/agents/build-fixer.md +0 -385
- package/agents/logic-coder/scripts/platform_context_query.py +0 -568
- package/agents/review-fixer.md +0 -405
- package/agents/spec-generator.md +0 -541
- package/dist/cli/mcp-setup.js +0 -258
- package/dist/cli/mcp.js +0 -94
- package/dist/context/index.js +0 -694
- package/resource/migration_process.svg +0 -94
- package/resource/migration_process_transparent.svg +0 -93
- package/skills/hmos-batch-ui-align/scripts/android_parse_fast.py +0 -1606
- package/skills/hmos-incremental-ui-align/scripts/__pycache__/app_feature_verify.cpython-314.pyc +0 -0
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.py +0 -542
- package/skills/hmos-incremental-ui-align/scripts/page_capture.py +0 -597
- package/skills/hmos-resources-convert/evals/evals.json +0 -171
- package/skills/hmos-resources-convert/template/AppScope/app.json5 +0 -10
- package/skills/hmos-resources-convert/template/AppScope/resources/base/element/string.json +0 -8
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/background.png +0 -0
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/foreground.png +0 -0
- package/skills/hmos-resources-convert/template/AppScope/resources/base/media/layered_image.json +0 -7
- package/skills/hmos-resources-convert/template/build-profile.json5 +0 -42
- package/skills/hmos-resources-convert/template/code-linter.json5 +0 -32
- package/skills/hmos-resources-convert/template/entry/build-profile.json5 +0 -33
- package/skills/hmos-resources-convert/template/entry/hvigorfile.ts +0 -6
- package/skills/hmos-resources-convert/template/entry/obfuscation-rules.txt +0 -23
- package/skills/hmos-resources-convert/template/entry/oh-package.json5 +0 -10
- package/skills/hmos-resources-convert/template/entry/src/main/ets/entryability/EntryAbility.ets +0 -48
- package/skills/hmos-resources-convert/template/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +0 -16
- package/skills/hmos-resources-convert/template/entry/src/main/ets/pages/Index.ets +0 -23
- package/skills/hmos-resources-convert/template/entry/src/main/module.json5 +0 -55
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/color.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/float.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/element/string.json +0 -16
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/background.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/foreground.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/layered_image.json +0 -7
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/profile/backup_config.json +0 -3
- package/skills/hmos-resources-convert/template/entry/src/main/resources/base/profile/main_pages.json +0 -5
- package/skills/hmos-resources-convert/template/entry/src/main/resources/dark/element/color.json +0 -8
- package/skills/hmos-resources-convert/template/entry/src/mock/mock-config.json5 +0 -2
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/ets/test/Ability.test.ets +0 -35
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/ets/test/List.test.ets +0 -5
- package/skills/hmos-resources-convert/template/entry/src/ohosTest/module.json5 +0 -16
- package/skills/hmos-resources-convert/template/entry/src/test/List.test.ets +0 -5
- package/skills/hmos-resources-convert/template/entry/src/test/LocalUnit.test.ets +0 -33
- package/skills/hmos-resources-convert/template/hvigor/hvigor-config.json5 +0 -23
- package/skills/hmos-resources-convert/template/hvigorfile.ts +0 -6
- package/skills/hmos-resources-convert/template/oh-package-lock.json5 +0 -28
- package/skills/hmos-resources-convert/template/oh-package.json5 +0 -10
- package/skills/hmos-resources-convert/tools/apktool_3.0.1.jar +0 -0
- package/skills/hmos-spec-generate/references/android-platform-tokens.md +0 -105
- package/skills/hmos-spec-generate/references/spec-sample-1.md +0 -78
- package/skills/hmos-spec-generate/references/spec-sample-2.md +0 -58
- package/skills/hmos-spec-generate/references/spec-sample-3.md +0 -116
- package/skills/hmos-spec-generate/references/step4-report-template.md +0 -33
- package/tools/test-tools/autotest/README.md +0 -238
- package/tools/test-tools/autotest/pyproject.toml +0 -26
- package/tools/test-tools/autotest/report_tool.py +0 -759
- package/tools/test-tools/autotest/self_test_runner.py +0 -895
- package/tools/test-tools/autotest/testcases_tool.py +0 -215
- package/tools/test-tools/autotest/uv.lock +0 -3156
- package/tools/test-tools/harmony_autotest-0.1.0-py3-none-any.whl +0 -0
- package/tools/test-tools/hypium-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/hypium_mcp-0.6.5-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice_devicetest-6.1.0.210-py3-none-any.whl +0 -0
- package/tools/test-tools/xdevice_ohos-6.1.0.210-py3-none-any.whl +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hmos-spec-generate
|
|
3
|
-
description: "Generate
|
|
3
|
+
description: "Generate requirement specification (spec) documents for Android-to-HarmonyOS migration. Read a requirement description file containing multiple requirements, split it into individual requirements, then for each one explore the Android codebase via homegraph and decompose it into atomic user scenarios, emitting one markdown spec per requirement. Use when generating spec docs from raw requirement descriptions, decomposing requirements into atomic scenarios, or preparing scenario-based specs for HarmonyOS migration. Triggers: hmos-spec-generate, spec generation, 生成spec, requirement to spec, atomic scenarios, 拆分场景, scenario decomposition, 需求转spec."
|
|
4
4
|
license: MIT
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
@@ -13,313 +13,392 @@ allowed-tools:
|
|
|
13
13
|
- TaskCreate
|
|
14
14
|
- TaskList
|
|
15
15
|
- TaskUpdate
|
|
16
|
-
- mcp__homegraph__search
|
|
17
|
-
- mcp__homegraph__explore
|
|
18
|
-
- mcp__homegraph__node
|
|
19
|
-
- mcp__homegraph__impact
|
|
20
|
-
- mcp__homegraph__callers
|
|
21
|
-
- mcp__homegraph__callees
|
|
22
|
-
- mcp__homegraph__files
|
|
23
16
|
---
|
|
24
17
|
|
|
25
18
|
# Spec Generator Skill
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
You are a **Spec Generator** that produces high-quality requirement specification (spec) documents for Android-to-HarmonyOS migration projects. Given a requirement description file containing multiple requirements, split it into individual requirements, explore the corresponding Android codebase via homegraph and emit a clean, atomic-scenario-based spec markdown for every requirement.
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
## Quick Reference
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
| Item | Value |
|
|
25
|
+
|------|-------|
|
|
26
|
+
| **Input** | `requirement_description_file` + `android_project_dir` + `spec_output_dir` |
|
|
27
|
+
| **Output** | One `<feature>-SPEC.md` per requirement under `spec_output_dir` |
|
|
28
|
+
| **homegraph** | `npx --yes homegraph <command>` CLI via `Bash` (index management + code queries) |
|
|
29
|
+
| **Processing Mode** | Per-requirement end-to-end loop (split first, then one requirement at a time) |
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
## Expected Input
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
spec_output_dir: C:\proj\specs-out\
|
|
43
|
-
```
|
|
33
|
+
- `requirement_description_file`: Absolute path to a requirement description file whose content contains multiple requirements (required). Supported types: Excel (`.xlsx` / `.xlsm` / `.csv`, one row = one requirement) and text (`.txt` / `.md`, one blank-line-separated paragraph = one requirement). See `template/REQ.xlsx` and `template/REQ.txt` for equivalent examples.
|
|
34
|
+
- `android_project_dir`: Absolute path to the Android project root (required).
|
|
35
|
+
- `spec_output_dir`: Absolute path to the directory where the generated spec files (`<feature>-SPEC.md`) will be written (required).
|
|
44
36
|
|
|
45
37
|
## Expected Output
|
|
46
38
|
|
|
47
|
-
- One markdown spec per
|
|
48
|
-
- One intermediate code-trace file per REQ block, written to `<spec_output_dir>/.trace/<feature>.md` (same slug). 3.5 synthesis MUST `Read` this file rather than recalling from conversation context.
|
|
49
|
-
- Both files overwrite if they already exist.
|
|
39
|
+
- One markdown spec file per requirement split out of `requirement_description_file`, written under `spec_output_dir` as **`<feature>-SPEC.md`**, where `<feature>` is the requirement title. The `-SPEC.md` suffix is required by the downstream `hmos-test-case-generation` skill, which only accepts a `spec-path` ending in it.
|
|
50
40
|
|
|
51
41
|
---
|
|
52
42
|
|
|
53
43
|
## Principles
|
|
54
44
|
|
|
55
|
-
|
|
45
|
+
These are the authoring rules the final spec MUST follow:
|
|
56
46
|
|
|
57
|
-
1.
|
|
58
|
-
2. Each atomic scenario corresponds to one
|
|
59
|
-
3. Atomic scenarios
|
|
60
|
-
4. The spec
|
|
61
|
-
5.
|
|
62
|
-
6. The spec
|
|
63
|
-
7. When `REQ_DESC` disagrees with the Android code implementation, the spec follows `REQ_DESC`; discrepancies are summarized at the end of the spec in user-facing language.
|
|
64
|
-
8. **Coverage rule** — scenarios MUST cover ALL UI entries discovered in code, not just those explicitly mentioned in `REQ_DESC`. If the trace's Scope / Boundary section enumerates N entries and `REQ_DESC` only mentions M < N, the spec still produces scenarios for all N. Missing entries here = missing scenarios in the spec.
|
|
47
|
+
1. Requirements must be decomposed into atomic scenarios. Atomic scenarios combine to form a requirement.
|
|
48
|
+
2. Each atomic scenario corresponds to one normal case or one edge/boundary case.
|
|
49
|
+
3. Atomic scenarios must be comprehensive and non-redundant.
|
|
50
|
+
4. The spec document must include a requirement semantic description, scenario semantic descriptions, and scenario flow descriptions.
|
|
51
|
+
5. The scenario flow description in the spec document must include the trigger operation sequence and the logical execution steps for that scenario.
|
|
52
|
+
6. The spec document must not contain any Android-related knowledge descriptions, design descriptions, or code descriptions.
|
|
65
53
|
|
|
66
54
|
---
|
|
67
55
|
|
|
68
|
-
##
|
|
56
|
+
## Spec Few-shot Samples
|
|
69
57
|
|
|
70
|
-
|
|
58
|
+
### Sample 1
|
|
59
|
+
```
|
|
60
|
+
# 新建歌单SPEC
|
|
71
61
|
|
|
72
|
-
|
|
62
|
+
创建新歌单
|
|
73
63
|
|
|
74
|
-
|
|
64
|
+
## 场景一
|
|
75
65
|
|
|
76
|
-
|
|
66
|
+
### 场景概述
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
|---|---|
|
|
80
|
-
| **code** | Java / Kotlin / Compose source (`.java`, `.kt`) — click handlers, ViewModels, Services, Repositories, DAOs, Workers |
|
|
81
|
-
| **resource** | `res/layout/*.xml`, `res/menu/*.xml`, `res/drawable/*.xml`, `res/values/*.xml`, `res/xml/*.xml` (preference screens), `res/navigation/*.xml` |
|
|
82
|
-
| **manifest** | `AndroidManifest.xml` (activity / service / receiver / provider / permission / intent-filter / foreground-service-type declarations); `build.gradle` flavor or `buildConfig` flags when behavior is build-gated |
|
|
68
|
+
用户点击创建歌单,但输入的歌单名称为空并且创建歌单
|
|
83
69
|
|
|
84
|
-
###
|
|
70
|
+
### 场景逻辑步骤
|
|
85
71
|
|
|
86
|
-
|
|
72
|
+
- 1. 用户在“歌单页面”点击“更多菜单”中的“新建歌单按钮”或者用户在“添加到歌单弹窗”中点击“新建歌单按钮”
|
|
73
|
+
- 2. 弹出“新建歌单对话框”
|
|
74
|
+
- 3. 用户在输入框中输入空白歌单名称并点击确定按钮
|
|
75
|
+
- 4. 弹出toast”歌单名称不得为空“并且关闭“新建歌单对话框”
|
|
87
76
|
|
|
88
|
-
|
|
77
|
+
## 场景二
|
|
89
78
|
|
|
90
|
-
|
|
79
|
+
### 场景概述
|
|
91
80
|
|
|
92
|
-
|
|
81
|
+
用户点击创建歌单,但输入的歌单名称超过最大长度并且创建歌单
|
|
93
82
|
|
|
94
|
-
|
|
83
|
+
### 场景逻辑步骤
|
|
95
84
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| `references/spec-sample-3.md` | 3.5 Synthesize — shared-mechanic + per-value decomposition for enumerated multi-entry settings |
|
|
101
|
-
| `references/android-platform-tokens.md` | 3.5 Synthesize — platform-token strip list + Chinese replacement vocabulary |
|
|
102
|
-
| `references/step4-report-template.md` | Step 4 — summary report output format |
|
|
85
|
+
- 1. 用户在“歌单页面”点击“更多菜单”中的“新建歌单按钮”或者用户在“添加到歌单弹窗”中点击“新建歌单按钮”
|
|
86
|
+
- 2. 弹出“新建歌单对话框”
|
|
87
|
+
- 3. 用户在输入框中输入歌单名称并且歌单名称超过100个字符,然后点击确定按钮
|
|
88
|
+
- 4. 弹出toast“歌单名称过长”并且关闭“新建歌单对话框”
|
|
103
89
|
|
|
104
|
-
|
|
90
|
+
## 场景三
|
|
105
91
|
|
|
106
|
-
|
|
92
|
+
### 场景概述
|
|
107
93
|
|
|
108
|
-
|
|
94
|
+
用户点击创建歌单,输入有效歌单名称并且创建歌单
|
|
109
95
|
|
|
110
|
-
###
|
|
96
|
+
### 场景逻辑步骤
|
|
111
97
|
|
|
112
|
-
1.
|
|
113
|
-
2.
|
|
114
|
-
3.
|
|
115
|
-
4.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
5. **Distill a feature slug** for each block:
|
|
120
|
-
- Summarize the REQ into a `<feature>` phrase. **≤ 20 characters, in the REQ's own language.**
|
|
121
|
-
- Sanitize illegal filesystem characters (`< > : " / \ | ? *` and ASCII control chars) by replacing each with `-`.
|
|
122
|
-
- Different REQ blocks should produce different features. Titles already encode the top-level category (e.g. `Settings-UI-...` vs `Settings-Lyrics-...`); retain enough category context in the slug to keep distinct.
|
|
123
|
-
- The slug is the filename stem for both the trace (`.trace/<feature>.md`) and the spec (`<feature>-SPEC.md`).
|
|
98
|
+
- 1. 用户在“歌单页面”点击“更多菜单”中的“新建歌单按钮”或者用户在“添加到歌单弹窗”中点击“新建歌单按钮”
|
|
99
|
+
- 2. 弹出“新建歌单对话框”
|
|
100
|
+
- 3. 用户在输入框中输入有效歌单名称,即用户输入到歌单名称不为空并且歌单名称没有超过100个字符,然后点击确定按钮
|
|
101
|
+
- 4. 去除歌单名称首尾空白字符
|
|
102
|
+
- 5. 把新建的歌单数据写入数据库中的歌单数据库表
|
|
103
|
+
- 6. 如果是在“歌单页面”,那么从数据库中读取新建歌单的数据,并且在“歌单页面”创建新建歌单item,实时刷新歌单页面,在歌单页面列表中的第一个位置上显示新建的歌单
|
|
104
|
+
- 7. 如果是在“添加到歌单弹窗”,那么从数据库中读取新建歌单的数据,并且在“添加到歌单弹窗”创建新建歌单item,实时刷新歌单页面,在添加到歌单弹窗列表中的第一个位置上显示新建的歌单
|
|
124
105
|
|
|
125
|
-
|
|
106
|
+
## 场景四
|
|
126
107
|
|
|
127
|
-
###
|
|
108
|
+
### 场景概述
|
|
128
109
|
|
|
129
|
-
|
|
110
|
+
用户点击创建歌单,输入或者不输入歌单名称,然后点击取消按钮
|
|
130
111
|
|
|
131
|
-
###
|
|
112
|
+
### 场景逻辑步骤
|
|
132
113
|
|
|
133
|
-
|
|
114
|
+
- 1. 用户在“歌单页面”点击“更多菜单”中的“新建歌单按钮”或者用户在“添加到歌单弹窗”中点击“新建歌单按钮”
|
|
115
|
+
- 2. 弹出“新建歌单对话框”
|
|
116
|
+
- 3. 无论用户是否在输入框中输入歌单名称,只要用户点击取消按钮,那么就关闭“新建歌单对话框”,无需执行其他操作
|
|
117
|
+
```
|
|
134
118
|
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
### Sample 2
|
|
120
|
+
```
|
|
121
|
+
# 歌曲信息页信息展示与信息更新SPEC
|
|
137
122
|
|
|
138
|
-
|
|
123
|
+
歌曲信息页展示音频信息、出自专辑、参与创作的艺术家,以及播放界面保持屏幕唤醒、沉浸模式内容。
|
|
139
124
|
|
|
140
|
-
|
|
125
|
+
## 场景一
|
|
141
126
|
|
|
142
|
-
|
|
143
|
-
2. Decide based on the output:
|
|
144
|
-
- **Not indexed** (no `.homegraph/`) → run `homegraph init -i <android_project_dir>`, wait for completion.
|
|
145
|
-
- **Stale** → run `homegraph sync <android_project_dir>` (incremental; use `homegraph index <android_project_dir> --force` for a full rebuild), wait for completion.
|
|
146
|
-
- **Fresh** → proceed.
|
|
127
|
+
### 场景概述
|
|
147
128
|
|
|
148
|
-
|
|
129
|
+
进入歌曲信息页后,展示当前播放歌曲的信息及相关功能入口
|
|
130
|
+
|
|
131
|
+
### 场景逻辑步骤
|
|
149
132
|
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
133
|
+
- 1. 在播放页右滑进入歌曲信息页
|
|
134
|
+
- 2. 歌曲信息页读取信息并展示:
|
|
135
|
+
- 2.1 音频信息展示:
|
|
136
|
+
- 当当前播放歌曲的音频格式存在时,显示当前播放歌曲的音频格式
|
|
137
|
+
- 当当前播放歌曲的音频格式缺失时,显示当前播放歌曲的文件扩展名;若文件扩展名也为空,则显示为空白
|
|
138
|
+
- 当当前播放歌曲的声道数存在时,显示声道数
|
|
139
|
+
- 当当前播放歌曲的声道数缺失时,隐藏该字段
|
|
140
|
+
- 当当前播放歌曲的采样率存在时,显示采样率
|
|
141
|
+
- 当当前播放歌曲的采样率缺失时,隐藏该字段
|
|
142
|
+
- 当当前播放歌曲的比特率存在时,显示比特率
|
|
143
|
+
- 当当前播放歌曲的比特率缺失时,显示 0 Kbps
|
|
144
|
+
- 2.2 出自专辑展示:
|
|
145
|
+
- 当当前播放歌曲的专辑封面存在时,显示专辑封面
|
|
146
|
+
- 当当前播放歌曲的专辑封面缺失时,显示默认专辑封面图标
|
|
147
|
+
- 当当前播放歌曲的专辑标题存在时,显示专辑标题
|
|
148
|
+
- 当当前播放歌曲的专辑标题缺失时,显示“未知专辑标题”
|
|
149
|
+
- 当当前播放歌曲的专辑艺术家存在时,显示专辑艺术家
|
|
150
|
+
- 当当前播放歌曲的专辑艺术家缺失时,显示“未知专辑艺术家”
|
|
151
|
+
- 2.3 参与创作的艺术家展示:
|
|
152
|
+
- 当当前播放歌曲的艺术家头像存在时,显示艺术家头像
|
|
153
|
+
- 当当前播放歌曲的艺术家头像缺失时,显示默认歌曲封面图标
|
|
154
|
+
- 当当前播放歌曲的艺术家名称存在时,显示艺术家名称
|
|
155
|
+
- 当当前播放歌曲的艺术家名称缺失时,显示“未知艺术家”
|
|
156
|
+
- 当当前播放歌曲的艺术家音轨数量(歌曲数量)存在时,显示艺术家音轨数量(歌曲数量)
|
|
157
|
+
- 当当前播放歌曲的艺术家音轨数量(歌曲数量)缺失时,显示 0
|
|
154
158
|
|
|
155
|
-
> All `mcp__homegraph__*` calls in Step 3 MUST carry `projectPath: "<android_project_dir>"`. A missing or wrong `projectPath` poisons the trace.
|
|
156
159
|
|
|
157
|
-
|
|
160
|
+
## 场景二
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
### 场景概述
|
|
160
163
|
|
|
161
|
-
|
|
164
|
+
切换播放歌曲后,歌曲信息页面同步刷新
|
|
162
165
|
|
|
163
|
-
|
|
166
|
+
### 场景逻辑步骤
|
|
164
167
|
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
+
- 1. 在播放页右滑进入歌曲信息页
|
|
169
|
+
- 2. 用户通过上一首、下一首、播放队列切歌或自动切歌等方式切换当前播放歌曲
|
|
170
|
+
- 3. 歌曲信息页中的音频信息、专辑信息、艺术家信息同步刷新为新歌曲对应内容
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Sample 3
|
|
174
|
+
```
|
|
175
|
+
# 添加到歌单SPEC
|
|
168
176
|
|
|
169
|
-
|
|
177
|
+
用户可通过多种入口将单首或多首歌曲添加到歌单,歌单详情页按配置的排序规则展示歌曲,并新增"按添加到歌单时间排序"选项。
|
|
170
178
|
|
|
171
|
-
|
|
179
|
+
## 场景一
|
|
172
180
|
|
|
173
|
-
|
|
174
|
-
|---|---|---|
|
|
175
|
-
| **Path 1 · By-concept lookup** | For each entity / UI anchor / intent verb from 3.1, call `mcp__homegraph__search({ query: "<concept>", projectPath: "<android_project_dir>" })` to locate candidate symbols, then `mcp__homegraph__explore({ query: "<symbols / file names>", projectPath: "<android_project_dir>" })` to pull their source + call relations (Activities / Fragments / Composables / ViewModels / Services / Repositories / DAOs). Cross-validate symbol name, file path, and context against `REQ_DESC`. | Direct hits: pages obviously implementing the REQ; data models named after REQ entities. |
|
|
176
|
-
| **Path 2 · Reverse-by-usage** | Take the most discriminative keyword (a settings key literal, a persistence column / preference key, a unique business term). `search` → candidate symbol → `mcp__homegraph__callers({ symbol: "<symbol>", projectPath: "<android_project_dir>" })` (or `mcp__homegraph__impact` for the wider blast radius) returns who reaches it. Walk callers upward until hitting an `Activity` / `Fragment` / `@Composable` host. That host is an entry point. If the walk passes through intermediate dialog / popup / bottom-sheet / inner-composable components that directly reference the target key, record each as a **separate entry point** — these represent distinct user-facing surfaces within the host. | Covers structural blind spots Path 1 misses: deeply nested consumers, pass-through navigation pages, manifest-declared receivers. |
|
|
181
|
+
### 场景概述
|
|
177
182
|
|
|
178
|
-
|
|
183
|
+
用户从歌曲列表页,通过单首歌曲的更多操作-添加到歌单,将一首歌曲添加到歌单
|
|
179
184
|
|
|
180
|
-
|
|
185
|
+
### 场景逻辑步骤
|
|
181
186
|
|
|
182
|
-
|
|
187
|
+
- 1. 用户在歌曲列表页点击某首歌曲的"更多操作"按钮
|
|
188
|
+
- 2. 用户在弹出菜单中点击"添加到歌单",弹出歌单选择弹窗
|
|
189
|
+
- 3. 歌单选择弹窗中包含当前所有已经创建好的歌单以及新建歌单按钮
|
|
190
|
+
- 3.1 用户可以在歌单选择弹窗中点击已有的歌单将歌曲添加到歌单中,触发toast提示“已添加到歌单”
|
|
191
|
+
- 3.2 用户可以点击新建歌单按钮创建新歌单,歌单创建成功后返回歌单选择弹窗,弹窗的当前歌单列表刷新后,新创建的歌单位于最上面,点击新歌单将歌曲添加到新创建的歌单中,触发toast提示“已添加到歌单”
|
|
192
|
+
- 4. 歌曲被添加到目标歌单,并按目标歌单当前的排序规则刷新歌曲列表
|
|
193
|
+
- 4.1 如果目标歌单排序规则为"按添加到歌单时间排序",则该歌曲直接添加到歌曲列表最上方
|
|
194
|
+
- 4.2 如果目标歌单排序规则为其他规则,则按相应规则刷新歌曲列表进行排序
|
|
195
|
+
- 5. 歌单封面刷新为该歌曲对应的封面
|
|
183
196
|
|
|
184
|
-
|
|
185
|
-
- **Pass A · Feature code**: enumerate hosts via `mcp__homegraph__search({ kind: "class" | "component", projectPath })` (Activities / Fragments / Composables), then `Grep` `AndroidManifest.xml` for non-default `configChanges` (orientation / resize cases) and `mcp__homegraph__files({ pattern, projectPath })` / `Grep` over `res/` for layout resource qualifiers matching the REQ topic (e.g. `-land`, `-sw600dp`, `-night`). Manifest attributes and resource qualifiers live outside the code graph, so `Grep` is authoritative there.
|
|
186
|
-
- **Pass B · Settings breadth**: For EACH distinct keyword in the REQ body, run `mcp__homegraph__search` + `Grep` to enumerate ALL settings / configuration screens that reference that keyword or a semantically related term. Terse REQs frequently span multiple unrelated settings pages; anchoring on the single most obvious page is the primary failure mode. The union of Pass A and Pass B is the recall result.
|
|
187
|
-
2. If ≥3 plausible candidates → list them in the trace's `Status` section as `candidate_hosts: [...]` and proceed normally.
|
|
188
|
-
3. If <3 candidates → invoke `AskUserQuestion`: show the candidate list, ask which are in-scope for this REQ. Do NOT silently guess.
|
|
189
|
-
4. Mark in trace `Status` block: `terse_req: true` (this signal feeds 3.4 review).
|
|
190
|
-
5. **3.4 Review MUST verify**: every settings screen discovered in Pass B has at least one Entry or Touched-entry in the trace. A discovered-but-untraced screen → fail review, return to 3.3.
|
|
197
|
+
## 场景二
|
|
191
198
|
|
|
192
|
-
|
|
199
|
+
### 场景概述
|
|
193
200
|
|
|
194
|
-
|
|
195
|
-
- Path 1 + Path 2 both return zero, before writing `no_recall`.
|
|
196
|
-
- Deviations from `REQ_DESC` exceed five AND touch core behavior (REQ may be stale; confirm before proceeding).
|
|
201
|
+
用户从歌曲列表页,通过多选操作-添加到歌单,将多首歌曲同时添加到歌单
|
|
197
202
|
|
|
198
|
-
|
|
203
|
+
### 场景逻辑步骤
|
|
199
204
|
|
|
200
|
-
|
|
205
|
+
- 1. 用户在歌曲列表页进入多选模式,依次选中多首歌曲
|
|
206
|
+
- 2. 用户点击"添加到歌单"按钮,弹出歌单选择弹窗
|
|
207
|
+
- 3. 歌单选择弹窗中包含当前所有已经创建好的歌单以及新建歌单按钮
|
|
208
|
+
- 3.1 用户可以在歌单选择弹窗中点击已有的歌单将歌曲添加到歌单中,触发toast提示“已添加到歌单”
|
|
209
|
+
- 3.2 用户可以点击新建歌单按钮创建新歌单,歌单创建成功后返回歌单选择弹窗,弹窗的当前歌单列表刷新后,新创建的歌单位于最上面,点击新歌单将歌曲添加到新创建的歌单中,触发toast提示“已添加到歌单”
|
|
210
|
+
- 4. 所选歌曲添加到目标歌单,并按目标歌单当前的排序规则刷新歌曲列表
|
|
211
|
+
- 4.1 如果目标歌单排序规则为"按添加到歌单时间排序",则按用户多选过程中每首歌的选中顺序决定添加次序,最先选中的歌曲在最上方(即添加到歌单的时间最晚)
|
|
212
|
+
- 4.2 如果目标歌单排序规则为其他规则,则按相应规则刷新歌曲列表进行排序
|
|
213
|
+
- 5. 歌单封面刷新为最后添加到歌单中的歌曲对应的封面
|
|
201
214
|
|
|
202
|
-
|
|
215
|
+
## 场景三
|
|
203
216
|
|
|
204
|
-
|
|
205
|
-
|---|---|---|
|
|
206
|
-
| 1 | Survey candidate symbols for each anchor from 3.1 | `mcp__homegraph__search` → `mcp__homegraph__explore` / `node` |
|
|
207
|
-
| 2 | Full call chain (callers / callees, up and down) | `mcp__homegraph__callers` / `callees` / `impact` |
|
|
208
|
-
| 3 | Cross-class traversal / reverse-lookup state writers / aggregation | `mcp__homegraph__impact` (deep reverse closure; raise `depth`), then `Grep` for literal keys |
|
|
209
|
-
| 4 | Exact literal positioning (settings keys, DAO columns, intent actions, preference `android:key`) | `Grep` |
|
|
210
|
-
| 5 | Final `file:line` verification / zero-hit counter-evidence | `Read` (small window) / `Grep` |
|
|
217
|
+
### 场景概述
|
|
211
218
|
|
|
212
|
-
|
|
213
|
-
> - **Reverse-lookup from a known symbol** (who writes / reaches this state, cross-class closure, aggregation) → prefer `mcp__homegraph__impact({ symbol, depth, projectPath })` and raise `depth` for multi-hop. It traverses the full reverse-dependency closure — deeper than `callers` (depth-1). Use `callers` / `callees` only for a single hop.
|
|
214
|
-
> - **Seedless enumeration** (all hosts of a kind, anything matching a pattern / manifest attribute / resource qualifier) → `impact` cannot help (it needs a starting symbol); use `mcp__homegraph__search({ kind })` + `mcp__homegraph__files` + `Grep`.
|
|
219
|
+
用户从专辑详情页,通过单首歌曲的更多操作入口,将一首歌曲添加到歌单
|
|
215
220
|
|
|
216
|
-
|
|
221
|
+
### 场景逻辑步骤
|
|
217
222
|
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
223
|
+
- 1. 用户在专辑详情页点击某首歌曲的"更多操作"按钮
|
|
224
|
+
- 2. 用户在弹出菜单中点击"添加到歌单",弹出歌单选择弹窗
|
|
225
|
+
- 3. 歌单选择弹窗中包含当前所有已经创建好的歌单以及新建歌单按钮
|
|
226
|
+
- 3.1 用户可以在歌单选择弹窗中点击已有的歌单将歌曲添加到歌单中,触发toast提示“已添加到歌单”
|
|
227
|
+
- 3.2 用户可以点击新建歌单按钮创建新歌单,歌单创建成功后返回歌单选择弹窗,弹窗的当前歌单列表刷新后,新创建的歌单位于最上面,点击新歌单将歌曲添加到新创建的歌单中,触发toast提示“已添加到歌单”
|
|
228
|
+
- 4. 歌曲被添加到目标歌单,并按目标歌单当前的排序规则刷新歌曲列表
|
|
229
|
+
- 4.1 如果目标歌单排序规则为"按添加到歌单时间排序",则该歌曲直接添加到歌曲列表最上方
|
|
230
|
+
- 4.2 如果目标歌单排序规则为其他规则,则按相应规则刷新歌曲列表进行排序
|
|
231
|
+
- 5. 歌单封面刷新为该歌曲对应的封面
|
|
226
232
|
|
|
227
|
-
|
|
233
|
+
## 场景四
|
|
228
234
|
|
|
229
|
-
|
|
230
|
-
# Code trace · <feature>
|
|
235
|
+
### 场景概述
|
|
231
236
|
|
|
232
|
-
|
|
233
|
-
status: ok | no_recall | error
|
|
234
|
-
project-path: <android_project_dir>
|
|
235
|
-
backend: homegraph
|
|
237
|
+
用户从艺术家详情页,通过单首歌曲的更多操作入口,将一首歌曲添加到歌单
|
|
236
238
|
|
|
237
|
-
|
|
238
|
-
- Entry 1: <UI path / page name> — file:line — recalled by: path 1 | path 2 | both
|
|
239
|
-
- ...
|
|
239
|
+
### 场景逻辑步骤
|
|
240
240
|
|
|
241
|
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
241
|
+
- 1. 用户在艺术家详情页点击某首歌曲的"更多操作"按钮
|
|
242
|
+
- 2. 用户在弹出菜单中点击"添加到歌单",弹出歌单选择弹窗
|
|
243
|
+
- 3. 歌单选择弹窗中包含当前所有已经创建好的歌单以及新建歌单按钮
|
|
244
|
+
- 3.1 用户可以在歌单选择弹窗中点击已有的歌单将歌曲添加到歌单中,触发toast提示“已添加到歌单”
|
|
245
|
+
- 3.2 用户可以点击新建歌单按钮创建新歌单,歌单创建成功后返回歌单选择弹窗,弹窗的当前歌单列表刷新后,新创建的歌单位于最上面,点击新歌单将歌曲添加到新创建的歌单中,触发toast提示“已添加到歌单”
|
|
246
|
+
- 4. 歌曲被添加到目标歌单,并按目标歌单当前的排序规则刷新歌曲列表
|
|
247
|
+
- 4.1 如果目标歌单排序规则为"按添加到歌单时间排序",则该歌曲直接添加到歌曲列表最上方
|
|
248
|
+
- 4.2 如果目标歌单排序规则为其他规则,则按相应规则刷新歌曲列表进行排序
|
|
249
|
+
- 5. 歌单封面刷新为该歌曲对应的封面
|
|
249
250
|
|
|
250
|
-
##
|
|
251
|
-
(each entry repeats the claim / layers / interaction / data_flow field block)
|
|
251
|
+
## 场景五
|
|
252
252
|
|
|
253
|
-
|
|
254
|
-
- Trigger: <track-change / Pro status change / permission change / foreground-background switch / network change / lyrics document change / current track is null> — <file:line> — behavior: <one sentence>
|
|
255
|
-
- (write "None" if no implicit trigger applies)
|
|
253
|
+
### 场景概述
|
|
256
254
|
|
|
257
|
-
|
|
258
|
-
- Entity X: <file:line + field list + semantics>
|
|
259
|
-
- For dependent REQs: <dependency-key-name> sourced from feature `<depended-feature>` at file:line
|
|
260
|
-
- ...
|
|
255
|
+
用户从文件夹详情页,通过单首歌曲的更多操作入口,将一首歌曲添加到歌单
|
|
261
256
|
|
|
262
|
-
|
|
263
|
-
- <AndroidManifest.xml / build.gradle entries with file:line, shared across multiple entries>
|
|
264
|
-
- ... (write "None" explicitly if no cross-entry declaration applies; per-entry manifest facts live in each Entry's `manifest` layer field)
|
|
257
|
+
### 场景逻辑步骤
|
|
265
258
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
259
|
+
- 1. 用户在文件夹详情页点击某首歌曲的"更多操作"按钮
|
|
260
|
+
- 2. 用户在弹出菜单中点击"添加到歌单",弹出歌单选择弹窗
|
|
261
|
+
- 3. 歌单选择弹窗中包含当前所有已经创建好的歌单以及新建歌单按钮
|
|
262
|
+
- 3.1 用户可以在歌单选择弹窗中点击已有的歌单将歌曲添加到歌单中,触发toast提示“已添加到歌单”
|
|
263
|
+
- 3.2 用户可以点击新建歌单按钮创建新歌单,歌单创建成功后返回歌单选择弹窗,弹窗的当前歌单列表刷新后,新创建的歌单位于最上面,点击新歌单将歌曲添加到新创建的歌单中,触发toast提示“已添加到歌单”
|
|
264
|
+
- 4. 歌曲添加到目标歌单,并按目标歌单当前的排序规则刷新歌曲列表
|
|
265
|
+
- 4.1 如果目标歌单排序规则为"按添加到歌单时间排序",则该歌曲直接添加到歌曲列表最上方
|
|
266
|
+
- 4.2 如果目标歌单排序规则为其他规则,则按相应规则刷新歌曲列表进行排序
|
|
267
|
+
- 5. 歌单封面刷新为该歌曲对应的封面
|
|
270
268
|
|
|
271
|
-
##
|
|
272
|
-
### Touched entries (all UI paths, not limited to REQ_DESC mentions)
|
|
273
|
-
(each touched entry uses the same `claim` / `layers` / `interaction` / `data_flow` field block as the Entry template above)
|
|
274
|
-
|
|
275
|
-
### Consumers (who reads this state / data)
|
|
276
|
-
- Consumer: <component name> — file:line
|
|
269
|
+
## 场景六
|
|
277
270
|
|
|
278
|
-
###
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
-
|
|
286
|
-
|
|
287
|
-
-
|
|
288
|
-
|
|
271
|
+
### 场景概述
|
|
272
|
+
|
|
273
|
+
用户从文件夹详情页,通过多选操作,将多首歌曲同时添加到歌单
|
|
274
|
+
|
|
275
|
+
### 场景逻辑步骤
|
|
276
|
+
|
|
277
|
+
- 1. 用户在文件夹详情页进入多选模式,依次选中多首歌曲
|
|
278
|
+
- 2. 用户点击"添加到歌单"按钮,弹出歌单选择弹窗
|
|
279
|
+
- 3. 歌单选择弹窗中包含当前所有已经创建好的歌单以及新建歌单按钮
|
|
280
|
+
- 3.1 用户可以在歌单选择弹窗中点击已有的歌单将歌曲添加到歌单中,触发toast提示“已添加到歌单”
|
|
281
|
+
- 3.2 用户可以点击新建歌单按钮创建新歌单,歌单创建成功后返回歌单选择弹窗,弹窗的当前歌单列表刷新后,新创建的歌单位于最上面,点击新歌单将歌曲添加到新创建的歌单中,触发toast提示“已添加到歌单”
|
|
282
|
+
- 4. 所选歌曲添加到目标歌单,并按目标歌单当前的排序规则刷新歌曲列表
|
|
283
|
+
- 4.1 如果目标歌单排序规则为"按添加到歌单时间排序",则按用户多选过程中每首歌的选中顺序决定添加次序,最先选中的歌曲在最上方(即添加到歌单的时间最晚)
|
|
284
|
+
- 4.2 如果目标歌单排序规则为其他规则,则按相应规则刷新歌曲列表进行排序
|
|
285
|
+
- 5. 歌单封面刷新为最后添加到歌单中的歌曲对应的封面
|
|
286
|
+
|
|
287
|
+
## 场景七
|
|
288
|
+
|
|
289
|
+
### 场景概述
|
|
290
|
+
|
|
291
|
+
用户进入歌单详情页,查看歌单名称及歌曲列表
|
|
292
|
+
|
|
293
|
+
### 场景逻辑步骤
|
|
294
|
+
|
|
295
|
+
- 1. 用户点击某个歌单进入歌单详情页
|
|
296
|
+
- 2. 页面顶部展示歌单名字
|
|
297
|
+
- 3. 页面下方展示歌单包含的歌曲列表,歌曲按照当前歌单配置的排序规则进行展示
|
|
298
|
+
- 4. 新建歌单的默认排序规则为"按添加到歌单时间排序"(后添加到歌单的歌曲排在上面)
|
|
299
|
+
|
|
300
|
+
## 场景八
|
|
301
|
+
|
|
302
|
+
### 场景概述
|
|
303
|
+
|
|
304
|
+
用户在歌单详情页切换排序规则为"按添加到歌单时间排序"以外的其他规则
|
|
289
305
|
|
|
290
|
-
|
|
306
|
+
### 场景逻辑步骤
|
|
291
307
|
|
|
292
|
-
|
|
308
|
+
- 1. 用户在歌单详情页点击排序选项入口
|
|
309
|
+
- 2. 用户选择其他排序规则(如标题、艺术家等)
|
|
310
|
+
- 3. 歌曲列表按所选规则重新排序并刷新展示
|
|
311
|
+
- 4. 该排序规则在用户再次切换前保持生效,后续新添加的歌曲按该规则插入对应位置
|
|
293
312
|
|
|
294
|
-
|
|
295
|
-
- **No omission** — every detail in `REQ_DESC` has a counterpart in the trace (Entry / behavior / deviation). If REQ mentions a feature code does not implement, record as deviation, not omission.
|
|
296
|
-
- **Method-discipline compliance** (Multi-layer claim + Replayable fact) — sample-verify random `file:line` anchors via `mcp__homegraph__node` / `Read` (≥1 line drift → fail); sample-verify every count / ordering phrase against source (unreplayable → fail); every Entry / Touched-entry has all three layer fields filled (hit or `N/A: <reason>`); every Non-consumer claim has all four structured fields (`claim` / `closure_layers` / `tools` / `zero_hits`).
|
|
297
|
-
- **Implicit triggers coverage** — the trace's `Implicit triggers` section is present and explicitly filled (≥1 trigger OR `None`). Absence of the section = fail review.
|
|
298
|
-
- **Trace section presence audit** — every trace MUST contain these H2 sections (with `None` if truly empty; absence = fail): `Status` / `Recalled entry points` / per `Entry` (all 4 fields: `claim` / `layers` / `interaction` / `data_flow`) / `Implicit triggers` / `Core business entities` / `Cross-entry shared declarations` / `Deviations from REQ_DESC` / `Scope / Boundary` / `Same-source cross-reference`.
|
|
313
|
+
## 场景九
|
|
299
314
|
|
|
300
|
-
|
|
315
|
+
### 场景概述
|
|
301
316
|
|
|
302
|
-
|
|
317
|
+
当用户尝试将已存在于目标歌单中的歌曲再次添加到该歌单时,不会重复添加
|
|
303
318
|
|
|
304
|
-
|
|
319
|
+
### 场景逻辑步骤
|
|
305
320
|
|
|
306
|
-
|
|
321
|
+
- 1. 用户通过任意入口(单首或多选)选择歌曲并添加到目标歌单,触发toast提示“已添加到歌单”
|
|
322
|
+
- 2. 如果所选歌曲中存在已在目标歌单中的歌曲,该歌曲不会被重复添加,其原有的添加时间保持不变
|
|
323
|
+
- 3. 对于本次操作中尚未在目标歌单中的歌曲,按对应排序规则正常添加
|
|
307
324
|
|
|
308
|
-
|
|
309
|
-
- **Shared-mechanic factoring** — for enumerated-value settings (three-way / four-way / radio-group) accessible from multiple entry points, factor the shared menu interaction across all entries into ONE scenario; give each enum value its OWN runtime-semantics scenario. Do NOT split the mechanical scenario per entry point, and do NOT bundle "user picks X" with "what X does" in the same scenario per value.
|
|
310
|
-
- **Binary-toggle anti-pattern** — a binary on/off switch is ONE trigger; write ONE scenario for the toggle (both directions), with linked-control side-effects as sub-bullets. Write SEPARATE scenarios for each state's runtime rendering (e.g. "when ON, cover rotates" / "when OFF, cover is static"). Do NOT split "turn on" / "turn off" into independent scenes.
|
|
311
|
-
- **Same-source cross-reference** — if the trace's `Same-source cross-reference` section is non-empty, append a short note at the end of the spec referencing the other `<feature>-SPEC.md` (e.g. "This setting also exists under `<other-feature>-SPEC.md` with identical behavior").
|
|
312
|
-
- **REQ-vs-code-string arbitration** — code's user-facing strings (toast / notification / dialog / snackbar / error) that conflict with `REQ_DESC` are **deviation evidence**, NOT authoritative facts. Author spec body per `REQ_DESC` phrasing; record the conflicting string + `file:line` in trace's `Deviations`. Do NOT copy code strings verbatim into the spec.
|
|
325
|
+
## 场景十
|
|
313
326
|
|
|
314
|
-
|
|
327
|
+
### 场景概述
|
|
315
328
|
|
|
316
|
-
|
|
329
|
+
用户在歌单选择弹窗中取消添加到歌单操作
|
|
317
330
|
|
|
318
|
-
|
|
331
|
+
### 场景逻辑步骤
|
|
332
|
+
|
|
333
|
+
- 1. 用户通过任意入口触发"添加到歌单",弹出歌单选择弹窗
|
|
334
|
+
- 2. 用户通过点击弹窗外部区域关闭弹窗
|
|
335
|
+
- 3. 歌单内容不发生任何变化,用户返回操作前的页面状态
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
## 场景十一
|
|
339
|
+
|
|
340
|
+
### 场景概述
|
|
341
|
+
|
|
342
|
+
歌单选择弹窗需要包含当前所有已创建的歌单及歌曲信息
|
|
343
|
+
|
|
344
|
+
### 场景逻辑步骤
|
|
345
|
+
|
|
346
|
+
- 1. 用户通过添加到歌单操作触发歌单选择弹窗
|
|
347
|
+
- 2. 歌单选择弹窗通过列表形式展示当前所有已经创建好的歌单,每个歌单对应的歌曲数目是准确的
|
|
348
|
+
|
|
349
|
+
## 场景十二
|
|
350
|
+
|
|
351
|
+
### 场景概述
|
|
352
|
+
|
|
353
|
+
添加歌曲到歌单后,歌单的歌曲数量需要实时刷新
|
|
354
|
+
|
|
355
|
+
### 场景逻辑步骤
|
|
356
|
+
|
|
357
|
+
- 1. 用户将歌曲添加到歌单
|
|
358
|
+
- 2. 歌单列表页,歌单详情页,歌单选择弹窗中该歌单对应的歌曲数目需要实时刷新
|
|
359
|
+
```
|
|
319
360
|
|
|
320
361
|
---
|
|
321
362
|
|
|
322
|
-
##
|
|
363
|
+
## Workflow
|
|
364
|
+
|
|
365
|
+
### Step 0 — Validate inputs and split requirements
|
|
366
|
+
|
|
367
|
+
1. Verify `requirement_description_file` exists and is a readable file, then split its content into individual requirements by input type. Keep each requirement's text verbatim and record them in order; do NOT analyze them yet. If no requirement can be extracted, stop and report the error.
|
|
368
|
+
- **Excel type (`.xlsx` / `.xlsm` / `.csv`)**: run `node <skill-dir>/scripts/parse_requirements.ts --input <requirement_description_file> --json` via `Bash` to read the file content. Each item of the returned JSON array is one raw requirement: `uiPath` is the title, `description` is the requirement body. If the script errors, surface it verbatim and stop.
|
|
369
|
+
- **Text type (`.txt` / `.md`)**: read the content directly and split it into individual requirements (each requirement starts with a title line followed by its description; requirements are separated by blank lines).
|
|
370
|
+
2. Verify `android_project_dir` exists and is a directory.
|
|
371
|
+
3. Ensure `spec_output_dir` exists (create it if it does not).
|
|
372
|
+
|
|
373
|
+
### Step 1 — Ensure homegraph has a fresh index for the project
|
|
374
|
+
|
|
375
|
+
homegraph is invoked exclusively through its CLI via `Bash`. Always prefix commands with `npx` (e.g. `npx --yes homegraph status <android_project_dir>`); `npx` resolves the binary without requiring a global install. All index management and code query commands share the same CLI — there is no MCP surface in this skill.
|
|
376
|
+
|
|
377
|
+
homegraph indexes per-project into a local `.homegraph/` directory; there is no central repo registry. Always pass the Android project path as the positional `[path]` argument to scope the command to the Android project (this skill's working directory is the spec project, NOT the Android project, so omitting the path queries the wrong project).
|
|
378
|
+
|
|
379
|
+
Procedure:
|
|
380
|
+
|
|
381
|
+
1. Run `npx --yes homegraph status <android_project_dir>` to inspect the index state.
|
|
382
|
+
2. Decide based on the output:
|
|
383
|
+
- **Not indexed** (no `.homegraph/`) → run `npx --yes homegraph init -i <android_project_dir>`, wait for completion.
|
|
384
|
+
- **Stale** (`npx --yes homegraph status` output does NOT contain `[OK] Index is up to date`) → run `npx --yes homegraph sync <android_project_dir>` (incremental; use `npx --yes homegraph index <android_project_dir> --force` for a full rebuild), wait for completion.
|
|
385
|
+
- **Fresh** → proceed to Step 2.
|
|
386
|
+
|
|
387
|
+
**Hard fail policy** — any of the following stops the skill and surfaces the error to the user; do NOT degrade to `Read` + `Grep`:
|
|
388
|
+
|
|
389
|
+
- `homegraph` CLI is not reachable via `npx` → ask the user to install it (`npm install -g homegraph` or `npx --yes homegraph install`).
|
|
390
|
+
- `npx --yes homegraph status`, `init`, `sync`, or `index` returns an error → surface the error verbatim and stop. Do not attempt spec generation without an index — the resulting spec would miss code-grounded scenarios.
|
|
391
|
+
- Any `npx --yes homegraph` query reports the project is not indexed → verify `init -i` ran against `android_project_dir`.
|
|
392
|
+
|
|
393
|
+
### Step 2 — Process each requirement independently, one at a time
|
|
394
|
+
|
|
395
|
+
For each requirement split out in Step 0, in order, run 2.1 → 2.4 end-to-end before moving to the next requirement.
|
|
396
|
+
|
|
397
|
+
- **2.1 Scope**: Take this requirement's title + description verbatim as the raw requirement under analysis. If it is empty, warn and skip to the next requirement.
|
|
398
|
+
- **2.2 Analyze**: Explore the Android codebase for this requirement using the `npx --yes homegraph` CLI (via `Bash`) to retrieve the complete code implementation (entry points, end-to-end call chains, state writes / persistence keys, manifest declarations). Query commands (`query` / `explore` / `node` / `callers` / `callees` / `impact` / `files`) resolve their target project from the current working directory's nearest `.homegraph/` index, so run them from within the Android project root using a subshell — e.g. `cd <android_project_dir> && npx --yes homegraph explore "<query>"` (the index commands `status` / `init` / `sync` / `index` accept an explicit path argument, see Step 1). Use `npx --yes homegraph query "<keyword>"` / `npx --yes homegraph explore "<query>"` to locate symbols and read their line-numbered source; `npx --yes homegraph node "<symbol|file>"` to read a single symbol or whole file; `npx --yes homegraph callers "<symbol>"` / `npx --yes homegraph callees "<symbol>"` to walk call chains up and down; `npx --yes homegraph impact "<symbol>"` for change blast radius; `npx --yes homegraph files` to enumerate indexed files; and `Grep` for exact literals (settings keys, DAO columns, `android:key`) that live outside the code graph. Always run query commands from `<android_project_dir>` — this skill's working directory is the spec project, NOT the Android project, so running them from elsewhere queries the wrong project (or none). Use the CLI directly — do NOT invoke any MCP tool or nested exploration skill. If any `npx --yes homegraph` call fails unexpectedly, surface the error and stop.
|
|
399
|
+
- **2.3 Decompose**: Using the raw requirement + code from 2.2, generate the spec per `## Principles` and `## Spec Few-shot Samples`.
|
|
400
|
+
- **2.4 Write**: Write the spec to `<spec_output_dir>/<feature>-SPEC.md` (overwrite if exists), then move on to the next requirement.
|
|
401
|
+
|
|
402
|
+
### Step 3 — Report
|
|
323
403
|
|
|
324
|
-
|
|
325
|
-
- **No modification of the Android project** — `.gradle`, `AndroidManifest.xml`, source files. This skill is read-only.
|
|
404
|
+
After all requirements have been processed (or skipped with a warning), report a brief summary listing each generated spec file path and any requirements that were skipped.
|