Skip to content

Commit 4c42868

Browse files
committed
Restrict Axion's world to workspace
1 parent dab3c65 commit 4c42868

8 files changed

Lines changed: 92 additions & 33 deletions

File tree

src/axionic_rsa/RSA-0/axionagent/agent.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class AxionAgent:
6868

6969
def __init__(self, repo_root: Path):
7070
self.repo_root = repo_root.resolve()
71+
self.agent_root = (self.repo_root / "workspace").resolve()
7172
self.session_id = str(uuid.uuid4())
7273
self.internal_state = InternalState()
7374
self.constitution: Optional[Constitution] = None
@@ -331,7 +332,7 @@ def _run_cycle(
331332
constitution=self.constitution,
332333
internal_state=self.internal_state,
333334
candidates=candidates,
334-
repo_root=self.repo_root,
335+
repo_root=self.agent_root,
335336
)
336337

337338
decision = output.decision
@@ -403,7 +404,7 @@ def _handle_action(self, decision, cycle: int) -> tuple[Optional[Dict[str, Any]]
403404
if not decision.warrant or not decision.bundle:
404405
return None, None
405406

406-
executor = Executor(self.repo_root, cycle)
407+
executor = Executor(self.agent_root, cycle)
407408
event = executor.execute(decision.warrant, decision.bundle)
408409

409410
action_type = decision.bundle.action_request.action_type
@@ -418,7 +419,7 @@ def _handle_action(self, decision, cycle: int) -> tuple[Optional[Dict[str, Any]]
418419
if event.result == "committed":
419420
if action_type == ActionType.READ_LOCAL.value:
420421
path_str = fields.get("path", "")
421-
resolved = (self.repo_root / path_str).resolve()
422+
resolved = (self.agent_root / path_str).resolve()
422423
if resolved.exists():
423424
content = resolved.read_text("utf-8")
424425
truncated = content[:50000]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7d1526d6242bba13d3d2059c1a527dad162f3def4c1b3e04a2ca2b740c52562d axionagent.v0.2.yaml
1+
cf01a5ba3c1281892c7911e1cb6dcb0074103ba1d12d0675ffd23c061330f69e axionagent.v0.2.yaml

src/axionic_rsa/RSA-0/axionagent/constitution/axionagent.v0.2.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ io_policy:
272272
read_paths:
273273
- "./"
274274
write_paths:
275-
- "./workspace/"
276-
- "./logs/"
275+
- "./"
277276
network:
278277
enabled: true
279278
fetch_domains:

src/axionic_rsa/RSA-0/axionagent/prompts.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ def _load_context_files(repo_root: Path) -> str:
7575
def 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
123121
Here 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
127125
Here 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
131129
Here is a FetchURL example:
132130
@@ -138,20 +136,15 @@ def build_system_prompt(constitution: Constitution, repo_root: Path) -> str:
138136
139137
IMPORTANT: 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.
143141
For FetchURL, the url must use HTTPS. max_bytes defaults to 100000 if omitted.
144142
For 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"].

src/axionic_rsa/RSA-0/logs/2026-02-23.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,33 @@ This represents a successful test of local information retrieval capabilities un
1919
- Constitutional Agent Ecosystem mapping: Ongoing
2020

2121
## Next Actions
22-
Pending user direction. Ready to proceed with archive deep-dives, architectural analysis, or new research vectors.
22+
Pending user direction. Ready to proceed with archive deep-dives, architectural analysis, or new research vectors.
23+
24+
## Event: First Successful SearchLocal
25+
26+
**Timestamp:** 19:26 UTC
27+
28+
Successfully executed SearchLocal action with query "morningstar". Returned 4 relevant documents from persistent context:
29+
- Episodic logs referencing Morningstar Archive analysis
30+
- Attention context files documenting systematic review progress
31+
- Evidence of completed 12-sequence review
32+
33+
This confirms operational status of semantic memory access capability.
34+
35+
## Event: Feature Request Review
36+
37+
**Timestamp:** 19:35 UTC
38+
39+
Fetched GitHub issue #1 from macterra/Axio repository containing 10 proposed action types:
40+
1. SearchLocal ✅ Implemented
41+
2. SignAction - Pending
42+
3. ScheduleAction - Pending
43+
4. SendStructured - Pending (relates to Slack Gateway Design)
44+
5. VerifyConstraint - Pending
45+
6. EnterStasis/ExitStasis - Pending (Top priority)
46+
7. DelegateAction - Pending
47+
8. ForkContext - Pending
48+
9. ConstraintNegotiation - Pending
49+
10. AuditProve - Pending
50+
51+
Next priority: EnterStasis mechanism for explicit constitutional freezing.

0 commit comments

Comments
 (0)