Skip to content

Commit 564b3ba

Browse files
author
dori
committed
feat: fix ruff , imports and formatter
1 parent 1d811c8 commit 564b3ba

File tree

8 files changed

+619
-387
lines changed

8 files changed

+619
-387
lines changed

src/mcp_as_a_judge/models/enhanced_responses.py

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,24 @@ class ElicitationResult(TrimmedBaseModel):
195195
"""Result from user requirement elicitation."""
196196

197197
success: bool = Field(description="Whether elicitation was successful")
198-
clarified_requirements: str = Field(default="", description="Updated requirements based on user input")
199-
technical_decisions: dict[str, str] = Field(default_factory=dict, description="Technical decisions made by user")
200-
user_responses: dict[str, str] = Field(default_factory=dict, description="Raw user responses to questions")
201-
repository_context: str = Field(default="", description="Repository analysis that informed decisions")
202-
workflow_impact: str = Field(default="", description="How user input affects workflow and tool selection")
203-
error_message: str = Field(default="", description="Error message if elicitation failed")
198+
clarified_requirements: str = Field(
199+
default="", description="Updated requirements based on user input"
200+
)
201+
technical_decisions: dict[str, str] = Field(
202+
default_factory=dict, description="Technical decisions made by user"
203+
)
204+
user_responses: dict[str, str] = Field(
205+
default_factory=dict, description="Raw user responses to questions"
206+
)
207+
repository_context: str = Field(
208+
default="", description="Repository analysis that informed decisions"
209+
)
210+
workflow_impact: str = Field(
211+
default="", description="How user input affects workflow and tool selection"
212+
)
213+
error_message: str = Field(
214+
default="", description="Error message if elicitation failed"
215+
)
204216

205217

206218
class PlanCreationResult(TrimmedBaseModel):
@@ -209,35 +221,72 @@ class PlanCreationResult(TrimmedBaseModel):
209221
success: bool = Field(description="Whether plan creation was successful")
210222
plan: str = Field(default="", description="Detailed implementation plan")
211223
design: str = Field(default="", description="System design and architecture")
212-
research: str = Field(default="", description="Research findings and best practices")
213-
technical_decisions: list[dict] = Field(default_factory=list, description="Technical decisions made during planning")
214-
implementation_scope: dict = Field(default_factory=dict, description="Scope breakdown with files and complexity")
215-
language_specific_practices: list[str] = Field(default_factory=list, description="Best practices for chosen technology stack")
216-
risk_assessment: str = Field(default="", description="Potential risks and mitigation strategies")
217-
error_message: str = Field(default="", description="Error message if plan creation failed")
224+
research: str = Field(
225+
default="", description="Research findings and best practices"
226+
)
227+
technical_decisions: list[dict] = Field(
228+
default_factory=list, description="Technical decisions made during planning"
229+
)
230+
implementation_scope: dict = Field(
231+
default_factory=dict, description="Scope breakdown with files and complexity"
232+
)
233+
language_specific_practices: list[str] = Field(
234+
default_factory=list, description="Best practices for chosen technology stack"
235+
)
236+
risk_assessment: str = Field(
237+
default="", description="Potential risks and mitigation strategies"
238+
)
239+
error_message: str = Field(
240+
default="", description="Error message if plan creation failed"
241+
)
218242

219243

220244
class PlanUpdateResult(TrimmedBaseModel):
221245
"""Result from updating plan based on LLM feedback."""
222246

223247
success: bool = Field(description="Whether plan update was successful")
224248
updated_plan: str = Field(default="", description="Updated implementation plan")
225-
updated_design: str = Field(default="", description="Updated system design and architecture")
226-
updated_research: str = Field(default="", description="Updated research findings and best practices")
227-
llm_improvements: list[str] = Field(default_factory=list, description="List of improvements made by LLM")
228-
technical_changes: list[dict] = Field(default_factory=list, description="Technical changes made to the plan")
229-
change_rationale: str = Field(default="", description="Explanation of why changes were made")
230-
version_info: str = Field(default="", description="Plan version information (e.g., 'Plan B based on LLM feedback')")
231-
error_message: str = Field(default="", description="Error message if plan update failed")
249+
updated_design: str = Field(
250+
default="", description="Updated system design and architecture"
251+
)
252+
updated_research: str = Field(
253+
default="", description="Updated research findings and best practices"
254+
)
255+
llm_improvements: list[str] = Field(
256+
default_factory=list, description="List of improvements made by LLM"
257+
)
258+
technical_changes: list[dict] = Field(
259+
default_factory=list, description="Technical changes made to the plan"
260+
)
261+
change_rationale: str = Field(
262+
default="", description="Explanation of why changes were made"
263+
)
264+
version_info: str = Field(
265+
default="",
266+
description="Plan version information (e.g., 'Plan B based on LLM feedback')",
267+
)
268+
error_message: str = Field(
269+
default="", description="Error message if plan update failed"
270+
)
232271

233272

234273
class PlanApprovalResult(TrimmedBaseModel):
235274
"""Result from user plan approval."""
236275

237276
approved: bool = Field(description="Whether user approved the plan")
238277
user_feedback: str = Field(default="", description="User feedback on the plan")
239-
requirement_updates: str = Field(default="", description="Updates to requirements based on user feedback")
240-
plan_modifications: list[str] = Field(default_factory=list, description="Specific plan modifications requested")
241-
technical_concerns: list[str] = Field(default_factory=list, description="Technical concerns raised by user")
242-
workflow_changes: str = Field(default="", description="How approval/feedback affects next steps")
243-
error_message: str = Field(default="", description="Error message if approval process failed")
278+
requirement_updates: str = Field(
279+
default="", description="Updates to requirements based on user feedback"
280+
)
281+
plan_modifications: list[str] = Field(
282+
default_factory=list, description="Specific plan modifications requested"
283+
)
284+
technical_concerns: list[str] = Field(
285+
default_factory=list, description="Technical concerns raised by user"
286+
)
287+
workflow_changes: str = Field(
288+
default="", description="How approval/feedback affects next steps"
289+
)
290+
error_message: str = Field(
291+
default="", description="Error message if approval process failed"
292+
)

src/mcp_as_a_judge/models/task_metadata.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ class TaskState(str, Enum):
7373

7474
CREATED = "created" # Task just created, needs requirement feedback
7575
REQUIREMENTS_FEEDBACK = "requirements_feedback" # Gathering detailed requirements feedback (brainstorming)
76-
USER_APPROVE_REQUIREMENTS = "user_approve_requirements" # User approving requirements/plan (brainstorming)
76+
USER_APPROVE_REQUIREMENTS = (
77+
"user_approve_requirements" # User approving requirements/plan (brainstorming)
78+
)
7779
PLANNING = "planning" # Technical planning phase in progress (formal workflow)
7880
PLAN_APPROVED = "plan_approved" # Plan validated and approved
7981
IMPLEMENTING = "implementing" # Implementation phase in progress
@@ -166,14 +168,21 @@ class TaskMetadata(BaseModel):
166168

167169
# TECHNICAL DECISIONS - Captured during requirement gathering phase
168170
class TechnicalDecision(BaseModel):
169-
decision: str = Field(description="The type of decision made (e.g., 'Programming Language', 'Database Type')")
170-
choice: str = Field(description="The chosen option (e.g., 'Python', 'PostgreSQL')")
171+
decision: str = Field(
172+
description="The type of decision made (e.g., 'Programming Language', 'Database Type')"
173+
)
174+
choice: str = Field(
175+
description="The chosen option (e.g., 'Python', 'PostgreSQL')"
176+
)
171177
rationale: str = Field(description="Explanation of why this choice was made")
172-
timestamp: int = Field(default_factory=lambda: int(time.time()), description="When this decision was made")
178+
timestamp: int = Field(
179+
default_factory=lambda: int(time.time()),
180+
description="When this decision was made",
181+
)
173182

174183
technical_decisions: list[TechnicalDecision] = Field(
175184
default_factory=list,
176-
description="Technical decisions made during requirement gathering and brainstorming phase"
185+
description="Technical decisions made during requirement gathering and brainstorming phase",
177186
)
178187

179188
# (No explicit decision ledger; decisions are handled via LLM-driven elicitation and conversation history)

0 commit comments

Comments
 (0)