Skip to content

feat(mcp-server): add agentic code verification loop to migrate tool#6468

Open
michaelmkraus wants to merge 8 commits intomainfrom
feat-mcp-agentic-feedback-loop
Open

feat(mcp-server): add agentic code verification loop to migrate tool#6468
michaelmkraus wants to merge 8 commits intomainfrom
feat-mcp-agentic-feedback-loop

Conversation

@michaelmkraus
Copy link
Copy Markdown
Contributor

@michaelmkraus michaelmkraus commented Apr 10, 2026

Proposed changes

This PR upgrades the migration engine. The AI is now forced to locally compile its generated code, analyze errors, and self-correct before outputting the final result.

Key Changes

Added verify_migrated_code to run framework-specific compiler checks (e.g., tsc --noEmit) via secure, hidden temp files.

Agentic Workflow: Updated the migrate.ts prompt to enforce a mandatory verification loop with a maximum of 3 retries.

Maintenance: Updated README.md, CONTEXT.md, and agent instructions, plus added new integration tests.

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/feat-mcp-agentic-feedback-loop

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

⚠️ No Changeset found

Latest commit: 1db5530

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the 📕documentation Improvements or additions to documentation label Apr 10, 2026
…nt ReDoS

Replace regex patterns in wrapCode() with simple String.includes() checks
to resolve CodeQL 'Polynomial regular expression used on uncontrolled data'
finding. The previous patterns /import\s+React[\s,{]/ and
/import\s*{[^}]*Component[^}]*}\s*from\s*['"]@angular\/core['"]/ had
overlapping quantifiers that could cause exponential backtracking on
crafted input. String.includes() provides O(n) worst-case and is
semantically sufficient for detecting existing imports.
@michaelmkraus michaelmkraus marked this pull request as ready for review April 10, 2026 11:28
@michaelmkraus michaelmkraus moved this from 🏗 In progress to 🎁 Ready for review in UX Engineering Team Backlog Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📕documentation Improvements or additions to documentation 🕵🏻‍♂️ MCP

Projects

Status: 🎁 Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants