Constitutional guardrails (CONSTITUTION.md) for agent supervisor
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start with the affected crates listed in the issue: terraphim_agent_supervisor, terraphim_types, and terraphim_agent, then inspect the existing rust-embed and zipsign usage. Define the constitution resource, structured validation and signing boundaries, and integration tests for rejected violations. Done means the documented rules are embedded, validated before execution, logged on rejection, and covered by tests.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Create an immutable set of architectural principles (CONSTITUTION.md) that terraphim agents cannot violate, even when given explicit instructions to do so. Enforced by terraphim_agent_supervisor as a pre-execution validation step.
Motivation
Inspired by Ouroboros BIBLE.md pattern. The agent system crates are incomplete partly because there is no specification of what agents MUST NOT do. A constitution constrains the design space, making it easier to complete the agent layer because boundaries are clear.
Proposed Principles
- Privacy-first: No data leaves the device unless explicitly configured by the user
- Deterministic-first: Prefer Aho-Corasick automata over LLM when deterministic matching suffices
- Type-safe: No
unwrap()in library crates; all errors propagated viaResult - Compile-time checked: Prefer compile-time guarantees over runtime reflection
- Local-first: Offline operation is the default; network is optional
- Auditable: Every agent decision must be traceable to an input and a rule
- Reversible: Agent actions should be reversible where possible; destructive actions require confirmation
Implementation Plan
- Create
CONSTITUTION.mdat repo root with the principles above (editable by maintainers, versioned in git) - Embed as a compile-time resource via
rust-embed(already used interraphim_agentanddesktop) - Add
ConstitutionValidatortoterraphim_agent_supervisor:- Pre-execution hook: check proposed agent action against constitution rules
- Rules encoded as structured checks (not LLM interpretation)
- Violation = action rejected with reason, logged as event
- Cryptographically sign the constitution using existing
zipsigninfrastructure fromterraphim_update - Add integration tests: attempt constitutional violations, verify rejection
Affected Crates
terraphim_agent_supervisor(primary -- add validation)terraphim_types(addConstitutionRuletype)terraphim_agent(embed constitution resource)
Estimated Effort
~2 hours
Part of
Epic #595
- Vorherrschende Sprache
- Rust
- Sterne
- 66
- Forks
- 5
- Ø Merge
- 1 Std.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus terraphim/terraphim-ai
-
terraphim_rlm: require a per-sub-result verification plan (recheck / control / independent route)Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
terraphim/terraphim-ai#969 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
terraphim/terraphim-ai#968 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
terraphim/terraphim-ai#967 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
terraphim/terraphim-ai#966 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
terraphim/terraphim-ai#965 · 2 Kommentare ·
Alle Issues in terraphim/terraphim-ai
Ähnliche Issues
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arraysOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
neondatabase/neon#12965 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
goauthentik/authentik#26867 ·
Maintainer antworten meist innerhalb von 1 Tag
-
api bug macos maintainer-needed p2 triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
eclipse-zenoh/zenoh#2842 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag