Skip to content

Commit bb6b10d

Browse files
committed
Clean up LLM section headers
1 parent 6f74f6d commit bb6b10d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.github/templates/personalize_gemini_cell.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def load_persona_file(filename):
5353
if persona_path.exists():
5454
content = persona_path.read_text(encoding='utf-8')
5555
# Add clear section markers for LLM parsing
56-
base_name = filename.replace('.md', '')
56+
base_name = Path(filename).stem # Remove directory and .md extension
5757
# For activity files, remove experience level suffix and add "ACTIVITIES"
5858
if '_beginner' in base_name or '_intermediate' in base_name or '_advanced' in base_name:
5959
# Strip the last underscore and everything after it, then add "ACTIVITIES"
@@ -69,9 +69,7 @@ def load_persona_file(filename):
6969
return f"# Error loading {filename}: {e}\n(Using basic fallback)"
7070

7171
# Load base persona with section markers
72-
persona_text = "===== START OF PERSONA TEXT =====\n"
7372
persona_text += load_persona_file('base_persona.md')
74-
persona_text += "===== END OF PERSONA TEXT =====\n\n"
7573

7674
# Get experience levels
7775
{% for category in categories.keys() %}

.github/templates/set_coding_rules_cell.py.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def load_ruleset_template(filename):
3434
if ruleset_path.exists():
3535
content = ruleset_path.read_text(encoding='utf-8')
3636
# Add clear section markers for LLM parsing
37-
base_name = filename.replace('.md', '')
37+
base_name = Path(filename).stem # Remove directory and .md extension
3838
if base_name.startswith('env_'):
3939
# Environment files: strip "env_" prefix and add "ENVIRONMENT"
4040
env_name = base_name[4:].replace('_', ' ').upper()
@@ -49,9 +49,7 @@ def load_ruleset_template(filename):
4949
return f"# Error loading {filename}: {e}\n(Using basic fallback)"
5050

5151
# Load core PyImageJ ruleset with section markers
52-
ruleset_text = "===== START OF PyImageJ RULES =====\n"
5352
ruleset_text += load_ruleset_template('pyimagej_core.md')
54-
ruleset_text += "===== END OF PyImageJ RULES =====\n\n"
5553

5654
# Get environment-specific ruleset with section markers
5755
env_key = environment_mapping[environment]

0 commit comments

Comments
 (0)