chief-clancy 0.7.3 → 0.8.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.
@@ -396,6 +396,16 @@ MAX_ITERATIONS=5
396
396
  # CLANCY_GIT_PLATFORM=gitlab # override auto-detection (github/gitlab/bitbucket)
397
397
  # CLANCY_GIT_API_URL=https://gitlab.example.com/api/v4 # self-hosted git API base URL
398
398
 
399
+ # ─── Optional: Pipeline labels ────────────────────────────────────────────────
400
+ # Labels that control ticket flow through pipeline stages.
401
+ # CLANCY_LABEL_BRIEF marks tickets that have been briefed (awaiting approval).
402
+ # CLANCY_LABEL_PLAN marks tickets that need planning.
403
+ # CLANCY_LABEL_BUILD marks tickets ready for implementation.
404
+ # Deprecated: CLANCY_LABEL (use CLANCY_LABEL_BUILD), CLANCY_PLAN_LABEL (use CLANCY_LABEL_PLAN)
405
+ # CLANCY_LABEL_BRIEF="clancy:brief"
406
+ # CLANCY_LABEL_PLAN="clancy:plan"
407
+ # CLANCY_LABEL_BUILD="clancy:build"
408
+
399
409
  # ─── Optional: Rework loop ──────────────────────────────────────────────────
400
410
  # PR-based rework is automatic — when a reviewer leaves inline comments or
401
411
  # a conversation comment prefixed with "Rework:", Clancy picks it up on the
@@ -446,6 +456,15 @@ MAX_ITERATIONS=5
446
456
  # Prevent accidental commits to the base branch (default: true)
447
457
  # CLANCY_BRANCH_GUARD=true
448
458
 
459
+ # ─── Optional: Quiet hours ───────────────────────────────────────────────────
460
+ # Pause AFK runs during these hours (24h format). Handles overnight windows.
461
+ # CLANCY_QUIET_START=22:00
462
+ # CLANCY_QUIET_END=06:00
463
+
464
+ # ─── Optional: Desktop notifications ─────────────────────────────────────────
465
+ # Native OS notifications on ticket completion or error (default: true)
466
+ # CLANCY_DESKTOP_NOTIFY=true
467
+
449
468
  # ─── Optional: Notifications ──────────────────────────────────────────────────
450
469
  # Webhook URL for Slack or Teams notifications on ticket completion
451
470
  # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
@@ -502,6 +521,16 @@ MAX_ITERATIONS=20
502
521
  # PLAYWRIGHT_STORYBOOK_PORT=6006
503
522
  # PLAYWRIGHT_STARTUP_WAIT=15
504
523
 
524
+ # ─── Optional: Pipeline labels ────────────────────────────────────────────────
525
+ # Labels that control ticket flow through pipeline stages.
526
+ # CLANCY_LABEL_BRIEF marks tickets that have been briefed (awaiting approval).
527
+ # CLANCY_LABEL_PLAN marks tickets that need planning.
528
+ # CLANCY_LABEL_BUILD marks tickets ready for implementation.
529
+ # Deprecated: CLANCY_LABEL (use CLANCY_LABEL_BUILD), CLANCY_PLAN_LABEL (use CLANCY_LABEL_PLAN)
530
+ # CLANCY_LABEL_BRIEF="clancy:brief"
531
+ # CLANCY_LABEL_PLAN="clancy:plan"
532
+ # CLANCY_LABEL_BUILD="clancy:build"
533
+
505
534
  # ─── Optional: Rework loop ──────────────────────────────────────────────────
506
535
  # PR-based rework is automatic — when a reviewer leaves inline comments or
507
536
  # a conversation comment prefixed with "Rework:", Clancy picks it up on the
@@ -543,6 +572,148 @@ MAX_ITERATIONS=20
543
572
 
544
573
  # ─── Optional: Notifications ──────────────────────────────────────────────────
545
574
  # Webhook URL for Slack or Teams notifications on ticket completion
575
+ # ─── Optional: Quiet hours ───────────────────────────────────────────────────
576
+ # CLANCY_QUIET_START=22:00
577
+ # CLANCY_QUIET_END=06:00
578
+
579
+ # ─── Optional: Desktop notifications ─────────────────────────────────────────
580
+ # CLANCY_DESKTOP_NOTIFY=true
581
+
582
+ # ─── Optional: Notifications ──────────────────────────────────────────────────
583
+ # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
584
+ ```
585
+
586
+ ### Shortcut
587
+
588
+ ```
589
+ # Clancy — Shortcut configuration
590
+ # Copy this file to .env and fill in your values.
591
+ # Never commit .env to version control.
592
+
593
+ # ─── Shortcut ────────────────────────────────────────────────────────────────
594
+ SHORTCUT_API_TOKEN=your-api-token
595
+
596
+ # Optional: workflow name (default: auto-detect first workflow)
597
+ # SHORTCUT_WORKFLOW=Engineering
598
+
599
+ # ─── Git ──────────────────────────────────────────────────────────────────────
600
+ CLANCY_BASE_BRANCH=main
601
+
602
+ # ─── Loop ─────────────────────────────────────────────────────────────────────
603
+ MAX_ITERATIONS=5
604
+
605
+ # ─── Optional: Git host (PR creation) ───────────────────────────────────────
606
+ # GITHUB_TOKEN=ghp_your-token
607
+ # GITLAB_TOKEN=glpat-your-token
608
+ # BITBUCKET_USER=your-username
609
+ # BITBUCKET_TOKEN=your-app-password
610
+
611
+ # ─── Optional: Pipeline labels ────────────────────────────────────────────────
612
+ # CLANCY_LABEL_BRIEF="clancy:brief"
613
+ # CLANCY_LABEL_PLAN="clancy:plan"
614
+ # CLANCY_LABEL_BUILD="clancy:build"
615
+
616
+ # ─── Optional: Status transitions ────────────────────────────────────────────
617
+ # CLANCY_STATUS_IN_PROGRESS="In Progress"
618
+ # CLANCY_STATUS_DONE="Done"
619
+ # CLANCY_STATUS_REVIEW="In Review"
620
+
621
+ # ─── Optional: Quiet hours ───────────────────────────────────────────────────
622
+ # CLANCY_QUIET_START=22:00
623
+ # CLANCY_QUIET_END=06:00
624
+
625
+ # ─── Optional: Desktop notifications ─────────────────────────────────────────
626
+ # CLANCY_DESKTOP_NOTIFY=true
627
+
628
+ # ─── Optional: Notifications ──────────────────────────────────────────────────
629
+ # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
630
+ ```
631
+
632
+ ### Notion
633
+
634
+ ```
635
+ # Clancy — Notion configuration
636
+ # Copy this file to .env and fill in your values.
637
+ # Never commit .env to version control.
638
+
639
+ # ─── Notion ──────────────────────────────────────────────────────────────────
640
+ NOTION_TOKEN=your-integration-token
641
+ NOTION_DATABASE_ID=your-database-id-32-char-hex
642
+
643
+ # Optional: property name overrides (defaults shown)
644
+ # CLANCY_NOTION_STATUS=Status
645
+ # CLANCY_NOTION_ASSIGNEE=Assignee
646
+
647
+ # ─── Git ──────────────────────────────────────────────────────────────────────
648
+ CLANCY_BASE_BRANCH=main
649
+
650
+ # ─── Loop ─────────────────────────────────────────────────────────────────────
651
+ MAX_ITERATIONS=5
652
+
653
+ # ─── Optional: Git host (PR creation) ───────────────────────────────────────
654
+ # GITHUB_TOKEN=ghp_your-token
655
+ # GITLAB_TOKEN=glpat-your-token
656
+ # BITBUCKET_USER=your-username
657
+ # BITBUCKET_TOKEN=your-app-password
658
+
659
+ # ─── Optional: Pipeline labels ────────────────────────────────────────────────
660
+ # CLANCY_LABEL_BRIEF="clancy:brief"
661
+ # CLANCY_LABEL_PLAN="clancy:plan"
662
+ # CLANCY_LABEL_BUILD="clancy:build"
663
+
664
+ # ─── Optional: Quiet hours ───────────────────────────────────────────────────
665
+ # CLANCY_QUIET_START=22:00
666
+ # CLANCY_QUIET_END=06:00
667
+
668
+ # ─── Optional: Desktop notifications ─────────────────────────────────────────
669
+ # CLANCY_DESKTOP_NOTIFY=true
670
+
671
+ # ─── Optional: Notifications ──────────────────────────────────────────────────
672
+ # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
673
+ ```
674
+
675
+ ### Azure DevOps
676
+
677
+ ```
678
+ # Clancy — Azure DevOps configuration
679
+ # Copy this file to .env and fill in your values.
680
+ # Never commit .env to version control.
681
+
682
+ # ─── Azure DevOps ────────────────────────────────────────────────────────────
683
+ AZDO_ORG=your-organisation
684
+ AZDO_PROJECT=your-project
685
+ AZDO_PAT=your-personal-access-token
686
+
687
+ # ─── Git ──────────────────────────────────────────────────────────────────────
688
+ CLANCY_BASE_BRANCH=main
689
+
690
+ # ─── Loop ─────────────────────────────────────────────────────────────────────
691
+ MAX_ITERATIONS=5
692
+
693
+ # ─── Optional: Git host (PR creation) ───────────────────────────────────────
694
+ # GITHUB_TOKEN=ghp_your-token
695
+ # GITLAB_TOKEN=glpat-your-token
696
+ # BITBUCKET_USER=your-username
697
+ # BITBUCKET_TOKEN=your-app-password
698
+
699
+ # ─── Optional: Pipeline labels ────────────────────────────────────────────────
700
+ # CLANCY_LABEL_BRIEF="clancy:brief"
701
+ # CLANCY_LABEL_PLAN="clancy:plan"
702
+ # CLANCY_LABEL_BUILD="clancy:build"
703
+
704
+ # ─── Optional: Status transitions ────────────────────────────────────────────
705
+ # CLANCY_STATUS_IN_PROGRESS="Active"
706
+ # CLANCY_STATUS_DONE="Closed"
707
+ # CLANCY_STATUS_REVIEW="Resolved"
708
+
709
+ # ─── Optional: Quiet hours ───────────────────────────────────────────────────
710
+ # CLANCY_QUIET_START=22:00
711
+ # CLANCY_QUIET_END=06:00
712
+
713
+ # ─── Optional: Desktop notifications ─────────────────────────────────────────
714
+ # CLANCY_DESKTOP_NOTIFY=true
715
+
716
+ # ─── Optional: Notifications ──────────────────────────────────────────────────
546
717
  # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
547
718
  ```
548
719
 
@@ -636,6 +807,16 @@ MAX_ITERATIONS=20
636
807
  # CLANCY_GIT_PLATFORM=gitlab # override auto-detection (github/gitlab/bitbucket)
637
808
  # CLANCY_GIT_API_URL=https://gitlab.example.com/api/v4 # self-hosted git API base URL
638
809
 
810
+ # ─── Optional: Pipeline labels ────────────────────────────────────────────────
811
+ # Labels that control ticket flow through pipeline stages.
812
+ # CLANCY_LABEL_BRIEF marks tickets that have been briefed (awaiting approval).
813
+ # CLANCY_LABEL_PLAN marks tickets that need planning.
814
+ # CLANCY_LABEL_BUILD marks tickets ready for implementation.
815
+ # Deprecated: CLANCY_LABEL (use CLANCY_LABEL_BUILD), CLANCY_PLAN_LABEL (use CLANCY_LABEL_PLAN)
816
+ # CLANCY_LABEL_BRIEF="clancy:brief"
817
+ # CLANCY_LABEL_PLAN="clancy:plan"
818
+ # CLANCY_LABEL_BUILD="clancy:build"
819
+
639
820
  # ─── Optional: Reliable autonomous mode ───────────────────────────────────────
640
821
  # Max self-healing attempts after verification failure (default: 2, range 0-5)
641
822
  # CLANCY_FIX_RETRIES=2
@@ -651,6 +832,13 @@ MAX_ITERATIONS=20
651
832
  # Set to "false" to disable skip comments
652
833
  # CLANCY_SKIP_COMMENTS=true
653
834
 
835
+ # ─── Optional: Quiet hours ───────────────────────────────────────────────────
836
+ # CLANCY_QUIET_START=22:00
837
+ # CLANCY_QUIET_END=06:00
838
+
839
+ # ─── Optional: Desktop notifications ─────────────────────────────────────────
840
+ # CLANCY_DESKTOP_NOTIFY=true
841
+
654
842
  # ─── Optional: Notifications ──────────────────────────────────────────────────
655
843
  # Webhook URL for Slack or Teams notifications on ticket completion
656
844
  # CLANCY_NOTIFY_WEBHOOK=https://hooks.slack.com/services/your/webhook/url
@@ -35,6 +35,9 @@ Source `.clancy/.env` silently. Detect which board is configured:
35
35
  - `JIRA_BASE_URL` set → Jira
36
36
  - `GITHUB_TOKEN` set → GitHub Issues
37
37
  - `LINEAR_API_KEY` set → Linear
38
+ - `SHORTCUT_API_TOKEN` set → Shortcut
39
+ - `NOTION_DATABASE_ID` set → Notion
40
+ - `AZDO_ORG` set → Azure DevOps
38
41
 
39
42
  ---
40
43
 
@@ -58,6 +61,8 @@ General
58
61
  [G7] Fix retries {CLANCY_FIX_RETRIES:-2} self-healing attempts after verification failure
59
62
  [G8] Time limit {CLANCY_TIME_LIMIT:-30} per-ticket time limit in minutes (0 = disabled)
60
63
  [G9] Branch guard {on if CLANCY_BRANCH_GUARD=true or unset, off if false}
64
+ [G10] Quiet hours {CLANCY_QUIET_START–CLANCY_QUIET_END if set, else off}
65
+ [G11] Desktop notify {on if CLANCY_DESKTOP_NOTIFY=true or unset, off if false}
61
66
 
62
67
  {If Jira:}
63
68
  Jira
@@ -86,6 +91,14 @@ Strategist
86
91
  [T2] Issue type {CLANCY_BRIEF_ISSUE_TYPE:-Task}
87
92
  [T3] Component {CLANCY_COMPONENT if set, else "off"}
88
93
 
94
+ {If Planner or Strategist enabled:}
95
+ Pipeline Labels
96
+ [L1] Brief label {CLANCY_LABEL_BRIEF if set, else "clancy:brief"} (Strategist only)
97
+ [L2] Plan label {CLANCY_LABEL_PLAN if set, else "clancy:plan"}
98
+ [L3] Build label {CLANCY_LABEL_BUILD if set, else "clancy:build"}
99
+ {If CLANCY_LABEL or CLANCY_PLAN_LABEL set:}
100
+ ⚠ CLANCY_LABEL and CLANCY_PLAN_LABEL are deprecated. Use CLANCY_LABEL_BUILD and CLANCY_LABEL_PLAN.
101
+
89
102
  {If Planner enabled:}
90
103
  Planner
91
104
  {If Jira:}
@@ -105,7 +118,7 @@ Integrations
105
118
  [I2] Playwright {enabled if PLAYWRIGHT_ENABLED=true, else off}
106
119
  [I3] Notifications {configured if CLANCY_NOTIFY_WEBHOOK set, else not set}
107
120
 
108
- [S] Switch board currently: {Jira / GitHub Issues / Linear}
121
+ [S] Switch board currently: {Jira / GitHub Issues / Linear / Shortcut / Notion / Azure DevOps}
109
122
  [D] Save as defaults save current settings for all future projects
110
123
  [X] Exit
111
124
 
@@ -270,6 +283,37 @@ If [2]: write `CLANCY_BRANCH_GUARD=false` to `.clancy/.env`.
270
283
 
271
284
  ---
272
285
 
286
+ ### [G10] Quiet hours
287
+
288
+ ```
289
+ Quiet hours — current: {CLANCY_QUIET_START–CLANCY_QUIET_END or "off"}
290
+ Pause AFK runs during these hours. Clancy sleeps until the end of the quiet window.
291
+
292
+ [1] Set quiet hours
293
+ [2] Off (no quiet hours)
294
+ [3] Cancel
295
+ ```
296
+
297
+ 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`.
298
+ If [2]: remove `CLANCY_QUIET_START` and `CLANCY_QUIET_END` from `.clancy/.env`.
299
+
300
+ ---
301
+
302
+ ### [G11] Desktop notifications
303
+
304
+ ```
305
+ Desktop notifications — current: {on/off}
306
+ Native OS notifications when tickets complete or errors occur.
307
+
308
+ [1] Enable (default)
309
+ [2] Disable
310
+ ```
311
+
312
+ If [1]: write `CLANCY_DESKTOP_NOTIFY=true` to `.clancy/.env`.
313
+ If [2]: write `CLANCY_DESKTOP_NOTIFY=false` to `.clancy/.env`.
314
+
315
+ ---
316
+
273
317
  ### [B1] Jira status filter (Jira only)
274
318
 
275
319
  ```
@@ -539,6 +583,60 @@ If [2]: remove `CLANCY_COMPONENT` from `.clancy/.env`.
539
583
 
540
584
  ---
541
585
 
586
+ ### [L1] Brief label
587
+
588
+ Only shown when Strategist is enabled.
589
+
590
+ ```
591
+ Brief label — current: {value or "clancy:brief"}
592
+ Label applied to tickets after /clancy:brief. Removed when the brief is approved.
593
+
594
+ [1] clancy:brief (default)
595
+ [2] Enter a different value
596
+ [3] Cancel
597
+ ```
598
+
599
+ If [1]: remove `CLANCY_LABEL_BRIEF` from `.clancy/.env` (uses default).
600
+ If [2]: prompt `What label should /clancy:brief apply?` then write `CLANCY_LABEL_BRIEF=<value>` to `.clancy/.env`. Wrap in double quotes.
601
+
602
+ ---
603
+
604
+ ### [L2] Plan label
605
+
606
+ Only shown when Planner or Strategist is enabled.
607
+
608
+ ```
609
+ Plan label — current: {value or "clancy:plan"}
610
+ Label applied to tickets that need planning. Removed when the plan is approved.
611
+
612
+ [1] clancy:plan (default)
613
+ [2] Enter a different value
614
+ [3] Cancel
615
+ ```
616
+
617
+ If [1]: remove `CLANCY_LABEL_PLAN` from `.clancy/.env` (uses default).
618
+ If [2]: prompt `What label should mark tickets needing planning?` then write `CLANCY_LABEL_PLAN=<value>` to `.clancy/.env`. Wrap in double quotes.
619
+
620
+ ---
621
+
622
+ ### [L3] Build label
623
+
624
+ Only shown when Planner or Strategist is enabled.
625
+
626
+ ```
627
+ Build label — current: {value or "clancy:build"}
628
+ Label applied to tickets ready for implementation. Used by /clancy:once and /clancy:run to filter the queue.
629
+
630
+ [1] clancy:build (default)
631
+ [2] Enter a different value
632
+ [3] Cancel
633
+ ```
634
+
635
+ If [1]: remove `CLANCY_LABEL_BUILD` from `.clancy/.env` (uses default).
636
+ If [2]: prompt `What label should mark tickets ready to build?` then write `CLANCY_LABEL_BUILD=<value>` to `.clancy/.env`. Wrap in double quotes.
637
+
638
+ ---
639
+
542
640
  ### [P1] Plan queue status (Jira only)
543
641
 
544
642
  ```
@@ -677,17 +775,18 @@ If [2]: remove `CLANCY_NOTIFY_WEBHOOK` from `.clancy/.env`.
677
775
 
678
776
  ### [S] Switch board
679
777
 
680
- Show which board is currently active, then offer the other two:
778
+ Show which board is currently active, then offer the others:
681
779
 
682
780
  ```
683
- Switch board — currently: {Jira / GitHub Issues / Linear}
781
+ Switch board — currently: {Jira / GitHub Issues / Linear / Shortcut / Notion / Azure DevOps}
684
782
 
685
783
  [1] {board A}
686
784
  [2] {board B}
687
- [3] Cancel
785
+ ...
786
+ [N] Cancel
688
787
  ```
689
788
 
690
- Only show the two boards that are not currently active. If the user picks Cancel, loop back to the menu without changing anything.
789
+ Only show the boards that are not currently active. If the user picks Cancel, loop back to the menu without changing anything.
691
790
 
692
791
  **Step 1: Collect new credentials**
693
792
 
@@ -713,6 +812,21 @@ Linear — ask in this order:
713
812
  1. `Paste your Linear API key: (create one at linear.app/settings/api)`
714
813
  2. `What's your Linear team ID? (find it at linear.app/settings/teams — click your team, copy the ID from the URL)`
715
814
 
815
+ Shortcut — ask in this order:
816
+ 1. `Paste your Shortcut API token: (create one at app.shortcut.com/settings/account/api-tokens)`
817
+ 2. `What workflow should Clancy use? (press Enter to auto-detect)`
818
+
819
+ Notion — ask in this order:
820
+ 1. `Paste your Notion integration token: (create one at notion.so/my-integrations)`
821
+ 2. `What's your Notion database ID? (32-character hex string from your database URL)`
822
+ 3. `Status property name? [Status]`
823
+ 4. `Assignee property name? [Assignee]`
824
+
825
+ Azure DevOps — ask in this order:
826
+ 1. `What's your Azure DevOps organisation name?`
827
+ 2. `What's your project name?`
828
+ 3. `Paste your Azure DevOps personal access token: (needs Work Items Read & Write scope)`
829
+
716
830
  **Step 2: Verify credentials**
717
831
 
718
832
  Verify the new credentials before making any changes — same checks as the init preflight and doctor workflow. Show the result:
@@ -752,6 +866,9 @@ If no: print `Cancelled. No changes made.` and loop back to the menu.
752
866
  - Jira: `JIRA_BASE_URL`, `JIRA_USER`, `JIRA_API_TOKEN`, `JIRA_PROJECT_KEY`, `CLANCY_JQL_STATUS`, `CLANCY_JQL_SPRINT`
753
867
  - GitHub: `GITHUB_TOKEN`, `GITHUB_REPO`
754
868
  - Linear: `LINEAR_API_KEY`, `LINEAR_TEAM_ID`
869
+ - Shortcut: `SHORTCUT_API_TOKEN`, `SHORTCUT_WORKFLOW`
870
+ - Notion: `NOTION_TOKEN`, `NOTION_DATABASE_ID`, `CLANCY_NOTION_STATUS`, `CLANCY_NOTION_ASSIGNEE`, `CLANCY_NOTION_LABELS`, `CLANCY_NOTION_PARENT`
871
+ - Azure DevOps: `AZDO_ORG`, `AZDO_PROJECT`, `AZDO_PAT`
755
872
  - Git host (all boards): `GITLAB_TOKEN`, `BITBUCKET_USER`, `BITBUCKET_TOKEN`, `CLANCY_GIT_PLATFORM`, `CLANCY_GIT_API_URL`, `CLANCY_STATUS_REVIEW`
756
873
  2. Write the new board credentials to `.clancy/.env`
757
874
  3. If switching to Jira: also ask the status filter question (same as init Q3) and write `CLANCY_JQL_STATUS` to `.clancy/.env`
@@ -161,9 +161,45 @@ This touches:
161
161
  It never modifies:
162
162
  - `.clancy/docs/` — codebase documentation
163
163
  - `.clancy/progress.txt` — progress log
164
- - `.clancy/.env` — credentials
165
164
  - `CLAUDE.md`
166
165
 
166
+ It may **append** to:
167
+ - `.clancy/.env` — adds missing env var defaults (see Step 4a)
168
+
169
+ ---
170
+
171
+ ## Step 4a — Backfill missing env var defaults
172
+
173
+ After the installer finishes, read `.clancy/.env` and check for missing pipeline label variables. These were introduced in v0.7.4 and won't exist in `.env` files from earlier installs.
174
+
175
+ **Check for and append if missing:**
176
+
177
+ ```
178
+ # Pipeline labels (added in v0.7.4)
179
+ CLANCY_LABEL_BRIEF=clancy:brief
180
+ CLANCY_LABEL_PLAN=clancy:plan
181
+ CLANCY_LABEL_BUILD=clancy:build
182
+ ```
183
+
184
+ For each variable:
185
+ 1. Read `.clancy/.env` content
186
+ 2. If the variable name does NOT appear anywhere in the file (not even commented out), append it with its default value
187
+ 3. If the variable already exists (even with a different value), leave it untouched
188
+
189
+ Add a blank line and a `# Pipeline labels (added in v0.7.4)` comment header before the new variables, but only if at least one variable was added.
190
+
191
+ **Display what was added (if any):**
192
+ ```
193
+ 📋 Added missing env var defaults to .clancy/.env:
194
+ CLANCY_LABEL_BRIEF=clancy:brief
195
+ CLANCY_LABEL_PLAN=clancy:plan
196
+ CLANCY_LABEL_BUILD=clancy:build
197
+
198
+ Customise these via /clancy:settings → L1/L2/L3
199
+ ```
200
+
201
+ If nothing was added, display nothing.
202
+
167
203
  ---
168
204
 
169
205
  ## Step 5 — Check for local patches
@@ -218,13 +218,20 @@ Platform-specific pre-creation lookups.
218
218
 
219
219
  ### GitHub
220
220
 
221
+ **Pipeline label for children — this is mandatory, always apply a pipeline label to every child ticket.** Determine which label to use:
222
+ - `--skip-plan` flag → use `CLANCY_LABEL_BUILD` from `.clancy/.env` if set, otherwise `clancy:build`
223
+ - Planner role enabled (`CLANCY_ROLES` includes `planner`) → use `CLANCY_LABEL_PLAN` from `.clancy/.env` if set, otherwise `clancy:plan`
224
+ - Planner role NOT enabled → use `CLANCY_LABEL_BUILD` from `.clancy/.env` if set, otherwise `clancy:build`
225
+ Ensure the label exists on the board (create it if missing), then add it to each child ticket.
226
+
221
227
  **Labels to apply per ticket:**
222
- - `CLANCY_PLAN_LABEL` (default: `needs-refinement`) — planning queue
223
- - `CLANCY_LABEL` (if set) — Clancy identifier
228
+ - The pipeline label determined above (`CLANCY_LABEL_PLAN` or `CLANCY_LABEL_BUILD`) — replaces `CLANCY_LABEL` on children
224
229
  - `component:{CLANCY_COMPONENT}` (if `CLANCY_COMPONENT` set)
225
230
  - `size:{S|M|L}` — from decomposition table
226
231
  - `clancy:afk` or `clancy:hitl` — from Mode column
227
232
 
233
+ Note: `CLANCY_LABEL` is NOT applied to child tickets when pipeline labels are active. The pipeline label (`clancy:plan` or `clancy:build`) serves as the queue identifier.
234
+
228
235
  **Label pre-creation:** For each unique label, attempt to create it on the repo. If it already exists, GitHub returns 422 — ignore that error. If 403 (no admin access), note the label as unavailable.
229
236
 
230
237
  ```bash
@@ -266,7 +273,9 @@ Set CLANCY_BRIEF_ISSUE_TYPE in .clancy/.env.
266
273
  ```
267
274
  Stop.
268
275
 
269
- **Labels:** Jira auto-creates labelsno pre-creation needed. Apply: `CLANCY_LABEL` (if set), `clancy:afk` or `clancy:hitl`.
276
+ **Pipeline label for childrenmandatory, same logic as GitHub.** Use `CLANCY_LABEL_PLAN` or `CLANCY_LABEL_BUILD` from `.clancy/.env` (defaults: `clancy:plan` / `clancy:build`). Always apply to every child ticket.
277
+
278
+ **Labels:** Jira auto-creates labels — no pre-creation needed. Apply: the pipeline label determined above, `clancy:afk` or `clancy:hitl`. `CLANCY_LABEL` is NOT applied to children when pipeline labels are active.
270
279
 
271
280
  **Components:** If `CLANCY_COMPONENT` is set, it maps to the Jira `components` field.
272
281
 
@@ -297,7 +306,9 @@ query {
297
306
  }
298
307
  ```
299
308
 
300
- For each required label (`CLANCY_LABEL`, `component:{CLANCY_COMPONENT}`, `clancy:afk`, `clancy:hitl`): search by exact name. If not found in team labels, check workspace labels:
309
+ **Pipeline label for children — mandatory, same logic as GitHub/Jira.** Use `CLANCY_LABEL_PLAN` or `CLANCY_LABEL_BUILD` from `.clancy/.env` (defaults: `clancy:plan` / `clancy:build`). Always apply to every child ticket.
310
+
311
+ For each required label (the pipeline label, `component:{CLANCY_COMPONENT}`, `clancy:afk`, `clancy:hitl`): search by exact name. `CLANCY_LABEL` is NOT applied to children when pipeline labels are active. If not found in team labels, check workspace labels:
301
312
 
302
313
  ```graphql
