Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/unbloat-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ find docs/src/content/docs -path 'docs/src/content/docs/blog' -prune -o -name '*
**IMPORTANT**: Exclude these directories and files:
- `docs/src/content/docs/blog/` - Blog posts have a different writing style and purpose
- `frontmatter-full.md` - Automatically generated from the JSON schema by `scripts/generate-schema-docs.js` and should not be manually edited
- **Files with `disable-agentic-editing: true` in frontmatter** - These files are protected from automated editing

Focus on files that were recently modified or are in the `docs/src/content/docs/` directory (excluding blog).

Expand All @@ -178,17 +179,34 @@ Focus on markdown files in the `docs/` directory that appear in the PR's changed
**NEVER select these directories or code-generated files**:
- `docs/src/content/docs/blog/` - Blog posts have a different writing style and should not be unbloated
- `docs/src/content/docs/reference/frontmatter-full.md` - Auto-generated from JSON schema
- **Files with `disable-agentic-editing: true` in frontmatter** - These files are explicitly protected from automated editing

Before selecting a file, check its frontmatter to ensure it doesn't have `disable-agentic-editing: true`:
```bash
# Check if a file has disable-agentic-editing set to true
head -20 <filename> | grep -A1 "^---" | grep "disable-agentic-editing: true"
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grep command to detect the disable-agentic-editing flag has a logic error. The command head -20 <filename> | grep -A1 "^---" | grep "disable-agentic-editing: true" will not correctly detect the flag in most cases.

The issue is that grep -A1 "^---" matches lines starting with --- and includes only 1 line after each match. For frontmatter structured as:

---
title: Example
disable-agentic-editing: true
---

The grep command matches line 1 (---) and includes line 2 (title), then matches line 4 (---) and includes line 5. Line 3 containing the flag is not included in the output, so the second grep will not find it.

A more reliable approach would be to use sed or awk to extract the entire frontmatter block, or use a simpler grep command like:

head -20 <filename> | grep "disable-agentic-editing: true"

Or to be more precise about frontmatter boundaries:

sed -n '/^---$/,/^---$/p' <filename> | grep "disable-agentic-editing: true"

This issue also appears on line 201 of the same file.

Suggested change
head -20 <filename> | grep -A1 "^---" | grep "disable-agentic-editing: true"
head -20 <filename> | grep "disable-agentic-editing: true"

Copilot uses AI. Check for mistakes.
# If this returns a match, SKIP this file - it's protected
```
Comment on lines +184 to +189
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unbloat-docs workflow has been updated to check for and skip files with disable-agentic-editing: true, but other workflows that edit documentation files have not been updated with the same protection. Specifically, the "delight" workflow (.github/workflows/delight.md) and "daily-doc-updater" workflow (.github/workflows/daily-doc-updater.md) both have edit permissions and can modify documentation files but do not check for the disable-agentic-editing flag.

For consistency and to ensure the protection mechanism works across all automated documentation editing workflows, these workflows should also be updated to check frontmatter and skip files with disable-agentic-editing: true before making modifications.

Copilot uses AI. Check for mistakes.

Choose the file most in need of improvement based on:
- Recent modification date
- File size (larger files may have more bloat)
- Number of bullet points or repetitive patterns
- **Files NOT in the cleaned-files.txt cache** (avoid duplicating recent work)
- **Files NOT in the exclusion list above** (avoid editing generated files)
- **Files WITHOUT `disable-agentic-editing: true` in frontmatter** (respect protection flag)

### 4. Analyze the File

Read the selected file and identify bloat:
**First, verify the file is editable**:
```bash
# Check frontmatter for disable-agentic-editing flag
head -20 <filename> | grep -A1 "^---" | grep "disable-agentic-editing: true"
```

If this command returns a match, **STOP** - the file is protected. Select a different file.

Once you've confirmed the file is editable, read it and identify bloat:
- Count bullet points - are there excessive lists?
- Look for duplicate information
- Check for repetitive "What it does" / "Why it's valuable" patterns
Expand Down
19 changes: 18 additions & 1 deletion docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions docs/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineCollection } from 'astro:content';
import { defineCollection, z } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';
import { blogSchema } from 'starlight-blog/schema';
Expand All @@ -8,7 +8,19 @@ export const collections = {
docs: defineCollection({
loader: docsLoader(),
schema: docsSchema({
extend: (context) => blogSchema(context)
extend: (ctx) => {
const blogExtension = blogSchema(ctx);
return blogExtension.extend({
// Agent protection flag: when set to true, instructs AI agents
// to treat this documentation page as read-only and skip any
// automated editing, generation, or modification operations.
// This is useful for auto-generated content, release notes,
// or documentation pages that should only be manually curated.
'disable-agentic-editing': z.boolean().optional().describe(
'Prevents AI agents from making automated edits to this page'
),
});
}
})
}),
// changelogs: defineCollection({
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/introduction/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Security Architecture
description: Comprehensive security architecture overview for GitHub Agentic Workflows, including defense-in-depth mechanisms against rogue MCP servers and malicious agents.
sidebar:
order: 3
disable-agentic-editing: true
---

import { Aside } from '@astrojs/starlight/components';
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/reference/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Sandbox Configuration
description: Configure sandbox environments for AI engines including AWF agent container, mounted tools, runtime environments, and MCP Gateway
sidebar:
order: 1350
disable-agentic-editing: true
---

The `sandbox` field configures sandbox environments for AI engines, providing two main capabilities:
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/reference/threat-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Threat Detection
description: Configure automated threat detection to analyze agent output and code changes for security issues before they are applied.
sidebar:
order: 40
disable-agentic-editing: true
---

GitHub Agentic Workflows includes automatic threat detection to analyze agent output and code changes for potential security issues before they are applied. When safe outputs are configured, a threat detection job automatically runs to identify prompt injection attempts, secret leaks, and malicious code patches.
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/reference/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: GitHub Tokens
description: Comprehensive reference for all GitHub tokens used in gh-aw, including authentication, token precedence, and security best practices
sidebar:
order: 650
disable-agentic-editing: true
---

GitHub Agentic Workflows authenticate using multiple tokens depending on the operation. This reference explains which token to use, when it's required, and how precedence works across different operations.
Expand Down
Loading