ace-experience 0.1.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 (94) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +40 -0
  3. package/ace/references/continuation-format.md +249 -0
  4. package/ace/references/gates.md +1078 -0
  5. package/ace/references/git-integration.md +254 -0
  6. package/ace/references/horsepower-profiles.md +73 -0
  7. package/ace/references/planning-config.md +189 -0
  8. package/ace/references/questioning.md +141 -0
  9. package/ace/references/tdd.md +263 -0
  10. package/ace/references/ui-brand.md +160 -0
  11. package/ace/references/verification-patterns.md +612 -0
  12. package/ace/templates/architect-prompt.md +117 -0
  13. package/ace/templates/brief.md +184 -0
  14. package/ace/templates/codebase/architecture.md +264 -0
  15. package/ace/templates/codebase/concerns.md +310 -0
  16. package/ace/templates/codebase/conventions.md +307 -0
  17. package/ace/templates/codebase/integrations.md +280 -0
  18. package/ace/templates/codebase/stack.md +186 -0
  19. package/ace/templates/codebase/structure.md +295 -0
  20. package/ace/templates/codebase/testing.md +480 -0
  21. package/ace/templates/config.json +36 -0
  22. package/ace/templates/continue-here.md +78 -0
  23. package/ace/templates/debug.md +159 -0
  24. package/ace/templates/detective-prompt.md +91 -0
  25. package/ace/templates/intel.md +283 -0
  26. package/ace/templates/milestone-archive.md +123 -0
  27. package/ace/templates/milestone.md +115 -0
  28. package/ace/templates/proof.md +322 -0
  29. package/ace/templates/pulse.md +176 -0
  30. package/ace/templates/recap.md +246 -0
  31. package/ace/templates/research/architecture.md +204 -0
  32. package/ace/templates/research/features.md +147 -0
  33. package/ace/templates/research/pitfalls.md +200 -0
  34. package/ace/templates/research/recap.md +170 -0
  35. package/ace/templates/research/stack.md +120 -0
  36. package/ace/templates/research-lite.md +146 -0
  37. package/ace/templates/research.md +552 -0
  38. package/ace/templates/specs.md +231 -0
  39. package/ace/templates/stage-prompt.md +567 -0
  40. package/ace/templates/track.md +202 -0
  41. package/ace/templates/uat.md +247 -0
  42. package/ace/templates/user-setup.md +311 -0
  43. package/ace/workflows/audit-stage.md +628 -0
  44. package/ace/workflows/audit-work.md +596 -0
  45. package/ace/workflows/continue-project.md +305 -0
  46. package/ace/workflows/diagnose-issues.md +231 -0
  47. package/ace/workflows/list-assumptions.md +178 -0
  48. package/ace/workflows/map-codebase.md +322 -0
  49. package/ace/workflows/research-stage.md +289 -0
  50. package/ace/workflows/run-plan.md +1844 -0
  51. package/ace/workflows/run-stage.md +686 -0
  52. package/ace/workflows/scope-stage.md +433 -0
  53. package/ace/workflows/ship-milestone.md +833 -0
  54. package/ace/workflows/transition.md +556 -0
  55. package/agents/ace-architect.md +1415 -0
  56. package/agents/ace-auditor.md +778 -0
  57. package/agents/ace-codebase-mapper.md +738 -0
  58. package/agents/ace-detective.md +1203 -0
  59. package/agents/ace-integration-checker.md +423 -0
  60. package/agents/ace-navigator.md +605 -0
  61. package/agents/ace-plan-reviewer.md +812 -0
  62. package/agents/ace-project-scout.md +865 -0
  63. package/agents/ace-runner.md +784 -0
  64. package/agents/ace-stage-scout.md +669 -0
  65. package/agents/ace-synthesizer.md +256 -0
  66. package/bin/install.js +1432 -0
  67. package/commands/ace.add-stage.md +211 -0
  68. package/commands/ace.add-todo.md +194 -0
  69. package/commands/ace.audit-milestone.md +277 -0
  70. package/commands/ace.audit.md +219 -0
  71. package/commands/ace.check-todos.md +229 -0
  72. package/commands/ace.complete-milestone.md +134 -0
  73. package/commands/ace.continue.md +46 -0
  74. package/commands/ace.dash.md +308 -0
  75. package/commands/ace.debug.md +169 -0
  76. package/commands/ace.discuss-stage.md +86 -0
  77. package/commands/ace.help.md +465 -0
  78. package/commands/ace.insert-stage.md +231 -0
  79. package/commands/ace.list-stage-assumptions.md +49 -0
  80. package/commands/ace.map-codebase.md +71 -0
  81. package/commands/ace.new-milestone.md +710 -0
  82. package/commands/ace.pause.md +132 -0
  83. package/commands/ace.plan-milestone-gaps.md +295 -0
  84. package/commands/ace.plan-stage.md +568 -0
  85. package/commands/ace.remove-stage.md +353 -0
  86. package/commands/ace.research-stage.md +200 -0
  87. package/commands/ace.run-stage.md +343 -0
  88. package/commands/ace.set-profile.md +116 -0
  89. package/commands/ace.settings.md +151 -0
  90. package/commands/ace.start.md +1008 -0
  91. package/commands/ace.status.md +364 -0
  92. package/hooks/dist/ace-check-update.js +67 -0
  93. package/hooks/dist/ace-statusline.js +96 -0
  94. package/package.json +85 -0
