ebade 0.1.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 +36 -0
- package/CONTRIBUTING.md +177 -0
- package/LICENSE +21 -0
- package/MANIFESTO.md +170 -0
- package/README.md +263 -0
- package/ROADMAP.md +119 -0
- package/SYNTAX.md +515 -0
- package/benchmarks/RESULTS.md +119 -0
- package/benchmarks/token-benchmark.js +197 -0
- package/cli/scaffold.js +706 -0
- package/docs/GREEN-AI.md +86 -0
- package/examples/ecommerce.ebade.yaml +192 -0
- package/landing/favicon.svg +6 -0
- package/landing/index.html +227 -0
- package/landing/main.js +147 -0
- package/landing/og-image.png +0 -0
- package/landing/style.css +616 -0
- package/package.json +43 -0
- package/packages/mcp-server/README.md +144 -0
- package/packages/mcp-server/package-lock.json +1178 -0
- package/packages/mcp-server/package.json +32 -0
- package/packages/mcp-server/src/index.ts +316 -0
- package/packages/mcp-server/src/tools/compile.ts +269 -0
- package/packages/mcp-server/src/tools/generate.ts +420 -0
- package/packages/mcp-server/src/tools/scaffold.ts +474 -0
- package/packages/mcp-server/src/tools/validate.ts +233 -0
- package/packages/mcp-server/tsconfig.json +16 -0
- package/schema/project.schema.json +195 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **ebade** will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- MCP Server branding update to **ebade**.
|
|
13
|
+
- Green AI Metrics and Carbon Impact calculations.
|
|
14
|
+
- Turkish identity integration (Badik mascot π£ and "The Essence of Code" vision).
|
|
15
|
+
- `ebade_generate` improved inference.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [0.1.0] - 2025-01-07
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- π Initial alpha release of **ebade**
|
|
24
|
+
- MCP Server package (`@ebade/mcp-server`) with 4 tools:
|
|
25
|
+
- `ebade_scaffold` - Create full projects from ebade definitions
|
|
26
|
+
- `ebade_validate` - Validate ebade files against schema
|
|
27
|
+
- `ebade_compile` - Compile single ebade to code
|
|
28
|
+
- `ebade_generate` - Generate components from natural language
|
|
29
|
+
- Project scaffolding for 5 project types (e-commerce, SaaS, Blog, etc.)
|
|
30
|
+
- YAML ebade definition format (.ebade.yaml)
|
|
31
|
+
- Next.js App Router as primary compilation target
|
|
32
|
+
- Comprehensive documentation (Manifesto, Syntax, Roadmap, Green AI)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
*This project was born out of the desire to make AI coding efficient and sustainable.*
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Contributing to ebade π€
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to ebade! This is a community-driven project, and we welcome contributions of all kinds.
|
|
4
|
+
|
|
5
|
+
## π Ways to Contribute
|
|
6
|
+
|
|
7
|
+
### 1. Star the Repository
|
|
8
|
+
The simplest way to show support! It helps others discover the project.
|
|
9
|
+
|
|
10
|
+
### 2. Report Bugs
|
|
11
|
+
Found a bug? Please open an issue with:
|
|
12
|
+
- A clear, descriptive title
|
|
13
|
+
- Steps to reproduce
|
|
14
|
+
- Expected vs actual behavior
|
|
15
|
+
- Your environment (OS, Node version, etc.)
|
|
16
|
+
|
|
17
|
+
### 3. Suggest Features
|
|
18
|
+
Have an idea? Open an issue with the "feature request" label:
|
|
19
|
+
- Describe the problem you're trying to solve
|
|
20
|
+
- Propose your solution
|
|
21
|
+
- Consider alternatives you've thought about
|
|
22
|
+
|
|
23
|
+
### 4. Submit ebade Examples
|
|
24
|
+
|
|
25
|
+
One of the best ways to contribute is adding new ebade examples:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
examples/
|
|
29
|
+
βββ ecommerce.ebade.yaml # existing
|
|
30
|
+
βββ blog.ebade.yaml # new!
|
|
31
|
+
βββ saas-dashboard.ebade.yaml # new!
|
|
32
|
+
βββ portfolio.ebade.yaml # new!
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 5. Add Component Templates
|
|
36
|
+
Expand the component library in the MCP server:
|
|
37
|
+
```typescript
|
|
38
|
+
// packages/mcp-server/src/tools/generate.ts
|
|
39
|
+
const componentPatterns = [
|
|
40
|
+
// Add your pattern here!
|
|
41
|
+
];
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 6. Improve Documentation
|
|
45
|
+
- Fix typos
|
|
46
|
+
- Add examples
|
|
47
|
+
- Clarify confusing sections
|
|
48
|
+
- Translate to other languages
|
|
49
|
+
|
|
50
|
+
### 7. Core Development
|
|
51
|
+
- Parser improvements
|
|
52
|
+
- New compilation targets (Vue, Svelte, etc.)
|
|
53
|
+
- VS Code extension
|
|
54
|
+
- CLI enhancements
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## π οΈ Development Setup
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Clone the repository
|
|
62
|
+
git clone https://github.com/YOUR_USERNAME/ebade.git
|
|
63
|
+
cd ebade
|
|
64
|
+
|
|
65
|
+
# Install dependencies
|
|
66
|
+
npm install
|
|
67
|
+
|
|
68
|
+
# Build MCP server
|
|
69
|
+
cd packages/mcp-server
|
|
70
|
+
npm install
|
|
71
|
+
npm run build
|
|
72
|
+
|
|
73
|
+
# Run in dev mode
|
|
74
|
+
npm run dev
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## π Pull Request Process
|
|
80
|
+
|
|
81
|
+
1. **Fork** the repository
|
|
82
|
+
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
|
|
83
|
+
3. **Make** your changes
|
|
84
|
+
4. **Test** your changes
|
|
85
|
+
5. **Commit** with a descriptive message
|
|
86
|
+
6. **Push** to your fork
|
|
87
|
+
7. **Open** a Pull Request
|
|
88
|
+
|
|
89
|
+
### Commit Message Format
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
type(scope): subject
|
|
93
|
+
|
|
94
|
+
body (optional)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Types:
|
|
98
|
+
- `feat`: New feature
|
|
99
|
+
- `fix`: Bug fix
|
|
100
|
+
- `docs`: Documentation
|
|
101
|
+
- `style`: Formatting
|
|
102
|
+
- `refactor`: Code restructuring
|
|
103
|
+
- `test`: Adding tests
|
|
104
|
+
- `chore`: Maintenance
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
```
|
|
108
|
+
feat(mcp): add vue compilation target
|
|
109
|
+
fix(scaffold): handle nested routes correctly
|
|
110
|
+
docs(readme): add installation instructions
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## π§ͺ Testing
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Run tests
|
|
119
|
+
npm test
|
|
120
|
+
|
|
121
|
+
# Run with coverage
|
|
122
|
+
npm run test:coverage
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## π Code Style
|
|
128
|
+
|
|
129
|
+
- Use TypeScript
|
|
130
|
+
- 2 spaces for indentation
|
|
131
|
+
- Semicolons required
|
|
132
|
+
- Single quotes for strings
|
|
133
|
+
- Max line length: 100 characters
|
|
134
|
+
|
|
135
|
+
We use ESLint and Prettier (coming soon).
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## π― Priority Areas
|
|
140
|
+
|
|
141
|
+
Currently, we're focusing on:
|
|
142
|
+
|
|
143
|
+
1. **MCP Server stability** - Making it robust for AI agents
|
|
144
|
+
2. **ebade examples** - More real-world examples
|
|
145
|
+
3. **Documentation** - Comprehensive guides
|
|
146
|
+
4. **Vue/Svelte targets** - Cross-framework compilation
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## π€ For AI Contributors
|
|
151
|
+
|
|
152
|
+
Yes, AI agents can contribute too! When contributing via AI:
|
|
153
|
+
|
|
154
|
+
1. Clearly state that the contribution was AI-assisted
|
|
155
|
+
2. Review the generated code carefully
|
|
156
|
+
3. Test the changes
|
|
157
|
+
4. Ensure the code follows our style guide
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## π¬ Questions?
|
|
162
|
+
|
|
163
|
+
- Open an issue with the "question" label
|
|
164
|
+
- Start a GitHub Discussion
|
|
165
|
+
- Reach out on Twitter (coming soon)
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## π Code of Conduct
|
|
170
|
+
|
|
171
|
+
Be kind, be respectful, be constructive.
|
|
172
|
+
|
|
173
|
+
We're all here to build something amazing together.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
Thank you for helping make ebade better! π
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ebade Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/MANIFESTO.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# ebade Manifesto π§
|
|
2
|
+
|
|
3
|
+
> **"Code = f(intent)"** β Kod, niyetin bir fonksiyonu olmalΔ±.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Paradigma DeΔiΕimleri
|
|
8
|
+
|
|
9
|
+
| Feature | Traditional Frameworks | ebade (Agent-First) |
|
|
10
|
+
| :--- | :--- | :--- |
|
|
11
|
+
| **Primary User** | Human Developer | AI Agent |
|
|
12
|
+
| **Entry Point** | implementation.ts | project.ebade.yaml |
|
|
13
|
+
| **Context Size** | High (Boilerplate) | Ultra-Low (Essence) |
|
|
14
|
+
| **Logic** | Procedural "How" | Declarative "What" |
|
|
15
|
+
| **Testability** | External / Manual | Inherent / Inferred |
|
|
16
|
+
| **Carbon Footprint**| High (100%) | Low (~34%) |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Mevcut Sorun
|
|
21
|
+
|
|
22
|
+
AI agent'lar Εu anda **insan gibi davranmaya** zorlanΔ±yor:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Δ°nsan β DΓΌΕΓΌnΓΌr β Kod yazar β Framework β ΓalΔ±ΕΔ±r
|
|
26
|
+
β
|
|
27
|
+
AI Agent β DΓΌΕΓΌnΓΌr β Kod yazar β Framework β ΓalΔ±ΕΔ±r
|
|
28
|
+
β
|
|
29
|
+
"Δ°nsan gibi" kod yazmak zorunda
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
AI'Δ±n doΔal dΓΌΕΓΌnce Εekli:
|
|
33
|
+
- **Intent-based**: "Ne" olmasΔ±nΔ± istiyor
|
|
34
|
+
- **Declarative**: "NasΔ±l" deΔil "ne"
|
|
35
|
+
- **Structured**: Belirsizlik yok
|
|
36
|
+
|
|
37
|
+
Ama mevcut framework'lar:
|
|
38
|
+
- **Imperative detaylar** istiyor
|
|
39
|
+
- **Δ°nsan convention'larΔ±** var
|
|
40
|
+
- **Belirsizliklerle** dolu
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Temel Kavramlar
|
|
45
|
+
|
|
46
|
+
### Intent
|
|
47
|
+
Bir Εeyin **ne** yapmasΔ± gerektiΔinin tanΔ±mΔ±.
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
@intent('user-authentication')
|
|
51
|
+
@inputs(['email', 'password'])
|
|
52
|
+
@validates(['email-format', 'password-strength'])
|
|
53
|
+
@outcomes({
|
|
54
|
+
success: 'redirect-to-dashboard',
|
|
55
|
+
failure: 'show-error-message'
|
|
56
|
+
})
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Requires
|
|
60
|
+
Intent'in Γ§alΔ±ΕmasΔ± iΓ§in gereken baΔΔ±mlΔ±lΔ±klar.
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
@requires({
|
|
64
|
+
data: ['user', 'products'], // Veri baΔΔ±mlΔ±lΔ±klarΔ±
|
|
65
|
+
auth: 'required', // Auth durumu
|
|
66
|
+
permissions: ['can-checkout'], // Δ°zinler
|
|
67
|
+
features: ['payments'] // Feature flags
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Outcomes
|
|
72
|
+
OlasΔ± sonuΓ§lar ve ne yapΔ±lacaΔΔ±.
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
@outcomes({
|
|
76
|
+
success: '/thank-you',
|
|
77
|
+
error: { show: 'toast', message: 'context' },
|
|
78
|
+
timeout: { retry: 3, fallback: 'offline-mode' }
|
|
79
|
+
})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Style
|
|
83
|
+
GΓΆrsel tanΔ±m (design system'den).
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
@style({
|
|
87
|
+
variant: 'primary',
|
|
88
|
+
size: 'lg',
|
|
89
|
+
animation: 'subtle',
|
|
90
|
+
theme: 'inherit'
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
Goal β Implementation β Debugging β Refactoring
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Compilation Pipeline
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Intent Definition (.intent.js)
|
|
104
|
+
β
|
|
105
|
+
[Parser]
|
|
106
|
+
β
|
|
107
|
+
Intent AST
|
|
108
|
+
β
|
|
109
|
+
[Compiler]
|
|
110
|
+
β
|
|
111
|
+
Target Framework Code (React, Vue, etc.)
|
|
112
|
+
β
|
|
113
|
+
[Runtime]
|
|
114
|
+
β
|
|
115
|
+
Working Application
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## AI Agent Workflow
|
|
121
|
+
|
|
122
|
+
### Γnceki (Εimdi)
|
|
123
|
+
```
|
|
124
|
+
User: "Checkout sayfasΔ± yap"
|
|
125
|
+
Agent: *Next.js docs'Δ± hatΔ±rla*
|
|
126
|
+
*app router mΔ± pages mΔ±?*
|
|
127
|
+
*server component mΔ± client mΔ±?*
|
|
128
|
+
*500 satΔ±r kod yaz*
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### ebade ile
|
|
132
|
+
```
|
|
133
|
+
User: "Checkout sayfasΔ± yap"
|
|
134
|
+
Agent: *intent tanΔ±mΔ± yaz*
|
|
135
|
+
@page('/checkout')
|
|
136
|
+
@intent('complete-purchase')
|
|
137
|
+
@requires(['cart', 'user', 'payment'])
|
|
138
|
+
*bitti*
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Design Principles
|
|
144
|
+
|
|
145
|
+
1. **Agent-Native**: AI'Δ±n dΓΌΕΓΌnce yapΔ±sΔ±na uygun
|
|
146
|
+
2. **Human-Readable**: Δ°nsan da okuyup anlayabilir
|
|
147
|
+
3. **Deterministic**: AynΔ± input = aynΔ± output
|
|
148
|
+
4. **Composable**: KΓΌΓ§ΓΌk parΓ§alar bΓΌyΓΌk yapΔ±lar oluΕturur
|
|
149
|
+
5. **Target-Agnostic**: FarklΔ± framework'lere compile edilebilir
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Why Now?
|
|
154
|
+
|
|
155
|
+
1. **AI Coding Mainstream**: Cursor, Copilot, Claude yaygΔ±n
|
|
156
|
+
2. **Framework Fatigue**: Herkes yeni Εeyler ΓΆΔrenmekten yorgun
|
|
157
|
+
3. **Abstraction Ready**: TypeScript, JSX gibi katmanlar kabul gΓΆrdΓΌ
|
|
158
|
+
4. **First Mover**: HenΓΌz kimse yapmadΔ±
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Vision
|
|
163
|
+
|
|
164
|
+
> ebade, AI agent'larΔ±n doΔal dili.
|
|
165
|
+
> Δ°nsan niyeti ile Γ§alΔ±Εan kod arasΔ±ndaki kΓΆprΓΌ.
|
|
166
|
+
> Framework'ler iΓ§in TypeScript ne ise, AI iΓ§in o.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
**Built for AI, readable by humans.**
|
package/README.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# ebade π§
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](./packages/mcp-server)
|
|
5
|
+
[](./ROADMAP.md)
|
|
6
|
+
[](./docs/GREEN-AI.md)
|
|
7
|
+
|
|
8
|
+
> **The first framework designed FOR AI agents, readable by humans.**
|
|
9
|
+
>
|
|
10
|
+
> `Code = f(ebade)`
|
|
11
|
+
>
|
|
12
|
+
> *Capture the essence of code. Less tokens. Less carbon. Same result.* π±
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
// β Before: 100+ lines of boilerplate
|
|
16
|
+
export default function CheckoutPage() {
|
|
17
|
+
const [cart, setCart] = useState([]);
|
|
18
|
+
const [loading, setLoading] = useState(false);
|
|
19
|
+
const [error, setError] = useState(null);
|
|
20
|
+
useEffect(() => { /* fetch data */ }, []);
|
|
21
|
+
// ... 100 more lines of HOW
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// β
After: Pure intent - WHAT you want
|
|
25
|
+
@page('/checkout')
|
|
26
|
+
@intent('complete-purchase')
|
|
27
|
+
@requires({ data: ['cart', 'user'], auth: 'required' })
|
|
28
|
+
@outcomes({ success: '/order/[id]', error: 'show-inline' })
|
|
29
|
+
export function Checkout({ cart, user }) {
|
|
30
|
+
// Just business logic, zero boilerplate
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## π Quick Start
|
|
37
|
+
|
|
38
|
+
### For AI Agents (MCP)
|
|
39
|
+
|
|
40
|
+
**ebade** is designed to be used BY AI agents. Add to your MCP configuration:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"ebade": {
|
|
46
|
+
"command": "node",
|
|
47
|
+
"args": ["./packages/mcp-server/dist/index.js"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Then AI agents can use:
|
|
54
|
+
|
|
55
|
+
- `ebade_scaffold` - Create full projects from intent
|
|
56
|
+
- `ebade_compile` - Compile single intents to code
|
|
57
|
+
- `ebade_validate` - Validate intent files
|
|
58
|
+
- `ebade_generate` - Generate from natural language
|
|
59
|
+
|
|
60
|
+
### For Humans (CLI)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Scaffold a new project
|
|
64
|
+
npx ebade scaffold --type e-commerce --name my-store
|
|
65
|
+
|
|
66
|
+
# Compile intents to code
|
|
67
|
+
npx ebade build
|
|
68
|
+
|
|
69
|
+
# Watch mode
|
|
70
|
+
npx ebade dev
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## π Benchmark: ~66% Fewer Tokens (Tested)
|
|
76
|
+
|
|
77
|
+
We measured token usage across common development tasks:
|
|
78
|
+
|
|
79
|
+
| Task | Next.js | ebade | Savings | Efficiency |
|
|
80
|
+
|------|---------|-------|---------|------------|
|
|
81
|
+
| Checkout Page | 258 tokens | 66 tokens | **74.4%** | 3.9x |
|
|
82
|
+
| Product Listing | 133 tokens | 63 tokens | **52.6%** | 2.1x |
|
|
83
|
+
| User Auth | 148 tokens | 56 tokens | **62.2%** | 2.6x |
|
|
84
|
+
| **Average** | | | **65.7%** | **2.9x** |
|
|
85
|
+
|
|
86
|
+
> *For full project scaffolding, savings can reach 75-92%.*
|
|
87
|
+
|
|
88
|
+
### π° Cost Impact
|
|
89
|
+
|
|
90
|
+
At scale (1M AI coding sessions):
|
|
91
|
+
|
|
92
|
+
| Framework | Token Cost | Savings |
|
|
93
|
+
|-----------|------------|---------|
|
|
94
|
+
| Next.js | $5,390 | - |
|
|
95
|
+
| **ebade** | **$1,850** | **$3,540** |
|
|
96
|
+
|
|
97
|
+
> *The greenest code is the code you don't generate.*
|
|
98
|
+
|
|
99
|
+
π [Full Benchmark Results](./benchmarks/RESULTS.md) | π± [Green AI Manifesto](./docs/GREEN-AI.md)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## π‘ The Problem
|
|
104
|
+
|
|
105
|
+
AI agents (Cursor, Copilot, Claude) write code for **human-designed frameworks**:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
AI: "Is this a server or client component?"
|
|
109
|
+
AI: "App router or pages router?"
|
|
110
|
+
AI: "useState or useReducer?"
|
|
111
|
+
AI: "Where does this file go?"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Every decision is **ambiguous**. AI guesses. Sometimes wrong.
|
|
115
|
+
|
|
116
|
+
## β¨ The Solution
|
|
117
|
+
|
|
118
|
+
**ebade** - A framework where AI expresses **intent**, not implementation.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Human describes β AI writes intent β ebade compiles β Working code
|
|
122
|
+
β
|
|
123
|
+
No ambiguity here
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## π¦ Packages
|
|
129
|
+
|
|
130
|
+
| Package | Description | Status |
|
|
131
|
+
|---------|-------------|--------|
|
|
132
|
+
| [@ebade/mcp-server](./packages/mcp-server) | MCP Server for AI agents | β
Alpha |
|
|
133
|
+
| @ebade/cli | Command-line interface | π§ Coming |
|
|
134
|
+
| @ebade/compiler | Intent β Code compiler | π§ Coming |
|
|
135
|
+
| @ebade/vscode | VS Code extension | π Planned |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## π― Core Concepts
|
|
140
|
+
|
|
141
|
+
### Intent-First
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
@intent('user-authentication')
|
|
145
|
+
@inputs(['email', 'password'])
|
|
146
|
+
@outcomes({ success: '/dashboard', failure: 'show-error' })
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
You say **WHAT**, not **HOW**.
|
|
150
|
+
|
|
151
|
+
### Deterministic
|
|
152
|
+
|
|
153
|
+
Same intent = Same output. Every time. No guessing.
|
|
154
|
+
|
|
155
|
+
### Composable
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
@compose(['header', 'sidebar', 'content', 'footer'])
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Small intents build big applications.
|
|
162
|
+
|
|
163
|
+
### Target-Agnostic
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
@compile('nextjs') // β Next.js App Router
|
|
167
|
+
@compile('vue') // β Vue + Nuxt (coming)
|
|
168
|
+
@compile('svelte') // β SvelteKit (coming)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
One intent, many outputs.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## π Example
|
|
176
|
+
|
|
177
|
+
```yaml
|
|
178
|
+
# project.intent.yaml
|
|
179
|
+
|
|
180
|
+
name: my-store
|
|
181
|
+
type: e-commerce
|
|
182
|
+
features:
|
|
183
|
+
- product-catalog
|
|
184
|
+
- shopping-cart
|
|
185
|
+
- checkout
|
|
186
|
+
- user-auth
|
|
187
|
+
|
|
188
|
+
pages:
|
|
189
|
+
- path: /
|
|
190
|
+
intent: landing-page
|
|
191
|
+
components:
|
|
192
|
+
- hero-section
|
|
193
|
+
- featured-products
|
|
194
|
+
- testimonials
|
|
195
|
+
|
|
196
|
+
- path: /products
|
|
197
|
+
intent: product-listing
|
|
198
|
+
components:
|
|
199
|
+
- search-bar
|
|
200
|
+
- product-grid
|
|
201
|
+
- pagination
|
|
202
|
+
|
|
203
|
+
- path: /checkout
|
|
204
|
+
intent: checkout-flow
|
|
205
|
+
auth: required
|
|
206
|
+
components:
|
|
207
|
+
- cart-summary
|
|
208
|
+
- payment-form
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Output:** Full Next.js project with 20+ files, ready to run.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## π The Paradigm Shift
|
|
216
|
+
|
|
217
|
+
| Era | Paradigm | Core Question |
|
|
218
|
+
|-----|----------|---------------|
|
|
219
|
+
| 2000s | jQuery | "How do I manipulate DOM?" |
|
|
220
|
+
| 2013 | React | "What if UI = f(state)?" |
|
|
221
|
+
| 2024 | AI Coding | "AI writes code, but for humans" |
|
|
222
|
+
| **2026** | **ebade** | **"What if Code = f(intent)?"** |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## π Documentation
|
|
227
|
+
|
|
228
|
+
- π [Manifesto](./MANIFESTO.md) β Philosophy & Vision
|
|
229
|
+
- π [Syntax Spec](./SYNTAX.md) β Complete Decorator Reference
|
|
230
|
+
- πΊοΈ [Roadmap](./ROADMAP.md) β Development Plan
|
|
231
|
+
- π [Examples](./examples/) β Real-world Intent Files
|
|
232
|
+
- π [Benchmarks](./benchmarks/) β Token & Cost Analysis
|
|
233
|
+
- π± [Green AI](./docs/GREEN-AI.md) β Environmental Impact
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## π€ Contributing
|
|
238
|
+
|
|
239
|
+
**ebade** is open source and welcomes contributions!
|
|
240
|
+
|
|
241
|
+
1. **Star this repo** β
|
|
242
|
+
2. **Try the MCP server** with your AI agent
|
|
243
|
+
3. **Open issues** with ideas and feedback
|
|
244
|
+
4. **Submit PRs** for new features
|
|
245
|
+
|
|
246
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## π License
|
|
251
|
+
|
|
252
|
+
MIT Β© ebade Contributors β Made with β€οΈ in TΓΌrkiye πΉπ·
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
<p align="center">
|
|
257
|
+
<strong>Built for AI. Readable by humans. Revolutionary by design.</strong>
|
|
258
|
+
</p>
|
|
259
|
+
|
|
260
|
+
<p align="center">
|
|
261
|
+
<i>TypeScript made JavaScript better for humans.<br/>
|
|
262
|
+
ebade makes frameworks better for AI.</i>
|
|
263
|
+
</p>
|