Skip to content

improve(development-codebase-tools): tune analyze-code skill with concrete execution steps#465

Open
wkoutre wants to merge 2 commits intonextfrom
improve/tune-analyze-code
Open

improve(development-codebase-tools): tune analyze-code skill with concrete execution steps#465
wkoutre wants to merge 2 commits intonextfrom
improve/tune-analyze-code

Conversation

@wkoutre
Copy link
Copy Markdown
Contributor

@wkoutre wkoutre commented Apr 15, 2026

Summary

  • model: sonnetopus — multi-agent orchestration requires stronger synthesis than sonnet provides
  • Replaced vague "Quick Process" steps (category names, not instructions) and redundant "When to Activate" section with a concrete 6-step execution procedure
  • Added depth inference rules: explicit keyword mappings for overview / deep / architectural so Claude picks the right agent set without guessing
  • Added error handling guidance for missing files and failed agent responses

What was wrong

The original "Quick Process" listed category names ("Structure Analysis", "Dependency Mapping") that told Claude what to analyze but not how to start or which agents to dispatch. The "When to Activate" section was a verbatim repeat of the description. A fresh Claude instance with this skill had no concrete execution path.

Test plan

  • Verify "explain this file to me" triggers code-explainer-agent only (overview depth)
  • Verify "analyze the security of this module" triggers all three deep agents
  • Verify missing-file case produces the expected error message
AI-Generated Description

Summary

  • Model upgrade: sonnetopus — multi-agent orchestration requires stronger synthesis than Sonnet provides
  • Replaced vague "Quick Process" steps (category names like "Structure Analysis", "Dependency Mapping") and redundant "When to Activate" section with a concrete 6-step execution procedure
  • Added depth inference rules: explicit keyword mappings for overview / deep / architectural so Claude picks the right agent set without guessing
  • Added error handling guidance for missing files and failed agent responses

What was wrong

The original "Quick Process" listed category names that told Claude what to analyze but not how to start or which agents to dispatch. The "When to Activate" section was a verbatim repeat of the description frontmatter. A fresh Claude instance with this skill had no concrete execution path — it would guess at agent orchestration instead of following a deterministic procedure.

Changes

File Change
packages/plugins/development-codebase-tools/skills/analyze-code/SKILL.md Replace model sonnetopus; replace vague category list with 6 concrete execution steps; add depth inference rules and agent dispatch matrix; add error handling for missing targets and failed agents
packages/plugins/development-codebase-tools/.claude-plugin/plugin.json Bump version 2.1.1 → 2.1.2

Test plan

  • Verify "explain this file to me" triggers code-explainer-agent only (overview depth)
  • Verify "analyze the security of this module" triggers all three deep agents
  • Verify missing-file case produces the expected error message

…crete execution steps

- Change model from sonnet to opus (multi-agent orchestration requires stronger synthesis)
- Replace vague "Quick Process" + redundant "When to Activate" with concrete numbered execution steps
- Add depth inference rules (overview/deep/architectural based on request keywords)
- Add error handling guidance for missing files and failed agents
@wkoutre wkoutre requested a review from a team as a code owner April 15, 2026 22:03
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview, Comment Apr 16, 2026 4:07pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

🤖 Claude Code Review

Review complete

Re-Review Summary

This PR improves the analyze-code skill by replacing vague "When to Activate" and "Quick Process" sections with concrete, step-by-step execution instructions. It also changes the model from sonnet to opus and bumps the plugin version from 2.1.1 to 2.1.2.

Changes Reviewed

  1. SKILL.md rewrite — The new "Execution Steps" section is a significant improvement: it specifies how to identify targets, infer analysis depth, dispatch agents (with clear sequential-then-parallel ordering for architectural), synthesize results, and handle failures. This is much more actionable than the previous bullet list.

  2. Model change (sonnetopus) — This upgrades the skill to use a more capable model. Worth noting this has cost implications for users, but it's a reasonable choice for a multi-agent coordination skill.

  3. Version bump (2.1.1 → 2.1.2) — The previous review suggested a minor bump (2.2.0) since this is a behavioral enhancement (new execution logic, model change), not just a bug fix. Per the repo's versioning guidelines, behavioral enhancements are minor bumps. The author chose a patch bump instead. This is a judgment call — not blocking, but worth the author's consideration.

Previous Review Comments

All three prior comments about the contradictory "all four agents in parallel" wording have been addressed. The current text at line 28 clearly reads: "run context-loader-agent first to gather system-level context, then spawn ... in parallel with that context" — making the sequential-then-parallel order unambiguous.

No new issues found.


💡 Want a fresh review? Add a comment containing @request-claude-review to trigger a new review at any time.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

📚 Documentation Check ✅

Verdict: Passed

Plugin version was bumped (2.1.1 → 2.1.2), CLAUDE.md and README descriptions for analyze-code remain accurate after the skill content restructuring.


PR #465 Documentation Check

Changes analyzed:

  • plugin.json: Version bumped 2.1.1 → 2.1.2 ✅
  • skills/analyze-code/SKILL.md: Model changed sonnetopus; "When to Activate" + "Quick Process" sections replaced with detailed "Execution Steps"

Version bump: Present and appropriate (patch bump for skill content improvement).

CLAUDE.md (packages/plugins/development-codebase-tools/CLAUDE.md): Describes analyze-code as "Multi-agent code explanation for architecture, patterns, security, and performance" — still accurate; no update needed.

README.md: Lists analyze-code with the same description — still accurate; no update needed.

Pre-existing issue (not introduced by this PR): README skills table is missing the mermaid-diagram skill, which is present in plugin.json. Flagged as info-only.

Suggestions (1)

💡 Inline suggestions have been posted as review comments. Click "Commit suggestion" to apply each fix directly.

  • ℹ️ packages/plugins/development-codebase-tools/README.md: Pre-existing issue (not introduced by this PR): README skills table is missing the mermaid-diagram skill, which is listed in plugin.json. Consider adding it in a follow-up.

🤖 Generated by Claude Documentation Validator | Mode: suggest

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: 8af69af1fa

ℹ️ 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".


- `overview`: spawn **code-explainer-agent** only; pass the file path and its contents
- `deep`: spawn **code-explainer-agent** + **security-analyzer-agent** + **performance-analyzer-agent** in parallel
- `architectural`: spawn all four agents in parallel, loading system-level context via **context-loader-agent** first
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run context loader before parallel analyzers

The architectural instruction is internally contradictory because it says to "spawn all four agents in parallel" while also requiring context to be loaded "first." In practice this leaves execution order undefined, so architecture runs can start the explainer/security/performance agents before context-loader-agent finishes, producing incomplete or inconsistent system-level analysis. This should be made strictly sequential (context-loader first, then parallel analyzers) or fully parallel without the "first" requirement.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit (18079db). Step 4 now explicitly sequences context-loader first: "run context-loader-agent first to gather system-level context, then spawn the remaining three agents in parallel with that context." The contradictory "all four in parallel" phrasing has been removed.

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.

Confirmed fixed. Line 28 now clearly states: "run context-loader-agent first to gather system-level context, then spawn code-explainer-agent + security-analyzer-agent + performance-analyzer-agent in parallel with that context." The contradictory phrasing is gone.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

📋 Review verdict: REQUEST_CHANGES

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only. 2 inline comment(s) are attached below.

description: Comprehensive code explanation and analysis. Use when user says "explain this file to me", "what does this code do", "analyze the security of this module", "review the performance of this function", or "help me understand this architecture".
allowed-tools: Read, Grep, Glob, Bash(git show:*), Bash(git ls-files:*), Task(subagent_type:code-explainer-agent), Task(subagent_type:security-analyzer-agent), Task(subagent_type:performance-analyzer-agent), Task(subagent_type:context-loader-agent)
model: sonnet
model: opus
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.

Per repository guidelines (CLAUDE.md > Mandatory Version Bumping), any change to packages/plugins/ must include a version bump in .claude-plugin/plugin.json. This PR changes execution behavior and the model — bump development-codebase-tools from 2.1.1 to 2.2.0 (minor, since it's a behavioral enhancement).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit (18079db). plugin.json has been bumped from 2.1.1 to 2.1.2 per the mandatory version bumping policy.

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.

Version has been bumped to 2.1.2. Note: per the repo's versioning guidelines, changing the model and rewriting execution behavior would typically warrant a minor bump (2.2.0) rather than a patch, since these are backward-compatible behavioral enhancements, not bug fixes. Not blocking — leaving for the author to decide.


- `overview`: spawn **code-explainer-agent** only; pass the file path and its contents
- `deep`: spawn **code-explainer-agent** + **security-analyzer-agent** + **performance-analyzer-agent** in parallel
- `architectural`: spawn all four agents in parallel, loading system-level context via **context-loader-agent** first
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.

"spawn all four agents in parallel" and "loading system-level context via context-loader-agent first" are contradictory. If context-loader must run first, the remaining three run in parallel after it completes — not all four in parallel.

Suggested change
- `architectural`: spawn all four agents in parallel, loading system-level context via **context-loader-agent** first
- `architectural`: spawn **context-loader-agent** first for system-level context, then spawn the remaining three agents (**code-explainer-agent** + **security-analyzer-agent** + **performance-analyzer-agent**) in parallel

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit (18079db). The wording now reads: "run context-loader-agent first to gather system-level context, then spawn code-explainer-agent + security-analyzer-agent + performance-analyzer-agent in parallel with that context" — making the sequential-then-parallel execution order unambiguous.

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.

Confirmed fixed. The wording now unambiguously sequences context-loader first, then the remaining three agents in parallel.

…chitectural agent order

- Bump plugin.json from 2.1.1 to 2.1.2 per mandatory version bump policy
- Clarify step 4 architectural dispatch: context-loader runs first, then the
  remaining three agents run in parallel — resolves the contradictory wording
@wkoutre wkoutre changed the title improve(development-codebase-tools): tune analyze-code skill with concrete execution steps feat(development-codebase-tools): tune analyze-code skill with concrete execution steps Apr 16, 2026
@github-actions github-actions bot changed the title feat(development-codebase-tools): tune analyze-code skill with concrete execution steps improve(development-codebase-tools): tune analyze-code skill with concrete execution steps Apr 16, 2026
@github-actions github-actions bot dismissed their stale review April 16, 2026 16:09

Superseded by new review after PR update

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

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