Skip to content

[plan] Document import path resolution: repo-root-relative, .github/agents/, and cross-repo imports #24500

@github-actions

Description

@github-actions

Objective

Update the gh-aw documentation to clearly explain import path resolution rules, covering repo-root-relative paths, .github/agents/ imports, cross-repo imports, and the existing relative-to---dir default.

Context

Issue #23900 revealed that users don't know .github/agents/ imports fail, that the .github/-prefix syntax exists (after the fix), or that cross-repo imports are already supported via owner/repo/path@ref workflowspec syntax.

Changes Required

1. Imports Reference Doc

Update or create docs/src/content/docs/reference/imports.md (or the equivalent imports reference page) to document:

  • Relative paths (default): imports: [agents/my-agent.md] → resolved relative to --dir (default .github/workflows/). Backward-compatible, existing behaviour.
  • Repo-root-relative paths (new): imports: [.github/agents/my-agent.md] → paths starting with .github/ or / are resolved from the repository root. Enables the documented .github/agents/ convention.
  • Cross-repo imports (existing, underdocumented): imports: [owner/repo/path/to/agent.md@v1.0.0] → fetched from GitHub at compile time, inlined into the lock file. Supports tags, branches, and SHAs for pinning.

Include a worked example showing all three forms in a single frontmatter block, a note about backward compatibility, and security constraints (paths must remain within .github/).

2. Update Workflow Frontmatter Schema / JSON Schema Comments

In pkg/parser/schemas/ (the frontmatter JSON schema), update the imports field description to mention repo-root-relative support.

3. Update AGENTS.md / DEVGUIDE.md if They Reference Import Paths

Search for existing references to import paths in AGENTS.md and DEVGUIDE.md and update any statements that say imports only work relative to .github/workflows/.

Files to Modify

  • docs/src/content/docs/reference/imports.md (or equivalent) — primary doc update
  • Relevant JSON schema file in pkg/parser/schemas/ — update imports field description
  • AGENTS.md or DEVGUIDE.md if they contain outdated statements about import paths

Acceptance Criteria

Generated by Plan Command for issue #23900 · ● 1.4M ·

  • expires on Apr 6, 2026, 2:14 PM UTC

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions