LAYER_01_MOTIV

Expert knowledge for Motivation Layer modeling in Documentation Robotics

$ 安裝

git clone https://github.com/tinkermonkey/documentation_robotics /tmp/documentation_robotics && cp -r /tmp/documentation_robotics/cli-validation/test-project/baseline/.claude/skills/dr_01_motivation_layer ~/.claude/skills/documentation_robotics

// tip: Run this command in your terminal to install the skill


name: LAYER_01_MOTIV description: Expert knowledge for Motivation Layer modeling in Documentation Robotics triggers: [ "stakeholder", "driver", "assessment", "goal", "outcome", "principle", "requirement", "constraint", "motivation", "archimate motivation", ] version: 0.6.0

Motivation Layer Skill

Layer Number: 01 Specification: Metadata Model Spec v0.6.0 Purpose: Captures stakeholder concerns, goals, requirements, and constraints that drive architectural decisions using ArchiMate motivation elements.


Layer Overview

The Motivation Layer is the highest layer in the 12-layer architecture and provides governance to all other layers. It describes:

  • WHY - The reasons and drivers behind architectural decisions
  • WHO - Stakeholders with interests in the outcome
  • WHAT - Goals, requirements, principles, and constraints
  • VALUE - The worth and importance of business outcomes

This layer uses ArchiMate 3.2 Motivation Layer standard without custom extensions.


Entity Types

Entity TypeDescriptionKey Attributes
StakeholderIndividual, team, or organization with interest in the outcomeTypes: internal, external, customer, partner, regulator
DriverExternal or internal condition that motivates an organizationCategories: market, regulatory, technology, competitive, operational, strategic
AssessmentOutcome of analysis of the state of affairs (SWOT)Types: strength, weakness, opportunity, threat, risk, gap
GoalHigh-level statement of intent, direction, or desired end statePriority: critical, high, medium, low. Can be SMART (measurable, target-date, KPI)
OutcomeEnd result that has been achievedStatus: planned, in-progress, achieved, not-achieved
PrincipleNormative property of all systems in a given contextCategories: business, data, application, technology, security, integration
RequirementStatement of need that must be realizedTypes: functional, non-functional, business, technical, compliance, user
ConstraintRestriction on the way in which a system is realizedTypes: budget, time, technology, regulatory, organizational, resource
MeaningKnowledge or expertise present in a representationUsed to describe semantics and interpretations
ValueRelative worth, utility, or importance of somethingTypes: financial, customer, operational, strategic, social

Intra-Layer Relationships

Structural Relationships

Source TypePredicateTarget TypeExample
GoalaggregatesGoalStrategic Goal aggregates Operational Goals
RequirementaggregatesRequirementBusiness Requirement aggregates Functional Requirements
PrincipleaggregatesPrincipleEnterprise Principles aggregate Domain Principles
ConstraintaggregatesConstraintBudget Constraint aggregates Project Budget Constraints
OutcomerealizesGoal"Launched Mobile App" realizes "Launch Mobile App by Q4"
GoalrealizesValue"Improve Customer Satisfaction" realizes "Customer Value"
RequirementrealizesGoalFunctional Requirements realize Business Goals
RequirementrealizesPrincipleTechnical Requirements realize Security Principles
ConstraintrealizesPrincipleTechnology Constraints realize Technology Principles
GoalspecializesGoal"Reduce API Latency" specializes "Improve Performance"
RequirementspecializesRequirement"95% Uptime SLA" specializes "High Availability Requirement"
PrinciplespecializesPrinciple"Encrypt All PII" specializes "Data Security Principle"
ValuespecializesValue"Customer Retention Value" specializes "Customer Value"

Behavioral Relationships

Source TypePredicateTarget TypeExample
DriverinfluencesGoal"Digital Transformation" influences "Modernize Architecture"
DriverinfluencesRequirement"GDPR Compliance" influences "Data Protection Requirements"
DriverinfluencesPrinciple"Cloud-First Strategy" influences "Cloud-Native Principles"
AssessmentinfluencesGoal"Legacy System Weakness" influences "Modernization Goal"
GoalinfluencesRequirementBusiness Goals influence Functional Requirements
PrincipleinfluencesRequirementSecurity Principles influence Technical Requirements
PrincipleinfluencesConstraint"API-First Principle" influences "RESTful API Constraint"
ConstraintinfluencesRequirementBudget Constraints influence Implementation Requirements
ValueinfluencesGoal"Customer Value" influences "Improve UX Goal"
StakeholderinfluencesGoal"CEO" influences Strategic Goals
StakeholderinfluencesRequirement"End Users" influence Functional Requirements
StakeholderinfluencesValue"Shareholders" influence Financial Value
Stakeholderassociated-withDriver"Product Manager" associated with "Market Competition Driver"
Goalassociated-withOutcome"Improve Performance" associated with "Achieved 50ms Latency"
Requirementassociated-withOutcome"High Availability Requirement" associated with "99.99% Uptime Outcome"
Driverassociated-withAssessment"Market Driver" associated with "Competitive Threat Assessment"
Valueassociated-withMeaning"Customer Value" associated with "Definition of Customer Success"

Cross-Layer References

Motivation Layer is the highest layer - It does NOT reference any lower layers. Instead, lower layers reference UP to this layer for governance.

Incoming References (Lower Layers → Motivation)

LayerReferences Motivation For
Layer 2 (Business)BusinessService delivers Value, supports Goals, governed by Principles; BusinessActor is Stakeholder; Contract drives Constraints
Layer 3 (Security)Actor references Stakeholder; ActorObjective references Goal; Threat references Assessment; Countermeasure implements Requirement
Layer 4 (Application)ApplicationService supports Goals, delivers Value, governed by Principles; ApplicationFunction fulfills Requirements
Layer 5 (Technology)TechnologyService supports Goals, governed by Principles; Node fulfills Requirements, constrained by Constraints
Layer 6 (API)Operation supports Goals (x-supports-goals), fulfills Requirements, governed by Principles, constrained by Constraints
Layer 7-12All layers can reference Principles, Constraints, Requirements, Goals for governance and traceability

Design Pattern: Lower layers "look up" to the Motivation layer to justify WHY they exist and WHAT value they deliver.


Codebase Detection Patterns

The Motivation Layer is typically NOT extracted from code but documented separately. However, certain patterns suggest the need for motivation elements:

Pattern 1: Requirements Traceability Comments

# REQUIREMENT: REQ-001 - User authentication must support OAuth 2.0
# GOAL: Improve security and user experience
# PRINCIPLE: Security by design

def configure_oauth(provider: str):
    pass

Maps to:

  • Requirement entity (REQ-001)
  • Goal entity (improve security)
  • Principle entity (security by design)

Pattern 2: Non-Functional Requirements in Tests

@npm test.mark.performance
def test_api_response_time():
    """Verify API responds within 200ms (GOAL: sub-second response)"""
    response_time = measure_api_call()
    assert response_time < 0.2  # Constraint: < 200ms

Maps to:

  • Goal (sub-second response)
  • Constraint (< 200ms)
  • Requirement (performance requirement)

Pattern 3: Configuration Constants

# Constraint: Budget limit for cloud spending
MAX_MONTHLY_CLOUD_COST = 10000  # USD

# Principle: Data residency compliance
ALLOWED_REGIONS = ["us-east-1", "us-west-2"]  # Constraint: US-only

# Goal: 99.99% availability
TARGET_UPTIME_SLA = 0.9999

Maps to:

  • Constraint entities (budget, region)
  • Goal (availability target)
  • Principle (data residency)

Pattern 4: README/Documentation Headers

## Goals

- Achieve 99.9% system availability
- Reduce customer onboarding time to < 5 minutes
- Support 10,000 concurrent users

## Principles

- API-first architecture
- Microservices over monoliths
- Security by design

## Constraints

- Budget: $500K for 2024
- Timeline: Launch by Q3 2024
- Technology: Must run on AWS

Maps to: Direct creation of Goal, Principle, and Constraint entities


Modeling Workflow

Step 1: Identify Stakeholders

Start by documenting WHO cares about the system:

