helix-lang 11.0.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.
Files changed (193) hide show
  1. package/README.md +168 -0
  2. package/dist/architect.d.ts +14 -0
  3. package/dist/architect.d.ts.map +1 -0
  4. package/dist/architect.js +127 -0
  5. package/dist/architect.js.map +1 -0
  6. package/dist/bin/helix.d.ts +20 -0
  7. package/dist/bin/helix.d.ts.map +1 -0
  8. package/dist/bin/helix.js +921 -0
  9. package/dist/bin/helix.js.map +1 -0
  10. package/dist/commands/collaborate/index.d.ts +2 -0
  11. package/dist/commands/collaborate/index.d.ts.map +1 -0
  12. package/dist/commands/collaborate/index.js +129 -0
  13. package/dist/commands/collaborate/index.js.map +1 -0
  14. package/dist/commands/collaborate/server.d.ts +31 -0
  15. package/dist/commands/collaborate/server.d.ts.map +1 -0
  16. package/dist/commands/collaborate/server.js +159 -0
  17. package/dist/commands/collaborate/server.js.map +1 -0
  18. package/dist/commands/deploy/index.d.ts +25 -0
  19. package/dist/commands/deploy/index.d.ts.map +1 -0
  20. package/dist/commands/deploy/index.js +130 -0
  21. package/dist/commands/deploy/index.js.map +1 -0
  22. package/dist/commands/deploy/platforms/fly.d.ts +9 -0
  23. package/dist/commands/deploy/platforms/fly.d.ts.map +1 -0
  24. package/dist/commands/deploy/platforms/fly.js +68 -0
  25. package/dist/commands/deploy/platforms/fly.js.map +1 -0
  26. package/dist/commands/deploy/platforms/railway.d.ts +9 -0
  27. package/dist/commands/deploy/platforms/railway.d.ts.map +1 -0
  28. package/dist/commands/deploy/platforms/railway.js +115 -0
  29. package/dist/commands/deploy/platforms/railway.js.map +1 -0
  30. package/dist/commands/deploy/platforms/vercel.d.ts +10 -0
  31. package/dist/commands/deploy/platforms/vercel.d.ts.map +1 -0
  32. package/dist/commands/deploy/platforms/vercel.js +126 -0
  33. package/dist/commands/deploy/platforms/vercel.js.map +1 -0
  34. package/dist/commands/deploy.d.ts +6 -0
  35. package/dist/commands/deploy.d.ts.map +1 -0
  36. package/dist/commands/deploy.js +56 -0
  37. package/dist/commands/deploy.js.map +1 -0
  38. package/dist/commands/evolve/analyzers/performance.d.ts +13 -0
  39. package/dist/commands/evolve/analyzers/performance.d.ts.map +1 -0
  40. package/dist/commands/evolve/analyzers/performance.js +591 -0
  41. package/dist/commands/evolve/analyzers/performance.js.map +1 -0
  42. package/dist/commands/evolve/analyzers/security.d.ts +21 -0
  43. package/dist/commands/evolve/analyzers/security.d.ts.map +1 -0
  44. package/dist/commands/evolve/analyzers/security.js +280 -0
  45. package/dist/commands/evolve/analyzers/security.js.map +1 -0
  46. package/dist/commands/evolve/index.d.ts +2 -0
  47. package/dist/commands/evolve/index.d.ts.map +1 -0
  48. package/dist/commands/evolve/index.js +122 -0
  49. package/dist/commands/evolve/index.js.map +1 -0
  50. package/dist/commands/generate.d.ts +6 -0
  51. package/dist/commands/generate.d.ts.map +1 -0
  52. package/dist/commands/generate.js +277 -0
  53. package/dist/commands/generate.js.map +1 -0
  54. package/dist/commands/install.d.ts +2 -0
  55. package/dist/commands/install.d.ts.map +1 -0
  56. package/dist/commands/install.js +176 -0
  57. package/dist/commands/install.js.map +1 -0
  58. package/dist/commands/library/index.d.ts +27 -0
  59. package/dist/commands/library/index.d.ts.map +1 -0
  60. package/dist/commands/library/index.js +126 -0
  61. package/dist/commands/library/index.js.map +1 -0
  62. package/dist/commands/migrate.d.ts +5 -0
  63. package/dist/commands/migrate.d.ts.map +1 -0
  64. package/dist/commands/migrate.js +258 -0
  65. package/dist/commands/migrate.js.map +1 -0
  66. package/dist/commands/new.d.ts +6 -0
  67. package/dist/commands/new.d.ts.map +1 -0
  68. package/dist/commands/new.js +195 -0
  69. package/dist/commands/new.js.map +1 -0
  70. package/dist/commands/preflight.d.ts +20 -0
  71. package/dist/commands/preflight.d.ts.map +1 -0
  72. package/dist/commands/preflight.js +182 -0
  73. package/dist/commands/preflight.js.map +1 -0
  74. package/dist/commands/preview.d.ts +13 -0
  75. package/dist/commands/preview.d.ts.map +1 -0
  76. package/dist/commands/preview.js +260 -0
  77. package/dist/commands/preview.js.map +1 -0
  78. package/dist/commands/run.d.ts +6 -0
  79. package/dist/commands/run.d.ts.map +1 -0
  80. package/dist/commands/run.js +96 -0
  81. package/dist/commands/run.js.map +1 -0
  82. package/dist/commands/spawn.d.ts +11 -0
  83. package/dist/commands/spawn.d.ts.map +1 -0
  84. package/dist/commands/spawn.js +916 -0
  85. package/dist/commands/spawn.js.map +1 -0
  86. package/dist/compiler.d.ts +12 -0
  87. package/dist/compiler.d.ts.map +1 -0
  88. package/dist/compiler.js +92 -0
  89. package/dist/compiler.js.map +1 -0
  90. package/dist/core/file-writer.d.ts +36 -0
  91. package/dist/core/file-writer.d.ts.map +1 -0
  92. package/dist/core/file-writer.js +268 -0
  93. package/dist/core/file-writer.js.map +1 -0
  94. package/dist/core/registry.d.ts +57 -0
  95. package/dist/core/registry.d.ts.map +1 -0
  96. package/dist/core/registry.js +222 -0
  97. package/dist/core/registry.js.map +1 -0
  98. package/dist/core/self-healing.d.ts +47 -0
  99. package/dist/core/self-healing.d.ts.map +1 -0
  100. package/dist/core/self-healing.js +250 -0
  101. package/dist/core/self-healing.js.map +1 -0
  102. package/dist/core/types.d.ts +126 -0
  103. package/dist/core/types.d.ts.map +1 -0
  104. package/dist/core/types.js +7 -0
  105. package/dist/core/types.js.map +1 -0
  106. package/dist/generators/databases/mongodb.d.ts +10 -0
  107. package/dist/generators/databases/mongodb.d.ts.map +1 -0
  108. package/dist/generators/databases/mongodb.js +83 -0
  109. package/dist/generators/databases/mongodb.js.map +1 -0
  110. package/dist/generators/databases/redis.d.ts +2 -0
  111. package/dist/generators/databases/redis.d.ts.map +1 -0
  112. package/dist/generators/databases/redis.js +140 -0
  113. package/dist/generators/databases/redis.js.map +1 -0
  114. package/dist/generators/flutter.d.ts +32 -0
  115. package/dist/generators/flutter.d.ts.map +1 -0
  116. package/dist/generators/flutter.js +628 -0
  117. package/dist/generators/flutter.js.map +1 -0
  118. package/dist/openrouter.d.ts +68 -0
  119. package/dist/openrouter.d.ts.map +1 -0
  120. package/dist/openrouter.js +241 -0
  121. package/dist/openrouter.js.map +1 -0
  122. package/dist/page-generator.d.ts +22 -0
  123. package/dist/page-generator.d.ts.map +1 -0
  124. package/dist/page-generator.js +192 -0
  125. package/dist/page-generator.js.map +1 -0
  126. package/dist/parser.d.ts +76 -0
  127. package/dist/parser.d.ts.map +1 -0
  128. package/dist/parser.js +691 -0
  129. package/dist/parser.js.map +1 -0
  130. package/dist/prompts/master-architect.d.ts +9 -0
  131. package/dist/prompts/master-architect.d.ts.map +1 -0
  132. package/dist/prompts/master-architect.js +150 -0
  133. package/dist/prompts/master-architect.js.map +1 -0
  134. package/dist/researcher.d.ts +12 -0
  135. package/dist/researcher.d.ts.map +1 -0
  136. package/dist/researcher.js +85 -0
  137. package/dist/researcher.js.map +1 -0
  138. package/dist/self-heal.d.ts +29 -0
  139. package/dist/self-heal.d.ts.map +1 -0
  140. package/dist/self-heal.js +260 -0
  141. package/dist/self-heal.js.map +1 -0
  142. package/dist/services/SupabaseDeployer.d.ts +9 -0
  143. package/dist/services/SupabaseDeployer.d.ts.map +1 -0
  144. package/dist/services/SupabaseDeployer.js +50 -0
  145. package/dist/services/SupabaseDeployer.js.map +1 -0
  146. package/dist/test-generator.d.ts +18 -0
  147. package/dist/test-generator.d.ts.map +1 -0
  148. package/dist/test-generator.js +180 -0
  149. package/dist/test-generator.js.map +1 -0
  150. package/dist/themes/index.d.ts +52 -0
  151. package/dist/themes/index.d.ts.map +1 -0
  152. package/dist/themes/index.js +273 -0
  153. package/dist/themes/index.js.map +1 -0
  154. package/dist/types.d.ts +9 -0
  155. package/dist/types.d.ts.map +1 -0
  156. package/dist/types.js +81 -0
  157. package/dist/types.js.map +1 -0
  158. package/dist/utils/constitutional-validator.d.ts +73 -0
  159. package/dist/utils/constitutional-validator.d.ts.map +1 -0
  160. package/dist/utils/constitutional-validator.js +249 -0
  161. package/dist/utils/constitutional-validator.js.map +1 -0
  162. package/library/auth-flow/app/api/auth/[...nextauth]/route.ts +31 -0
  163. package/library/auth-flow/app/api/auth/login/route.ts +90 -0
  164. package/library/auth-flow/app/api/auth/register/route.ts +91 -0
  165. package/library/auth-flow/components/auth/AuthMiddleware.tsx +139 -0
  166. package/library/auth-flow/components/auth/LoginForm.tsx +125 -0
  167. package/library/auth-flow/components/auth/RegisterForm.tsx +168 -0
  168. package/library/auth-flow/components/auth/nextauth-config.ts +99 -0
  169. package/library/auth-flow/manifest.json +29 -0
  170. package/library/auth-flow/schema.prisma +45 -0
  171. package/library/dashboard-analytics/components/dashboard/ActivityFeed.tsx +109 -0
  172. package/library/dashboard-analytics/components/dashboard/LineChart.tsx +180 -0
  173. package/library/dashboard-analytics/components/dashboard/StatsCard.tsx +47 -0
  174. package/library/dashboard-analytics/components/dashboard/SummaryGrid.tsx +39 -0
  175. package/library/dashboard-analytics/manifest.json +19 -0
  176. package/library/data-table/components/table/BulkActions.tsx +59 -0
  177. package/library/data-table/components/table/ColumnToggle.tsx +65 -0
  178. package/library/data-table/components/table/DataTable.tsx +318 -0
  179. package/library/data-table/components/table/ExportCSV.tsx +52 -0
  180. package/library/data-table/components/table/SearchFilter.tsx +48 -0
  181. package/library/data-table/manifest.json +20 -0
  182. package/library/file-upload/app/api/upload/route.ts +107 -0
  183. package/library/file-upload/components/upload/DropZone.tsx +268 -0
  184. package/library/file-upload/components/upload/FilePreview.tsx +82 -0
  185. package/library/file-upload/components/upload/UploadProgress.tsx +92 -0
  186. package/library/file-upload/components/upload/fileStorage.ts +142 -0
  187. package/library/file-upload/manifest.json +21 -0
  188. package/library/notification-system/app/api/notifications/route.ts +121 -0
  189. package/library/notification-system/components/notifications/NotificationBell.tsx +154 -0
  190. package/library/notification-system/components/notifications/NotificationProvider.tsx +161 -0
  191. package/library/notification-system/components/notifications/Toast.tsx +112 -0
  192. package/library/notification-system/manifest.json +20 -0
  193. package/package.json +66 -0
package/README.md ADDED
@@ -0,0 +1,168 @@
1
+ # Helix v11.0
2
+
3
+ **AI-Powered Full-Stack App Generator**
4
+
5
+ Generate complete, working applications from natural language. Helix transforms a single prompt into a Next.js app with database, API routes, styled UI, and tests -- in about 60 seconds.
6
+
7
+ ```bash
8
+ helix spawn "A recipe manager with ingredients and cook time"
9
+ # -> Full app: database, API, React UI, tests, ready to run
10
+ ```
11
+
12
+ ---
13
+
14
+ ## Features
15
+
16
+ - **Natural language to full-stack apps** -- Next.js + Prisma + Tailwind from a single prompt
17
+ - **Self-healing builds** -- AI detects and auto-fixes build errors during generation
18
+ - **Pre-flight validation** -- `helix preflight` catches blueprint issues before generation
19
+ - **Theme engine** -- `--theme glassmorphism|professional|minimal|vibrant`
20
+ - **API validation, rate limiting, pagination** -- built into every generated route
21
+ - **Auto-generated test suites** -- Vitest tests included out of the box
22
+ - **Docker support** -- `helix snapshot --docker` produces optimized multi-stage Dockerfiles
23
+ - **Drift detection** -- `helix drift` shows what changed since generation
24
+ - **Multi-page apps** -- PAGE DSL for multi-route applications
25
+ - **Component library** -- `helix install` to pull reusable components
26
+ - **Schema migrations** -- `helix evolve` to scan, suggest, and apply codebase changes
27
+ - **Cost tracking** -- `helix cost` shows per-generation token usage and spend
28
+ - **Flutter target** -- `helix spawn "..." --target flutter` for mobile apps
29
+
30
+ ---
31
+
32
+ ## Quick Start
33
+
34
+ ### Install
35
+
36
+ ```bash
37
+ npm install -g helix-lang
38
+ ```
39
+
40
+ ### Set up your API key
41
+
42
+ ```bash
43
+ echo "OPENROUTER_API_KEY=sk-or-v1-..." > .env
44
+ ```
45
+
46
+ ### Generate an app
47
+
48
+ ```bash
49
+ helix spawn "A project tracker with Tasks, Milestones, and Team Members"
50
+ cd builds/a-project-tracker && npm run dev
51
+ ```
52
+
53
+ ### Verify your setup
54
+
55
+ ```bash
56
+ helix doctor
57
+ ```
58
+
59
+ ---
60
+
61
+ ## CLI Commands
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `helix spawn <prompt>` | Generate a complete app from natural language |
66
+ | `helix new <name>` | Scaffold an empty Helix project |
67
+ | `helix generate <file.helix>` | Generate stack from an existing `.helix` blueprint |
68
+ | `helix run` | Start the dev server |
69
+ | `helix preview` | Hot-reload preview with `.helix` file watching |
70
+ | `helix deploy` | Deploy to Vercel, Firebase, or Netlify |
71
+ | `helix preflight <file>` | Validate a `.helix` blueprint before generation |
72
+ | `helix evolve [action]` | Scan, suggest, or apply codebase fixes and migrations |
73
+ | `helix drift [project]` | Detect manual changes since generation |
74
+ | `helix snapshot [project]` | Generate Dockerfile and docker-compose.yml |
75
+ | `helix install [component]` | Browse and install from the component library |
76
+ | `helix cost` | Show AI token usage and cost for the session |
77
+ | `helix doctor` | System health check (Node, API key, deps) |
78
+ | `helix list` | List all generated projects |
79
+ | `helix research <topic>` | Generate domain research context |
80
+ | `helix draft <idea>` | AI-draft a `.helix` blueprint from an idea |
81
+ | `helix build <file>` | Compile `.helix` to a React component |
82
+ | `helix pipeline <topic> <idea>` | Full pipeline: research, draft, build |
83
+ | `helix models` | List available AI models |
84
+ | `helix plugins` | List registered generator plugins |
85
+
86
+ ### Key Flags for `spawn`
87
+
88
+ ```
89
+ --target <platform> web (default) or flutter
90
+ --theme <theme> glassmorphism, professional, minimal, vibrant
91
+ --db <database> postgres, mongodb, redis, or comma-separated
92
+ --constitution <file> Provide a constitution.md for design guidance
93
+ --components <ids> Include Helix Library components (comma-separated)
94
+ --ai-context Enable AI context layer with Redis
95
+ --cache Add Redis caching layer
96
+ --dry-run Preview what would be generated without writing files
97
+ ```
98
+
99
+ ---
100
+
101
+ ## .helix DSL
102
+
103
+ Helix blueprints use a declarative syntax with two core constructs: **STRAND** (data model) and **VIEW** (UI page).
104
+
105
+ ```helix
106
+ STRAND Contact {
107
+ name: String
108
+ email: String
109
+ company: String
110
+ status: String // Lead, Active, Churned
111
+ }
112
+
113
+ STRAND Deal {
114
+ title: String
115
+ value: Float
116
+ stage: String // Discovery, Proposal, Closed
117
+ contact: Contact
118
+ }
119
+
120
+ VIEW Dashboard {
121
+ list: Contact.all
122
+ list: Deal.all
123
+ }
124
+
125
+ VIEW DealPipeline {
126
+ list: Deal.where(stage: "Discovery")
127
+ list: Deal.where(stage: "Proposal")
128
+ list: Deal.where(stage: "Closed")
129
+ }
130
+ ```
131
+
132
+ Each **STRAND** generates a Prisma model, full CRUD API routes, and a TypeScript interface. Each **VIEW** generates a React page with forms, lists, and delete confirmations.
133
+
134
+ ---
135
+
136
+ ## Technology Stack
137
+
138
+ | Layer | Technology |
139
+ |-------|------------|
140
+ | Framework | Next.js (App Router) |
141
+ | Language | TypeScript |
142
+ | Database | SQLite + Prisma ORM (Postgres/Mongo optional) |
143
+ | Styling | Tailwind CSS |
144
+ | Testing | Vitest |
145
+ | AI | OpenRouter (Claude Sonnet) |
146
+ | Containers | Docker (multi-stage builds) |
147
+
148
+ ---
149
+
150
+ ## Example Prompts
151
+
152
+ ```bash
153
+ helix spawn "A warehouse inventory with Products, Locations, and Stock Movements"
154
+ helix spawn "A course manager with Students, Courses, and Assignments"
155
+ helix spawn "An expense tracker for small businesses" --theme professional
156
+ helix spawn "A fitness app with Workouts and Exercises" --target flutter
157
+ helix spawn "A CRM with Contacts, Companies, and Deals" --db postgres
158
+ ```
159
+
160
+ ---
161
+
162
+ ## License
163
+
164
+ MIT
165
+
166
+ ---
167
+
168
+ > **"Describe it once, run it immediately."**
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Helix Architect - The Interviewer
3
+ * Converts vague user prompts into rigorous .helix specification files
4
+ * v11.0 - Now with context-aware drafting via OpenRouter
5
+ */
6
+ /**
7
+ * Drafts a Helix blueprint from a user idea, optionally using research context
8
+ * @param userIdea - The user's idea/request to convert into Helix syntax
9
+ * @param contextFilePath - Optional path to a research context file
10
+ * @param model - Optional model override
11
+ * @returns The path to the generated .helix file
12
+ */
13
+ export declare function draftBlueprint(userIdea: string, contextFilePath?: string, model?: string): Promise<string>;
14
+ //# sourceMappingURL=architect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architect.d.ts","sourceRoot":"","sources":["../src/architect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;;;;;GAMG;AACH,wBAAsB,cAAc,CAChC,QAAQ,EAAE,MAAM,EAChB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CA+EjB"}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ /**
3
+ * Helix Architect - The Interviewer
4
+ * Converts vague user prompts into rigorous .helix specification files
5
+ * v11.0 - Now with context-aware drafting via OpenRouter
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
19
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
20
+ }) : function(o, v) {
21
+ o["default"] = v;
22
+ });
23
+ var __importStar = (this && this.__importStar) || (function () {
24
+ var ownKeys = function(o) {
25
+ ownKeys = Object.getOwnPropertyNames || function (o) {
26
+ var ar = [];
27
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28
+ return ar;
29
+ };
30
+ return ownKeys(o);
31
+ };
32
+ return function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ })();
40
+ var __importDefault = (this && this.__importDefault) || function (mod) {
41
+ return (mod && mod.__esModule) ? mod : { "default": mod };
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.draftBlueprint = draftBlueprint;
45
+ const chalk_1 = __importDefault(require("chalk"));
46
+ const fs = __importStar(require("fs"));
47
+ const path = __importStar(require("path"));
48
+ const openrouter_1 = require("./openrouter");
49
+ const types_1 = require("./types");
50
+ /**
51
+ * Drafts a Helix blueprint from a user idea, optionally using research context
52
+ * @param userIdea - The user's idea/request to convert into Helix syntax
53
+ * @param contextFilePath - Optional path to a research context file
54
+ * @param model - Optional model override
55
+ * @returns The path to the generated .helix file
56
+ */
57
+ async function draftBlueprint(userIdea, contextFilePath, model) {
58
+ console.log(chalk_1.default.blue("\n🧬 Helix Architect initializing..."));
59
+ console.log(chalk_1.default.gray(`Processing idea: "${userIdea}"`));
60
+ let contextContent = "";
61
+ // Check if context file exists and read it
62
+ if (contextFilePath) {
63
+ const fullPath = path.isAbsolute(contextFilePath)
64
+ ? contextFilePath
65
+ : path.join(process.cwd(), contextFilePath);
66
+ if (fs.existsSync(fullPath)) {
67
+ contextContent = fs.readFileSync(fullPath, "utf-8");
68
+ console.log(chalk_1.default.yellow(`šŸ“š Using context from: ${fullPath}`));
69
+ }
70
+ else {
71
+ console.log(chalk_1.default.yellow(`āš ļø Context file not found: ${fullPath}`));
72
+ }
73
+ }
74
+ else {
75
+ // Default: check for research.md in current directory
76
+ const defaultContext = path.join(process.cwd(), "research.md");
77
+ if (fs.existsSync(defaultContext)) {
78
+ contextContent = fs.readFileSync(defaultContext, "utf-8");
79
+ console.log(chalk_1.default.yellow(`šŸ“š Auto-detected context: ${defaultContext}`));
80
+ }
81
+ }
82
+ try {
83
+ // Construct the prompt with or without context
84
+ let userMessage = "";
85
+ if (contextContent) {
86
+ userMessage = `**RESEARCH CONTEXT:**
87
+ ${contextContent}
88
+
89
+ ---
90
+
91
+ **USER IDEA:**
92
+ ${userIdea}
93
+
94
+ ---
95
+
96
+ **INSTRUCTIONS:**
97
+ Use the Research Context above to inform the fields, data types, and logic of the Helix Blueprint.
98
+ If the research mentions specific constraints (e.g., service intervals, regulatory limits, data schemas), incorporate them into the 'strand' definitions.
99
+ Generate a comprehensive Helix blueprint that addresses the user's idea while respecting domain-specific requirements.`;
100
+ }
101
+ else {
102
+ userMessage = userIdea;
103
+ }
104
+ const helixCode = await (0, openrouter_1.createCompletion)(types_1.ARCHITECT_SYSTEM_PROMPT, userMessage, { model, maxTokens: 4096 });
105
+ // Generate output filename from the idea (sanitized)
106
+ const sanitizedName = userIdea
107
+ .toLowerCase()
108
+ .replace(/[^a-z0-9]+/g, "-")
109
+ .substring(0, 30)
110
+ .replace(/-+$/, "");
111
+ const outputPath = path.join(process.cwd(), `${sanitizedName}.helix`);
112
+ fs.writeFileSync(outputPath, helixCode, "utf-8");
113
+ console.log(chalk_1.default.blue("\n✨ Blueprint drafted successfully!"));
114
+ console.log(chalk_1.default.blue(`šŸ“„ Output: ${outputPath}`));
115
+ console.log(chalk_1.default.gray("\n--- Generated Helix Blueprint ---"));
116
+ console.log(chalk_1.default.cyan(helixCode));
117
+ console.log(chalk_1.default.gray("--- End of Blueprint ---\n"));
118
+ return outputPath;
119
+ }
120
+ catch (error) {
121
+ if (error instanceof Error) {
122
+ console.error(chalk_1.default.red(`āŒ Architect Error: ${error.message}`));
123
+ }
124
+ throw error;
125
+ }
126
+ }
127
+ //# sourceMappingURL=architect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architect.js","sourceRoot":"","sources":["../src/architect.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeH,wCAmFC;AAhGD,kDAA0B;AAC1B,uCAAyB;AACzB,2CAA6B;AAC7B,6CAAgD;AAChD,mCAAkD;AAElD;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAChC,QAAgB,EAChB,eAAwB,EACxB,KAAc;IAEd,OAAO,CAAC,GAAG,CAAC,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CAAC,sBAAsB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACpE,CAAC;QACD,MAAM,KAAK,CAAC;IAChB,CAAC;AACL,CAAC"}
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Helix CLI v11.0 - Complete Development Platform
4
+ * AI-Native Programming Language with Full-Stack Generation
5
+ *
6
+ * Commands:
7
+ * spawn <prompt> - ONE-SHOT: Full app from natural language
8
+ * new <project> - Scaffold a new Helix project
9
+ * generate <blueprint> - Generate Prisma + API + UI from .helix
10
+ * run - Start the dev server
11
+ * preview - Hot-reload preview with file watching
12
+ * deploy - One-command deployment
13
+ * research <topic> - Generate domain research
14
+ * draft <idea> - Create a .helix blueprint
15
+ * build <file> - Compile .helix to React component
16
+ * plugins - List registered generator plugins
17
+ * models - List available AI models
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=helix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helix.d.ts","sourceRoot":"","sources":["../../src/bin/helix.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;GAgBG"}