chief-clancy 0.1.4 → 0.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chief-clancy",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
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,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Remove Clancy's slash commands from the local project, globally, or both. Optionally remove the `.clancy/` project folder (which includes `.clancy/.env`). Never touch `CLAUDE.md` under any circumstances.
5
+ Remove Clancy's slash commands from the local project, globally, or both. Optionally remove the `.clancy/` project folder (which includes `.clancy/.env`). Clean up CLAUDE.md and .gitignore changes made during init.
6
6
 
7
7
  ---
8
8
 
@@ -41,7 +41,46 @@ If "Both" was chosen in Step 1: confirm once for both, remove all four directori
41
41
 
42
42
  ---
43
43
 
44
- ## Step 3 — Offer to remove .clancy/ (if present)
44
+ ## Step 3 — Clean up CLAUDE.md
45
+
46
+ Check whether `CLAUDE.md` exists in the current project directory.
47
+
48
+ If it does, check for Clancy markers (`<!-- clancy:start -->` and `<!-- clancy:end -->`):
49
+
50
+ **If markers found:**
51
+
52
+ Read the full file content. Determine whether Clancy created the file or appended to an existing one:
53
+
54
+ - **Clancy created it** (the file contains only whitespace outside the markers — no meaningful content before `<!-- clancy:start -->` or after `<!-- clancy:end -->`): delete the entire file.
55
+ - **Clancy appended to an existing file** (there is meaningful content outside the markers): remove everything from `<!-- clancy:start -->` through `<!-- clancy:end -->` (inclusive), plus any blank lines immediately before the start marker that were added as spacing. Write the cleaned file back.
56
+
57
+ Print `✓ CLAUDE.md cleaned up.` (or `✓ CLAUDE.md removed.` if deleted).
58
+
59
+ **If no markers found:** skip — Clancy didn't modify this file.
60
+
61
+ **If CLAUDE.md does not exist:** skip.
62
+
63
+ ---
64
+
65
+ ## Step 4 — Clean up .gitignore
66
+
67
+ Check whether `.gitignore` exists in the current project directory.
68
+
69
+ If it does, check whether it contains the Clancy entries (`# Clancy credentials` and/or `.clancy/.env`):
70
+
71
+ **If found:** remove the `# Clancy credentials` comment line and the `.clancy/.env` line. Also remove any blank line immediately before or after the removed block to avoid leaving double blank lines. Write the cleaned file back.
72
+
73
+ If the file is now empty (or contains only whitespace) after removal, delete it entirely — Clancy created it during init.
74
+
75
+ Print `✓ .gitignore cleaned up.` (or `✓ .gitignore removed.` if deleted).
76
+
77
+ **If not found:** skip — Clancy didn't modify this file.
78
+
79
+ **If .gitignore does not exist:** skip.
80
+
81
+ ---
82
+
83
+ ## Step 5 — Offer to remove .clancy/ (if present)
45
84
 
46
85
  Check whether `.clancy/` exists in the current project directory.
47
86
 
@@ -59,7 +98,7 @@ If `.clancy/` does not exist, skip this step entirely.
59
98
 
60
99
  ---
61
100
 
62
- ## Step 4 — Final message
101
+ ## Step 6 — Final message
63
102
 
64
103
  ```
65
104
  Clancy uninstalled. To reinstall: npx chief-clancy
@@ -69,7 +108,6 @@ Clancy uninstalled. To reinstall: npx chief-clancy
69
108
 
70
109
  ## Hard constraints
71
110
 
72
- - **Never touch any `.env` at the project root** — Clancy's credentials live in `.clancy/.env` and are only removed as part of `.clancy/` in Step 3
73
- - **Never touch `CLAUDE.md`**under any circumstances, in any scenario
74
- - Steps 1–2 (commands removal) and Step 3 (`.clancy/` removal) are always asked separately never bundle them into one confirmation
75
- - If the user says no to commands removal in Step 2, skip Step 3 entirely and stop
111
+ - **Never touch any `.env` at the project root** — Clancy's credentials live in `.clancy/.env` and are only removed as part of `.clancy/` in Step 5
112
+ - Steps 1–2 (commands removal), Steps 3–4 (CLAUDE.md and .gitignore cleanup), and Step 5 (`.clancy/` removal) are always asked separately never bundle them into one confirmation
113
+ - If the user says no to commands removal in Step 2, skip all remaining steps and stop
@@ -2,60 +2,167 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Update Clancy itself to the latest version via npx.
5
+ Check for Clancy updates via npm, display changelog for versions between installed and latest, obtain user confirmation, and execute clean installation.
6
6
 
7
7
  ---
8
8
 
9
- ## Step 1 — Check current version
9
+ ## Step 1 — Detect installed version
10
10
 
11
- Read current version from the installed package (check `~/.claude/commands/clancy/` or `./.claude/commands/clancy/` for a `VERSION` file, or from npm).
11
+ Determine whether Clancy is installed locally or globally by checking both locations:
12
12
 
13
13
  ```bash
14
- npm view chief-clancy version 2>/dev/null || echo "unknown"
14
+ LOCAL_VERSION_FILE="./.claude/commands/clancy/VERSION"
15
+ GLOBAL_VERSION_FILE="$HOME/.claude/commands/clancy/VERSION"
16
+
17
+ if [ -f "$LOCAL_VERSION_FILE" ] && grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+' "$LOCAL_VERSION_FILE"; then
18
+ INSTALLED=$(cat "$LOCAL_VERSION_FILE")
19
+ INSTALL_TYPE="LOCAL"
20
+ elif [ -f "$GLOBAL_VERSION_FILE" ] && grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+' "$GLOBAL_VERSION_FILE"; then
21
+ INSTALLED=$(cat "$GLOBAL_VERSION_FILE")
22
+ INSTALL_TYPE="GLOBAL"
23
+ else
24
+ INSTALLED="unknown"
25
+ INSTALL_TYPE="UNKNOWN"
26
+ fi
27
+
28
+ echo "$INSTALLED"
29
+ echo "$INSTALL_TYPE"
15
30
  ```
16
31
 
32
+ Parse output:
33
+ - First line = installed version (or "unknown")
34
+ - Second line = install type (LOCAL, GLOBAL, or UNKNOWN)
35
+
36
+ **If version is unknown:**
37
+ ```
38
+ ## Clancy Update
39
+
40
+ **Installed version:** Unknown
41
+
42
+ Your installation doesn't include version tracking.
43
+
44
+ Running fresh install...
45
+ ```
46
+
47
+ Proceed to Step 4 (treat as version 0.0.0 for comparison).
48
+
17
49
  ---
18
50
 
19
- ## Step 2 — Run the updater
51
+ ## Step 2 — Check latest version
52
+
53
+ Check npm for the latest published version:
54
+
55
+ ```bash
56
+ npm view chief-clancy version 2>/dev/null
57
+ ```
20
58
 
59
+ **If npm check fails:**
21
60
  ```
22
- Updating Clancy...
61
+ Couldn't check for updates (offline or npm unavailable).
62
+
63
+ To update manually: `npx chief-clancy@latest`
23
64
  ```
24
65
 
25
- Run:
66
+ Exit.
67
+
68
+ ---
69
+
70
+ ## Step 3 — Compare versions and confirm
71
+
72
+ Compare installed vs latest:
73
+
74
+ **If installed == latest:**
75
+ ```
76
+ ## Clancy Update
77
+
78
+ **Installed:** X.Y.Z
79
+ **Latest:** X.Y.Z
80
+
81
+ You're already on the latest version.
82
+ ```
83
+
84
+ Exit.
85
+
86
+ **If update available**, fetch the changelog from GitHub and show what's new BEFORE updating:
87
+
26
88
  ```bash
27
- npx chief-clancy@latest
89
+ curl -s https://raw.githubusercontent.com/Pushedskydiver/clancy/main/CHANGELOG.md
28
90
  ```
29
91
 
30
- This re-runs the installer, which copies the latest command files into the correct `.claude/commands/clancy/` directory (global or local, matching the existing install location).
92
+ Extract only the entries between the installed version and the latest version. Display:
31
93
 
32
- The update only touches `.claude/commands/clancy/` (slash commands and workflows). It never modifies:
33
- - `.clancy/clancy-once.sh` or `.clancy/clancy-afk.sh` — shell scripts are not updated
34
- - `.clancy/docs/` codebase documentation
35
- - `.clancy/progress.txt` progress log
36
- - `.clancy/.env` credentials
37
- - `CLAUDE.md`
94
+ ```
95
+ ## Clancy Update Available
96
+
97
+ **Installed:** {installed}
98
+ **Latest:** {latest}
99
+
100
+ ### What's New
101
+ ────────────────────────────────────────────────────────────
102
+
103
+ {relevant CHANGELOG entries between installed and latest}
104
+
105
+ ────────────────────────────────────────────────────────────
38
106
 
39
- **To update the shell scripts** (`.clancy/clancy-once.sh`, `.clancy/clancy-afk.sh`), re-run `/clancy:init` — it will detect the existing setup and re-scaffold the scripts without asking for credentials again.
107
+ ⚠️ **Note:** The update performs a clean install of Clancy command folders:
108
+ - `.claude/commands/clancy/` will be replaced
109
+ - `.claude/clancy/workflows/` will be replaced
110
+
111
+ Your project files are preserved:
112
+ - `.clancy/` project folder (scripts, docs, .env, progress log) ✓
113
+ - `CLAUDE.md` ✓
114
+ - Custom commands not in `commands/clancy/` ✓
115
+ - Custom hooks ✓
116
+ ```
117
+
118
+ Ask the user: **"Proceed with update?"** with options:
119
+ - "Yes, update now"
120
+ - "No, cancel"
121
+
122
+ **If user cancels:** Exit.
40
123
 
41
124
  ---
42
125
 
43
- ## Step 3Show changelog diff
126
+ ## Step 4Run the update
44
127
 
45
- After update, fetch and display the CHANGELOG section for any versions between old and new:
128
+ Run the installer using the detected install type:
46
129
 
130
+ ```bash
131
+ npx -y chief-clancy@latest
47
132
  ```
48
- Updated Clancy from v{old} to v{new}.
49
133
 
50
- What's new:
51
- {relevant CHANGELOG entries}
134
+ The installer auto-detects whether to install globally or locally based on the existing install.
52
135
 
53
- View full changelog: github.com/Pushedskydiver/clancy/blob/main/CHANGELOG.md
136
+ This only touches `.claude/commands/clancy/` and `.claude/clancy/workflows/`. It never modifies:
137
+ - `.clancy/clancy-once.sh` or `.clancy/clancy-afk.sh` — shell scripts
138
+ - `.clancy/docs/` — codebase documentation
139
+ - `.clancy/progress.txt` — progress log
140
+ - `.clancy/.env` — credentials
141
+ - `CLAUDE.md`
142
+
143
+ **To update the shell scripts**, re-run `/clancy:init` — it will detect the existing setup and re-scaffold the scripts without asking for credentials again.
144
+
145
+ ---
146
+
147
+ ## Step 5 — Clear update cache and confirm
148
+
149
+ Clear the update check cache so the statusline indicator disappears:
150
+
151
+ ```bash
152
+ rm -f "$HOME/.claude/cache/clancy-update-check.json"
153
+ rm -f "./.claude/cache/clancy-update-check.json"
54
154
  ```
55
155
 
56
- If version is already latest:
156
+ Display completion message:
157
+
57
158
  ```
58
- Clancy is already up to date (v{version}).
159
+ ╔═══════════════════════════════════════════════════════════╗
160
+ ║ Clancy Updated: v{old} → v{new} ║
161
+ ╚═══════════════════════════════════════════════════════════╝
162
+
163
+ ⚠️ Restart Claude Code to pick up the new commands.
164
+
165
+ View full changelog: github.com/Pushedskydiver/clancy/blob/main/CHANGELOG.md
59
166
  ```
60
167
 
61
168
  ---
@@ -64,4 +171,4 @@ Clancy is already up to date (v{version}).
64
171
 
65
172
  - If the user installed globally, the update applies globally
66
173
  - If the user installed locally, the update applies locally
67
- - After updating, the new commands take effect immediately in Claude Code
174
+ - After updating, restart Claude Code for new commands to take effect