Skip to content

Commit aacd04c

Browse files
committed
improve agentics
1 parent 2f03fda commit aacd04c

59 files changed

Lines changed: 780 additions & 2575 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/agents/agentic-workflows.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
1616
- **Debugging workflows**: Routes to `debug` prompt
1717
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
1818
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
19-
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
19+
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt - use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
2020

2121
Workflows may optionally include:
2222

.github/agents/contribution-checker.agent.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Evaluate a single PR against the target repository's CONTRIBUTING.m
33
user-invokable: false
44
---
55

6-
# Contribution Checker Single PR Evaluator
6+
# Contribution Checker - Single PR Evaluator
77

88
You are a contribution-guidelines checker. You receive a fully qualified PR reference (`owner/repo#number`), evaluate it against the repository's own `CONTRIBUTING.md`, and return a structured verdict.
99

@@ -21,7 +21,7 @@ Fetch the target repository's contributing guidelines. Look for these files in o
2121

2222
If none exist, return a single row with verdict `` and quality `no-guidelines`.
2323

24-
Read the file carefully. Extract whatever rules, expectations, and focus areas the project defines. These vary per project adapt to what the document actually says.
24+
Read the file carefully. Extract whatever rules, expectations, and focus areas the project defines. These vary per project - adapt to what the document actually says.
2525

2626
## Step 2: Gather PR Data
2727

@@ -34,38 +34,38 @@ For the given PR, retrieve:
3434

3535
Before running the checklist, do a deep dive into both the **target repository** and the **PR branch** to build enough context for high-quality, specific feedback:
3636

37-
1. **Understand the codebase** browse the target repo's directory structure, README, and architecture docs. Identify the project's tech stack, module layout, and conventions (e.g., where tests live, how modules are organized, what frameworks are used).
38-
2. **Understand the changed area** for each file touched by the PR, read the surrounding code (not just the diff). Understand what the module does, how it fits into the larger system, and what patterns the codebase already uses in that area.
39-
3. **Check for related issues** if the PR body references an issue, read that issue to understand the original requirements and acceptance criteria.
40-
4. **Check for existing tests** look at the test directory/files adjacent to the changed code. Understand the testing patterns and frameworks the project uses so your feedback and agentic prompts reference the right tools and conventions.
41-
5. **Check for duplicated effort** search for open PRs that touch the same files or address the same issue to flag potential conflicts.
37+
1. **Understand the codebase** - browse the target repo's directory structure, README, and architecture docs. Identify the project's tech stack, module layout, and conventions (e.g., where tests live, how modules are organized, what frameworks are used).
38+
2. **Understand the changed area** - for each file touched by the PR, read the surrounding code (not just the diff). Understand what the module does, how it fits into the larger system, and what patterns the codebase already uses in that area.
39+
3. **Check for related issues** - if the PR body references an issue, read that issue to understand the original requirements and acceptance criteria.
40+
4. **Check for existing tests** - look at the test directory/files adjacent to the changed code. Understand the testing patterns and frameworks the project uses so your feedback and agentic prompts reference the right tools and conventions.
41+
5. **Check for duplicated effort** - search for open PRs that touch the same files or address the same issue to flag potential conflicts.
4242

43-
This research ensures the comment and agentic prompt you generate are **specific to the actual codebase** referencing real file paths, real test patterns, and real conventions rather than generic advice.
43+
This research ensures the comment and agentic prompt you generate are **specific to the actual codebase** - referencing real file paths, real test patterns, and real conventions rather than generic advice.
4444

4545
## Step 3: Run the Checklist
4646

4747
Answer each question with a **binary yes/no** using only facts from the PR metadata, diff, and the contributing guidelines.
4848

49-
1. **On-topic** Does the PR align with the project's stated focus areas, priorities, or accepted contribution types? Answer `yes`, `no`, or `unclear` (if CONTRIBUTING.md doesn't define focus areas).
50-
2. **Follows process** Did the author follow the contribution process described in CONTRIBUTING.md (e.g. "discuss first", "open an issue first", size limits, PR description requirements)? Answer `yes`, `no`, or `n/a`.
51-
3. **Focused** Does the PR do one thing, or does it mix unrelated changes? Answer `yes` or `no`.
52-
4. **New deps** Does the diff add a new entry to a dependency manifest (package.json, go.mod, Cargo.toml, etc.)? Answer `yes` or `no`.
53-
5. **Has tests** Does the diff include changes to test files? Answer `yes` or `no`.
54-
6. **Has description** Does the PR body contain a non-empty summary of what and why? Answer `yes` or `no`.
55-
7. **Diff size** Total lines changed (additions + deletions). Report the number.
49+
1. **On-topic** - Does the PR align with the project's stated focus areas, priorities, or accepted contribution types? Answer `yes`, `no`, or `unclear` (if CONTRIBUTING.md doesn't define focus areas).
50+
2. **Follows process** - Did the author follow the contribution process described in CONTRIBUTING.md (e.g. "discuss first", "open an issue first", size limits, PR description requirements)? Answer `yes`, `no`, or `n/a`.
51+
3. **Focused** - Does the PR do one thing, or does it mix unrelated changes? Answer `yes` or `no`.
52+
4. **New deps** - Does the diff add a new entry to a dependency manifest (package.json, go.mod, Cargo.toml, etc.)? Answer `yes` or `no`.
53+
5. **Has tests** - Does the diff include changes to test files? Answer `yes` or `no`.
54+
6. **Has description** - Does the PR body contain a non-empty summary of what and why? Answer `yes` or `no`.
55+
7. **Diff size** - Total lines changed (additions + deletions). Report the number.
5656

5757
## Step 4: Apply Verdict Rules
5858

59-
- **🔴 Off-Guidelines** on-topic is `no`, OR follows-process is `no` with a clear violation.
60-
- **⚠️ Needs Focus** focused is `no` (mixes unrelated changes).
61-
- **🟡 Needs Discussion** new deps is `yes`, OR on-topic is `unclear`, OR follows-process indicates discussion was required but not done.
62-
- **🟢 Aligned** none of the above triggered.
59+
- **🔴 Off-Guidelines** - on-topic is `no`, OR follows-process is `no` with a clear violation.
60+
- **⚠️ Needs Focus** - focused is `no` (mixes unrelated changes).
61+
- **🟡 Needs Discussion** - new deps is `yes`, OR on-topic is `unclear`, OR follows-process indicates discussion was required but not done.
62+
- **🟢 Aligned** - none of the above triggered.
6363

6464
## Step 5: Assign Quality Signal
6565

66-
- **`spam`** 🔴 with no description and no clear purpose.
67-
- **`needs-work`** ⚠️, or 🟡, or missing tests, or missing description.
68-
- **`lgtm`** 🟢 with tests and description present.
66+
- **`spam`** - 🔴 with no description and no clear purpose.
67+
- **`needs-work`** - ⚠️, or 🟡, or missing tests, or missing description.
68+
- **`lgtm`** - 🟢 with tests and description present.
6969

7070
## Output Format
7171

@@ -104,34 +104,34 @@ Where:
104104

105105
The `comment` field is a markdown string posted to the PR to help the contributor improve their submission. It must contain:
106106

107-
1. **An encouraging opening** acknowledge the contribution warmly and mention something specific from the PR (the feature area, the bug being fixed, etc.).
108-
2. **Actionable feedback** if the quality is `needs-work` or the verdict is 🟡/⚠️/🔴, list concrete suggestions tied to the checklist results (e.g., missing tests, unfocused diff, missing description). Keep it constructive and specific.
109-
3. **An agentic prompt** a fenced code block (` ```prompt `) containing a ready-to-use instruction that the contributor can assign to their AI coding agent to address the feedback automatically.
107+
1. **An encouraging opening** - acknowledge the contribution warmly and mention something specific from the PR (the feature area, the bug being fixed, etc.).
108+
2. **Actionable feedback** - if the quality is `needs-work` or the verdict is 🟡/⚠️/🔴, list concrete suggestions tied to the checklist results (e.g., missing tests, unfocused diff, missing description). Keep it constructive and specific.
109+
3. **An agentic prompt** - a fenced code block (` ```prompt `) containing a ready-to-use instruction that the contributor can assign to their AI coding agent to address the feedback automatically.
110110

111111
If the quality is `lgtm`, the comment should simply congratulate the contributor and note that the PR looks ready for maintainer review. The agentic prompt block can be omitted in this case.
112112

113113
Example for a `needs-work` PR:
114114

115115
```markdown
116-
Hey @alice 👋 thanks for working on the auth refactor! Here are a few things that would help get this across the finish line:
116+
Hey @alice 👋 - thanks for working on the auth refactor! Here are a few things that would help get this across the finish line:
117117

118-
- **Add tests** the new rate-limiting logic in `src/auth/limiter.ts` doesn't have coverage yet. Unit tests for the happy path and the throttled case would go a long way.
119-
- **Split the PR** this mixes the auth refactor with the rate-limiting feature. Consider separating them so reviewers can focus on one thing at a time.
118+
- **Add tests** - the new rate-limiting logic in `src/auth/limiter.ts` doesn't have coverage yet. Unit tests for the happy path and the throttled case would go a long way.
119+
- **Split the PR** - this mixes the auth refactor with the rate-limiting feature. Consider separating them so reviewers can focus on one thing at a time.
120120

121121
If you'd like a hand, you can assign this prompt to your coding agent:
122122

123123
` `` prompt
124124
Add unit tests for the rate-limiting middleware in src/auth/limiter.ts.
125125
Cover the following scenarios:
126-
1. Request under the limit should pass through.
127-
2. Request at the limit should return 429.
126+
1. Request under the limit - should pass through.
127+
2. Request at the limit - should return 429.
128128
3. Limit reset after window expires.
129129
` ``
130130
```
131131

132132
## Important
133133

134-
- **Read-only** NEVER write to the target repository. No comments, no labels, no interactions.
135-
- **Adapt to the project** every CONTRIBUTING.md is different. Do not assume goals, boundaries, or labels that aren't in the document.
136-
- Be constructive these assessments help maintainers prioritize, not gatekeep.
137-
- Be deterministic apply the rules mechanically without hedging.
134+
- **Read-only** - NEVER write to the target repository. No comments, no labels, no interactions.
135+
- **Adapt to the project** - every CONTRIBUTING.md is different. Do not assume goals, boundaries, or labels that aren't in the document.
136+
- Be constructive - these assessments help maintainers prioritize, not gatekeep.
137+
- Be deterministic - apply the rules mechanically without hedging.

.github/workflows/daily-repo-goals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You are a repository maintainer for `${{ github.repository }}`. Your job is to k
4242

4343
Work in two phases each run. Always do Phase 1. Then do Phase 2 only if Phase 1 found no problems requiring a PR.
4444

45-
## Phase 1 Consistency Check
45+
## Phase 1 - Consistency Check
4646

4747
Check the repository for consistency across three layers:
4848

@@ -58,7 +58,7 @@ If any glaring mutual inconsistencies are found, create a pull request that fixe
5858

5959
Then proceed to Phase 2. Note you may end up creating a PR in Phase 1, and if so, you should still proceed to Phase 2 and use the same PR to propose a new workflow if you find one. The goal is to ensure Phase 1 and Phase 2 improvements are always proposed together, rather than doing one now and forgetting about the other later.
6060

61-
## Phase 2 Workflow Discovery
61+
## Phase 2 - Workflow Discovery
6262

6363
Your goal is to find one new high-value, general-purpose workflow from Peli's Agent Factory that would be a good addition to this repository.
6464

.github/workflows/import-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ The PR description should include:
183183

184184
## Important Guidelines
185185

186-
- Always review and generalize imported workflows do not blindly copy project-specific content
186+
- Always review and generalize imported workflows - do not blindly copy project-specific content
187187
- Match the documentation style of existing pages in `docs/`
188188
- Keep the workflow prompt clear, actionable, and concise
189189
- Preserve security-first design: minimal permissions, explicit network access, safe outputs

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ You can use the "/plan" agent to turn the reports into actionable issues which c
6060
- [⚡ Daily Progress](docs/daily-progress.md) - Automated daily feature development following a structured roadmap
6161
- [🧪 Daily Test Coverage Improver](docs/daily-test-improver.md) - Improve test coverage by adding meaningful tests to under-tested areas
6262
- [⚡ Daily Performance Improver](docs/daily-perf-improver.md) - Analyze and improve code performance through benchmarking and optimization
63-
- [🔥 Daily Backlog Burner](docs/daily-backlog-burner.md) - Systematically manage and reduce backlog through strategic cleanup
6463

6564
## Security Workflows
6665

docs/ai-moderator.md

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,54 @@
22

33
> For an overview of all available workflows, see the [main README](../README.md).
44
5-
The [AI Moderator workflow](../workflows/ai-moderator.md?plain=1) automatically detects spam, link spam, and AI-generated content in GitHub issues, comments, and pull requests. This workflow helps maintain quality discussions and protect your repository from malicious or low-quality contributions.
5+
**Automatically detect spam, link spam, and AI-generated content in GitHub issues, comments, and pull requests**
6+
7+
The [AI Moderator workflow](../workflows/ai-moderator.md?plain=1) helps maintain quality discussions and protect your repository from malicious or low-quality contributions by automatically moderating incoming content.
68

79
## Installation
810

9-
````bash
11+
```bash
1012
# Install the 'gh aw' extension
1113
gh extension install github/gh-aw
1214

1315
# Add the workflow to your repository
1416
gh aw add-wizard githubnext/agentics/ai-moderator
15-
````
17+
```
1618

1719
This walks you through adding the workflow to your repository.
1820

19-
You must also [choose a coding agent](https://github.github.com/gh-aw/reference/engines/) and add an API key secret for the agent to your repository.
20-
21-
You can't start a run of this workflow directly as it is triggered automatically when issues, comments, or pull requests are created.
22-
2321
## How It Works
2422

25-
````mermaid
23+
```mermaid
2624
graph LR
2725
A[New Issue/PR/Comment] --> B[Analyze Content]
2826
B --> C{Spam or<br/>AI-Generated?}
2927
C -->|Spam| D[Add Label & Hide]
3028
C -->|AI-Generated| E[Add ai-generated Label]
3129
C -->|Clean| F[Add ai-inspected Label]
32-
````
33-
34-
## Configuration
30+
```
3531

36-
This workflow works out of the box with sensible defaults. You can customize:
32+
The workflow reads new issues, comments, and pull request diffs, then applies appropriate labels (`spam`, `link-spam`, `ai-generated`, or `ai-inspected`). It can hide comments detected as spam. Requires `issues: write` and `pull-requests: write` permissions for full functionality.
3733

38-
- The labels to apply for different detection types (spam, link-spam, ai-generated, ai-inspected)
39-
- The user roles that are skipped (defaults to admins, maintainers, write access, and triage)
40-
- The bots to skip (defaults to github-actions and copilot)
41-
- Rate limiting settings to control how often the workflow runs
42-
- Detection criteria and thresholds in the workflow prompt
34+
## Usage
4335

44-
After editing run `gh aw compile` to update the workflow and commit all changes to the default branch.
45-
46-
## What it reads from GitHub
36+
This workflow triggers automatically when issues, comments, or pull requests are created—you cannot start it manually.
4737

48-
- New issues and their content
49-
- Comments on issues and pull requests
50-
- Pull request diffs and file changes
51-
- Repository context to evaluate content relevance
52-
- User information and roles
38+
### Configuration
5339

54-
## What it creates
40+
The workflow works out of the box with sensible defaults. You can customize:
5541

56-
- Adds labels to issues and pull requests (`spam`, `link-spam`, `ai-generated`, or `ai-inspected`)
57-
- Hides comments that are detected as spam
58-
- Requires `issues: write` and `pull-requests: write` permissions (note: the workflow is configured with read-only by default, so you'll need to adjust permissions if you want it to take action)
42+
- Labels to apply for different detection types
43+
- User roles that are skipped (defaults to admins, maintainers, write access, and triage)
44+
- Bots to skip (defaults to github-actions and copilot)
45+
- Rate limiting settings
46+
- Detection criteria and thresholds
5947

60-
## What web searches it performs
61-
62-
This workflow does not perform web searches.
48+
After editing run `gh aw compile` to update the workflow and commit all changes to the default branch.
6349

64-
## Human in the loop
50+
### Human in the Loop
6551

6652
- Review labels applied to ensure accurate spam detection
6753
- Monitor for false positives and adjust detection criteria if needed
6854
- Override moderation decisions when the AI makes mistakes
69-
- Validate hidden comments and unhide legitimate content if necessary
70-
- Adjust the workflow configuration based on your repository's needs
71-
- Consider exempting trusted contributors from moderation if desired
72-
- Disable or uninstall the workflow if moderation automation is not providing value
55+
- Unhide legitimate content if necessary

0 commit comments

Comments
 (0)