agent-constitution design

Status: draft. This is the one design of the repo, in the files listed below. The constitution itself is built from index.toml and articles/ in its edition directory, constitution/2026-10/, into English and Chinese; this design cites it only by ID (see Source formats, IDs) and never restates it.

The repo provides three kinds of installable content: the constitution, the general rules and the general skills. A user picks which of them to install through configuration. How they are installed, and what metadata that needs, is not decided yet; it will be settled as the toolchain is built.

Contents

Each file covers one part and reads on its own; in this order they make the whole design.

  • Overview: goals and non-goals, the two layers, language.
  • File structure: the directory plan, its stages, and what the constitution protects.
  • Source formats: TOML text tables and IDs.
  • The constitution: its sources, numbering and the version for agents.
  • Rules and relaxations: rule sources, choosing rules, relaxation declarations and local parameters.
  • Skills: the skill layout.
  • Compilation: building the user-level instruction file; planned, not built.
  • Static site: the Hugo site and its deployment.
  • Frontend: the design tokens, icons, motion and components of the sites’ pages, and the screenshots and review of a change to them; not built yet.
  • Checkers, fixtures and feedback: the checkers, fixtures, load verification and the reserved feedback loop.
  • Amendments and releases: approving an amendment, releases and versions.
  • Agent Fleet and migration: relation to Agent Fleet and migrating from the hand-written guide.
  • Rule system: the rule system (numbered rules, sources and references, rule sets and lock files, dependencies, checks and the review loop), built so far in part at the repository level, for one source, and which parts above it will replace; its topics are in the four files below.
  • Rule format: what one rule holds, IDs and revisions, the rule file format, rules and skills, and tracing rules to the constitution.
  • Rule sets, references and dependencies: rule sets and the lock file, sources and references, and dependencies, one-ofs and packs.
  • Rule checks and review: checks, outcomes and the review loop, and trial rules.
  • The statute command: compilation and the site, the command and the first version, and why Rust.
  • Rule sources: the four kinds of source (global or local, public or private), which may cite which, overrides, subdomains and the repository-by-repository cutover from the hand-written guide; built in part.
  • Global configuration and git sources: the statute directories in the home directory, the global configuration, which source a name means, git sources and adding a source; built in part.
  • Rule configuration: the directory of the local rules, parameters such as the languages, which domains and rules are on by default, where a rule is used, and no rule under a rule; built.