303
314
  query {
@@ -370,7 +381,7 @@ curl -s \
370
381
  -d '{
371
382
  "title": "{ticket title}",
372
383
  "body": "Epic: #{parent_number}\n\n## {Title}\n\n{Description}\n\n---\n\n**Parent:** #{parent_number}\n**Brief:** {slug}\n**Size:** {S|M|L}\n\n### Dependencies\n\n{Depends on #NN lines or None}\n\n---\n\n*Created by Clancy from strategic brief.*",
373
- "labels": ["{CLANCY_PLAN_LABEL}", "size:{size}", "clancy:{mode}", ...],
384
+ "labels": ["{PIPELINE_LABEL}", "size:{size}", "clancy:{mode}", ...],
374
385
  "assignees": ["{resolved_username}"]
375
386
  }'
376
387
  ```
@@ -412,7 +423,7 @@ curl -s \
412
423
  },
413
424
  "issuetype": { "name": "{CLANCY_BRIEF_ISSUE_TYPE or Task}" },
414
425
  "parent": { "key": "{PARENT_KEY}" },
415
- "labels": ["{CLANCY_LABEL}", "clancy:{mode}"]
426
+ "labels": ["{PIPELINE_LABEL}", "clancy:{mode}"]
416
427
  }
417
428
  }'
418
429
  ```
@@ -631,6 +642,60 @@ Created by Clancy on {YYYY-MM-DD}.
631
642
 
632
643
  ---
633
644
 
645
+ ## Step 11a — Remove brief label from parent
646
+
647
+ Only if a parent ticket exists AND all tickets were created successfully. Remove the brief label from the parent ticket. Best-effort — warn on failure, never stop.
648
+
649
+ Use `CLANCY_LABEL_BRIEF` from `.clancy/.env` if set, otherwise `clancy:brief`.
650
+
651
+ ### GitHub
652
+
653
+ ```bash
654
+ curl -s \
655
+ -H "Authorization: Bearer $GITHUB_TOKEN" \
656
+ -H "Accept: application/vnd.github+json" \
657
+ -H "X-GitHub-Api-Version: 2022-11-28" \
658
+ -X DELETE \
659
+ "https://api.github.com/repos/$GITHUB_REPO/issues/$PARENT_NUMBER/labels/$(echo $CLANCY_LABEL_BRIEF | jq -Rr @uri)"
660
+ ```
661
+
662
+ Ignore 404 (label may not be present on the parent).
663
+
664
+ ### Jira
665
+
666
+ ```bash
667
+ CURRENT_LABELS=$(curl -s \
668
+ -u "$JIRA_USER:$JIRA_API_TOKEN" \
669
+ -H "Accept: application/json" \
670
+ "$JIRA_BASE_URL/rest/api/3/issue/$PARENT_KEY?fields=labels" | jq -r '.fields.labels')
671
+
672
+ UPDATED_LABELS=$(echo "$CURRENT_LABELS" | jq --arg brief "$CLANCY_LABEL_BRIEF" '[.[] | select(. != $brief)]')
673
+
674
+ curl -s \
675
+ -u "$JIRA_USER:$JIRA_API_TOKEN" \
676
+ -X PUT \
677
+ -H "Content-Type: application/json" \
678
+ "$JIRA_BASE_URL/rest/api/3/issue/$PARENT_KEY" \
679
+ -d "{\"fields\": {\"labels\": $UPDATED_LABELS}}"
680
+ ```
681
+
682
+ ### Linear
683
+
684
+ ```bash
685
+ # Fetch current label IDs on the parent, remove the brief label ID, issueUpdate
686
+ # Use the same pattern as brief.md Step 10a — query labels, filter, update
687
+ ```
688
+
689
+ ### On failure
690
+
691
+ ```
692
+ ⚠️ Could not remove brief label from {PARENT_KEY}. Remove it manually if needed.
693
+ ```
694
+
695
+ Continue — do not stop.
696
+
697
+ ---
698
+
634
699
  ## Step 12 — Display summary
635
700
 
636
701
  Show the final result: