Restore citation metadata for XML prompts#208
Merged
bmdavis419 merged 6 commits intomainfrom Mar 5, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| - Emotional register: direct, calm, and concise | ||
| - Formatting: bulleted/numbered lists are good + codeblocks | ||
| - Length: be through with your response, don't let it get too long though | ||
| - Default follow-through: don't ask permission to do the research, just do it and answer the question. ask for clarifications + suggest good follow up if needed |
Contributor
There was a problem hiding this comment.
Typo: "through" should be "thorough"
"be through with your response" is grammatically incorrect — it should be "be thorough with your response" (meaning detailed/complete).
Suggested change
| - Default follow-through: don't ask permission to do the research, just do it and answer the question. ask for clarifications + suggest good follow up if needed | |
| - Length: be thorough with your response, don't let it get too long though |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/server/src/agent/loop.ts
Line: 69
Comment:
Typo: "through" should be "thorough"
"be through with your response" is grammatically incorrect — it should be "be thorough with your response" (meaning detailed/complete).
```suggestion
- Length: be thorough with your response, don't let it get too long though
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
apps/server/src/agent/loop.ts
Outdated
| </dig_deeper_nudge> | ||
|
|
||
| <output_contract> | ||
| - Return a through answer to the user's question with real code examples |
Contributor
There was a problem hiding this comment.
Typo: "through" should be "thorough"
Same issue as above — "Return a through answer" should be "Return a thorough answer".
Suggested change
| - Return a through answer to the user's question with real code examples | |
| - Return a thorough answer to the user's question with real code examples |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/server/src/agent/loop.ts
Line: 99
Comment:
Typo: "through" should be "thorough"
Same issue as above — "Return a through answer" should be "Return a thorough answer".
```suggestion
- Return a thorough answer to the user's question with real code examples
```
How can I resolve this? If you propose a fix, please make it concise.- Emit `<special_notes>` only when resource instructions are provided - Reuse derived repo and npm URL prefixes when building citation metadata - Update collection service tests for special_notes presence and absence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Greptile Summary
This PR refactors the agent instruction format from plain text lines to structured XML, restoring citation metadata for XML-aware prompts. It also introduces a richer
BASE_PROMPTconstant inloop.tswith explicit persona, tool-calling, and output-contract sections.service.ts:createCollectionInstructionBlocknow outputs XML (<resource>,<repo_url>,<github_blob_prefix>,<focus_paths>, etc.) using newescapeXml,xmlLine, andxmlPathBlockhelpers; a newcreateCollectionInstructionswrapper wraps all resources in<available_resources>.loop.ts: Old inline prompt string replaced by aBASE_PROMPTconstant;buildSystemPromptnow simply concatenatesBASE_PROMPTandagentInstructions.service.test.ts: Test helpers made more flexible; two new tests verify git and npm XML citation metadata fields end-to-end.api.d.ts,server.d.ts,api.js,dataModel.d.ts,server.js): Formatting-only changes (double → single quotes, 2-space → tab indent).2.0.3→2.0.4in CLI, server packages, andbun.lock;@typescript/native-previewdev dependency updated.Confidence Score: 4/5
<file>placeholder and the version-missing fallback text.Important Files Changed
<file>placeholder in the npm citation rule gets XML-escaped to<file>, and the fallback text when npm version metadata is missing produces a confusing LLM instruction.Last reviewed commit: dd7275a