@getcoherent/cli 0.3.4 → 0.3.5

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 (2) hide show
  1. package/dist/index.js +15 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4490,16 +4490,22 @@ LAYOUT CONTRACT (CRITICAL \u2014 prevents duplicate navigation and footer):
4490
4490
 
4491
4491
  WIDTH CONSISTENCY (CRITICAL \u2014 prevents visual mismatch between header and content):
4492
4492
  - The shared Header and Footer use "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8" for inner content.
4493
- - ALL page content MUST use the same width constraint: wrap the outermost element content in "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8" or use the same constraint on the <main> element.
4494
- - Example: <main className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-6"> or a nested <div> with this class.
4493
+ - ALL page content MUST use the same width constraint: wrap the outermost element in <main className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-6">.
4494
+ - Landing/marketing pages: each <section> is full-width for backgrounds, but inner content uses "mx-auto max-w-6xl" or similar.
4495
+ - NEVER use max-w-4xl or smaller for the page wrapper \u2014 it makes the page look narrower than the header.
4495
4496
  - NEVER have page content at full width while header/footer are constrained \u2014 this looks broken.
4496
4497
 
4498
+ PAGE CONTENT (CRITICAL \u2014 prevents empty or duplicate pages):
4499
+ - Every page MUST have substantial content. NEVER generate a page with only metadata and an empty <main> element.
4500
+ - NEVER create an inline preview/demo of another page (e.g., embedding a "dashboard view" inside the landing page with a toggle). Each page should be its own route.
4501
+ - Landing pages should link to app pages via <Link href="/dashboard">, NOT via useState toggles that render inline content.
4502
+
4497
4503
  pageCode rules (shadcn/ui blocks quality):
4498
4504
  - Full Next.js App Router page. Imports from '@/components/ui/...' for registry components.
4499
4505
  - Follow ALL design constraints above: text-sm base, semantic colors only, restricted spacing, weight-based hierarchy.
4500
4506
  - Stat card pattern: Card > CardHeader(flex flex-row items-center justify-between space-y-0 pb-2) > CardTitle(text-sm font-medium) + Icon(size-4 text-muted-foreground) ; CardContent > metric(text-2xl font-bold) + change(text-xs text-muted-foreground).
4501
4507
  - Login/form pattern: outer div(flex min-h-svh flex-col items-center justify-center p-6 md:p-10) > inner div(w-full max-w-sm) > Card with form.
4502
- - Dashboard pattern: main(flex flex-1 flex-col gap-4 p-4 lg:p-6) > page header(h1 text-2xl font-bold tracking-tight + p text-sm text-muted-foreground) > stats grid(grid gap-4 md:grid-cols-2 lg:grid-cols-4) > content cards.
4508
+ - Dashboard pattern: main(mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-6 flex flex-1 flex-col gap-4) > page header(h1 text-2xl font-bold tracking-tight + p text-sm text-muted-foreground) > stats grid(grid gap-4 md:grid-cols-2 lg:grid-cols-4) > content cards.
4503
4509
  - No placeholders: real contextual copy only. Use the EXACT text, language, and content from the user's request.
4504
4510
  - Hover/focus on every interactive element (hover:bg-muted, focus-visible:ring-2 focus-visible:ring-ring).
4505
4511
  - LANGUAGE: Match the language of the user's request. English request \u2192 English page. Russian request \u2192 Russian page. Never switch languages.
@@ -7409,6 +7415,12 @@ async function applyModification(request, dsm, cm, pm, projectRoot, aiProvider,
7409
7415
  }
7410
7416
  }
7411
7417
  }
7418
+ if (!finalPageCode) {
7419
+ console.log(chalk11.yellow(`
7420
+ \u26A0\uFE0F Page "${page.name || page.id}" has no generated code \u2014 it will appear empty.`));
7421
+ console.log(chalk11.dim(" This usually means the AI did not produce pageCode for this page."));
7422
+ console.log(chalk11.dim(' Try running: coherent chat "regenerate the ' + (page.name || page.id) + ' page with full content"'));
7423
+ }
7412
7424
  const pageForConfig = {
7413
7425
  ...page,
7414
7426
  sections: page.sections ?? [],
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.4",
6
+ "version": "0.3.5",
7
7
  "description": "CLI interface for Coherent Design Method",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",