File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff 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"
7372persona_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 () %}
Original file line number Diff line number Diff 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"
5352ruleset_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
5755env_key = environment_mapping[environment]
You can’t perform that action at this time.
0 commit comments