Repository navigation
Add repository-root aw.yml package resolution to gh aw add
#32117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
d2e413d
Initial plan
Copilot 9c608b5
Add aw manifest package resolution
Copilot 0c37327
Fix aw manifest review follow-up
Copilot 47cab9e
Polish aw manifest validation messages
Copilot bba9787
Add aw manifest schema and compile validation
Copilot eca2c37
Polish aw manifest schema follow-up
Copilot 00b84e7
Refine aw manifest validation messages
Copilot 1d45909
Address aw manifest review follow-up
Copilot 8a24a70
Support aw manifests in add-wizard
Copilot 8f85b10
Clarify add-wizard manifest package support
Copilot 24f0ceb
Clarify add-wizard manifest help text
Copilot a2f8265
Polish add-wizard manifest tests
Copilot cfd9628
Tighten add-wizard manifest coverage
Copilot 3b05795
Polish add-wizard manifest errors
Copilot 5cfc6c1
Remove legacy repository manifest aliases
Copilot 2d30d7d
Tighten legacy manifest alias coverage
Copilot b7c1a57
Clarify ignored legacy manifest behavior
Copilot 989da58
Rename legacy manifest regression tests
Copilot 69264c8
Refine aw manifest versioning and README validation
Copilot 3af9726
Polish aw manifest validation cleanup
Copilot 0be8b6e
Clarify aw manifest validation tests
Copilot a8704ec
Simplify repository package workflow resolution
Copilot b6788cd
Polish repository package cleanup
Copilot a27c1a5
Fix manifest package review regressions
Copilot 0f7a5c3
Fix remaining manifest bot review feedback
Copilot b8070f4
Polish manifest review follow-up
Copilot c35e4fa
Log default branch fallback for manifests
Copilot 6d18952
Polish manifest package error handling
Copilot ef22529
Tidy manifest package polish
Copilot 529cb09
Simplify manifest branch resolution helper
Copilot 9c6a815
fix: address Go lint follow-ups
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
187 changes: 187 additions & 0 deletions
187
docs/src/content/docs/reference/repository-package-manifest-specification.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| --- | ||
| title: aw.yml repository package manifest specification | ||
| description: Normative specification for the aw.yml repository package manifest format. | ||
| sidebar: | ||
| order: 321 | ||
| --- | ||
|
|
||
| # aw.yml Repository Package Manifest Specification | ||
|
|
||
| **Version**: 0.1.0 | ||
| **Status**: Draft | ||
|
|
||
| ## Abstract | ||
|
|
||
| This specification defines the `aw.yml` repository package manifest format used by `gh aw` to identify, validate, and install repository packages. | ||
|
|
||
| ## 1. Introduction | ||
|
|
||
| The `aw.yml` manifest describes an installable Agentic Workflow package located either at a repository root or within a nested package folder. | ||
|
|
||
| Package references use one of these forms: | ||
|
|
||
| - `owner/repo` | ||
| - `owner/repo/path/to/package` | ||
|
|
||
| The package root is the directory containing `aw.yml`. | ||
|
|
||
| ## 2. Conformance | ||
|
|
||
| The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are to be interpreted as described in RFC 2119. | ||
|
|
||
| ## 3. Manifest location and naming | ||
|
|
||
| The canonical manifest filename is `aw.yml`. | ||
|
|
||
| ## 4. Manifest format | ||
|
|
||
| The manifest document MUST be a YAML mapping. Unknown top-level fields MUST be rejected. | ||
|
|
||
| ### 4.1 Fields | ||
|
|
||
| | Field | Type | Required | Meaning | | ||
| | --- | --- | --- | --- | | ||
| | `manifest-version` | string | No | Manifest format version. Defaults to `"1"`. | | ||
| | `min-version` | string | No | Minimum supported `gh-aw` version. | | ||
| | `name` | string | Yes | Human-readable package name. | | ||
| | `description` | string | No | Human-readable package description. | | ||
| | `files` | array of strings | No | Explicit installable workflow file list. | | ||
|
|
||
| ### 4.2 `manifest-version` | ||
|
|
||
| If omitted, `manifest-version` defaults to `"1"`. | ||
|
|
||
| For this version of the format, the only valid value is `"1"`. | ||
|
|
||
| ### 4.3 `min-version` | ||
|
|
||
| If present, `min-version` MUST use the exact `vMAJOR.minor.patch` form, such as: | ||
|
|
||
| - `v1.2.3` | ||
|
|
||
| If the running compiler version is lower than `min-version`, validation MUST fail. | ||
|
|
||
| ### 4.4 `name` | ||
|
|
||
| `name` MUST be present and MUST be a non-empty string after trimming surrounding whitespace. | ||
|
|
||
| ### 4.5 `description` | ||
|
|
||
| If present, `description` MUST be a string. | ||
|
|
||
| Implementations SHOULD warn if `description` exceeds 255 characters. | ||
|
|
||
| ### 4.6 `files` | ||
|
|
||
| If present, `files` MUST be an array of strings. | ||
|
|
||
| Each entry: | ||
|
|
||
| - MUST be resolved relative to the package root; | ||
| - MUST end in `.md`; and | ||
| - MUST begin with either `workflows/` or `.github/workflows/`. | ||
|
|
||
| Duplicate entries SHOULD be ignored after normalization. | ||
|
|
||
| ## 5. Installable file resolution | ||
|
|
||
| Supported installable paths are: | ||
|
|
||
| - `workflows/<name>.md` | ||
| - `.github/workflows/<name>.md` | ||
|
|
||
| Nested descendants under those directories are also valid when referenced explicitly in `files`. | ||
|
|
||
| If `files` is present, valid entries are used as the installable workflow set. Invalid entries MUST be ignored with a warning. | ||
|
|
||
| If `files` is omitted, or if no valid entries remain after filtering, the implementation MUST attempt discovery under: | ||
|
|
||
| - `workflows/` | ||
| - `.github/workflows/` | ||
|
|
||
| If no installable workflow markdown files are resolved, package validation MUST fail. | ||
|
|
||
| ## 6. Documentation | ||
|
|
||
| Package documentation is `README.md` in the package root. | ||
|
|
||
| Examples: | ||
|
|
||
| - Repository-root package: `README.md` | ||
| - Nested package: `path/to/package/README.md` | ||
|
|
||
| If `README.md` is absent, package validation MUST fail. | ||
|
|
||
| ## 7. Validation and errors | ||
|
|
||
| Validation MUST fail for at least the following conditions: | ||
|
|
||
| - manifest file not found at the resolved package root; | ||
| - malformed YAML; | ||
| - top-level document is not a mapping; | ||
| - missing or empty `name`; | ||
| - unsupported `manifest-version`; | ||
| - invalid `min-version`; | ||
| - current compiler version is lower than `min-version`; | ||
| - unknown top-level fields, including `docs`; or | ||
| - missing required `README.md`; or | ||
| - no installable workflow files resolved. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot fail if readme.md is missing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| Implementations SHOULD emit warnings for at least the following conditions: | ||
|
|
||
| - a `files` entry is ignored because it is not a supported installable path; or | ||
| - `description` exceeds 255 characters. | ||
|
|
||
| ## 8. Compile validation | ||
|
|
||
| When `gh aw compile` encounters a repository-root `aw.yml`, it validates that manifest before compiling workflows. | ||
|
|
||
| A conforming compiler: | ||
|
|
||
| - MUST parse and validate the manifest according to this specification; | ||
| - MUST fail compilation on manifest errors; | ||
| - SHOULD surface warnings as `manifest_warning`; and | ||
| - SHOULD surface errors as `manifest_error`. | ||
|
|
||
| If JSON output is requested, manifest validation failure still causes an overall compilation failure result. | ||
|
|
||
| ## 9. Examples | ||
|
|
||
| ### 9.1 Repository-root package | ||
|
|
||
| ```yaml | ||
| min-version: v0.38.0 | ||
| name: Repo Assist | ||
| description: Friendly repository automation for review and issue triage | ||
| files: | ||
| - workflows/review.md | ||
| - .github/workflows/nightly-review.md | ||
| ``` | ||
|
|
||
| ### 9.2 Nested package folder | ||
|
|
||
| Package reference: | ||
|
|
||
| ```text | ||
| owner/repo/packages/repo-assist | ||
| ``` | ||
|
|
||
| Manifest location: | ||
|
|
||
| ```text | ||
| packages/repo-assist/aw.yml | ||
| ``` | ||
|
|
||
| Manifest: | ||
|
|
||
| ```yaml | ||
| name: Repo Assist | ||
| files: | ||
| - workflows/review.md | ||
| ``` | ||
|
|
||
| Documentation file: | ||
|
|
||
| ```text | ||
| packages/repo-assist/README.md | ||
| ``` | ||
58 changes: 58 additions & 0 deletions
58
docs/src/content/docs/reference/repository-package-manifest.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| title: Repository package manifest | ||
| description: Reference for the aw.yml manifest used by gh aw add and gh aw compile. | ||
| sidebar: | ||
| order: 320 | ||
| --- | ||
|
|
||
| Use `aw.yml` to describe an installable workflow package for `gh aw add`. | ||
|
|
||
| - Repository root packages use `owner/repo` | ||
| - Nested packages use `owner/repo/path/to/package` | ||
| - `gh aw compile` validates a repository-root `aw.yml` before compiling workflows | ||
|
|
||
| For the normative file-format definition, see the [aw.yml repository package manifest specification](/gh-aw/reference/repository-package-manifest-specification/). | ||
|
|
||
| ## Example | ||
|
|
||
| ```yaml | ||
| min-version: v0.38.0 | ||
| name: Repo Assist | ||
| description: Friendly repository automation for review and issue triage | ||
| files: | ||
| - workflows/review.md | ||
| - .github/workflows/nightly-review.md | ||
| ``` | ||
|
|
||
| ## Quick reference | ||
|
|
||
| | Field | Type | Required | Notes | | ||
| | --- | --- | --- | --- | | ||
| | `manifest-version` | string | No | Current supported value: `"1"`. Defaults to `"1"` when omitted. | | ||
| | `min-version` | string | No | Minimum compatible `gh aw` version. Must use the exact `vMAJOR.minor.patch` form, such as `v0.38.0`. | | ||
| | `name` | string | Yes | Human-readable package name. Must be non-empty after trimming whitespace. | | ||
| | `description` | string | No | Optional package description. `gh aw add` warns when it exceeds 255 characters. | | ||
| | `files` | array of strings | No | Package-root-relative markdown files under `workflows/` or `.github/workflows/`. | | ||
|
|
||
| ## Documentation | ||
|
|
||
| Package documentation is `README.md` in the package root. | ||
|
|
||
| - Repository-root package docs: `README.md` | ||
| - Nested package docs: `path/to/package/README.md` | ||
|
|
||
| The manifest does not support a `docs` field. | ||
| Missing `README.md` causes package validation to fail. | ||
|
|
||
| ## Installable workflows | ||
|
|
||
| If `files` is present, valid entries are used as the install bundle. | ||
|
|
||
| If `files` is omitted or contains no valid installable paths, `gh aw add` scans: | ||
|
|
||
| - `workflows/` | ||
| - `.github/workflows/` | ||
|
|
||
| For nested packages, those paths are resolved relative to the package root. | ||
|
|
||
| The embedded JSON schema source of truth lives in `pkg/parser/schemas/aw_manifest_schema.json`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot vMAJOR.minor.patch is strictly supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 69264c8.
min-versionnow only accepts the exactvMAJOR.minor.patchform in the schema, parser validation, and docs.