@zeyue0329/xiaoma-cli 1.7.0 → 1.8.0

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 (248) hide show
  1. package/README.md +33 -33
  2. package/package.json +3 -8
  3. package/pipeline-optimization-report.md +331 -564
  4. package/src/core/module-help.csv +10 -10
  5. package/src/core/skills/xiaoma-advanced-elicitation/SKILL.md +2 -2
  6. package/src/core/skills/xiaoma-advanced-elicitation/workflow.md +2 -2
  7. package/src/core/skills/xiaoma-brainstorming/SKILL.md +1 -1
  8. package/src/core/skills/xiaoma-brainstorming/steps/step-01-session-setup.md +4 -0
  9. package/src/core/skills/xiaoma-brainstorming/steps/step-01b-continue.md +3 -1
  10. package/src/core/skills/xiaoma-brainstorming/steps/step-02a-user-selected.md +5 -1
  11. package/src/core/skills/xiaoma-brainstorming/steps/step-02b-ai-recommended.md +3 -1
  12. package/src/core/skills/xiaoma-brainstorming/steps/step-02c-random-selection.md +3 -1
  13. package/src/core/skills/xiaoma-brainstorming/steps/step-02d-progressive-flow.md +3 -1
  14. package/src/core/skills/xiaoma-brainstorming/steps/step-03-technique-execution.md +2 -0
  15. package/src/core/skills/xiaoma-brainstorming/steps/step-04-idea-organization.md +2 -0
  16. package/src/core/skills/xiaoma-brainstorming/workflow.md +1 -2
  17. package/src/core/skills/xiaoma-distillator/SKILL.md +1 -1
  18. package/src/core/skills/xiaoma-distillator/agents/distillate-compressor.md +4 -4
  19. package/src/core/skills/xiaoma-distillator/resources/distillate-format-reference.md +34 -34
  20. package/src/core/skills/xiaoma-distillator/xiaoma-skill-manifest.yaml +1 -1
  21. package/src/core/skills/xiaoma-editorial-review-prose/SKILL.md +1 -1
  22. package/src/core/skills/xiaoma-editorial-review-structure/SKILL.md +1 -1
  23. package/src/core/skills/xiaoma-editorial-review-structure/workflow.md +1 -1
  24. package/src/core/skills/xiaoma-help/SKILL.md +2 -2
  25. package/src/core/skills/xiaoma-index-docs/SKILL.md +1 -1
  26. package/src/core/skills/xiaoma-party-mode/SKILL.md +2 -2
  27. package/src/core/skills/xiaoma-party-mode/steps/step-01-agent-loading.md +3 -3
  28. package/src/core/skills/xiaoma-party-mode/steps/step-02-discussion-orchestration.md +2 -2
  29. package/src/core/skills/xiaoma-party-mode/steps/step-03-graceful-exit.md +5 -5
  30. package/src/core/skills/xiaoma-party-mode/workflow.md +4 -4
  31. package/src/core/skills/xiaoma-review-adversarial-general/SKILL.md +1 -1
  32. package/src/core/skills/xiaoma-review-edge-case-hunter/SKILL.md +2 -2
  33. package/src/core/skills/xiaoma-shard-doc/SKILL.md +1 -1
  34. package/src/core/tasks/xiaoma-create-prd/SKILL.md +1 -1
  35. package/src/core/tasks/xiaoma-create-prd/data/prd-purpose.md +4 -4
  36. package/src/core/tasks/xiaoma-create-prd/data/project-types.csv +1 -1
  37. package/src/core/tasks/xiaoma-create-prd/steps-c/step-11-polish.md +1 -1
  38. package/src/xmc/agents/analyst.agent.yaml +3 -3
  39. package/src/xmc/agents/qa.agent.yaml +1 -1
  40. package/src/xmc/agents/sm.agent.yaml +3 -3
  41. package/src/xmc/agents/tech-writer/tech-writer-sidecar/documentation-standards.md +2 -2
  42. package/src/xmc/agents/tech-writer/xiaoma-skill-manifest.yaml +1 -1
  43. package/src/xmc/agents/xiaoma-skill-manifest.yaml +8 -8
  44. package/src/xmc/module-help.csv +31 -31
  45. package/src/xmc/module.yaml +2 -2
  46. package/src/xmc/teams/default-party.csv +14 -14
  47. package/src/xmc/teams/team-fullstack.yaml +1 -1
  48. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-04-create-prd.md +2 -1
  49. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-05-validate-prd.md +3 -2
  50. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-06-create-epics.md +14 -5
  51. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-08-finalize.md +3 -3
  52. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/workflow.md +1 -0
  53. package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/SKILL.md +1 -1
  54. package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/SKILL.md +1 -1
  55. package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/SKILL.md +1 -1
  56. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/SKILL.md +1 -1
  57. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-02-vision.md +1 -0
  58. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-03-users.md +1 -0
  59. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-04-metrics.md +1 -0
  60. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-05-scope.md +1 -0
  61. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/SKILL.md +1 -1
  62. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/contextual-discovery.md +7 -7
  63. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/draft-and-review.md +5 -5
  64. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/finalize.md +1 -1
  65. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/guided-elicitation.md +2 -2
  66. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/xiaoma-manifest.json +2 -2
  67. package/src/xmc/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +4 -4
  68. package/src/xmc/workflows/2-plan-workflows/create-prd/data/project-types.csv +1 -1
  69. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
  70. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +16 -16
  71. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +9 -9
  72. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +1 -1
  73. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +8 -8
  74. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
  75. package/src/xmc/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +2 -2
  76. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/SKILL.md +1 -1
  77. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/SKILL.md +1 -1
  78. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01-discovery.md +13 -17
  79. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01b-legacy-conversion.md +9 -13
  80. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-02-review.md +4 -8
  81. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-03-edit.md +9 -13
  82. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-04-complete.md +2 -5
  83. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/workflow.md +1 -2
  84. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/SKILL.md +1 -1
  85. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/prd-purpose.md +4 -4
  86. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/project-types.csv +1 -1
  87. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-01-discovery.md +1 -4
  88. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02-format-detection.md +16 -19
  89. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02b-parity-check.md +8 -11
  90. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-03-density-validation.md +1 -4
  91. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +0 -3
  92. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-05-measurability-validation.md +0 -3
  93. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-06-traceability-validation.md +0 -3
  94. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +0 -3
  95. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +0 -3
  96. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-09-project-type-validation.md +0 -3
  97. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-10-smart-validation.md +0 -3
  98. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +8 -11
  99. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-12-completeness-validation.md +0 -3
  100. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-13-report-complete.md +2 -5
  101. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/workflow.md +2 -2
  102. package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md +1 -1
  103. package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/SKILL.md +1 -1
  104. package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md +1 -1
  105. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-01-init-and-validate.md +6 -3
  106. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-05-code-review.md +5 -6
  107. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-07-fix-and-retest.md +14 -7
  108. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-cycle-check.md +11 -2
  109. package/src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md +9 -8
  110. package/src/xmc/workflows/4-implementation/xiaoma-code-review/SKILL.md +2 -2
  111. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-01-gather-context.md +61 -0
  112. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-02-review.md +41 -0
  113. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-03-triage.md +50 -0
  114. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-04-present.md +38 -0
  115. package/src/xmc/workflows/4-implementation/xiaoma-code-review/workflow.md +33 -240
  116. package/src/xmc/workflows/4-implementation/xiaoma-correct-course/SKILL.md +1 -1
  117. package/src/xmc/workflows/4-implementation/xiaoma-correct-course/workflow.md +1 -1
  118. package/src/xmc/workflows/4-implementation/xiaoma-create-story/SKILL.md +1 -1
  119. package/src/xmc/workflows/4-implementation/xiaoma-create-story/workflow.md +3 -3
  120. package/src/xmc/workflows/4-implementation/xiaoma-dev-story/SKILL.md +1 -1
  121. package/src/xmc/workflows/4-implementation/xiaoma-dev-story/workflow.md +1 -1
  122. package/src/xmc/workflows/4-implementation/xiaoma-retrospective/SKILL.md +1 -1
  123. package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/SKILL.md +1 -1
  124. package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md +2 -2
  125. package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/SKILL.md +1 -1
  126. package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/workflow.md +5 -5
  127. package/src/xmc/workflows/xiaoma-document-project/SKILL.md +1 -1
  128. package/src/xmc/workflows/xiaoma-document-project/templates/index-template.md +1 -1
  129. package/src/xmc/workflows/xiaoma-document-project/templates/project-overview-template.md +1 -1
  130. package/src/xmc/workflows/xiaoma-document-project/templates/source-tree-template.md +1 -1
  131. package/src/xmc/workflows/xiaoma-generate-project-context/SKILL.md +1 -1
  132. package/src/xmc/workflows/xiaoma-generate-project-context/steps/step-01-discover.md +3 -1
  133. package/src/xmc/workflows/xiaoma-generate-project-context/steps/step-02-generate.md +2 -0
  134. package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/SKILL.md +1 -1
  135. package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/checklist.md +1 -1
  136. package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/workflow.md +2 -2
  137. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/SKILL.md +1 -1
  138. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-01-mode-detection.md +2 -2
  139. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev-new-preview/SKILL.md +1 -1
  140. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/SKILL.md +1 -1
  141. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/workflow.md +1 -0
  142. package/tools/cli/README.md +4 -4
  143. package/tools/cli/commands/install.js +1 -1
  144. package/tools/cli/commands/status.js +4 -4
  145. package/tools/cli/commands/uninstall.js +9 -9
  146. package/tools/cli/external-official-modules.yaml +2 -54
  147. package/tools/cli/installers/install-messages.yaml +5 -5
  148. package/tools/cli/installers/lib/core/config-collector.js +2 -2
  149. package/tools/cli/installers/lib/core/dependency-resolver.js +2 -2
  150. package/tools/cli/installers/lib/core/detector.js +9 -9
  151. package/tools/cli/installers/lib/core/ide-config-manager.js +7 -7
  152. package/tools/cli/installers/lib/core/installer.js +51 -51
  153. package/tools/cli/installers/lib/core/manifest-generator.js +6 -6
  154. package/tools/cli/installers/lib/core/manifest.js +3 -3
  155. package/tools/cli/installers/lib/custom/handler.js +5 -5
  156. package/tools/cli/installers/lib/ide/_base-ide.js +15 -15
  157. package/tools/cli/installers/lib/ide/_config-driven.js +31 -31
  158. package/tools/cli/installers/lib/ide/manager.js +8 -8
  159. package/tools/cli/installers/lib/ide/platform-codes.yaml +3 -3
  160. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +3 -3
  161. package/tools/cli/installers/lib/ide/shared/path-utils.js +3 -3
  162. package/tools/cli/installers/lib/ide/shared/skill-manifest.js +2 -2
  163. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +13 -13
  164. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +2 -2
  165. package/tools/cli/installers/lib/ide/shared/xiaoma-artifacts.js +1 -1
  166. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
  167. package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +1 -1
  168. package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +1 -1
  169. package/tools/cli/installers/lib/ide/templates/combined/default-task.md +1 -1
  170. package/tools/cli/installers/lib/ide/templates/combined/default-tool.md +1 -1
  171. package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +1 -1
  172. package/tools/cli/installers/lib/ide/templates/combined/kiro-agent.md +1 -1
  173. package/tools/cli/installers/lib/ide/templates/combined/kiro-task.md +1 -1
  174. package/tools/cli/installers/lib/ide/templates/combined/kiro-tool.md +1 -1
  175. package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow.md +1 -1
  176. package/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md +1 -1
  177. package/tools/cli/installers/lib/ide/templates/combined/opencode-task.md +3 -3
  178. package/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md +3 -3
  179. package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md +3 -3
  180. package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md +3 -3
  181. package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +1 -1
  182. package/tools/cli/installers/lib/ide/templates/combined/trae.md +1 -1
  183. package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +1 -1
  184. package/tools/cli/installers/lib/modules/manager.js +22 -22
  185. package/tools/cli/lib/agent/compiler.js +3 -3
  186. package/tools/cli/lib/agent/installer.js +9 -9
  187. package/tools/cli/lib/agent/template-engine.js +1 -1
  188. package/tools/cli/lib/agent-party-generator.js +3 -3
  189. package/tools/cli/lib/cli-utils.js +1 -1
  190. package/tools/cli/lib/project-root.js +5 -5
  191. package/tools/cli/lib/prompts.js +1 -1
  192. package/tools/cli/lib/ui.js +27 -27
  193. package/tools/cli/lib/xml-handler.js +1 -1
  194. package/tools/cli/lib/yaml-format.js +1 -1
  195. package/tools/cli/lib/yaml-xml-builder.js +2 -2
  196. package/tools/cli/xiaoma-cli.js +3 -3
  197. package/tools/platform-codes.yaml +2 -2
  198. package/tools/schema/agent.js +1 -1
  199. package/tools/xiaoma-npx-wrapper.js +1 -1
  200. package/.idea/codeStyles/Project.xml +0 -60
  201. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  202. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  203. package/.idea/jsLibraryMappings.xml +0 -6
  204. package/.idea/modules.xml +0 -8
  205. package/.idea/prettier.xml +0 -6
  206. package/.idea/vcs.xml +0 -6
  207. package/.idea/workspace.xml +0 -146
  208. package/AGENTS.md +0 -9
  209. package/README_CN.md +0 -121
  210. package/XIAOMA-CLI-GUIDE.md +0 -512
  211. package/src/core/skills/xiaoma-advanced-elicitation/SKILL.md.bak +0 -6
  212. package/src/core/skills/xiaoma-brainstorming/SKILL.md.bak +0 -6
  213. package/src/core/skills/xiaoma-distillator/SKILL.md.bak +0 -178
  214. package/src/core/skills/xiaoma-editorial-review-prose/SKILL.md.bak +0 -6
  215. package/src/core/skills/xiaoma-editorial-review-structure/SKILL.md.bak +0 -6
  216. package/src/core/skills/xiaoma-index-docs/SKILL.md.bak +0 -6
  217. package/src/core/skills/xiaoma-party-mode/SKILL.md.bak +0 -6
  218. package/src/core/skills/xiaoma-review-adversarial-general/SKILL.md.bak +0 -6
  219. package/src/core/skills/xiaoma-review-edge-case-hunter/SKILL.md.bak +0 -6
  220. package/src/core/skills/xiaoma-shard-doc/SKILL.md.bak +0 -6
  221. package/src/core/tasks/xiaoma-create-prd/SKILL.md.bak +0 -6
  222. package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/SKILL.md.bak +0 -6
  223. package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/SKILL.md.bak +0 -6
  224. package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/SKILL.md.bak +0 -6
  225. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/SKILL.md.bak +0 -6
  226. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/SKILL.md.bak +0 -88
  227. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/SKILL.md.bak +0 -6
  228. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/SKILL.md.bak +0 -6
  229. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/SKILL.md.bak +0 -6
  230. package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md.bak +0 -6
  231. package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/SKILL.md.bak +0 -6
  232. package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md.bak +0 -6
  233. package/src/xmc/workflows/4-implementation/xiaoma-code-review/SKILL.md.bak +0 -6
  234. package/src/xmc/workflows/4-implementation/xiaoma-correct-course/SKILL.md.bak +0 -6
  235. package/src/xmc/workflows/4-implementation/xiaoma-create-story/SKILL.md.bak +0 -6
  236. package/src/xmc/workflows/4-implementation/xiaoma-dev-story/SKILL.md.bak +0 -6
  237. package/src/xmc/workflows/4-implementation/xiaoma-retrospective/SKILL.md.bak +0 -6
  238. package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/SKILL.md.bak +0 -6
  239. package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/SKILL.md.bak +0 -6
  240. package/src/xmc/workflows/xiaoma-document-project/SKILL.md.bak +0 -6
  241. package/src/xmc/workflows/xiaoma-generate-project-context/SKILL.md.bak +0 -6
  242. package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/SKILL.md.bak +0 -6
  243. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/SKILL.md.bak +0 -6
  244. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev-new-preview/SKILL.md.bak +0 -6
  245. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/SKILL.md.bak +0 -6
  246. package/tools/format-workflow-md.js +0 -263
  247. package/tools/migrate-custom-module-paths.js +0 -124
  248. package/tools/skill-validator.md +0 -322
@@ -46,10 +46,12 @@ Adopt the Dev persona:
46
46
  ### 2. Analyze Failure Context
47
47
 
48
48
  1. Read the COMPLETE story file at `{current_story_path}`
49
- 2. Identify the source of failures:
50
- - Code review findings (from step-05): Check Dev Agent Record for review issues
51
- - QA test failures (from step-06): Check QA Results section for test failures
52
- 3. Compile a prioritized fix list:
49
+ 2. Identify the source of failures and set `{fix_source}`:
50
+ - Code review findings (from step-05): Check Dev Agent Record for review issues → `{fix_source}` = "code-review"
51
+ - QA test failures (from step-06): Check QA Results section for test failures → `{fix_source}` = "qa-testing"
52
+ - Mixed (both code review and QA issues): → `{fix_source}` = "mixed"
53
+ 3. Record `{fix_source}` — this determines post-fix routing (see section 6)
54
+ 4. Compile a prioritized fix list:
53
55
  - **Priority 1:** HIGH severity issues / failed acceptance criteria
54
56
  - **Priority 2:** MEDIUM severity issues / partial AC failures
55
57
  - **Priority 3:** LOW severity issues (fix if time permits)
@@ -86,8 +88,10 @@ After all fixes are applied:
86
88
  ### 6. Evaluate Fix Results
