Implement the following plan: Plan: Improve project structure remediation quality…
- User
Implement the following plan:
Plan: Improve project structure remediation quality
Context
When the remediation AI fixes a "missing project structure" issue (evaluator 08, section 8.1), it produces bare folder listings like
- src/,- src/components/with no descriptions. This has zero value for AI coding agents who need to know what each directory contains. The evaluator 08 prompt already shows excellent annotated examples, but this quality guidance doesn't flow into the remediation prompt.Change
Add a
project-structure-specific quality hint in theerrorDefaultGuidancedispatch table insidegetOutputTypeInstructions().File:
src/shared/remediation/prompt-generator.tsIn the
errorDefaultGuidancestring (line 257), add a new entry forproject-structureafter the existingoutdated-documentationline:code- `outdated-documentation`, `structure-formatting` → usually **generic update** (factual corrections: wrong paths, outdated names) + - `project-structure` → **generic update**; produce an annotated directory tree where each entry includes a brief description of its purpose (e.g., `src/components/ # React UI components`). Bare folder listings without descriptions have no value for AI agents — every directory must explain what it contains.This works because:
getOutputTypeInstructions()is called by bothbuildErrorPlanPromptandbuildErrorExecutionPrompt, so both plan and execution phases get the guidance- It's co-located with existing per-evaluator routing hints — clean pattern
- No conditional logic or new functions needed
File:
src/shared/remediation/prompt-generator.test.tsAdd one test asserting the annotated-tree guidance appears in error prompts containing a project-structure issue.
Verification
bun run test— all tests pass including new testbun run lint— no lint errors
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/cedricteyton/.claude/projects/-Users-cedricteyton-Code-agents-md-evaluator/eed11748-d5b3-4ea2-a47a-ed15168a3efc.jsonl
Assistant
Now let me add the new entry for
project-structurein the guidance section.Assistant
Now let me find the test file to add the new test.
Assistant
Now I'll add the test after the existing "error fix prompt includes output type guidance" test.
Assistant
Now let me run the tests and lint.
Assistant
All 1319 tests pass. Now lint.
Assistant
All done. Here's what was changed:
src/shared/remediation/prompt-generator.ts— Added aproject-structureentry to theerrorDefaultGuidancedispatch table (line 258). It instructs the remediation AI to produce annotated directory trees where every entry includes a purpose description, rather than bare folder listings.src/shared/remediation/prompt-generator.test.ts— Added a test confirming the annotated directory tree guidance appears in error fix prompts.- User
commit
Assistant
I'll commit only the two remediation files (not the unrelated codex-provider change).
Assistant
Committed successfully. The two remediation files are committed; the unrelated
codex-provider.tschange remains unstaged.