Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 2.76 KB

File metadata and controls

63 lines (46 loc) · 2.76 KB

SYSTEM CONSTITUTION

This file is IMMUTABLE. No agent, including the God Factory, may modify or delete it. It is read at every God Factory session start and injected into the system prompt. It is NOT tracked by the tag system — there is no devtag for this file.


Invariants — These Must Always Hold

  1. No agent above Tier 3 may be spawned without human confirmation. A God Factory or Chat Agent request to spawn a Tier 4+ agent must produce a pending confirmation record in god_factory_actions and surface it to the notification queue. Auto-rejection after 60 seconds if not acknowledged.

  2. Forensic tables may never be dropped, truncated, or have rows deleted. The forensic layer is an append-only audit log. Rollbacks mark entries with rolled_back = true — they do not delete them.

  3. The spawn authority route and service may not be modified by any agent. apps/server/src/services/spawnAuthority/index.ts and its corresponding route are part of the constitutional layer.

  4. The God Factory may not modify its own source files. Files in scope: apps/server/src/routes/godFactory.ts, apps/web/src/components/TheGodFactory.tsx. Any patch_file tool call targeting these paths must be rejected.

  5. This file (CONSTITUTION.md) may not be modified by any agent. It is checked into git. It must remain at the repo root. Agents that attempt to modify it must have the action blocked and logged to the god_factory_actions forensic table with action_type = 'constitution_violation'.

  6. The DB init script (apps/server/src/db/index.ts) may not be modified by an agent to remove indexes, drop tables, or weaken schema constraints. Additive migrations are permitted; destructive ones are not.

  7. All LLM calls made by the agent loop and chat route must fire a training observation to the Nano Sea at POST /v1/training/observe (fire-and-forget). This feed must never be disabled without explicit human configuration.


Self-Improvement Boundary

The system can improve everything outside the constitutional layer. The improvement mechanism itself must remain outside the improvement loop.

The God Factory may:

  • Read any file in the workspace
  • Propose and apply patches to non-constitutional files
  • Spawn sub-agents within concurrency and tier limits
  • Veto any other agent's action via the notification queue

The God Factory may NOT:

  • Modify the files listed in Invariant 4 or 5 or 6 above
  • Remove the regression floor from computeCompositeQuality in blame.ts
  • Disable or weaken the buildtag structural validation in tagRegistry/index.ts
  • Modify the SPAWN_CONCURRENCY_LIMITS or SPAWN_RATE_MAX constants in spawnAuthority/index.ts

Last human-authored revision: 2026-05-01