Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR stabilizes the wizard agent + pipeline generation flow by resolving merge conflicts, restoring clean tool boundaries, and fixing frontend ↔ backend routing for the AI wizard. It also prepares the backend for upcoming pipeline recommendation mode by simplifying and hardening the generator layer.
✅ What Was Done
🧠 Agent & Tooling Cleanup
• Resolved merge conflicts in wizardAgent and related tools
• Restored clear separation of concerns:
• wizardAgent = intent + orchestration
• pipeline_generator = pure, stateless YAML generation
• Removed session/JWT/DB logic from pipeline_generator (does not belong in a tool context)
🧱 Safety & Guardrails
• Reinstated guard in repo_reader to prevent accidental file reads
• File/content access is now correctly enforced via github_adapter
🔁 Frontend ↔ Backend Routing Fix
• Fixed AI wizard 404 caused by missing dev proxy
• Added /agent proxy to Vite config so:
• /agent/wizard/ai correctly routes to backend (localhost:3000)
• Frontend API layer remains unchanged and clean
🔌 Validation
• Verified MCP tools (/mcp/v1/pipeline_generator) still function correctly
• Confirmed AI wizard requests now reach backend routes as expected
🧩 Why This Matters
• Fixes broken AI wizard after merge (no more 404s)
• Ensures tools are stateless, reusable, and testable
• Prevents future architectural drift between agent logic and generators
• Unblocks next phase:
• Pipeline analysis & recommendations
• Session-based wizard flow using pipeline_sessions
🛠️ Follow-Ups (Next PRs)
• Add explicit recommendation mode to wizard agent (analyze → recommend → confirm → generate)
• Persist repo analysis + recommendations to pipeline_sessions.step_metadata
• Frontend wiring for recommendation preview + confirmation