@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.
- package/CHANGELOG.md +12 -0
- package/assets/agents/coder.md +162 -0
- package/assets/agents/orchestrator.md +416 -0
- package/assets/agents/reviewer.md +192 -0
- package/assets/agents/writer.md +364 -0
- package/assets/icons/flow-notification-icon.png +0 -0
- package/assets/icons/flow-notification-icon.svg +17 -0
- package/assets/knowledge/data/sql.md +216 -0
- package/assets/knowledge/guides/saas-template.md +85 -0
- package/assets/knowledge/guides/system-prompt.md +344 -0
- package/assets/knowledge/guides/tech-stack.md +92 -0
- package/assets/knowledge/guides/ui-ux.md +44 -0
- package/assets/knowledge/stacks/nextjs-app.md +165 -0
- package/assets/knowledge/stacks/node-api.md +220 -0
- package/assets/knowledge/stacks/react-app.md +232 -0
- package/assets/knowledge/universal/deployment.md +109 -0
- package/assets/knowledge/universal/performance.md +121 -0
- package/assets/knowledge/universal/security.md +79 -0
- package/assets/knowledge/universal/testing.md +111 -0
- package/assets/output-styles/silent.md +23 -0
- package/assets/rules/code-standards.md +346 -0
- package/assets/rules/core.md +189 -0
- package/assets/slash-commands/commit.md +23 -0
- package/assets/slash-commands/context.md +112 -0
- package/assets/slash-commands/explain.md +35 -0
- package/assets/slash-commands/review.md +39 -0
- package/assets/slash-commands/test.md +30 -0
- package/package.json +4 -2
- package/src/commands/flow-orchestrator.ts +17 -10
- package/src/core/state-detector.ts +11 -2
|
@@ -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.
|
|
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
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
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
|
-
//
|
|
113
|
-
if (
|
|
114
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
104
|
+
|
|
105
|
+
// Check slash commands
|
|
97
106
|
await this.checkComponent('slashCommands', '.claude/commands', '*.md', state);
|
|
98
107
|
}
|
|
99
108
|
|