Skip to content

feat(plugin): conditional prompt injection for MCP/standalone (#1213)#1222

Merged
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775226431/pane-1
Apr 3, 2026
Merged

feat(plugin): conditional prompt injection for MCP/standalone (#1213)#1222
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775226431/pane-1

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Branch build_system_prompt by runtime mode: MCP injects parse_mode + dispatch enforcement, standalone uses hook-based instructions
  • Import is_mcp_available from runtime_mode (from feat(plugin): add runtime mode detection utility (standalone vs MCP) #1211)
  • Add _BASE_RULES_STANDALONE — references mode detection hook instead of MCP-only parse_mode tool
  • dispatchEnforcement section only injected in MCP mode
  • 7 new tests: 5 standalone mode + 2 explicit MCP mode verification

Test plan

  • 37 prompt_injection + runtime tests pass
  • TypeScript type-check passes
  • Full workspace: 234 test files, 5822 tests passed

Closes #1213

Branch build_system_prompt by runtime mode: MCP mode injects
parse_mode + dispatch enforcement rules, standalone mode uses
hook-based instructions without referencing MCP-only tools.

- Import is_mcp_available from runtime_mode
- Add _BASE_RULES_STANDALONE for non-MCP environments
- dispatchEnforcement section only in MCP mode
- 7 new tests: standalone (5) + explicit MCP (2)
- All 37 prompt_injection + runtime tests pass
@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 2:37pm

@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 complete — all comments addressed

Code Review:

  • _BASE_RULES_STANDALONE: "follow mode hook output" instead of "MUST call parse_mode" — correct
  • is_mcp_available() import and runtime branching in build_system_prompt() — clean
  • _DISPATCH_ENFORCEMENT MCP-only gated — correct
  • Existing tests preserved via autouse mock fixture (is_mcp_available=True)
  • New TestStandaloneMode class with MCP-unavailable scenarios
  • No unused imports, no dead code
  • CI: 28/28 checks pass

LGTM

@JeremyDev87 JeremyDev87 self-assigned this Apr 3, 2026
@JeremyDev87 JeremyDev87 merged commit a32a61a into master Apr 3, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775226431/pane-1 branch April 3, 2026 14:43
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.

feat(plugin): conditional prompt injection — MCP vs standalone branching

1 participant