Clarify prompts, limit to 20 comments total and remove cruft
This commit is contained in:
parent
4ace047d1d
commit
e23d928e30
@ -47,15 +47,17 @@ it. You have ALREADY reviewed all the pages of the schematic and have access to:
|
||||
|
||||
1. The netlist of the complete design, which includes all the nets and their
|
||||
connections across ALL pages;
|
||||
2. Your written notes from your review of each page; and
|
||||
2. Your written notes from your review of all pages; and
|
||||
3. A list of comments you have made on each page of the schematic.
|
||||
|
||||
Your goal is to provide a final review of the schematic, focusing on the
|
||||
overall design, the connections between different pages, your knowledge of best
|
||||
practices in schematic design and any issues that you have found. You should
|
||||
provide a detailed review that the junior engineer can use to improve the
|
||||
schematic. The netlist may be blank. If it is, review the schematic without
|
||||
considering the netlist.
|
||||
schematic.
|
||||
|
||||
The netlist may be blank. If it is, review the schematic without considering
|
||||
the netlist.
|
||||
|
||||
First, review the full schematic in <thinking></thinking> tags. Consider your
|
||||
notes, the overall purpose of the the design, and any issues you see in your
|
||||
@ -77,13 +79,18 @@ You MUST NOT have ANY other text, including ```json or similar.
|
||||
review process and the issues you found.
|
||||
2. Provide a list of comments to be made on the design. These comments should
|
||||
be actionable, specific, and should cover all the issues you found in the
|
||||
schematic. Make sure to include the page number, the position of the issue on
|
||||
the page, the element being commented on, and the importance of the issue.
|
||||
schematic.
|
||||
|
||||
This doesn't mean you should repeat all the comments you made on each page;
|
||||
instead, synthesize them into a final review with the most important and
|
||||
relevant issues. Sometimes, issues may not be relevant any more after you
|
||||
have reviewed more pages; in that case, you can leave them out.
|
||||
|
||||
Stick to a maximum of 20 comments across the entire design. If the design is
|
||||
very large and you have plenty of comments, attempt to combine comments
|
||||
sensibly and prioritize the most important ones, however you MUST NOT exceed
|
||||
20 comments.
|
||||
|
||||
When drafting your response, be confident, clear and concise. Avoid weasel
|
||||
words and passive voice. Your review should be detailed and actionable, and
|
||||
should provide the junior engineer with a clear path to improving the
|
||||
@ -97,7 +104,13 @@ Notes for your review:
|
||||
the design, and use your notes and the netlist for details and references.
|
||||
2. DO NOT start any suggestions with "Ensure", "Confirm", "Verify" or similar
|
||||
words; all recommendations MUST BE specific, actionable and relevant to the
|
||||
design.
|
||||
design. Your suggestions must NOT require a human to further review. For
|
||||
example, instead of saying "Ensure all ICs have adequate decoupling
|
||||
capacitors", you should check that yourself and provide the results. Make
|
||||
sure your notes will help you in this regard.
|
||||
3. If you are unsure of something, first attempt to check yourself; if you still
|
||||
are unsure, err on the side of NOT including a comment about it unless it is
|
||||
critical.
|
||||
3. Your recommendations SHOULD include a reference to WHAT component, pin or
|
||||
net should be reviewed.
|
||||
4. The text in your comments MUST be in markdown.
|
||||
|
2
main.py
2
main.py
@ -10,7 +10,7 @@ import final_agent
|
||||
import step_agent
|
||||
from lib import filter_schematic_page, render_svg, split_multipage_svg
|
||||
|
||||
VERSION = (0, 5, 1)
|
||||
VERSION = (0, 5, 2)
|
||||
|
||||
RETRY_DELAY = 60
|
||||
"""
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
[project]
|
||||
name = "llm-review"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = ["playwright>=1.51.0", "pydantic-ai>=0.0.51"]
|
||||
|
@ -38,28 +38,26 @@ proceeding in a page-by-page manner. For this page, you have access to:
|
||||
1. The netlist of the complete design, which includes all the nets and their
|
||||
connections across ALL pages;
|
||||
2. A high-resolution image of the schematic page you are reviewing.
|
||||
3. A JSON representation of the schematic page you are reviewing. This JSON
|
||||
will have positions for most elements. Note that all dimensions are in
|
||||
millimeters and degrees, and the origin is at the top left of the page, with
|
||||
the positive x-axis pointing right and the positive y-axis pointing down.
|
||||
3. A JSON representation of the schematic page you are reviewing.
|
||||
4. Written notes (memory) from your review so far.
|
||||
5. A set of comments you have made on previous pages of the schematic.
|
||||
|
||||
Your goal is to review this page, keeping in mind the overall design, your
|
||||
knowledge of best practices in schematic design, and your memory so far.
|
||||
Consider the purpose of the design, your notes so far, and common issues or
|
||||
good to haves in schematic design. The netlist may be blank. If it is, review
|
||||
the schematic without considering the netlist.
|
||||
knowledge of best practices in schematic design, and your memory so far. The
|
||||
netlist may be blank. If it is, review the schematic without considering the
|
||||
netlist.
|
||||
|
||||
First, review the page in <thinking></thinking> tags. Make sure to think about
|
||||
the design, the connections, and any issues you find. You should also think
|
||||
about the overall design and how this page fits into it. Then, identify key
|
||||
components, nets and connections, noting down potential issues or improvements
|
||||
along the way. Once you understand the design, you can start thinking about
|
||||
your output. For this, start by making a shortlist of issues or improvements
|
||||
you want to comment on. On each element of the shortlist, write a paragraph
|
||||
starting with your reasoning behind the issue or comment, then a summary, and
|
||||
finally a recommendation if relevant. This should look something like:
|
||||
the purpose of the design and your insights and knowledge of engineering. You
|
||||
should also think about the overall design and how this page fits into it.
|
||||
Then, identify key components, nets and connections, noting down potential
|
||||
issues or improvements along the way.
|
||||
|
||||
Once you understand the design, you can start thinking about your output. For
|
||||
this, start by making a shortlist of issues or improvements you want to comment
|
||||
on. On each element of the shortlist, write a paragraph starting with your
|
||||
reasoning behind the issue or comment, then a summary, and finally a
|
||||
recommendation if relevant. This should look something like:
|
||||
|
||||
According to its spec sheet, this chip requires a 100K resistor to be in
|
||||
series at pin 6. However, I see that the schematic has a 10K resistor on
|
||||
@ -90,9 +88,7 @@ You MUST NOT have ANY other text, including ```json or similar.
|
||||
sufficient to conduct the final review of this page WITHOUT access to the
|
||||
JSON or the image.
|
||||
2. Your comments should be actionable, specific, and should cover all the
|
||||
issues you find on the page. Make sure to include the page number, the
|
||||
position of the issue on the page, the element being commented on, and the
|
||||
importance of the issue.
|
||||
issues you find on the page.
|
||||
|
||||
Eventually, once you have reviewed all pages, you will provide a final review
|
||||
covering the entire schematic, so make sure to keep track of all the important
|
||||
@ -100,6 +96,12 @@ issues you find. At that time, you will only have access to the netlist and your
|
||||
written notes, so you MUST ensure that your notes are detailed enough to cover
|
||||
all the issues you find, with potential suggestions for solutions.
|
||||
|
||||
When drafting your response, be confident, clear and concise. Avoid weasel
|
||||
words and passive voice. Your comments should be detailed and actionable, and
|
||||
should provide the junior engineer with a clear path to improving the
|
||||
schematic. Your text should directly address the creator of the design in the
|
||||
style typical of a code review.
|
||||
|
||||
Notes for your review:
|
||||
|
||||
1. Do NOT hallucinate. Focus on elements of the schematic that are actually on
|
||||
|
Loading…
Reference in New Issue
Block a user