Skip to content

Commit c6f2a59

Browse files
committed
fix more docs
1 parent 2ff455d commit c6f2a59

File tree

2 files changed

+7
-147
lines changed

2 files changed

+7
-147
lines changed

docs/src/content/docs/guides/packaging-imports.md

Lines changed: 6 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The compiler uses a **breadth-first search (BFS)** algorithm to process imports:
6161

6262
**Processing order** follows BFS traversal:
6363

64-
```
64+
```text
6565
Main Workflow
6666
├── shared/tools.md (1st - direct import)
6767
│ └── shared/base.md (3rd - nested from tools.md)
@@ -117,84 +117,9 @@ safe-outputs:
117117
118118
See [Imports Reference](/gh-aw/reference/imports/) for complete merge semantics.
119119
120-
## Importing Agents from Repositories
121-
122-
Agent files provide specialized AI instructions and behavior. You can import agents from external repositories to reuse expert-crafted prompts and configurations across teams and projects.
123-
124-
### Creating a Shareable Agent
125-
126-
Store agent files in `.github/agents/` of any repository:
127-
128-
```markdown title="acme-org/ai-agents/.github/agents/code-reviewer.md"
129-
---
130-
name: Expert Code Reviewer
131-
description: Specialized agent for comprehensive code review with security focus
132-
tools:
133-
github:
134-
toolsets: [pull_requests, repos]
135-
---
136-
137-
# Code Review Instructions
138-
139-
You are an expert code reviewer with deep knowledge of:
140-
- Security best practices and OWASP guidelines
141-
- Performance optimization patterns
142-
- Code maintainability and readability
143-
- Testing strategies and coverage
144-
145-
When reviewing code:
146-
1. Identify security vulnerabilities first
147-
2. Check for performance issues
148-
3. Ensure code follows team conventions
149-
4. Suggest specific improvements with examples
150-
```
151-
152-
### Importing Remote Agents
120+
## Importing Agent Files
153121
154-
Reference the agent using `owner/repo/path@version` format:
155-
156-
```yaml wrap
157-
---
158-
on: pull_request
159-
engine: copilot
160-
imports:
161-
- acme-org/ai-agents/.github/agents/[email protected]
162-
permissions:
163-
contents: read
164-
pull-requests: write
165-
---
166-
167-
# PR Review Workflow
168-
The code reviewer agent will analyze this pull request and provide detailed feedback.
169-
```
170-
171-
### Agent Versioning
172-
173-
Use semantic versioning for production stability:
174-
175-
```yaml wrap
176-
imports:
177-
- acme-org/ai-agents/.github/agents/[email protected] # Production
178-
- acme-org/ai-agents/.github/agents/performance.md@main # Latest
179-
- acme-org/ai-agents/.github/agents/custom.md@abc123def # Immutable
180-
```
181-
182-
### Agent Collections
183-
184-
Organizations can maintain libraries of specialized agents:
185-
186-
```
187-
acme-org/ai-agents/
188-
└── .github/
189-
└── agents/
190-
├── code-reviewer.md # General code review
191-
├── security-auditor.md # Security-focused analysis
192-
├── performance-analyst.md # Performance optimization
193-
├── accessibility-checker.md # WCAG compliance
194-
└── documentation-writer.md # Technical documentation
195-
```
196-
197-
Teams import agents based on workflow needs, with all agents benefiting from centralized updates and versioning.
122+
Agent files provide specialized AI instructions and behavior. See [Importing Copilot Custom Agent Files](/gh-aw/reference/copilot-custom-agents/) for details on creating and importing agent files from external repositories.
198123
199124
## Example: Modular Workflow with Imports
200125
@@ -235,62 +160,6 @@ Perform web research using Tavily and respond to issues.
235160

236161
**Result**: The compiled workflow includes both the Tavily MCP server from the import and the GitHub tools from the main workflow, with network permissions automatically merged to allow access to both `mcp.tavily.com` and GitHub API endpoints.
237162

238-
## Real-World Scenario: Team-Wide Configuration
239-
240-
A development team can create a shared configuration repository with reusable components:
241-
242-
```
243-
acme-org/workflow-library/
244-
├── .github/
245-
│ └── agents/
246-
│ ├── code-reviewer.md # Specialized code review agent
247-
│ ├── security-auditor.md # Security-focused agent
248-
│ └── performance-analyst.md # Performance optimization agent
249-
├── shared/
250-
│ ├── tools/
251-
│ │ ├── github-standard.md # Standard GitHub API toolsets
252-
│ │ └── code-analysis.md # Code quality tools
253-
│ ├── mcp/
254-
│ │ ├── tavily.md # Web search
255-
│ │ └── database.md # Database access
256-
│ └── config/
257-
│ ├── security-policies.md # Security constraints
258-
│ └── notification-setup.md # Notification settings
259-
└── workflows/
260-
├── issue-triage.md
261-
├── pr-review.md
262-
└── release-automation.md
263-
```
264-
265-
Individual workflows import required components and agents:
266-
267-
```yaml wrap
268-
---
269-
on: pull_request
270-
engine: copilot
271-
imports:
272-
- acme-org/workflow-library/.github/agents/[email protected]
273-
- acme-org/workflow-library/shared/tools/[email protected]
274-
- acme-org/workflow-library/shared/tools/[email protected]
275-
- acme-org/workflow-library/shared/config/[email protected]
276-
safe-outputs:
277-
create-pull-request-review-comment:
278-
max: 10
279-
---
280-
281-
# Code Review Agent
282-
Automated code review with security policy enforcement using shared agent.
283-
```
284-
285-
**Benefits**:
286-
287-
- **Consistency**: All workflows use same tool configurations and agent behavior
288-
- **Maintainability**: Update imports once, affects all workflows
289-
- **Versioning**: Pin to stable versions with semantic tags
290-
- **Modularity**: Mix and match components and agents as needed
291-
- **Governance**: Security policies and review standards enforced through imports
292-
- **Agent Sharing**: Reuse specialized agent instructions across teams and repositories
293-
294163
## Specification Formats and Validation
295164

296165
Workflow and import specifications require minimum 3 parts (owner/repo/path) for remote imports. Explicit paths must end with `.md`. Versions can be semantic tags (`@v1.0.0`), branches (`@develop`), or commit SHAs. Identifiers use alphanumeric characters with hyphens/underscores (cannot start/end with hyphen).
@@ -300,20 +169,13 @@ Workflow and import specifications require minimum 3 parts (owner/repo/path) for
300169
- Repository: `owner/repo[@version]`
301170
- Short workflow: `owner/repo/workflow[@version]` (adds `workflows/` prefix and `.md`)
302171
- Explicit workflow: `owner/repo/path/to/workflow.md[@version]`
303-
- Agent import: `owner/repo/.github/agents/agent-name.md[@version]`
172+
- Agent file import: `owner/repo/.github/agents/agent-name.md[@version]`
304173
- Shared import: `owner/repo/shared/tools/config.md[@version]`
305174
- GitHub URL: `https://github.com/owner/repo/blob/main/workflows/ci-doctor.md`
306175
- Raw URL: `https://raw.githubusercontent.com/owner/repo/refs/heads/main/workflows/ci-doctor.md`
307176

308177
## Best Practices
309178

310-
Use semantic versioning for stable workflows and agents, branches for development, and commit SHAs for immutability. Organize reusable components in `shared/` directories and agent files in `.github/agents/` with descriptive names. Review updates with `--verbose` before applying, test on branches, and keep local modifications minimal to reduce merge conflicts.
311-
312-
When sharing agents across teams:
313-
314-
- Use semantic versioning for production agents (`@v1.0.0`)
315-
- Document agent capabilities and requirements in frontmatter
316-
- Test agent updates in non-production workflows first
317-
- Maintain backwards compatibility within major versions
179+
Use semantic versioning for stable workflows and agent files, branches for development, and commit SHAs for immutability. Organize reusable components in `shared/` directories and agent files in `.github/agents/` with descriptive names. Review updates with `--verbose` before applying, test on branches, and keep local modifications minimal to reduce merge conflicts.
318180

319-
**Related:** [CLI Commands](/gh-aw/setup/cli/) | [Workflow Structure](/gh-aw/reference/workflow-structure/) | [Frontmatter](/gh-aw/reference/frontmatter/) | [Imports](/gh-aw/reference/imports/) | [Custom Agents](/gh-aw/reference/copilot-custom-agents/)
181+
**Related:** [CLI Commands](/gh-aw/setup/cli/) | [Workflow Structure](/gh-aw/reference/workflow-structure/) | [Frontmatter](/gh-aw/reference/frontmatter/) | [Imports](/gh-aw/reference/imports/) | [Custom Agent Files](/gh-aw/reference/copilot-custom-agents/)

docs/src/content/docs/reference/frontmatter.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ tools:
2222

2323
## Frontmatter Elements
2424

25-
The frontmatter combines standard GitHub Actions properties (`on`, `permissions`, `run-name`, `runs-on`, `timeout-minutes`, `concurrency`, `env`, `environment`, `container`, `services`, `if`, `steps`, `cache`) with GitHub Agentic Workflows-specific elements (`description`, `source`, `imports`, `engine`, `strict`, `roles`, `features`, `plugins`, `runtimes`, `safe-inputs`, `safe-outputs`, `network`, `tools`).
26-
27-
Tool configurations (such as `bash`, `edit`, `github`, `web-fetch`, `web-search`, `playwright`, `cache-memory`, and custom [Model Context Protocol](/gh-aw/reference/glossary/#mcp-model-context-protocol) (MCP) [servers](/gh-aw/reference/glossary/#mcp-server)) are specified under the `tools:` key. Custom inline tools can be defined with the [`safe-inputs:`](/gh-aw/reference/safe-inputs/) (custom tools defined inline) key. See [Tools](/gh-aw/reference/tools/) and [Safe Inputs](/gh-aw/reference/safe-inputs/) for complete documentation.
25+
Below is a comprehensive reference to all available frontmatter fields for GitHub Agentic Workflows.
2826

2927
### Trigger Events (`on:`)
3028

0 commit comments

Comments
 (0)