agile-context-engineering 0.3.0 → 0.5.1

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 (139) hide show
  1. package/.claude-plugin/marketplace.json +18 -0
  2. package/.claude-plugin/plugin.json +10 -0
  3. package/CHANGELOG.md +7 -1
  4. package/LICENSE +51 -51
  5. package/README.md +330 -318
  6. package/agents/ace-code-discovery-analyst.md +245 -245
  7. package/agents/ace-code-integration-analyst.md +248 -248
  8. package/agents/ace-code-reviewer.md +375 -375
  9. package/agents/ace-product-owner.md +365 -361
  10. package/agents/ace-project-researcher.md +606 -606
  11. package/agents/ace-research-synthesizer.md +228 -228
  12. package/agents/ace-technical-application-architect.md +315 -315
  13. package/agents/ace-wiki-mapper.md +449 -445
  14. package/bin/install.js +605 -195
  15. package/hooks/ace-check-update.js +71 -62
  16. package/hooks/ace-statusline.js +107 -89
  17. package/hooks/hooks.json +14 -0
  18. package/package.json +7 -5
  19. package/shared/lib/ace-core.js +361 -0
  20. package/shared/lib/ace-core.test.js +308 -0
  21. package/shared/lib/ace-github.js +753 -0
  22. package/shared/lib/ace-story.js +400 -0
  23. package/shared/lib/ace-story.test.js +250 -0
  24. package/{agile-context-engineering → shared}/utils/questioning.xml +110 -110
  25. package/{agile-context-engineering → shared}/utils/ui-formatting.md +299 -299
  26. package/{commands/ace/execute-story.md → skills/execute-story/SKILL.md} +116 -138
  27. package/skills/execute-story/script.js +291 -0
  28. package/skills/execute-story/script.test.js +261 -0
  29. package/{agile-context-engineering/templates/product/story.xml → skills/execute-story/story-template.xml} +451 -451
  30. package/skills/execute-story/walkthrough-template.xml +255 -0
  31. package/{agile-context-engineering/workflows/execute-story.xml → skills/execute-story/workflow.xml} +1221 -1219
  32. package/skills/help/SKILL.md +71 -0
  33. package/skills/help/script.js +315 -0
  34. package/skills/help/script.test.js +183 -0
  35. package/{agile-context-engineering/workflows/help.xml → skills/help/workflow.xml} +544 -533
  36. package/{commands/ace/init-coding-standards.md → skills/init-coding-standards/SKILL.md} +91 -83
  37. package/{agile-context-engineering/templates/wiki/coding-standards.xml → skills/init-coding-standards/coding-standards-template.xml} +531 -531
  38. package/skills/init-coding-standards/script.js +50 -0
  39. package/skills/init-coding-standards/script.test.js +70 -0
  40. package/{agile-context-engineering/workflows/init-coding-standards.xml → skills/init-coding-standards/workflow.xml} +381 -386
  41. package/skills/map-cross-cutting/SKILL.md +126 -0
  42. package/{agile-context-engineering/templates/wiki → skills/map-cross-cutting}/system-cross-cutting.xml +197 -197
  43. package/skills/map-cross-cutting/workflow.xml +330 -0
  44. package/skills/map-guide/SKILL.md +126 -0
  45. package/{agile-context-engineering/templates/wiki → skills/map-guide}/guide.xml +137 -137
  46. package/skills/map-guide/workflow.xml +320 -0
  47. package/skills/map-pattern/SKILL.md +125 -0
  48. package/{agile-context-engineering/templates/wiki → skills/map-pattern}/pattern.xml +159 -159
  49. package/skills/map-pattern/workflow.xml +331 -0
  50. package/{commands/ace/map-story.md → skills/map-story/SKILL.md} +180 -165
  51. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/decizions.xml +115 -115
  52. package/skills/map-story/templates/guide.xml +137 -0
  53. package/skills/map-story/templates/pattern.xml +159 -0
  54. package/skills/map-story/templates/system-cross-cutting.xml +197 -0
  55. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/system.xml +381 -381
  56. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/tech-debt-index.xml +125 -125
  57. package/{agile-context-engineering/templates/wiki → skills/map-story/templates}/walkthrough.xml +255 -255
  58. package/{agile-context-engineering/workflows/map-story.xml → skills/map-story/workflow.xml} +1046 -1046
  59. package/{commands/ace/map-subsystem.md → skills/map-subsystem/SKILL.md} +155 -140
  60. package/skills/map-subsystem/script.js +51 -0
  61. package/skills/map-subsystem/script.test.js +68 -0
  62. package/skills/map-subsystem/templates/decizions.xml +115 -0
  63. package/skills/map-subsystem/templates/guide.xml +137 -0
  64. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/module-discovery.xml +174 -174
  65. package/skills/map-subsystem/templates/pattern.xml +159 -0
  66. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-architecture.xml +343 -343
  67. package/{agile-context-engineering/templates/wiki → skills/map-subsystem/templates}/subsystem-structure.xml +234 -234
  68. package/skills/map-subsystem/templates/system-cross-cutting.xml +197 -0
  69. package/skills/map-subsystem/templates/system.xml +381 -0
  70. package/skills/map-subsystem/templates/walkthrough.xml +255 -0
  71. package/{agile-context-engineering/workflows/map-subsystem.xml → skills/map-subsystem/workflow.xml} +1173 -1178
  72. package/skills/map-sys-doc/SKILL.md +125 -0
  73. package/skills/map-sys-doc/system.xml +381 -0
  74. package/skills/map-sys-doc/workflow.xml +336 -0
  75. package/{commands/ace/map-system.md → skills/map-system/SKILL.md} +103 -92
  76. package/skills/map-system/script.js +75 -0
  77. package/skills/map-system/script.test.js +73 -0
  78. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-architecture.xml +254 -254
  79. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/system-structure.xml +177 -177
  80. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/testing-framework.xml +283 -283
  81. package/{agile-context-engineering/templates/wiki → skills/map-system/templates}/wiki-readme.xml +296 -296
  82. package/{agile-context-engineering/workflows/map-system.xml → skills/map-system/workflow.xml} +667 -672
  83. package/{commands/ace/map-walkthrough.md → skills/map-walkthrough/SKILL.md} +140 -127
  84. package/skills/map-walkthrough/walkthrough.xml +255 -0
  85. package/{agile-context-engineering/workflows/map-walkthrough.xml → skills/map-walkthrough/workflow.xml} +457 -457
  86. package/{commands/ace/plan-backlog.md → skills/plan-backlog/SKILL.md} +93 -83
  87. package/{agile-context-engineering/templates/product/product-backlog.xml → skills/plan-backlog/product-backlog-template.xml} +231 -231
  88. package/skills/plan-backlog/script.js +121 -0
  89. package/skills/plan-backlog/script.test.js +83 -0
  90. package/{agile-context-engineering/workflows/plan-backlog.xml → skills/plan-backlog/workflow.xml} +1348 -1356
  91. package/{commands/ace/plan-feature.md → skills/plan-feature/SKILL.md} +99 -89
  92. package/{agile-context-engineering/templates/product/feature.xml → skills/plan-feature/feature-template.xml} +361 -361
  93. package/skills/plan-feature/script.js +131 -0
  94. package/skills/plan-feature/script.test.js +80 -0
  95. package/{agile-context-engineering/workflows/plan-feature.xml → skills/plan-feature/workflow.xml} +1487 -1495
  96. package/{commands/ace/plan-product-vision.md → skills/plan-product-vision/SKILL.md} +91 -81
  97. package/{agile-context-engineering/templates/product/product-vision.xml → skills/plan-product-vision/product-vision-template.xml} +227 -227
  98. package/skills/plan-product-vision/script.js +51 -0
  99. package/skills/plan-product-vision/script.test.js +69 -0
  100. package/{agile-context-engineering/workflows/plan-product-vision.xml → skills/plan-product-vision/workflow.xml} +337 -342
  101. package/{commands/ace/plan-story.md → skills/plan-story/SKILL.md} +139 -159
  102. package/skills/plan-story/script.js +295 -0
  103. package/skills/plan-story/script.test.js +240 -0
  104. package/skills/plan-story/story-template.xml +458 -0
  105. package/{agile-context-engineering/workflows/plan-story.xml → skills/plan-story/workflow.xml} +1301 -944
  106. package/{commands/ace/research-external-solution.md → skills/research-external-solution/SKILL.md} +120 -138
  107. package/{agile-context-engineering/templates/product/external-solution.xml → skills/research-external-solution/external-solution-template.xml} +832 -832
  108. package/skills/research-external-solution/script.js +229 -0
  109. package/skills/research-external-solution/script.test.js +134 -0
  110. package/{agile-context-engineering/workflows/research-external-solution.xml → skills/research-external-solution/workflow.xml} +657 -659
  111. package/{commands/ace/research-integration-solution.md → skills/research-integration-solution/SKILL.md} +121 -135
  112. package/{agile-context-engineering/templates/product/story-integration-solution.xml → skills/research-integration-solution/integration-solution-template.xml} +1015 -1015
  113. package/skills/research-integration-solution/script.js +223 -0
  114. package/skills/research-integration-solution/script.test.js +134 -0
  115. package/{agile-context-engineering/workflows/research-integration-solution.xml → skills/research-integration-solution/workflow.xml} +711 -713
  116. package/{commands/ace/research-story-wiki.md → skills/research-story-wiki/SKILL.md} +101 -116
  117. package/skills/research-story-wiki/script.js +223 -0
  118. package/skills/research-story-wiki/script.test.js +138 -0
  119. package/{agile-context-engineering/templates/product/story-wiki.xml → skills/research-story-wiki/story-wiki-template.xml} +194 -194
  120. package/{agile-context-engineering/workflows/research-story-wiki.xml → skills/research-story-wiki/workflow.xml} +473 -475
  121. package/{commands/ace/research-technical-solution.md → skills/research-technical-solution/SKILL.md} +131 -147
  122. package/skills/research-technical-solution/script.js +223 -0
  123. package/skills/research-technical-solution/script.test.js +134 -0
  124. package/{agile-context-engineering/templates/product/story-technical-solution.xml → skills/research-technical-solution/technical-solution-template.xml} +1025 -1025
  125. package/{agile-context-engineering/workflows/research-technical-solution.xml → skills/research-technical-solution/workflow.xml} +761 -763
  126. package/{commands/ace/review-story.md → skills/review-story/SKILL.md} +99 -109
  127. package/skills/review-story/script.js +249 -0
  128. package/skills/review-story/script.test.js +169 -0
  129. package/skills/review-story/story-template.xml +451 -0
  130. package/{agile-context-engineering/workflows/review-story.xml → skills/review-story/workflow.xml} +279 -281
  131. package/{commands/ace/update.md → skills/update/SKILL.md} +65 -56
  132. package/{agile-context-engineering/workflows/update.xml → skills/update/workflow.xml} +33 -18
  133. package/agile-context-engineering/src/ace-tools.js +0 -2881
  134. package/agile-context-engineering/src/ace-tools.test.js +0 -1089
  135. package/agile-context-engineering/templates/_command.md +0 -54
  136. package/agile-context-engineering/templates/_workflow.xml +0 -17
  137. package/agile-context-engineering/templates/config.json +0 -0
  138. package/agile-context-engineering/templates/product/integration-solution.xml +0 -0
  139. package/commands/ace/help.md +0 -93
@@ -1,540 +1,551 @@
1
- <workflow>
2
-
3
- <purpose>
4
- Interactive state-checker, settings configurator, and guided router for project
5
- initialization. Detects which ACE documents exist, ensures settings are configured
6
- (including GitHub Project integration), displays a status dashboard, and offers to
7
- run missing setup commands — following the GSD new-project interactive pattern.
8
- </purpose>
9
-
10
- <mandatory-context>
11
- Read all files referenced by the invoking prompt's execution-context before starting.
12
- </mandatory-context>
13
-
14
- <process>
15
-
16
- <!-- ══════════════════════════════════════════════════════════════════ -->
17
- <!-- STEP 1: DETECT STATE -->
18
- <!-- ══════════════════════════════════════════════════════════════════ -->
19
-
20
- <step name="detect-state" order="1">
21
- **MANDATORY FIRST STEP — Execute environment detection before any user interaction.**
22
-
23
- <substep order="1.1" name="environment-detection">
24
- ```bash
25
- INIT=$(node ~/.claude/agile-context-engineering/src/ace-tools.js init new-project)
26
- ```
27
-
28
- <output-fields>
29
- <field name="has_product_vision">Whether .docs/product/product-vision.md exists</field>
30
- <field name="has_system_architecture">Whether .docs/wiki/system-wide/system-architecture.md exists</field>
31
- <field name="has_system_structure">Whether .docs/wiki/system-wide/system-structure.md exists</field>
32
- <field name="has_coding_standards">Whether .docs/wiki/system-wide/coding-standards.md exists</field>
33
- <field name="has_testing_framework">Whether .docs/wiki/system-wide/testing-framework.md exists</field>
34
- <field name="is_brownfield">Existing code or package files detected</field>
35
- <field name="is_greenfield">No existing code detected</field>
36
- <field name="has_git">Whether .git directory exists</field>
37
- <field name="has_gh_cli">Whether GitHub CLI (gh) is installed</field>
38
- </output-fields>
39
- </substep>
40
-
41
- <substep order="1.2" name="ensure-git">
42
- <variant condition="has_git is false">
43
- ```bash
44
- git init
45
- ```
46
- </variant>
47
-
48
- <variant condition="has_git is true">
49
- No action needed.
50
- </variant>
51
- </substep>
52
- </step>
53
-
54
- <!-- ══════════════════════════════════════════════════════════════════ -->
55
- <!-- STEP 2: ENSURE SETTINGS -->
56
- <!-- ══════════════════════════════════════════════════════════════════ -->
57
-
58
- <step name="ensure-settings" order="2">
59
- **Create `.ace/settings.json` if it does not exist.**
60
-
61
- <substep order="2.1" name="create-settings-file">
62
- ```bash
63
- SETTINGS=$(node ~/.claude/agile-context-engineering/src/ace-tools.js ensure-settings)
64
- ```
65
-
66
- <output-fields>
67
- <field name="created">Whether settings.json was just created (true) or already existed (false)</field>
68
- <field name="settings">The current settings object</field>
69
- </output-fields>
70
- </substep>
71
-
72
- <substep order="2.2" name="display-settings-status">
73
- <variant condition="created is true">
74
- Display:
75
- ```
76
- ┌──────────────────────────────────────────────────┐
77
- │ ACE > Settings │
78
- └──────────────────────────────────────────────────┘
79
-
80
- ✓ Created .ace/settings.json with defaults.
81
- ```
82
- </variant>
83
-
84
- <variant condition="created is false">
85
- No display needed — settings already exist.
86
- </variant>
87
- </substep>
88
- </step>
89
-
90
- <!-- ══════════════════════════════════════════════════════════════════ -->
91
- <!-- STEP 3: GITHUB PROJECT SETUP (mandatory — always runs) -->
92
- <!-- ══════════════════════════════════════════════════════════════════ -->
93
-
94
- <step name="github-project-setup" order="3">
95
- **Detect GitHub environment and ask the user about project board integration.**
96
-
97
- <substep order="3.1" name="github-detection">
98
- ```bash
99
- GH_STATUS=$(node ~/.claude/agile-context-engineering/src/ace-tools.js init setup-github)
100
- ```
101
-
102
- <output-fields>
103
- <field name="gh_installed">Whether GitHub CLI (gh) is available</field>
104
- <field name="repo">Detected repository (e.g., owner/repo) or empty string</field>
105
- <field name="owner">Repository owner or empty string</field>
106
- <field name="projects">Array of {number, title} objects</field>
107
- <field name="current_settings">Current github_project settings from settings.json</field>
108
- </output-fields>
109
- </substep>
110
-
111
- <substep order="3.2" name="evaluate-github-state">
112
- <variant condition="current_settings.enabled is true">
113
- Already configured. Display:
114
- ```
115
- ✓ GitHub Project: #{current_settings.project_number}
116
- Owner: {current_settings.owner}
117
- Repo: {current_settings.repo}
118
- ```
119
- Skip to step 4.
120
- </variant>
121
-
122
- <variant condition="gh_installed is false">
123
- Display:
124
- ```
125
- i GitHub CLI (gh) not found — GitHub Project integration unavailable.
126
- Install from: https://cli.github.com/
127
- ```
128
- Skip to step 4.
129
- </variant>
130
-
131
- <variant condition="gh_installed is true AND current_settings.enabled is false">
132
- Continue to substep 3.3.
133
- </variant>
134
- </substep>
135
-
136
- <substep order="3.3" name="ask-github-interest">
137
- Use `AskUserQuestion`:
138
- - header: "GitHub"
139
- - question: "GitHub CLI detected. Do you want to connect a GitHub Project board for sprint tracking?"
140
- - options:
141
- - "Yes, set it up (Recommended)" — Connect a GitHub Project now
142
- - "Skip for now" — Continue without GitHub Project integration
143
-
144
- <variant condition="user chose Skip for now">
145
- Skip to step 4.
146
- </variant>
147
-
148
- <variant condition="user chose Yes, set it up">
149
- Continue to substep 3.4.
150
- </variant>
151
- </substep>
152
-
153
- <substep order="3.4" name="confirm-repo">
154
- <variant condition="repo is not empty">
155
- Use `AskUserQuestion`:
156
- - header: "Repository"
157
- - question: "Detected repository: `{repo}`. Is this correct?"
158
- - options:
159
- - "Yes, use {repo}" — Confirm this repository
160
- - "No, different repo" — I'll provide the correct repository
161
-
162
- If "No, different repo": ask user to provide the correct `owner/repo` string.
163
- Parse `owner` from the confirmed/provided repo string (everything before `/`).
164
- </variant>
165
-
166
- <variant condition="repo is empty">
167
- Ask the user to provide their `owner/repo` string.
168
- Parse `owner` from the provided string (everything before `/`).
169
- </variant>
170
- </substep>
171
-
172
- <substep order="3.5" name="confirm-owner">
173
- The `owner` is the GitHub user or organization that owns the project board.
174
- By default it matches the repo owner, but it can differ (e.g., org project
175
- boards used across multiple repos).
176
-
177
- Use `AskUserQuestion`:
178
- - header: "Owner"
179
- - question: "Which GitHub user or organization owns the project board? Detected: `{owner}`"
180
- - options:
181
- - "Use {owner}" — The repo owner owns the project board
182
- - "Different owner" — I'll provide the correct owner
183
-
184
- <variant condition="user chose Use {owner}">
185
- Keep `owner` as-is.
186
- </variant>
187
-
188
- <variant condition="user chose Different owner">
189
- Ask user to provide the correct owner (GitHub username or org name).
190
- Update `owner` with the provided value.
191
- </variant>
192
- </substep>
193
-
194
- <substep order="3.6" name="select-project">
195
- Re-fetch projects for the confirmed owner (in case owner changed in 3.5):
196
- ```bash
197
- gh project list --owner {owner} --limit 10 --format json
198
- ```
199
-
200
- <variant condition="projects array is not empty">
201
- Use `AskUserQuestion`:
202
- - header: "Project"
203
- - question: "Which GitHub Project should ACE use?"
204
- - options: (build from projects array, max 4)
205
- - "{title} (#{number})" — for each project
206
- </variant>
207
-
208
- <variant condition="projects array is empty">
209
- Display:
210
- ```
211
- i No GitHub Projects found for {owner}.
212
- Create one at https://github.com/orgs/{owner}/projects
213
- or https://github.com/users/{owner}/projects
214
- ```
215
- Skip to step 4.
216
- </variant>
217
- </substep>
218
-
219
- <substep order="3.7" name="write-github-settings">
220
- ```bash
221
- node ~/.claude/agile-context-engineering/src/ace-tools.js write-github-settings enabled=true gh_installed=true repo={repo} project_number={number} owner={owner}
222
- ```
223
-
224
- Display:
225
- ```
226
- ✓ GitHub Project configured.
227
- Owner: {owner}
228
- Repo: {repo}
229
- Project: {title} (#{number})
230
- ```
231
- </substep>
232
- </step>
233
-
234
- <!-- ══════════════════════════════════════════════════════════════════ -->
235
- <!-- STEP 4: AGENT TEAMS SETUP (optional — experimental feature) -->
236
- <!-- ══════════════════════════════════════════════════════════════════ -->
237
-
238
- <step name="agent-teams-setup" order="4">
239
- **MANDATORY — MUST execute this step. DO NOT skip. Always ask the user about Agent Teams.**
240
-
1
+ <workflow>
2
+
3
+ <purpose>
4
+ Interactive state-checker, settings configurator, and guided router for project
5
+ initialization. Detects which ACE documents exist, ensures settings are configured
6
+ (including GitHub Project integration), displays a status dashboard, and offers to
7
+ run missing setup commands — following the GSD new-project interactive pattern.
8
+ </purpose>
9
+
10
+ <mandatory-context>
11
+ All supporting resource files are auto-loaded in the skill prompt above. Do NOT re-read them.
12
+ </mandatory-context>
13
+
14
+ <process>
15
+
16
+ <!-- ══════════════════════════════════════════════════════════════════ -->
17
+ <!-- STEP 1: DETECT STATE -->
18
+ <!-- ══════════════════════════════════════════════════════════════════ -->
19
+
20
+ <step name="detect-state" order="1">
21
+ **MANDATORY FIRST STEP — Execute environment detection before any user interaction.**
22
+
23
+ <substep order="1.1" name="environment-detection">
24
+ ```bash
25
+ INIT=$(node "${CLAUDE_SKILL_DIR}/script.js" init)
26
+ ```
27
+
28
+ <output-fields>
29
+ <field name="has_product_vision">Whether .docs/product/product-vision.md exists</field>
30
+ <field name="has_system_architecture">Whether .docs/wiki/system-wide/system-architecture.md exists</field>
31
+ <field name="has_system_structure">Whether .docs/wiki/system-wide/system-structure.md exists</field>
32
+ <field name="has_coding_standards">Whether .docs/wiki/system-wide/coding-standards.md exists</field>
33
+ <field name="has_testing_framework">Whether .docs/wiki/system-wide/testing-framework.md exists</field>
34
+ <field name="is_brownfield">Existing code or package files detected</field>
35
+ <field name="is_greenfield">No existing code detected</field>
36
+ <field name="has_git">Whether .git directory exists</field>
37
+ <field name="has_gh_cli">Whether GitHub CLI (gh) is installed</field>
38
+ </output-fields>
39
+ </substep>
40
+
41
+ <substep order="1.2" name="ensure-git">
42
+ <variant condition="has_git is false">
43
+ ```bash
44
+ git init
45
+ ```
46
+ </variant>
47
+
48
+ <variant condition="has_git is true">
49
+ No action needed.
50
+ </variant>
51
+ </substep>
52
+ </step>
53
+
54
+ <!-- ══════════════════════════════════════════════════════════════════ -->
55
+ <!-- STEP 2: ENSURE SETTINGS -->
56
+ <!-- ══════════════════════════════════════════════════════════════════ -->
57
+
58
+ <step name="ensure-settings" order="2">
59
+ **Create `.ace/settings.json` if it does not exist.**
60
+
61
+ <substep order="2.1" name="create-settings-file">
62
+ ```bash
63
+ SETTINGS=$(node "${CLAUDE_SKILL_DIR}/script.js" ensure-settings)
64
+ ```
65
+
66
+ <output-fields>
67
+ <field name="created">Whether settings.json was just created (true) or already existed (false)</field>
68
+ <field name="settings">The current settings object</field>
69
+ </output-fields>
70
+ </substep>
71
+
72
+ <substep order="2.2" name="display-settings-status">
73
+ <variant condition="created is true">
74
+ Display:
75
+ ```
76
+ ┌──────────────────────────────────────────────────┐
77
+ │ ACE > Settings │
78
+ └──────────────────────────────────────────────────┘
79
+
80
+ ✓ Created .ace/settings.json with defaults.
81
+ ```
82
+ </variant>
83
+
84
+ <variant condition="created is false">
85
+ No display needed — settings already exist.
86
+ </variant>
87
+ </substep>
88
+ </step>
89
+
90
+ <!-- ══════════════════════════════════════════════════════════════════ -->
91
+ <!-- STEP 3: GITHUB PROJECT SETUP (mandatory — always runs) -->
92
+ <!-- ══════════════════════════════════════════════════════════════════ -->
93
+
94
+ <step name="github-project-setup" order="3">
95
+ **Detect GitHub environment and ask the user about project board integration.**
96
+
97
+ <substep order="3.1" name="github-detection">
98
+ ```bash
99
+ GH_STATUS=$(node "${CLAUDE_SKILL_DIR}/script.js" setup-github)
100
+ ```
101
+
102
+ <output-fields>
103
+ <field name="gh_installed">Whether GitHub CLI (gh) is available</field>
104
+ <field name="repo">Detected repository (e.g., owner/repo) or empty string</field>
105
+ <field name="owner">Repository owner or empty string</field>
106
+ <field name="projects">Array of {number, title} objects</field>
107
+ <field name="current_settings">Current github_project settings from settings.json</field>
108
+ </output-fields>
109
+ </substep>
110
+
111
+ <substep order="3.2" name="evaluate-github-state">
112
+ <variant condition="current_settings.enabled is true">
113
+ Already configured. Display:
114
+ ```
115
+ ✓ GitHub Project: #{current_settings.project_number}
116
+ Owner: {current_settings.owner}
117
+ Repo: {current_settings.repo}
118
+ ```
119
+ Skip to step 4.
120
+ </variant>
121
+
122
+ <variant condition="gh_installed is false">
123
+ Display:
124
+ ```
125
+ i GitHub CLI (gh) not found — GitHub Project integration unavailable.
126
+ Install from: https://cli.github.com/
127
+ ```
128
+ Skip to step 4.
129
+ </variant>
130
+
131
+ <variant condition="gh_installed is true AND current_settings.enabled is false">
132
+ Continue to substep 3.3.
133
+ </variant>
134
+ </substep>
135
+
136
+ <substep order="3.3" name="ask-github-interest">
137
+ Use `AskUserQuestion`:
138
+ - header: "GitHub"
139
+ - question: "GitHub CLI detected. Do you want to connect a GitHub Project board for sprint tracking?"
140
+ - options:
141
+ - "Yes, set it up (Recommended)" — Connect a GitHub Project now
142
+ - "Skip for now" — Continue without GitHub Project integration
143
+
144
+ <variant condition="user chose Skip for now">
145
+ Skip to step 4.
146
+ </variant>
147
+
148
+ <variant condition="user chose Yes, set it up">
149
+ Continue to substep 3.4.
150
+ </variant>
151
+ </substep>
152
+
153
+ <substep order="3.4" name="confirm-repo">
154
+ <variant condition="repo is not empty">
155
+ Use `AskUserQuestion`:
156
+ - header: "Repository"
157
+ - question: "Detected repository: `{repo}`. Is this correct?"
158
+ - options:
159
+ - "Yes, use {repo}" — Confirm this repository
160
+ - "No, different repo" — I'll provide the correct repository
161
+
162
+ If "No, different repo": ask user to provide the correct `owner/repo` string.
163
+ Parse `owner` from the confirmed/provided repo string (everything before `/`).
164
+ </variant>
165
+
166
+ <variant condition="repo is empty">
167
+ Ask the user to provide their `owner/repo` string.
168
+ Parse `owner` from the provided string (everything before `/`).
169
+ </variant>
170
+ </substep>
171
+
172
+ <substep order="3.5" name="confirm-owner">
173
+ The `owner` is the GitHub user or organization that owns the project board.
174
+ By default it matches the repo owner, but it can differ (e.g., org project
175
+ boards used across multiple repos).
176
+
177
+ Use `AskUserQuestion`:
178
+ - header: "Owner"
179
+ - question: "Which GitHub user or organization owns the project board? Detected: `{owner}`"
180
+ - options:
181
+ - "Use {owner}" — The repo owner owns the project board
182
+ - "Different owner" — I'll provide the correct owner
183
+
184
+ <variant condition="user chose Use {owner}">
185
+ Keep `owner` as-is.
186
+ </variant>
187
+
188
+ <variant condition="user chose Different owner">
189
+ Ask user to provide the correct owner (GitHub username or org name).
190
+ Update `owner` with the provided value.
191
+ </variant>
192
+ </substep>
193
+
194
+ <substep order="3.6" name="select-project">
195
+ Re-fetch projects for the confirmed owner (in case owner changed in 3.5):
196
+ ```bash
197
+ gh project list --owner {owner} --limit 10 --format json
198
+ ```
199
+
200
+ <variant condition="projects array is not empty">
201
+ Use `AskUserQuestion`:
202
+ - header: "Project"
203
+ - question: "Which GitHub Project should ACE use?"
204
+ - options: (build from projects array, max 4)
205
+ - "{title} (#{number})" — for each project
206
+ </variant>
207
+
208
+ <variant condition="projects array is empty">
209
+ Display:
210
+ ```
211
+ i No GitHub Projects found for {owner}.
212
+ Create one at https://github.com/orgs/{owner}/projects
213
+ or https://github.com/users/{owner}/projects
214
+ ```
215
+ Skip to step 4.
216
+ </variant>
217
+ </substep>
218
+
219
+ <substep order="3.7" name="write-github-settings">
220
+ ```bash
221
+ node "${CLAUDE_SKILL_DIR}/script.js" write-github-settings enabled=true gh_installed=true repo={repo} project_number={number} owner={owner}
222
+ ```
223
+
224
+ Display:
225
+ ```
226
+ ✓ GitHub Project configured.
227
+ Owner: {owner}
228
+ Repo: {repo}
229
+ Project: {title} (#{number})
230
+ ```
231
+ </substep>
232
+ </step>
233
+
234
+ <!-- ══════════════════════════════════════════════════════════════════ -->
235
+ <!-- STEP 4: AGENT TEAMS SETUP (optional — experimental feature) -->
236
+ <!-- ══════════════════════════════════════════════════════════════════ -->
237
+
238
+ <step name="agent-teams-setup" order="4">
239
+ **MANDATORY — MUST execute this step. DO NOT skip. Always ask the user about Agent Teams.**
240
+
241
241
  This step syncs and configures the Claude Code Agent Teams experimental feature.
