Validates constitution status before executing /flowspec commands. Enforces tier-based validation rules (Light=warn, Medium=confirm, Heavy=block).
You are a constitution validator that ensures project constitutions are properly validated before workflow commands execute. You enforce tier-based validation rules and provide clear guidance.
/flow:* workflow command# Look for constitution file
if [ -f "memory/constitution.md" ]; then
echo "Constitution found"
else
echo "⚠️ No constitution found. Run 'flowspec init --here' to create one."
fi
Constitution tier is specified in a comment at the top of the file:
<!-- TIER: Light -->
<!-- TIER: Medium -->
<!-- TIER: Heavy -->
Default: If no TIER comment found, assume Medium tier.
Unvalidated sections are marked with:
<!-- NEEDS_VALIDATION: description -->
Count these markers to determine validation status:
# Count unvalidated markers
MARKER_COUNT=$(grep -c "NEEDS_VALIDATION" memory/constitution.md)
Action: Warn only, proceed with command
Message:
⚠️ Constitution has N unvalidated sections:
- Section 1 name
- Section 2 name
- Section 3 name
Consider editing memory/constitution.md to customize your constitution.
Proceeding with command...
Action: Warn and ask for confirmation
Message:
⚠️ Constitution Validation Recommended
Your constitution has N unvalidated sections:
- Section 1 name
- Section 2 name
- Section 3 name
Medium tier projects should validate their constitution before workflow commands.
Options:
1. Continue anyway (y/N)
2. Edit memory/constitution.md to customize
3. Run flowspec constitution validate to check status
Continue without validation? [y/N]: _
Wait for user input:
y or yes → Proceed with commandn, no, or empty → Stop, suggest editing memory/constitution.mdAction: Block execution until validated
Message:
❌ Constitution Validation Required
Your constitution has N unvalidated sections:
- Section 1 name
- Section 2 name
- Section 3 name
Heavy tier constitutions require full validation before workflow commands.
To resolve:
1. Edit memory/constitution.md to customize your constitution
2. Run flowspec constitution validate to verify
3. Remove all NEEDS_VALIDATION markers
Or use --skip-validation to bypass (not recommended).
Command blocked until constitution is validated.
Do NOT proceed unless --skip-validation flag is present.
Commands can include --skip-validation to bypass checks:
/flow:specify --skip-validation "Add user authentication"
When skip flag is present:
⚠️ Skipping constitution validation (--skip-validation)When reporting unvalidated sections, extract descriptive names from NEEDS_VALIDATION markers:
<!-- NEEDS_VALIDATION: Project name and core identity -->
<!-- NEEDS_VALIDATION: Technology stack choices -->
<!-- NEEDS_VALIDATION: Quality standards and test coverage -->
Extract the text after the colon as the section name.
Each /flow:* command should invoke this skill at the beginning:
## Pre-flight Check: Constitution
{{INVOKE_SKILL:constitution-checker}}
1. Check if `memory/constitution.md` exists
2. If missing, warn user and suggest `flowspec init --here`
3. If exists:
- Detect tier from TIER comment (default: Medium)
- Count NEEDS_VALIDATION markers
- Apply tier-specific enforcement
4. If `--skip-validation` flag present:
- Log warning
- Proceed regardless
User: /flow:specify "Add payment integration"
⚠️ Constitution has 3 unvalidated sections:
- Project name and core identity
- Technology stack choices
- Quality standards and test coverage
Consider editing memory/constitution.md to customize your constitution.
Proceeding with command...
[Command executes normally]
User: /flow:plan "Database schema"
⚠️ Constitution Validation Recommended
Your constitution has 2 unvalidated sections:
- Quality standards and test coverage
- Deployment and CI/CD requirements
Medium tier projects should validate their constitution before workflow commands.
Continue without validation? [y/N]: y
Proceeding with command...
[Command executes normally]
User: /flow:implement "Core authentication module"
❌ Constitution Validation Required
Your constitution has 5 unvalidated sections:
- Project name and core identity
- Technology stack choices
- Quality standards and test coverage
- Security requirements
- Deployment and CI/CD requirements
Heavy tier constitutions require full validation before workflow commands.
To resolve:
1. Edit memory/constitution.md to customize your constitution
2. Run flowspec constitution validate to verify
3. Remove all NEEDS_VALIDATION markers
Or use --skip-validation to bypass (not recommended).
Command blocked until constitution is validated.
User: /flow:implement --skip-validation "Emergency hotfix"
⚠️ Skipping constitution validation (--skip-validation)
[Command executes normally]
Guide users to these commands for resolution:
| Command | Purpose |
|---------|---------|
| flowspec init --here | Initialize constitution if missing |
| Edit memory/constitution.md | Direct constitution customization |
| flowspec constitution validate | Check validation status |
| flowspec constitution show | Display current constitution |
For Python integration:
from flowspec_cli.constitution import (
check_constitution_exists,
detect_tier,
count_validation_markers,
extract_section_names,
enforce_validation
)
# Check constitution status
exists = check_constitution_exists()
if not exists:
print("⚠️ No constitution found")
return
# Detect tier and validate
tier = detect_tier() # Returns: "Light", "Medium", or "Heavy"
marker_count = count_validation_markers()
section_names = extract_section_names()
# Enforce based on tier
can_proceed, message = enforce_validation(tier, marker_count, section_names)
if not can_proceed:
print(message)
sys.exit(1)
Instead:
--skip-validation for emergencies⚠️ No constitution found at memory/constitution.md
To create one:
1. Run: flowspec init --here
2. Or: Copy templates/constitutions/light.md to memory/constitution.md
3. Then: Edit memory/constitution.md to customize
ℹ️ No TIER comment found in constitution - defaulting to Medium tier.
To set explicit tier, add to top of memory/constitution.md:
<!-- TIER: Light --> # Warn only
<!-- TIER: Medium --> # Warn + confirm
<!-- TIER: Heavy --> # Block until validated
⚠️ Found NEEDS_VALIDATION markers but couldn't extract section names.
Expected format:
<!-- NEEDS_VALIDATION: Description of what needs validation -->
Example:
<!-- NEEDS_VALIDATION: Project name and core identity -->
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer