Skip to content

feat: [kit] Add Local Infrastructure Risk Analyzer for municipal project risk assessment#255

Open
shwetaa188 wants to merge 9 commits into
Lamatic:mainfrom
shwetaa188:agentkit-challenge
Open

feat: [kit] Add Local Infrastructure Risk Analyzer for municipal project risk assessment#255
shwetaa188 wants to merge 9 commits into
Lamatic:mainfrom
shwetaa188:agentkit-challenge

Conversation

@shwetaa188

@shwetaa188 shwetaa188 commented Jul 16, 2026

Copy link
Copy Markdown

PR Checklist

1. Select Contribution Type

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

2. General Requirements

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

3. File Structure (Check what applies)

  • [x ] config.json present with valid metadata (name, description, tags, steps, author, env keys)
  • [ x] 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)
  • [x ] No hand‑edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • [x ] npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • [ x] PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • [x ] No unrelated files or projects are modified
  • Added Local Infrastructure Risk Analyzer AgentKit kit/template for municipal infrastructure project risk assessment.
  • Added kits/infrastructure-risk-analyzer/README.md documenting the agent, its Input → Analysis → Output workflow, and setup/testing steps (env configuration, local/Lamatic execution, and webhook workflow testing).
  • Added kits/infrastructure-risk-analyzer/agent.md describing the agent’s purpose and capabilities, including producing a Stakeholder Risk Matrix with mitigation strategies.
  • Added kits/infrastructure-risk-analyzer/constitutions/default.md defining the assistant’s role, safety/refusal behavior, data-handling expectations, and professional tone.
  • Added kits/infrastructure-risk-analyzer/prompts/risk_analysis.prompt to generate a structured Stakeholder Risk Matrix (Risk Title, Impact Level, Affected Stakeholders, Mitigation Strategy) from project_description + location.
  • Added kits/infrastructure-risk-analyzer/model-configs/llama-3.3.json configuring Groq llama-3.3-70b-versatile (e.g., temperature: 0.7, max_tokens: 1024).
  • Added kits/infrastructure-risk-analyzer/lamatic.config.ts with kit metadata (name/description/version/tags/author) and a single mandatory step executeWorkflow, plus links.github pointing to kits/infrastructure-risk-analyzer (and links.deploy left blank).
  • Added kits/infrastructure-risk-analyzer/flows/infra-risk-flow.json defining the flow’s webhook-based execution:
    • Trigger: webhook with project_description and location
    • Nodes: tool Web Search (query template uses {location}) → llm Risk Analyzer Core (model llama-3.3-70b, prompt reference to kits/infrastructure-risk-analyzer/prompts/risk_analysis.prompt)
    • Output contract: status (string) and result (object)
  • Added kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts exporting the TypeScript flow definition with the same webhook schema and toolllm node chain and matching status/result output contract (including a prompt reference to the risk analysis prompt).

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Changes

The Infrastructure Risk Analyzer kit adds Lamatic configuration, model and prompt definitions, a webhook-driven analysis flow, agent governance guidance, and documentation for producing stakeholder risk matrices from infrastructure project and location inputs.

Infrastructure Risk Analyzer

Layer / File(s) Summary
Template and model setup
kits/infrastructure-risk-analyzer/lamatic.config.ts, kits/infrastructure-risk-analyzer/model-configs/llama-3.3.json, kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts
Adds template metadata, Groq Llama model defaults, and the exported flow descriptor.
Risk analysis workflow
kits/infrastructure-risk-analyzer/flows/infra-risk-flow.json, kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts, kits/infrastructure-risk-analyzer/prompts/risk_analysis.prompt
Adds webhook inputs, location-based web search, prompt-driven risk analysis, and structured status/result output fields.
Agent guidance and documentation
kits/infrastructure-risk-analyzer/constitutions/default.md, kits/infrastructure-risk-analyzer/agent.md, kits/infrastructure-risk-analyzer/README.md
Adds agent capabilities, safety and data-handling rules, workflow details, and setup instructions.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a Local Infrastructure Risk Analyzer kit for municipal project risk assessment.
Description check ✅ Passed The description follows the template and covers the required checklist sections, with only minor unchecked items left open.
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.
✨ 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.

@shwetaa188

Copy link
Copy Markdown
Author

/label agentkit-challenge

