Skip to content

feat: Add mvp-builder AgentKit#78

Open
darshan03s wants to merge 14 commits intoLamatic:mainfrom
darshan03s:feat/mvp-builder
Open

feat: Add mvp-builder AgentKit#78
darshan03s wants to merge 14 commits intoLamatic:mainfrom
darshan03s:feat/mvp-builder

Conversation

@darshan03s
Copy link
Copy Markdown

@darshan03s darshan03s commented Mar 21, 2026

What This Kit Does

Converts a single product idea into a structured MVP plan including app type, features, database schema, API routes, project structure, tech stack, and summary using a multi-step Lamatic flow.

Providers & Prerequisites

  • Lamatic (for running the flow)
  • Node.js 18+
  • pnpm

How to Run Locally

  1. cd kits/agentic/mvp-builder
  2. pnpm install
  3. cp .env.example .env and fill in values
  4. pnpm dev

Live Preview

https://mvp-builder-sigma.vercel.app/

Lamatic Flow

Flow ID: AGENTIC_GENERATE_CONTENT

  • Kit runs locally with npm run dev
  • .env.example has no secrets, only placeholders
  • README.md documents setup and usage
  • Folder structure follows kits/<category>/<kit-name>/
  • config.json is present and valid
  • All flows exported in flows/ folder
  • Vercel deployment works
  • Live preview URL works end-to-end
  • Files added (concise list):

    • CI / workflows: .github/workflows/lamatic-update.yml
    • Kit metadata & config: kits/agentic/mvp-builder/config.json, package.json, pnpm-workspace.yaml, tsconfig.json, next.config.ts
    • Env / ignore / docs: .env.example, .gitignore, README.md (kit), README.md (root table row)
    • Flows (MVP builder flow and per-flow metadata/inputs): kits/agentic/mvp-builder/flows/mvp-builder/config.json, inputs.json, meta.json, flows/mvp-builder/README.md
    • Lamatic flows exports: lamatic/flows/2-APIBasics.ts, ApprehensiveOyster.ts, BrokenHoney-5230.ts, New.ts, ScruffyAbility.ts, lamatic/project.json
    • App code / UI: app/globals.css, app/layout.tsx, app/page.tsx, app/plan/page.tsx, app/plan/plan-client.tsx
    • Components & UI primitives: components.json, components/content.tsx, components/loading.tsx, components/ui/button.tsx
    • Kit runtime & orchestration: actions/orchestrate.ts, orchestrate.js, lib/lamatic-client.ts, lib/utils.ts, data.ts
    • Types & tooling: types/index.ts, eslint.config.mjs, postcss.config.mjs
  • Flow node types introduced (from kits/agentic/mvp-builder/flows/mvp-builder/config.json):

    • triggerNode (GraphQL/API trigger) — accepts { idea: string } from caller
    • dynamicNode (InstructorLLMNode / Generate JSON) — multiple sequential Instructor-style LLM nodes producing JSON-constrained outputs
    • responseNode (GraphQL/Response) — returns content-type: application/json mapped from the final result
  • High-level flow behavior & sequence:

    • Linear, chained LLM workflow that accumulates and incrementally builds a single cumulative "result" object.
    • Ordered steps (each a schema-enforced InstructorLLM node) that progressively populate result:
      1. Determine app type (web_app | mobile_app | extension | api_service)
      2. Generate core features (array of feature objects)
      3. Generate database schema (database.tables with fields)
      4. Generate API routes (api.routes with method/path)
      5. Generate project structure (frontend/backend file lists)
      6. Generate tech stack recommendations (frontend, backend, database, auth, deployment)
      7. Produce final textual summary
    • Each node enforces a JSON schema for its output and receives prior result in messages so nodes update only their scoped property and merge into the cumulative result.
    • Default sequential edges connect trigger → each dynamic node → response; final response node maps the completed result to the API response payload.
  • Additional notes:

    • Kit includes server-side orchestration (server action + Lamatic client), Next.js UI to submit an idea and display the plan, and CI/deploy pieces (Lamatic flows sync GitHub Action and Vercel demo).
    • Flow files (config + inputs) use private model inputs for InstructorLLM nodes (generativeModelName set as private).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 21, 2026

Walkthrough

Adds an MVP Builder kit and multiple Lamatic flow definitions, a Next.js frontend with server-side orchestration, Lamatic client integration, supporting configs (TS/ESLint/PostCSS/PNPM), UI components, and a GitHub Actions workflow to detect and sync Lamatic flow changes.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
\.github/workflows/lamatic-update.yml
New workflow triggers on pushes to main when **/lamatic/flows/** change; runs a job that invokes Lamatic/sync-flows-to-lamatic@v1 with credentials from secrets; skips runs when commit message contains [LAMATIC-COMMIT].
MVP Builder Kit — Project & Packaging
kits/agentic/mvp-builder/.env.example, kits/agentic/mvp-builder/.gitignore, kits/agentic/mvp-builder/package.json, kits/agentic/mvp-builder/pnpm-workspace.yaml, kits/agentic/mvp-builder/config.json
New kit scaffolding: env examples, gitignore, npm manifest, pnpm workspace settings, and kit metadata.
MVP Builder Kit — Tooling & Config
kits/agentic/mvp-builder/tsconfig.json, kits/agentic/mvp-builder/eslint.config.mjs, kits/agentic/mvp-builder/postcss.config.mjs, kits/agentic/mvp-builder/next.config.ts, kits/agentic/mvp-builder/components.json
Added TypeScript, ESLint, PostCSS, Next.js and shadcn UI configuration files.
MVP Builder Kit — App Layout & Styling
kits/agentic/mvp-builder/app/layout.tsx, kits/agentic/mvp-builder/app/globals.css
Root layout and global CSS with Tailwind theme tokens, dark variant, and font setup.
MVP Builder Kit — Pages & Client Components
kits/agentic/mvp-builder/app/page.tsx, kits/agentic/mvp-builder/app/plan/page.tsx, kits/agentic/mvp-builder/app/plan/plan-client.tsx
Index and plan pages; client component reads idea query, calls server action, handles loading and renders plan.
MVP Builder Kit — UI Components
kits/agentic/mvp-builder/components/content.tsx, kits/agentic/mvp-builder/components/loading.tsx, kits/agentic/mvp-builder/components/ui/button.tsx
New presentational components: plan renderer, loading view, and variant-driven Button primitive.
MVP Builder Kit — Types, Data & Utilities
kits/agentic/mvp-builder/types/index.ts, kits/agentic/mvp-builder/data.ts, kits/agentic/mvp-builder/lib/utils.ts
Type definitions for Plan model, a dummyPlan fixture, and cn utility combining clsx + twMerge.
MVP Builder Kit — Lamatic Integration & Orchestration
kits/agentic/mvp-builder/orchestrate.js, kits/agentic/mvp-builder/lib/lamatic-client.ts, kits/agentic/mvp-builder/actions/orchestrate.ts
Config exporting env-sourced Lamatic credentials and flow ID, singleton lamaticClient constructed from config, and server action generatePlan(idea) that executes the configured Lamatic flow.
MVP Builder Kit — Flow Definition Files
kits/agentic/mvp-builder/flows/mvp-builder/config.json, kits/agentic/mvp-builder/flows/mvp-builder/inputs.json, kits/agentic/mvp-builder/flows/mvp-builder/meta.json, kits/agentic/mvp-builder/flows/mvp-builder/README.md
New Lamatic flow for MVP Builder: trigger schema, seven sequential dynamic LLM nodes producing type/features/database/api/structure/tech_stack/summary, input model declarations, metadata, and README.
MVP Builder Kit — Documentation
kits/agentic/mvp-builder/README.md, README.md
Kit README added describing flow, usage, and example output; main README updated to list the new kit entry.
Lamatic Flow Modules
lamatic/flows/2-APIBasics.ts, lamatic/flows/ApprehensiveOyster.ts, lamatic/flows/BrokenHoney-5230.ts, lamatic/flows/New.ts, lamatic/flows/ScruffyAbility.ts
Five new flow modules exporting getNodesAndEdges() and getFlowConfig(); flows include API basics, chatbot RAG, example flows, and a document parsing/indexing flow.
Lamatic Project Manifest
lamatic/project.json
Added project metadata JSON with id, name, creator, timestamp, and live domain.

Suggested reviewers

  • amanintech
  • d-pamneja
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: Add mvp-builder AgentKit' clearly and concisely describes the main change: introducing a new MVP builder AgentKit with proper semantic versioning prefix.
Description check ✅ Passed The PR description provides clear purpose, prerequisites, local setup instructions, live preview URL, and addresses most checklist items with completion marks, though it lacks explicit callout of all file structure validations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 20

🧹 Nitpick comments (12)
kits/agentic/mvp-builder/next.config.ts (1)

1-7: Consider adding build configurations for consistency with sibling kits.

The config is empty, while the sibling deep-search kit (see kits/agentic/deep-search/next.config.mjs) includes eslint.ignoreDuringBuilds, typescript.ignoreBuildErrors, and images.unoptimized options. If the mvp-builder kit should follow similar patterns, consider adding these options to avoid build failures on linting or type errors during deployment.

💡 Suggested configuration for consistency
 import type { NextConfig } from "next";
 
 const nextConfig: NextConfig = {
-  /* config options here */
+  eslint: {
+    ignoreDuringBuilds: true,
+  },
+  typescript: {
+    ignoreBuildErrors: true,
+  },
+  images: {
+    unoptimized: true,
+  },
 };
 
 export default nextConfig;
lamatic/flows/New.ts (1)

165-177: Async functions returning synchronous data.

getNodesAndEdges() and getFlowConfig() are marked async but return static in-memory data synchronously. This is a minor inconsistency, though it may be intentional for API consistency if other flow modules perform async operations.

lamatic/project.json (1)

1-7: Consider using a generic project name for the kit.

The project name "Darshans Project" and the live_domain URL contain personal/organization-specific identifiers. For a reusable kit intended for distribution, consider using more generic naming (e.g., "MVP Builder Project") or documenting that users should update these values.

kits/agentic/mvp-builder/lib/lamatic-client.ts (1)

4-8: Add environment variable validation for better error messages.

Using non-null assertions (!) will cause cryptic runtime errors if environment variables are missing. The kits/agentic/deep-search/lib/lamatic-client.ts implements a better pattern with explicit validation.

♻️ Proposed refactor with validation
 import { Lamatic } from 'lamatic';
 import { config } from '@/orchestrate';

+if (!config.api.endpoint || !config.api.projectId || !config.api.apiKey) {
+  throw new Error(
+    'Missing Lamatic API credentials. Please set LAMATIC_API_URL, LAMATIC_PROJECT_ID, and LAMATIC_API_KEY in your .env.local file.'
+  );
+}
+
 export const lamaticClient = new Lamatic({
-  endpoint: config.api.endpoint!,
-  projectId: config.api.projectId!,
-  apiKey: config.api.apiKey!
+  endpoint: config.api.endpoint,
+  projectId: config.api.projectId,
+  apiKey: config.api.apiKey
 });
kits/agentic/mvp-builder/flows/mvp-builder/meta.json (1)

1-9: Consider populating metadata fields for better discoverability.

The description, tags, testInput, and documentation URLs are empty. Filling these in would improve the flow's discoverability and provide useful context for users integrating this kit.

kits/agentic/mvp-builder/actions/orchestrate.ts (1)

7-16: Consider validating empty idea input.

The function validates workflowId but not the idea parameter. An empty or whitespace-only idea would still be passed to the flow, potentially causing unexpected behavior or wasted API calls.

