From aa755918c5c0792583cda7f33bb29f3532111092 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 09:07:57 +0000 Subject: [PATCH] docs: update architecture diagram - add internal/tools/ (2026-04-03) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- scratchpad/architecture.md | 66 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/scratchpad/architecture.md b/scratchpad/architecture.md index 87d828398c5..d7e69aa900d 100644 --- a/scratchpad/architecture.md +++ b/scratchpad/architecture.md @@ -1,45 +1,41 @@ # Architecture Diagram -> Last updated: 2026-03-31 · Source: [Run §23789178746](https://github.com/github/gh-aw/actions/runs/23789178746) +> Last updated: 2026-04-03 · Source: [Issue #aw_arch01](https://github.com/github/gh-aw/issues) ## Overview This diagram shows the package structure and dependencies of the `gh-aw` codebase. ``` -┌─────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ ENTRY POINTS │ -│ ┌──────────────────────────────────────────┐ ┌─────────────────────────────────────────┐ │ -│ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ -│ │ GitHub CLI extension binary │ │ WebAssembly target │ │ -│ └──────┬──────────────────────┬────────────┘ └──────────────────┬──────────────────────┘ │ -│ │ │ │ │ -├─────────┼──────────────────────┼────────────────────────────────────┼────────────────────────────┤ -│ │ CORE PACKAGES │ │ │ -│ ▼ ▼ ▼ │ -│ ┌──────────────┐ ┌──────────────────────┐ ┌──────────────────────┐ ┌────────────────┐ │ -│ │ pkg/cli │──▶ │ pkg/workflow │──▶ │ pkg/parser │ │ pkg/console │ │ -│ │ Command │ │ Workflow compilation │ │ Markdown/YAML │ ◀─│ Terminal UI │ │ -│ │ impls │ │ engine │ │ parsing │ │ rendering │ │ -│ └──────────────┘ └──────────────────────┘ └──────────────────────┘ └────────────────┘ │ -│ │ -│ ↕ all core packages also use constants, types, and utilities ↕ │ -│ │ -│ ┌────────────────────────────────────────────────────────────────────────────┐ │ -│ │ pkg/constants · pkg/types (shared primitives, no dependencies) │ │ -│ └────────────────────────────────────────────────────────────────────────────┘ │ -├─────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ UTILITIES │ -│ ┌──────────┐ ┌─────────────┐ ┌────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ -│ │pkg/logger│ │pkg/stringutil│ │pkg/fileutil│ │pkg/gitutil│ │pkg/styles│ │ pkg/tty │ │ -│ └──────────┘ └─────────────┘ └────────────┘ └──────────┘ └──────────┘ └──────────┘ │ -│ ┌──────────┐ ┌─────────────┐ ┌────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ -│ │pkg/envutil│ │pkg/repoutil │ │pkg/sliceutil│ │pkg/semver│ │pkg/timeutil│ │pkg/mathutil│ │ -│ └──────────┘ └─────────────┘ └────────────┘ └──────────┘ └──────────┘ └──────────┘ │ -│ ┌─────────────┐ │ -│ │ pkg/testutil│ (test support only) │ -│ └─────────────┘ │ -└─────────────────────────────────────────────────────────────────────────────────────────────────┘ +┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ ENTRY POINTS │ +│ ┌────────────────────────────┐ ┌────────────────────────┐ ┌────────────────────────────────┐ │ +│ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ internal/tools/ (×2) │ │ +│ │ GitHub CLI extension bin │ │ WebAssembly target │ │ actions-build, gen-metadata │ │ +│ └────────────┬───────────────┘ └────────────┬───────────┘ └──────────────┬─────────────────┘ │ +│ │ │ │ │ +├───────────────┼─────────────────────────────────┼──────────────────────────────┼───────────────────┤ +│ ▼ CORE PACKAGES ▼ ▼ │ +│ ┌──────────────────┐ ┌──────────────────────┐ ┌────────────────────┐ ┌───────────────────┐ │ +│ │ pkg/cli │──▶│ pkg/workflow │──▶│ pkg/parser │ │ pkg/console │ │ +│ │ Command impls │ │ Workflow compilation │ │ MD/YAML parsing │◀──│ Terminal UI │ │ +│ └──────────────────┘ └──────────────────────┘ └────────────────────┘ └───────────────────┘ │ +│ │ +│ ┌──────────────────────────────────────────────────────────────────────────────┐ │ +│ │ pkg/constants · pkg/types (shared primitives, no deps) │ │ +│ └──────────────────────────────────────────────────────────────────────────────┘ │ +├─────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ UTILITIES │ +│ ┌──────────┐ ┌──────────────┐ ┌────────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ │ +│ │pkg/logger│ │pkg/stringutil│ │pkg/fileutil│ │pkg/gitutil│ │pkg/styles│ │ pkg/tty │ │ +│ └──────────┘ └──────────────┘ └────────────┘ └───────────┘ └──────────┘ └──────────┘ │ +│ ┌───────────┐ ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ ┌────────────┐ │ +│ │pkg/envutil│ │pkg/repoutil │ │pkg/sliceutil│ │pkg/semverutil│ │pkg/timeutil│ │pkg/mathutil│ │ +│ └───────────┘ └─────────────┘ └─────────────┘ └──────────────┘ └────────────┘ └────────────┘ │ +│ ┌──────────────┐ │ +│ │ pkg/testutil │ (test support only) │ +│ └──────────────┘ │ +└─────────────────────────────────────────────────────────────────────────────────────────────────────┘ ``` ## Package Reference @@ -48,6 +44,8 @@ This diagram shows the package structure and dependencies of the `gh-aw` codebas |---------|-------|-------------| | `cmd/gh-aw` | Entry | GitHub CLI extension binary | | `cmd/gh-aw-wasm` | Entry | WebAssembly target | +| `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 |