@chief-clancy/terminal 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/hooks/clancy-branch-guard.js +1 -0
  4. package/dist/hooks/clancy-check-update.js +2 -0
  5. package/dist/hooks/clancy-context-monitor.js +9 -0
  6. package/dist/hooks/clancy-credential-guard.js +2 -0
  7. package/dist/hooks/clancy-drift-detector.js +1 -0
  8. package/dist/hooks/clancy-notification.js +1 -0
  9. package/dist/hooks/clancy-post-compact.js +2 -0
  10. package/dist/hooks/clancy-statusline.js +1 -0
  11. package/dist/index.d.ts +24 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +23 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/installer/file-ops/file-ops.d.ts +35 -0
  16. package/dist/installer/file-ops/file-ops.d.ts.map +1 -0
  17. package/dist/installer/file-ops/file-ops.js +95 -0
  18. package/dist/installer/file-ops/file-ops.js.map +1 -0
  19. package/dist/installer/file-ops/index.d.ts +2 -0
  20. package/dist/installer/file-ops/index.d.ts.map +1 -0
  21. package/dist/installer/file-ops/index.js +2 -0
  22. package/dist/installer/file-ops/index.js.map +1 -0
  23. package/dist/installer/hook-installer/hook-installer.d.ts +22 -0
  24. package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -0
  25. package/dist/installer/hook-installer/hook-installer.js +213 -0
  26. package/dist/installer/hook-installer/hook-installer.js.map +1 -0
  27. package/dist/installer/hook-installer/index.d.ts +2 -0
  28. package/dist/installer/hook-installer/index.d.ts.map +1 -0
  29. package/dist/installer/hook-installer/index.js +2 -0
  30. package/dist/installer/hook-installer/index.js.map +1 -0
  31. package/dist/installer/install/index.d.ts +3 -0
  32. package/dist/installer/install/index.d.ts.map +1 -0
  33. package/dist/installer/install/index.js +2 -0
  34. package/dist/installer/install/index.js.map +1 -0
  35. package/dist/installer/install/install.d.ts +124 -0
  36. package/dist/installer/install/install.d.ts.map +1 -0
  37. package/dist/installer/install/install.js +255 -0
  38. package/dist/installer/install/install.js.map +1 -0
  39. package/dist/installer/manifest/index.d.ts +2 -0
  40. package/dist/installer/manifest/index.d.ts.map +1 -0
  41. package/dist/installer/manifest/index.js +2 -0
  42. package/dist/installer/manifest/index.js.map +1 -0
  43. package/dist/installer/manifest/manifest.d.ts +46 -0
  44. package/dist/installer/manifest/manifest.d.ts.map +1 -0
  45. package/dist/installer/manifest/manifest.js +180 -0
  46. package/dist/installer/manifest/manifest.js.map +1 -0
  47. package/dist/installer/prompts/index.d.ts +2 -0
  48. package/dist/installer/prompts/index.d.ts.map +1 -0
  49. package/dist/installer/prompts/index.js +2 -0
  50. package/dist/installer/prompts/index.js.map +1 -0
  51. package/dist/installer/prompts/prompts.d.ts +34 -0
  52. package/dist/installer/prompts/prompts.d.ts.map +1 -0
  53. package/dist/installer/prompts/prompts.js +28 -0
  54. package/dist/installer/prompts/prompts.js.map +1 -0
  55. package/dist/installer/role-filter/index.d.ts +2 -0
  56. package/dist/installer/role-filter/index.d.ts.map +1 -0
  57. package/dist/installer/role-filter/index.js +2 -0
  58. package/dist/installer/role-filter/index.js.map +1 -0
  59. package/dist/installer/role-filter/role-filter.d.ts +33 -0
  60. package/dist/installer/role-filter/role-filter.d.ts.map +1 -0
  61. package/dist/installer/role-filter/role-filter.js +91 -0
  62. package/dist/installer/role-filter/role-filter.js.map +1 -0
  63. package/dist/installer/shared/fs-errors/fs-errors.d.ts +3 -0
  64. package/dist/installer/shared/fs-errors/fs-errors.d.ts.map +1 -0
  65. package/dist/installer/shared/fs-errors/fs-errors.js +7 -0
  66. package/dist/installer/shared/fs-errors/fs-errors.js.map +1 -0
  67. package/dist/installer/shared/fs-errors/index.d.ts +2 -0
  68. package/dist/installer/shared/fs-errors/index.d.ts.map +1 -0
  69. package/dist/installer/shared/fs-errors/index.js +2 -0
  70. package/dist/installer/shared/fs-errors/index.js.map +1 -0
  71. package/dist/installer/shared/fs-guards/fs-guards.d.ts +3 -0
  72. package/dist/installer/shared/fs-guards/fs-guards.d.ts.map +1 -0
  73. package/dist/installer/shared/fs-guards/fs-guards.js +18 -0
  74. package/dist/installer/shared/fs-guards/fs-guards.js.map +1 -0
  75. package/dist/installer/shared/fs-guards/index.d.ts +2 -0
  76. package/dist/installer/shared/fs-guards/index.d.ts.map +1 -0
  77. package/dist/installer/shared/fs-guards/index.js +2 -0
  78. package/dist/installer/shared/fs-guards/index.js.map +1 -0
  79. package/dist/installer/shared/type-guards/index.d.ts +2 -0
  80. package/dist/installer/shared/type-guards/index.d.ts.map +1 -0
  81. package/dist/installer/shared/type-guards/index.js +2 -0
  82. package/dist/installer/shared/type-guards/index.js.map +1 -0
  83. package/dist/installer/shared/type-guards/type-guards.d.ts +8 -0
  84. package/dist/installer/shared/type-guards/type-guards.d.ts.map +1 -0
  85. package/dist/installer/shared/type-guards/type-guards.js +10 -0
  86. package/dist/installer/shared/type-guards/type-guards.js.map +1 -0
  87. package/dist/installer/ui/index.d.ts +2 -0
  88. package/dist/installer/ui/index.d.ts.map +1 -0
  89. package/dist/installer/ui/index.js +2 -0
  90. package/dist/installer/ui/index.js.map +1 -0
  91. package/dist/installer/ui/ui.d.ts +23 -0
  92. package/dist/installer/ui/ui.d.ts.map +1 -0
  93. package/dist/installer/ui/ui.js +121 -0
  94. package/dist/installer/ui/ui.js.map +1 -0
  95. package/dist/runner/autopilot/autopilot.d.ts +71 -0
  96. package/dist/runner/autopilot/autopilot.d.ts.map +1 -0
  97. package/dist/runner/autopilot/autopilot.js +206 -0
  98. package/dist/runner/autopilot/autopilot.js.map +1 -0
  99. package/dist/runner/autopilot/index.d.ts +2 -0
  100. package/dist/runner/autopilot/index.d.ts.map +1 -0
  101. package/dist/runner/autopilot/index.js +2 -0
  102. package/dist/runner/autopilot/index.js.map +1 -0
  103. package/dist/runner/cli-bridge/cli-bridge.d.ts +34 -0
  104. package/dist/runner/cli-bridge/cli-bridge.d.ts.map +1 -0
  105. package/dist/runner/cli-bridge/cli-bridge.js +53 -0
  106. package/dist/runner/cli-bridge/cli-bridge.js.map +1 -0
  107. package/dist/runner/cli-bridge/index.d.ts +2 -0
  108. package/dist/runner/cli-bridge/index.d.ts.map +1 -0
  109. package/dist/runner/cli-bridge/index.js +2 -0
  110. package/dist/runner/cli-bridge/index.js.map +1 -0
  111. package/dist/runner/dep-factory/deliver-phase.d.ts +24 -0
  112. package/dist/runner/dep-factory/deliver-phase.d.ts.map +1 -0
  113. package/dist/runner/dep-factory/deliver-phase.js +57 -0
  114. package/dist/runner/dep-factory/deliver-phase.js.map +1 -0
  115. package/dist/runner/dep-factory/dep-factory.d.ts +38 -0
  116. package/dist/runner/dep-factory/dep-factory.d.ts.map +1 -0
  117. package/dist/runner/dep-factory/dep-factory.js +193 -0
  118. package/dist/runner/dep-factory/dep-factory.js.map +1 -0
  119. package/dist/runner/dep-factory/index.d.ts +2 -0
  120. package/dist/runner/dep-factory/index.d.ts.map +1 -0
  121. package/dist/runner/dep-factory/index.js +2 -0
  122. package/dist/runner/dep-factory/index.js.map +1 -0
  123. package/dist/runner/dep-factory/invoke-phase.d.ts +20 -0
  124. package/dist/runner/dep-factory/invoke-phase.d.ts.map +1 -0
  125. package/dist/runner/dep-factory/invoke-phase.js +45 -0
  126. package/dist/runner/dep-factory/invoke-phase.js.map +1 -0
  127. package/dist/runner/implement/implement.d.ts +38 -0
  128. package/dist/runner/implement/implement.d.ts.map +1 -0
  129. package/dist/runner/implement/implement.js +61 -0
  130. package/dist/runner/implement/implement.js.map +1 -0
  131. package/dist/runner/implement/index.d.ts +2 -0
  132. package/dist/runner/implement/index.d.ts.map +1 -0
  133. package/dist/runner/implement/index.js +2 -0
  134. package/dist/runner/implement/index.js.map +1 -0
  135. package/dist/runner/notify/index.d.ts +2 -0
  136. package/dist/runner/notify/index.d.ts.map +1 -0
  137. package/dist/runner/notify/index.js +2 -0
  138. package/dist/runner/notify/index.js.map +1 -0
  139. package/dist/runner/notify/notify.d.ts +49 -0
  140. package/dist/runner/notify/notify.d.ts.map +1 -0
  141. package/dist/runner/notify/notify.js +90 -0
  142. package/dist/runner/notify/notify.js.map +1 -0
  143. package/dist/runner/prompt-builder/index.d.ts +2 -0
  144. package/dist/runner/prompt-builder/index.d.ts.map +1 -0
  145. package/dist/runner/prompt-builder/index.js +2 -0
  146. package/dist/runner/prompt-builder/index.js.map +1 -0
  147. package/dist/runner/prompt-builder/prompt-builder.d.ts +53 -0
  148. package/dist/runner/prompt-builder/prompt-builder.d.ts.map +1 -0
  149. package/dist/runner/prompt-builder/prompt-builder.js +122 -0
  150. package/dist/runner/prompt-builder/prompt-builder.js.map +1 -0
  151. package/dist/runner/session-report/index.d.ts +2 -0
  152. package/dist/runner/session-report/index.d.ts.map +1 -0
  153. package/dist/runner/session-report/index.js +2 -0
  154. package/dist/runner/session-report/index.js.map +1 -0
  155. package/dist/runner/session-report/session-report.d.ts +81 -0
  156. package/dist/runner/session-report/session-report.d.ts.map +1 -0
  157. package/dist/runner/session-report/session-report.js +227 -0
  158. package/dist/runner/session-report/session-report.js.map +1 -0
  159. package/dist/runner/shared/types.d.ts +30 -0
  160. package/dist/runner/shared/types.d.ts.map +1 -0
  161. package/dist/runner/shared/types.js +2 -0
  162. package/dist/runner/shared/types.js.map +1 -0
  163. package/dist/shared/ansi/ansi.d.ts +59 -0
  164. package/dist/shared/ansi/ansi.d.ts.map +1 -0
  165. package/dist/shared/ansi/ansi.js +59 -0
  166. package/dist/shared/ansi/ansi.js.map +1 -0
  167. package/dist/shared/ansi/index.d.ts +2 -0
  168. package/dist/shared/ansi/index.d.ts.map +1 -0
  169. package/dist/shared/ansi/index.js +2 -0
  170. package/dist/shared/ansi/index.js.map +1 -0
  171. package/package.json +52 -0
  172. package/src/agents/agents.test.ts +57 -0
  173. package/src/agents/arch-agent.md +80 -0
  174. package/src/agents/concerns-agent.md +96 -0
  175. package/src/agents/design-agent.md +146 -0
  176. package/src/agents/devils-advocate.md +54 -0
  177. package/src/agents/quality-agent.md +178 -0
  178. package/src/agents/tech-agent.md +101 -0
  179. package/src/agents/verification-gate.md +128 -0
  180. package/src/roles/implementer/commands/autopilot.md +11 -0
  181. package/src/roles/implementer/commands/dry-run.md +15 -0
  182. package/src/roles/implementer/commands/implement.md +19 -0
  183. package/src/roles/implementer/workflows/autopilot.md +136 -0
  184. package/src/roles/implementer/workflows/implement.md +161 -0
  185. package/src/roles/planner/commands/approve-plan.md +11 -0
  186. package/src/roles/planner/commands/plan.md +22 -0
  187. package/src/roles/planner/workflows/approve-plan.md +970 -0
  188. package/src/roles/planner/workflows/plan.md +868 -0
  189. package/src/roles/reviewer/commands/logs.md +7 -0
  190. package/src/roles/reviewer/commands/review.md +9 -0
  191. package/src/roles/reviewer/commands/status.md +9 -0
  192. package/src/roles/reviewer/workflows/logs.md +109 -0
  193. package/src/roles/reviewer/workflows/review.md +197 -0
  194. package/src/roles/reviewer/workflows/status.md +142 -0
  195. package/src/roles/roles.test.ts +87 -0
  196. package/src/roles/setup/commands/doctor.md +7 -0
  197. package/src/roles/setup/commands/help.md +80 -0
  198. package/src/roles/setup/commands/init.md +7 -0
  199. package/src/roles/setup/commands/map-codebase.md +17 -0
  200. package/src/roles/setup/commands/settings.md +7 -0
  201. package/src/roles/setup/commands/uninstall.md +5 -0
  202. package/src/roles/setup/commands/update-docs.md +9 -0
  203. package/src/roles/setup/commands/update.md +13 -0
  204. package/src/roles/setup/workflows/doctor.md +131 -0
  205. package/src/roles/setup/workflows/init.md +1096 -0
  206. package/src/roles/setup/workflows/map-codebase.md +130 -0
  207. package/src/roles/setup/workflows/scaffold.md +872 -0
  208. package/src/roles/setup/workflows/settings.md +958 -0
  209. package/src/roles/setup/workflows/uninstall.md +170 -0
  210. package/src/roles/setup/workflows/update-docs.md +95 -0
  211. package/src/roles/setup/workflows/update.md +287 -0
  212. package/src/roles/strategist/commands/approve-brief.md +23 -0
  213. package/src/roles/strategist/commands/brief.md +29 -0
  214. package/src/roles/strategist/workflows/approve-brief.md +1540 -0
  215. package/src/roles/strategist/workflows/brief.md +1330 -0
  216. package/src/templates/CLAUDE.md +101 -0
  217. package/src/templates/templates.test.ts +53 -0
