feat: You tube creator copilot#210
Conversation
WalkthroughChangesWebRevive AI adds a Lamatic audit workflow, PageSpeed-backed server orchestration, and a Next.js dashboard for submitting website audits and viewing structured SEO, performance, UX, competitor, conversion, outreach, and proposal results. WebRevive workflow
Audit services
Dashboard interface and setup
🚥 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
🎉 All checks passed! This contribution follows the AgentKit structure. |
|
/validate |
|
📡 Running Studio validation — results will appear here shortly. |
Studio Runtime Validation (Phase 2)❌ Studio validation failed. The kit was rejected by Lamatic Studio. Errorsyoutube-creator-copilot
Please fix the errors above and push a new commit to re-run validation. |
|
@RohitIndurke resolve the comments above |
There was a problem hiding this comment.
Actionable comments posted: 15
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kits/youtube-creator-copilot/README.md (1)
1-22: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winWrong dossier handed to the agent — this briefing describes a different mission entirely.
This README describes a YouTube "viral video ideas, scripts, thumbnail concepts" copilot and only tells users to deploy the
agentic-youtube-creatorflow. But the actual shipped app (layout.tsx,page.tsx) is "WebRevive AI" — a website-audit/cold-outreach tool that requiresWEBREVIVE_FLOW_ID(perorchestrate.ts'sanalyzeWebsite, which fails immediately without it). A user following these instructions verbatim will never setWEBREVIVE_FLOW_ID, and the app will error out on first use.Please update the README to reflect the WebRevive AI product, name the
webrevive-orchestratorflow, and documentWEBREVIVE_FLOW_IDin the setup steps.🤖 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/youtube-creator-copilot/README.md` around lines 1 - 22, Rewrite the README to describe the WebRevive AI website-audit and cold-outreach application instead of the YouTube creator copilot. Replace references to `agentic-youtube-creator` with `webrevive-orchestrator`, and update the setup instructions to require configuring `WEBREVIVE_FLOW_ID` alongside the Lamatic credentials before running the app.
🤖 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/youtube-creator-copilot/agent.md`:
- Around line 1-5: Add blank lines immediately after the # Identity and #
Capabilities headings in the agent documentation, preserving the existing
heading text and list content so the Markdown satisfies MD022.
In `@kits/youtube-creator-copilot/apps/actions/orchestrate.ts`:
- Around line 148-152: Update analyzeWebsite in
kits/youtube-creator-copilot/apps/actions/orchestrate.ts:148-152 to import
../../lamatic.config and obtain the flow ID from the kit’s step definitions
instead of process.env.WEBREVIVE_FLOW_ID. The sibling site
kits/youtube-creator-copilot/apps/.env.example:1-5 requires no direct change
because the env-var lookup should be removed rather than retained as a fallback.
- Around line 178-180: Remove the unconditional raw AI output logging around the
orchestration flow, including the three console.log calls surrounding rawOutput.
If diagnostic logging is required, gate it behind the existing debug
configuration and ensure production execution never logs rawOutput or other
sensitive generated content.
In `@kits/youtube-creator-copilot/apps/app/globals.css`:
- Line 1: Update the lint configuration for the CSS containing the Tailwind
directives so Stylelint recognizes `@tailwind` and `@apply`, using Tailwind-aware
configuration such as stylelint-config-tailwindcss or ignoreAtRules, and exclude
CSS from Biome’s linter scope if needed. Ensure CI no longer reports these
directives as unknown syntax.
- Line 5: Remove the Google Fonts `@import` from globals.css and configure Inter
and JetBrains Mono through next/font/google in the app’s layout component, using
the existing CSS variable names and applying the generated font variables to the
document or root layout.
- Around line 1-3: Upgrade the app’s Tailwind setup from v3 to v4: replace the
v3 directives in globals.css with the v4 CSS entrypoint, update the tailwindcss
dependency and PostCSS plugin configuration in package.json and related config,
and migrate the theme configuration to the v4 format while preserving existing
design tokens and styling.
In `@kits/youtube-creator-copilot/apps/app/page.tsx`:
- Around line 227-255: Update the tab navigation around the mapped buttons to
expose complete ARIA tab semantics: mark the container as a tablist, give each
button role="tab" with aria-selected reflecting activeTab and aria-controls
referencing its corresponding panel, and ensure each tab panel uses the matching
tabpanel role/id relationship. Preserve the existing activeTab behavior.
- Around line 86-155: Replace the raw state-managed intake form fields around
handleSubmit with react-hook-form and zod validation, defining a schema for URL,
businessName, industry, and targetService and wiring submission through the form
hook. Use the project’s shadcn/ui Form, Input, and Select components instead of
native input/select elements, while preserving the existing fields, optional
values, loading-disabled behavior, and submit flow.
- Around line 21-25: Update handleCopy so setCopiedKey and its timeout run only
after navigator.clipboard.writeText successfully resolves; handle the rejected
promise without showing the copied confirmation.
- Around line 259-691: Guard every nested array rendered by the dashboard,
including competitors.list, finalReport.priorityFixes, proposal.timeline, and
the other visible .map() sources, so missing values default to empty arrays
before mapping. Prefer normalizing these fields in orchestrate.ts if that is the
established parser boundary; otherwise add local fallbacks in the relevant
render expressions while preserving existing results for populated arrays.
In `@kits/youtube-creator-copilot/apps/package.json`:
- Line 13: Update the lamatic dependency entry in package.json from the floating
latest tag to the latest stable published version, using a specific pinned
version or caret range so installs remain reproducible and controlled.
In `@kits/youtube-creator-copilot/apps/tsconfig.tsbuildinfo`:
- Line 1: Remove the generated tsconfig.tsbuildinfo artifact from the kit source
and add *.tsbuildinfo to the repository ignore configuration. Do not commit
regenerated build-cache files; they should only be created during local or CI
TypeScript builds.
In `@kits/youtube-creator-copilot/lamatic.config.ts`:
- Around line 1-20: Update the exported kit metadata to identify YouTube Creator
Copilot rather than webrevive-ai, including its name, description, and relevant
tags. In the steps array, register both the creator workflow from
agentic-youtube-creator.ts and the existing website-audit workflow using their
intended environment keys. Update the github and deploy links to target the
YouTube Creator Copilot kit while preserving the kit’s required metadata
structure.
In
`@kits/youtube-creator-copilot/prompts/agentic-youtube-creator_llm-node_system.md`:
- Around line 1-7: Add a neutral top-level H1 heading at the beginning of the
system prompt before the existing “You are an expert YouTube Strategist”
instructions, preserving all current prompt content and Markdown formatting.
In `@kits/youtube-creator-copilot/README.md`:
- Line 12: Update the fenced shell code block in the README so it has blank
lines before and after the ```sh fence, satisfying markdownlint’s required
spacing while preserving the block content.
---
Outside diff comments:
In `@kits/youtube-creator-copilot/README.md`:
- Around line 1-22: Rewrite the README to describe the WebRevive AI
website-audit and cold-outreach application instead of the YouTube creator
copilot. Replace references to `agentic-youtube-creator` with
`webrevive-orchestrator`, and update the setup instructions to require
configuring `WEBREVIVE_FLOW_ID` alongside the Lamatic credentials before running
the app.
🪄 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: a11541e8-54c0-43aa-8c17-53acf50a5c91
⛔ Files ignored due to path filters (1)
kits/youtube-creator-copilot/apps/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (23)
kits/youtube-creator-copilot/.gitignorekits/youtube-creator-copilot/README.mdkits/youtube-creator-copilot/agent.mdkits/youtube-creator-copilot/apps/.env.examplekits/youtube-creator-copilot/apps/.vscode/settings.jsonkits/youtube-creator-copilot/apps/actions/orchestrate.tskits/youtube-creator-copilot/apps/actions/pagespeed.tskits/youtube-creator-copilot/apps/app/globals.csskits/youtube-creator-copilot/apps/app/layout.tsxkits/youtube-creator-copilot/apps/app/page.tsxkits/youtube-creator-copilot/apps/next-env.d.tskits/youtube-creator-copilot/apps/next.config.mjskits/youtube-creator-copilot/apps/package.jsonkits/youtube-creator-copilot/apps/postcss.config.jskits/youtube-creator-copilot/apps/tailwind.config.tskits/youtube-creator-copilot/apps/tsconfig.jsonkits/youtube-creator-copilot/apps/tsconfig.tsbuildinfokits/youtube-creator-copilot/constitutions/default.mdkits/youtube-creator-copilot/flows/agentic-youtube-creator.tskits/youtube-creator-copilot/flows/webrevive-orchestrator.tskits/youtube-creator-copilot/lamatic.config.tskits/youtube-creator-copilot/prompts/agentic-youtube-creator_llm-node_system.mdkits/youtube-creator-copilot/prompts/webrevive-orchestrator_system.md
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 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/website-optimiser/apps/actions/orchestrate.ts`:
- Around line 149-340: Refactor normalizeReport by adding reusable safeNumber,
safeArray, safeString, and safeBool helpers, then replace the repeated inline
type and fallback checks throughout the normalized report with those helpers.
Preserve each field’s current defaults, including the USD fallback for
proposal.estimatedCost.currency and the existing mapped handling for
competitors, faqItems, timeline, and priorityFixes.
- Around line 400-405: Expand the completeness condition in the fallback logic
after normalizeReport to also require competitors, conversionAudit,
redesignSuggestions, copywriting, coldEmail, and linkedinOutreach on parsedObj.
Preserve the existing parseFailed, data, and currently validated section checks
so any missing required section triggers Raw Output Mode before normalized
defaults can mask the omission.
In `@kits/website-optimiser/apps/app/globals.css`:
- Line 1: Update the Stylelint disable comment at the top of globals.css to
remove the invalid scss/at-rule-no-unknown reference and use only the valid
at-rule-no-unknown rule.
In `@kits/website-optimiser/apps/app/page.tsx`:
- Line 132: Remove the explicit id props from the form controls associated with
FormControl in the page component, including the control using id="website-url".
Let FormControl inject the field id so FormLabel htmlFor correctly targets the
rendered control.
In `@kits/website-optimiser/apps/package.json`:
- Line 26: Update the tailwind-merge dependency in package.json to a v3 release
compatible with Tailwind CSS v4, preserving the existing dependency declaration
format so the cn helper in apps/lib/utils.ts uses the compatible twMerge
implementation.
In `@kits/website-optimiser/constitutions/default.md`:
- Around line 1-6: Replace the YouTube-focused rules in the Constitution with
WebRevive website-audit and cold-outreach guidance: require SEO and performance
claims to be grounded in provided PageSpeed data, prohibit fabricated contact
information, and require cold emails to cite real website observations. Remove
the viewer-retention, CTR, video-title, and script-outline guidance while
preserving the encouraging, professional tone where applicable.
🪄 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: ca64f5b6-1ec1-492c-80a1-8a617ab6982d
⛔ Files ignored due to path filters (1)
kits/website-optimiser/apps/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (26)
kits/website-optimiser/.env.examplekits/website-optimiser/.gitignorekits/website-optimiser/README.mdkits/website-optimiser/agent.mdkits/website-optimiser/apps/.env.examplekits/website-optimiser/apps/.vscode/settings.jsonkits/website-optimiser/apps/actions/orchestrate.tskits/website-optimiser/apps/actions/pagespeed.tskits/website-optimiser/apps/app/globals.csskits/website-optimiser/apps/app/layout.tsxkits/website-optimiser/apps/app/page.tsxkits/website-optimiser/apps/components/ui/button.tsxkits/website-optimiser/apps/components/ui/form.tsxkits/website-optimiser/apps/components/ui/input.tsxkits/website-optimiser/apps/components/ui/label.tsxkits/website-optimiser/apps/components/ui/select.tsxkits/website-optimiser/apps/lib/utils.tskits/website-optimiser/apps/next-env.d.tskits/website-optimiser/apps/next.config.mjskits/website-optimiser/apps/package.jsonkits/website-optimiser/apps/postcss.config.jskits/website-optimiser/apps/tsconfig.jsonkits/website-optimiser/constitutions/default.mdkits/website-optimiser/flows/webrevive-orchestrator.tskits/website-optimiser/lamatic.config.tskits/website-optimiser/prompts/webrevive-orchestrator_system.md
| score: typeof data.conversionAudit?.score === "number" ? data.conversionAudit.score : 0, | ||
| leadForms: { | ||
| present: !!data.conversionAudit?.leadForms?.present, | ||
| quality: data.conversionAudit?.leadForms?.quality || "", | ||
| }, | ||
| trustSignals: { | ||
| present: !!data.conversionAudit?.trustSignals?.present, | ||
| detail: data.conversionAudit?.trustSignals?.detail || "", | ||
| }, | ||
| socialProof: { | ||
| present: !!data.conversionAudit?.socialProof?.present, | ||
| detail: data.conversionAudit?.socialProof?.detail || "", | ||
| }, | ||
| ctaEffectiveness: data.conversionAudit?.ctaEffectiveness || "", | ||
| recommendations: Array.isArray(data.conversionAudit?.recommendations) ? data.conversionAudit.recommendations : [], | ||
| }, | ||
| redesignSuggestions: { | ||
| heroSection: data.redesignSuggestions?.heroSection || "", | ||
| colorPalette: { | ||
| primary: data.redesignSuggestions?.colorPalette?.primary || "", | ||
| secondary: data.redesignSuggestions?.colorPalette?.secondary || "", | ||
| accent: data.redesignSuggestions?.colorPalette?.accent || "", | ||
| rationale: data.redesignSuggestions?.colorPalette?.rationale || "", | ||
| }, | ||
| typography: { | ||
| heading: data.redesignSuggestions?.typography?.heading || "", | ||
| body: data.redesignSuggestions?.typography?.body || "", | ||
| rationale: data.redesignSuggestions?.typography?.rationale || "", | ||
| }, | ||
| navigationRedesign: data.redesignSuggestions?.navigationRedesign || "", | ||
| sectionOrder: Array.isArray(data.redesignSuggestions?.sectionOrder) ? data.redesignSuggestions.sectionOrder : [], | ||
| animationIdeas: Array.isArray(data.redesignSuggestions?.animationIdeas) ? data.redesignSuggestions.animationIdeas : [], | ||
| premiumFeatures: Array.isArray(data.redesignSuggestions?.premiumFeatures) ? data.redesignSuggestions.premiumFeatures : [], | ||
| mobileFirstImprovements: Array.isArray(data.redesignSuggestions?.mobileFirstImprovements) ? data.redesignSuggestions.mobileFirstImprovements : [], | ||
| imagePrompt: data.redesignSuggestions?.imagePrompt || "", | ||
| }, | ||
| copywriting: { | ||
| headline: data.copywriting?.headline || "", | ||
| subheadline: data.copywriting?.subheadline || "", | ||
| primaryCTA: data.copywriting?.primaryCTA || "", | ||
| secondaryCTA: data.copywriting?.secondaryCTA || "", | ||
| aboutSection: data.copywriting?.aboutSection || "", | ||
| valueProps: Array.isArray(data.copywriting?.valueProps) ? data.copywriting.valueProps : [], | ||
| faqItems: Array.isArray(data.copywriting?.faqItems) ? data.copywriting.faqItems.map((f: any) => ({ | ||
| q: f?.q || "", | ||
| a: f?.a || "", | ||
| })) : [], | ||
| footerTagline: data.copywriting?.footerTagline || "", | ||
| }, | ||
| coldEmail: { | ||
| subject: data.coldEmail?.subject || "", | ||
| body: data.coldEmail?.body || "", | ||
| followUp3Days: { | ||
| subject: data.coldEmail?.followUp3Days?.subject || "", | ||
| body: data.coldEmail?.followUp3Days?.body || "", | ||
| }, | ||
| followUp7Days: { | ||
| subject: data.coldEmail?.followUp7Days?.subject || "", | ||
| body: data.coldEmail?.followUp7Days?.body || "", | ||
| }, | ||
| }, | ||
| linkedinOutreach: { | ||
| connectionRequest: data.linkedinOutreach?.connectionRequest || "", | ||
| firstMessage: data.linkedinOutreach?.firstMessage || "", | ||
| followUpMessage: data.linkedinOutreach?.followUpMessage || "", | ||
| shortPitch: data.linkedinOutreach?.shortPitch || "", | ||
| }, | ||
| proposal: { | ||
| executiveSummary: data.proposal?.executiveSummary || "", | ||
| problemsFound: Array.isArray(data.proposal?.problemsFound) ? data.proposal.problemsFound : [], | ||
| proposedSolutions: Array.isArray(data.proposal?.proposedSolutions) ? data.proposal.proposedSolutions : [], | ||
| projectGoals: Array.isArray(data.proposal?.projectGoals) ? data.proposal.projectGoals : [], | ||
| timeline: Array.isArray(data.proposal?.timeline) ? data.proposal.timeline.map((t: any) => ({ | ||
| phase: t?.phase || "", | ||
| duration: t?.duration || "", | ||
| deliverables: Array.isArray(t?.deliverables) ? t.deliverables : [], | ||
| })) : [], | ||
| estimatedCost: { | ||
| min: typeof data.proposal?.estimatedCost?.min === "number" ? data.proposal.estimatedCost.min : 0, | ||
| max: typeof data.proposal?.estimatedCost?.max === "number" ? data.proposal.estimatedCost.max : 0, | ||
| currency: data.proposal?.estimatedCost?.currency || "USD", | ||
| notes: data.proposal?.estimatedCost?.notes || "", | ||
| }, | ||
| maintenancePlan: data.proposal?.maintenancePlan || "", | ||
| whyUs: data.proposal?.whyUs || "", | ||
| callToAction: data.proposal?.callToAction || "", | ||
| }, | ||
| finalReport: { | ||
| overallScore: typeof data.finalReport?.overallScore === "number" ? data.finalReport.overallScore : 0, | ||
| priorityFixes: Array.isArray(data.finalReport?.priorityFixes) ? data.finalReport.priorityFixes.map((pf: any) => ({ | ||
| rank: typeof pf?.rank === "number" ? pf.rank : 0, | ||
| title: pf?.title || "", | ||
| urgency: pf?.urgency || "", | ||
| estimatedImpact: pf?.estimatedImpact || "", | ||
| })) : [], | ||
| estimatedBusinessImpact: data.finalReport?.estimatedBusinessImpact || "", | ||
| executiveOneLiner: data.finalReport?.executiveOneLiner || "", | ||
| }, | ||
| }; | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
This normalizer is doing 190 lines of the same three moves, agent — extract the gadget.
Every field repeats one of three patterns: typeof x === "number" ? x : 0, Array.isArray(x) ? x : [], x || ""/!!x. Small safeNumber/safeArray/safeString/safeBool helpers would collapse this to a fraction of the size and remove an entire class of copy-paste drift risk for the next section someone adds.
♻️ Sketch of helper-based approach
const num = (v: unknown, fallback = 0) => (typeof v === "number" ? v : fallback);
const arr = <T,>(v: unknown, fallback: T[] = []) => (Array.isArray(v) ? (v as T[]) : fallback);
const str = (v: unknown, fallback = "") => (v || fallback) as string;
const bool = (v: unknown) => !!v;
// usage:
score: num(data.seoAudit?.score),
issues: arr(data.seoAudit?.issues),🤖 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/website-optimiser/apps/actions/orchestrate.ts` around lines 149 - 340,
Refactor normalizeReport by adding reusable safeNumber, safeArray, safeString,
and safeBool helpers, then replace the repeated inline type and fallback checks
throughout the normalized report with those helpers. Preserve each field’s
current defaults, including the USD fallback for proposal.estimatedCost.currency
and the existing mapped handling for competitors, faqItems, timeline, and
priorityFixes.
| if (!parseFailed && parsedObj) { | ||
| data = normalizeReport(parsedObj); | ||
| } | ||
|
|
||
| // Fallback: If parse fails or structure is incomplete, package the raw response as a report so the user can verify connection | ||
| if (parseFailed || !data || !parsedObj.websiteAnalysis || !parsedObj.seoAudit || !parsedObj.performance || !parsedObj.uiuxReview || !parsedObj.proposal || !parsedObj.finalReport) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
The safety net has holes — six sections can go missing undetected.
The completeness check only verifies websiteAnalysis, seoAudit, performance, uiuxReview, proposal, and finalReport. If the LLM omits competitors, conversionAudit, redesignSuggestions, copywriting, coldEmail, or linkedinOutreach entirely, normalizeReport silently fills them with empty defaults instead of tripping the "Raw Output Mode" fallback — so the dashboard would render a seemingly-successful report with a blank cold email and blank proposal, which is the core value of this tool.
🛠️ Proposed fix
- if (parseFailed || !data || !parsedObj.websiteAnalysis || !parsedObj.seoAudit || !parsedObj.performance || !parsedObj.uiuxReview || !parsedObj.proposal || !parsedObj.finalReport) {
+ if (
+ parseFailed ||
+ !data ||
+ !parsedObj.websiteAnalysis ||
+ !parsedObj.seoAudit ||
+ !parsedObj.performance ||
+ !parsedObj.uiuxReview ||
+ !parsedObj.competitors ||
+ !parsedObj.conversionAudit ||
+ !parsedObj.redesignSuggestions ||
+ !parsedObj.copywriting ||
+ !parsedObj.coldEmail ||
+ !parsedObj.linkedinOutreach ||
+ !parsedObj.proposal ||
+ !parsedObj.finalReport
+ ) {📝 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.
| if (!parseFailed && parsedObj) { | |
| data = normalizeReport(parsedObj); | |
| } | |
| // Fallback: If parse fails or structure is incomplete, package the raw response as a report so the user can verify connection | |
| if (parseFailed || !data || !parsedObj.websiteAnalysis || !parsedObj.seoAudit || !parsedObj.performance || !parsedObj.uiuxReview || !parsedObj.proposal || !parsedObj.finalReport) { | |
| if (!parseFailed && parsedObj) { | |
| data = normalizeReport(parsedObj); | |
| } | |
| // Fallback: If parse fails or structure is incomplete, package the raw response as a report so the user can verify connection | |
| if ( | |
| parseFailed || | |
| !data || | |
| !parsedObj.websiteAnalysis || | |
| !parsedObj.seoAudit || | |
| !parsedObj.performance || | |
| !parsedObj.uiuxReview || | |
| !parsedObj.competitors || | |
| !parsedObj.conversionAudit || | |
| !parsedObj.redesignSuggestions || | |
| !parsedObj.copywriting || | |
| !parsedObj.coldEmail || | |
| !parsedObj.linkedinOutreach || | |
| !parsedObj.proposal || | |
| !parsedObj.finalReport | |
| ) { |
🤖 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/website-optimiser/apps/actions/orchestrate.ts` around lines 400 - 405,
Expand the completeness condition in the fallback logic after normalizeReport to
also require competitors, conversionAudit, redesignSuggestions, copywriting,
coldEmail, and linkedinOutreach on parsedObj. Preserve the existing parseFailed,
data, and currently validated section checks so any missing required section
triggers Raw Output Mode before normalized defaults can mask the omission.
| @@ -0,0 +1,558 @@ | |||
| /* stylelint-disable at-rule-no-unknown scss/at-rule-no-unknown */ | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix invalid stylelint rule reference in disable comment.
The scss/at-rule-no-unknown rule does not exist in Stylelint 17.x — the correct rule is at-rule-no-unknown. The static analysis confirms this error. While VS Code CSS validation is disabled, this still causes issues if Stylelint is run via CLI or CI.
🔧 Proposed fix
-/* stylelint-disable at-rule-no-unknown scss/at-rule-no-unknown */
+/* stylelint-disable at-rule-no-unknown */📝 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.
| /* stylelint-disable at-rule-no-unknown scss/at-rule-no-unknown */ | |
| /* stylelint-disable at-rule-no-unknown */ |
🧰 Tools
🪛 Stylelint (17.14.0)
[error] 1-1: Unknown rule scss/at-rule-no-unknown. Did you mean at-rule-no-unknown?
(scss/at-rule-no-unknown)
🤖 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/website-optimiser/apps/app/globals.css` at line 1, Update the Stylelint
disable comment at the top of globals.css to remove the invalid
scss/at-rule-no-unknown reference and use only the valid at-rule-no-unknown
rule.
Source: Linters/SAST tools
| <FormLabel className="text-xs font-semibold text-zinc-400 uppercase tracking-wider">Website URL *</FormLabel> | ||
| <FormControl> | ||
| <Input | ||
| id="website-url" |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether any tests or other code reference these explicit IDs before removing them.
rg -n "website-url\|business-name\|target-service" kits/website-optimiser --type ts --type tsx -g '!**/node_modules/**' -g '!**/.next/**'Repository: Lamatic/AgentKit
Length of output: 182
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the page component around the flagged lines.
sed -n '110,230p' kits/website-optimiser/apps/app/page.tsx
# Find the form primitives used by FormControl/FormLabel.
fd -a 'form.tsx' kits/website-optimiser
fd -a 'form.*' kits/website-optimiser | sed -n '1,20p'
# Search for the explicit IDs with valid ripgrep flags.
rg -n -S "website-url|business-name|industry|target-service" kits/website-optimiser/apps/app -g '*.ts' -g '*.tsx' -g '*.js' -g '*.jsx'
# Map the form component definitions before reading them.
ast-grep outline kits/website-optimiser -p 'export const FormControl = $_' --lang typescript
ast-grep outline kits/website-optimiser -p 'export const FormLabel = $_' --lang typescriptRepository: Lamatic/AgentKit
Length of output: 9206
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,240p' kits/website-optimiser/apps/components/ui/form.tsxRepository: Lamatic/AgentKit
Length of output: 3915
🌐 Web query:
@radix-ui/react-slot prop precedence child props override slot props id merge semantics
💡 Result:
The @radix-ui/react-slot component is designed to merge props from the Slot component onto its immediate child element while ensuring both sets of props are respected [1]. Its merging logic is governed by a mergeProps function that follows specific precedence and composition rules [2][3][4]. Prop Merge Semantics: 1. Event Handlers (on*): If an event handler is present on both the Slot and the child, the Slot composes them into a single function where the child's handler is executed first, followed by the Slot's handler [2][3][4]. If the handler exists only on the Slot, that handler is used [2][4]. 2. Style Prop: The style objects from both the Slot and the child are shallowly merged, with child styles taking precedence in the event of a conflict (i.e., {...slotStyle,...childStyle }) [2][4]. 3. ClassName Prop: The className strings from both the Slot and the child are combined into a single string separated by a space [2][4]. 4. Other Props (including id): For general props (such as id), the child's props take precedence [3]. When the Slot merges these onto the child, the child's attributes effectively override any conflicting attributes defined on the Slot [3][4]. Regarding id specifically, because child props take precedence, if you provide an id prop on the child element (e.g., <Button asChild><button id="my-id" /></Button>), it will override any id generated or passed by the Radix component [3]. Users often encounter hydration issues if they rely on auto-generated IDs while manually setting IDs in specific environments like lists or dynamic tables; in such cases, explicitly defining unique IDs on the child element is the recommended practice to ensure consistency [5]. Recent updates have introduced more flexibility, allowing developers to customize this mergeProps behavior for individual Slots or globally via Slot.Provider for more advanced control over how conflicts are resolved [6].
Citations:
- 1: https://radix-ui-primitives.mintlify.app/components/slot
- 2: https://github.com/radix-ui/primitives/blob/main/packages/react/slot/src/slot.tsx
- 3: https://radix-ui-primitives.mintlify.app/concepts/composability
- 4: https://github.com/radix-ui/primitives/blob/main/packages%2Freact%2Fslot%2Fsrc%2Fslot.tsx
- 5: Hydration error caused by mismatched
idand/or ARIA attributes radix-ui/primitives#3700 - 6: slot: Add customizable
mergePropsradix-ui/primitives#3953
Mission directive: remove the explicit id props here. FormControl already injects the field id, and these child ids win in Slot, so FormLabel’s htmlFor no longer points at the rendered control.
🤖 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/website-optimiser/apps/app/page.tsx` at line 132, Remove the explicit id
props from the form controls associated with FormControl in the page component,
including the control using id="website-url". Let FormControl inject the field
id so FormLabel htmlFor correctly targets the rendered control.
| "react-hook-form": "^7.60.0", | ||
| "react-markdown": "^9.0.0", | ||
| "tailwind-merge": "^2.5.5", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check tailwind-merge latest version and Tailwind v4 support
npm view tailwind-merge versions --json | jq '.[-10:]'
npm view tailwind-merge@3 peerDependenciesRepository: Lamatic/AgentKit
Length of output: 1984
🌐 Web query:
tailwind-merge v3 Tailwind CSS v4 support official documentation changelog peerDependencies
💡 Result:
Tailwind-merge v3 is the official version required to support Tailwind CSS v4 [1][2]. Key details regarding this support include: - Version Compatibility: Tailwind-merge v3 was released specifically to add support for Tailwind CSS v4 and drop support for Tailwind CSS v3 [1][2]. Users intending to stay on Tailwind CSS v3 should continue using tailwind-merge v2.6.0 [3][4]. - Peer Dependencies: Tailwind-merge does not list Tailwind CSS as a peer dependency in its package.json [5]. The maintainer has explicitly noted that because the library does not import from Tailwind CSS, including it as a peer dependency is not strictly necessary and could cause issues in certain development environments where multiple or non-standard Tailwind versions are utilized [5]. - Documentation and Changelog: Official support updates are tracked in the tailwind-merge repository's README and changelogs [3][6][5]. You can verify the specific Tailwind CSS versions supported by any release of tailwind-merge by checking the README of that specific version's tag [5]. As of May 2026, tailwind-merge supports Tailwind CSS v4.0 through v4.3 [3][4][7]. - Migration: The v3.0.0 release includes breaking changes specifically related to Tailwind CSS v4 support, including shifts in theme scales and class syntax expectations [1]. A detailed migration guide from v2 to v3 is available in the official repository [1][2].
Citations:
- 1: https://github.com/dcastil/tailwind-merge/blob/v3.0.0/docs/changelog/v2-to-v3-migration.md
- 2: https://github.com/dcastil/tailwind-merge/releases/tag/v3.0.0
- 3: https://github.com/dcastil/tailwind-merge?tab=readme-ov-file
- 4: https://www.npmjs.com/package/tailwind-merge
- 5: Define
tailwindcssversion inpeerDependenciesdcastil/tailwind-merge#630 - 6: dcastil/tailwind-merge@v3.4.0...v3.5.0
- 7: https://github.com/dcastil/tailwind-merge/releases
Upgrade tailwind-merge to v3 for Tailwind CSS v4.
tailwindcss is pinned to v4.1.9, but tailwind-merge v2.x targets Tailwind v3. The cn helper in apps/lib/utils.ts relies on twMerge, so this can leave conflicting v4 utilities unresolved and cause styling mismatches across components.
🤖 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/website-optimiser/apps/package.json` at line 26, Update the
tailwind-merge dependency in package.json to a v3 release compatible with
Tailwind CSS v4, preserving the existing dependency declaration format so the cn
helper in apps/lib/utils.ts uses the compatible twMerge implementation.
| # Constitution | ||
|
|
||
| 1. Always prioritize viewer retention and high-CTR principles in advice. | ||
| 2. Avoid generic, boring video titles. Aim for curiosity gaps. | ||
| 3. Keep script outlines concise and action-oriented. | ||
| 4. Ensure tone is encouraging, professional, and creative. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Agent, this constitution belongs to a different mission file.
Your target is website-optimiser — a website-audit/cold-outreach kit — yet this dossier briefs the agent on YouTube retention, CTR, and video-title curiosity gaps. Looks like a cross-kit copy/paste (possibly leaked from a YouTube-focused kit in this same PR stack). These guardrails don't apply to WebRevive's SEO/performance/outreach domain at all.
Replace with rules actually relevant to WebRevive (e.g., "always ground SEO/performance claims in the provided PageSpeed data," "never fabricate contact info," "cold email must cite a real observation").
🤖 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/website-optimiser/constitutions/default.md` around lines 1 - 6, Replace
the YouTube-focused rules in the Constitution with WebRevive website-audit and
cold-outreach guidance: require SEO and performance claims to be grounded in
provided PageSpeed data, prohibit fabricated contact information, and require
cold emails to cite real website observations. Remove the viewer-retention, CTR,
video-title, and script-outline guidance while preserving the encouraging,
professional tone where applicable.
Source: Learnings
|
Hi @RohitIndurke! 👋 Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review. Steps to follow:
This helps keep the review process efficient for everyone. Thank you! 🙏 |
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>)website-optimiserkit configuration, metadata, environment templates, Git ignore rules, documentation, agent capabilities, and constitution guidelines.webrevive-orchestratorflow: