11# Architecture Diagram
22
3- > Last updated: 2026-03-31 · Source: [ Run §23789178746 ] ( https://github.com/github/gh-aw/actions/runs/23789178746 )
3+ > Last updated: 2026-04-03 · Source: [ Issue #aw_arch01 ] ( https://github.com/github/gh-aw/issues )
44
55## Overview
66
77This diagram shows the package structure and dependencies of the ` gh-aw ` codebase.
88
99```
10- ┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
11- │ ENTRY POINTS │
12- │ ┌──────────────────────────────────────────┐ ┌─────────────────────────────────────────┐ │
13- │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │
14- │ │ GitHub CLI extension binary │ │ WebAssembly target │ │
15- │ └──────┬──────────────────────┬────────────┘ └──────────────────┬──────────────────────┘ │
16- │ │ │ │ │
17- ├─────────┼──────────────────────┼────────────────────────────────────┼────────────────────────────┤
18- │ │ CORE PACKAGES │ │ │
19- │ ▼ ▼ ▼ │
20- │ ┌──────────────┐ ┌──────────────────────┐ ┌──────────────────────┐ ┌────────────────┐ │
21- │ │ pkg/cli │──▶ │ pkg/workflow │──▶ │ pkg/parser │ │ pkg/console │ │
22- │ │ Command │ │ Workflow compilation │ │ Markdown/YAML │ ◀─│ Terminal UI │ │
23- │ │ impls │ │ engine │ │ parsing │ │ rendering │ │
24- │ └──────────────┘ └──────────────────────┘ └──────────────────────┘ └────────────────┘ │
25- │ │
26- │ ↕ all core packages also use constants, types, and utilities ↕ │
27- │ │
28- │ ┌────────────────────────────────────────────────────────────────────────────┐ │
29- │ │ pkg/constants · pkg/types (shared primitives, no dependencies) │ │
30- │ └────────────────────────────────────────────────────────────────────────────┘ │
31- ├─────────────────────────────────────────────────────────────────────────────────────────────────┤
32- │ UTILITIES │
33- │ ┌──────────┐ ┌─────────────┐ ┌────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
34- │ │pkg/logger│ │pkg/stringutil│ │pkg/fileutil│ │pkg/gitutil│ │pkg/styles│ │ pkg/tty │ │
35- │ └──────────┘ └─────────────┘ └────────────┘ └──────────┘ └──────────┘ └──────────┘ │
36- │ ┌──────────┐ ┌─────────────┐ ┌────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
37- │ │pkg/envutil│ │pkg/repoutil │ │pkg/sliceutil│ │pkg/semver│ │pkg/timeutil│ │pkg/mathutil│ │
38- │ └──────────┘ └─────────────┘ └────────────┘ └──────────┘ └──────────┘ └──────────┘ │
39- │ ┌─────────────┐ │
40- │ │ pkg/testutil│ (test support only) │
41- │ └─────────────┘ │
42- └─────────────────────────────────────────────────────────────────────────────────────────────────┘
10+ ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
11+ │ ENTRY POINTS │
12+ │ ┌────────────────────────────┐ ┌────────────────────────┐ ┌────────────────────────────────┐ │
13+ │ │ cmd/gh-aw │ │ cmd/gh-aw-wasm │ │ internal/tools/ (×2) │ │
14+ │ │ GitHub CLI extension bin │ │ WebAssembly target │ │ actions-build, gen-metadata │ │
15+ │ └────────────┬───────────────┘ └────────────┬───────────┘ └──────────────┬─────────────────┘ │
16+ │ │ │ │ │
17+ ├───────────────┼─────────────────────────────────┼──────────────────────────────┼───────────────────┤
18+ │ ▼ CORE PACKAGES ▼ ▼ │
19+ │ ┌──────────────────┐ ┌──────────────────────┐ ┌────────────────────┐ ┌───────────────────┐ │
20+ │ │ pkg/cli │──▶│ pkg/workflow │──▶│ pkg/parser │ │ pkg/console │ │
21+ │ │ Command impls │ │ Workflow compilation │ │ MD/YAML parsing │◀──│ Terminal UI │ │
22+ │ └──────────────────┘ └──────────────────────┘ └────────────────────┘ └───────────────────┘ │
23+ │ │
24+ │ ┌──────────────────────────────────────────────────────────────────────────────┐ │
25+ │ │ pkg/constants · pkg/types (shared primitives, no deps) │ │
26+ │ └──────────────────────────────────────────────────────────────────────────────┘ │
27+ ├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
28+ │ UTILITIES │
29+ │ ┌──────────┐ ┌──────────────┐ ┌────────────┐ ┌───────────┐ ┌──────────┐ ┌──────────┐ │
30+ │ │pkg/logger│ │pkg/stringutil│ │pkg/fileutil│ │pkg/gitutil│ │pkg/styles│ │ pkg/tty │ │
31+ │ └──────────┘ └──────────────┘ └────────────┘ └───────────┘ └──────────┘ └──────────┘ │
32+ │ ┌───────────┐ ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ ┌────────────┐ │
33+ │ │pkg/envutil│ │pkg/repoutil │ │pkg/sliceutil│ │pkg/semverutil│ │pkg/timeutil│ │pkg/mathutil│ │
34+ │ └───────────┘ └─────────────┘ └─────────────┘ └──────────────┘ └────────────┘ └────────────┘ │
35+ │ ┌──────────────┐ │
36+ │ │ pkg/testutil │ (test support only) │
37+ │ └──────────────┘ │
38+ └─────────────────────────────────────────────────────────────────────────────────────────────────────┘
4339```
4440
4541## Package Reference
@@ -48,6 +44,8 @@ This diagram shows the package structure and dependencies of the `gh-aw` codebas
4844| ---------| -------| -------------|
4945| ` cmd/gh-aw ` | Entry | GitHub CLI extension binary |
5046| ` cmd/gh-aw-wasm ` | Entry | WebAssembly target |
47+ | ` internal/tools/actions-build ` | Internal | Build/validate custom GitHub Actions |
48+ | ` internal/tools/generate-action-metadata ` | Internal | Generate action.yml and README.md for JS modules |
5149| ` pkg/cli ` | Core | Command implementations (cobra commands) |
5250| ` pkg/workflow ` | Core | Workflow compilation engine (MD → GitHub Actions YAML) |
5351| ` pkg/parser ` | Core | Markdown frontmatter and YAML parsing |
0 commit comments