Activity Analysis
Bevor man baut, muss man verstehen. Die Activity "Analysis" untersucht den Request, analysiert das bestehende System und ermittelt, was wirklich gebraucht wird. Hier arbeiten Mensch und KI eng zusammen.
Verstehen vor Handeln
Die Analyse-Aktivität ist der Moment, in dem aus einem Wunsch ein Plan wird. Die KI analysiert Code, findet Abhängigkeiten, identifiziert Risiken. Der Mensch validiert und ergänzt mit Domänenwissen.
Vollständiges Beispiel
# Activity: Analysis
# Phase: 3
activity:
id: "ACT_ANALYSIS"
name: "Analysis"
phase: 3
description: "Systematische Analyse des Requests und des betroffenen Systems"
# Wer führt aus?
actors:
primary: "ai"
role: "analyst"
human_oversight: "analyst_human"
# Inputs
inputs:
from_artifacts:
- artifact_type: "request"
fields: ["description", "acceptance_criteria", "context"]
from_system:
- "codebase_access"
- "documentation"
- "architecture_diagrams"
- "dependency_graph"
# Outputs
outputs:
- name: "analysis_report"
type: "document"
sections:
- "requirements_analysis"
- "impact_analysis"
- "risk_assessment"
- "proposed_approach"
- name: "draft_contracts"
type: "artifacts"
artifact_types:
- "api_contract"
- "data_contract"
- "security_contract"
# Schritte
steps:
1:
name: "Request verstehen"
actor: "ai"
description: "Anforderungen aus Request extrahieren"
outputs:
- "functional_requirements"
- "non_functional_requirements"
2:
name: "Codebase analysieren"
actor: "ai"
description: "Betroffene Bereiche identifizieren"
tools:
- "code_search"
- "dependency_analyzer"
- "call_graph"
outputs:
- "affected_files"
- "dependencies"
- "entry_points"
3:
name: "Impact Assessment"
actor: "ai"
description: "Auswirkungen der Änderung bewerten"
outputs:
- "breaking_changes"
- "affected_services"
- "migration_needs"
4:
name: "Risikobewertung"
actor: "ai"
human_review: true
description: "Risiken identifizieren und bewerten"
outputs:
- "risk_matrix"
- "mitigation_strategies"
5:
name: "Lösungsansatz"
actor: "ai"
human_review: true
description: "Technischen Ansatz vorschlagen"
outputs:
- "proposed_architecture"
- "implementation_strategy"
- "draft_contracts"
6:
name: "Review durch Mensch"
actor: "human"
description: "Analyse validieren und ergänzen"
inputs:
- "analysis_report"
- "draft_contracts"
outputs:
- "approved_analysis"
- "feedback"
# Erfolgskriterien
success_criteria:
- "All requirements documented"
- "Impact analysis complete"
- "Risks identified and mitigated"
- "Human approval obtained"
Analyse in der Praxis
# Beispiel einer Analyse-Ausführung
analysis_execution:
activity_id: "ACT_ANALYSIS"
request_id: "REQ-2024-0058"
executed_at: "2024-01-15T10:00:00Z"
steps_executed:
- step: 1
outputs:
functional_requirements:
- "Google OAuth2 Integration"
- "User Account Linking"
- "Session Management"
non_functional_requirements:
- "Response time < 2s"
- "GDPR compliant"
- step: 2
outputs:
affected_files:
- "src/Services/AuthService.php"
- "src/Controllers/AuthController.php"
- "resources/views/auth/login.blade.php"
dependencies:
- "laravel/socialite (to be added)"
entry_points:
- "GET /login"
- "GET /auth/google/callback"
- step: 3
outputs:
breaking_changes: []
affected_services:
- "auth-service"
- "user-service"
migration_needs:
- "Add google_id column to users table"
- step: 4
outputs:
risk_matrix:
- risk: "OAuth Token Security"
severity: "high"
likelihood: "low"
mitigation: "Use PKCE, short-lived tokens"
- risk: "Account Hijacking"
severity: "high"
likelihood: "low"
mitigation: "Email verification for linking"
- step: 5
outputs:
proposed_architecture: |
GoogleOAuthService -> AuthController -> UserService
New: OAuthCallbackHandler middleware
draft_contracts:
- "api-oauth-google-v1.yaml"
- "data-oauth-token-v1.yaml"
- step: 6
human_review:
reviewer: "bob@example.com"
approved: true
comments: "Approach LGTM, consider rate limiting on callback"
additional_requirements:
- "Add rate limiting on OAuth callback"
result: "APPROVED"
duration_minutes: 120
ready_for_gate: "G2_ANALYSIS"
Warum ist das wichtig?
Die Analyse-Aktivität verhindert teure Fehlentscheidungen. Sie findet Probleme, bevor Code geschrieben wird. Die KI bringt systematische Analyse, der Mensch bringt Kontext und Urteilsvermögen.
Im Mensch + KI-Code Prozess: Die Analyse wird von der KI durchgeführt, aber vom Menschen validiert. Am Ende steht ein genehmigter Analyse-Report, der als Input für Design und Contracts dient. Ohne Analyse-Approval kein Gate-Durchgang.