@sylphx/flow 1.4.15 → 1.4.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 1.4.16
4
+
5
+ ### Patch Changes
6
+
7
+ - 54ad8ff: Fix agent enhancement by reading rules before transformation (CRITICAL):
8
+ - Rules field was read AFTER transformation (which strips it for Claude Code)
9
+ - Now reads rules from original content BEFORE transformation
10
+ - Rules field correctly stripped in final output (Claude Code doesn't use it)
11
+ - Fixes: only core.md was loaded, code-standards and workspace were ignored
12
+
3
13
  ## 1.4.15
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "1.4.15",
3
+ "version": "1.4.16",
4
4
  "description": "AI-powered development workflow automation with autonomous loop mode and smart configuration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -438,13 +438,13 @@ Please begin your response with a comprehensive summary of all the instructions
438
438
  getAgentsDir(),
439
439
  agentsDir,
440
440
  async (content, sourcePath) => {
441
- // Transform agent content (add YAML front matter, etc.)
442
- const transformed = await this.transformAgentContent(content, undefined, sourcePath);
443
-
444
- // Extract rules from frontmatter to pass to enhancer
445
- const { metadata } = await yamlUtils.extractFrontMatter(transformed);
441
+ // Extract rules from ORIGINAL content before transformation
442
+ const { metadata } = await yamlUtils.extractFrontMatter(content);
446
443
  const rules = metadata.rules as string[] | undefined;
447
444
 
445
+ // Transform agent content (converts to Claude Code format, strips unsupported fields)
446
+ const transformed = await this.transformAgentContent(content, undefined, sourcePath);
447
+
448
448
  // Enhance with rules and output styles
449
449
  const enhanced = await enhanceAgentContent(transformed, rules);
450
450
 
@@ -558,16 +558,11 @@ function convertToClaudeCodeFormat(
558
558
  result.model = openCodeMetadata.model;
559
559
  }
560
560
 
561
- // Preserve rules field (needed for agent enhancement)
562
- if (openCodeMetadata.rules && Array.isArray(openCodeMetadata.rules)) {
563
- result.rules = openCodeMetadata.rules;
564
- }
565
-
566
561
  // Remove unsupported fields that might cause issues
567
562
  // - tools: removed to allow all tools by default
568
- // - mode: not supported by Claude Code (ignored, not in result)
569
- // - temperature: not supported by Claude Code (ignored, not in result)
570
- // - rules: KEPT (needed for enhancement to load correct rule files)
563
+ // - mode: not supported by Claude Code
564
+ // - temperature: not supported by Claude Code
565
+ // - rules: removed (only used during enhancement, not by Claude Code)
571
566
 
572
567
  return result;
573
568
  }