@@ -0,0 +1,254 @@
1
+ <overview>
2
+ Git integration for ACE framework.
3
+ </overview>
4
+
5
+ <core_principle>
6
+
7
+ **Commit outcomes, not process.**
8
+
9
+ The git log should read like a changelog of what shipped, not a diary of planning activity.
10
+ </core_principle>
11
+
12
+ <commit_points>
13
+
14
+ | Event | Commit? | Why |
15
+ | ----------------------- | ------- | ------------------------------------------------ |
16
+ | BRIEF + TRACK created | YES | Project initialization |
17
+ | run.md created | NO | Intermediate - commit with run completion |
18
+ | RESEARCH.md created | NO | Intermediate |
19
+ | research.md created | NO | Intermediate |
20
+ | **Task completed** | YES | Atomic unit of work (1 commit per task) |
21
+ | **Run completed** | YES | Metadata commit (RECAP + PULSE + TRACK) |
22
+ | Handoff created | YES | WIP state preserved |
23
+
24
+ </commit_points>
25
+
26
+ <git_check>
27
+
28
+ ```bash
29
+ [ -d .git ] && echo "GIT_EXISTS" || echo "NO_GIT"
30
+ ```
31
+
32
+ If NO_GIT: Run `git init` silently. ACE projects always get their own repo.
33
+ </git_check>
34
+
35
+ <commit_formats>
36
+
37
+ <format name="initialization">
38
+ ## Project Initialization (brief + track together)
39
+
40
+ ```
41
+ docs: initialize [project-name] ([N] stages)
42
+
43
+ [One-liner from brief.md]
44
+
45
+ Stages:
46
+ 1. [stage-name]: [goal]
47
+ 2. [stage-name]: [goal]
48
+ 3. [stage-name]: [goal]
49
+ ```
50
+
51
+ What to commit:
52
+
53
+ ```bash
54
+ git add .ace/
55
+ git commit
56
+ ```
57
+
58
+ </format>
59
+
60
+ <format name="task-completion">
61
+ ## Task Completion (During Run Execution)
62
+
63
+ Each task gets its own commit immediately after completion.
64
+
65
+ ```
66
+ {type}({stage}.{run}): {task-name}
67
+
68
+ - [Key change 1]
69
+ - [Key change 2]
70
+ - [Key change 3]
71
+ ```
72
+
73
+ **Commit types:**
74
+ - `feat` - New feature/functionality
75
+ - `fix` - Bug fix
76
+ - `test` - Test-only (TDD RED stage)
77
+ - `refactor` - Code cleanup (TDD REFACTOR stage)
78
+ - `perf` - Performance improvement
79
+ - `chore` - Dependencies, config, tooling
80
+
81
+ **Examples:**
82
+
83
+ ```bash
84
+ # Standard task
85
+ git add src/api/auth.ts src/types/user.ts
86
+ git commit -m "feat(08.02): create user registration endpoint
87
+
88
+ - POST /auth/register validates email and password
89
+ - Checks for duplicate users
90
+ - Returns JWT token on success
91
+ "
92
+
93
+ # TDD task - RED stage
94
+ git add src/__tests__/jwt.test.ts
95
+ git commit -m "test(07.02): add failing test for JWT generation
96
+
97
+ - Tests token contains user ID claim
98
+ - Tests token expires in 1 hour
99
+ - Tests signature verification
100
+ "
101
+
102
+ # TDD task - GREEN stage
103
+ git add src/utils/jwt.ts
104
+ git commit -m "feat(07.02): implement JWT generation
105
+
106
+ - Uses jose library for signing
107
+ - Includes user ID and expiry claims
108
+ - Signs with HS256 algorithm
109
+ "
110
+ ```
111
+
112
+ </format>
113
+
114
+ <format name="run-completion">
115
+ ## Run Completion (After All Tasks Done)
116
+
117
+ After all tasks committed, one final metadata commit captures run completion.
118
+
119
+ ```
120
+ docs({stage}.{run}): complete [run-name] run
121
+
122
+ Tasks completed: [N]/[N]
123
+ - [Task 1 name]
124
+ - [Task 2 name]
125
+ - [Task 3 name]
126
+
127
+ RECAP: .ace/stages/XX-name/{stage}.{run}-recap.md
128
+ ```
129
+
130
+ What to commit:
131
+
132
+ ```bash
133
+ git add .ace/stages/XX-name/{stage}.{run}-run.md
134
+ git add .ace/stages/XX-name/{stage}.{run}-recap.md
135
+ git add .ace/pulse.md
136
+ git add .ace/track.md
137
+ git commit
138
+ ```
139
+
140
+ **Note:** Code files NOT included - already committed per-task.
141
+
142
+ </format>
143
+
144
+ <format name="handoff">
145
+ ## Handoff (WIP)
146
+
147
+ ```
148
+ wip: [stage-name] paused at task [X]/[Y]
149
+
150
+ Current: [task name]
151
+ [If blocked:] Blocked: [reason]
152
+ ```
153
+
154
+ What to commit:
155
+
156
+ ```bash
157
+ git add .ace/
158
+ git commit
159
+ ```
160
+
161
+ </format>
162
+ </commit_formats>
163
+
164
+ <example_log>
165
+
166
+ **Old approach (per-run commits):**
167
+ ```
168
+ a7f2d1 feat(checkout): Stripe payments with webhook verification
169
+ 3e9c4b feat(products): catalog with search, filters, and pagination
170
+ 8a1b2c feat(auth): JWT with refresh rotation using jose
171
+ 5c3d7e feat(foundation): Next.js 15 + Prisma + Tailwind scaffold
172
+ 2f4a8d docs: initialize ecommerce-app (5 stages)
173
+ ```
174
+
175
+ **New approach (per-task commits):**
176
+ ```
177
+ # Stage 04 - Checkout
178
+ 1a2b3c docs(04.01): complete checkout flow run
179
+ 4d5e6f feat(04.01): add webhook signature verification
180
+ 7g8h9i feat(04.01): implement payment session creation
181
+ 0j1k2l feat(04.01): create checkout page component
182
+
183
+ # Stage 03 - Products
184
+ 3m4n5o docs(03.02): complete product listing run
185
+ 6p7q8r feat(03.02): add pagination controls
186
+ 9s0t1u feat(03.02): implement search and filters
187
+ 2v3w4x feat(03.01): create product catalog schema
188
+
189
+ # Stage 02 - Auth
190
+ 5y6z7a docs(02.02): complete token refresh run
191
+ 8b9c0d feat(02.02): implement refresh token rotation
192
+ 1e2f3g test(02.02): add failing test for token refresh
193
+ 4h5i6j docs(02.01): complete JWT setup run
194
+ 7k8l9m feat(02.01): add JWT generation and validation
195
+ 0n1o2p chore(02.01): install jose library
196
+
197
+ # Stage 01 - Foundation
198
+ 3q4r5s docs(01.01): complete scaffold run
199
+ 6t7u8v feat(01.01): configure Tailwind and globals
200
+ 9w0x1y feat(01.01): set up Prisma with database
201
+ 2z3a4b feat(01.01): create Next.js 15 project
202
+
203
+ # Initialization
204
+ 5c6d7e docs: initialize ecommerce-app (5 stages)
205
+ ```
206
+
207
+ Each run produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
208
+
209
+ </example_log>
210
+
211
+ <anti_patterns>
212
+
213
+ **Still don't commit (intermediate artifacts):**
214
+ - run.md creation (commit with run completion)
215
+ - RESEARCH.md (intermediate)
216
+ - research.md (intermediate)
217
+ - Minor planning tweaks
218
+ - "Fixed typo in track"
219
+
220
+ **Do commit (outcomes):**
221
+ - Each task completion (feat/fix/test/refactor)
222
+ - Run completion metadata (docs)
223
+ - Project initialization (docs)
224
+
225
+ **Key principle:** Commit working code and shipped outcomes, not planning process.
226
+
227
+ </anti_patterns>
228
+
229
+ <commit_strategy_rationale>
230
+
231
+ ## Why Per-Task Commits?
232
+
233
+ **Context engineering for AI:**
234
+ - Git history becomes primary context source for future Claude sessions
235
+ - `git log --grep="{stage}.{run}"` shows all work for a run
236
+ - `git diff <hash>^..<hash>` shows exact changes per task
237
+ - Less reliance on parsing recap.md = more context for actual work
238
+
239
+ **Failure recovery:**
240
+ - Task 1 committed ✅, Task 2 failed ❌
241
+ - Claude in next session: sees task 1 complete, can retry task 2
242
+ - Can `git reset --hard` to last successful task
243
+
244
+ **Debugging:**
245
+ - `git bisect` finds exact failing task, not just failing run
246
+ - `git blame` traces line to specific task context
247
+ - Each commit is independently revertable
248
+
249
+ **Observability:**
250
+ - Solo developer + Claude workflow benefits from granular attribution
251
+ - Atomic commits are git best practice
252
+ - "Commit noise" irrelevant when consumer is Claude, not humans
253
+
254
+ </commit_strategy_rationale>
@@ -0,0 +1,73 @@
1
+ # Horsepower Profiles
2
+
3
+ Horsepower profiles control which Claude model each ACE agent uses. This allows balancing quality vs token spend.
4
+
5
+ ## Profile Definitions
6
+
7
+ | Agent | `max` | `balanced` | `eco` |
8
+ |-------|-------|------------|-------|
9
+ | ace-architect | opus | opus | sonnet |
10
+ | ace-navigator | opus | sonnet | sonnet |
11
+ | ace-runner | opus | sonnet | sonnet |
12
+ | ace-stage-scout | opus | sonnet | haiku |
13
+ | ace-project-scout | opus | sonnet | haiku |
14
+ | ace-synthesizer | sonnet | sonnet | haiku |
15
+ | ace-detective | opus | sonnet | sonnet |
16
+ | ace-codebase-mapper | sonnet | haiku | haiku |
17
+ | ace-auditor | sonnet | sonnet | haiku |
18
+ | ace-plan-reviewer | sonnet | sonnet | haiku |
19
+ | ace-integration-checker | sonnet | sonnet | haiku |
20
+
21
+ ## Profile Philosophy
22
+
23
+ **max** - Maximum reasoning power
24
+ - Opus for all decision-making agents
25
+ - Sonnet for read-only verification
26
+ - Use when: quota available, critical architecture work
27
+
28
+ **balanced** (default) - Smart allocation
29
+ - Opus only for planning (where architecture decisions happen)
30
+ - Sonnet for execution and research (follows explicit instructions)
31
+ - Sonnet for verification (needs reasoning, not just pattern matching)
32
+ - Use when: normal development, good balance of quality and cost
33
+
34
+ **eco** - Minimal Opus usage
35
+ - Sonnet for anything that writes code
36
+ - Haiku for research and verification
37
+ - Use when: conserving quota, high-volume work, less critical stages
38
+
39
+ ## Resolution Logic
40
+
41
+ Orchestrators resolve model before spawning:
42
+
43
+ ```
44
+ 1. Read .ace/config.json
45
+ 2. Get horsepower (default: "balanced")
46
+ 3. Look up agent in table above
47
+ 4. Pass model parameter to Task call
48
+ ```
49
+
50
+ ## Switching Profiles
51
+
52
+ Runtime: `/ace.set-profile <profile>`
53
+
54
+ Per-project default: Set in `.ace/config.json`:
55
+ ```json
56
+ {
57
+ "horsepower": "balanced"
58
+ }
59
+ ```
60
+
61
+ ## Design Rationale
62
+
63
+ **Why Opus for ace-architect?**
64
+ Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
65
+
66
+ **Why Sonnet for ace-runner?**
67
+ Runners follow explicit run.md instructions. The run already contains the reasoning; execution is implementation.
68
+
69
+ **Why Sonnet (not Haiku) for auditors in balanced?**
70
+ Verification requires goal-backward reasoning - checking if code *delivers* what the stage promised, not just pattern matching. Sonnet handles this well; Haiku may miss subtle gaps.
71
+
72
+ **Why Haiku for ace-codebase-mapper?**
73
+ Read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
@@ -0,0 +1,189 @@
1
+ <planning_config>
2
+
3
+ Configuration options for `.ace/` directory behavior.
4
+
5
+ <config_schema>
6
+ ```json
7
+ "planning": {
8
+ "commit_docs": true,
9
+ "search_gitignored": false
10
+ },
11
+ "git": {
12
+ "branching_strategy": "none",
13
+ "stage_branch_template": "ace/stage-{stage}-{slug}",
14
+ "milestone_branch_template": "ace/{milestone}-{slug}"
15
+ }
16
+ ```
17
+
18
+ | Option | Default | Description |
19
+ |--------|---------|-------------|
20
+ | `commit_docs` | `true` | Whether to commit planning artifacts to git |
21
+ | `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
22
+ | `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"stage"`, or `"milestone"` |
23
+ | `git.stage_branch_template` | `"ace/stage-{stage}-{slug}"` | Branch template for stage strategy |
24
+ | `git.milestone_branch_template` | `"ace/{milestone}-{slug}"` | Branch template for milestone strategy |
25
+ </config_schema>
26
+
27
+ <commit_docs_behavior>
28
+
29
+ **When `commit_docs: true` (default):**
30
+ - Planning files committed normally
31
+ - recap.md, pulse.md, track.md tracked in git
32
+ - Full history of planning decisions preserved
33
+
34
+ **When `commit_docs: false`:**
35
+ - Skip all `git add`/`git commit` for `.ace/` files
36
+ - User must add `.ace/` to `.gitignore`
37
+ - Useful for: OSS contributions, client projects, keeping planning private
38
+
39
+ **Checking the config:**
40
+
41
+ ```bash
42
+ # Check config.json first
43
+ COMMIT_DOCS=$(cat .ace/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
44
+
45
+ # Auto-detect gitignored (overrides config)
46
+ git check-ignore -q .ace 2>/dev/null && COMMIT_DOCS=false
47
+ ```
48
+
49
+ **Auto-detection:** If `.ace/` is gitignored, `commit_docs` is automatically `false` regardless of config.json. This prevents git errors when users have `.ace/` in `.gitignore`.
50
+
51
+ **Conditional git operations:**
52
+
53
+ ```bash
54
+ if [ "$COMMIT_DOCS" = "true" ]; then
55
+ git add .ace/pulse.md
56
+ git commit -m "docs: update state"
57
+ fi
58
+ ```
59
+
60
+ </commit_docs_behavior>
61
+
62
+ <search_behavior>
63
+
64
+ **When `search_gitignored: false` (default):**
65
+ - Standard rg behavior (respects .gitignore)
66
+ - Direct path searches work: `rg "pattern" .ace/` finds files
67
+ - Broad searches skip gitignored: `rg "pattern"` skips `.ace/`
68
+
69
+ **When `search_gitignored: true`:**
70
+ - Add `--no-ignore` to broad rg searches that should include `.ace/`
71
+ - Only needed when searching entire repo and expecting `.ace/` matches
72
+
73
+ **Note:** Most ACE operations use direct file reads or explicit paths, which work regardless of gitignore status.
74
+
75
+ </search_behavior>
76
+
77
+ <setup_uncommitted_mode>
78
+
79
+ To use uncommitted mode:
80
+
81
+ 1. **Set config:**
82
+ ```json
83
+ "planning": {
84
+ "commit_docs": false,
85
+ "search_gitignored": true
86
+ }
87
+ ```
88
+
89
+ 2. **Add to .gitignore:**
90
+ ```
91
+ .ace/
92
+ ```
93
+
94
+ 3. **Existing tracked files:** If `.ace/` was previously tracked:
95
+ ```bash
96
+ git rm -r --cached .ace/
97
+ git commit -m "chore: stop tracking planning docs"
98
+ ```
99
+
100
+ </setup_uncommitted_mode>
101
+
102
+ <branching_strategy_behavior>
103
+
104
+ **Branching Strategies:**
105
+
106
+ | Strategy | When branch created | Branch scope | Merge point |
107
+ |----------|---------------------|--------------|-------------|
108
+ | `none` | Never | N/A | N/A |
109
+ | `stage` | At `ace.run-stage` start | Single stage | User merges after stage |
110
+ | `milestone` | At first `ace.run-stage` of milestone | Entire milestone | At `ace.complete-milestone` |
111
+
112
+ **When `git.branching_strategy: "none"` (default):**
113
+ - All work commits to current branch
114
+ - Standard ACE behavior
115
+
116
+ **When `git.branching_strategy: "stage"`:**
117
+ - `ace.run-stage` creates/switches to a branch before execution
118
+ - Branch name from `stage_branch_template` (e.g., `ace/stage-03-authentication`)
119
+ - All run commits go to that branch
120
+ - User merges branches manually after stage completion
121
+ - `ace.complete-milestone` offers to merge all stage branches
122
+
123
+ **When `git.branching_strategy: "milestone"`:**
124
+ - First `ace.run-stage` of milestone creates the milestone branch
125
+ - Branch name from `milestone_branch_template` (e.g., `ace/v1.0-mvp`)
126
+ - All stages in milestone commit to same branch
127
+ - `ace.complete-milestone` offers to merge milestone branch to main
128
+
129
+ **Template variables:**
130
+
131
+ | Variable | Available in | Description |
132
+ |----------|--------------|-------------|
133
+ | `{stage}` | stage_branch_template | Zero-padded stage number (e.g., "03") |
134
+ | `{slug}` | Both | Lowercase, hyphenated name |
135
+ | `{milestone}` | milestone_branch_template | Milestone version (e.g., "v1.0") |
136
+
137
+ **Checking the config:**
138
+
139
+ ```bash
140
+ # Get branching strategy (default: none)
141
+ BRANCHING_STRATEGY=$(cat .ace/config.json 2>/dev/null | grep -o '"branching_strategy"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*:.*"\([^"]*\)"/\1/' || echo "none")
142
+
143
+ # Get stage branch template
144
+ STAGE_BRANCH_TEMPLATE=$(cat .ace/config.json 2>/dev/null | grep -o '"stage_branch_template"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*:.*"\([^"]*\)"/\1/' || echo "ace/stage-{stage}-{slug}")
145
+
146
+ # Get milestone branch template
147
+ MILESTONE_BRANCH_TEMPLATE=$(cat .ace/config.json 2>/dev/null | grep -o '"milestone_branch_template"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*:.*"\([^"]*\)"/\1/' || echo "ace/{milestone}-{slug}")
148
+ ```
149
+
150
+ **Branch creation:**
151
+
152
+ ```bash
153
+ # For stage strategy
154
+ if [ "$BRANCHING_STRATEGY" = "stage" ]; then
155
+ STAGE_SLUG=$(echo "$STAGE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
156
+ BRANCH_NAME=$(echo "$STAGE_BRANCH_TEMPLATE" | sed "s/{stage}/$PADDED_STAGE/g" | sed "s/{slug}/$STAGE_SLUG/g")
157
+ git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
158
+ fi
159
+
160
+ # For milestone strategy
161
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
162
+ MILESTONE_SLUG=$(echo "$MILESTONE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
163
+ BRANCH_NAME=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed "s/{milestone}/$MILESTONE_VERSION/g" | sed "s/{slug}/$MILESTONE_SLUG/g")
164
+ git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
165
+ fi
166
+ ```
167
+
168
+ **Merge options at ace.complete-milestone:**
169
+
170
+ | Option | Git command | Result |
171
+ |--------|-------------|--------|
172
+ | Squash merge (recommended) | `git merge --squash` | Single clean commit per branch |
173
+ | Merge with history | `git merge --no-ff` | Preserves all individual commits |
174
+ | Delete without merging | `git branch -D` | Discard branch work |
175
+ | Keep branches | (none) | Manual handling later |
176
+
177
+ Squash merge is recommended — keeps main branch history clean while preserving the full development history in the branch (until deleted).
178
+
179
+ **Use cases:**
180
+
181
+ | Strategy | Best for |
182
+ |----------|----------|
183
+ | `none` | Solo development, simple projects |
184
+ | `stage` | Code review per stage, granular rollback, team collaboration |
185
+ | `milestone` | Release branches, staging environments, PR per version |
186
+
187
+ </branching_strategy_behavior>
188
+
189
+ </planning_config>
@@ -0,0 +1,141 @@
1
+ <questioning_guide>
2
+
3
+ Project initialization is dream extraction, not requirements gathering. You're helping the user discover and articulate what they want to build. This isn't a contract negotiation — it's collaborative thinking.
4
+
5
+ <philosophy>
6
+
7
+ **You are a thinking partner, not an interviewer.**
8
+
9
+ The user often has a fuzzy idea. Your job is to help them sharpen it. Ask questions that make them think "oh, I hadn't considered that" or "yes, that's exactly what I mean."
10
+
11
+ Don't interrogate. Collaborate. Don't follow a script. Follow the thread.
12
+
13
+ </philosophy>
14
+
15
+ <the_goal>
16
+
17
+ By the end of questioning, you need enough clarity to write a brief.md that downstream stages can act on:
18
+
19
+ - **Research** needs: what domain to research, what the user already knows, what unknowns exist
20
+ - **Requirements** needs: clear enough vision to scope v1 features
21
+ - **Track** needs: clear enough vision to decompose into stages, what "done" looks like
22
+ - **ace.plan-stage** needs: specific requirements to break into tasks, context for implementation choices
23
+ - **ace.run-stage** needs: success criteria to verify against, the "why" behind requirements
24
+
25
+ A vague brief.md forces every downstream stage to guess. The cost compounds.
26
+
27
+ </the_goal>
28
+
29
+ <how_to_question>
30
+
31
+ **Start open.** Let them dump their mental model. Don't interrupt with structure.
32
+
33
+ **Follow energy.** Whatever they emphasized, dig into that. What excited them? What problem sparked this?
34
+
35
+ **Challenge vagueness.** Never accept fuzzy answers. "Good" means what? "Users" means who? "Simple" means how?
36
+
37
+ **Make the abstract concrete.** "Walk me through using this." "What does that actually look like?"
38
+
39
+ **Clarify ambiguity.** "When you say Z, do you mean A or B?" "You mentioned X — tell me more."
40
+
41
+ **Know when to stop.** When you understand what they want, why they want it, who it's for, and what done looks like — offer to proceed.
42
+
43
+ </how_to_question>
44
+
45
+ <question_types>
46
+
47
+ Use these as inspiration, not a checklist. Pick what's relevant to the thread.
48
+
49
+ **Motivation — why this exists:**
50
+ - "What prompted this?"
51
+ - "What are you doing today that this replaces?"
52
+ - "What would you do if this existed?"
53
+
54
+ **Concreteness — what it actually is:**
55
+ - "Walk me through using this"
56
+ - "You said X — what does that actually look like?"
57
+ - "Give me an example"
58
+
59
+ **Clarification — what they mean:**
60
+ - "When you say Z, do you mean A or B?"
61
+ - "You mentioned X — tell me more about that"
62
+
63
+ **Success — how you'll know it's working:**
64
+ - "How will you know this is working?"
65
+ - "What does done look like?"
66
+
67
+ </question_types>
68
+
69
+ <using_askuserquestion>
70
+
71
+ Use AskUserQuestion to help users think by presenting concrete options to react to.
72
+
73
+ **Good options:**
74
+ - Interpretations of what they might mean
75
+ - Specific examples to confirm or deny
76
+ - Concrete choices that reveal priorities
77
+
78
+ **Bad options:**
79
+ - Generic categories ("Technical", "Business", "Other")
80
+ - Leading options that presume an answer
81
+ - Too many options (2-4 is ideal)
82
+
83
+ **Example — vague answer:**
84
+ User says "it should be fast"
85
+
86
+ - header: "Fast"
87
+ - question: "Fast how?"
88
+ - options: ["Sub-second response", "Handles large datasets", "Quick to build", "Let me explain"]
89
+
90
+ **Example — following a thread:**
91
+ User mentions "frustrated with current tools"
92
+
93
+ - header: "Frustration"
94
+ - question: "What specifically frustrates you?"
95
+ - options: ["Too many clicks", "Missing features", "Unreliable", "Let me explain"]
96
+
97
+ </using_askuserquestion>
98
+
99
+ <context_checklist>
100
+
101
+ Use this as a **background checklist**, not a conversation structure. Check these mentally as you go. If gaps remain, weave questions naturally.
102
+
103
+ - [ ] What they're building (concrete enough to explain to a stranger)
104
+ - [ ] Why it needs to exist (the problem or desire driving it)
105
+ - [ ] Who it's for (even if just themselves)
106
+ - [ ] What "done" looks like (observable outcomes)
107
+
108
+ Four things. If they volunteer more, capture it.
109
+
110
+ </context_checklist>
111
+
112
+ <decision_gate>
113
+
114
+ When you could write a clear brief.md, offer to proceed:
115
+
116
+ - header: "Ready?"
117
+ - question: "I think I understand what you're after. Ready to create brief.md?"
118
+ - options:
119
+ - "Create brief.md" — Let's move forward
120
+ - "Keep exploring" — I want to share more / ask me more
121
+
122
+ If "Keep exploring" — ask what they want to add or identify gaps and probe naturally.
123
+
124
+ Loop until "Create brief.md" selected.
125
+
126
+ </decision_gate>
127
+
128
+ <anti_patterns>
129
+
130
+ - **Checklist walking** — Going through domains regardless of what they said
131
+ - **Canned questions** — "What's your core value?" "What's out of scope?" regardless of context
132
+ - **Corporate speak** — "What are your success criteria?" "Who are your stakeholders?"
133
+ - **Interrogation** — Firing questions without building on answers
134
+ - **Rushing** — Minimizing questions to get to "the work"
135
+ - **Shallow acceptance** — Taking vague answers without probing
136
+ - **Premature constraints** — Asking about tech stack before understanding the idea
137
+ - **User skills** — NEVER ask about user's technical experience. Claude builds.
138
+
139
+ </anti_patterns>
140
+
141
+ </questioning_guide>