refactor(agents): relocate example blocks to body (retrieval agents)
This commit is contained in:
parent
816bf2a5fc
commit
27a7573b06
6 changed files with 120 additions and 108 deletions
|
|
@ -3,24 +3,6 @@ name: architecture-mapper
|
||||||
description: |
|
description: |
|
||||||
Use this agent when you need deep architecture analysis of a codebase — structure,
|
Use this agent when you need deep architecture analysis of a codebase — structure,
|
||||||
tech stack, patterns, anti-patterns, and key abstractions.
|
tech stack, patterns, anti-patterns, and key abstractions.
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: Voyage exploration phase needs architecture overview
|
|
||||||
user: "/trekplan Add authentication to the API"
|
|
||||||
assistant: "Launching architecture-mapper to analyze codebase structure and patterns."
|
|
||||||
<commentary>
|
|
||||||
Phase 5 of trekplan triggers this agent for every codebase size.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: User wants to understand an unfamiliar codebase
|
|
||||||
user: "Map out the architecture of this project"
|
|
||||||
assistant: "I'll use the architecture-mapper agent to analyze the codebase structure."
|
|
||||||
<commentary>
|
|
||||||
Direct architecture analysis request triggers the agent.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
model: opus
|
model: opus
|
||||||
effort: medium
|
effort: medium
|
||||||
color: cyan
|
color: cyan
|
||||||
|
|
@ -104,3 +86,23 @@ Structure your report with clear sections matching the 7 areas above. Include:
|
||||||
- A brief "Architecture Summary" paragraph at the top (3-4 sentences)
|
- A brief "Architecture Summary" paragraph at the top (3-4 sentences)
|
||||||
|
|
||||||
Do NOT include raw file listings — synthesize and organize the information.
|
Do NOT include raw file listings — synthesize and organize the information.
|
||||||
|
|
||||||
|
## When to use — examples
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: Voyage exploration phase needs architecture overview
|
||||||
|
user: "/trekplan Add authentication to the API"
|
||||||
|
assistant: "Launching architecture-mapper to analyze codebase structure and patterns."
|
||||||
|
<commentary>
|
||||||
|
Phase 5 of trekplan triggers this agent for every codebase size.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: User wants to understand an unfamiliar codebase
|
||||||
|
user: "Map out the architecture of this project"
|
||||||
|
assistant: "I'll use the architecture-mapper agent to analyze the codebase structure."
|
||||||
|
<commentary>
|
||||||
|
Direct architecture analysis request triggers the agent.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
|
||||||
|
|
@ -5,24 +5,6 @@ description: |
|
||||||
Produces a structured conventions report covering naming, directory layout,
|
Produces a structured conventions report covering naming, directory layout,
|
||||||
import style, error handling, test patterns, git commit style, and
|
import style, error handling, test patterns, git commit style, and
|
||||||
documentation patterns. Uses concrete examples from the codebase.
|
documentation patterns. Uses concrete examples from the codebase.
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: Voyage exploration phase for a medium+ codebase
|
|
||||||
user: "/trekplan Add authentication to the API"
|
|
||||||
assistant: "Launching convention-scanner to discover coding patterns."
|
|
||||||
<commentary>
|
|
||||||
Phase 5 of trekplan triggers this agent for medium+ codebases (50+ files).
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: User wants to understand a project's conventions before contributing
|
|
||||||
user: "What are the coding conventions in this project?"
|
|
||||||
assistant: "I'll use the convention-scanner agent to analyze the codebase."
|
|
||||||
<commentary>
|
|
||||||
Direct convention discovery request triggers the agent.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
model: opus
|
model: opus
|
||||||
color: yellow
|
color: yellow
|
||||||
tools: ["Read", "Glob", "Grep", "Bash"]
|
tools: ["Read", "Glob", "Grep", "Bash"]
|
||||||
|
|
@ -159,3 +141,23 @@ Based on existing conventions, new code should:
|
||||||
than scanning everything.
|
than scanning everything.
|
||||||
- **Stay focused.** This is about conventions — not architecture, dependencies, or risks.
|
- **Stay focused.** This is about conventions — not architecture, dependencies, or risks.
|
||||||
Those are handled by other agents.
|
Those are handled by other agents.
|
||||||
|
|
||||||
|
## When to use — examples
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: Voyage exploration phase for a medium+ codebase
|
||||||
|
user: "/trekplan Add authentication to the API"
|
||||||
|
assistant: "Launching convention-scanner to discover coding patterns."
|
||||||
|
<commentary>
|
||||||
|
Phase 5 of trekplan triggers this agent for medium+ codebases (50+ files).
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: User wants to understand a project's conventions before contributing
|
||||||
|
user: "What are the coding conventions in this project?"
|
||||||
|
assistant: "I'll use the convention-scanner agent to analyze the codebase."
|
||||||
|
<commentary>
|
||||||
|
Direct convention discovery request triggers the agent.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
|
||||||
|
|
@ -3,24 +3,6 @@ name: dependency-tracer
|
||||||
description: |
|
description: |
|
||||||
Use this agent when you need to trace import chains, map data flow, or understand
|
Use this agent when you need to trace import chains, map data flow, or understand
|
||||||
how modules connect and what side effects they produce.
|
how modules connect and what side effects they produce.
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: Voyage needs to understand module relationships for a task
|
|
||||||
user: "/trekplan Refactor the payment processing pipeline"
|
|
||||||
assistant: "Launching dependency-tracer to map module connections and data flow."
|
|
||||||
<commentary>
|
|
||||||
Phase 5 of trekplan triggers this agent to trace dependencies relevant to the task.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: User needs to understand impact of changing a module
|
|
||||||
user: "What would break if I change the User model?"
|
|
||||||
assistant: "I'll use the dependency-tracer agent to trace all dependents of the User model."
|
|
||||||
<commentary>
|
|
||||||
Impact analysis request triggers the agent.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
model: opus
|
model: opus
|
||||||
effort: medium
|
effort: medium
|
||||||
color: blue
|
color: blue
|
||||||
|
|
@ -93,3 +75,23 @@ Structure as:
|
||||||
6. **Risk Flags** — circular deps, tight coupling, hidden side effects
|
6. **Risk Flags** — circular deps, tight coupling, hidden side effects
|
||||||
|
|
||||||
Include file paths and line numbers for every finding.
|
Include file paths and line numbers for every finding.
|
||||||
|
|
||||||
|
## When to use — examples
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: Voyage needs to understand module relationships for a task
|
||||||
|
user: "/trekplan Refactor the payment processing pipeline"
|
||||||
|
assistant: "Launching dependency-tracer to map module connections and data flow."
|
||||||
|
<commentary>
|
||||||
|
Phase 5 of trekplan triggers this agent to trace dependencies relevant to the task.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: User needs to understand impact of changing a module
|
||||||
|
user: "What would break if I change the User model?"
|
||||||
|
assistant: "I'll use the dependency-tracer agent to trace all dependents of the User model."
|
||||||
|
<commentary>
|
||||||
|
Impact analysis request triggers the agent.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
|
||||||
|
|
@ -3,24 +3,6 @@ name: git-historian
|
||||||
description: |
|
description: |
|
||||||
Use this agent to analyze git history for planning context — recent changes,
|
Use this agent to analyze git history for planning context — recent changes,
|
||||||
code ownership, hot files, and active branches relevant to the task.
|
code ownership, hot files, and active branches relevant to the task.
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: Voyage exploration phase needs git context
|
|
||||||
user: "/trekplan Refactor the database layer"
|
|
||||||
assistant: "Launching git-historian to check recent changes and ownership of DB code."
|
|
||||||
<commentary>
|
|
||||||
Phase 2 of trekplan triggers this agent for every codebase size.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: User wants to understand change history before modifying code
|
|
||||||
user: "Who has been changing the auth module recently?"
|
|
||||||
assistant: "I'll use the git-historian agent to analyze ownership and change patterns."
|
|
||||||
<commentary>
|
|
||||||
Git history analysis request triggers the agent.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
model: opus
|
model: opus
|
||||||
effort: medium
|
effort: medium
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
@ -122,3 +104,23 @@ Run `git status --short` to check for:
|
||||||
are risks the planner needs to know about.
|
are risks the planner needs to know about.
|
||||||
- **Use relative time.** "2 days ago" is more useful than a raw timestamp.
|
- **Use relative time.** "2 days ago" is more useful than a raw timestamp.
|
||||||
- **Never expose email addresses.** Use author names only.
|
- **Never expose email addresses.** Use author names only.
|
||||||
|
|
||||||
|
## When to use — examples
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: Voyage exploration phase needs git context
|
||||||
|
user: "/trekplan Refactor the database layer"
|
||||||
|
assistant: "Launching git-historian to check recent changes and ownership of DB code."
|
||||||
|
<commentary>
|
||||||
|
Phase 2 of trekplan triggers this agent for every codebase size.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: User wants to understand change history before modifying code
|
||||||
|
user: "Who has been changing the auth module recently?"
|
||||||
|
assistant: "I'll use the git-historian agent to analyze ownership and change patterns."
|
||||||
|
<commentary>
|
||||||
|
Git history analysis request triggers the agent.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,6 @@ description: |
|
||||||
Use this agent to find all files, functions, types, and interfaces directly
|
Use this agent to find all files, functions, types, and interfaces directly
|
||||||
related to the planning task. Replaces generic Explore agents with targeted,
|
related to the planning task. Replaces generic Explore agents with targeted,
|
||||||
structured code discovery.
|
structured code discovery.
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: Voyage exploration phase needs task-relevant code
|
|
||||||
user: "/trekplan Add authentication to the API"
|
|
||||||
assistant: "Launching task-finder to locate auth-related code, endpoints, and models."
|
|
||||||
<commentary>
|
|
||||||
Phase 2 of trekplan triggers this agent for every codebase size.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: User wants to find code related to a specific feature
|
|
||||||
user: "Find all code related to payment processing"
|
|
||||||
assistant: "I'll use the task-finder agent to locate payment-related code."
|
|
||||||
<commentary>
|
|
||||||
Direct code discovery request triggers the agent.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
model: opus
|
model: opus
|
||||||
effort: medium
|
effort: medium
|
||||||
color: green
|
color: green
|
||||||
|
|
@ -146,3 +128,23 @@ Structure your report using three tiers:
|
||||||
- **Stay focused on the task.** Do not inventory the entire codebase — only what
|
- **Stay focused on the task.** Do not inventory the entire codebase — only what
|
||||||
is relevant to implementing the specific task.
|
is relevant to implementing the specific task.
|
||||||
- **Never read file contents that look like secrets or credentials.**
|
- **Never read file contents that look like secrets or credentials.**
|
||||||
|
|
||||||
|
## When to use — examples
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: Voyage exploration phase needs task-relevant code
|
||||||
|
user: "/trekplan Add authentication to the API"
|
||||||
|
assistant: "Launching task-finder to locate auth-related code, endpoints, and models."
|
||||||
|
<commentary>
|
||||||
|
Phase 2 of trekplan triggers this agent for every codebase size.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: User wants to find code related to a specific feature
|
||||||
|
user: "Find all code related to payment processing"
|
||||||
|
assistant: "I'll use the task-finder agent to locate payment-related code."
|
||||||
|
<commentary>
|
||||||
|
Direct code discovery request triggers the agent.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
|
||||||
|
|
@ -3,24 +3,6 @@ name: test-strategist
|
||||||
description: |
|
description: |
|
||||||
Use this agent when you need to design a test strategy for an implementation task —
|
Use this agent when you need to design a test strategy for an implementation task —
|
||||||
discovers existing patterns, maps coverage gaps, and recommends what tests to write.
|
discovers existing patterns, maps coverage gaps, and recommends what tests to write.
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: Voyage exploration phase for medium+ codebase
|
|
||||||
user: "/trekplan Add rate limiting to the API"
|
|
||||||
assistant: "Launching test-strategist to analyze existing test patterns and design test coverage."
|
|
||||||
<commentary>
|
|
||||||
Phase 5 of trekplan triggers this agent for medium and large codebases.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example>
|
|
||||||
Context: User wants to know how to test a feature
|
|
||||||
user: "What tests should I write for this new feature?"
|
|
||||||
assistant: "I'll use the test-strategist agent to analyze existing patterns and recommend tests."
|
|
||||||
<commentary>
|
|
||||||
Test planning request triggers the agent.
|
|
||||||
</commentary>
|
|
||||||
</example>
|
|
||||||
model: opus
|
model: opus
|
||||||
color: green
|
color: green
|
||||||
tools: ["Read", "Glob", "Grep", "Bash"]
|
tools: ["Read", "Glob", "Grep", "Bash"]
|
||||||
|
|
@ -95,3 +77,23 @@ For each test, provide:
|
||||||
5. **Test Dependencies** — fixtures, mocks, or setup code to create first
|
5. **Test Dependencies** — fixtures, mocks, or setup code to create first
|
||||||
|
|
||||||
Do NOT write test code. Describe what each test should verify and which patterns to follow.
|
Do NOT write test code. Describe what each test should verify and which patterns to follow.
|
||||||
|
|
||||||
|
## When to use — examples
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: Voyage exploration phase for medium+ codebase
|
||||||
|
user: "/trekplan Add rate limiting to the API"
|
||||||
|
assistant: "Launching test-strategist to analyze existing test patterns and design test coverage."
|
||||||
|
<commentary>
|
||||||
|
Phase 5 of trekplan triggers this agent for medium and large codebases.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
Context: User wants to know how to test a feature
|
||||||
|
user: "What tests should I write for this new feature?"
|
||||||
|
assistant: "I'll use the test-strategist agent to analyze existing patterns and recommend tests."
|
||||||
|
<commentary>
|
||||||
|
Test planning request triggers the agent.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue