This reverts commit a01634d548.
This commit is contained in:
@@ -141,7 +141,7 @@ def gather_phase_outputs(spec_dir: Path, phase_name: str) -> str:
|
||||
file_path = spec_dir / filename
|
||||
if file_path.exists():
|
||||
try:
|
||||
content = file_path.read_text(encoding="utf-8")
|
||||
content = file_path.read_text()
|
||||
# Limit individual file size
|
||||
if len(content) > 10000:
|
||||
content = content[:10000] + "\n\n[... file truncated ...]"
|
||||
|
||||
@@ -82,7 +82,7 @@ class AgentRunner:
|
||||
return False, f"Prompt not found: {prompt_path}"
|
||||
|
||||
# Load prompt
|
||||
prompt = prompt_path.read_text(encoding="utf-8")
|
||||
prompt = prompt_path.read_text()
|
||||
debug_detailed(
|
||||
"agent_runner",
|
||||
"Loaded prompt file",
|
||||
|
||||
@@ -40,12 +40,7 @@ class SpecDocumentValidator:
|
||||
fixes.append("Create spec.md with required sections")
|
||||
return ValidationResult(False, "spec", errors, warnings, fixes)
|
||||
|
||||
try:
|
||||
content = spec_file.read_text(encoding="utf-8")
|
||||
except (OSError, UnicodeDecodeError) as e:
|
||||
errors.append(f"Failed to read spec.md: {e}")
|
||||
fixes.append("Ensure spec.md is a valid UTF-8 encoded file")
|
||||
return ValidationResult(False, "spec", errors, warnings, fixes)
|
||||
content = spec_file.read_text()
|
||||
|
||||
# Check for required sections
|
||||
for section in SPEC_REQUIRED_SECTIONS:
|
||||
|
||||
@@ -171,15 +171,9 @@ def detect_project_type(project_dir: Path) -> str:
|
||||
# Try to detect API framework
|
||||
deps_text = ""
|
||||
if requirements.exists():
|
||||
try:
|
||||
deps_text = requirements.read_text(encoding="utf-8").lower()
|
||||
except (OSError, UnicodeDecodeError):
|
||||
pass # Skip if file is unreadable
|
||||
deps_text = requirements.read_text().lower()
|
||||
if pyproject.exists():
|
||||
try:
|
||||
deps_text += pyproject.read_text(encoding="utf-8").lower()
|
||||
except (OSError, UnicodeDecodeError):
|
||||
pass # Skip if file is unreadable
|
||||
deps_text += pyproject.read_text().lower()
|
||||
|
||||
if "fastapi" in deps_text or "flask" in deps_text or "django" in deps_text:
|
||||
return "python_api"
|
||||
|
||||
Reference in New Issue
Block a user