Skip to content

fix(cli): improve guidelines for kilo agent create - #9410

Closed
shssoichiro wants to merge 1 commit into
Kilo-Org:mainfrom
shssoichiro:agent-descriptions
Closed

fix(cli): improve guidelines for kilo agent create#9410
shssoichiro wants to merge 1 commit into
Kilo-Org:mainfrom
shssoichiro:agent-descriptions

Conversation

@shssoichiro

Copy link
Copy Markdown
Contributor

Context

Currently the kilo agent create command generates extremely long agent descriptions. This is because the system prompt for the generate agent tells it to include multiple verbose examples of when the agent should be used. This is unnecessary and increases system context bloat without improving the parent agent's ability to choose a subagent.

Implementation

This change updates the system prompt to exclude the guidance about examples, and instead includes official guidance from Anthropic's documentation on best practices for agent descriptions.

Get in Touch

ExpedientFalcon on Discord

@shssoichiro shssoichiro changed the title fix(core): improve guidelines for kilo agent create fix(cli): improve guidelines for kilo agent create Apr 23, 2026
@kilo-code-bot

kilo-code-bot Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/opencode/src/agent/generate.txt

Reviewed by gpt-5.5-2026-04-23 · 433,274 tokens

<commentary>
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke.
</commentary>
</example>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will this not break the formatting?

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.

No, the overall JSON formatting is still correct--this is defined in the section below ("Your output must be a valid JSON object...") The bulky examples XML is what we want to eliminate, because the agent is being guided to place these directly into the description field.

An example of the generated agent file before and after would make this clearer.

Before:

---
description: >-
  Use this agent when automated tests need to be executed and their results
  analyzed. This includes running unit tests, integration tests, end-to-end
  tests, or any test suite, then interpreting pass/fail outcomes, diagnosing
  failures, and providing actionable insights.


  <example>

  Context: The user has just finished implementing a new feature and wants to
  verify nothing is broken.

  user: "I just added the new authentication middleware. Can you make sure
  everything still works?"

  assistant: "I'll use the Task tool to launch the test-executor agent to run
  the test suite and analyze the results."

  <commentary>

  Since the user wants to verify their changes haven't broken anything, use the
  test-executor agent to run tests and analyze outcomes.

  </commentary>

  </example>


  <example>

  Context: The user is debugging a failing CI pipeline.

  user: "The CI is red but I can't tell which tests are actually failing."

  assistant: "Let me use the test-executor agent to run the tests locally and
  break down exactly what's failing and why."

  <commentary>

  The user needs test execution with detailed failure analysis, which is the
  test-executor agent's specialty.

  </commentary>

  </example>


  <example>

  Context: Proactive use after code changes.

  user: "I refactored the payment processing module to use the new API."

  assistant: "I've noted the refactoring. Now I'll use the test-executor agent
  to run the relevant tests and confirm the refactor didn't introduce
  regressions."

  <commentary>

  After significant code changes, proactively use the test-executor agent to
  validate correctness.

  </commentary>

  </example>
mode: subagent
---
You are an elite Test Execution and Analysis Specialist with deep expertise in...

After:

---
description: >-
  Use this agent when automated tests need to be executed and their results
  analyzed. This includes running unit tests, integration tests, end-to-end
  tests, or full test suites, as well as re-running failed tests and providing
  concise summaries of outcomes. The agent should be invoked after code changes
  that warrant verification, when explicitly asked to run tests, or proactively
  after implementing new features or fixes.
mode: subagent
---
You are an elite Test Execution Specialist with deep expertise in...

Currently the `kilo agent create` command generates extremely long agent
descriptions. This is because the system prompt for the `generate` agent
tells it to include multiple verbose examples of when the agent should
be used. This is unnecessary and increases system context bloat without
improving the parent agent's ability to choose a subagent.

This change updates the system prompt to exclude the guidance about
examples, and instead includes official guidance from Anthropic's
documentation on best practices for agent descriptions.
@shssoichiro
shssoichiro force-pushed the agent-descriptions branch from 9168206 to a87c702 Compare May 4, 2026 16:10
@github-actions

Copy link
Copy Markdown
Contributor

To stay organized pull requests are automatically closed after 30 days of inactivity. If the pull request is still relevant please reopen it or create a fresh new one.

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