Skip to content

[architecture] Update architecture diagram - 2026-04-18#27001

Merged
pelikhan merged 1 commit intomainfrom
architecture/diagram-2026-04-18-5295c247c3428eae
Apr 18, 2026
Merged

[architecture] Update architecture diagram - 2026-04-18#27001
pelikhan merged 1 commit intomainfrom
architecture/diagram-2026-04-18-5295c247c3428eae

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Updates scratchpad/architecture.md with a fresh full-rebuild architecture diagram generated on 2026-04-18.

What changed

  • Full rebuild from scratch (no prior cache existed)
  • Analyzed all 24 packages across cmd/ and pkg/
  • Mapped real internal import relationships using grep on Go source files
  • Corrected diagram to reflect actual dependencies (vs. previous diagram which had internal/tools references that no longer exist)
  • New packages reflected: pkg/agentdrain, pkg/stats, pkg/actionpins correctly placed in core layer
  • Removed obsolete internal/tools references from package table

Key dependency flows captured

  • cmd/gh-aw → cli, console, constants, parser, workflow
  • cmd/gh-aw-wasm → parser, workflow
  • pkg/cli → workflow, parser, console, agentdrain, stats (+ all utilities)
  • pkg/workflow → parser, console, actionpins (+ utilities)
  • pkg/parser → console (+ utilities)
  • pkg/console → logger, styles, tty

References: §24601274706

Generated by Architecture Diagram Generator · ● 2M ·

  • expires on Apr 25, 2026, 9:10 AM UTC

Full rebuild from scratch - analyzed all 24 packages across cmd/ and pkg/,
mapping real internal import relationships.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added architecture diagram documentation Improvements or additions to documentation labels Apr 18, 2026
@pelikhan pelikhan marked this pull request as ready for review April 18, 2026 09:32
Copilot AI review requested due to automatic review settings April 18, 2026 09:32
@pelikhan pelikhan merged commit 82cf6ba into main Apr 18, 2026
3 checks passed
@pelikhan pelikhan deleted the architecture/diagram-2026-04-18-5295c247c3428eae branch April 18, 2026 09:32
@github-actions github-actions Bot mentioned this pull request Apr 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates scratchpad/architecture.md with a regenerated architecture diagram and refreshed package reference based on current Go import relationships.

Changes:

  • Refreshes the ASCII architecture diagram (entry points, core packages, utilities) and removes obsolete internal/tools references.
  • Updates the “Last updated” metadata to point to the generating workflow run.
  • Revises the package reference table (layers and descriptions), including newly reflected packages like pkg/stats.
Show a summary per file
File Description
scratchpad/architecture.md Regenerates the architecture diagram and updates the package reference table to reflect current imports/dependencies.

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:78

  • In the package reference table, pkg/stats is labeled as Core, but the package is a standalone statistics helper (standard-library-only, documented as a utility in pkg/stats/statvar.go/pkg/stats/README.md). Consider changing its layer back to Utility to keep the table consistent with the actual role of the package.
| pkg/stats | Core | Numerical statistics and metrics collection |
  • Files reviewed: 1/1 changed files
  • Comments generated: 4

│ ┌──────────────────────────────────────────┐ ┌────────────────────────────────────┐ │
│ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │
│ │ Main CLI binary │ │ WebAssembly target │ │
│ │ imports: cli,console,constants, │ │ imports: parser, workflow │ │
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the diagram’s cmd/gh-aw import list, the commas are missing spaces and the line wrap leaves a trailing comma (cli,console,constants,). This makes the “imports:” list harder to scan and looks like a typo; consider formatting it consistently as cli, console, constants, parser, workflow (either on one line or with a clean wrap without a dangling comma).

Suggested change
│ │ imports: cli,console,constants, │ │ imports: parser, workflow │ │
│ │ imports: cli, console, constants, │ │ imports: parser, workflow │ │

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +51
│ │ ┌──────────────────────────────────────────┐ │
│ └─▶│ pkg/stats │ │
│ │ Numerical statistics and metrics │ │
│ └──────────────────────────────────────────┘ │
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/stats is shown as a CORE package in the diagram, but the package itself is described as a general-purpose statistics utility (see pkg/stats/statvar.go package comment). To avoid misrepresenting layering, consider placing pkg/stats in the UTILITY PACKAGES section (and adjusting arrows/placement accordingly).

This issue also appears on line 78 of the same file.

Copilot uses AI. Check for mistakes.
│ │ stringutil │ │ sliceutil│ │ typeutil │ │ semverutil │ │ tty │ │ styles │ │
│ └────────────┘ └──────────┘ └──────────┘ └────────────┘ └───────┘ └────────┘ │
│ ┌──────────┐ ┌──────────┐ │
│ │ timeutil │ │ testutil │ (consumed by all core packages above) │
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note (consumed by all core packages above) in the UTILITY PACKAGES section is inaccurate: at least pkg/testutil is only imported from _test.go files (per pkg/testutil/README.md and repo-wide imports). Consider rephrasing this note to avoid implying production dependencies, or exclude test-only packages from the “consumed by” statement.

Suggested change
│ │ timeutil │ │ testutil │ (consumed by all core packages above)
│ │ timeutil │ │ testutil │ (shared utilities used across core packages; includes test-only helpers)

Copilot uses AI. Check for mistakes.
| pkg/tty | Utility | TTY (terminal) detection utilities |
| pkg/styles | Utility | Terminal style definitions (no-op for WASM builds) |
| pkg/timeutil | Utility | Time formatting and duration utilities |
| pkg/testutil | Utility | Shared test helper utilities |
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/testutil is described as “Shared test helper utilities”, but the package is explicitly test-only (imported from _test.go files per pkg/testutil/README.md). Consider updating the description to make the test-only constraint explicit (e.g., “test-only helpers” / “imported only by tests”).

Suggested change
| pkg/testutil | Utility | Shared test helper utilities |
| pkg/testutil | Utility | Test-only helper utilities imported only by `_test.go` files |

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture diagram documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants