@getcoherent/cli 0.6.3 → 0.6.4

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.
@@ -90,7 +90,7 @@ function getPageGroup(route, plan) {
90
90
  function getPageType(route, plan) {
91
91
  return plan.pageNotes[routeToKey(route)]?.type ?? "app";
92
92
  }
93
- var PLAN_SYSTEM_PROMPT = `You are a UI architect. Given a list of pages for a web application, create a Component Architecture Plan.
93
+ var PLAN_SYSTEM_PROMPT = `You are a UI architect. Given a list of pages for a web application, create a Component Architecture Plan as JSON.
94
94
 
95
95
  Your task:
96
96
  1. Group pages by navigation context (e.g., public marketing pages, authenticated app pages, auth flows)
@@ -106,7 +106,31 @@ Rules:
106
106
  - Cross-page links: map link labels to target routes (e.g., {"Sign in": "/login"})
107
107
  - Maximum 8 shared components
108
108
 
109
- Respond with valid JSON matching the schema.`;
109
+ Respond with EXACTLY this JSON structure (use these exact field names):
110
+
111
+ {
112
+ "appName": "MyApp",
113
+ "groups": [
114
+ { "id": "public", "layout": "header", "pages": ["/", "/pricing"] },
115
+ { "id": "app", "layout": "sidebar", "pages": ["/dashboard", "/settings"] },
116
+ { "id": "auth", "layout": "none", "pages": ["/login", "/register"] }
117
+ ],
118
+ "sharedComponents": [
119
+ {
120
+ "name": "StatCard",
121
+ "description": "Displays a single metric with label and value",
122
+ "props": "{ label: string; value: string; icon?: React.ReactNode }",
123
+ "usedBy": ["/dashboard", "/projects"],
124
+ "type": "widget",
125
+ "shadcnDeps": ["card"]
126
+ }
127
+ ],
128
+ "pageNotes": {
129
+ "home": { "type": "marketing", "sections": ["Hero", "Features", "Pricing"], "links": { "Sign in": "/login" } },
130
+ "dashboard": { "type": "app", "sections": ["Stats row", "Recent tasks", "Activity feed"] },
131
+ "login": { "type": "auth", "sections": ["Login form"] }
132
+ }
133
+ }`;
110
134
  async function generateArchitecturePlan(pages, userMessage, aiProvider, layoutHint) {
111
135
  const userPrompt = `Pages: ${pages.map((p) => `${p.name} (${p.route})`).join(", ")}
112
136
 
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  loadPlan,
6
6
  routeToKey,
7
7
  savePlan
8
- } from "./chunk-IKHAW6OI.js";
8
+ } from "./chunk-YKMN4VTH.js";
9
9
  import {
10
10
  __require
11
11
  } from "./chunk-3RG5ZIWI.js";
@@ -8056,7 +8056,7 @@ async function splitGeneratePages(spinner, message, modCtx, provider, parseOpts)
8056
8056
  if (plan && plan.sharedComponents.length > 0) {
8057
8057
  spinner.start(`Phase 4.5/6 \u2014 Generating ${plan.sharedComponents.length} shared components from plan...`);
8058
8058
  try {
8059
- const { generateSharedComponentsFromPlan } = await import("./plan-generator-R72I6RNM.js");
8059
+ const { generateSharedComponentsFromPlan } = await import("./plan-generator-FBNCXPOA.js");
8060
8060
  const generated = await generateSharedComponentsFromPlan(
8061
8061
  plan,
8062
8062
  styleContext,
@@ -11,7 +11,7 @@ import {
11
11
  routeToKey,
12
12
  savePlan,
13
13
  updateArchitecturePlan
14
- } from "./chunk-IKHAW6OI.js";
14
+ } from "./chunk-YKMN4VTH.js";
15
15
  import "./chunk-3RG5ZIWI.js";
16
16
  export {
17
17
  ArchitecturePlanSchema,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.6.3",
6
+ "version": "0.6.4",
7
7
  "description": "CLI interface for Coherent Design Method",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "ora": "^7.0.1",
44
44
  "prompts": "^2.4.2",
45
45
  "zod": "^3.22.4",
46
- "@getcoherent/core": "0.6.3"
46
+ "@getcoherent/core": "0.6.4"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^20.11.0",