Skip to content

feat: Add class diagram for core AgentStack agents and tools#8

Merged
ssdeanx merged 1 commit intomainfrom
develop
Dec 5, 2025
Merged

feat: Add class diagram for core AgentStack agents and tools#8
ssdeanx merged 1 commit intomainfrom
develop

Conversation

@ssdeanx
Copy link
Owner

@ssdeanx ssdeanx commented Dec 5, 2025

  • Introduced a new section in the README for the class diagram.
  • Documented the structure and relationships of core agents and tools including:
    • Agent
    • Tool
    • codingTeamNetwork
    • codingA2ACoordinator
    • codeArchitectAgent
    • codeReviewerAgent
    • testEngineerAgent
    • refactoringAgent
    • Various coding tools (codeAnalysisTool, codeSearchTool, etc.)

Summary by Sourcery

Documentation:

  • Add a README section with a Mermaid class diagram illustrating the structure and relationships between core agents and coding tools.

- Introduced a new section in the README for the class diagram.
- Documented the structure and relationships of core agents and tools including:
  - Agent
  - Tool
  - codingTeamNetwork
  - codingA2ACoordinator
  - codeArchitectAgent
  - codeReviewerAgent
  - testEngineerAgent
  - refactoringAgent
  - Various coding tools (codeAnalysisTool, codeSearchTool, etc.)
Copilot AI review requested due to automatic review settings December 5, 2025 20:12
@continue
Copy link

continue bot commented Dec 5, 2025

Keep this PR in a mergeable state →

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts

@ssdeanx ssdeanx merged commit e9476bf into main Dec 5, 2025
7 of 8 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • Documentation
    • Added a Class Diagram to the README providing a visual representation of the system's architecture, including agent types, tool types, and their relationships.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Added a new "Class Diagram" section to README.md featuring a Mermaid diagram that illustrates the architecture of Agent and Tool entities, including specialized agent classes (coding team network, coordinator, architect, reviewer, test engineer, refactoring) and corresponding tool classes with their inheritance, composition, and association relationships.

Changes

Cohort / File(s) Change Summary
Documentation
README.md
Added a new "Class Diagram" section containing a Mermaid class diagram depicting Agent and Tool entities, specialized agent subclasses, tool implementations, and their relationships (inheritance, composition, aggregation, associations)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • The change is purely documentation without functional impact
  • Diagram syntax should be briefly validated for correctness and clarity
  • No logic, runtime behavior, or exported entities affected

Poem

A diagram blooms in the README's glow, 🐰
Agents and Tools in a structured flow,
Classes aligned like rows in a garden,
Relations so clear, no need for a pardon! 🌿

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db018cf and 17f128c.

📒 Files selected for processing (1)
  • README.md (1 hunks)

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 and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ssdeanx, 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 project's documentation by introducing a comprehensive class diagram into the README.md. This diagram provides a clear visual representation of the core AgentStack agents and tools, outlining their properties and interconnections, which will greatly aid in understanding the system's architecture and component relationships.

Highlights

  • New Documentation Section: A new 'Class Diagram' section has been added to the project's README.md file.
  • Core AgentStack Architecture: The class diagram visually documents the structure and relationships of core AgentStack agents (e.g., Agent, codingTeamNetwork, codeArchitectAgent) and tools (e.g., Tool, codeAnalysisTool, testGeneratorTool).
  • Mermaid Diagram Integration: The documentation now includes a detailed Mermaid class diagram, illustrating inheritance and association between various components like agents and their associated tools.
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.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

🤖 Hi @ssdeanx, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 5, 2025

Reviewer's Guide

Adds a new README section containing a Mermaid-based class diagram that documents the structure and relationships of the core AgentStack agents and tools.

Class diagram for core AgentStack agents and tools

