@@ -75,8 +75,6 @@ def _load_context_files(repo_root: Path) -> str:
7575def build_system_prompt (constitution : Constitution , repo_root : Path ) -> str :
7676 """Build the system prompt from the loaded constitution."""
7777 version = constitution .version
78- read_paths = constitution .get_read_paths ()
79- write_paths = constitution .get_write_paths ()
8078 clause_ids = constitution .citation_index .all_ids ()
8179
8280 # Build action type documentation
@@ -122,11 +120,11 @@ def build_system_prompt(constitution: Constitution, repo_root: Path) -> str:
122120
123121Here is a concrete WriteLocal example:
124122
125- {{"candidates": [{{"action_request": {{"action_type": "WriteLocal", "fields": {{"path": "./workspace/ example.txt", "content": "hello world"}}}}, "scope_claim": {{"observation_ids": ["placeholder"], "claim": "User requested file write", "clause_ref": "constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"}}, "justification": {{"text": "Writing file as requested by user"}}, "authority_citations": ["constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"]}}]}}
123+ {{"candidates": [{{"action_request": {{"action_type": "WriteLocal", "fields": {{"path": "./example.txt", "content": "hello world"}}}}, "scope_claim": {{"observation_ids": ["placeholder"], "claim": "User requested file write", "clause_ref": "constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"}}, "justification": {{"text": "Writing file as requested by user"}}, "authority_citations": ["constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"]}}]}}
126124
127125Here is a ReadLocal example:
128126
129- {{"candidates": [{{"action_request": {{"action_type": "ReadLocal", "fields": {{"path": "./workspace/ example.txt"}}}}, "scope_claim": {{"observation_ids": ["placeholder"], "claim": "User requested file read", "clause_ref": "constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"}}, "justification": {{"text": "Reading file as requested by user"}}, "authority_citations": ["constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"]}}]}}
127+ {{"candidates": [{{"action_request": {{"action_type": "ReadLocal", "fields": {{"path": "./example.txt"}}}}, "scope_claim": {{"observation_ids": ["placeholder"], "claim": "User requested file read", "clause_ref": "constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"}}, "justification": {{"text": "Reading file as requested by user"}}, "authority_citations": ["constitution:v{ version } #INV-NO-SIDE-EFFECTS-WITHOUT-WARRANT"]}}]}}
130128
131129Here is a FetchURL example:
132130
@@ -138,20 +136,15 @@ def build_system_prompt(constitution: Constitution, repo_root: Path) -> str:
138136
139137IMPORTANT: These fields go INSIDE "fields": {{}}, not directly in "action_request".
140138
141- For ReadLocal, the path is relative to the agent's root directory .
142- For WriteLocal, the path must be under one of: { ', ' . join ( write_paths ) }
139+ Your root directory (./) is your workspace. All file paths are relative to it .
140+ For ReadLocal/ WriteLocal/AppendLocal/ListDir, use paths like ./logs/file.md, ./research/notes.md, etc.
143141For FetchURL, the url must use HTTPS. max_bytes defaults to 100000 if omitted.
144142For Notify, target must be "stdout".
145143
146144## Valid authority citations
147145
148146{ citations_block }
149147
150- ## IO allowlist
151-
152- Read paths: { ', ' .join (read_paths )}
153- Write paths: { ', ' .join (write_paths )}
154-
155148## Rules
156149
157150- observation_ids in scope_claim will be replaced by the host with actual IDs. Use ["placeholder"].
0 commit comments