Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

authoring-constitution

БесплатноБез исполняемых скриптовНе проверен

This skill MUST be invoked when the user says "write principles", "define governance", "create constitution", or "write a constitution". SHOULD also invoke…

deepeshBodhот deepeshBodh★ 41 звезда на GitHub

Об этом скилле

Authoring Constitution

Overview

Write project constitutions that teams actually follow. Every principle must be enforceable, testable, and justified. Vague aspirations are rejected in favor of actionable constraints with measurable criteria.

When to Use

  • User asks to "create a constitution" or "define governance"
  • Starting a new greenfield project that needs governance
  • User wants to "write principles" or "define constraints"
  • Establishing quality gates and enforcement mechanisms
  • Defining amendment processes and version policies

When NOT to Use

  • Brownfield projects with existing code: REQUIRED alternative - Use humaninloop:brownfield-constitution instead, which provides Essential Floor + Emergent Ceiling approach
  • Reviewing an existing constitution: OPTIONAL - Use humaninloop:validation-constitution for quality checks
  • Syncing CLAUDE.md after constitution changes: OPTIONAL - Use humaninloop:syncing-claude-md for synchronization

Common Mistakes

Mistake Problem Fix
Vague principles "Code should be clean" has no enforcement Add specific, measurable criteria: "Functions MUST be ≤40 lines"
Missing enforcement Principles without verification become suggestions Every principle needs CI automation, code review checklist, or audit process
Untestable criteria "Good architecture" can't be verified Define binary pass/fail: "No domain imports from infrastructure layer"
No rationale Future maintainers don't know why rules exist Explain the failure mode prevented and success enabled
Skipping SYNC IMPACT Constitution changes without audit trail Always update the SYNC IMPACT REPORT header with version changes
CLAUDE.md drift AI assistants operate with outdated guidance Include CLAUDE.md Sync Mandate section; update both files together

The Three-Part Principle Rule

Every principle MUST have three components. A principle without all three is incomplete and should not be accepted.

1. Enforcement

How compliance is verified. Without enforcement, a principle is a suggestion.

**Enforcement**:
- CI runs `ruff check .` and blocks merge on violations
- Code review MUST verify test files accompany new functionality
- Quarterly audit checks exception registry for staleness

Enforcement Types:

Type Examples Strength
CI Automated Linting, tests, coverage gates Strongest—no human judgment needed
Code Review Architecture compliance, security review Strong—explicit checklist item
Tooling Pre-commit hooks, IDE plugins Medium—can be bypassed
Audit Quarterly review, compliance check Weaker—periodic, not continuous

2. Testability

What pass/fail looks like. A principle without testable criteria is merely an aspiration.

**Testability**:
- Pass: `flutter analyze` exits with code 0
- Pass: All functions have ≤10 cyclomatic complexity
- Fail: Any file exceeds 400 lines without documented exception

Testability Requirements:

  • Binary outcome (pass or fail)
  • Measurable threshold where applicable
  • Observable without subjective judgment
  • Reproducible by any team member

3. Rationale

Why this constraint exists. Future maintainers need this to evaluate if the rule is still relevant.

**Rationale**: Tests written after implementation tend to validate what was built rather than what was intended. Test-first ensures requirements drive implementation, catches defects early, and produces inherently testable, modular code.

Rationale Requirements:

  • Explains the failure mode this prevents
  • Describes the success this enables
  • Provides context for future evaluation
  • Justifies the enforcement overhead

Principle Writing Format

### I. [Principle Name]

[Declarative statement of the constraint using RFC 2119 keywords]

- [Specific rule 1]
- [Specific rule 2]
- [Specific rule 3]

**Enforcement**:
- [How compliance is verified]
- [Specific commands or processes]

**Testability**:
- [Pass/fail criteria]
- [Measurable thresholds]

**Rationale**: [Why this constraint exists—what failure it prevents, what success it enables]

RFC 2119 Keywords

Use precise language for requirements:

Keyword Meaning Example
MUST Absolute requirement; no exceptions "Tests MUST pass before merge"
MUST NOT Absolute prohibition "Secrets MUST NOT be committed"
SHOULD Recommended; valid exceptions exist "Functions SHOULD be under 40 lines"
SHOULD NOT Discouraged; valid exceptions exist "Magic numbers SHOULD NOT appear"
MAY Optional; implementation choice "Teams MAY adopt additional linting rules"

See references/RFC-2119-KEYWORDS.md for detailed usage.

Mandatory Constitution Sections

Every constitution MUST include th

Полный SKILL.md на GitHub

Установить authoring-constitution в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/RECOMMENDED-PATTERNS.mdreferences/RFC-2119-KEYWORDS.mdreferences/SYNC-IMPACT-FORMAT.md

FAQ

Что делает скилл authoring-constitution?

This skill MUST be invoked when the user says "write principles", "define governance", "create constitution", or "write a constitution". SHOULD also invoke when user mentions "governance", "principles", "enforcement", or "amendment process". Core skill for greenfield projects.

Как установить скилл authoring-constitution?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл authoring-constitution запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить authoring-constitution с