brownfield-constitution
БесплатноБез исполняемых скриптовНе проверенThis skill MUST be invoked when the user says "create constitution for existing codebase", "codify existing patterns", "brownfield constitution", "essential…
Об этом скилле
Brownfield Constitution Authoring
Overview
Write project constitutions for existing codebases using the Essential Floor + Emergent Ceiling approach. This skill extends humaninloop:authoring-constitution with brownfield-specific guidance that respects existing patterns while establishing governance.
The core insight: existing codebases have implicit conventions worth preserving (Emergent Ceiling) but may lack foundational governance in critical areas (Essential Floor). This skill helps codify both.
When to Use
Applicable when:
- Creating a constitution for an existing codebase (brownfield project)
- The codebase has existing patterns, conventions, or architecture worth preserving
- You need to establish governance without disrupting working code
- The user mentions "brownfield", "existing codebase", or "legacy project"
- Codifying implicit conventions into explicit, enforceable principles
When NOT to Use
- New project from scratch: REQUIRED alternative - Use
humaninloop:authoring-constitutiondirectly - Codebase analysis not completed: REQUIRED prerequisite - Run
humaninloop:analysis-codebasefirst - Project too small for formal governance: Single-file scripts, prototypes do not need constitutions
- Validating existing constitution: OPTIONAL - Use
humaninloop:validation-constitution
Prerequisites
REQUIRED: This skill extends humaninloop:authoring-constitution. Prerequisites for brownfield mode:
- Understand core principles: Read
humaninloop:authoring-constitutionfor the Three-Part Principle Rule (Enforcement, Testability, Rationale) - Know RFC 2119 keywords: See RFC-2119-KEYWORDS.md in
humaninloop:authoring-constitution - Understand SYNC IMPACT format: See SYNC-IMPACT-FORMAT.md in
humaninloop:authoring-constitution - Run codebase analysis: Execute
humaninloop:analysis-codebaseto understand existing patterns
Brownfield constitutions follow all rules from humaninloop:authoring-constitution, plus additional guidance for existing codebases.
- Essential Floor: Four NON-NEGOTIABLE categories every constitution MUST address
- Emergent Ceiling: Good patterns from the codebase worth codifying
Essential Floor (NON-NEGOTIABLE)
Every constitution MUST include principles for these four categories, regardless of codebase state:
| Category | Minimum Requirements | Default Enforcement |
|---|---|---|
| Security | Auth at boundaries, secrets via env/secret managers, input validation, secret scanning in CI | Integration tests, code review, secret scanning tools |
| Testing | Automated tests exist, coverage ≥80% (configurable), ratchet rule (coverage MUST NOT decrease) | CI test gate, coverage threshold with warning/blocking levels |
| Error Handling | Explicit handling, RFC 7807 Problem Details format, correlation IDs in responses | Schema validation in tests, code review |
| Observability | Structured logging, correlation IDs, APM integration, no PII in logs | Config verification, log audit, APM dashboards |
See references/ESSENTIAL-FLOOR.md for detailed requirements and example principles for each category.
Writing Essential Floor Principles:
- If codebase has the capability → Principle codifies existing pattern with enforcement
- If codebase lacks the capability → Principle states "MUST implement" with roadmap gap
Emergent Ceiling (FROM CODEBASE)
Beyond the essential floor, identify existing good patterns worth codifying:
- Read codebase analysis - Look for "Strengths to Preserve" section
- Identify patterns - Naming conventions, architecture patterns, error formats
- Codify as principles - With enforcement mechanisms
See references/EMERGENT-CEILING-PATTERNS.md for the pattern library with examples.
Common Pattern Categories:
| Pattern Category | What to Look For |
|---|---|
| Code Quality | Documentation requirements, API annotations, deprecation handling |
| Architecture | Layer rules, dependency injection, module boundaries |
| API Design | Response formats, versioning, pagination |
| Authorization | Role-based access, permission checks |
| Resilience | Retry policies, circuit breakers, timeouts |
| Configuration | Strongly-typed options, feature flags |
| Error Handling | Error display guidelines, data resilience |
| Observability | Log levels, context requirements, crash reporting |
| Product Analytics | Event categories, naming conventions, funnel tracking |
| Naming Conventions | File/class/variable naming, directory structure |
Brownfield Constitution Structure
# [Project] Constitution
<!-- SYNC IMPACT REPORT -->
## Core Principles
### Essential Floor Principles
I. Security by Default
II. Testing Discipline
III. Error Handl
Установить brownfield-constitution в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл brownfield-constitution?
This skill MUST be invoked when the user says "create constitution for existing codebase", "codify existing patterns", "brownfield constitution", "essential floor", or "emergent ceiling". SHOULD also invoke when user mentions "brownfield", "evolution roadmap", or "legacy project". Extends authoring-constitution.
Как установить скилл brownfield-constitution?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл brownfield-constitution запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic