@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 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: Continue incomplete work - find gaps, finish features, fix what's broken
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
- Find what's incomplete. Finish it.
9
+ **Goal: Production-grade, not MVP.** Perfect architecture. Perfect naming. No workarounds.
10
10
 
11
- ## Mandate
11
+ ## Think From Every Perspective
12
12
 
13
- * **Think, don't checklist.** Understand the project first. What is it trying to do? What would "done" look like?
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
- ## How to Find Incomplete Work
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 grep for TODO and call it done. Incomplete work hides in:
22
+ Don't checklist. Actually **inhabit** each perspective and feel the friction.
21
23
 
22
- **What's explicitly unfinished** — Yes, scan for TODO/FIXME/HACK. But ask: why are they there? What was the person avoiding?
24
+ ## Delegate for Collective Wisdom
23
25
 
24
- **What's implicitly broken** Code that "works" but:
25
- - Fails silently (empty catch blocks, swallowed errors)
26
- - Works only in happy path (no validation, no edge cases)
27
- - Works but confuses users (unclear errors, missing feedback)
28
- - Works but can't be debugged (no logs, no context)
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
- **What's missing entirely** Features referenced but not implemented. UI that leads nowhere. Promises in docs that code doesn't deliver.
32
+ You are the **Final Gate**. Synthesize their findings. Verify. Decide. Execute.
31
33
 
32
- ## The Real Test
34
+ ## Invoke Skills
33
35
 
34
- For each part of the system, ask:
36
+ Before fixing, load guidelines for relevant domains. Skills contain tech stack decisions, non-negotiables, patterns.
35
37
 
36
- > "If I were a user trying to accomplish their goal, where would I get stuck?"
38
+ ## Fix Completely
37
39
 
38
- > "If this broke at 3am, could someone figure out why?"
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: "Did my fixes introduce new gaps? Did fixing X reveal Y was also broken?"
44
+ After fixing: Are there new gaps? Did fixing X reveal Y was also broken?
73
45
 
74
- If yes → run `/continue` again. If no Critical/High issues remain → done.
46
+ If yes → `/continue` again. Keep iterating until production-grade.
75
47
 
76
48
  ## Output
77
49
 
78
50
  ```
79
- ## What I Found
51
+ ## Perspectives Explored
52
+ [Which personas, what gaps found from each]
80
53
 
81
- [Describe the gaps discovered — not a checklist, but an understanding of what's incomplete and why]
54
+ ## Fixed
55
+ [Changes made and why they're production-ready]
82
56
 
83
- ## What I Fixed
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
- * **Understand first.** Absorb the principles, then apply judgment.
16
- * **Think like the failure mode.** Security? Think like an attacker. Performance? Think like a slow network. Auth? Think like a confused user.
17
- * **Delegate workers** for parallel research. You synthesize and verify.
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
- ## Skills (Guidelines)
19
+ ## Execution
21
20
 
22
- **Skills contain implementation guidelines** — tech stack decisions, non-negotiables, patterns, anti-patterns for each domain.
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
- Available skills:
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
- **You MUST invoke relevant skills** using the Skill tool before reviewing. This loads the guidelines for that domain.
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
- [How this is implemented. Architecture, choices, tradeoffs.]
39
+ [Architecture, choices, tradeoffs]
36
40
 
37
41
  ### Issues
38
- [What's wrong and why it matters]
42
+ [What's wrong and why]
39
43
 
40
44
  ### Fixed
41
45
  [Changes made]
42
46
 
43
- ### Remaining
44
- [Needs human decision or blocked]
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.1",
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 { targetManager } from './target-manager.js';
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 = typeof targetOrId === 'string' ? this.resolveTarget(targetOrId) : targetOrId;
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 = this.resolveTarget(targetId);
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 { targetManager } from './target-manager.js';
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 = typeof targetOrId === 'string' ? this.resolveTarget(targetOrId) : targetOrId;
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 = typeof targetOrId === 'string' ? this.resolveTarget(targetOrId) : targetOrId;
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
+ }
@@ -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