Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 8 additions & 19 deletions docs/patterns/autonomous-quality-enforcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
13 changes: 4 additions & 9 deletions docs/patterns/dependabot-auto-merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

---
Expand Down
43 changes: 18 additions & 25 deletions docs/patterns/gha-automation-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
19 changes: 7 additions & 12 deletions docs/patterns/issue-to-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

---
Expand Down
41 changes: 11 additions & 30 deletions docs/patterns/multi-agent-code-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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**:
Expand Down
12 changes: 5 additions & 7 deletions docs/patterns/pr-auto-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

---
Expand Down
11 changes: 5 additions & 6 deletions docs/patterns/self-review-reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 6 additions & 9 deletions docs/patterns/stale-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

---
Expand Down
21 changes: 8 additions & 13 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down