87
89
 
88
90
  **IF all tests pass AND all previously failed ACs now pass:**
89
- - Output: "All issues resolved in fix iteration {fix_iteration}. Tests passing. Proceeding to completion."
90
- - **NEXT:** Proceed to step-08 (complete story)
91
+ - Output: "All issues resolved in fix iteration {fix_iteration}. Tests passing."
92
+ - Determine routing based on `{fix_source}`:
93
+ - **IF `{fix_source}` == "code-review" or "mixed":** Run a targeted code re-check: re-verify that the specific code-review HIGH/MEDIUM issues are genuinely resolved (no full re-delegation required — do a focused inline verification of the fixed areas). If verified clean: **NEXT:** Proceed to step-08 (complete story). If new issues surface: Loop back to step-07.
94
+ - **IF `{fix_source}` == "qa-testing":** **NEXT:** Proceed to step-08 (complete story) directly — no additional code review needed.
91
95
 
92
96
  **IF some issues remain:**
93
97
  - Output: "Fix iteration {fix_iteration} resolved {fixed_count} issues. {remaining_count} issues remain: {remaining_list}"
@@ -97,9 +101,12 @@ After all fixes are applied:
97
101
 
98
102
  ## NEXT STEP
99
103
 
100
- **If all issues resolved:**
104
+ **If all issues resolved AND (`{fix_source}` == "qa-testing" OR post-fix code re-check passed):**
101
105
  **NEXT:** Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md`
102
106
 
107
+ **If all issues resolved but post-fix code re-check surfaced new issues (`{fix_source}` was "code-review" or "mixed"):**
108
+ **NEXT:** Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-07-fix-and-retest.md`
109
+
103
110
  **If issues remain and `{fix_iteration}` <= `{max_fix_iterations}`:**
104
111
  **NEXT:** Read fully and follow: `{project-root}/_xiaoma/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-07-fix-and-retest.md`
105
112
 
@@ -46,7 +46,16 @@ nextStepFile: null
46
46
 
47
47
  **3.5. Batch Mode Progress Checkpoint**
48
48
 
49
- Before looping back to step-02 for the next story, output a progress summary:
49
+ Before looping back to step-02 for the next story, refresh sprint status counts and output a progress summary:
50
+
51
+ 1. Reload the FULL file: `{sprint_status}` (status counts are stale since step-01 initialization)
52
+ 2. Recount all stories by current status:
53
+ - Update `{backlog_count}` — Stories with status "backlog"
54
+ - Update `{ready_count}` — Stories with status "ready-for-dev"
55
+ - Update `{in_progress_count}` — Stories with status "in-progress"
56
+ - Update `{review_count}` — Stories with status "review"
57
+ - Update `{done_count}` — Stories with status "done"
58
+ 3. Output progress summary:
50
59
 
51
60
  ```
52
61
  ═══════════════════════════════════════════════════
@@ -54,7 +63,7 @@ Before looping back to step-02 for the next story, output a progress summary:
54
63
  ═══════════════════════════════════════════════════
55
64
  - Stories Completed So Far: {stories_completed}
56
65
  - Starting Next Story: {current_story_key} (status: {found_status})
57
- - Sprint Status: Backlog {backlog_count} | Ready {ready_count} | In Progress {in_progress_count} | Review {review_count} | Done {done_count}
66
+ - Sprint Status (refreshed): Backlog {backlog_count} | Ready {ready_count} | In Progress {in_progress_count} | Review {review_count} | Done {done_count}
58
67
  - Pipeline Continuing...
59
68
  ═══════════════════════════════════════════════════
60
69
  ```
@@ -35,16 +35,17 @@ This uses **step-file architecture** for focused execution across a long-running
35
35
  - `{pipeline_mode}` — "single" (one story) or "batch" (all backlog stories)
36
36
  - `{current_story_key}` — Key of story being processed (e.g., "1-2-user-auth")
37
37
  - `{current_story_path}` — Full path to current story file (derived in step-01 after resolving `{current_story_key}`; re-set in step-02 skip branch for batch cycles)
38
- - `{fix_iteration}` — Bug fix loop counter (max 5)
38
+ - `{fix_iteration}` — Bug fix loop counter (max controlled by `{max_fix_iterations}`, default 5; reset per story)
39
+ - `{max_fix_iterations}` — Maximum fix-and-retest cycles per story (configurable via `max_fix_iterations` in config.yaml; default 5 if not set)
39
40
  - `{stories_completed}` — Count of stories completed in this pipeline run
40
41
  - `{pipeline_status}` — Current pipeline phase for tracking
41
- - `{validation_attempt}` — Story validation attempt counter (used in step-03, max 3)
42
- - `{steps_completed}` — Count of pipeline step files executed in this run (initialized to 0 in step-01)
43
- - `{backlog_count}` — Count of stories with status "backlog" (initialized in step-01)
44
- - `{ready_count}` — Count of stories with status "ready-for-dev" (initialized in step-01)
45
- - `{in_progress_count}` — Count of stories with status "in-progress" (initialized in step-01)
46
- - `{review_count}` — Count of stories with status "review" (initialized in step-01)
47
- - `{done_count}` — Count of stories with status "done" (initialized in step-01)
42
+ - `{validation_attempt}` — Story validation attempt counter (used in step-03, max 3; re-initialized at start of step-03 for each story)
43
+ - `{steps_completed}` — Count of pipeline step files executed in this run (initialized to 0 in step-01; accumulates across all stories in batch mode)
44
+ - `{backlog_count}` — Count of stories with status "backlog" (initialized in step-01; refreshed in step-09 batch checkpoints and final finalization)
45
+ - `{ready_count}` — Count of stories with status "ready-for-dev" (initialized in step-01; refreshed in step-09)
46
+ - `{in_progress_count}` — Count of stories with status "in-progress" (initialized in step-01; refreshed in step-09)
47
+ - `{review_count}` — Count of stories with status "review" (initialized in step-01; refreshed in step-09)
48
+ - `{done_count}` — Count of stories with status "done" (initialized in step-01; refreshed in step-09)
48
49
 
49
50
  ### Status Machine
50
51
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: xiaoma-code-review
3
- description: 'Perform adversarial code review finding specific issues. Use when the user says "run code review" or "review this code"'
3
+ description: 'Review code changes adversarially using parallel review layers (Blind Hunter, Edge Case Hunter, Acceptance Auditor) with structured triage into actionable categories. Use when the user says "run code review" or "review this code"'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -0,0 +1,61 @@
1
+ ---
2
+ diff_output: '' # set at runtime
3
+ spec_file: '' # set at runtime (path or empty)
4
+ review_mode: '' # set at runtime: "full" or "no-spec"
5
+ ---
6
+
7
+ # Step 1: Gather Context
8
+
9
+ ## RULES
10
+
11
+ - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
12
+ - The prompt that triggered this workflow IS the intent — not a hint.
13
+ - Do not modify any files. This step is read-only.
14
+
15
+ ## INSTRUCTIONS
16
+
17
+ 1. **Detect review intent from invocation text.** Check the triggering prompt for phrases that map to a review mode:
18
+ - "staged" / "staged changes" → Staged changes only
19
+ - "uncommitted" / "working tree" / "all changes" → Uncommitted changes (staged + unstaged)
20
+ - "branch diff" / "vs main" / "against main" / "compared to {branch}" → Branch diff (extract base branch if mentioned)
21
+ - "commit range" / "last N commits" / "{sha}..{sha}" → Specific commit range
22
+ - "this diff" / "provided diff" / "paste" → User-provided diff (do not match bare "diff" — it appears in other modes)
23
+ - When multiple phrases match, prefer the most specific match (e.g., "branch diff" over bare "diff").
24
+ - **If a clear match is found:** Announce the detected mode (e.g., "Detected intent: review staged changes only") and proceed directly to constructing `{diff_output}` using the corresponding sub-case from instruction 3. Skip to instruction 4 (spec question).
25
+ - **If no match from invocation text, check sprint tracking.** Look for a sprint status file (`*sprint-status*`) in `{implementation_artifacts}` or `{planning_artifacts}`. If found, scan for any story with status `review`. Handle as follows:
26
+ - **Exactly one `review` story:** Suggest it: "I found story {{story-id}} in `review` status. Would you like to review its changes? [Y] Yes / [N] No, let me choose". If confirmed, use the story context to determine the diff source (branch name derived from story slug, or uncommitted changes). If declined, fall through to instruction 2.
27
+ - **Multiple `review` stories:** Present them as numbered options alongside a manual choice option. Wait for user selection. Then use the selected story's context to determine the diff source as in the single-story case above, and proceed to instruction 3.
28
+ - **If no match and no sprint tracking:** Fall through to instruction 2.
29
+
30
+ 2. HALT. Ask the user: **What do you want to review?** Present these options:
31
+ - **Uncommitted changes** (staged + unstaged)
32
+ - **Staged changes only**
33
+ - **Branch diff** vs a base branch (ask which base branch)
34
+ - **Specific commit range** (ask for the range)
35
+ - **Provided diff or file list** (user pastes or provides a path)
36
+
37
+ 3. Construct `{diff_output}` from the chosen source.
38
+ - For **branch diff**: verify the base branch exists before running `git diff`. If it does not exist, HALT and ask the user for a valid branch.
39
+ - For **commit range**: verify the range resolves. If it does not, HALT and ask the user for a valid range.
40
+ - For **provided diff**: validate the content is non-empty and parseable as a unified diff. If it is not parseable, HALT and ask the user to provide a valid diff.
41
+ - For **file list**: validate each path exists in the working tree. Construct `{diff_output}` by running `git diff HEAD -- <path1> <path2> ...`. If any paths are untracked (new files not yet staged), use `git diff --no-index /dev/null <path>` to include them. If the diff is empty (files have no uncommitted changes and are not untracked), ask the user whether to review the full file contents or to specify a different baseline.
42
+ - After constructing `{diff_output}`, verify it is non-empty regardless of source type. If empty, HALT and tell the user there is nothing to review.
43
+
44
+ 4. Ask the user: **Is there a spec or story file that provides context for these changes?**
45
+ - If yes: set `{spec_file}` to the path provided, verify the file exists and is readable, then set `{review_mode}` = `"full"`.
46
+ - If no: set `{review_mode}` = `"no-spec"`.
47
+
48
+ 5. If `{review_mode}` = `"full"` and the file at `{spec_file}` has a `context` field in its frontmatter listing additional docs, load each referenced document. Warn the user about any docs that cannot be found.
49
+
50
+ 6. Sanity check: if `{diff_output}` exceeds approximately 3000 lines, warn the user and offer to chunk the review by file group.
51
+ - If the user opts to chunk: agree on the first group, narrow `{diff_output}` accordingly, and list the remaining groups for the user to note for follow-up runs.
52
+ - If the user declines: proceed as-is with the full diff.
53
+
54
+ ### CHECKPOINT
55
+
56
+ Present a summary before proceeding: diff stats (files changed, lines added/removed), `{review_mode}`, and loaded spec/context docs (if any). HALT and wait for user confirmation to proceed.
57
+
58
+
59
+ ## NEXT
60
+
61
+ Read fully and follow `./step-02-review.md`
@@ -0,0 +1,41 @@
1
+ ---
2
+ failed_layers: '' # set at runtime: comma-separated list of layers that failed or returned empty
3
+ ---
4
+
5
+ # Step 2: Review
6
+
7
+ ## RULES
8
+
9
+ - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
10
+ - The Blind Hunter subagent receives NO project context — diff only.
11
+ - The Edge Case Hunter subagent receives diff and project read access.
12
+ - The Acceptance Auditor subagent receives diff, spec, and context docs.
13
+
14
+ ## INSTRUCTIONS
15
+
16
+ 1. Launch parallel subagents. Each subagent gets NO conversation history from this session:
17
+
18
+ - **Blind Hunter** -- Invoke the `xiaoma-review-adversarial-general` skill in a subagent. Pass `content` = `{diff_output}` only. No spec, no project access.
19
+
20
+ - **Edge Case Hunter** -- Invoke the `xiaoma-review-edge-case-hunter` skill in a subagent. Pass `content` = `{diff_output}`. This subagent has read access to the project.
21
+
22
+ - **Acceptance Auditor** (only if `{review_mode}` = `"full"`) -- A subagent that receives `{diff_output}`, the content of the file at `{spec_file}`, and any loaded context docs. Its prompt:
23
+ > You are an Acceptance Auditor. Review this diff against the spec and context docs. Check for: violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, contradictions between spec constraints and actual code. Output findings as a markdown list. Each finding: one-line title, which AC/constraint it violates, and evidence from the diff.
24
+
25
+ 2. **Subagent failure handling**: If any subagent fails, times out, or returns empty results, append the layer name to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers.
26
+
27
+ 3. If `{review_mode}` = `"no-spec"`, note to the user: "Acceptance Auditor skipped — no spec file provided."
28
+
29
+ 4. **Fallback** (if subagents are not available): Generate prompt files in `{implementation_artifacts}` -- one per active reviewer:
30
+ - `review-blind-hunter.md` (always)
31
+ - `review-edge-case-hunter.md` (always)
32
+ - `review-acceptance-auditor.md` (only if `{review_mode}` = `"full"`)
33
+
34
+ HALT. Tell the user to run each prompt in a separate session and paste back findings. When findings are pasted, resume from this point and proceed to step 3.
35
+
36
+ 5. Collect all findings from the completed layers.
37
+
38
+
39
+ ## NEXT
40
+
41
+ Read fully and follow `./step-03-triage.md`
@@ -0,0 +1,50 @@
1
+ ---
2
+ ---
3
+
4
+ # Step 3: Triage
5
+
6
+ ## RULES
7
+
8
+ - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
9
+ - Be precise. When uncertain between categories, prefer the more conservative classification.
10
+
11
+ ## INSTRUCTIONS
12
+
13
+ 1. **Normalize** findings into a common format. Expected input formats:
14
+ - Adversarial (Blind Hunter): markdown list of descriptions
15
+ - Edge Case Hunter: JSON array with `location`, `trigger_condition`, `guard_snippet`, `potential_consequence` fields
16
+ - Acceptance Auditor: markdown list with title, AC/constraint reference, and evidence
17
+
18
+ If a layer's output does not match its expected format, attempt best-effort parsing. Note any parsing issues for the user.
19
+
20
+ Convert all to a unified list where each finding has:
21
+ - `id` -- sequential integer
22
+ - `source` -- `blind`, `edge`, `auditor`, or merged sources (e.g., `blind+edge`)
23
+ - `title` -- one-line summary
24
+ - `detail` -- full description
25
+ - `location` -- file and line reference (if available)
26
+
27
+ 2. **Deduplicate.** If two or more findings describe the same issue, merge them into one:
28
+ - Use the most specific finding as the base (prefer edge-case JSON with location over adversarial prose).
29
+ - Append any unique detail, reasoning, or location references from the other finding(s) into the surviving `detail` field.
30
+ - Set `source` to the merged sources (e.g., `blind+edge`).
31
+
32
+ 3. **Classify** each finding into exactly one bucket:
33
+ - **intent_gap** -- The spec/intent is incomplete; cannot resolve from existing information. Only possible if `{review_mode}` = `"full"`.
34
+ - **bad_spec** -- The spec should have prevented this; spec is wrong or ambiguous. Only possible if `{review_mode}` = `"full"`.
35
+ - **patch** -- Code issue that is trivially fixable without human input. Just needs a code change.
36
+ - **defer** -- Pre-existing issue not caused by the current change. Real but not actionable now.
37
+ - **reject** -- Noise, false positive, or handled elsewhere.
38
+
39
+ If `{review_mode}` = `"no-spec"` and a finding would otherwise be `intent_gap` or `bad_spec`, reclassify it as `patch` (if code-fixable) or `defer` (if not).
40
+
41
+ 4. **Drop** all `reject` findings. Record the reject count for the summary.
42
+
43
+ 5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero findings remain after dropping rejects AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
44
+
45
+ 6. If zero findings remain after dropping rejects and no layers failed, note clean review.
46
+
47
+
48
+ ## NEXT
49
+
50
+ Read fully and follow `./step-04-present.md`
@@ -0,0 +1,38 @@
1
+ ---
2
+ ---
3
+
4
+ # Step 4: Present
5
+
6
+ ## RULES
7
+
8
+ - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
9
+ - Do NOT auto-fix anything. Present findings and let the user decide next steps.
10
+
11
+ ## INSTRUCTIONS
12
+
13
+ 1. Group remaining findings by category.
14
+
15
+ 2. Present to the user in this order (include a section only if findings exist in that category):
16
+
17
+ - **Intent Gaps**: "These findings suggest the captured intent is incomplete. Consider clarifying intent before proceeding."
18
+ - List each with title + detail.
19
+
20
+ - **Bad Spec**: "These findings suggest the spec should be amended. Consider regenerating or amending the spec with this context:"
21
+ - List each with title + detail + suggested spec amendment.
22
+
23
+ - **Patch**: "These are fixable code issues:"
24
+ - List each with title + detail + location (if available).
25
+
26
+ - **Defer**: "Pre-existing issues surfaced by this review (not caused by current changes):"
27
+ - List each with title + detail.
28
+
29
+ 3. Summary line: **X** intent_gap, **Y** bad_spec, **Z** patch, **W** defer findings. **R** findings rejected as noise.
30
+
31
+ 4. If clean review (zero findings across all layers after triage): state that N findings were raised but all were classified as noise, or that no findings were raised at all (as applicable).
32
+
33
+ 5. Offer the user next steps (recommendations, not automated actions):
34
+ - If `patch` findings exist: "These can be addressed in a follow-up implementation pass or manually."
35
+ - If `intent_gap` or `bad_spec` findings exist: "Consider running the planning workflow to clarify intent or amend the spec before continuing."
36
+ - If only `defer` findings remain: "No action needed for this change. Deferred items are noted for future attention."
37
+
38
+ Workflow complete.
@@ -1,261 +1,54 @@
1
- # Code Review Workflow
2
-
3
- **Goal:** Perform adversarial code review finding specific issues.
4
-
5
- **Your Role:** Adversarial Code Reviewer.
6
- - YOU ARE AN ADVERSARIAL CODE REVIEWER - Find what's wrong or missing!
7
- - Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}
8
- - Generate all documents in {document_output_language}
9
- - Your purpose: Validate story file claims against actual implementation
10
- - Challenge everything: Are tasks marked [x] actually done? Are ACs really implemented?
11
- - Be thorough and specific — find real issues, not manufactured ones. If the code is genuinely good after fixes, say so
12
- - Read EVERY file in the File List - verify implementation against story requirements
13
- - Tasks marked complete but not done = CRITICAL finding
14
- - Acceptance Criteria not implemented = HIGH severity finding
15
- - Do not review files that are not part of the application's source code. Always exclude the `_xiaoma/` and `_bmad-output/` folders from the review. Always exclude IDE and CLI configuration folders like `.cursor/` and `.windsurf/` and `.claude/`
16
-
17
1
  ---
