plugins/developer-kit-specs/skills/constitution/SKILL.md
Creates, updates, validates, and displays the architectural DNA of a project through two shared documents: docs/specs/architecture.md (technology stack, architectural rules, security constraints, AI guardrails) and docs/specs/ontology.md (domain glossary / Ubiquitous Language). Use BEFORE brainstorm as a project setup step, or at any point in the SDD lifecycle to validate specs/tasks against architecture principles. Triggers on 'create constitution', 'update constitution', 'constitution check', 'validate against constitution', 'project principles', 'architectural guardrails', 'setup project architecture', 'define ontology'.
npx skillsauth add giuseppe-trisciuoglio/developer-kit constitutionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Constitution skill manages the architectural DNA of a project through two shared documents:
| File | Purpose |
|------|---------|
| docs/specs/architecture.md | Technology stack, infrastructure, architectural rules, security constraints, AI guardrails |
| docs/specs/ontology.md | Domain glossary (Ubiquitous Language) — terms, definitions, bounded contexts |
These files live at docs/specs/ and are shared across all specifications. Unlike a monolithic constitution.md, these are created/enriched by brainstorm (Phase 6.8.6) and spec-to-tasks (Phase 1.5).
$ARGUMENTS or user intent: create, update, check, or show.AskUserQuestion, then write the files using the templates below.Last Updated date.# Create constitution before first brainstorm
/developer-kit-specs:constitution create
# Validate a spec against architecture and ontology
/developer-kit-specs:constitution check --target=docs/specs/001/2024-01-15--user-auth.md
# Update the security constraints section
/developer-kit-specs:constitution update --file=architecture --section=security
# Show current constitution
/developer-kit-specs:constitution show
| Scenario | Operation |
|----------|-----------|
| New project — define stack and domain language before first brainstorm | create |
| Stack or security rules changed | update |
| Validate a spec, task, or file against architecture and ontology | check |
| Review current architecture and ontology | show |
Trigger phrases:
AskUserQuestion (domains, infrastructure, stack, data, style, rules)Template lookup order:
${CLAUDE_PLUGIN_ROOT}/templates/architecture.mdskills/constitution/references/architecture.md--file=architecture|ontology and --section=<name>Last Updated date--target=<path>)docs/specs/architecture.md and docs/specs/ontology.mdThe Constitution survives context rot through file-based storage:
docs/specs/architecture.md and docs/specs/ontology.mdFor detailed scenarios and recovery protocols, see references/context-rot-prevention.md.
Last Updated date on every changearchived/ — never let specs become stalebrainstorm (Phase 6.8.6) and spec-to-tasks (Phase 1.5)## Constitution Check Report
Target: <file path>
Date: YYYY-MM-DD
### Security Check (CWE/OWASP Compliance)
| Rule | Level | Status | Location | CWE/OWASP |
|------|-------|--------|----------|-----------|
| No SQL injection | CRITICAL | ✅ OK | - | CWE-89 |
### CWE Compliance Report
| CWE | OWASP | Status | Location |
|-----|-------|--------|----------|
| CWE-89 | A03 | ✅ OK | - |
### Architecture Check
| Rule | Status | Detail |
|------|--------|--------|
| Constructor injection | ✅ OK | - |
### Library Verification Check
| Library | Status | Detail |
|---------|--------|--------|
| bcrypt | ✅ OK | Using hash(password, 12) |
### Ontology Check
| Term | Status | Detail |
|------|--------|--------|
| "User" used consistently | ✅ OK | - |
### Summary
- CRITICAL violations: 0
- WARNING violations: 0
- Compliant rules: N
For detailed security patterns (CWE/OWASP mappings), see references/security-patterns.md.
[Session Start] → Read Constitution files
↓
[Optional] constitution create ← this skill (pre-brainstorm setup)
↓
brainstorm ← Constitution loaded before brainstorming
↓
spec-to-tasks ← Constitution validates spec
↓
task-implementation ← Constitution guardrails active
↓
task-review ← Constitution check validates
↓
[Session End] → Constitution files updated if needed
Required loading before:
specs.brainstorm — Validate requirements align with architecturespecs.spec-to-tasks — Check stack compatibilityspecs.task-implementation — Apply AI guardrailsspecs.task-review — Constitution check| File | Purpose |
|------|---------|
| references/architecture.md | Full architecture template |
| references/ontology.md | Full ontology template |
| references/security-patterns.md | CWE/OWASP patterns, verification format |
| references/context-rot-prevention.md | Detailed scenarios and recovery protocols |
| references/constitution-check-report.md | Complete report examples |
For complete templates and detailed reference material, consult the references/ directory.
development
Explore codebase before committing to a change. Phase executor skill for specs.explore command.
development
Executes real end-to-end verification against a running application after specification implementation. Detects the application type, starts the local runtime (Docker, Node, Spring Boot, etc.), runs real tests (curl for REST APIs, Playwright for web SPAs, computer-use for desktop apps), verifies acceptance criteria from the functional specification, generates a markdown report, and tears down the environment. Use when: user asks to verify a completed spec with real tests, run e2e checks after implementation, validate acceptance criteria in a live environment, or test the feature for real after task completion.
development
Initialize Spec-Driven Development context — detects tech stack, conventions, architecture patterns, and bootstraps persistence backends. Triggers on 'sdd-init', 'init sdd', 'setup sdd', 'initialize sdd', 'setup project', 'initialize project context'. Creates/updates docs/specs/architecture.md & ontology.md (Constitution), and populates knowledge-graph.json.
development
Optimizes raw idea descriptions into structured prompts ready for the brainstorming workflow. TRIGGER when: user says "optimize for brainstorm", "prepare idea for brainstorm", "enhance this idea", "make this ready for brainstorming", "imposta per brainstorm", or wants to improve a feature idea before using /specs.brainstorm. DO NOT TRIGGER for code optimization, refactoring, or general prompt engineering tasks.