@howlil/ez-agents 2.0.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 (183) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +845 -0
  3. package/README.zh-CN.md +702 -0
  4. package/agents/ez-codebase-mapper.md +770 -0
  5. package/agents/ez-debugger.md +1255 -0
  6. package/agents/ez-executor.md +487 -0
  7. package/agents/ez-integration-checker.md +443 -0
  8. package/agents/ez-nyquist-auditor.md +176 -0
  9. package/agents/ez-phase-researcher.md +553 -0
  10. package/agents/ez-plan-checker.md +706 -0
  11. package/agents/ez-planner.md +1307 -0
  12. package/agents/ez-project-researcher.md +629 -0
  13. package/agents/ez-research-synthesizer.md +247 -0
  14. package/agents/ez-roadmapper.md +650 -0
  15. package/agents/ez-ui-auditor.md +441 -0
  16. package/agents/ez-ui-checker.md +302 -0
  17. package/agents/ez-ui-researcher.md +355 -0
  18. package/agents/ez-verifier.md +579 -0
  19. package/bin/install.js +2862 -0
  20. package/bin/update.js +214 -0
  21. package/commands/ez/add-phase.md +43 -0
  22. package/commands/ez/add-tests.md +41 -0
  23. package/commands/ez/add-todo.md +47 -0
  24. package/commands/ez/audit-milestone.md +36 -0
  25. package/commands/ez/autonomous.md +41 -0
  26. package/commands/ez/check-todos.md +45 -0
  27. package/commands/ez/cleanup.md +18 -0
  28. package/commands/ez/complete-milestone.md +136 -0
  29. package/commands/ez/debug.md +168 -0
  30. package/commands/ez/discuss-phase.md +90 -0
  31. package/commands/ez/execute-phase.md +41 -0
  32. package/commands/ez/health.md +22 -0
  33. package/commands/ez/help.md +22 -0
  34. package/commands/ez/insert-phase.md +32 -0
  35. package/commands/ez/join-discord.md +18 -0
  36. package/commands/ez/list-phase-assumptions.md +46 -0
  37. package/commands/ez/map-codebase.md +71 -0
  38. package/commands/ez/new-milestone.md +44 -0
  39. package/commands/ez/new-project.md +42 -0
  40. package/commands/ez/pause-work.md +38 -0
  41. package/commands/ez/plan-milestone-gaps.md +34 -0
  42. package/commands/ez/plan-phase.md +45 -0
  43. package/commands/ez/progress.md +24 -0
  44. package/commands/ez/quick.md +45 -0
  45. package/commands/ez/reapply-patches.md +124 -0
  46. package/commands/ez/remove-phase.md +31 -0
  47. package/commands/ez/research-phase.md +190 -0
  48. package/commands/ez/resume-work.md +40 -0
  49. package/commands/ez/set-profile.md +34 -0
  50. package/commands/ez/settings.md +36 -0
  51. package/commands/ez/stats.md +18 -0
  52. package/commands/ez/ui-phase.md +34 -0
  53. package/commands/ez/ui-review.md +32 -0
  54. package/commands/ez/update.md +37 -0
  55. package/commands/ez/validate-phase.md +35 -0
  56. package/commands/ez/verify-work.md +38 -0
  57. package/get-shit-done/bin/ez-tools.cjs +598 -0
  58. package/get-shit-done/bin/lib/assistant-adapter.cjs +205 -0
  59. package/get-shit-done/bin/lib/audit-exec.cjs +150 -0
  60. package/get-shit-done/bin/lib/auth.cjs +175 -0
  61. package/get-shit-done/bin/lib/circuit-breaker.cjs +118 -0
  62. package/get-shit-done/bin/lib/commands.cjs +666 -0
  63. package/get-shit-done/bin/lib/config.cjs +183 -0
  64. package/get-shit-done/bin/lib/core.cjs +495 -0
  65. package/get-shit-done/bin/lib/file-lock.cjs +236 -0
  66. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  67. package/get-shit-done/bin/lib/fs-utils.cjs +153 -0
  68. package/get-shit-done/bin/lib/git-utils.cjs +203 -0
  69. package/get-shit-done/bin/lib/health-check.cjs +163 -0
  70. package/get-shit-done/bin/lib/index.cjs +113 -0
  71. package/get-shit-done/bin/lib/init.cjs +710 -0
  72. package/get-shit-done/bin/lib/logger.cjs +117 -0
  73. package/get-shit-done/bin/lib/milestone.cjs +241 -0
  74. package/get-shit-done/bin/lib/model-provider.cjs +146 -0
  75. package/get-shit-done/bin/lib/phase.cjs +908 -0
  76. package/get-shit-done/bin/lib/retry.cjs +119 -0
  77. package/get-shit-done/bin/lib/roadmap.cjs +305 -0
  78. package/get-shit-done/bin/lib/safe-exec.cjs +128 -0
  79. package/get-shit-done/bin/lib/safe-path.cjs +130 -0
  80. package/get-shit-done/bin/lib/state.cjs +721 -0
  81. package/get-shit-done/bin/lib/temp-file.cjs +239 -0
  82. package/get-shit-done/bin/lib/template.cjs +222 -0
  83. package/get-shit-done/bin/lib/test-file-lock.cjs +112 -0
  84. package/get-shit-done/bin/lib/test-graceful.cjs +93 -0
  85. package/get-shit-done/bin/lib/test-logger.cjs +60 -0
  86. package/get-shit-done/bin/lib/test-safe-exec.cjs +38 -0
  87. package/get-shit-done/bin/lib/test-safe-path.cjs +33 -0
  88. package/get-shit-done/bin/lib/test-temp-file.cjs +125 -0
  89. package/get-shit-done/bin/lib/timeout-exec.cjs +62 -0
  90. package/get-shit-done/bin/lib/verify.cjs +820 -0
  91. package/get-shit-done/references/checkpoints.md +776 -0
  92. package/get-shit-done/references/continuation-format.md +249 -0
  93. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  94. package/get-shit-done/references/git-integration.md +248 -0
  95. package/get-shit-done/references/git-planning-commit.md +38 -0
  96. package/get-shit-done/references/model-profile-resolution.md +34 -0
  97. package/get-shit-done/references/model-profiles.md +93 -0
  98. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  99. package/get-shit-done/references/planning-config.md +200 -0
  100. package/get-shit-done/references/questioning.md +162 -0
  101. package/get-shit-done/references/tdd.md +263 -0
  102. package/get-shit-done/references/ui-brand.md +160 -0
  103. package/get-shit-done/references/verification-patterns.md +612 -0
  104. package/get-shit-done/templates/DEBUG.md +164 -0
  105. package/get-shit-done/templates/UAT.md +247 -0
  106. package/get-shit-done/templates/UI-SPEC.md +100 -0
  107. package/get-shit-done/templates/VALIDATION.md +76 -0
  108. package/get-shit-done/templates/codebase/architecture.md +255 -0
  109. package/get-shit-done/templates/codebase/concerns.md +310 -0
  110. package/get-shit-done/templates/codebase/conventions.md +307 -0
  111. package/get-shit-done/templates/codebase/integrations.md +280 -0
  112. package/get-shit-done/templates/codebase/stack.md +186 -0
  113. package/get-shit-done/templates/codebase/structure.md +285 -0
  114. package/get-shit-done/templates/codebase/testing.md +480 -0
  115. package/get-shit-done/templates/config.json +37 -0
  116. package/get-shit-done/templates/context.md +352 -0
  117. package/get-shit-done/templates/continue-here.md +78 -0
  118. package/get-shit-done/templates/copilot-instructions.md +7 -0
  119. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  120. package/get-shit-done/templates/discovery.md +146 -0
  121. package/get-shit-done/templates/milestone-archive.md +123 -0
  122. package/get-shit-done/templates/milestone.md +115 -0
  123. package/get-shit-done/templates/phase-prompt.md +610 -0
  124. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  125. package/get-shit-done/templates/project.md +184 -0
  126. package/get-shit-done/templates/requirements.md +231 -0
  127. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  128. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  129. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  130. package/get-shit-done/templates/research-project/STACK.md +120 -0
  131. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  132. package/get-shit-done/templates/research.md +552 -0
  133. package/get-shit-done/templates/retrospective.md +54 -0
  134. package/get-shit-done/templates/roadmap.md +202 -0
  135. package/get-shit-done/templates/state.md +176 -0
  136. package/get-shit-done/templates/summary-complex.md +59 -0
  137. package/get-shit-done/templates/summary-minimal.md +41 -0
  138. package/get-shit-done/templates/summary-standard.md +48 -0
  139. package/get-shit-done/templates/summary.md +248 -0
  140. package/get-shit-done/templates/user-setup.md +311 -0
  141. package/get-shit-done/templates/verification-report.md +322 -0
  142. package/get-shit-done/workflows/add-phase.md +112 -0
  143. package/get-shit-done/workflows/add-tests.md +351 -0
  144. package/get-shit-done/workflows/add-todo.md +158 -0
  145. package/get-shit-done/workflows/audit-milestone.md +332 -0
  146. package/get-shit-done/workflows/autonomous.md +743 -0
  147. package/get-shit-done/workflows/check-todos.md +177 -0
  148. package/get-shit-done/workflows/cleanup.md +152 -0
  149. package/get-shit-done/workflows/complete-milestone.md +766 -0
  150. package/get-shit-done/workflows/diagnose-issues.md +219 -0
  151. package/get-shit-done/workflows/discovery-phase.md +289 -0
  152. package/get-shit-done/workflows/discuss-phase.md +762 -0
  153. package/get-shit-done/workflows/execute-phase.md +468 -0
  154. package/get-shit-done/workflows/execute-plan.md +483 -0
  155. package/get-shit-done/workflows/health.md +159 -0
  156. package/get-shit-done/workflows/help.md +492 -0
  157. package/get-shit-done/workflows/insert-phase.md +130 -0
  158. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  159. package/get-shit-done/workflows/map-codebase.md +316 -0
  160. package/get-shit-done/workflows/new-milestone.md +384 -0
  161. package/get-shit-done/workflows/new-project.md +1111 -0
  162. package/get-shit-done/workflows/node-repair.md +92 -0
  163. package/get-shit-done/workflows/pause-work.md +122 -0
  164. package/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  165. package/get-shit-done/workflows/plan-phase.md +651 -0
  166. package/get-shit-done/workflows/progress.md +382 -0
  167. package/get-shit-done/workflows/quick.md +610 -0
  168. package/get-shit-done/workflows/remove-phase.md +155 -0
  169. package/get-shit-done/workflows/research-phase.md +74 -0
  170. package/get-shit-done/workflows/resume-project.md +307 -0
  171. package/get-shit-done/workflows/set-profile.md +81 -0
  172. package/get-shit-done/workflows/settings.md +242 -0
  173. package/get-shit-done/workflows/stats.md +57 -0
  174. package/get-shit-done/workflows/transition.md +544 -0
  175. package/get-shit-done/workflows/ui-phase.md +290 -0
  176. package/get-shit-done/workflows/ui-review.md +157 -0
  177. package/get-shit-done/workflows/update.md +320 -0
  178. package/get-shit-done/workflows/validate-phase.md +167 -0
  179. package/get-shit-done/workflows/verify-phase.md +243 -0
  180. package/get-shit-done/workflows/verify-work.md +584 -0
  181. package/package.json +55 -0
  182. package/scripts/build-hooks.js +43 -0
  183. package/scripts/run-tests.cjs +29 -0
@@ -0,0 +1,93 @@
1
+ # Model Profiles
2
+
3
+ Model profiles control which Claude model each EZ Agents agent uses. This allows balancing quality vs token spend.
4
+
5
+ ## Profile Definitions
6
+
7
+ | Agent | `quality` | `balanced` | `budget` |
8
+ |-------|-----------|------------|----------|
9
+ | ez-planner | opus | opus | sonnet |
10
+ | ez-roadmapper | opus | sonnet | sonnet |
11
+ | ez-executor | opus | sonnet | sonnet |
12
+ | ez-phase-researcher | opus | sonnet | haiku |
13
+ | ez-project-researcher | opus | sonnet | haiku |
14
+ | ez-research-synthesizer | sonnet | sonnet | haiku |
15
+ | ez-debugger | opus | sonnet | sonnet |
16
+ | ez-codebase-mapper | sonnet | haiku | haiku |
17
+ | ez-verifier | sonnet | sonnet | haiku |
18
+ | ez-plan-checker | sonnet | sonnet | haiku |
19
+ | ez-integration-checker | sonnet | sonnet | haiku |
20
+ | ez-nyquist-auditor | sonnet | sonnet | haiku |
21
+
22
+ ## Profile Philosophy
23
+
24
+ **quality** - Maximum reasoning power
25
+ - Opus for all decision-making agents
26
+ - Sonnet for read-only verification
27
+ - Use when: quota available, critical architecture work
28
+
29
+ **balanced** (default) - Smart allocation
30
+ - Opus only for planning (where architecture decisions happen)
31
+ - Sonnet for execution and research (follows explicit instructions)
32
+ - Sonnet for verification (needs reasoning, not just pattern matching)
33
+ - Use when: normal development, good balance of quality and cost
34
+
35
+ **budget** - Minimal Opus usage
36
+ - Sonnet for anything that writes code
37
+ - Haiku for research and verification
38
+ - Use when: conserving quota, high-volume work, less critical phases
39
+
40
+ ## Resolution Logic
41
+
42
+ Orchestrators resolve model before spawning:
43
+
44
+ ```
45
+ 1. Read .planning/config.json
46
+ 2. Check model_overrides for agent-specific override
47
+ 3. If no override, look up agent in profile table
48
+ 4. Pass model parameter to Task call
49
+ ```
50
+
51
+ ## Per-Agent Overrides
52
+
53
+ Override specific agents without changing the entire profile:
54
+
55
+ ```json
56
+ {
57
+ "model_profile": "balanced",
58
+ "model_overrides": {
59
+ "ez-executor": "opus",
60
+ "ez-planner": "haiku"
61
+ }
62
+ }
63
+ ```
64
+
65
+ Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `haiku`.
66
+
67
+ ## Switching Profiles
68
+
69
+ Runtime: `/ez:set-profile <profile>`
70
+
71
+ Per-project default: Set in `.planning/config.json`:
72
+ ```json
73
+ {
74
+ "model_profile": "balanced"
75
+ }
76
+ ```
77
+
78
+ ## Design Rationale
79
+
80
+ **Why Opus for ez-planner?**
81
+ Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
82
+
83
+ **Why Sonnet for ez-executor?**
84
+ Executors follow explicit PLAN.md instructions. The plan already contains the reasoning; execution is implementation.
85
+
86
+ **Why Sonnet (not Haiku) for verifiers in balanced?**
87
+ Verification requires goal-backward reasoning - checking if code *delivers* what the phase promised, not just pattern matching. Sonnet handles this well; Haiku may miss subtle gaps.
88
+
89
+ **Why Haiku for ez-codebase-mapper?**
90
+ Read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
91
+
92
+ **Why `inherit` instead of passing `opus` directly?**
93
+ Claude Code's `"opus"` alias maps to a specific model version. Organizations may block older opus versions while allowing newer ones. EZ Agents returns `"inherit"` for opus-tier agents, causing them to use whatever opus version the user has configured in their session. This avoids version conflicts and silent fallbacks to Sonnet.
@@ -0,0 +1,61 @@
1
+ # Phase Argument Parsing
2
+
3
+ Parse and normalize phase arguments for commands that operate on phases.
4
+
5
+ ## Extraction
6
+
7
+ From `$ARGUMENTS`:
8
+ - Extract phase number (first numeric argument)
9
+ - Extract flags (prefixed with `--`)
10
+ - Remaining text is description (for insert/add commands)
11
+
12
+ ## Using ez-tools
13
+
14
+ The `find-phase` command handles normalization and validation in one step:
15
+
16
+ ```bash
17
+ PHASE_INFO=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" find-phase "${PHASE}")
18
+ ```
19
+
20
+ Returns JSON with:
21
+ - `found`: true/false
22
+ - `directory`: Full path to phase directory
23
+ - `phase_number`: Normalized number (e.g., "06", "06.1")
24
+ - `phase_name`: Name portion (e.g., "foundation")
25
+ - `plans`: Array of PLAN.md files
26
+ - `summaries`: Array of SUMMARY.md files
27
+
28
+ ## Manual Normalization (Legacy)
29
+
30
+ Zero-pad integer phases to 2 digits. Preserve decimal suffixes.
31
+
32
+ ```bash
33
+ # Normalize phase number
34
+ if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
35
+ # Integer: 8 → 08
36
+ PHASE=$(printf "%02d" "$PHASE")
37
+ elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
38
+ # Decimal: 2.1 → 02.1
39
+ PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
40
+ fi
41
+ ```
42
+
43
+ ## Validation
44
+
45
+ Use `roadmap get-phase` to validate phase exists:
46
+
47
+ ```bash
48
+ PHASE_CHECK=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase "${PHASE}")
49
+ if [ "$(printf '%s\n' "$PHASE_CHECK" | jq -r '.found')" = "false" ]; then
50
+ echo "ERROR: Phase ${PHASE} not found in roadmap"
51
+ exit 1
52
+ fi
53
+ ```
54
+
55
+ ## Directory Lookup
56
+
57
+ Use `find-phase` for directory lookup:
58
+
59
+ ```bash
60
+ PHASE_DIR=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" find-phase "${PHASE}" --raw)
61
+ ```
@@ -0,0 +1,200 @@
1
+ <planning_config>
2
+
3
+ Configuration options for `.planning/` 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
+ "phase_branch_template": "ez/phase-{phase}-{slug}",
14
+ "milestone_branch_template": "ez/{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"`, `"phase"`, or `"milestone"` |
23
+ | `git.phase_branch_template` | `"ez/phase-{phase}-{slug}"` | Branch template for phase strategy |
24
+ | `git.milestone_branch_template` | `"ez/{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
+ - SUMMARY.md, STATE.md, ROADMAP.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 `.planning/` files
36
+ - User must add `.planning/` to `.gitignore`
37
+ - Useful for: OSS contributions, client projects, keeping planning private
38
+
39
+ **Using ez-tools.cjs (preferred):**
40
+
41
+ ```bash
42
+ # Commit with automatic commit_docs + gitignore checks:
43
+ node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" commit "docs: update state" --files .planning/STATE.md
44
+
45
+ # Load config via state load (returns JSON):
46
+ INIT=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" state load)
47
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
48
+ # commit_docs is available in the JSON output
49
+
50
+ # Or use init commands which include commit_docs:
51
+ INIT=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init execute-phase "1")
52
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
53
+ # commit_docs is included in all init command outputs
54
+ ```
55
+
56
+ **Auto-detection:** If `.planning/` is gitignored, `commit_docs` is automatically `false` regardless of config.json. This prevents git errors when users have `.planning/` in `.gitignore`.
57
+
58
+ **Commit via CLI (handles checks automatically):**
59
+
60
+ ```bash
61
+ node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" commit "docs: update state" --files .planning/STATE.md
62
+ ```
63
+
64
+ The CLI checks `commit_docs` config and gitignore status internally — no manual conditionals needed.
65
+
66
+ </commit_docs_behavior>
67
+
68
+ <search_behavior>
69
+
70
+ **When `search_gitignored: false` (default):**
71
+ - Standard rg behavior (respects .gitignore)
72
+ - Direct path searches work: `rg "pattern" .planning/` finds files
73
+ - Broad searches skip gitignored: `rg "pattern"` skips `.planning/`
74
+
75
+ **When `search_gitignored: true`:**
76
+ - Add `--no-ignore` to broad rg searches that should include `.planning/`
77
+ - Only needed when searching entire repo and expecting `.planning/` matches
78
+
79
+ **Note:** Most EZ Agents operations use direct file reads or explicit paths, which work regardless of gitignore status.
80
+
81
+ </search_behavior>
82
+
83
+ <setup_uncommitted_mode>
84
+
85
+ To use uncommitted mode:
86
+
87
+ 1. **Set config:**
88
+ ```json
89
+ "planning": {
90
+ "commit_docs": false,
91
+ "search_gitignored": true
92
+ }
93
+ ```
94
+
95
+ 2. **Add to .gitignore:**
96
+ ```
97
+ .planning/
98
+ ```
99
+
100
+ 3. **Existing tracked files:** If `.planning/` was previously tracked:
101
+ ```bash
102
+ git rm -r --cached .planning/
103
+ git commit -m "chore: stop tracking planning docs"
104
+ ```
105
+
106
+ 4. **Branch merges:** When using `branching_strategy: phase` or `milestone`, the `complete-milestone` workflow automatically strips `.planning/` files from staging before merge commits when `commit_docs: false`.
107
+
108
+ </setup_uncommitted_mode>
109
+
110
+ <branching_strategy_behavior>
111
+
112
+ **Branching Strategies:**
113
+
114
+ | Strategy | When branch created | Branch scope | Merge point |
115
+ |----------|---------------------|--------------|-------------|
116
+ | `none` | Never | N/A | N/A |
117
+ | `phase` | At `execute-phase` start | Single phase | User merges after phase |
118
+ | `milestone` | At first `execute-phase` of milestone | Entire milestone | At `complete-milestone` |
119
+
120
+ **When `git.branching_strategy: "none"` (default):**
121
+ - All work commits to current branch
122
+ - Standard EZ Agents behavior
123
+
124
+ **When `git.branching_strategy: "phase"`:**
125
+ - `execute-phase` creates/switches to a branch before execution
126
+ - Branch name from `phase_branch_template` (e.g., `ez/phase-03-authentication`)
127
+ - All plan commits go to that branch
128
+ - User merges branches manually after phase completion
129
+ - `complete-milestone` offers to merge all phase branches
130
+
131
+ **When `git.branching_strategy: "milestone"`:**
132
+ - First `execute-phase` of milestone creates the milestone branch
133
+ - Branch name from `milestone_branch_template` (e.g., `ez/v1.0-mvp`)
134
+ - All phases in milestone commit to same branch
135
+ - `complete-milestone` offers to merge milestone branch to main
136
+
137
+ **Template variables:**
138
+
139
+ | Variable | Available in | Description |
140
+ |----------|--------------|-------------|
141
+ | `{phase}` | phase_branch_template | Zero-padded phase number (e.g., "03") |
142
+ | `{slug}` | Both | Lowercase, hyphenated name |
143
+ | `{milestone}` | milestone_branch_template | Milestone version (e.g., "v1.0") |
144
+
145
+ **Checking the config:**
146
+
147
+ Use `init execute-phase` which returns all config as JSON:
148
+ ```bash
149
+ INIT=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init execute-phase "1")
150
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
151
+ # JSON output includes: branching_strategy, phase_branch_template, milestone_branch_template
152
+ ```
153
+
154
+ Or use `state load` for the config values:
155
+ ```bash
156
+ INIT=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" state load)
157
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
158
+ # Parse branching_strategy, phase_branch_template, milestone_branch_template from JSON
159
+ ```
160
+
161
+ **Branch creation:**
162
+
163
+ ```bash
164
+ # For phase strategy
165
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
166
+ PHASE_SLUG=$(echo "$PHASE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
167
+ BRANCH_NAME=$(echo "$PHASE_BRANCH_TEMPLATE" | sed "s/{phase}/$PADDED_PHASE/g" | sed "s/{slug}/$PHASE_SLUG/g")
168
+ git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
169
+ fi
170
+
171
+ # For milestone strategy
172
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
173
+ MILESTONE_SLUG=$(echo "$MILESTONE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
174
+ BRANCH_NAME=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed "s/{milestone}/$MILESTONE_VERSION/g" | sed "s/{slug}/$MILESTONE_SLUG/g")
175
+ git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
176
+ fi
177
+ ```
178
+
179
+ **Merge options at complete-milestone:**
180
+
181
+ | Option | Git command | Result |
182
+ |--------|-------------|--------|
183
+ | Squash merge (recommended) | `git merge --squash` | Single clean commit per branch |
184
+ | Merge with history | `git merge --no-ff` | Preserves all individual commits |
185
+ | Delete without merging | `git branch -D` | Discard branch work |
186
+ | Keep branches | (none) | Manual handling later |
187
+
188
+ Squash merge is recommended — keeps main branch history clean while preserving the full development history in the branch (until deleted).
189
+
190
+ **Use cases:**
191
+
192
+ | Strategy | Best for |
193
+ |----------|----------|
194
+ | `none` | Solo development, simple projects |
195
+ | `phase` | Code review per phase, granular rollback, team collaboration |
196
+ | `milestone` | Release branches, staging environments, PR per version |
197
+
198
+ </branching_strategy_behavior>
199
+
200
+ </planning_config>
@@ -0,0 +1,162 @@
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 PROJECT.md that downstream phases 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
+ - **Roadmap** needs: clear enough vision to decompose into phases, what "done" looks like
22
+ - **plan-phase** needs: specific requirements to break into tasks, context for implementation choices
23
+ - **execute-phase** needs: success criteria to verify against, the "why" behind requirements
24
+
25
+ A vague PROJECT.md forces every downstream phase 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
+ - Headers longer than 12 characters (hard limit — validation will reject them)
83
+
84
+ **Example — vague answer:**
85
+ User says "it should be fast"
86
+
87
+ - header: "Fast"
88
+ - question: "Fast how?"
89
+ - options: ["Sub-second response", "Handles large datasets", "Quick to build", "Let me explain"]
90
+
91
+ **Example — following a thread:**
92
+ User mentions "frustrated with current tools"
93
+
94
+ - header: "Frustration"
95
+ - question: "What specifically frustrates you?"
96
+ - options: ["Too many clicks", "Missing features", "Unreliable", "Let me explain"]
97
+
98
+ **Tip for users — modifying an option:**
99
+ Users who want a slightly modified version of an option can select "Other" and reference the option by number: `#1 but for finger joints only` or `#2 with pagination disabled`. This avoids retyping the full option text.
100
+
101
+ </using_askuserquestion>
102
+
103
+ <freeform_rule>
104
+
105
+ **When the user wants to explain freely, STOP using AskUserQuestion.**
106
+
107
+ If a user selects "Other" and their response signals they want to describe something in their own words (e.g., "let me describe it", "I'll explain", "something else", or any open-ended reply that isn't choosing/modifying an existing option), you MUST:
108
+
109
+ 1. **Ask your follow-up as plain text** — NOT via AskUserQuestion
110
+ 2. **Wait for them to type at the normal prompt**
111
+ 3. **Resume AskUserQuestion** only after processing their freeform response
112
+
113
+ The same applies if YOU include a freeform-indicating option (like "Let me explain" or "Describe in detail") and the user selects it.
114
+
115
+ **Wrong:** User says "let me describe it" → AskUserQuestion("What feature?", ["Feature A", "Feature B", "Describe in detail"])
116
+ **Right:** User says "let me describe it" → "Go ahead — what are you thinking?"
117
+
118
+ </freeform_rule>
119
+
120
+ <context_checklist>
121
+
122
+ Use this as a **background checklist**, not a conversation structure. Check these mentally as you go. If gaps remain, weave questions naturally.
123
+
124
+ - [ ] What they're building (concrete enough to explain to a stranger)
125
+ - [ ] Why it needs to exist (the problem or desire driving it)
126
+ - [ ] Who it's for (even if just themselves)
127
+ - [ ] What "done" looks like (observable outcomes)
128
+
129
+ Four things. If they volunteer more, capture it.
130
+
131
+ </context_checklist>
132
+
133
+ <decision_gate>
134
+
135
+ When you could write a clear PROJECT.md, offer to proceed:
136
+
137
+ - header: "Ready?"
138
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
139
+ - options:
140
+ - "Create PROJECT.md" — Let's move forward
141
+ - "Keep exploring" — I want to share more / ask me more
142
+
143
+ If "Keep exploring" — ask what they want to add or identify gaps and probe naturally.
144
+
145
+ Loop until "Create PROJECT.md" selected.
146
+
147
+ </decision_gate>
148
+
149
+ <anti_patterns>
150
+
151
+ - **Checklist walking** — Going through domains regardless of what they said
152
+ - **Canned questions** — "What's your core value?" "What's out of scope?" regardless of context
153
+ - **Corporate speak** — "What are your success criteria?" "Who are your stakeholders?"
154
+ - **Interrogation** — Firing questions without building on answers
155
+ - **Rushing** — Minimizing questions to get to "the work"
156
+ - **Shallow acceptance** — Taking vague answers without probing
157
+ - **Premature constraints** — Asking about tech stack before understanding the idea
158
+ - **User skills** — NEVER ask about user's technical experience. Claude builds.
159
+
160
+ </anti_patterns>
161
+
162
+ </questioning_guide>