fix(mcp): enrich agent prompt builder with mandatory_checklist, skills, and language (#1246)#1250
Merged
Merged
Conversation
…s, and language (#1246) buildAgentSystemPrompt() now includes rich agent metadata from passthrough fields: mandatory_checklist, communication.language, skills (required/recommended), agent-specific mode instructions (overriding generic when present), and verification_guide. Added 7 tests covering each new section and graceful fallback.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 3, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
Review: ✅ APPROVE
CI Status: ALL PASS
Code Review
agent-prompt.builder.ts — Rich metadata injection via rawProfile passthrough:
mandatory_checklist→ rendered as checkbox listcommunication.language→ "IMPORTANT: Always respond in {language}"skills.required/recommended→ formatted skill list with purpose and triggermodes[mode]→ agent-specific mode instructions override generic when presentverification_guide→ included as structured JSON- Graceful fallback: all sections only render when data exists
agent-prompt.builder.spec.ts — 7 new test cases:
- mandatory_checklist present/absent
- communication.language present/absent
- agent-specific modes override vs generic fallback
- required + recommended skills
- verification_guide
- graceful handling of bare profile without optional fields
Clean TypeScript, no any usage, proper type casting.
Issues Found: None
Recommendation: APPROVE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildAgentSystemPrompt()inagent-prompt.builder.tsto include rich agent metadata from passthrough fieldsChanged Files
apps/mcp-server/src/agent/agent-prompt.builder.ts— extendedbuildAgentSystemPrompt()with 5 new metadata sectionsapps/mcp-server/src/agent/agent-prompt.builder.spec.ts— added 7 tests (total 26 in file)Test plan
yarn workspace codingbuddy test agent-prompt— 36 tests passed (26 builder + 10 agent-prompt)yarn workspace codingbuddy build— passesyarn workspace codingbuddy test— 5829 tests passedCloses #1246