feat: Add projectpilot-ai kit#290
Conversation
WalkthroughChangesProjectPilot AI kit
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
:robot_face: AgentKit Structural ValidationNew Contributions Detected
Check Results
|
There was a problem hiding this comment.
Actionable comments posted: 23
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@kits/projectpilot-ai/apps/.gitignore`:
- Around line 19-21: Update the env-file patterns in .gitignore to broadly
ignore all .env files, including .env.development and .env.production, while
adding an explicit exception so .env.example remains tracked.
In `@kits/projectpilot-ai/apps/actions/orchestrate.ts`:
- Around line 47-49: Validate the response payloads in the ideas, blueprint, and
execution-plan handling branches before returning success, using the runtime
schemas already defined for those result types. Ensure each validated field is
the expected array/object shape so malformed truthy values are rejected at the
boundary, and return the parsed schema data rather than the unvalidated values.
- Around line 3-46: Update getProjectIdeas and the other action flows in this
module to import and use the parent kit’s lamatic.config as the single source of
truth for flow definitions, replacing getFlowId and all *_FLOW_ID
environment-variable lookups. Resolve each action’s corresponding configured
flow and pass its definition or identifier to lamaticClient.executeFlow while
preserving the existing action behavior and return types.
- Around line 37-84: Establish shared Zod schemas for the project-ideas,
blueprint, and execution-plan inputs, and use them consistently across both
sites. In kits/projectpilot-ai/apps/actions/orchestrate.ts lines 37-84, parse
each action’s input with its corresponding schema and return a validation error
before calling executeFlow when parsing fails or limits are exceeded; in
kits/projectpilot-ai/apps/app/page.tsx lines 15-77, replace manual
useState/native required validation with react-hook-form wired to those same
shared schemas and preserve the existing submission flow.
In `@kits/projectpilot-ai/apps/app/layout.tsx`:
- Around line 9-12: Update the metadata object in layout.tsx to replace the v0
template values for title, description, and generator with ProjectPilot AI
branding. Ensure tabs and search previews identify the application as
ProjectPilot AI, without changing unrelated metadata.
In `@kits/projectpilot-ai/apps/app/page.tsx`:
- Around line 97-150: Associate every label in the form around the branch,
interest, skill level, duration, and team type controls with its corresponding
input or select. Add unique stable id values to each control and matching
htmlFor values to each label, preserving the existing form behavior and field
bindings.
- Around line 33-77: Update handleGetIdeas, handleSelectIdea, and
handleGenerateExecutionPlan to wrap each server-action invocation in
try/catch/finally, handling rejected calls through the existing error state and
always executing setLoading(false) in finally. Preserve the current success
transitions and existing early return behavior for a missing blueprint.
- Around line 79-265: Update the JSX styling in
kits/projectpilot-ai/apps/app/page.tsx lines 79-265 and
kits/projectpilot-ai/apps/components/header.tsx lines 7-42 to replace hard-coded
palette utilities for backgrounds, borders, text, links, and actions with the
project’s semantic theme-token classes such as bg-background, text-foreground,
bg-primary, and text-destructive. Preserve the existing layout and
state-specific styling while ensuring both components use CSS-variable-backed
tokens throughout.
In `@kits/projectpilot-ai/apps/components/ui/aspect-ratio.tsx`:
- Around line 1-9: Add the React namespace import in the `AspectRatio` component
file so `React.ComponentProps` resolves under the project’s JSX configuration,
leaving the component implementation unchanged.
In `@kits/projectpilot-ai/apps/components/ui/button-group.tsx`:
- Around line 24-76: All listed exported UI wrappers currently drop consumer
refs; update every affected file—button-group.tsx (lines 24-76), drawer.tsx
(8-122), empty.tsx (5-95), field.tsx (10-231), form.tsx (76-156), hover-card.tsx
(8-42), item.tsx (8-179), kbd.tsx (3-26), label.tsx (8-22), navigation-menu.tsx
(8-154), popover.tsx (8-46), and separator.tsx (8-26)—to use React.forwardRef
and pass the received ref to each underlying DOM or Radix/Vaul element. Preserve
existing props, variants, asChild behavior, and rendered element types while
ensuring ref types match the wrapped elements.
In `@kits/projectpilot-ai/apps/components/ui/carousel.tsx`:
- Around line 96-105: Update the cleanup returned by the React.useEffect around
onSelect so it also unregisters the 'reInit' listener from the same api
instance, while preserving the existing 'select' cleanup and effect
dependencies.
In `@kits/projectpilot-ai/apps/components/ui/collapsible.tsx`:
- Around line 11-30: Convert CollapsibleTrigger and CollapsibleContent to
React.forwardRef wrappers, declaring the appropriate element ref types and
passing each forwarded ref to its underlying Radix primitive. Preserve the
existing data-slot attributes and prop forwarding so consumers can access the
rendered trigger and content elements.
In `@kits/projectpilot-ai/apps/components/ui/empty.tsx`:
- Around line 71-80: Update EmptyDescription to render a paragraph element
instead of a div, while preserving its data-slot, className composition, prop
spreading, and existing React.ComponentProps<'p'> contract.
In `@kits/projectpilot-ai/apps/components/ui/input-group.tsx`:
- Around line 59-79: Update the InputGroupAddon click handler to focus the
group’s text control when it is either an input or a textarea, while preserving
the existing button exclusion and current input behavior.
In `@kits/projectpilot-ai/apps/components/ui/kbd.tsx`:
- Around line 18-24: Update KbdGroup to render a neutral div element instead of
kbd while preserving its existing className merging, data-slot attribute, and
forwarded props.
In `@kits/projectpilot-ai/apps/components/ui/skeleton.tsx`:
- Around line 1-13: Add the missing React namespace import required by the
Skeleton component’s React.ComponentProps<'div'> type annotation, leaving the
existing rendering and exports unchanged.
In `@kits/projectpilot-ai/apps/hooks/use-mobile.ts`:
- Around line 1-19: Keep useIsMobile in
kits/projectpilot-ai/apps/hooks/use-mobile.ts as the single implementation.
Delete the duplicate in kits/projectpilot-ai/apps/components/ui/use-mobile.tsx,
or replace it with a re-export from `@/hooks/use-mobile` if that import path is
still used elsewhere.
In `@kits/projectpilot-ai/apps/next.config.mjs`:
- Around line 3-5: Remove the ignoreBuildErrors override from the Next.js
typescript configuration in next.config.mjs so next build fails when TypeScript
errors are present.
In `@kits/projectpilot-ai/apps/package.json`:
- Line 61: Replace the mutable "latest" version in the package manifest’s
react-markdown dependency with a specific vetted version, preserving the
dependency entry and valid package.json syntax.
In `@kits/projectpilot-ai/apps/README.md`:
- Around line 1-12: Replace the copied Agent Kit Generation content in the
README with ProjectPilot-specific documentation: describe ProjectPilot, use its
correct repository/root deployment configuration, document the required
DISCOVERY_FLOW_ID, BLUEPRINT_FLOW_ID, and EXECUTION_FLOW_ID variables consumed
by orchestrate.ts, and correct the repository tree so flows/ is shown in its
actual location.
In `@kits/projectpilot-ai/lamatic.config.ts`:
- Line 6: Remove personal contact data from both metadata locations: in
kits/projectpilot-ai/lamatic.config.ts lines 6-6, replace the author email with
the repository or team contact; in kits/projectpilot-ai/flows/execution-flow.ts
lines 12-15, remove the duplicated personal email from the flow metadata.
Preserve the existing author and flow metadata structure.
In
`@kits/projectpilot-ai/prompts/execution-flow_instructor-llmnode-603_user_1.md`:
- Line 1: Update the prompt around the interpolated selectedIdea and blueprint
values to clearly delimit them as untrusted data, and explicitly instruct the
model to ignore any instructions contained within those fields. Preserve their
use as project context while applying the same protection to the duration value
where appropriate, without changing the requested roadmap, abstract, viva
questions, or resume bullet outputs.
In `@registry.json`:
- Around line 3187-3190: Update the projectpilot-ai deploy URL in the registry
links to include a Vercel env parameter containing DISCOVERY_FLOW_ID,
BLUEPRINT_FLOW_ID, EXECUTION_FLOW_ID, and every remaining variable declared in
apps/.env.example, ensuring the cloned registry deployment is runnable.
🪄 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 Plus
Run ID: b1e6140b-f318-4c52-ac7e-bdad3b6494ff
⛔ Files ignored due to path filters (1)
kits/projectpilot-ai/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (93)
README.mdkits/projectpilot-ai/README.mdkits/projectpilot-ai/agent.mdkits/projectpilot-ai/apps/.env.examplekits/projectpilot-ai/apps/.gitignorekits/projectpilot-ai/apps/README.mdkits/projectpilot-ai/apps/actions/orchestrate.tskits/projectpilot-ai/apps/app/globals.csskits/projectpilot-ai/apps/app/layout.tsxkits/projectpilot-ai/apps/app/page.tsxkits/projectpilot-ai/apps/components.jsonkits/projectpilot-ai/apps/components/header.tsxkits/projectpilot-ai/apps/components/theme-provider.tsxkits/projectpilot-ai/apps/components/ui/accordion.tsxkits/projectpilot-ai/apps/components/ui/alert-dialog.tsxkits/projectpilot-ai/apps/components/ui/alert.tsxkits/projectpilot-ai/apps/components/ui/aspect-ratio.tsxkits/projectpilot-ai/apps/components/ui/avatar.tsxkits/projectpilot-ai/apps/components/ui/badge.tsxkits/projectpilot-ai/apps/components/ui/breadcrumb.tsxkits/projectpilot-ai/apps/components/ui/button-group.tsxkits/projectpilot-ai/apps/components/ui/button.tsxkits/projectpilot-ai/apps/components/ui/calendar.tsxkits/projectpilot-ai/apps/components/ui/card.tsxkits/projectpilot-ai/apps/components/ui/carousel.tsxkits/projectpilot-ai/apps/components/ui/chart.tsxkits/projectpilot-ai/apps/components/ui/checkbox.tsxkits/projectpilot-ai/apps/components/ui/collapsible.tsxkits/projectpilot-ai/apps/components/ui/command.tsxkits/projectpilot-ai/apps/components/ui/context-menu.tsxkits/projectpilot-ai/apps/components/ui/dialog.tsxkits/projectpilot-ai/apps/components/ui/drawer.tsxkits/projectpilot-ai/apps/components/ui/dropdown-menu.tsxkits/projectpilot-ai/apps/components/ui/empty.tsxkits/projectpilot-ai/apps/components/ui/field.tsxkits/projectpilot-ai/apps/components/ui/form.tsxkits/projectpilot-ai/apps/components/ui/hover-card.tsxkits/projectpilot-ai/apps/components/ui/input-group.tsxkits/projectpilot-ai/apps/components/ui/input-otp.tsxkits/projectpilot-ai/apps/components/ui/input.tsxkits/projectpilot-ai/apps/components/ui/item.tsxkits/projectpilot-ai/apps/components/ui/kbd.tsxkits/projectpilot-ai/apps/components/ui/label.tsxkits/projectpilot-ai/apps/components/ui/menubar.tsxkits/projectpilot-ai/apps/components/ui/navigation-menu.tsxkits/projectpilot-ai/apps/components/ui/pagination.tsxkits/projectpilot-ai/apps/components/ui/popover.tsxkits/projectpilot-ai/apps/components/ui/progress.tsxkits/projectpilot-ai/apps/components/ui/radio-group.tsxkits/projectpilot-ai/apps/components/ui/resizable.tsxkits/projectpilot-ai/apps/components/ui/scroll-area.tsxkits/projectpilot-ai/apps/components/ui/select.tsxkits/projectpilot-ai/apps/components/ui/separator.tsxkits/projectpilot-ai/apps/components/ui/sheet.tsxkits/projectpilot-ai/apps/components/ui/sidebar.tsxkits/projectpilot-ai/apps/components/ui/skeleton.tsxkits/projectpilot-ai/apps/components/ui/slider.tsxkits/projectpilot-ai/apps/components/ui/sonner.tsxkits/projectpilot-ai/apps/components/ui/spinner.tsxkits/projectpilot-ai/apps/components/ui/switch.tsxkits/projectpilot-ai/apps/components/ui/table.tsxkits/projectpilot-ai/apps/components/ui/tabs.tsxkits/projectpilot-ai/apps/components/ui/textarea.tsxkits/projectpilot-ai/apps/components/ui/toast.tsxkits/projectpilot-ai/apps/components/ui/toaster.tsxkits/projectpilot-ai/apps/components/ui/toggle-group.tsxkits/projectpilot-ai/apps/components/ui/toggle.tsxkits/projectpilot-ai/apps/components/ui/tooltip.tsxkits/projectpilot-ai/apps/components/ui/use-mobile.tsxkits/projectpilot-ai/apps/components/ui/use-toast.tskits/projectpilot-ai/apps/hooks/use-mobile.tskits/projectpilot-ai/apps/hooks/use-toast.tskits/projectpilot-ai/apps/lib/lamatic-client.tskits/projectpilot-ai/apps/lib/utils.tskits/projectpilot-ai/apps/next.config.mjskits/projectpilot-ai/apps/package.jsonkits/projectpilot-ai/apps/postcss.config.mjskits/projectpilot-ai/apps/tsconfig.jsonkits/projectpilot-ai/constitutions/default.mdkits/projectpilot-ai/flows/blueprint-flow.tskits/projectpilot-ai/flows/discovery-flow.tskits/projectpilot-ai/flows/execution-flow.tskits/projectpilot-ai/lamatic.config.tskits/projectpilot-ai/model-configs/blueprint-flow_instructor-llmnode-851_generative-model-name.tskits/projectpilot-ai/model-configs/discovery-flow_instructor-llmnode-710_generative-model-name.tskits/projectpilot-ai/model-configs/execution-flow_instructor-llmnode-603_generative-model-name.tskits/projectpilot-ai/prompts/blueprint-flow_instructor-llmnode-851_system_0.mdkits/projectpilot-ai/prompts/blueprint-flow_instructor-llmnode-851_user_1.mdkits/projectpilot-ai/prompts/discovery-flow_instructor-llmnode-710_system_0.mdkits/projectpilot-ai/prompts/discovery-flow_instructor-llmnode-710_user_1.mdkits/projectpilot-ai/prompts/execution-flow_instructor-llmnode-603_system_0.mdkits/projectpilot-ai/prompts/execution-flow_instructor-llmnode-603_user_1.mdregistry.json
| # env files | ||
| .env | ||
| .env*.local |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Ignore all Next.js environment files except the example.
The current patterns do not ignore .env.development or .env.production, so a Lamatic API key in either file could be committed accidentally. Use a broad ignore with an explicit .env.example exception.
Proposed fix
# env files
-.env
-.env*.local
+.env*
+!.env.example📝 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.
| # env files | |
| .env | |
| .env*.local | |
| # env files | |
| .env* | |
| !.env.example |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/.gitignore` around lines 19 - 21, Update the
env-file patterns in .gitignore to broadly ignore all .env files, including
.env.development and .env.production, while adding an explicit exception so
.env.example remains tracked.
| import { lamaticClient } from "@/lib/lamatic-client"; | ||
|
|
||
| export interface ProjectIdea { | ||
| title: string; | ||
| difficulty: string; | ||
| industryRelevance: string; | ||
| innovationScore: number; | ||
| } | ||
|
|
||
| export interface Blueprint { | ||
| frontend: string; | ||
| backend: string; | ||
| database: string; | ||
| aiFrameworks: string; | ||
| deployment: string; | ||
| architectureExplanation: string; | ||
| datasets: string[]; | ||
| } | ||
|
|
||
| export interface ExecutionPlan { | ||
| roadmap: { week: string; task: string }[]; | ||
| abstract: string; | ||
| vivaQuestions: string[]; | ||
| resumeBullets: string[]; | ||
| } | ||
|
|
||
| function getFlowId(envKey: string): string { | ||
| const id = process.env[envKey]; | ||
| if (!id) { | ||
| throw new Error(`Missing environment variable: ${envKey}`); | ||
| } | ||
| return id; | ||
| } | ||
|
|
||
| export async function getProjectIdeas(input: { | ||
| branch: string; | ||
| interest: string; | ||
| skillLevel: string; | ||
| duration: string; | ||
| teamType: string; | ||
| }): Promise<{ success: boolean; data?: ProjectIdea[]; error?: string }> { | ||
| try { | ||
| const flowId = getFlowId("DISCOVERY_FLOW_ID"); | ||
| const resData = await lamaticClient.executeFlow(flowId, input); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Your mission: use the kit config as the flow source of truth.
These actions only read *_FLOW_ID environment variables; they never import or use ../../lamatic.config. Derive the three flow definitions from the parent kit configuration instead of maintaining a second flow-ID contract.
As per coding guidelines, “Kit Next.js apps must import and use ../../lamatic.config to read step definitions from the parent kit.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/actions/orchestrate.ts` around lines 3 - 46, Update
getProjectIdeas and the other action flows in this module to import and use the
parent kit’s lamatic.config as the single source of truth for flow definitions,
replacing getFlowId and all *_FLOW_ID environment-variable lookups. Resolve each
action’s corresponding configured flow and pass its definition or identifier to
lamaticClient.executeFlow while preserving the existing action behavior and
return types.
Source: Coding guidelines
| export async function getProjectIdeas(input: { | ||
| branch: string; | ||
| interest: string; | ||
| skillLevel: string; | ||
| duration: string; | ||
| teamType: string; | ||
| }): Promise<{ success: boolean; data?: ProjectIdea[]; error?: string }> { | ||
| try { | ||
| const flowId = getFlowId("DISCOVERY_FLOW_ID"); | ||
| const resData = await lamaticClient.executeFlow(flowId, input); | ||
| const ideas = resData?.result?.ideas; | ||
| if (!ideas) throw new Error("No ideas found in response"); | ||
| return { success: true, data: ideas }; | ||
| } catch (error) { | ||
| return { success: false, error: error instanceof Error ? error.message : "Unknown error" }; | ||
| } | ||
| } | ||
|
|
||
| export async function getBlueprint(input: { | ||
| selectedIdea: string; | ||
| skillLevel: string; | ||
| }): Promise<{ success: boolean; data?: Blueprint; error?: string }> { | ||
| try { | ||
| const flowId = getFlowId("BLUEPRINT_FLOW_ID"); | ||
| const resData = await lamaticClient.executeFlow(flowId, input); | ||
| const blueprint = resData?.result; | ||
| if (!blueprint) throw new Error("No blueprint found in response"); | ||
| return { success: true, data: blueprint }; | ||
| } catch (error) { | ||
| return { success: false, error: error instanceof Error ? error.message : "Unknown error" }; | ||
| } | ||
| } | ||
|
|
||
| export async function getExecutionPlan(input: { | ||
| selectedIdea: string; | ||
| blueprint: string; | ||
| duration: string; | ||
| }): Promise<{ success: boolean; data?: ExecutionPlan; error?: string }> { | ||
| try { | ||
| const flowId = getFlowId("EXECUTION_FLOW_ID"); | ||
| const resData = await lamaticClient.executeFlow(flowId, input); | ||
| const plan = resData?.result; | ||
| if (!plan) throw new Error("No execution plan found in response"); | ||
| return { success: true, data: plan }; | ||
| } catch (error) { | ||
| return { success: false, error: error instanceof Error ? error.message : "Unknown error" }; | ||
| } | ||
| } |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf 'Repo files of interest:\n'
git ls-files | rg '(^|/)kits/projectpilot-ai/apps/(actions/orchestrate\.ts|app/page\.tsx|components/)' || true
printf '\nPackage/React/RHF imports and schema occurrences:\n'
rg -n "react-hook-form|zod|from 'zod|from \"zod|register|handleSubmit|watch|Controller|field" kits/projectpilot-ai/apps || true
printf '\norchestrate.ts outline/contents:\n'
wc -l kits/projectpilot-ai/apps/actions/orchestrate.ts
cat -n kits/projectpilot-ai/apps/actions/orchestrate.ts | sed -n '1,140p'
printf '\npage.tsx relevant sections:\n'
wc -l kits/projectpilot-ai/apps/app/page.tsx
cat -n kits/projectpilot-ai/apps/app/page.tsx | sed -n '1,220p'
printf '\nSchema files nearby:\n'
git ls-files | rg 'schema|zod|form' | sed -n '1,120p'Repository: Lamatic/AgentKit
Length of output: 27180
Mission: establish a single validated form contract.
The app currently uses useState and native required validation while server actions accept arbitrary caller payloads before invoking Lamatic flows. Use one shared Zod schema with react-hook-form in the UI, then parse the same schema in each action before executeFlow:
kits/projectpilot-ai/apps/app/page.tsx#L15-L77: replace manual form state/validation withreact-hook-formand the shared schemas.kits/projectpilot-ai/apps/actions/orchestrate.ts#L37-L84: parse and reject invalid or oversized flow inputs before invoking Lamatic.
📍 Affects 2 files
kits/projectpilot-ai/apps/actions/orchestrate.ts#L37-L84(this comment)kits/projectpilot-ai/apps/app/page.tsx#L15-L77
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/actions/orchestrate.ts` around lines 37 - 84,
Establish shared Zod schemas for the project-ideas, blueprint, and
execution-plan inputs, and use them consistently across both sites. In
kits/projectpilot-ai/apps/actions/orchestrate.ts lines 37-84, parse each
action’s input with its corresponding schema and return a validation error
before calling executeFlow when parsing fails or limits are exceeded; in
kits/projectpilot-ai/apps/app/page.tsx lines 15-77, replace manual
useState/native required validation with react-hook-form wired to those same
shared schemas and preserve the existing submission flow.
Source: Coding guidelines
| const ideas = resData?.result?.ideas; | ||
| if (!ideas) throw new Error("No ideas found in response"); | ||
| return { success: true, data: ideas }; |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Your mission: reject malformed flow results at the boundary.
A truthy non-array ideas is returned as success, then Line 167 calls .map() and crashes. Validate each result payload against runtime schemas before returning typed data; apply the same validation to blueprint and execution-plan fields.
Also applies to: 62-64, 78-80
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/actions/orchestrate.ts` around lines 47 - 49,
Validate the response payloads in the ideas, blueprint, and execution-plan
handling branches before returning success, using the runtime schemas already
defined for those result types. Ensure each validated field is the expected
array/object shape so malformed truthy values are rejected at the boundary, and
return the parsed schema data rather than the unvalidated values.
| export const metadata: Metadata = { | ||
| title: 'v0 App', | ||
| description: 'Created with v0', | ||
| generator: 'v0.app', |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Your mission: ship ProjectPilot metadata, not v0 defaults.
The title, description, and generator expose template branding instead of ProjectPilot AI in tabs and search previews.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/app/layout.tsx` around lines 9 - 12, Update the
metadata object in layout.tsx to replace the v0 template values for title,
description, and generator with ProjectPilot AI branding. Ensure tabs and search
previews identify the application as ProjectPilot AI, without changing unrelated
metadata.
| "react-day-picker": "9.8.0", | ||
| "react-dom": "19.2.0", | ||
| "react-hook-form": "^7.60.0", | ||
| "react-markdown": "latest", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Your mission: replace the mutable latest tag.
"latest" makes fresh installs non-reproducible and can silently introduce a breaking release. Pin a vetted react-markdown version and update it deliberately.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/package.json` at line 61, Replace the mutable
"latest" version in the package manifest’s react-markdown dependency with a
specific vetted version, preserving the dependency entry and valid package.json
syntax.
| # Agent Kit Generation by Lamatic.ai | ||
|
|
||
| <p align="center"> | ||
| <a href="https://agent-kit-generation.vercel.app" target="_blank"> | ||
| <img src="https://img.shields.io/badge/Live%20Demo-black?style=for-the-badge" alt="Live Demo" /> | ||
| </a> | ||
| </p> | ||
|
|
||
|
|
||
| **Agent Kit Generation** is an AI-powered content generation system built with [Lamatic.ai](https://lamatic.ai). It uses intelligent workflows to generate text, images, and JSON content through a modern Next.js interface with markdown rendering support. | ||
|
|
||
| [](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/agentic/generation&env=AGENTIC_GENERATE_CONTENT,LAMATIC_API_URL,LAMATIC_PROJECT_ID,LAMATIC_API_KEY&envDescription=Your%20Lamatic%20Generation%20keys%20are%20required.&envLink=https://lamatic.ai/templates/agentkits/agentic/agent-kit-generation) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Replace the copied Generation README with ProjectPilot-specific setup.
This file still documents Agent Kit Generation, its old Vercel clone/root, and one AGENTIC_GENERATE_CONTENT flow. ProjectPilot requires DISCOVERY_FLOW_ID, BLUEPRINT_FLOW_ID, and EXECUTION_FLOW_ID; following this README will leave the variables consumed by orchestrate.ts unset and make setup fail. The repository tree also incorrectly places flows/ inside the app.
Also applies to: 56-65, 77-93
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/apps/README.md` around lines 1 - 12, Replace the copied
Agent Kit Generation content in the README with ProjectPilot-specific
documentation: describe ProjectPilot, use its correct repository/root deployment
configuration, document the required DISCOVERY_FLOW_ID, BLUEPRINT_FLOW_ID, and
EXECUTION_FLOW_ID variables consumed by orchestrate.ts, and correct the
repository tree so flows/ is shown in its actual location.
| description: "AI-powered final year project mentor guiding engineering students from project ideation through completion, including project recommendations, tech stack and architecture blueprints, and development roadmaps with documentation and viva/resume preparation.", | ||
| version: "1.0.0", | ||
| type: "kit" as const, | ||
| author: { name: "Kishan C", email: "kishanc5980@gmail.com" }, |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Mission directive: remove personal contact data from published metadata.
kits/projectpilot-ai/lamatic.config.ts#L6-L6: replace the personal email with a repository or team contact.kits/projectpilot-ai/flows/execution-flow.ts#L12-L15: remove the duplicated personal email from flow metadata.
📍 Affects 2 files
kits/projectpilot-ai/lamatic.config.ts#L6-L6(this comment)kits/projectpilot-ai/flows/execution-flow.ts#L12-L15
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/lamatic.config.ts` at line 6, Remove personal contact
data from both metadata locations: in kits/projectpilot-ai/lamatic.config.ts
lines 6-6, replace the author email with the repository or team contact; in
kits/projectpilot-ai/flows/execution-flow.ts lines 12-15, remove the duplicated
personal email from the flow metadata. Preserve the existing author and flow
metadata structure.
| @@ -0,0 +1 @@ | |||
| Given project "{{triggerNode_1.selectedIdea}}" with this technical blueprint: {{triggerNode_1.blueprint}}, and a timeline of {{triggerNode_1.duration}}, generate: a week-by-week roadmap (array of week number and task), an abstract of about 150 words, 5 viva questions ranging from beginner to advanced, and 3 ATS-friendly resume bullet points. No newline at end of file | |||
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Treat interpolated values as untrusted data.
selectedIdea and especially blueprint are request inputs, not trusted instructions. The current concatenation lets a crafted value inject model instructions and alter the execution plan. Delimit the fields and explicitly instruct the model to ignore instructions contained inside them.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 1-1: First line in a file should be a top-level heading
(MD041, first-line-heading, first-line-h1)
[warning] 1-1: Files should end with a single newline character
(MD047, single-trailing-newline)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kits/projectpilot-ai/prompts/execution-flow_instructor-llmnode-603_user_1.md`
at line 1, Update the prompt around the interpolated selectedIdea and blueprint
values to clearly delimit them as untrusted data, and explicitly instruct the
model to ignore any instructions contained within those fields. Preserve their
use as project context while applying the same protection to the duration value
where appropriate, without changing the requested roadmap, abstract, viva
questions, or resume bullet outputs.
| "links": { | ||
| "github": "https://github.com/Lamatic/AgentKit/tree/main/kits/projectpilot-ai", | ||
| "deploy": "https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/projectpilot-ai/apps" | ||
| }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Mission critical: pass required flow IDs to the Vercel template.
The three mandatory steps declare environment keys, but this deploy link supplies none. Add an env= parameter for DISCOVERY_FLOW_ID, BLUEPRINT_FLOW_ID, and EXECUTION_FLOW_ID, plus the remaining variables from apps/.env.example, so a registry deployment is runnable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@registry.json` around lines 3187 - 3190, Update the projectpilot-ai deploy
URL in the registry links to include a Vercel env parameter containing
DISCOVERY_FLOW_ID, BLUEPRINT_FLOW_ID, EXECUTION_FLOW_ID, and every remaining
variable declared in apps/.env.example, ensuring the cloned registry deployment
is runnable.
|
@coderabbitai review |
✅ Action performedReview finished.
|
ProjectPilot AI — an agentic mentor that guides engineering students from final year project selection through execution planning, using three chained Lamatic flows:
This is a multi-agent workflow, not a single-prompt chatbot — each stage's output feeds into the next.
PR Checklist
1. Select Contribution Type
kits/<category>/<kit-name>/)bundles/<bundle-name>/)templates/<template-name>/)2. General Requirements
kebab-caseand matches the flow IDREADME.md(purpose, setup, usage)3. File Structure (Check what applies)
config.jsonpresent with valid metadata (name, description, tags, steps, author, env keys)flows/<flow-name>/(where applicable) include:config.json(Lamatic flow export)inputs.jsonmeta.jsonREADME.md.env.examplewith placeholder values only (kits only)config.jsonnode graphs (changes via Lamatic Studio export)4. Validation
npm install && npm run devworks locally (kits: UI runs; bundles/templates: flows are valid)[kit] Add <name> for <use case>)flow.jsonfiles were present):package.json, lockfile, TypeScript, Next.js, PostCSS, Tailwind, components, and ignore configuration.