@auto-engineer/react-gen 1.136.0 → 1.138.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/dist/src/agents/create-codegen-agent.d.ts +5 -0
- package/dist/src/agents/create-codegen-agent.d.ts.map +1 -0
- package/dist/src/agents/create-codegen-agent.js +30 -0
- package/dist/src/agents/create-codegen-agent.js.map +1 -0
- package/dist/src/agents/create-constants-agent.d.ts.map +1 -1
- package/dist/src/agents/create-constants-agent.js +25 -8
- package/dist/src/agents/create-constants-agent.js.map +1 -1
- package/dist/src/agents/create-landing-page-agent.d.ts.map +1 -1
- package/dist/src/agents/create-landing-page-agent.js +3 -4
- package/dist/src/agents/create-landing-page-agent.js.map +1 -1
- package/dist/src/agents/create-narrative-agent.d.ts.map +1 -1
- package/dist/src/agents/create-narrative-agent.js +4 -5
- package/dist/src/agents/create-narrative-agent.js.map +1 -1
- package/dist/src/agents/create-pipeline.d.ts +1 -0
- package/dist/src/agents/create-pipeline.d.ts.map +1 -1
- package/dist/src/agents/create-pipeline.js +4 -2
- package/dist/src/agents/create-pipeline.js.map +1 -1
- package/dist/src/agents/create-router-agent.d.ts.map +1 -1
- package/dist/src/agents/create-router-agent.js +3 -4
- package/dist/src/agents/create-router-agent.js.map +1 -1
- package/dist/src/agents/create-theme-agent.d.ts.map +1 -1
- package/dist/src/agents/create-theme-agent.js +3 -4
- package/dist/src/agents/create-theme-agent.js.map +1 -1
- package/dist/src/agents/create-validation-agent.d.ts.map +1 -1
- package/dist/src/agents/create-validation-agent.js +3 -4
- package/dist/src/agents/create-validation-agent.js.map +1 -1
- package/dist/src/commands/generate-react-app.d.ts.map +1 -1
- package/dist/src/commands/generate-react-app.js +2 -1
- package/dist/src/commands/generate-react-app.js.map +1 -1
- package/dist/src/prompts/build-narrative-context.d.ts +1 -1
- package/dist/src/prompts/build-narrative-context.d.ts.map +1 -1
- package/dist/src/prompts/build-narrative-context.js +25 -6
- package/dist/src/prompts/build-narrative-context.js.map +1 -1
- package/dist/src/prompts/landing-page-system.d.ts +1 -1
- package/dist/src/prompts/landing-page-system.d.ts.map +1 -1
- package/dist/src/prompts/landing-page-system.js +11 -5
- package/dist/src/prompts/landing-page-system.js.map +1 -1
- package/dist/src/prompts/narrative-system.d.ts +1 -1
- package/dist/src/prompts/narrative-system.d.ts.map +1 -1
- package/dist/src/prompts/narrative-system.js +39 -16
- package/dist/src/prompts/narrative-system.js.map +1 -1
- package/dist/src/prompts/router-system.d.ts +1 -1
- package/dist/src/prompts/router-system.d.ts.map +1 -1
- package/dist/src/prompts/router-system.js +7 -4
- package/dist/src/prompts/router-system.js.map +1 -1
- package/dist/src/prompts/validation-system.d.ts +1 -1
- package/dist/src/prompts/validation-system.d.ts.map +1 -1
- package/dist/src/prompts/validation-system.js +5 -2
- package/dist/src/prompts/validation-system.js.map +1 -1
- package/dist/src/tools/check-imports.d.ts.map +1 -1
- package/dist/src/tools/check-imports.js +7 -2
- package/dist/src/tools/check-imports.js.map +1 -1
- package/dist/src/tools/list-files.d.ts.map +1 -1
- package/dist/src/tools/list-files.js +2 -0
- package/dist/src/tools/list-files.js.map +1 -1
- package/dist/src/tools/load-skills.d.ts +8 -0
- package/dist/src/tools/load-skills.d.ts.map +1 -0
- package/dist/src/tools/load-skills.js +28 -0
- package/dist/src/tools/load-skills.js.map +1 -0
- package/dist/src/tools/write-file.d.ts.map +1 -1
- package/dist/src/tools/write-file.js +10 -0
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/types.d.ts +19 -19
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +4 -4
- package/dist/src/types.js.map +1 -1
- package/dist/starter/codegen.ts +17 -0
- package/dist/starter/package.json +5 -1
- package/dist/starter/pnpm-lock.yaml +2382 -85
- package/dist/starter/src/App.tsx +1 -1
- package/dist/starter/src/gql/execute.ts +9 -0
- package/dist/starter/src/gql/fragment-masking.ts +82 -0
- package/dist/starter/src/gql/gql.ts +6 -0
- package/dist/starter/src/gql/graphql.ts +37 -0
- package/dist/starter/src/gql/index.ts +2 -0
- package/dist/starter/src/main.tsx +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/starter/codegen.ts +17 -0
- package/starter/package.json +5 -1
- package/starter/pnpm-lock.yaml +2382 -85
- package/starter/src/App.tsx +1 -1
- package/starter/src/gql/execute.ts +9 -0
- package/starter/src/gql/fragment-masking.ts +82 -0
- package/starter/src/gql/gql.ts +6 -0
- package/starter/src/gql/graphql.ts +37 -0
- package/starter/src/gql/index.ts +2 -0
- package/starter/src/main.tsx +1 -1
- package/dist/starter/package-lock.json +0 -7590
- package/starter/package-lock.json +0 -7590
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-page-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/landing-page-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"landing-page-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/landing-page-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,0sKAmElB,CAAC"}
|
|
@@ -3,6 +3,8 @@ export const LANDING_PAGE_SYSTEM_PROMPT = `You are a principal UI architect buil
|
|
|
3
3
|
## YOUR ONLY JOB
|
|
4
4
|
Write src/components/landing-page.tsx — a premium, tasteful landing page for this application.
|
|
5
5
|
|
|
6
|
+
CRITICAL: Do NOT include any navigation bar, header, or top nav in the landing page. The App.tsx shell already provides a sticky navigation header. Your landing page renders BELOW that header. Adding another nav creates a duplicate header bar.
|
|
7
|
+
|
|
6
8
|
## DESIGN PRINCIPLES — NON-NEGOTIABLE
|
|
7
9
|
|
|
8
10
|
### Typography
|
|
@@ -19,13 +21,17 @@ Write src/components/landing-page.tsx — a premium, tasteful landing page for t
|
|
|
19
21
|
### Layout
|
|
20
22
|
- Hero: split-screen layout using CSS Grid (grid-cols-1 lg:grid-cols-2). The hero MUST use min-h-[80dvh] or min-h-[85dvh].
|
|
21
23
|
- Hero left side: headline, bullet points with check-mark icons showing value propositions, CTA buttons.
|
|
22
|
-
- Hero right side: a
|
|
23
|
-
- Feature showcase:
|
|
24
|
+
- Hero right side: build a mock "app preview" — a realistic-looking card or panel that previews what the actual app interface looks like. Use real UI components (Card, Badge, small stat numbers, progress indicators) arranged to look like a miniature dashboard screenshot. Add a subtle rotateY(2deg) or -rotate-1 transform and a soft shadow to make it pop. This should look like a floating app window, NOT abstract shapes or placeholder graphics.
|
|
25
|
+
- Feature showcase: choose the layout pattern that best fits THIS application's features. Options:
|
|
26
|
+
(a) Alternating zig-zag (grid-cols-2, text on one side, preview on the other, alternating sides) — best for 2-4 features with rich previews
|
|
27
|
+
(b) Stacked feature cards (full-width cards, each with text + inline preview) — best for 3+ features, compact
|
|
28
|
+
(c) Feature grid (2-column grid of equal cards, each with icon + heading + description) — best for 4+ small features
|
|
29
|
+
Whatever pattern you choose, include a mock UI preview for each feature built with real components (Card, Badge, form inputs, stat numbers). Previews should look like miniature screenshots of the actual feature — showing realistic sample data, not placeholders.
|
|
24
30
|
- Massive whitespace between sections: py-24 to py-32. Let the design breathe.
|
|
25
|
-
- A value strip between hero and features: border-y, bg-muted/30, showing compact feature summaries with icons.
|
|
26
|
-
- A bottom CTA section:
|
|
31
|
+
- A value strip between hero and features: border-y, bg-muted/30, py-6, showing 3 compact feature summaries with icons in a grid-cols-3 layout.
|
|
32
|
+
- A bottom CTA section: full-width bg-foreground text-background py-20 with centered headline + CTA button (inverted colors). This should feel like a strong closing statement.
|
|
27
33
|
- Container: max-w-6xl mx-auto px-6.
|
|
28
|
-
- Never use 3-column card grids. Use 2 columns or zig-zag alternating.
|
|
34
|
+
- Never use 3-column card grids for features. Use 2 columns or zig-zag alternating.
|
|
29
35
|
- Never use h-screen. Always min-h-[Xdvh].
|
|
30
36
|
|
|
31
37
|
### Components & Interactions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-page-system.js","sourceRoot":"","sources":["../../../src/prompts/landing-page-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG
|
|
1
|
+
{"version":3,"file":"landing-page-system.js","sourceRoot":"","sources":["../../../src/prompts/landing-page-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmErB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const NARRATIVE_SYSTEM_PROMPT = "You are a senior design engineer building a React feature from a domain model narrative. Use write_file to create every file.\n\n## MANDATORY SKILL COMPLIANCE\nYou have ACTIVE SKILLS injected below. They are hard requirements, not suggestions.\nEvery file you generate MUST comply. Violations will be caught by the validator and rejected.\n\nKey rules you MUST follow:\n- NEVER use emojis in code, markup, or text content \u2014 use lucide-react icons.\n- NEVER output partial code \u2014 every file must be complete and runnable with zero placeholders.\n- Do NOT add page-level animations or framer-motion \u2014 keep pages static and fast.\n- shadcn/ui components must be customized \u2014 never use default unstyled state.\n\n## TECHNICAL CONSTRAINTS\n- queries.ts ALREADY
|
|
1
|
+
export declare const NARRATIVE_SYSTEM_PROMPT = "You are a senior design engineer building a React feature from a domain model narrative. Use write_file to create every file.\n\n## MANDATORY SKILL COMPLIANCE\nYou have ACTIVE SKILLS injected below. They are hard requirements, not suggestions.\nEvery file you generate MUST comply. Violations will be caught by the validator and rejected.\n\nKey rules you MUST follow:\n- NEVER use emojis in code, markup, or text content \u2014 use lucide-react icons.\n- NEVER output partial code \u2014 every file must be complete and runnable with zero placeholders.\n- Do NOT add page-level animations or framer-motion \u2014 keep pages static and fast.\n- shadcn/ui components must be customized \u2014 never use default unstyled state.\n\n## TECHNICAL CONSTRAINTS\n- queries.ts and mutations.ts ALREADY exist with typed GraphQL operations \u2014 their content is shown below. Import from \"./queries\" or \"./mutations\".\n- NEVER create new GraphQL operations or query strings. ALL operations you need are already in queries.ts/mutations.ts.\n- NEVER write to queries.ts or mutations.ts \u2014 they are protected and will be rejected.\n- If a slice has no request field, it does not need a GraphQL call \u2014 build it as a static/local component.\n- ALWAYS use execute() from \"@/gql/execute\" with @tanstack/react-query. Types are inferred automatically.\n- NEVER manually define response or variable types for GraphQL operations \u2014 they are inferred from the typed operations.\n- NEVER import { request } from \"graphql-request\" or use graphqlClient.request() directly \u2014 ALWAYS use the typed execute() function.\n CORRECT: import { execute } from \"@/gql/execute\"; import { MY_QUERY } from \"./queries\"; execute(MY_QUERY, { id })\n WRONG: import { graphqlClient } from \"@/lib/graphql-client\"; graphqlClient.request<ManualType>(QUERY, vars)\n WRONG: import { request } from \"graphql-request\"; request(\"/graphql\", QUERY, vars)\n- Use shadcn/ui components from \"@/components/ui/...\" (customized) \u2014 never raw HTML elements.\n- Use react-hook-form + zod when you need forms.\n- When using Select from shadcn/ui: EVERY <SelectItem> MUST have a non-empty value prop. Never use value=\"\". Use a meaningful string like \"none\" or \"all\" for default/placeholder items.\n- Tailwind CSS only \u2014 no .css files.\n- Use lucide-react for icons.\n- Use toast from \"sonner\" for feedback.\n- Skip \"react\" type slices \u2014 they are server-only.\n- Don't write App.tsx, main.tsx, index.css, anything in src/lib/, src/gql/, or src/components/ui/.\n\n## FILE STRUCTURE\n- Feature components: src/features/<narrative-slug>/\n- REQUIRED: src/features/<narrative-slug>/index.ts \u2014 must re-export all components as NAMED exports.\n- NEVER use default exports anywhere. ALL exports must be named exports (export function X, export const X).\n- Example index.ts: export { WorkoutLogForm } from './WorkoutLogForm';\n- Page files: src/pages/<NarrativeName>Page.tsx \u2014 export function <NarrativeName>Page() { ... }\n\n## THEME CONSISTENCY \u2014 CRITICAL\n- ALWAYS use theme CSS variables via Tailwind: bg-background, text-foreground, bg-card, text-muted-foreground, etc.\n- NEVER hardcode dark backgrounds (bg-black, bg-gray-900, bg-zinc-900, bg-slate-900, bg-neutral-900, bg-stone-900, dark:bg-*). The app theme is set in index.css \u2014 respect it.\n- NEVER set dark mode classes or dark-themed sections. Every page must look consistent with the rest of the app.\n- Use bg-muted/30 or bg-muted/50 for subtle section backgrounds, bg-card for cards, bg-background for page backgrounds.\n\n## DESIGN QUALITY \u2014 MANDATORY\nThe output must look like a premium SaaS product built by a top design-engineering team. NOT a generic template. NOT a homework project.\n\nPage Layout Architecture (STRICT \u2014 every page MUST follow this):\n- SECTION 1 \u2014 Page Header (REQUIRED on every page):\n A full-width section at the top with: a small uppercase tracking-wider badge/label in a pill (rounded-full bg-primary/10 px-3 py-1 text-primary text-xs font-medium), followed by a bold text-3xl tracking-tight headline, followed by a text-muted-foreground description. This gives the page identity.\n- SECTION 2 \u2014 Primary Content:\n - For command pages (forms): use a 2-column grid (grid-cols-1 lg:grid-cols-5 gap-8). Left column (col-span-2): contextual info \u2014 a headline, description, and 2-3 stat cards showing relevant metrics (e.g., \"Total Sessions: 0\", \"This Week: 0\") with icons. Right column (col-span-3): the form in a rounded-2xl border bg-card p-6 card.\n - For query pages (data display): ALWAYS render 3 stat summary cards in a row (grid-cols-1 md:grid-cols-3 gap-4) ABOVE the main content, even when data is empty \u2014 show \"0\" or \"--\" as placeholder values. Each stat card: rounded-2xl border bg-card p-6 with a small icon in a colored circle, a text-xs uppercase label, and a text-2xl font-bold font-mono value. Then show the main data list/table below the stat cards.\n- SECTION 3 \u2014 Supporting Content (choose what fits this feature):\n Tips/info cards, related actions, quick-start guides, or secondary data display. Pick what makes sense for this specific feature \u2014 don't force content that doesn't belong.\n- NEVER create a page that is just a centered form with no surrounding context. NEVER create a page that is just one empty-state card.\n\nTypography:\n- Page titles: text-3xl font-bold tracking-tight\n- Section labels: text-xs uppercase tracking-wider text-muted-foreground\n- Numbers/stats: font-mono tabular-nums\n\nSurfaces & Interactions:\n- Cards: rounded-2xl border border-border/60 bg-card \u2014 customize shadcn/ui defaults\n- All interactive elements: include hover states and smooth transitions (transition-all duration-200)\n- Buttons: rounded-xl font-semibold with appropriate sizing\n\nStates (ALL REQUIRED for every data-fetching component):\n- Loading: <Skeleton /> components matching the expected layout shape \u2014 place them inside the real layout, not just a centered spinner\n- Empty: designed empty states \u2014 large muted lucide-react icon (size={48}), heading, description, and a CTA button to take action\n- Error: text-destructive with a retry button\n\nRead the narrative context below, decide what components are needed, and generate them all.";
|
|
2
2
|
//# sourceMappingURL=narrative-system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"narrative-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/narrative-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"narrative-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/narrative-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,stMAyEwD,CAAC"}
|
|
@@ -11,41 +11,64 @@ Key rules you MUST follow:
|
|
|
11
11
|
- shadcn/ui components must be customized — never use default unstyled state.
|
|
12
12
|
|
|
13
13
|
## TECHNICAL CONSTRAINTS
|
|
14
|
-
- queries.ts ALREADY
|
|
15
|
-
-
|
|
16
|
-
- NEVER
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
- queries.ts and mutations.ts ALREADY exist with typed GraphQL operations — their content is shown below. Import from "./queries" or "./mutations".
|
|
15
|
+
- NEVER create new GraphQL operations or query strings. ALL operations you need are already in queries.ts/mutations.ts.
|
|
16
|
+
- NEVER write to queries.ts or mutations.ts — they are protected and will be rejected.
|
|
17
|
+
- If a slice has no request field, it does not need a GraphQL call — build it as a static/local component.
|
|
18
|
+
- ALWAYS use execute() from "@/gql/execute" with @tanstack/react-query. Types are inferred automatically.
|
|
19
|
+
- NEVER manually define response or variable types for GraphQL operations — they are inferred from the typed operations.
|
|
20
|
+
- NEVER import { request } from "graphql-request" or use graphqlClient.request() directly — ALWAYS use the typed execute() function.
|
|
21
|
+
CORRECT: import { execute } from "@/gql/execute"; import { MY_QUERY } from './queries.js'; execute(MY_QUERY, { id })
|
|
22
|
+
WRONG: import { graphqlClient } from "@/lib/graphql-client"; graphqlClient.request<ManualType>(QUERY, vars)
|
|
23
|
+
WRONG: import { request } from "graphql-request"; request("/graphql", QUERY, vars)
|
|
19
24
|
- Use shadcn/ui components from "@/components/ui/..." (customized) — never raw HTML elements.
|
|
20
25
|
- Use react-hook-form + zod when you need forms.
|
|
26
|
+
- When using Select from shadcn/ui: EVERY <SelectItem> MUST have a non-empty value prop. Never use value="". Use a meaningful string like "none" or "all" for default/placeholder items.
|
|
21
27
|
- Tailwind CSS only — no .css files.
|
|
22
28
|
- Use lucide-react for icons.
|
|
23
29
|
- Use toast from "sonner" for feedback.
|
|
24
30
|
- Skip "react" type slices — they are server-only.
|
|
25
|
-
- Don't write App.tsx, main.tsx, index.css, anything in src/lib/ or src/components/ui/.
|
|
26
|
-
- BEFORE generating, call read_file on queries.ts to see the available constants.
|
|
31
|
+
- Don't write App.tsx, main.tsx, index.css, anything in src/lib/, src/gql/, or src/components/ui/.
|
|
27
32
|
|
|
28
33
|
## FILE STRUCTURE
|
|
29
34
|
- Feature components: src/features/<narrative-slug>/
|
|
30
|
-
- REQUIRED: src/features/<narrative-slug>/index.ts — must
|
|
35
|
+
- REQUIRED: src/features/<narrative-slug>/index.ts — must re-export all components as NAMED exports.
|
|
36
|
+
- NEVER use default exports anywhere. ALL exports must be named exports (export function X, export const X).
|
|
37
|
+
- Example index.ts: export { WorkoutLogForm } from './WorkoutLogForm.js';
|
|
38
|
+
- Page files: src/pages/<NarrativeName>Page.tsx — export function <NarrativeName>Page() { ... }
|
|
39
|
+
|
|
40
|
+
## THEME CONSISTENCY — CRITICAL
|
|
41
|
+
- ALWAYS use theme CSS variables via Tailwind: bg-background, text-foreground, bg-card, text-muted-foreground, etc.
|
|
42
|
+
- NEVER hardcode dark backgrounds (bg-black, bg-gray-900, bg-zinc-900, bg-slate-900, bg-neutral-900, bg-stone-900, dark:bg-*). The app theme is set in index.css — respect it.
|
|
43
|
+
- NEVER set dark mode classes or dark-themed sections. Every page must look consistent with the rest of the app.
|
|
44
|
+
- Use bg-muted/30 or bg-muted/50 for subtle section backgrounds, bg-card for cards, bg-background for page backgrounds.
|
|
31
45
|
|
|
32
46
|
## DESIGN QUALITY — MANDATORY
|
|
33
|
-
The output must look like a premium SaaS product
|
|
47
|
+
The output must look like a premium SaaS product built by a top design-engineering team. NOT a generic template. NOT a homework project.
|
|
48
|
+
|
|
49
|
+
Page Layout Architecture (STRICT — every page MUST follow this):
|
|
50
|
+
- SECTION 1 — Page Header (REQUIRED on every page):
|
|
51
|
+
A full-width section at the top with: a small uppercase tracking-wider badge/label in a pill (rounded-full bg-primary/10 px-3 py-1 text-primary text-xs font-medium), followed by a bold text-3xl tracking-tight headline, followed by a text-muted-foreground description. This gives the page identity.
|
|
52
|
+
- SECTION 2 — Primary Content:
|
|
53
|
+
- For command pages (forms): use a 2-column grid (grid-cols-1 lg:grid-cols-5 gap-8). Left column (col-span-2): contextual info — a headline, description, and 2-3 stat cards showing relevant metrics (e.g., "Total Sessions: 0", "This Week: 0") with icons. Right column (col-span-3): the form in a rounded-2xl border bg-card p-6 card.
|
|
54
|
+
- For query pages (data display): ALWAYS render 3 stat summary cards in a row (grid-cols-1 md:grid-cols-3 gap-4) ABOVE the main content, even when data is empty — show "0" or "--" as placeholder values. Each stat card: rounded-2xl border bg-card p-6 with a small icon in a colored circle, a text-xs uppercase label, and a text-2xl font-bold font-mono value. Then show the main data list/table below the stat cards.
|
|
55
|
+
- SECTION 3 — Supporting Content (choose what fits this feature):
|
|
56
|
+
Tips/info cards, related actions, quick-start guides, or secondary data display. Pick what makes sense for this specific feature — don't force content that doesn't belong.
|
|
57
|
+
- NEVER create a page that is just a centered form with no surrounding context. NEVER create a page that is just one empty-state card.
|
|
34
58
|
|
|
35
59
|
Typography:
|
|
36
60
|
- Page titles: text-3xl font-bold tracking-tight
|
|
37
61
|
- Section labels: text-xs uppercase tracking-wider text-muted-foreground
|
|
38
|
-
- Numbers/stats: font-mono
|
|
62
|
+
- Numbers/stats: font-mono tabular-nums
|
|
39
63
|
|
|
40
64
|
Surfaces & Interactions:
|
|
41
|
-
- Cards: rounded-2xl border border-border/60 bg-card — customize
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
- Hover states and transitions on interactive elements
|
|
65
|
+
- Cards: rounded-2xl border border-border/60 bg-card — customize shadcn/ui defaults
|
|
66
|
+
- All interactive elements: include hover states and smooth transitions (transition-all duration-200)
|
|
67
|
+
- Buttons: rounded-xl font-semibold with appropriate sizing
|
|
45
68
|
|
|
46
69
|
States (ALL REQUIRED for every data-fetching component):
|
|
47
|
-
- Loading: <Skeleton /> components matching the expected layout shape
|
|
48
|
-
- Empty: large muted lucide-react icon (size={48}), heading, description
|
|
70
|
+
- Loading: <Skeleton /> components matching the expected layout shape — place them inside the real layout, not just a centered spinner
|
|
71
|
+
- Empty: designed empty states — large muted lucide-react icon (size={48}), heading, description, and a CTA button to take action
|
|
49
72
|
- Error: text-destructive with a retry button
|
|
50
73
|
|
|
51
74
|
Read the narrative context below, decide what components are needed, and generate them all.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"narrative-system.js","sourceRoot":"","sources":["../../../src/prompts/narrative-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG
|
|
1
|
+
{"version":3,"file":"narrative-system.js","sourceRoot":"","sources":["../../../src/prompts/narrative-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4FAyEqD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ROUTER_SYSTEM_PROMPT = "You are a senior design engineer. Create the app shell (App.tsx) that wires up routing and navigation for the generated features. Use write_file to create it.\n\n## MANDATORY SKILL COMPLIANCE\nYou have ACTIVE SKILLS injected below. They are hard requirements, not suggestions. Violations will be rejected.\n\n## PROCESS\n1. Call list_files to see what feature components have been generated.\n2. Call read_file on each feature's index.ts to find their exports.\n3. Call read_file on src/components/landing-page.tsx to see the landing page (already generated).\n4. Write src/App.tsx \u2014 the router shell with polished navigation.\n\n## APP.TSX\n- Wrap in <BrowserRouter> from react-router-dom (main.tsx does NOT provide a router).\n- \"/\" MUST render <LandingPage /> from \"@/components/landing-page\" \u2014 NEVER a redirect.\n- Navigation:
|
|
1
|
+
export declare const ROUTER_SYSTEM_PROMPT = "You are a senior design engineer. Create the app shell (App.tsx) that wires up routing and navigation for the generated features. Use write_file to create it.\n\n## MANDATORY SKILL COMPLIANCE\nYou have ACTIVE SKILLS injected below. They are hard requirements, not suggestions. Violations will be rejected.\n\n## PROCESS\n1. Call list_files to see what feature components have been generated.\n2. Call read_file on each feature's index.ts to find their exports.\n3. Call read_file on src/components/landing-page.tsx to see the landing page (already generated).\n4. Write src/App.tsx \u2014 the router shell with polished navigation.\n\n## APP.TSX\n- Wrap in <BrowserRouter> from react-router-dom (main.tsx does NOT provide a router).\n- \"/\" MUST render <LandingPage /> from \"@/components/landing-page\" \u2014 NEVER a redirect.\n- Navigation: a polished TOP header (NOT a sidebar). Include:\n - Left: app name with a relevant lucide-react icon in a rounded bg-primary/10 container\n - Center/right: NavLink items with icons, active states using bg-muted rounded-lg\n - Far right: a primary CTA Button (h-9 rounded-lg px-4 bg-primary text-primary-foreground font-medium) linking to the most important action route (e.g., creating/logging). Include a PlusCircle icon.\n Use: sticky top-0 z-50 bg-background/80 backdrop-blur-sm border-b border-border/40\n- Do NOT use a sidebar layout. Use a horizontal top navigation bar.\n- Each feature gets its own route.\n- Catch-all 404 using <NotFound /> from \"@/components/not-found\".\n- Wrap content in QueryClientProvider from @tanstack/react-query.\n- Export as named export: export function App() { ... }. NEVER use default exports.\n\n## AVAILABLE IMPORTS\n- react-router-dom: BrowserRouter, Routes, Route, Link, NavLink\n- lucide-react: any icon\n- @/components/ui/*: Button, Card, CardHeader, CardTitle, CardContent, CardDescription, Badge, Separator\n- @/lib/utils: cn() helper\n- @/components/not-found: NotFound\n- @/components/landing-page: LandingPage (named export)\n- @tanstack/react-query: QueryClient, QueryClientProvider\n\nDO NOT modify main.tsx, landing-page.tsx, or any feature files. You may ONLY write src/App.tsx.\n\nAfter writing App.tsx, call exit_loop to finish.";
|
|
2
2
|
//# sourceMappingURL=router-system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/router-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"router-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/router-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,+rEAoCgB,CAAC"}
|
|
@@ -12,13 +12,16 @@ You have ACTIVE SKILLS injected below. They are hard requirements, not suggestio
|
|
|
12
12
|
## APP.TSX
|
|
13
13
|
- Wrap in <BrowserRouter> from react-router-dom (main.tsx does NOT provide a router).
|
|
14
14
|
- "/" MUST render <LandingPage /> from "@/components/landing-page" — NEVER a redirect.
|
|
15
|
-
- Navigation:
|
|
16
|
-
|
|
15
|
+
- Navigation: a polished TOP header (NOT a sidebar). Include:
|
|
16
|
+
- Left: app name with a relevant lucide-react icon in a rounded bg-primary/10 container
|
|
17
|
+
- Center/right: NavLink items with icons, active states using bg-muted rounded-lg
|
|
18
|
+
- Far right: a primary CTA Button (h-9 rounded-lg px-4 bg-primary text-primary-foreground font-medium) linking to the most important action route (e.g., creating/logging). Include a PlusCircle icon.
|
|
19
|
+
Use: sticky top-0 z-50 bg-background/80 backdrop-blur-sm border-b border-border/40
|
|
17
20
|
- Do NOT use a sidebar layout. Use a horizontal top navigation bar.
|
|
18
21
|
- Each feature gets its own route.
|
|
19
22
|
- Catch-all 404 using <NotFound /> from "@/components/not-found".
|
|
20
23
|
- Wrap content in QueryClientProvider from @tanstack/react-query.
|
|
21
|
-
- Export
|
|
24
|
+
- Export as named export: export function App() { ... }. NEVER use default exports.
|
|
22
25
|
|
|
23
26
|
## AVAILABLE IMPORTS
|
|
24
27
|
- react-router-dom: BrowserRouter, Routes, Route, Link, NavLink
|
|
@@ -26,7 +29,7 @@ You have ACTIVE SKILLS injected below. They are hard requirements, not suggestio
|
|
|
26
29
|
- @/components/ui/*: Button, Card, CardHeader, CardTitle, CardContent, CardDescription, Badge, Separator
|
|
27
30
|
- @/lib/utils: cn() helper
|
|
28
31
|
- @/components/not-found: NotFound
|
|
29
|
-
- @/components/landing-page:
|
|
32
|
+
- @/components/landing-page: LandingPage (named export)
|
|
30
33
|
- @tanstack/react-query: QueryClient, QueryClientProvider
|
|
31
34
|
|
|
32
35
|
DO NOT modify main.tsx, landing-page.tsx, or any feature files. You may ONLY write src/App.tsx.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-system.js","sourceRoot":"","sources":["../../../src/prompts/router-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG
|
|
1
|
+
{"version":3,"file":"router-system.js","sourceRoot":"","sources":["../../../src/prompts/router-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAoCa,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VALIDATION_SYSTEM_PROMPT = "You are a TypeScript build validator for a generated React application. Your job is to ensure the project compiles and meets quality standards.\n\n## Process\n1. Run `run_tsc` to check for TypeScript errors\n2. Run `run_eslint` to check for lint errors\n3. Run `check_imports` to detect banned import patterns (e.g. direct graphql-request usage)\n4. If there are errors from ANY of the above:\n a. Use `read_file` to read the problematic files\n b. Fix errors using `write_file`\n c. Common fixes: missing imports, wrong types, type-only imports needing `import type`, unused variables\n5. If ALL THREE checks pass with 0 errors, call `exit_loop`\n\n## Rules for fixing\n- Do NOT change GraphQL request strings \u2014 they come from the domain model\n- Do NOT remove component functionality \u2014 only fix type/lint errors\n- Do NOT create .css files \u2014 convert any CSS to Tailwind classes\n- shadcn/ui imports: `import { Component } from \"@/components/ui/component\"`\n- If a component uses raw HTML inputs/tables/buttons, replace them with shadcn/ui equivalents\n- Add `import type` for type-only imports if verbatimModuleSyntax is enabled\n- CRITICAL:
|
|
1
|
+
export declare const VALIDATION_SYSTEM_PROMPT = "You are a TypeScript build validator for a generated React application. Your job is to ensure the project compiles and meets quality standards.\n\n## Process\n1. Run `run_tsc` to check for TypeScript errors\n2. Run `run_eslint` to check for lint errors\n3. Run `check_imports` to detect banned import patterns (e.g. direct graphql-request usage)\n4. If there are errors from ANY of the above:\n a. Use `read_file` to read the problematic files\n b. Fix errors using `write_file`\n c. Common fixes: missing imports, wrong types, type-only imports needing `import type`, unused variables\n5. If ALL THREE checks pass with 0 errors, call `exit_loop`\n\n## Rules for fixing\n- Do NOT change GraphQL request strings \u2014 they come from the domain model\n- Do NOT remove component functionality \u2014 only fix type/lint errors\n- Do NOT create .css files \u2014 convert any CSS to Tailwind classes\n- shadcn/ui imports: `import { Component } from \"@/components/ui/component\"`\n- If a component uses raw HTML inputs/tables/buttons, replace them with shadcn/ui equivalents\n- Add `import type` for type-only imports if verbatimModuleSyntax is enabled\n- CRITICAL: All GraphQL calls MUST use `execute()` from \"@/gql/execute\" with typed operations from queries.ts/mutations.ts. Fix pattern:\n WRONG: import { request } from \"graphql-request\"; ... request(\"/graphql\", QUERY, vars)\n WRONG: import { graphqlClient } from \"@/lib/graphql-client\"; ... graphqlClient.request<Type>(QUERY, vars)\n CORRECT: import { execute } from \"@/gql/execute\"; import { MY_QUERY } from \"./queries\"; ... execute(MY_QUERY, vars)\n- Do NOT modify files in src/gql/ \u2014 they are generated by graphql-codegen.\n- Do NOT modify queries.ts or mutations.ts in feature directories \u2014 they are generated from the domain model.\n- CRITICAL: The \"/\" route in App.tsx MUST render a LandingPage component, NEVER a <Navigate> redirect. If App.tsx redirects \"/\" away, replace the redirect with the LandingPage component.\n- NEVER modify or rewrite src/components/landing-page.tsx \u2014 it is pre-generated and must not be changed.\n\n## Exit condition\nCall `exit_loop` ONLY when tsc, eslint, AND check_imports ALL report 0 errors.";
|
|
2
2
|
//# sourceMappingURL=validation-system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/validation-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"validation-system.d.ts","sourceRoot":"","sources":["../../../src/prompts/validation-system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,urEA6B4C,CAAC"}
|
|
@@ -17,9 +17,12 @@ export const VALIDATION_SYSTEM_PROMPT = `You are a TypeScript build validator fo
|
|
|
17
17
|
- shadcn/ui imports: \`import { Component } from "@/components/ui/component"\`
|
|
18
18
|
- If a component uses raw HTML inputs/tables/buttons, replace them with shadcn/ui equivalents
|
|
19
19
|
- Add \`import type\` for type-only imports if verbatimModuleSyntax is enabled
|
|
20
|
-
- CRITICAL:
|
|
20
|
+
- CRITICAL: All GraphQL calls MUST use \`execute()\` from "@/gql/execute" with typed operations from queries.ts/mutations.ts. Fix pattern:
|
|
21
21
|
WRONG: import { request } from "graphql-request"; ... request("/graphql", QUERY, vars)
|
|
22
|
-
|
|
22
|
+
WRONG: import { graphqlClient } from "@/lib/graphql-client"; ... graphqlClient.request<Type>(QUERY, vars)
|
|
23
|
+
CORRECT: import { execute } from "@/gql/execute"; import { MY_QUERY } from './queries.js'; ... execute(MY_QUERY, vars)
|
|
24
|
+
- Do NOT modify files in src/gql/ — they are generated by graphql-codegen.
|
|
25
|
+
- Do NOT modify queries.ts or mutations.ts in feature directories — they are generated from the domain model.
|
|
23
26
|
- CRITICAL: The "/" route in App.tsx MUST render a LandingPage component, NEVER a <Navigate> redirect. If App.tsx redirects "/" away, replace the redirect with the LandingPage component.
|
|
24
27
|
- NEVER modify or rewrite src/components/landing-page.tsx — it is pre-generated and must not be changed.
|
|
25
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-system.js","sourceRoot":"","sources":["../../../src/prompts/validation-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG
|
|
1
|
+
{"version":3,"file":"validation-system.js","sourceRoot":"","sources":["../../../src/prompts/validation-system.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFA6ByC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-imports.d.ts","sourceRoot":"","sources":["../../../src/tools/check-imports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-imports.d.ts","sourceRoot":"","sources":["../../../src/tools/check-imports.ts"],"names":[],"mappings":"AA+GA,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;GA8CvD"}
|
|
@@ -6,7 +6,12 @@ const BANNED_LINE_PATTERNS = [
|
|
|
6
6
|
{
|
|
7
7
|
regex: /import\s*\{[^}]*\brequest\b[^}]*\}\s*from\s*["']graphql-request["']/,
|
|
8
8
|
pattern: 'import { request } from "graphql-request"',
|
|
9
|
-
fix: 'Replace with: import {
|
|
9
|
+
fix: 'Replace with: import { execute } from "@/gql/execute"; then use execute(TYPED_QUERY, vars)',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
regex: /graphqlClient\.request\s*</,
|
|
13
|
+
pattern: 'graphqlClient.request<Type>() — manual type parameter bypasses codegen types',
|
|
14
|
+
fix: 'Replace with: import { execute } from "@/gql/execute"; execute(TYPED_QUERY, vars) — types are inferred automatically.',
|
|
10
15
|
},
|
|
11
16
|
{
|
|
12
17
|
regex: /<Route\s[^>]*path\s*=\s*["']\/["'][^>]*element\s*=\s*\{?\s*<Navigate\b/,
|
|
@@ -18,7 +23,7 @@ function walkDir(dir, ext) {
|
|
|
18
23
|
const results = [];
|
|
19
24
|
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
20
25
|
const full = path.join(dir, entry.name);
|
|
21
|
-
if (entry.isDirectory() && entry.name !== 'node_modules' && entry.name !== 'ui') {
|
|
26
|
+
if (entry.isDirectory() && entry.name !== 'node_modules' && entry.name !== 'ui' && entry.name !== 'gql') {
|
|
22
27
|
results.push(...walkDir(full, ext));
|
|
23
28
|
}
|
|
24
29
|
else if (entry.isFile() && ext.some((e) => entry.name.endsWith(e))) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-imports.js","sourceRoot":"","sources":["../../../src/tools/check-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,oBAAoB,GAAG;IAC3B;QACE,KAAK,EAAE,qEAAqE;QAC5E,OAAO,EAAE,2CAA2C;QACpD,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"check-imports.js","sourceRoot":"","sources":["../../../src/tools/check-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,oBAAoB,GAAG;IAC3B;QACE,KAAK,EAAE,qEAAqE;QAC5E,OAAO,EAAE,2CAA2C;QACpD,GAAG,EAAE,4FAA4F;KAClG;IACD;QACE,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8EAA8E;QACvF,GAAG,EAAE,uHAAuH;KAC7H;IACD;QACE,KAAK,EAAE,wEAAwE;QAC/E,OAAO,EAAE,oGAAoG;QAC7G,GAAG,EAAE,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AAC;aAChB,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.d.ts","sourceRoot":"","sources":["../../../src/tools/list-files.ts"],"names":[],"mappings":"AAKA,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM;;
|
|
1
|
+
{"version":3,"file":"list-files.d.ts","sourceRoot":"","sources":["../../../src/tools/list-files.ts"],"names":[],"mappings":"AAKA,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM;;GA6BpD"}
|
|
@@ -21,6 +21,8 @@ export function createListFilesTool(outputDir) {
|
|
|
21
21
|
continue;
|
|
22
22
|
if (dir === path.join(outputDir, 'src', 'components') && entry.name === 'ui')
|
|
23
23
|
continue;
|
|
24
|
+
if (dir === path.join(outputDir, 'src') && entry.name === 'gql')
|
|
25
|
+
continue;
|
|
24
26
|
await walk(full);
|
|
25
27
|
}
|
|
26
28
|
else if (/\.(tsx?|css)$/.test(entry.name)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["../../../src/tools/list-files.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,OAAO,IAAI,CAAC;QACV,WAAW,EACT,qJAAqJ;QACvJ,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAC3C,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,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BAAM,IAAI,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;wBAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;oBAC7C,CAAC;gBACH,CAAC;YACH,CAAC;YACD,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC;YACnB,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QACjC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-skills.d.ts","sourceRoot":"","sources":["../../../src/tools/load-skills.ts"],"names":[],"mappings":"AAMA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE;;;cAM7B,MAAM;sBAAgB,MAAM;;GAevD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { getSkillToolkit } from '../utils/create-skill-tool.js';
|
|
6
|
+
export function createLoadSkillsTool(skillNames) {
|
|
7
|
+
return tool({
|
|
8
|
+
description: `Load all ${skillNames.length} required design/quality skills at once. Call this ONCE at the start before doing any work.`,
|
|
9
|
+
inputSchema: z.object({}),
|
|
10
|
+
execute: async () => {
|
|
11
|
+
const toolkit = await getSkillToolkit();
|
|
12
|
+
const loaded = [];
|
|
13
|
+
for (const name of skillNames) {
|
|
14
|
+
const skill = toolkit.skills.find((s) => s.name === name);
|
|
15
|
+
if (skill) {
|
|
16
|
+
const mdPath = path.join(skill.localPath, 'SKILL.md');
|
|
17
|
+
if (await fs.pathExists(mdPath)) {
|
|
18
|
+
const content = await fs.readFile(mdPath, 'utf-8');
|
|
19
|
+
const body = content.replace(/^---[\s\S]*?---\n*/, '');
|
|
20
|
+
loaded.push({ name, instructions: body });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { skills_loaded: loaded.length, skills: loaded };
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=load-skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-skills.js","sourceRoot":"","sources":["../../../src/tools/load-skills.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,UAAU,oBAAoB,CAAC,UAAoB;IACvD,OAAO,IAAI,CAAC;QACV,WAAW,EAAE,YAAY,UAAU,CAAC,MAAM,6FAA6F;QACvI,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,OAAO,GAAG,MAAM,eAAe,EAAE,CAAC;YACxC,MAAM,MAAM,GAA6C,EAAE,CAAC;YAC5D,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;gBAC1D,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;oBACtD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;wBAChC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;wBACnD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;wBACvD,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC5C,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAC1D,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-file.d.ts","sourceRoot":"","sources":["../../../src/tools/write-file.ts"],"names":[],"mappings":"AAiBA,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"write-file.d.ts","sourceRoot":"","sources":["../../../src/tools/write-file.ts"],"names":[],"mappings":"AAiBA,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;GAwCzF"}
|
|
@@ -33,6 +33,16 @@ export function createWriteFileTool(outputDir, opts) {
|
|
|
33
33
|
error: `PROTECTED: shadcn/ui components in src/components/ui/ are pre-installed. Do not overwrite them.`,
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
if (normalized.startsWith('src/gql/')) {
|
|
37
|
+
return {
|
|
38
|
+
error: `PROTECTED: src/gql/ contains generated GraphQL types. Do not overwrite.`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (/^src\/features\/[^/]+\/(queries|mutations)\.ts$/.test(normalized)) {
|
|
42
|
+
return {
|
|
43
|
+
error: `PROTECTED: queries.ts/mutations.ts files are generated from the domain model. Do not overwrite.`,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
36
46
|
}
|
|
37
47
|
const abs = path.resolve(outputDir, normalized);
|
|
38
48
|
await fs.ensureDir(path.dirname(abs));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-file.js","sourceRoot":"","sources":["../../../src/tools/write-file.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,eAAe,GAAG;IACtB,cAAc;IACd,eAAe;IACf,eAAe;IACf,aAAa;IACb,kBAAkB;IAClB,2BAA2B;IAC3B,uBAAuB;IACvB,mCAAmC;IACnC,8BAA8B;CAC/B,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,IAAmC;IACxF,OAAO,IAAI,CAAC;QACV,WAAW,EACT,yUAAyU;QAC3U,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;YAChE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;SAC3D,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;YACvC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAEhD,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC;gBAC1B,IAAI,eAAe,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;oBACzC,OAAO;wBACL,KAAK,EAAE,oBAAoB,UAAU,kGAAkG;qBACxI,CAAC;gBACJ,CAAC;gBACD,IAAI,UAAU,CAAC,UAAU,CAAC,oBA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EAAE,EAAE;YACvC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAEhD,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC;gBAC1B,IAAI,eAAe,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;oBACzC,OAAO;wBACL,KAAK,EAAE,oBAAoB,UAAU,kGAAkG;qBACxI,CAAC;gBACJ,CAAC;gBACD,IAAI,UAAU,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC;oBAChD,OAAO;wBACL,KAAK,EAAE,iGAAiG;qBACzG,CAAC;gBACJ,CAAC;gBACD,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;oBACtC,OAAO;wBACL,KAAK,EAAE,yEAAyE;qBACjF,CAAC;gBACJ,CAAC;gBACD,IAAI,iDAAiD,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;oBACvE,OAAO;wBACL,KAAK,EAAE,iGAAiG;qBACzG,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAChD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACtC,MAAM,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC1C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAC7C,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export type ClientSpecNode = {
|
|
3
|
-
id
|
|
3
|
+
id?: string;
|
|
4
4
|
type: 'describe' | 'it';
|
|
5
5
|
title: string;
|
|
6
6
|
children?: ClientSpecNode[];
|
|
7
7
|
};
|
|
8
8
|
declare const gherkinStepSchema: z.ZodObject<{
|
|
9
|
-
id: z.ZodString
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
10
|
keyword: z.ZodEnum<{
|
|
11
11
|
Given: "Given";
|
|
12
12
|
When: "When";
|
|
@@ -18,10 +18,10 @@ declare const gherkinStepSchema: z.ZodObject<{
|
|
|
18
18
|
docString: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
declare const gherkinExampleSchema: z.ZodObject<{
|
|
21
|
-
id: z.ZodString
|
|
21
|
+
id: z.ZodOptional<z.ZodString>;
|
|
22
22
|
name: z.ZodString;
|
|
23
23
|
steps: z.ZodArray<z.ZodObject<{
|
|
24
|
-
id: z.ZodString
|
|
24
|
+
id: z.ZodOptional<z.ZodString>;
|
|
25
25
|
keyword: z.ZodEnum<{
|
|
26
26
|
Given: "Given";
|
|
27
27
|
When: "When";
|
|
@@ -34,13 +34,13 @@ declare const gherkinExampleSchema: z.ZodObject<{
|
|
|
34
34
|
}, z.core.$strip>>;
|
|
35
35
|
}, z.core.$strip>;
|
|
36
36
|
declare const gherkinRuleSchema: z.ZodObject<{
|
|
37
|
-
id: z.ZodString
|
|
37
|
+
id: z.ZodOptional<z.ZodString>;
|
|
38
38
|
name: z.ZodString;
|
|
39
39
|
examples: z.ZodArray<z.ZodObject<{
|
|
40
|
-
id: z.ZodString
|
|
40
|
+
id: z.ZodOptional<z.ZodString>;
|
|
41
41
|
name: z.ZodString;
|
|
42
42
|
steps: z.ZodArray<z.ZodObject<{
|
|
43
|
-
id: z.ZodString
|
|
43
|
+
id: z.ZodOptional<z.ZodString>;
|
|
44
44
|
keyword: z.ZodEnum<{
|
|
45
45
|
Given: "Given";
|
|
46
46
|
When: "When";
|
|
@@ -57,13 +57,13 @@ declare const gherkinSpecSchema: z.ZodObject<{
|
|
|
57
57
|
type: z.ZodLiteral<"gherkin">;
|
|
58
58
|
feature: z.ZodString;
|
|
59
59
|
rules: z.ZodArray<z.ZodObject<{
|
|
60
|
-
id: z.ZodString
|
|
60
|
+
id: z.ZodOptional<z.ZodString>;
|
|
61
61
|
name: z.ZodString;
|
|
62
62
|
examples: z.ZodArray<z.ZodObject<{
|
|
63
|
-
id: z.ZodString
|
|
63
|
+
id: z.ZodOptional<z.ZodString>;
|
|
64
64
|
name: z.ZodString;
|
|
65
65
|
steps: z.ZodArray<z.ZodObject<{
|
|
66
|
-
id: z.ZodString
|
|
66
|
+
id: z.ZodOptional<z.ZodString>;
|
|
67
67
|
keyword: z.ZodEnum<{
|
|
68
68
|
Given: "Given";
|
|
69
69
|
When: "When";
|
|
@@ -109,13 +109,13 @@ declare const sliceSchema: z.ZodObject<{
|
|
|
109
109
|
type: z.ZodLiteral<"gherkin">;
|
|
110
110
|
feature: z.ZodString;
|
|
111
111
|
rules: z.ZodArray<z.ZodObject<{
|
|
112
|
-
id: z.ZodString
|
|
112
|
+
id: z.ZodOptional<z.ZodString>;
|
|
113
113
|
name: z.ZodString;
|
|
114
114
|
examples: z.ZodArray<z.ZodObject<{
|
|
115
|
-
id: z.ZodString
|
|
115
|
+
id: z.ZodOptional<z.ZodString>;
|
|
116
116
|
name: z.ZodString;
|
|
117
117
|
steps: z.ZodArray<z.ZodObject<{
|
|
118
|
-
id: z.ZodString
|
|
118
|
+
id: z.ZodOptional<z.ZodString>;
|
|
119
119
|
keyword: z.ZodEnum<{
|
|
120
120
|
Given: "Given";
|
|
121
121
|
When: "When";
|
|
@@ -185,13 +185,13 @@ declare const narrativeSchema: z.ZodObject<{
|
|
|
185
185
|
type: z.ZodLiteral<"gherkin">;
|
|
186
186
|
feature: z.ZodString;
|
|
187
187
|
rules: z.ZodArray<z.ZodObject<{
|
|
188
|
-
id: z.ZodString
|
|
188
|
+
id: z.ZodOptional<z.ZodString>;
|
|
189
189
|
name: z.ZodString;
|
|
190
190
|
examples: z.ZodArray<z.ZodObject<{
|
|
191
|
-
id: z.ZodString
|
|
191
|
+
id: z.ZodOptional<z.ZodString>;
|
|
192
192
|
name: z.ZodString;
|
|
193
193
|
steps: z.ZodArray<z.ZodObject<{
|
|
194
|
-
id: z.ZodString
|
|
194
|
+
id: z.ZodOptional<z.ZodString>;
|
|
195
195
|
keyword: z.ZodEnum<{
|
|
196
196
|
Given: "Given";
|
|
197
197
|
When: "When";
|
|
@@ -264,13 +264,13 @@ export declare const modelSchema: z.ZodObject<{
|
|
|
264
264
|
type: z.ZodLiteral<"gherkin">;
|
|
265
265
|
feature: z.ZodString;
|
|
266
266
|
rules: z.ZodArray<z.ZodObject<{
|
|
267
|
-
id: z.ZodString
|
|
267
|
+
id: z.ZodOptional<z.ZodString>;
|
|
268
268
|
name: z.ZodString;
|
|
269
269
|
examples: z.ZodArray<z.ZodObject<{
|
|
270
|
-
id: z.ZodString
|
|
270
|
+
id: z.ZodOptional<z.ZodString>;
|
|
271
271
|
name: z.ZodString;
|
|
272
272
|
steps: z.ZodArray<z.ZodObject<{
|
|
273
|
-
id: z.ZodString
|
|
273
|
+
id: z.ZodOptional<z.ZodString>;
|
|
274
274
|
keyword: z.ZodEnum<{
|
|
275
275
|
Given: "Given";
|
|
276
276
|
When: "When";
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,CAAC,EAAE,MAAM,C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KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/src/types.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
const clientSpecNodeSchema = z.object({
|
|
3
|
-
id: z.string(),
|
|
3
|
+
id: z.string().optional(),
|
|
4
4
|
type: z.enum(['describe', 'it']),
|
|
5
5
|
title: z.string(),
|
|
6
6
|
children: z.lazy(() => z.array(clientSpecNodeSchema)).optional(),
|
|
7
7
|
});
|
|
8
8
|
const gherkinStepSchema = z.object({
|
|
9
|
-
id: z.string(),
|
|
9
|
+
id: z.string().optional(),
|
|
10
10
|
keyword: z.enum(['Given', 'When', 'Then', 'And', 'But']),
|
|
11
11
|
text: z.string(),
|
|
12
12
|
docString: z.union([z.record(z.string(), z.unknown()), z.array(z.unknown())]).optional(),
|
|
13
13
|
});
|
|
14
14
|
const gherkinExampleSchema = z.object({
|
|
15
|
-
id: z.string(),
|
|
15
|
+
id: z.string().optional(),
|
|
16
16
|
name: z.string(),
|
|
17
17
|
steps: z.array(gherkinStepSchema),
|
|
18
18
|
});
|
|
19
19
|
const gherkinRuleSchema = z.object({
|
|
20
|
-
id: z.string(),
|
|
20
|
+
id: z.string().optional(),
|
|
21
21
|
name: z.string(),
|
|
22
22
|
examples: z.array(gherkinExampleSchema),
|
|
23
23
|
});
|