Skip to content

Conversation

@avivsinai
Copy link
Collaborator

Summary

  • Fixes the Apply & Review feature which expected LLMs to output <workspace_name> and <workspace_root> XML tags, but never provided this information in the generated prompt
  • Adds workspace info (name and root path) after each file header in generated prompts
  • Adds defensive fallbacks for missing workspace metadata
  • Includes workspace info in error path for consistent format

Test plan

  • All 110 automated tests pass
  • Reviewed by GPT-5.1 and Gemini 3 Pro (ensemble consultation)
  • Backwards compatible - additive change only

New prompt format

File: src/index.ts (100 tokens)
Workspace: my-project (/Users/dev/my-project)

Fixes #58

🤖 Generated with Claude Code

The Apply & Review feature expects LLMs to output <workspace_name> and
<workspace_root> XML tags, but this information was never provided in
the generated prompt. The LLM had no way to know the workspace root
path since only relative file paths were included.

Changes:
- Add workspace name and root path after each file header in prompts
- Add defensive fallback for missing workspace metadata
- Include workspace info in error path for consistent format

Fixes #58

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@avivsinai avivsinai merged commit b96984a into main Dec 1, 2025
6 checks passed
@avivsinai avivsinai deleted the fix/workspace-info-in-prompt branch December 1, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LLM cannot provide workspace root in Apply & Review because it's not included in generated prompt

2 participants