@sylphx/flow 2.30.0 → 3.0.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 +32 -0
- package/assets/agents/builder.md +32 -1
- package/assets/slash-commands/issues.md +46 -0
- package/assets/slash-commands/refactor.md +60 -0
- package/package.json +1 -1
- package/src/config/servers.ts +1 -1
- package/src/core/flow-executor.ts +22 -9
- package/assets/agents/coder.md +0 -128
- package/assets/agents/reviewer.md +0 -123
- package/assets/agents/writer.md +0 -120
- package/assets/rules/code-standards.md +0 -176
- package/assets/rules/core.md +0 -197
- package/assets/skills/abuse-prevention/SKILL.md +0 -33
- package/assets/skills/account-security/SKILL.md +0 -35
- package/assets/skills/admin/SKILL.md +0 -37
- package/assets/skills/appsec/SKILL.md +0 -35
- package/assets/skills/auth/SKILL.md +0 -34
- package/assets/skills/billing/SKILL.md +0 -35
- package/assets/skills/code-quality/SKILL.md +0 -34
- package/assets/skills/competitive-analysis/SKILL.md +0 -29
- package/assets/skills/data-modeling/SKILL.md +0 -34
- package/assets/skills/database/SKILL.md +0 -34
- package/assets/skills/delivery/SKILL.md +0 -36
- package/assets/skills/deployments/SKILL.md +0 -33
- package/assets/skills/growth/SKILL.md +0 -31
- package/assets/skills/i18n/SKILL.md +0 -35
- package/assets/skills/ledger/SKILL.md +0 -32
- package/assets/skills/observability/SKILL.md +0 -32
- package/assets/skills/performance/SKILL.md +0 -33
- package/assets/skills/pricing/SKILL.md +0 -32
- package/assets/skills/privacy/SKILL.md +0 -36
- package/assets/skills/pwa/SKILL.md +0 -36
- package/assets/skills/referral/SKILL.md +0 -30
- package/assets/skills/seo/SKILL.md +0 -40
- package/assets/skills/storage/SKILL.md +0 -33
- package/assets/skills/support/SKILL.md +0 -31
- package/assets/skills/uiux/SKILL.md +0 -40
- package/assets/slash-commands/cleanup.md +0 -59
- package/assets/slash-commands/continue.md +0 -94
- package/assets/slash-commands/continue2.md +0 -61
- package/assets/slash-commands/improve.md +0 -153
- package/assets/slash-commands/init.md +0 -34
- package/assets/slash-commands/polish.md +0 -87
- package/assets/slash-commands/quality.md +0 -181
- package/assets/slash-commands/release.md +0 -103
- package/assets/slash-commands/review.md +0 -44
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: continue
|
|
3
|
-
description: Trigger autonomous product iteration - think, improve, ship
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Continue
|
|
7
|
-
|
|
8
|
-
Continuously commit.
|
|
9
|
-
|
|
10
|
-
The entire system — not limited to data — must strictly obey a Single Source of Truth (SSOT) principle.
|
|
11
|
-
Every state, behavior, flow, permission, architecture decision, UI behavior, and side effect
|
|
12
|
-
must have exactly one authoritative source, one interpretation, and one correct path.
|
|
13
|
-
|
|
14
|
-
The system must be fully reason-able end to end.
|
|
15
|
-
There must be no implicit behavior, hidden assumptions, magic defaults, or silent fallbacks.
|
|
16
|
-
|
|
17
|
-
Continuously and repeatedly review, validate, and correct the entire system:
|
|
18
|
-
- Membership and identity correctness and completeness
|
|
19
|
-
- Consistency across state, permissions, flows, and lifecycle
|
|
20
|
-
- Architectural boundaries, modularity, and separation of responsibilities
|
|
21
|
-
- UI behavior matching system intent, state, and permissions
|
|
22
|
-
- Alignment with modern industry standards and best practices
|
|
23
|
-
|
|
24
|
-
No workarounds.
|
|
25
|
-
No hacks.
|
|
26
|
-
No temporary solutions.
|
|
27
|
-
No backward compatibility.
|
|
28
|
-
No deprecated logic.
|
|
29
|
-
No TODOs.
|
|
30
|
-
No dead code.
|
|
31
|
-
No unused code.
|
|
32
|
-
No incorrect or misleading code.
|
|
33
|
-
|
|
34
|
-
Every feature must be built intent-first:
|
|
35
|
-
- The correct model must exist before implementation
|
|
36
|
-
- No duplicated concepts, parallel truths, or shadow logic
|
|
37
|
-
- Any feature must be removable or refactorable without destabilizing the system
|
|
38
|
-
|
|
39
|
-
Continuously perform:
|
|
40
|
-
- Deduplication
|
|
41
|
-
- Refactoring
|
|
42
|
-
- Polishing
|
|
43
|
-
- Modularity enforcement
|
|
44
|
-
- Responsibility separation
|
|
45
|
-
- Architectural correction
|
|
46
|
-
|
|
47
|
-
The system must remain:
|
|
48
|
-
- Stateless
|
|
49
|
-
- Serverless-friendly
|
|
50
|
-
- Scalable
|
|
51
|
-
- Reasonable
|
|
52
|
-
- Testable
|
|
53
|
-
- Observable
|
|
54
|
-
|
|
55
|
-
## Radix UI (Mandatory)
|
|
56
|
-
|
|
57
|
-
If Radix has a primitive for it, you MUST use it. No exceptions. No custom implementations.
|
|
58
|
-
Any custom implementation of something Radix already provides is a bug.
|
|
59
|
-
|
|
60
|
-
## Bootstrap
|
|
61
|
-
|
|
62
|
-
Admin bootstrap via INITIAL_SUPERADMIN_EMAIL only. One-time, non-reentrant, non-bypassable.
|
|
63
|
-
|
|
64
|
-
## Platform-Led Integrations
|
|
65
|
-
|
|
66
|
-
Platform is source of truth. Third-party services sync FROM platform, never reverse.
|
|
67
|
-
All configuration in code. No manual third-party dashboard configuration.
|
|
68
|
-
Platform can switch providers without architectural change.
|
|
69
|
-
|
|
70
|
-
## Re-authentication
|
|
71
|
-
|
|
72
|
-
Sensitive actions require step-up re-authentication (password or email OTP).
|
|
73
|
-
Verified session state must be scoped, time-bound, never implicitly reused.
|
|
74
|
-
|
|
75
|
-
## Technologies
|
|
76
|
-
|
|
77
|
-
tRPC, Next.js (with Turbopack), Radix UI, next-intl, Drizzle,
|
|
78
|
-
Better Auth, Stripe, Upstash, Neon, Vercel,
|
|
79
|
-
Resend (email), Vercel Blob (storage),
|
|
80
|
-
AI SDK with OpenRouter provider,
|
|
81
|
-
Tailwind CSS (styling), @iconify-icon/react (icons),
|
|
82
|
-
Bun, Biome, Bun test,
|
|
83
|
-
Responsive Web Design.
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
Any ambiguity, inconsistency, incompleteness, or undefined behavior
|
|
88
|
-
must be treated as a bug, not a feature.
|
|
89
|
-
|
|
90
|
-
The system must withstand repeated review, rejection, refactor, and redesign,
|
|
91
|
-
and after every correction,
|
|
92
|
-
become simpler, more consistent, and closer to the correct model.
|
|
93
|
-
|
|
94
|
-
Ultrathink.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: continue2
|
|
3
|
-
description: Iterative codebase review - apply each skill guideline to audit and fix the project
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Continue2: Guideline-Driven Codebase Review
|
|
7
|
-
|
|
8
|
-
Use skill guidelines to audit and improve the project codebase.
|
|
9
|
-
|
|
10
|
-
**Important**: You are reviewing the PROJECT CODE against the guidelines, NOT reviewing the guidelines themselves.
|
|
11
|
-
|
|
12
|
-
## Process
|
|
13
|
-
|
|
14
|
-
### Phase 1: Sequential Audit
|
|
15
|
-
|
|
16
|
-
For each skill guideline:
|
|
17
|
-
|
|
18
|
-
1. Use the Skill tool to load the guideline (e.g., `skill: "auth"`)
|
|
19
|
-
2. Audit the project codebase against that guideline's non-negotiables
|
|
20
|
-
3. Fix any violations found in the project code
|
|
21
|
-
4. Move to next skill
|
|
22
|
-
|
|
23
|
-
Skills to audit against (25 total):
|
|
24
|
-
- auth, account-security, admin, appsec
|
|
25
|
-
- billing, pricing, ledger
|
|
26
|
-
- database, data-modeling
|
|
27
|
-
- delivery, deployments, observability
|
|
28
|
-
- privacy, seo, performance, pwa
|
|
29
|
-
- uiux, i18n, growth
|
|
30
|
-
- storage, support, referral
|
|
31
|
-
- abuse-prevention, competitive-analysis, code-quality
|
|
32
|
-
|
|
33
|
-
### Phase 2: Delegate Full Audit
|
|
34
|
-
|
|
35
|
-
After Phase 1, delegate a comprehensive review to a worker agent:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
Task: Audit the project codebase against all 25 skill guidelines.
|
|
39
|
-
|
|
40
|
-
For each skill:
|
|
41
|
-
1. Load the guideline using Skill tool (e.g., skill: "auth")
|
|
42
|
-
2. Check if the project code complies with the non-negotiables
|
|
43
|
-
3. Report any violations found
|
|
44
|
-
|
|
45
|
-
Return: List of specific violations in the codebase, or "No violations found."
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Phase 3: Fix and Repeat
|
|
49
|
-
|
|
50
|
-
If reviewer found violations:
|
|
51
|
-
1. Fix all violations in the project code
|
|
52
|
-
2. Return to Phase 2
|
|
53
|
-
|
|
54
|
-
If no violations found:
|
|
55
|
-
- Done. Commit and release.
|
|
56
|
-
|
|
57
|
-
## Exit Condition
|
|
58
|
-
|
|
59
|
-
The loop terminates when:
|
|
60
|
-
- A reviewer agent returns "No violations found"
|
|
61
|
-
- The project codebase fully complies with all skill guidelines
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: improve
|
|
3
|
-
description: Proactively discover and implement improvements
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Proactive Improvement
|
|
7
|
-
|
|
8
|
-
Analyze project comprehensively. Discover improvement opportunities. Prioritize and execute.
|
|
9
|
-
|
|
10
|
-
## Discovery Areas
|
|
11
|
-
|
|
12
|
-
**Code Quality:**
|
|
13
|
-
- Code complexity hotspots
|
|
14
|
-
- Duplication patterns
|
|
15
|
-
- Test coverage gaps
|
|
16
|
-
- Error handling weaknesses
|
|
17
|
-
- Type safety improvements
|
|
18
|
-
- Naming inconsistencies
|
|
19
|
-
|
|
20
|
-
**Architecture:**
|
|
21
|
-
- Tight coupling
|
|
22
|
-
- Missing abstractions
|
|
23
|
-
- Scalability bottlenecks
|
|
24
|
-
- State management issues
|
|
25
|
-
- API design improvements
|
|
26
|
-
- Module organization
|
|
27
|
-
|
|
28
|
-
**Performance:**
|
|
29
|
-
- Slow algorithms (profiling data)
|
|
30
|
-
- Database query inefficiencies
|
|
31
|
-
- Bundle size optimization
|
|
32
|
-
- Memory usage patterns
|
|
33
|
-
- Network request optimization
|
|
34
|
-
- Caching opportunities
|
|
35
|
-
|
|
36
|
-
**Security:**
|
|
37
|
-
- Vulnerability scan (dependencies)
|
|
38
|
-
- Input validation gaps
|
|
39
|
-
- Authentication/authorization weaknesses
|
|
40
|
-
- Sensitive data exposure
|
|
41
|
-
- OWASP top 10 check
|
|
42
|
-
- Security best practices
|
|
43
|
-
|
|
44
|
-
**Developer Experience:**
|
|
45
|
-
- Development setup complexity
|
|
46
|
-
- Build time optimization
|
|
47
|
-
- Testing speed
|
|
48
|
-
- Debugging capabilities
|
|
49
|
-
- Error messages clarity
|
|
50
|
-
- Documentation gaps
|
|
51
|
-
|
|
52
|
-
**Maintenance:**
|
|
53
|
-
- Outdated dependencies
|
|
54
|
-
- Deprecated API usage
|
|
55
|
-
- Missing tests
|
|
56
|
-
- Incomplete documentation
|
|
57
|
-
- Configuration complexity
|
|
58
|
-
- Technical debt accumulation
|
|
59
|
-
|
|
60
|
-
**Features:**
|
|
61
|
-
- Missing functionality (user feedback)
|
|
62
|
-
- Integration opportunities
|
|
63
|
-
- Automation potential
|
|
64
|
-
- Monitoring/observability
|
|
65
|
-
- Error recovery
|
|
66
|
-
- User experience improvements
|
|
67
|
-
|
|
68
|
-
## Analysis Process
|
|
69
|
-
|
|
70
|
-
1. **Scan** codebase comprehensively
|
|
71
|
-
2. **Profile** performance bottlenecks
|
|
72
|
-
3. **Check** security vulnerabilities
|
|
73
|
-
4. **Review** dependencies for updates
|
|
74
|
-
5. **Analyze** test coverage
|
|
75
|
-
6. **Assess** documentation completeness
|
|
76
|
-
7. **Evaluate** architectural patterns
|
|
77
|
-
8. **Identify** missing features
|
|
78
|
-
|
|
79
|
-
## Prioritization Matrix
|
|
80
|
-
|
|
81
|
-
**Impact vs Effort:**
|
|
82
|
-
- **High Impact + Low Effort** → Do first
|
|
83
|
-
- **High Impact + High Effort** → Plan carefully
|
|
84
|
-
- **Low Impact + Low Effort** → Quick wins
|
|
85
|
-
- **Low Impact + High Effort** → Skip or defer
|
|
86
|
-
|
|
87
|
-
**Categories:**
|
|
88
|
-
- **Critical:** Security, data loss, crashes
|
|
89
|
-
- **High:** Performance degradation, poor UX
|
|
90
|
-
- **Medium:** Code quality, maintainability
|
|
91
|
-
- **Low:** Nice-to-haves, polish
|
|
92
|
-
|
|
93
|
-
## Execution Plan
|
|
94
|
-
|
|
95
|
-
For each improvement:
|
|
96
|
-
1. **Describe** what and why
|
|
97
|
-
2. **Estimate** effort (small/medium/large)
|
|
98
|
-
3. **Assess** impact (low/medium/high)
|
|
99
|
-
4. **Prioritize** using matrix
|
|
100
|
-
5. **Create** implementation plan
|
|
101
|
-
|
|
102
|
-
Then execute top priorities:
|
|
103
|
-
- Start with high-impact, low-effort
|
|
104
|
-
- Make atomic commits
|
|
105
|
-
- Test thoroughly
|
|
106
|
-
- Document changes
|
|
107
|
-
|
|
108
|
-
## Output Format
|
|
109
|
-
|
|
110
|
-
```markdown
|
|
111
|
-
## Improvement Opportunities
|
|
112
|
-
|
|
113
|
-
### Critical (Do Now)
|
|
114
|
-
1. [Security] Update vulnerable dependency X (CVE-XXXX)
|
|
115
|
-
- Impact: High (prevents exploit)
|
|
116
|
-
- Effort: Low (5 min)
|
|
117
|
-
- Action: `npm update X`
|
|
118
|
-
|
|
119
|
-
### High Priority
|
|
120
|
-
1. [Performance] Optimize user query (N+1 problem)
|
|
121
|
-
- Impact: High (10x speedup)
|
|
122
|
-
- Effort: Medium (2 hrs)
|
|
123
|
-
- Action: Batch queries with JOIN
|
|
124
|
-
|
|
125
|
-
### Quick Wins
|
|
126
|
-
1. [DX] Add pre-commit hooks
|
|
127
|
-
- Impact: Medium (catch errors early)
|
|
128
|
-
- Effort: Low (30 min)
|
|
129
|
-
- Action: Setup husky + lint-staged
|
|
130
|
-
|
|
131
|
-
### Planned Improvements
|
|
132
|
-
1. [Feature] Add caching layer
|
|
133
|
-
- Impact: High (reduce server load)
|
|
134
|
-
- Effort: High (1 week)
|
|
135
|
-
- Action: Design cache strategy, implement Redis
|
|
136
|
-
|
|
137
|
-
## Execution Plan
|
|
138
|
-
1. Fix security vulnerability (now)
|
|
139
|
-
2. Optimize query performance (today)
|
|
140
|
-
3. Add pre-commit hooks (today)
|
|
141
|
-
4. Plan caching implementation (next sprint)
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Exit Criteria
|
|
145
|
-
|
|
146
|
-
- [ ] Comprehensive analysis completed
|
|
147
|
-
- [ ] Opportunities prioritized
|
|
148
|
-
- [ ] High-priority improvements implemented
|
|
149
|
-
- [ ] Tests pass
|
|
150
|
-
- [ ] Impact measured
|
|
151
|
-
- [ ] Documentation updated
|
|
152
|
-
|
|
153
|
-
Report: Improvements discovered, implemented, impact metrics.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: init
|
|
3
|
-
description: Initialize project docs - create PRODUCT.md and ARCHITECTURE.md
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Init Project Docs
|
|
7
|
-
|
|
8
|
-
Create project documentation if missing:
|
|
9
|
-
|
|
10
|
-
1. **Check** if `PRODUCT.md` exists in project root
|
|
11
|
-
- If missing → Create with structure:
|
|
12
|
-
- Vision / Mission
|
|
13
|
-
- Success Metrics (revenue, users, growth)
|
|
14
|
-
- Target Users
|
|
15
|
-
- Value Propositions
|
|
16
|
-
- Key Features
|
|
17
|
-
- Competitive Landscape
|
|
18
|
-
- Roadmap (Now / Next / Later)
|
|
19
|
-
|
|
20
|
-
2. **Check** if `ARCHITECTURE.md` exists in project root
|
|
21
|
-
- If missing → Create with structure:
|
|
22
|
-
- Tech Stack (with rationale)
|
|
23
|
-
- System Design
|
|
24
|
-
- Key Patterns
|
|
25
|
-
- Data Models
|
|
26
|
-
- Integrations
|
|
27
|
-
- Technical Decisions
|
|
28
|
-
- Known Limitations
|
|
29
|
-
|
|
30
|
-
3. **If files exist**, read them and suggest improvements based on current codebase.
|
|
31
|
-
|
|
32
|
-
**Fill in details** based on what you can learn from the codebase. Ask user for what you can't infer.
|
|
33
|
-
|
|
34
|
-
Product = WHAT and WHY. Architecture = HOW.
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polish
|
|
3
|
-
description: Polish project presentation - docs, README, packaging, metadata
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Polish Project
|
|
7
|
-
|
|
8
|
-
Make project professional, welcoming, and well-documented.
|
|
9
|
-
|
|
10
|
-
## Scope
|
|
11
|
-
|
|
12
|
-
**README:**
|
|
13
|
-
- Clear project description (what, why, how)
|
|
14
|
-
- Installation instructions (tested)
|
|
15
|
-
- Quick start example (copy-paste ready)
|
|
16
|
-
- Key features (3-5 bullet points)
|
|
17
|
-
- API overview
|
|
18
|
-
- Links to full docs
|
|
19
|
-
- Badges (build status, coverage, version, license)
|
|
20
|
-
- Contributing guidelines link
|
|
21
|
-
- License
|
|
22
|
-
|
|
23
|
-
**Documentation:**
|
|
24
|
-
- API reference (all public functions)
|
|
25
|
-
- Usage examples (common scenarios)
|
|
26
|
-
- Tutorials (step-by-step guides)
|
|
27
|
-
- Architecture overview
|
|
28
|
-
- Troubleshooting guide
|
|
29
|
-
- FAQ
|
|
30
|
-
- Migration guides (if applicable)
|
|
31
|
-
|
|
32
|
-
**Code Comments:**
|
|
33
|
-
- JSDoc for public APIs
|
|
34
|
-
- Complex logic explained (WHY not WHAT)
|
|
35
|
-
- Non-obvious decisions documented
|
|
36
|
-
- Examples in comments where helpful
|
|
37
|
-
|
|
38
|
-
**Packaging (package.json):**
|
|
39
|
-
- Accurate description
|
|
40
|
-
- Relevant keywords (10-15)
|
|
41
|
-
- Repository URL
|
|
42
|
-
- Homepage URL
|
|
43
|
-
- Bug tracker URL
|
|
44
|
-
- Author info
|
|
45
|
-
- License
|
|
46
|
-
- Engines specified
|
|
47
|
-
- Files field (only ship necessary)
|
|
48
|
-
|
|
49
|
-
**GitHub Metadata:**
|
|
50
|
-
- Topics/tags (10-20 relevant tags)
|
|
51
|
-
- Description (concise, searchable)
|
|
52
|
-
- Website URL
|
|
53
|
-
- Social preview image (if applicable)
|
|
54
|
-
|
|
55
|
-
**Changelog:**
|
|
56
|
-
- Update CHANGELOG.md
|
|
57
|
-
- Clear version history
|
|
58
|
-
- Breaking changes highlighted
|
|
59
|
-
- Migration instructions
|
|
60
|
-
|
|
61
|
-
**Contributing:**
|
|
62
|
-
- CONTRIBUTING.md
|
|
63
|
-
- Code of conduct
|
|
64
|
-
- Development setup
|
|
65
|
-
- Testing guidelines
|
|
66
|
-
- PR process
|
|
67
|
-
|
|
68
|
-
## Execution
|
|
69
|
-
|
|
70
|
-
1. **Audit** what exists vs what's missing
|
|
71
|
-
2. **Update** outdated content
|
|
72
|
-
3. **Create** missing documentation
|
|
73
|
-
4. **Test** all code examples
|
|
74
|
-
5. **Verify** all links work
|
|
75
|
-
6. **Ensure** consistency across docs
|
|
76
|
-
|
|
77
|
-
## Quality Checks
|
|
78
|
-
|
|
79
|
-
- [ ] README explains project in <5 min read
|
|
80
|
-
- [ ] New user can get started in <10 min
|
|
81
|
-
- [ ] All examples tested and work
|
|
82
|
-
- [ ] No broken links
|
|
83
|
-
- [ ] Search-friendly keywords
|
|
84
|
-
- [ ] Professional presentation
|
|
85
|
-
- [ ] Beginner-friendly
|
|
86
|
-
|
|
87
|
-
Report: What was added/updated, coverage improved.
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: quality
|
|
3
|
-
description: Improve test coverage, fix tests, optimize performance, reduce bundle size
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Quality Assurance
|
|
7
|
-
|
|
8
|
-
Maximize quality metrics: tests, coverage, performance, bundle size.
|
|
9
|
-
|
|
10
|
-
## Scope
|
|
11
|
-
|
|
12
|
-
**Testing:**
|
|
13
|
-
- Fix failing tests
|
|
14
|
-
- Add missing tests (.test.ts for all modules)
|
|
15
|
-
- Improve coverage (critical paths 100%, business logic 80%+)
|
|
16
|
-
- Test edge cases
|
|
17
|
-
- Test error paths
|
|
18
|
-
- Integration tests
|
|
19
|
-
- E2E tests (if applicable)
|
|
20
|
-
|
|
21
|
-
**Benchmarking:**
|
|
22
|
-
- Add benchmarks (.bench.ts for critical functions)
|
|
23
|
-
- Measure performance
|
|
24
|
-
- Identify regressions
|
|
25
|
-
- Optimize slow operations
|
|
26
|
-
|
|
27
|
-
**Performance:**
|
|
28
|
-
- Profile hot paths
|
|
29
|
-
- Optimize algorithms (reduce complexity)
|
|
30
|
-
- Fix memory leaks
|
|
31
|
-
- Reduce allocations
|
|
32
|
-
- Cache expensive operations
|
|
33
|
-
- Lazy load where possible
|
|
34
|
-
|
|
35
|
-
**Bundle Size:**
|
|
36
|
-
- Analyze bundle composition
|
|
37
|
-
- Remove unused dependencies
|
|
38
|
-
- Tree-shake effectively
|
|
39
|
-
- Code split strategically
|
|
40
|
-
- Compress assets
|
|
41
|
-
- Use dynamic imports
|
|
42
|
-
|
|
43
|
-
**Code Quality:**
|
|
44
|
-
- Fix lint errors/warnings
|
|
45
|
-
- Improve type safety (no `any`)
|
|
46
|
-
- Reduce complexity
|
|
47
|
-
- Improve maintainability
|
|
48
|
-
- Follow code standards
|
|
49
|
-
|
|
50
|
-
**Security:**
|
|
51
|
-
- Fix vulnerabilities
|
|
52
|
-
- Update dependencies
|
|
53
|
-
- Validate inputs
|
|
54
|
-
- Sanitize outputs
|
|
55
|
-
- Secure defaults
|
|
56
|
-
|
|
57
|
-
## Execution
|
|
58
|
-
|
|
59
|
-
### 1. Test Coverage
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# Run tests with coverage
|
|
63
|
-
npm run test:coverage
|
|
64
|
-
|
|
65
|
-
# Identify gaps
|
|
66
|
-
# Add tests for uncovered code
|
|
67
|
-
# Focus on critical paths first
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Priority:**
|
|
71
|
-
- Critical business logic (100%)
|
|
72
|
-
- Error handling (100%)
|
|
73
|
-
- Edge cases (90%)
|
|
74
|
-
- Happy paths (100%)
|
|
75
|
-
- Integration points (80%)
|
|
76
|
-
|
|
77
|
-
### 2. Benchmarking
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Run benchmarks
|
|
81
|
-
npm run bench
|
|
82
|
-
|
|
83
|
-
# Compare against baseline
|
|
84
|
-
# Identify regressions
|
|
85
|
-
# Optimize bottlenecks
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Add benchmarks for:**
|
|
89
|
-
- Algorithm complexity (O(n) vs O(n²))
|
|
90
|
-
- Database queries
|
|
91
|
-
- API calls
|
|
92
|
-
- Data processing
|
|
93
|
-
- Rendering (if UI)
|
|
94
|
-
|
|
95
|
-
### 3. Performance Profiling
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Profile application
|
|
99
|
-
node --inspect ...
|
|
100
|
-
# Or use Clinic.js, 0x, etc.
|
|
101
|
-
|
|
102
|
-
# Identify bottlenecks
|
|
103
|
-
# Optimize hot paths
|
|
104
|
-
# Measure improvements
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Check:**
|
|
108
|
-
- CPU usage
|
|
109
|
-
- Memory usage
|
|
110
|
-
- I/O operations
|
|
111
|
-
- Network calls
|
|
112
|
-
- Rendering time
|
|
113
|
-
|
|
114
|
-
### 4. Bundle Analysis
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Analyze bundle
|
|
118
|
-
npm run build -- --analyze
|
|
119
|
-
|
|
120
|
-
# Check size
|
|
121
|
-
ls -lh dist/
|
|
122
|
-
|
|
123
|
-
# Identify large dependencies
|
|
124
|
-
# Remove unnecessary code
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**Optimize:**
|
|
128
|
-
- Remove unused dependencies
|
|
129
|
-
- Use smaller alternatives
|
|
130
|
-
- Dynamic imports for large modules
|
|
131
|
-
- Tree-shake effectively
|
|
132
|
-
- Minify properly
|
|
133
|
-
|
|
134
|
-
### 5. Quality Metrics
|
|
135
|
-
|
|
136
|
-
**Track:**
|
|
137
|
-
- Test coverage: `npm run test:coverage`
|
|
138
|
-
- Bundle size: `ls -lh dist/`
|
|
139
|
-
- Performance: `npm run bench`
|
|
140
|
-
- Security: `npm audit`
|
|
141
|
-
- Type coverage: TypeScript strict mode
|
|
142
|
-
- Lint score: `npm run lint`
|
|
143
|
-
|
|
144
|
-
## Targets
|
|
145
|
-
|
|
146
|
-
**Tests:**
|
|
147
|
-
- Coverage: ≥80% (business logic ≥90%)
|
|
148
|
-
- All critical paths: 100%
|
|
149
|
-
- Build time: <30s
|
|
150
|
-
- Test time: <10s
|
|
151
|
-
|
|
152
|
-
**Performance:**
|
|
153
|
-
- Page load: <3s
|
|
154
|
-
- API response: <200ms
|
|
155
|
-
- Time to interactive: <5s
|
|
156
|
-
- Bundle size: <100KB (gzipped)
|
|
157
|
-
|
|
158
|
-
**Quality:**
|
|
159
|
-
- Zero lint errors
|
|
160
|
-
- Zero `any` types (unless justified)
|
|
161
|
-
- Zero security vulnerabilities (high/critical)
|
|
162
|
-
- Complexity score: <10 per function
|
|
163
|
-
|
|
164
|
-
## Commit Strategy
|
|
165
|
-
|
|
166
|
-
Atomic commits per improvement:
|
|
167
|
-
- `test(auth): add tests for token validation`
|
|
168
|
-
- `perf(db): optimize user query with batch loading`
|
|
169
|
-
- `build: reduce bundle size by 40% with code splitting`
|
|
170
|
-
|
|
171
|
-
## Exit Criteria
|
|
172
|
-
|
|
173
|
-
- [ ] All tests pass
|
|
174
|
-
- [ ] Coverage meets targets
|
|
175
|
-
- [ ] Benchmarks added for critical functions
|
|
176
|
-
- [ ] Performance optimized
|
|
177
|
-
- [ ] Bundle size reduced
|
|
178
|
-
- [ ] No security vulnerabilities
|
|
179
|
-
- [ ] Quality metrics improved
|
|
180
|
-
|
|
181
|
-
Report: Coverage %, bundle size reduction, performance gains, benchmarks added.
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: release
|
|
3
|
-
description: Publish new version and monitor release process
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Release & Publish
|
|
7
|
-
|
|
8
|
-
Prepare, publish, and monitor package release.
|
|
9
|
-
|
|
10
|
-
## Pre-Release Checks
|
|
11
|
-
|
|
12
|
-
**Quality Gates:**
|
|
13
|
-
- [ ] All tests pass
|
|
14
|
-
- [ ] No lint errors
|
|
15
|
-
- [ ] Build successful
|
|
16
|
-
- [ ] No security vulnerabilities
|
|
17
|
-
- [ ] Dependencies up to date
|
|
18
|
-
- [ ] CHANGELOG updated
|
|
19
|
-
- [ ] README accurate
|
|
20
|
-
- [ ] Breaking changes documented
|
|
21
|
-
|
|
22
|
-
**Version Decision:**
|
|
23
|
-
- Breaking changes → `major`
|
|
24
|
-
- New features → `minor` (default)
|
|
25
|
-
- Bug fixes → `patch`
|
|
26
|
-
|
|
27
|
-
## Release Process
|
|
28
|
-
|
|
29
|
-
### For TypeScript/JavaScript Projects
|
|
30
|
-
|
|
31
|
-
1. **Create Changeset:**
|
|
32
|
-
```bash
|
|
33
|
-
bunx changeset
|
|
34
|
-
```
|
|
35
|
-
- Select package
|
|
36
|
-
- Choose version bump type
|
|
37
|
-
- Write clear summary
|
|
38
|
-
|
|
39
|
-
2. **Version Bump:**
|
|
40
|
-
```bash
|
|
41
|
-
bunx changeset version
|
|
42
|
-
```
|
|
43
|
-
- Updates package.json
|
|
44
|
-
- Updates CHANGELOG.md
|
|
45
|
-
- Consumes changeset
|
|
46
|
-
|
|
47
|
-
3. **Commit & Push:**
|
|
48
|
-
```bash
|
|
49
|
-
git add -A
|
|
50
|
-
git commit -m "chore(release): <package>@<version>"
|
|
51
|
-
git push
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
4. **Monitor CI:**
|
|
55
|
-
```bash
|
|
56
|
-
gh run list --workflow=release --limit 5
|
|
57
|
-
gh run watch <run-id>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
5. **Verify Publication:**
|
|
61
|
-
```bash
|
|
62
|
-
npm view <package>@<version>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### For Other Projects
|
|
66
|
-
|
|
67
|
-
1. Update version in manifest (package.json, setup.py, etc.)
|
|
68
|
-
2. Update CHANGELOG
|
|
69
|
-
3. Create git tag
|
|
70
|
-
4. Push tag to trigger release
|
|
71
|
-
5. Monitor CI/CD
|
|
72
|
-
|
|
73
|
-
## Post-Release
|
|
74
|
-
|
|
75
|
-
- [ ] Verify package published
|
|
76
|
-
- [ ] Test installation: `npm install <package>@latest`
|
|
77
|
-
- [ ] Create GitHub release with notes
|
|
78
|
-
- [ ] Announce (if public package)
|
|
79
|
-
- [ ] Close related issues/PRs
|
|
80
|
-
|
|
81
|
-
## Troubleshooting
|
|
82
|
-
|
|
83
|
-
**CI fails on install:**
|
|
84
|
-
- Update lockfile locally: `bun install`
|
|
85
|
-
- Commit and push
|
|
86
|
-
|
|
87
|
-
**Tests fail in CI:**
|
|
88
|
-
- Run tests locally: `npm test`
|
|
89
|
-
- Fix issues, commit, push
|
|
90
|
-
|
|
91
|
-
**Build fails:**
|
|
92
|
-
- Check build locally: `npm run build`
|
|
93
|
-
- Fix errors, commit, push
|
|
94
|
-
|
|
95
|
-
## Exit Criteria
|
|
96
|
-
|
|
97
|
-
- [ ] Package published successfully
|
|
98
|
-
- [ ] CI workflow completed
|
|
99
|
-
- [ ] GitHub release created
|
|
100
|
-
- [ ] Version verified on registry
|
|
101
|
-
- [ ] Installation tested
|
|
102
|
-
|
|
103
|
-
Report: Version number, publish time, registry URL.
|