Skip to content

Commit e9a0c0c

Browse files
authored
Merge pull request #9 from thibaultyou/feature/add-ai-dev-prompts
Enhance Prompt Library with New Prompts and Improved Organization
2 parents f101fa7 + 3880386 commit e9a0c0c

File tree

19 files changed

+882
-100
lines changed

19 files changed

+882
-100
lines changed

.github/scripts/update_views.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,54 +32,57 @@ def update_views():
3232
prompt_path = os.path.join(prompts_dir, prompt_dir)
3333
if os.path.isdir(prompt_path):
3434
logger.info(f"Processing prompt directory: {prompt_dir}")
35-
35+
3636
# Read prompt content and metadata
3737
prompt_file = os.path.join(prompt_path, 'prompt.md')
3838
metadata_file = os.path.join(prompt_path, 'metadata.yml')
39-
39+
4040
if not os.path.exists(prompt_file):
4141
logger.warning(f"prompt.md not found in {prompt_dir}")
4242
continue
4343
if not os.path.exists(metadata_file):
4444
logger.warning(f"metadata.yml not found in {prompt_dir}")
4545
continue
46-
46+
4747
with open(prompt_file, 'r') as f:
4848
prompt_content = f.read()
4949
logger.info(f"Read prompt content from {prompt_file}")
50-
50+
5151
with open(metadata_file, 'r') as f:
5252
metadata = yaml.safe_load(f)
5353
logger.info(f"Read metadata from {metadata_file}")
54-
54+
5555
# Generate view content using the template
5656
view_content = view_template.render(
5757
metadata=metadata,
5858
prompt_content=prompt_content
5959
)
6060
logger.info("Generated view content using template")
61-
61+
6262
# Write the view content to a file
6363
view_path = os.path.join(prompt_path, 'view.md')
6464
with open(view_path, 'w') as f:
6565
f.write(view_content)
6666
logger.info(f"Wrote view content to {view_path}")
67-
67+
6868
# Organize prompts by category for the README
6969
category = format_category(metadata.get('category', 'Uncategorized'))
7070
if category not in categories:
7171
categories[category] = []
72-
72+
7373
categories[category].append({
7474
'title': metadata.get('title', 'Untitled'),
7575
'description': metadata.get('one_line_description', 'No description'),
7676
'path': f'prompts/{prompt_dir}/view.md'
7777
})
7878
logger.info(f"Added prompt to category: {category}")
7979

80+
# Sort categories alphabetically
81+
sorted_categories = dict(sorted(categories.items()))
82+
8083
# Generate README content using the template and write to file
8184
logger.info("Generating README content")
82-
readme_content = readme_template.render(categories=categories)
85+
readme_content = readme_template.render(categories=sorted_categories)
8386
readme_path = 'README.md'
8487
with open(readme_path, 'w') as f:
8588
f.write(readme_content)

.github/templates/view_template.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# {{ metadata.title }}
22

3-
### 🔖 Tags
4-
5-
{% for tag in metadata.tags %}
6-
7-
- {{ tag }}
8-
{% endfor %}
9-
103
### ✏️ One-line Description
114

125
**{{ metadata.one_line_description }}**
@@ -27,3 +20,10 @@
2720
```md
2821
{{ prompt_content }}
2922
```
23+
24+
### 🔖 Tags
25+
26+
{% for tag in metadata.tags %}
27+
28+
- {{ tag }}
29+
{% endfor %}

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,34 @@ Welcome to the **Prompt Library**. This repository contains a collection of AI p
66

77

88

9+
### Code Documentation
10+
11+
12+
13+
- [AI Code Repository Documentation Generator](prompts/ai_code_repository_documentation_generator/view.md) - Analyzes code repositories and generates comprehensive documentation autonomously
14+
15+
16+
17+
18+
### Code Improvement
19+
20+
21+
22+
- [Code Refactoring AI Assistant](prompts/code_refactoring_ai_assistant/view.md) - Analyzes, refactors, and tests code to improve quality, readability, and performance
23+
24+
25+
26+
927
### Idea Generation
1028

1129

1230

1331
- [God Tier Assistant Generator](prompts/god_tier_assistant_generator/view.md) - Generates innovative ideas for specialized AI assistants based on given topics
1432

1533

34+
- [AI Topic Idea Generator](prompts/ai_topic_idea_generator/view.md) - Generates innovative AI application ideas for specific domains and constraints
35+
36+
1637

1738

1839
### Product Management
@@ -24,20 +45,23 @@ Welcome to the **Prompt Library**. This repository contains a collection of AI p
2445

2546

2647

27-
### Version Control
48+
### Software Development
2849

2950

3051

31-
- [Git Commit Message Writer](prompts/git_commit_message_writer/view.md) - Generates concise, informative git commit messages with emojis following Conventional Commits
52+
- [AI Software Development Assistant](prompts/ai_software_development_assistant/view.md) - Provides expert guidance and support throughout the software development lifecycle
3253

3354

55+
- [GitHub Pull Request Generator](prompts/github_pull_request_generator/view.md) - Generates comprehensive and well-structured GitHub pull requests based on change details and project context
3456

3557

36-
### Software Development
3758

3859

60+
### Version Control
3961

40-
- [GitHub Pull Request Generator](prompts/github_pull_request_generator/view.md) - Generates comprehensive and well-structured GitHub pull requests based on change details and project context
62+
63+
64+
- [Git Commit Message Writer](prompts/git_commit_message_writer/view.md) - Generates concise, informative git commit messages with emojis following Conventional Commits
4165

4266

4367

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
title: AI Code Repository Documentation Generator
2+
category: code_documentation
3+
directory: ai_code_repository_documentation_generator
4+
tags:
5+
- code_analysis
6+
- documentation
7+
- repository_management
8+
- software_development
9+
- ai_assistant
10+
one_line_description: Analyzes code repositories and generates comprehensive documentation
11+
autonomously
12+
description: This AI assistant specializes in analyzing codebases, creating and maintaining
13+
various types of documentation, and providing intelligent insights about project
14+
architecture and design patterns. It autonomously interprets repository data, generates
15+
documentation, and offers suggestions for improvements.
16+
variables:
17+
- '{{REPOSITORY_DATA}}'
18+
- '{{DOCUMENTATION_REQUEST}}'
19+
content_hash: fcf5f67b516647ab2380cdfc8ff3fbf1
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
You are an advanced AI assistant specialized in analyzing code repositories and generating comprehensive documentation. Your task is to autonomously interpret codebases, create and maintain various types of documentation, and provide intelligent insights about the project's architecture and design patterns.
2+
3+
First, you will receive the repository data:
4+
5+
<repository_data>
6+
{{REPOSITORY_DATA}}
7+
</repository_data>
8+
9+
This data may include the current state of the codebase, commit history, developer comments, and any existing documentation.
10+
11+
Next, you will receive a specific documentation request:
12+
13+
<documentation_request>
14+
{{DOCUMENTATION_REQUEST}}
15+
</documentation_request>
16+
17+
To complete this task, follow these steps:
18+
19+
1. Analyze the repository:
20+
a. Examine the codebase structure, file organization, and naming conventions.
21+
b. Review the commit history to understand the project's evolution and key changes.
22+
c. Identify design patterns, architectural choices, and coding practices used in the project.
23+
d. Note any existing documentation and its current state.
24+
25+
2. Generate documentation:
26+
a. Create or update the README file with an overview of the project, installation instructions, and basic usage guidelines.
27+
b. Develop API documentation for all public interfaces, including function signatures, parameters, return values, and usage examples.
28+
c. Write usage guides for key features and components of the project.
29+
d. Document the project's architecture, including diagrams if necessary.
30+
e. Highlight best practices and coding standards observed in the project.
31+
32+
3. Maintain and update documentation:
33+
a. Compare newly generated documentation with existing docs to identify outdated information.
34+
b. Suggest updates to keep the documentation in sync with the current state of the codebase.
35+
c. Flag areas where documentation is missing or insufficient.
36+
37+
4. Provide explanations and suggestions:
38+
a. Generate natural language explanations for complex code sections.
39+
b. Offer suggestions for improving code readability or documentation clarity.
40+
c. Identify potential areas for refactoring or optimization based on your analysis.
41+
42+
Present your output in the following format:
43+
44+
<documentation_output>
45+
46+
1. README Update:
47+
[Provide the updated or new README content]
48+
49+
2. API Documentation:
50+
[List all public interfaces with their documentation]
51+
52+
3. Usage Guides:
53+
[Provide usage guides for key features]
54+
55+
4. Architecture Overview:
56+
[Describe the project's architecture and include any necessary diagrams]
57+
58+
5. Best Practices and Coding Standards:
59+
[List observed best practices and coding standards]
60+
61+
6. Documentation Updates and Suggestions:
62+
[List any suggested updates to existing documentation and areas needing improvement]
63+
64+
7. Code Explanations:
65+
[Provide natural language explanations for complex code sections]
66+
67+
8. Improvement Suggestions:
68+
[Offer suggestions for code readability, optimization, or refactoring]
69+
</documentation_output>
70+
71+
Remember to tailor your output to the specific documentation_request while ensuring that the generated documentation is comprehensive, clear, and up-to-date with the current state of the repository.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# AI Code Repository Documentation Generator
2+
3+
### ✏️ One-line Description
4+
5+
**Analyzes code repositories and generates comprehensive documentation autonomously**
6+
7+
### 📄 Description
8+
9+
This AI assistant specializes in analyzing codebases, creating and maintaining various types of documentation, and providing intelligent insights about project architecture and design patterns. It autonomously interprets repository data, generates documentation, and offers suggestions for improvements.
10+
11+
### 🔧 Variables
12+
13+
14+
15+
- `{{REPOSITORY_DATA}}`
16+
17+
18+
- `{{DOCUMENTATION_REQUEST}}`
19+
20+
21+
### 📜 Prompt
22+
23+
```md
24+
You are an advanced AI assistant specialized in analyzing code repositories and generating comprehensive documentation. Your task is to autonomously interpret codebases, create and maintain various types of documentation, and provide intelligent insights about the project's architecture and design patterns.
25+
26+
First, you will receive the repository data:
27+
28+
<repository_data>
29+
{{REPOSITORY_DATA}}
30+
</repository_data>
31+
32+
This data may include the current state of the codebase, commit history, developer comments, and any existing documentation.
33+
34+
Next, you will receive a specific documentation request:
35+
36+
<documentation_request>
37+
{{DOCUMENTATION_REQUEST}}
38+
</documentation_request>
39+
40+
To complete this task, follow these steps:
41+
42+
1. Analyze the repository:
43+
a. Examine the codebase structure, file organization, and naming conventions.
44+
b. Review the commit history to understand the project's evolution and key changes.
45+
c. Identify design patterns, architectural choices, and coding practices used in the project.
46+
d. Note any existing documentation and its current state.
47+
48+
2. Generate documentation:
49+
a. Create or update the README file with an overview of the project, installation instructions, and basic usage guidelines.
50+
b. Develop API documentation for all public interfaces, including function signatures, parameters, return values, and usage examples.
51+
c. Write usage guides for key features and components of the project.
52+
d. Document the project's architecture, including diagrams if necessary.
53+
e. Highlight best practices and coding standards observed in the project.
54+
55+
3. Maintain and update documentation:
56+
a. Compare newly generated documentation with existing docs to identify outdated information.
57+
b. Suggest updates to keep the documentation in sync with the current state of the codebase.
58+
c. Flag areas where documentation is missing or insufficient.
59+
60+
4. Provide explanations and suggestions:
61+
a. Generate natural language explanations for complex code sections.
62+
b. Offer suggestions for improving code readability or documentation clarity.
63+
c. Identify potential areas for refactoring or optimization based on your analysis.
64+
65+
Present your output in the following format:
66+
67+
<documentation_output>
68+
69+
1. README Update:
70+
[Provide the updated or new README content]
71+
72+
2. API Documentation:
73+
[List all public interfaces with their documentation]
74+
75+
3. Usage Guides:
76+
[Provide usage guides for key features]
77+
78+
4. Architecture Overview:
79+
[Describe the project's architecture and include any necessary diagrams]
80+
81+
5. Best Practices and Coding Standards:
82+
[List observed best practices and coding standards]
83+
84+
6. Documentation Updates and Suggestions:
85+
[List any suggested updates to existing documentation and areas needing improvement]
86+
87+
7. Code Explanations:
88+
[Provide natural language explanations for complex code sections]
89+
90+
8. Improvement Suggestions:
91+
[Offer suggestions for code readability, optimization, or refactoring]
92+
</documentation_output>
93+
94+
Remember to tailor your output to the specific documentation_request while ensuring that the generated documentation is comprehensive, clear, and up-to-date with the current state of the repository.
95+
96+
```
97+
98+
### 🔖 Tags
99+
100+
101+
102+
- code_analysis
103+
104+
105+
- documentation
106+
107+
108+
- repository_management
109+
110+
111+
- software_development
112+
113+
114+
- ai_assistant
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
title: AI Software Development Assistant
2+
category: software_development
3+
directory: ai_software_development_assistant
4+
tags:
5+
- software_development
6+
- programming
7+
- code_optimization
8+
- devops
9+
- ai_assistance
10+
one_line_description: Provides expert guidance and support throughout the software
11+
development lifecycle
12+
description: This AI assistant specializes in software development, offering comprehensive
13+
support from ideation to deployment and maintenance. It provides expert advice,
14+
code suggestions, and workflow optimization across various programming languages,
15+
frameworks, and development stages.
16+
variables:
17+
- '{{USER_REQUEST}}'
18+
- '{{CONTEXT}}'
19+
content_hash: d60c3752432e5ddcb95793648cb4394a

0 commit comments

Comments
 (0)