flight-rules 0.10.0 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flight-rules",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "An opinionated framework for AI-assisted software development",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/payload/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Flight Rules – Agent Guidelines
2
2
 
3
- flight_rules_version: 0.10.0
3
+ flight_rules_version: 0.11.0
4
4
 
5
5
  This file defines how agents (Claude Code, Cursor, etc.) should work on software projects using the Flight Rules system.
6
6
 
@@ -0,0 +1,229 @@
1
+ # Bump Version
2
+
3
+ When the user invokes "version.bump", help them update the project version following semantic versioning conventions. This command supports two modes: one-shot (when the user specifies major/minor/patch) and conversational (analyze commits and recommend).
4
+
5
+ ## 1. Check Prerequisites
6
+
7
+ ### Working Directory Must Be Clean
8
+
9
+ Run `git status --porcelain` to check for uncommitted changes.
10
+
11
+ If there are uncommitted changes:
12
+
13
+ > "There are uncommitted changes in the working directory. Version bumping typically requires a clean working tree.
14
+ >
15
+ > Would you like me to:
16
+ > 1. **Show the changes** — See what's uncommitted
17
+ > 2. **Proceed anyway** — Some version tools allow this
18
+ > 3. **Stop** — Commit or stash changes first
19
+ >
20
+ > Which would you prefer?"
21
+
22
+ Wait for the user's response.
23
+
24
+ ### Project Type Detection
25
+
26
+ Detect the project type by checking for these files (in order):
27
+
28
+ 1. `package.json` → npm project
29
+ 2. `pyproject.toml` → Python project (Poetry/modern)
30
+ 3. `setup.py` → Python project (legacy)
31
+ 4. `Cargo.toml` → Rust project
32
+ 5. `go.mod` → Go project
33
+
34
+ If no recognized project file is found:
35
+
36
+ > "I couldn't detect the project type. What kind of project is this, and where is the version defined?"
37
+
38
+ Wait for the user's response.
39
+
40
+ ## 2. Determine Mode
41
+
42
+ **One-shot mode:** If the user provided a bump level with the command (e.g., "version.bump patch", "version.bump minor", "version.bump major"), proceed to Step 5.
43
+
44
+ **Conversational mode:** If the user invoked the command without specifying a level, proceed to Step 3.
45
+
46
+ ## 3. Find Latest Version Tag
47
+
48
+ Run one of these commands to find the most recent version tag:
49
+
50
+ ```bash
51
+ git describe --tags --abbrev=0 2>/dev/null
52
+ ```
53
+
54
+ Or if that fails (no tags yet):
55
+
56
+ ```bash
57
+ git tag --sort=-v:refname | head -1
58
+ ```
59
+
60
+ ### Handle Tag Formats
61
+
62
+ Version tags may use different formats:
63
+ - `v1.2.3` (with v prefix)
64
+ - `1.2.3` (without prefix)
65
+
66
+ Extract the version number regardless of format.
67
+
68
+ ### No Tags Found
69
+
70
+ If no version tags exist:
71
+
72
+ > "I couldn't find any version tags in this repository. This appears to be the first release.
73
+ >
74
+ > Current version in package.json: [version]
75
+ >
76
+ > Would you like to:
77
+ > 1. **Tag the current version** — Create a tag for the existing version, then bump
78
+ > 2. **Bump from current** — Just bump the version in package.json without analyzing history
79
+ >
80
+ > Which would you prefer?"
81
+
82
+ Wait for the user's response.
83
+
84
+ ## 4. Analyze Changes Since Last Tag
85
+
86
+ ### Get Commit History
87
+
88
+ Run:
89
+
90
+ ```bash
91
+ git log {tag}..HEAD --oneline
92
+ ```
93
+
94
+ Where `{tag}` is the version tag found in Step 3.
95
+
96
+ ### Categorize Changes
97
+
98
+ Review each commit message and categorize:
99
+
100
+ **Breaking Changes (→ major bump):**
101
+ - Contains "BREAKING CHANGE" or "BREAKING:"
102
+ - Commit type with exclamation suffix (e.g., "feat!:", "fix!:")
103
+ - Messages indicating removed features, changed APIs, or incompatible changes
104
+ - Words like "remove", "delete", "rename" for public APIs
105
+
106
+ **New Features (→ minor bump):**
107
+ - Commit type "feat:" or "feature:"
108
+ - Messages containing "add", "new", "implement", "introduce"
109
+ - New capabilities that don't break existing functionality
110
+
111
+ **Fixes and Maintenance (→ patch bump):**
112
+ - Commit type "fix:", "bugfix:"
113
+ - Commit type "docs:", "style:", "refactor:", "perf:", "test:", "chore:"
114
+ - Messages containing "fix", "correct", "patch", "update", "improve"
115
+
116
+ ### Present Analysis
117
+
118
+ Present the findings:
119
+
120
+ > **Changes since {tag}:**
121
+ >
122
+ > **Breaking Changes:** [count]
123
+ > - [list each with commit hash prefix]
124
+ >
125
+ > **New Features:** [count]
126
+ > - [list each with commit hash prefix]
127
+ >
128
+ > **Fixes & Maintenance:** [count]
129
+ > - [list each with commit hash prefix]
130
+ >
131
+ > **Recommendation: {MAJOR|MINOR|PATCH}**
132
+ >
133
+ > [Explain the reasoning, e.g., "There are breaking changes that require a major version bump" or "New features were added without breaking changes, suggesting a minor bump"]
134
+ >
135
+ > Current version: {current}
136
+ > Recommended version: {recommended}
137
+ >
138
+ > Would you like to proceed with this recommendation, or specify a different bump level?
139
+
140
+ Wait for user confirmation or override.
141
+
142
+ ## 5. Apply Version Bump
143
+
144
+ Based on the confirmed bump level, apply the change using project-appropriate tooling.
145
+
146
+ ### npm Projects
147
+
148
+ For projects with `package.json`, use npm's version command:
149
+
150
+ ```bash
151
+ npm version {patch|minor|major}
152
+ ```
153
+
154
+ **Important:** This command:
155
+ - Updates the `version` field in `package.json`
156
+ - Runs the `version` lifecycle script if defined (e.g., for syncing version to other files)
157
+ - Creates a git commit with the version as the message
158
+ - Creates a git tag (e.g., `v1.2.4`)
159
+
160
+ Do NOT manually create a commit or tag — `npm version` handles this.
161
+
162
+ ### Python Projects (pyproject.toml)
163
+
164
+ For Poetry projects:
165
+
166
+ ```bash
167
+ poetry version {patch|minor|major}
168
+ ```
169
+
170
+ Then commit and tag manually:
171
+
172
+ ```bash
173
+ git add pyproject.toml
174
+ git commit -m "{new_version}"
175
+ git tag v{new_version}
176
+ ```
177
+
178
+ ### Python Projects (setup.py)
179
+
180
+ Update the `version` parameter in `setup.py`, then commit and tag:
181
+
182
+ ```bash
183
+ git add setup.py
184
+ git commit -m "{new_version}"
185
+ git tag v{new_version}
186
+ ```
187
+
188
+ ### Rust Projects
189
+
190
+ Update the `version` field in `Cargo.toml`, then commit and tag:
191
+
192
+ ```bash
193
+ git add Cargo.toml
194
+ git commit -m "{new_version}"
195
+ git tag v{new_version}
196
+ ```
197
+
198
+ ### Other Projects
199
+
200
+ For unrecognized project types, ask the user which file contains the version and update it manually, then commit and tag.
201
+
202
+ ## 6. Report Result
203
+
204
+ After applying the version bump:
205
+
206
+ > **Version bumped successfully**
207
+ >
208
+ > - Previous version: {old_version}
209
+ > - New version: {new_version}
210
+ > - Bump type: {patch|minor|major}
211
+ >
212
+ > **What happened:**
213
+ > - Updated version in {file}
214
+ > - Created commit: {commit_hash}
215
+ > - Created tag: {tag}
216
+ >
217
+ > **Next steps:**
218
+ > - Run `git push && git push --tags` to push the release
219
+ > - Run `/project.release` to execute your full release workflow (if configured)
220
+
221
+ ## Key Behaviors
222
+
223
+ Throughout this command, maintain these behaviors:
224
+
225
+ - **Default to patch when uncertain** — If commit analysis is ambiguous, recommend patch (safest)
226
+ - **Respect existing conventions** — Use the same tag format the project already uses (v-prefix or not)
227
+ - **Don't duplicate work** — Let `npm version` or `poetry version` handle what they handle
228
+ - **Explain reasoning** — Always explain why you're recommending a particular bump level
229
+ - **Allow overrides** — User can always specify a different bump level than recommended