-
Notifications
You must be signed in to change notification settings - Fork 234
docs: Add 'check before building' triggers to amplifier-expert #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
68dde38 to
fa85330
Compare
bkrabach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review: PR #211 - "Check before building" triggers
Thanks for this PR! The intent is valuable - preventing duplicate work by checking existing modules before building new ones. However, I have some concerns about the implementation approach.
Issue 1: Formatting Bug - Duplicate "Examples:" Header
The diff shows two Examples:\n\n strings in the description - one before the new example and one before the existing examples. This should be a single header with all examples underneath.
Issue 2: Architectural Concern - context.include Propagates
Adding amplifier:docs/MODULES.md to the behavior's context.include will cause it to propagate to all parent bundles that include the amplifier-expert behavior.
This defeats the context sink pattern that amplifier-expert is designed for:
- Root sessions should stay lightweight (~500 tokens for delegation awareness)
- Heavy docs (~20KB for MODULES.md) should load only when amplifier-expert actually runs
context.includepropagates during composition, meaning ANY bundle that includes amplifier-expert behavior would get MODULES.md in their context
Issue 3: MODULES.md is Already @mentioned
Line 88 of amplifier-expert.md already has:
- @amplifier:docs/MODULES.md - Module ecosystemThis @mention in the agent's markdown body is the correct approach - it loads only when the agent's instruction is used, not when other sessions merely have access to delegate to it.
If this @mention isn't currently loading (being treated as a "soft reference"), the fix should ensure the @mention works, not add a second loading mechanism via context.include.
Suggested Alternative
If the goal is to add "check before building" guidance:
- Fix the duplicate Examples header - merge under single header
- Don't add MODULES.md to
context.include- it's already @mentioned in the body - Consider lighter description text - keep trigger in description, move procedural detail to body:
# Instead of: "**REQUIRED: Before building new modules/tools/capabilities**, consult this agent to check MODULES.md for existing solutions. Do not reinvent—reuse or extend." # Consider: "**REQUIRED: Before building new capabilities**, check for existing modules first."
The foundation PR #55 adding the directive to AWARENESS_INDEX.md is fine - that's a lightweight pointer. But this PR's context.include change would have unintended token cost consequences.
Happy to discuss further!
Addressing FeedbackThanks for the detailed review, Brian! You caught two important issues. Fixed: Duplicate "Examples:" Header ✓Removed the duplicate. Fixed:
|
| Agent | Purpose | Loads |
|---|---|---|
amplifier-expert |
General ecosystem guidance | ecosystem-overview.md |
module-catalog |
Focused catalog queries | MODULES.md (only when spawned) |
This follows the context sink pattern more precisely - a lightweight, focused agent for "what modules exist?" queries, rather than adding more weight to the general-purpose expert.
Happy to discuss if you'd prefer keeping it all in amplifier-expert!
fa85330 to
7cc65ac
Compare
Correction: You Were RightBrian, apologies for the confusion in my previous comment. You were correct - the What happened: My local commit had the new files, but the push to GitHub failed silently. When you reviewed, the PR only contained changes to Now fixed: I've force-pushed the complete commit. The PR now includes:
Also fixed:
Please re-review when you have a chance. The |
- NEW: agents/module-catalog.md - focused agent for module discovery - NEW: behaviors/module-catalog.yaml - thin behavior loading MODULES.md - REVERTED: amplifier-expert.yaml - removed MODULES.md (not its job) - UPDATED: amplifier-expert.md - removed 'before building' trigger Context sink pattern: module-catalog only loads full catalog when spawned, keeping amplifier-expert lean for general ecosystem questions. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
7cc65ac to
bf719a8
Compare
Summary
Add "check before building" guidance to prevent module duplication in the Amplifier ecosystem.
Tracking issue: https://github.com/microsoft-amplifier/amplifier-support/issues/43
Changes
agents/module-catalog-expert.mdbehaviors/module-catalog-expert.yamlcontext.include)bundle.mdamplifier:behaviors/module-catalog-expertArchitecture
Why a Separate Agent?
amplifier-expertcontext.includeRelated