chief-clancy 0.5.1 → 0.5.2

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.
package/README.md CHANGED
@@ -193,6 +193,13 @@ npx chief-clancy@latest --local # or --global
193
193
 
194
194
  You can also toggle roles from within Claude Code using `/clancy:settings`.
195
195
 
196
+ Each role has detailed documentation:
197
+
198
+ - [Implementer](docs/roles/IMPLEMENTER.md) — picks up tickets, implements, commits, merges (AFK loop support)
199
+ - [Reviewer](docs/roles/REVIEWER.md) — scores ticket readiness, tracks progress
200
+ - [Setup & Maintenance](docs/roles/SETUP.md) — init wizard, settings, diagnostics, codebase mapping
201
+ - [Planner](docs/roles/PLANNER.md) — refines backlog tickets into structured implementation plans
202
+
196
203
  ---
197
204
 
198
205
  ## What gets created
@@ -221,75 +228,11 @@ Clancy also merges a section into your `CLAUDE.md` (or creates one) that tells C
221
228
 
222
229
  ---
223
230
 
224
- ## Optional enhancements
225
-
226
- Set during `/clancy:init` advanced setup, or by editing `.clancy/.env` directly. Use `/clancy:settings` → "Save as defaults" to save non-credential settings to `~/.clancy/defaults.json` — new projects created with `/clancy:init` will inherit them automatically.
231
+ ## Configuration
227
232
 
228
- ### Figma MCP
229
-
230
- ```
231
- FIGMA_API_KEY=your-key
232
- ```
233
+ Clancy supports optional enhancements — Figma design specs, Playwright visual checks, status transitions, and Slack/Teams notifications. All are configured via `.clancy/.env` or `/clancy:settings`.
233
234
 
234
- When a ticket description contains a Figma URL, Clancy fetches design specs automatically:
235
-
236
- 1. Figma MCP: `get_metadata` → `get_design_context` → `get_screenshot` (3 calls)
237
- 2. Figma REST API image export (fallback)
238
- 3. Ticket image attachment (fallback)
239
-
240
- ### Playwright visual checks
241
-
242
- ```
243
- PLAYWRIGHT_ENABLED=true
244
- PLAYWRIGHT_DEV_COMMAND="yarn dev"
245
- PLAYWRIGHT_DEV_PORT=5173
246
- PLAYWRIGHT_STORYBOOK_COMMAND="yarn storybook" # if applicable
247
- PLAYWRIGHT_STORYBOOK_PORT=6006 # if applicable
248
- PLAYWRIGHT_STARTUP_WAIT=15
249
- ```
250
-
251
- After implementing a UI ticket, Clancy starts the dev server or Storybook, screenshots, assesses visually, checks the console, and fixes anything wrong before committing.
252
-
253
- ### Status transitions
254
-
255
- ```
256
- CLANCY_STATUS_IN_PROGRESS="In Progress"
257
- CLANCY_STATUS_DONE="Done"
258
- ```
259
-
260
- Clancy automatically moves tickets through your board when it picks up and completes them. Set these to the exact column name shown in your Jira or Linear board. Best-effort — a failed transition never stops the run. Configurable via `/clancy:settings`.
261
-
262
- ### Notifications
263
-
264
- ```
265
- CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
266
- ```
267
-
268
- Posts to Slack or Teams when a ticket completes or Clancy hits an error. URL is auto-detected.
269
-
270
- ---
271
-
272
- ## How the loop works
273
-
274
- ```
275
- clancy-afk.js
276
- └─ while i < MAX_ITERATIONS:
277
- node clancy-once.js
278
- 1. Preflight checks (credentials, git state, board reachability)
279
- 2. Fetch next ticket from board (maxResults=1)
280
- 3. git checkout $EPIC_BRANCH
281
- 4. git checkout -b feature/{ticket-key}
282
- 5. Read .clancy/docs/* (especially GIT.md)
283
- 6. echo "$PROMPT" | claude --dangerously-skip-permissions
284
- 7. git checkout $EPIC_BRANCH
285
- 8. git merge --squash feature/{ticket-key}
286
- 9. git commit -m "feat(TICKET): summary"
287
- 10. git branch -D feature/{ticket-key}
288
- 11. Append to .clancy/progress.txt
289
- if "No tickets found": break
290
- ```
291
-
292
- Clancy reads `GIT.md` before every run and follows whatever conventions are documented there. The defaults above apply on greenfield projects or when GIT.md is silent.
235
+ See [Configuration guide](docs/guides/CONFIGURATION.md) for full details and all environment variables.
293
236
 
294
237
  ---
295
238
 
@@ -311,80 +254,9 @@ Clancy is what happens when you take that idea seriously for team development. S
311
254
 
312
255
  ## Security
313
256
 
314
- ### Permissions model
315
-
316
- Clancy runs Claude with `--dangerously-skip-permissions`, which suppresses all permission prompts so it can work unattended. This means Claude has full read/write access to your file system and can execute shell commands without asking.
317
-
318
- **Only run Clancy on codebases you own and trust.** Review the scripts in `.clancy/` before your first run if you want to see exactly what executes.
319
-
320
- **Alternative — granular permissions:** if you run Claude Code without `--dangerously-skip-permissions` by default, you can pre-approve only the commands Clancy needs. Add this to `.claude/settings.json` in your project (or `~/.claude/settings.json` globally):
321
-
322
- ```json
323
- {
324
- "permissions": {
325
- "allow": [
326
- "Bash(git:*)",
327
- "Bash(bash:*)",
328
- "Bash(node:*)",
329
- "Bash(npm:*)",
330
- "Bash(mkdir:*)",
331
- "Bash(cat:*)",
332
- "Bash(cp:*)",
333
- "Bash(echo:*)",
334
- "Bash(ls:*)",
335
- "Bash(grep:*)",
336
- "Bash(wc:*)",
337
- "Bash(sort:*)",
338
- "Bash(tr:*)",
339
- "Bash(head:*)",
340
- "Bash(tail:*)",
341
- "Bash(lsof:*)",
342
- "Bash(command:*)"
343
- ]
344
- }
345
- }
346
- ```
347
-
348
- ### Protect your credentials from Claude
349
-
350
- Your board tokens and API keys live in `.clancy/.env`. Although Claude doesn't need to read this file during a run (the JS shim loads it before invoking Claude), adding it to Claude Code's deny list is good defence-in-depth. Add it to `.claude/settings.json` in your project, or `~/.claude/settings.json` globally:
351
-
352
- ```json
353
- {
354
- "permissions": {
355
- "deny": [
356
- "Read(.clancy/.env)",
357
- "Read(.env)",
358
- "Read(.env.*)",
359
- "Read(**/*.pem)",
360
- "Read(**/*.key)"
361
- ]
362
- }
363
- }
364
- ```
365
-
366
- This prevents Claude from reading these files regardless of what commands run. Clancy automatically adds `.clancy/.env` to `.gitignore` during init, but the deny list is an additional layer.
367
-
368
- ### Credential guard
369
-
370
- Clancy installs a `PreToolUse` hook (`clancy-credential-guard.js`) that scans every Write, Edit, and MultiEdit operation for credential patterns — API keys, tokens, passwords, private keys, and connection strings. If a match is found, the operation is blocked with a message telling Claude to move the credential to `.clancy/.env` instead. Files that are expected to contain credentials (`.clancy/.env`, `.env.example`, etc.) are exempt.
371
-
372
- This is best-effort — it won't catch every possible credential format, but it prevents the most common accidental leaks.
257
+ Clancy runs Claude with `--dangerously-skip-permissions` for unattended operation. It includes a credential guard hook, recommended permission deny lists, and token scope guidance.
373
258
 
374
- ### Token scopes
375
-
376
- Use the minimum permissions each integration requires:
377
-
378
- | Integration | Recommended scope |
379
- |---|---|
380
- | GitHub PAT | `repo` — read/write issues and contents for your repo only |
381
- | Jira API token | Standard user — no admin rights needed |
382
- | Linear API key | Personal API key — read/write to your assigned issues |
383
- | Figma API key | Read-only access is sufficient |
384
-
385
- ### Webhook URLs
386
-
387
- If you configure Slack or Teams notifications, treat the webhook URL as a secret — anyone who has it can post to your channel. Keep `.clancy/.env` gitignored (Clancy does this automatically during init) and never share the URL.
259
+ See [Security guide](docs/guides/SECURITY.md) for full details — permissions model, credential protection, token scopes, and webhook security.
388
260
 
389
261
  ---
390
262
 
@@ -392,70 +264,7 @@ If you configure Slack or Teams notifications, treat the webhook URL as a secret
392
264
 
393
265
  **Start here:** run `/clancy:doctor` — it tests every integration and tells you exactly what's broken and how to fix it.
394
266
 
395
- ---
396
-
397
- **Commands not found after install?**
398
-
399
- Restart Claude Code to reload commands, then verify the files exist:
400
-
401
- ```bash
402
- ls ~/.claude/commands/clancy/ # global install
403
- ls .claude/commands/clancy/ # local install
404
- ```
405
-
406
- If missing, re-run `npx chief-clancy`.
407
-
408
- ---
409
-
410
- **Board connection fails?**
411
-
412
- Run `/clancy:doctor` to test your credentials. If it reports a failure, open `.clancy/.env` and check your tokens — they're the most common cause. You can also run `/clancy:settings` → Switch board to re-enter credentials without re-running full init.
413
-
414
- ---
415
-
416
- **No tickets showing up?**
417
-
418
- Run `/clancy:status` to see what Clancy would pick up. If the queue is empty:
419
-
420
- - Check that tickets are assigned to you on the board
421
- - For Jira: verify the status filter in `/clancy:settings` matches your board's status name exactly (e.g. `To Do` vs `TODO`)
422
- - For Linear: Clancy filters by `state.type: unstarted` — ensure your backlog state maps to this type
423
-
424
- ---
425
-
426
- **`.clancy/clancy-once.js` not found?**
427
-
428
- Re-run `/clancy:init` — it will detect the existing setup and offer to re-scaffold without asking for credentials again.
429
-
430
- ---
431
-
432
- **Playwright port already in use?**
433
-
434
- ```bash
435
- lsof -ti:5173 | xargs kill -9 # replace 5173 with your PLAYWRIGHT_DEV_PORT
436
- ```
437
-
438
- ---
439
-
440
- **Updating Clancy?**
441
-
442
- ```bash
443
- /clancy:update
444
- ```
445
-
446
- Or directly: `npx chief-clancy@latest`
447
-
448
- The update workflow shows what's changed (changelog diff) and asks for confirmation before overwriting. If you've customised any command or workflow files, they're automatically backed up to `.claude/clancy/local-patches/` before the update — check there to reapply your changes afterwards.
449
-
450
- ---
451
-
452
- **Uninstalling?**
453
-
454
- ```
455
- /clancy:uninstall
456
- ```
457
-
458
- Removes slash commands from your chosen location. Cleans up the `<!-- clancy:start -->` / `<!-- clancy:end -->` block from `CLAUDE.md` (or deletes it entirely if Clancy created it) and removes the `.clancy/.env` entry from `.gitignore`. Optionally removes `.clancy/` (credentials and docs).
267
+ See [Troubleshooting guide](docs/guides/TROUBLESHOOTING.md) for common issues and solutions.
459
268
 
460
269
  ---