# Add key stakeholders
dr add motivation stakeholder "End Users" \
  --properties type=external \
  --description "Customers using the platform"

dr add motivation stakeholder "Product Manager" \
  --properties type=internal \
  --description "Defines product vision and priorities"

dr add motivation stakeholder "Compliance Team" \
  --properties type=internal \
  --description "Ensures regulatory compliance"

Step 2: Document Drivers and Assessments

Identify WHAT is pushing the organization:

# Market driver
dr add motivation driver "Cloud Migration Pressure" \
  --properties category=market \
  --description "Industry shift to cloud-native architectures"

# SWOT assessment
dr add motivation assessment "Legacy System Debt" \
  --properties assessmentType=weakness \
  --description "Monolithic architecture limits agility"

dr add motivation assessment "Strong Engineering Team" \
  --properties assessmentType=strength \
  --description "Experienced team with cloud expertise"

Step 3: Define Goals and Values

Articulate WHAT we want to achieve:

# Strategic goal
dr add motivation goal "Modernize Architecture" \
  --properties priority=critical,measurable=true,target-date=2024-12-31 \
  --description "Migrate to microservices architecture"

# Value delivered
dr add motivation value "Operational Efficiency" \
  --properties type=operational \
  --description "Reduced deployment time and increased reliability"

Step 4: Specify Requirements and Principles

Define HOW we will operate:

# Functional requirement
dr add motivation requirement "API Authentication" \
  --properties type=functional \
  --description "All API endpoints must authenticate users"

# Guiding principle
dr add motivation principle "API-First Design" \
  --properties category=application \
  --description "All services expose RESTful APIs with OpenAPI specs"

# Hard constraint
dr add motivation constraint "AWS-Only Infrastructure" \
  --properties type=technology \
  --description "All services must deploy to AWS (no multi-cloud)"

Step 5: Establish Relationships

Connect motivation elements using predicates:

# Driver influences Goal
dr relationship add "motivation/driver/cloud-migration-pressure" \
  influences "motivation/goal/modernize-architecture"

# Goal realizes Value
dr relationship add "motivation/goal/modernize-architecture" \
  realizes "motivation/value/operational-efficiency"

# Principle influences Requirement
dr relationship add "motivation/principle/api-first-design" \
  influences "motivation/requirement/api-authentication"

# Stakeholder influences Goal
dr relationship add "motivation/stakeholder/product-manager" \
  influences "motivation/goal/modernize-architecture"

# Assessment influences Goal
dr relationship add "motivation/assessment/legacy-system-debt" \
  influences "motivation/goal/modernize-architecture"

Step 6: Validate

dr validate --layer motivation
dr validate --validate-relationships

Traceability Patterns

Pattern 1: Goal Decomposition Hierarchy

Strategic Goal: "Improve Customer Satisfaction"
├── aggregates → Business Goal: "Reduce Response Time"
│   ├── aggregates → Operational Goal: "Achieve <100ms API Latency"
│   └── aggregates → Operational Goal: "Implement Caching Layer"
└── aggregates → Business Goal: "Improve Mobile Experience"
    ├── aggregates → Operational Goal: "Launch iOS App"
    └── aggregates → Operational Goal: "Launch Android App"

Pattern 2: Requirement Hierarchy

Business Requirement: "Secure User Data"
├── aggregates → Functional Requirement: "Encrypt Data at Rest"
│   └── influences → Technical Requirement: "Use AES-256 Encryption"
├── aggregates → Functional Requirement: "Encrypt Data in Transit"
│   └── influences → Technical Requirement: "Use TLS 1.3"
└── aggregates → Compliance Requirement: "GDPR Data Protection"
    └── influences → Technical Requirement: "Right to Deletion API"

Pattern 3: Principle Application

Principle: "Cloud-Native Architecture"
├── influences → Requirement: "Containerized Deployments"
├── influences → Requirement: "Stateless Services"
├── influences → Constraint: "No On-Premise Infrastructure"
└── realizes → Value: "Scalability and Resilience"

Pattern 4: Stakeholder → Goal → Implementation Chain

Stakeholder: "CEO"
└── influences → Goal: "Reduce Operating Costs by 20%"
    ├── influences → Requirement: "Automated CI/CD Pipeline"
    ├── influences → Principle: "Infrastructure as Code"
    └── realizes → Value: "Financial Efficiency"
        └── (lower layers reference this chain)

Common Modeling Scenarios

Scenario 1: New Feature Justification

Question: "Why are we building this feature?"

Approach:

  1. Add Stakeholder who requested it
  2. Add Driver (market, customer, regulatory)
  3. Add Goal the feature achieves
  4. Add Value delivered
  5. Lower layers reference the Goal

Scenario 2: Regulatory Compliance

Question: "How do we track GDPR compliance?"

Approach:

  1. Add Driver ("GDPR Regulation")
  2. Add Constraint ("Data Residency: EU only")
  3. Add Requirement ("Right to Deletion", "Data Portability")
  4. Add Principle ("Privacy by Design")
  5. Security layer references these elements

Scenario 3: Architecture Decision Records (ADR)

Question: "Document why we chose microservices?"

Approach:

  1. Add Assessment (strength/weakness of monolith)
  2. Add Principle ("Microservices Architecture")
  3. Add Goal ("Improve Deployment Frequency")
  4. Add Constraint ("Team size supports distributed ownership")
  5. Application layer references the Principle

ArchiMate Integration

When exporting to ArchiMate format:

dr export archimate --layer motivation --output motivation.archimate

Supported ArchiMate Elements:

  • Stakeholder → ArchiMate Stakeholder
  • Driver → ArchiMate Driver
  • Assessment → ArchiMate Assessment
  • Goal → ArchiMate Goal
  • Outcome → ArchiMate Outcome
  • Principle → ArchiMate Principle
  • Requirement → ArchiMate Requirement
  • Constraint → ArchiMate Constraint
  • Meaning → ArchiMate Meaning
  • Value → ArchiMate Value

Supported Relationships:

  • aggregates, realizes, specializes, influences, associated-with

Best Practices

  1. Start with Stakeholders - Understand WHO before WHAT
  2. Use SMART Goals - Make goals Specific, Measurable, Achievable, Relevant, Time-bound
  3. Distinguish Requirements from Constraints:
    • Requirement: "System MUST authenticate users" (functional need)
    • Constraint: "System MUST use OAuth 2.0" (limits HOW requirement is met)
  4. Link Principles to Requirements - Every requirement should trace to a principle or goal
  5. Use Assessments for Trade-offs - Document strengths/weaknesses to justify decisions
  6. Track Outcomes - Update outcome status as goals are achieved
  7. Don't Over-Document - Focus on high-value motivation elements that drive decisions

Validation Tips

Common validation issues:

IssueCauseFix
Orphaned GoalNo stakeholder influences itAdd stakeholder or driver that influences goal
Unrealized RequirementNo goal justifies itLink requirement to goal or principle
Unused PrincipleNo requirements reference itEither apply principle or remove it
Missing ValueGoals don't realize any valueAdd value elements and link goals
No TraceabilityLower layers don't reference motivationAdd references from business/application layers

Quick Reference

Add Commands:

dr add motivation stakeholder <name> --properties type=<type>
dr add motivation driver <name> --properties category=<category>
dr add motivation goal <name> --properties priority=<priority>
dr add motivation requirement <name> --properties type=<type>
dr add motivation principle <name> --properties category=<category>
dr add motivation constraint <name> --properties type=<type>

Relationship Commands:

dr relationship add <source-id> influences <target-id>
dr relationship add <source-id> aggregates <target-id>
dr relationship add <source-id> realizes <target-id>
dr relationship add <source-id> specializes <target-id>

Query Commands:

dr search --layer motivation --type goal
dr search --layer motivation --property priority=critical
dr relationship list <element-id> --direction outgoing

Repository

tinkermonkey
tinkermonkey
Author
tinkermonkey/documentation_robotics/cli-validation/test-project/baseline/.claude/skills/dr_01_motivation_layer
0
Stars
0
Forks
Updated1h ago
Added1w ago