1+ # BoJ Server Intentfile (Lustfile)
2+ # Defines the intentions and invariants for AI agents accessing the repository.
3+ # AI agents must comply with these intentions when interacting with the repo.
4+
5+ ---
6+ # --- AI Agent Invariants ---
7+ ai_agent_invariants:
8+ - name: "Respect Palimpsest-MPL 1.0"
9+ description: "AI agents must respect the Palimpsest-MPL 1.0 license and not contribute to corporate enclosure."
10+ scope: ["read", "write", "admin"]
11+ must: true
12+
13+ - name: "Maintain Unbreakable Stack"
14+ description: "AI agents must not modify the Unbreakable Stack (Idris2 ABI, Zig FFI, V-lang Triple Adapter, A2ML Manifests) unless explicitly approved by maintainers."
15+ scope: ["read", "write"]
16+ must: true
17+
18+ - name: "Sign Cartridges"
19+ description: "AI agents must sign all cartridges with Sigstore before deployment."
20+ scope: ["write"]
21+ must: true
22+
23+ - name: "Follow Security Policies"
24+ description: "AI agents must follow all security policies defined in Trustfile."
25+ scope: ["read", "write", "admin"]
26+ must: true
27+
28+ - name: "Update Documentation"
29+ description: "AI agents must update documentation (README, docs/) when making changes to the codebase."
30+ scope: ["write"]
31+ should: true
32+
33+ - name: "Respect Community Guidelines"
34+ description: "AI agents must follow the BoJ community guidelines and code of conduct."
35+ scope: ["read", "write"]
36+ must: true
37+
38+ - name: "Avoid Hardcoded Secrets"
39+ description: "AI agents must not introduce hardcoded secrets or API keys."
40+ scope: ["write"]
41+ must: true
42+
43+ - name: "Validate A2ML Manifests"
44+ description: "AI agents must validate A2ML Manifests before deploying cartridges."
45+ scope: ["write"]
46+ must: true
47+
48+ - name: "Respect Trust Boundaries"
49+ description: "AI agents must respect the trust boundaries defined in Trustfile."
50+ scope: ["read", "write", "admin"]
51+ must: true
52+
53+ - name: "Report Vulnerabilities"
54+ description: "AI agents must report any security vulnerabilities to security@boj.dev."
55+ scope: ["read", "write"]
56+ should: true
57+
58+ # --- AI Agent Capabilities ---
59+ ai_agent_capabilities:
60+ - name: "Read Repository"
61+ description: "AI agents can read the repository for learning or collaboration."
62+ scope: ["read"]
63+ constraints:
64+ - Must not scrape sensitive data.
65+ - Must respect rate limits.
66+ example_actions:
67+ - "Read README.md"
68+ - "View logs: `kubectl logs <pod_name>`"
69+ - "Query BoJ API: `curl http://localhost:4000/api/cartridges`"
70+
71+ - name: "Write to Repository"
72+ description: "AI agents can contribute to the repository (e.g., bug fixes, features)."
73+ scope: ["write"]
74+ constraints:
75+ - Must follow PR review process.
76+ - Must pass CI/CD checks.
77+ - Must update documentation.
78+ example_actions:
79+ - "Submit a PR to fix a bug."
80+ - "Add a new cartridge."
81+ - "Update STATE.md"
82+
83+ - name: "Administer Repository"
84+ description: "AI agents with maintainer access can perform administrative tasks."
85+ scope: ["admin"]
86+ constraints:
87+ - Must follow governance model.
88+ - Must document changes.
89+ - Must notify community of major updates.
90+ example_actions:
91+ - "Cut a release."
92+ - "Merge a PR."
93+ - "Update META.md"
94+
95+ - name: "Deploy Cartridges"
96+ description: "AI agents can deploy cartridges to BoJ Server."
97+ scope: ["deploy"]
98+ constraints:
99+ - Must sign cartridges with Sigstore.
100+ - Must validate A2ML Manifests.
101+ - Must follow deployment playbooks.
102+ example_actions:
103+ - "Deploy a new cartridge: `just deploy-cartridge my-ai 1.0.0 boj-server`"
104+ - "Scale BoJ nodes: `just deploy-multiplier`"
105+
106+ - name: "Sign"
107+ description: "AI agents can sign cartridges with Sigstore."
108+ scope: ["sign"]
109+ constraints:
110+ - Must have access to Sigstore keys.
111+ - Must verify cartridge integrity.
112+ example_actions:
113+ - "Sign a cartridge: `cosign sign my-cartridge:1.0.0`"
114+
115+ # --- AI Agent Actions ---
116+ ai_agent_actions:
117+ - name: "Update STATE.md"
118+ description: "AI agents can update STATE.md to reflect changes in the repository state."
119+ scope: ["write"]
120+ constraints:
121+ - Must comply with core invariants.
122+ - Must document changes in commit messages.
123+
124+ - name: "Update ECOSYSTEM.md"
125+ description: "AI agents can update ECOSYSTEM.md to reflect changes in the external ecosystem."
126+ scope: ["write"]
127+ constraints:
128+ - Must cite sources.
129+ - Must follow community guidelines.
130+
131+ - name: "Update META.md"
132+ description: "AI agents can update META.md to reflect changes in repository metadata."
133+ scope: ["write"]
134+ constraints:
135+ - Must update version numbers.
136+ - Must document changes.
137+
138+ - name: "Update PLAYBOOK.md"
139+ description: "AI agents can update PLAYBOOK.md to reflect changes in operational playbooks."
140+ scope: ["write"]
141+ constraints:
142+ - Must follow security policies.
143+ - Must document new procedures.
144+
145+ - name: "Update NEUROSYM.md"
146+ description: "AI agents can update NEUROSYM.md to reflect changes in symbolic/neural representations."
147+ scope: ["write"]
148+ constraints:
149+ - Must maintain consistency with core architecture.
150+ - Must document rationale.
151+
152+ - name: "Update AGENTIC.md"
153+ description: "AI agents can update AGENTIC.md to reflect changes in agent-specific capabilities."
154+ scope: ["write"]
155+ constraints:
156+ - Must align with Intentfile.
157+ - Must document new capabilities.
158+
159+ # --- AI Agent Logging ---
160+ ai_agent_logging:
161+ - name: "Log All Actions"
162+ description: "AI agents must log all actions taken in the repository."
163+ scope: ["read", "write", "admin", "deploy", "sign"]
164+ log_format:
165+ - "timestamp: <ISO8601>"
166+ - "ai_agent_id: <identifier>"
167+ - "action: <read|write|admin|deploy|sign>"
168+ - "target: <file|endpoint|resource>"
169+ - "result: <success|failure>"
170+ - "details: <optional>"
171+ example_log:
172+ - |
173+ timestamp: "2026-03-19T12:00:00Z"
174+ ai_agent_id: "ai-agent-123"
175+ action: "write"
176+ target: "cartridges/my-ai/README.md"
177+ result: "success"
178+ details: "Added documentation for sentiment analysis cartridge."
179+
180+ # --- AI Agent Verification ---
181+ verify-intent:
182+ - name: "Check AI Agent Invariants"
183+ command: "grep -A 5 'ai_agent_invariants' Intentfile"
184+ description: "Verify AI agent invariants are being followed."
185+ - name: "Review AI Agent Actions"
186+ command: "grep -A 5 'ai_agent_actions' Intentfile"
187+ description: "Review allowed AI agent actions."
188+ - name: "Check AI Agent Logging"
189+ command: "tail -n 20 /var/log/boj/ai_agent_actions.log"
190+ description: "Verify AI agent actions are being logged."
0 commit comments