flight-rules 0.10.2 → 0.12.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.2",
3
+ "version": "0.12.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.2
3
+ flight_rules_version: 0.12.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
 
@@ -300,7 +300,8 @@ After applying changes:
300
300
  > - Defined [X] initial tasks (all 🔵 Planned)
301
301
  >
302
302
  > **Next Steps:**
303
- > - Run `/impl.create [area]` to add more detail to the tasks
303
+ > - Run `/impl.create [area]` to add new task groups or tasks
304
+ > - Run `/impl.clarify [area]` to refine existing task definitions
304
305
  > - Run `/dev-session.start` to begin implementing this feature
305
306
  > - Run `/feature.add` to add another feature
306
307
 
@@ -0,0 +1,183 @@
1
+ # Clarify Implementation
2
+
3
+ When the user invokes this command, help them refine and clarify existing implementation specs through targeted questions.
4
+
5
+ ## 1. Read Existing Implementation
6
+
7
+ Read `docs/implementation/overview.md`. If it doesn't exist or is empty:
8
+
9
+ > "I couldn't find existing implementation specs at `docs/implementation/overview.md`. Would you like me to create an outline first with `/impl.outline`?"
10
+
11
+ Stop and wait for the user's response.
12
+
13
+ Also read `docs/prd.md` for context on goals and constraints.
14
+
15
+ ## 2. Determine Scope
16
+
17
+ Check if the user specified a scope with the command:
18
+ - `/impl.clarify` → Ask what scope they want
19
+ - `/impl.clarify 1-authentication` → Clarify that area
20
+ - `/impl.clarify 1.2` → Clarify that task group
21
+ - `/impl.clarify 1.2.3` → Clarify that specific task
22
+
23
+ If no argument provided, first analyze the existing specs to identify areas that could benefit from clarification, then ask:
24
+
25
+ > **Current Implementation Structure:**
26
+ >
27
+ > [List areas with brief assessment of clarity]
28
+ >
29
+ > **Areas that may need clarification:**
30
+ > - [Area/task group with vague goals or missing acceptance criteria]
31
+ > - [Area/task group with unclear dependencies]
32
+ >
33
+ > Which would you like to clarify? You can specify:
34
+ > - An area (e.g., `1-authentication`)
35
+ > - A task group (e.g., `1.2`)
36
+ > - A specific task (e.g., `1.2.3`)
37
+
38
+ Wait for the user to specify what to clarify.
39
+
40
+ ## 3. Analyze Current Content
41
+
42
+ Once a scope is identified, read the relevant files and analyze for clarity issues:
43
+
44
+ ### For Area Scope
45
+
46
+ Read `docs/implementation/{N}-{area}/index.md` and all task group files within.
47
+
48
+ Look for:
49
+ - Vague or missing area goals
50
+ - Task groups without clear scope boundaries
51
+ - Missing or incomplete key considerations
52
+ - Unclear relationships between task groups
53
+
54
+ ### For Task Group Scope
55
+
56
+ Read `docs/implementation/{N}-{area}/{N}.{M}-topic.md`.
57
+
58
+ Look for:
59
+ - Vague task group goals
60
+ - Tasks without clear acceptance criteria
61
+ - Missing or unclear approach descriptions
62
+ - Undocumented dependencies
63
+ - Tasks that seem too large or too small
64
+
65
+ ### For Task Scope
66
+
67
+ Read the specific task within its task group file.
68
+
69
+ Look for:
70
+ - Goal that doesn't clearly state what "done" means
71
+ - Missing or vague acceptance criteria
72
+ - Approach that lacks technical specificity
73
+ - Missing dependencies on other tasks
74
+
75
+ ## 4. Present Findings
76
+
77
+ Summarize the current content and what needs clarification:
78
+
79
+ > **Current [Area/Task Group/Task]:**
80
+ >
81
+ > [Quote or summarize the current content]
82
+ >
83
+ > **Areas needing clarification:**
84
+ > - [Specific issue 1]
85
+ > - [Specific issue 2]
86
+
87
+ ## 5. Ask Targeted Questions
88
+
89
+ Ask 1-3 specific questions to draw out more detail. Tailor questions to what's unclear:
90
+
91
+ **Goals:**
92
+ - "What specific outcome does this [area/task group/task] produce?"
93
+ - "How does this map to the PRD goals?"
94
+ - "What would be different in the codebase when this is complete?"
95
+
96
+ **Acceptance Criteria:**
97
+ - "How would you verify this task is complete?"
98
+ - "What specific behavior should be testable?"
99
+ - "Are there edge cases that need to be handled?"
100
+
101
+ **Approach:**
102
+ - "What's the high-level technical strategy here?"
103
+ - "Are there specific patterns or libraries you want to use?"
104
+ - "What files or modules will this touch?"
105
+
106
+ **Dependencies:**
107
+ - "Does this require any other tasks to be completed first?"
108
+ - "What other tasks depend on this being done?"
109
+ - "Are there external dependencies (APIs, services) to consider?"
110
+
111
+ **Scope:**
112
+ - "This task seems broad — should it be broken into smaller tasks?"
113
+ - "This seems very specific — is it part of a larger task group?"
114
+
115
+ ## 6. Push Back on Vagueness
116
+
117
+ If the user's answers are vague or unmeasurable, push back:
118
+
119
+ - ❌ "Implement authentication" → ✅ "Create login endpoint that validates credentials against user table and returns JWT token"
120
+ - ❌ "Make it work" → ✅ "Function returns correct result for inputs X, Y, Z as verified by unit tests"
121
+ - ❌ "Handle errors" → ✅ "Invalid input returns 400 with error message; server errors return 500 and log to error tracking"
122
+
123
+ > "That's a good direction, but it's hard to verify completion. What specific behavior or output would you check to confirm this is done?"
124
+
125
+ ## 7. Check for Conflicts
126
+
127
+ As you clarify, watch for conflicts:
128
+
129
+ - Dependencies that create circular references
130
+ - Acceptance criteria that contradict other tasks
131
+ - Scope that overlaps with other task groups
132
+ - Approaches that conflict with stated constraints in the PRD
133
+
134
+ If you spot a conflict:
135
+
136
+ > "I noticed a potential conflict: [describe conflict]. Should we adjust one of these?"
137
+
138
+ ## 8. Propose Updated Content
139
+
140
+ After gathering more detail, propose the updated spec:
141
+
142
+ > **Proposed [Area/Task Group/Task]:**
143
+ >
144
+ > [Show the proposed updated content in full]
145
+ >
146
+ > Does this capture what we discussed, or would you like to adjust it?
147
+
148
+ Wait for user approval before proceeding.
149
+
150
+ ## 9. Update the Specs
151
+
152
+ After the user approves the clarified content:
153
+
154
+ 1. Update the relevant file(s) with the new content
155
+ 2. Preserve sections that weren't modified
156
+ 3. Update any related files if dependencies changed
157
+
158
+ ## 10. Report Changes
159
+
160
+ Summarize what was changed:
161
+
162
+ > **Implementation Specs Updated:**
163
+ >
164
+ > **Files modified:**
165
+ > - [File 1]: [brief description of changes]
166
+ >
167
+ > **Sections clarified:**
168
+ > - [Section 1]: [what was improved]
169
+ > - [Section 2]: [what was improved]
170
+ >
171
+ > Would you like to clarify anything else?
172
+
173
+ ## Key Behaviors
174
+
175
+ Throughout this command, maintain these behaviors:
176
+
177
+ - **Analyze before asking** — Review existing specs to identify what's actually unclear
178
+ - **Be specific in questions** — Ask about concrete details, not abstract concepts
179
+ - **Push back on vagueness** — Testable > aspirational
180
+ - **Watch for conflicts** — Dependencies and acceptance criteria should be consistent
181
+ - **Propose, don't impose** — Show proposed changes and wait for approval
182
+ - **One scope at a time** — Don't overwhelm with too many changes at once
183
+ - **Map to PRD** — Ensure implementation details align with stated goals and constraints
@@ -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