Tasks: Universal Charter Rename

Feature: 063-universal-charter-rename Created: 2026-04-04 Branch: main → main

Subtask Index

IDDescriptionWPParallel
T001Rename src/constitution/ → src/charter/ directoryWP01[P]
T002Update class/function names in src/charter/ modulesWP01
T003Rename src/specify_cli/constitution/ → src/specify_cli/charter/WP01[P]
T004Update class/function names in src/specify_cli/charter/WP01
T005Update __init__.py exports in both packagesWP01
T006Rename CLI command file + update typer app name/helpWP02
T007Update CLI registration in commands/__init__.pyWP02
T008Rename dashboard module + update function namesWP02[P]
T009Update state_contract.py constitution referencesWP02[P]
T010Update worktree.py setup_feature_directory()WP02[P]
T011Rename copy_constitution_templates() in template/manager.pyWP02[P]
T012Update init.py constitution setup referencesWP02
T013Update all import statements across codebaseWP03
T014Update pyproject.toml package configurationWP03
T015Update importlib.import_module referencesWP03
T016Verify mypy --strict passes on renamed modulesWP03
T017Smoke test: verify imports resolve correctlyWP03
T018Rename src/doctrine/constitution/ → src/doctrine/charter/WP04[P]
T019Rename skill directory + update SKILL.md + referencesWP04[P]
T020Rename command template file + update contentWP04[P]
T021Rename doctrine procedure file + update contentWP04[P]
T022Update software-dev mission templatesWP04
T023Update software-dev action guidelines (4 files)WP04
T024Update documentation + research mission templatesWP04
T025Rename command files in all 12 agent directoriesWP05
T026Rename skill directories in all agent directoriesWP05
T027Update .kittify/skills-manifest.jsonWP05
T028Update .kittify/AGENTS.md + overrides/AGENTS.mdWP05[P]
T029Update .gitignore entriesWP05[P]
T030Rename .kittify/constitution/ → .kittify/charter/ (dev repo)WP05
T031Update CLAUDE.md constitution referencesWP05[P]
T032Convert m_0_10_12 + m_0_13_0 to stubsWP06[P]
T033Convert m_2_0_0 + m_2_0_2 + m_2_1_2 to stubsWP06[P]
T034Add _LEGACY_MIGRATION_ID_MAP to metadata.pyWP06
T035Create m_3_1_1 Phase 1: layout normalizationWP06
T036Create m_3_1_1 Phase 2: content rewritingWP06
T037Create m_3_1_1 Phases 3-4: agent artifacts + metadataWP06
T038Verify migration registration and orderingWP06
T039Rename tests/constitution/ → tests/charter/ + update contentWP07
T040Rename 8 additional test files + update contentWP07
T041Update tests/git_ops/test_worktree.pyWP07[P]
T042Write charter-rename migration tests (layouts A, B, C)WP07
T043Write content rewriting + agent prompt testsWP07
T044Write metadata normalization testsWP07
T045Write idempotency + partial state testsWP07
T046Rename 4 doc files with "constitution" in filenameWP08
T047Update README.md + docs/reference/ filesWP08
T048Update glossary/ filesWP08[P]
T049Update remaining docs (development, how-to, examples, architecture)WP08[P]
T050Update .kittify/memory notes + src/kernel/ filesWP08[P]
T051Run acceptance verification gateWP08

Work Packages

Phase 1: Package & Module Renames (parallel)

WP01: Core Package Renames
  • Priority: P0 (foundation)
  • Subtasks: T001, T002, T003, T004, T005
  • Dependencies: none
  • Prompt: tasks/WP01-core-package-renames.md
  • Estimated size: ~350 lines
  • Summary: Rename src/constitution/ and src/specify_cli/constitution/ packages to charter equivalents. Update all class names, function names, docstrings, and string literals within the renamed modules.
  • Success criteria: Both packages exist at charter paths with all internal references updated. No "constitution" in any file within these directories.
  • Risks: Symbol renames may break downstream imports (addressed in WP03).
WP02: CLI, Dashboard, Worktree & Runtime Renames
  • Priority: P0 (foundation)
  • Subtasks: T006, T007, T008, T009, T010, T011, T012
  • Dependencies: none
  • Prompt: tasks/WP02-cli-dashboard-runtime-renames.md
  • Estimated size: ~450 lines
  • Summary: Rename CLI command module, dashboard path resolver, worktree setup code, template manager, and init code. Update typer app registration.
  • Success criteria: spec-kitty charter commands are registered. Worktree setup uses charter paths. No "constitution" in any modified file.
  • Risks: CLI registration change affects all subcommands; verify none are lost.

Phase 2: Integration & Build (sequential after Phase 1)

