Skip to content

Commit 3679882

Browse files
committed
docs: Update AI instructions in generate_context.py
1 parent 5e57599 commit 3679882

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

generate_context.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,14 @@ def generate_header(mode: str, checkpoint_file: Path | None = None, with_public_
199199
common_instructions = """
200200
**Instructions for AI:**
201201
1. **Analyze Structure:** Understand the Hugo project layout (config, content, layouts, assets, static structure).
202-
2. **Focus on Code/Config:** Pay close attention to Hugo templates (.html), SCSS (.scss), JavaScript (.js), configuration files (.toml, .yaml, .json), Go module files (go.mod, go.sum), and Node config (package.json).
203-
3. **Understand Content:** Review markdown content files (.md) for site text and structure.
204-
4. **Identify Customizations:** Note custom logic in layouts, partials, shortcodes, SCSS, and JS compared to standard Hugo/theme practices.
205-
5. **Note Dependencies:** Identify key dependencies from go.mod/go.sum and package.json.
206-
6. **Image Files:** Files ending with common image extensions (e.g., .png, .jpg, .svg, .gif, .webp, .ico) are listed with their paths (e.g., '=== IMAGE FILE: path/to/image.ext ===') but their binary content is NOT included.
207-
7. **Ignore Irrelevant Data:** Skip over binary data representations or verbose dependency code if accidentally included. Focus on the content provided below.
208-
8. **Primary Goal:** Use this information to answer questions about the website's implementation, structure, features, styling, configuration, and potential areas for improvement or troubleshooting.
209-
9. Provide Code with focus toward with minimal commenting
210-
10. dont include {{{{/* comments */}}}}, every time it confuses hugo and causes errors
211-
11. If we are copying or moving files, provide the bash command to accomplish this
212-
12. We don't need to make backups of files before big edits - there is sufficient rollback capability in dev environment
202+
2. **Primary Goal:** Use this information to answer questions about the website's implementation, structure, features, styling, configuration, and potential areas for improvement or troubleshooting.
203+
3. Provide Code with focus toward with minimal commenting
204+
4. dont include {{{{/* comments */}}}}, every time it confuses hugo and causes errors
205+
5. If we are copying or moving files, provide the bash command to accomplish this
206+
6. We don't need to make backups of files before big edits - there is sufficient rollback capability in dev environment
207+
7. If a solution is found for a particularly difficult issue, suggest updates to these instructions (generate_context.py)
208+
8. If code contains a code block, special handling may be required as the ``` often break the codeblock implementation
209+
9. Format code changes in a way that is most simple for an LLM (gemini, copilot) to integrate - this could be one single code block that references the file to update and it's new contents. It is not necessary to provide human instructions that highlight the specific lines being updated.
213210
"""
214211
if mode == "diff":
215212
checkpoint_ts_str = "ERROR: Checkpoint file missing!"

0 commit comments

Comments
 (0)