Skip to content

Add dedicated Kiro schema modules for agent/hook/power/mcp (#595)#616

Merged
avifenesh merged 2 commits intomainfrom
feat/kiro-schema-595
Mar 2, 2026
Merged

Add dedicated Kiro schema modules for agent/hook/power/mcp (#595)#616
avifenesh merged 2 commits intomainfrom
feat/kiro-schema-595

Conversation

@avifenesh
Copy link
Copy Markdown
Collaborator

@avifenesh avifenesh commented Mar 2, 2026

Summary

  • add dedicated Kiro schema modules under crates/agnix-core/src/schemas/ for agent JSON, IDE hook files, POWER.md frontmatter, and Kiro MCP config
  • export the new modules from schemas/mod.rs and include parser helpers that return structured parse errors (message + line/column)
  • add focused valid/invalid parsing tests for each new Kiro schema module
  • add an Unreleased changelog entry documenting the schema foundation work for Create dedicated Kiro schema (schemas/kiro.rs) #595

Testing

  • cargo test -p agnix-core kiro_ -- --nocapture
  • cargo test -p agnix-core schemas::kiro_ -- --nocapture
  • cargo test -p agnix-cli --test kiro_fixture_inventory -- --nocapture

Closes #595

Copilot AI review requested due to automatic review settings March 2, 2026 19:20
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes the foundational schema definitions and parsing logic for various Kiro-related configuration files. By introducing dedicated modules and structured error reporting, it significantly enhances the reliability and maintainability of Kiro's configuration processing, paving the way for improved validation and developer experience.

Highlights

  • New Kiro Schema Modules: Dedicated schema modules were added for Kiro agent JSON configurations, IDE hook files, POWER.md frontmatter, and Kiro MCP configurations.
  • Structured Parsing with Error Reporting: Parser helpers were introduced for each new schema module, providing structured parse errors that include message, line, and column information.
  • Comprehensive Testing: Focused valid and invalid parsing tests were added for each new Kiro schema module to ensure correctness and robust error handling.
Changelog
  • CHANGELOG.md
    • Added an entry documenting the new Kiro schema foundations for agent, hook, POWER.md, and MCP configurations.
Activity
  • The pull request author, avifenesh, has provided a detailed summary of the changes and testing performed.
  • Extensive test output is included, showing 87 tests passed for various Kiro functionalities, including specific tests for the new schema parsing logic, confirming the stability and correctness of the changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces dedicated schema modules for Kiro agent, hook, MCP, and power configurations, which is a great step towards structured parsing and validation. The changes are well-organized and include focused tests for each schema.

My review has identified a few areas for improvement related to maintainability and performance:

  • Code Duplication: The ParseError struct is duplicated across all new schema modules. It would be better to define it in a shared location.
  • Performance: The JSON parsing functions in kiro_agent, kiro_hook, and kiro_mcp modules parse the input string twice, which is inefficient.
  • Maintainability: The new modules use a blanket #![allow(dead_code)] attribute, which goes against the project's established practice of using more targeted lint suppression.

I've left specific comments with suggestions on how to address these points.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 725de2548a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds dedicated schema/parsing helpers for Kiro-specific file surfaces so the core can deserialize them into typed structures and surface parse errors with line/column metadata (foundation work for #595).

Changes:

  • Introduces new schema modules for Kiro agent JSON, IDE hook JSON, MCP config JSON, and POWER.md frontmatter parsing.
  • Exports the new schema modules from crates/agnix-core/src/schemas/mod.rs.
  • Adds focused unit tests for valid/invalid parsing cases and documents the work in CHANGELOG.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
crates/agnix-core/src/schemas/mod.rs Exports the new Kiro schema modules.
crates/agnix-core/src/schemas/kiro_agent.rs Adds typed deserialization + parse helper + tests for .kiro/agents/*.json.
crates/agnix-core/src/schemas/kiro_hook.rs Adds typed deserialization + parse helper + tests for .kiro/hooks/*.kiro.hook.
crates/agnix-core/src/schemas/kiro_mcp.rs Adds typed deserialization + parse helper + tests for Kiro MCP JSON configs.
crates/agnix-core/src/schemas/kiro_power.rs Adds POWER.md frontmatter/body splitting + YAML frontmatter deserialization + tests.
CHANGELOG.md Adds an Unreleased entry noting the new Kiro schema foundations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@avifenesh avifenesh merged commit cf329ff into main Mar 2, 2026
9 checks passed
@avifenesh avifenesh deleted the feat/kiro-schema-595 branch March 2, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create dedicated Kiro schema (schemas/kiro.rs)

2 participants