WP03: Import, Build & Cross-Reference Updates
  • Priority: P0 (integration)
  • Subtasks: T013, T014, T015, T016, T017
  • Dependencies: WP01, WP02
  • Prompt: tasks/WP03-import-build-updates.md
  • Estimated size: ~350 lines
  • Summary: Update all import statements across the codebase that reference constitution packages. Update pyproject.toml. Verify compilation and type checking.
  • Success criteria: mypy --strict passes on charter modules. No import errors.

Phase 3: Doctrine, Skills & Agent Artifacts (parallel with Phase 2)

WP04: Doctrine, Skills, Templates & Mission Artifacts
  • Priority: P1
  • Subtasks: T018, T019, T020, T021, T022, T023, T024
  • Dependencies: none
  • Prompt: tasks/WP04-doctrine-skills-templates.md
  • Estimated size: ~450 lines
  • Summary: Rename doctrine defaults directory, skill package, command template, and procedure file. Update all 9 doctrine mission artifact files containing "constitution".
  • Success criteria: Skill deploys as spec-kitty-charter-doctrine. All mission templates reference charter. No "constitution" in doctrine/ or missions/.
WP05: Agent Artifacts & Configuration
  • Priority: P1
  • Subtasks: T025, T026, T027, T028, T029, T030, T031
  • Dependencies: WP04
  • Prompt: tasks/WP05-agent-artifacts-config.md
  • Estimated size: ~400 lines
  • Summary: Rename agent command/skill files across all 12 directories. Update skills manifest, AGENTS.md, .gitignore, CLAUDE.md, and rename the dev repo's .kittify/constitution/ directory.
  • Success criteria: All agent directories use charter naming. Dev repo .kittify/ uses charter layout. No "constitution" in config files.

Phase 4: Migration System (parallel with Phase 3)

WP06: Migration Overhaul
  • Priority: P0 (critical path)
  • Subtasks: T032, T033, T034, T035, T036, T037, T038
  • Dependencies: WP01
  • Prompt: tasks/WP06-migration-overhaul.md
  • Estimated size: ~550 lines
  • Summary: Convert 5 old migrations to no-op stubs. Add metadata normalization to metadata.py. Create comprehensive charter-rename migration handling Layouts A/B/C, content rewriting, agent artifacts, and metadata normalization.
  • Success criteria: Old stubs contain zero "constitution". New migration handles all layouts. Metadata normalization bridges old IDs.
  • Risks: Most complex WP. Charter-rename must handle edge cases (partial state, concurrent runs, Windows paths).

Phase 5: Testing (after Phases 2 + 4)

WP07: Test Overhaul
  • Priority: P1
  • Subtasks: T039, T040, T041, T042, T043, T044, T045
  • Dependencies: WP01, WP02, WP03, WP06
  • Prompt: tasks/WP07-test-overhaul.md
  • Estimated size: ~500 lines
  • Summary: Rename all test directories and files. Update test content. Write comprehensive tests for the new charter-rename migration and metadata normalization.
  • Success criteria: pytest tests/ -x -q passes. 90%+ coverage on new migration code.

Phase 6: Documentation & Verification (after all)

WP08: Documentation & Acceptance
  • Priority: P2
  • Subtasks: T046, T047, T048, T049, T050, T051
  • Dependencies: WP01, WP02, WP03, WP04, WP05, WP06, WP07
  • Prompt: tasks/WP08-documentation-acceptance.md
  • Estimated size: ~400 lines
  • Summary: Rename doc files, update 30+ documentation files with 100+ constitution references, update glossary, and run the acceptance verification gate.
  • Success criteria: Acceptance grep returns zero matches (outside 2 bounded exception files). All filename checks pass.

Dependency Graph

WP01 ──┐
       ├──→ WP03 ──┐
WP02 ──┘            │
                    ├──→ WP07 ──┐
WP04 ──→ WP05      │           ���──→ WP08
                    │           │
WP06 ───────────────┘──────���────┘

Parallelization Opportunities

  • Phase 1: WP01 + WP02 + WP04 can run in parallel (no shared files)
  • Phase 2-4: WP03 (after WP01+WP02), WP05 (after WP04), WP06 (after WP01) can run in parallel
  • Phase 5: WP07 requires WP01+WP02+WP03+WP06
  • Phase 6: WP08 requires all

Maximum parallelism: 3 agents (WP01 + WP02 + WP04 simultaneously)

Requirement Coverage

RequirementWork Package(s)
FR-001WP02
FR-002, FR-003WP06
FR-004, FR-005WP04, WP05
FR-006, FR-007, FR-008, FR-009WP06
FR-010WP01, WP03
FR-011WP03
FR-012WP04
FR-013WP02
FR-014WP05
FR-015WP06
FR-016WP02
FR-017WP06
FR-018WP06
FR-019WP06
FR-020WP06
NFR-001, NFR-002WP08
NFR-003WP06
NFR-004WP07
NFR-005WP03