[architecture] Update architecture diagram - 2026-04-27#28684
Conversation
Full rebuild from cache miss. Refined layer assignments based on actual import counts and dependency analysis. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hey One checklist item flagged automatically:
This PR looks ready for maintainer review. The diff is clean, scoped to a single file, and the description clearly explains the analysis basis and what changed.
|
There was a problem hiding this comment.
Pull request overview
Updates the repository’s gh-aw package architecture documentation with a rebuilt ASCII dependency diagram and an updated package reference table including import-frequency annotations.
Changes:
- Rebuilt the ASCII architecture diagram (wider layout) and refreshed package layering (moving
actionpins,agentdrain,statsto Utility). - Updated the package reference table to use
cmd/...andpkg/...paths and added import-frequency annotations. - Updated the “Last updated” header metadata for the new run.
Show a summary per file
| File | Description |
|---|---|
| scratchpad/architecture.md | Replaces the prior diagram/table with a rebuilt architecture diagram and import-frequency annotated package reference. |
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` | Core | Markdown frontmatter parsing and YAML schema validation | | ||
| | `pkg/console` | Core | Terminal UI formatting (success/error/info/warning/progress) | | ||
| | `pkg/logger` | Utility | Namespace-based debug logging with zero overhead (531 imports) | | ||
| | `pkg/constants` | Utility | Shared typed constants: engines, versions, feature flags (221) | |
There was a problem hiding this comment.
Import-frequency annotations in the package table are inconsistent: pkg/constants has (221) while the surrounding rows use (N imports)/(1 import). Please standardize the annotation format (including pluralization) across all rows for easier scanning.
| | `pkg/constants` | Utility | Shared typed constants: engines, versions, feature flags (221) | | |
| | `pkg/constants` | Utility | Shared typed constants: engines, versions, feature flags (221 imports) | |
| # Architecture Diagram | ||
|
|
||
| > Last updated: 2026-04-26 · Source: [Issue #🏗️ Architecture Diagram: gh-aw Package Architecture Diagram (2026-04-26)](https://github.com/github/gh-aw/issues) | ||
| > Last updated: 2026-04-27 · Source: [🏗️ Architecture Diagram: Full rebuild — gh-aw package architecture (2026-04-27)](https://github.com/github/gh-aw/issues) |
There was a problem hiding this comment.
The scratchpad header doesn’t follow the repo’s documented format for the architecture diagram source reference. The workflow instructions specify > Last updated: <YYYY-MM-DD> · Source: [Issue #<number>](<issue_url>) (.github/workflows/daily-architecture-diagram.md:195), but this links to the generic /issues page and omits the issue number/URL. Please update this to point to the specific generated issue (including its number).
| > Last updated: 2026-04-27 · Source: [🏗️ Architecture Diagram: Full rebuild — gh-aw package architecture (2026-04-27)](https://github.com/github/gh-aw/issues) | |
| > Last updated: 2026-04-27 · Source: [Issue #<number>](https://github.com/github/gh-aw/issues/<number>) |
| │ ┌────────────────────────────┐ ┌──────────────────┐ │ | ||
| │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ | ||
| │ │ Main CLI binary / cobra │ │ WebAssembly target │ | ||
| │ └──────┬─────────────────────┘ └──────────────────┘ │ | ||
| │ │ imports: cli, workflow, parser, console, constants │ | ||
| └──────────────────────┼───────────────────────────────────────────────────────────────────────────────┘ | ||
| │ | ||
| ┌──────────────────────▼───────────────────────────────────────────────────────────────────────────────┐ |
There was a problem hiding this comment.
The ENTRY POINTS ASCII diagram is currently malformed/inaccurate for cmd/gh-aw-wasm: line 15 is missing the closing right border (│), and the diagram doesn’t show cmd/gh-aw-wasm importing pkg/parser + pkg/workflow (see cmd/gh-aw-wasm/main.go imports). Please fix the box alignment and add the correct dependency annotation/connection for the wasm entry point.
| │ ┌────────────────────────────┐ ┌──────────────────┐ │ | |
| │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ | |
| │ │ Main CLI binary / cobra │ │ WebAssembly target │ | |
| │ └──────┬─────────────────────┘ └──────────────────┘ │ | |
| │ │ imports: cli, workflow, parser, console, constants │ | |
| └──────────────────────┼───────────────────────────────────────────────────────────────────────────────┘ | |
| │ | |
| ┌──────────────────────▼───────────────────────────────────────────────────────────────────────────────┐ | |
| │ ┌────────────────────────────┐ ┌────────────────────────┐ │ | |
| │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ | |
| │ │ Main CLI binary / cobra │ │ WebAssembly target │ │ | |
| │ └──────┬─────────────────────┘ └──────────┬─────────────┘ │ | |
| │ │ imports: cli, workflow, parser, console, constants │ | |
| │ │ │ imports: workflow, parser │ | |
| └──────────────────────┼─────────────────────────────────┼─────────────────────────────────────────────┘ | |
| │ │ | |
| ┌──────────────────────▼─────────────────────────────────▼─────────────────────────────────────────────┐ |
Full rebuild of the architecture diagram (cache miss — no prior state existed).
Changes
scratchpad/architecture.mdwith updated diagram and package reference tableactionpins,agentdrain,statsmoved to utility layer based on import count analysisAnalysis basis
6dea27ee7256ea8d27e910e2b275e2b11ece4830cmd/andpkg/grepacross all non-test.gofiles