[architecture] Update architecture diagram - 2026-05-25#34623
Conversation
Full rebuild of architecture diagram reflecting 26 packages across 4 layers: entry points, core, domain, and utility. Co-authored-by: Copilot <[email protected]>
|
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
|
🧪 Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. The only changed file is scratchpad/architecture.md (an architecture diagram update). Test Quality Sentinel skipped. |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #34623 does not have the 'implementation' label and has 0 new lines of code in business logic directories (well under the 100-line threshold). |
There was a problem hiding this comment.
Pull request overview
Updates scratchpad/architecture.md with a regenerated architecture diagram and refreshed package reference intended to reflect the current layered dependency structure of the gh-aw codebase.
Changes:
- Replaced the previous ASCII architecture diagram with a new 4-layer layout (Entry Points → Core → Domain → Utility).
- Updated the package reference table with new layer assignments and one-line descriptions.
- Refreshed the “Last updated” timestamp and workflow run link.
Show a summary per file
| File | Description |
|---|---|
scratchpad/architecture.md |
Regenerates the architecture diagram and package reference table to reflect the current package layering. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
scratchpad/architecture.md:46
- The horizontal separator line has an extra space before the closing border character ("...────── ┤"), which can cause misalignment in monospace rendering. Consider removing the trailing space so the border is consistent with the other separators.
├──────────────────────────────── DOMAIN PACKAGES ─────────────────────────────────────── ┤
scratchpad/architecture.md:54
- Same as above: the UTILITY PACKAGES separator line has a trailing space before the closing border character ("...───── ┤"), which can misalign the diagram in monospace rendering. Consider removing the extra space.
├──────────────────────────────── UTILITY PACKAGES ────────────────────────────────────── ┤
- Files reviewed: 1/1 changed files
- Comments generated: 6
| │ ┌─────────────────┐ ┌─────────────────────┐ │ | ||
| │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ | ||
| │ │ (main binary) │ │ (WebAssembly target│ │ | ||
| │ └────────┬────────┘ └──────────┬──────────┘ │ | ||
| │ │ │ │ | ||
| ├─────────────────┼────────────────────────────────────────────┼───────────────────────────┤ |
| │ │ | ||
| │ ┌─────────────────┐ ┌─────────────────────┐ │ | ||
| │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ | ||
| │ │ (main binary) │ │ (WebAssembly target│ │ |
| │ │ Command implementations│─────▶│ Compilation engine (MD → YAML) │ │ | ||
| │ │ compile, run, audit, │ │ Frontmatter eval, engine dispatch, │ │ | ||
| │ │ mcp, logs, campaigns │ │ lock file generation │ │ | ||
| │ └──────────┬──────────────┘ └──────────────────┬──────────────────-─┘ │ |
| This diagram shows the package structure and dependencies of the `gh-aw` codebase. The project is organized into three layers: entry points (CLI binaries), core packages (main business logic), and utility packages (shared helpers). | ||
| This diagram shows the package structure and dependency layers of the `gh-aw` codebase. | ||
| The project compiles markdown workflow files into GitHub Actions YAML via a layered pipeline: | ||
| CLI entry points → core packages (cli, workflow, parser, console) → domain helpers → utility leaf packages. |
| | Package | Layer | Description | | ||
| |---------|-------|-------------| | ||
| | `cmd/gh-aw` | Entry Point | Main CLI binary | | ||
| | `cmd/gh-aw-wasm` | Entry Point | WebAssembly build target | | ||
| | `cmd/linters` | Entry Point | Custom linter binary | | ||
| | `pkg/cli` | Core | Command implementations (compile, run, audit, logs, mcp, stats) | | ||
| | `pkg/workflow` | Core | Workflow compilation engine (Markdown → GitHub Actions YAML) | | ||
| | `pkg/parser` | Core | Markdown frontmatter parsing and content extraction | | ||
| | `pkg/console` | Core | Terminal UI formatting, rendering, and style management | | ||
| | `pkg/agentdrain` | Core | Agent log draining and streaming | | ||
| | `pkg/actionpins` | Core | GitHub Actions pin resolution | | ||
| | `pkg/linters` | Core | Custom Go analysis linters (namespace with subpackages) | | ||
| | `pkg/stats` | Core | Numerical statistics for metric collection | | ||
| | `pkg/constants` | Utility | Shared constants and semantic type aliases | | ||
| | `pkg/types` | Utility | Shared type definitions | | ||
| | `pkg/logger` | Utility | Namespace-based debug logging (zero overhead) | | ||
| | `pkg/styles` | Utility | Centralized terminal style/color definitions | | ||
| | `pkg/stringutil` | Utility | String utility functions | | ||
| | `pkg/fileutil` | Utility | File path and I/O operation utilities | | ||
| | `pkg/gitutil` | Utility | Git repository utilities | | ||
| | `pkg/jsonutil` | Utility | JSON utility functions | | ||
| | `pkg/repoutil` | Utility | GitHub repository slug/URL utilities | | ||
| | `pkg/envutil` | Utility | Environment variable reading/validation | | ||
| | `pkg/errorutil` | Utility | GitHub API error classification helpers | | ||
| | `pkg/sliceutil` | Utility | Generic slice utilities | | ||
| | `pkg/typeutil` | Utility | General-purpose type conversion utilities | | ||
| | `pkg/semverutil` | Utility | Semantic versioning primitives | | ||
| | `pkg/timeutil` | Utility | Time helper utilities | | ||
| | `pkg/tty` | Utility | TTY detection utilities | | ||
| | `pkg/testutil` | Utility | Test helper utilities (test builds only) | | ||
| | `cli` | Core | Command implementations (compile, run, audit, mcp, logs, campaigns) | | ||
| | `workflow` | Core | Workflow compilation engine — markdown → GitHub Actions YAML | | ||
| | `parser` | Core | Markdown frontmatter & YAML parsing, schema validation, expression extraction | | ||
| | `console` | Core | Terminal UI rendering and message formatting | | ||
| | `types` | Core | Shared domain type definitions | | ||
| | `constants` | Core | Semantic type aliases, engine/job names, feature flags | |
| | `fileutil` | Util | File path and file operation helpers | | ||
| | `gitutil` | Util | Git repository helpers | | ||
| | `stringutil` | Util | String utilities (ANSI stripping, transforms) | | ||
| | `logger` | Util | Namespace-based debug logging with zero overhead | | ||
| | `envutil` | Util | Environment variable reading and validation | | ||
| | `errorutil` | Util | Error classification and inspection helpers | | ||
| | `jsonutil` | Util | JSON serialization helpers | | ||
| | `repoutil` | Util | GitHub repository slug and URL utilities | | ||
| | `semverutil` | Util | Semantic versioning primitives | | ||
| | `sliceutil` | Util | Generic slice operation helpers | | ||
| | `syncutil` | Util | Concurrency synchronization helpers | | ||
| | `timeutil` | Util | Time formatting helpers | | ||
| | `tty` | Util | TTY detection utilities | | ||
| | `typeutil` | Util | General-purpose type conversion utilities | | ||
| | `styles` | Util | Centralized terminal color/style definitions | | ||
| | `testutil` | Util | Test helpers (test-only, not used in production) | |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /zoom-out and /grill-with-docs — requesting changes for one factual inaccuracy.
📋 Key Themes & Highlights
Key Issues
- Missing entry point:
cmd/lintersstill exists in the repo but is absent from both the diagram and the table — factual gap that could mislead contributors - Path prefix removal: Dropping
pkg//cmd/prefixes from the table trades navigational precision for brevity - Minor rendering artifact:
-─mixed character on theworkflowbox border (cosmetic)
Positive Highlights
- ✅ The four-layer structure (Entry Points → Core → Domain → Utility) is cleaner and more accurate than the old three-layer model
- ✅ Adding
syncutilto the table fills a real gap - ✅ Moving
agentdrain,linters,statsto a dedicated Domain layer reflects their actual role better - ✅ Improved description of the overall pipeline flow in the Overview section
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 1.2M
Comments that could not be inline-anchored
scratchpad/architecture.md:17
[/zoom-out] cmd/linters is missing from the new Entry Points section — it still exists at cmd/linters/ in the repo.
<details>
<summary>💡 Suggestion</summary>
The old diagram included cmd/linters as a third entry point alongside cmd/gh-aw and cmd/gh-aw-wasm. Since that binary still exists, omitting it makes the diagram inaccurate and could mislead developers about the codebase's binary surface.
Add it back to the Entry Points box, similar to:
│ ┌──────────────────┐ ┌─────…
</details>
<details><summary>scratchpad/architecture.md:170</summary>
**[/grill-with-docs]** Package names in the table dropped their `pkg/` and `cmd/` path prefixes — reducing precision for developers trying to navigate the repo.
<details>
<summary>💡 Suggestion</summary>
Using bare names like `cli` or `workflow` is ambiguous; the full import paths (`pkg/cli`, `pkg/workflow`) are what developers type in `go list` queries, editor navigation, and import statements. Consider keeping the qualified names (e.g., `pkg/cli`) or at least adding a note that all paths ar…
</details>
<details><summary>scratchpad/architecture.md:96</summary>
**[/zoom-out]** Minor rendering artifact on the workflow box border: `-─` (hyphen followed by em-dash) instead of consistent `─` characters.
<details>
<summary>💡 Fix</summary>
Line ends with `──────────────────-─┘` — replace the `-─` with `──` to match the rest of the box-drawing characters.
</details>
</details>
PR #34623 —
[architecture] Update architecture diagram - 2026-05-25Repository:
github/gh-awSummary
Refreshes the architecture diagram in
scratchpad/architecture.mdto reflect the current state of the codebase as of 2026-05-25. The update restructures the ASCII box diagram into a cleaner, narrower three-tier layout and brings package assignments, descriptions, and command listings into sync with recent structural changes.Changes
File modified:
scratchpad/architecture.mdThis is a documentation-only change. No source code, configuration, or public API is affected.
What changed in the diagram
cmd/gh-aw,cmd/gh-aw-wasm,cmd/linterscmd/gh-aw,cmd/gh-aw-wasmonlycli,workflow,parser,console,agentdraincli,workflow,parser,console,types,constantsactionpins,agentdrain,linters,statsclicommands listedcompile,run,audit,logs,mcp,statscompile,run,audit,mcp,logs,campaignssyncutilKey structural decisions captured
cmd/lintersremoved from entry points — it is now represented inside the new Domain Packages tier, reflecting its role as an internal tool rather than a top-level binary entry point.typesandconstantspromoted to the Core layer — these were previously implicit; they are now explicitly called out as foundational Core packages.actionpins,agentdrain,linters, andstatsare broken out into their own tier between Core and Utility, acknowledging their domain-specific responsibilities distinct from general-purpose utilities.workflowdescription updated to note lock file generation;clidescription updated to listcampaignsas a supported command.syncutiladded to the Utility package list.Impact
Checklist