flight-rules 0.15.6 → 0.15.7

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.
@@ -6,7 +6,10 @@ export declare function copyCommandsWithConflictHandling(sourceDir: string, dest
6
6
  skipped: string[];
7
7
  }>;
8
8
  /**
9
- * Copy skill files to a destination directory with conflict handling
9
+ * Copy skill files to a destination directory with conflict handling.
10
+ * Source skills are flat .md files (e.g., web-prototype.md).
11
+ * They are deployed as directories containing SKILL.md (e.g., web-prototype/SKILL.md),
12
+ * which is the format Claude Code expects.
10
13
  */
11
14
  export declare function copySkillsWithConflictHandling(sourceDir: string, destDir: string, skipPrompts?: boolean): Promise<{
12
15
  copied: string[];
@@ -141,7 +141,10 @@ async function promptForConflict(filename, showBatchOptions) {
141
141
  return action;
142
142
  }
143
143
  /**
144
- * Copy skill files to a destination directory with conflict handling
144
+ * Copy skill files to a destination directory with conflict handling.
145
+ * Source skills are flat .md files (e.g., web-prototype.md).
146
+ * They are deployed as directories containing SKILL.md (e.g., web-prototype/SKILL.md),
147
+ * which is the format Claude Code expects.
145
148
  */
146
149
  export async function copySkillsWithConflictHandling(sourceDir, destDir, skipPrompts = false) {
147
150
  const copied = [];
@@ -152,44 +155,47 @@ export async function copySkillsWithConflictHandling(sourceDir, destDir, skipPro
152
155
  const files = readdirSync(sourceDir).filter(f => f.endsWith('.md'));
153
156
  let batchAction = null;
154
157
  for (const file of files) {
158
+ const skillName = file.replace(/\.md$/, '');
155
159
  const srcPath = join(sourceDir, file);
156
- const destPath = join(destDir, file);
160
+ const destSkillDir = join(destDir, skillName);
161
+ const destPath = join(destSkillDir, 'SKILL.md');
157
162
  if (existsSync(destPath)) {
158
163
  if (skipPrompts) {
159
164
  cpSync(srcPath, destPath);
160
- copied.push(file);
165
+ copied.push(skillName);
161
166
  continue;
162
167
  }
163
168
  if (batchAction === 'replace_all') {
164
169
  cpSync(srcPath, destPath);
165
- copied.push(file);
170
+ copied.push(skillName);
166
171
  continue;
167
172
  }
168
173
  else if (batchAction === 'skip_all') {
169
- skipped.push(file);
174
+ skipped.push(skillName);
170
175
  continue;
171
176
  }
172
- const action = await promptForConflict(file, files.length > 1);
177
+ const action = await promptForConflict(skillName, files.length > 1);
173
178
  if (action === 'replace_all') {
174
179
  batchAction = 'replace_all';
175
180
  cpSync(srcPath, destPath);
176
- copied.push(file);
181
+ copied.push(skillName);
177
182
  }
178
183
  else if (action === 'skip_all') {
179
184
  batchAction = 'skip_all';
180
- skipped.push(file);
185
+ skipped.push(skillName);
181
186
  }
182
187
  else if (action === 'replace') {
183
188
  cpSync(srcPath, destPath);
184
- copied.push(file);
189
+ copied.push(skillName);
185
190
  }
186
191
  else {
187
- skipped.push(file);
192
+ skipped.push(skillName);
188
193
  }
189
194
  }
190
195
  else {
196
+ ensureDir(destSkillDir);
191
197
  cpSync(srcPath, destPath);
192
- copied.push(file);
198
+ copied.push(skillName);
193
199
  }
194
200
  }
195
201
  return { copied, skipped };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flight-rules",
3
- "version": "0.15.6",
3
+ "version": "0.15.7",
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.15.6
3
+ flight_rules_version: 0.15.7
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