Skip to content

Commit a00d779

Browse files
authored
Complete forge→commando rename (#1)
* tidy * release commands * tidy * update tests --------- Co-authored-by: Jason Dillon <jdillon@users.noreply.github.com>
1 parent 74b8802 commit a00d779

18 files changed

Lines changed: 218 additions & 1044 deletions
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
description: Audit changelog and draft entries for upcoming release
3+
allowed-tools: Bash(git:*), Bash(jq:*), Bash(bd:*), Read, Edit, Grep, AskUserQuestion, Skill(beads)
4+
model: haiku
5+
---
6+
7+
Audit the changelog for missing entries since the last release and draft updates.
8+
9+
## Instructions
10+
11+
Follow these steps exactly in order.
12+
13+
### Step 1: Get the last release tag
14+
15+
```bash
16+
git describe --tags --abbrev=0 2>/dev/null || echo "no tags yet"
17+
```
18+
19+
### Step 2: Get commits and bead IDs since the tag
20+
21+
Replace `<TAG>` with actual tag from Step 1:
22+
23+
```bash
24+
git log <TAG>..HEAD --oneline --no-merges
25+
git log <TAG>..HEAD --format="%B" --no-merges | grep -oE "(commando|forge)-[a-z0-9]+" | sort -u
26+
```
27+
28+
Also read CHANGELOG.md `[Unreleased]` section.
29+
30+
### Step 3: Categorize each commit
31+
32+
**INCLUDE if:**
33+
34+
- Commit type is `feat:` or `fix:`
35+
- Change affects CLI users (commands, output, behavior)
36+
37+
**SKIP if:**
38+
39+
- Type is: `docs:`, `ci:`, `test:`, `chore:`, `bd:`, `bd sync:`, `refactor:`
40+
- Change is in: `.claude/`, `.github/`, `scripts/`, `docs/`, `.beads/`
41+
- Bead ID already in CHANGELOG.md
42+
43+
### Step 4: Get bead details
44+
45+
```bash
46+
bd list --status=closed --limit=20
47+
```
48+
49+
For each bead ID from commits:
50+
51+
```bash
52+
bd show <bead-id>
53+
```
54+
55+
### Step 5: Check for gaps
56+
57+
Compare closed beads vs beads in commits. Flag user-facing beads missing from commits.
58+
59+
### Step 6: Draft changelog entries
60+
61+
Format:
62+
63+
- One line per entry, max 80 chars
64+
- Start with verb: "Add", "Fix", "Change", "Remove"
65+
- Include bead ID: `(\`commando-xxx\`)`
66+
- Group by: Added, Changed, Fixed, Removed
67+
68+
### Step 7: Present report
69+
70+
Show:
71+
72+
1. **Commits analyzed** - hash, type, INCLUDE/SKIP, reason
73+
2. **Beads referenced** - ID, title, type
74+
3. **Gaps** - missing beads or "None"
75+
4. **Draft entries** - grouped by section
76+
77+
### Step 8: Ask for confirmation
78+
79+
Use `AskUserQuestion`:
80+
81+
- Question: "Update CHANGELOG.md with these entries?"
82+
- Header: "Changelog"
83+
- Options: "Yes, update" / "No, skip"
84+
85+
### Step 9: Update CHANGELOG.md (if yes)
86+
87+
1. Find `## [Unreleased]`
88+
2. Insert entries after it, before next version section
89+
3. Merge with existing entries (no duplicates)
90+
4. Do NOT commit
91+
5. Tell user: "CHANGELOG.md updated. Review with `git diff CHANGELOG.md`"
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
description: Prepare and tag a new release
3+
argument-hint: [version]
4+
allowed-tools: Bash(git:*), Bash(jq:*), Read, Edit, AskUserQuestion
5+
model: sonnet
6+
---
7+
8+
Prepare a release for commando.
9+
10+
## Instructions
11+
12+
### Step 1: Gather release context
13+
14+
```bash
15+
git branch --show-current
16+
jq -r .version package.json
17+
git describe --tags --abbrev=0 2>/dev/null || echo "no tags yet"
18+
git log $(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~20")..HEAD --oneline --no-merges
19+
```
20+
21+
### Step 2: Validate branch
22+
23+
Releases MUST be from `main` branch.
24+
25+
If on ANY OTHER branch: **STOP** and tell user to merge to main first.
26+
27+
### Step 3: Compute version
28+
29+
Default: bump patch (e.g., 0.1.3 → 0.1.4)
30+
31+
If user provided version ($ARGUMENTS), use that instead.
32+
33+
Use `AskUserQuestion` to confirm version.
34+
35+
### Step 4: Audit changelog
36+
37+
Read CHANGELOG.md `[Unreleased]` section. Compare commits since last tag.
38+
39+
**Only flag user-facing changes:**
40+
- `feat:` that add/change CLI commands or behavior
41+
- `fix:` that fix bugs users encounter
42+
43+
**Skip:**
44+
- `docs:`, `ci:`, `test:`, `bd:`, `chore:` commits
45+
- Changes in `.claude/`, `.github/`, `scripts/`, `docs/`
46+
- Commits already in changelog (matching bead ID)
47+
48+
If user-facing changes missing from changelog: **STOP** and ask user to update.
49+
50+
### Step 5: Execute release
51+
52+
Only after version confirmed AND changelog complete:
53+
54+
1. Validate `[Unreleased]` has content
55+
56+
2. Update CHANGELOG.md:
57+
- Add empty `## [Unreleased]` at top
58+
- Change old `## [Unreleased]` to `## [X.Y.Z] - YYYY-MM-DD`
59+
60+
3. Update package.json version
61+
62+
4. Commit: `chore: release vX.Y.Z`
63+
64+
5. Create tag: `vX.Y.Z`
65+
66+
6. Push:
67+
```bash
68+
git push origin main
69+
git push origin vX.Y.Z
70+
```
71+
72+
7. Report success: "Release tagged. Run the Release workflow manually at https://github.com/jdillon/commando/actions/workflows/release.yml"

bun.lock

Lines changed: 12 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ async function buildCLI(config: CommandoConfig): Promise<Command> {
176176

177177
program
178178
.name("cmdo")
179-
.description("Modern CLI framework for deployments")
179+
.description("CommanDO CLI Framework")
180180
.version(pkg.version);
181181

182182
addTopLevelOptions(program);

lib/logging/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function parseLogLevel(): string {
4242
}
4343

4444
// Fallback to environment variable
45-
if (process.env.FORGE_DEBUG) {
45+
if (process.env.COMMANDO_DEBUG) {
4646
return 'debug';
4747
}
4848

0 commit comments

Comments
 (0)