[architecture] Update architecture diagram - 2026-04-25#28412
Conversation
Full rebuild of architecture diagram showing all 22 packages across cmd/ and pkg/ with accurate dependency arrows based on Go imports. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/q fix the caching which is the architecture.md file itself |
|
🎩 Mission equipment ready! Q has optimized your workflow. Use wisely, 007! 🔫 |
There was a problem hiding this comment.
Pull request overview
Updates scratchpad/architecture.md to include a newly generated architecture diagram and package reference for the gh-aw repository.
Changes:
- Added a new “Last updated: 2026-04-25” section with an updated ASCII dependency diagram.
- Added/updated a “Package Reference” table describing core and utility packages.
Show a summary per file
| File | Description |
|---|---|
scratchpad/architecture.md |
Adds an updated architecture diagram and package reference content for the repo’s Go packages. |
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:41
- The utility package list in the diagram doesn’t match the package reference below:
testutilappears in the reference table but is missing from the diagram’s utility block, and the total set/count of utilities is inconsistent. Please make the diagram and the package reference agree on the exact set of packages included.
│ UTILITY PACKAGES │
│ ┌─────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ │
│ │ logger │ │ styles │ │ tty │ │constants │ │ types │ │ fileutil │ │ gitutil │ │
│ └─────────┘ └─────────┘ └──────────┘ └──────────┘ └───────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │stringutil│ │ sliceutil│ │ repoutil │ │semverutil│ │ envutil │ │ typeutil │ │ timeutil │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
scratchpad/architecture.md:50
- The new "Package Reference" table doesn’t include the two entry points (
cmd/gh-aw,cmd/gh-aw-wasm) even though they’re part of the diagram/PR description. Consider adding rows for the entry points (and using consistentcmd/.../pkg/...paths) so the reference is complete.
## Package Reference
| Package | Layer | Description |
|---------|-------|-------------|
| `cli` | Core | Command-line interface implementations |
| `workflow` | Core | Workflow compilation engine (Markdown → GitHub Actions YAML) |
- Files reviewed: 1/1 changed files
- Comments generated: 3
| │ │ cli │───▶│ workflow │───▶│ parser │ │ | ||
| │ │ CLI commands │ │ Workflow compiler │ │ Markdown/YAML parsing │ │ | ||
| │ └────────┬────────┘ └────────┬─────────┘ └───────────┬────────────┘ │ | ||
| │ │ │ │ │ | ||
| │ │ ┌────────▼─────────┐ ┌───────────▼────────────┐ │ | ||
| │ └────────────▶│ console │ │ actionpins │ │ | ||
| │ │ Terminal UI │ │ Action pin resolver │ │ | ||
| │ └──────────────────┘ └────────────────────────┘ │ | ||
| │ │ | ||
| │ ┌──────────────────┐ ┌──────────────────┐ │ | ||
| │ │ agentdrain │ │ stats │ │ | ||
| │ │ Agent draining │ │ Numeric stats │ │ | ||
| │ └──────────────────┘ └──────────────────┘ │ | ||
| │ │ | ||
| ├──────────────────────────────────────────────────────────────────────────────────────────────────┤ | ||
| │ UTILITY PACKAGES │ | ||
| │ ┌─────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ │ | ||
| │ │ logger │ │ styles │ │ tty │ │constants │ │ types │ │ fileutil │ │ gitutil │ │ | ||
| │ └─────────┘ └─────────┘ └──────────┘ └──────────┘ └───────────┘ └──────────┘ └──────────┘ │ | ||
| │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ |
There was a problem hiding this comment.
The new diagram labels core packages as cli, workflow, etc., but in this repo these live under pkg/ (e.g., pkg/cli, pkg/workflow) and the older sections in this same document use the pkg/... form. To avoid confusion, use consistent package/path naming (either prefix with pkg/ in the diagram/table, or explicitly state that names refer to pkg/<name>).
This issue also appears in the following locations of the same file:
- line 35
- line 45
| │ │ cli │───▶│ workflow │───▶│ parser │ │ | |
| │ │ CLI commands │ │ Workflow compiler │ │ Markdown/YAML parsing │ │ | |
| │ └────────┬────────┘ └────────┬─────────┘ └───────────┬────────────┘ │ | |
| │ │ │ │ │ | |
| │ │ ┌────────▼─────────┐ ┌───────────▼────────────┐ │ | |
| │ └────────────▶│ console │ │ actionpins │ │ | |
| │ │ Terminal UI │ │ Action pin resolver │ │ | |
| │ └──────────────────┘ └────────────────────────┘ │ | |
| │ │ | |
| │ ┌──────────────────┐ ┌──────────────────┐ │ | |
| │ │ agentdrain │ │ stats │ │ | |
| │ │ Agent draining │ │ Numeric stats │ │ | |
| │ └──────────────────┘ └──────────────────┘ │ | |
| │ │ | |
| ├──────────────────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ UTILITY PACKAGES │ | |
| │ ┌─────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ │ | |
| │ │ logger │ │ styles │ │ tty │ │constants │ │ types │ │ fileutil │ │ gitutil │ │ | |
| │ └─────────┘ └─────────┘ └──────────┘ └──────────┘ └───────────┘ └──────────┘ └──────────┘ │ | |
| │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ | |
| │ │ pkg/cli │───▶│ pkg/workflow │───▶│ pkg/parser │ │ | |
| │ │ CLI commands │ │ Workflow compiler │ │ Markdown/YAML parsing │ │ | |
| │ └────────┬────────┘ └────────┬─────────┘ └───────────┬────────────┘ │ | |
| │ │ │ │ │ | |
| │ │ ┌────────▼─────────┐ ┌───────────▼────────────┐ │ | |
| │ └────────────▶│ pkg/console │ │ pkg/actionpins │ │ | |
| │ │ Terminal UI │ │ Action pin resolver │ │ | |
| │ └──────────────────┘ └────────────────────────┘ │ | |
| │ │ | |
| │ ┌──────────────────┐ ┌──────────────────┐ │ | |
| │ │ pkg/agentdrain │ │ pkg/stats │ │ | |
| │ │ Agent draining │ │ Numeric stats │ │ | |
| │ └──────────────────┘ └──────────────────┘ │ | |
| │ │ | |
| ├──────────────────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ UTILITY PACKAGES │ | |
| │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ | |
| │ │ pkg/logger │ │ pkg/styles │ │ pkg/tty │ │pkg/constants│ │ pkg/types │ │pkg/fileutil│ │ | |
| │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ | |
| │ ┌────────────┐ ┌────────────┐ │ |
| | `testutil` | Utility | Test helpers and shared test utilities | | ||
|
|
||
| > Last updated: 2026-04-24 · Source: [🏗️ Architecture Diagram: gh-aw Repository Architecture Diagram (2026-04-24)](https://github.com/github/gh-aw/issues) | ||
|
|
||
| ## Overview |
There was a problem hiding this comment.
This update appends the new 2026-04-25 diagram above the existing 2026-04-24/2026-04-23 sections, leaving multiple full diagrams and duplicate "Overview"/"Package Reference" sections in the same file. If the intent is to keep only the latest diagram, remove the older dated sections to avoid confusing/contradictory documentation.
See below for a potential fix:
| @@ -1,5 +1,74 @@ | |||
| # Architecture Diagram | |||
|
|
|||
| > Last updated: 2026-04-25 · Source: [Issue #28411](https://github.com/github/gh-aw/issues) | |||
There was a problem hiding this comment.
The "Source: Issue #28411" link currently points to the repository issues index (https://github.com/github/gh-aw/issues) rather than the specific issue. Update the URL to include the issue number (or adjust the link text if you intentionally don’t want to deep-link).
| > Last updated: 2026-04-25 · Source: [Issue #28411](https://github.com/github/gh-aw/issues) | |
| > Last updated: 2026-04-25 · Source: [Issue #28411](https://github.com/github/gh-aw/issues/28411) |
Updates
scratchpad/architecture.mdwith a freshly generated full-rebuild architecture diagram showing all 22 packages acrosscmd/andpkg/, with accurate dependency arrows derived from actual Go import analysis.What changed
Packages covered
Entry Points:
cmd/gh-aw,cmd/gh-aw-wasmCore:
cli,workflow,parser,console,actionpins,agentdrain,statsUtility:
logger,styles,tty,constants,types,fileutil,gitutil,stringutil,sliceutil,repoutil,semverutil,envutil,typeutil,timeutil,testutilReferences: §24927277739