@sylphx/flow 2.18.1 → 2.18.3
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 +14 -0
- package/assets/slash-commands/continue.md +31 -63
- package/assets/slash-commands/review.md +17 -13
- package/package.json +1 -1
- package/src/core/backup-manager.ts +3 -14
- package/src/core/secrets-manager.ts +3 -14
- package/src/core/target-resolver.ts +28 -0
- package/src/utils/index.ts +1 -5
- package/src/utils/functional/array.ts +0 -355
- package/src/utils/functional/index.ts +0 -15
- package/src/utils/functional/object.ts +0 -279
- package/src/utils/functional/string.ts +0 -281
- package/src/utils/functional.ts +0 -543
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 2.18.3 (2025-12-18)
|
|
4
|
+
|
|
5
|
+
### ♻️ Refactoring
|
|
6
|
+
|
|
7
|
+
- **commands:** /continue as product thinking, not code checklist ([4f9cb0f](https://github.com/SylphxAI/flow/commit/4f9cb0f8eb3e0afca67b005bc94362d3582c6395))
|
|
8
|
+
|
|
9
|
+
## 2.18.2 (2025-12-18)
|
|
10
|
+
|
|
11
|
+
### ♻️ Refactoring
|
|
12
|
+
|
|
13
|
+
- **commands:** align /review with /continue - skills as step 1 ([b700fa5](https://github.com/SylphxAI/flow/commit/b700fa5272d6a656cd88acf94e3851cf31d29727))
|
|
14
|
+
- **commands:** simplify /continue - half the length, skills in execution flow ([b04facb](https://github.com/SylphxAI/flow/commit/b04facb60138155b0e203ac6fbf3f03d5252f226))
|
|
15
|
+
- **core:** remove dead code and consolidate duplications ([ee54d3f](https://github.com/SylphxAI/flow/commit/ee54d3f885f8e7a7011e39d95e5403c70fa595be))
|
|
16
|
+
|
|
3
17
|
## 2.18.1 (2025-12-18)
|
|
4
18
|
|
|
5
19
|
### 🐛 Bug Fixes
|
|
@@ -1,94 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: continue
|
|
3
|
-
description:
|
|
3
|
+
description: Iterate toward production-grade - find gaps from every angle, fix completely
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Continue
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Goal: Production-grade, not MVP.** Perfect architecture. Perfect naming. No workarounds.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Think From Every Perspective
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
* **Delegate workers** for parallel research. You synthesize and verify.
|
|
15
|
-
* **Fix, don't report.** Implement solutions directly.
|
|
16
|
-
* **One pass.** No deferrals. Complete each fix fully.
|
|
13
|
+
Simulate being each persona. What's missing? What's frustrating? What breaks?
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
- **New user** — First impression, onboarding, can they succeed without docs?
|
|
16
|
+
- **Power user** — Edge cases, advanced flows, what's limiting them?
|
|
17
|
+
- **Developer** — Is the code maintainable? Clear naming? Good abstractions?
|
|
18
|
+
- **Admin** — Can they manage users, debug issues, see what's happening?
|
|
19
|
+
- **Attacker** — Where are the security holes? What can be exploited?
|
|
20
|
+
- **3am oncall** — If it breaks, can they diagnose it? Are there logs? Alerts?
|
|
19
21
|
|
|
20
|
-
Don't
|
|
22
|
+
Don't checklist. Actually **inhabit** each perspective and feel the friction.
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
## Delegate for Collective Wisdom
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
26
|
+
Spawn multiple agents in parallel to ultrathink from different angles:
|
|
27
|
+
- One agent: user experience gaps
|
|
28
|
+
- One agent: security & trust gaps
|
|
29
|
+
- One agent: architecture & code quality gaps
|
|
30
|
+
- One agent: operability & observability gaps
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
You are the **Final Gate**. Synthesize their findings. Verify. Decide. Execute.
|
|
31
33
|
|
|
32
|
-
##
|
|
34
|
+
## Invoke Skills
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
Before fixing, load guidelines for relevant domains. Skills contain tech stack decisions, non-negotiables, patterns.
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
## Fix Completely
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
> "If requirements changed tomorrow, what would be painful to modify?"
|
|
41
|
-
|
|
42
|
-
> "If we had 100x traffic, what would fall over first?"
|
|
43
|
-
|
|
44
|
-
These questions reveal incompleteness that checklists miss.
|
|
45
|
-
|
|
46
|
-
## Execution
|
|
47
|
-
|
|
48
|
-
1. **Understand the project** — Read README, main entry points, core flows. What is this thing supposed to do?
|
|
49
|
-
|
|
50
|
-
2. **Walk the critical paths** — Trace actual user journeys through code. Where does the path get uncertain, error-prone, or incomplete?
|
|
51
|
-
|
|
52
|
-
3. **Find the gaps** — Not just TODOs, but:
|
|
53
|
-
- Dead ends (code that starts something but doesn't finish)
|
|
54
|
-
- Weak spots (minimal implementation that will break under pressure)
|
|
55
|
-
- Missing pieces (what's referenced but doesn't exist)
|
|
56
|
-
|
|
57
|
-
4. **Prioritize by impact** — What blocks users? What causes data loss? What makes debugging impossible? Fix those first.
|
|
58
|
-
|
|
59
|
-
5. **Fix completely** — Don't patch. Understand root cause. Implement proper solution. Test it works.
|
|
60
|
-
|
|
61
|
-
## Skills (Guidelines)
|
|
62
|
-
|
|
63
|
-
**Skills contain implementation guidelines** — tech stack decisions, non-negotiables, patterns, anti-patterns for each domain.
|
|
64
|
-
|
|
65
|
-
Available skills:
|
|
66
|
-
auth, account-security, privacy, billing, pricing, ledger, security, trust-safety, uiux, seo, pwa, performance, i18n, database, data-architecture, storage, observability, operability, delivery, growth, referral, support, admin, discovery, code-quality
|
|
67
|
-
|
|
68
|
-
**You MUST invoke relevant skills** using the Skill tool before fixing. This loads the guidelines for that domain.
|
|
40
|
+
No workarounds. No "good enough". Each fix should be the **final implementation** — production-ready, battle-tested quality.
|
|
69
41
|
|
|
70
42
|
## Loop
|
|
71
43
|
|
|
72
|
-
After fixing:
|
|
44
|
+
After fixing: Are there new gaps? Did fixing X reveal Y was also broken?
|
|
73
45
|
|
|
74
|
-
If yes →
|
|
46
|
+
If yes → `/continue` again. Keep iterating until production-grade.
|
|
75
47
|
|
|
76
48
|
## Output
|
|
77
49
|
|
|
78
50
|
```
|
|
79
|
-
##
|
|
51
|
+
## Perspectives Explored
|
|
52
|
+
[Which personas, what gaps found from each]
|
|
80
53
|
|
|
81
|
-
|
|
54
|
+
## Fixed
|
|
55
|
+
[Changes made and why they're production-ready]
|
|
82
56
|
|
|
83
|
-
##
|
|
84
|
-
|
|
85
|
-
- [Description of fix and why it matters]
|
|
86
|
-
|
|
87
|
-
## What Remains
|
|
88
|
-
|
|
89
|
-
- [Issues that need human decision or are blocked]
|
|
57
|
+
## Remains
|
|
58
|
+
[Needs human decision or blocked]
|
|
90
59
|
|
|
91
60
|
## Next
|
|
92
|
-
|
|
93
|
-
[/continue again | done]
|
|
61
|
+
[/continue | production-ready]
|
|
94
62
|
```
|
|
@@ -12,19 +12,23 @@ args:
|
|
|
12
12
|
|
|
13
13
|
## Mandate
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* **Fix, don't report.** Implement solutions directly.
|
|
15
|
+
- **Think like the failure mode.** Security → attacker. Performance → slow network. Auth → confused user.
|
|
16
|
+
- **Delegate workers** for parallel research. You synthesize and verify.
|
|
17
|
+
- **Fix, don't report.** Implement solutions directly.
|
|
19
18
|
|
|
20
|
-
##
|
|
19
|
+
## Execution
|
|
21
20
|
|
|
22
|
-
**
|
|
21
|
+
1. **Invoke skills** — Load guidelines for relevant domains:
|
|
22
|
+
```
|
|
23
|
+
auth, account-security, billing, security, database, performance, observability...
|
|
24
|
+
```
|
|
25
|
+
Skills contain: tech stack decisions, non-negotiables, patterns, anti-patterns.
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
auth, account-security, privacy, billing, pricing, ledger, security, trust-safety, uiux, seo, pwa, performance, i18n, database, data-architecture, storage, observability, operability, delivery, growth, referral, support, admin, discovery, code-quality
|
|
27
|
+
2. **Understand** — How is this implemented? Architecture, choices, tradeoffs.
|
|
26
28
|
|
|
27
|
-
**
|
|
29
|
+
3. **Find issues** — What violates the guidelines? What's wrong and why it matters?
|
|
30
|
+
|
|
31
|
+
4. **Fix** — Implement solutions directly.
|
|
28
32
|
|
|
29
33
|
## Output
|
|
30
34
|
|
|
@@ -32,14 +36,14 @@ auth, account-security, privacy, billing, pricing, ledger, security, trust-safet
|
|
|
32
36
|
## Review: [topic]
|
|
33
37
|
|
|
34
38
|
### Understanding
|
|
35
|
-
[
|
|
39
|
+
[Architecture, choices, tradeoffs]
|
|
36
40
|
|
|
37
41
|
### Issues
|
|
38
|
-
[What's wrong and why
|
|
42
|
+
[What's wrong and why]
|
|
39
43
|
|
|
40
44
|
### Fixed
|
|
41
45
|
[Changes made]
|
|
42
46
|
|
|
43
|
-
###
|
|
44
|
-
[Needs human decision
|
|
47
|
+
### Remains
|
|
48
|
+
[Needs human decision]
|
|
45
49
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sylphx/flow",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.3",
|
|
4
4
|
"description": "One CLI to rule them all. Unified orchestration layer for Claude Code, OpenCode, Cursor and all AI development tools. Auto-detection, auto-installation, auto-upgrade.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,7 @@ import fs from 'node:fs/promises';
|
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import type { Target } from '../types/target.types.js';
|
|
11
11
|
import type { ProjectManager } from './project-manager.js';
|
|
12
|
-
import {
|
|
12
|
+
import { resolveTarget, resolveTargetOrId } from './target-resolver.js';
|
|
13
13
|
|
|
14
14
|
export interface BackupInfo {
|
|
15
15
|
sessionId: string;
|
|
@@ -69,17 +69,6 @@ export class BackupManager {
|
|
|
69
69
|
this.projectManager = projectManager;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* Resolve target from ID string to Target object
|
|
74
|
-
*/
|
|
75
|
-
private resolveTarget(targetId: string): Target {
|
|
76
|
-
const targetOption = targetManager.getTarget(targetId);
|
|
77
|
-
if (targetOption._tag === 'None') {
|
|
78
|
-
throw new Error(`Unknown target: ${targetId}`);
|
|
79
|
-
}
|
|
80
|
-
return targetOption.value;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
72
|
/**
|
|
84
73
|
* Create full backup of project environment
|
|
85
74
|
*/
|
|
@@ -88,7 +77,7 @@ export class BackupManager {
|
|
|
88
77
|
projectHash: string,
|
|
89
78
|
targetOrId: Target | string
|
|
90
79
|
): Promise<BackupInfo> {
|
|
91
|
-
const target =
|
|
80
|
+
const target = resolveTargetOrId(targetOrId);
|
|
92
81
|
const targetId = target.id;
|
|
93
82
|
const sessionId = `session-${Date.now()}`;
|
|
94
83
|
const timestamp = new Date().toISOString();
|
|
@@ -178,7 +167,7 @@ export class BackupManager {
|
|
|
178
167
|
const targetId = manifest.target;
|
|
179
168
|
|
|
180
169
|
// Resolve target to get config
|
|
181
|
-
const target =
|
|
170
|
+
const target = resolveTarget(targetId);
|
|
182
171
|
|
|
183
172
|
// Get target config directory
|
|
184
173
|
const targetConfigDir = this.projectManager.getTargetConfigDir(projectPath, target);
|
|
@@ -9,7 +9,7 @@ import fs from 'node:fs/promises';
|
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import type { Target } from '../types/target.types.js';
|
|
11
11
|
import type { ProjectManager } from './project-manager.js';
|
|
12
|
-
import {
|
|
12
|
+
import { resolveTargetOrId } from './target-resolver.js';
|
|
13
13
|
|
|
14
14
|
export interface MCPSecrets {
|
|
15
15
|
version: string;
|
|
@@ -30,17 +30,6 @@ export class SecretsManager {
|
|
|
30
30
|
this.projectManager = projectManager;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* Resolve target from ID string to Target object
|
|
35
|
-
*/
|
|
36
|
-
private resolveTarget(targetId: string): Target {
|
|
37
|
-
const targetOption = targetManager.getTarget(targetId);
|
|
38
|
-
if (targetOption._tag === 'None') {
|
|
39
|
-
throw new Error(`Unknown target: ${targetId}`);
|
|
40
|
-
}
|
|
41
|
-
return targetOption.value;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
33
|
/**
|
|
45
34
|
* Extract MCP secrets from project config
|
|
46
35
|
*/
|
|
@@ -49,7 +38,7 @@ export class SecretsManager {
|
|
|
49
38
|
_projectHash: string,
|
|
50
39
|
targetOrId: Target | string
|
|
51
40
|
): Promise<MCPSecrets> {
|
|
52
|
-
const target =
|
|
41
|
+
const target = resolveTargetOrId(targetOrId);
|
|
53
42
|
// configFile is at project root, not in targetDir
|
|
54
43
|
const configPath = path.join(projectPath, target.config.configFile);
|
|
55
44
|
const mcpPath = target.config.mcpConfigPath;
|
|
@@ -145,7 +134,7 @@ export class SecretsManager {
|
|
|
145
134
|
return;
|
|
146
135
|
}
|
|
147
136
|
|
|
148
|
-
const target =
|
|
137
|
+
const target = resolveTargetOrId(targetOrId);
|
|
149
138
|
// configFile is at project root, not in targetDir
|
|
150
139
|
const configPath = path.join(projectPath, target.config.configFile);
|
|
151
140
|
const mcpPath = target.config.mcpConfigPath;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Target Resolver
|
|
3
|
+
* Shared utility for resolving target IDs to Target objects
|
|
4
|
+
* Eliminates duplication across BackupManager and SecretsManager
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Target } from '../types/target.types.js';
|
|
8
|
+
import { targetManager } from './target-manager.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Resolve a target from ID string to Target object
|
|
12
|
+
* @throws Error if target ID is not found
|
|
13
|
+
*/
|
|
14
|
+
export function resolveTarget(targetId: string): Target {
|
|
15
|
+
const targetOption = targetManager.getTarget(targetId);
|
|
16
|
+
if (targetOption._tag === 'None') {
|
|
17
|
+
throw new Error(`Unknown target: ${targetId}`);
|
|
18
|
+
}
|
|
19
|
+
return targetOption.value;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Resolve target, accepting either string ID or Target object
|
|
24
|
+
* Returns the Target object in both cases
|
|
25
|
+
*/
|
|
26
|
+
export function resolveTargetOrId(targetOrId: Target | string): Target {
|
|
27
|
+
return typeof targetOrId === 'string' ? resolveTarget(targetOrId) : targetOrId;
|
|
28
|
+
}
|
package/src/utils/index.ts
CHANGED
|
@@ -37,13 +37,9 @@ export * from './error-handler.js';
|
|
|
37
37
|
export * from './files/file-operations.js';
|
|
38
38
|
export * from './files/sync-utils.js';
|
|
39
39
|
// ============================================================================
|
|
40
|
-
// FUNCTIONAL PROGRAMMING
|
|
41
|
-
// ============================================================================
|
|
42
|
-
export * from './functional.js';
|
|
43
|
-
export * from './security/secret-utils.js';
|
|
44
|
-
// ============================================================================
|
|
45
40
|
// SECURITY
|
|
46
41
|
// ============================================================================
|
|
42
|
+
export * from './security/secret-utils.js';
|
|
47
43
|
export * from './security/security.js';
|
|
48
44
|
// ============================================================================
|
|
49
45
|
// VERSIONING
|