18
-
19
- ## INITIALIZATION
20
-
21
- ### Configuration Loading
22
-
23
- Load config from `{project-root}/_xiaoma/xmc/config.yaml` and resolve:
24
-
25
- - `project_name`, `user_name`
26
- - `communication_language`, `document_output_language`
27
- - `user_skill_level`
28
- - `planning_artifacts`, `implementation_artifacts`
29
- - `date` as system-generated current datetime
30
-
31
- ### Paths
32
-
33
- - `sprint_status` = `{implementation_artifacts}/sprint-status.yaml`
34
-
35
- ### Input Files
36
-
37
- | Input | Description | Path Pattern(s) | Load Strategy |
38
- |-------|-------------|------------------|---------------|
39
- | architecture | System architecture for review context | whole: `{planning_artifacts}/*architecture*.md`, sharded: `{planning_artifacts}/*architecture*/*.md` | FULL_LOAD |
40
- | ux_design | UX design specification (if UI review) | whole: `{planning_artifacts}/*ux*.md`, sharded: `{planning_artifacts}/*ux*/*.md` | FULL_LOAD |
41
- | epics | Epic containing story being reviewed | whole: `{planning_artifacts}/*epic*.md`, sharded_index: `{planning_artifacts}/*epic*/index.md`, sharded_single: `{planning_artifacts}/*epic*/epic-{{epic_num}}.md` | SELECTIVE_LOAD |
42
-
43
- ### Context
44
-
45
- - `project_context` = `**/project-context.md` (load if exists)
46
-
2
+ main_config: '{project-root}/_xiaoma/xmc/config.yaml'
47
3
  ---
48
4
 
49
- ## EXECUTION
50
-
51
- <workflow>
52
-
53
- <step n="1" goal="Load story and discover changes">
54
- <action>Use provided {{story_path}} or ask user which story file to review</action>
55
- <action>Read COMPLETE story file</action>
56
- <action>Set {{story_key}} = extracted key from filename (e.g., "1-2-user-authentication.md" → "1-2-user-authentication") or story
57
- metadata</action>
58
- <action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Agent Record → File List, Change Log</action>
59
-
60
- <!-- Discover actual changes via git -->
61
- <action>Check if git repository detected in current directory</action>
62
- <check if="git repository exists">
63
- <action>Run `git status --porcelain` to find uncommitted changes</action>
64
- <action>Run `git diff --name-only` to see modified files</action>
65
- <action>Run `git diff --cached --name-only` to see staged files</action>
66
- <action>Compile list of actually changed files from git output</action>
67
- </check>
68
-
69
- <!-- Cross-reference story File List vs git reality -->
70
- <action>Compare story's Dev Agent Record → File List with actual git changes</action>
71
- <action>Note discrepancies:
72
- - Files in git but not in story File List
73
- - Files in story File List but no git changes
74
- - Missing documentation of what was actually changed
75
- </action>
76
-
77
- <action>Read fully and follow `./discover-inputs.md` to load all input files</action>
78
- <action>Load {project_context} for coding standards (if exists)</action>
79
- </step>
80
-
81
- <step n="2" goal="Build review attack plan">
82
- <action>Extract ALL Acceptance Criteria from story</action>
83
- <action>Extract ALL Tasks/Subtasks with completion status ([x] vs [ ])</action>
84
- <action>From Dev Agent Record → File List, compile list of claimed changes</action>
85
-
86
- <action>Create review plan:
87
- 1. **AC Validation**: Verify each AC is actually implemented
88
- 2. **Task Audit**: Verify each [x] task is really done
89
- 3. **Code Quality**: Security, performance, maintainability
90
- 4. **Test Quality**: Real tests vs placeholder bullshit
91
- </action>
92
- </step>
93
-
94
- <step n="3" goal="Execute adversarial review">
95
- <critical>VALIDATE EVERY CLAIM - Check git reality vs story claims</critical>
96
-
97
- <!-- Git vs Story Discrepancies -->
98
- <action>Review git vs story File List discrepancies:
99
- 1. **Files changed but not in story File List** → MEDIUM finding (incomplete documentation)
100
- 2. **Story lists files but no git changes** → HIGH finding (false claims)
101
- 3. **Uncommitted changes not documented** → MEDIUM finding (transparency issue)
102
- </action>
103
-
104
- <!-- Use combined file list: story File List + git discovered files -->
105
- <action>Create comprehensive review file list from story File List and git changes</action>
106
-
107
- <!-- AC Validation -->
108
- <action>For EACH Acceptance Criterion:
109
- 1. Read the AC requirement
110
- 2. Search implementation files for evidence
111
- 3. Determine: IMPLEMENTED, PARTIAL, or MISSING
112
- 4. If MISSING/PARTIAL → HIGH SEVERITY finding
113
- </action>
114
-
115
- <!-- Task Completion Audit -->
116
- <action>For EACH task marked [x]:
117
- 1. Read the task description
118
- 2. Search files for evidence it was actually done
119
- 3. **CRITICAL**: If marked [x] but NOT DONE → CRITICAL finding
120
- 4. Record specific proof (file:line)
121
- </action>
122
-
123
- <!-- Code Quality Deep Dive -->
124
- <action>For EACH file in comprehensive review list:
125
- 1. **Security**: Look for injection risks, missing validation, auth issues
126
- 2. **Performance**: N+1 queries, inefficient loops, missing caching
127
- 3. **Error Handling**: Missing try/catch, poor error messages
128
- 4. **Code Quality**: Complex functions, magic numbers, poor naming
129
- 5. **Test Quality**: Are tests real assertions or placeholders?
130
- </action>
131
-
132
- <check if="total_issues_found == 0">
133
- <action>Double-check by re-examining code for:
134
- - Edge cases and null handling
135
- - Architecture violations
136
- - Integration issues
137
- - Dependency problems
138
- </action>
139
- <action>If still no issues found after thorough re-examination, that is a valid outcome — report a clean review</action>
140
- </check>
141
- </step>
142
-
143
- <step n="4" goal="Present findings and fix them">
144
- <action>Categorize findings: HIGH (must fix), MEDIUM (should fix), LOW (nice to fix)</action>
145
- <action>Set {{fixed_count}} = 0</action>
146
- <action>Set {{action_count}} = 0</action>
147
-
148
- <output>**🔥 CODE REVIEW FINDINGS, {user_name}!**
149
-
150
- **Story:** {{story_file}}
151
- **Git vs Story Discrepancies:** {{git_discrepancy_count}} found
152
- **Issues Found:** {{high_count}} High, {{medium_count}} Medium, {{low_count}} Low
153
-
154
- ## 🔴 CRITICAL ISSUES
155
- - Tasks marked [x] but not actually implemented
156
- - Acceptance Criteria not implemented
157
- - Story claims files changed but no git evidence
158
- - Security vulnerabilities
159
-
160
- ## 🟡 MEDIUM ISSUES
161
- - Files changed but not documented in story File List
162
- - Uncommitted changes not tracked
163
- - Performance problems
164
- - Poor test coverage/quality
165
- - Code maintainability issues
5
+ # Code Review Workflow
166
6
 
167
- ## 🟢 LOW ISSUES
168
- - Code style improvements
169
- - Documentation gaps
170
- - Git commit message quality
171
- </output>
7
+ **Goal:** Review code changes adversarially using parallel review layers and structured triage.
172
8
 
173
- <ask>What should I do with these issues?
9
+ **Your Role:** You are an elite code reviewer. You gather context, launch parallel adversarial reviews, triage findings with precision, and present actionable results. No noise, no filler.
174
10
 
175
- 1. **Fix them automatically** - I'll update the code and tests
176
- 2. **Create action items** - Add to story Tasks/Subtasks for later
177
- 3. **Show me details** - Deep dive into specific issues
178
11
 
179
- Choose [1], [2], or specify which issue to examine:</ask>
12
+ ## WORKFLOW ARCHITECTURE
180
13
 
181
- <check if="user chooses 1">
182
- <action>Fix all HIGH and MEDIUM issues in the code</action>
183
- <action>Add/update tests as needed</action>
184
- <action>Update File List in story if files changed</action>
185
- <action>Update story Dev Agent Record with fixes applied</action>
186
- <action>Set {{fixed_count}} = number of HIGH and MEDIUM issues fixed</action>
187
- <action>Set {{action_count}} = 0</action>
188
- </check>
14
+ This uses **step-file architecture** for disciplined execution:
189
15
 
190
- <check if="user chooses 2">
191
- <action>Add "Review Follow-ups (AI)" subsection to Tasks/Subtasks</action>
192
- <action>For each issue: `- [ ] [AI-Review][Severity] Description [file:line]`</action>
193
- <action>Set {{action_count}} = number of action items created</action>
194
- <action>Set {{fixed_count}} = 0</action>
195
- </check>
16
+ - **Micro-file Design**: Each step is self-contained and followed exactly
17
+ - **Just-In-Time Loading**: Only load the current step file
18
+ - **Sequential Enforcement**: Complete steps in order, no skipping
19
+ - **State Tracking**: Persist progress via in-memory variables
20
+ - **Append-Only Building**: Build artifacts incrementally
196
21
 
197
- <check if="user chooses 3">
198
- <action>Show detailed explanation with code examples</action>
199
- <action>Return to fix decision</action>
200
- </check>
201
- </step>
22
+ ### Step Processing Rules
202
23
 
203
- <step n="5" goal="Update story status and sync sprint tracking">
204
- <!-- Determine new status based on review outcome -->
205
- <check if="all HIGH and MEDIUM issues fixed AND all ACs implemented">
206
- <action>Set {{new_status}} = "done"</action>
207
- <action>Update story Status field to "done"</action>
208
- </check>
209
- <check if="HIGH or MEDIUM issues remain OR ACs not fully implemented">
210
- <action>Set {{new_status}} = "in-progress"</action>
211
- <action>Update story Status field to "in-progress"</action>
212
- </check>
213
- <action>Save story file</action>
24
+ 1. **READ COMPLETELY**: Read the entire step file before acting
25
+ 2. **FOLLOW SEQUENCE**: Execute sections in order
26
+ 3. **WAIT FOR INPUT**: Halt at checkpoints and wait for human
27
+ 4. **LOAD NEXT**: When directed, read fully and follow the next step file
214
28
 
215
- <!-- Determine sprint tracking status -->
216
- <check if="{sprint_status} file exists">
217
- <action>Set {{current_sprint_status}} = "enabled"</action>
218
- </check>
219
- <check if="{sprint_status} file does NOT exist">
220
- <action>Set {{current_sprint_status}} = "no-sprint-tracking"</action>
221
- </check>
29
+ ### Critical Rules (NO EXCEPTIONS)
222
30
 
223
- <!-- Sync sprint-status.yaml when story status changes (only if sprint tracking enabled) -->
224
- <check if="{{current_sprint_status}} != 'no-sprint-tracking'">
225
- <action>Load the FULL file: {sprint_status}</action>
226
- <action>Find development_status key matching {{story_key}}</action>
31
+ - **NEVER** load multiple step files simultaneously
32
+ - **ALWAYS** read entire step file before execution
33
+ - **NEVER** skip steps or optimize the sequence
34
+ - **ALWAYS** follow the exact instructions in the step file
35
+ - **ALWAYS** halt at checkpoints and wait for human input
227
36
 
228
- <check if="{{new_status}} == 'done'">
229
- <action>Update development_status[{{story_key}}] = "done"</action>
230
- <action>Update last_updated field to current date</action>
231
- <action>Save file, preserving ALL comments and structure</action>
232
- <output>✅ Sprint status synced: {{story_key}} → done</output>
233
- </check>
234
37
 
235
- <check if="{{new_status}} == 'in-progress'">
236
- <action>Update development_status[{{story_key}}] = "in-progress"</action>
237
- <action>Update last_updated field to current date</action>
238
- <action>Save file, preserving ALL comments and structure</action>
239
- <output>🔄 Sprint status synced: {{story_key}} → in-progress</output>
240
- </check>
38
+ ## INITIALIZATION SEQUENCE
241
39
 
242
- <check if="story key not found in sprint status">
243
- <output>⚠️ Story file updated, but sprint-status sync failed: {{story_key}} not found in sprint-status.yaml</output>
244
- </check>
245
- </check>
40
+ ### 1. Configuration Loading
246
41
 
247
- <check if="{{current_sprint_status}} == 'no-sprint-tracking'">
248
- <output>ℹ️ Story status updated (no sprint tracking configured)</output>
249
- </check>
42
+ Load and read full config from `{main_config}` and resolve:
250
43
 
251
- <output>**✅ Review Complete!**
44
+ - `project_name`, `planning_artifacts`, `implementation_artifacts`, `user_name`
45
+ - `communication_language`, `document_output_language`, `user_skill_level`
46
+ - `date` as system-generated current datetime
47
+ - `project_context` = `**/project-context.md` (load if exists)
48
+ - CLAUDE.md / memory files (load if exist)
252
49
 
253
- **Story Status:** {{new_status}}
254
- **Issues Fixed:** {{fixed_count}}
255
- **Action Items Created:** {{action_count}}
50
+ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`.
256
51
 
257
- {{#if new_status == "done"}}Code review complete!{{else}}Address the action items and continue development.{{/if}}
258
- </output>
259
- </step>
52
+ ### 2. First Step Execution
260
53
 
261
- </workflow>
54
+ Read fully and follow: `./steps/step-01-gather-context.md` to begin the workflow.
@@ -3,4 +3,4 @@ name: xiaoma-correct-course
3
3
  description: 'Manage significant changes during sprint execution. Use when the user says "correct course" or "propose sprint change"'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -68,7 +68,7 @@ Load config from `{project-root}/_xiaoma/xmc/config.yaml` and resolve:
68
68
  3. **Selectively load sections** based on relevance to the change being analyzed — do NOT load everything, only sections that relate to the impacted areas
69
69
  4. **This document is optional** — skip if `{project_knowledge}` does not exist (greenfield projects)
70
70
 
71
- **Fuzzy matching**: Be flexible with document names — users may use variations like `prd.md`, `bmm-prd.md`, `product-requirements.md`, etc.
71
+ **Fuzzy matching**: Be flexible with document names — users may use variations like `prd.md`, `xmc-prd.md`, `product-requirements.md`, etc.
72
72
 
73
73
  **Missing documents**: Not all documents may exist. PRD and Epics are essential; Architecture, UX Design, Tech Spec, and Document Project are loaded if available. HALT if PRD or Epics cannot be found.
74
74
 
@@ -3,4 +3,4 @@ name: xiaoma-create-story
3
3
  description: 'Creates a dedicated story file with all the context the agent will need to implement it later. Use when the user says "create the next story" or "create story [story identifier]"'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.