[architecture] Update architecture diagram - 2026-04-23#28017
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the scratchpad/architecture.md architecture diagram and package reference to reflect the current package layout and intended layering.
Changes:
- Redraws the ASCII architecture diagram with clearer layer separation.
- Reclassifies
pkg/constantsandpkg/typesinto the Utility layer and expands the Utility row. - Updates package descriptions (notably
pkg/agentdrain) in the package reference table.
Show a summary per file
| File | Description |
|---|---|
| scratchpad/architecture.md | Refreshes the architecture diagram and package reference content to match current structure/layers. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 3
| │ └──────┬─────┘ └──────────────────────┘ └────────┬────────┘ └──────────┬───────────┘ │ | ||
| │ │ │ │ │ | ||
| │ ▼ │ │ │ | ||
| │ ┌─────────────────────────────────────┐ │ │ │ | ||
| │ │ pkg/parser │◀────────────┘ │ │ |
There was a problem hiding this comment.
The dependency arrow into pkg/parser appears to indicate pkg/actionpins depends on pkg/parser, but in the codebase pkg/workflow imports both pkg/parser and pkg/actionpins (e.g. pkg/workflow/compiler_types.go), while pkg/actionpins does not import pkg/parser (see pkg/actionpins/actionpins.go). Please update the diagram arrows to reflect the actual import direction (workflow → parser, workflow → actionpins) and remove the implied actionpins → parser dependency.
| │ └──────┬─────┘ └──────────────────────┘ └────────┬────────┘ └──────────┬───────────┘ │ | |
| │ │ │ │ │ | |
| │ ▼ │ │ │ | |
| │ ┌─────────────────────────────────────┐ │ │ │ | |
| │ │ pkg/parser │◀────────────┘ │ │ | |
| │ └──────┬─────┘ └──────────────────────┘ └────────▲────────┘ └──────────┬───────────┘ │ | |
| │ │ │ │ │ | |
| │ ├───────────────────────────────────────────┘ │ │ | |
| │ ▼ │ │ | |
| │ ┌─────────────────────────────────────┐ │ │ | |
| │ │ pkg/parser │ │ │ |
| │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ | ||
| │ │ (CLI binary) │ │ (WASM target) │ │ | ||
| │ └──────────┬──────────┘ └──────────┬──────────┘ │ | ||
| │ │ cli, workflow, parser, console │ │ |
There was a problem hiding this comment.
The entry-point dependency list under cmd/gh-aw omits pkg/constants, and cmd/gh-aw-wasm's imports aren’t shown at all. In the code, cmd/gh-aw/main.go imports pkg/constants, and cmd/gh-aw-wasm/main.go imports pkg/parser and pkg/workflow. Please adjust the entry-point dependency line(s) so the diagram reflects these actual imports.
| │ │ cli, workflow, parser, console │ │ | |
| │ │ cli, workflow, parser, console, constants │ parser, workflow │ |
| # Architecture Diagram | ||
|
|
||
| > Last updated: 2026-04-22 · Source: [Issue #27791](https://github.com/github/gh-aw/issues) | ||
| > Last updated: 2026-04-23 · Source: Issue #28016 (Architecture Diagram) |
There was a problem hiding this comment.
The updated source reference is no longer a clickable link. Consider linking Issue #28016 directly (e.g. to /issues/28016) to match how issue references are typically navigated from docs.
| > Last updated: 2026-04-23 · Source: Issue #28016 (Architecture Diagram) | |
| > Last updated: 2026-04-23 · Source: [Issue #28016](/issues/28016) (Architecture Diagram) |
Updates
scratchpad/architecture.mdwith a refreshed architecture diagram reflecting the current package structure as of commitc292442.Changes
agentdraindescribed as log analysis/anomaly detection rather than "drain & streaming")constantsandtypesto Utility layer (they have no downstream core-package dependencies)pkg/envutil,pkg/repoutil,pkg/stats,pkg/timeutilexplicitly to the diagram's utility rowFull analysis posted in the architecture issue created alongside this PR.