[architecture] Update architecture diagram - 2026-04-21#27521
Conversation
Full rebuild from scratch at commit 03a893d. Updated agentdrain description to accurately reflect Drain log-based anomaly detection, and refined layout with cleaner dependency arrows. Added pkg/semverutil to shared section and reorganized package groups. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the repository’s architecture documentation to reflect the latest package dependency diagram generated from a full rebuild.
Changes:
- Refreshed the “Last updated” header and run reference.
- Updated the ASCII architecture diagram layout and package annotations (including
pkg/agentdrain,pkg/semverutil, andpkg/testutil). - Reordered/adjusted entries in the package reference table to match the new diagram.
Show a summary per file
| File | Description |
|---|---|
scratchpad/architecture.md |
Updates the architecture diagram, shared/utility package callouts, and the package reference table. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
scratchpad/architecture.md:58
pkg/semverutilis labeled as a Utility package here, but the diagram above lists it under "also shared". To avoid conflicting classifications within the same document, align the Layer value (e.g., change this row toSharedif that’s the intended categorization, or update the diagram callout accordingly).
| pkg/semverutil | Utility | Semantic versioning primitives |
- Files reviewed: 1/1 changed files
- Comments generated: 2
| │ │ terminal UI & │ │ Drain log anomaly │ │ action pin │ │ constants & │ │ | ||
| │ │ formatted output│ │ detection │ │ resolution │ │ type aliases │ │ | ||
| │ └─────────────────┘ └──────────────────────┘ └──────────────────────┘ └─────────────────┘ │ | ||
| │ also shared: pkg/stats · pkg/types · pkg/semverutil │ |
There was a problem hiding this comment.
In the diagram, pkg/semverutil is called out as "also shared" even though it’s already listed in the Utility Packages section below. This makes the diagram’s layering/legend ambiguous (is semverutil Shared or Utility?). Consider choosing one representation (e.g., move semverutil to the shared callout and remove it from the utility list, or keep it in utilities and drop it from the shared callout / reword the callout to clarify it’s a shared utility dependency).
This issue also appears on line 58 of the same file.
| │ also shared: pkg/stats · pkg/types · pkg/semverutil │ | |
| │ also shared: pkg/stats · pkg/types │ |
| │ │ | ||
| │ ┌──────────┐ ┌─────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ | ||
| │ │ typeutil │ │ envutil │ │ semverutil│ │stringutil│ │ timeutil │ │ testutil │ │ | ||
| │ │ typeutil │ │ envutil │ │ semverutil│ │stringutil│ │ timeutil │ │ testutil*│ │ |
There was a problem hiding this comment.
The utility package row has inconsistent padding (semverutil and stringutil don’t have the same surrounding spaces as the other boxes), which makes the ASCII grid look slightly misaligned. Consider normalizing spacing (e.g., │ semverutil │ and │ stringutil │) to keep column widths consistent.
| │ │ typeutil │ │ envutil │ │ semverutil│ │stringutil│ │ timeutil │ │ testutil*│ │ | |
| │ │ typeutil │ │ envutil │ │ semverutil │ │ stringutil │ │ timeutil │ │ testutil*│ │ |
Updates
scratchpad/architecture.mdwith the latest architecture diagram generated from a full rebuild (no prior cache).Changes
pkg/agentdraindescription to accurately reflect its role: Drain log-based anomaly detection for agentic pipeline runs (not just "log streaming")pkg/semverutilto shared sectionDiagram coverage
All 23 packages analyzed across 3 layers:
cmd/gh-aw,cmd/gh-aw-wasmReferences: §24714109908