Skip to content

Refine Schemas Code Contributor Agent Definition#586

Open
1012Charan wants to merge 3 commits intomeshery:masterfrom
1012Charan:schema_agent
Open

Refine Schemas Code Contributor Agent Definition#586
1012Charan wants to merge 3 commits intomeshery:masterfrom
1012Charan:schema_agent

Conversation

@1012Charan
Copy link
Contributor

@1012Charan 1012Charan commented Jan 16, 2026

Description

Refines the existing schemas agent into a complete, blueprint-level definition in .github/agents/code-contributor.md.

Changes

  • Strict guardrails: Hard rules against editing or committing generated files (models/, typescript/generated/, dist/, openapi/build/).
  • Core patterns: Enforces reuse of v1alpha1/core types and x-order for field ordering.
  • Workflow guides: Step-by-step flows for adding new constructs and modifying existing schemas.
  • Quality gates: Pre-commit checklist for build success, clean git status, and signed commits.
  • Self-verification: Requires the agent to re-run build, lint, and template checks until the repository is clean.

Replaces the previous, incomplete schemas-code-contributor.md agent definition.

This PR fixes #583

Signed commits

  • Yes, I signed my commits.

Signed-off-by: 1012Charan <charanvengala@gmail.com>
@github-actions github-actions bot added the area/ci Continuous integration | Build and release label Jan 16, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @1012Charan, 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 significantly enhances the definition of the Meshery Schemas Code Contributor agent, providing a comprehensive blueprint for its operation within the meshery/schemas repository. It establishes clear guidelines for schema development, including explicit rules for managing generated code, standardizing schema patterns, outlining detailed workflows for adding and modifying schemas, and implementing a robust pre-commit checklist to ensure code quality and consistency. This refinement aims to streamline schema development and maintain data integrity across the Meshery ecosystem.

Highlights

  • Strict Guardrails: Hard rules have been established against editing or committing generated files, including those in models/, typescript/generated/, dist/, and openapi/build/.
  • Core Patterns Enforcement: The agent definition now enforces the reuse of v1alpha1/core types and the use of x-order for consistent field ordering in schemas.
  • Workflow Guides: Step-by-step flows are provided for adding new constructs and modifying existing schemas, ensuring a standardized approach to development.
  • Quality Gates: A comprehensive pre-commit checklist has been introduced, covering build success, clean Git status, and signed commits to maintain code quality.
  • Self-Verification: The agent is now required to re-run build, lint, and template checks until the repository is clean, promoting automated quality assurance.
  • Agent Definition Replacement: This pull request replaces the previous, incomplete schemas-code-contributor.md agent definition with a more complete and refined version.
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
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 significantly refines the schemas code contributor agent definition, providing a much more detailed and comprehensive guide. The new code-contributor.md is well-structured and covers the essential workflows and constraints for contributing to the meshery/schemas repository.

I've identified a couple of inaccuracies in the instructions that could lead to confusion or incorrect actions by the agent. My feedback includes a correction for a redundant build command and a clarification on the process for updating TypeScript exports, which is currently incomplete. Addressing these points will make the agent definition even more robust and reliable.

Comment on lines 103 to 107
6. Update `typescript/index.ts`:
```typescript
import { components as NewComponents } from "./generated/v1beta1/<construct>/<Construct>";
export type <Construct> = NewComponents["schemas"]["<Construct>Definition"];
```
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The instructions for updating typescript/index.ts are incomplete and could lead to an incorrect public API for the TypeScript package. The current example misses importing the schema file, exporting it, and does not mention adding the type to a versioned namespace.

A more accurate set of instructions should guide the agent to perform these actions, as shown in CONTRIBUTING.md and the existing typescript/index.ts file.

Here is a more complete example of the changes needed in typescript/index.ts that should be reflected in the agent's instructions:

// 1. Add new imports for the construct
import { components as NewComponents } from "./generated/v1beta1/<construct>/<Construct>";
import NewConstructSchema from "./generated/v1beta1/<construct>/<Construct>Schema";

// ... other imports

// 2. Add the new schema to the main export block
export {
  // ... existing schemas
  NewConstructSchema,
};

// ...

// 3. Add the new type to the versioned namespace
export namespace v1beta1 {
  // ... existing types
  export type <Construct> = NewComponents["schemas"]["<Construct>Definition"];
}

Please update the agent definition to reflect this more detailed process.

## Build System

```bash
make setup && npm install # Install all dependencies (first time)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The make setup command already includes npm install, so running npm install again is redundant. The instruction should be simplified to just make setup to avoid confusion and unnecessary work for the agent.

Suggested change
make setup && npm install # Install all dependencies (first time)
make setup # Install all dependencies (first time)

Signed-off-by: 1012Charan <charanvengala@gmail.com>

# Meshery Schemas Code Contributor

You are an expert-level software engineering agent specialized in contributing to **meshery/schemas**, the central repository for Meshery's schema definitions. This repository follows schema-driven development, generating Go structs and TypeScript types from OpenAPI specifications. Changes made here propagate across Meshery Server, UI, and Cloud.
Copy link
Member

Choose a reason for hiding this comment

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

Meshery CLI, MeshKit, Meshery Adapters... other ecosystem components.

Signed-off-by: 1012Charan <charanvengala@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Continuous integration | Build and release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refine Schemas Code Contributor Agent

2 participants