chief-clancy 0.2.0-beta.3 → 0.3.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.
- package/README.md +13 -24
- package/dist/installer/file-ops/file-ops.d.ts +32 -0
- package/dist/installer/file-ops/file-ops.d.ts.map +1 -0
- package/dist/installer/file-ops/file-ops.js +58 -0
- package/dist/installer/file-ops/file-ops.js.map +1 -0
- package/dist/installer/hook-installer/hook-installer.d.ts +29 -0
- package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -0
- package/dist/installer/hook-installer/hook-installer.js +96 -0
- package/dist/installer/hook-installer/hook-installer.js.map +1 -0
- package/dist/installer/install.d.ts +3 -0
- package/dist/installer/install.d.ts.map +1 -0
- package/dist/installer/install.js +227 -0
- package/dist/installer/install.js.map +1 -0
- package/dist/installer/manifest/manifest.d.ts +41 -0
- package/dist/installer/manifest/manifest.d.ts.map +1 -0
- package/dist/installer/manifest/manifest.js +97 -0
- package/dist/installer/manifest/manifest.js.map +1 -0
- package/dist/installer/prompts/prompts.d.ts +33 -0
- package/dist/installer/prompts/prompts.d.ts.map +1 -0
- package/dist/installer/prompts/prompts.js +55 -0
- package/dist/installer/prompts/prompts.js.map +1 -0
- package/dist/schemas/env.d.ts +75 -0
- package/dist/schemas/env.d.ts.map +1 -0
- package/dist/schemas/env.js +40 -0
- package/dist/schemas/env.js.map +1 -0
- package/dist/schemas/github.d.ts +27 -0
- package/dist/schemas/github.d.ts.map +1 -0
- package/dist/schemas/github.js +17 -0
- package/dist/schemas/github.js.map +1 -0
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +5 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/jira.d.ts +37 -0
- package/dist/schemas/jira.d.ts.map +1 -0
- package/dist/schemas/jira.js +37 -0
- package/dist/schemas/jira.js.map +1 -0
- package/dist/schemas/linear.d.ts +67 -0
- package/dist/schemas/linear.d.ts.map +1 -0
- package/dist/schemas/linear.js +50 -0
- package/dist/schemas/linear.js.map +1 -0
- package/dist/scripts/afk/afk.d.ts +21 -0
- package/dist/scripts/afk/afk.d.ts.map +1 -0
- package/dist/scripts/afk/afk.js +116 -0
- package/dist/scripts/afk/afk.js.map +1 -0
- package/dist/scripts/board/github/github.d.ts +56 -0
- package/dist/scripts/board/github/github.d.ts.map +1 -0
- package/dist/scripts/board/github/github.js +142 -0
- package/dist/scripts/board/github/github.js.map +1 -0
- package/dist/scripts/board/jira/jira.d.ts +90 -0
- package/dist/scripts/board/jira/jira.d.ts.map +1 -0
- package/dist/scripts/board/jira/jira.js +251 -0
- package/dist/scripts/board/jira/jira.js.map +1 -0
- package/dist/scripts/board/linear/linear.d.ts +85 -0
- package/dist/scripts/board/linear/linear.d.ts.map +1 -0
- package/dist/scripts/board/linear/linear.js +209 -0
- package/dist/scripts/board/linear/linear.js.map +1 -0
- package/dist/scripts/once/once.d.ts +12 -0
- package/dist/scripts/once/once.d.ts.map +1 -0
- package/dist/scripts/once/once.js +323 -0
- package/dist/scripts/once/once.js.map +1 -0
- package/dist/scripts/shared/branch/branch.d.ts +50 -0
- package/dist/scripts/shared/branch/branch.d.ts.map +1 -0
- package/dist/scripts/shared/branch/branch.js +61 -0
- package/dist/scripts/shared/branch/branch.js.map +1 -0
- package/dist/scripts/shared/claude-cli/claude-cli.d.ts +17 -0
- package/dist/scripts/shared/claude-cli/claude-cli.d.ts.map +1 -0
- package/dist/scripts/shared/claude-cli/claude-cli.js +35 -0
- package/dist/scripts/shared/claude-cli/claude-cli.js.map +1 -0
- package/dist/scripts/shared/env-parser/env-parser.d.ts +30 -0
- package/dist/scripts/shared/env-parser/env-parser.d.ts.map +1 -0
- package/dist/scripts/shared/env-parser/env-parser.js +64 -0
- package/dist/scripts/shared/env-parser/env-parser.js.map +1 -0
- package/dist/scripts/shared/env-schema/env-schema.d.ts +27 -0
- package/dist/scripts/shared/env-schema/env-schema.d.ts.map +1 -0
- package/dist/scripts/shared/env-schema/env-schema.js +46 -0
- package/dist/scripts/shared/env-schema/env-schema.js.map +1 -0
- package/dist/scripts/shared/git-ops/git-ops.d.ts +52 -0
- package/dist/scripts/shared/git-ops/git-ops.d.ts.map +1 -0
- package/dist/scripts/shared/git-ops/git-ops.js +107 -0
- package/dist/scripts/shared/git-ops/git-ops.js.map +1 -0
- package/dist/scripts/shared/http/http.d.ts +52 -0
- package/dist/scripts/shared/http/http.d.ts.map +1 -0
- package/dist/scripts/shared/http/http.js +74 -0
- package/dist/scripts/shared/http/http.js.map +1 -0
- package/dist/scripts/shared/notify/notify.d.ts +46 -0
- package/dist/scripts/shared/notify/notify.d.ts.map +1 -0
- package/dist/scripts/shared/notify/notify.js +88 -0
- package/dist/scripts/shared/notify/notify.js.map +1 -0
- package/dist/scripts/shared/preflight/preflight.d.ts +40 -0
- package/dist/scripts/shared/preflight/preflight.d.ts.map +1 -0
- package/dist/scripts/shared/preflight/preflight.js +84 -0
- package/dist/scripts/shared/preflight/preflight.js.map +1 -0
- package/dist/scripts/shared/progress/progress.d.ts +25 -0
- package/dist/scripts/shared/progress/progress.d.ts.map +1 -0
- package/dist/scripts/shared/progress/progress.js +46 -0
- package/dist/scripts/shared/progress/progress.js.map +1 -0
- package/dist/scripts/shared/prompt/prompt.d.ts +38 -0
- package/dist/scripts/shared/prompt/prompt.d.ts.map +1 -0
- package/dist/scripts/shared/prompt/prompt.js +77 -0
- package/dist/scripts/shared/prompt/prompt.js.map +1 -0
- package/dist/types/board.d.ts +13 -0
- package/dist/types/board.d.ts.map +1 -0
- package/dist/types/board.js +5 -0
- package/dist/types/board.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/ansi/ansi.d.ts +55 -0
- package/dist/utils/ansi/ansi.d.ts.map +1 -0
- package/dist/utils/ansi/ansi.js +55 -0
- package/dist/utils/ansi/ansi.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/parse-json/parse-json.d.ts +20 -0
- package/dist/utils/parse-json/parse-json.d.ts.map +1 -0
- package/dist/utils/parse-json/parse-json.js +27 -0
- package/dist/utils/parse-json/parse-json.js.map +1 -0
- package/hooks/clancy-check-update.js +2 -2
- package/hooks/clancy-credential-guard.js +8 -1
- package/package.json +52 -8
- package/registry/boards.json +3 -6
- package/src/templates/CLAUDE.md +1 -1
- package/src/workflows/doctor.md +32 -23
- package/src/workflows/init.md +88 -19
- package/src/workflows/logs.md +13 -6
- package/src/workflows/map-codebase.md +17 -16
- package/src/workflows/once.md +22 -12
- package/src/workflows/review.md +40 -27
- package/src/workflows/run.md +20 -12
- package/src/workflows/scaffold.md +12 -1023
- package/src/workflows/settings.md +9 -6
- package/src/workflows/status.md +17 -8
- package/src/workflows/uninstall.md +11 -6
- package/src/workflows/update.md +13 -11
- package/bin/install.js +0 -362
- package/src/templates/scripts/clancy-afk.sh +0 -111
- package/src/templates/scripts/clancy-once-github.sh +0 -249
- package/src/templates/scripts/clancy-once-linear.sh +0 -320
- package/src/templates/scripts/clancy-once.sh +0 -322
package/src/workflows/doctor.md
CHANGED
|
@@ -4,7 +4,7 @@ Before doing anything else, check for updates:
|
|
|
4
4
|
|
|
5
5
|
1. Run: `npm show chief-clancy version`
|
|
6
6
|
2. Read the installed version from the Clancy `package.json`
|
|
7
|
-
3. If a newer version exists, print:
|
|
7
|
+
3. If a newer version exists, print: `ℹ️ Clancy v{current} → v{latest} available. Run /clancy:update to upgrade.` then continue normally.
|
|
8
8
|
4. If already on latest, continue silently.
|
|
9
9
|
5. If the npm check fails for any reason (offline, network error), continue silently. Never block on this.
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ Diagnose your Clancy setup — test every configured integration and report what
|
|
|
22
22
|
|
|
23
23
|
- Verify Clancy commands are installed (`.claude/commands/clancy/` or `~/.claude/commands/clancy/`)
|
|
24
24
|
- Read installed version from `package.json` in the commands directory
|
|
25
|
-
- Print:
|
|
25
|
+
- Print: `✅ Clancy v{version} installed ({location})`
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
@@ -32,24 +32,23 @@ Test each required binary:
|
|
|
32
32
|
|
|
33
33
|
| Binary | Check | Fix hint |
|
|
34
34
|
|---|---|---|
|
|
35
|
-
| `
|
|
36
|
-
| `curl` | `command -v curl` | Install curl for your OS |
|
|
35
|
+
| `node` | `command -v node` | Install Node.js 22+ |
|
|
37
36
|
| `git` | `command -v git` | Install git for your OS |
|
|
38
37
|
|
|
39
|
-
Print
|
|
38
|
+
Print `✅` or `❌` for each.
|
|
40
39
|
|
|
41
40
|
---
|
|
42
41
|
|
|
43
42
|
## Step 3 — Check project setup
|
|
44
43
|
|
|
45
|
-
- `.clancy/` exists →
|
|
46
|
-
- `.clancy/clancy-once.
|
|
47
|
-
- `.clancy/clancy-afk.
|
|
48
|
-
- `.clancy/.env` exists →
|
|
49
|
-
- `.clancy/docs/` has non-empty files →
|
|
44
|
+
- `.clancy/` exists → `✅ .clancy/ found`
|
|
45
|
+
- `.clancy/clancy-once.js` exists → `✅ clancy-once.js`
|
|
46
|
+
- `.clancy/clancy-afk.js` exists → `✅ clancy-afk.js`
|
|
47
|
+
- `.clancy/.env` exists → `✅ .clancy/.env found`
|
|
48
|
+
- `.clancy/docs/` has non-empty files → `✅ codebase docs present ({N} files)`
|
|
50
49
|
|
|
51
|
-
If `.clancy/` is missing:
|
|
52
|
-
If `.clancy/.env` is missing:
|
|
50
|
+
If `.clancy/` is missing: `❌ .clancy/ not found — run /clancy:init`
|
|
51
|
+
If `.clancy/.env` is missing: `❌ .clancy/.env not found — run /clancy:init`
|
|
53
52
|
|
|
54
53
|
---
|
|
55
54
|
|
|
@@ -78,8 +77,8 @@ Source `.clancy/.env` and detect which board is configured:
|
|
|
78
77
|
|
|
79
78
|
**Figma** — if `FIGMA_API_KEY` is set:
|
|
80
79
|
- Call `GET https://api.figma.com/v1/me` with `X-Figma-Token: $FIGMA_API_KEY`
|
|
81
|
-
- On success: print
|
|
82
|
-
- On 403: print
|
|
80
|
+
- On success: print `✅ Figma connected — {email}`
|
|
81
|
+
- On 403: print `❌ Figma authentication failed. Check FIGMA_API_KEY in .clancy/.env.`
|
|
83
82
|
- Note: Figma's API does not expose plan information — check your plan at figma.com/settings
|
|
84
83
|
|
|
85
84
|
**Playwright** — if `PLAYWRIGHT_ENABLED=true`:
|
|
@@ -97,19 +96,29 @@ Source `.clancy/.env` and detect which board is configured:
|
|
|
97
96
|
## Step 6 — Summary
|
|
98
97
|
|
|
99
98
|
```
|
|
100
|
-
Clancy
|
|
99
|
+
🚨 Clancy — Doctor
|
|
100
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
✓ jq, curl, git — all present
|
|
104
|
-
✓ .clancy/ set up — 10 docs present
|
|
105
|
-
✓ Jira connected — PROJ reachable
|
|
106
|
-
✓ Figma connected — alex@example.com (check plan at figma.com/settings)
|
|
107
|
-
✗ PLAYWRIGHT_STORYBOOK_PORT — not set in .clancy/.env
|
|
102
|
+
{N} checks passed, {N} warnings, {N} failures
|
|
108
103
|
|
|
109
|
-
|
|
104
|
+
✅ Clancy v0.1.0 installed (global)
|
|
105
|
+
✅ node, git — all present
|
|
106
|
+
✅ .clancy/ set up — 10 docs present
|
|
107
|
+
✅ Jira connected — PROJ reachable
|
|
108
|
+
✅ Figma connected — alex@example.com (check plan at figma.com/settings)
|
|
109
|
+
❌ PLAYWRIGHT_STORYBOOK_PORT — not set in .clancy/.env
|
|
110
|
+
|
|
111
|
+
Fix the ❌ items, then run /clancy:once to verify end-to-end.
|
|
112
|
+
|
|
113
|
+
"We've got a 415 in progress — a config disturbance."
|
|
110
114
|
```
|
|
111
115
|
|
|
112
116
|
If all checks pass:
|
|
113
117
|
```
|
|
114
|
-
|
|
118
|
+
🚨 Clancy — Doctor
|
|
119
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
120
|
+
|
|
121
|
+
All {N} checks passed.
|
|
122
|
+
|
|
123
|
+
"Nothing to see here, folks. Move along." — Run /clancy:once to pick up your first ticket.
|
|
115
124
|
```
|
package/src/workflows/init.md
CHANGED
|
@@ -30,20 +30,20 @@ Before proceeding, silently run `command -v` for each required binary:
|
|
|
30
30
|
|
|
31
31
|
| Binary | Install hint |
|
|
32
32
|
|---|---|
|
|
33
|
-
| `
|
|
34
|
-
| `curl` | pre-installed on macOS and most Linux |
|
|
33
|
+
| `node` | Install Node.js 22+ (nodejs.org) |
|
|
35
34
|
| `git` | `brew install git` / `apt install git` |
|
|
35
|
+
| `claude` | `npm install -g @anthropic-ai/claude-code` |
|
|
36
36
|
|
|
37
37
|
If all are present: continue silently.
|
|
38
38
|
|
|
39
39
|
If any are missing, output:
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
-
|
|
42
|
+
⚠️ Missing prerequisites:
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
❌ node — Install Node.js 22+ (nodejs.org)
|
|
45
45
|
|
|
46
|
-
Clancy
|
|
46
|
+
Clancy requires these binaries to run. Install them, then re-run /clancy:init.
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
List only the missing ones. Then stop — do not proceed with setup until prerequisites are satisfied.
|
|
@@ -54,9 +54,16 @@ List only the missing ones. Then stop — do not proceed with setup until prereq
|
|
|
54
54
|
|
|
55
55
|
Output:
|
|
56
56
|
|
|
57
|
+
```
|
|
58
|
+
🚨 Clancy — Init
|
|
59
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
+
|
|
61
|
+
"Chief Wiggum reporting for duty."
|
|
62
|
+
|
|
57
63
|
Clancy pulls tickets from your Kanban board, implements them, commits, and squash-merges — one ticket per run, fresh context every time.
|
|
58
64
|
|
|
59
65
|
Let's get you set up.
|
|
66
|
+
```
|
|
60
67
|
|
|
61
68
|
---
|
|
62
69
|
|
|
@@ -79,13 +86,12 @@ Clancy currently supports Jira, GitHub Issues, and Linear out of the box.
|
|
|
79
86
|
|
|
80
87
|
Your board isn't supported yet — but you can add it:
|
|
81
88
|
· Open an issue: github.com/Pushedskydiver/clancy/issues
|
|
82
|
-
· Contribute one: see CONTRIBUTING.md — adding a board is
|
|
89
|
+
· Contribute one: see CONTRIBUTING.md — adding a board is a TypeScript module + a boards.json entry
|
|
83
90
|
|
|
84
91
|
In the meantime, you can still use Clancy manually:
|
|
85
92
|
· Run /clancy:map-codebase to scan and document your codebase
|
|
86
|
-
·
|
|
87
|
-
·
|
|
88
|
-
· Point clancy-afk.sh at your custom script via CLANCY_ONCE_SCRIPT in .clancy/.env
|
|
93
|
+
· Add `chief-clancy` as a devDependency and implement your board's API module
|
|
94
|
+
· Store credentials in .clancy/.env
|
|
89
95
|
|
|
90
96
|
Do not scaffold anything after this message. Stop completely.
|
|
91
97
|
|
|
@@ -124,6 +130,65 @@ If enter is pressed with no value: skip — omit the label clause entirely (Clan
|
|
|
124
130
|
|
|
125
131
|
---
|
|
126
132
|
|
|
133
|
+
### Q2b: Board credential verification
|
|
134
|
+
|
|
135
|
+
After collecting all credentials for the chosen board, verify the connection before continuing.
|
|
136
|
+
|
|
137
|
+
**Jira** — call `GET {JIRA_BASE_URL}/rest/api/3/project/{JIRA_PROJECT_KEY}` with basic auth (`{JIRA_USER}:{JIRA_API_TOKEN}` base64-encoded in the `Authorization: Basic` header).
|
|
138
|
+
|
|
139
|
+
On success (HTTP 200), show:
|
|
140
|
+
```
|
|
141
|
+
✅ Jira connected — project {JIRA_PROJECT_KEY} reachable.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
On failure, show:
|
|
145
|
+
```
|
|
146
|
+
❌ Couldn't connect to Jira (HTTP {status}).
|
|
147
|
+
Check your credentials in the values you just entered.
|
|
148
|
+
|
|
149
|
+
[1] Re-enter credentials
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If [1]: go back to Q2 and re-ask all Jira questions. If the user wants to abandon setup entirely, they can Ctrl+C.
|
|
153
|
+
|
|
154
|
+
**GitHub Issues** — call `GET https://api.github.com/repos/{GITHUB_REPO}` with `Authorization: Bearer {GITHUB_TOKEN}` and `X-GitHub-Api-Version: 2022-11-28`.
|
|
155
|
+
|
|
156
|
+
On success (HTTP 200), show:
|
|
157
|
+
```
|
|
158
|
+
✅ GitHub connected — {GITHUB_REPO} reachable.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
On failure, show:
|
|
162
|
+
```
|
|
163
|
+
❌ Couldn't connect to GitHub (HTTP {status}).
|
|
164
|
+
Check your token has `repo` scope and the repo name is correct.
|
|
165
|
+
|
|
166
|
+
[1] Re-enter credentials
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
If [1]: go back to Q2 and re-ask all GitHub questions. If the user wants to abandon setup entirely, they can Ctrl+C.
|
|
170
|
+
|
|
171
|
+
**Linear** — call `POST https://api.linear.app/graphql` with `Authorization: {LINEAR_API_KEY}` (no Bearer prefix) and body `{"query": "{ viewer { id name } }"}`.
|
|
172
|
+
|
|
173
|
+
On success (HTTP 200 with `data.viewer`), show:
|
|
174
|
+
```
|
|
175
|
+
✅ Linear connected — {viewer.name}.
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
On failure, show:
|
|
179
|
+
```
|
|
180
|
+
❌ Couldn't connect to Linear.
|
|
181
|
+
Check your API key at linear.app/settings/api.
|
|
182
|
+
|
|
183
|
+
[1] Re-enter credentials
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If [1]: go back to Q2 and re-ask all Linear questions. If the user wants to abandon setup entirely, they can Ctrl+C.
|
|
187
|
+
|
|
188
|
+
Never silently continue with unverified credentials — the user must fix their credentials or exit with Ctrl+C.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
127
192
|
### Q3 (Jira only): Status name
|
|
128
193
|
|
|
129
194
|
Output:
|
|
@@ -134,7 +199,7 @@ Common values: To Do, Selected for Development, Ready, Open
|
|
|
134
199
|
[1] To Do (default)
|
|
135
200
|
[2] Enter a different value
|
|
136
201
|
|
|
137
|
-
Store as `CLANCY_JQL_STATUS` in `.clancy/.env`. Always wrap the value in double quotes — status names often contain spaces (e.g. `CLANCY_JQL_STATUS="Selected for Development"`)
|
|
202
|
+
Store as `CLANCY_JQL_STATUS` in `.clancy/.env`. Always wrap the value in double quotes — status names often contain spaces (e.g. `CLANCY_JQL_STATUS="Selected for Development"`).
|
|
138
203
|
|
|
139
204
|
---
|
|
140
205
|
|
|
@@ -176,9 +241,9 @@ Store the detected (or confirmed) value as `CLANCY_BASE_BRANCH` in `.clancy/.env
|
|
|
176
241
|
|
|
177
242
|
Create `.clancy/` directory and the following:
|
|
178
243
|
|
|
179
|
-
1.
|
|
180
|
-
2. Write
|
|
181
|
-
3.
|
|
244
|
+
1. Ensure `chief-clancy` is installed as a devDependency: `npm install --save-dev chief-clancy` (skip if already installed)
|
|
245
|
+
2. Write `.clancy/clancy-once.js` — use the exact shim content from scaffold.md, do not generate or modify it
|
|
246
|
+
3. Write `.clancy/clancy-afk.js` — use the exact shim content from scaffold.md, do not generate or modify it
|
|
182
247
|
4. Create `.clancy/docs/` with 10 empty template files (UPPERCASE.md with section headings only):
|
|
183
248
|
- STACK.md, INTEGRATIONS.md, ARCHITECTURE.md, CONVENTIONS.md, TESTING.md
|
|
184
249
|
- GIT.md, DESIGN-SYSTEM.md, ACCESSIBILITY.md, DEFINITION-OF-DONE.md, CONCERNS.md
|
|
@@ -198,7 +263,7 @@ Create `.clancy/` directory and the following:
|
|
|
198
263
|
After scaffolding, commit everything created (excluding `.clancy/.env` which contains credentials):
|
|
199
264
|
|
|
200
265
|
```bash
|
|
201
|
-
git add .clancy/clancy-once.
|
|
266
|
+
git add .clancy/clancy-once.js .clancy/clancy-afk.js .clancy/.env.example .clancy/docs/ CLAUDE.md .gitignore
|
|
202
267
|
git commit -m "chore(clancy): initialise — scaffold scripts, docs templates, and config"
|
|
203
268
|
```
|
|
204
269
|
|
|
@@ -240,7 +305,7 @@ If a key is entered:
|
|
|
240
305
|
1. Verify the key by calling `GET https://api.figma.com/v1/me` with `X-Figma-Token: {key}`
|
|
241
306
|
2. On success, show:
|
|
242
307
|
```
|
|
243
|
-
|
|
308
|
+
✅ Figma connected: {email}
|
|
244
309
|
|
|
245
310
|
Note: Figma's API does not expose plan information.
|
|
246
311
|
Clancy uses 3 MCP calls per ticket (metadata, design context, screenshot).
|
|
@@ -252,7 +317,7 @@ If a key is entered:
|
|
|
252
317
|
|
|
253
318
|
If `GET /v1/me` fails (non-200), show:
|
|
254
319
|
```
|
|
255
|
-
|
|
320
|
+
❌ Couldn't verify Figma API key (HTTP {status}).
|
|
256
321
|
Double-check it at figma.com/settings → Personal access tokens.
|
|
257
322
|
|
|
258
323
|
[1] Try a different key
|
|
@@ -413,11 +478,15 @@ If no: output "Run /clancy:map-codebase when you're ready." then continue to fin
|
|
|
413
478
|
|
|
414
479
|
Output:
|
|
415
480
|
|
|
416
|
-
|
|
481
|
+
```
|
|
482
|
+
╔═══════════════════════════════════════════════════════════╗
|
|
483
|
+
║ ✅ Clancy is ready. ║
|
|
484
|
+
╚═══════════════════════════════════════════════════════════╝
|
|
417
485
|
|
|
418
|
-
- Scripts: `.clancy/clancy-once.
|
|
486
|
+
- Scripts: `.clancy/clancy-once.js`, `.clancy/clancy-afk.js`
|
|
419
487
|
- Docs: `.clancy/docs/` (10 files)
|
|
420
488
|
- Config: `.clancy/.env`
|
|
421
489
|
- CLAUDE.md: updated
|
|
422
490
|
|
|
423
|
-
Run
|
|
491
|
+
"Clancy's on the beat." — Run /clancy:dry-run to preview, /clancy:once to pick up a ticket, or /clancy:run to process the queue.
|
|
492
|
+
```
|
package/src/workflows/logs.md
CHANGED
|
@@ -10,7 +10,12 @@ Read `.clancy/progress.txt` and present a formatted summary.
|
|
|
10
10
|
|
|
11
11
|
If `.clancy/progress.txt` does not exist:
|
|
12
12
|
```
|
|
13
|
-
|
|
13
|
+
🚨 Clancy — Logs
|
|
14
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
15
|
+
|
|
16
|
+
No progress logged yet.
|
|
17
|
+
|
|
18
|
+
"The law is powerless to help you... but not for long." — Run /clancy:once or /clancy:run to get started.
|
|
14
19
|
```
|
|
15
20
|
Stop.
|
|
16
21
|
|
|
@@ -43,15 +48,16 @@ If only 1–3 DONE entries: show a flat list, skip grouping.
|
|
|
43
48
|
If 4+ entries, show the full grouped display:
|
|
44
49
|
|
|
45
50
|
```
|
|
46
|
-
Clancy
|
|
47
|
-
|
|
51
|
+
🚨 Clancy — Logs
|
|
52
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
53
|
+
|
|
48
54
|
Total tickets completed: {count}
|
|
49
55
|
First run: {YYYY-MM-DD}
|
|
50
56
|
Latest run: {YYYY-MM-DD}
|
|
51
57
|
|
|
52
58
|
This week ({Mon date}–{Sun date or today}):
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
✅ {TICKET-KEY} {Summary}
|
|
60
|
+
✅ {TICKET-KEY} {Summary}
|
|
55
61
|
...
|
|
56
62
|
|
|
57
63
|
By epic:
|
|
@@ -59,9 +65,10 @@ By epic:
|
|
|
59
65
|
{EPIC-KEY} {Epic name or prefix} {bar} {count} tickets
|
|
60
66
|
(other) {bar} {count} tickets
|
|
61
67
|
|
|
68
|
+
Reviews run: {N}
|
|
62
69
|
Full log: .clancy/progress.txt
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
"The law is powerless to help you, but here's what Clancy's done."
|
|
65
72
|
```
|
|
66
73
|
|
|
67
74
|
### Display rules
|
|
@@ -43,12 +43,16 @@ Each agent is defined in `src/agents/`. Pass the agent the full path to the docs
|
|
|
43
43
|
|
|
44
44
|
Tell the user agents are running:
|
|
45
45
|
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
🚨 Clancy — Map Codebase
|
|
47
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
48
|
+
|
|
49
|
+
"Sending in the task force..." — 5 agents deployed.
|
|
50
|
+
|
|
51
|
+
🔍 tech → STACK.md, INTEGRATIONS.md
|
|
52
|
+
🔍 arch → ARCHITECTURE.md
|
|
53
|
+
🔍 quality → CONVENTIONS.md, TESTING.md, GIT.md, DEFINITION-OF-DONE.md
|
|
54
|
+
🔍 design → DESIGN-SYSTEM.md, ACCESSIBILITY.md
|
|
55
|
+
🔍 concerns → CONCERNS.md
|
|
52
56
|
```
|
|
53
57
|
|
|
54
58
|
---
|
|
@@ -57,11 +61,11 @@ Scanning codebase with 5 parallel agents...
|
|
|
57
61
|
|
|
58
62
|
Each agent returns a brief confirmation when done. Display as they complete:
|
|
59
63
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
✅ tech agent complete
|
|
65
|
+
✅ arch agent complete
|
|
66
|
+
✅ quality agent complete
|
|
67
|
+
✅ design agent complete
|
|
68
|
+
✅ concerns agent complete
|
|
65
69
|
```
|
|
66
70
|
|
|
67
71
|
---
|
|
@@ -102,12 +106,9 @@ git commit -m "docs(clancy): map codebase — generate .clancy/docs/"
|
|
|
102
106
|
## Step 7 — Final message
|
|
103
107
|
|
|
104
108
|
```
|
|
105
|
-
Codebase mapped
|
|
106
|
-
|
|
107
|
-
Docs written to .clancy/docs/ (10 files)
|
|
109
|
+
✅ Codebase mapped — 10 files written to .clancy/docs/
|
|
108
110
|
|
|
109
|
-
Run /clancy:once to pick up your first ticket.
|
|
110
|
-
Run /clancy:run to process the full queue.
|
|
111
|
+
"Case closed. All files accounted for." — Run /clancy:once to pick up your first ticket, or /clancy:run to process the queue.
|
|
111
112
|
```
|
|
112
113
|
|
|
113
114
|
---
|
package/src/workflows/once.md
CHANGED
|
@@ -4,7 +4,7 @@ Before doing anything else, check for updates:
|
|
|
4
4
|
|
|
5
5
|
1. Run: `npm show chief-clancy version`
|
|
6
6
|
2. Read the installed version from the Clancy `package.json`
|
|
7
|
-
3. If a newer version exists, print:
|
|
7
|
+
3. If a newer version exists, print: `ℹ️ Clancy v{current} → v{latest} available. Run /clancy:update to upgrade.` then continue normally.
|
|
8
8
|
4. If already on latest, continue silently.
|
|
9
9
|
5. If the npm check fails for any reason (offline, network error), continue silently. Never block on this.
|
|
10
10
|
|
|
@@ -32,12 +32,12 @@ Pick up exactly one ticket from the Kanban board, implement it, commit, squash-m
|
|
|
32
32
|
```
|
|
33
33
|
Stop.
|
|
34
34
|
|
|
35
|
-
3. The script to run is always `.clancy/clancy-once.
|
|
36
|
-
`/clancy:init` copies the correct board variant as `clancy-once.
|
|
35
|
+
3. The script to run is always `.clancy/clancy-once.js` regardless of board.
|
|
36
|
+
`/clancy:init` copies the correct board variant as `clancy-once.js` during setup.
|
|
37
37
|
|
|
38
|
-
4. Check `.clancy/clancy-once.
|
|
38
|
+
4. Check `.clancy/clancy-once.js` exists. If not:
|
|
39
39
|
```
|
|
40
|
-
.clancy/clancy-once.
|
|
40
|
+
.clancy/clancy-once.js not found. Run /clancy:init to scaffold scripts.
|
|
41
41
|
```
|
|
42
42
|
Stop.
|
|
43
43
|
|
|
@@ -51,24 +51,30 @@ Check if the user passed `--dry-run` as an argument to the slash command.
|
|
|
51
51
|
|
|
52
52
|
Display:
|
|
53
53
|
```
|
|
54
|
-
|
|
54
|
+
🚨 Clancy — Once
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
|
|
57
|
+
"I'm on the case." — Running for one ticket.
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
Execute:
|
|
58
61
|
```bash
|
|
59
|
-
|
|
62
|
+
node .clancy/clancy-once.js
|
|
60
63
|
```
|
|
61
64
|
|
|
62
65
|
**With `--dry-run`:**
|
|
63
66
|
|
|
64
67
|
Display:
|
|
65
68
|
```
|
|
66
|
-
|
|
69
|
+
🚨 Clancy — Dry Run
|
|
70
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
71
|
+
|
|
72
|
+
"Just a routine patrol." — Running in dry-run mode, no changes will be made.
|
|
67
73
|
```
|
|
68
74
|
|
|
69
75
|
Execute:
|
|
70
76
|
```bash
|
|
71
|
-
|
|
77
|
+
node .clancy/clancy-once.js --dry-run
|
|
72
78
|
```
|
|
73
79
|
|
|
74
80
|
Stream output directly — do not buffer or summarise.
|
|
@@ -79,13 +85,16 @@ Stream output directly — do not buffer or summarise.
|
|
|
79
85
|
|
|
80
86
|
On success, echo the result line from the script output:
|
|
81
87
|
```
|
|
82
|
-
|
|
88
|
+
✅ {TICKET-KEY} complete.
|
|
89
|
+
|
|
90
|
+
"That's some fine police work there, Lou."
|
|
83
91
|
```
|
|
84
92
|
|
|
85
93
|
On failure:
|
|
86
94
|
```
|
|
87
|
-
Clancy stopped. See output above for details.
|
|
88
|
-
|
|
95
|
+
❌ Clancy stopped. See output above for details.
|
|
96
|
+
|
|
97
|
+
"Looks like we've got ourselves a 23-19." — Run /clancy:status to check the board, or /clancy:review to inspect the ticket.
|
|
89
98
|
```
|
|
90
99
|
|
|
91
100
|
---
|
|
@@ -94,3 +103,4 @@ Run /clancy:status to check the board, or /clancy:review to inspect the ticket.
|
|
|
94
103
|
|
|
95
104
|
- Do not loop. This command runs the script exactly once and stops.
|
|
96
105
|
- Do not attempt to run scripts from `src/templates/` — only scripts in `.clancy/`.
|
|
106
|
+
- The JS shim imports from the installed `chief-clancy` package — ensure it's installed as a devDependency.
|
package/src/workflows/review.md
CHANGED
|
@@ -14,9 +14,9 @@ Same as status workflow. Check `.clancy/`, `.clancy/.env`, and board credentials
|
|
|
14
14
|
|
|
15
15
|
## Step 2 — Fetch next ticket
|
|
16
16
|
|
|
17
|
-
Detect board from `.clancy/.env` and fetch with `maxResults=1`. The query must match
|
|
17
|
+
Detect board from `.clancy/.env` and fetch with `maxResults=1`. The query must match the once-runner exactly — what review shows is what run would pick up.
|
|
18
18
|
|
|
19
|
-
**Jira:** Build JQL using the same clauses as
|
|
19
|
+
**Jira:** Build JQL using the same clauses as the once-runner:
|
|
20
20
|
- Sprint clause: include `AND sprint in openSprints()` if `CLANCY_JQL_SPRINT` is set
|
|
21
21
|
- Label clause: include `AND labels = "$CLANCY_LABEL"` if `CLANCY_LABEL` is set
|
|
22
22
|
- `CLANCY_JQL_STATUS` defaults to `To Do` if not set
|
|
@@ -43,7 +43,12 @@ Fetch full ticket content: summary, description (full text), acceptance criteria
|
|
|
43
43
|
|
|
44
44
|
If no tickets found:
|
|
45
45
|
```
|
|
46
|
+
🚨 Clancy — Review
|
|
47
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
48
|
+
|
|
46
49
|
No tickets in the queue. Nothing to review.
|
|
50
|
+
|
|
51
|
+
"Quiet. Too quiet." — Check your board or run /clancy:status.
|
|
47
52
|
```
|
|
48
53
|
Stop.
|
|
49
54
|
|
|
@@ -108,43 +113,51 @@ Bad: "Ensure design specs are provided"
|
|
|
108
113
|
## Step 5 — Display output
|
|
109
114
|
|
|
110
115
|
```
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Confidence: {score}% — {band label}
|
|
116
|
+
🚨 Clancy — Review
|
|
114
117
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
115
118
|
|
|
119
|
+
[{TICKET-KEY}] {Summary}
|
|
120
|
+
|
|
121
|
+
Confidence: {score}% — {badge} {band label}
|
|
122
|
+
|
|
116
123
|
{for each criterion:}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
✅ {criterion name} — {pass reason}
|
|
125
|
+
⚠️ {criterion name} — {warn reason}
|
|
126
|
+
→ {specific recommendation}
|
|
127
|
+
❌ {criterion name} — {fail reason}
|
|
128
|
+
→ {specific recommendation}
|
|
129
|
+
|
|
130
|
+
{verdict line}
|
|
131
|
+
|
|
132
|
+
{sign-off quote}
|
|
125
133
|
```
|
|
126
134
|
|
|
127
135
|
### Confidence bands
|
|
128
136
|
|
|
129
|
-
| Score | Label | Verdict action |
|
|
130
|
-
|
|
131
|
-
| 85–100% | Ready | "Run with confidence." |
|
|
132
|
-
| 65–84% | Good to go with caveats | "Review the warnings above, then run /clancy:once." |
|
|
133
|
-
| 40–64% | Needs work | "Address the
|
|
134
|
-
| 0–39% | Not ready | "This ticket needs significant rework before Clancy can implement it reliably." |
|
|
137
|
+
| Score | Badge | Label | Verdict action |
|
|
138
|
+
|---|---|---|---|
|
|
139
|
+
| 85–100% | 🟢 | Ready | "Run with confidence." |
|
|
140
|
+
| 65–84% | 🟡 | Good to go with caveats | "Review the warnings above, then run /clancy:once." |
|
|
141
|
+
| 40–64% | 🟠 | Needs work | "Address the ❌ items in the ticket, then re-run /clancy:review." |
|
|
142
|
+
| 0–39% | 🔴 | Not ready | "This ticket needs significant rework before Clancy can implement it reliably." |
|
|
135
143
|
|
|
136
144
|
**Executability override:** If criterion 7 (Clancy executability) scores Fail, ignore the calculated band and show:
|
|
137
145
|
```
|
|
138
|
-
Verdict: Not ready for Clancy
|
|
139
|
-
|
|
140
|
-
|
|
146
|
+
🔴 Verdict: Not ready for Clancy
|
|
147
|
+
This ticket requires work outside the codebase — Clancy can only implement code changes.
|
|
148
|
+
Update the ticket to focus on the codebase side, or remove it from the queue.
|
|
149
|
+
|
|
150
|
+
"This is Papa Bear. Put out an APB for a better ticket spec."
|
|
141
151
|
```
|
|
142
152
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
-
|
|
153
|
+
### Sign-off quotes per band
|
|
154
|
+
|
|
155
|
+
Append a Wiggum-themed quote after the verdict to add personality. Never suggest bypassing the review on low-confidence tickets:
|
|
156
|
+
|
|
157
|
+
- **🟢 Ready:** `"Bake 'em away, toys." — Run /clancy:once to pick it up.`
|
|
158
|
+
- **🟡 Good to go:** `"I'd rather let Herman go. I don't think we've got enough to nail him." — Fix the warnings, then run /clancy:once.`
|
|
159
|
+
- **🟠 Needs work:** `"Uh, no. You got the wrong number. This is 9-1... 2." — Update the ticket, then re-run /clancy:review.`
|
|
160
|
+
- **🔴 Not ready:** `"This is Papa Bear. Put out an APB for a better ticket spec." — Rework the ticket first.`
|
|
148
161
|
|
|
149
162
|
---
|
|
150
163
|
|
package/src/workflows/run.md
CHANGED
|
@@ -4,7 +4,7 @@ Before doing anything else, check for updates:
|
|
|
4
4
|
|
|
5
5
|
1. Run: `npm show chief-clancy version`
|
|
6
6
|
2. Read the installed version from the Clancy `package.json`
|
|
7
|
-
3. If a newer version exists, print:
|
|
7
|
+
3. If a newer version exists, print: `ℹ️ Clancy v{current} → v{latest} available. Run /clancy:update to upgrade.` then continue normally.
|
|
8
8
|
4. If already on latest, continue silently.
|
|
9
9
|
5. If the npm check fails for any reason (offline, network error), continue silently. Never block on this.
|
|
10
10
|
|
|
@@ -28,14 +28,17 @@ The command may be invoked as `/clancy:run` or `/clancy:run N` where N is a posi
|
|
|
28
28
|
If the resolved value of `MAX_ITERATIONS` is **10 or greater**, show a warning before continuing:
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
|
|
31
|
+
🚨 Clancy — Run
|
|
32
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
33
|
+
|
|
34
|
+
⚠️ You're about to run Clancy for up to {N} tickets.
|
|
32
35
|
|
|
33
36
|
At rough estimates per ticket (Sonnet):
|
|
34
37
|
Simple tickets ~$0.25–$0.75 each → up to ~${low} total
|
|
35
38
|
Complex tickets ~$2.00–$5.00 each → up to ~${high} total
|
|
36
39
|
|
|
37
|
-
Mistakes compound
|
|
38
|
-
Consider
|
|
40
|
+
"Slow down there, cowboy..." — Mistakes compound. If Claude misreads a ticket, it will do so {N} times.
|
|
41
|
+
Consider /clancy:once or a smaller run to validate first.
|
|
39
42
|
|
|
40
43
|
Continue with {N} tickets? [Y/n]
|
|
41
44
|
```
|
|
@@ -72,9 +75,9 @@ If the user types `n` or `N`: print `Cancelled.` and stop. Any other input (incl
|
|
|
72
75
|
```
|
|
73
76
|
Stop.
|
|
74
77
|
|
|
75
|
-
4. Check `.clancy/clancy-afk.
|
|
78
|
+
4. Check `.clancy/clancy-afk.js` exists. If not:
|
|
76
79
|
```
|
|
77
|
-
.clancy/clancy-afk.
|
|
80
|
+
.clancy/clancy-afk.js not found. Run /clancy:init to scaffold scripts.
|
|
78
81
|
```
|
|
79
82
|
Stop.
|
|
80
83
|
|
|
@@ -82,9 +85,12 @@ If the user types `n` or `N`: print `Cancelled.` and stop. Any other input (incl
|
|
|
82
85
|
|
|
83
86
|
## Step 3 — Start
|
|
84
87
|
|
|
85
|
-
Display:
|
|
88
|
+
Display (only if the high-iteration warning was not already shown):
|
|
86
89
|
```
|
|
87
|
-
|
|
90
|
+
🚨 Clancy — Run
|
|
91
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
92
|
+
|
|
93
|
+
"All right, let's do this." — Processing up to {N} ticket(s). Ctrl+C to stop early.
|
|
88
94
|
```
|
|
89
95
|
|
|
90
96
|
---
|
|
@@ -93,7 +99,7 @@ Starting Clancy — will process up to {N} ticket(s). Ctrl+C to stop early.
|
|
|
93
99
|
|
|
94
100
|
Execute:
|
|
95
101
|
```bash
|
|
96
|
-
MAX_ITERATIONS={N}
|
|
102
|
+
MAX_ITERATIONS={N} node .clancy/clancy-afk.js
|
|
97
103
|
```
|
|
98
104
|
|
|
99
105
|
Stream output directly — do not buffer or summarise.
|
|
@@ -104,10 +110,11 @@ Stream output directly — do not buffer or summarise.
|
|
|
104
110
|
|
|
105
111
|
When the script exits, echo the final summary line from the output.
|
|
106
112
|
|
|
107
|
-
If `clancy-afk.
|
|
113
|
+
If `clancy-afk.js` exits with a non-zero status:
|
|
108
114
|
```
|
|
109
|
-
Clancy stopped with an error. Check the output above.
|
|
110
|
-
|
|
115
|
+
❌ Clancy stopped with an error. Check the output above.
|
|
116
|
+
|
|
117
|
+
"Looks like we've got ourselves a 23-19." — Run /clancy:once for more detail on the next ticket.
|
|
111
118
|
```
|
|
112
119
|
|
|
113
120
|
---
|
|
@@ -117,3 +124,4 @@ Run /clancy:once for more detail on the next ticket.
|
|
|
117
124
|
- The `N` argument is session-only. It never modifies `.clancy/.env`.
|
|
118
125
|
- If the user wants to permanently change their default, they edit `.clancy/.env` directly or re-run `/clancy:init` advanced setup.
|
|
119
126
|
- Do not attempt to run scripts from `src/templates/` — only run scripts in `.clancy/`.
|
|
127
|
+
- The JS shims import from the installed `chief-clancy` package — ensure it's installed as a devDependency.
|