feat: Add AI PR Code Reviewer Kit - #313
Conversation
This configuration file defines an AI-powered code reviewer and security auditor with relevant metadata.
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughChangesAI PR reviewer template
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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. |
|
Failure recorded at 2026-08-01T10:57:55Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed. |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 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/ai-pr-reviewer/flows/code-review.json`:
- Line 21: Align the response schema across the systemPrompt, output validation,
and README documentation: choose one canonical field set, ensuring the
optimization suggestions key and GitHub-ready review comment key match
everywhere. Update the flow’s documented JSON contract and any validation or
consumer references together, using the existing symbols for the response schema
rather than maintaining aliases.
- Line 21: The response schema must match across both documentation and
implementation. In kits/ai-pr-reviewer/flows/code-review.json:21-21, update the
systemPrompt to use the canonical response field names; in
kits/ai-pr-reviewer/README.md:19-19, document those same keys and types,
including optimizations and pr_comment and removing or renaming
refactor_suggestions.
- Line 21: Update the systemPrompt in the code-review flow to define explicit
vulnerability severity levels and the threshold that makes the review fail, then
require pass_fail to reflect those rules. Ensure CI enforcement derives its
result from the classified vulnerabilities and configured fail threshold rather
than trusting the LLM-generated boolean alone.
- Around line 25-30: Update the output_report response configuration to enforce
a supported strict JSON schema for pass_fail, vulnerabilities, optimizations,
and pr_comment before emitting CI output. Require all four fields with their
expected types, reject markdown fences, extra text, missing keys, and type
mismatches, and preserve the existing JSON response behavior for valid results.
In `@kits/ai-pr-reviewer/lamatic.config.ts`:
- Around line 1-9: Update the default kit metadata object in lamatic.config.ts
to include the required steps entry for the AI PR code-review flow and links for
GitHub, deployment, and documentation. Align the type and author fields with the
documented metadata contract while preserving the existing identity,
description, category, and tags.
In `@kits/ai-pr-reviewer/README.md`:
- Around line 3-19: Add a human-readable Setup section to the README covering
prerequisites, AgentKit flow registration, required environment variables or
credentials, accepted code/diff input format, the structured output schema, and
a minimal CI or webhook invocation example. Keep the existing purpose and
workflow sections unchanged and document the concrete setup and consumption
steps using the kit’s established symbols and configuration names.
- Around line 5-6: Update the Markdown headings in README.md at the affected
sections, including “The Problem” and the headings at the other reported
locations, by inserting exactly one blank line after each heading. Preserve the
existing heading text and surrounding content so all MD022 violations are
resolved.
🪄 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: 5b36397f-dfa2-4c6d-bc7e-9311d3207e6f
📒 Files selected for processing (3)
kits/ai-pr-reviewer/README.mdkits/ai-pr-reviewer/flows/code-review.jsonkits/ai-pr-reviewer/lamatic.config.ts
| "config": { | ||
| "model": "gpt-4o", | ||
| "temperature": 0.1, | ||
| "systemPrompt": "You are a Principal Security Engineer and strict code reviewer. Analyze the provided code. Output a JSON object containing: 1) 'pass_fail' (boolean), 2) 'vulnerabilities' (array of strings, empty if none), 3) 'optimizations' (array of specific refactoring suggestions), and 4) 'pr_comment' (a polite markdown summary of your review ready for GitHub)." |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Align the flow fields with the documented response contract.
The systemPrompt requires optimizations and pr_comment, but kits/ai-pr-reviewer/README.md documents refactor_suggestions and omits pr_comment. Consumers can parse the wrong key or miss the GitHub-ready comment. Choose one canonical schema and use it in the prompt, output validation, and documentation.
Based on the supplied flow and README, the response field names are inconsistent.
🤖 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/ai-pr-reviewer/flows/code-review.json` at line 21, Align the response
schema across the systemPrompt, output validation, and README documentation:
choose one canonical field set, ensuring the optimization suggestions key and
GitHub-ready review comment key match everywhere. Update the flow’s documented
JSON contract and any validation or consumer references together, using the
existing symbols for the response schema rather than maintaining aliases.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Keep one response schema across the flow and README.
The flow and README define different JSON keys for the same response contract. The flow requires optimizations and pr_comment, while the README documents refactor_suggestions and omits pr_comment; this can make CI consumers parse the wrong key or miss the GitHub-ready comment.
kits/ai-pr-reviewer/flows/code-review.json#L21-L21: use the canonical field names insystemPrompt.kits/ai-pr-reviewer/README.md#L19-L19: document the same keys and types as the flow.
Based on the supplied flow and README, the response contract must be identical at both sites.
📍 Affects 2 files
kits/ai-pr-reviewer/flows/code-review.json#L21-L21(this comment)kits/ai-pr-reviewer/README.md#L19-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/ai-pr-reviewer/flows/code-review.json` at line 21, The response schema
must match across both documentation and implementation. In
kits/ai-pr-reviewer/flows/code-review.json:21-21, update the systemPrompt to use
the canonical response field names; in kits/ai-pr-reviewer/README.md:19-19,
document those same keys and types, including optimizations and pr_comment and
removing or renaming refactor_suggestions.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate flow file =="
fd -a 'code-review\.json$' . || true
echo "== inspect target file =="
if [ -f kits/ai-pr-reviewer/flows/code-review.json ]; then
cat -n kits/ai-pr-reviewer/flows/code-review.json
fi
echo "== search for code-review pass_fail usage =="
rg -n "code-review|pass_fail|vulnerabilities|strict code reviewer|systemPrompt" . || true
echo "== inspect kit package metadata =="
fd -a . kits/ai-pr-reviewer | head -50
[ -f kits/ai-pr-reviewer/package.json ] && cat -n kits/ai-pr-reviewer/package.json
[ -f kits/ai-pr-reviewer/README.md ] && cat -n kits/ai-pr-reviewer/README.mdRepository: Lamatic/AgentKit
Length of output: 35442
Define the pass_fail policy before running this flow in CI.
The LLM is asked for a pass_fail boolean, but no threshold makes it false. An LLM response can list critical security issues and still return true. Define severity levels, set explicit fail thresholds, and enforce the CI result from vulnerabilities instead of trusting the free-form boolean.
🤖 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/ai-pr-reviewer/flows/code-review.json` at line 21, Update the
systemPrompt in the code-review flow to define explicit vulnerability severity
levels and the threshold that makes the review fail, then require pass_fail to
reflect those rules. Ensure CI enforcement derives its result from the
classified vulnerabilities and configured fail threshold rather than trusting
the LLM-generated boolean alone.
| "id": "output_report", | ||
| "type": "response", | ||
| "label": "CI/CD JSON Response", | ||
| "config": { | ||
| "format": "json" | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 10 '"type": "(llm|response)"|format": "json"|schema|response_format|structured' kits --glob '*.json'Repository: Lamatic/AgentKit
Length of output: 50373
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== target file =="
wc -l kits/ai-pr-reviewer/flows/code-review.json
cat -n kits/ai-pr-reviewer/flows/code-review.json | sed -n '1,80p'
echo
echo "== focused response/json/schema occurrences in kits/ai-pr-reviewer =="
rg -n -C 6 '"id": "output_report"|"type": "response"|"format": "json"|schema|jsonOutput|parse_json|json' kits/ai-pr-reviewer --glob '*.json' --glob '*.ts' --glob '*.js' || true
echo
echo "== candidates for response node implementation =="
rg -n 'registerNode|type.*response|format[": ]+.json|json-format|parse.*json|response_format|structured' kits/ai-pr-reviewer packages core src --glob '*.ts' --glob '*.js' --glob '*.tsx' --glob '*.jsx' || trueRepository: Lamatic/AgentKit
Length of output: 3505
🌐 Web query:
Lamatic AgentKit response node format json schema validation
💡 Result:
In the Lamatic ecosystem, there is no single monolithic "response node schema validation" format. Instead, validation is handled through specific nodes and configuration practices depending on whether you are working with flow-level response definitions or agent-level structured data generation [1][2]. 1. Flow Response Node: The responseNode in a flow configuration does not typically enforce a strict JSON schema validation at the node level itself [1]. Instead, it uses an outputMapping block within the node configuration to aggregate data from previous nodes [1]. This mapping uses a dictionary of key-value pairs where you can structure your final response by referencing outputs from earlier nodes (e.g., "{{LLMNode_187.output.generatedResponse}}") [1]. 2. Structured Data Generation: If you require strict JSON schema validation, you should use the Generate JSON Node [2][3]. This node is specifically designed to enforce a fixed output shape [3]. It allows you to define an Output Schema using Zod JSON, which the AI model then uses to generate structured JSON data that conforms to your specified rules [2]. 3. AgentKit Validation: If you are referring to validating AgentKit contributions or configurations, this is handled by external tools rather than a runtime response node [4]. The @lamatic/mcp tools, specifically kit_validate_structure, are used to perform structural checks on local kit folders to ensure they meet the project requirements before submitting a PR [5][4]. Summary of approaches: - To shape final output: Use outputMapping in the responseNode [1]. - To enforce strict JSON structure: Use the Generate JSON Node with a Zod JSON schema [2]. - To validate AgentKit projects: Use the @lamatic/mcp utility tool kit_validate_structure [5][4].
Citations:
- 1: https://lamatic.ai/docs/flows/flow-config
- 2: https://lamatic.ai/docs/nodes/ai/generate-json-node
- 3: https://lamatic.ai/docs/agents/json-agent
- 4: https://glama.ai/mcp/servers/Lamatic/Lamatic-MCP
- 5: https://glama.ai/mcp/servers/Lamatic/Lamatic-MCP/tools/kit_validate_structure
Mission requirement: enforce the CI JSON shape before emitting output.
output_report only declares "format": "json". The LLM prompt requests four typed fields, but the flow has no schema or validation for pass_fail, vulnerabilities, optimizations, and pr_comment. Add a supported strict schema validation before the CI output so markdown fences, extra text, missing keys, and wrong types cannot pass as valid JSON.
🤖 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/ai-pr-reviewer/flows/code-review.json` around lines 25 - 30, Update the
output_report response configuration to enforce a supported strict JSON schema
for pass_fail, vulnerabilities, optimizations, and pr_comment before emitting CI
output. Require all four fields with their expected types, reject markdown
fences, extra text, missing keys, and type mismatches, and preserve the existing
JSON response behavior for valid results.
| export default { | ||
| id: "ai-pr-reviewer", | ||
| name: "AI PR Code Reviewer & Security Auditor", | ||
| description: "An automated agent that analyzes git diffs or code snippets for security vulnerabilities, performance bottlenecks, and clean-code refactoring.", | ||
| type: "template", | ||
| author: "Sushobhita Majhi", | ||
| category: "Developer Tools / CI-CD", | ||
| tags: ["LLM", "Code Review", "DevSecOps", "Agentic Workflow"] | ||
| }; |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate configs =="
git ls-files 'kits/*/lamatic.config.ts' | sed -n '1,80p'
echo
echo "== targeted configs =="
for f in kits/ai-pr-reviewer/lamatic.config.ts kits/sentinel-iq/lamatic.config.ts; do
if [ -f "$f" ]; then
echo "--- $f ---"
cat -n "$f"
fi
done
echo
echo "== files in ai-pr-reviewer =="
git ls-files kits/ai-pr-reviewer | sed -n '1,120p'
echo
echo "== schema/metadata references for kit config fields =="
rg -n "lamatic\.config|type: \"template\"|type: \"kit\"|author|steps|links" -S --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' . | sed -n '1,220p'Repository: Lamatic/AgentKit
Length of output: 15738
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== flow id =="
python3 - <<'PY'
import json
from pathlib import Path
p = Path('kits/ai-pr-reviewer/flows/code-review.json')
if p.exists():
data = json.loads(p.read_text())
print("file:", p)
for key in ["name", "id", "type", "title", "steps"]:
print(f"{key}:", repr(data.get(key)))
PY
echo
echo "== lamatic.config metadata docs =="
sed -n '85,125p' CLAUDE.md
echo
echo "== registry entries for ai-pr-reviewer =="
python3 - <<'PY'
import json
from pathlib import Path
p = Path('registry.json')
if p.exists():
data = json.loads(p.read_text())
if isinstance(data, list):
entries = [e for e in data if e.get('id') == 'ai-pr-reviewer' or e.get('name') == 'AI PR Code Reviewer & Security Auditor']
else:
entries = []
print("match_count:", len(entries))
for e in entries[:5]:
print(json.dumps({k:e.get(k) for k in sorted(e.keys()) if k in {'id','name','type','author','steps','links'}}, indent=2))
PY
echo
echo "== occurrences of ai-pr-reviewer =="
rg -n "ai-pr-reviewer|AI PR Code Reviewer" -S --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' . | sed -n '1,120p'Repository: Lamatic/AgentKit
Length of output: 1880
Mission: register the code-review flow in kit metadata.
kits/ai-pr-reviewer/lamatic.config.ts is missing required steps and links. Add a steps entry for the code-review flow and populate the kit metadata links for GitHub/deploy/docs. Use the documented type/author metadata shape so this kit passes the metadata contract.
🤖 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/ai-pr-reviewer/lamatic.config.ts` around lines 1 - 9, Update the default
kit metadata object in lamatic.config.ts to include the required steps entry for
the AI PR code-review flow and links for GitHub, deployment, and documentation.
Align the type and author fields with the documented metadata contract while
preserving the existing identity, description, category, and tags.
Source: Coding guidelines
| An agentic workflow built on **Lamatic.ai AgentKit** designed to automate Pull Request reviews. This agent acts as a first line of defense in CI/CD pipelines by analyzing code snippets or git diffs for security vulnerabilities and performance improvements. | ||
|
|
||
| ## The Problem | ||
| Manual code reviews are time-consuming, and senior engineers often waste hours pointing out basic linting errors or missing security checks. | ||
|
|
||
| ## The Solution (This Agent) | ||
| By integrating this AgentKit flow into a webhook or CI pipeline, development teams get instant, structured feedback on their code before a human ever looks at it. | ||
|
|
||
| ## Features | ||
| - **Security Audit:** Flags OWASP top 10 vulnerabilities (e.g., SQL injection, hardcoded secrets). | ||
| - **Code Optimization:** Suggests specific refactors for time/space complexity. | ||
| - **Structured JSON Output:** Returns actionable data that can be parsed directly into GitHub PR comments. | ||
|
|
||
| ## Workflow Structure | ||
| 1. **Trigger:** Receives raw code or a git diff. | ||
| 2. **Review Node (LLM):** A highly constrained prompt evaluates the code against strict engineering standards. | ||
| 3. **Formatting Node:** Outputs a structured JSON payload with `vulnerabilities`, `refactor_suggestions`, and a `pass_fail` boolean. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Mission requirement: add a human-readable setup guide.
This README describes the purpose and workflow but does not explain how to install, register, configure, invoke, or consume the kit. Add a Setup section with prerequisites, flow registration, required environment variables or credentials, input format, output schema, and a minimal CI or webhook example.
As per coding guidelines, each kits/*/README.md file must contain a human-readable setup guide.
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 5-5: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 8-8: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 11-11: 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; 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/ai-pr-reviewer/README.md` around lines 3 - 19, Add a human-readable
Setup section to the README covering prerequisites, AgentKit flow registration,
required environment variables or credentials, accepted code/diff input format,
the structured output schema, and a minimal CI or webhook invocation example.
Keep the existing purpose and workflow sections unchanged and document the
concrete setup and consumption steps using the kit’s established symbols and
configuration names.
Source: Coding guidelines
| ## The Problem | ||
| Manual code reviews are time-consuming, and senior engineers often waste hours pointing out basic linting errors or missing security checks. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the Markdown heading spacing.
Insert one blank line after the headings at Line 5, Line 8, Line 11, and Line 16. markdownlint-cli2 reports MD022 for each location, which can fail documentation checks.
Based on the supplied static-analysis report, these four MD022 violations require correction.
Also applies to: 8-9, 11-12, 16-17
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 5-5: 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/ai-pr-reviewer/README.md` around lines 5 - 6, Update the Markdown
headings in README.md at the affected sections, including “The Problem” and the
headings at the other reported locations, by inserting exactly one blank line
after each heading. Preserve the existing heading text and surrounding content
so all MD022 violations are resolved.
Source: Linters/SAST tools
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/ai-pr-reviewer/agent.md`:
- Around line 1-2: Insert a single blank line immediately after the “AI PR Code
Reviewer” heading in the document, before the descriptive paragraph, while
leaving the heading and surrounding content unchanged.
🪄 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: 8e082726-edd2-4d4a-9a91-98379a54fc75
📒 Files selected for processing (1)
kits/ai-pr-reviewer/agent.md
| # AI PR Code Reviewer | ||
| This agent automatically reviews code for security vulnerabilities and performance bottlenecks, acting as a first line of defense in your CI/CD pipeline. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Mission requirement: add the missing blank line.
Insert one blank line after the AI PR Code Reviewer heading. This fixes Markdown rule MD022 and preserves the documented agent identity and capabilities.
Proposed fix
# AI PR Code Reviewer
+
This agent automatically reviews code for security vulnerabilities and performance bottlenecks, acting as a first line of defense in your CI/CD pipeline.📝 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.
| # AI PR Code Reviewer | |
| This agent automatically reviews code for security vulnerabilities and performance bottlenecks, acting as a first line of defense in your CI/CD pipeline. | |
| # AI PR Code Reviewer | |
| This agent automatically reviews code for security vulnerabilities and performance bottlenecks, acting as a first line of defense in your CI/CD pipeline. |
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 1-1: 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/ai-pr-reviewer/agent.md` around lines 1 - 2, Insert a single blank line
immediately after the “AI PR Code Reviewer” heading in the document, before the
descriptive paragraph, while leaving the heading and surrounding content
unchanged.
Source: Linters/SAST tools
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- changed files ---'
git diff --name-status "$(git merge-base HEAD origin/main)" HEAD 2>/dev/null || git diff --name-status HEAD~1 HEAD
printf '%s\n' '--- kit file structure ---'
fd . kits/ai-pr-reviewer --type f 2>/dev/null | sort
printf '%s\n' '--- agent.md with line numbers ---'
nl -ba kits/ai-pr-reviewer/agent.md
printf '%s\n' '--- configuration and flow ---'
for f in kits/ai-pr-reviewer/lamatic.config.ts kits/ai-pr-reviewer/flows/code-review.json kits/ai-pr-reviewer/README.md kits/ai-pr-reviewer/constitutions/default.md; do
if [ -f "$f" ]; then
echo "### $f"
nl -ba "$f"
fi
done
printf '%s\n' '--- markdownlint configuration ---'
fd -HI 'markdownlint*' . --max-depth 3 --type f -x sh -c 'echo "### $1"; cat "$1"' sh {} \;Length of output: 1603
🏁 Script executed:
#!/bin/bash
set -euo pipefail
print_file() {
file="$1"
if [ -f "$file" ]; then
printf '\n### %s\n' "$file"
awk '{ printf "%6d %s\n", NR, $0 }' "$file"
fi
}
print_file kits/ai-pr-reviewer/agent.md
print_file kits/ai-pr-reviewer/lamatic.config.ts
print_file kits/ai-pr-reviewer/flows/code-review.ts
print_file kits/ai-pr-reviewer/README.md
print_file kits/ai-pr-reviewer/constitutions/default.md
printf '\n--- relevant repository examples ---\n'
find kits -path '*/flows/*.ts' -type f -print | head -20 | while IFS= read -r file; do
printf '\n### %s\n' "$file"
sed -n '1,160p' "$file"
done
printf '\n--- Markdown lint configuration ---\n'
find . -maxdepth 3 -type f \( -iname '*markdownlint*' -o -name '.remarkrc*' \) -print | while IFS= read -r file; do
printf '\n### %s\n' "$file"
sed -n '1,200p' "$file"
doneLength of output: 161730
@IamSushii, mission review complete.
Findings
-
Blocking — Flow module does not use the AgentKit flow format
kits/ai-pr-reviewer/flows/code-review.tsexports a raw{ name, nodes, edges }object. Other kit flows exportmeta,inputs,references,nodes, andedges, then default-export those values. The current node types ("trigger","llm","response") also do not match the Lamatic node definitions used by the repository. The template will not load as an executable AgentKit flow. Convert this file to the established flow module format. -
Minor — Markdown heading requires a blank line
kits/ai-pr-reviewer/agent.mdLine 1 must have one blank line before the description on Line 2. This resolves MD022.
You are interacting with an AI system.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@IamSushii your pr is not up to the mark. Please check contributing md file as well |
|
@coderabbitai review |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/ai-pr-reviewer/flows/code-review.ts`:
- Around line 1-4: Add the missing top-level meta, inputs, and references
sections to the default exported flow object in code-review.ts, alongside the
existing name, description, nodes, and edges. Populate them with the flow
metadata, input contract, and node references required for a self-contained
kits/*/flows/*.ts definition, while preserving the existing nodes and edges.
🪄 Autofix
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: ef6fb36a-621c-4517-9b8b-715dcbc2c4e6
📒 Files selected for processing (1)
kits/ai-pr-reviewer/flows/code-review.ts
| export default { | ||
| "name": "Automated Code Review Flow", | ||
| "description": "Analyzes input code snippets for security vulnerabilities and optimization opportunities.", | ||
| "nodes": [ |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Mission requirement: add the required self-contained flow sections.
The export defines name, description, nodes, and edges, but it does not define meta, inputs, or references. Add the required top-level sections and place the flow metadata, input contract, and node references in them before merge.
As per coding guidelines, each kits/*/flows/*.ts file must contain self-contained meta, inputs, references, nodes, and edges.
🤖 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/ai-pr-reviewer/flows/code-review.ts` around lines 1 - 4, Add the missing
top-level meta, inputs, and references sections to the default exported flow
object in code-review.ts, alongside the existing name, description, nodes, and
edges. Populate them with the flow metadata, input contract, and node references
required for a self-contained kits/*/flows/*.ts definition, while preserving the
existing nodes and edges.
Source: Coding guidelines
|
|
@coderabbitai fix |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Contribution guidance =='
if [ -f CONTRIBUTING.md ]; then
cat -n CONTRIBUTING.md
else
fd -HI '^CONTRIBUTING\.md$' . -x sh -c 'echo "== $1 =="; cat -n "$1"' sh {}
fi
printf '%s\n' '== Added kit files =='
fd -HI . kits/ai-pr-reviewer -t f -x sh -c 'echo "== $1 =="; cat -n "$1"' sh {}
printf '%s\n' '== Existing kit configuration and flow examples =='
fd -HI '^lamatic\.config\.ts$' kits -t f -E ai-pr-reviewer | head -n 5 | while IFS= read -r file; do
echo "== $file =="
cat -n "$file"
done
fd -HI . kits -t f -g '*.ts' -E ai-pr-reviewer | rg -n -m 5 -C 6 'model|temperature|json|flow' || trueLength of output: 34518 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== PR metadata and changed files =='
gh pr view 313 --repo Lamatic/AgentKit --json title,files \
--jq '"title: \(.title)\nchanged files:\n" + (.files[].path)'
printf '%s\n' '== Reference template map =='
ast-grep outline kits/article-summariser --items all
printf '%s\n' '== Reference template metadata and flow =='
for file in \
kits/article-summariser/lamatic.config.ts \
kits/article-summariser/flows/article-summariser.ts
do
if [ -f "$file" ]; then
echo "== $file =="
cat -n "$file"
fi
done
printf '%s\n' '== Referenced prompt and model configuration examples =='
fd -HI . kits/article-summariser -t f \
| rg '/(prompts/.*\.md|model-configs/.*\.ts)$' \
| head -n 10 \
| while IFS= read -r file; do
echo "== $file =="
cat -n "$file"
doneLength of output: 19977
The remaining work is inside
You are interacting with an AI system. |
|
Hi @IamSushii! 👋 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/ai-pr-reviewer)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)
lamatic.config.tspresent with valid metadataflows/<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>)Hi team! Submitting my AgentKit challenge. I built an AI PR Code Reviewer that evaluates code for security vulnerabilities and outputs structured JSON.
kits/ai-pr-revieweras an AI code review and security audit kit.README.mdwith the kit purpose, CI/CD workflow, security checks, optimization checks, and structured JSON output.agent.mdwith the agent role and review focus.constitutions/default.mdwith security, refactoring, and GitHub comment guidelines.lamatic.config.tswith kit metadata, classification tags, author details, and the GitHub kit link.flows/code-review.tswith a three-stage flow:flow.json; therefore, no separateflow.jsonnode-type definitions were available to inspect.