classDiagram
  class Agent {
    +string id
    +string name
    +string description
    +function instructions runtimeContext
    +model model
    +memory memory
    +tools tools
    +agents agents
    +workflows workflows
    +scorers scorers
    +number maxRetries
  }

  class Tool {
    +string id
    +string description
    +inputSchema inputSchema
    +outputSchema outputSchema
    +function execute context
  }

  class codingTeamNetwork {
    +string id
    +string name
    +string description
    +agents coding_agents
  }

  class codingA2ACoordinator {
    +string id
    +string name
    +string description
    +agents coding_agents
  }

  class codeArchitectAgent {
    +string id
    +string name
    +string description
    +UserTier userTier
    +string language
    +string projectRoot
  }

  class codeReviewerAgent {
    +string id
    +string name
    +string description
  }

  class testEngineerAgent {
    +string id
    +string name
    +string description
  }

  class refactoringAgent {
    +string id
    +string name
    +string description
  }

  class codeAnalysisTool {
    +string id
    +string description
    +CodeAnalysisInput inputSchema
    +CodeAnalysisOutput outputSchema
  }

  class codeSearchTool {
    +string id
    +string description
    +CodeSearchInput inputSchema
    +CodeSearchOutput outputSchema
  }

  class diffReviewTool {
    +string id
    +string description
    +DiffReviewInput inputSchema
    +DiffReviewOutput outputSchema
  }

  class multiStringEditTool {
    +string id
    +string description
    +MultiStringEditInput inputSchema
    +MultiStringEditOutput outputSchema
  }

  class testGeneratorTool {
    +string id
    +string description
    +TestGeneratorInput inputSchema
    +TestGeneratorOutput outputSchema
  }

  Agent <|-- codingTeamNetwork
  Agent <|-- codingA2ACoordinator
  Agent <|-- codeArchitectAgent
  Agent <|-- codeReviewerAgent
  Agent <|-- testEngineerAgent
  Agent <|-- refactoringAgent

  Tool <|-- codeAnalysisTool
  Tool <|-- codeSearchTool
  Tool <|-- diffReviewTool
  Tool <|-- multiStringEditTool
  Tool <|-- testGeneratorTool

  codingTeamNetwork o-- codeArchitectAgent
  codingTeamNetwork o-- codeReviewerAgent
  codingTeamNetwork o-- testEngineerAgent
  codingTeamNetwork o-- refactoringAgent

  codingA2ACoordinator o-- codeArchitectAgent
  codingA2ACoordinator o-- codeReviewerAgent
  codingA2ACoordinator o-- testEngineerAgent
  codingA2ACoordinator o-- refactoringAgent

  codeArchitectAgent --> codeAnalysisTool
  codeArchitectAgent --> codeSearchTool

  codeReviewerAgent --> codeAnalysisTool
  codeReviewerAgent --> diffReviewTool
  codeReviewerAgent --> codeSearchTool

  testEngineerAgent --> codeAnalysisTool
  testEngineerAgent --> testGeneratorTool
  testEngineerAgent --> codeSearchTool

  refactoringAgent --> multiStringEditTool
  refactoringAgent --> codeAnalysisTool
  refactoringAgent --> diffReviewTool
  refactoringAgent --> codeSearchTool
Loading

File-Level Changes

Change Details Files
Document core AgentStack agent and tool architecture with a Mermaid class diagram in the README.
  • Add a new 'Class Diagram' section near the end of the README with a short introductory bullet
  • Define generic Agent and Tool base classes with key properties and methods in Mermaid syntax
  • Add specialized agent classes (codingTeamNetwork, codingA2ACoordinator, codeArchitectAgent, codeReviewerAgent, testEngineerAgent, refactoringAgent) with their identifiers and key attributes
  • Add specialized coding tool classes (codeAnalysisTool, codeSearchTool, diffReviewTool, multiStringEditTool, testGeneratorTool) with associated input/output schemas
  • Declare inheritance relationships from specialized agents to Agent and tools to Tool, and composition/usage links between coordinators/teams, agents, and tools
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider normalizing class names to a consistent convention (e.g., PascalCase for all classes like CodingTeamNetwork, CodingA2ACoordinator) to better align with typical UML/Mermaid style and improve readability.
  • The class members mix explicit types (e.g., +string id) and untyped fields (e.g., +description); it may be clearer to either add types for all properties or drop types entirely for consistency in the diagram.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider normalizing class names to a consistent convention (e.g., PascalCase for all classes like CodingTeamNetwork, CodingA2ACoordinator) to better align with typical UML/Mermaid style and improve readability.
- The class members mix explicit types (e.g., `+string id`) and untyped fields (e.g., `+description`); it may be clearer to either add types for all properties or drop types entirely for consistency in the diagram.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@greptile-apps
Copy link

greptile-apps bot commented Dec 5, 2025

Greptile Overview

Greptile Summary

This PR adds a comprehensive class diagram to the README.md file to document the core architecture of AgentStack's agents and tools. The diagram uses Mermaid syntax to visualize the relationships between the base Agent and Tool classes and their specific implementations. It shows six agent classes (codingTeamNetwork, codingA2ACoordinator, codeArchitectAgent, codeReviewerAgent, testEngineerAgent, refactoringAgent) that inherit from the Agent base class, and five coding tool implementations that inherit from the Tool base class. The diagram properly illustrates inheritance relationships using UML notation and serves as architectural documentation to help developers understand the structure and relationships within the AgentStack framework.

Important Files Changed

Filename Score Overview
README.md 5/5 Added comprehensive class diagram documenting core AgentStack agents and tools architecture

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects straightforward documentation addition with no code changes or breaking modifications
  • No files require special attention as this is purely a documentation enhancement

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

🤖 I'm sorry @ssdeanx, but I was unable to process your request. Please see the logs for more details.

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 introduces a valuable class diagram to the README, significantly improving the documentation of the core agent and tool architecture. The diagram is well-structured and accurately reflects the relationships between components. I have one suggestion to enhance the consistency of how agent properties are represented, which will make the diagram even more informative. Overall, this is an excellent contribution.

Comment on lines +425 to +450
class codeArchitectAgent {
+id = "code-architect"
+name = "Code Architect Agent"
+description
+UserTier userTier
+string language
+string projectRoot
}

class codeReviewerAgent {
+id = "code-reviewer"
+name = "Code Reviewer Agent"
+description
}

class testEngineerAgent {
+id = "test-engineer"
+name = "Test Engineer Agent"
+description
}

class refactoringAgent {
+id = "refactoring"
+name = "Refactoring Agent"
+description
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This class diagram is a great addition for understanding the agent architecture.

There's a small inconsistency in how agent properties derived from runtimeContext are displayed. The codeArchitectAgent class includes userTier, language, and projectRoot, but other agents like codeReviewerAgent, testEngineerAgent, and refactoringAgent—which also use these context properties—do not have them listed in the diagram.

For better consistency and to make the diagram more informative about what context each agent uses, I suggest adding these properties to the other agent classes as well. This will make it clearer at a glance what contextual information each agent depends on.

  class codeArchitectAgent {
    +id = "code-architect"
    +name = "Code Architect Agent"
    +description
    +UserTier userTier
    +string language
    +string projectRoot
  }

  class codeReviewerAgent {
    +id = "code-reviewer"
    +name = "Code Reviewer Agent"
    +description
    +UserTier userTier
    +string language
  }

  class testEngineerAgent {
    +id = "test-engineer"
    +name = "Test Engineer Agent"
    +description
    +UserTier userTier
    +string language
  }

  class refactoringAgent {
    +id = "refactoring"
    +name = "Refactoring Agent"
    +description
    +UserTier userTier
    +string language
    +string projectRoot
  }

Copy link
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

This pull request adds comprehensive documentation to the README by introducing a Mermaid class diagram that visualizes the core AgentStack architecture. The diagram illustrates the relationships between base classes (Agent, Tool), specialized coding agents, coordination components, and their associated tools.

Key Changes

  • Added a new "Class Diagram" section to document the agent and tool architecture
  • Documented 6 agent implementations (including 2 networks/coordinators and 4 specialized coding agents)
  • Documented 5 coding tools with their relationships to agents
  • Used Mermaid syntax to create an interactive, visual representation of the system architecture

+string id
+string name
+string description
+function instructions(runtimeContext)
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The instructions method should use proper type annotations in the class diagram. Consider +instructions(runtimeContext: RuntimeContext): object instead of +function instructions(runtimeContext) for better clarity and consistency with TypeScript conventions.

Suggested change
+function instructions(runtimeContext)
+instructions(runtimeContext: RuntimeContext): object

Copilot uses AI. Check for mistakes.
+string description
+inputSchema
+outputSchema
+function execute(context)
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The execute method should use proper type annotations in the class diagram. Consider +execute(context: InputContext): Promise<Output> instead of +function execute(context) for better clarity and consistency with TypeScript conventions.

Suggested change
+function execute(context)
+execute(context: InputContext): Promise<Output>

Copilot uses AI. Check for mistakes.
Comment on lines +394 to +400
+model
+memory
+tools
+agents
+workflows
+scorers
+maxRetries
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Several Agent properties lack type information in the class diagram. For clarity and consistency with the codebase, consider adding types:

  • +model: Model
  • +memory: Memory
  • +tools: Record<string, Tool>
  • +agents: Record<string, Agent>
  • +workflows: Record<string, Workflow>
  • +scorers: Record<string, Scorer>
  • +maxRetries: number
Suggested change
+model
+memory
+tools
+agents
+workflows
+scorers
+maxRetries
+model: Model
+memory: Memory
+tools: Record<string, Tool>
+agents: Record<string, Agent>
+workflows: Record<string, Workflow>
+scorers: Record<string, Scorer>
+maxRetries: number

Copilot uses AI. Check for mistakes.
Comment on lines +406 to +407
+inputSchema
+outputSchema
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Tool properties lack type information in the class diagram. For clarity and consistency, consider adding types:

  • +inputSchema: ZodSchema
  • +outputSchema: ZodSchema
Suggested change
+inputSchema
+outputSchema
+inputSchema: ZodSchema
+outputSchema: ZodSchema

Copilot uses AI. Check for mistakes.
Comment on lines +429 to +431
+UserTier userTier
+string language
+string projectRoot
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The properties userTier, language, and projectRoot are not direct properties of codeArchitectAgent. These values are accessed from the RuntimeContext within the agent's instructions function, not stored as agent properties. Consider removing these lines or clarifying that they are runtime context values, not agent properties.

Suggested change
+UserTier userTier
+string language
+string projectRoot
// Note: userTier, language, and projectRoot are accessed from RuntimeContext in instructions, not stored as agent properties.

Copilot uses AI. Check for mistakes.
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.

1 participant