Skip to content

feat: Add real-estate-analyst kit - #315

Open
anshul009-18 wants to merge 2 commits into
Lamatic:mainfrom
anshul009-18:feat/real-estate-analyst
Open

feat: Add real-estate-analyst kit#315
anshul009-18 wants to merge 2 commits into
Lamatic:mainfrom
anshul009-18:feat/real-estate-analyst

Conversation

@anshul009-18

@anshul009-18 anshul009-18 commented Aug 2, 2026

Copy link
Copy Markdown

Deterministic Cap Rate / Cash-on-Cash / DSCR / NOI / GRM math in a code node, interpreted into an investor-grade Buy/Hold/Pass brief by an LLM, rendered by a minimal Next.js dashboard.

Claude-Session: https://claude.ai/code/session_01VSNmMTEQkLzS5GkMSN8M8C

PR Checklist

1. Select Contribution Type

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

2. General Requirements

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

3. File Structure (Check what applies)

  • 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
  • .env.example with placeholder values only (kits only)
  • No hand‑edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • 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
  • No unrelated files or projects are modified
  • Added the real-estate-analyst kit.
  • Added deterministic Cap Rate, Cash-on-Cash Return, DSCR, NOI, and GRM calculations.
  • Added an LLM step that converts calculated metrics into an investor-focused Buy/Hold/Pass brief.
  • Added a Next.js dashboard that displays metrics, verdicts, and expandable property briefs.
  • Added Lamatic configuration, model configuration for gpt-4o, prompts, constitution guardrails, and environment templates.
  • Added server-side orchestration through runPropertyAnalysis.
  • Added setup documentation, quickstart instructions, failure modes, and informational-use disclaimers.
  • Added application configuration files for Next.js, TypeScript, dependencies, environment variables, and ignored build artifacts.
  • Added the required root agent.md file and apps/.env.example for structural validation.
  • The flow definition is scaffolded to read Google Sheets data, run deterministic calculations, and generate investor briefs. Its nodes and edges arrays are currently empty, so no concrete flow node types are defined in the added flow file.

Deterministic Cap Rate / Cash-on-Cash / DSCR / NOI / GRM math in a code
node, interpreted into an investor-grade Buy/Hold/Pass brief by an LLM,
rendered by a minimal Next.js dashboard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSNmMTEQkLzS5GkMSN8M8C
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

Real Estate Analyst Kit

Layer / File(s) Summary
Analysis contracts and flow configuration
kits/real-estate-analyst/flows/property-analysis-flow.ts, kits/real-estate-analyst/model-configs/analyst-model.ts, kits/real-estate-analyst/prompts/brief-generation_system.md, kits/real-estate-analyst/constitutions/default.md, kits/real-estate-analyst/lamatic.config.ts, kits/real-estate-analyst/.env.example, kits/real-estate-analyst/apps/.env.example, kits/real-estate-analyst/README.md, kits/real-estate-analyst/agent.md
Adds the property-analysis flow scaffold, model settings, brief-generation rules, constitution requirements, kit metadata, environment placeholders, and setup documentation.
Lamatic client and analysis action
kits/real-estate-analyst/apps/lib/lamatic-client.ts, kits/real-estate-analyst/apps/actions/orchestrate.ts
Validates and decodes Lamatic configuration, initializes the client, executes the property_analysis flow, and returns typed property results.
Next.js application shell and result display
kits/real-estate-analyst/apps/package.json, kits/real-estate-analyst/apps/tsconfig.json, kits/real-estate-analyst/apps/next.config.mjs, kits/real-estate-analyst/apps/next-env.d.ts, kits/real-estate-analyst/apps/.gitignore, kits/real-estate-analyst/apps/app/layout.tsx, kits/real-estate-analyst/apps/app/page.tsx
Adds the Next.js application configuration, root layout, dynamic analysis page, metric table, verdict styling, expandable briefs, and generated-file ignore rules.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a summary and the required checklist, but all checklist items remain unchecked, including contribution type and validation status. Select the kit contribution type and mark each applicable requirement and validation item after confirming the results.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 clearly identifies the addition of the real-estate-analyst kit and matches the primary change.
✨ 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 Aug 2, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/real-estate-analyst

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/ ✅ Pass

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

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-08-02T06:56:52Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@coderabbitai
coderabbitai Bot requested a review from d-pamneja August 2, 2026 06:57
…st kit

CI structural validation flagged both as missing: agent.md is required at
kit root for every contribution type, and apps/.env.example is required
separately from the root .env.example for type: "kit" contributions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSNmMTEQkLzS5GkMSN8M8C

@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: 10

🤖 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/real-estate-analyst/.env.example`:
- Around line 1-3: Move the environment template containing
LAMATIC_CONFIG_REALESTATE, PROPERTY_SHEET_ID, and GOOGLE_SHEETS_API_KEY into the
kit app’s apps/.env.example location, remove the original root-level template,
and update README.md to reference the new path wherever it currently points to
the old location.

In `@kits/real-estate-analyst/apps/.gitignore`:
- Around line 1-3: Update the kit-level .gitignore entries alongside
node_modules, .next, and *.tsbuildinfo to ignore .env and other .env* files,
while explicitly allowing .env.example to remain tracked.

In `@kits/real-estate-analyst/apps/actions/orchestrate.ts`:
- Around line 19-20: Update the flow result handling around
lamaticClient.executeFlow to validate the complete resData.result.properties
payload before returning it: require an array and numeric metrics for every
property entry. Preserve valid PropertyResult[] responses, and return the
established controlled error instead of [] when validation fails so downstream
results.map() and toFixed() remain safe.

In `@kits/real-estate-analyst/apps/package.json`:
- Around line 10-20: Update kits/real-estate-analyst/apps/package.json
dependencies and configuration to add Tailwind CSS v4+ using the required
Next.js integration. In kits/real-estate-analyst/apps/app/page.tsx, replace
hard-coded inline style values in the page component with CSS-variable-backed
values and Tailwind utility classes, preserving the existing visual behavior.

In `@kits/real-estate-analyst/flows/property-analysis-flow.ts`:
- Around line 53-57: Complete the self-contained graph in
kits/real-estate-analyst/flows/property-analysis-flow.ts by replacing the empty
nodes and edges exports with the Studio-exported sheet-ingestion, calculation,
and brief-generation definitions. In
kits/real-estate-analyst/apps/actions/orchestrate.ts, import and use
../../lamatic.config to select the configured property-analysis step, keeping
environment configuration limited to SDK credentials and endpoint settings.

In `@kits/real-estate-analyst/lamatic.config.ts`:
- Line 7: Update the author metadata in the configuration to remove the personal
email address, replacing it with an approved team alias or omitting the email
while preserving the author name.
- Line 9: Replace the empty steps array in lamatic.config.ts with the canonical
property-analysis step entry, ensuring it is registered under the expected
identifier and metadata required by the kit. Then update the orchestration
lookup to resolve property_analysis from the registered steps rather than
relying on the parent config.flows.property_analysis path.

In `@kits/real-estate-analyst/model-configs/analyst-model.ts`:
- Line 5: Update the model configuration’s maxTokens setting to scale with the
number of properties or otherwise ensure all requested property sections fit
within the response budget; alternatively batch properties or cap the processed
property count so the brief is not truncated or omitted.

In `@kits/real-estate-analyst/README.md`:
- Around line 18-21: Update the setup instructions for LAMATIC_CONFIG_REALESTATE
in the README to state that base64 is encoding, not encryption, and direct users
to keep the populated value in the server-side apps/.env.local file without
committing it.
- Around line 15-16: Complete the empty Architecture section in the README by
documenting the flow-to-action-to-dashboard path, or remove the Architecture
heading if that information is not available; ensure Setup follows valid
Markdown section spacing and no empty heading remains.
🪄 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: f4a7decf-5129-4af8-889e-46434aba48e9

📥 Commits

Reviewing files that changed from the base of the PR and between c12bd02 and a5a82f9.

⛔ Files ignored due to path filters (1)
  • kits/real-estate-analyst/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (16)
  • kits/real-estate-analyst/.env.example
  • kits/real-estate-analyst/README.md
  • kits/real-estate-analyst/apps/.gitignore
  • kits/real-estate-analyst/apps/actions/orchestrate.ts
  • kits/real-estate-analyst/apps/app/layout.tsx
  • kits/real-estate-analyst/apps/app/page.tsx
  • kits/real-estate-analyst/apps/lib/lamatic-client.ts
  • kits/real-estate-analyst/apps/next-env.d.ts
  • kits/real-estate-analyst/apps/next.config.mjs
  • kits/real-estate-analyst/apps/package.json
  • kits/real-estate-analyst/apps/tsconfig.json
  • kits/real-estate-analyst/constitutions/default.md
  • kits/real-estate-analyst/flows/property-analysis-flow.ts
  • kits/real-estate-analyst/lamatic.config.ts
  • kits/real-estate-analyst/model-configs/analyst-model.ts
  • kits/real-estate-analyst/prompts/brief-generation_system.md

Comment on lines +1 to +3
LAMATIC_CONFIG_REALESTATE=
PROPERTY_SHEET_ID=
GOOGLE_SHEETS_API_KEY=

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

Mission directive: keep the environment template with the app.

This file is at kits/real-estate-analyst/.env.example, but the kit-only app contract requires kits/real-estate-analyst/apps/.env.example. Move the template and update README.md Line 19 to use the new location.

As per coding guidelines, kit Next.js apps must contain their own .env.example in the apps/ directory.

🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 3-3: [UnorderedKey] The GOOGLE_SHEETS_API_KEY key should go before the LAMATIC_CONFIG_REALESTATE key

(UnorderedKey)

🤖 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/real-estate-analyst/.env.example` around lines 1 - 3, Move the
environment template containing LAMATIC_CONFIG_REALESTATE, PROPERTY_SHEET_ID,
and GOOGLE_SHEETS_API_KEY into the kit app’s apps/.env.example location, remove
the original root-level template, and update README.md to reference the new path
wherever it currently points to the old location.

