[architecture] Update architecture diagram - 2026-04-04#24459
Conversation
Add pkg/agentdrain (Drain3 log template mining) to the architecture diagram. 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 to reflect the current package layout, including the newly introduced pkg/agentdrain core package.
Changes:
- Updates the “Last updated” metadata line for the diagram.
- Adds
pkg/agentdrainto the Core Packages layer in the ASCII diagram. - Updates the Package Reference table to include
pkg/agentdrainand tweaks package descriptions/formatting.
Show a summary per file
| File | Description |
|---|---|
| scratchpad/architecture.md | Refreshes the architecture diagram and package reference to include pkg/agentdrain and updated metadata. |
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: 2
| # Architecture Diagram | ||
|
|
||
| > Last updated: 2026-04-03 · Source: [Issue #aw_arch01](https://github.com/github/gh-aw/issues) | ||
| > Last updated: 2026-04-04 · Source: Issue (see PR for link) |
There was a problem hiding this comment.
The “Source” field is no longer a durable reference (“Issue (see PR for link)”). Since this doc is meant to be read outside the PR context, please link directly to the generating issue/run (e.g., Issue #24458 and/or the Actions run URL) so readers can trace how/when the diagram was produced.
| > Last updated: 2026-04-04 · Source: Issue (see PR for link) | |
| > Last updated: 2026-04-04 · Source: [Issue #<issue-number>](<issue-url>) · [Actions run #<run-id>](<run-url>) |
| | cmd/gh-aw | Entry | GitHub CLI extension binary entry point | | ||
| | cmd/gh-aw-wasm | Entry | WebAssembly target entry point | | ||
| | internal/tools/actions-build | Internal | Build/validate custom GitHub Actions | | ||
| | internal/tools/generate-action-metadata | Internal | Generate action.yml and README.md for JS modules | | ||
| | pkg/cli | Core | Command implementations (cobra commands) | | ||
| | pkg/workflow | Core | Workflow compilation engine (MD → GitHub Actions YAML) | | ||
| | pkg/parser | Core | Markdown frontmatter and YAML parsing | | ||
| | pkg/console | Core | Terminal UI rendering and formatting | | ||
| | pkg/agentdrain | Core | Drain3 log template mining and anomaly detection | | ||
| | pkg/constants | Shared | Shared constants and semantic type aliases | | ||
| | pkg/types | Shared | Shared type definitions across packages | | ||
| | pkg/logger | Utility | Namespace-based debug logging with zero overhead when disabled | | ||
| | pkg/stringutil | Utility | String manipulation utilities | | ||
| | pkg/fileutil | Utility | File path and file operation utilities | | ||
| | pkg/gitutil | Utility | Git repository utilities | | ||
| | pkg/styles | Utility | Centralized terminal color and style definitions | | ||
| | pkg/tty | Utility | TTY (terminal) detection utilities | | ||
| | pkg/envutil | Utility | Environment variable reading and validation | | ||
| | pkg/repoutil | Utility | GitHub repository slug and URL utilities | | ||
| | pkg/sliceutil | Utility | Generic slice utility functions | | ||
| | pkg/semverutil | Utility | Semantic versioning primitives | | ||
| | pkg/timeutil | Utility | Time formatting utilities | | ||
| | pkg/mathutil | Utility | Basic mathematical utility functions | | ||
| | pkg/testutil | Utility | Test support utilities (test-only) | |
There was a problem hiding this comment.
In the Package Reference table, package/path identifiers were changed from inline-code formatting to plain text. For consistency with other scratchpad docs (e.g., scratchpad/README.md:10–13,20–25), consider wrapping package paths like cmd/gh-aw and pkg/cli in backticks again to improve scanability and avoid Markdown auto-linking/formatting edge cases.
| | cmd/gh-aw | Entry | GitHub CLI extension binary entry point | | |
| | cmd/gh-aw-wasm | Entry | WebAssembly target entry point | | |
| | internal/tools/actions-build | Internal | Build/validate custom GitHub Actions | | |
| | internal/tools/generate-action-metadata | Internal | Generate action.yml and README.md for JS modules | | |
| | pkg/cli | Core | Command implementations (cobra commands) | | |
| | pkg/workflow | Core | Workflow compilation engine (MD → GitHub Actions YAML) | | |
| | pkg/parser | Core | Markdown frontmatter and YAML parsing | | |
| | pkg/console | Core | Terminal UI rendering and formatting | | |
| | pkg/agentdrain | Core | Drain3 log template mining and anomaly detection | | |
| | pkg/constants | Shared | Shared constants and semantic type aliases | | |
| | pkg/types | Shared | Shared type definitions across packages | | |
| | pkg/logger | Utility | Namespace-based debug logging with zero overhead when disabled | | |
| | pkg/stringutil | Utility | String manipulation utilities | | |
| | pkg/fileutil | Utility | File path and file operation utilities | | |
| | pkg/gitutil | Utility | Git repository utilities | | |
| | pkg/styles | Utility | Centralized terminal color and style definitions | | |
| | pkg/tty | Utility | TTY (terminal) detection utilities | | |
| | pkg/envutil | Utility | Environment variable reading and validation | | |
| | pkg/repoutil | Utility | GitHub repository slug and URL utilities | | |
| | pkg/sliceutil | Utility | Generic slice utility functions | | |
| | pkg/semverutil | Utility | Semantic versioning primitives | | |
| | pkg/timeutil | Utility | Time formatting utilities | | |
| | pkg/mathutil | Utility | Basic mathematical utility functions | | |
| | pkg/testutil | Utility | Test support utilities (test-only) | | |
| | `cmd/gh-aw` | Entry | GitHub CLI extension binary entry point | | |
| | `cmd/gh-aw-wasm` | Entry | WebAssembly target entry point | | |
| | `internal/tools/actions-build` | Internal | Build/validate custom GitHub Actions | | |
| | `internal/tools/generate-action-metadata` | Internal | Generate action.yml and README.md for JS modules | | |
| | `pkg/cli` | Core | Command implementations (cobra commands) | | |
| | `pkg/workflow` | Core | Workflow compilation engine (MD → GitHub Actions YAML) | | |
| | `pkg/parser` | Core | Markdown frontmatter and YAML parsing | | |
| | `pkg/console` | Core | Terminal UI rendering and formatting | | |
| | `pkg/agentdrain` | Core | Drain3 log template mining and anomaly detection | | |
| | `pkg/constants` | Shared | Shared constants and semantic type aliases | | |
| | `pkg/types` | Shared | Shared type definitions across packages | | |
| | `pkg/logger` | Utility | Namespace-based debug logging with zero overhead when disabled | | |
| | `pkg/stringutil` | Utility | String manipulation utilities | | |
| | `pkg/fileutil` | Utility | File path and file operation utilities | | |
| | `pkg/gitutil` | Utility | Git repository utilities | | |
| | `pkg/styles` | Utility | Centralized terminal color and style definitions | | |
| | `pkg/tty` | Utility | TTY (terminal) detection utilities | | |
| | `pkg/envutil` | Utility | Environment variable reading and validation | | |
| | `pkg/repoutil` | Utility | GitHub repository slug and URL utilities | | |
| | `pkg/sliceutil` | Utility | Generic slice utility functions | | |
| | `pkg/semverutil` | Utility | Semantic versioning primitives | | |
| | `pkg/timeutil` | Utility | Time formatting utilities | | |
| | `pkg/mathutil` | Utility | Basic mathematical utility functions | | |
| | `pkg/testutil` | Utility | Test support utilities (test-only) | |
Updates
scratchpad/architecture.mdwith the latest architecture diagram.What changed
Added
pkg/agentdrainto the Core Packages layer. This is a new Drain3-based log template mining package introduced since the last diagram update, imported bypkg/clifor agent log analysis and anomaly detection.Tracks issue #24458.
References: §23975620385