Skip to content

Fixes MAS-299#920

Merged
Henry-811 merged 2 commits intomassgen:dev/v0.1.54from
MuL1ian:boye-wip53
Feb 20, 2026
Merged

Fixes MAS-299#920
Henry-811 merged 2 commits intomassgen:dev/v0.1.54from
MuL1ian:boye-wip53

Conversation

@MuL1ian
Copy link
Copy Markdown
Collaborator

@MuL1ian MuL1ian commented Feb 19, 2026

Fixes MAS-299

Agents were previously submitting full code listings within their new_answer content,
which cluttered the shared context and introduced redundancy, as executable artifacts already reside in workspace files.

This PR adds explicit answer format guidelines to system prompts and tool descriptions,
instructing agents to provide high-level summaries instead of raw code dumps.

Pin fastmcp dependency to <3.0.0 in both pyproject.toml and requirements.txt to avoid potential breaking changes from a future v3 major release.

Type of change
• feat: - New features

Checklist

  • [ ✅] I have run pre-commit on my changed files and all checks pass
  • [✅ ] My code follows the style guidelines of this project
  • [✅ ] I have performed a self-review of my own code
  • [ ✅] I have commented my code, particularly in hard-to-understand areas
  • [✅ ] I have made corresponding changes to the documentation
  • [✅ ] My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • [✅ ] New and existing unit tests pass locally with my changes

Pre-commit status

check python ast.........................................................Passed
sort simple yaml files...............................(no files to check)Skipped
check yaml...........................................(no files to check)Skipped
check xml............................................(no files to check)Skipped
check toml...........................................(no files to check)Skipped
check docstring is first.................................................Passed
check json...........................................(no files to check)Skipped
fix python encoding pragma...............................................Passed
detect private key.......................................................Passed
trim trailing whitespace.................................................Passed
Add trailing commas......................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
black....................................................................Passed
flake8...................................................................Passed
Check package with Pyroma................................................Passed
Keep CLAUDE.md and AGENTS.md synchronized............(no files to check)Skipped
Auto-sync README_PYPI.md when README.md changes......(no files to check)Skipped
Ensure package name is "massgen" in pyproject.toml...(no files to check)Skipped

Summary by CodeRabbit

  • Documentation

    • Introduced comprehensive answer format guidelines providing users with clear instructions on structuring and presenting answers, including best practices and examples.
  • Chores

    • Updated dependency version constraints to improve system stability and prevent compatibility issues.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Walkthrough

The PR updates tool descriptions and system prompts to provide clearer guidance on answer formatting, adds answer format guidelines to system prompts, and pins the fastmcp dependency to versions below 3.0.0 for compatibility assurance.

Changes

Cohort / File(s) Summary
Tool Description Updates
massgen/message_templates.py, massgen/tool/workflow_toolkits/new_answer.py
Enhanced content parameter descriptions for the new_answer tool, emphasizing high-level summaries of delivered answers while cautioning against full code listings.
System Prompt Enhancements
massgen/system_prompt_sections.py
Added "ANSWER FORMAT GUIDELINES" blocks to system prompts after novelty and ROI guidance sections, instructing users on formatting and presentation of new_answer/vote decisions with examples.
Dependency Constraints
pyproject.toml, requirements.txt
Updated fastmcp dependency specification from >=2.12.3 to >=2.12.3,<3.0.0 to restrict versions below 3.0.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 4

❌ Failed checks (3 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title does not follow the required format (type: brief description) and is generic, referring only to a ticket number without describing the actual changes. Reformat the title to follow the template, such as 'feat: add answer format guidelines and pin fastmcp dependency'.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Documentation Updated ⚠️ Warning PR introduces user-facing answer format guidelines and tool modifications but lacks required documentation including missing TOOL.md file, no RST user guide updates, no design documentation, and insufficient docstrings. Create TOOL.md in workflow_toolkits directory, add RST documentation in docs/source/user_guide/, add design notes in docs/dev_notes/, and enhance docstrings in modified functions.
Description check ❓ Inconclusive The description covers the main changes and reasoning, but does not follow the prescribed template structure with proper sections and only partially completes the checklist items. Reorganize the description to match the template structure more closely, with clear sections for Type of change, Checklist presentation, and ensure all sections are properly formatted.
✅ Passed checks (2 passed)
Check name Status Explanation
Capabilities Registry Check ✅ Passed The custom check for Capabilities Registry Check is not applicable as the PR contains only prompt text updates, tool description changes, and dependency version pinning with no new models or backend capabilities.
Config Parameter Sync ✅ Passed PR modifies tool descriptions, system prompts, and dependency versions only; no new YAML configuration parameters are introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@massgen/message_templates.py`:
- Around line 255-260: Add a unit/snapshot test that asserts the updated
"description" value for the new_answer tool (the dict entry whose key is
"description" in massgen/message_templates.py) includes the exact HIGH-LEVEL
summary guidance shown in the diff; update or create a test (e.g., a test in the
message templates test suite that loads the template and checks that
"new_answer" appears and that its "description" string contains the new guidance
about what to include, where output lives, and tool usage) so the test fails if
that description text is ever changed unexpectedly.

In `@massgen/tool/workflow_toolkits/new_answer.py`:
- Around line 97-102: Add a new TOOL.md file to the workflow_toolkits directory
(massgen/tool/workflow_toolkits/) containing YAML frontmatter with the required
keys: name, description, category, requires_api_keys (array), tasks (list), and
keywords; follow the structure and wording patterns used in
massgen/tool/_basic/TOOL.md as a template, ensure "name" matches the toolkit
directory, "description" gives a short summary of the toolkit purpose,
"category" classifies it, "requires_api_keys" lists any external keys (or an
empty array), "tasks" enumerates supported high-level tasks, and "keywords"
includes search terms.

@Henry-811 Henry-811 changed the base branch from main to dev/v0.1.54 February 20, 2026 17:33
@Henry-811 Henry-811 merged commit 51706b0 into massgen:dev/v0.1.54 Feb 20, 2026
12 of 14 checks passed
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