Faion Writing Constitutions
Productivityfaion-writing-constitutionsFaion Writing Constitutions is an Agent Skill for productivity published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
SDD Framework: Creates constitution.md through codebase analysis OR Socratic dialogue for new projects. Triggers on "constitution.md", "constitution", "project constitution", "project standards".
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/development/faion-writing-constitutions/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/faion-writing-constitutions, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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