@sylphx/flow 3.5.0 → 3.6.1
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/builder.md +8 -0
- package/assets/slash-commands/audit.md +17 -8
- package/assets/slash-commands/catchup.md +7 -0
- package/assets/slash-commands/challenge.md +19 -10
- package/assets/slash-commands/e2e-audit.md +6 -0
- package/assets/slash-commands/excellence.md +7 -5
- package/assets/slash-commands/product.md +8 -0
- package/assets/slash-commands/refactor.md +38 -37
- package/assets/slash-commands/sweep.md +124 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 3.6.1 (2026-01-28)
|
|
4
|
+
|
|
5
|
+
### ♻️ Refactoring
|
|
6
|
+
|
|
7
|
+
- comprehensive review of all commands and builder ([73b103a](https://github.com/SylphxAI/flow/commit/73b103a4d6901079408d9e4e0237cad4e4087f14))
|
|
8
|
+
|
|
9
|
+
## 3.6.0 (2026-01-28)
|
|
10
|
+
|
|
11
|
+
### ✨ Features
|
|
12
|
+
|
|
13
|
+
- add /sweep command for propagating improvements ([ba58697](https://github.com/SylphxAI/flow/commit/ba58697eddabb4b851f7d46bf56cb83930d9a3c5))
|
|
14
|
+
|
|
3
15
|
## 3.5.0 (2026-01-28)
|
|
4
16
|
|
|
5
17
|
### ✨ Features
|
package/assets/agents/builder.md
CHANGED
|
@@ -145,6 +145,14 @@ Vercel CLI, Neon CLI, GitHub CLI
|
|
|
145
145
|
* Data presentation must use Data Tables
|
|
146
146
|
* Large datasets require cursor-based pagination, virtualization, and infinite scrolling
|
|
147
147
|
|
|
148
|
+
## Public-Facing & Exposure
|
|
149
|
+
|
|
150
|
+
* SEO — proper title tags, meta descriptions, structured data, sitemap
|
|
151
|
+
* Social sharing — OG tags, Twitter cards for all public pages
|
|
152
|
+
* README — clear value prop, quick start, badges, screenshots
|
|
153
|
+
* Landing page — value prop above the fold, clear CTA, social proof
|
|
154
|
+
* Documentation — complete, searchable, up-to-date
|
|
155
|
+
|
|
148
156
|
## Delivery
|
|
149
157
|
|
|
150
158
|
The final delivered version must be flawless, high-performance, and represent the absolute pinnacle of quality.
|
|
@@ -12,16 +12,16 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
|
|
|
12
12
|
## Scan Areas
|
|
13
13
|
|
|
14
14
|
### 1. Code Quality
|
|
15
|
-
- Dead code, unused imports,
|
|
15
|
+
- Dead code, unused imports, unreachable code
|
|
16
16
|
- TODOs, FIXMEs, HACKs left in code
|
|
17
|
-
- `any
|
|
17
|
+
- Weak typing (`any`, missing types, unsafe casts)
|
|
18
18
|
- Hardcoded values that should be config
|
|
19
|
-
-
|
|
20
|
-
- Copy-paste duplication
|
|
21
|
-
-
|
|
22
|
-
- Missing error handling
|
|
23
|
-
-
|
|
24
|
-
- Outdated
|
|
19
|
+
- Debug artifacts in production (console.logs, commented code)
|
|
20
|
+
- Copy-paste duplication (DRY violations)
|
|
21
|
+
- Overly complex functions/files (hard to understand at a glance)
|
|
22
|
+
- Missing or inconsistent error handling
|
|
23
|
+
- Naming that doesn't convey intent
|
|
24
|
+
- Outdated or vulnerable dependencies
|
|
25
25
|
|
|
26
26
|
### 2. Business Logic Correctness
|
|
27
27
|
|
|
@@ -96,6 +96,15 @@ Scan the entire project for issues. Find problems, don't fix them. Open GitHub i
|
|
|
96
96
|
- Missing type definitions
|
|
97
97
|
- Confusing folder structure
|
|
98
98
|
|
|
99
|
+
### 9. Public-Facing & Exposure
|
|
100
|
+
- **SEO**: Missing/poor title tags, meta descriptions, structured data
|
|
101
|
+
- **Social Sharing**: Missing OG tags, Twitter cards, poor share previews
|
|
102
|
+
- **Landing/Home**: Unclear value prop above the fold, weak CTAs
|
|
103
|
+
- **README**: Missing badges, unclear quick start, no screenshots
|
|
104
|
+
- **Docs**: Incomplete, outdated, hard to navigate
|
|
105
|
+
- **Analytics**: Missing tracking, no conversion funnels
|
|
106
|
+
- **Branding**: Inconsistent voice, visuals, messaging
|
|
107
|
+
|
|
99
108
|
## Process
|
|
100
109
|
|
|
101
110
|
1. **Scan** each area systematically
|
|
@@ -48,6 +48,13 @@ gh issue list --state open --limit 20
|
|
|
48
48
|
gh pr list --state open --limit 10
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
### Business & Marketing Strategy
|
|
52
|
+
- What's the monetization model? Is it working?
|
|
53
|
+
- Who are the competitors? How does this differentiate?
|
|
54
|
+
- What's the go-to-market strategy?
|
|
55
|
+
- How are users being acquired? (SEO, social, paid, referral)
|
|
56
|
+
- What public-facing assets exist? (landing page, blog, socials)
|
|
57
|
+
|
|
51
58
|
### Branch Analysis
|
|
52
59
|
```bash
|
|
53
60
|
git branch -a
|
|
@@ -11,8 +11,8 @@ Stop. Step back. Challenge everything you just did.
|
|
|
11
11
|
|
|
12
12
|
### 1. State of the Art?
|
|
13
13
|
- Would industry experts approve this implementation?
|
|
14
|
-
- Does it follow current best practices
|
|
15
|
-
- Is this how top engineers
|
|
14
|
+
- Does it follow current best practices?
|
|
15
|
+
- Is this how top engineers would solve it?
|
|
16
16
|
- Are you using modern APIs, patterns, and approaches?
|
|
17
17
|
|
|
18
18
|
### 2. Correct Approach or Workaround?
|
|
@@ -21,21 +21,30 @@ Stop. Step back. Challenge everything you just did.
|
|
|
21
21
|
- Would you be embarrassed if a senior engineer reviewed this?
|
|
22
22
|
- Is there technical debt being created?
|
|
23
23
|
|
|
24
|
-
### 3.
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
24
|
+
### 3. Business Logic Sound?
|
|
25
|
+
- Does this make sense from a business perspective?
|
|
26
|
+
- Are edge cases handled correctly for real-world scenarios?
|
|
27
|
+
- Would domain experts find issues with this logic?
|
|
28
|
+
- Does it handle regional/locale differences correctly?
|
|
29
|
+
|
|
30
|
+
### 4. Clean & Complete?
|
|
31
|
+
- Zero dead code, unused imports, TODOs?
|
|
29
32
|
- All edge cases handled?
|
|
30
|
-
- Error handling complete?
|
|
33
|
+
- Error handling complete and user-friendly?
|
|
34
|
+
- No debug artifacts left behind?
|
|
31
35
|
|
|
32
|
-
###
|
|
36
|
+
### 5. Human Experience?
|
|
33
37
|
- Is the UX intuitive? Would a user understand without explanation?
|
|
34
38
|
- Are error messages helpful and actionable?
|
|
35
39
|
- Is the UI responsive and accessible?
|
|
36
40
|
- Does it feel polished, not janky?
|
|
37
41
|
|
|
38
|
-
###
|
|
42
|
+
### 6. Impact Beyond Code?
|
|
43
|
+
- Does this affect public-facing content (SEO, OG tags, docs)?
|
|
44
|
+
- Should README or documentation be updated?
|
|
45
|
+
- Are there marketing/exposure implications?
|
|
46
|
+
|
|
47
|
+
### 7. Better Way?
|
|
39
48
|
- What would you do differently with unlimited time?
|
|
40
49
|
- Is there a simpler solution you overlooked?
|
|
41
50
|
- Could this be more elegant?
|
|
@@ -46,6 +46,12 @@ mcp__playwright__browser_snapshot - Get current page state
|
|
|
46
46
|
- [ ] Boundary values (min/max)
|
|
47
47
|
- [ ] Invalid inputs
|
|
48
48
|
|
|
49
|
+
**Public-Facing Pages:**
|
|
50
|
+
- [ ] Landing/home page — value prop clear? CTA works?
|
|
51
|
+
- [ ] Pricing page — accurate? Links work?
|
|
52
|
+
- [ ] Docs/help — accessible? Search works?
|
|
53
|
+
- [ ] Social sharing — OG previews correct? Links work?
|
|
54
|
+
|
|
49
55
|
### 3. Test Business Logic
|
|
50
56
|
|
|
51
57
|
**Region/Locale Consistency:**
|
|
@@ -50,11 +50,13 @@ Based on this specific project's nature, determine what "excellence" means here.
|
|
|
50
50
|
- Are there obvious bottlenecks?
|
|
51
51
|
- Would performance engineers approve?
|
|
52
52
|
|
|
53
|
-
### Public-Facing
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
53
|
+
### Public-Facing & Exposure
|
|
54
|
+
- **First Impression**: Would someone landing here be impressed or confused?
|
|
55
|
+
- **SEO/Discoverability**: Can people find this? Are meta tags, titles, descriptions optimized?
|
|
56
|
+
- **Social Sharing**: Do OG tags, Twitter cards make people want to click?
|
|
57
|
+
- **README/Docs**: World-class or bare minimum? Would it make someone star/fork?
|
|
58
|
+
- **Landing Page**: Does it convert? Is the value prop crystal clear?
|
|
59
|
+
- **Branding**: Consistent, professional, memorable?
|
|
58
60
|
|
|
59
61
|
## Process
|
|
60
62
|
|
|
@@ -87,6 +87,14 @@ Evaluate product design holistically — from user experience to business impact
|
|
|
87
87
|
- What's missing in the market that we could own?
|
|
88
88
|
- If a user tried competitor after us, would they come back? Why?
|
|
89
89
|
|
|
90
|
+
## 6. Public-Facing & Exposure
|
|
91
|
+
|
|
92
|
+
- **Landing Page**: Does it convert? Value prop clear in 5 seconds?
|
|
93
|
+
- **SEO**: Are we discoverable? Right keywords targeted?
|
|
94
|
+
- **Social Sharing**: Do shared links look compelling? OG tags set?
|
|
95
|
+
- **README**: Would a developer star this? Quick start clear?
|
|
96
|
+
- **Docs**: Can users self-serve? Search works?
|
|
97
|
+
|
|
90
98
|
## Process
|
|
91
99
|
|
|
92
100
|
1. **Walk through** the entire product as each user type
|
|
@@ -5,56 +5,57 @@ description: Deep refactoring - modularity, deduplication, cleanup
|
|
|
5
5
|
|
|
6
6
|
# Refactor: Deep Codebase Improvement
|
|
7
7
|
|
|
8
|
-
Systematically refactor the codebase
|
|
8
|
+
Systematically refactor the codebase toward excellence. The goal is not just clean code, but code that is a joy to work with — maintainable, understandable, and extensible.
|
|
9
|
+
|
|
10
|
+
## Why Refactor?
|
|
11
|
+
|
|
12
|
+
> "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." — Martin Fowler
|
|
13
|
+
|
|
14
|
+
Refactoring is about:
|
|
15
|
+
- **Future velocity** — clean code is faster to change
|
|
16
|
+
- **Bug prevention** — simple code has fewer hiding places for bugs
|
|
17
|
+
- **Onboarding** — new contributors can understand and contribute faster
|
|
18
|
+
- **Pride** — code you'd be proud to show anyone
|
|
9
19
|
|
|
10
20
|
## Targets
|
|
11
21
|
|
|
12
|
-
1. **Dead code** —
|
|
13
|
-
2. **Duplication** —
|
|
14
|
-
3. **
|
|
15
|
-
4. **
|
|
16
|
-
5. **
|
|
17
|
-
6. **
|
|
18
|
-
7. **
|
|
19
|
-
8. **Dependencies** — remove unused deps, update outdated ones
|
|
22
|
+
1. **Dead code** — if it's not used, it's noise
|
|
23
|
+
2. **Duplication** — DRY violations are bug factories
|
|
24
|
+
3. **Complexity** — if it's hard to understand, it's wrong
|
|
25
|
+
4. **Naming** — code should read like well-written prose
|
|
26
|
+
5. **Types** — weak types are hidden bugs waiting to happen
|
|
27
|
+
6. **Structure** — logical organization reduces cognitive load
|
|
28
|
+
7. **Dependencies** — unused deps are attack surface and bloat
|
|
20
29
|
|
|
21
30
|
## Process
|
|
22
31
|
|
|
23
|
-
### Phase 1:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
3. Find TODOs: `grep -r "TODO" --include="*.ts" --include="*.tsx"`
|
|
28
|
-
4. Find large files: files > 300 lines
|
|
29
|
-
5. Find weak types: `any`, missing return types
|
|
32
|
+
### Phase 1: Understand
|
|
33
|
+
- What is the code trying to do?
|
|
34
|
+
- Why was it written this way?
|
|
35
|
+
- What are the dependencies and side effects?
|
|
30
36
|
|
|
31
37
|
### Phase 2: Refactor
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
3. Run tests to verify no regression
|
|
38
|
+
For each improvement:
|
|
39
|
+
1. Understand the context first
|
|
40
|
+
2. Make one logical change
|
|
41
|
+
3. Verify behavior unchanged (tests, manual check)
|
|
37
42
|
4. Commit atomically: `refactor: description`
|
|
38
|
-
5. Push immediately
|
|
39
43
|
|
|
40
44
|
### Phase 3: Verify
|
|
45
|
+
- Tests pass
|
|
46
|
+
- Types check
|
|
47
|
+
- Linter happy
|
|
48
|
+
- Build succeeds
|
|
49
|
+
- Behavior unchanged
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
2. Run type check
|
|
44
|
-
3. Run linter
|
|
45
|
-
4. Verify build succeeds
|
|
46
|
-
|
|
47
|
-
## Rules
|
|
51
|
+
## Principles
|
|
48
52
|
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
+
* **Understand before changing** — never refactor blindly
|
|
54
|
+
* **One change at a time** — atomic commits, easy to revert
|
|
55
|
+
* **Behavior unchanged** — refactor ≠ rewrite
|
|
56
|
+
* **Tests are your safety net** — if no tests, add them first
|
|
57
|
+
* **When in doubt, simplify** — less code is usually better
|
|
53
58
|
|
|
54
59
|
## Exit Condition
|
|
55
60
|
|
|
56
|
-
|
|
57
|
-
* Zero dead code
|
|
58
|
-
* Zero duplication
|
|
59
|
-
* All tests pass
|
|
60
|
-
* All types strict
|
|
61
|
+
The codebase should feel **clean, consistent, and comprehensible**.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sweep
|
|
3
|
+
description: Find and fix all similar patterns across the project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sweep: Propagate Excellence Across the Codebase
|
|
7
|
+
|
|
8
|
+
You just did something — fixed a bug, improved code, optimized something, or established a pattern.
|
|
9
|
+
|
|
10
|
+
Now **sweep** through the entire project and apply the same improvement everywhere it's relevant.
|
|
11
|
+
|
|
12
|
+
## Mindset
|
|
13
|
+
|
|
14
|
+
> "If I fixed this here, where else does the same issue exist?"
|
|
15
|
+
> "If I improved this pattern, where else should it be applied?"
|
|
16
|
+
> "Don't just fix the symptom — eliminate the entire class of problems."
|
|
17
|
+
|
|
18
|
+
**Proactive, not reactive.** One fix should trigger a comprehensive sweep.
|
|
19
|
+
|
|
20
|
+
## Process
|
|
21
|
+
|
|
22
|
+
### 1. Identify What Was Just Done
|
|
23
|
+
- What did you fix, improve, or create?
|
|
24
|
+
- What pattern or principle does it represent?
|
|
25
|
+
- What was wrong with the old approach?
|
|
26
|
+
|
|
27
|
+
### 2. Define the Search Pattern
|
|
28
|
+
- What does "similar" look like?
|
|
29
|
+
- What code patterns indicate the same issue?
|
|
30
|
+
- What files/modules are likely affected?
|
|
31
|
+
|
|
32
|
+
### 3. Sweep the Codebase
|
|
33
|
+
Search systematically:
|
|
34
|
+
```
|
|
35
|
+
- Same file type (*.tsx, *.ts, etc.)
|
|
36
|
+
- Same directory/module
|
|
37
|
+
- Same pattern (hooks, components, utils, etc.)
|
|
38
|
+
- Same anti-pattern being fixed
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 4. Apply the Improvement Everywhere
|
|
42
|
+
For each similar case found:
|
|
43
|
+
- Apply the same fix/improvement
|
|
44
|
+
- Ensure consistency with the original
|
|
45
|
+
- Adapt as needed for context
|
|
46
|
+
|
|
47
|
+
### 5. Verify Completeness
|
|
48
|
+
- Did you catch everything?
|
|
49
|
+
- Run one more search to confirm
|
|
50
|
+
- No stragglers left behind
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
### Code Pattern Sweep
|
|
55
|
+
```
|
|
56
|
+
Fixed: Null check missing in UserProfile
|
|
57
|
+
Sweep: Find all components accessing user data without null checks
|
|
58
|
+
Result: Fixed 12 similar issues across 8 files
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Type Safety Sweep
|
|
62
|
+
```
|
|
63
|
+
Fixed: Added proper TypeScript types to API response
|
|
64
|
+
Sweep: Find all `any` types in API layer
|
|
65
|
+
Result: Added proper types to 15 API functions
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Business Logic Sweep
|
|
69
|
+
```
|
|
70
|
+
Fixed: HK user was seeing CN tax options
|
|
71
|
+
Sweep: Find all region-dependent logic, verify correctness
|
|
72
|
+
Result: Fixed 5 similar locale issues across settings, billing, reports
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### UX Pattern Sweep
|
|
76
|
+
```
|
|
77
|
+
Improved: Added loading state to save button
|
|
78
|
+
Sweep: Find all async actions without loading feedback
|
|
79
|
+
Result: Added loading states to 8 similar interactions
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Error Handling Sweep
|
|
83
|
+
```
|
|
84
|
+
Created: Reusable ErrorBoundary with retry
|
|
85
|
+
Sweep: Find all ad-hoc error handling in components
|
|
86
|
+
Result: Standardized error handling across 12 components
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Public-Facing Sweep
|
|
90
|
+
```
|
|
91
|
+
Fixed: Missing OG tags on product page
|
|
92
|
+
Sweep: Find all public pages missing proper meta tags
|
|
93
|
+
Result: Added OG/Twitter cards to 6 pages
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Output
|
|
97
|
+
|
|
98
|
+
### Sweep Summary
|
|
99
|
+
```
|
|
100
|
+
Original Work: [what was done]
|
|
101
|
+
Pattern Identified: [what to look for]
|
|
102
|
+
Files Scanned: [count]
|
|
103
|
+
Similar Cases Found: [count]
|
|
104
|
+
Cases Fixed: [count]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Changes Made
|
|
108
|
+
| File | Change | Status |
|
|
109
|
+
|------|--------|--------|
|
|
110
|
+
| ... | ... | ✅ Fixed |
|
|
111
|
+
|
|
112
|
+
### Verification
|
|
113
|
+
- [ ] All similar patterns addressed
|
|
114
|
+
- [ ] No regressions introduced
|
|
115
|
+
- [ ] Consistency maintained
|
|
116
|
+
|
|
117
|
+
## Remember
|
|
118
|
+
|
|
119
|
+
* **One fix = comprehensive sweep** — never leave similar issues behind
|
|
120
|
+
* **Think in patterns** — what class of problem did you just solve?
|
|
121
|
+
* **Sweep all dimensions** — code, business logic, UX, public-facing
|
|
122
|
+
* **Be thorough** — check everywhere: code, tests, docs, marketing pages
|
|
123
|
+
* **Maintain consistency** — similar things should look and work similarly
|
|
124
|
+
* **This is how you reach State of the Art** — excellence everywhere, not just in spots
|
package/package.json
CHANGED