chief-clancy 0.7.1 → 0.7.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
@@ -143,6 +143,9 @@ npx chief-clancy
143
143
 
144
144
  # 6. Go AFK
145
145
  /clancy:run
146
+
147
+ # Fully autonomous (no prompts at any step):
148
+ # /clancy:brief --afk #42 → /clancy:approve-brief --afk → /clancy:run
146
149
  ```
147
150
 
148
151
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chief-clancy",
3
- "version": "0.7.1",
3
+ "version": "0.7.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",
@@ -2,6 +2,9 @@
2
2
 
3
3
  Promote an approved Clancy plan to the ticket description. Accepts an optional ticket key argument (e.g. `/clancy:approve-plan PROJ-123`). When no key is provided, auto-selects the oldest planned-but-unapproved ticket.
4
4
 
5
+ Optional flags:
6
+ - **Skip confirmation:** `--afk` — auto-confirm without prompting (for automation)
7
+
5
8
  @.claude/clancy/workflows/approve-plan.md
6
9
 
7
10
  Follow the approve-plan workflow above. Fetch the plan comment, confirm with the user, append it to the ticket description, and transition the ticket to the implementation queue.
@@ -6,6 +6,7 @@ Accepts optional arguments:
6
6
  - **Batch mode:** `/clancy:plan 3` — plan up to 3 tickets from the queue
7
7
  - **Specific ticket:** `/clancy:plan PROJ-123`, `/clancy:plan #42`, `/clancy:plan ENG-42` — plan a single ticket by key
8
8
  - **Fresh start:** `--fresh` — discard any existing plan and start over
9
+ - **Skip confirmations:** `--afk` — auto-confirm all prompts (for automation)
9
10
 
10
11
  Examples:
11
12
  - `/clancy:plan` — plan 1 ticket from queue
@@ -154,6 +154,8 @@ If the user picks [2], stop: `Cancelled. No changes made.`
154
154
 
155
155
  **If the user already confirmed via auto-select in Step 2, SKIP this step entirely** (avoid double-confirmation).
156
156
 
157
+ **AFK mode:** If running in AFK mode (`--afk` flag or `CLANCY_MODE=afk`), skip the confirmation prompt and auto-confirm. Display the summary for logging purposes but proceed without waiting for input.
158
+
157
159
  Display a summary and ask for confirmation:
158
160
 
159
161
  ```
@@ -166,7 +168,7 @@ Planned: {date from plan}
166
168
  Promote this plan to the ticket description? [Y/n]
167
169
  ```
168
170
 
169
- If the user declines, stop:
171
+ If the user declines (interactive only), stop:
170
172
  ```
171
173
  Cancelled. No changes made.
172
174
  ```
@@ -66,7 +66,7 @@ Parse the arguments passed to the command:
66
66
 
67
67
  If N > 10: `Maximum batch size is 10. Planning 10 tickets.`
68
68
 
69
- If N >= 5: display a confirmation:
69
+ If N >= 5: display a confirmation (skip in AFK mode — `--afk` flag or `CLANCY_MODE=afk`):
70
70
  ```
71
71
  Planning {N} tickets — each requires codebase exploration. Continue? [Y/n]
72
72
  ```
@@ -92,7 +92,7 @@ RESPONSE=$(curl -s \
92
92
 
93
93
  Validate the response:
94
94
  - If `pull_request` field is present (not null): `#{N} is a PR, not an issue.` Stop.
95
- - If `state` is `closed`: warn `Issue #${N} is closed. Plan anyway? [y/N]`
95
+ - If `state` is `closed`: warn `Issue #${N} is closed. Plan anyway? [y/N]` (in AFK mode: skip this ticket — do not plan closed issues unattended)
96
96
 
97
97
  #### Jira — Fetch specific ticket
98
98
 
@@ -104,7 +104,7 @@ RESPONSE=$(curl -s \
104
104
  ```
105
105
 
106
106
  Validate the response:
107
- - If `fields.status.statusCategory.key` is `done`: warn `Ticket is done. Plan anyway? [y/N]`
107
+ - If `fields.status.statusCategory.key` is `done`: warn `Ticket is done. Plan anyway? [y/N]` (in AFK mode: skip this ticket)
108
108
  - If `fields.issuetype.name` is `Epic`: note `This is an epic.` (continue normally)
109
109
 
110
110
  #### Linear — Fetch specific issue
@@ -124,8 +124,8 @@ query {
124
124
 
125
125
  Validate the response:
126
126
  - If `nodes` is empty: `Issue {KEY} not found on Linear.` Stop.
127
- - If `state.type` is `completed`: warn `Issue is completed. Plan anyway? [y/N]`
128
- - If `state.type` is `canceled`: warn `Issue is canceled. Plan anyway? [y/N]`
127
+ - If `state.type` is `completed`: warn `Issue is completed. Plan anyway? [y/N]` (in AFK mode: skip this ticket)
128
+ - If `state.type` is `canceled`: warn `Issue is canceled. Plan anyway? [y/N]` (in AFK mode: skip this ticket)
129
129
 
130
130
  Then skip to Step 3b with this single ticket.
131
131
 
@@ -8,6 +8,7 @@ Accepts optional arguments:
8
8
  - **By ticket:** `/clancy:approve-brief PROJ-123` — approve brief sourced from this ticket
9
9
  - **Set parent:** `--epic PROJ-50` — override or set the parent epic
10
10
  - **Preview:** `--dry-run` — show what would be created without making API calls
11
+ - **Skip confirmation:** `--afk` — auto-confirm without prompting (for automation)
11
12
 
12
13
  Examples:
13
14
  - `/clancy:approve-brief` — auto-select (if only 1 unapproved brief)
@@ -130,7 +130,9 @@ AFK-ready: {X} | Needs human: {Y}
130
130
  Create {N} tickets? [Y/n]
131
131
  ```
132
132
 
133
- If user declines: `Cancelled. No changes made.` Stop.
133
+ **AFK mode:** If running in AFK mode (`--afk` flag OR `CLANCY_MODE=afk`), skip the confirmation prompt and auto-confirm. Display the ticket list for logging purposes but proceed without waiting for input.
134
+
135
+ If user declines (interactive only): `Cancelled. No changes made.` Stop.
134
136
 
135
137
  ---
136
138
 
@@ -50,7 +50,9 @@ Parse the arguments passed to the command. Arguments can appear in any order.
50
50
 
51
51
  ### Input modes
52
52
 
53
- - **No input (no flags that consume arguments):** Interactive mode — prompt `What's the idea?` and parse the response. If the response looks like a ticket reference (`#42`, `PROJ-123`, `ENG-42`), switch to board ticket mode. Otherwise treat as inline text.
53
+ - **No input (no flags that consume arguments):** Interactive mode — but first check for `--afk`:
54
+ - If running in AFK mode (`--afk` flag OR `CLANCY_MODE=afk`): there is no human to answer. Display: `✗ Cannot run /clancy:brief in AFK mode without a ticket or idea. Use: /clancy:brief --afk #42 (GitHub) or PROJ-123 (Jira) or ENG-42 (Linear), or /clancy:brief --afk "Add dark mode", or /clancy:brief 3 (batch mode — implies --afk).` Stop.
55
+ - Otherwise: prompt `What's the idea?` and parse the response. If the response looks like a ticket reference (`#42`, `PROJ-123`, `ENG-42`), switch to board ticket mode. Otherwise treat as inline text.
54
56
  - **Ticket key** (`PROJ-123`, `#42`, `ENG-42`): Board ticket mode — fetch the ticket from the board API. Validate format per platform:
55
57
  - `#N` — valid for GitHub only. If board is Jira or Linear: `The #N format is for GitHub Issues. Use a ticket key like PROJ-123.` Stop.
56
58
  - `PROJ-123` / `ENG-42` (letters-dash-number) — valid for Jira and Linear. If board is GitHub: `Use #N format for GitHub Issues (e.g. #42).` Stop.
@@ -355,7 +357,7 @@ Scan `.clancy/briefs/` for an existing brief matching this idea:
355
357
 
356
358
  1. **Local brief file** — check for `## Feedback` section appended to `.clancy/briefs/{date}-{slug}.md`
357
359
  2. **Companion file** — check for `.clancy/briefs/{date}-{slug}.feedback.md`
358
- 3. **Board comments** (board-sourced only) — find the most recent `Clancy Strategic Brief` comment on the source ticket. Collect all comments posted AFTER it.
360
+ 3. **Board comments** (board-sourced only) — fetch ALL comments on the source ticket. Scan each comment body for the text `Clancy Strategic Brief` (case-insensitive, match anywhere in the body — it may appear as `# Clancy Strategic Brief`, `## Clancy Strategic Brief`, or just the text). The most recent matching comment is the brief. Collect all comments posted AFTER it as feedback.
359
361
 
360
362
  Board comment feedback filtering per platform:
361
363
  - **GitHub:** comments where `created_at` > brief comment's `created_at` AND `user.login` != resolved username (via `GET /user`)
@@ -490,7 +492,7 @@ Using all gathered context (idea, grill output, research findings), generate the
490
492
  - {Specific risk and mitigation strategy}
491
493
 
492
494
  ---
493
- *Generated by [Clancy](https://github.com/Pushedskydiver/clancy). To request changes: comment on the source ticket or add a ## Feedback section to the brief file, then re-run `/clancy:brief` to revise. To approve: `/clancy:approve-brief`. To start over: `/clancy:brief --fresh`.*
495
+ *Generated by [Clancy](https://github.com/Pushedskydiver/clancy). To answer open questions or request changes: comment on the source ticket or add a ## Feedback section to the brief file, then re-run `/clancy:brief` to revise. To approve: `/clancy:approve-brief`. To start over: `/clancy:brief --fresh`.*
494
496
  ```
495
497
 
496
498
  ### Source field format
@@ -518,11 +520,18 @@ Using all gathered context (idea, grill output, research findings), generate the
518
520
 
519
521
  ### Re-brief revision
520
522
 
521
- If revising from feedback (Step 5), prepend a section before Problem Statement:
523
+ If revising from feedback (Step 5):
524
+
525
+ 1. **Cross-reference feedback against Open Questions.** For each Open Question in the existing brief, check if the feedback contains an answer (exact or paraphrased — match by intent, not syntax). Resolved questions move to `## Discovery` with `(Source: human)` tag. Unresolved questions stay in `## Open Questions`.
526
+
527
+ 2. **Apply all other feedback** — changes to scope, goals, decomposition, user stories, etc.
528
+
529
+ 3. **Prepend a section** before Problem Statement:
522
530
 
523
531
  ```markdown
524
532
  ### Changes From Previous Brief
525
- {What feedback was addressed and how the brief changed}
533
+ {What feedback was addressed and how the brief changed.
534
+ List resolved open questions explicitly.}
526
535
  ```
527
536
 
528
537
  ---
@@ -657,27 +666,36 @@ Print the full brief to stdout, followed by the sign-off:
657
666
  ### Next steps (board-sourced)
658
667
 
659
668
  ```
660
- Next steps:
661
- To request changes:
662
- • Comment on {KEY} on your board, then re-run /clancy:brief {KEY} to revise
663
- • Or add a ## Feedback section to the brief file and re-run
664
- To approve: /clancy:approve-brief {KEY}
665
- To start over: /clancy:brief --fresh {KEY}
669
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
670
+ Next Steps
671
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
672
+
673
+ Answer open questions or request changes:
674
+ Comment on {KEY} on your board
675
+ • Or add a ## Feedback section to the brief file
676
+ Then re-run: /clancy:brief {KEY}
677
+
678
+ Approve: /clancy:approve-brief {KEY}
679
+ Start over: /clancy:brief --fresh {KEY}
666
680
  ```
667
681
 
668
682
  ### Next steps (inline text / from file)
669
683
 
670
684
  ```
671
- Next steps:
672
- To request changes:
685
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
686
+ Next Steps
687
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
688
+
689
+ Answer open questions or request changes:
673
690
  • Add a ## Feedback section to:
674
- .clancy/briefs/{date}-{slug}.md
691
+ .clancy/briefs/{date}-{slug}.md
675
692
  • Or create a companion file:
676
- .clancy/briefs/{date}-{slug}.feedback.md
677
- Then re-run /clancy:brief to revise.
678
- To approve: /clancy:approve-brief {slug}
679
- To attach to a parent: /clancy:approve-brief {slug} --epic {KEY}
680
- To start over: /clancy:brief --fresh
693
+ .clancy/briefs/{date}-{slug}.feedback.md
694
+ Then re-run: /clancy:brief
695
+
696
+ Approve: /clancy:approve-brief {slug}
697
+ With parent: /clancy:approve-brief {slug} --epic {KEY}
698
+ Start over: /clancy:brief --fresh
681
699
  ```
682
700
 
683
701
  ---
@@ -726,7 +744,7 @@ Briefs saved to .clancy/briefs/. Run /clancy:approve-brief to create tickets.
726
744
  - The `--list` flag is an inventory display only — no brief generated, no API calls beyond the local filesystem.
727
745
  - Batch mode (`/clancy:brief 3`) implies AI-grill — each ticket is briefed autonomously.
728
746
  - All board API calls are best-effort — if a comment fails to post, print the brief and warn. The local file is the source of truth.
729
- - The `## Clancy Strategic Brief` marker in comments is used by both `/clancy:brief` (to detect existing briefs) and `/clancy:approve-brief` (to find the brief).
747
+ - The `Clancy Strategic Brief` text in comments is the marker used by both `/clancy:brief` (to detect existing briefs and feedback) and `/clancy:approve-brief` (to find the brief). Search case-insensitively and match regardless of heading level (`#`, `##`, or plain text).
730
748
  - Jira uses ADF for comments (with `codeBlock` fallback). GitHub and Linear accept Markdown directly.
731
749
  - Linear personal API keys do NOT use `Bearer` prefix.
732
750
  - Jira uses the new `POST /rest/api/3/search/jql` endpoint (old GET `/search` removed Aug 2025).