Skip to content

PLAN mode recommended_act_agent ignores intent-based recommendation#363

Merged
JeremyDev87 merged 4 commits intomasterfrom
fix/plan-mode-intent-recommendation
Feb 12, 2026
Merged

PLAN mode recommended_act_agent ignores intent-based recommendation#363
JeremyDev87 merged 4 commits intomasterfrom
fix/plan-mode-intent-recommendation

Conversation

@JeremyDev87
Copy link
Owner

Summary

  • Fix PLAN mode recommended_act_agent always returning project config value instead of analyzing prompt intent
  • Add isRecommendation flag to StrategyContext so ActAgentStrategy.resolve() skips project config priority and uses intent pattern analysis first
  • Add missing intent patterns for frontend-developer (13 patterns) and devops-engineer (10 patterns) that were previously unreachable via intent analysis

Problem

When parse_mode is called in PLAN mode, getActAgentRecommendation() simulates ACT mode resolution. However, ActAgentStrategy.resolve() always returned the project config agent (priority 3) before reaching intent pattern analysis (priority 5-11):

Prompt Expected Actual (before fix)
"PLAN design API" backend-developer agent-architect
"PLAN build UI" frontend-developer agent-architect
"PLAN setup CI/CD" devops-engineer agent-architect

Solution

Priority change in recommendation mode

When isRecommendation=true:

  1. Explicit request (unchanged)
  2. PLAN mode recommended agent (unchanged)
  3. Project configskipped
  4. Intent pattern analysis (unchanged, now reachable)
  5. Context-based inference (unchanged)
  6. Project config (moved here as late fallback)
  7. Default fallback (unchanged)

When isRecommendation is unset/false, existing ACT mode behavior is preserved.

New intent patterns

  • frontend-developer: React, Vue, Angular, Svelte, Next.js, UI components, CSS/Tailwind, responsive design, state management
  • devops-engineer: GitHub Actions, Jenkins, ArgoCD, Docker, CI/CD pipelines, deployment automation, monitoring

Frontend patterns are scoped to web-specific contexts to avoid overlap with mobile-developer patterns.

Changed files

  • resolution-strategy.interface.ts — Add isRecommendation?: boolean to StrategyContext
  • act-agent.strategy.ts — Skip project config when isRecommendation, add late fallback
  • primary-agent-resolver.ts — Pass isRecommendation param through resolve()
  • keyword.service.ts — Pass isRecommendation: true in getActAgentRecommendation()
  • frontend.patterns.ts — New file with 13 frontend intent patterns
  • devops.patterns.ts — New file with 10 devops intent patterns
  • intent-pattern-checks.ts — Register frontend and devops patterns

Test plan

  • Recommendation mode: verify isRecommendation skips project config
  • Recommendation mode: verify project config used as late fallback when no intent matches
  • Recommendation mode: verify explicit request and recommendedActAgent still take priority
  • Frontend-developer patterns: React, Vue.js, UI component, Tailwind, generic frontend
  • DevOps-engineer patterns: GitHub Actions, Jenkins, CI/CD pipeline, Docker, generic devops
  • Issue PLAN mode recommended_act_agent ignores intent-based recommendation due to project config override #360 scenarios: "design API" → backend, "build UI" → frontend, "setup CI/CD" → devops
  • No regression on existing 2790 tests
  • TypeScript build passes

Fixes #360

…ased resolution

When PLAN mode simulates ACT agent recommendation via
getActAgentRecommendation(), the project config (primaryAgent) was
always returned before intent pattern analysis could run.

Add isRecommendation flag to StrategyContext. When true,
ActAgentStrategy.resolve() skips project config at priority 3 and
moves it to a late fallback after intent patterns and context-based
inference. PrimaryAgentResolver and KeywordService pass
isRecommendation=true through the resolver chain.

Fixes #360
…engineer

These agents were previously unreachable via intent pattern analysis
in INTENT_PATTERN_CHECKS, only accessible through context-based
inference or default fallback.

New patterns:
- frontend-developer: React, Vue, Angular, Svelte, Next.js, UI
  components, CSS/Tailwind, responsive design, state management
- devops-engineer: GitHub Actions, Jenkins, ArgoCD, Docker, CI/CD
  pipelines, deployment automation, monitoring

Frontend patterns are scoped to web contexts to avoid overlap with
mobile-developer patterns.

Fixes #360
- Recommendation mode tests: verify isRecommendation skips project
  config, falls back correctly, respects explicit and recommended
  agent priorities
- Frontend-developer pattern tests: React, Vue.js, UI component,
  Tailwind, generic frontend prompts
- DevOps-engineer pattern tests: GitHub Actions, Jenkins, CI/CD
  pipeline, Docker, generic devops prompts
- Issue #360 scenario tests: design API → backend-developer,
  build UI → frontend-developer, setup CI/CD → devops-engineer

Fixes #360
@JeremyDev87 JeremyDev87 changed the title fix(keyword): PLAN mode recommended_act_agent ignores intent-based recommendation PLAN mode recommended_act_agent ignores intent-based recommendation Feb 12, 2026
@JeremyDev87 JeremyDev87 self-assigned this Feb 12, 2026
@JeremyDev87 JeremyDev87 merged commit 889ae18 into master Feb 12, 2026
23 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/plan-mode-intent-recommendation branch February 12, 2026 15:27
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.

PLAN mode recommended_act_agent ignores intent-based recommendation due to project config override

1 participant