@sylphx/flow 2.15.2 → 2.16.0
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 +19 -0
- package/assets/slash-commands/continue.md +160 -0
- package/assets/slash-commands/{review-account-security.md → guideline-account-security.md} +3 -11
- package/assets/slash-commands/{review-admin.md → guideline-admin.md} +3 -11
- package/assets/slash-commands/{review-auth.md → guideline-auth.md} +3 -11
- package/assets/slash-commands/{review-billing.md → guideline-billing.md} +3 -11
- package/assets/slash-commands/{review-code-quality.md → guideline-code-quality.md} +3 -11
- package/assets/slash-commands/{review-data-architecture.md → guideline-data-architecture.md} +3 -11
- package/assets/slash-commands/{review-database.md → guideline-database.md} +3 -11
- package/assets/slash-commands/{review-delivery.md → guideline-delivery.md} +3 -11
- package/assets/slash-commands/{review-discovery.md → guideline-discovery.md} +3 -11
- package/assets/slash-commands/{review-growth.md → guideline-growth.md} +3 -11
- package/assets/slash-commands/{review-i18n.md → guideline-i18n.md} +3 -11
- package/assets/slash-commands/{review-ledger.md → guideline-ledger.md} +3 -11
- package/assets/slash-commands/{review-observability.md → guideline-observability.md} +3 -11
- package/assets/slash-commands/{review-operability.md → guideline-operability.md} +3 -11
- package/assets/slash-commands/{review-performance.md → guideline-performance.md} +3 -11
- package/assets/slash-commands/{review-pricing.md → guideline-pricing.md} +3 -11
- package/assets/slash-commands/{review-privacy.md → guideline-privacy.md} +3 -11
- package/assets/slash-commands/{review-pwa.md → guideline-pwa.md} +3 -11
- package/assets/slash-commands/{review-referral.md → guideline-referral.md} +3 -11
- package/assets/slash-commands/{review-security.md → guideline-security.md} +3 -11
- package/assets/slash-commands/{review-seo.md → guideline-seo.md} +3 -11
- package/assets/slash-commands/{review-storage.md → guideline-storage.md} +3 -11
- package/assets/slash-commands/{review-support.md → guideline-support.md} +3 -11
- package/assets/slash-commands/{review-trust-safety.md → guideline-trust-safety.md} +3 -11
- package/assets/slash-commands/{review-uiux.md → guideline-uiux.md} +3 -11
- package/assets/slash-commands/review.md +94 -0
- package/package.json +1 -1
- package/src/services/auto-upgrade.ts +53 -53
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 2.16.0 (2025-12-17)
|
|
4
|
+
|
|
5
|
+
### ✨ Features
|
|
6
|
+
|
|
7
|
+
- **commands:** add closed-loop to /continue ([dca7b76](https://github.com/SylphxAI/flow/commit/dca7b7612c65febef242549ad965289a189ce5e4))
|
|
8
|
+
- **commands:** enhance /continue with role-based simulation ([ca3ebfe](https://github.com/SylphxAI/flow/commit/ca3ebfe06a73f3db722ff8f88c353202067e18f6))
|
|
9
|
+
- **commands:** add /continue slash command for finishing incomplete work ([16c8aaf](https://github.com/SylphxAI/flow/commit/16c8aaf22337713c39395e4465d5bcdf1bfaafd9))
|
|
10
|
+
|
|
11
|
+
### ♻️ Refactoring
|
|
12
|
+
|
|
13
|
+
- **commands:** split review into mandate + guidelines ([16754bc](https://github.com/SylphxAI/flow/commit/16754bc7403d13dd329b2097c3c8f25e360a7c59))
|
|
14
|
+
|
|
15
|
+
## 2.15.3 (2025-12-17)
|
|
16
|
+
|
|
17
|
+
### ⚡️ Performance
|
|
18
|
+
|
|
19
|
+
- **auto-upgrade:** simplify - no TTL, always background check ([5621a21](https://github.com/SylphxAI/flow/commit/5621a21ab2a3eeb54f3fecadd32c19269bd22312))
|
|
20
|
+
- **auto-upgrade:** cache target current version too ([229a400](https://github.com/SylphxAI/flow/commit/229a4002bde6da3540c014eb39e8a941e072a4db))
|
|
21
|
+
|
|
3
22
|
## 2.15.2 (2025-12-17)
|
|
4
23
|
|
|
5
24
|
### ⚡️ Performance
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: continue
|
|
3
|
+
description: Continue incomplete work - finish features, fix bugs, complete TODOs
|
|
4
|
+
agent: coder
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Continue Incomplete Work
|
|
8
|
+
|
|
9
|
+
Scan codebase for incomplete work. Prioritize. Finish.
|
|
10
|
+
|
|
11
|
+
## Mandate
|
|
12
|
+
|
|
13
|
+
* Perform a **deep, thorough scan** of incomplete work in this codebase.
|
|
14
|
+
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
15
|
+
* **Research then Act**: understand full scope first, then **implement fixes directly**. Don't just report — finish.
|
|
16
|
+
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
17
|
+
* **Be thorough**: incomplete work hides in comments, stubs, error messages, and "temporary" solutions.
|
|
18
|
+
|
|
19
|
+
## Discovery Approach
|
|
20
|
+
|
|
21
|
+
### Phase 1: Code Analysis
|
|
22
|
+
Scan for explicit incomplete markers:
|
|
23
|
+
- `TODO`, `FIXME`, `XXX`, `HACK`, `BUG`, `@todo`
|
|
24
|
+
- `NotImplementedError`, `throw new Error('not implemented')`
|
|
25
|
+
- Stub implementations (hardcoded returns, empty catches, `pass`)
|
|
26
|
+
- `test.skip`, `it.skip`, empty test files
|
|
27
|
+
- Commented-out code, debug statements
|
|
28
|
+
|
|
29
|
+
### Phase 2: Role-Based Simulation
|
|
30
|
+
|
|
31
|
+
**👤 User Perspective** — Walk through every user-facing flow:
|
|
32
|
+
- Onboarding: Can a new user complete setup without confusion?
|
|
33
|
+
- Happy path: Does the core feature work end-to-end?
|
|
34
|
+
- Error states: What happens when things go wrong? Are messages helpful?
|
|
35
|
+
- Edge cases: Empty states, first-time use, account limits, expired sessions
|
|
36
|
+
- Accessibility: Keyboard nav, screen readers, color contrast
|
|
37
|
+
- Mobile/responsive: Does it work on all devices?
|
|
38
|
+
|
|
39
|
+
**🔧 Developer Perspective** — Evaluate DX and maintainability:
|
|
40
|
+
- Setup: Can someone clone and run in < 5 minutes?
|
|
41
|
+
- Documentation: Are APIs documented? Examples provided?
|
|
42
|
+
- Error messages: Do stack traces help identify root cause?
|
|
43
|
+
- Debugging: Are there logs at appropriate levels?
|
|
44
|
+
- Testing: Can tests run locally? Are mocks available?
|
|
45
|
+
- Dependencies: Any outdated, deprecated, or vulnerable packages?
|
|
46
|
+
|
|
47
|
+
**🛡️ Admin/Ops Perspective** — Consider operational readiness:
|
|
48
|
+
- Monitoring: Can you tell if the system is healthy?
|
|
49
|
+
- Logging: Is there enough info to debug production issues?
|
|
50
|
+
- Configuration: Can settings be changed without code deploy?
|
|
51
|
+
- Backup/Recovery: Can data be restored if something fails?
|
|
52
|
+
- Security: Are admin actions audited? Permissions enforced?
|
|
53
|
+
- Scaling: What happens under 10x load?
|
|
54
|
+
|
|
55
|
+
### Phase 3: Scenario Simulation
|
|
56
|
+
|
|
57
|
+
Run through these scenarios mentally or via code paths:
|
|
58
|
+
|
|
59
|
+
| Scenario | Questions to Answer |
|
|
60
|
+
|----------|---------------------|
|
|
61
|
+
| New user signup | Every step works? Validation clear? Email sent? |
|
|
62
|
+
| Returning user login | Session handling? Password reset works? |
|
|
63
|
+
| Core action fails | Error shown? User knows what to do? Data preserved? |
|
|
64
|
+
| Network offline | Graceful degradation? Retry logic? |
|
|
65
|
+
| Concurrent users | Race conditions? Locks? Optimistic updates? |
|
|
66
|
+
| Bad actor attempts | Input sanitized? Rate limited? Logged? |
|
|
67
|
+
| Admin intervention | Can support help user? Audit trail exists? |
|
|
68
|
+
|
|
69
|
+
## Execution Process
|
|
70
|
+
|
|
71
|
+
1. **Parallel Discovery** (delegate to workers):
|
|
72
|
+
- Worker 1: Code markers & stubs (grep TODO, FIXME, placeholders)
|
|
73
|
+
- Worker 2: User journey simulation (trace main flows, find dead ends)
|
|
74
|
+
- Worker 3: Developer experience audit (setup, docs, error messages)
|
|
75
|
+
- Worker 4: Ops readiness check (logging, monitoring, config)
|
|
76
|
+
- Worker 5: Test coverage & edge cases (skipped tests, missing scenarios)
|
|
77
|
+
|
|
78
|
+
2. **Synthesize & Prioritize**:
|
|
79
|
+
- Collect all findings
|
|
80
|
+
- Group by severity: Critical → High → Medium → Low
|
|
81
|
+
- Critical: Security issues, data loss risks, broken features
|
|
82
|
+
- High: User-facing bugs, incomplete core features
|
|
83
|
+
- Medium: Code quality, missing tests
|
|
84
|
+
- Low: Documentation, style issues
|
|
85
|
+
|
|
86
|
+
3. **Implement Fixes**:
|
|
87
|
+
- Start with Critical items
|
|
88
|
+
- Complete each fix fully before moving on
|
|
89
|
+
- Run tests after each significant change
|
|
90
|
+
- Commit atomically per logical fix
|
|
91
|
+
|
|
92
|
+
4. **Deep Dive with /review** (when needed):
|
|
93
|
+
If issues cluster in a specific domain, invoke `/review <domain>` for thorough analysis:
|
|
94
|
+
|
|
95
|
+
| Domain | When to Invoke |
|
|
96
|
+
|--------|----------------|
|
|
97
|
+
| `auth` | Auth flow issues, session bugs, SSO problems |
|
|
98
|
+
| `security` | Validation gaps, injection risks, secrets exposure |
|
|
99
|
+
| `billing` | Payment bugs, subscription issues, webhook failures |
|
|
100
|
+
| `performance` | Slow pages, bundle bloat, unnecessary re-renders |
|
|
101
|
+
| `database` | Schema issues, missing indexes, N+1 queries |
|
|
102
|
+
| `observability` | Missing logs, no alerts, debugging blind spots |
|
|
103
|
+
| `i18n` | Hardcoded strings, locale issues, RTL bugs |
|
|
104
|
+
|
|
105
|
+
Full domain list: 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
|
|
106
|
+
|
|
107
|
+
5. **Loop: Re-invoke /continue**:
|
|
108
|
+
After completing fixes, **invoke `/continue` again** to:
|
|
109
|
+
- Verify fixes didn't introduce new issues
|
|
110
|
+
- Discover issues that were hidden by previous bugs
|
|
111
|
+
- Continue until no Critical/High items remain
|
|
112
|
+
|
|
113
|
+
**Exit condition**: No Critical or High severity items found.
|
|
114
|
+
|
|
115
|
+
## Output Format
|
|
116
|
+
|
|
117
|
+
### Discovery Summary
|
|
118
|
+
```
|
|
119
|
+
## Incomplete Work Found
|
|
120
|
+
|
|
121
|
+
### Critical (X items)
|
|
122
|
+
- [ ] File:line - Description
|
|
123
|
+
|
|
124
|
+
### High (X items)
|
|
125
|
+
- [ ] File:line - Description
|
|
126
|
+
|
|
127
|
+
### Medium (X items)
|
|
128
|
+
- [ ] File:line - Description
|
|
129
|
+
|
|
130
|
+
### Low (X items)
|
|
131
|
+
- [ ] File:line - Description
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Progress Updates
|
|
135
|
+
```
|
|
136
|
+
✓ Fixed: [description] (file:line)
|
|
137
|
+
⚠ Blocked: [description] - needs [reason]
|
|
138
|
+
→ Deep dive: invoking /review [domain]
|
|
139
|
+
↻ Loop: re-invoking /continue
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Completion
|
|
143
|
+
```
|
|
144
|
+
## Continue Complete
|
|
145
|
+
|
|
146
|
+
✓ X issues fixed
|
|
147
|
+
⚠ X issues need manual intervention
|
|
148
|
+
→ Invoked /review for: [domains]
|
|
149
|
+
|
|
150
|
+
Next: [/continue again | no further action needed]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Driving Questions
|
|
154
|
+
|
|
155
|
+
1. **User**: What flows break or confuse real users? Where do they get stuck?
|
|
156
|
+
2. **Developer**: What would frustrate someone onboarding to this codebase?
|
|
157
|
+
3. **Admin/Ops**: What would make a 3am incident harder to debug?
|
|
158
|
+
4. **Security**: What incomplete validation could be exploited?
|
|
159
|
+
5. **Quality**: What "temporary" solutions became permanent debt?
|
|
160
|
+
6. **Scale**: What works now but will break at 10x growth?
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-account-security
|
|
3
|
+
description: Guideline: account security - sessions, MFA, devices, security events
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Account Security
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of account security in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify threats users can't protect themselves from.
|
|
7
|
+
# Account Security Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-admin
|
|
3
|
+
description: Guideline: admin - RBAC, bootstrap, audit, operational tools
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Admin
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of the admin platform in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify operational gaps and safety improvements.
|
|
7
|
+
# Admin Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-auth
|
|
3
|
+
description: Guideline: authentication - sign-in, SSO, passkeys, verification
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of authentication in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify security gaps and UX friction in auth flows.
|
|
7
|
+
# Auth Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-billing
|
|
3
|
+
description: Guideline: billing - Stripe integration, webhooks, subscription state
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Billing
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of billing and payments in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify revenue leakage and reliability improvements.
|
|
7
|
+
# Billing Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-code-quality
|
|
3
|
+
description: Guideline: code quality - architecture, types, testing, maintainability
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Code Quality
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of code quality in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify code that works but shouldn't exist in its current form.
|
|
7
|
+
# Code Quality Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
package/assets/slash-commands/{review-data-architecture.md → guideline-data-architecture.md}
RENAMED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-data-architecture
|
|
3
|
+
description: Guideline: data architecture - boundaries, consistency, state machines
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Data Architecture
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of data architecture in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify architectural weaknesses that will cause problems at scale.
|
|
7
|
+
# Data Architecture Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-database
|
|
3
|
+
description: Guideline: database - schema, migrations, performance, reliability
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Database
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of the database in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify schema problems that will hurt at scale.
|
|
7
|
+
# Database Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-delivery
|
|
3
|
+
description: Guideline: delivery - CI gates, automated verification, release safety
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Delivery
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of delivery gates in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what could go wrong in production that we're not catching.
|
|
7
|
+
# Delivery Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-discovery
|
|
3
|
+
description: Guideline: discovery - competitive research, opportunities, market positioning
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Discovery
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** to discover opportunities for this product.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify opportunities, then **implement improvements directly**. Don't just report — build.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **This review IS exploration** — think broadly and creatively about what could be.
|
|
7
|
+
# Discovery Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-growth
|
|
3
|
+
description: Guideline: growth - activation, retention, virality
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Growth
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of growth systems in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify growth opportunities that don't yet exist.
|
|
7
|
+
# Growth Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-i18n
|
|
3
|
+
description: Guideline: i18n - localization, routing, translation quality
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of internationalization in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what would make the product feel native to each locale.
|
|
7
|
+
# i18n Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-ledger
|
|
3
|
+
description: Guideline: ledger - balance systems, financial integrity, reconciliation
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Ledger
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of any balance/credits/wallet system in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify financial integrity risks before they become real problems.
|
|
7
|
+
# Ledger Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-observability
|
|
3
|
+
description: Guideline: observability - logging, tracing, alerting, debugging
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Observability
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of observability in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify the production issues we can't debug today.
|
|
7
|
+
# Observability Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-operability
|
|
3
|
+
description: Guideline: operability - workflows, retries, DLQ, incident response
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Operability
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of operability in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what will break at 3am and how we'd fix it.
|
|
7
|
+
# Operability Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-performance
|
|
3
|
+
description: Guideline: performance - speed, Core Web Vitals, bottlenecks
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Performance
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of performance in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what's making the product feel slow.
|
|
7
|
+
# Performance Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-pricing
|
|
3
|
+
description: Guideline: pricing - strategy, packaging, monetization
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Pricing
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of pricing in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify monetization opportunities and pricing friction.
|
|
7
|
+
# Pricing Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-privacy
|
|
3
|
+
description: Guideline: privacy - consent, PII, data lifecycle, compliance
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Privacy
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of privacy controls in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify compliance gaps and privacy improvements.
|
|
7
|
+
# Privacy Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-pwa
|
|
3
|
+
description: Guideline: PWA - offline experience, installation, engagement
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# PWA
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of PWA implementation in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what would make the web experience feel native.
|
|
7
|
+
# PWA Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-referral
|
|
3
|
+
description: Guideline: referral - attribution, rewards, fraud prevention
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Referral
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of the referral system in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify growth opportunities and fraud vectors.
|
|
7
|
+
# Referral Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-security
|
|
3
|
+
description: Guideline: security - OWASP, headers, authentication, secrets
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Security
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of security in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify vulnerabilities and hardening opportunities not listed here.
|
|
7
|
+
# Security Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-seo
|
|
3
|
+
description: Guideline: SEO - discoverability, metadata, search rankings
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# SEO
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of SEO in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what would make this product dominate search results.
|
|
7
|
+
# SEO Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-storage
|
|
3
|
+
description: Guideline: storage - uploads, file handling, security
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Storage
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of file storage and uploads in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify security risks and cost optimization opportunities.
|
|
7
|
+
# Storage Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-support
|
|
3
|
+
description: Guideline: support - help experience, communications, user satisfaction
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Support
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of support and communications in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify what would make users feel genuinely supported.
|
|
7
|
+
# Support Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-trust-safety
|
|
3
|
+
description: Guideline: trust & safety - abuse prevention, moderation, user protection
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Trust
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of trust and safety in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: identify abuse vectors before bad actors find them.
|
|
7
|
+
# Trust Safety Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: guideline-uiux
|
|
3
|
+
description: Guideline: UI/UX - design system, accessibility, user experience
|
|
4
4
|
agent: coder
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# UI/UX
|
|
8
|
-
|
|
9
|
-
## Mandate
|
|
10
|
-
|
|
11
|
-
* Perform a **deep, thorough review** of UI/UX in this codebase.
|
|
12
|
-
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
13
|
-
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
14
|
-
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
15
|
-
* **Explore beyond the spec**: if the current design needs fundamental rethinking, propose it.
|
|
7
|
+
# UI/UX Guideline
|
|
16
8
|
|
|
17
9
|
## Tech Stack
|
|
18
10
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Review codebase by domain - usage: /review auth, /review billing, etc.
|
|
4
|
+
agent: coder
|
|
5
|
+
args:
|
|
6
|
+
- name: domain
|
|
7
|
+
description: Domain to review (auth, billing, security, etc.)
|
|
8
|
+
required: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Review: $ARGS
|
|
12
|
+
|
|
13
|
+
Perform a focused review of the specified domain(s) in this codebase.
|
|
14
|
+
|
|
15
|
+
## Mandate
|
|
16
|
+
|
|
17
|
+
* **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
|
|
18
|
+
* **Deep, thorough analysis**: don't skim — understand root causes and systemic patterns.
|
|
19
|
+
* **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
|
|
20
|
+
* **Single-pass delivery**: no deferrals; deliver complete implementation.
|
|
21
|
+
* **Explore beyond the spec**: identify gaps, inefficiencies, and opportunities the checklist doesn't cover.
|
|
22
|
+
|
|
23
|
+
## Guidelines Reference
|
|
24
|
+
|
|
25
|
+
Based on the domain(s) requested, read the relevant guideline(s) below. You may read multiple guidelines in parallel if the review spans multiple domains.
|
|
26
|
+
|
|
27
|
+
| Domain | Guideline | Description |
|
|
28
|
+
|--------|-----------|-------------|
|
|
29
|
+
| **Identity & Auth** |||
|
|
30
|
+
| `auth` | `/guideline-auth` | Sign-in, SSO, passkeys, verification |
|
|
31
|
+
| `account-security` | `/guideline-account-security` | MFA, session management, account recovery |
|
|
32
|
+
| `privacy` | `/guideline-privacy` | Data handling, consent, GDPR/CCPA |
|
|
33
|
+
| **Billing & Revenue** |||
|
|
34
|
+
| `billing` | `/guideline-billing` | Stripe integration, webhooks, subscriptions |
|
|
35
|
+
| `pricing` | `/guideline-pricing` | Pricing models, tiers, feature gating |
|
|
36
|
+
| `ledger` | `/guideline-ledger` | Transaction records, audit trails, reconciliation |
|
|
37
|
+
| **Security** |||
|
|
38
|
+
| `security` | `/guideline-security` | OWASP, input validation, secrets management |
|
|
39
|
+
| `trust-safety` | `/guideline-trust-safety` | Abuse prevention, rate limiting, fraud |
|
|
40
|
+
| **Frontend & UX** |||
|
|
41
|
+
| `uiux` | `/guideline-uiux` | Design system, accessibility, interactions |
|
|
42
|
+
| `seo` | `/guideline-seo` | Meta tags, structured data, crawlability |
|
|
43
|
+
| `pwa` | `/guideline-pwa` | Service workers, offline, installability |
|
|
44
|
+
| `performance` | `/guideline-performance` | Core Web Vitals, bundle size, caching |
|
|
45
|
+
| `i18n` | `/guideline-i18n` | Localization, routing, hreflang |
|
|
46
|
+
| **Data** |||
|
|
47
|
+
| `database` | `/guideline-database` | Schema design, indexes, migrations |
|
|
48
|
+
| `data-architecture` | `/guideline-data-architecture` | Data models, relationships, integrity |
|
|
49
|
+
| `storage` | `/guideline-storage` | File uploads, CDN, blob storage |
|
|
50
|
+
| **Operations** |||
|
|
51
|
+
| `observability` | `/guideline-observability` | Logging, metrics, tracing, alerts |
|
|
52
|
+
| `operability` | `/guideline-operability` | Deployment, rollback, feature flags |
|
|
53
|
+
| `delivery` | `/guideline-delivery` | CI/CD, testing, release process |
|
|
54
|
+
| **Growth & Support** |||
|
|
55
|
+
| `growth` | `/guideline-growth` | Onboarding, activation, retention |
|
|
56
|
+
| `referral` | `/guideline-referral` | Referral programs, viral loops |
|
|
57
|
+
| `support` | `/guideline-support` | Help systems, tickets, documentation |
|
|
58
|
+
| **Admin & Discovery** |||
|
|
59
|
+
| `admin` | `/guideline-admin` | Admin panel, RBAC, config management |
|
|
60
|
+
| `discovery` | `/guideline-discovery` | Feature discovery, competitive analysis |
|
|
61
|
+
| **Code Quality** |||
|
|
62
|
+
| `code-quality` | `/guideline-code-quality` | Patterns, testing, maintainability |
|
|
63
|
+
|
|
64
|
+
## Execution
|
|
65
|
+
|
|
66
|
+
1. Parse the `$ARGS` to identify which domain(s) to review
|
|
67
|
+
2. Read the corresponding guideline file(s) — **read in parallel** if multiple domains
|
|
68
|
+
3. Use the guideline's Tech Stack, Non-Negotiables, Context, and Driving Questions to guide your review
|
|
69
|
+
4. Delegate workers to investigate different aspects simultaneously
|
|
70
|
+
5. Synthesize findings and implement fixes
|
|
71
|
+
|
|
72
|
+
## Multi-Domain Reviews
|
|
73
|
+
|
|
74
|
+
You can review multiple domains at once:
|
|
75
|
+
- `/review auth security` — Review both auth and security
|
|
76
|
+
- `/review billing pricing ledger` — Full revenue stack review
|
|
77
|
+
- `/review performance seo pwa` — Frontend optimization review
|
|
78
|
+
|
|
79
|
+
When reviewing multiple domains, look for **cross-cutting concerns** and **gaps between domains**.
|
|
80
|
+
|
|
81
|
+
## Output Format
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
## Review: [domain(s)]
|
|
85
|
+
|
|
86
|
+
### Critical Issues
|
|
87
|
+
- [ ] Issue description → Fix implemented
|
|
88
|
+
|
|
89
|
+
### Improvements Made
|
|
90
|
+
- ✓ What was fixed/improved
|
|
91
|
+
|
|
92
|
+
### Recommendations
|
|
93
|
+
- Future considerations (if can't fix now)
|
|
94
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sylphx/flow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
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": {
|
|
@@ -19,14 +19,13 @@ import { TargetInstaller } from './target-installer.js';
|
|
|
19
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
20
20
|
const __dirname = path.dirname(__filename);
|
|
21
21
|
|
|
22
|
-
//
|
|
23
|
-
const
|
|
24
|
-
const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
|
|
22
|
+
// Version info file (stores last background check result)
|
|
23
|
+
const VERSION_FILE = path.join(os.homedir(), '.sylphx-flow', 'versions.json');
|
|
25
24
|
|
|
26
|
-
interface
|
|
25
|
+
interface VersionInfo {
|
|
27
26
|
flowLatest?: string;
|
|
28
27
|
targetLatest?: Record<string, string>;
|
|
29
|
-
|
|
28
|
+
targetCurrent?: Record<string, string>;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
const execAsync = promisify(exec);
|
|
@@ -56,14 +55,14 @@ export class AutoUpgrade {
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
/**
|
|
59
|
-
* Read version
|
|
58
|
+
* Read version info from last background check
|
|
60
59
|
*/
|
|
61
|
-
private async
|
|
60
|
+
private async readVersionInfo(): Promise<VersionInfo | null> {
|
|
62
61
|
try {
|
|
63
|
-
if (!existsSync(
|
|
62
|
+
if (!existsSync(VERSION_FILE)) {
|
|
64
63
|
return null;
|
|
65
64
|
}
|
|
66
|
-
const data = await fs.readFile(
|
|
65
|
+
const data = await fs.readFile(VERSION_FILE, 'utf-8');
|
|
67
66
|
return JSON.parse(data);
|
|
68
67
|
} catch {
|
|
69
68
|
return null;
|
|
@@ -71,13 +70,13 @@ export class AutoUpgrade {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
|
-
* Write version
|
|
73
|
+
* Write version info
|
|
75
74
|
*/
|
|
76
|
-
private async
|
|
75
|
+
private async writeVersionInfo(info: VersionInfo): Promise<void> {
|
|
77
76
|
try {
|
|
78
|
-
const dir = path.dirname(
|
|
77
|
+
const dir = path.dirname(VERSION_FILE);
|
|
79
78
|
await fs.mkdir(dir, { recursive: true });
|
|
80
|
-
await fs.writeFile(
|
|
79
|
+
await fs.writeFile(VERSION_FILE, JSON.stringify(info, null, 2));
|
|
81
80
|
} catch {
|
|
82
81
|
// Silent fail
|
|
83
82
|
}
|
|
@@ -97,18 +96,18 @@ export class AutoUpgrade {
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
/**
|
|
100
|
-
* Check for available upgrades
|
|
101
|
-
*
|
|
99
|
+
* Check for available upgrades (instant, reads from last background check)
|
|
100
|
+
* Background check runs every time for fresh data next run
|
|
102
101
|
*/
|
|
103
102
|
async checkForUpgrades(targetId?: string): Promise<UpgradeStatus> {
|
|
104
|
-
const
|
|
103
|
+
const info = await this.readVersionInfo();
|
|
105
104
|
const currentVersion = await this.getCurrentFlowVersion();
|
|
106
105
|
|
|
107
|
-
// Trigger background check for next run (non-blocking)
|
|
106
|
+
// Trigger background check for next run (non-blocking, every time)
|
|
108
107
|
this.checkInBackground(targetId);
|
|
109
108
|
|
|
110
|
-
// No
|
|
111
|
-
if (!
|
|
109
|
+
// No previous check = no upgrade info yet
|
|
110
|
+
if (!info) {
|
|
112
111
|
return {
|
|
113
112
|
flowNeedsUpgrade: false,
|
|
114
113
|
targetNeedsUpgrade: false,
|
|
@@ -117,26 +116,19 @@ export class AutoUpgrade {
|
|
|
117
116
|
};
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
// Check if Flow needs upgrade
|
|
119
|
+
// Check if Flow needs upgrade
|
|
121
120
|
const flowVersion =
|
|
122
|
-
|
|
123
|
-
? { current: currentVersion, latest:
|
|
121
|
+
info.flowLatest && info.flowLatest !== currentVersion
|
|
122
|
+
? { current: currentVersion, latest: info.flowLatest }
|
|
124
123
|
: null;
|
|
125
124
|
|
|
126
|
-
// Check if target needs upgrade
|
|
125
|
+
// Check if target needs upgrade
|
|
127
126
|
let targetVersion: { current: string; latest: string } | null = null;
|
|
128
|
-
if (targetId &&
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const match = stdout.match(/v?(\d+\.\d+\.\d+)/);
|
|
134
|
-
if (match && match[1] !== cache.targetLatest[targetId]) {
|
|
135
|
-
targetVersion = { current: match[1], latest: cache.targetLatest[targetId] };
|
|
136
|
-
}
|
|
137
|
-
} catch {
|
|
138
|
-
// Silent
|
|
139
|
-
}
|
|
127
|
+
if (targetId && info.targetLatest?.[targetId] && info.targetCurrent?.[targetId]) {
|
|
128
|
+
const current = info.targetCurrent[targetId];
|
|
129
|
+
const latest = info.targetLatest[targetId];
|
|
130
|
+
if (current !== latest) {
|
|
131
|
+
targetVersion = { current, latest };
|
|
140
132
|
}
|
|
141
133
|
}
|
|
142
134
|
|
|
@@ -150,7 +142,7 @@ export class AutoUpgrade {
|
|
|
150
142
|
|
|
151
143
|
/**
|
|
152
144
|
* Check versions in background (non-blocking)
|
|
153
|
-
*
|
|
145
|
+
* Runs every time, updates info for next run
|
|
154
146
|
*/
|
|
155
147
|
private checkInBackground(targetId?: string): void {
|
|
156
148
|
// Fire and forget - don't await
|
|
@@ -163,44 +155,52 @@ export class AutoUpgrade {
|
|
|
163
155
|
* Perform the actual version check (called in background)
|
|
164
156
|
*/
|
|
165
157
|
private async performBackgroundCheck(targetId?: string): Promise<void> {
|
|
166
|
-
const
|
|
158
|
+
const oldInfo = await this.readVersionInfo();
|
|
167
159
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const newCache: VersionCache = {
|
|
174
|
-
checkedAt: Date.now(),
|
|
175
|
-
targetLatest: cache?.targetLatest || {},
|
|
160
|
+
const newInfo: VersionInfo = {
|
|
161
|
+
targetLatest: oldInfo?.targetLatest || {},
|
|
162
|
+
targetCurrent: oldInfo?.targetCurrent || {},
|
|
176
163
|
};
|
|
177
164
|
|
|
178
165
|
// Check Flow version from npm (with timeout)
|
|
179
166
|
try {
|
|
180
167
|
const { stdout } = await execAsync('npm view @sylphx/flow version', { timeout: 5000 });
|
|
181
|
-
|
|
168
|
+
newInfo.flowLatest = stdout.trim();
|
|
182
169
|
} catch {
|
|
183
|
-
// Keep old
|
|
184
|
-
|
|
170
|
+
// Keep old value if check fails
|
|
171
|
+
newInfo.flowLatest = oldInfo?.flowLatest;
|
|
185
172
|
}
|
|
186
173
|
|
|
187
|
-
// Check target version from npm (with timeout)
|
|
174
|
+
// Check target version from npm and local (with timeout)
|
|
188
175
|
if (targetId) {
|
|
189
176
|
const installation = this.targetInstaller.getInstallationInfo(targetId);
|
|
190
177
|
if (installation) {
|
|
178
|
+
// Check latest version from npm
|
|
191
179
|
try {
|
|
192
180
|
const { stdout } = await execAsync(`npm view ${installation.package} version`, {
|
|
193
181
|
timeout: 5000,
|
|
194
182
|
});
|
|
195
|
-
|
|
196
|
-
|
|
183
|
+
newInfo.targetLatest = newInfo.targetLatest || {};
|
|
184
|
+
newInfo.targetLatest[targetId] = stdout.trim();
|
|
185
|
+
} catch {
|
|
186
|
+
// Keep old value
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Check current installed version (local command)
|
|
190
|
+
try {
|
|
191
|
+
const { stdout } = await execAsync(installation.checkCommand, { timeout: 5000 });
|
|
192
|
+
const match = stdout.match(/v?(\d+\.\d+\.\d+)/);
|
|
193
|
+
if (match) {
|
|
194
|
+
newInfo.targetCurrent = newInfo.targetCurrent || {};
|
|
195
|
+
newInfo.targetCurrent[targetId] = match[1];
|
|
196
|
+
}
|
|
197
197
|
} catch {
|
|
198
|
-
// Keep old
|
|
198
|
+
// Keep old value
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
await this.
|
|
203
|
+
await this.writeVersionInfo(newInfo);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
/**
|