iikit-00-constitution

star 45

Create or update a CONSTITUTION.md that defines project governance — establishes coding standards, quality gates, TDD policy, review requirements, and non-negotiable development principles with versioned amendment tracking. Use when defining project rules, setting up coding standards, establishing quality gates, configuring TDD requirements, or creating non-negotiable development principles.

intent-integrity-chain By intent-integrity-chain schedule Updated 6/3/2026

name: iikit-00-constitution description: >- Create or update a CONSTITUTION.md that defines project governance — establishes coding standards, quality gates, TDD policy, review requirements, and non-negotiable development principles with versioned amendment tracking. Use when defining project rules, setting up coding standards, establishing quality gates, configuring TDD requirements, or creating non-negotiable development principles. license: MIT metadata: version: "1.6.4"

Intent Integrity Kit Constitution

Process steps in order. Do not skip ahead.

Create or update the project constitution at CONSTITUTION.md — the governing principles for specification-driven development.

Scope

MUST contain: governance principles, non-negotiable development rules, quality standards, amendment procedures, compliance expectations.

MUST NOT contain: technology stack, frameworks, databases, implementation details, specific tools or versions. These belong in /iikit-02-plan. See phase-separation-rules.md.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Prerequisites Check

  1. Check PREMISE.md exists: test -f PREMISE.md. If missing: ERROR — "PREMISE.md not found. Run /iikit-core init first to create it." Do NOT proceed without PREMISE.md.
  2. Validate PREMISE.md:
    bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/validate-premise.sh --json
    
    If FAIL (missing sections or placeholders): ERROR — show details, suggest re-running init.
  3. Check if constitution exists: cat CONSTITUTION.md 2>/dev/null || echo "NO_CONSTITUTION"
  4. If missing, copy from constitution-template.md

Step 1 — Load Existing Constitution

Identify placeholder tokens [ALL_CAPS_IDENTIFIER]. Adapt to user's needs (more or fewer principles than template).

Proceed immediately to Step 2.

Step 2 — Collect Placeholder Values

  • From user input, or infer from repo context
  • RATIFICATION_DATE: original adoption date
  • LAST_AMENDED_DATE: today if changes made
  • CONSTITUTION_VERSION: semver (MAJOR: principle removal/redefinition, MINOR: new principle, PATCH: clarifications)

Proceed immediately to Step 3.

Step 3 — Draft Content

Replace all placeholders, preserve heading hierarchy, ensure each principle has name + rules + rationale, governance section covers amendment/versioning/compliance.

Proceed immediately to Step 4.

Step 4 — Consistency Check

Validate against plan-template.md, spec-template.md, tasks-template.md.

Proceed immediately to Step 5.

Step 5 — Sync Impact Report

HTML comment at top: version change, modified principles, added/removed sections, follow-up TODOs.

Proceed immediately to Step 6.

Step 6 — Validate

No remaining bracket tokens, version matches report, dates in ISO format, principles are declarative and testable. Constitution MUST have at least 3 principles — if fewer, add more based on the project context.

Proceed immediately to Step 7.

Step 7 — Phase Separation Validation

Scan for technology-specific content per phase-separation-rules.md. Auto-fix violations, re-validate until clean.

Proceed immediately to Step 8.

Step 8 — Write Outputs

Both files are required outputs of this skill:

Write CONSTITUTION.md with the finalized constitution content.

Write .specify/context.json with the TDD determination extracted from the constitution you just wrote. All downstream skills (testify, bugfix, implement) read TDD policy from this file. Determine the value from the constitution text:

  • Constitution contains MUST/REQUIRED + "TDD", "test-first", or "red-green-refactor" → mandatory
  • Constitution contains MUST + "test-driven" or "tests before code" → mandatory
  • Constitution contains MUST + "test-after" or "no unit tests" → forbidden
  • Testing is described as OPTIONAL or SHOULD → optional
  • No testing policy stated → optional

Create the file:

mkdir -p .specify

Write .specify/context.json containing at minimum:

{
  "tdd_determination": "<mandatory|optional|forbidden>"
}

If .specify/context.json already exists, merge (don't overwrite other fields). You can use jq if available, or write the file directly.

Verify: confirm .specify/context.json exists and contains tdd_determination.

Proceed immediately to Step 9.

Step 9 — Git Init

If needed, run git init to ensure project isolation.

Proceed immediately to Step 10.

Step 10 — Report

Report version, bump rationale, TDD determination, git status.

Finish here.

Formatting

  • Markdown headings per template, lines <100 chars, single blank line between sections, no trailing whitespace.

Commit, Dashboard & Next Steps

bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/post-phase.sh --phase 00 --commit-files "CONSTITUTION.md,.specify/context.json" --commit-msg "Add project constitution"

Windows: pwsh .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/post-phase.ps1 -Phase 00 -CommitFiles "CONSTITUTION.md,.specify/context.json" -CommitMsg "Add project constitution"

Parse next_step from JSON. Present per model-recommendations.md:

Constitution ready!
Next: [/clear → ] <next_step> (model: <tier>)
[- <alt_step> — <reason> (model: <tier>)]
- Dashboard: file://$(pwd)/.specify/dashboard.html
Install via CLI
npx skills add https://github.com/intent-integrity-chain/kit --skill iikit-00-constitution
Repository Details
star Stars 45
call_split Forks 4
navigation Branch main
article Path SKILL.md
More from Creator
intent-integrity-chain
intent-integrity-chain Explore all skills →