feat(agent): harden runtime agent design - #82
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughAdds agent metadata and runtime wiring, new built-in agents ( ChangesAgent Metadata & Built-in Agents
Tool Visibility Hardening
Documentation and Prompt Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pythinker_code/agents/default/ask.yaml`:
- Around line 8-13: The Ask-mode policy in ask.yaml declares a read-only
assistant but still whitelists the Shell tool ("Shell"), leaving mutating
commands available; remove "Shell" from the Ask-mode tool whitelist (or replace
it with a strictly read-only shell policy) so the mode's behavior matches its
contract, and apply the same change to the other Ask-mode block referenced
(lines 24-30) to ensure both "Ask mode" entries do not permit the Shell tool.
In `@src/pythinker_code/prompts/compact.md`:
- Around line 8-34: The compact.md template has multiple level-2 headings (e.g.,
"## Goal", "## Constraints & Preferences", "## Progress", "## Key Decisions",
"## Next Steps", "## Critical Context", "## Relevant Files") with no blank lines
before/after them causing MD022; fix by inserting a single blank line both above
and below each of these headings (and any nested "###" headings like "### Done",
"### In Progress", "### Blocked") so every heading is separated by blank lines,
ensuring the template conforms to markdownlint's MD022 rule.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 58108c71-1ae7-488d-983a-ded09466f65c
📒 Files selected for processing (18)
CHANGELOG.mddocs/en/customization/agent-architecture.mddocs/en/customization/agents.mdsrc/pythinker_code/agents/default/agent.yamlsrc/pythinker_code/agents/default/ask.yamlsrc/pythinker_code/agents/default/debug.yamlsrc/pythinker_code/agents/default/scout.yamlsrc/pythinker_code/agents/default/system.mdsrc/pythinker_code/agentspec.pysrc/pythinker_code/cli/__init__.pysrc/pythinker_code/prompts/compact.mdsrc/pythinker_code/soul/agent.pysrc/pythinker_code/soul/pythinkersoul.pysrc/pythinker_code/soul/toolset.pytests/core/test_agent_spec.pytests/core/test_default_agent.pytests/core/test_load_agent.pytests/core/test_permission_profiles.py
Add the three new agent YAML files (ask.yaml, debug.yaml, scout.yaml) to the test_pyinstaller_datas expected list in alphabetical order.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Remove Shell from ask.yaml allowed_tools — the mode is declared read-only and Shell allows arbitrary mutating commands, breaking the contract. Add blank lines around all headings in compact.md to satisfy MD022.
Summary
Verification
Summary by CodeRabbit
New Features
Improvements
Documentation