461
270
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chief-clancy",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Autonomous, board-driven development for Claude Code — scaffolds docs, integrates Kanban boards, runs tickets in a loop.",
5
5
  "keywords": [
6
6
  "claude",
@@ -239,6 +239,82 @@ If enter is pressed with no value: skip — omit the label clause entirely (Clan
239
239
 
240
240
  ---
241
241
 
242
+ ### Q3d (Jira and Linear only): Status transitions
243
+
244
+ Output:
245
+
246
+ **GitHub:** Skip this step entirely — GitHub Issues use `open`/`closed`, not status columns. Clancy closes issues automatically on completion.
247
+
248
+ **Jira:** Output:
249
+
250
+ ```
251
+ When Clancy picks up a ticket, it can transition it on your Jira board.
252
+ Jira uses transition action names (e.g. "In Progress", "Start Progress").
253
+ These usually match the column name, but check your Jira workflow if transitions fail.
254
+
255
+ What transition should Clancy use when it starts working on a ticket?
256
+
257
+ [1] In Progress (most common)
258
+ [2] Enter a different value
259
+ [3] Skip — don't transition on pickup (ticket stays in its current column)
260
+ ```
261
+
262
+ If [1]: store `CLANCY_STATUS_IN_PROGRESS="In Progress"` in `.clancy/.env`.
263
+ If [2]: prompt for the value, store as `CLANCY_STATUS_IN_PROGRESS` in `.clancy/.env`. Wrap in double quotes.
264
+ If [3] or the user says "skip"/"none": skip — no `CLANCY_STATUS_IN_PROGRESS` line written.
265
+
266
+ Then ask:
267
+
268
+ ```
269
+ What transition should Clancy use after implementation is complete?
270
+
271
+ [1] Done
272
+ [2] Ready for Review
273
+ [3] Enter a different value
274
+ [4] Skip — don't transition on completion (ticket stays in its current column)
275
+ ```
276
+
277
+ If [1]: store `CLANCY_STATUS_DONE="Done"` in `.clancy/.env`.
278
+ If [2]: store `CLANCY_STATUS_DONE="Ready for Review"` in `.clancy/.env`.
279
+ If [3]: prompt for the value, store as `CLANCY_STATUS_DONE` in `.clancy/.env`. Wrap in double quotes.
280
+ If [4] or the user says "skip"/"none": skip — no `CLANCY_STATUS_DONE` line written.
281
+
282
+ **Linear:** Output:
283
+
284
+ ```
285
+ When Clancy picks up a ticket, it can move it to a workflow state on your board.
286
+
287
+ What state should Clancy move a ticket to when it starts working on it?
288
+
289
+ [1] In Progress (most common)
290
+ [2] Enter a different value
291
+ [3] Skip — don't transition on pickup (ticket stays in its current state)
292
+ ```
293
+
294
+ If [1]: store `CLANCY_STATUS_IN_PROGRESS="In Progress"` in `.clancy/.env`.
295
+ If [2]: prompt for the value, store as `CLANCY_STATUS_IN_PROGRESS` in `.clancy/.env`. Wrap in double quotes.
296
+ If [3] or the user says "skip"/"none": skip — no `CLANCY_STATUS_IN_PROGRESS` line written.
297
+
298
+ Then ask:
299
+
300
+ ```
301
+ What state should Clancy move a ticket to after implementation is complete?
302
+
303
+ [1] Done
304
+ [2] Ready for Review
305
+ [3] Enter a different value
306
+ [4] Skip — don't transition on completion (ticket stays in its current state)
307
+ ```
308
+
309
+ If [1]: store `CLANCY_STATUS_DONE="Done"` in `.clancy/.env`.
310
+ If [2]: store `CLANCY_STATUS_DONE="Ready for Review"` in `.clancy/.env`.
311
+ If [3]: prompt for the value, store as `CLANCY_STATUS_DONE` in `.clancy/.env`. Wrap in double quotes.
312
+ If [4] or the user says "skip"/"none": skip — no `CLANCY_STATUS_DONE` line written.
313
+
314
+ You can always configure these later via `/clancy:settings`.
315
+
316
+ ---
317
+
242
318
  ### Q4: Base branch (auto-detect)
243
319
 
244
320
  Silently detect the base branch — do not ask unless detection fails:
@@ -322,6 +398,28 @@ Note: as more roles are added in future versions, they appear as additional numb
322
398
 
323
399
  ---
324
400
 
401
+ ## Step 4d (Jira only, if Planner role selected): Planning queue status
402
+
403
+ Only ask this if the user selected Planner in Step 4c above (or if re-running init and `CLANCY_ROLES` already includes `planner`).
404
+
405
+ If the planner role is not enabled, skip this step entirely.
406
+
407
+ Output:
408
+
409
+ ```
410
+ The Planner role picks tickets from a separate queue for planning.
411
+
412
+ Which Jira status should Clancy pick planning tickets from?
413
+
414
+ [1] Backlog (default)
415
+ [2] Enter a different value
416
+ ```
417
+
418
+ If [1]: store `CLANCY_PLAN_STATUS="Backlog"` in `.clancy/.env`.
419
+ If [2]: prompt for the value, store as `CLANCY_PLAN_STATUS` in `.clancy/.env`. Wrap in double quotes.
420
+
421
+ ---
422
+
325
423
  ## Step 5 — Optional enhancements
326
424
 
327
425
  Output:
@@ -335,6 +335,7 @@ JIRA_USER=your-email@example.com
335
335
  JIRA_API_TOKEN=your-api-token-from-id.atlassian.com
336
336
  JIRA_PROJECT_KEY=PROJ
337
337
 
338
+ # ─── Implementation Queue ─────────────────────────────────────────────────────
338
339
  # Status name for "ready to be picked up" (default: To Do)
339
340
  # Must be quoted if the status name contains spaces (e.g. "Selected for Development")
340
341
  CLANCY_JQL_STATUS="To Do"
@@ -377,10 +378,17 @@ MAX_ITERATIONS=5
377
378
 
378
379
  # ─── Optional: Status transitions ────────────────────────────────────────────
379
380
  # Move tickets automatically when Clancy picks up or completes them.
380
- # Set to the exact status name shown in your Jira board column header.
381
+ # Set to the Jira transition name (the action label, not the column header).
382
+ # In many workflows these match, but check your Jira workflow if transitions fail.
383
+ # "Done" can be any transition to a post-implementation status.
381
384
  # CLANCY_STATUS_IN_PROGRESS="In Progress"
382
385
  # CLANCY_STATUS_DONE="Done"
383
386
 
387
+ # ─── Optional: Planner queue ─────────────────────────────────────────────────
388
+ # Status for backlog tickets that /clancy:plan fetches from (default: Backlog)
389
+ # Only used if Planner role is enabled via CLANCY_ROLES
390
+ # CLANCY_PLAN_STATUS="Backlog"
391
+
384
392
  # ─── Optional: Notifications ──────────────────────────────────────────────────
385
393
  # Webhook URL for Slack or Teams notifications on ticket completion
386
394
  # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
@@ -397,10 +405,14 @@ MAX_ITERATIONS=5
397
405
  GITHUB_TOKEN=ghp_your-personal-access-token
398
406
  GITHUB_REPO=owner/repo-name
399
407
 
400
- # Optional: only pick up issues with this label (in addition to 'clancy').
401
- # Useful for mixed backlogs where not every issue is suitable for autonomous implementation.
408
+ # Recommended: only pick up issues with this label.
409
+ # Without this, Clancy picks up all open issues assigned to you.
402
410
  # Create the label in GitHub first, then add it to any issue you want Clancy to pick up.
403
- # CLANCY_LABEL=clancy
411
+ # CLANCY_LABEL="clancy"
412
+
413
+ # ─── Planner Queue (optional — requires CLANCY_ROLES to include "planner") ───
414
+ # Label for backlog issues that /clancy:plan fetches from (default: needs-refinement)
415
+ # CLANCY_PLAN_LABEL="needs-refinement"
404
416
 
405
417
  # ─── Git ──────────────────────────────────────────────────────────────────────
406
418
  # Base integration branch. Clancy branches from here when an issue has no milestone.
@@ -479,7 +491,8 @@ MAX_ITERATIONS=20
479
491
 
480
492
  # ─── Optional: Status transitions ────────────────────────────────────────────
481
493
  # Move issues automatically when Clancy picks up or completes them.
482
- # Set to the exact workflow state name shown in your Linear board column header.
494
+ # Set to the exact workflow state name shown in your Linear team settings.
495
+ # "Done" can be any post-implementation state (e.g. "Ready for Review", "In Review").
483
496
  # CLANCY_STATUS_IN_PROGRESS="In Progress"
484
497
  # CLANCY_STATUS_DONE="Done"
485
498