[architecture] Update architecture diagram - 2026-04-19#27163
Conversation
Full rebuild of architecture diagram from commit f7e3992. Clarifies layer boundaries and dependency flow with updated ASCII art. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hey One small flag from the checklist:
If you'd like to address the script coverage gap, here's a ready-to-use agent prompt:
|
There was a problem hiding this comment.
Pull request overview
Updates scratchpad/architecture.md with a refreshed ASCII architecture diagram and an updated package reference, based on a new generator run.
Changes:
- Refreshes the ASCII architecture diagram layout and grouping (Rendering / Data / Files+Git / Others).
- Updates the “Last updated” date and generator run link.
- Revises package reference entries (notably promoting
pkg/actionpinsunderpkg/workflowand reclassifyingpkg/statsas a utility).
Show a summary per file
| File | Description |
|---|---|
| scratchpad/architecture.md | Updates the architecture diagram and package reference metadata/descriptions to reflect the latest generated view of dependencies. |
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: 5
| │ └──────────┬───────────────┘ └───────────┬─────────────┘ └──────────────────────────┘ │ | ||
| │ │ │ │ |
There was a problem hiding this comment.
The diagram implies pkg/parser is only reached via pkg/workflow (pkg/cli → pkg/workflow → pkg/parser), but pkg/cli directly imports pkg/parser in many files (e.g., pkg/cli/commands.go). Consider adding a direct pkg/cli → pkg/parser edge (or otherwise adjusting the diagram) so direct dependencies are accurately represented.
| │ └──────────┬───────────────┘ └───────────┬─────────────┘ └──────────────────────────┘ │ | |
| │ │ │ │ | |
| │ └──────────┬───────────────┘ └───────────┬─────────────┘ └────────────▲─────────────┘ │ | |
| │ │ │ │ │ | |
| │ └────────────────────────────────────────────────────────────────▶│ │ |
| │ ┌──────────▼──────────────┐ ┌────────────▼────────────┐ │ | ||
| │ │ pkg/agentdrain │ │ pkg/actionpins │ │ | ||
| │ │ Agent log drain/cluster│ │ Action pin resolution │ │ | ||
| │ └─────────────────────────┘ └─────────────────────────┘ │ | ||
| │ │ │ │ | ||
| │ └──────────────────┬─────────────┘ │ | ||
| │ ▼ │ | ||
| │ ┌──────────────────────────────────────────────┐ │ | ||
| │ │ pkg/console │ │ | ||
| │ │ Terminal UI & message formatting │ │ | ||
| │ └──────────────────────────────────────────────┘ │ |
There was a problem hiding this comment.
This merged connector suggests pkg/agentdrain depends on pkg/console, but pkg/agentdrain does not import pkg/console (while pkg/actionpins does). Update the arrows/layout so the diagram doesn’t imply an agentdrain → console dependency that doesn’t exist.
| | pkg/stats | Core | Numerical statistics and metrics collection | | ||
| | pkg/cli | Core | Command implementations for all gh-aw CLI commands | | ||
| | pkg/workflow | Core | Workflow compilation engine (markdown → GitHub Actions YAML) | | ||
| | pkg/parser | Core | Markdown frontmatter parsing and content extraction | |
There was a problem hiding this comment.
pkg/parser is described as only doing “Markdown frontmatter parsing and content extraction”, but the package also performs YAML parsing/validation (e.g., uses goccy/go-yaml and has YAML import helpers). Consider expanding this description to reflect the YAML-related responsibilities as well.
| | pkg/parser | Core | Markdown frontmatter parsing and content extraction | | |
| | pkg/parser | Core | Markdown frontmatter parsing, content extraction, and YAML parsing/validation helpers | |
| | pkg/console | Core | Terminal UI rendering and message formatting | | ||
| | pkg/agentdrain | Core | Agent log drain and cluster template detection | | ||
| | pkg/actionpins | Core | GitHub Actions version pin resolution | | ||
| | pkg/logger | Utility | Namespace-based debug logging with zero overhead | |
There was a problem hiding this comment.
The table claims pkg/logger has “zero overhead”, but constructing a logger and calling Print/Printf still incurs some overhead even when disabled (early return avoids formatting/output, but not the call itself). Consider rewording to something like “minimal overhead when disabled” or restoring the previous phrasing to avoid overstating the guarantee.
| | pkg/logger | Utility | Namespace-based debug logging with zero overhead | | |
| | pkg/logger | Utility | Namespace-based debug logging with minimal overhead when disabled | |
| | pkg/stats | Utility | Numerical statistics utilities for metric collection | | ||
| | pkg/fileutil | Utility | File path and file operation utilities | | ||
| | pkg/gitutil | Utility | Git repository utility functions | | ||
| | pkg/gitutil | Utility | Git and GitHub API utility functions | |
There was a problem hiding this comment.
pkg/gitutil is described as “Git and GitHub API utility functions”, but the package appears to focus on git CLI helpers plus GitHub-related string/error parsing (no GitHub API client calls). Consider rewording to “Git and GitHub-related utilities” (or similar) to avoid implying it wraps the GitHub API.
| | pkg/gitutil | Utility | Git and GitHub API utility functions | | |
| | pkg/gitutil | Utility | Git and GitHub-related utility functions | |
Updates
scratchpad/architecture.mdwith a refreshed ASCII architecture diagram generated from a full rebuild against commitf7e3992.Changes
pkg/actionpinsto show its direct dependency frompkg/workflowpkg/statsas a utility package (consumed bypkg/cli, not a standalone core service)Related
Full diagram details in the architecture issue created alongside this PR.