Skip to content

Commit 9e86ce6

Browse files
committed
chore: prettier
1 parent afabf63 commit 9e86ce6

File tree

25 files changed

+370
-340
lines changed

25 files changed

+370
-340
lines changed

.github/instructions/genaiscript.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
applyTo: "**/*.genai.*"
3-
description: "Instructions for working with GenAIScript files"
2+
applyTo: '**/*.genai.*'
3+
description: 'Instructions for working with GenAIScript files'
44
---
55

66
## GenAIScript Code Generation Instructions

.github/prompts/create-agents.md.prompt.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,50 +24,64 @@ When creating the `AGENTS.md` file, prioritize clarity, completeness, and action
2424
## Instructions
2525

2626
1. Examine the current project to understand its context, requirements, constraints, architecture, tech stack and specificities, and any existing files that may provide insights.
27-
- For example, look for files that may contain the project name, idea, vision, requirements, technology stack and constraints. This may include README files, project documentation, configuration files (e.g., package.json, pyproject.toml, etc.), CI/CD workflows and any other relevant files.
28-
- If the project is a monorepo or has multiple distinct project roots, identify the relevant subdirectories that may require their own `AGENTS.md` files.
27+
28+
- For example, look for files that may contain the project name, idea, vision, requirements, technology stack and constraints. This may include README files, project documentation, configuration files (e.g., package.json, pyproject.toml, etc.), CI/CD workflows and any other relevant files.
29+
- If the project is a monorepo or has multiple distinct project roots, identify the relevant subdirectories that may require their own `AGENTS.md` files.
2930

3031
2. Once you have all the necessary information, create or update the `AGENTS.md` file with all relevant project context, requirements, stack and constraints for the code agents that will implement the project.
31-
- When doing so, use this the template for structuring the document:
32+
33+
- When doing so, use this the template for structuring the document:
34+
3235
```md
3336
# [project_name]
37+
3438
[Project summary]
3539

3640
## Overview
41+
3742
- [Brief description of what the project does, its purpose and audience]
3843
- [Architecture overview if complex]
3944
- [Project structure if relevant]
4045

4146
## Key Technologies and Frameworks
47+
4248
- [List of main technologies, frameworks, and libraries used in the project]
4349

4450
## Constraints and Requirements [if any]
51+
4552
- [Any specific constraints, requirements, or considerations for the project]
4653

4754
## Challenges and Mitigation Strategies [if any]
55+
4856
- [Potential challenges and how they will be addressed]
4957

5058
## Development Workflow [if applicable]
59+
5160
- [Most important scripts, commands, and tools for development, testing, and deployment. How to start dev server, run tests, build for production, etc.]
5261

5362
## Coding Guidelines [if any]
63+
5464
- [Any specific coding standards, style guides, or best practices to follow]
5565

5666
## Security Considerations [if any]
67+
5768
- [Any security practices or considerations relevant to the project]
5869

5970
## Pull Request Guidelines [if any]
71+
6072
- [Any specific guidelines for creating pull requests, such as, title format, required checks, review process, commit message conventions, etc.]
6173

6274
## Debugging and Troubleshooting [if applicable]
75+
6376
- [Common issues and solutions, logging patterns, debug configuration, performance considerations]
6477
```
65-
- If a section is not relevant, you can omit it.
66-
- **Be specific and concise**: include exact commands, and information from the provided context, do not make any assumptions or add unnecessary details.
67-
- Only use information you found to fill the sections.
68-
- Use standard Markdown formatting.
69-
- If needed, you can add specific sections relevant to the project that are not covered by the template if they provide important context for the code agents.
70-
- If the file already contains enough relevant information, you can skip this step.
78+
79+
- If a section is not relevant, you can omit it.
80+
- **Be specific and concise**: include exact commands, and information from the provided context, do not make any assumptions or add unnecessary details.
81+
- Only use information you found to fill the sections.
82+
- Use standard Markdown formatting.
83+
- If needed, you can add specific sections relevant to the project that are not covered by the template if they provide important context for the code agents.
84+
- If the file already contains enough relevant information, you can skip this step.
7185

7286
## Best Practices
7387

@@ -81,6 +95,7 @@ When creating the `AGENTS.md` file, prioritize clarity, completeness, and action
8195
## Monorepo Considerations
8296

8397
For large monorepos:
98+
8499
- Place a main `AGENTS.md` at the repository root
85100
- Create additional `AGENTS.md` files in subproject directories if they have distinct contexts, requirements or constraints
86101
- The closest `AGENTS.md` file takes precedence for any given location

.github/scripts/create-banner.genai.js

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
2-
import { join } from "node:path";
1+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
2+
import { join } from 'node:path';
33

44
// Must be openai:gpt-image-1 or azure:gpt-image-1
5-
const imageModel = "azure:gpt-image-1";
5+
const imageModel = 'azure:gpt-image-1';
66

77
script({
8-
title: "Create banner",
9-
description: "Create a social banner for a software project",
8+
title: 'Create banner',
9+
description: 'Create a social banner for a software project',
1010
parameters: {
1111
question: {
12-
type: "string",
13-
description: "Context for the banner",
12+
type: 'string',
13+
description: 'Context for the banner',
1414
required: true,
1515
},
1616
text: {
17-
type: "string",
18-
description: "Text to include in the banner",
19-
required: true
17+
type: 'string',
18+
description: 'Text to include in the banner',
19+
required: true,
2020
},
2121
count: {
22-
type: "integer",
23-
description: "Number of banner variations to generate",
22+
type: 'integer',
23+
description: 'Number of banner variations to generate',
2424
default: 4,
2525
},
2626
},
2727
});
2828

2929
function getNextBannerNumber() {
30-
const bannerDir = "banner";
30+
const bannerDir = 'banner';
3131

3232
if (!existsSync(bannerDir)) {
3333
return 1;
3434
}
3535

3636
const existingFiles = readdirSync(bannerDir)
37-
.filter(file => file.startsWith("banner-") && file.endsWith(".png"))
38-
.map(file => {
37+
.filter((file) => file.startsWith('banner-') && file.endsWith('.png'))
38+
.map((file) => {
3939
const match = file.match(/banner-(\d+)\.png$/);
4040
return match ? parseInt(match[1], 10) : 0;
4141
})
@@ -44,38 +44,33 @@ function getNextBannerNumber() {
4444
return existingFiles.length > 0 ? existingFiles[0] + 1 : 1;
4545
}
4646

47-
defTool(
48-
"gen_image",
49-
"Generate an image",
50-
{ prompt: "" },
51-
async (args) => {
52-
const { image } = await generateImage(args.prompt, {
53-
size: "1536x1024",
54-
model: imageModel,
55-
});
47+
defTool('gen_image', 'Generate an image', { prompt: '' }, async (args) => {
48+
const { image } = await generateImage(args.prompt, {
49+
size: '1536x1024',
50+
model: imageModel,
51+
});
5652

57-
const bannerDir = "banner";
58-
if (!existsSync(bannerDir)) {
59-
mkdirSync(bannerDir, { recursive: true });
60-
}
53+
const bannerDir = 'banner';
54+
if (!existsSync(bannerDir)) {
55+
mkdirSync(bannerDir, { recursive: true });
56+
}
6157

62-
const nextNumber = getNextBannerNumber();
63-
const targetFilename = join(bannerDir, `banner-${nextNumber}.png`);
58+
const nextNumber = getNextBannerNumber();
59+
const targetFilename = join(bannerDir, `banner-${nextNumber}.png`);
6460

65-
const imageData = readFileSync(image.filename);
66-
writeFileSync(targetFilename, imageData);
61+
const imageData = readFileSync(image.filename);
62+
writeFileSync(targetFilename, imageData);
6763

68-
env.output.appendContent(`[![banner](${targetFilename})](${targetFilename})`);
69-
return targetFilename;
70-
},
71-
);
64+
env.output.appendContent(`[![banner](${targetFilename})](${targetFilename})`);
65+
return targetFilename;
66+
});
7267

73-
def("QUERY", env.vars.question);
68+
def('QUERY', env.vars.question);
7469

7570
$`## Instructions
7671
Create a prompt for gpt-image-1 to generate a professional social media banner suitable for OpenGraph, Twitter, and other social sharing platforms. Context and inspiration: <QUERY>.
7772
Do not use the context words directly as text in the banner, but rather as inspiration for the design.
78-
${env.vars.text ? `Include the text: "${env.vars.text}" in the banner.` : ""}
73+
${env.vars.text ? `Include the text: "${env.vars.text}" in the banner.` : ''}
7974
Target aspect ratio is 2:1 ratio - design for this ratio and make it fit the actual size of 1536x1024 pixels, using black bars.
8075
Characteristics of the banner: Modern, professional, visually appealing for social media, bright colors, clean design, readable text elements if any, suitable for software project promotion.
8176
The banner should work well as a social media preview image and represent the project effectively.

.github/scripts/create-logo.genai.js

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
2-
import { join } from "node:path";
1+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
2+
import { join } from 'node:path';
33

44
// Must be openai:gpt-image-1 or azure:gpt-image-1
5-
const imageModel = "azure:gpt-image-1";
5+
const imageModel = 'azure:gpt-image-1';
66

77
script({
8-
title: "Create logo",
9-
description: "Create the logo for a software project",
8+
title: 'Create logo',
9+
description: 'Create the logo for a software project',
1010
parameters: {
1111
question: {
12-
type: "string",
13-
description: "2-3 keywords to use in the logo",
12+
type: 'string',
13+
description: '2-3 keywords to use in the logo',
1414
required: true,
1515
},
1616
count: {
17-
type: "integer",
18-
description: "Number of logo variations to generate",
17+
type: 'integer',
18+
description: 'Number of logo variations to generate',
1919
default: 4,
2020
},
2121
},
2222
});
2323

2424
function getNextLogoNumber() {
25-
const logoDir = "logo";
25+
const logoDir = 'logo';
2626

2727
if (!existsSync(logoDir)) {
2828
return 1;
2929
}
3030

3131
const existingFiles = readdirSync(logoDir)
32-
.filter(file => file.startsWith("logo-") && file.endsWith(".png"))
33-
.map(file => {
32+
.filter((file) => file.startsWith('logo-') && file.endsWith('.png'))
33+
.map((file) => {
3434
const match = file.match(/logo-(\d+)\.png$/);
3535
return match ? parseInt(match[1], 10) : 0;
3636
})
@@ -39,33 +39,28 @@ function getNextLogoNumber() {
3939
return existingFiles.length > 0 ? existingFiles[0] + 1 : 1;
4040
}
4141

42-
defTool(
43-
"gen_image",
44-
"Generate an image",
45-
{ prompt: "" },
46-
async (args) => {
47-
const { image } = await generateImage(args.prompt, {
48-
size: "1024x1024",
49-
model: imageModel,
50-
});
42+
defTool('gen_image', 'Generate an image', { prompt: '' }, async (args) => {
43+
const { image } = await generateImage(args.prompt, {
44+
size: '1024x1024',
45+
model: imageModel,
46+
});
5147

52-
const logoDir = "logo";
53-
if (!existsSync(logoDir)) {
54-
mkdirSync(logoDir, { recursive: true });
55-
}
48+
const logoDir = 'logo';
49+
if (!existsSync(logoDir)) {
50+
mkdirSync(logoDir, { recursive: true });
51+
}
5652

57-
const nextNumber = getNextLogoNumber();
58-
const targetFilename = join(logoDir, `logo-${nextNumber}.png`);
53+
const nextNumber = getNextLogoNumber();
54+
const targetFilename = join(logoDir, `logo-${nextNumber}.png`);
5955

60-
const imageData = readFileSync(image.filename);
61-
writeFileSync(targetFilename, imageData);
56+
const imageData = readFileSync(image.filename);
57+
writeFileSync(targetFilename, imageData);
6258

63-
env.output.appendContent(`[![logo](${targetFilename})](${targetFilename})`);
64-
return targetFilename;
65-
},
66-
);
59+
env.output.appendContent(`[![logo](${targetFilename})](${targetFilename})`);
60+
return targetFilename;
61+
});
6762

68-
def("QUERY", env.vars.question);
63+
def('QUERY', env.vars.question);
6964

7065
$`## Instructions
7166
Create a prompt for gpt-image-1 to generate a professional-looking logo icon suitable for a software project. Context and inspiration: <QUERY>.

0 commit comments

Comments
 (0)