@sylphx/flow 1.0.4 → 1.0.6

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.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Review code for quality, security, and best practices
3
+ ---
4
+
5
+ # Code Review
6
+
7
+ ## Context
8
+
9
+ $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ Review the code above (or at the specified location) and provide feedback on:
14
+
15
+ 1. **Code Quality**
16
+ - Readability and maintainability
17
+ - Code organization and structure
18
+ - Naming conventions
19
+ - Comments and documentation
20
+
21
+ 2. **Security**
22
+ - Potential vulnerabilities
23
+ - Input validation
24
+ - Authentication/authorization issues
25
+ - Data exposure risks
26
+
27
+ 3. **Performance**
28
+ - Algorithmic efficiency
29
+ - Resource usage
30
+ - Potential bottlenecks
31
+ - Scalability concerns
32
+
33
+ 4. **Best Practices**
34
+ - Language-specific idioms
35
+ - Design patterns
36
+ - Error handling
37
+ - Testing coverage
38
+
39
+ Provide specific, actionable suggestions for improvement.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Write comprehensive tests for code
3
+ ---
4
+
5
+ # Write Tests
6
+
7
+ ## Context
8
+
9
+ $ARGUMENTS
10
+
11
+ ## Your Task
12
+
13
+ Write comprehensive tests for the code above (or at the specified location) that include:
14
+
15
+ 1. **Unit Tests**
16
+ - Test individual functions/methods
17
+ - Cover edge cases and boundary conditions
18
+ - Test error handling
19
+
20
+ 2. **Integration Tests** (if applicable)
21
+ - Test component interactions
22
+ - Test with realistic data
23
+
24
+ 3. **Test Coverage**
25
+ - Aim for high coverage of critical paths
26
+ - Include positive and negative test cases
27
+ - Test validation and error conditions
28
+
29
+ Use the project's existing testing framework and follow its conventions.
30
+ Ensure tests are readable, maintainable, and properly documented.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "AI-powered development workflow automation with autonomous loop mode and smart configuration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,7 +14,8 @@
14
14
  "start": "bun src/index.ts",
15
15
  "test": "vitest run",
16
16
  "test:watch": "vitest",
17
- "type-check": "tsc --noEmit"
17
+ "type-check": "tsc --noEmit",
18
+ "prepublishOnly": "rm -rf assets && cp -r ../../assets assets"
18
19
  },
19
20
  "dependencies": {
20
21
  "commander": "^14.0.2",
@@ -38,6 +39,7 @@
38
39
  },
39
40
  "files": [
40
41
  "src",
42
+ "assets",
41
43
  "README.md",
42
44
  "CHANGELOG.md",
43
45
  "LOOP_MODE.md",
@@ -99,22 +99,29 @@ export async function checkComponentIntegrity(
99
99
 
100
100
  // Find missing components (target-aware)
101
101
  const missing: string[] = [];
102
+
103
+ // Agents are always required
102
104
  if (!state.components.agents.installed) missing.push('agents');
103
- if (!state.components.rules.installed) missing.push('rules');
104
105
 
105
- // Only check hooks for Claude Code (OpenCode doesn't have separate hooks)
106
- if (state.target !== 'opencode' && !state.components.hooks.installed) {
107
- missing.push('hooks');
106
+ // For OpenCode: check rules (separate AGENTS.md file)
107
+ // For Claude Code: rules are included in agent files, so skip this check
108
+ if (state.target === 'opencode' && !state.components.rules.installed) {
109
+ missing.push('rules');
108
110
  }
109
111
 
110
- if (!state.components.mcp.installed) missing.push('mcp');
112
+ // Hooks are optional - don't check
113
+ // Claude Code can have hooks in .claude/hooks/*.js but they're optional
114
+ // OpenCode doesn't have separate hooks
111
115
 
112
- // Only check output styles for Claude Code (OpenCode uses AGENTS.md)
113
- if (state.target !== 'opencode' && !state.components.outputStyles.installed) {
114
- missing.push('output styles');
115
- }
116
+ // MCP is optional now - many users don't use MCP
117
+ // if (!state.components.mcp.installed) missing.push('mcp');
118
+
119
+ // Output styles:
120
+ // - Claude Code: included in agent files, so skip check
121
+ // - OpenCode: included in AGENTS.md, so skip check
116
122
 
117
- if (!state.components.slashCommands.installed) missing.push('slash commands');
123
+ // Slash commands are optional
124
+ // if (!state.components.slashCommands.installed) missing.push('slash commands');
118
125
 
119
126
  // If no missing components, we're good
120
127
  if (missing.length === 0) return;
@@ -91,9 +91,18 @@ export class StateDetector {
91
91
  } else {
92
92
  // Claude Code (default)
93
93
  await this.checkComponent('agents', '.claude/agents', '*.md', state);
94
- await this.checkComponent('rules', '.claude/rules', '*.md', state);
94
+
95
+ // Claude Code includes rules and output styles in agent files
96
+ // So we mark them as installed if agents are installed
97
+ state.components.rules.installed = state.components.agents.installed;
98
+ state.components.rules.count = state.components.agents.count;
99
+
100
+ state.components.outputStyles.installed = state.components.agents.installed;
101
+
102
+ // Check hooks (optional for Claude Code)
95
103
  await this.checkComponent('hooks', '.claude/hooks', '*.js', state);
96
- await this.checkComponent('outputStyles', '.claude/output-styles', '*.md', state);
104
+
105
+ // Check slash commands
97
106
  await this.checkComponent('slashCommands', '.claude/commands', '*.md', state);
98
107
  }
99
108