Agent skill
faion-writing-constitutions
SDD Framework: Creates constitution.md through codebase analysis OR Socratic dialogue for new projects. Triggers on "constitution.md", "constitution", "project constitution", "project standards".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/faion-writing-constitutions
SKILL.md
SDD: Writing Constitutions
Communication: User's language. Docs: English.
Philosophy
Constitution.md — immutable project principles for ALL features.
Two modes:
- Existing Project → codebase analysis
- New Project → Socratic dialogue
MODE 1: Existing Project
Workflow: Detect → Analyze Structure → Tech Stack → Patterns → Draft → Review
Analyze:
- Directory layout, CLAUDE.md, README.md
- Config files (pyproject.toml, package.json)
- Architecture patterns, naming, linters, testing
Present findings:
**Analysis:**
1. Tech: Python 3.11, Django 4.2, PostgreSQL
2. Architecture: Layered (views → services → models)
3. Standards: black + isort + flake8
Does this match? What to change?
MODE 2: New Project
Workflow: Vision → Tech Choices → Architecture → Standards → Draft → Review
Vision (Socratic)
"Tell me about the project. What problem does it solve?"
Apply Five Whys to get to real need.
Tech Choices (Alternatives)
For each decision — present A/B/C with pros/cons:
- Backend: Django vs FastAPI vs NestJS
- Database: PostgreSQL vs MongoDB vs SQLite
Architecture (Trade-offs)
- Monolith vs Microservices
- REST vs GraphQL
- ORM vs Raw SQL
Standards
- Linter, formatter, type hints
- Testing coverage, CI/CD
- Git conventions
Draft (Both Modes)
Section by section with validation:
- Overview → "Correct?"
- Technology Stack → "Everything listed?"
- Architecture Patterns → "Matches vision?"
- Code Standards → "Agreed?"
Save
mkdir -p aidocs/sdd/{project}
# Write constitution.md
Create CLAUDE.md navigation hub.
Anti-patterns
- ❌ Copying without understanding
- ❌ Over-engineering at start
- ❌ Ignoring team expertise
Output
aidocs/sdd/{project}/constitution.md → Next: faion-writing-specifications
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?