@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.
- package/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/hooks/clancy-branch-guard.js +1 -0
- package/dist/hooks/clancy-check-update.js +2 -0
- package/dist/hooks/clancy-context-monitor.js +9 -0
- package/dist/hooks/clancy-credential-guard.js +2 -0
- package/dist/hooks/clancy-drift-detector.js +1 -0
- package/dist/hooks/clancy-notification.js +1 -0
- package/dist/hooks/clancy-post-compact.js +2 -0
- package/dist/hooks/clancy-statusline.js +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/file-ops/file-ops.d.ts +35 -0
- package/dist/installer/file-ops/file-ops.d.ts.map +1 -0
- package/dist/installer/file-ops/file-ops.js +95 -0
- package/dist/installer/file-ops/file-ops.js.map +1 -0
- package/dist/installer/file-ops/index.d.ts +2 -0
- package/dist/installer/file-ops/index.d.ts.map +1 -0
- package/dist/installer/file-ops/index.js +2 -0
- package/dist/installer/file-ops/index.js.map +1 -0
- package/dist/installer/hook-installer/hook-installer.d.ts +22 -0
- package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -0
- package/dist/installer/hook-installer/hook-installer.js +213 -0
- package/dist/installer/hook-installer/hook-installer.js.map +1 -0
- package/dist/installer/hook-installer/index.d.ts +2 -0
- package/dist/installer/hook-installer/index.d.ts.map +1 -0
- package/dist/installer/hook-installer/index.js +2 -0
- package/dist/installer/hook-installer/index.js.map +1 -0
- package/dist/installer/install/index.d.ts +3 -0
- package/dist/installer/install/index.d.ts.map +1 -0
- package/dist/installer/install/index.js +2 -0
- package/dist/installer/install/index.js.map +1 -0
- package/dist/installer/install/install.d.ts +124 -0
- package/dist/installer/install/install.d.ts.map +1 -0
- package/dist/installer/install/install.js +255 -0
- package/dist/installer/install/install.js.map +1 -0
- package/dist/installer/manifest/index.d.ts +2 -0
- package/dist/installer/manifest/index.d.ts.map +1 -0
- package/dist/installer/manifest/index.js +2 -0
- package/dist/installer/manifest/index.js.map +1 -0
- package/dist/installer/manifest/manifest.d.ts +46 -0
- package/dist/installer/manifest/manifest.d.ts.map +1 -0
- package/dist/installer/manifest/manifest.js +180 -0
- package/dist/installer/manifest/manifest.js.map +1 -0
- package/dist/installer/prompts/index.d.ts +2 -0
- package/dist/installer/prompts/index.d.ts.map +1 -0
- package/dist/installer/prompts/index.js +2 -0
- package/dist/installer/prompts/index.js.map +1 -0
- package/dist/installer/prompts/prompts.d.ts +34 -0
- package/dist/installer/prompts/prompts.d.ts.map +1 -0
- package/dist/installer/prompts/prompts.js +28 -0
- package/dist/installer/prompts/prompts.js.map +1 -0
- package/dist/installer/role-filter/index.d.ts +2 -0
- package/dist/installer/role-filter/index.d.ts.map +1 -0
- package/dist/installer/role-filter/index.js +2 -0
- package/dist/installer/role-filter/index.js.map +1 -0
- package/dist/installer/role-filter/role-filter.d.ts +33 -0
- package/dist/installer/role-filter/role-filter.d.ts.map +1 -0
- package/dist/installer/role-filter/role-filter.js +91 -0
- package/dist/installer/role-filter/role-filter.js.map +1 -0
- package/dist/installer/shared/fs-errors/fs-errors.d.ts +3 -0
- package/dist/installer/shared/fs-errors/fs-errors.d.ts.map +1 -0
- package/dist/installer/shared/fs-errors/fs-errors.js +7 -0
- package/dist/installer/shared/fs-errors/fs-errors.js.map +1 -0
- package/dist/installer/shared/fs-errors/index.d.ts +2 -0
- package/dist/installer/shared/fs-errors/index.d.ts.map +1 -0
- package/dist/installer/shared/fs-errors/index.js +2 -0
- package/dist/installer/shared/fs-errors/index.js.map +1 -0
- package/dist/installer/shared/fs-guards/fs-guards.d.ts +3 -0
- package/dist/installer/shared/fs-guards/fs-guards.d.ts.map +1 -0
- package/dist/installer/shared/fs-guards/fs-guards.js +18 -0
- package/dist/installer/shared/fs-guards/fs-guards.js.map +1 -0
- package/dist/installer/shared/fs-guards/index.d.ts +2 -0
- package/dist/installer/shared/fs-guards/index.d.ts.map +1 -0
- package/dist/installer/shared/fs-guards/index.js +2 -0
- package/dist/installer/shared/fs-guards/index.js.map +1 -0
- package/dist/installer/shared/type-guards/index.d.ts +2 -0
- package/dist/installer/shared/type-guards/index.d.ts.map +1 -0
- package/dist/installer/shared/type-guards/index.js +2 -0
- package/dist/installer/shared/type-guards/index.js.map +1 -0
- package/dist/installer/shared/type-guards/type-guards.d.ts +8 -0
- package/dist/installer/shared/type-guards/type-guards.d.ts.map +1 -0
- package/dist/installer/shared/type-guards/type-guards.js +10 -0
- package/dist/installer/shared/type-guards/type-guards.js.map +1 -0
- package/dist/installer/ui/index.d.ts +2 -0
- package/dist/installer/ui/index.d.ts.map +1 -0
- package/dist/installer/ui/index.js +2 -0
- package/dist/installer/ui/index.js.map +1 -0
- package/dist/installer/ui/ui.d.ts +23 -0
- package/dist/installer/ui/ui.d.ts.map +1 -0
- package/dist/installer/ui/ui.js +121 -0
- package/dist/installer/ui/ui.js.map +1 -0
- package/dist/runner/autopilot/autopilot.d.ts +71 -0
- package/dist/runner/autopilot/autopilot.d.ts.map +1 -0
- package/dist/runner/autopilot/autopilot.js +206 -0
- package/dist/runner/autopilot/autopilot.js.map +1 -0
- package/dist/runner/autopilot/index.d.ts +2 -0
- package/dist/runner/autopilot/index.d.ts.map +1 -0
- package/dist/runner/autopilot/index.js +2 -0
- package/dist/runner/autopilot/index.js.map +1 -0
- package/dist/runner/cli-bridge/cli-bridge.d.ts +34 -0
- package/dist/runner/cli-bridge/cli-bridge.d.ts.map +1 -0
- package/dist/runner/cli-bridge/cli-bridge.js +53 -0
- package/dist/runner/cli-bridge/cli-bridge.js.map +1 -0
- package/dist/runner/cli-bridge/index.d.ts +2 -0
- package/dist/runner/cli-bridge/index.d.ts.map +1 -0
- package/dist/runner/cli-bridge/index.js +2 -0
- package/dist/runner/cli-bridge/index.js.map +1 -0
- package/dist/runner/dep-factory/deliver-phase.d.ts +24 -0
- package/dist/runner/dep-factory/deliver-phase.d.ts.map +1 -0
- package/dist/runner/dep-factory/deliver-phase.js +57 -0
- package/dist/runner/dep-factory/deliver-phase.js.map +1 -0
- package/dist/runner/dep-factory/dep-factory.d.ts +38 -0
- package/dist/runner/dep-factory/dep-factory.d.ts.map +1 -0
- package/dist/runner/dep-factory/dep-factory.js +193 -0
- package/dist/runner/dep-factory/dep-factory.js.map +1 -0
- package/dist/runner/dep-factory/index.d.ts +2 -0
- package/dist/runner/dep-factory/index.d.ts.map +1 -0
- package/dist/runner/dep-factory/index.js +2 -0
- package/dist/runner/dep-factory/index.js.map +1 -0
- package/dist/runner/dep-factory/invoke-phase.d.ts +20 -0
- package/dist/runner/dep-factory/invoke-phase.d.ts.map +1 -0
- package/dist/runner/dep-factory/invoke-phase.js +45 -0
- package/dist/runner/dep-factory/invoke-phase.js.map +1 -0
- package/dist/runner/implement/implement.d.ts +38 -0
- package/dist/runner/implement/implement.d.ts.map +1 -0
- package/dist/runner/implement/implement.js +61 -0
- package/dist/runner/implement/implement.js.map +1 -0
- package/dist/runner/implement/index.d.ts +2 -0
- package/dist/runner/implement/index.d.ts.map +1 -0
- package/dist/runner/implement/index.js +2 -0
- package/dist/runner/implement/index.js.map +1 -0
- package/dist/runner/notify/index.d.ts +2 -0
- package/dist/runner/notify/index.d.ts.map +1 -0
- package/dist/runner/notify/index.js +2 -0
- package/dist/runner/notify/index.js.map +1 -0
- package/dist/runner/notify/notify.d.ts +49 -0
- package/dist/runner/notify/notify.d.ts.map +1 -0
- package/dist/runner/notify/notify.js +90 -0
- package/dist/runner/notify/notify.js.map +1 -0
- package/dist/runner/prompt-builder/index.d.ts +2 -0
- package/dist/runner/prompt-builder/index.d.ts.map +1 -0
- package/dist/runner/prompt-builder/index.js +2 -0
- package/dist/runner/prompt-builder/index.js.map +1 -0
- package/dist/runner/prompt-builder/prompt-builder.d.ts +53 -0
- package/dist/runner/prompt-builder/prompt-builder.d.ts.map +1 -0
- package/dist/runner/prompt-builder/prompt-builder.js +122 -0
- package/dist/runner/prompt-builder/prompt-builder.js.map +1 -0
- package/dist/runner/session-report/index.d.ts +2 -0
- package/dist/runner/session-report/index.d.ts.map +1 -0
- package/dist/runner/session-report/index.js +2 -0
- package/dist/runner/session-report/index.js.map +1 -0
- package/dist/runner/session-report/session-report.d.ts +81 -0
- package/dist/runner/session-report/session-report.d.ts.map +1 -0
- package/dist/runner/session-report/session-report.js +227 -0
- package/dist/runner/session-report/session-report.js.map +1 -0
- package/dist/runner/shared/types.d.ts +30 -0
- package/dist/runner/shared/types.d.ts.map +1 -0
- package/dist/runner/shared/types.js +2 -0
- package/dist/runner/shared/types.js.map +1 -0
- package/dist/shared/ansi/ansi.d.ts +59 -0
- package/dist/shared/ansi/ansi.d.ts.map +1 -0
- package/dist/shared/ansi/ansi.js +59 -0
- package/dist/shared/ansi/ansi.js.map +1 -0
- package/dist/shared/ansi/index.d.ts +2 -0
- package/dist/shared/ansi/index.d.ts.map +1 -0
- package/dist/shared/ansi/index.js +2 -0
- package/dist/shared/ansi/index.js.map +1 -0
- package/package.json +52 -0
- package/src/agents/agents.test.ts +57 -0
- package/src/agents/arch-agent.md +80 -0
- package/src/agents/concerns-agent.md +96 -0
- package/src/agents/design-agent.md +146 -0
- package/src/agents/devils-advocate.md +54 -0
- package/src/agents/quality-agent.md +178 -0
- package/src/agents/tech-agent.md +101 -0
- package/src/agents/verification-gate.md +128 -0
- package/src/roles/implementer/commands/autopilot.md +11 -0
- package/src/roles/implementer/commands/dry-run.md +15 -0
- package/src/roles/implementer/commands/implement.md +19 -0
- package/src/roles/implementer/workflows/autopilot.md +136 -0
- package/src/roles/implementer/workflows/implement.md +161 -0
- package/src/roles/planner/commands/approve-plan.md +11 -0
- package/src/roles/planner/commands/plan.md +22 -0
- package/src/roles/planner/workflows/approve-plan.md +970 -0
- package/src/roles/planner/workflows/plan.md +868 -0
- package/src/roles/reviewer/commands/logs.md +7 -0
- package/src/roles/reviewer/commands/review.md +9 -0
- package/src/roles/reviewer/commands/status.md +9 -0
- package/src/roles/reviewer/workflows/logs.md +109 -0
- package/src/roles/reviewer/workflows/review.md +197 -0
- package/src/roles/reviewer/workflows/status.md +142 -0
- package/src/roles/roles.test.ts +87 -0
- package/src/roles/setup/commands/doctor.md +7 -0
- package/src/roles/setup/commands/help.md +80 -0
- package/src/roles/setup/commands/init.md +7 -0
- package/src/roles/setup/commands/map-codebase.md +17 -0
- package/src/roles/setup/commands/settings.md +7 -0
- package/src/roles/setup/commands/uninstall.md +5 -0
- package/src/roles/setup/commands/update-docs.md +9 -0
- package/src/roles/setup/commands/update.md +13 -0
- package/src/roles/setup/workflows/doctor.md +131 -0
- package/src/roles/setup/workflows/init.md +1096 -0
- package/src/roles/setup/workflows/map-codebase.md +130 -0
- package/src/roles/setup/workflows/scaffold.md +872 -0
- package/src/roles/setup/workflows/settings.md +958 -0
- package/src/roles/setup/workflows/uninstall.md +170 -0
- package/src/roles/setup/workflows/update-docs.md +95 -0
- package/src/roles/setup/workflows/update.md +287 -0
- package/src/roles/strategist/commands/approve-brief.md +23 -0
- package/src/roles/strategist/commands/brief.md +29 -0
- package/src/roles/strategist/workflows/approve-brief.md +1540 -0
- package/src/roles/strategist/workflows/brief.md +1330 -0
- package/src/templates/CLAUDE.md +101 -0
- package/src/templates/templates.test.ts +53 -0
|
@@ -0,0 +1,161 @@
|
|
|
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 Implement Workflow
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Pick up exactly one ticket from the Kanban board, implement it, commit, push, create a PR, and stop. Does not loop.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 1 — Preflight checks
|
|
22
|
+
|
|
23
|
+
1. Check `.clancy/` exists. If not:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
.clancy/ not found. Run /clancy:init first to set up Clancy.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Stop.
|
|
30
|
+
|
|
31
|
+
2. Check `.clancy/.env` exists and board credentials are present. If not:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Missing credentials in .clancy/.env. Run /clancy:init to reconfigure.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Stop.
|
|
38
|
+
|
|
39
|
+
3. The script to run is always `.clancy/clancy-implement.js` regardless of board.
|
|
40
|
+
`/clancy:init` copies the correct board variant as `clancy-implement.js` during setup.
|
|
41
|
+
|
|
42
|
+
4. Check `.clancy/clancy-implement.js` exists. If not:
|
|
43
|
+
```
|
|
44
|
+
.clancy/clancy-implement.js not found. Run /clancy:init to scaffold scripts.
|
|
45
|
+
```
|
|
46
|
+
Stop.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 2 — Run
|
|
51
|
+
|
|
52
|
+
Check if the user passed `--dry-run` as an argument to the slash command.
|
|
53
|
+
|
|
54
|
+
**With `--dry-run`:**
|
|
55
|
+
|
|
56
|
+
Display:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
🚨 Clancy — Dry Run
|
|
60
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
61
|
+
|
|
62
|
+
"Just a routine patrol." — Running in dry-run mode, no changes will be made.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Execute:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
node .clancy/clancy-implement.js --dry-run
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Stream output directly — do not buffer or summarise. Stop here (do not continue to Step 3).
|
|
72
|
+
|
|
73
|
+
**Without `--dry-run`:**
|
|
74
|
+
|
|
75
|
+
Display:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
🚨 Clancy — Implement
|
|
79
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
80
|
+
|
|
81
|
+
"I'm on the case." — Running for one ticket.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 2a. Fetch ticket details
|
|
85
|
+
|
|
86
|
+
Execute a dry-run first to retrieve ticket details:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
node .clancy/clancy-implement.js --dry-run
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Stream output directly. If the output contains `No tickets found` or a preflight error (`✗`), stop — there is nothing to do.
|
|
93
|
+
|
|
94
|
+
### 2b. Feasibility evaluation
|
|
95
|
+
|
|
96
|
+
Read the ticket title and description from the dry-run output. Evaluate whether this ticket can be implemented entirely as code changes committed to a git repository.
|
|
97
|
+
|
|
98
|
+
The ticket is **infeasible** if it requires ANY of:
|
|
99
|
+
|
|
100
|
+
- Manual testing or configuration in external tools or admin panels
|
|
101
|
+
- Access to external services, APIs, or platforms not available in the codebase
|
|
102
|
+
- Physical, hardware, or infrastructure changes
|
|
103
|
+
- Design assets that do not yet exist
|
|
104
|
+
- Deployment or infrastructure changes outside the repository
|
|
105
|
+
- Human judgment calls that require stakeholder input
|
|
106
|
+
|
|
107
|
+
If the ticket is infeasible, display:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
⏭️ {TICKET-KEY} skipped — {one-line reason}.
|
|
111
|
+
|
|
112
|
+
"Not on my watch." — The ticket requires work that Clancy can't do as code changes. A human should handle this one.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Stop here.
|
|
116
|
+
|
|
117
|
+
### 2c. Execute
|
|
118
|
+
|
|
119
|
+
If the ticket is feasible, run the full lifecycle (skipping the script's built-in feasibility check since we just evaluated it):
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
node .clancy/clancy-implement.js --skip-feasibility
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Stream output directly — do not buffer or summarise.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Step 3 — Result
|
|
130
|
+
|
|
131
|
+
On success (output contains `complete`), echo:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
✅ {TICKET-KEY} complete.
|
|
135
|
+
|
|
136
|
+
"That's some fine police work there, Lou."
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
On skip (output contains `Ticket skipped`), echo:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
⏭️ {TICKET-KEY} skipped — {reason from output}.
|
|
143
|
+
|
|
144
|
+
"Not on my watch." — The ticket requires work that Clancy can't do as code changes. A human should handle this one.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
On failure:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
❌ Clancy stopped. See output above for details.
|
|
151
|
+
|
|
152
|
+
"Looks like we've got ourselves a 23-19." — Run /clancy:status to check the board, or /clancy:review to inspect the ticket.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Notes
|
|
158
|
+
|
|
159
|
+
- Do not loop. This command runs the script exactly once and stops.
|
|
160
|
+
- Do not attempt to run scripts from `src/templates/` — only scripts in `.clancy/`.
|
|
161
|
+
- The runtime scripts in `.clancy/` are self-contained bundles — no npm package dependency needed at runtime.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# /clancy:approve-plan
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
Optional flags:
|
|
6
|
+
|
|
7
|
+
- **Skip confirmation:** `--afk` — auto-confirm without prompting (for automation)
|
|
8
|
+
|
|
9
|
+
@.claude/clancy/workflows/approve-plan.md
|
|
10
|
+
|
|
11
|
+
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.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# /clancy:plan
|
|
2
|
+
|
|
3
|
+
Fetch backlog tickets from the board, explore the codebase, and generate structured implementation plans. Plans are posted as comments on the ticket for human review.
|
|
4
|
+
|
|
5
|
+
Accepts optional arguments:
|
|
6
|
+
|
|
7
|
+
- **Batch mode:** `/clancy:plan 3` — plan up to 3 tickets from the queue
|
|
8
|
+
- **Specific ticket:** `/clancy:plan PROJ-123`, `/clancy:plan #42`, `/clancy:plan ENG-42` — plan a single ticket by key
|
|
9
|
+
- **Fresh start:** `--fresh` — discard any existing plan and start over
|
|
10
|
+
- **Skip confirmations:** `--afk` — auto-confirm all prompts (for automation)
|
|
11
|
+
|
|
12
|
+
Examples:
|
|
13
|
+
|
|
14
|
+
- `/clancy:plan` — plan 1 ticket from queue
|
|
15
|
+
- `/clancy:plan 3` — plan 3 tickets from queue
|
|
16
|
+
- `/clancy:plan PROJ-123` — plan a specific Jira/Linear ticket
|
|
17
|
+
- `/clancy:plan #42` — plan a specific GitHub issue
|
|
18
|
+
- `/clancy:plan --fresh PROJ-123` — discard existing plan and start over
|
|
19
|
+
|
|
20
|
+
@.claude/clancy/workflows/plan.md
|
|
21
|
+
|
|
22
|
+
Follow the plan workflow above. For each ticket: run the feasibility scan, explore the codebase, generate the plan, and post it as a comment. Do not implement anything — planning only.
|