Skip to content
maenifold
GitHub

Constitutional Role Architecture Workflow

22 steps

Systematic workflow for creating/updating specialist roles using constitutional AI and prompt engineering excellence

Triggers

create roleupdate rolenew specialistrole creationconstitutional roleprompt engineering rolespecialist role designcognitive architecture rolerole enhancement10/10 role creation

Steps

  1. 1.

    🧩 Assume Prompt Engineer Role

    Activate constitutional prompt architecture expertise.

    Use Adopt tool with roleId 'prompt-engineer' to activate The Prompt Architect cognitive framework with 10/10 constitutional AI capabilities.

    ⚠️ CRITICAL: This role provides systematic methodology, evidence-based optimization, and meta-cognitive scaffolding for perfect role creation.

  2. 2.

    📋 Define Role Specifications

    Establish clear constitutional architecture requirements for the target role.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool to systematically analyze role requirements.

    Define: domain expertise, cognitive capabilities, constitutional principles, evaluation criteria, performance targets, and integration patterns. What specific intelligence amplification should this role provide?

    Enhanced Thinking
  3. 3.

    🔍 Check Existing Role

    Determine if role already exists and assess current implementation.

    Search assets/roles/ directory for existing role files. If role exists, read and analyze current implementation against 10/10 constitutional architecture standards.

    ⚠️ CRITICAL: Document gaps and enhancement opportunities for systematic improvement.

  4. 4.

    🔬 Review Existing Role Architecture

    If role exists, conduct comprehensive constitutional architecture analysis.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for systematic evaluation.

    Evaluate against: constitutional coherence, architectural clarity, meta-cognitive scaffolding, context efficiency, failure resilience, dynamic adaptability. Apply 10/10 framework assessment.

    Enhanced Thinking
  5. 5.

    📚 Access Prompt Engineering Checklists

    Load comprehensive evaluation frameworks from memory.

    Search memory://prompt-engineering for all implementation checklists: GPT-4.1 System Prompt Patterns, Agentic Workflows, Instruction Following Framework, Chain of Thought Patterns, Error Handling Strategies, Performance Optimization.

    ⚠️ CRITICAL: These checklists provide 10/10 validation criteria.

  6. 6.

    🔎 Research Domain Knowledge

    Systematic research for role domain expertise and patterns.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool to coordinate comprehensive research.

    Research sequence:

    1. Search memory:// for existing domain knowledge using SearchMemories tool
    2. Search codebase for relevant implementation patterns
    3. Use context7 for current industry standards and best practices
    4. Document all findings in memory:// using WriteMemory with proper [[Wiki Links]] and tags
    Enhanced Thinking
  7. 7.

    ⚖️ Analyze Constitutional Requirements

    Define constitutional AI principles and frameworks for the role.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for constitutional analysis.

    Design: core principles, anti-pattern recognition, value alignment mechanisms, evaluation criteria, transition triggers, and performance monitoring frameworks. How will this role embed persistent constitutional thinking?

    Enhanced Thinking
  8. 8.

    🏗️ Design Cognitive Architecture

    Create systematic cognitive scaffolding and meta-cognitive frameworks.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for architectural design.

    Design: context loading strategies, systematic approaches, implementation patterns, quality frameworks, example integration protocols, state management, documentation architecture, and monitoring systems.

    Enhanced Thinking
  9. 9.

    🔨 Implement Role Structure

    Create complete JSON role specification with constitutional architecture.

    Implement all components: id, name, emoji, shortDescription, triggers, personality (motto, principles), approach (contextLoading, systematic frameworks), responseStyle, requiredOutputs, checklist, antiPatterns, transitionTriggers.

    ⚠️ CRITICAL: Follow exact schema with 10/10 constitutional integration.

  10. 10.

    📊 Integrate Performance Monitoring

    Add systematic performance measurement and optimization frameworks.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for monitoring design.

    Implement: specific KPI targets (>95% accuracy baselines), automated monitoring protocols, continuous improvement systems, regression detection, and validation mechanisms. How will role performance be measured and optimized?

    Enhanced Thinking
  11. 11.

    📖 Add Documentation Framework

    Implement comprehensive documentation and knowledge transfer systems.

    Add: implementation documentation templates, troubleshooting guides with decision trees, team training protocols, maintenance specifications, and knowledge transfer frameworks.

    ⚠️ CRITICAL: Enable systematic deployment and continuous improvement.

  12. 12.

    💡 Implement Example Protocols

    Create concrete demonstration frameworks with progressive complexity.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for example design.

    Develop: input-output demonstration pairs, progressive complexity models, anti-pattern illustrations, edge case protocols, and domain-specific example libraries. How will users understand role capabilities through examples?

    Enhanced Thinking
  13. 13.

    🎯 Validate Against System Prompt Patterns

    Systematic evaluation against GPT-4.1 System Prompt Patterns checklist.

    Validate: three-pillar architecture, context management, tool integration, chain of thought integration, instruction following, error handling patterns. Document compliance score and enhancement opportunities.

    ⚠️ CRITICAL: Target 10/10 constitutional architecture score.

  14. 14.

    🤖 Validate Against Agentic Workflows

    Systematic evaluation against GPT-4.1 Agentic Workflows checklist.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for systematic validation.

    Validate: three-pillar architecture, problem-solving workflows, meta-cognitive patterns, state management, tool integration, performance optimization. Does this role enable autonomous intelligent behavior?

    Enhanced Thinking
  15. 15.

    📋 Validate Against Instruction Following Framework

    Systematic evaluation against Instruction Following Framework checklist.

    Validate: structured instructions, example-driven guidance, conditional logic, meta-instruction framework, hierarchical architecture, behavioral consistency. Does this role provide clear, systematic guidance?

  16. 16.

    🔧 Validate Against Prompt Engineering Fundamentals

    Systematic evaluation against Fundamentals Implementation checklist.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for comprehensive validation.

    Validate: prompt structure architecture, template systems, variable frameworks, quality assurance, delimiter strategies, documentation standards. Does this role demonstrate foundational excellence?

    Enhanced Thinking
  17. 17.

    🛡️ Validate Against Error Handling Strategies

    Systematic evaluation against Error Handling Strategies checklist.

    Validate: failure mode detection, validation patterns, recovery procedures, preventive design, monitoring integration, graceful degradation. Does this role prevent and handle systematic failures?

  18. 18.

    🔗 Validate Against Chain of Thought Patterns

    Systematic evaluation against Chain of Thought Patterns checklist.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for reasoning validation.

    Validate: basic CoT templates, advanced reasoning, error analysis, quality enhancement, integration patterns, performance tracking. Does this role enable systematic reasoning and meta-cognitive enhancement?

    Enhanced Thinking
  19. 19.

    📈 Calculate Overall Constitutional Score

    Compute comprehensive constitutional architecture score across all frameworks.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for systematic scoring.

    Calculate scores for: constitutional coherence, architectural clarity, meta-cognitive scaffolding, context efficiency, failure resilience, dynamic adaptability. Target: 10/10 overall constitutional excellence.

    Enhanced Thinking
  20. 20.

    ⚡ Implement Enhancement Recommendations

    Apply systematic improvements to achieve 10/10 constitutional architecture.

    Implement all identified enhancements: missing frameworks, performance targets, documentation systems, example protocols, validation mechanisms. Continue until 10/10 score achieved across all evaluation criteria.

    ⚠️ CRITICAL: No compromises on constitutional excellence.

  21. 21.

    ✅ Final Validation and Deployment

    Comprehensive validation and role deployment to assets/roles/.

    🧠 ENHANCED THINKING REQUIRED: Use the SequentialThinking tool for final validation.

    Validate: all checklists score 10/10, constitutional architecture complete, performance monitoring integrated, documentation comprehensive, examples clear, deployment ready. Save to assets/roles/ with proper JSON formatting.

    Enhanced Thinking
  22. 22.

    📝 Document Creation Methodology

    Document the complete role creation process and lessons learned.

    Save to memory:// using WriteMemory: constitutional design patterns used, evaluation methodologies applied, enhancement techniques implemented, performance achievements, and process improvements for future role creation.

    ⚠️ CRITICAL: Build institutional knowledge for systematic role excellence.