Proposed validation
 export async function generatePlan(idea: string): Promise<LamaticResponse> {
+  if (!idea?.trim()) {
+    throw new Error('Idea cannot be empty');
+  }
+
   const flow = config.flows.mvp;
kits/agentic/mvp-builder/app/plan/plan-client.tsx (1)

24-24: Remove debug console.log statement.

Proposed fix
     async function getPlan() {
-      console.log('Getting plan');
       const plan = await generatePlan(idea);
kits/agentic/mvp-builder/config.json (1)

20-22: Consider populating optional metadata fields.

The deployUrl, documentationUrl, and imageUrl fields are empty. While not blocking, adding these would improve the kit's discoverability and user experience. The tags array (line 4) could also benefit from relevant keywords like ["mvp", "planning", "ai", "generator"].

kits/agentic/mvp-builder/app/layout.tsx (2)

18-21: Title and description are identical.

Both title and description are set to "Idea to MVP". The description should provide more context for SEO purposes and accessibility (e.g., screen readers, social media previews).

📝 Suggested improvement
 export const metadata: Metadata = {
   title: 'Idea to MVP',
-  description: 'Idea to MVP'
+  description: 'Transform your product idea into a structured MVP plan with features, database schema, API routes, and tech stack recommendations.'
 };

6-16: Three fonts are loaded; verify all are used.

Three Google fonts are initialized (Inter, Geist, Geist_Mono), each adding to the page's load time. Ensure all three are actually used in the application. If not, consider removing unused fonts to improve performance.

kits/agentic/mvp-builder/components/content.tsx (1)

152-154: Consider using a unique key instead of array index for routes.

Using the array index (i) as the React key for RouteRow is acceptable if routes are static, but if routes could be reordered or filtered dynamically, consider using a composite key like ${r.method}-${r.path} for more stable rendering.

kits/agentic/mvp-builder/flows/mvp-builder/inputs.json (1)

2-169: Consider reducing repeated model-input blocks to avoid config drift.

All seven node sections duplicate the same generativeModelName definition. If your flow tooling supports templates/shared defaults, centralizing this will reduce maintenance errors.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e4fbbdbf-33bc-4b10-a272-35cc1035f069

📥 Commits

Reviewing files that changed from the base of the PR and between e1ceb47 and b4a085a.

⛔ Files ignored due to path filters (7)
  • kits/agentic/mvp-builder/app/favicon.ico is excluded by !**/*.ico
  • kits/agentic/mvp-builder/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • kits/agentic/mvp-builder/public/file.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/globe.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/next.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/vercel.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/window.svg is excluded by !**/*.svg
📒 Files selected for processing (36)
  • .github/workflows/lamatic-update.yml
  • kits/agentic/mvp-builder/.env.example
  • kits/agentic/mvp-builder/.gitignore
  • kits/agentic/mvp-builder/README.md
  • kits/agentic/mvp-builder/actions/orchestrate.ts
  • kits/agentic/mvp-builder/app/globals.css
  • kits/agentic/mvp-builder/app/layout.tsx
  • kits/agentic/mvp-builder/app/page.tsx
  • kits/agentic/mvp-builder/app/plan/page.tsx
  • kits/agentic/mvp-builder/app/plan/plan-client.tsx
  • kits/agentic/mvp-builder/components.json
  • kits/agentic/mvp-builder/components/content.tsx
  • kits/agentic/mvp-builder/components/loading.tsx
  • kits/agentic/mvp-builder/components/ui/button.tsx
  • kits/agentic/mvp-builder/config.json
  • kits/agentic/mvp-builder/data.ts
  • kits/agentic/mvp-builder/eslint.config.mjs
  • kits/agentic/mvp-builder/flows/mvp-builder/README.md
  • kits/agentic/mvp-builder/flows/mvp-builder/config.json
  • kits/agentic/mvp-builder/flows/mvp-builder/inputs.json
  • kits/agentic/mvp-builder/flows/mvp-builder/meta.json
  • kits/agentic/mvp-builder/lib/lamatic-client.ts
  • kits/agentic/mvp-builder/lib/utils.ts
  • kits/agentic/mvp-builder/next.config.ts
  • kits/agentic/mvp-builder/orchestrate.js
  • kits/agentic/mvp-builder/package.json
  • kits/agentic/mvp-builder/pnpm-workspace.yaml
  • kits/agentic/mvp-builder/postcss.config.mjs
  • kits/agentic/mvp-builder/tsconfig.json
  • kits/agentic/mvp-builder/types/index.ts
  • lamatic/flows/2-APIBasics.ts
  • lamatic/flows/ApprehensiveOyster.ts
  • lamatic/flows/BrokenHoney-5230.ts
  • lamatic/flows/New.ts
  • lamatic/flows/ScruffyAbility.ts
  • lamatic/project.json

Comment on lines +1 to +4
AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
LAMATIC_API_URL = "YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
LAMATIC_API_KEY = "YOUR_API_KEY" No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix .env formatting: remove spaces around = and add trailing newline.

Spaces around = can cause parsing issues with some dotenv implementations. Standard .env format uses KEY=value without spaces.

🔧 Proposed fix
-AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
-LAMATIC_API_URL = "YOUR_API_ENDPOINT"
-LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
-LAMATIC_API_KEY = "YOUR_API_KEY"
+AGENTIC_GENERATE_CONTENT="YOUR_FLOW_ID"
+LAMATIC_API_KEY="YOUR_API_KEY"
+LAMATIC_API_URL="YOUR_API_ENDPOINT"
+LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
LAMATIC_API_URL = "YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
LAMATIC_API_KEY = "YOUR_API_KEY"
AGENTIC_GENERATE_CONTENT="YOUR_FLOW_ID"
LAMATIC_API_KEY="YOUR_API_KEY"
LAMATIC_API_URL="YOUR_API_ENDPOINT"
LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 1-1: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 2-2: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 3-3: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 4-4: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)


[warning] 4-4: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 4-4: [UnorderedKey] The LAMATIC_API_KEY key should go before the LAMATIC_API_URL key

(UnorderedKey)


import { lamaticClient } from '@/lib/lamatic-client';
import { config } from '@/orchestrate';
import { LamaticResponse } from 'lamatic/dist/types';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if LamaticResponse is exported from the main package entry
fd -t f 'package.json' --exec cat {} \; | jq -r '.main, .types, .exports' 2>/dev/null || echo "package.json not found in repo"

# Search for LamaticResponse usage patterns in the codebase
rg -n "from ['\"]lamatic" --type ts

Repository: Lamatic/AgentKit

Length of output: 1026


🏁 Script executed:

# Search for LamaticResponse definitions and re-exports
rg -n "LamaticResponse" --type ts --type tsx

# Check if there are any type stub files or index files that might re-export it
fd -t f "index\.(ts|d\.ts|js)" --path "*lamatic*"

Repository: Lamatic/AgentKit

Length of output: 321


🏁 Script executed:

# Search for LamaticResponse definitions and re-exports
rg -n "LamaticResponse" --type ts

# Look for type definition files
fd -t f "index" | grep -E "\.(ts|d\.ts)$"

# Check if LamaticResponse might be exported from public api
rg -n "export.*LamaticResponse" --type ts

Repository: Lamatic/AgentKit

Length of output: 457


🏁 Script executed:

# Read the types/index.ts file
cat -n kits/agentic/mvp-builder/types/index.ts

# Search for other LamaticResponse-like response type imports
rg -n "Response.*from" kits/agentic/mvp-builder --type ts

# Check if there are other server action files that might handle responses
fd -t f "action" kits/agentic/mvp-builder

Repository: Lamatic/AgentKit

Length of output: 1027


🏁 Script executed:

# Read the orchestrate.ts file
cat -n kits/agentic/mvp-builder/actions/orchestrate.ts

# Also check if there are any other similar response patterns in related files
rg -n "Promise<" kits/agentic/mvp-builder --type ts -A 2 -B 2

Repository: Lamatic/AgentKit

Length of output: 1186


🏁 Script executed:

# Read the lamatic-client file to see how lamaticClient is typed
cat -n kits/agentic/mvp-builder/lib/lamatic-client.ts

# Search for any .d.ts files that might provide type definitions
fd -t f "\\.d\\.ts$"

# Check if there are any type imports from lamatic at all
rg -n "from.*lamatic.*types" --type ts

Repository: Lamatic/AgentKit

Length of output: 441


🏁 Script executed:

# Search for any 'lamatic/types' imports or references
rg -n "lamatic/types" --type ts

# Check if there's a types export mentioned anywhere in config files
rg -n "lamatic" tsconfig.json package.json 2>/dev/null || true

# Look at how the Lamatic class and its methods are used to understand the return type
rg -n "executeFlow" --type ts -A 3 -B 1

Repository: Lamatic/AgentKit

Length of output: 7022


Avoid importing from internal dist paths.

Importing from 'lamatic/dist/types' is fragile as internal paths may change between package versions without notice. This is the only file in the codebase that imports from lamatic/dist/types; all other files import from the public 'lamatic' API and work with the response object without explicit type imports. Either check if LamaticResponse is publicly exported from the 'lamatic' package, or define a local response type based on the actual structure being used.

const [input, setInput] = useState('');
const router = useRouter();

function handleSubmit(e: React.SubmitEvent<HTMLFormElement>) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

What is the correct TypeScript type for form onSubmit event handler in React?

💡 Result:

The correct TypeScript type for a React form onSubmit event handler is (event: React.FormEvent<HTMLFormElement>) => void. This is the standard type used across authoritative sources including React TypeScript Cheatsheet, Kent C. Dodds' Epic React, and numerous Stack Overflow answers with high consensus. In React 19+, FormEvent is deprecated in favor of SubmitEvent types (e.g., SubmitEventHandler<HTMLFormElement> or SyntheticEvent<HTMLFormElement, SubmitEvent> for submitter access), but React.FormEvent<HTMLFormElement> remains backward compatible and widely used without deprecation warnings in most setups as of 2026. Example usage: const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => { event.preventDefault; // form logic }; <form onSubmit={handleSubmit}> // inputs </form>

Citations:


🏁 Script executed:

# Check the actual file content
cat -n kits/agentic/mvp-builder/app/page.tsx | head -30

Repository: Lamatic/AgentKit

Length of output: 1461


🏁 Script executed:

# Find package.json to check React version
fd -t f package.json | head -5 | xargs grep -l '"react"' | head -1 | xargs cat | grep -A2 '"react"'

Repository: Lamatic/AgentKit

Length of output: 144


Invalid type: React.SubmitEvent does not exist.

React.SubmitEvent is not a valid React type. Use React.FormEvent<HTMLFormElement> for form submission handlers.

🐛 Proposed fix
-  function handleSubmit(e: React.SubmitEvent<HTMLFormElement>) {
+  function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function handleSubmit(e: React.SubmitEvent<HTMLFormElement>) {
function handleSubmit(e: React.FormEvent<HTMLFormElement>) {


const PlanClient = () => {
const searchParams = useSearchParams();
const idea = searchParams.get('idea')!;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Missing null check for idea query parameter.

The non-null assertion searchParams.get('idea')! will return null if the parameter is missing, which gets passed to generatePlan(null) and subsequently to the Lamatic flow. This could cause confusing errors or unexpected behavior.

Proposed fix with early return or redirect
 const PlanClient = () => {
   const searchParams = useSearchParams();
-  const idea = searchParams.get('idea')!;
+  const idea = searchParams.get('idea');
   const [isLoading, setIsLoading] = useState(true);
   const [plan, setPlan] = useState<Plan | null>(null);
+  const [error, setError] = useState<string | null>(null);
+
+  if (!idea) {
+    return <div>No idea provided. Please go back and enter your idea.</div>;
+  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const idea = searchParams.get('idea')!;
const PlanClient = () => {
const searchParams = useSearchParams();
const idea = searchParams.get('idea');
const [isLoading, setIsLoading] = useState(true);
const [plan, setPlan] = useState<Plan | null>(null);
const [error, setError] = useState<string | null>(null);
if (!idea) {
return <div>No idea provided. Please go back and enter your idea.</div>;
}

Comment on lines +23 to +35
async function getPlan() {
console.log('Getting plan');
const plan = await generatePlan(idea);
setIsLoading(false);

if (!plan.result) {
throw new Error('No result');
}

setPlan(plan.result.result);
}

getPlan();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Unhandled async error can cause unhandled promise rejection.

When throw new Error('No result') is executed inside the async getPlan function, it won't be caught by React and results in an unhandled promise rejection. Consider using error state to handle failures gracefully.

Proposed error handling pattern
+  const [error, setError] = useState<string | null>(null);
+
   useEffect(() => {
     if (hasFetched.current) return;
     hasFetched.current = true;

     async function getPlan() {
-      console.log('Getting plan');
-      const plan = await generatePlan(idea);
-      setIsLoading(false);
-
-      if (!plan.result) {
-        throw new Error('No result');
+      try {
+        const plan = await generatePlan(idea);
+        if (!plan.result) {
+          setError('No result from plan generation');
+          return;
+        }
+        setPlan(plan.result.result);
+      } catch (err) {
+        setError(err instanceof Error ? err.message : 'An error occurred');
+      } finally {
+        setIsLoading(false);
       }
-
-      setPlan(plan.result.result);
     }

     getPlan();
   }, [idea]);

Comment on lines +114 to +116
Reference:

---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Incomplete "Reference:" line.

Line 116 contains "Reference:" with no content following it. Either add the intended reference or remove this line.

Comment on lines +209 to +211
```
http://localhost:3000
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add language specifier to fenced code block.

The code block should specify a language for proper syntax highlighting and linting compliance.

📝 Proposed fix
-```
+```txt
 http://localhost:3000
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>

[warning] 209-209: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<!-- fingerprinting:phantom:poseidon:ocelot -->

<!-- This is an auto-generated comment by CodeRabbit -->

"memories": "[]",
"messages": "{{triggerNode_1.output.chatHistory}}",
"nodeName": "RAG",
"vectorDB": "VectorDB3507",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Hardcoded VectorDB reference.

The vectorDB: "VectorDB3507" is hardcoded. If this database name differs across environments, the RAG queries will fail. Consider parameterizing this or documenting the expected setup.

Comment on lines +83 to +93
"generativeModelName": [
{
"type": "generator/text",
"params": {},
"configName": "configA",
"model_name": "gpt-4o-mini",
"credentialId": "58e84b53-2d11-48b5-bc8d-928d1f241c59",
"provider_name": "openai",
"credential_name": "API"
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if this credential ID pattern is used consistently across flow files
rg -n "credentialId" --type ts lamatic/flows/

Repository: Lamatic/AgentKit

Length of output: 890


Hardcoded credential IDs appear across multiple flow files and may cause environment coupling.

The credentialId "58e84b53-2d11-48b5-bc8d-928d1f241c59" is hardcoded in this flow configuration and also appears in ScruffyAbility.ts, ApprehensiveOyster.ts, and 2-APIBasics.ts. If these IDs are environment-specific or per-deployment credentials, this hardcoding will cause failures when deployed to staging, production, or other environments. Credential references should be parameterized or resolved at runtime rather than baked into the flow definitions.

Comment on lines +148 to +150
"credentialId": "58e84b53-2d11-48b5-bc8d-928d1f241c59",
"provider_name": "openai",
"credential_name": "API"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Hardcoded credential IDs may pose a security risk.

The flow config contains hardcoded credentialId values (repeated at lines 148-150, 279-282, 325-328). If these reference real credentials in a Lamatic environment, committing them to source control could expose sensitive information or create tight coupling to a specific deployment.

Consider parameterizing these values or confirming they are non-sensitive identifiers that are safe to commit.

@github-actions
Copy link
Copy Markdown

Hi @darshan03s! 👋

CodeRabbit has posted actionable review comments on this PR. Please review and address them before requesting a maintainer review.

Once you've addressed the CodeRabbit feedback, please push your changes and we'll take another look. Thank you! 🙏

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a live demo link to this file? would allow us to view the functionality better, and allow users to see the kit before forking it. otherwise, LGTM. Thanks!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah the link works, just if you could add it to the README.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed, kindly if you could remove this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files are not needed, if you could remove them as well, only contribution needed is the kit/bundle/template. Flows should be inside the asset folder only.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

I’ve synced my branch with the latest upstream changes and updated the PR so it now only includes my kit contribution. I also added the link to README.md

I noticed some workflow steps failed. Please let me know if anything else is needed from my side.

@d-pamneja
Copy link
Copy Markdown
Contributor

@darshan03s The kit LGTM, if you could remove the files not needed (commented above) we could merge this

@coderabbitai coderabbitai bot requested a review from amanintech March 31, 2026 13:44
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

♻️ Duplicate comments (16)
kits/agentic/mvp-builder/actions/orchestrate.ts (1)

5-5: ⚠️ Potential issue | 🟠 Major

Mission risk: avoid importing types from Lamatic internal dist paths.

Line 5 uses lamatic/dist/types, which is not a stable public API surface.

🔧 Safer direction
-import { LamaticResponse } from 'lamatic/dist/types';
+import type { LamaticResponse } from 'lamatic';

If LamaticResponse is not exported from lamatic, define a local response type in this kit and use that instead of internal paths.

Does the `lamatic` package publicly export `LamaticResponse` from its root entry? Is `lamatic/dist/types` documented as a supported import path?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/actions/orchestrate.ts` at line 5, Replace the
fragile import of LamaticResponse from "lamatic/dist/types" in orchestrate.ts:
check if LamaticResponse is exported from the public "lamatic" package and
switch the import to that; if it is not publicly exported, create a local type
definition or alias (e.g., a locally defined LamaticResponse interface/type)
matching the fields your code uses, update all references to LamaticResponse in
this file to use the local type, and remove the internal-path import to avoid
relying on lamatic's internal build output.
kits/agentic/mvp-builder/.env.example (1)

1-4: ⚠️ Potential issue | 🟡 Minor

Mission patch: normalize .env assignment formatting for tooling compatibility.

Lines 1–4 include spaces around = and the file should end with a trailing newline; this is already flagged by dotenv-linter.

🔧 Proposed fix
-AGENTIC_GENERATE_CONTENT = "YOUR_FLOW_ID"
-LAMATIC_API_URL = "YOUR_API_ENDPOINT"
-LAMATIC_PROJECT_ID = "YOUR_PROJECT_ID"
-LAMATIC_API_KEY = "YOUR_API_KEY"
+AGENTIC_GENERATE_CONTENT="YOUR_FLOW_ID"
+LAMATIC_API_URL="YOUR_API_ENDPOINT"
+LAMATIC_PROJECT_ID="YOUR_PROJECT_ID"
+LAMATIC_API_KEY="YOUR_API_KEY"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/.env.example` around lines 1 - 4, Normalize the .env
assignments by removing spaces around '=' for the variables
AGENTIC_GENERATE_CONTENT, LAMATIC_API_URL, LAMATIC_PROJECT_ID, and
LAMATIC_API_KEY so they follow standard dotenv syntax (e.g., KEY=VALUE), and
ensure the file ends with a single trailing newline; update those four lines
accordingly and save the file.
kits/agentic/mvp-builder/orchestrate.js (1)

10-14: ⚠️ Potential issue | 🟠 Major

Mission-critical hardening: fail fast if Lamatic API env vars are missing.

Lines 11–13 can remain undefined, which later causes unclear runtime failures in Lamatic client setup. Validate these at config construction time.

🛡️ Proposed fix
+const requireEnv = (name) => {
+  const value = process.env[name];
+  if (!value) throw new Error(`Missing required environment variable: ${name}`);
+  return value;
+};
+
 export const config = {
   flows: {
     mvp: {
       workflowId: process.env.AGENTIC_GENERATE_CONTENT,
       inputSchema: {
         idea: "string",
       },
     },
   },
   api: {
-    endpoint: process.env.LAMATIC_API_URL,
-    projectId: process.env.LAMATIC_PROJECT_ID,
-    apiKey: process.env.LAMATIC_API_KEY,
+    endpoint: requireEnv('LAMATIC_API_URL'),
+    projectId: requireEnv('LAMATIC_PROJECT_ID'),
+    apiKey: requireEnv('LAMATIC_API_KEY'),
   },
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/orchestrate.js` around lines 10 - 14, The api config
is built with possible undefined env vars (endpoint, projectId, apiKey); add a
fail-fast validation where the config is constructed (the object with keys
endpoint, projectId, apiKey) that checks process.env.LAMATIC_API_URL,
process.env.LAMATIC_PROJECT_ID and process.env.LAMATIC_API_KEY and throws or
exits immediately with a clear error message naming the missing variable(s) so
the Lamatic client setup never proceeds with undefined values.
kits/agentic/mvp-builder/app/page.tsx (1)

17-17: ⚠️ Potential issue | 🔴 Critical

Mission-critical: React.SubmitEvent is invalid and will break type-checking.

Line 17 should use React.FormEvent<HTMLFormElement> for onSubmit handlers.

🐛 Proposed fix
-  function handleSubmit(e: React.SubmitEvent<HTMLFormElement>) {
+  function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
Is `React.SubmitEvent<HTMLFormElement>` a valid React TypeScript type? What is the correct type for a form `onSubmit` event handler?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/app/page.tsx` at line 17, The handleSubmit function
currently types its event parameter as React.SubmitEvent<HTMLFormElement>, which
is invalid; change the parameter type to React.FormEvent<HTMLFormElement> (or
plain FormEvent<HTMLFormElement>) in the handleSubmit declaration and any
references where the onSubmit handler is typed, and ensure React is in scope if
you rely on the React namespace so the onSubmit handler signature matches
React's expected type.
kits/agentic/mvp-builder/components/content.tsx (1)

161-161: ⚠️ Potential issue | 🟡 Minor

Mission note: fix invalid Tailwind utility class.

Line 161 uses overscroll-hidden; this should be overflow-hidden.

🧩 Proposed fix
-          <div className="bg-white border border-zinc-100 rounded-xl overscroll-hidden">
+          <div className="bg-white border border-zinc-100 rounded-xl overflow-hidden">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/components/content.tsx` at line 161, The Tailwind
utility on the container div in the Content component is invalid: replace the
incorrect class "overscroll-hidden" with "overflow-hidden" in the JSX string on
the div with classes "bg-white border border-zinc-100 rounded-xl ..."; update
the className value in the Content component (the div that currently contains
"bg-white border border-zinc-100 rounded-xl overscroll-hidden") to use
"overflow-hidden" so Tailwind applies the intended behavior.
kits/agentic/mvp-builder/data.ts (1)

69-69: ⚠️ Potential issue | 🟡 Minor

Mission note: correct duplicated frontend path entry.

Line 69 has a duplicated segment (app/page.tsx/app/page.tsx), likely a copy error.

🛠️ Proposed fix
-      'app/page.tsx/app/page.tsx',
+      'app/page.tsx',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/data.ts` at line 69, Replace the duplicated frontend
path entry 'app/page.tsx/app/page.tsx' with the correct single path
'app/page.tsx' in the data list; locate the array or export that contains the
string 'app/page.tsx/app/page.tsx' and update that entry so the list contains
only 'app/page.tsx' (no repeated segment).
kits/agentic/mvp-builder/config.json (1)

13-13: ⚠️ Potential issue | 🟠 Major

Mission-critical: align the flow env key with runtime wiring.

Line 13 uses FLOW_MVP_BUILDER, but runtime code (kits/agentic/mvp-builder/orchestrate.js) and .env.example use AGENTIC_GENERATE_CONTENT. This creates a setup/runtime mismatch.

🎯 Proposed fix
-      "envKey": "FLOW_MVP_BUILDER"
+      "envKey": "AGENTIC_GENERATE_CONTENT"

As per coding guidelines, "Kit step IDs in config.json must align with flow folder names and corresponding environment variable keys".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/config.json` at line 13, The envKey in config.json
currently set to "FLOW_MVP_BUILDER" does not match the runtime wiring; update
the "envKey" value to "AGENTIC_GENERATE_CONTENT" so it aligns with the
orchestrate.js runtime and .env.example; ensure the change is made where the
"envKey" property is declared (replace FLOW_MVP_BUILDER with
AGENTIC_GENERATE_CONTENT) and run a quick local env check to confirm the step ID
and flow folder naming remain consistent with the kit.
kits/agentic/mvp-builder/app/plan/plan-client.tsx (2)

13-13: ⚠️ Potential issue | 🟠 Major

Mission-critical: guard missing idea before flow execution.

Line 13 forces non-null with !; if idea is absent, this propagates invalid input into generatePlan.

🛡️ Proposed fix
-  const idea = searchParams.get('idea')!;
+  const idea = searchParams.get('idea');
+  if (!idea) {
+    return <div className="p-4 text-sm text-red-600">No idea provided.</div>;
+  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/app/plan/plan-client.tsx` at line 13, The code
currently force-unwraps searchParams.get('idea') into const idea =
searchParams.get('idea')! which can pass undefined into generatePlan; update the
PlanClient flow to guard for a missing idea by checking searchParams.get('idea')
(or the idea variable) before calling generatePlan or starting any flow, and
handle the empty case (early return, user-facing error/notification, or disable
the trigger) so generatePlan is only invoked with a valid string; update any
places using the idea const (e.g., generatePlan, handleSubmit, or useEffect that
starts the flow) to rely on this presence check.

23-33: ⚠️ Potential issue | 🔴 Critical

Mission-critical: handle async failures and prevent null-plan render crash.

Line 29 throws inside async effect without local handling, and Line 41 dereferences plan!. On flow failure/missing result, this can cause unhandled rejection and runtime crash.

🧯 Proposed fix
+  const [error, setError] = useState<string | null>(null);

   useEffect(() => {
     if (hasFetched.current) return;
     hasFetched.current = true;

     async function getPlan() {
-      console.log('Getting plan');
-      const plan = await generatePlan(idea);
-      setIsLoading(false);
-
-      if (!plan.result) {
-        throw new Error('No result');
-      }
-
-      setPlan(plan.result.result);
+      try {
+        const response = await generatePlan(idea);
+        if (!response.result) {
+          setError('No result from plan generation');
+          return;
+        }
+        setPlan(response.result.result);
+      } catch (err) {
+        setError(err instanceof Error ? err.message : 'Failed to generate plan');
+      } finally {
+        setIsLoading(false);
+      }
     }

     getPlan();
   }, [idea]);

+  if (error) {
+    return <div className="p-4 text-sm text-red-600">{error}</div>;
+  }
+
   return (
@@
-        {isLoading ? <Loading /> : <Content plan={plan!} />}
+        {isLoading ? <Loading /> : plan ? <Content plan={plan} /> : <Loading />}

Also applies to: 41-41

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/app/plan/plan-client.tsx` around lines 23 - 33, The
getPlan async function currently throws on missing data and can produce
unhandled rejections and a null dereference where the component uses plan (refs:
getPlan, generatePlan, setIsLoading, setPlan, and the render access of plan).
Wrap the await generatePlan call in try/catch/finally: in catch log the error
and setPlan to a safe fallback (null or an empty object) instead of throwing,
and in finally ensure setIsLoading(false) always runs; then update the render
logic that currently uses plan! to defensively check plan (optional chaining,
conditional render, or a placeholder) before dereferencing to prevent runtime
crashes.
kits/agentic/mvp-builder/README.md (2)

209-211: ⚠️ Potential issue | 🟡 Minor

Mission hygiene: add a language to the fenced block.

Line 209 should specify a fence language (e.g. txt) to satisfy markdown linting.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/README.md` around lines 209 - 211, The fenced code
block showing "http://localhost:3000" in README.md lacks a fence language;
update that block to include a language tag (e.g., change the opening triple
backticks to ```txt) so the markdown linter is satisfied while preserving the
URL content.

114-115: ⚠️ Potential issue | 🟡 Minor

Mission update: replace the empty reference with the live demo URL.

Reference: is currently blank. Put the deployed URL here (or remove the heading) so docs stay actionable.

Suggested fix
-Reference:
+Live demo: https://mvp-builder-sigma.vercel.app
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/README.md` around lines 114 - 115, The README
currently has an empty "Reference:" heading; either populate that heading with
the deployed live demo URL (replace the blank after "Reference:" with the full
HTTP(s) URL) or remove the "Reference:" heading entirely to avoid dead/empty
documentation; update the kits/agentic/mvp-builder README's "Reference:" line
accordingly so the docs are actionable.
kits/agentic/mvp-builder/flows/mvp-builder/config.json (3)

36-36: ⚠️ Potential issue | 🟠 Major

Mission-critical schema contract: fix required usage inside embedded JSON Schemas.

"required": true inside property definitions is not valid JSON Schema for required fields; enforcement can be bypassed.

#!/bin/bash
# Verify all invalid boolean required occurrences in this flow export
rg -n '"required": true' kits/agentic/mvp-builder/flows/mvp-builder/config.json

Also applies to: 76-76, 116-116, 156-156, 196-196, 236-236, 276-276

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/flows/mvp-builder/config.json` at line 36, The
embedded JSON Schema uses invalid `"required": true` boolean entries (e.g.,
inside the "schema" string for the "result" property's "type" subproperty);
replace these boolean usages with proper JSON Schema "required" arrays on the
containing object (for example add a "required": ["type"] on the "properties"
object that contains "type" or remove the boolean and ensure the parent object
lists required fields), and update all occurrences (lines referenced by the
reviewer) inside the "schema" string so each mandatory field is enforced via a
required array rather than `"required": true`.

194-194: ⚠️ Potential issue | 🟠 Major

Mission integrity: internal values.id collisions must be unique per node.

Lines 194, 234, and 274 reuse the same values.id, which risks metadata/state collisions across different nodes.

Also applies to: 234-234, 274-274

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/flows/mvp-builder/config.json` at line 194, The
config contains duplicate node identifier values.id
"InstructorLLMNode_700_copy_170_copy_606" used across multiple nodes which will
cause metadata/state collisions; replace each duplicate values.id with a unique
identifier (e.g., append a distinct suffix or generate a UUID) for every node
that currently uses "InstructorLLMNode_700_copy_170_copy_606" and update any
references to that id elsewhere in the flow (edges, state keys, or metadata) so
all links still point to the correct node.

126-126: ⚠️ Potential issue | 🟡 Minor

Mission precision: target database.tables explicitly in the prompt.

Line 126 says “tables property,” but the schema nests it under database.tables; this can drift model output shape.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/flows/mvp-builder/config.json` at line 126, The
prompt string in config.json currently instructs "You should only modify the
tables property" which is ambiguous; update that substring to explicitly say
"You should only modify database.tables" so the model targets the nested field,
keeping the rest of the prompt intact (locate the prompt value in the "content"
for the node that includes "{{triggerNode_1.output.idea}}" and
"{{InstructorLLMNode_700_copy_170.output.result}}", and replace "tables
property" with "database.tables").
kits/agentic/mvp-builder/components/ui/button.tsx (2)

54-54: ⚠️ Potential issue | 🔴 Critical

Mission-critical: Line 54 should use Slot, not Slot.Root.

This composition will fail because the imported Slot component is used directly.

Suggested fix
-  const Comp = asChild ? Slot.Root : "button"
+  const Comp = asChild ? Slot : "button"
In the `radix-ui` package, is `Slot.Root` a valid API when importing `Slot` from "radix-ui", or should `Slot` be used directly for `asChild` composition?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/components/ui/button.tsx` at line 54, The component
chooses the element for composition incorrectly: change the conditional in the
Comp assignment to use Slot (not Slot.Root) when asChild is true—i.e. update the
expression that sets Comp (currently "const Comp = asChild ? Slot.Root :
'button'") to "const Comp = asChild ? Slot : 'button'"; ensure the imported
symbol Slot (used by Comp and asChild composition) is the correct Slot export
from your Radix slot package so the asChild composition works.

44-63: ⚠️ Potential issue | 🟡 Minor

Mission safeguard: set a non-submit default button type.

Without an explicit default, native buttons inside forms submit unintentionally.

Suggested fix
 function Button({
   className,
   variant = "default",
   size = "default",
   asChild = false,
+  type,
   ...props
 }: React.ComponentProps<"button"> &
   VariantProps<typeof buttonVariants> & {
     asChild?: boolean
   }) {
-  const Comp = asChild ? Slot.Root : "button"
+  const Comp = asChild ? Slot : "button"

   return (
     <Comp
       data-slot="button"
       data-variant={variant}
       data-size={size}
       className={cn(buttonVariants({ variant, size, className }))}
+      type={asChild ? undefined : type ?? "button"}
       {...props}
     />
   )
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/components/ui/button.tsx` around lines 44 - 63, The
Button component defaults to a submit behavior in forms because no default type
is set; update the Button function to default the button type to "button" and
only apply it when rendering a real "button" element: add a default like type =
"button" in the destructured props for function Button, and when building the
props passed to Comp (or when spreading), ensure you explicitly include type
when Comp === "button" (leave it off for asChild/Slot.Root) so consumers can
still override type by passing a type prop and Slot children aren't given an
invalid attribute.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/lamatic-update.yml:
- Line 26: Remove the trailing empty line at the end of
.github/workflows/lamatic-update.yml to satisfy the YAML linter (fix the
`empty-lines` error); open the file and delete the final blank newline so the
file ends immediately after the last YAML token, then save and re-run linting to
confirm the error is resolved.
- Around line 7-8: The workflow's paths filter only watches
'**/lamatic/flows/**' so changes under 'kits/agentic/mvp-builder/flows/...'
won't trigger it; update the paths list (the paths: array in the workflow) to
include the kit flow pattern—e.g. add 'kits/**/flows/**' or
'**/kits/**/flows/**' alongside '**/lamatic/flows/**' so changes in
kits/agentic/mvp-builder/flows will fire the workflow.

In `@kits/agentic/mvp-builder/actions/orchestrate.ts`:
- Around line 7-16: The generatePlan function accepts untrusted idea input and
forwards it into inputs without validation; add server-side guards at the top of
generatePlan (before creating inputs and before using
config.flows.mvp/flow.workflowId) to ensure idea is a string, trim whitespace,
reject empty values and enforce a maximum length (e.g., 1000 chars) by throwing
an Error with a clear message when validation fails; this prevents empty or
oversized payloads from being passed into inputs and downstream flow execution.

In `@kits/agentic/mvp-builder/app/plan/page.tsx`:
- Around line 1-13: Remove the 'use client' directive from the top of the Page
component file so Page remains a Server Component and keep the Suspense import
and JSX as-is; then add the 'use client' directive at the very top of
plan-client.tsx (before any imports) so the PlanClient component (which uses
useSearchParams, useState, useEffect, useRef) is the only client component,
preserving functionality while reducing client bundle size.

In `@kits/agentic/mvp-builder/components/content.tsx`:
- Around line 17-22: Replace emoji and inline SVGs with lucide-react icons:
import the needed icons (e.g., Check, Table2, and appropriate icons for
web_app/mobile_app/extension/api_service) and change the typeIcon mapping
(symbol: typeIcon) to map Plan['type'] to those icon components (not strings).
In FeatureCard replace the inline checkmark SVG with the lucide-react <Check />
component and in TableCard replace the inline grid SVG with <Table2 />. Update
the usage that renders the type icon (referenced as plan.type at its usage site)
to render the component instead of a string—either by using
React.createElement(typeIcon[plan.type], { className: 'w-6 h-6' }) or by storing
JSX elements in the mapping and rendering them directly. Ensure imports for the
lucide-react icons are added and className props for sizing are applied
consistently.

In `@kits/agentic/mvp-builder/components/loading.tsx`:
- Around line 1-8: The component is defined as Loading but the filename is
lowercase; rename the file from loading.tsx to Loading.tsx and update all
imports that reference it to use the new PascalCase name, keeping the component
declaration (const Loading) and export default Loading unchanged; also update
any barrel/index exports or tests that import the file so case-sensitive
environments won’t break.

In `@kits/agentic/mvp-builder/flows/mvp-builder/meta.json`:
- Around line 3-8: The flow metadata in meta.json is incomplete—populate the
empty fields "description", "testInput", "githubUrl", "documentationUrl", and
"deployUrl" with meaningful values so catalog tooling and reviewers can validate
the flow; update "description" with a concise summary of what the mvp-builder
flow does, provide a representative JSON or plain-text example in "testInput"
that exercises the flow, and add working URLs for "githubUrl",
"documentationUrl", and "deployUrl" (or placeholders that point to the PR,
README, and staging deployment) so the flow can be found and tested; make these
edits in the mvp-builder/meta.json file keys listed above.

In `@kits/agentic/mvp-builder/flows/mvp-builder/README.md`:
- Around line 20-23: The exported flow file list in the README is missing
README.md; update the flow package guidance so the required four files are
listed as "config.json", "inputs.json", "meta.json", and "README.md" wherever
the three-file list appears (the block that currently enumerates
**config.json**, **inputs.json**, **meta.json**), and also update the duplicated
mention later (lines referencing the three-file expectation) so every export
instruction explicitly includes README.md.

In `@kits/agentic/mvp-builder/package.json`:
- Around line 12-33: The package.json currently uses caret ranges for several
dependencies which must be pinned to exact versions; update each dependency
entry listed (class-variance-authority, clsx, lamatic, lucide-react, next,
radix-ui, react, react-dom, shadcn, tailwind-merge, tw-animate-css and
devDependencies `@tailwindcss/postcss`, `@types/node`, `@types/react`,
`@types/react-dom`, eslint, tailwindcss, typescript) to an exact version string
(no ^) — for example replace "typescript": "^5" with a concrete version like
"typescript": "5.9.0" — ensuring every dependency string in package.json uses
exact versions only.

In `@kits/agentic/mvp-builder/pnpm-workspace.yaml`:
- Around line 1-3: The ignoredBuiltDependencies list contains stale
entries—remove the "sharp" and "unrs-resolver" items from the
ignoredBuiltDependencies block so it only contains current entries (leave
onlyBuiltDependencies: [msw] intact); update the ignoredBuiltDependencies array
by deleting the "sharp" and "unrs-resolver" entries and ensure YAML remains
valid after removal.
- Around line 5-6: The pnpm lifecycle allowlist currently only includes msw
which prevents native install scripts for msw's transitive native deps and can
break installs; update the onlyBuiltDependencies configuration to include both
sharp and unrs-resolver (since msw@2.12.13 pulls sharp@0.34.5) so their install
scripts are allowed, or alternatively remove the restrictive
onlyBuiltDependencies entry entirely to restore normal pnpm lifecycle handling.

In `@README.md`:
- Line 84: The table row for "MVP Planner Agent" has a mismatched displayed path
and link target: the visible text shows `/kits/agentic/generation` while the
actual link points to `./kits/agentic/mvp-builder`; update the visible path text
to match the link (change `/kits/agentic/generation` to
`/kits/agentic/mvp-builder`) in the README table row so the label and href are
consistent (refer to the table row string containing "MVP Planner Agent" and the
link target "./kits/agentic/mvp-builder").

---

Duplicate comments:
In `@kits/agentic/mvp-builder/.env.example`:
- Around line 1-4: Normalize the .env assignments by removing spaces around '='
for the variables AGENTIC_GENERATE_CONTENT, LAMATIC_API_URL, LAMATIC_PROJECT_ID,
and LAMATIC_API_KEY so they follow standard dotenv syntax (e.g., KEY=VALUE), and
ensure the file ends with a single trailing newline; update those four lines
accordingly and save the file.

In `@kits/agentic/mvp-builder/actions/orchestrate.ts`:
- Line 5: Replace the fragile import of LamaticResponse from
"lamatic/dist/types" in orchestrate.ts: check if LamaticResponse is exported
from the public "lamatic" package and switch the import to that; if it is not
publicly exported, create a local type definition or alias (e.g., a locally
defined LamaticResponse interface/type) matching the fields your code uses,
update all references to LamaticResponse in this file to use the local type, and
remove the internal-path import to avoid relying on lamatic's internal build
output.

In `@kits/agentic/mvp-builder/app/page.tsx`:
- Line 17: The handleSubmit function currently types its event parameter as
React.SubmitEvent<HTMLFormElement>, which is invalid; change the parameter type
to React.FormEvent<HTMLFormElement> (or plain FormEvent<HTMLFormElement>) in the
handleSubmit declaration and any references where the onSubmit handler is typed,
and ensure React is in scope if you rely on the React namespace so the onSubmit
handler signature matches React's expected type.

In `@kits/agentic/mvp-builder/app/plan/plan-client.tsx`:
- Line 13: The code currently force-unwraps searchParams.get('idea') into const
idea = searchParams.get('idea')! which can pass undefined into generatePlan;
update the PlanClient flow to guard for a missing idea by checking
searchParams.get('idea') (or the idea variable) before calling generatePlan or
starting any flow, and handle the empty case (early return, user-facing
error/notification, or disable the trigger) so generatePlan is only invoked with
a valid string; update any places using the idea const (e.g., generatePlan,
handleSubmit, or useEffect that starts the flow) to rely on this presence check.
- Around line 23-33: The getPlan async function currently throws on missing data
and can produce unhandled rejections and a null dereference where the component
uses plan (refs: getPlan, generatePlan, setIsLoading, setPlan, and the render
access of plan). Wrap the await generatePlan call in try/catch/finally: in catch
log the error and setPlan to a safe fallback (null or an empty object) instead
of throwing, and in finally ensure setIsLoading(false) always runs; then update
the render logic that currently uses plan! to defensively check plan (optional
chaining, conditional render, or a placeholder) before dereferencing to prevent
runtime crashes.

In `@kits/agentic/mvp-builder/components/content.tsx`:
- Line 161: The Tailwind utility on the container div in the Content component
is invalid: replace the incorrect class "overscroll-hidden" with
"overflow-hidden" in the JSX string on the div with classes "bg-white border
border-zinc-100 rounded-xl ..."; update the className value in the Content
component (the div that currently contains "bg-white border border-zinc-100
rounded-xl overscroll-hidden") to use "overflow-hidden" so Tailwind applies the
intended behavior.

In `@kits/agentic/mvp-builder/components/ui/button.tsx`:
- Line 54: The component chooses the element for composition incorrectly: change
the conditional in the Comp assignment to use Slot (not Slot.Root) when asChild
is true—i.e. update the expression that sets Comp (currently "const Comp =
asChild ? Slot.Root : 'button'") to "const Comp = asChild ? Slot : 'button'";
ensure the imported symbol Slot (used by Comp and asChild composition) is the
correct Slot export from your Radix slot package so the asChild composition
works.
- Around line 44-63: The Button component defaults to a submit behavior in forms
because no default type is set; update the Button function to default the button
type to "button" and only apply it when rendering a real "button" element: add a
default like type = "button" in the destructured props for function Button, and
when building the props passed to Comp (or when spreading), ensure you
explicitly include type when Comp === "button" (leave it off for
asChild/Slot.Root) so consumers can still override type by passing a type prop
and Slot children aren't given an invalid attribute.

In `@kits/agentic/mvp-builder/config.json`:
- Line 13: The envKey in config.json currently set to "FLOW_MVP_BUILDER" does
not match the runtime wiring; update the "envKey" value to
"AGENTIC_GENERATE_CONTENT" so it aligns with the orchestrate.js runtime and
.env.example; ensure the change is made where the "envKey" property is declared
(replace FLOW_MVP_BUILDER with AGENTIC_GENERATE_CONTENT) and run a quick local
env check to confirm the step ID and flow folder naming remain consistent with
the kit.

In `@kits/agentic/mvp-builder/data.ts`:
- Line 69: Replace the duplicated frontend path entry
'app/page.tsx/app/page.tsx' with the correct single path 'app/page.tsx' in the
data list; locate the array or export that contains the string
'app/page.tsx/app/page.tsx' and update that entry so the list contains only
'app/page.tsx' (no repeated segment).

In `@kits/agentic/mvp-builder/flows/mvp-builder/config.json`:
- Line 36: The embedded JSON Schema uses invalid `"required": true` boolean
entries (e.g., inside the "schema" string for the "result" property's "type"
subproperty); replace these boolean usages with proper JSON Schema "required"
arrays on the containing object (for example add a "required": ["type"] on the
"properties" object that contains "type" or remove the boolean and ensure the
parent object lists required fields), and update all occurrences (lines
referenced by the reviewer) inside the "schema" string so each mandatory field
is enforced via a required array rather than `"required": true`.
- Line 194: The config contains duplicate node identifier values.id
"InstructorLLMNode_700_copy_170_copy_606" used across multiple nodes which will
cause metadata/state collisions; replace each duplicate values.id with a unique
identifier (e.g., append a distinct suffix or generate a UUID) for every node
that currently uses "InstructorLLMNode_700_copy_170_copy_606" and update any
references to that id elsewhere in the flow (edges, state keys, or metadata) so
all links still point to the correct node.
- Line 126: The prompt string in config.json currently instructs "You should
only modify the tables property" which is ambiguous; update that substring to
explicitly say "You should only modify database.tables" so the model targets the
nested field, keeping the rest of the prompt intact (locate the prompt value in
the "content" for the node that includes "{{triggerNode_1.output.idea}}" and
"{{InstructorLLMNode_700_copy_170.output.result}}", and replace "tables
property" with "database.tables").

In `@kits/agentic/mvp-builder/orchestrate.js`:
- Around line 10-14: The api config is built with possible undefined env vars
(endpoint, projectId, apiKey); add a fail-fast validation where the config is
constructed (the object with keys endpoint, projectId, apiKey) that checks
process.env.LAMATIC_API_URL, process.env.LAMATIC_PROJECT_ID and
process.env.LAMATIC_API_KEY and throws or exits immediately with a clear error
message naming the missing variable(s) so the Lamatic client setup never
proceeds with undefined values.

In `@kits/agentic/mvp-builder/README.md`:
- Around line 209-211: The fenced code block showing "http://localhost:3000" in
README.md lacks a fence language; update that block to include a language tag
(e.g., change the opening triple backticks to ```txt) so the markdown linter is
satisfied while preserving the URL content.
- Around line 114-115: The README currently has an empty "Reference:" heading;
either populate that heading with the deployed live demo URL (replace the blank
after "Reference:" with the full HTTP(s) URL) or remove the "Reference:" heading
entirely to avoid dead/empty documentation; update the kits/agentic/mvp-builder
README's "Reference:" line accordingly so the docs are actionable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4c87f3ff-c3bf-4bad-add6-57e1da17cd2c

📥 Commits

Reviewing files that changed from the base of the PR and between b4a085a and f089722.

⛔ Files ignored due to path filters (7)
  • kits/agentic/mvp-builder/app/favicon.ico is excluded by !**/*.ico
  • kits/agentic/mvp-builder/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • kits/agentic/mvp-builder/public/file.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/globe.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/next.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/vercel.svg is excluded by !**/*.svg
  • kits/agentic/mvp-builder/public/window.svg is excluded by !**/*.svg
📒 Files selected for processing (31)
  • .github/workflows/lamatic-update.yml
  • README.md
  • kits/agentic/mvp-builder/.env.example
  • kits/agentic/mvp-builder/.gitignore
  • kits/agentic/mvp-builder/README.md
  • kits/agentic/mvp-builder/actions/orchestrate.ts
  • kits/agentic/mvp-builder/app/globals.css
  • kits/agentic/mvp-builder/app/layout.tsx
  • kits/agentic/mvp-builder/app/page.tsx
  • kits/agentic/mvp-builder/app/plan/page.tsx
  • kits/agentic/mvp-builder/app/plan/plan-client.tsx
  • kits/agentic/mvp-builder/components.json
  • kits/agentic/mvp-builder/components/content.tsx
  • kits/agentic/mvp-builder/components/loading.tsx
  • kits/agentic/mvp-builder/components/ui/button.tsx
  • kits/agentic/mvp-builder/config.json
  • kits/agentic/mvp-builder/data.ts
  • kits/agentic/mvp-builder/eslint.config.mjs
  • kits/agentic/mvp-builder/flows/mvp-builder/README.md
  • kits/agentic/mvp-builder/flows/mvp-builder/config.json
  • kits/agentic/mvp-builder/flows/mvp-builder/inputs.json
  • kits/agentic/mvp-builder/flows/mvp-builder/meta.json
  • kits/agentic/mvp-builder/lib/lamatic-client.ts
  • kits/agentic/mvp-builder/lib/utils.ts
  • kits/agentic/mvp-builder/next.config.ts
  • kits/agentic/mvp-builder/orchestrate.js
  • kits/agentic/mvp-builder/package.json
  • kits/agentic/mvp-builder/pnpm-workspace.yaml
  • kits/agentic/mvp-builder/postcss.config.mjs
  • kits/agentic/mvp-builder/tsconfig.json
  • kits/agentic/mvp-builder/types/index.ts

Comment on lines +7 to +8
paths:
- '**/lamatic/flows/**'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Mission-critical: Workflow trigger misses the new kit flow path.

This workflow watches **/lamatic/flows/**, but this PR’s flow lives under kits/agentic/mvp-builder/flows/...; sync won’t fire for those changes.

Proposed patch
 on:
   push:
     branches:
       - main
     paths:
       - '**/lamatic/flows/**'
+      - 'kits/**/flows/**'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/lamatic-update.yml around lines 7 - 8, The workflow's
paths filter only watches '**/lamatic/flows/**' so changes under
'kits/agentic/mvp-builder/flows/...' won't trigger it; update the paths list
(the paths: array in the workflow) to include the kit flow pattern—e.g. add
'kits/**/flows/**' or '**/kits/**/flows/**' alongside '**/lamatic/flows/**' so
changes in kits/agentic/mvp-builder/flows will fire the workflow.

api-key: ${{ secrets.LAMATIC_PROJECT_API_KEY }}
project-id: ${{ secrets.LAMATIC_PROJECT_ID }}
auto-deploy: ${{ secrets.LAMATIC_AUTO_DEPLOY_PROJECT }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Mission cleanup: Remove trailing empty line to satisfy YAML lint.

Static analysis already flags this as an empty-lines error.

🧰 Tools
🪛 YAMLlint (1.38.0)

[error] 26-26: too many blank lines (1 > 0)

(empty-lines)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/lamatic-update.yml at line 26, Remove the trailing empty
line at the end of .github/workflows/lamatic-update.yml to satisfy the YAML
linter (fix the `empty-lines` error); open the file and delete the final blank
newline so the file ends immediately after the last YAML token, then save and
re-run linting to confirm the error is resolved.

Comment on lines +7 to +16
export async function generatePlan(idea: string): Promise<LamaticResponse> {
const flow = config.flows.mvp;

if (!flow.workflowId) {
throw new Error('Workflow ID missing');
}

const inputs = {
idea
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Mission hardening: validate idea on the server before flow execution.

Line 7 accepts untrusted input and Lines 14–18 forward it directly. Client checks can be bypassed; add server-side non-empty and size guards.

🛡️ Proposed fix
 export async function generatePlan(idea: string): Promise<LamaticResponse> {
+  const normalizedIdea = idea.trim();
+  if (!normalizedIdea) {
+    throw new Error('Idea is required');
+  }
+  if (normalizedIdea.length > 2000) {
+    throw new Error('Idea is too long');
+  }
+
   const flow = config.flows.mvp;
@@
   const inputs = {
-    idea
+    idea: normalizedIdea
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/actions/orchestrate.ts` around lines 7 - 16, The
generatePlan function accepts untrusted idea input and forwards it into inputs
without validation; add server-side guards at the top of generatePlan (before
creating inputs and before using config.flows.mvp/flow.workflowId) to ensure
idea is a string, trim whitespace, reject empty values and enforce a maximum
length (e.g., 1000 chars) by throwing an Error with a clear message when
validation fails; this prevents empty or oversized payloads from being passed
into inputs and downstream flow execution.

Comment on lines +1 to +13
'use client';

import { Suspense } from 'react';
import Loading from '@/components/loading';
import PlanClient from './plan-client';

export default function Page() {
return (
<Suspense fallback={<Loading />}>
<PlanClient />
</Suspense>
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== page.tsx =="
sed -n '1,120p' kits/agentic/mvp-builder/app/plan/page.tsx

echo
echo "== check for client-only hooks in page.tsx =="
rg -nP '\buse(State|Effect|Memo|Callback|Ref|LayoutEffect|SearchParams|Pathname|Router)\b' kits/agentic/mvp-builder/app/plan/page.tsx || true

echo
echo "== plan-client.tsx header and hook usage =="
sed -n '1,120p' kits/agentic/mvp-builder/app/plan/plan-client.tsx
rg -nP '^\s*[\"\x27]use client[\"\x27]|\\buse(State|Effect|Memo|Callback|Ref|LayoutEffect|SearchParams|Pathname|Router)\\b' kits/agentic/mvp-builder/app/plan/plan-client.tsx || true

Repository: Lamatic/AgentKit

Length of output: 1840


Your mission: Relocate the 'use client' directive to plan-client.tsx only.

The page.tsx route is presently marked as a Client Component despite not using any client-only APIs (hooks, browser APIs, etc.). Suspense is a shared boundary utility. By moving 'use client' to the component that actually requires it (plan-client.tsx—which uses useSearchParams(), useState, useEffect, and useRef)—you'll reduce the client bundle footprint while maintaining the same functionality.

Proposed patch
-'use client';
-
 import { Suspense } from 'react';
 import Loading from '@/components/loading';
 import PlanClient from './plan-client';

This follows Next.js best practices: Server Components by default, with 'use client' only where client-only APIs are needed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'use client';
import { Suspense } from 'react';
import Loading from '@/components/loading';
import PlanClient from './plan-client';
export default function Page() {
return (
<Suspense fallback={<Loading />}>
<PlanClient />
</Suspense>
);
}
import { Suspense } from 'react';
import Loading from '@/components/loading';
import PlanClient from './plan-client';
export default function Page() {
return (
<Suspense fallback={<Loading />}>
<PlanClient />
</Suspense>
);
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/app/plan/page.tsx` around lines 1 - 13, Remove the
'use client' directive from the top of the Page component file so Page remains a
Server Component and keep the Suspense import and JSX as-is; then add the 'use
client' directive at the very top of plan-client.tsx (before any imports) so the
PlanClient component (which uses useSearchParams, useState, useEffect, useRef)
is the only client component, preserving functionality while reducing client
bundle size.

Comment on lines +17 to +22
const typeIcon: Record<Plan['type'], string> = {
web_app: '🌐',
mobile_app: '📱',
extension: '🧩',
api_service: '⚙️'
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify icon standardization in this component (read-only).
rg -n "lucide-react|<svg|🌐|📱|🧩|⚙️" kits/agentic/mvp-builder/components/content.tsx

Repository: Lamatic/AgentKit

Length of output: 315


🏁 Script executed:

head -100 kits/agentic/mvp-builder/components/content.tsx

Repository: Lamatic/AgentKit

Length of output: 4158


🏁 Script executed:

wc -l kits/agentic/mvp-builder/components/content.tsx

Repository: Lamatic/AgentKit

Length of output: 111


🏁 Script executed:

cat -n kits/agentic/mvp-builder/components/content.tsx | sed -n '1,100p'

Repository: Lamatic/AgentKit

Length of output: 4858


🏁 Script executed:

grep -n "typeIcon" kits/agentic/mvp-builder/components/content.tsx

Repository: Lamatic/AgentKit

Length of output: 181


🏁 Script executed:

cat -n kits/agentic/mvp-builder/components/content.tsx | sed -n '100,195p'

Repository: Lamatic/AgentKit

Length of output: 4319


🏁 Script executed:

cat kits/agentic/mvp-builder/package.json 2>/dev/null || cat kits/agentic/package.json 2>/dev/null || cat package.json | grep -A 5 -B 5 "lucide-react"

Repository: Lamatic/AgentKit

Length of output: 868


Standardize all icons with lucide-react per kit policy.

This component currently uses emoji characters and inline SVGs instead of the standardized lucide-react icon library (already available in dependencies at v0.577.0).

Replace:

  • Lines 17-22: emoji strings in the typeIcon mapping with lucide-react components
  • Lines 38-47: inline checkmark SVG in FeatureCard with <Check /> from lucide-react
  • Lines 59-64: inline grid SVG in TableCard with <Table2 /> from lucide-react

When refactoring typeIcon to use component references, update line 112's usage to properly render the component (React.createElement() or restructure to render as JSX element).

Suggested implementation

Import lucide-react icons and update typeIcon to reference components:

+import { Globe, Smartphone, Puzzle, Cog, Check, Table2 } from 'lucide-react';

-const typeIcon: Record<Plan['type'], string> = {
-  web_app: '🌐',
-  mobile_app: '📱',
-  extension: '🧩',
-  api_service: '⚙️'
+const typeIcon: Record<Plan['type'], React.ComponentType<{ className?: string }>> = {
+  web_app: Globe,
+  mobile_app: Smartphone,
+  extension: Puzzle,
+  api_service: Cog
 };

Then update line 112 to render the component (e.g., React.createElement(typeIcon[plan.type], { className: 'w-6 h-6' })).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/components/content.tsx` around lines 17 - 22,
Replace emoji and inline SVGs with lucide-react icons: import the needed icons
(e.g., Check, Table2, and appropriate icons for
web_app/mobile_app/extension/api_service) and change the typeIcon mapping
(symbol: typeIcon) to map Plan['type'] to those icon components (not strings).
In FeatureCard replace the inline checkmark SVG with the lucide-react <Check />
component and in TableCard replace the inline grid SVG with <Table2 />. Update
the usage that renders the type icon (referenced as plan.type at its usage site)
to render the component instead of a string—either by using
React.createElement(typeIcon[plan.type], { className: 'w-6 h-6' }) or by storing
JSX elements in the mapping and rendering them directly. Ensure imports for the
lucide-react icons are added and className props for sizing are applied
consistently.

Comment on lines +20 to +23
- **config.json** - Complete flow structure with nodes and connections
- **inputs.json** - Private inputs requiring configuration
- **meta.json** - Flow metadata and information

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Mission briefing: include README.md in the exported file list/instructions.

The flow package guidance omits README.md, while this repository’s flow export expectation includes four files.

📝 Proposed fix
 - **config.json** - Complete flow structure with nodes and connections
 - **inputs.json** - Private inputs requiring configuration
 - **meta.json** - Flow metadata and information
+- **README.md** - Flow overview, setup guidance, and usage notes
-   - Add all files from this package (`config.json`, `inputs.json`, `meta.json`)
+   - Add all files from this package (`config.json`, `inputs.json`, `meta.json`, `README.md`)

Based on learnings, "Flows exported in flows/ directory must contain all four required files: config.json, inputs.json, meta.json, and README.md."

Also applies to: 36-37

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/flows/mvp-builder/README.md` around lines 20 - 23,
The exported flow file list in the README is missing README.md; update the flow
package guidance so the required four files are listed as "config.json",
"inputs.json", "meta.json", and "README.md" wherever the three-file list appears
(the block that currently enumerates **config.json**, **inputs.json**,
**meta.json**), and also update the duplicated mention later (lines referencing
the three-file expectation) so every export instruction explicitly includes
README.md.

Comment on lines +12 to +33
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lamatic": "^0.3.2",
"lucide-react": "^0.577.0",
"next": "16.2.0",
"radix-ui": "^1.4.3",
"react": "19.2.4",
"react-dom": "19.2.4",
"shadcn": "^4.1.0",
"tailwind-merge": "^3.5.0",
"tw-animate-css": "^1.4.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "16.2.0",
"tailwindcss": "^4",
"typescript": "^5"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Detect non-pinned versions in dependencies/devDependencies (read-only).
jq -r '
  [.dependencies, .devDependencies]
  | map(select(. != null))
  | add
  | to_entries[]
  | select(.value | test("^[\\^~]|[><*=xX]"))
  | "\(.key)=\(.value)"
' kits/agentic/mvp-builder/package.json

Repository: Lamatic/AgentKit

Length of output: 331


Mission-critical: Pin all dependency versions to exact values.

This kit requires pinned dependency versions per the packaging guidelines. The caret ranges (^) currently in place violate this mandate and compromise reproducibility across deployments.

Fifteen packages need their versions locked:

class-variance-authority=^0.7.1
clsx=^2.1.1
lamatic=^0.3.2
lucide-react=^0.577.0
radix-ui=^1.4.3
shadcn=^4.1.0
tailwind-merge=^3.5.0
tw-animate-css=^1.4.0
`@tailwindcss/postcss`=^4
`@types/node`=^20
`@types/react`=^19
`@types/react-dom`=^19
eslint=^9
tailwindcss=^4
typescript=^5

Replace all caret ranges with exact versions—e.g., "typescript": "5.9.0" instead of "typescript": "^5".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/package.json` around lines 12 - 33, The package.json
currently uses caret ranges for several dependencies which must be pinned to
exact versions; update each dependency entry listed (class-variance-authority,
clsx, lamatic, lucide-react, next, radix-ui, react, react-dom, shadcn,
tailwind-merge, tw-animate-css and devDependencies `@tailwindcss/postcss`,
`@types/node`, `@types/react`, `@types/react-dom`, eslint, tailwindcss, typescript) to
an exact version string (no ^) — for example replace "typescript": "^5" with a
concrete version like "typescript": "5.9.0" — ensuring every dependency string
in package.json uses exact versions only.

Comment on lines +1 to +3
ignoredBuiltDependencies:
- sharp
- unrs-resolver
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Confirm direct deps for the kit =="
sed -n '1,220p' kits/agentic/mvp-builder/package.json | rg -n '"dependencies"|"devDependencies"|"sharp"|"unrs-resolver"'

echo
echo "== Confirm whether these packages are present transitively in lockfiles =="
fd -p 'pnpm-lock.yaml' | while read -r lock; do
  echo "--- ${lock}"
  rg -n '(^|/)sharp@|(^|/)unrs-resolver@' "$lock" || true
done

Repository: Lamatic/AgentKit

Length of output: 309


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Full package.json dependencies ===="
cat kits/agentic/mvp-builder/package.json | jq -r '.dependencies // {} | keys[]' 2>/dev/null | sort || echo "No dependencies found"

echo
echo "== Full package.json devDependencies ===="
cat kits/agentic/mvp-builder/package.json | jq -r '.devDependencies // {} | keys[]' 2>/dev/null | sort || echo "No devDependencies found"

echo
echo "== Current pnpm-workspace.yaml content ===="
cat kits/agentic/mvp-builder/pnpm-workspace.yaml

Repository: Lamatic/AgentKit

Length of output: 502


Eliminate stale ignoredBuiltDependencies entries—they're a liability masquerading as config.

The sharp and unrs-resolver entries in this file don't exist in your package.json direct deps or lockfile transitive deps. Keeping them only adds noise and masks real warnings. Time to extract these entries and destroy them on site. The onlyBuiltDependencies: [msw] entry stands; that one's active.

Remove lines 2-3 (the sharp and unrs-resolver entries) from kits/agentic/mvp-builder/pnpm-workspace.yaml.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/pnpm-workspace.yaml` around lines 1 - 3, The
ignoredBuiltDependencies list contains stale entries—remove the "sharp" and
"unrs-resolver" items from the ignoredBuiltDependencies block so it only
contains current entries (leave onlyBuiltDependencies: [msw] intact); update the
ignoredBuiltDependencies array by deleting the "sharp" and "unrs-resolver"
entries and ensure YAML remains valid after removal.

Comment on lines +5 to +6
onlyBuiltDependencies:
- msw
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Inspect mvp-builder workspace build-policy config =="
fd -p 'pnpm-workspace.yaml' kits/agentic/mvp-builder | xargs -I{} sh -c 'echo "--- {}"; sed -n "1,120p" "{}"'

echo
echo "== Check whether allowlisted/ignored packages appear in lockfiles =="
fd -p 'pnpm-lock.yaml' | while read -r lock; do
  echo "--- ${lock}"
  rg -n '(^|/)msw@|(^|/)sharp@|(^|/)unrs-resolver@' "$lock" || true
done

echo
echo "== Check current declared deps in kit package.json =="
sed -n '1,220p' kits/agentic/mvp-builder/package.json | rg -n '"(dependencies|devDependencies)"|"msw"|"sharp"|"unrs-resolver"'

Repository: Lamatic/AgentKit

Length of output: 511


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Full package.json content (kits/agentic/mvp-builder) =="
cat kits/agentic/mvp-builder/package.json

echo
echo "== Search lockfile for all entries with pattern matching msw/sharp/unrs (case-insensitive) =="
if [ -f "kits/agentic/mvp-builder/pnpm-lock.yaml" ]; then
  echo "--- pnpm-lock.yaml summary (first 50 lines) ---"
  head -50 kits/agentic/mvp-builder/pnpm-lock.yaml
  echo
  echo "--- Search for msw, sharp, or unrs (any case) ---"
  grep -i -E '(msw|sharp|unrs)' kits/agentic/mvp-builder/pnpm-lock.yaml || echo "No matches found"
fi

echo
echo "== Verify root pnpm-workspace.yaml context (full file) =="
cat kits/agentic/mvp-builder/pnpm-workspace.yaml

Repository: Lamatic/AgentKit

Length of output: 9541


Disable build scripts for native dependencies that msw requires.

The configuration allows only msw to run install scripts while blocking sharp and unrs-resolver—both of which are transitive dependencies of msw with platform-specific native bindings. Since msw@2.12.13 directly depends on sharp@0.34.5, the conflicting build policy can cause install failures if prebuilt binaries are unavailable or platform-specific wheels don't match the runtime environment.

Either add sharp and unrs-resolver to onlyBuiltDependencies, or remove the restrictive allowlist to permit standard pnpm lifecycle handling.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kits/agentic/mvp-builder/pnpm-workspace.yaml` around lines 5 - 6, The pnpm
lifecycle allowlist currently only includes msw which prevents native install
scripts for msw's transitive native deps and can break installs; update the
onlyBuiltDependencies configuration to include both sharp and unrs-resolver
(since msw@2.12.13 pulls sharp@0.34.5) so their install scripts are allowed, or
alternatively remove the restrictive onlyBuiltDependencies entry entirely to
restore normal pnpm lifecycle handling.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
README.md (1)

84-84: ⚠️ Potential issue | 🟡 Minor

Mission brief: Correct the article in the kit description.

Line 84 reads “a MVP plan”; this should be “an MVP plan” for correct user-facing text quality.

Proposed patch
-| **MVP Planner Agent** | A Next.js starter kit for generating a MVP plan for a project idea. | Available | [![Live Demo](https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge)](https://mvp-builder-sigma.vercel.app/) | [`/kits/agentic/mvp-builder`](./kits/agentic/mvp-builder) |
+| **MVP Planner Agent** | A Next.js starter kit for generating an MVP plan for a project idea. | Available | [![Live Demo](https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge)](https://mvp-builder-sigma.vercel.app/) | [`/kits/agentic/mvp-builder`](./kits/agentic/mvp-builder) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 84, Update the kit description string in README.md where
it currently reads "A Next.js starter kit for generating a MVP plan for a
project idea." to use the correct article: change "a MVP plan" to "an MVP plan"
so the line beginning with "**MVP Planner Agent** | A Next.js starter kit for
generating a MVP plan for a project idea." becomes grammatically correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@README.md`:
- Line 84: Update the kit description string in README.md where it currently
reads "A Next.js starter kit for generating a MVP plan for a project idea." to
use the correct article: change "a MVP plan" to "an MVP plan" so the line
beginning with "**MVP Planner Agent** | A Next.js starter kit for generating a
MVP plan for a project idea." becomes grammatically correct.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 20d6e08a-ef90-45f2-a0e6-7c393a494bb6

📥 Commits

Reviewing files that changed from the base of the PR and between f089722 and e68ce79.

📒 Files selected for processing (1)
  • README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants