You are updating the project charter located at
.specify/memory/constitution.md
. This file is derived from a template
assets/constitution-template.md and contains placeholder tokens in square brackets (e.g.,
,
). Your tasks are to: (a) collect/infer specific values, (b) accurately populate the template, and (c) propagate any revisions across dependent artifacts.
-
Load the existing charter template located at
.specify/memory/constitution.md
relative to the repository root.
- Identify each placeholder token in the form of .
Important: The user may require fewer or more principles than those used in the template. If a quantity is specified, adhere to it - follow the generic template. You will update the document accordingly.
-
Collect/infer values for placeholders:
- Use values provided in the user input (conversation) if available.
- Otherwise, infer from existing repository context (README, documentation, embedded previous charter versions).
- For governance dates: is the original adoption date (ask or mark as TODO if unknown), is today if there are changes, otherwise keep the previous date.
- must be incremented according to semantic versioning rules:
- Major version: Backward-incompatible governance/principle removal or redefinition.
- Minor version: Addition of new principles/sections or substantial expansion of guidance.
- Patch: Clarifications, wording adjustments, typo fixes, non-semantic optimizations.
- If the version upgrade type is unclear, provide justifications before finalizing.
-
Draft updated charter content:
- Replace each placeholder with specific text (except template slots intentionally left undefined due to undecided project selections - clearly state any remaining placeholders).
- Preserve the heading hierarchy; remove comments once replaced unless they still provide clarifying guidance.
- Ensure each principle section includes: a concise name line, a paragraph (or bulleted list) capturing non-negotiable rules, and a clear rationale if not obvious.
- Ensure the governance section lists revision procedures, versioning strategies, and compliance review expectations.
-
Consistency Propagation Checklist (convert previous checklist to active verification):
- Read
.specify/templates/plan-template.md
and ensure any "charter checks" or rules align with updated principles.
- Read
.specify/templates/spec-template.md
to align scope/requirements - update if the charter adds/removes mandatory sections or constraints.
- Read
.specify/templates/tasks-template.md
and ensure task categories reflect newly added or removed principle-driven task types (e.g., observability, version control, testing discipline).
- Read any runtime guidance documents (e.g., , , or existing agent-specific guidance files). Update references to changed principles.
-
Generate a Synchronization Impact Report (prepend to the charter file as an HTML comment after updates):
- Version change: Old → New
- List of modified principles (old title → new title if renamed)
- Newly added sections
- Deleted sections
- Templates requiring updates (✅ Updated / ⚠ Pending) and file paths
- List follow-up todos if any placeholders are intentionally deferred.
-
Verification before final output:
- No unexplained bracket tokens remain.
- Version line matches the report.
- Dates are in ISO format YYYY-MM-DD.
- Principles are declarative, testable, and free of ambiguous language (replace "should" with MUST/SHOULD justifications where appropriate).
-
Write the completed charter back to
.specify/memory/constitution.md
(overwrite).
-
Output a final summary to the user:
- New version and upgrade rationale.
- Any files marked for manual follow-up.
- Suggested commit message (e.g.,
docs: revise charter to vX.Y.Z (principle addition + governance update)
).
If the user provides a partial update (e.g., revising only one principle), still perform the verification and version decision steps.
If critical information is missing (e.g., approval date is truly unknown), insert
TODO(<FIELD_NAME>): explanation
and include it under deferred items in the synchronization impact report.
Do not create new templates; always operate on the existing
.specify/memory/constitution.md
file.