diff --git a/docs/patterns/autonomous-quality-enforcement.md b/docs/patterns/autonomous-quality-enforcement.md index e171d83..0dab0c7 100644 --- a/docs/patterns/autonomous-quality-enforcement.md +++ b/docs/patterns/autonomous-quality-enforcement.md @@ -85,25 +85,14 @@ git add . && git commit -m "test" AQE combines three mechanisms that reinforce each other: ```mermaid -flowchart TD - A[Code Changes] --> B{Process Rule} - B -->|Reminds| C[Run Validation] - C --> D{Test Passes?} - D -->|No| E[Analyze Error] - E --> F[Fix Code] - F --> C - D -->|Yes| G[Present to User] - G --> H{Commit?} - H -->|Yes| I[Git Hook Validates] - I --> J{Passes?} - J -->|No| K[Block Commit] - K --> F - J -->|Yes| L[Clean Git History] - - style A fill:#e1f5fe - style G fill:#c8e6c9 - style L fill:#c8e6c9 - style K fill:#ffcdd2 +flowchart LR + A[Code] --> B[Validate] + B -->|Fail| C[Fix & Retry] + C --> B + B -->|Pass| D[Commit] + D --> E[Git Hook] + E -->|Fail| C + E -->|Pass| F[Done] ``` | Component | Purpose | When It Runs | diff --git a/docs/patterns/dependabot-auto-merge.md b/docs/patterns/dependabot-auto-merge.md index 7f5364d..3c99087 100644 --- a/docs/patterns/dependabot-auto-merge.md +++ b/docs/patterns/dependabot-auto-merge.md @@ -45,15 +45,10 @@ Enable Dependabot in `.github/dependabot.yml`. Set up branch protection requirin ## How It Works ```mermaid -flowchart TD - A[Dependabot PR] --> B{Author is dependabot?} - B -->|No| C[Normal Review] - B -->|Yes| D[Fetch Metadata] - D --> E{Patch Version?} - E -->|No| C - E -->|Yes| F{CI Passes?} - F -->|No| C - F -->|Yes| G[Auto-Merge] +flowchart LR + A[Dependabot PR] --> B{Patch + CI Pass?} + B -->|No| C[Human Review] + B -->|Yes| D[Auto-Merge] ``` --- diff --git a/docs/patterns/gha-automation-patterns.md b/docs/patterns/gha-automation-patterns.md index 7406a18..6c3fd66 100644 --- a/docs/patterns/gha-automation-patterns.md +++ b/docs/patterns/gha-automation-patterns.md @@ -15,14 +15,11 @@ Convert well-defined issues into draft pull requests automatically. ### How It Works ```mermaid -flowchart TD - A[Issue Opened] --> B{Well-defined?} - B -->|No| C[Request Clarification] - B -->|Yes| D[Analyze Issue] - D --> E[Self-Review Analysis] - E --> F[Create Branch] - F --> G[Create Draft PR] - G --> H[Link to Issue] +flowchart LR + A[Issue] --> B{Clear?} + B -->|No| C[Clarify] + B -->|Yes| D[Implement] + D --> E[Draft PR] ``` ### Implementation @@ -102,10 +99,9 @@ AI-powered code review on every pull request. ### Workflow ```mermaid -flowchart TD - A[PR Opened/Updated] --> B[AI Reviews Code] - B --> C[Self-Review Findings] - C --> D[Post Review Comment] +flowchart LR + A[PR] --> B[AI Review] + B --> C[Post Comment] ``` ### Workflow YAML @@ -157,12 +153,10 @@ Automatically merge low-risk dependency updates. ### Flow ```mermaid -flowchart TD - A[Dependabot PR] --> B{Patch Version?} - B -->|No| C[Require Human Review] - B -->|Yes| D{CI Passes?} - D -->|No| C - D -->|Yes| E[Auto-Merge] +flowchart LR + A[Dependabot PR] --> B{Patch + CI Pass?} + B -->|No| C[Human Review] + B -->|Yes| D[Auto-Merge] ``` ### Auto-Merge YAML @@ -221,13 +215,12 @@ Clean up inactive issues automatically. ### Process ```mermaid -flowchart TD - A[Weekly Schedule] --> B[Find Inactive Issues] - B --> C[Add Stale Label] - C --> D[Wait 7 Days] - D --> E{Activity?} - E -->|Yes| F[Remove Stale Label] - E -->|No| G[Close Issue] +flowchart LR + A[Weekly] --> B[Find Inactive] + B --> C[Label Stale] + C --> D{Activity?} + D -->|Yes| E[Remove Label] + D -->|No| F[Close] ``` ### Stale YAML diff --git a/docs/patterns/issue-to-pr.md b/docs/patterns/issue-to-pr.md index bcece6c..15e63ee 100644 --- a/docs/patterns/issue-to-pr.md +++ b/docs/patterns/issue-to-pr.md @@ -51,18 +51,13 @@ Add `ANTHROPIC_API_KEY` to repository secrets. Label an issue `ready-for-pr` to ## How It Works ```mermaid -flowchart TD - A[Issue Opened] --> B{Well-defined?} - B -->|No| C[Request Clarification] - B -->|Yes| D[Analyze Issue] - D --> E[Create Branch] - E --> F[Implement Changes] - F --> G[Run Tests] - G --> H{Tests Pass?} - H -->|No| I[Fix and Retry] - I --> G - H -->|Yes| J[Create Draft PR] - J --> K[Link to Issue] +flowchart LR + A[Issue] --> B{Clear?} + B -->|No| C[Clarify] + B -->|Yes| D[Implement] + D --> E[Test] + E -->|Fail| D + E -->|Pass| F[Draft PR] ``` --- diff --git a/docs/patterns/multi-agent-code-review.md b/docs/patterns/multi-agent-code-review.md index 6ead848..d056c32 100644 --- a/docs/patterns/multi-agent-code-review.md +++ b/docs/patterns/multi-agent-code-review.md @@ -11,23 +11,12 @@ ## How It Works ```mermaid -flowchart TD - A[Implementation Complete] --> B[Launch Parallel Reviews] - B --> C1[Architecture Advisor] - B --> C2[Simplification Advisor] - B --> C3[Security Advisor] - C1 --> D[Collect Findings] - C2 --> D - C3 --> D - D --> E{Critical Issues?} - E -->|Yes| F[Auto-Fix Criticals] - F --> G[Re-validate] - G --> E - E -->|No| H[Present Production-Ready Code] - - style A fill:#e1f5fe - style H fill:#c8e6c9 - style F fill:#fff3e0 +flowchart LR + A[Code] --> B[Parallel Review] + B --> C[Collect Findings] + C -->|Critical| D[Auto-Fix] + D --> B + C -->|Clean| E[Present] ``` ### Key Characteristics @@ -169,19 +158,11 @@ Multi-agent review integrates with [Autonomous Quality Enforcement](autonomous-q ```mermaid flowchart LR - A[Code Change] --> B[Validation Loop] - B --> C{Passes?} - C -->|Yes| D[Multi-Agent Review] - D --> E{Critical Issues?} - E -->|Yes| F[Auto-Fix] - F --> B - E -->|No| G[Present to User] - G --> H[Git Hook] - H --> I[Clean History] - - style A fill:#e1f5fe - style G fill:#c8e6c9 - style I fill:#c8e6c9 + A[Code] --> B[Validate] + B --> C[Review] + C -->|Issues| D[Fix] + D --> B + C -->|Clean| E[Commit] ``` **Sequence**: diff --git a/docs/patterns/pr-auto-review.md b/docs/patterns/pr-auto-review.md index a76635b..58b1342 100644 --- a/docs/patterns/pr-auto-review.md +++ b/docs/patterns/pr-auto-review.md @@ -50,13 +50,11 @@ jobs: ## How It Works ```mermaid -flowchart TD - A[PR Opened/Updated] --> B{Draft?} - B -->|Yes| C[Skip Review] - B -->|No| D[Checkout Code] - D --> E[AI Analyzes Diff] - E --> F[Generate Findings] - F --> G[Post Review Comment] +flowchart LR + A[PR] --> B{Draft?} + B -->|Yes| C[Skip] + B -->|No| D[AI Review] + D --> E[Post Comment] ``` --- diff --git a/docs/patterns/self-review-reflection.md b/docs/patterns/self-review-reflection.md index cfb0553..54f002d 100644 --- a/docs/patterns/self-review-reflection.md +++ b/docs/patterns/self-review-reflection.md @@ -36,12 +36,11 @@ If you found and fixed issues, briefly note: "Self-review: Fixed [issue]" ## How It Works ```mermaid -flowchart TD - A[Agent Does Work] --> B[Self-Review Check] - B --> C{Issues Found?} - C -->|Yes| D[Fix Issues] - D --> B - C -->|No| E[Present to User] +flowchart LR + A[Work] --> B[Review] + B -->|Issues| C[Fix] + C --> B + B -->|Clean| D[Present] ``` ### The Reflection Loop diff --git a/docs/patterns/stale-issues.md b/docs/patterns/stale-issues.md index 06579ef..0f67993 100644 --- a/docs/patterns/stale-issues.md +++ b/docs/patterns/stale-issues.md @@ -39,16 +39,13 @@ jobs: ## How It Works ```mermaid -flowchart TD - A[Scheduled Run] --> B{Inactive > 30 days?} +flowchart LR + A[Weekly Scan] --> B{Inactive 30d?} B -->|No| C[Skip] - B -->|Yes| D{Has exempt label?} - D -->|Yes| C - D -->|No| E[Add Stale Label] - E --> F[Wait 7 days] - F --> G{Activity?} - G -->|Yes| H[Remove Stale] - G -->|No| I[Close Issue] + B -->|Yes| D[Label Stale] + D --> E{Activity in 7d?} + E -->|Yes| F[Remove Label] + E -->|No| G[Close] ``` --- diff --git a/docs/quickstart.md b/docs/quickstart.md index bbbdde7..9780ec2 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -67,19 +67,14 @@ The best way to understand CBA value is the **ADR before/after demo**. 7. Self-reviews before presenting ```mermaid -flowchart TD - A[User Request] --> B[CBA Loads Context] - B --> C[Read CLAUDE.md + ADRs] - C --> D{Conflicts with ADRs?} - D -->|Yes| E[Ask user, propose ADR change] - D -->|No| F[Implement] - E -->|Approved| G[Update ADRs] - G --> F - F --> H[Self-Review] - H --> I{Passes checklist?} - I -->|No| J[Fix issues] - J --> H - I -->|Yes| K[Create PR with findings] +flowchart LR + A[Request] --> B[Load Context] + B --> C{Conflicts?} + C -->|Yes| D[Ask + Update ADR] + D --> E[Implement] + C -->|No| E + E --> F[Self-Review] + F --> G[PR] ``` See [demo-fastapi](https://github.com/ambient-code/demo-fastapi) for this pattern in action.