@chief-clancy/terminal 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 (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/hooks/clancy-branch-guard.js +1 -0
  4. package/dist/hooks/clancy-check-update.js +2 -0
  5. package/dist/hooks/clancy-context-monitor.js +9 -0
  6. package/dist/hooks/clancy-credential-guard.js +2 -0
  7. package/dist/hooks/clancy-drift-detector.js +1 -0
  8. package/dist/hooks/clancy-notification.js +1 -0
  9. package/dist/hooks/clancy-post-compact.js +2 -0
  10. package/dist/hooks/clancy-statusline.js +1 -0
  11. package/dist/index.d.ts +24 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +23 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/installer/file-ops/file-ops.d.ts +35 -0
  16. package/dist/installer/file-ops/file-ops.d.ts.map +1 -0
  17. package/dist/installer/file-ops/file-ops.js +95 -0
  18. package/dist/installer/file-ops/file-ops.js.map +1 -0
  19. package/dist/installer/file-ops/index.d.ts +2 -0
  20. package/dist/installer/file-ops/index.d.ts.map +1 -0
  21. package/dist/installer/file-ops/index.js +2 -0
  22. package/dist/installer/file-ops/index.js.map +1 -0
  23. package/dist/installer/hook-installer/hook-installer.d.ts +22 -0
  24. package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -0
  25. package/dist/installer/hook-installer/hook-installer.js +213 -0
  26. package/dist/installer/hook-installer/hook-installer.js.map +1 -0
  27. package/dist/installer/hook-installer/index.d.ts +2 -0
  28. package/dist/installer/hook-installer/index.d.ts.map +1 -0
  29. package/dist/installer/hook-installer/index.js +2 -0
  30. package/dist/installer/hook-installer/index.js.map +1 -0
  31. package/dist/installer/install/index.d.ts +3 -0
  32. package/dist/installer/install/index.d.ts.map +1 -0
  33. package/dist/installer/install/index.js +2 -0
  34. package/dist/installer/install/index.js.map +1 -0
  35. package/dist/installer/install/install.d.ts +124 -0
  36. package/dist/installer/install/install.d.ts.map +1 -0
  37. package/dist/installer/install/install.js +255 -0
  38. package/dist/installer/install/install.js.map +1 -0
  39. package/dist/installer/manifest/index.d.ts +2 -0
  40. package/dist/installer/manifest/index.d.ts.map +1 -0
  41. package/dist/installer/manifest/index.js +2 -0
  42. package/dist/installer/manifest/index.js.map +1 -0
  43. package/dist/installer/manifest/manifest.d.ts +46 -0
  44. package/dist/installer/manifest/manifest.d.ts.map +1 -0
  45. package/dist/installer/manifest/manifest.js +180 -0
  46. package/dist/installer/manifest/manifest.js.map +1 -0
  47. package/dist/installer/prompts/index.d.ts +2 -0
  48. package/dist/installer/prompts/index.d.ts.map +1 -0
  49. package/dist/installer/prompts/index.js +2 -0
  50. package/dist/installer/prompts/index.js.map +1 -0
  51. package/dist/installer/prompts/prompts.d.ts +34 -0
  52. package/dist/installer/prompts/prompts.d.ts.map +1 -0
  53. package/dist/installer/prompts/prompts.js +28 -0
  54. package/dist/installer/prompts/prompts.js.map +1 -0
  55. package/dist/installer/role-filter/index.d.ts +2 -0
  56. package/dist/installer/role-filter/index.d.ts.map +1 -0
  57. package/dist/installer/role-filter/index.js +2 -0
  58. package/dist/installer/role-filter/index.js.map +1 -0
  59. package/dist/installer/role-filter/role-filter.d.ts +33 -0
  60. package/dist/installer/role-filter/role-filter.d.ts.map +1 -0
  61. package/dist/installer/role-filter/role-filter.js +91 -0
  62. package/dist/installer/role-filter/role-filter.js.map +1 -0
  63. package/dist/installer/shared/fs-errors/fs-errors.d.ts +3 -0
  64. package/dist/installer/shared/fs-errors/fs-errors.d.ts.map +1 -0
  65. package/dist/installer/shared/fs-errors/fs-errors.js +7 -0
  66. package/dist/installer/shared/fs-errors/fs-errors.js.map +1 -0
  67. package/dist/installer/shared/fs-errors/index.d.ts +2 -0
  68. package/dist/installer/shared/fs-errors/index.d.ts.map +1 -0
  69. package/dist/installer/shared/fs-errors/index.js +2 -0
  70. package/dist/installer/shared/fs-errors/index.js.map +1 -0
  71. package/dist/installer/shared/fs-guards/fs-guards.d.ts +3 -0
  72. package/dist/installer/shared/fs-guards/fs-guards.d.ts.map +1 -0
  73. package/dist/installer/shared/fs-guards/fs-guards.js +18 -0
  74. package/dist/installer/shared/fs-guards/fs-guards.js.map +1 -0
  75. package/dist/installer/shared/fs-guards/index.d.ts +2 -0
  76. package/dist/installer/shared/fs-guards/index.d.ts.map +1 -0
  77. package/dist/installer/shared/fs-guards/index.js +2 -0
  78. package/dist/installer/shared/fs-guards/index.js.map +1 -0
  79. package/dist/installer/shared/type-guards/index.d.ts +2 -0
  80. package/dist/installer/shared/type-guards/index.d.ts.map +1 -0
  81. package/dist/installer/shared/type-guards/index.js +2 -0
  82. package/dist/installer/shared/type-guards/index.js.map +1 -0
  83. package/dist/installer/shared/type-guards/type-guards.d.ts +8 -0
  84. package/dist/installer/shared/type-guards/type-guards.d.ts.map +1 -0
  85. package/dist/installer/shared/type-guards/type-guards.js +10 -0
  86. package/dist/installer/shared/type-guards/type-guards.js.map +1 -0
  87. package/dist/installer/ui/index.d.ts +2 -0
  88. package/dist/installer/ui/index.d.ts.map +1 -0
  89. package/dist/installer/ui/index.js +2 -0
  90. package/dist/installer/ui/index.js.map +1 -0
  91. package/dist/installer/ui/ui.d.ts +23 -0
  92. package/dist/installer/ui/ui.d.ts.map +1 -0
  93. package/dist/installer/ui/ui.js +121 -0
  94. package/dist/installer/ui/ui.js.map +1 -0
  95. package/dist/runner/autopilot/autopilot.d.ts +71 -0
  96. package/dist/runner/autopilot/autopilot.d.ts.map +1 -0
  97. package/dist/runner/autopilot/autopilot.js +206 -0
  98. package/dist/runner/autopilot/autopilot.js.map +1 -0
  99. package/dist/runner/autopilot/index.d.ts +2 -0
  100. package/dist/runner/autopilot/index.d.ts.map +1 -0
  101. package/dist/runner/autopilot/index.js +2 -0
  102. package/dist/runner/autopilot/index.js.map +1 -0
  103. package/dist/runner/cli-bridge/cli-bridge.d.ts +34 -0
  104. package/dist/runner/cli-bridge/cli-bridge.d.ts.map +1 -0
  105. package/dist/runner/cli-bridge/cli-bridge.js +53 -0
  106. package/dist/runner/cli-bridge/cli-bridge.js.map +1 -0
  107. package/dist/runner/cli-bridge/index.d.ts +2 -0
  108. package/dist/runner/cli-bridge/index.d.ts.map +1 -0
  109. package/dist/runner/cli-bridge/index.js +2 -0
  110. package/dist/runner/cli-bridge/index.js.map +1 -0
  111. package/dist/runner/dep-factory/deliver-phase.d.ts +24 -0
  112. package/dist/runner/dep-factory/deliver-phase.d.ts.map +1 -0
  113. package/dist/runner/dep-factory/deliver-phase.js +57 -0
  114. package/dist/runner/dep-factory/deliver-phase.js.map +1 -0
  115. package/dist/runner/dep-factory/dep-factory.d.ts +38 -0
  116. package/dist/runner/dep-factory/dep-factory.d.ts.map +1 -0
  117. package/dist/runner/dep-factory/dep-factory.js +193 -0
  118. package/dist/runner/dep-factory/dep-factory.js.map +1 -0
  119. package/dist/runner/dep-factory/index.d.ts +2 -0
  120. package/dist/runner/dep-factory/index.d.ts.map +1 -0
  121. package/dist/runner/dep-factory/index.js +2 -0
  122. package/dist/runner/dep-factory/index.js.map +1 -0
  123. package/dist/runner/dep-factory/invoke-phase.d.ts +20 -0
  124. package/dist/runner/dep-factory/invoke-phase.d.ts.map +1 -0
  125. package/dist/runner/dep-factory/invoke-phase.js +45 -0
  126. package/dist/runner/dep-factory/invoke-phase.js.map +1 -0
  127. package/dist/runner/implement/implement.d.ts +38 -0
  128. package/dist/runner/implement/implement.d.ts.map +1 -0
  129. package/dist/runner/implement/implement.js +61 -0
  130. package/dist/runner/implement/implement.js.map +1 -0
  131. package/dist/runner/implement/index.d.ts +2 -0
  132. package/dist/runner/implement/index.d.ts.map +1 -0
  133. package/dist/runner/implement/index.js +2 -0
  134. package/dist/runner/implement/index.js.map +1 -0
  135. package/dist/runner/notify/index.d.ts +2 -0
  136. package/dist/runner/notify/index.d.ts.map +1 -0
  137. package/dist/runner/notify/index.js +2 -0
  138. package/dist/runner/notify/index.js.map +1 -0
  139. package/dist/runner/notify/notify.d.ts +49 -0
  140. package/dist/runner/notify/notify.d.ts.map +1 -0
  141. package/dist/runner/notify/notify.js +90 -0
  142. package/dist/runner/notify/notify.js.map +1 -0
  143. package/dist/runner/prompt-builder/index.d.ts +2 -0
  144. package/dist/runner/prompt-builder/index.d.ts.map +1 -0
  145. package/dist/runner/prompt-builder/index.js +2 -0
  146. package/dist/runner/prompt-builder/index.js.map +1 -0
  147. package/dist/runner/prompt-builder/prompt-builder.d.ts +53 -0
  148. package/dist/runner/prompt-builder/prompt-builder.d.ts.map +1 -0
  149. package/dist/runner/prompt-builder/prompt-builder.js +122 -0
  150. package/dist/runner/prompt-builder/prompt-builder.js.map +1 -0
  151. package/dist/runner/session-report/index.d.ts +2 -0
  152. package/dist/runner/session-report/index.d.ts.map +1 -0
  153. package/dist/runner/session-report/index.js +2 -0
  154. package/dist/runner/session-report/index.js.map +1 -0
  155. package/dist/runner/session-report/session-report.d.ts +81 -0
  156. package/dist/runner/session-report/session-report.d.ts.map +1 -0
  157. package/dist/runner/session-report/session-report.js +227 -0
  158. package/dist/runner/session-report/session-report.js.map +1 -0
  159. package/dist/runner/shared/types.d.ts +30 -0
  160. package/dist/runner/shared/types.d.ts.map +1 -0
  161. package/dist/runner/shared/types.js +2 -0
  162. package/dist/runner/shared/types.js.map +1 -0
  163. package/dist/shared/ansi/ansi.d.ts +59 -0
  164. package/dist/shared/ansi/ansi.d.ts.map +1 -0
  165. package/dist/shared/ansi/ansi.js +59 -0
  166. package/dist/shared/ansi/ansi.js.map +1 -0
  167. package/dist/shared/ansi/index.d.ts +2 -0
  168. package/dist/shared/ansi/index.d.ts.map +1 -0
  169. package/dist/shared/ansi/index.js +2 -0
  170. package/dist/shared/ansi/index.js.map +1 -0
  171. package/package.json +52 -0
  172. package/src/agents/agents.test.ts +57 -0
  173. package/src/agents/arch-agent.md +80 -0
  174. package/src/agents/concerns-agent.md +96 -0
  175. package/src/agents/design-agent.md +146 -0
  176. package/src/agents/devils-advocate.md +54 -0
  177. package/src/agents/quality-agent.md +178 -0
  178. package/src/agents/tech-agent.md +101 -0
  179. package/src/agents/verification-gate.md +128 -0
  180. package/src/roles/implementer/commands/autopilot.md +11 -0
  181. package/src/roles/implementer/commands/dry-run.md +15 -0
  182. package/src/roles/implementer/commands/implement.md +19 -0
  183. package/src/roles/implementer/workflows/autopilot.md +136 -0
  184. package/src/roles/implementer/workflows/implement.md +161 -0
  185. package/src/roles/planner/commands/approve-plan.md +11 -0
  186. package/src/roles/planner/commands/plan.md +22 -0
  187. package/src/roles/planner/workflows/approve-plan.md +970 -0
  188. package/src/roles/planner/workflows/plan.md +868 -0
  189. package/src/roles/reviewer/commands/logs.md +7 -0
  190. package/src/roles/reviewer/commands/review.md +9 -0
  191. package/src/roles/reviewer/commands/status.md +9 -0
  192. package/src/roles/reviewer/workflows/logs.md +109 -0
  193. package/src/roles/reviewer/workflows/review.md +197 -0
  194. package/src/roles/reviewer/workflows/status.md +142 -0
  195. package/src/roles/roles.test.ts +87 -0
  196. package/src/roles/setup/commands/doctor.md +7 -0
  197. package/src/roles/setup/commands/help.md +80 -0
  198. package/src/roles/setup/commands/init.md +7 -0
  199. package/src/roles/setup/commands/map-codebase.md +17 -0
  200. package/src/roles/setup/commands/settings.md +7 -0
  201. package/src/roles/setup/commands/uninstall.md +5 -0
  202. package/src/roles/setup/commands/update-docs.md +9 -0
  203. package/src/roles/setup/commands/update.md +13 -0
  204. package/src/roles/setup/workflows/doctor.md +131 -0
  205. package/src/roles/setup/workflows/init.md +1096 -0
  206. package/src/roles/setup/workflows/map-codebase.md +130 -0
  207. package/src/roles/setup/workflows/scaffold.md +872 -0
  208. package/src/roles/setup/workflows/settings.md +958 -0
  209. package/src/roles/setup/workflows/uninstall.md +170 -0
  210. package/src/roles/setup/workflows/update-docs.md +95 -0
  211. package/src/roles/setup/workflows/update.md +287 -0
  212. package/src/roles/strategist/commands/approve-brief.md +23 -0
  213. package/src/roles/strategist/commands/brief.md +29 -0
  214. package/src/roles/strategist/workflows/approve-brief.md +1540 -0
  215. package/src/roles/strategist/workflows/brief.md +1330 -0
  216. package/src/templates/CLAUDE.md +101 -0
  217. package/src/templates/templates.test.ts +53 -0
@@ -0,0 +1,958 @@
1
+ # Clancy Settings Workflow
2
+
3
+ ## Overview
4
+
5
+ View and change Clancy configuration. Reads `.clancy/.env`, shows current values, and lets the user update any setting interactively. Loops until the user exits. Never modifies anything other than `.clancy/.env`.
6
+
7
+ ### Input handling
8
+
9
+ This workflow runs inside a Claude Code session. Accept natural language alongside option codes:
10
+
11
+ - "G1", "max iterations", "change iterations" → all resolve to the max iterations setting
12
+ - "enable planner", "R1", "planner" → all resolve to the Planner role toggle
13
+ - "enable strategist", "R2", "strategist" → all resolve to the Strategist role toggle
14
+ - "switch board", "S" → switch board flow
15
+ - If a response is ambiguous, ask for clarification
16
+
17
+ ---
18
+
19
+ ## Step 1 — Preflight
20
+
21
+ Check `.clancy/` exists and `.clancy/.env` is present.
22
+
23
+ If either is missing:
24
+
25
+ ```
26
+ .clancy/ not found. Run /clancy:init to set up Clancy first.
27
+ ```
28
+
29
+ Stop.
30
+
31
+ ---
32
+
33
+ ## Step 2 — Read current config
34
+
35
+ Source `.clancy/.env` silently. Detect which board is configured:
36
+
37
+ - `JIRA_BASE_URL` set → Jira
38
+ - `GITHUB_TOKEN` set → GitHub Issues
39
+ - `LINEAR_API_KEY` set → Linear
40
+ - `SHORTCUT_API_TOKEN` set → Shortcut
41
+ - `NOTION_DATABASE_ID` set → Notion
42
+ - `AZDO_ORG` set → Azure DevOps
43
+
44
+ ---
45
+
46
+ ## Step 3 — Display settings menu
47
+
48
+ Show all current values. Board-specific settings only appear when that board is configured. Use stable letter/number mnemonics so options don't shift when boards change.
49
+
50
+ ```
51
+ 🚨 Clancy — Settings
52
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
53
+
54
+ "Welcome to headquarters."
55
+
56
+ General
57
+ [G1] Max iterations {MAX_ITERATIONS:-5} tickets per /clancy:autopilot session
58
+ [G2] Claude model {CLANCY_MODEL:-default} model used for each ticket session
59
+ [G3] Base branch {CLANCY_BASE_BRANCH:-main}
60
+ [G4] Max rework {CLANCY_MAX_REWORK:-3}
61
+ [G5] TDD mode {on if CLANCY_TDD=true, else off}
62
+ [G6] Grill mode {CLANCY_MODE:-interactive}
63
+ [G7] Fix retries {CLANCY_FIX_RETRIES:-2} self-healing attempts after verification failure
64
+ [G8] Time limit {CLANCY_TIME_LIMIT:-30} per-ticket time limit in minutes (0 = disabled)
65
+ [G9] Branch guard {on if CLANCY_BRANCH_GUARD=true or unset, off if false}
66
+ [G10] Quiet hours {CLANCY_QUIET_START–CLANCY_QUIET_END if set, else off}
67
+ [G11] Desktop notify {on if CLANCY_DESKTOP_NOTIFY=true or unset, off if false}
68
+
69
+ {If Jira:}
70
+ Jira
71
+ [B1] Queue status {CLANCY_JQL_STATUS:-To Do}
72
+ [B2] Sprint filter {on if CLANCY_JQL_SPRINT set, else off}
73
+ [B3] Label filter {CLANCY_LABEL_BUILD if set, else off}
74
+ [B4] Pickup status {CLANCY_STATUS_IN_PROGRESS if set, else off}
75
+ [B5] Done status {CLANCY_STATUS_DONE if set, else off}
76
+ [B6] Review status {CLANCY_STATUS_REVIEW if set, else "uses Done status"}
77
+
78
+ {If Linear:}
79
+ Linear
80
+ [B1] Label filter {CLANCY_LABEL_BUILD if set, else off}
81
+ [B2] Pickup status {CLANCY_STATUS_IN_PROGRESS if set, else off}
82
+ [B3] Done status {CLANCY_STATUS_DONE if set, else off}
83
+ [B4] Review status {CLANCY_STATUS_REVIEW if set, else "uses Done state"}
84
+
85
+ Roles
86
+ [R1] Planner {✅ enabled / ─ disabled}
87
+ [R2] Strategist {✅ enabled / ─ disabled}
88
+
89
+ {If Strategist enabled:}
90
+ Strategist
91
+ [T1] Brief epic {CLANCY_BRIEF_EPIC if set, else "off"}
92
+ {If Jira:}
93
+ [T2] Issue type {CLANCY_BRIEF_ISSUE_TYPE:-Task}
94
+ [T3] Component {CLANCY_COMPONENT if set, else "off"}
95
+
96
+ {If Planner or Strategist enabled:}
97
+ Pipeline Labels
98
+ [L1] Brief label {CLANCY_LABEL_BRIEF if set, else "clancy:brief"} (Strategist only)
99
+ [L2] Plan label {CLANCY_LABEL_PLAN if set, else "clancy:plan"}
100
+ [L3] Build label {CLANCY_LABEL_BUILD if set, else "clancy:build"}
101
+ {If CLANCY_LABEL or CLANCY_PLAN_LABEL set:}
102
+ ⚠ CLANCY_LABEL and CLANCY_PLAN_LABEL are deprecated. Use CLANCY_LABEL_BUILD and CLANCY_LABEL_PLAN.
103
+
104
+ {If Planner enabled:}
105
+ Planner
106
+ {If Jira:}
107
+ [P1] Plan queue status {CLANCY_PLAN_STATUS:-Backlog}
108
+ {If GitHub:}
109
+ [P1] Plan label {CLANCY_LABEL_PLAN:-needs-refinement}
110
+ {If Linear:}
111
+ [P1] Plan state type {CLANCY_PLAN_STATE_TYPE:-backlog}
112
+ {If Jira:}
113
+ [P2] Post-approval {CLANCY_STATUS_PLANNED if set, else "off"}
114
+
115
+ Git Host (PR creation)
116
+ [H1] Git host token {platform: GitHub/GitLab/Bitbucket or "not set"}
117
+
118
+ Integrations
119
+ [I1] Figma MCP {enabled if FIGMA_API_KEY set, else not set}
120
+ [I2] Playwright {enabled if PLAYWRIGHT_ENABLED=true, else off}
121
+ [I3] Notifications {configured if CLANCY_NOTIFY_WEBHOOK set, else not set}
122
+
123
+ [S] Switch board currently: {Jira / GitHub Issues / Linear / Shortcut / Notion / Azure DevOps}
124
+ [D] Save as defaults save current settings for all future projects
125
+ [X] Exit
126
+
127
+ Which setting would you like to change?
128
+ ```
129
+
130
+ Accept the user's response as a code (e.g. "G1", "R1"), a setting name (e.g. "max iterations", "model"), or a natural language description (e.g. "change the model", "enable planner"). If ambiguous, clarify. Show only the board-specific section that matches the configured board. The Planner section only appears when the Planner role is enabled.
131
+
132
+ ---
133
+
134
+ ## Step 4 — Handle each selection
135
+
136
+ After the user picks an option (by code, name, or description), handle it as below. After saving, print `✅ Saved.` and loop back to Step 3 to show the updated menu.
137
+
138
+ ---
139
+
140
+ ### [G1] Max iterations
141
+
142
+ ```
143
+ Max iterations — current: {value}
144
+ How many tickets should /clancy:autopilot process per session?
145
+
146
+ [1] 5 (default)
147
+ [2] Enter a different number
148
+ ```
149
+
150
+ Validate the input is a positive integer between 1 and 100. If invalid, re-prompt.
151
+
152
+ Write `MAX_ITERATIONS=<value>` to `.clancy/.env`.
153
+
154
+ ---
155
+
156
+ ### [G2] Claude model
157
+
158
+ ```
159
+ Claude model — current: {value or "default"}
160
+
161
+ [1] Default (Claude picks the best available model)
162
+ [2] claude-opus-4-6 — most capable, slower
163
+ [3] claude-sonnet-4-6 — balanced (recommended)
164
+ [4] claude-haiku-4-5 — fastest, lightest
165
+ [5] Enter a custom model ID
166
+ [6] Clear (revert to default)
167
+ ```
168
+
169
+ If the user picks [1] or [6]: remove `CLANCY_MODEL` from `.clancy/.env` (or leave it commented out).
170
+ Otherwise: write `CLANCY_MODEL=<value>` to `.clancy/.env`.
171
+
172
+ ---
173
+
174
+ ### [G3] Base branch
175
+
176
+ ```
177
+ Base branch — current: {value}
178
+ Branch Clancy uses as the integration target when a ticket has no parent epic.
179
+
180
+ Enter new value (or press enter to keep current):
181
+ ```
182
+
183
+ Write `CLANCY_BASE_BRANCH=<value>` to `.clancy/.env`.
184
+
185
+ ---
186
+
187
+ ### [G4] Max rework cycles
188
+
189
+ ```
190
+ Max rework cycles — current: {value or 3}
191
+ After this many rework cycles on a single ticket, Clancy flags it for human intervention.
192
+
193
+ [1] 3 (default)
194
+ [2] Enter a different number
195
+ [3] Cancel
196
+ ```
197
+
198
+ Validate the input is a positive integer between 1 and 20. If invalid, re-prompt.
199
+
200
+ If [1]: remove `CLANCY_MAX_REWORK` from `.clancy/.env` (uses default).
201
+ If [2]: prompt `How many rework cycles before human intervention?` then write `CLANCY_MAX_REWORK=<value>` to `.clancy/.env`.
202
+
203
+ ---
204
+
205
+ ### [G5] TDD mode
206
+
207
+ ```
208
+ Test-Driven Development — current: {on/off}
209
+ When enabled, Clancy follows red-green-refactor for every behaviour change.
210
+
211
+ [1] Enable
212
+ [2] Disable
213
+ ```
214
+
215
+ If [1]: write `CLANCY_TDD=true` to `.clancy/.env`.
216
+ If [2]: remove `CLANCY_TDD` from `.clancy/.env`.
217
+
218
+ ---
219
+
220
+ ### [G6] Grill mode
221
+
222
+ ```
223
+ Grill mode — current: {interactive/afk}
224
+ Controls how /clancy:brief handles clarifying questions before generating a brief.
225
+
226
+ [1] Interactive (default) — asks the human
227
+ [2] AFK — AI-grill resolves autonomously (for automation pipelines)
228
+ ```
229
+
230
+ If [1]: remove `CLANCY_MODE` from `.clancy/.env` (uses default).
231
+ If [2]: write `CLANCY_MODE=afk` to `.clancy/.env`.
232
+
233
+ ---
234
+
235
+ ### [G7] Fix retries
236
+
237
+ ```
238
+ Fix retries — current: {value or 2}
239
+ Max self-healing attempts after a verification failure (lint/test/typecheck).
240
+ When exhausted, Clancy delivers anyway with a warning in the PR body.
241
+
242
+ [1] 2 (default)
243
+ [2] Enter a different number (0–5)
244
+ [3] Cancel
245
+ ```
246
+
247
+ Validate the input is an integer between 0 and 5. If invalid, re-prompt.
248
+
249
+ If [1]: remove `CLANCY_FIX_RETRIES` from `.clancy/.env` (uses default).
250
+ If [2]: prompt `How many fix retries?` then write `CLANCY_FIX_RETRIES=<value>` to `.clancy/.env`.
251
+
252
+ ---
253
+
254
+ ### [G8] Time limit
255
+
256
+ ```
257
+ Time limit — current: {value or 30} minutes
258
+ Per-ticket time limit. Clancy stops working on a ticket after this many minutes.
259
+ Set to 0 to disable.
260
+
261
+ [1] 30 minutes (default)
262
+ [2] Enter a different number
263
+ [3] Cancel
264
+ ```
265
+
266
+ Validate the input is a non-negative integer. If invalid, re-prompt.
267
+
268
+ If [1]: remove `CLANCY_TIME_LIMIT` from `.clancy/.env` (uses default).
269
+ If [2]: prompt `Time limit in minutes? (0 to disable)` then write `CLANCY_TIME_LIMIT=<value>` to `.clancy/.env`.
270
+
271
+ ---
272
+
273
+ ### [G9] Branch guard
274
+
275
+ ```
276
+ Branch guard — current: {on/off}
277
+ Prevents accidental commits to the base branch during autonomous runs.
278
+
279
+ [1] Enable (default)
280
+ [2] Disable
281
+ ```
282
+
283
+ If [1]: write `CLANCY_BRANCH_GUARD=true` to `.clancy/.env`.
284
+ If [2]: write `CLANCY_BRANCH_GUARD=false` to `.clancy/.env`.
285
+
286
+ ---
287
+
288
+ ### [G10] Quiet hours
289
+
290
+ ```
291
+ Quiet hours — current: {CLANCY_QUIET_START–CLANCY_QUIET_END or "off"}
292
+ Pause AFK runs during these hours. Clancy sleeps until the end of the quiet window.
293
+
294
+ [1] Set quiet hours
295
+ [2] Off (no quiet hours)
296
+ [3] Cancel
297
+ ```
298
+
299
+ If [1]: prompt `Quiet start time (HH:MM, 24h format):` then `Quiet end time (HH:MM, 24h format):`. Validate HH:MM format (0-23:00-59). Write `CLANCY_QUIET_START` and `CLANCY_QUIET_END` to `.clancy/.env`.
300
+ If [2]: remove `CLANCY_QUIET_START` and `CLANCY_QUIET_END` from `.clancy/.env`.
301
+
302
+ ---
303
+
304
+ ### [G11] Desktop notifications
305
+
306
+ ```
307
+ Desktop notifications — current: {on/off}
308
+ Native OS notifications when tickets complete or errors occur.
309
+
310
+ [1] Enable (default)
311
+ [2] Disable
312
+ ```
313
+
314
+ If [1]: write `CLANCY_DESKTOP_NOTIFY=true` to `.clancy/.env`.
315
+ If [2]: write `CLANCY_DESKTOP_NOTIFY=false` to `.clancy/.env`.
316
+
317
+ ---
318
+
319
+ ### [B1] Jira status filter (Jira only)
320
+
321
+ ```
322
+ Jira status filter — current: {value}
323
+ Which status name should Clancy pick tickets from?
324
+ Common values: To Do, Selected for Development, Ready, Open
325
+
326
+ [1] To Do (default)
327
+ [2] Enter a different value
328
+ ```
329
+
330
+ Write `CLANCY_JQL_STATUS=<value>` to `.clancy/.env`.
331
+
332
+ ---
333
+
334
+ ### [B2] Jira sprint filter (Jira only)
335
+
336
+ ```
337
+ Jira sprint filter — current: {on / off}
338
+ Filter tickets to the active sprint? (Requires Jira Software)
339
+
340
+ [1] On
341
+ [2] Off (default)
342
+ ```
343
+
344
+ If on: write `CLANCY_JQL_SPRINT=true` to `.clancy/.env`.
345
+ If off: remove `CLANCY_JQL_SPRINT` from `.clancy/.env` (or comment it out).
346
+
347
+ ---
348
+
349
+ ### [B3] Jira label filter (Jira only)
350
+
351
+ ```
352
+ Jira label filter — current: {label name or "off"}
353
+ Only pick up tickets with this label. Useful for mixed backlogs
354
+ where some tickets are not suitable for autonomous implementation.
355
+
356
+ [1] Set label name
357
+ [2] Off (pick up all assigned tickets regardless of label)
358
+ [3] Cancel
359
+ ```
360
+
361
+ If [1]: prompt `What label should Clancy filter by? (must already exist in Jira)` then write `CLANCY_LABEL_BUILD=<value>` to `.clancy/.env`.
362
+ If [2]: remove `CLANCY_LABEL_BUILD` from `.clancy/.env`.
363
+
364
+ ---
365
+
366
+ ### [B4] Jira In Progress status (Jira only)
367
+
368
+ ```
369
+ Jira In Progress status — current: {value or "off"}
370
+ When set, Clancy moves a ticket to this status when it starts working on it.
371
+ Must match the exact column name shown in your Jira board.
372
+
373
+ [1] Set status name
374
+ [2] Off (do not transition on pickup)
375
+ [3] Cancel
376
+ ```
377
+
378
+ If [1]: prompt `What status name should Clancy use for In Progress? (e.g. In Progress, In Dev, Doing)` then write `CLANCY_STATUS_IN_PROGRESS=<value>` to `.clancy/.env`.
379
+ If [2]: remove `CLANCY_STATUS_IN_PROGRESS` from `.clancy/.env`.
380
+
381
+ ---
382
+
383
+ ### [B5] Jira Done status (Jira only)
384
+
385
+ ```
386
+ Jira Done status — current: {value or "off"}
387
+ When set, Clancy moves a ticket to this status after completing it.
388
+ Must match the exact column name shown in your Jira board.
389
+
390
+ [1] Set status name
391
+ [2] Off (do not transition on completion)
392
+ [3] Cancel
393
+ ```
394
+
395
+ If [1]: prompt `What status name should Clancy use for Done? (e.g. Done, Complete, Closed)` then write `CLANCY_STATUS_DONE=<value>` to `.clancy/.env`.
396
+ If [2]: remove `CLANCY_STATUS_DONE` from `.clancy/.env`.
397
+
398
+ ---
399
+
400
+ ### [B6] Jira Review status (Jira only)
401
+
402
+ ```
403
+ Jira Review status — current: {value or "uses Done status"}
404
+ When Clancy creates a pull request (instead of merging locally), it transitions
405
+ the ticket to this status. Falls back to CLANCY_STATUS_DONE if not set.
406
+
407
+ [1] Set status name
408
+ [2] Off (use Done status for PR flow too)
409
+ [3] Cancel
410
+ ```
411
+
412
+ If [1]: prompt `What status name should Clancy use for In Review? (e.g. In Review, Ready for Review, Code Review)` then write `CLANCY_STATUS_REVIEW=<value>` to `.clancy/.env`.
413
+ If [2]: remove `CLANCY_STATUS_REVIEW` from `.clancy/.env`.
414
+
415
+ ---
416
+
417
+ ### [B1] Linear label filter (Linear only)
418
+
419
+ ```
420
+ Linear label filter — current: {label name or "off"}
421
+ Only pick up issues with this label. Useful for mixed backlogs
422
+ where some issues are not suitable for autonomous implementation.
423
+
424
+ [1] Set label name
425
+ [2] Off (pick up all unstarted assigned issues regardless of label)
426
+ [3] Cancel
427
+ ```
428
+
429
+ If [1]: prompt `What label should Clancy filter by? (must already exist in your Linear team)` then write `CLANCY_LABEL_BUILD=<value>` to `.clancy/.env`.
430
+ If [2]: remove `CLANCY_LABEL_BUILD` from `.clancy/.env`.
431
+
432
+ ---
433
+
434
+ ### [B2] Linear In Progress status (Linear only)
435
+
436
+ ```
437
+ Linear In Progress status — current: {value or "off"}
438
+ When set, Clancy moves an issue to this workflow state when it starts working on it.
439
+ Must match the exact state name shown in your Linear board column header.
440
+
441
+ [1] Set state name
442
+ [2] Off (do not transition on pickup)
443
+ [3] Cancel
444
+ ```
445
+
446
+ If [1]: prompt `What workflow state name should Clancy use for In Progress? (e.g. In Progress, In Dev, Doing)` then write `CLANCY_STATUS_IN_PROGRESS=<value>` to `.clancy/.env`.
447
+ If [2]: remove `CLANCY_STATUS_IN_PROGRESS` from `.clancy/.env`.
448
+
449
+ ---
450
+
451
+ ### [B3] Linear Done status (Linear only)
452
+
453
+ ```
454
+ Linear Done status — current: {value or "off"}
455
+ When set, Clancy moves an issue to this workflow state after completing it.
456
+ Must match the exact state name shown in your Linear board column header.
457
+
458
+ [1] Set state name
459
+ [2] Off (do not transition on completion)
460
+ [3] Cancel
461
+ ```
462
+
463
+ If [1]: prompt `What workflow state name should Clancy use for Done? (e.g. Done, Complete, Closed)` then write `CLANCY_STATUS_DONE=<value>` to `.clancy/.env`.
464
+ If [2]: remove `CLANCY_STATUS_DONE` from `.clancy/.env`.
465
+
466
+ ---
467
+
468
+ ### [B4] Linear Review status (Linear only)
469
+
470
+ ```
471
+ Linear Review status — current: {value or "uses Done state"}
472
+ When Clancy creates a pull request (instead of merging locally), it moves
473
+ the issue to this state. Falls back to CLANCY_STATUS_DONE if not set.
474
+
475
+ [1] Set state name
476
+ [2] Off (use Done state for PR flow too)
477
+ [3] Cancel
478
+ ```
479
+
480
+ If [1]: prompt `What workflow state name should Clancy use for In Review? (e.g. In Review, Ready for Review, Code Review)` then write `CLANCY_STATUS_REVIEW=<value>` to `.clancy/.env`.
481
+ If [2]: remove `CLANCY_STATUS_REVIEW` from `.clancy/.env`.
482
+
483
+ ---
484
+
485
+ ### [R1] Planner role
486
+
487
+ ```
488
+ Planner role — currently: {enabled / disabled}
489
+ The Planner refines vague backlog tickets into structured implementation plans.
490
+ Commands: /clancy:plan, /clancy:approve-plan
491
+
492
+ [1] Enable
493
+ [2] Disable
494
+ [3] Cancel
495
+ ```
496
+
497
+ If enabling:
498
+
499
+ - Add `planner` to `CLANCY_ROLES` in `.clancy/.env` (create the key if it doesn't exist, append if other roles are listed)
500
+ - Show `✅ Planner role enabled. Re-run the installer to apply: npx chief-clancy@latest --local (or --global)`
501
+
502
+ If disabling:
503
+
504
+ - Remove `planner` from `CLANCY_ROLES` in `.clancy/.env` (if empty after removal, remove the line entirely)
505
+ - Keep planner-specific settings (CLANCY_PLAN_STATUS, etc.) in `.clancy/.env` so re-enabling is frictionless
506
+ - Show `✅ Planner role disabled. Re-run the installer to apply: npx chief-clancy@latest --local (or --global)`
507
+
508
+ ---
509
+
510
+ ### [R2] Strategist role
511
+
512
+ ```
513
+ Strategist role — currently: {enabled / disabled}
514
+ The Strategist generates strategic briefs and creates tickets on the board.
515
+ Commands: /clancy:brief, /clancy:approve-brief
516
+
517
+ [1] Enable
518
+ [2] Disable
519
+ [3] Cancel
520
+ ```
521
+
522
+ If enabling:
523
+
524
+ - Add `strategist` to `CLANCY_ROLES` in `.clancy/.env` (create the key if it doesn't exist, append if other roles are listed)
525
+ - Show `✅ Strategist role enabled. Re-run the installer to apply: npx chief-clancy@latest --local (or --global)`
526
+
527
+ If disabling:
528
+
529
+ - Remove `strategist` from `CLANCY_ROLES` in `.clancy/.env` (if empty after removal, remove the line entirely)
530
+ - Keep strategist-specific settings (CLANCY_BRIEF_EPIC, CLANCY_BRIEF_ISSUE_TYPE, CLANCY_COMPONENT) in `.clancy/.env` so re-enabling is frictionless
531
+ - Show `✅ Strategist role disabled. Re-run the installer to apply: npx chief-clancy@latest --local (or --global)`
532
+
533
+ ---
534
+
535
+ ### [T1] Brief epic
536
+
537
+ Only shown when Strategist is enabled.
538
+
539
+ ```
540
+ Brief epic — current: {value or "off"}
541
+ Default parent epic/milestone for briefs created from text or file input.
542
+
543
+ [1] Set epic key (e.g. PROJ-100, #42, ENG-50)
544
+ [2] Off (no default parent)
545
+ [3] Cancel
546
+ ```
547
+
548
+ If [1]: prompt `What epic key should /clancy:brief parent tickets under?` then write `CLANCY_BRIEF_EPIC=<value>` to `.clancy/.env`. Wrap in double quotes.
549
+ If [2]: remove `CLANCY_BRIEF_EPIC` from `.clancy/.env`.
550
+
551
+ ---
552
+
553
+ ### [T2] Issue type (Jira only)
554
+
555
+ Only shown when Strategist is enabled and board is Jira.
556
+
557
+ ```
558
+ Brief issue type — current: {value or "Task"}
559
+ Issue type used when /clancy:brief creates tickets on the board.
560
+
561
+ [1] Task (default)
562
+ [2] Story
563
+ [3] Enter a different value
564
+ [4] Cancel
565
+ ```
566
+
567
+ If [1]: remove `CLANCY_BRIEF_ISSUE_TYPE` from `.clancy/.env` (uses default).
568
+ If [2]: write `CLANCY_BRIEF_ISSUE_TYPE="Story"` to `.clancy/.env`.
569
+ If [3]: prompt `What issue type should /clancy:brief use?` then write `CLANCY_BRIEF_ISSUE_TYPE=<value>` to `.clancy/.env`. Wrap in double quotes.
570
+
571
+ ---
572
+
573
+ ### [T3] Component
574
+
575
+ Only shown when Strategist is enabled.
576
+
577
+ ```
578
+ Component — current: {value or "off"}
579
+ Auto-set on tickets created by /clancy:brief.
580
+ Only affects ticket creation — does not filter the implementation queue.
581
+
582
+ [1] Set component name
583
+ [2] Off (no component)
584
+ [3] Cancel
585
+ ```
586
+
587
+ If [1]: prompt `What component should /clancy:brief set on created tickets?` then write `CLANCY_COMPONENT=<value>` to `.clancy/.env`. Wrap in double quotes.
588
+ If [2]: remove `CLANCY_COMPONENT` from `.clancy/.env`.
589
+
590
+ ---
591
+
592
+ ### [L1] Brief label
593
+
594
+ Only shown when Strategist is enabled.
595
+
596
+ ```
597
+ Brief label — current: {value or "clancy:brief"}
598
+ Label applied to tickets after /clancy:brief. Removed when the brief is approved.
599
+
600
+ [1] clancy:brief (default)
601
+ [2] Enter a different value
602
+ [3] Cancel
603
+ ```
604
+
605
+ If [1]: remove `CLANCY_LABEL_BRIEF` from `.clancy/.env` (uses default).
606
+ If [2]: prompt `What label should /clancy:brief apply?` then write `CLANCY_LABEL_BRIEF=<value>` to `.clancy/.env`. Wrap in double quotes.
607
+
608
+ ---
609
+
610
+ ### [L2] Plan label
611
+
612
+ Only shown when Planner or Strategist is enabled.
613
+
614
+ ```
615
+ Plan label — current: {value or "clancy:plan"}
616
+ Label applied to tickets that need planning. Removed when the plan is approved.
617
+
618
+ [1] clancy:plan (default)
619
+ [2] Enter a different value
620
+ [3] Cancel
621
+ ```
622
+
623
+ If [1]: remove `CLANCY_LABEL_PLAN` from `.clancy/.env` (uses default).
624
+ If [2]: prompt `What label should mark tickets needing planning?` then write `CLANCY_LABEL_PLAN=<value>` to `.clancy/.env`. Wrap in double quotes.
625
+
626
+ ---
627
+
628
+ ### [L3] Build label
629
+
630
+ Only shown when Planner or Strategist is enabled.
631
+
632
+ ```
633
+ Build label — current: {value or "clancy:build"}
634
+ Label applied to tickets ready for implementation. Used by /clancy:implement and /clancy:autopilot to filter the queue.
635
+
636
+ [1] clancy:build (default)
637
+ [2] Enter a different value
638
+ [3] Cancel
639
+ ```
640
+
641
+ If [1]: remove `CLANCY_LABEL_BUILD` from `.clancy/.env` (uses default).
642
+ If [2]: prompt `What label should mark tickets ready to build?` then write `CLANCY_LABEL_BUILD=<value>` to `.clancy/.env`. Wrap in double quotes.
643
+
644
+ ---
645
+
646
+ ### [P1] Plan queue status (Jira only)
647
+
648
+ ```
649
+ Plan queue status — current: {value or "Backlog"}
650
+ Which Jira status should /clancy:plan fetch backlog tickets from?
651
+ Common values: Backlog, To Refine, Unrefined
652
+
653
+ [1] Backlog (default)
654
+ [2] Enter a different value
655
+ ```
656
+
657
+ If [1]: remove `CLANCY_PLAN_STATUS` from `.clancy/.env` (uses default).
658
+ If [2]: prompt `What status name should /clancy:plan fetch from?` then write `CLANCY_PLAN_STATUS=<value>` to `.clancy/.env`.
659
+
660
+ ---
661
+
662
+ ### [P1] Plan label (GitHub only)
663
+
664
+ ```
665
+ Plan label — current: {value or "needs-refinement"}
666
+ Which label marks issues for /clancy:plan to refine?
667
+ Create this label in GitHub first if it doesn't exist.
668
+
669
+ [1] needs-refinement (default)
670
+ [2] Enter a different label name
671
+ ```
672
+
673
+ If [1]: remove `CLANCY_LABEL_PLAN` from `.clancy/.env` (uses default).
674
+ If [2]: prompt `What label should /clancy:plan filter by?` then write `CLANCY_LABEL_PLAN=<value>` to `.clancy/.env`.
675
+
676
+ ---
677
+
678
+ ### [P1] Plan state type (Linear only)
679
+
680
+ ```
681
+ Plan state type — current: {value or "backlog"}
682
+ Which Linear state type should /clancy:plan fetch issues from?
683
+
684
+ [1] backlog (default)
685
+ [2] triage
686
+ [3] Enter a different value
687
+ ```
688
+
689
+ If [1]: remove `CLANCY_PLAN_STATE_TYPE` from `.clancy/.env` (uses default).
690
+ If [2]: write `CLANCY_PLAN_STATE_TYPE=triage` to `.clancy/.env`.
691
+ If [3]: prompt `What state type should /clancy:plan fetch from?` then write `CLANCY_PLAN_STATE_TYPE=<value>` to `.clancy/.env`.
692
+
693
+ ---
694
+
695
+ ### [P2] Post-approval transition (Jira only)
696
+
697
+ Only shown when Planner is enabled and board is Jira.
698
+
699
+ ```
700
+ Post-approval transition — current: {value or "off"}
701
+ After approving a plan, transition the ticket to this status.
702
+
703
+ [1] Set status name
704
+ [2] Off (move manually)
705
+ [3] Cancel
706
+ ```
707
+
708
+ If [1]: prompt `What status should Clancy transition to after approving a plan? (e.g. To Do, Ready)` then write `CLANCY_STATUS_PLANNED=<value>` to `.clancy/.env`. Wrap in double quotes.
709
+ If [2]: remove `CLANCY_STATUS_PLANNED` from `.clancy/.env`.
710
+
711
+ ---
712
+
713
+ ### [H1] Git host token
714
+
715
+ Only shown for Jira and Linear boards. GitHub Issues users already have `GITHUB_TOKEN` for PR creation.
716
+
717
+ ```
718
+ Git host — current: {GitHub / GitLab / Bitbucket / not set}
719
+ Clancy pushes feature branches and creates PRs on your git host.
720
+
721
+ [1] GitHub
722
+ [2] GitLab
723
+ [3] Bitbucket
724
+ [4] Remove (push and create PRs manually)
725
+ [5] Cancel
726
+ ```
727
+
728
+ If [1]: prompt `Paste your GitHub personal access token:` then write `GITHUB_TOKEN=<value>` to `.clancy/.env`. Remove any existing `GITLAB_TOKEN`, `BITBUCKET_USER`, `BITBUCKET_TOKEN`.
729
+ If [2]: prompt `Paste your GitLab personal access token:` then write `GITLAB_TOKEN=<value>` to `.clancy/.env`. Optionally ask for a self-hosted API base URL (e.g. `https://gitlab.example.com/api/v4`) and write `CLANCY_GIT_API_URL` and `CLANCY_GIT_PLATFORM="gitlab"`. If the user enters just a hostname or instance URL without `/api/v4`, append `/api/v4` automatically. Remove any existing `GITHUB_TOKEN` (only if board is not GitHub), `BITBUCKET_USER`, `BITBUCKET_TOKEN`.
730
+ If [3]: prompt for `Bitbucket username` and `Bitbucket app password`, write `BITBUCKET_USER` and `BITBUCKET_TOKEN` to `.clancy/.env`. Remove any existing `GITHUB_TOKEN` (only if board is not GitHub), `GITLAB_TOKEN`.
731
+ If [4]: remove all git host token vars (`GITLAB_TOKEN`, `BITBUCKET_USER`, `BITBUCKET_TOKEN`, `CLANCY_GIT_PLATFORM`, `CLANCY_GIT_API_URL`). Keep `GITHUB_TOKEN` only if board is GitHub Issues.
732
+
733
+ ---
734
+
735
+ ### [I1] Figma MCP
736
+
737
+ ```
738
+ Figma MCP — current: {enabled / not set}
739
+
740
+ [1] Set API key
741
+ [2] Disable (remove key)
742
+ [3] Cancel
743
+ ```
744
+
745
+ If [1]: prompt `Paste your Figma API key: (create one at figma.com/settings → Personal access tokens)` then verify with the Figma `whoami` API before saving. If verification fails, tell the user and offer retry or skip — never save an unverified key.
746
+ If [2]: remove `FIGMA_API_KEY` from `.clancy/.env`.
747
+
748
+ ---
749
+
750
+ ### [I2] Playwright
751
+
752
+ ```
753
+ Playwright visual checks — current: {enabled / off}
754
+
755
+ [1] Enable
756
+ [2] Disable
757
+ [3] Cancel
758
+ ```
759
+
760
+ If [1] Enable selected and `PLAYWRIGHT_ENABLED` is already `true`: show `Playwright is already enabled. [1] Reconfigure [2] Cancel`. If Reconfigure, walk through the setup questions again. If Cancel, loop back.
761
+ If [1] Enable selected and `PLAYWRIGHT_DEV_COMMAND` is not set: walk through the Playwright setup questions from the init workflow (dev server command, port, Storybook detection, startup wait).
762
+ If [1] Enable selected and `PLAYWRIGHT_DEV_COMMAND` is already set: just set `PLAYWRIGHT_ENABLED=true`.
763
+ If [2] Disable: set `PLAYWRIGHT_ENABLED=false` in `.clancy/.env`.
764
+
765
+ ---
766
+
767
+ ### [I3] Notifications
768
+
769
+ ```
770
+ Notifications — current: {configured / not set}
771
+
772
+ [1] Set webhook URL
773
+ [2] Disable (remove webhook)
774
+ [3] Cancel
775
+ ```
776
+
777
+ If [1]: prompt `Paste your Slack or Teams webhook URL:` then write `CLANCY_NOTIFY_WEBHOOK=<url>` to `.clancy/.env`.
778
+ If [2]: remove `CLANCY_NOTIFY_WEBHOOK` from `.clancy/.env`.
779
+
780
+ ---
781
+
782
+ ### [S] Switch board
783
+
784
+ Show which board is currently active, then offer the others:
785
+
786
+ ```
787
+ Switch board — currently: {Jira / GitHub Issues / Linear / Shortcut / Notion / Azure DevOps}
788
+
789
+ [1] {board A}
790
+ [2] {board B}
791
+ ...
792
+ [N] Cancel
793
+ ```
794
+
795
+ Only show the boards that are not currently active. If the user picks Cancel, loop back to the menu without changing anything.
796
+
797
+ **Step 1: Collect new credentials**
798
+
799
+ Ask each credential question individually and wait for an answer, exactly as in the init workflow Q2:
800
+
801
+ Jira — ask in this order:
802
+
803
+ 1. `What's your Jira base URL? (e.g. https://your-org.atlassian.net)`
804
+ 2. `What's your Jira project key? (e.g. PROJ)`
805
+ 3. `What email address do you use to log in to Atlassian?`
806
+ 4. `Paste your Jira API token: (create one at id.atlassian.com/manage-profile/security/api-tokens)`
807
+
808
+ GitHub Issues — ask in this order:
809
+
810
+ 1. `What's your GitHub repo? (owner/name, e.g. acme/my-app)`
811
+ 2. `Paste your GitHub personal access token: (needs repo scope)`
812
+
813
+ After collecting GitHub credentials, remind the user:
814
+
815
+ ```
816
+ Important: Clancy only picks up GitHub Issues that have the "clancy" label applied.
817
+ Add this label to any issue you want Clancy to work on.
818
+ ```
819
+
820
+ Linear — ask in this order:
821
+
822
+ 1. `Paste your Linear API key: (create one at linear.app/settings/api)`
823
+ 2. `What's your Linear team ID? (find it at linear.app/settings/teams — click your team, copy the ID from the URL)`
824
+
825
+ Shortcut — ask in this order:
826
+
827
+ 1. `Paste your Shortcut API token: (create one at app.shortcut.com/settings/account/api-tokens)`
828
+ 2. `What workflow should Clancy use? (press Enter to auto-detect)`
829
+
830
+ Notion — ask in this order:
831
+
832
+ 1. `Paste your Notion integration token: (create one at notion.so/my-integrations)`
833
+ 2. `What's your Notion database ID? (32-character hex string from your database URL)`
834
+ 3. `Status property name? [Status]`
835
+ 4. `Assignee property name? [Assignee]`
836
+
837
+ Azure DevOps — ask in this order:
838
+
839
+ 1. `What's your Azure DevOps organisation name?`
840
+ 2. `What's your project name?`
841
+ 3. `Paste your Azure DevOps personal access token: (needs Work Items Read & Write scope)`
842
+
843
+ **Step 2: Verify credentials**
844
+
845
+ Verify the new credentials before making any changes — same checks as the init preflight and doctor workflow. Show the result:
846
+
847
+ ```
848
+ Verifying...
849
+ ✅ Connected — {board-specific confirmation, e.g. "PROJ reachable" / "acme/my-app found" / "Linear authenticated"}
850
+ ```
851
+
852
+ If verification fails, tell the user clearly and offer:
853
+
854
+ ```
855
+ Could not connect. Check your credentials and try again.
856
+
857
+ [1] Try again
858
+ [2] Cancel
859
+ ```
860
+
861
+ Never modify any files if verification fails.
862
+
863
+ **Step 3: Confirm the switch**
864
+
865
+ Once verified, show a single confirmation before making changes:
866
+
867
+ ```
868
+ Ready to switch from {old board} to {new board}.
869
+ Your other settings (model, iterations, branch, enhancements) will be kept.
870
+
871
+ Confirm? [Y/n]
872
+ ```
873
+
874
+ If no: print `Cancelled. No changes made.` and loop back to the menu.
875
+
876
+ **Step 4: Apply the switch**
877
+
878
+ 1. Remove all vars belonging to the old board from `.clancy/.env`:
879
+ - Jira: `JIRA_BASE_URL`, `JIRA_USER`, `JIRA_API_TOKEN`, `JIRA_PROJECT_KEY`, `CLANCY_JQL_STATUS`, `CLANCY_JQL_SPRINT`
880
+ - GitHub: `GITHUB_TOKEN`, `GITHUB_REPO`
881
+ - Linear: `LINEAR_API_KEY`, `LINEAR_TEAM_ID`
882
+ - Shortcut: `SHORTCUT_API_TOKEN`, `SHORTCUT_WORKFLOW`
883
+ - Notion: `NOTION_TOKEN`, `NOTION_DATABASE_ID`, `CLANCY_NOTION_STATUS`, `CLANCY_NOTION_ASSIGNEE`, `CLANCY_NOTION_LABELS`, `CLANCY_NOTION_PARENT`
884
+ - Azure DevOps: `AZDO_ORG`, `AZDO_PROJECT`, `AZDO_PAT`
885
+ - Git host (all boards): `GITLAB_TOKEN`, `BITBUCKET_USER`, `BITBUCKET_TOKEN`, `CLANCY_GIT_PLATFORM`, `CLANCY_GIT_API_URL`, `CLANCY_STATUS_REVIEW`
886
+ 2. Write the new board credentials to `.clancy/.env`
887
+ 3. If switching to Jira: also ask the status filter question (same as init Q3) and write `CLANCY_JQL_STATUS` to `.clancy/.env`
888
+ 4. No script replacement needed — the bundled runtime scripts are board-agnostic (board detection happens at runtime from `.clancy/.env`)
889
+
890
+ Print:
891
+
892
+ ```
893
+ ✅ Switched to {new board}. "New beat, same Chief."
894
+ ```
895
+
896
+ Then loop back to the main settings menu.
897
+
898
+ ---
899
+
900
+ ### [X] Exit
901
+
902
+ Print nothing extra. Stop.
903
+
904
+ ---
905
+
906
+ ## Step 5 — Writing values to .clancy/.env
907
+
908
+ When updating a value:
909
+
910
+ - If the key already exists in `.clancy/.env`: replace its line in place
911
+ - If the key does not exist: append it to the end of the file
912
+ - If removing a key: delete its line from the file
913
+ - Never touch any other lines in the file
914
+
915
+ ---
916
+
917
+ ### [D] Save as global defaults
918
+
919
+ When selected:
920
+
921
+ 1. Read the current `.clancy/.env` and extract only the non-credential, non-board-specific settings:
922
+ - `MAX_ITERATIONS`
923
+ - `CLANCY_MODEL`
924
+ - `CLANCY_BASE_BRANCH`
925
+ - `PLAYWRIGHT_ENABLED`
926
+ - `PLAYWRIGHT_STARTUP_WAIT`
927
+
928
+ 2. Write these to `~/.clancy/defaults.json`:
929
+
930
+ ```json
931
+ {
932
+ "MAX_ITERATIONS": "5",
933
+ "CLANCY_MODEL": "claude-sonnet-4-6",
934
+ "CLANCY_BASE_BRANCH": "main"
935
+ }
936
+ ```
937
+
938
+ 3. Print: `✅ Defaults saved to ~/.clancy/defaults.json — new projects will inherit these settings.`
939
+
940
+ 4. Loop back to the settings menu.
941
+
942
+ **Never save credentials, board-specific settings (status filter, sprint, label), or webhook URLs to global defaults.**
943
+
944
+ ---
945
+
946
+ ## Step 6 — Load global defaults during init
947
+
948
+ When `/clancy:init` creates `.clancy/.env`, check if `~/.clancy/defaults.json` exists. If so, pre-populate the `.env` with those values instead of the built-in defaults. The user's answers during init still take priority — defaults are only used for settings that init doesn't ask about (max iterations, model, etc.).
949
+
950
+ ---
951
+
952
+ ## Notes
953
+
954
+ - All changes are written to `.clancy/.env` immediately after confirmation
955
+ - Switching boards verifies credentials before making any changes — nothing is written if verification fails
956
+ - `/clancy:init` remains available for a full re-setup (re-scaffolds scripts and docs)
957
+ - This command never restarts any servers or triggers any ticket processing
958
+ - Global defaults (`~/.clancy/defaults.json`) are optional — if the file doesn't exist, built-in defaults are used