Source: Coding guidelines

Comment on lines +1 to +3
node_modules
.next
*.tsbuildinfo

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

Block local environment files from Git.

The kit uses environment-based Lamatic configuration, but this file does not ignore .env, .env.local, or other .env* files. A developer can commit a local credential accidentally. Add the exclusions and keep .env.example tracked.

Proposed fix
 node_modules
 .next
 *.tsbuildinfo
+.env*
+!.env.example

If the credentials are stored in a kit-level environment file, add the same rules to the kit-level .gitignore.

📝 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
node_modules
.next
*.tsbuildinfo
node_modules
.next
*.tsbuildinfo
.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/real-estate-analyst/apps/.gitignore` around lines 1 - 3, Update the
kit-level .gitignore entries alongside node_modules, .next, and *.tsbuildinfo to
ignore .env and other .env* files, while explicitly allowing .env.example to
remain tracked.

Comment on lines +19 to +20
const resData = await lamaticClient.executeFlow(flow.workflowId, inputs);
return resData?.result?.properties ?? [];

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)orchestrate\.ts$|RealEstate|analyst|lamatic|next|package\.json' | sed -n '1,200p'

echo "== target file =="
if [ -f kits/real-estate-analyst/apps/actions/orchestrate.ts ]; then
  ast-grep outline kits/real-estate-analyst/apps/actions/orchestrate.ts || true
  wc -l kits/real-estate-analyst/apps/actions/orchestrate.ts
  cat -n kits/real-estate-analyst/apps/actions/orchestrate.ts | sed -n '1,160p'
fi

echo "== searches results/properties/formatting =="
rg -n "results\.map|toFixed|result\.properties|executeFlow|PropertyResult|properties" kits/real-estate-analyst/apps -S || true

Repository: Lamatic/AgentKit

Length of output: 11541


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== page snippet =="
wc -l kits/real-estate-analyst/apps/app/page.tsx
cat -n kits/real-estate-analyst/apps/app/page.tsx | sed -n '1,90p'

echo "== lamatic client executeFlow definitions/usages =="
fd -a 'lamatic-client\.(ts|js|mjs)$' . | sed -n '1,50p'
for f in $(fd 'lamatic-client\.(ts|js|mjs)$' .); do
  echo "--- $f ---"
  ast-grep outline "$f" || true
  wc -l "$f"
  rg -n "executeFlow|properties|result" "$f" -C 4 || true
done

echo "== package deps lamatic/next =="
for f kits/real-estate-analyst/apps/package.json kits/real-estate-analyst/package.json; do
  [ -f "$f" ] && echo "--- $f ---" && cat "$f"
done

echo "== similar response validation in other apps =="
rg -n "result\?\.(?:properties|.*\[).*\?\?|properties\??\.map|executeFlow\([^)]+\)" kits/*/apps -S | sed -n '1,200p' || true

Repository: Lamatic/AgentKit

Length of output: 34934


🌐 Web query:

LamaticTypeScript executeFlow result properties response result type

💡 Result:

In the Lamatic TypeScript SDK, the executeFlow method returns a promise that resolves to a LamaticResponse object [1][2]. The LamaticResponse object has the following structure: { status: "success" | "error" | "failed"; // The execution status [1] result: object | null; // The payload data returned upon success [1][2] message?: string; // An error message, included if status is "error" or "failed" [1][2] statusCode: number; // The associated HTTP status code [1][2] } The SDK is written in TypeScript and provides type definitions [1][2]. You can use generics to type the expected result data when calling executeFlow [2]: const response = await lamatic.executeFlow("flow-id", payload); In this example, if the execution is successful, response.result will be typed as MyResultType [2]. Always ensure you check that response.status is "success" and that response.result is not null before accessing the result data [1][2].

Citations:


Mission safeguard: validate the flow result before return.

resData.result.properties can be missing, not an array, or contain non-numeric metrics. The page then fails in results.map() or toFixed(). Validate the complete PropertyResult[] payload before return, and return a controlled error when validation fails.

🤖 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/real-estate-analyst/apps/actions/orchestrate.ts` around lines 19 - 20,
Update the flow result handling around lamaticClient.executeFlow to validate the
complete resData.result.properties payload before returning it: require an array
and numeric metrics for every property entry. Preserve valid PropertyResult[]
responses, and return the established controlled error instead of [] when
validation fails so downstream results.map() and toFixed() remain safe.

Comment on lines +10 to +20
"dependencies": {
"lamatic": "^0.3.2",
"next": "^14.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"typescript": "^5.3.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/node": "^20.0.0"

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 | 🟠 Major | 🏗️ Heavy lift

Mission requirement: implement the required styling stack.

The app has no Tailwind CSS v4+ dependency. The page uses hard-coded inline styling instead of CSS variables.

  • kits/real-estate-analyst/apps/package.json#L10-L20: Add the required Tailwind CSS v4+ dependencies and configuration.
  • kits/real-estate-analyst/apps/app/page.tsx#L16-L56: Replace hard-coded style values with CSS-variable-backed styling and Tailwind utilities.

As per coding guidelines, kit Next.js apps must use Tailwind CSS v4+ and CSS variables for styling.

📍 Affects 2 files
  • kits/real-estate-analyst/apps/package.json#L10-L20 (this comment)
  • kits/real-estate-analyst/apps/app/page.tsx#L16-L56
🤖 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/real-estate-analyst/apps/package.json` around lines 10 - 20, Update
kits/real-estate-analyst/apps/package.json dependencies and configuration to add
Tailwind CSS v4+ using the required Next.js integration. In
kits/real-estate-analyst/apps/app/page.tsx, replace hard-coded inline style
values in the page component with CSS-variable-backed values and Tailwind
utility classes, preserving the existing visual behavior.

Source: Coding guidelines

Comment on lines +53 to +57
// ── Nodes & Edges (exact Lamatic Studio export) ───────
// SCAFFOLD — populate once this flow is built and exported from Lamatic Studio.
export const nodes = [];

export const edges = [];

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 | 🏗️ Heavy lift

Mission blocker: complete and wire the local flow definition.

The kit exports no executable graph, and the action does not read the kit step definitions. The application can execute a workflow that is not represented by this kit source.

  • kits/real-estate-analyst/flows/property-analysis-flow.ts#L53-L57: Replace the scaffold with the Studio-exported nodes and edges for sheet ingestion, calculations, and brief generation.
  • kits/real-estate-analyst/apps/actions/orchestrate.ts#L4-L19: Import and use ../../lamatic.config to select the configured property-analysis step. Keep environment configuration limited to SDK credentials and endpoint settings.

As per coding guidelines, flow files must contain self-contained nodes and edges, and apps/actions/orchestrate.ts must use ../../lamatic.config for step definitions.

📍 Affects 2 files
  • kits/real-estate-analyst/flows/property-analysis-flow.ts#L53-L57 (this comment)
  • kits/real-estate-analyst/apps/actions/orchestrate.ts#L4-L19
🤖 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/real-estate-analyst/flows/property-analysis-flow.ts` around lines 53 -
57, Complete the self-contained graph in
kits/real-estate-analyst/flows/property-analysis-flow.ts by replacing the empty
nodes and edges exports with the Studio-exported sheet-ingestion, calculation,
and brief-generation definitions. In
kits/real-estate-analyst/apps/actions/orchestrate.ts, import and use
../../lamatic.config to select the configured property-analysis step, keeping
environment configuration limited to SDK credentials and endpoint settings.

Source: Coding guidelines

"Investor-grade property analysis — Cap Rate, Cash-on-Cash Return, DSCR, and NOI computed from a Google Sheets property list, explained by an LLM.",
version: "1.0.0",
type: "kit" as const,
author: "Anshul <hianshul05@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: avoid publishing a personal contact address.

author embeds hianshul05@gmail.com in a public GitHub-linked configuration file. Unless this is an intentional public contact address, replace it with a team alias or omit the email before release.

🤖 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/real-estate-analyst/lamatic.config.ts` at line 7, Update the author
metadata in the configuration to remove the personal email address, replacing it
with an approved team alias or omitting the email while preserving the author
name.

type: "kit" as const,
author: "Anshul <hianshul05@gmail.com>",
tags: ["real-estate", "finance", "investment-analysis", "roi"],
steps: [],

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 | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files 'kits/real-estate-analyst/**' | sed -n '1,200p'

echo "== config =="
cat -n kits/real-estate-analyst/lamatic.config.ts

echo "== flows =="
fd . kits/real-estate-analyst -t f -e ts | sort | xargs -r -I{} sh -c 'echo "--- {}"; wc -l "{}"; sed -n "1,220p" "{}"' | sed -n '1,220p'

echo "== orchestrate =="
cat -n kits/real-estate-analyst/apps/actions/orchestrate.ts

echo "== references steps/config/flows =="
rg -n "steps|createFlow|property-analysis|flows/|lamatic.config|getKitConfig|kitConfig" kits/real-estate-analyst

Repository: Lamatic/AgentKit

Length of output: 8416


Mission directive: register the property-analysis step.

steps: [] violates the kit metadata requirement for lamatic.config.ts, and apps/actions/orchestrate.ts still reads config.flows.property_analysis from the parent config instead of resolving from steps. Populate steps with the canonical property-analysis entry before changing the orchestration lookup if it continues to use flows.property_analysis.

🤖 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/real-estate-analyst/lamatic.config.ts` at line 9, Replace the empty
steps array in lamatic.config.ts with the canonical property-analysis step
entry, ensuring it is registered under the expected identifier and metadata
required by the kit. Then update the orchestration lookup to resolve
property_analysis from the registered steps rather than relying on the parent
config.flows.property_analysis path.

Source: Coding guidelines

provider: "openai",
model: "gpt-4o",
temperature: 0.3,
maxTokens: 1200,

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.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 5 '\b(maxTokens|max_tokens)\b' kits --glob '*.ts' || true
rg -n -C 6 '\b(batch|chunk|limit|slice|take|rows?)\b' \
  kits/real-estate-analyst/flows \
  kits/real-estate-analyst/apps || true

Repository: Lamatic/AgentKit

Length of output: 15259


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Analyst model config"
cat -n kits/real-estate-analyst/model-configs/analyst-model.ts

echo
echo "## Flow outline"
ast-grep outline kits/real-estate-analyst/flows/property-analysis-flow.ts --view compact || true

echo
echo "## Flow contents"
cat -n kits/real-estate-analyst/flows/property-analysis-flow.ts

echo
echo "## Prompt files"
fd -n 'brief|generation|prompt' kits/real-estate-analyst -e md -e ts -e json | sort
for f in $(fd 'brief|generation|prompt' kits/real-estate-analyst -e md -e ts -e json 2>/dev/null | sort); do
  echo "===== $f ====="
  wc -l "$f"
  sed -n '1,220p' "$f" | cat -n
done

echo
echo "## Input/property references"
rg -n -C 4 -i 'properties|property|rows|sheet|generate|llm|api|chunk|slice|limit|batch|row|data' kits/real-estate-analyst --glob '*.ts' --glob '*.md' --glob '*.json'

Repository: Lamatic/AgentKit

Length of output: 3538


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Prompt/config/script files"
find kits/real-estate-analyst -maxdepth 3 \( -type f \( -name '*prompt*' -o -name '*brief*' -o -name '*generation*' -o -name '*.md' -o -name '*.ts' -o -name '*.json' \) \) -print | sort | while read -r f; do
  echo "===== ${f#"$PWD/"} ====="
  wc -l "$f"
  sed -n '1,240p' "$ f" | sed -n '1,240p' | cat -n
done

echo
echo "## Targeted references"
rg -n -C 4 -i 'properties|property|rows|sheet|generate|llm|api|chunk|slice|limit|batch|row|data|analyst_model|brief_generation|calculations|maxTokens' kits/real-estate-analyst --glob '*.ts' --glob '*.md' --glob '*.json' || true

echo
echo "## Directory tree"
find kits/real-estate-analyst -maxdepth 2 -type f | sort

Repository: Lamatic/AgentKit

Length of output: 316


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Directory tree"
find kits/real-estate-analyst -maxdepth 3 -type f | sort

echo
echo "## Text analysis"
rg -n -C 4 -i 'properties|property|rows|sheet|generate|llm|api|chunk|slice|limit|batch|row|data|analyst_model|brief_generation|calculations|maxTokens' kits/real-estate-analyst --glob '*.ts' --glob '*.md' --glob '*.json' || true

echo
echo "## README"
cat -n kits/real-estate-analyst/README.md

echo
echo "## model config"
cat -n kits/real-estate-analyst/model-configs/analyst-model.ts

echo
echo "## flow"
cat -n kits/real-estate-analyst/flows/property-analysis-flow.ts

Repository: Lamatic/AgentKit

Length of output: 28883


Mission: bound the LLM brief output size.

maxTokens: 1200 is a fixed response cap, and the brief prompt requires several sections per property. A larger sheet can exceed that budget and omit properties or truncation output. Batch properties, cap the processed property count, or derive the output cap from the property count.

🤖 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/real-estate-analyst/model-configs/analyst-model.ts` at line 5, Update
the model configuration’s maxTokens setting to scale with the number of
properties or otherwise ensure all requested property sections fit within the
response budget; alternatively batch properties or cap the processed property
count so the brief is not truncated or omitted.

Comment on lines +15 to +16
## Architecture
## Setup

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 | 🟡 Minor | ⚡ Quick win

Mission directive: complete or remove the empty Architecture section.

## Architecture is immediately followed by ## Setup with no content. Add the flow-to-action-to-dashboard path, or remove the heading. This also resolves the reported MD022 warnings.

🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 15-15: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 16-16: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)

🤖 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/real-estate-analyst/README.md` around lines 15 - 16, Complete the empty
Architecture section in the README by documenting the
flow-to-action-to-dashboard path, or remove the Architecture heading if that
information is not available; ensure Setup follows valid Markdown section
spacing and no empty heading remains.

Source: Linters/SAST tools

Comment on lines +18 to +21
1. `cd apps && npm install`
2. Copy `.env.example` to `apps/.env.local` and fill in `LAMATIC_CONFIG_REALESTATE`
(a base64-encoded JSON blob of your Lamatic project's `api` credentials and
`flows` map), `PROPERTY_SHEET_ID`, and `GOOGLE_SHEETS_API_KEY`.

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 | 🔵 Trivial

Mission directive: state that base64 is not encryption.

The setup guide describes LAMATIC_CONFIG_REALESTATE as base64-encoded API credentials. Base64 only encodes data. Tell users to keep the populated value in server-side .env.local and never commit it.

🤖 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/real-estate-analyst/README.md` around lines 18 - 21, Update the setup
instructions for LAMATIC_CONFIG_REALESTATE in the README to state that base64 is
encoding, not encryption, and direct users to keep the populated value in the
server-side apps/.env.local file without committing it.

@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: 2

🤖 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/real-estate-analyst/agent.md`:
- Line 3: Update the Markdown spacing in agent.md by adding blank lines after
each affected heading and before and after both tables. Address the headings
identified in the review while preserving all existing content so the document
passes MD022 and MD058.

In `@kits/real-estate-analyst/apps/.env.example`:
- Around line 1-3: Reorder the environment keys so GOOGLE_SHEETS_API_KEY appears
first, followed by LAMATIC_CONFIG_REALESTATE and then PROPERTY_SHEET_ID, without
changing any values.
🪄 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: 2ff2e04f-c6f2-4526-ab97-645adbd95464

📥 Commits

Reviewing files that changed from the base of the PR and between a5a82f9 and 9d71864.

📒 Files selected for processing (2)
  • kits/real-estate-analyst/agent.md
  • kits/real-estate-analyst/apps/.env.example

@@ -0,0 +1,52 @@
# Real Estate Investment Analyst

## Overview

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

Add the blank lines required by Markdown linting.

Insert a blank line after each affected heading and around both tables. agent.md currently triggers the reported MD022 and MD058 warnings.

Also applies to: 6-6, 11-11, 20-20, 26-27, 32-32, 37-37, 43-44, 51-51

🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 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/real-estate-analyst/agent.md` at line 3, Update the Markdown spacing in
agent.md by adding blank lines after each affected heading and before and after
both tables. Address the headings identified in the review while preserving all
existing content so the document passes MD022 and MD058.

Source: Linters/SAST tools

Comment on lines +1 to +3
LAMATIC_CONFIG_REALESTATE=
PROPERTY_SHEET_ID=
GOOGLE_SHEETS_API_KEY=

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

Reorder the environment keys to clear the linter warning.

Place GOOGLE_SHEETS_API_KEY before LAMATIC_CONFIG_REALESTATE, then keep PROPERTY_SHEET_ID after them. This does not change runtime behavior but clears the reported UnorderedKey warning.

🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 3-3: [UnorderedKey] The GOOGLE_SHEETS_API_KEY key should go before the LAMATIC_CONFIG_REALESTATE key

(UnorderedKey)

🤖 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/real-estate-analyst/apps/.env.example` around lines 1 - 3, Reorder the
environment keys so GOOGLE_SHEETS_API_KEY appears first, followed by
LAMATIC_CONFIG_REALESTATE and then PROPERTY_SHEET_ID, without changing any
values.

Source: Linters/SAST tools

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Hi @anshul009-18! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

@akshatvirmani

Copy link
Copy Markdown
Contributor

/validate

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📡 Running Studio validation — results will appear here shortly.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Studio Runtime Validation (Phase 2)

Studio validation failed. The kit was rejected by Lamatic Studio.

Errors

real-estate-analyst

  • Flow: property-analysis-flow — config_json.nodes must be a non-empty array

Please fix the errors above and push a new commit to re-run validation.
Refer to CONTRIBUTING.md for guidance.

@akshatvirmani

Copy link
Copy Markdown
Contributor

@anshul009-18 please resolve the comments above.

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.

2 participants