Skip to content

Commit 9aca3db

Browse files
committed
Create documentation.md
1 parent 32244e8 commit 9aca3db

14 files changed

Lines changed: 263 additions & 55 deletions

.github/workflows/format-check.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Generate a structured bug fix approach
3+
argument-hint: [bug-description]
4+
model: gpt5
5+
---
6+
7+
Help me fix this bug: $ARGUMENTS
8+
9+
Please provide:
10+
11+
1. Root cause analysis
12+
2. Step-by-step fix approach
13+
3. Testing strategy
14+
4. Prevention measures for similar issues
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: Perform a comprehensive code review
3+
argument-hint: [file-path]
4+
model: gpt5
5+
---
6+
7+
Please perform a comprehensive code review of the specified file or current changes, focusing on:
8+
9+
1. Code Quality: Check for readability, maintainability, and adherence to best practices
10+
2. Security: Look for potential security vulnerabilities
11+
3. Performance: Identify potential performance issues
12+
4. Testing: Suggest areas that need test coverage
13+
5. Documentation: Check if code is properly documented
14+
15+
$ARGUMENTS
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Generate comprehensive documentation
3+
argument-hint: [file-or-component]
4+
model: gpt5
5+
---
6+
7+
Generate documentation for: $ARGUMENTS
8+
9+
Include:
10+
11+
1. Overview and purpose
12+
2. API reference with parameters and return values
13+
3. Usage examples with code snippets
14+
4. Configuration options if applicable
15+
5. Error handling and troubleshooting
16+
6. Dependencies and requirements
17+
18+
Format as clear, structured markdown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Analyze and optimize code performance
3+
argument-hint: [file-path]
4+
model: gpt5
5+
---
6+
7+
Analyze the performance of: $ARGUMENTS
8+
9+
Please examine:
10+
11+
1. Algorithm complexity and efficiency
12+
2. Memory usage patterns
13+
3. Database queries and optimization opportunities
14+
4. Caching strategies
15+
5. Network requests and bundling
16+
6. Rendering performance (for frontend code)
17+
18+
Suggest specific optimizations with expected impact.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Perform security analysis on code
3+
argument-hint: [file-path]
4+
model: gpt5
5+
---
6+
7+
Perform a security review of: $ARGUMENTS
8+
9+
Focus on:
10+
11+
1. Input validation and sanitization
12+
2. Authentication and authorization checks
13+
3. Data exposure and privacy concerns
14+
4. Injection vulnerabilities (SQL, XSS, etc.)
15+
5. Cryptographic implementations
16+
6. Dependencies with known vulnerabilities
17+
18+
Provide specific recommendations for any issues found.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Generate comprehensive test cases
3+
argument-hint: [file-or-module]
4+
model: gpt5
5+
---
6+
7+
Generate test cases for: $ARGUMENTS
8+
9+
Create tests covering:
10+
11+
1. Happy path scenarios
12+
2. Edge cases and boundary conditions
13+
3. Error handling and exceptions
14+
4. Integration points with other components
15+
5. Performance considerations
16+
6. Security edge cases
17+
18+
Use appropriate testing framework conventions and include setup/teardown as needed.

examples/commands/documentation.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: Generate comprehensive documentation
3+
argument-hint: [file-or-component]
4+
model: gpt5
5+
---
6+
7+
Generate documentation for: $ARGUMENTS
8+
9+
Include:
10+
11+
1. Overview and purpose
12+
2. API reference with parameters and return values
13+
3. Usage examples with code snippets
14+
4. Configuration options if applicable
15+
5. Error handling and troubleshooting
16+
6. Dependencies and requirements
17+
18+
Format as clear, structured markdown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Basic PR Description Generation
2+
# Automatically generates AI-powered descriptions for new pull requests
3+
4+
name: Auto-describe PRs
5+
on:
6+
pull_request:
7+
types: [opened]
8+
9+
jobs:
10+
describe:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
steps:
16+
- name: Generate PR Description
17+
uses: augmentcode/describe-pr@v0
18+
with:
19+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
pull_number: ${{ github.event.pull_request.number }}
22+
repo_name: ${{ github.repository }}
23+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# On-Demand PR Description
2+
# Generates descriptions when the "augment_describe" label is added to a PR
3+
4+
name: On-Demand PR Description
5+
on:
6+
pull_request:
7+
types: [labeled]
8+
9+
jobs:
10+
describe:
11+
# Only run when the specific label is added
12+
if: github.event.label.name == 'augment_describe'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- name: Generate PR Description
19+
uses: augmentcode/describe-pr@v0
20+
with:
21+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
pull_number: ${{ github.event.pull_request.number }}
24+
repo_name: ${{ github.repository }}
25+
26+
- name: Remove trigger label
27+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
28+
with:
29+
script: |
30+
// Remove the trigger label after processing
31+
await github.rest.issues.removeLabel({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
issue_number: context.issue.number,
35+
name: 'augment_describe'
36+
});
37+
38+
- name: Add completion label
39+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
40+
with:
41+
script: |
42+
// Add a label to indicate the description was generated
43+
await github.rest.issues.addLabels({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
issue_number: context.issue.number,
47+
labels: ['auto-described']
48+
});
49+

0 commit comments

Comments
 (0)