@akshatvirmani akshatvirmani changed the title [kit] Add Local Infrastructure Risk Analyzer for municipal project risk assessment feat: [kit] Add Local Infrastructure Risk Analyzer for municipal project risk assessment Jul 20, 2026
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/infrastructure-risk-analyzer

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

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-07-20T09:55:25Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@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: 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/infrastructure-risk-analyzer/README.md`:
- Around line 5-8: Update the README.md for the infrastructure risk analyzer to
include the kit’s mandatory human-readable setup guide, using the repository’s
established setup-guide content or format. Also add the required blank line
after the heading and ensure the file ends with a trailing newline, without
changing the existing workflow description.
🪄 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: 5bd8c501-2e88-48ad-a18e-6b758dbe0ee5

📥 Commits

Reviewing files that changed from the base of the PR and between 0ada432 and 730289c.

📒 Files selected for processing (5)
  • kits/infrastructure-risk-analyzer/README.md
  • kits/infrastructure-risk-analyzer/flows/infra-risk-flow.json
  • kits/infrastructure-risk-analyzer/lamatic.config.ts
  • kits/infrastructure-risk-analyzer/model-configs/llama-3.3.json
  • kits/infrastructure-risk-analyzer/prompts/risk_analysis.prompt

Comment thread kits/infrastructure-risk-analyzer/README.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Hi @shwetaa188! 👋

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! 🙏

@coderabbitai
coderabbitai Bot requested a review from d-pamneja July 21, 2026 08:07

@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/infrastructure-risk-analyzer/agent.md`:
- Around line 3-16: Update the markdown structure in the Overview, Purpose, and
Capabilities sections by adding a blank line immediately after each heading, and
ensure the document ends with exactly one newline.

In `@kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts`:
- Around line 2-6: Complete the executable flow contract represented by the
exported flow object by adding its required inputs, references, nodes, and edges
as a self-contained structure, or relocate this metadata-only descriptor outside
the flows directory so runtime discovery does not load it as a flow.
🪄 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: 6b65e8e6-5d4a-4292-8ad2-9ea8587baa0f

📥 Commits

Reviewing files that changed from the base of the PR and between 730289c and 3484780.

📒 Files selected for processing (4)
  • kits/infrastructure-risk-analyzer/README.md
  • kits/infrastructure-risk-analyzer/agent.md
  • kits/infrastructure-risk-analyzer/constitutions/default.md
  • kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts

Comment thread kits/infrastructure-risk-analyzer/agent.md Outdated
Comment thread kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts Outdated

@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: 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/infrastructure-risk-analyzer/README.md`:
- Line 15: Update the workflow endpoint testing step in the README to include a
sample request payload containing both required fields, project_description and
location, so users can successfully test the endpoint with sample infrastructure
project text.
🪄 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: bdd3a4af-7893-4c99-afc3-c05b5f6bb647

📥 Commits

Reviewing files that changed from the base of the PR and between 3484780 and bee331c.

📒 Files selected for processing (1)
  • kits/infrastructure-risk-analyzer/README.md

Comment thread kits/infrastructure-risk-analyzer/README.md

@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: 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/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts`:
- Around line 5-34: Complete the exported infrastructure risk analyzer flow by
adding the required top-level meta, inputs, references, and edges members.
Define inputs for project_description and location, reference the LLM prompt
explicitly through references, and connect the webhook trigger to
web_search_node, then to llm_analysis_node, and finally to the declared output
so the graph is executable.
🪄 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: f44fe053-3962-4de0-b674-e7bc2ae58e14

📥 Commits

Reviewing files that changed from the base of the PR and between bee331c and 3d8a00b.

📒 Files selected for processing (2)
  • kits/infrastructure-risk-analyzer/agent.md
  • kits/infrastructure-risk-analyzer/flows/infrastucture-risk-analyzer.ts

@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: 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/infrastructure-risk-analyzer/lamatic.config.ts`:
- Around line 11-14: Update the links.github configuration in the links object
to use the full URL
https://github.com/Lamatic/AgentKit/tree/main/kits/infrastructure-risk-analyzer
instead of the relative repository path.
🪄 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: 83c93270-8a06-462e-af3b-036efea346f1

📥 Commits

Reviewing files that changed from the base of the PR and between 3d8a00b and 79cbd21.

📒 Files selected for processing (1)
  • kits/infrastructure-risk-analyzer/lamatic.config.ts

Comment thread kits/infrastructure-risk-analyzer/lamatic.config.ts Outdated
@shwetaa188

Copy link
Copy Markdown
Author

Hi @amanintech @d-pamneja, all CI checks are passing and CodeRabbit has approved the changes. Ready for your final review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant