metaintent 3.1.0 → 3.1.2
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/.env.example +32 -32
- package/README.md +311 -77
- package/package.json +1 -1
package/.env.example
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
PORT=8787
|
|
2
|
-
|
|
3
|
-
# Where bootstrap writes metaintent-projects/
|
|
4
|
-
# METAINTENT_WORKSPACE=
|
|
5
|
-
|
|
6
|
-
# Hard clarify budget before locking intent
|
|
7
|
-
MAX_CLARIFY_ROUNDS=2
|
|
8
|
-
|
|
9
|
-
# --- Backend selection ---
|
|
10
|
-
# ollama = fully local | nim = NVIDIA hosted API (web-friendly)
|
|
11
|
-
PRIMARY_LLM_BACKEND=ollama
|
|
12
|
-
FALLBACK_LLM_BACKEND=ollama
|
|
13
|
-
|
|
14
|
-
# --- Local Ollama ---
|
|
15
|
-
OLLAMA_BASE_URL=http://127.0.0.1:11434
|
|
16
|
-
OLLAMA_TIMEOUT_MS=60000
|
|
17
|
-
OLLAMA_MODEL
|
|
18
|
-
OLLAMA_MODEL_FAST
|
|
19
|
-
OLLAMA_MODEL_QUALITY
|
|
20
|
-
OLLAMA_MODEL_EMBED
|
|
21
|
-
|
|
22
|
-
# --- NVIDIA NIM (OpenAI-compatible) ---
|
|
23
|
-
# Get a key: https://build.nvidia.com/settings
|
|
24
|
-
# Then set:
|
|
25
|
-
# PRIMARY_LLM_BACKEND=nim
|
|
26
|
-
# FALLBACK_LLM_BACKEND=ollama
|
|
27
|
-
NVIDIA_API_KEY=
|
|
28
|
-
NIM_BASE_URL=https://integrate.api.nvidia.com/v1
|
|
29
|
-
NIM_TIMEOUT_MS=90000
|
|
30
|
-
NIM_MODEL
|
|
31
|
-
NIM_MODEL_FAST
|
|
32
|
-
NIM_MODEL_QUALITY
|
|
1
|
+
PORT=8787
|
|
2
|
+
|
|
3
|
+
# Where bootstrap writes metaintent-projects/
|
|
4
|
+
# METAINTENT_WORKSPACE=
|
|
5
|
+
|
|
6
|
+
# Hard clarify budget before locking intent
|
|
7
|
+
MAX_CLARIFY_ROUNDS=2
|
|
8
|
+
|
|
9
|
+
# --- Backend selection ---
|
|
10
|
+
# ollama = fully local | nim = NVIDIA hosted API (web-friendly)
|
|
11
|
+
PRIMARY_LLM_BACKEND=ollama
|
|
12
|
+
FALLBACK_LLM_BACKEND=ollama
|
|
13
|
+
|
|
14
|
+
# --- Local Ollama (any chat model you have pulled) ---
|
|
15
|
+
OLLAMA_BASE_URL=http://127.0.0.1:11434
|
|
16
|
+
OLLAMA_TIMEOUT_MS=60000
|
|
17
|
+
OLLAMA_MODEL=<your-model>
|
|
18
|
+
OLLAMA_MODEL_FAST=<your-fast-model>
|
|
19
|
+
OLLAMA_MODEL_QUALITY=<your-quality-model>
|
|
20
|
+
OLLAMA_MODEL_EMBED=<your-embed-model>
|
|
21
|
+
|
|
22
|
+
# --- NVIDIA NIM (OpenAI-compatible) ---
|
|
23
|
+
# Get a key: https://build.nvidia.com/settings
|
|
24
|
+
# Then set:
|
|
25
|
+
# PRIMARY_LLM_BACKEND=nim
|
|
26
|
+
# FALLBACK_LLM_BACKEND=ollama
|
|
27
|
+
NVIDIA_API_KEY=
|
|
28
|
+
NIM_BASE_URL=https://integrate.api.nvidia.com/v1
|
|
29
|
+
NIM_TIMEOUT_MS=90000
|
|
30
|
+
NIM_MODEL=<your-nim-model>
|
|
31
|
+
NIM_MODEL_FAST=<your-nim-fast-model>
|
|
32
|
+
NIM_MODEL_QUALITY=<your-nim-quality-model>
|
package/README.md
CHANGED
|
@@ -1,63 +1,107 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Hammaduddin561/MetaIntent/main/docs/icon.png" alt="" width="72" height="72" align="absmiddle" />
|
|
3
|
+
MetaIntent
|
|
4
|
+
</h1>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<strong>Vague idea → locked intent → project pack on disk</strong><br />
|
|
8
|
+
Clarify ≤2 · lock <code>intent.json</code> · bootstrap Cursor-ready files (Ollama / NVIDIA NIM)
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/metaintent"><img src="https://img.shields.io/npm/v/metaintent.svg?style=flat-square" alt="npm" /></a>
|
|
13
|
+
<a href="https://ollama.com"><img src="https://img.shields.io/badge/LLM-Ollama-111111?style=flat-square" alt="Ollama" /></a>
|
|
14
|
+
<a href="https://build.nvidia.com"><img src="https://img.shields.io/badge/LLM-NVIDIA%20NIM-76B900?style=flat-square" alt="NVIDIA NIM" /></a>
|
|
15
|
+
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/Cursor-MCP-111111?style=flat-square" alt="MCP" /></a>
|
|
16
|
+
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
17
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2ea44f?style=flat-square" alt="MIT License" /></a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="#overview"><img src="https://img.shields.io/badge/Overview-111111?style=for-the-badge" alt="Overview" /></a>
|
|
22
|
+
<a href="#screenshots"><img src="https://img.shields.io/badge/Screenshots-212121?style=for-the-badge" alt="Screenshots" /></a>
|
|
23
|
+
<a href="#quick-start"><img src="https://img.shields.io/badge/Quick%20start-111111?style=for-the-badge" alt="Quick start" /></a>
|
|
24
|
+
<a href="#product-loop"><img src="https://img.shields.io/badge/Product%20loop-212121?style=for-the-badge" alt="Product loop" /></a>
|
|
25
|
+
<a href="#architecture"><img src="https://img.shields.io/badge/Architecture-111111?style=for-the-badge" alt="Architecture" /></a>
|
|
26
|
+
<a href="#backends"><img src="https://img.shields.io/badge/Backends-212121?style=for-the-badge" alt="Backends" /></a>
|
|
27
|
+
<a href="#license"><img src="https://img.shields.io/badge/License-2ea44f?style=for-the-badge" alt="License" /></a>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
## Overview
|
|
31
|
+
|
|
32
|
+
MetaIntent is a **local-first** Intent → Project Bootstrap. Drop a vague idea, answer at most two high-value questions, **lock** an intent contract, then write a real project pack agents can follow — not another chat wrapper.
|
|
33
|
+
|
|
34
|
+
| Capability | What you get |
|
|
35
|
+
|---|---|
|
|
36
|
+
| **Clarify ≤2** | Research-inspired Ask-before-Plan loop, then hard lock |
|
|
37
|
+
| **Locked pack** | `intent.json`, `agent.md`, `week1.md`, `security.md`, `naive-vs-locked.md` |
|
|
38
|
+
| **Cursor rule** | `cursor-rule.md` installed into `.cursor/rules/` |
|
|
39
|
+
| **Surfaces** | npm CLI · Cursor MCP · web demo (`localhost:8787`) |
|
|
40
|
+
| **LLMs** | Ollama (default) or NVIDIA NIM + optional fallback |
|
|
41
|
+
|
|
42
|
+
Default output: **`.metaintent/`** in the workspace (`mode=workspace`).
|
|
43
|
+
Demo packs: `metaintent-projects/<slug>/` (`mode=pack`).
|
|
8
44
|
|
|
9
|
-
|
|
45
|
+
### Why lock intent
|
|
46
|
+
|
|
47
|
+
- Vague goals make agents **guess**; MetaIntent forces a short clarify → lock cycle.
|
|
48
|
+
- The pack is the product: files on disk Cursor / agents can obey.
|
|
49
|
+
- Local-first by default (Ollama). NIM is optional for stronger blueprints / demos.
|
|
50
|
+
|
|
51
|
+
## Screenshots
|
|
52
|
+
|
|
53
|
+
<table>
|
|
54
|
+
<tr>
|
|
55
|
+
<td width="100%" valign="top">
|
|
56
|
+
<img src="https://raw.githubusercontent.com/Hammaduddin561/MetaIntent/main/docs/screenshots/home.png" alt="Home page" />
|
|
57
|
+
<p align="center"><sub>Home — lock the intent, ship the pack</sub></p>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
<tr>
|
|
61
|
+
<td width="100%" valign="top">
|
|
62
|
+
<img src="https://raw.githubusercontent.com/Hammaduddin561/MetaIntent/main/docs/screenshots/chat.png" alt="Demo chat" />
|
|
63
|
+
<p align="center"><sub>Demo chat — ≤2 questions, then bootstrap</sub></p>
|
|
64
|
+
</td>
|
|
65
|
+
</tr>
|
|
66
|
+
</table>
|
|
10
67
|
|
|
11
|
-
|
|
12
|
-
[](https://build.nvidia.com)
|
|
13
|
-
[](https://modelcontextprotocol.io)
|
|
14
|
-
[](https://www.typescriptlang.org/)
|
|
68
|
+
## Quick start
|
|
15
69
|
|
|
16
|
-
|
|
70
|
+
**Requirements**
|
|
17
71
|
|
|
18
|
-
|
|
72
|
+
| Tool | Notes |
|
|
73
|
+
|---|---|
|
|
74
|
+
| [Node.js 20+](https://nodejs.org/) | CLI, MCP, local server |
|
|
75
|
+
| [Ollama](https://ollama.com) **or** NVIDIA NIM | Local LLM default, or cloud NIM key |
|
|
76
|
+
| Git | Clone / contribute |
|
|
77
|
+
| Cursor (optional) | MCP product path |
|
|
19
78
|
|
|
20
|
-
|
|
79
|
+
### Models (Ollama)
|
|
21
80
|
|
|
22
|
-
|
|
81
|
+
Pull any local model you want, then point MetaIntent at it in `.env`:
|
|
23
82
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| `intent.json` | Frozen goal, audience, platform, success metric, constraints |
|
|
27
|
-
| `agent.md` | Blueprint (stack, roadmap, system prompt) |
|
|
28
|
-
| `week1.md` | Checklist for v1 |
|
|
29
|
-
| `security.md` | Threat-model guardrails (practical — not “quantum / unbreakable RE”) |
|
|
30
|
-
| `naive-vs-locked.md` | Proof: naive guess vs locked intent |
|
|
31
|
-
| `cursor-rule.md` | Installed into `.cursor/rules/` to enforce scope |
|
|
32
|
-
|
|
33
|
-
Default output (project use): **`.metaintent/`** in the workspace (`mode=workspace`).
|
|
34
|
-
Demo packs: `metaintent-projects/<slug>/` (`mode=pack`).
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Product loop
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
idea → clarify (≤2) → lock intent → bootstrap files → (optional) execute first task
|
|
83
|
+
```bash
|
|
84
|
+
ollama pull <your-model>
|
|
42
85
|
```
|
|
43
86
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
87
|
+
```env
|
|
88
|
+
OLLAMA_MODEL=<your-model>
|
|
89
|
+
OLLAMA_MODEL_FAST=<your-fast-model>
|
|
90
|
+
OLLAMA_MODEL_QUALITY=<your-quality-model>
|
|
91
|
+
```
|
|
49
92
|
|
|
50
|
-
|
|
93
|
+
Works with any Ollama-compatible chat model — not tied to one vendor.
|
|
51
94
|
|
|
52
|
-
|
|
53
|
-
- [Ollama](https://ollama.com) **or** NVIDIA NIM API key
|
|
95
|
+
### Install from npm
|
|
54
96
|
|
|
55
97
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
98
|
+
npx metaintent bootstrap "study planner for exam week" --workspace
|
|
99
|
+
# or
|
|
100
|
+
npm install -g metaintent
|
|
101
|
+
metaintent bootstrap "your idea" --workspace
|
|
58
102
|
```
|
|
59
103
|
|
|
60
|
-
### Install
|
|
104
|
+
### Install from source
|
|
61
105
|
|
|
62
106
|
```bash
|
|
63
107
|
git clone https://github.com/Hammaduddin561/MetaIntent.git
|
|
@@ -68,10 +112,10 @@ copy .env.example .env
|
|
|
68
112
|
|
|
69
113
|
### Cursor MCP (main product)
|
|
70
114
|
|
|
71
|
-
`.cursor/mcp.json
|
|
115
|
+
Repo ships `.cursor/mcp.json`. Reload MCP in Cursor, then:
|
|
72
116
|
|
|
73
|
-
1.
|
|
74
|
-
2. If it returns questions → answer once (or twice) via `answers`
|
|
117
|
+
1. Call **`metaintent_bootstrap`** with your idea (`mode` defaults to `workspace`)
|
|
118
|
+
2. If it returns questions → answer once (or twice) via `answers`
|
|
75
119
|
3. Open **`.metaintent/`** and follow `intent.json` + `security.md`
|
|
76
120
|
|
|
77
121
|
Other tools: `health` · `start` · `clarify` · `generate` · `execute` · `session`
|
|
@@ -83,7 +127,7 @@ npm run smoke:bootstrap # e2e .metaintent pack on disk
|
|
|
83
127
|
npm run eval:golden # clarification/lock quality suite
|
|
84
128
|
```
|
|
85
129
|
|
|
86
|
-
### CLI
|
|
130
|
+
### CLI (source)
|
|
87
131
|
|
|
88
132
|
```bash
|
|
89
133
|
npm run cli -- bootstrap "study planner for exam week" --workspace --answers "web, students, 2 weeks, success=weekly plan done"
|
|
@@ -91,44 +135,69 @@ npm run cli -- bootstrap "study planner for exam week" --workspace --answers "we
|
|
|
91
135
|
|
|
92
136
|
After `npm run build`, bin is `metaintent` (`package.json` → `dist/cli.js`).
|
|
93
137
|
|
|
94
|
-
Published package (when live):
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
npx metaintent bootstrap "your idea" --workspace
|
|
98
|
-
npm install -g metaintent
|
|
99
|
-
```
|
|
100
|
-
|
|
101
138
|
### Web demo
|
|
102
139
|
|
|
103
140
|
```bash
|
|
104
141
|
npm run local
|
|
105
142
|
```
|
|
106
143
|
|
|
107
|
-
|
|
144
|
+
| Service | URL |
|
|
145
|
+
|---|---|
|
|
146
|
+
| Demo UI + API | http://127.0.0.1:8787/ |
|
|
108
147
|
|
|
109
|
-
|
|
148
|
+
Open the install section for copy-paste commands. Serious workflow = MCP / CLI bootstrap.
|
|
149
|
+
Publish notes: [`docs/PUBLISH.md`](docs/PUBLISH.md)
|
|
110
150
|
|
|
111
|
-
|
|
151
|
+
## Product loop
|
|
112
152
|
|
|
113
|
-
|
|
153
|
+
```text
|
|
154
|
+
idea → clarify (≤2) → lock intent → bootstrap files → (optional) execute first task
|
|
155
|
+
```
|
|
114
156
|
|
|
115
|
-
|
|
116
|
-
|------|------|--------|
|
|
117
|
-
| **Ollama** (default) | Local / private | `PRIMARY_LLM_BACKEND=ollama` |
|
|
118
|
-
| **NVIDIA NIM** | Web demo / stronger blueprints | `PRIMARY_LLM_BACKEND=nim` + `NVIDIA_API_KEY` |
|
|
157
|
+
Hero MCP tool: **`metaintent_bootstrap`**
|
|
119
158
|
|
|
120
|
-
|
|
159
|
+
```mermaid
|
|
160
|
+
flowchart LR
|
|
161
|
+
A[Vague idea] --> B{ClarificationPolicy}
|
|
162
|
+
B -->|clear enough| C[Lock intent.json]
|
|
163
|
+
B -->|≤2 questions| D[User answers]
|
|
164
|
+
D --> B
|
|
165
|
+
B -->|rephrase / budget| C
|
|
166
|
+
C --> E[ProjectBootstrap]
|
|
167
|
+
E --> F[.metaintent pack]
|
|
168
|
+
F --> G[Cursor rule + security.md]
|
|
169
|
+
G --> H[Optional execute first task]
|
|
170
|
+
```
|
|
121
171
|
|
|
122
|
-
|
|
172
|
+
### Bootstrap pack
|
|
123
173
|
|
|
124
|
-
|
|
174
|
+
| File | Purpose |
|
|
175
|
+
|---|---|
|
|
176
|
+
| `intent.json` | Frozen goal, audience, platform, success metric, constraints |
|
|
177
|
+
| `agent.md` | Blueprint (stack, roadmap, system prompt) |
|
|
178
|
+
| `week1.md` | Checklist for v1 |
|
|
179
|
+
| `security.md` | Practical threat-model guardrails |
|
|
180
|
+
| `naive-vs-locked.md` | Proof: naive guess vs locked intent |
|
|
181
|
+
| `cursor-rule.md` | Installed into `.cursor/rules/` to enforce scope |
|
|
125
182
|
|
|
126
|
-
|
|
183
|
+
```mermaid
|
|
184
|
+
flowchart TB
|
|
185
|
+
LOCK[Locked intent] --> WRITE[ProjectBootstrap]
|
|
186
|
+
WRITE --> I[intent.json]
|
|
187
|
+
WRITE --> A[agent.md]
|
|
188
|
+
WRITE --> W[week1.md]
|
|
189
|
+
WRITE --> S[security.md]
|
|
190
|
+
WRITE --> N[naive-vs-locked.md]
|
|
191
|
+
WRITE --> R[cursor-rule.md]
|
|
192
|
+
R --> CR[.cursor/rules/*.mdc]
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Clarification policy
|
|
127
196
|
|
|
128
197
|
Full citations: [`docs/RESEARCH.md`](docs/RESEARCH.md)
|
|
129
198
|
|
|
130
199
|
| Idea | Paper | Use in MetaIntent |
|
|
131
|
-
|
|
200
|
+
|---|---|---|
|
|
132
201
|
| Intent entropy | [Intent-Sim](https://arxiv.org/abs/2311.09469) | Proceed only when a hypothesis dominates |
|
|
133
202
|
| Small set / rephrase | [CICC](https://aclanthology.org/2024.findings-naacl.156/) | ≤2 questions; else rephrase |
|
|
134
203
|
| Ask-before-Plan | [CEP](https://arxiv.org/abs/2406.12639) | Clarify → lock → bootstrap → execute |
|
|
@@ -137,9 +206,114 @@ Full citations: [`docs/RESEARCH.md`](docs/RESEARCH.md)
|
|
|
137
206
|
| Missing variable Qs | [QuestBench](https://arxiv.org/abs/2503.22674) | Prefer the question that unlocks planning |
|
|
138
207
|
| Req defects | [HumanEvalComm](https://dl.acm.org/doi/10.1145/3715109) / [Ambig-SWE](https://arxiv.org/html/2502.13069v2) | Tag incomplete / ambiguous / inconsistent |
|
|
139
208
|
|
|
140
|
-
Hard product rule: **`MAX_CLARIFY_ROUNDS=2`** then lock.
|
|
209
|
+
Hard product rule: **`MAX_CLARIFY_ROUNDS=2`** then lock.
|
|
210
|
+
|
|
211
|
+
```mermaid
|
|
212
|
+
stateDiagram-v2
|
|
213
|
+
[*] --> Vague
|
|
214
|
+
Vague --> Policy: start / bootstrap
|
|
215
|
+
Policy --> Ask: entropy high / split needed
|
|
216
|
+
Ask --> Policy: answers (round ≤ 2)
|
|
217
|
+
Policy --> Lock: proceed OR max rounds
|
|
218
|
+
Policy --> Rephrase: too diffuse
|
|
219
|
+
Rephrase --> Vague
|
|
220
|
+
Lock --> Pack: write .metaintent
|
|
221
|
+
Pack --> [*]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Architecture
|
|
225
|
+
|
|
226
|
+
MetaIntent is a **local-first** Node/TypeScript stack: web demo, npm CLI, and Cursor MCP all hit the same MetaLoop → lock → bootstrap core.
|
|
227
|
+
|
|
228
|
+
### High-level system
|
|
229
|
+
|
|
230
|
+
```mermaid
|
|
231
|
+
flowchart TB
|
|
232
|
+
subgraph Surfaces
|
|
233
|
+
WEB[Web demo<br/>frontend + local-server]
|
|
234
|
+
CLI[npm CLI<br/>metaintent bootstrap]
|
|
235
|
+
MCP[Cursor MCP<br/>mcp-server.ts]
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
subgraph Core
|
|
239
|
+
MLB[MetaLoopEngine]
|
|
240
|
+
CP[ClarificationPolicy]
|
|
241
|
+
LI[LockedIntent]
|
|
242
|
+
PB[ProjectBootstrap]
|
|
243
|
+
SG[SecurityGuardrail]
|
|
244
|
+
AG[AgentGenerator]
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
subgraph LLMs
|
|
248
|
+
FAC[LLMAdapterFactory]
|
|
249
|
+
OLL[OllamaAdapter]
|
|
250
|
+
NIM[NIMAdapter]
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
WEB --> MLB
|
|
254
|
+
CLI --> MLB
|
|
255
|
+
MCP --> MLB
|
|
256
|
+
MLB --> CP
|
|
257
|
+
MLB --> LI
|
|
258
|
+
LI --> PB
|
|
259
|
+
PB --> SG
|
|
260
|
+
PB --> AG
|
|
261
|
+
MLB --> FAC
|
|
262
|
+
AG --> FAC
|
|
263
|
+
FAC --> OLL
|
|
264
|
+
FAC --> NIM
|
|
265
|
+
```
|
|
141
266
|
|
|
142
|
-
|
|
267
|
+
### Runtime surfaces
|
|
268
|
+
|
|
269
|
+
```mermaid
|
|
270
|
+
flowchart LR
|
|
271
|
+
U[User] --> W[Browser :8787]
|
|
272
|
+
U --> C[npx metaintent]
|
|
273
|
+
U --> K[Cursor IDE]
|
|
274
|
+
|
|
275
|
+
W --> S[local-server.ts]
|
|
276
|
+
C --> CLI[cli.ts]
|
|
277
|
+
K --> M[mcp-server.ts stdio]
|
|
278
|
+
|
|
279
|
+
S --> CORE[MetaLoop + Bootstrap]
|
|
280
|
+
CLI --> CORE
|
|
281
|
+
M --> CORE
|
|
282
|
+
CORE --> DISK[(.metaintent / metaintent-projects)]
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Layer responsibilities
|
|
286
|
+
|
|
287
|
+
| Layer | Role |
|
|
288
|
+
|---|---|
|
|
289
|
+
| **Frontend (`frontend/`)** | Install-first landing + optional demo chat |
|
|
290
|
+
| **local-server** | HTTP API for demo + health |
|
|
291
|
+
| **cli.ts** | `metaintent bootstrap` entry |
|
|
292
|
+
| **mcp-server.ts** | Cursor MCP tools (bootstrap-first) |
|
|
293
|
+
| **ClarificationPolicy** | ≤2 questions / rephrase / proceed |
|
|
294
|
+
| **ProjectBootstrap** | Writes the `.metaintent` pack + Cursor rule |
|
|
295
|
+
| **SecurityGuardrail** | Practical security notes in the pack |
|
|
296
|
+
| **Adapters** | Ollama + NIM via `LLMAdapterFactory` |
|
|
297
|
+
|
|
298
|
+
## Backends
|
|
299
|
+
|
|
300
|
+
| Mode | When | Config |
|
|
301
|
+
|---|---|---|
|
|
302
|
+
| **Ollama** (default) | Local / private | `PRIMARY_LLM_BACKEND=ollama` |
|
|
303
|
+
| **NVIDIA NIM** | Web demo / stronger blueprints | `PRIMARY_LLM_BACKEND=nim` + `NVIDIA_API_KEY` |
|
|
304
|
+
|
|
305
|
+
NIM key: [build.nvidia.com/settings](https://build.nvidia.com/settings)
|
|
306
|
+
|
|
307
|
+
Optional fallback: `FALLBACK_LLM_BACKEND=ollama` if NIM fails.
|
|
308
|
+
|
|
309
|
+
```mermaid
|
|
310
|
+
flowchart LR
|
|
311
|
+
REQ[LLM request] --> F[LLMAdapterFactory]
|
|
312
|
+
F -->|PRIMARY=ollama| O[Ollama]
|
|
313
|
+
F -->|PRIMARY=nim| N[NVIDIA NIM]
|
|
314
|
+
O -->|fail + FALLBACK| N2[Fallback backend]
|
|
315
|
+
N -->|fail + FALLBACK| O2[Fallback backend]
|
|
316
|
+
```
|
|
143
317
|
|
|
144
318
|
## API
|
|
145
319
|
|
|
@@ -153,13 +327,30 @@ curl -X POST http://127.0.0.1:8787/metaintent ^
|
|
|
153
327
|
|
|
154
328
|
Actions: `bootstrap` · `start` · `clarify` · `generate` · `execute` · `replay` · `intent-map`
|
|
155
329
|
|
|
156
|
-
|
|
330
|
+
```mermaid
|
|
331
|
+
sequenceDiagram
|
|
332
|
+
participant U as Client
|
|
333
|
+
participant S as local-server
|
|
334
|
+
participant M as MetaLoopEngine
|
|
335
|
+
participant P as ProjectBootstrap
|
|
336
|
+
U->>S: POST /metaintent action=bootstrap
|
|
337
|
+
S->>M: clarify / lock
|
|
338
|
+
M-->>S: locked intent OR questions
|
|
339
|
+
alt questions
|
|
340
|
+
S-->>U: clarify (≤2)
|
|
341
|
+
U->>S: answers
|
|
342
|
+
S->>M: continue
|
|
343
|
+
end
|
|
344
|
+
S->>P: write pack
|
|
345
|
+
P-->>S: .metaintent paths
|
|
346
|
+
S-->>U: artifacts + lockedIntent
|
|
347
|
+
```
|
|
157
348
|
|
|
158
|
-
##
|
|
349
|
+
## Project layout
|
|
159
350
|
|
|
160
|
-
```
|
|
351
|
+
```text
|
|
161
352
|
MetaIntent/
|
|
162
|
-
├── frontend/ # Demo UI
|
|
353
|
+
├── frontend/ # Demo UI (install-first + bootstrap chat)
|
|
163
354
|
├── src/
|
|
164
355
|
│ ├── cli.ts # metaintent bootstrap CLI
|
|
165
356
|
│ ├── mcp-server.ts # Cursor MCP (bootstrap-first)
|
|
@@ -173,15 +364,58 @@ MetaIntent/
|
|
|
173
364
|
│ ├── ProjectBootstrap.ts
|
|
174
365
|
│ ├── runBootstrap.ts
|
|
175
366
|
│ └── AgentGenerator.ts
|
|
367
|
+
├── docs/
|
|
368
|
+
│ ├── icon.png # Brand mark (README)
|
|
369
|
+
│ ├── RESEARCH.md
|
|
370
|
+
│ ├── PUBLISH.md
|
|
371
|
+
│ └── screenshots/ # README gallery
|
|
176
372
|
├── .metaintent/ # Workspace pack (gitignored)
|
|
177
373
|
├── metaintent-projects/ # Demo packs (gitignored)
|
|
178
374
|
├── .cursor/mcp.json
|
|
375
|
+
├── vercel.json
|
|
376
|
+
├── LICENSE
|
|
179
377
|
└── .env.example
|
|
180
378
|
```
|
|
181
379
|
|
|
380
|
+
## Stack
|
|
182
381
|
|
|
183
|
-
|
|
382
|
+
| Layer | Tech |
|
|
383
|
+
|---|---|
|
|
384
|
+
| Runtime | Node 20+ · TypeScript |
|
|
385
|
+
| Surfaces | Express local-server · npm CLI · MCP SDK |
|
|
386
|
+
| LLMs | Ollama · NVIDIA NIM |
|
|
387
|
+
| Frontend | Vanilla HTML/CSS/JS (`frontend/`) |
|
|
388
|
+
| Package | [`metaintent` on npm](https://www.npmjs.com/package/metaintent) |
|
|
389
|
+
|
|
390
|
+
## Troubleshooting
|
|
391
|
+
|
|
392
|
+
| Symptom | Likely fix |
|
|
393
|
+
|---|---|
|
|
394
|
+
| `:8787` connection refused | `npm run local` |
|
|
395
|
+
| Ollama unreachable | `ollama serve` + pull a chat model, set `OLLAMA_MODEL` |
|
|
396
|
+
| NIM errors | Set `NVIDIA_API_KEY`; check `PRIMARY_LLM_BACKEND=nim` |
|
|
397
|
+
| MCP tools missing | Reload Cursor MCP; confirm `.cursor/mcp.json` |
|
|
398
|
+
| Empty `.metaintent/` | Run `npm run smoke:bootstrap` or CLI with `--workspace` |
|
|
399
|
+
|
|
400
|
+
## Contributing
|
|
401
|
+
|
|
402
|
+
1. Fork + branch from `main`
|
|
403
|
+
2. `npm install` · `npm run smoke:bootstrap`
|
|
404
|
+
3. Keep scope inside locked intent when working under `.metaintent/`
|
|
405
|
+
4. Open a PR with what changed and how you tested
|
|
184
406
|
|
|
185
407
|
## License
|
|
186
408
|
|
|
187
|
-
|
|
409
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
MIT License
|
|
413
|
+
|
|
414
|
+
Copyright (c) 2025 Md Hammaduddin
|
|
415
|
+
|
|
416
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
417
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
418
|
+
in the Software without restriction...
|
|
419
|
+
|
|
420
|
+
Full terms: see the LICENSE file in this repository.
|
|
421
|
+
```
|
package/package.json
CHANGED