Skip to content

feat(plugin): add genesis-tools:explore agent#84

Merged
genesiscz merged 2 commits intomasterfrom
feat/explore-agent
Mar 9, 2026
Merged

feat(plugin): add genesis-tools:explore agent#84
genesiscz merged 2 commits intomasterfrom
feat/explore-agent

Conversation

@genesiscz
Copy link
Owner

@genesiscz genesiscz commented Mar 9, 2026

Summary

  • Adds a custom genesis-tools:explore agent that replicates the built-in Explore agent's fast codebase exploration capabilities
  • Unlike the built-in Explore agent (read-only, output lost on exit), this agent writes persistent markdown reports to .claude/explore/<date>-<topic>.md
  • Reports include structured findings with file maps, code excerpts, architecture diagrams, and line-number references

How it works

  • Spawned via Task tool with subagent_type: "genesis-tools:explore"
  • Has Read, Glob, Grep, Bash, Write, WebFetch, WebSearch tools
  • Explores in waves (orient → read key files → deep dive)
  • Writes a comprehensive report, returns a brief summary to the caller

Test plan

  • Agent loads correctly via Task tool
  • Agent confirms it has the explore instructions
  • Full exploration test produces report in .claude/explore/

Summary by CodeRabbit

  • Documentation
    • Added docs for a persistent, writable "Explore & Document" agent that produces durable Markdown reports (dated by topic), describes initialization and a multi-wave exploration workflow, and provides efficiency tips.
    • Included a standardized report template (title, summary, key findings, architecture/flow, file map, code excerpts, open questions) and post-run summary guidelines.

… reports

Adds a custom agent that replicates the built-in Explore agent's fast codebase
exploration but writes a persistent markdown report to .claude/explore/.
Reports survive after the subagent exits, unlike the built-in Explore agent.
Copilot AI review requested due to automatic review settings March 9, 2026 23:51
@gemini-code-assist
Copy link
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 introduces a significant enhancement to the codebase exploration capabilities by providing a new agent that not only performs deep dives into the code but also ensures that all findings are durably recorded. This addresses the limitation of the existing built-in exploration tools, which do not retain their output, thereby improving the long-term utility and referenceability of exploration results for developers.

Highlights

  • New Agent Introduction: A custom genesis-tools:explore agent has been added, designed to replicate and enhance the capabilities of the built-in Explore agent for codebase exploration.
  • Persistent Reporting: Unlike the ephemeral nature of the built-in Explore agent, this new agent generates persistent markdown reports, saving findings to .claude/explore/<date>-<topic>.md.
  • Structured Report Content: The generated reports are highly structured, including detailed findings with file maps, relevant code excerpts, architecture diagrams, and precise line-number references.
Changelog
  • plugins/genesis-tools/agents/explore.md
    • Added a new agent definition file for the genesis-tools:explore agent.
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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cb5b1f98-fcd3-4d26-84bc-49225c36d2e6

📥 Commits

Reviewing files that changed from the base of the PR and between 7de4a17 and bd6686d.

📒 Files selected for processing (1)
  • plugins/genesis-tools/agents/explore.md

📝 Walkthrough

Walkthrough

A new documentation file introduces the "Explore & Document" agent, detailing its initialization process, multi-wave exploration approach (Orient, Read Key Files, Deep Dive), persistent report storage under .claude/explore/, and formatting guidelines for generated Markdown documentation.

Changes

Cohort / File(s) Summary
Agent Documentation
plugins/genesis-tools/agents/explore.md
New documentation describing the "Explore & Document" agent's behavior, including initialization, multi-wave exploration methodology, persistent report filenames (.claude/explore/YYYY-MM-DD-<topic>.md), report structure (Title, Summary, Key Findings, Architecture/Flow, File Map, Code Excerpts, Open Questions), formatting guidelines, post-run summary, and distinctions from the built-in read-only Explore agent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically summarizes the main change: adding a new genesis-tools:explore agent. It is clear, concise, and directly reflects the primary purpose of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/explore-agent

Comment @coderabbitai help to get the list of available commands and usage tips.

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 new genesis-tools:explore agent, defined in a markdown file. This agent is designed for in-depth codebase exploration and generates a persistent markdown report of its findings. The prompt for the agent is well-structured and provides clear, detailed instructions. My review includes one suggestion to improve the consistency of placeholders in the agent's instructions, which will help ensure its output is accurate.

Note: Security Review has been skipped due to the limited scope of the PR.

After writing the report, return a brief summary to the caller:

```
Exploration complete. Report saved to `.claude/explore/YYYY-MM-DD-<name>.md`
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency, it's better to use the same placeholder for the report topic throughout the instructions. On line 62, you use <kebab-case-topic>, but here you use <name>. Using <kebab-case-topic> in both places will make the instructions clearer for the agent and ensure the file path in the summary message is consistent with the actual file created.

Suggested change
Exploration complete. Report saved to `.claude/explore/YYYY-MM-DD-<name>.md`
Exploration complete. Report saved to `.claude/explore/YYYY-MM-DD-<kebab-case-topic>.md`

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@plugins/genesis-tools/agents/explore.md`:
- Around line 121-132: Update the code block in the "Return Your Findings"
snippet so it includes a language specifier (e.g., change the opening fence to
```text) to ensure proper markdown formatting; locate the snippet under the "###
4. Return Your Findings" section (the block that starts with "Exploration
complete. Report saved to `.claude/explore/YYYY-MM-DD-<name>.md`") and change
the triple-backtick fence accordingly.
- Around line 68-113: In the "Architecture / Flow" section of
plugins/genesis-tools/agents/explore.md the inline diagram code fence needs
blank lines before and after and should declare a language for proper rendering;
update the diagram block under "Architecture / Flow" so there is an empty line
before the opening ``` and an empty line after the closing ```, and change the
opening fence to include a language token such as ```text to improve readability
and markdown rendering.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 85825182-9904-4743-a7fc-4db98431408a

📥 Commits

Reviewing files that changed from the base of the PR and between 7306bfa and 7de4a17.

📒 Files selected for processing (1)
  • plugins/genesis-tools/agents/explore.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-02-25T23:00:07.620Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 56
File: plugins/genesis-tools/commands/github-pr.md:131-131
Timestamp: 2026-02-25T23:00:07.620Z
Learning: Adopt the style: use lowercase 'markdown' (not 'Markdown') in the GenesisTools documentation. Apply this consistently across all Markdown files in the repository (any .md file), including generated docs and READMEs.

Applied to files:

  • plugins/genesis-tools/agents/explore.md
🪛 markdownlint-cli2 (0.21.0)
plugins/genesis-tools/agents/explore.md

[warning] 91-91: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 96-96: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 96-96: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 125-125: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (4)
plugins/genesis-tools/agents/explore.md (4)

1-12: LGTM! Clear agent metadata.

The frontmatter correctly defines the agent with appropriate tools for codebase exploration and persistent documentation. The description clearly differentiates this agent from the built-in Explore agent.


14-22: LGTM! Clear introduction and differentiation.

The introduction clearly establishes the agent's purpose and the first action ensures the output directory exists. The differentiation from the built-in agent is helpful context.


24-58: LGTM! Excellent structured exploration approach.

The three-wave exploration strategy (Orient → Read Key Files → Deep Dive) provides a clear, efficient framework. The efficiency rules are specific and actionable, preventing exhaustive reads while ensuring thorough investigation.


115-120: LGTM! Excellent practical guidelines.

The four guidelines (specific, concise, show-don't-tell, scannable) provide clear quality criteria. The emphasis on file:line references ensures reports are actionable and traceable.

Comment on lines +68 to +113
```markdown
# [Topic Title]

> Explored on YYYY-MM-DD | Scope: [which directories/modules were examined]

## Summary

[2-4 sentences answering the core question. A reader should get the gist here.]

## Key Findings

### [Finding 1 Title]

[Explanation with file references like `src/foo/bar.ts:42`]

### [Finding 2 Title]

...

## Architecture / Flow

[If applicable — describe how components connect. Use a text diagram if it helps:]

```
ComponentA ──calls──▶ ComponentB ──emits──▶ EventBus
Database
```

## File Map

| File | Role |
|------|------|
| `src/path/to/file.ts` | Brief description |
| `src/path/to/other.ts` | Brief description |

## Code Excerpts

[Include only the most important/illustrative snippets — not entire files.
Use line references so the reader can jump to the source.]

## Open Questions

[Anything unresolved or worth further investigation. Skip this section if everything is clear.]
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix markdown formatting for nested code blocks.

The nested code block showing the diagram example (lines 91-96) needs formatting improvements for better readability:

  1. Add a blank line before the code block (after line 90)
  2. Add a blank line after the code block (before line 97)
  3. Specify a language for the code block (e.g., text or leave as is but add blank lines)
📝 Proposed formatting fix
 [If applicable — describe how components connect. Use a text diagram if it helps:]
+
-```
+```text
 ComponentA ──calls──▶ ComponentB ──emits──▶ EventBus
                           │
                           ▼
                       Database

File Map

</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 91-91: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 96-96: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 96-96: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/genesis-tools/agents/explore.md` around lines 68 - 113, In the
"Architecture / Flow" section of plugins/genesis-tools/agents/explore.md the
inline diagram code fence needs blank lines before and after and should declare
a language for proper rendering; update the diagram block under "Architecture /
Flow" so there is an empty line before the opening ``` and an empty line after
the closing ```, and change the opening fence to include a language token such
as ```text to improve readability and markdown rendering.

Copy link

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 a new explore agent prompt intended to perform fast codebase exploration and write persistent Markdown reports under .claude/explore/.

Changes:

  • Introduces plugins/genesis-tools/agents/explore.md with frontmatter metadata, tool list, and a structured exploration/report-writing workflow
  • Defines a report template (summary, findings, architecture diagram, file map, excerpts) and a short “return to caller” summary format

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

Use 4-backtick fence for outer template block so inner diagram fence
doesn't break markdown rendering. Add language specifiers to code blocks.
@genesiscz genesiscz merged commit 1d7948e into master Mar 9, 2026
1 of 2 checks passed
@genesiscz genesiscz deleted the feat/explore-agent branch March 9, 2026 23:59
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.

2 participants