Skip to content

[SC-16731] Rename constitution to charter everywhere#57

Merged
even-steven merged 3 commits into
mainfrom
stevenchand/sc-16731/unify-language
Jun 11, 2026
Merged

[SC-16731] Rename constitution to charter everywhere#57
even-steven merged 3 commits into
mainfrom
stevenchand/sc-16731/unify-language

Conversation

@even-steven

Copy link
Copy Markdown
Contributor

What and why?

Renames the term "constitution" to "charter" consistently across the entire Atryum codebase — Go backend, TypeScript/TSX UI, database schema, docs, and skill files.

Also removes the "User pattern" field from the rule scope UI in the Invocations page (it was always * / not useful).

Before: constitution, constitution_field_key throughout code, DB columns, API JSON, and UI labels.
After: charter, charter_field_key throughout — a cleaner, more intuitive term for the agent governance document.

How to test

  1. Run migrations — 021_rename_constitution_to_charter should apply cleanly on a fresh or existing DB.
  2. Open Settings UI → Agent Record Sync section should show "Charter Field" label.
  3. Open Agents UI → agent detail panel should show "Charter" textarea.
  4. Verify an AI evaluation rule still fires correctly end-to-end (requires companion backend PR).

What needs special review?

  • DB migration 021 renames two columns using ALTER TABLE ... RENAME COLUMN — works on SQLite 3.25+ and all supported Postgres versions.
  • The Go SyncSettingsProvider interface method renamed from ConstitutionFieldKey to CharterFieldKey — all implementations updated.
  • JSON tags on API request/response structs changed (constitution_field_keycharter_field_key) — requires the companion backend PR to land together.

Dependencies, breaking changes, and deployment notes

Companion backend PR required: The VM backend POST /atryum/evaluate endpoint must be updated to read charter_field_key instead of constitution_field_key. See companion PR in validmind/backend.

Breaking change for any external callers of the Atryum API that pass constitution or constitution_field_key fields — those must be updated to charter / charter_field_key.

Release notes

Renames the agent governance document from "constitution" to "charter" throughout the Atryum UI and API.

Checklist

  • What and why
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Tested locally

Made with Cursor

@shortcut-integration

Copy link
Copy Markdown

This pull request has been linked to Shortcut Story #16731: Unify language.

@mdeyell-valid-mind

Copy link
Copy Markdown
Contributor

The db test needs to be updated

--- FAIL: TestMigrationRegistryPreservesExistingVersionsAndNames (0.00s)
    db_test.go:50: migration count = 21
--- FAIL: TestGetPendingMigrationsUsesRegistryOrder (0.00s)
    db_test.go:88: pending count = 20
--- FAIL: TestInitDB_FreshDatabase (0.01s)
    sqlite_test.go:45: expected 20 migrations, got 21
--- FAIL: TestInitDB_Idempotent (0.01s)
    sqlite_test.go:74: expected 20 migrations after double init, got 21

@mdeyell-valid-mind

Copy link
Copy Markdown
Contributor

grep still shows user_pattern in a couple places

even-steven and others added 3 commits June 11, 2026 15:21
Renames all uses of "constitution"/"constitution_field_key" to
"charter"/"charter_field_key" across the Atryum codebase:

- DB migration 021: renames agents.constitution → agents.charter and
  agent_sync_settings.constitution_field_key → agent_sync_settings.charter_field_key
- Go backend: structs, interfaces, SQL queries, JSON tags, log messages
- TypeScript/TSX UI: API types, state vars, form labels (Settings, Agents)
- Invocations page: removes "User pattern" field from rule scope UI
- Docs: README, atryum.example.toml, docs/testing/ai-evaluation.md
- Skill: renames .agents/skills/populate-constitution → populate-charter

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The field was never exposed in the UI (always hardcoded to "*") and
agent_cuids already handles agent-specific rule targeting. Remove the
column via migration 022, strip it from Go structs/queries/matching
logic and TypeScript types, and clean up the integration test seed
script.

Co-authored-by: Cursor <cursoragent@cursor.com>
@even-steven even-steven force-pushed the stevenchand/sc-16731/unify-language branch from 798e141 to da6d8cd Compare June 11, 2026 22:22
@even-steven even-steven merged commit d3bda2b into main Jun 11, 2026
3 checks passed
@even-steven even-steven deleted the stevenchand/sc-16731/unify-language branch June 11, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants