Skip to content

fix(mcp): enrich agent prompt builder with mandatory_checklist, skills, and language (#1246)#1250

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/enrich-agent-prompt-builder-1246
Apr 3, 2026
Merged

fix(mcp): enrich agent prompt builder with mandatory_checklist, skills, and language (#1246)#1250
JeremyDev87 merged 1 commit into
masterfrom
fix/enrich-agent-prompt-builder-1246

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Enrich buildAgentSystemPrompt() in agent-prompt.builder.ts to include rich agent metadata from passthrough fields
  • Added sections: mandatory_checklist, communication.language, skills (required/recommended), agent-specific mode instructions (override generic), and verification_guide
  • Added 7 new tests covering each section and graceful fallback when fields are absent

Changed Files

  • apps/mcp-server/src/agent/agent-prompt.builder.ts — extended buildAgentSystemPrompt() with 5 new metadata sections
  • apps/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 — passes
  • yarn workspace codingbuddy test — 5829 tests passed

Closes #1246

…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.
@JeremyDev87 JeremyDev87 added the fix label Apr 3, 2026
@vercel

vercel Bot commented Apr 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 3, 2026 6:18pm

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review: ✅ APPROVE

CI Status: ALL PASS

Code Review

agent-prompt.builder.ts — Rich metadata injection via rawProfile passthrough:

  • mandatory_checklist → rendered as checkbox list
  • communication.language → "IMPORTANT: Always respond in {language}"
  • skills.required/recommended → formatted skill list with purpose and trigger
  • modes[mode] → agent-specific mode instructions override generic when present
  • verification_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

@JeremyDev87 JeremyDev87 self-assigned this Apr 3, 2026
@JeremyDev87 JeremyDev87 merged commit a532e40 into master Apr 3, 2026
25 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/enrich-agent-prompt-builder-1246 branch April 3, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(mcp): agent prompt builder must include mandatory_checklist, skills, and language settings

1 participant