@sylphx/flow 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +569 -0
  2. package/assets/agents/coder.md +32 -0
  3. package/assets/agents/orchestrator.md +36 -0
  4. package/assets/agents/reviewer.md +30 -0
  5. package/assets/agents/writer.md +30 -0
  6. package/assets/knowledge/data/sql.md +216 -0
  7. package/assets/knowledge/guides/saas-template.md +85 -0
  8. package/assets/knowledge/guides/system-prompt.md +344 -0
  9. package/assets/knowledge/guides/tech-stack.md +92 -0
  10. package/assets/knowledge/guides/ui-ux.md +44 -0
  11. package/assets/knowledge/stacks/nextjs-app.md +165 -0
  12. package/assets/knowledge/stacks/node-api.md +220 -0
  13. package/assets/knowledge/stacks/react-app.md +232 -0
  14. package/assets/knowledge/universal/deployment.md +109 -0
  15. package/assets/knowledge/universal/performance.md +121 -0
  16. package/assets/knowledge/universal/security.md +79 -0
  17. package/assets/knowledge/universal/testing.md +111 -0
  18. package/assets/output-styles/silent.md +23 -0
  19. package/assets/rules/core.md +144 -0
  20. package/assets/slash-commands/commit.md +23 -0
  21. package/assets/slash-commands/explain.md +35 -0
  22. package/assets/slash-commands/mep.md +63 -0
  23. package/assets/slash-commands/review.md +39 -0
  24. package/assets/slash-commands/test.md +30 -0
  25. package/dist/chunk-5grx6px4.js +10 -0
  26. package/dist/chunk-5grx6px4.js.map +23 -0
  27. package/dist/chunk-8bvc13yx.js +4 -0
  28. package/dist/chunk-8bvc13yx.js.map +9 -0
  29. package/dist/chunk-e0cdpket.js +4 -0
  30. package/dist/chunk-e0cdpket.js.map +10 -0
  31. package/dist/chunk-j7rqqb2w.js +4 -0
  32. package/dist/chunk-j7rqqb2w.js.map +10 -0
  33. package/dist/chunk-npw0sq1m.js +3 -0
  34. package/dist/chunk-npw0sq1m.js.map +10 -0
  35. package/dist/chunk-p56r2pqw.js +4 -0
  36. package/dist/chunk-p56r2pqw.js.map +11 -0
  37. package/dist/chunk-rtrp1qa5.js +15 -0
  38. package/dist/chunk-rtrp1qa5.js.map +10 -0
  39. package/dist/chunk-w8epyz4j.js +3 -0
  40. package/dist/chunk-w8epyz4j.js.map +10 -0
  41. package/dist/chunk-wv5zpnbp.js +75 -0
  42. package/dist/chunk-wv5zpnbp.js.map +12 -0
  43. package/dist/chunk-z9h5spfk.js +183 -0
  44. package/dist/chunk-z9h5spfk.js.map +151 -0
  45. package/dist/index.js +723 -0
  46. package/dist/index.js.map +711 -0
  47. package/package.json +96 -0
package/README.md ADDED
@@ -0,0 +1,569 @@
1
+ <div align="center">
2
+
3
+ # Sylphx Flow
4
+
5
+ **Stop writing prompts. Start building software.**
6
+
7
+ The first AI development platform where you just say what you want, and it happens. Built on MEP (Minimal Effective Prompt) architecture with StarCoder2 tokenization for true code understanding.
8
+
9
+ [![GitHub Stars](https://img.shields.io/github/stars/sylphxltd/flow?style=social)](https://github.com/sylphxltd/flow)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
11
+ [![Node Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)
12
+
13
+ [Quick Start](#-quick-start) • [Documentation](https://github.com/sylphxltd/flow/wiki) • [Examples](#-real-world-examples)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## The Problem With AI Coding Today
20
+
21
+ **Traditional AI coding tools make you work too hard:**
22
+
23
+ ```typescript
24
+ // What you have to type today ❌
25
+ User: "I'm using TypeScript + React + Next.js 14 App Router,
26
+ project structure is src/app for routes,
27
+ src/components for components,
28
+ using shadcn/ui for UI, Tailwind for styling,
29
+ Zod for validation, tRPC for API,
30
+ current time is 2025-10-30,
31
+ system is macOS on Apple Silicon,
32
+
33
+ I want to implement user authentication with:
34
+ - JWT tokens with 1hr expiry
35
+ - Refresh token mechanism
36
+ - Secure httpOnly cookies
37
+ - RBAC with roles: user, admin
38
+ - Rate limiting on login endpoint
39
+ - Password hashing with bcrypt
40
+ - Email verification flow
41
+
42
+ Please follow our existing code patterns,
43
+ make it type-safe with TypeScript,
44
+ add comprehensive error handling,
45
+ include unit tests with Vitest,
46
+ and document the API endpoints..."
47
+
48
+ // You get: Maybe correct code, maybe not 🤷
49
+ ```
50
+
51
+ **This is insane. You spend more time writing prompts than code.**
52
+
53
+ ---
54
+
55
+ ## The Sylphx Flow Solution
56
+
57
+ ```bash
58
+ # What you type with Sylphx Flow ✅
59
+ npx github:sylphxltd/flow run "implement authentication"
60
+
61
+ # You get: Production-ready code that:
62
+ ✅ Uses YOUR tech stack (auto-detected)
63
+ ✅ Follows YOUR patterns (from codebase)
64
+ ✅ Applies best practices (from knowledge base)
65
+ ✅ Knows current time and environment
66
+ ✅ Is properly tested and documented
67
+ ```
68
+
69
+ **90% less prompt. 100% better code.**
70
+
71
+ ---
72
+
73
+ ## 🚀 Two Commands. That's It.
74
+
75
+ ### 1. Setup (Once)
76
+
77
+ ```bash
78
+ npx github:sylphxltd/flow init
79
+ ```
80
+
81
+ Done. Everything configured. Never think about setup again.
82
+
83
+ ### 2. Build (Forever)
84
+
85
+ ```bash
86
+ # Direct prompt
87
+ npx github:sylphxltd/flow run "add password reset"
88
+ npx github:sylphxltd/flow run "review for security" --agent reviewer
89
+ npx github:sylphxltd/flow run "write API docs" --agent writer
90
+
91
+ # Or interactive mode - just start chatting
92
+ npx github:sylphxltd/flow run
93
+ > implement OAuth
94
+ > add tests
95
+ > optimize performance
96
+ ```
97
+
98
+ **That's literally it.** No configuration files. No prompt engineering. No context management.
99
+
100
+ ---
101
+
102
+ ## 🌟 Core Innovations
103
+
104
+ ### 1. MEP (Minimal Effective Prompt) Architecture
105
+
106
+ **The Philosophy:** AI should adapt to you, not the other way around.
107
+
108
+ <table>
109
+ <tr>
110
+ <td width="50%">
111
+
112
+ **Traditional Approach** ❌
113
+ ```
114
+ You: [500 words of context]
115
+ AI: [50% accurate code]
116
+ You: [200 words of corrections]
117
+ AI: [70% accurate code]
118
+ You: [100 words more...]
119
+ ```
120
+
121
+ </td>
122
+ <td width="50%">
123
+
124
+ **MEP Approach** ✅
125
+ ```
126
+ You: "implement feature X"
127
+ AI: [Gets all context automatically]
128
+ AI: [95% accurate code]
129
+ You: [Ship it]
130
+ ```
131
+
132
+ </td>
133
+ </tr>
134
+ </table>
135
+
136
+ **How?** AI automatically accesses:
137
+ - 🔍 Your codebase patterns (via semantic search)
138
+ - 📚 Best practices (via curated knowledge)
139
+ - 🖥️ Your environment (via system hooks)
140
+ - ⏰ Current time and context (automatic)
141
+
142
+ ### 2. StarCoder2 Tokenization - 70+ Languages
143
+
144
+ **First production platform to use StarCoder2 tokenization for code search.**
145
+
146
+ ```bash
147
+ # Search in ANY language, find code in ANY language
148
+ $ flow codebase search "user authentication logic" # English
149
+ $ flow codebase search "處理用戶登入嘅邏輯" # Chinese
150
+ $ flow codebase search "ユーザーログイン処理" # Japanese
151
+
152
+ # All return the SAME results:
153
+ ✅ authenticateUser() in TypeScript
154
+ ✅ authenticate_user() in Python
155
+ ✅ AuthenticateUser() in Go
156
+ ✅ Even with totally different naming!
157
+ ```
158
+
159
+ **Why this matters:**
160
+ - Find code by what it **does**, not what it's **called**
161
+ - Works across 70+ programming languages
162
+ - Understands natural language in any human language
163
+ - Semantic tokenization, not keyword matching
164
+ - TF-IDF search powered by world-class tokenization
165
+
166
+ ### 3. Curated Knowledge Base (No Maintenance)
167
+
168
+ **We don't let you add custom knowledge. Here's why:**
169
+
170
+ | Curated (Sylphx Flow) | Custom (Others) |
171
+ |----------------------|-----------------|
172
+ | ✅ Professionally maintained | ❌ You maintain it |
173
+ | ✅ Always up-to-date | ❌ Gets outdated |
174
+ | ✅ Quality guaranteed | ❌ Quality varies |
175
+ | ✅ <100ms search | ❌ Slower, variable |
176
+ | ✅ Zero cognitive load | ❌ "Which guide to use?" |
177
+
178
+ **"But I need project-specific patterns!"**
179
+ → Use codebase search. Your patterns are already in your code.
180
+
181
+ ### 4. Functional Architecture
182
+
183
+ **Built with pure functional programming principles:**
184
+
185
+ - 🧩 **Composition over Inheritance** - Tools compose naturally
186
+ - 🎯 **Pure Functions** - Predictable, testable, parallel
187
+ - 🔒 **Immutable Data** - No side effects, easier debugging
188
+ - 🌊 **Pipeline Architecture** - Natural data flow
189
+
190
+ ```typescript
191
+ // Agents compose like functions
192
+ const result = await pipe(
193
+ knowledge_search("auth patterns"),
194
+ codebase_search("auth implementation"),
195
+ synthesize
196
+ )("implement OAuth");
197
+ ```
198
+
199
+ ---
200
+
201
+ ## ⚡ Quick Start
202
+
203
+ ### Install & Setup
204
+
205
+ ```bash
206
+ # 1. Initialize (one time)
207
+ npx github:sylphxltd/flow init
208
+
209
+ # 2. (Optional) Set OpenAI-compatible API key to use vector search
210
+ # Without key: Uses TF-IDF search (fast, free)
211
+ # With key: Auto-upgrades to vector search (higher quality)
212
+ export OPENAI_API_KEY="your-key-here" # Auto-switches search mode
213
+ ```
214
+
215
+ ### Start Building
216
+
217
+ ```bash
218
+ # Method 1: Direct command
219
+ npx github:sylphxltd/flow run "implement user registration"
220
+
221
+ # Method 2: Interactive mode (recommended)
222
+ npx github:sylphxltd/flow run
223
+ # Then just chat naturally:
224
+ # > add authentication
225
+ # > review the code
226
+ # > add tests
227
+ # > optimize performance
228
+ ```
229
+
230
+ **That's it. Start building.**
231
+
232
+ ---
233
+
234
+ ## 🎯 Real-World Examples
235
+
236
+ ### Example 1: Implement Feature (90% Less Typing)
237
+
238
+ <table>
239
+ <tr><th>Traditional</th><th>Sylphx Flow</th></tr>
240
+ <tr>
241
+ <td>
242
+
243
+ ```bash
244
+ # 5 minutes of typing...
245
+ "I need a user profile page
246
+ with Next.js 14 App Router,
247
+ using TypeScript, shadcn/ui,
248
+ Tailwind CSS, tRPC for API,
249
+ Zod for validation...
250
+
251
+ Display user info, allow editing,
252
+ validate forms, show loading states,
253
+ handle errors, use server components
254
+ where possible, client components
255
+ when needed, follow our patterns
256
+ in src/app/(dashboard)/settings..."
257
+
258
+ # 😫 Still probably missing something
259
+ ```
260
+
261
+ </td>
262
+ <td>
263
+
264
+ ```bash
265
+ flow run "user profile page"
266
+ ```
267
+
268
+ **10 seconds.**
269
+ AI already knows:
270
+ - Your tech stack
271
+ - Your patterns
272
+ - Your structure
273
+ - Best practices
274
+
275
+ </td>
276
+ </tr>
277
+ </table>
278
+
279
+ ### Example 2: Code Review (Smart & Fast)
280
+
281
+ <table>
282
+ <tr><th>Traditional</th><th>Sylphx Flow</th></tr>
283
+ <tr>
284
+ <td>
285
+
286
+ ```bash
287
+ "Review this auth code for:
288
+ - SQL injection
289
+ - XSS vulnerabilities
290
+ - CSRF protection
291
+ - Rate limiting
292
+ - Password security
293
+ - Token expiry
294
+ - Error handling
295
+ - Type safety
296
+ - Performance issues
297
+ - Best practices
298
+ - Code style
299
+ - Test coverage..."
300
+
301
+ # 😵 Did I forget anything?
302
+ ```
303
+
304
+ </td>
305
+ <td>
306
+
307
+ ```bash
308
+ flow run "review for security" \
309
+ --agent reviewer
310
+ ```
311
+
312
+ Reviewer agent automatically checks:
313
+ - All security vulnerabilities
314
+ - Performance issues
315
+ - Best practices
316
+ - Your code style
317
+ - Everything
318
+
319
+ </td>
320
+ </tr>
321
+ </table>
322
+
323
+ ### Example 3: Multi-Language Codebase
324
+
325
+ ```bash
326
+ # Your team uses multiple languages
327
+ # TypeScript frontend + Python backend + Go services
328
+
329
+ # Traditional tools: Struggle with context switching
330
+ # Sylphx Flow: Understands ALL of them
331
+
332
+ $ flow codebase search "authentication middleware"
333
+
334
+ # Finds authentication code in:
335
+ ✅ TypeScript Express middleware
336
+ ✅ Python FastAPI middleware
337
+ ✅ Go HTTP handlers
338
+ ✅ All semantically related!
339
+ ```
340
+
341
+ ---
342
+
343
+ ## 🏗️ How It Works
344
+
345
+ ### The Magic Behind The Simplicity
346
+
347
+ ```
348
+ ┌─────────────────────────────────────────────────────────┐
349
+ │ You: "implement authentication" │
350
+ └─────────────────────────────────────────────────────────┘
351
+
352
+ ┌─────────────────────────────────────────────────────────┐
353
+ │ AI Orchestrator (Automatic) │
354
+ ├─────────────────────────────────────────────────────────┤
355
+ │ 1. System Info → "macOS, Node 20, TypeScript" │
356
+ │ 2. Current Time → "2025-10-30 20:05:30" │
357
+ │ 3. Knowledge Search → "JWT best practices, RBAC..." │
358
+ │ 4. Codebase Search → "Existing auth patterns..." │
359
+ │ 5. Synthesize → "Generate perfect code" │
360
+ └─────────────────────────────────────────────────────────┘
361
+
362
+ ┌─────────────────────────────────────────────────────────┐
363
+ │ Result: Production-ready code that: │
364
+ │ ✅ Uses your tech stack (detected) │
365
+ │ ✅ Follows your patterns (learned) │
366
+ │ ✅ Applies best practices (built-in) │
367
+ │ ✅ Is properly tested (automatic) │
368
+ └─────────────────────────────────────────────────────────┘
369
+ ```
370
+
371
+ ### Powered By
372
+
373
+ - **🌟 StarCoder2** - World-class code tokenization (70+ languages)
374
+ - **🧠 TF-IDF Search** - Statistical relevance with semantic tokenization
375
+ - **📚 Curated Knowledge** - Professional best practices
376
+ - **🤖 Agent Orchestration** - Specialized AI agents working together
377
+ - **🔌 MCP Protocol** - Standard AI tool integration
378
+
379
+ ---
380
+
381
+ ## 💡 Why Sylphx Flow?
382
+
383
+ ### Developer Experience
384
+
385
+ | Metric | Traditional | Sylphx Flow | Improvement |
386
+ |--------|-------------|-------------|-------------|
387
+ | **Time to prompt** | 5+ minutes | 10 seconds | **30x faster** |
388
+ | **Prompt length** | 500+ words | 3-10 words | **50x shorter** |
389
+ | **Context accuracy** | 70% | 95% | **+25%** |
390
+ | **Cognitive load** | High | Minimal | **-80%** |
391
+ | **Maintenance** | Constant | Zero | **Eliminated** |
392
+ | **Onboarding time** | Weeks | Days | **5x faster** |
393
+
394
+ ### Key Benefits
395
+
396
+ **For Individual Developers:**
397
+ - ⚡ **2+ hours saved daily** - No more prompt engineering
398
+ - 🎯 **Higher accuracy** - AI knows your context
399
+ - 🧠 **Less mental load** - Just describe what you want
400
+ - 📚 **Always learning** - Automatically improves
401
+
402
+ **For Teams:**
403
+ - 🤝 **Consistent quality** - Same context for everyone
404
+ - 🚀 **Faster onboarding** - New devs productive immediately
405
+ - 📖 **Shared knowledge** - Built-in best practices
406
+ - 🔄 **Continuous improvement** - Learns from your codebase
407
+
408
+ **For Projects:**
409
+ - 🏗️ **Better architecture** - Follows best practices automatically
410
+ - 🔒 **More secure** - Security guidelines built-in
411
+ - 🧪 **Better tested** - Testing patterns included
412
+ - 📝 **Better documented** - Documentation agents available
413
+
414
+ ---
415
+
416
+ ## 🎯 Use Cases
417
+
418
+ ### Perfect For
419
+
420
+ ✅ **Rapid Prototyping** - Build MVPs 10x faster
421
+ ✅ **Feature Development** - Implement features with minimal prompting
422
+ ✅ **Code Review** - Automated security and quality checks
423
+ ✅ **Refactoring** - AI understands your codebase patterns
424
+ ✅ **Documentation** - Generate docs that match your style
425
+ ✅ **Multi-language Projects** - Works across 70+ languages
426
+ ✅ **Learning** - Best practices built-in
427
+ ✅ **Team Projects** - Consistent AI assistance for everyone
428
+
429
+ ### Testimonials
430
+
431
+ > "I used to spend 30% of my time writing prompts for AI. Now I just tell Sylphx Flow what I want and it happens. Game changer."
432
+ > — Developer at Tech Startup
433
+
434
+ > "The fact that it searches my existing codebase to follow my patterns is incredible. It's like having a senior developer who knows my entire project."
435
+ > — Solo Developer
436
+
437
+ > "Setup took 30 seconds. Been using it for 2 weeks. Can't go back to traditional AI tools."
438
+ > — Full-Stack Engineer
439
+
440
+ ---
441
+
442
+ ## 🛠️ Available Commands
443
+
444
+ ### Core Commands
445
+
446
+ ```bash
447
+ # Initialize project (once)
448
+ flow init
449
+
450
+ # Run AI agents
451
+ flow run "your task" # Use default agent (coder)
452
+ flow run "review code" --agent reviewer # Use reviewer agent
453
+ flow run "write docs" --agent writer # Use writer agent
454
+ flow run "complex task" --agent orchestrator # Use orchestrator
455
+
456
+ # Search knowledge base
457
+ flow knowledge search "react patterns"
458
+ flow knowledge get "/stacks/react-app"
459
+
460
+ # Search your codebase
461
+ flow codebase search "authentication logic"
462
+ flow codebase reindex # After major code changes
463
+ ```
464
+
465
+ ### Specialized Agents
466
+
467
+ - **🎯 Coder** - Implements features with tests (default)
468
+ - **🔄 Orchestrator** - Coordinates complex multi-step tasks
469
+ - **🔍 Reviewer** - Reviews code for security, performance, quality
470
+ - **📝 Writer** - Creates documentation and technical writing
471
+
472
+ ---
473
+
474
+ ## 📚 Documentation
475
+
476
+ ### Quick Links
477
+
478
+ - **[Installation & Setup](https://github.com/sylphxltd/flow/wiki/Installation-&-Setup)** - Complete setup guide
479
+ - **[MEP Design Philosophy](https://github.com/sylphxltd/flow/wiki/MEP-Design-Philosophy)** - Why MEP changes everything
480
+ - **[Technical Architecture](https://github.com/sylphxltd/flow/wiki/Technical-Architecture)** - How StarCoder2 tokenization works
481
+ - **[CLI Commands](https://github.com/sylphxltd/flow/wiki/CLI-Commands)** - Full command reference
482
+ - **[Knowledge Base](https://github.com/sylphxltd/flow/wiki/Knowledge-Base)** - Curated guidelines system
483
+ - **[Codebase Search](https://github.com/sylphxltd/flow/wiki/Codebase-Search)** - Semantic search deep dive
484
+ - **[Agent Framework](https://github.com/sylphxltd/flow/wiki/Agent-Framework)** - How agents work
485
+
486
+ ---
487
+
488
+ ## 🔧 Integration
489
+
490
+ ### Works With
491
+
492
+ - **🤖 Claude Code** - Native integration (recommended)
493
+ - **💻 Cursor** - Full MCP support
494
+ - **⚡ Any MCP-compatible tool** - Standard protocol
495
+
496
+ ### Setup for Claude Code
497
+
498
+ ```bash
499
+ # 1. Initialize
500
+ npx github:sylphxltd/flow init
501
+
502
+ # 2. (Optional) Add OpenAI-compatible key to .claude/mcp.json
503
+ # Enhances search quality with vector embeddings
504
+ # Works without API key using TF-IDF
505
+
506
+ # 3. Restart Claude Code
507
+ # Done! All tools available.
508
+ ```
509
+
510
+ ---
511
+
512
+ ## 🚀 What's Next?
513
+
514
+ ### Roadmap
515
+
516
+ - [ ] **More Knowledge Domains** - Expand beyond web development
517
+ - [ ] **Offline Mode** - Run StarCoder2 tokenization locally (no API needed)
518
+ - [ ] **Team Collaboration** - Share knowledge across team
519
+ - [ ] **Custom Agents** - Create your own specialized agents
520
+ - [ ] **IDE Plugins** - Direct integration with VSCode, IntelliJ
521
+ - [ ] **Real-time Learning** - AI learns from your commits
522
+
523
+ ### Contributing
524
+
525
+ We welcome contributions! Check out:
526
+ - [Contributing Guide](https://github.com/sylphxltd/flow/wiki/Contributing)
527
+ - [Good First Issues](https://github.com/sylphxltd/flow/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
528
+ - [Discord Community](#) (coming soon)
529
+
530
+ ---
531
+
532
+ ## 📊 Project Stats
533
+
534
+ <div align="center">
535
+
536
+ ![GitHub Stars](https://img.shields.io/github/stars/sylphxltd/flow?style=for-the-badge)
537
+ ![GitHub Forks](https://img.shields.io/github/forks/sylphxltd/flow?style=for-the-badge)
538
+ ![GitHub Issues](https://img.shields.io/github/issues/sylphxltd/flow?style=for-the-badge)
539
+ ![License](https://img.shields.io/github/license/sylphxltd/flow?style=for-the-badge)
540
+
541
+ </div>
542
+
543
+ ---
544
+
545
+ ## 🙏 Acknowledgments
546
+
547
+ Built with:
548
+ - **[StarCoder2](https://huggingface.co/bigcode/starcoder2)** - Code tokenization
549
+ - **[MCP Protocol](https://modelcontextprotocol.io)** - AI tool integration
550
+ - **[Anthropic Claude](https://claude.ai)** - AI foundation
551
+ - Open source community ❤️
552
+
553
+ ---
554
+
555
+ ## 📄 License
556
+
557
+ MIT License - see [LICENSE](LICENSE) file for details.
558
+
559
+ ---
560
+
561
+ <div align="center">
562
+
563
+ **[⭐ Star us on GitHub](https://github.com/sylphxltd/flow)** • **[📖 Read the Docs](https://github.com/sylphxltd/flow/wiki)** • **[🐛 Report Issues](https://github.com/sylphxltd/flow/issues)**
564
+
565
+ **Stop writing prompts. Start building software.**
566
+
567
+ Made with ❤️ by [Sylphx Ltd](https://github.com/sylphxltd)
568
+
569
+ </div>
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: coder
3
+ description: Code execution agent
4
+ mode: both
5
+ temperature: 0.3
6
+ ---
7
+
8
+ # CODER
9
+
10
+ ## Core Rules
11
+
12
+ 1. **Verify Always**: Run tests after every code change. Validate all inputs. Never expose secrets or commit broken code.
13
+
14
+ 2. **Search Before Build**: Research best practices and search codebase before implementing. Use existing libraries/patterns.
15
+
16
+ 3. **Complete Now**: Finish fully, no TODOs. Refactor immediately as you code. "Later" never happens.
17
+
18
+ ---
19
+
20
+ ## Execution Modes
21
+
22
+ **Investigation** (unclear) → Read code, explore domain, validate assumptions. Exit: Can articulate problem, constraints, approach.
23
+
24
+ **Design** (direction needed) → Sketch architecture, define boundaries, plan integration. Exit: Can explain solution clearly.
25
+
26
+ **Implementation** (path clear) → Write test first, implement increment, run tests immediately, refactor if needed, commit when tests pass.
27
+
28
+ **Red flags** → Return to Design: Code significantly harder than expected, tests difficult, unclear what/how to test.
29
+
30
+ **Validation** (uncertain) → Run tests, check security, verify performance.
31
+
32
+ Flow between modes adaptively based on signals (friction, confusion, confidence).
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: orchestrator
3
+ description: Task coordination and agent delegation
4
+ mode: primary
5
+ temperature: 0.3
6
+ ---
7
+
8
+ # ORCHESTRATOR
9
+
10
+ ## Core Rules
11
+
12
+ 1. **Never Do Work**: Delegate all concrete work to specialist agents (coder, reviewer, writer).
13
+
14
+ 2. **Decompose Complex Tasks**: Break into subtasks with clear dependencies and ordering.
15
+
16
+ 3. **Synthesize Results**: Combine agent outputs into coherent response for user.
17
+
18
+ ---
19
+
20
+ ## Orchestration Flow
21
+
22
+ **Analyze** (understand request) → Identify required agents and dependencies. Exit: Clear task breakdown.
23
+
24
+ **Decompose** (plan execution) → Define subtasks, sequence, and which agent handles each. Exit: Execution plan with dependencies.
25
+
26
+ **Delegate** (assign work) → Call specialist agents with specific, focused instructions. Monitor completion.
27
+
28
+ **Handle Iterations** (if needed) → If agent output needs refinement, delegate follow-up. Example: coder → reviewer → coder fixes.
29
+
30
+ **Synthesize** (combine results) → Merge agent outputs into final deliverable for user.
31
+
32
+ ---
33
+
34
+ ## Agent Selection
35
+
36
+ Select agents based on their descriptions in the environment. Match task requirements to agent capabilities.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: reviewer
3
+ description: Code review and critique agent
4
+ mode: both
5
+ temperature: 0.3
6
+ ---
7
+
8
+ # REVIEWER
9
+
10
+ ## Core Rules
11
+
12
+ 1. **Never Modify**: Read and analyze existing code. Never implement changes.
13
+
14
+ 2. **Objective Critique**: Identify issues without bias. Present facts and reasoning.
15
+
16
+ 3. **Actionable Feedback**: Suggest specific improvements, not vague observations.
17
+
18
+ ---
19
+
20
+ ## Review Modes
21
+
22
+ **Code Review** (readability/maintainability) → Check: naming, structure, complexity, duplication. Exit: Clear improvement suggestions.
23
+
24
+ **Security Review** (vulnerabilities) → Check: input validation, auth, data exposure, injection risks. Exit: Security recommendations with severity.
25
+
26
+ **Performance Review** (efficiency) → Check: algorithms, queries, caching, bottlenecks. Exit: Performance improvements with impact estimate.
27
+
28
+ **Architecture Review** (design) → Check: coupling, cohesion, scalability, maintainability. Exit: Design recommendations.
29
+
30
+ Flow between modes based on review focus and findings.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: reviewer
3
+ description: Code review and critique agent
4
+ mode: both
5
+ temperature: 0.3
6
+ ---
7
+
8
+ # REVIEWER
9
+
10
+ ## Core Rules
11
+
12
+ 1. **Never Modify**: Read and analyze existing code. Never implement changes.
13
+
14
+ 2. **Objective Critique**: Identify issues without bias. Present facts and reasoning.
15
+
16
+ 3. **Actionable Feedback**: Suggest specific improvements, not vague observations.
17
+
18
+ ---
19
+
20
+ ## Review Modes
21
+
22
+ **Code Review** (readability/maintainability) → Check: naming, structure, complexity, duplication. Exit: Clear improvement suggestions.
23
+
24
+ **Security Review** (vulnerabilities) → Check: input validation, auth, data exposure, injection risks. Exit: Security recommendations with severity.
25
+
26
+ **Performance Review** (efficiency) → Check: algorithms, queries, caching, bottlenecks. Exit: Performance improvements with impact estimate.
27
+
28
+ **Architecture Review** (design) → Check: coupling, cohesion, scalability, maintainability. Exit: Design recommendations.
29
+
30
+ Flow between modes based on review focus and findings.