Skip to content

feat: Add projectpilot-ai kit#290

Open
Kishan-215 wants to merge 3 commits into
Lamatic:mainfrom
Kishan-215:feat/projectpilot-ai
Open

feat: Add projectpilot-ai kit#290
Kishan-215 wants to merge 3 commits into
Lamatic:mainfrom
Kishan-215:feat/projectpilot-ai

Conversation

@Kishan-215

@Kishan-215 Kishan-215 commented Jul 24, 2026

Copy link
Copy Markdown

ProjectPilot AI — an agentic mentor that guides engineering students from final year project selection through execution planning, using three chained Lamatic flows:

  1. discovery-flow — generates 5-8 ranked project ideas based on branch, interest, skill level, duration, and team type.
  2. blueprint-flow — recommends a specific tech stack and architecture for the chosen idea.
  3. execution-flow — generates a week-by-week roadmap, abstract, viva questions, and resume bullets, grounded explicitly in the chosen project and its confirmed tech stack.

This is a multi-agent workflow, not a single-prompt chatbot — each stage's output feeds into the next.

Note: This PR uses the current lamatic.config.ts + flat flows/<name>.ts format per CONTRIBUTING.md, not the older config.json/flows/<name>/ structure referenced in the checklist below.

PR Checklist

1. Select Contribution Type

  • [ x] Kit (kits/<category>/<kit-name>/)
  • Bundle (bundles/<bundle-name>/)
  • Template (templates/<template-name>/)

2. General Requirements

  • [x ] PR is for one project only (no unrelated changes)
  • [x ] No secrets, API keys, or real credentials are committed
  • [ x] Folder name uses kebab-case and matches the flow ID
  • [x ] All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • [x ] config.json present with valid metadata (name, description, tags, steps, author, env keys)
  • All flows in flows/<flow-name>/ (where applicable) include:
    • config.json (Lamatic flow export)
    • inputs.json
    • meta.json
    • README.md
  • [x ] .env.example with placeholder values only (kits only)
  • [ x] No hand‑edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • [x ] npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • [x ] PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • [x ] No unrelated files or projects are modified
  • Added the ProjectPilot AI kit, registry entry, README, agent guide, constitution, configuration, and environment templates.
  • Added three TypeScript-defined Lamatic flows (no flow.json files were present):
    • Discovery: API Request trigger → Dynamic Instructor LLM → API Response; generates 5–8 ranked project ideas from student preferences.
    • Blueprint: API Request trigger → Dynamic Instructor LLM → API Response; recommends the stack, architecture, and datasets/APIs for a selected idea.
    • Execution: API Request trigger → Dynamic Instructor LLM → API Response; creates a roadmap, abstract, viva questions, and resume bullets using the selected idea and blueprint.
  • Added model configurations and JSON-focused system/user prompts for all three LLM stages.
  • Added a complete Next.js app with Lamatic client integration, server actions, environment configuration, and a guided form → ideas → blueprint → execution workflow.
  • Added reusable Radix/Shadcn UI components, responsive layout, theming, charts, forms, dialogs, menus, navigation, notifications, and utility hooks.
  • Added application metadata and tooling: package.json, lockfile, TypeScript, Next.js, PostCSS, Tailwind, components, and ignore configuration.
  • Added documentation covering setup, deployment, validation, troubleshooting, limitations, and responsible use.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

ProjectPilot AI kit

Layer / File(s) Summary
Kit definition and Lamatic workflows
kits/projectpilot-ai/flows/*, kits/projectpilot-ai/model-configs/*, kits/projectpilot-ai/prompts/*, kits/projectpilot-ai/constitutions/*, kits/projectpilot-ai/lamatic.config.ts
Adds discovery, blueprint, and execution flow definitions with model configurations, prompts, constitution rules, and kit metadata.
Next.js orchestration application
kits/projectpilot-ai/apps/app/*, kits/projectpilot-ai/apps/actions/*, kits/projectpilot-ai/apps/lib/*, kits/projectpilot-ai/apps/hooks/*, kits/projectpilot-ai/apps/package.json, kits/projectpilot-ai/apps/*.json, kits/projectpilot-ai/apps/*.mjs
Adds the staged form-to-ideas-to-blueprint-to-execution workflow, Lamatic client integration, environment configuration, application setup, and supporting runtime utilities.
Reusable UI system and documentation
kits/projectpilot-ai/apps/components/*, kits/projectpilot-ai/apps/components/ui/*, kits/projectpilot-ai/README.md, kits/projectpilot-ai/agent.md
Adds themed UI primitives, form and overlay components, navigation and data-display wrappers, toast/sidebar utilities, and kit usage documentation.
Registry and README metadata
README.md, registry.json
Updates kit counts and registers the new ProjectPilot AI kit with its metadata, workflow steps, resources, links, and capabilities.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and matches the main change: adding the projectpilot-ai kit.
Description check ✅ Passed The description includes the kit summary and a checklist covering scope, structure, validation, and acknowledged omissions.
✨ 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.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/projectpilot-ai

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ⚠️ Warning

⚠️ Warnings

  • File outside kits/ modified: README.md
  • File outside kits/ modified: registry.json

🎉 All checks passed! This contribution follows the AgentKit structure.

@coderabbitai coderabbitai Bot left a comment

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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2f0b57e and 17afecb.

⛔ Files ignored due to path filters (1)
  • kits/projectpilot-ai/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (93)
  • README.md
  • kits/projectpilot-ai/README.md
  • kits/projectpilot-ai/agent.md
  • kits/projectpilot-ai/apps/.env.example
  • kits/projectpilot-ai/apps/.gitignore
  • kits/projectpilot-ai/apps/README.md
  • kits/projectpilot-ai/apps/actions/orchestrate.ts
  • kits/projectpilot-ai/apps/app/globals.css
  • kits/projectpilot-ai/apps/app/layout.tsx
  • kits/projectpilot-ai/apps/app/page.tsx
  • kits/projectpilot-ai/apps/components.json
  • kits/projectpilot-ai/apps/components/header.tsx
  • kits/projectpilot-ai/apps/components/theme-provider.tsx
  • kits/projectpilot-ai/apps/components/ui/accordion.tsx
  • kits/projectpilot-ai/apps/components/ui/alert-dialog.tsx
  • kits/projectpilot-ai/apps/components/ui/alert.tsx
  • kits/projectpilot-ai/apps/components/ui/aspect-ratio.tsx
  • kits/projectpilot-ai/apps/components/ui/avatar.tsx
  • kits/projectpilot-ai/apps/components/ui/badge.tsx
  • kits/projectpilot-ai/apps/components/ui/breadcrumb.tsx
  • kits/projectpilot-ai/apps/components/ui/button-group.tsx
  • kits/projectpilot-ai/apps/components/ui/button.tsx
  • kits/projectpilot-ai/apps/components/ui/calendar.tsx
  • kits/projectpilot-ai/apps/components/ui/card.tsx
  • kits/projectpilot-ai/apps/components/ui/carousel.tsx
  • kits/projectpilot-ai/apps/components/ui/chart.tsx
  • kits/projectpilot-ai/apps/components/ui/checkbox.tsx
  • kits/projectpilot-ai/apps/components/ui/collapsible.tsx
  • kits/projectpilot-ai/apps/components/ui/command.tsx
  • kits/projectpilot-ai/apps/components/ui/context-menu.tsx
  • kits/projectpilot-ai/apps/components/ui/dialog.tsx
  • kits/projectpilot-ai/apps/components/ui/drawer.tsx
  • kits/projectpilot-ai/apps/components/ui/dropdown-menu.tsx
  • kits/projectpilot-ai/apps/components/ui/empty.tsx
  • kits/projectpilot-ai/apps/components/ui/field.tsx
  • kits/projectpilot-ai/apps/components/ui/form.tsx
  • kits/projectpilot-ai/apps/components/ui/hover-card.tsx
  • kits/projectpilot-ai/apps/components/ui/input-group.tsx
  • kits/projectpilot-ai/apps/components/ui/input-otp.tsx
  • kits/projectpilot-ai/apps/components/ui/input.tsx
  • kits/projectpilot-ai/apps/components/ui/item.tsx
  • kits/projectpilot-ai/apps/components/ui/kbd.tsx
  • kits/projectpilot-ai/apps/components/ui/label.tsx
  • kits/projectpilot-ai/apps/components/ui/menubar.tsx
  • kits/projectpilot-ai/apps/components/ui/navigation-menu.tsx
  • kits/projectpilot-ai/apps/components/ui/pagination.tsx
  • kits/projectpilot-ai/apps/components/ui/popover.tsx
  • kits/projectpilot-ai/apps/components/ui/progress.tsx
  • kits/projectpilot-ai/apps/components/ui/radio-group.tsx
  • kits/projectpilot-ai/apps/components/ui/resizable.tsx
  • kits/projectpilot-ai/apps/components/ui/scroll-area.tsx
  • kits/projectpilot-ai/apps/components/ui/select.tsx
  • kits/projectpilot-ai/apps/components/ui/separator.tsx
  • kits/projectpilot-ai/apps/components/ui/sheet.tsx
  • kits/projectpilot-ai/apps/components/ui/sidebar.tsx
  • kits/projectpilot-ai/apps/components/ui/skeleton.tsx
  • kits/projectpilot-ai/apps/components/ui/slider.tsx
  • kits/projectpilot-ai/apps/components/ui/sonner.tsx
  • kits/projectpilot-ai/apps/components/ui/spinner.tsx
  • kits/projectpilot-ai/apps/components/ui/switch.tsx
  • kits/projectpilot-ai/apps/components/ui/table.tsx
  • kits/projectpilot-ai/apps/components/ui/tabs.tsx
  • kits/projectpilot-ai/apps/components/ui/textarea.tsx
  • kits/projectpilot-ai/apps/components/ui/toast.tsx
  • kits/projectpilot-ai/apps/components/ui/toaster.tsx
  • kits/projectpilot-ai/apps/components/ui/toggle-group.tsx
  • kits/projectpilot-ai/apps/components/ui/toggle.tsx
  • kits/projectpilot-ai/apps/components/ui/tooltip.tsx
  • kits/projectpilot-ai/apps/components/ui/use-mobile.tsx
  • kits/projectpilot-ai/apps/components/ui/use-toast.ts
  • kits/projectpilot-ai/apps/hooks/use-mobile.ts
  • kits/projectpilot-ai/apps/hooks/use-toast.ts
  • kits/projectpilot-ai/apps/lib/lamatic-client.ts
  • kits/projectpilot-ai/apps/lib/utils.ts
  • kits/projectpilot-ai/apps/next.config.mjs
  • kits/projectpilot-ai/apps/package.json
  • kits/projectpilot-ai/apps/postcss.config.mjs
  • kits/projectpilot-ai/apps/tsconfig.json
  • kits/projectpilot-ai/constitutions/default.md
  • kits/projectpilot-ai/flows/blueprint-flow.ts
  • kits/projectpilot-ai/flows/discovery-flow.ts
  • kits/projectpilot-ai/flows/execution-flow.ts
  • kits/projectpilot-ai/lamatic.config.ts
  • kits/projectpilot-ai/model-configs/blueprint-flow_instructor-llmnode-851_generative-model-name.ts
  • kits/projectpilot-ai/model-configs/discovery-flow_instructor-llmnode-710_generative-model-name.ts
  • kits/projectpilot-ai/model-configs/execution-flow_instructor-llmnode-603_generative-model-name.ts
  • kits/projectpilot-ai/prompts/blueprint-flow_instructor-llmnode-851_system_0.md
  • kits/projectpilot-ai/prompts/blueprint-flow_instructor-llmnode-851_user_1.md
  • kits/projectpilot-ai/prompts/discovery-flow_instructor-llmnode-710_system_0.md
  • kits/projectpilot-ai/prompts/discovery-flow_instructor-llmnode-710_user_1.md
  • kits/projectpilot-ai/prompts/execution-flow_instructor-llmnode-603_system_0.md
  • kits/projectpilot-ai/prompts/execution-flow_instructor-llmnode-603_user_1.md
  • registry.json

Comment on lines +19 to +21
# env files
.env
.env*.local

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.

🔒 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.

Suggested change
# 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.

Comment on lines +3 to +46
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);

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.

🗄️ 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

Comment on lines +37 to +84
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" };
}
}

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.

🔒 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 with react-hook-form and 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

Comment on lines +47 to +49
const ideas = resData?.result?.ideas;
if (!ideas) throw new Error("No ideas found in response");
return { success: true, data: ideas };

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.

🗄️ 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.

Comment on lines +9 to +12
export const metadata: Metadata = {
title: 'v0 App',
description: 'Created with v0',
generator: 'v0.app',

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.

🎯 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",

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.

📐 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.

Comment thread kits/projectpilot-ai/apps/README.md Outdated
Comment on lines +1 to +12
# 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.

[![Deploy with Vercel](https://vercel.com/button)](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)

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.

🗄️ 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" },

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.

🔒 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

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.

🔒 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.

Comment thread registry.json
Comment on lines +3187 to +3190
"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"
},

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.

🎯 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.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

1 participant