Skip to content

Conversation

@PVeazie951
Copy link
Contributor

Overview

This PR stabilizes and improves the multi-step CI/CD pipeline workflow in the Wizard Agent. The agent can now reliably generate a pipeline, ask for confirmation, and commit the workflow file to the user’s repository using the multi-turn API flow. It also prevents misrouting of user intent caused by ambiguous LLM decisions.

Key Improvements

✅ 1. Hardened commit-intent detection
• Replaced overly-broad commit regex with a safe, pipeline-specific matcher
• Ensures phrases like “yes commit”, “commit workflow”, “apply pipeline” always trigger pipeline_commit
• Prevents accidental triggers from unrelated phrases like “recent commits”

✅ 2. Added commit-history safety guard
• If the LLM or user references:
• “recent commits”
• “commit history”
• “see commits”
→ the request routes to github_adapter instead of committing a workflow.

This prevents the agent from confusing GitHub history queries with pipeline commits.

  1. Correct tool routing for multi-turn API conversations
    • User intent now always overrides LLM intent for commit confirmation
    • Guarantees the correct tool runs even when model reasoning is imperfect
    • Solves previous issue where “yes commit” was misinterpreted as a request for GitHub commit history

  1. Reliable YAML + repo context across turns
    • Ensures LAST_GENERATED_YAML and LAST_REPO_USED are properly retained
    • Allows API-based multi-step flows to commit generated workflows without losing state

  1. General stability improvements
    • More deterministic command routing
    • Better separation between pipeline tools and GitHub informational tools
    • Cleaner, safer conversational agent logic

Why This Matters

These changes make the Wizard Agent behave consistently and predictably, even across multiple conversational steps. This is essential for:
• Multi-step CI/CD pipeline generation
• CI workflow confirmation UX
• Reducing LLM misinterpretation errors
• Maintaining reliable automated repository commits
• Future expansion of the wizard (rollback, edits, diff previews, etc.)

This work significantly improves the reliability and robustness of the MCP-based CI/CD Builder.

…tection, added safety guards, ensured YAML + repo persistence across API turns, and fixed commit execution path
@lorencDedaj lorencDedaj merged commit 110e4b3 into main Nov 13, 2025
2 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.

3 participants