Skip to content

Commit ec34ddc

Browse files
authored
docs: simplify mermaid diagrams for visual clarity (#17)
Simplified all 14 mermaid diagrams across 9 files: - Changed from TD (top-down) to LR (left-right) flow - Reduced node count by ~50% (avg 10 nodes -> 5 nodes) - Removed styling (fill colors) for cleaner rendering - Used shorter labels for readability Files updated: - autonomous-quality-enforcement.md - multi-agent-code-review.md (2 diagrams) - self-review-reflection.md - issue-to-pr.md - pr-auto-review.md - dependabot-auto-merge.md - stale-issues.md - gha-automation-patterns.md (4 diagrams) - quickstart.md
1 parent 920bd48 commit ec34ddc

9 files changed

+72
-130
lines changed

docs/patterns/autonomous-quality-enforcement.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,14 @@ git add . && git commit -m "test"
8585
AQE combines three mechanisms that reinforce each other:
8686

8787
```mermaid
88-
flowchart TD
89-
A[Code Changes] --> B{Process Rule}
90-
B -->|Reminds| C[Run Validation]
91-
C --> D{Test Passes?}
92-
D -->|No| E[Analyze Error]
93-
E --> F[Fix Code]
94-
F --> C
95-
D -->|Yes| G[Present to User]
96-
G --> H{Commit?}
97-
H -->|Yes| I[Git Hook Validates]
98-
I --> J{Passes?}
99-
J -->|No| K[Block Commit]
100-
K --> F
101-
J -->|Yes| L[Clean Git History]
102-
103-
style A fill:#e1f5fe
104-
style G fill:#c8e6c9
105-
style L fill:#c8e6c9
106-
style K fill:#ffcdd2
88+
flowchart LR
89+
A[Code] --> B[Validate]
90+
B -->|Fail| C[Fix & Retry]
91+
C --> B
92+
B -->|Pass| D[Commit]
93+
D --> E[Git Hook]
94+
E -->|Fail| C
95+
E -->|Pass| F[Done]
10796
```
10897

10998
| Component | Purpose | When It Runs |

docs/patterns/dependabot-auto-merge.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,10 @@ Enable Dependabot in `.github/dependabot.yml`. Set up branch protection requirin
4545
## How It Works
4646

4747
```mermaid
48-
flowchart TD
49-
A[Dependabot PR] --> B{Author is dependabot?}
50-
B -->|No| C[Normal Review]
51-
B -->|Yes| D[Fetch Metadata]
52-
D --> E{Patch Version?}
53-
E -->|No| C
54-
E -->|Yes| F{CI Passes?}
55-
F -->|No| C
56-
F -->|Yes| G[Auto-Merge]
48+
flowchart LR
49+
A[Dependabot PR] --> B{Patch + CI Pass?}
50+
B -->|No| C[Human Review]
51+
B -->|Yes| D[Auto-Merge]
5752
```
5853

5954
---

docs/patterns/gha-automation-patterns.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ Convert well-defined issues into draft pull requests automatically.
1515
### How It Works
1616

1717
```mermaid
18-
flowchart TD
19-
A[Issue Opened] --> B{Well-defined?}
20-
B -->|No| C[Request Clarification]
21-
B -->|Yes| D[Analyze Issue]
22-
D --> E[Self-Review Analysis]
23-
E --> F[Create Branch]
24-
F --> G[Create Draft PR]
25-
G --> H[Link to Issue]
18+
flowchart LR
19+
A[Issue] --> B{Clear?}
20+
B -->|No| C[Clarify]
21+
B -->|Yes| D[Implement]
22+
D --> E[Draft PR]
2623
```
2724

2825
### Implementation
@@ -102,10 +99,9 @@ AI-powered code review on every pull request.
10299
### Workflow
103100
104101
```mermaid
105-
flowchart TD
106-
A[PR Opened/Updated] --> B[AI Reviews Code]
107-
B --> C[Self-Review Findings]
108-
C --> D[Post Review Comment]
102+
flowchart LR
103+
A[PR] --> B[AI Review]
104+
B --> C[Post Comment]
109105
```
110106

111107
### Workflow YAML
@@ -157,12 +153,10 @@ Automatically merge low-risk dependency updates.
157153
### Flow
158154
159155
```mermaid
160-
flowchart TD
161-
A[Dependabot PR] --> B{Patch Version?}
162-
B -->|No| C[Require Human Review]
163-
B -->|Yes| D{CI Passes?}
164-
D -->|No| C
165-
D -->|Yes| E[Auto-Merge]
156+
flowchart LR
157+
A[Dependabot PR] --> B{Patch + CI Pass?}
158+
B -->|No| C[Human Review]
159+
B -->|Yes| D[Auto-Merge]
166160
```
167161

168162
### Auto-Merge YAML
@@ -221,13 +215,12 @@ Clean up inactive issues automatically.
221215
### Process
222216

223217
```mermaid
224-
flowchart TD
225-
A[Weekly Schedule] --> B[Find Inactive Issues]
226-
B --> C[Add Stale Label]
227-
C --> D[Wait 7 Days]
228-
D --> E{Activity?}
229-
E -->|Yes| F[Remove Stale Label]
230-
E -->|No| G[Close Issue]
218+
flowchart LR
219+
A[Weekly] --> B[Find Inactive]
220+
B --> C[Label Stale]
221+
C --> D{Activity?}
222+
D -->|Yes| E[Remove Label]
223+
D -->|No| F[Close]
231224
```
232225

233226
### Stale YAML

docs/patterns/issue-to-pr.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,13 @@ Add `ANTHROPIC_API_KEY` to repository secrets. Label an issue `ready-for-pr` to
5151
## How It Works
5252

5353
```mermaid
54-
flowchart TD
55-
A[Issue Opened] --> B{Well-defined?}
56-
B -->|No| C[Request Clarification]
57-
B -->|Yes| D[Analyze Issue]
58-
D --> E[Create Branch]
59-
E --> F[Implement Changes]
60-
F --> G[Run Tests]
61-
G --> H{Tests Pass?}
62-
H -->|No| I[Fix and Retry]
63-
I --> G
64-
H -->|Yes| J[Create Draft PR]
65-
J --> K[Link to Issue]
54+
flowchart LR
55+
A[Issue] --> B{Clear?}
56+
B -->|No| C[Clarify]
57+
B -->|Yes| D[Implement]
58+
D --> E[Test]
59+
E -->|Fail| D
60+
E -->|Pass| F[Draft PR]
6661
```
6762

6863
---

docs/patterns/multi-agent-code-review.md

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,12 @@
1111
## How It Works
1212

1313
```mermaid
14-
flowchart TD
15-
A[Implementation Complete] --> B[Launch Parallel Reviews]
16-
B --> C1[Architecture Advisor]
17-
B --> C2[Simplification Advisor]
18-
B --> C3[Security Advisor]
19-
C1 --> D[Collect Findings]
20-
C2 --> D
21-
C3 --> D
22-
D --> E{Critical Issues?}
23-
E -->|Yes| F[Auto-Fix Criticals]
24-
F --> G[Re-validate]
25-
G --> E
26-
E -->|No| H[Present Production-Ready Code]
27-
28-
style A fill:#e1f5fe
29-
style H fill:#c8e6c9
30-
style F fill:#fff3e0
14+
flowchart LR
15+
A[Code] --> B[Parallel Review]
16+
B --> C[Collect Findings]
17+
C -->|Critical| D[Auto-Fix]
18+
D --> B
19+
C -->|Clean| E[Present]
3120
```
3221

3322
### Key Characteristics
@@ -169,19 +158,11 @@ Multi-agent review integrates with [Autonomous Quality Enforcement](autonomous-q
169158

170159
```mermaid
171160
flowchart LR
172-
A[Code Change] --> B[Validation Loop]
173-
B --> C{Passes?}
174-
C -->|Yes| D[Multi-Agent Review]
175-
D --> E{Critical Issues?}
176-
E -->|Yes| F[Auto-Fix]
177-
F --> B
178-
E -->|No| G[Present to User]
179-
G --> H[Git Hook]
180-
H --> I[Clean History]
181-
182-
style A fill:#e1f5fe
183-
style G fill:#c8e6c9
184-
style I fill:#c8e6c9
161+
A[Code] --> B[Validate]
162+
B --> C[Review]
163+
C -->|Issues| D[Fix]
164+
D --> B
165+
C -->|Clean| E[Commit]
185166
```
186167

187168
**Sequence**:

docs/patterns/pr-auto-review.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,11 @@ jobs:
5050
## How It Works
5151
5252
```mermaid
53-
flowchart TD
54-
A[PR Opened/Updated] --> B{Draft?}
55-
B -->|Yes| C[Skip Review]
56-
B -->|No| D[Checkout Code]
57-
D --> E[AI Analyzes Diff]
58-
E --> F[Generate Findings]
59-
F --> G[Post Review Comment]
53+
flowchart LR
54+
A[PR] --> B{Draft?}
55+
B -->|Yes| C[Skip]
56+
B -->|No| D[AI Review]
57+
D --> E[Post Comment]
6058
```
6159

6260
---

docs/patterns/self-review-reflection.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ If you found and fixed issues, briefly note: "Self-review: Fixed [issue]"
3636
## How It Works
3737

3838
```mermaid
39-
flowchart TD
40-
A[Agent Does Work] --> B[Self-Review Check]
41-
B --> C{Issues Found?}
42-
C -->|Yes| D[Fix Issues]
43-
D --> B
44-
C -->|No| E[Present to User]
39+
flowchart LR
40+
A[Work] --> B[Review]
41+
B -->|Issues| C[Fix]
42+
C --> B
43+
B -->|Clean| D[Present]
4544
```
4645

4746
### The Reflection Loop

docs/patterns/stale-issues.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,13 @@ jobs:
3939
## How It Works
4040
4141
```mermaid
42-
flowchart TD
43-
A[Scheduled Run] --> B{Inactive > 30 days?}
42+
flowchart LR
43+
A[Weekly Scan] --> B{Inactive 30d?}
4444
B -->|No| C[Skip]
45-
B -->|Yes| D{Has exempt label?}
46-
D -->|Yes| C
47-
D -->|No| E[Add Stale Label]
48-
E --> F[Wait 7 days]
49-
F --> G{Activity?}
50-
G -->|Yes| H[Remove Stale]
51-
G -->|No| I[Close Issue]
45+
B -->|Yes| D[Label Stale]
46+
D --> E{Activity in 7d?}
47+
E -->|Yes| F[Remove Label]
48+
E -->|No| G[Close]
5249
```
5350

5451
---

docs/quickstart.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,14 @@ The best way to understand CBA value is the **ADR before/after demo**.
6767
7. Self-reviews before presenting
6868

6969
```mermaid
70-
flowchart TD
71-
A[User Request] --> B[CBA Loads Context]
72-
B --> C[Read CLAUDE.md + ADRs]
73-
C --> D{Conflicts with ADRs?}
74-
D -->|Yes| E[Ask user, propose ADR change]
75-
D -->|No| F[Implement]
76-
E -->|Approved| G[Update ADRs]
77-
G --> F
78-
F --> H[Self-Review]
79-
H --> I{Passes checklist?}
80-
I -->|No| J[Fix issues]
81-
J --> H
82-
I -->|Yes| K[Create PR with findings]
70+
flowchart LR
71+
A[Request] --> B[Load Context]
72+
B --> C{Conflicts?}
73+
C -->|Yes| D[Ask + Update ADR]
74+
D --> E[Implement]
75+
C -->|No| E
76+
E --> F[Self-Review]
77+
F --> G[PR]
8378
```
8479

8580
See [demo-fastapi](https://github.com/ambient-code/demo-fastapi) for this pattern in action.

0 commit comments

Comments
 (0)