@@ -0,0 +1,17 @@
1
+ # /clancy:map-codebase
2
+
3
+ Scan your codebase with 5 parallel specialist agents and write 10 structured docs to .clancy/docs/.
4
+
5
+ Agents run simultaneously:
6
+
7
+ - tech — STACK.md, INTEGRATIONS.md
8
+ - arch — ARCHITECTURE.md
9
+ - quality — CONVENTIONS.md, TESTING.md, GIT.md, DEFINITION-OF-DONE.md
10
+ - design — DESIGN-SYSTEM.md, ACCESSIBILITY.md
11
+ - concerns — CONCERNS.md
12
+
13
+ Takes approximately 2 minutes for a typical codebase.
14
+
15
+ @.claude/clancy/workflows/map-codebase.md
16
+
17
+ Run the 5-agent scan as documented in the workflow above. Spawn all agents simultaneously.
@@ -0,0 +1,7 @@
1
+ # /clancy:settings
2
+
3
+ View and change Clancy configuration without re-running init.
4
+
5
+ @.claude/clancy/workflows/settings.md
6
+
7
+ Run the settings workflow as documented above.
@@ -0,0 +1,5 @@
1
+ # /clancy:uninstall
2
+
3
+ Remove Clancy's slash commands from this project or your global Claude Code installation.
4
+
5
+ @.claude/clancy/workflows/uninstall.md
@@ -0,0 +1,9 @@
1
+ # /clancy:update-docs
2
+
3
+ Incrementally refresh .clancy/docs/ — re-runs only the agents covering areas that have changed since the last scan.
4
+
5
+ Faster than a full map-codebase when you've made targeted changes (new dependency, design system update, new test strategy, etc.).
6
+
7
+ @.claude/clancy/workflows/update-docs.md
8
+
9
+ Run the incremental update as documented in the workflow above.
@@ -0,0 +1,13 @@
1
+ # /clancy:update
2
+
3
+ Update Clancy itself to the latest version via npx and show what changed.
4
+
5
+ This re-runs the installer, which copies the latest command files from the npm package into your .claude/commands/clancy/ directory. Your .clancy/ project folder (scripts, docs, progress log) is never touched.
6
+
7
+ **Supported flags:**
8
+
9
+ - `--afk` — skip the confirmation prompt and auto-approve the update (for autonomous setups)
10
+
11
+ @.claude/clancy/workflows/update.md
12
+
13
+ Run the update as documented in the workflow above. If `--afk` is passed, skip all confirmation prompts.
@@ -0,0 +1,131 @@
1
+ ## Update check
2
+
3
+ Before doing anything else, check for updates:
4
+
5
+ 1. Run: `npm show chief-clancy version`
6
+ 2. Read the installed version from the Clancy `package.json`
7
+ 3. If a newer version exists, print: `ℹ️ Clancy v{current} → v{latest} available. Run /clancy:update to upgrade.` then continue normally.
8
+ 4. If already on latest, continue silently.
9
+ 5. If the npm check fails for any reason (offline, network error), continue silently. Never block on this.
10
+
11
+ ---
12
+
13
+ # Clancy Doctor Workflow
14
+
15
+ ## Overview
16
+
17
+ Diagnose your Clancy setup — test every configured integration and report what's working, what's broken, and how to fix it. Never modifies any files or state.
18
+
19
+ ---
20
+
21
+ ## Step 1 — Check install
22
+
23
+ - Verify Clancy commands are installed (`.claude/commands/clancy/` or `~/.claude/commands/clancy/`)
24
+ - Read installed version from `package.json` in the commands directory
25
+ - Print: `✅ Clancy v{version} installed ({location})`
26
+
27
+ ---
28
+
29
+ ## Step 2 — Check prerequisites
30
+
31
+ Test each required binary:
32
+
33
+ | Binary | Check | Fix hint |
34
+ | ------ | ----------------- | ----------------------- |
35
+ | `node` | `command -v node` | Install Node.js 24+ |
36
+ | `git` | `command -v git` | Install git for your OS |
37
+
38
+ Print `✅` or `❌` for each.
39
+
40
+ ---
41
+
42
+ ## Step 3 — Check project setup
43
+
44
+ - `.clancy/` exists → `✅ .clancy/ found`
45
+ - `.clancy/clancy-implement.js` exists → `✅ clancy-implement.js`
46
+ - `.clancy/clancy-autopilot.js` exists → `✅ clancy-autopilot.js`
47
+ - `.clancy/.env` exists → `✅ .clancy/.env found`
48
+ - `.clancy/docs/` has non-empty files → `✅ codebase docs present ({N} files)`
49
+
50
+ If `.clancy/` is missing: `❌ .clancy/ not found — run /clancy:init`
51
+ If `.clancy/.env` is missing: `❌ .clancy/.env not found — run /clancy:init`
52
+
53
+ ---
54
+
55
+ ## Step 4 — Check board credentials
56
+
57
+ Source `.clancy/.env` and detect which board is configured:
58
+
59
+ **Jira** — if `JIRA_BASE_URL` is set:
60
+
61
+ 1. Check all required vars are non-empty: `JIRA_BASE_URL`, `JIRA_USER`, `JIRA_API_TOKEN`, `JIRA_PROJECT_KEY`
62
+ 2. Ping: `GET {JIRA_BASE_URL}/rest/api/3/project/{JIRA_PROJECT_KEY}` with basic auth
63
+ 3. Report HTTP status with specific guidance for each failure code
64
+
65
+ **GitHub Issues** — if `GITHUB_TOKEN` is set:
66
+
67
+ 1. Check: `GITHUB_TOKEN`, `GITHUB_REPO`
68
+ 2. Ping: `GET https://api.github.com/repos/{GITHUB_REPO}` with bearer token
69
+ 3. Report status
70
+
71
+ **Linear** — if `LINEAR_API_KEY` is set:
72
+
73
+ 1. Check: `LINEAR_API_KEY`, `LINEAR_TEAM_ID`
74
+ 2. Ping: `POST https://api.linear.app/graphql` with `{ viewer { id } }` — no Bearer prefix
75
+ 3. Report status
76
+
77
+ ---
78
+
79
+ ## Step 5 — Check optional integrations
80
+
81
+ **Figma** — if `FIGMA_API_KEY` is set:
82
+
83
+ - Call `GET https://api.figma.com/v1/me` with `X-Figma-Token: $FIGMA_API_KEY`
84
+ - On success: print `✅ Figma connected — {email}`
85
+ - On 403: print `❌ Figma authentication failed. Check FIGMA_API_KEY in .clancy/.env.`
86
+ - Note: Figma's API does not expose plan information — check your plan at figma.com/settings
87
+
88
+ **Playwright** — if `PLAYWRIGHT_ENABLED=true`:
89
+
90
+ - Check `.clancy/docs/PLAYWRIGHT.md` exists
91
+ - Verify `PLAYWRIGHT_DEV_COMMAND` and `PLAYWRIGHT_DEV_PORT` are set
92
+ - Check port is not currently in use (just a status, not a blocker)
93
+
94
+ **Notifications** — if `CLANCY_NOTIFY_WEBHOOK` is set:
95
+
96
+ - Detect platform from URL (Slack/Teams)
97
+ - Send a test ping: `"Clancy doctor — webhook test from {project dir}"`
98
+ - Report success or failure
99
+
100
+ ---
101
+
102
+ ## Step 6 — Summary
103
+
104
+ ```
105
+ 🚨 Clancy — Doctor
106
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
107
+
108
+ {N} checks passed, {N} warnings, {N} failures
109
+
110
+ ✅ Clancy v0.1.0 installed (global)
111
+ ✅ node, git — all present
112
+ ✅ .clancy/ set up — 10 docs present
113
+ ✅ Jira connected — PROJ reachable
114
+ ✅ Figma connected — alex@example.com (check plan at figma.com/settings)
115
+ ❌ PLAYWRIGHT_STORYBOOK_PORT — not set in .clancy/.env
116
+
117
+ Fix the ❌ items, then run /clancy:implement to verify end-to-end.
118
+
119
+ "We've got a 415 in progress — a config disturbance."
120
+ ```
121
+
122
+ If all checks pass:
123
+
124
+ ```
125
+ 🚨 Clancy — Doctor
126
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
127
+
128
+ All {N} checks passed.
129
+
130
+ "Nothing to see here, folks. Move along." — Run /clancy:implement to pick up your first ticket.
131
+ ```