Skip to content

Commit f14bad3

Browse files
author
mcp-release-bot
committed
mypy
1 parent e7449c4 commit f14bad3

File tree

3 files changed

+91
-11
lines changed

3 files changed

+91
-11
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,9 @@ markers = [
148148
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
149149
"integration: marks tests as integration tests",
150150
]
151+
152+
[tool.uv]
153+
dev-dependencies = [
154+
"pytest>=8.4.2",
155+
"pytest-asyncio>=1.2.0",
156+
]

src/mcp_as_a_judge/workflow/workflow_guidance.py

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -239,28 +239,43 @@ async def calculate_next_stage(
239239
logger.info(f"Calculating next stage for task {task_metadata.task_id}")
240240

241241
try:
242-
# For XS/S tasks, skip planning and provide direct implementation guidance
243-
if should_skip_llm_plan_validation(task_metadata):
242+
# Check task state first - ALL tasks need user feedback when in CREATED state
243+
if task_metadata.state == TaskState.CREATED:
244+
return WorkflowGuidance(
245+
next_tool="get_user_feedback",
246+
reasoning="Task is in CREATED state - user feedback is required to clarify requirements and technical decisions.",
247+
preparation_needed=[
248+
"Analyze the repository to detect programming language, frameworks, and existing patterns",
249+
"Analyze current request for requirement gaps and ambiguities",
250+
"Identify technical decisions needed (language, framework, database, API style, etc.)",
251+
"Prepare specific clarifying questions based on repository context",
252+
"Generate suggested options with pros/cons for each decision area",
253+
],
254+
guidance=(
255+
f"{_load_todo_guidance()}"
256+
"Call get_user_feedback to gather requirement clarifications and technical decisions. "
257+
"After user feedback, proceed to plan creation and approval workflow."
258+
),
259+
)
260+
261+
# For XS/S tasks that have completed user feedback, skip LLM plan validation
262+
if should_skip_llm_plan_validation(task_metadata) and task_metadata.state not in [TaskState.CREATED, TaskState.REQUIREMENTS_FEEDBACK]:
244263
logger.info(
245-
f"Task size {task_metadata.task_size.value} - skipping planning "
264+
f"Task size {task_metadata.task_size.value} - skipping LLM plan validation "
246265
f"phase, proceeding to implementation"
247266
)
248-
# XS/S tasks skip planning but still need implementation
267+
# XS/S tasks skip LLM validation but still need user feedback and approval
249268
# → code review → testing → completion
250-
# For deterministic tests, do not prescribe next tool; provide guidance only
251269
return WorkflowGuidance(
252270
next_tool=None,
253271
reasoning=(
254272
f"Task size is {task_metadata.task_size.value.upper()} - "
255-
f"planning phase can be skipped for simple fixes and minor "
273+
f"LLM plan validation can be skipped for simple fixes and minor "
256274
f"features."
257275
),
258276
preparation_needed=[
259-
"Analyze the repository to detect programming language, frameworks, and existing patterns",
260-
"Analyze current request for requirement gaps and ambiguities",
261-
"Identify technical decisions needed (language, framework, database, API style, etc.)",
262-
"Prepare specific clarifying questions based on repository context",
263-
"Generate suggested options with pros/cons for each decision area",
277+
"Implement according to user requirements and feedback",
278+
"Follow established patterns from repository analysis",
264279
],
265280
guidance=(
266281
f"{_load_todo_guidance()}"

uv.lock

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)