242
242
  You MUST run the sync command below and MUST use AskUserQuestion to interact with the user.
243
243
 
244
- <substep order="4.1" name="sync-agent-teams">
245
- **MANDATORY Run this command before evaluating state:**
244
+ <conditional condition="INIT.runtime_config_dir is '.codex'">
245
+ Codex does not support Claude Code Agent Teams. Run sync-agent-teams so
246
+ `.ace/settings.json` records `agent_teams: false`, then skip the user prompt.
246
247
 
247
248
  ```bash
248
- AGENT_TEAMS=$(node ~/.claude/agile-context-engineering/src/ace-tools.js sync-agent-teams --raw)
249
+ node "${CLAUDE_SKILL_DIR}/script.js" sync-agent-teams --raw
249
250
  ```
250
251
 
251
- Parse the JSON output. The `agent_teams` field is the synced boolean state.
252
- </substep>
253
-
254
- <substep order="4.2" name="ask-agent-teams">
255
- **MANDATORY — You MUST use AskUserQuestion here. Do NOT skip this interaction.**
256
- **IMPORTANT: When writing settings, you MUST use the Bash commands below.
257
- NEVER directly edit .ace/settings.json or .claude/settings.json — the
258
- write-agent-teams command updates BOTH files atomically.**
259
-
260
- <variant condition="agent_teams is true (from sync output)">
261
- Use `AskUserQuestion`:
262
- - header: "Agent Teams"
263
- - question: "Agent Teams (experimental) is currently ENABLED. This orchestrates multiple Claude Code sessions in parallel but significantly increases token usage. Would you like to keep it enabled?"
264
- - options:
265
- - "Keep enabled" Continue with Agent Teams enabled
266
- - "Disable" Turn off Agent Teams to reduce token usage
267
-
268
- <variant condition="user chose Disable">
269
- ```bash
270
- node ~/.claude/agile-context-engineering/src/ace-tools.js write-agent-teams false
271
- ```
272
- Display:
273
- ```
274
- ✓ Agent Teams disabled.
275
- ```
276
- </variant>
277
- </variant>
278
-
279
- <variant condition="agent_teams is false (from sync output)">
280
- Use `AskUserQuestion`:
281
- - header: "Agent Teams"
282
- - question: "Would you like to enable Claude Code Agent Teams? This is an experimental feature that orchestrates multiple Claude Code sessions working in parallel. WARNING: This significantly increases token usage."
283
- - options:
284
- - "Skip for now (Recommended)" — Keep Agent Teams disabled
285
- - "Enable Agent Teams" — Enable experimental multi-session orchestration (higher token cost)
286
-
287
- <variant condition="user chose Enable Agent Teams">
288
- ```bash
289
- node ~/.claude/agile-context-engineering/src/ace-tools.js write-agent-teams true
290
- ```
291
- Display:
292
- ```
293
- ✓ Agent Teams enabled.
294
- - Set agent_teams: true in .ace/settings.json
295
- - Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in .claude/settings.json
296
- ⚠ This feature is experimental and increases token usage significantly.
297
- ```
298
- </variant>
299
- </variant>
300
- </substep>
301
- </step>
302
-
303
- <!-- ══════════════════════════════════════════════════════════════════ -->
304
- <!-- STEP 5: DISPLAY STATUS DASHBOARD -->
305
- <!-- ══════════════════════════════════════════════════════════════════ -->
306
-
307
- <step name="status-dashboard" order="5">
308
- Build and display the project status dashboard.
309
-
310
- <substep order="5.1" name="render-documents-section">
311
- ```
312
- ╔══════════════════════════════════════════════════╗
313
- ║ ACE > Project Status ║
314
- ╚══════════════════════════════════════════════════╝
315
-
316
- Project type: {brownfield|greenfield}
317
-
318
- Product Vision [{check}] {status} {suggestion}
319
- System Architecture [{check}] {status} {suggestion}
320
- System Structure [{check}] {status} {suggestion}
321
- Coding Standards [{check}] {status} {suggestion}
322
- Testing Framework [{check}] {status} {suggestion}
323
- ```
324
-
325
- For each document:
326
- - If exists: `[✓] exists` (no suggestion)
327
- - If missing: `[ ] not created → /ace:command-name`
328
-
329
- <doc-command-mapping>
330
- <doc name="Product Vision" command="/ace:plan-product-vision" />
331
- <doc name="System Architecture" command="/ace:map-system" />
332
- <doc name="System Structure" command="/ace:map-system" />
333
- <doc name="Coding Standards" command="/ace:init-coding-standards" />
334
- <doc name="Testing Framework" command="/ace:map-system" />
335
- </doc-command-mapping>
336
- </substep>
337
-
338
- <substep order="5.2" name="render-settings-section">
339
- ```
340
- Settings [✓] .ace/settings.json
341
- Model profile: {settings.model_profile}
342
- Commit docs: {settings.commit_docs}
343
- Agent Teams: {enabled (experimental) | disabled}
344
- ```
345
- </substep>
346
-
347
- <substep order="5.3" name="render-github-section">
348
- ```
349
- GitHub CLI [{check}] {installed|not found}
350
- Owner {owner or 'not detected'}
351
- Repository {repo or 'not detected'}
352
- GitHub Project [{check}] {configured — #number | not configured}
353
- ```
354
- </substep>
355
- </step>
356
-
357
- <!-- ══════════════════════════════════════════════════════════════════ -->
358
- <!-- STEP 6: OFFER CODEBASE MAPPING (brownfield only) -->
359
- <!-- ══════════════════════════════════════════════════════════════════ -->
360
-
361
- <step name="offer-map-system" order="6" condition="is_brownfield is true AND has_system_architecture is false">
362
-
363
- <substep order="6.1" name="ask-map-codebase">
364
- Use `AskUserQuestion`:
365
- - header: "Codebase"
366
- - question: "I detected existing code but no wiki documentation. Would you like to map your codebase first?"
367
- - options:
368
- - "Map codebase (Recommended)" — Run /ace:map-system to analyze architecture, structure, and testing framework
369
- - "Skip for now" — Continue without mapping
370
- </substep>
371
-
372
- <substep order="6.2" name="route-map-decision">
373
- <variant condition="user chose Map codebase">
374
- Display:
375
- ```
376
- Next > Run /ace:map-system to map your codebase.
377
- This will generate system-structure, system-architecture,
378
- and testing-framework documents.
379
- ```
380
- **Exit workflow.**
381
- </variant>
382
-
383
- <variant condition="user chose Skip for now">
384
- Continue to step 7.
385
- </variant>
386
- </substep>
387
- </step>
388
-
389
- <!-- ══════════════════════════════════════════════════════════════════ -->
390
- <!-- STEP 7: OFFER PRODUCT VISION -->
391
- <!-- ══════════════════════════════════════════════════════════════════ -->
392
-
393
- <step name="offer-product-vision" order="7" condition="has_product_vision is false">
394
-
395
- <substep order="7.1" name="ask-product-vision">
396
- Use `AskUserQuestion`:
397
- - header: "Vision"
398
- - question: "No product vision found. Would you like to define one now?"
399
- - options:
400
- - "Create product vision (Recommended)" — Run /ace:plan-product-vision to define what you're building and why
401
- - "Skip for now" — Continue without a product vision
402
- </substep>
403
-
404
- <substep order="7.2" name="route-vision-decision">
405
- <variant condition="user chose Create product vision">
406
- Display:
407
- ```
408
- Next > Run /ace:plan-product-vision to define your product vision.
409
- This drives all downstream planning.
410
- ```
411
- **Exit workflow.**
412
- </variant>
413
-
414
- <variant condition="user chose Skip for now">
415
- Continue to step 8.
416
- </variant>
417
- </substep>
418
- </step>
419
-
420
- <!-- ══════════════════════════════════════════════════════════════════ -->
421
- <!-- STEP 8: OFFER CODING STANDARDS -->
422
- <!-- ══════════════════════════════════════════════════════════════════ -->
423
-
424
- <step name="offer-coding-standards" order="8" condition="has_coding_standards is false">
425
-
426
- <substep order="8.1" name="ask-coding-standards">
427
- Use `AskUserQuestion`:
428
- - header: "Standards"
429
- - question: "No coding standards found. Would you like to generate them?"
430
- - options:
431
- - "Generate coding standards (Recommended)" — Run /ace:init-coding-standards to create tailored standards
432
- - "Skip for now" — Continue without coding standards
433
- </substep>
434
-
435
- <substep order="8.2" name="route-standards-decision">
436
- <variant condition="user chose Generate coding standards">
437
- Display:
438
- ```
439
- Next > Run /ace:init-coding-standards to generate tailored coding standards.
440
- ```
441
- **Exit workflow.**
442
- </variant>
443
-
444
- <variant condition="user chose Skip for now">
445
- Continue to step 9.
446
- </variant>
447
- </substep>
448
- </step>
449
-
450
- <!-- ══════════════════════════════════════════════════════════════════ -->
451
- <!-- STEP 9: OFFER PRODUCT BACKLOG -->
452
- <!-- ══════════════════════════════════════════════════════════════════ -->
453
-
454
- <step name="offer-product-backlog" order="9" condition="has_product_vision is true">
455
-
456
- <substep order="9.1" name="check-backlog-exists">
457
- ```bash
458
- HAS_BACKLOG=$(node ~/.claude/agile-context-engineering/src/ace-tools.js verify-path-exists .ace/artifacts/product/product-backlog.md --raw)
459
- ```
460
-
461
- <variant condition="HAS_BACKLOG is true">
462
- Backlog already exists. Skip to step 10.
463
- </variant>
464
-
465
- <variant condition="HAS_BACKLOG is false">
466
- Continue to substep 8.2.
467
- </variant>
468
- </substep>
469
-
470
- <substep order="9.2" name="ask-plan-backlog">
471
- Use `AskUserQuestion`:
472
- - header: "Backlog"
473
- - question: "You have a product vision but no backlog. Would you like to plan your product backlog?"
474
- - options:
475
- - "Plan backlog (Recommended)" — Run /ace:plan-backlog to break your vision into epics and features
476
- - "Skip for now" — Continue without a backlog
477
- </substep>
478
-
479
- <substep order="9.3" name="route-backlog-decision">
480
- <variant condition="user chose Plan backlog">
481
- Display:
482
- ```
483
- Next > Run /ace:plan-backlog to break your vision into epics and features.
484
- ```
485
- **Exit workflow.**
486
- </variant>
487
-
488
- <variant condition="user chose Skip for now">
489
- Continue to step 10.
490
- </variant>
491
- </substep>
492
- </step>
493
-
494
- <!-- ══════════════════════════════════════════════════════════════════ -->
495
- <!-- STEP 10: COMPLETION -->
496
- <!-- ══════════════════════════════════════════════════════════════════ -->
497
-
498
- <step name="completion" order="10">
499
-
500
- <substep order="10.1" name="greenfield-note" condition="is_greenfield is true AND has_system_architecture is false">
501
- Display:
502
- ```
503
- i System architecture, structure, and testing framework docs
504
- are created by /ace:map-system after you have code to analyze.
505
- ```
506
- </substep>
507
-
508
- <substep order="10.2" name="fully-initialized">
509
- <variant condition="all documents exist (vision + architecture + structure + coding standards + testing framework)">
510
- Display:
511
- ```
512
- ✓ Project is fully initialized. All core documents are in place.
513
-
514
- Next > /ace:plan-project
515
- Start planning your product backlog.
516
- ```
517
- </variant>
518
-
519
- <variant condition="some documents are missing (user skipped offers)">
520
- Display:
521
- ```
522
- i Run /ace:help anytime to check status and pick up where you left off.
523
- ```
524
- </variant>
525
- </substep>
526
- </step>
527
-
528
- </process>
529
-
530
- <success_criteria>
531
- <check>Environment detection executed successfully</check>
532
- <check>Settings.json ensured (created if missing)</check>
533
- <check>GitHub Project integration offered to the user (not silently skipped)</check>
534
- <check>Agent Teams: sync-agent-teams command executed AND AskUserQuestion presented (NEVER skip this)</check>
535
- <check>Status dashboard displayed showing all document states, settings, and GitHub status</check>
536
- <check>Missing setup commands offered interactively in priority order</check>
537
- <check>No document creation performed (delegated to specialized commands)</check>
538
- </success_criteria>
539
-
540
- </workflow>
252
+ Continue to step 5.
253
+ </conditional>
254
+
255
+ <substep order="4.1" name="sync-agent-teams">
256
+ **MANDATORY — Run this command before evaluating state:**
257
+
258
+ ```bash
259
+ AGENT_TEAMS=$(node "${CLAUDE_SKILL_DIR}/script.js" sync-agent-teams --raw)
260
+ ```
261
+
262
+ Parse the JSON output. The `agent_teams` field is the synced boolean state.
263
+ </substep>
264
+
265
+ <substep order="4.2" name="ask-agent-teams">
266
+ **MANDATORY You MUST use AskUserQuestion here. Do NOT skip this interaction.**
267
+ **IMPORTANT: When writing settings, you MUST use the Bash commands below.
268
+ NEVER directly edit .ace/settings.json or .claude/settings.json — the
269
+ write-agent-teams command updates BOTH files atomically.**
270
+
271
+ <variant condition="agent_teams is true (from sync output)">
272
+ Use `AskUserQuestion`:
273
+ - header: "Agent Teams"
274
+ - question: "Agent Teams (experimental) is currently ENABLED. This orchestrates multiple Claude Code sessions in parallel but significantly increases token usage. Would you like to keep it enabled?"
275
+ - options:
276
+ - "Keep enabled" — Continue with Agent Teams enabled
277
+ - "Disable" — Turn off Agent Teams to reduce token usage
278
+
279
+ <variant condition="user chose Disable">
280
+ ```bash
281
+ node "${CLAUDE_SKILL_DIR}/script.js" write-agent-teams false
282
+ ```
283
+ Display:
284
+ ```
285
+ Agent Teams disabled.
286
+ ```
287
+ </variant>
288
+ </variant>
289
+
290
+ <variant condition="agent_teams is false (from sync output)">
291
+ Use `AskUserQuestion`:
292
+ - header: "Agent Teams"
293
+ - question: "Would you like to enable Claude Code Agent Teams? This is an experimental feature that orchestrates multiple Claude Code sessions working in parallel. WARNING: This significantly increases token usage."
294
+ - options:
295
+ - "Skip for now (Recommended)" — Keep Agent Teams disabled
296
+ - "Enable Agent Teams" — Enable experimental multi-session orchestration (higher token cost)
297
+
298
+ <variant condition="user chose Enable Agent Teams">
299
+ ```bash
300
+ node "${CLAUDE_SKILL_DIR}/script.js" write-agent-teams true
301
+ ```
302
+ Display:
303
+ ```
304
+ ✓ Agent Teams enabled.
305
+ - Set agent_teams: true in .ace/settings.json
306
+ - Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in .claude/settings.json
307
+ ⚠ This feature is experimental and increases token usage significantly.
308
+ ```
309
+ </variant>
310
+ </variant>
311
+ </substep>
312
+ </step>
313
+
314
+ <!-- ══════════════════════════════════════════════════════════════════ -->
315
+ <!-- STEP 5: DISPLAY STATUS DASHBOARD -->
316
+ <!-- ══════════════════════════════════════════════════════════════════ -->
317
+
318
+ <step name="status-dashboard" order="5">
319
+ Build and display the project status dashboard.
320
+
321
+ <substep order="5.1" name="render-documents-section">
322
+ ```
323
+ ╔══════════════════════════════════════════════════╗
324
+ ║ ACE > Project Status ║
325
+ ╚══════════════════════════════════════════════════╝
326
+
327
+ Project type: {brownfield|greenfield}
328
+
329
+ Product Vision [{check}] {status} {suggestion}
330
+ System Architecture [{check}] {status} {suggestion}
331
+ System Structure [{check}] {status} {suggestion}
332
+ Coding Standards [{check}] {status} {suggestion}
333
+ Testing Framework [{check}] {status} {suggestion}
334
+ ```
335
+
336
+ For each document:
337
+ - If exists: `[✓] exists` (no suggestion)
338
+ - If missing: `[ ] not created → /ace:command-name`
339
+
340
+ <doc-command-mapping>
341
+ <doc name="Product Vision" command="/ace:plan-product-vision" />
342
+ <doc name="System Architecture" command="/ace:map-system" />
343
+ <doc name="System Structure" command="/ace:map-system" />
344
+ <doc name="Coding Standards" command="/ace:init-coding-standards" />
345
+ <doc name="Testing Framework" command="/ace:map-system" />
346
+ </doc-command-mapping>
347
+ </substep>
348
+
349
+ <substep order="5.2" name="render-settings-section">
350
+ ```
351
+ Settings [✓] .ace/settings.json
352
+ Model profile: {settings.model_profile}
353
+ Commit docs: {settings.commit_docs}
354
+ Agent Teams: {enabled (experimental) | disabled}
355
+ ```
356
+ </substep>
357
+
358
+ <substep order="5.3" name="render-github-section">
359
+ ```
360
+ GitHub CLI [{check}] {installed|not found}
361
+ Owner {owner or 'not detected'}
362
+ Repository {repo or 'not detected'}
363
+ GitHub Project [{check}] {configured — #number | not configured}
364
+ ```
365
+ </substep>
366
+ </step>
367
+
368
+ <!-- ══════════════════════════════════════════════════════════════════ -->
369
+ <!-- STEP 6: OFFER CODEBASE MAPPING (brownfield only) -->
370
+ <!-- ══════════════════════════════════════════════════════════════════ -->
371
+
372
+ <step name="offer-map-system" order="6" condition="is_brownfield is true AND has_system_architecture is false">
373
+
374
+ <substep order="6.1" name="ask-map-codebase">
375
+ Use `AskUserQuestion`:
376
+ - header: "Codebase"
377
+ - question: "I detected existing code but no wiki documentation. Would you like to map your codebase first?"
378
+ - options:
379
+ - "Map codebase (Recommended)" — Run /ace:map-system to analyze architecture, structure, and testing framework
380
+ - "Skip for now" — Continue without mapping
381
+ </substep>
382
+
383
+ <substep order="6.2" name="route-map-decision">
384
+ <variant condition="user chose Map codebase">
385
+ Display:
386
+ ```
387
+ Next > Run /ace:map-system to map your codebase.
388
+ This will generate system-structure, system-architecture,
389
+ and testing-framework documents.
390
+ ```
391
+ **Exit workflow.**
392
+ </variant>
393
+
394
+ <variant condition="user chose Skip for now">
395
+ Continue to step 7.
396
+ </variant>
397
+ </substep>
398
+ </step>
399
+
400
+ <!-- ══════════════════════════════════════════════════════════════════ -->
401
+ <!-- STEP 7: OFFER PRODUCT VISION -->
402
+ <!-- ══════════════════════════════════════════════════════════════════ -->
403
+
404
+ <step name="offer-product-vision" order="7" condition="has_product_vision is false">
405
+
406
+ <substep order="7.1" name="ask-product-vision">
407
+ Use `AskUserQuestion`:
408
+ - header: "Vision"
409
+ - question: "No product vision found. Would you like to define one now?"
410
+ - options:
411
+ - "Create product vision (Recommended)" — Run /ace:plan-product-vision to define what you're building and why
412
+ - "Skip for now" — Continue without a product vision
413
+ </substep>
414
+
415
+ <substep order="7.2" name="route-vision-decision">
416
+ <variant condition="user chose Create product vision">
417
+ Display:
418
+ ```
419
+ Next > Run /ace:plan-product-vision to define your product vision.
420
+ This drives all downstream planning.
421
+ ```
422
+ **Exit workflow.**
423
+ </variant>
424
+
425
+ <variant condition="user chose Skip for now">
426
+ Continue to step 8.
427
+ </variant>
428
+ </substep>
429
+ </step>
430
+
431
+ <!-- ══════════════════════════════════════════════════════════════════ -->
432
+ <!-- STEP 8: OFFER CODING STANDARDS -->
433
+ <!-- ══════════════════════════════════════════════════════════════════ -->
434
+
435
+ <step name="offer-coding-standards" order="8" condition="has_coding_standards is false">
436
+
437
+ <substep order="8.1" name="ask-coding-standards">
438
+ Use `AskUserQuestion`:
439
+ - header: "Standards"
440
+ - question: "No coding standards found. Would you like to generate them?"
441
+ - options:
442
+ - "Generate coding standards (Recommended)" — Run /ace:init-coding-standards to create tailored standards
443
+ - "Skip for now" — Continue without coding standards
444
+ </substep>
445
+
446
+ <substep order="8.2" name="route-standards-decision">
447
+ <variant condition="user chose Generate coding standards">
448
+ Display:
449
+ ```
450
+ Next > Run /ace:init-coding-standards to generate tailored coding standards.
451
+ ```
452
+ **Exit workflow.**
453
+ </variant>
454
+
455
+ <variant condition="user chose Skip for now">
456
+ Continue to step 9.
457
+ </variant>
458
+ </substep>
459
+ </step>
460
+
461
+ <!-- ══════════════════════════════════════════════════════════════════ -->
462
+ <!-- STEP 9: OFFER PRODUCT BACKLOG -->
463
+ <!-- ══════════════════════════════════════════════════════════════════ -->
464
+
465
+ <step name="offer-product-backlog" order="9" condition="has_product_vision is true">
466
+
467
+ <substep order="9.1" name="check-backlog-exists">
468
+ ```bash
469
+ HAS_BACKLOG=$(node "${CLAUDE_SKILL_DIR}/script.js" verify-path-exists .ace/artifacts/product/product-backlog.md --raw)
470
+ ```
471
+
472
+ <variant condition="HAS_BACKLOG is true">
473
+ Backlog already exists. Skip to step 10.
474
+ </variant>
475
+
476
+ <variant condition="HAS_BACKLOG is false">
477
+ Continue to substep 8.2.
478
+ </variant>
479
+ </substep>
480
+
481
+ <substep order="9.2" name="ask-plan-backlog">
482
+ Use `AskUserQuestion`:
483
+ - header: "Backlog"
484
+ - question: "You have a product vision but no backlog. Would you like to plan your product backlog?"
485
+ - options:
486
+ - "Plan backlog (Recommended)" — Run /ace:plan-backlog to break your vision into epics and features
487
+ - "Skip for now" — Continue without a backlog
488
+ </substep>
489
+
490
+ <substep order="9.3" name="route-backlog-decision">
491
+ <variant condition="user chose Plan backlog">
492
+ Display:
493
+ ```
494
+ Next > Run /ace:plan-backlog to break your vision into epics and features.
495
+ ```
496
+ **Exit workflow.**
497
+ </variant>
498
+
499
+ <variant condition="user chose Skip for now">
500
+ Continue to step 10.
501
+ </variant>
502
+ </substep>
503
+ </step>
504
+
505
+ <!-- ══════════════════════════════════════════════════════════════════ -->
506
+ <!-- STEP 10: COMPLETION -->
507
+ <!-- ══════════════════════════════════════════════════════════════════ -->
508
+
509
+ <step name="completion" order="10">
510
+
511
+ <substep order="10.1" name="greenfield-note" condition="is_greenfield is true AND has_system_architecture is false">
512
+ Display:
513
+ ```
514
+ i System architecture, structure, and testing framework docs
515
+ are created by /ace:map-system after you have code to analyze.
516
+ ```
517
+ </substep>
518
+
519
+ <substep order="10.2" name="fully-initialized">
520
+ <variant condition="all documents exist (vision + architecture + structure + coding standards + testing framework)">
521
+ Display:
522
+ ```
523
+ Project is fully initialized. All core documents are in place.
524
+
525
+ Next > /ace:plan-project
526
+ Start planning your product backlog.
527
+ ```
528
+ </variant>
529
+
530
+ <variant condition="some documents are missing (user skipped offers)">
531
+ Display:
532
+ ```
533
+ i Run /ace:help anytime to check status and pick up where you left off.
534
+ ```
535
+ </variant>
536
+ </substep>
537
+ </step>
538
+
539
+ </process>
540
+
541
+ <success_criteria>
542
+ <check>Environment detection executed successfully</check>
543
+ <check>Settings.json ensured (created if missing)</check>
544
+ <check>GitHub Project integration offered to the user (not silently skipped)</check>
545
+ <check>Agent Teams: sync-agent-teams command executed AND AskUserQuestion presented (NEVER skip this)</check>
546
+ <check>Status dashboard displayed showing all document states, settings, and GitHub status</check>
547
+ <check>Missing setup commands offered interactively in priority order</check>
548
+ <check>No document creation performed (delegated to specialized commands)</check>
549
+ </success_criteria>
550
+
551
+ </workflow>