Skip to content

Commit 1ad2b3a

Browse files
Copilotaaronpowell
andcommitted
Remove prompts from website generation and contributor scripts
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
1 parent a3988ab commit 1ad2b3a

2 files changed

Lines changed: 10 additions & 58 deletions

File tree

eng/contributor-report.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ export const TYPE_PATTERNS = {
3030
instructions: [
3131
'instructions/*.instructions.md'
3232
],
33-
prompts: [
34-
'prompts/*.prompt.md'
35-
],
3633
agents: [
3734
'chatmodes/*.chatmode.md',
3835
'agents/*.agent.md'
@@ -140,7 +137,7 @@ export const isAutoGeneratedFile = (filePath) => {
140137
};
141138

142139
/**
143-
* Infer a contribution type string (e.g. 'prompts', 'agents', 'doc') for a file path.
140+
* Infer a contribution type string (e.g. 'skills', 'agents', 'doc') for a file path.
144141
* Returns null if no specific type matched.
145142
* @param {string} filePath
146143
* @returns {string|null}

eng/generate-website-data.mjs

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Generate JSON metadata files for the GitHub Pages website.
5-
* This script extracts metadata from agents, prompts, instructions, skills, and plugins
5+
* This script extracts metadata from agents, instructions, skills, hooks, and plugins
66
* and writes them to website/data/ for client-side search and display.
77
*/
88

@@ -15,7 +15,6 @@ import {
1515
HOOKS_DIR,
1616
INSTRUCTIONS_DIR,
1717
PLUGINS_DIR,
18-
PROMPTS_DIR,
1918
ROOT_FOLDER,
2019
SKILLS_DIR,
2120
WORKFLOWS_DIR
@@ -133,7 +132,7 @@ function generateAgentsData(gitDates) {
133132
*/
134133
function generateHooksData(gitDates) {
135134
const hooks = [];
136-
135+
137136
// Check if hooks directory exists
138137
if (!fs.existsSync(HOOKS_DIR)) {
139138
return {
@@ -261,41 +260,6 @@ function generatePromptsData(gitDates) {
261260
.readdirSync(PROMPTS_DIR)
262261
.filter((f) => f.endsWith(".prompt.md"));
263262

264-
// Track all unique tools for filters
265-
const allTools = new Set();
266-
267-
for (const file of files) {
268-
const filePath = path.join(PROMPTS_DIR, file);
269-
const frontmatter = parseFrontmatter(filePath);
270-
const relativePath = path
271-
.relative(ROOT_FOLDER, filePath)
272-
.replace(/\\/g, "/");
273-
274-
const tools = frontmatter?.tools || [];
275-
tools.forEach((t) => allTools.add(t));
276-
277-
prompts.push({
278-
id: file.replace(".prompt.md", ""),
279-
title: extractTitle(filePath, frontmatter),
280-
description: frontmatter?.description || "",
281-
agent: frontmatter?.agent || null,
282-
model: frontmatter?.model || null,
283-
tools: tools,
284-
path: relativePath,
285-
filename: file,
286-
lastUpdated: gitDates.get(relativePath) || null,
287-
});
288-
}
289-
290-
const sortedPrompts = prompts.sort((a, b) => a.title.localeCompare(b.title));
291-
292-
return {
293-
items: sortedPrompts,
294-
filters: {
295-
tools: Array.from(allTools).sort(),
296-
},
297-
};
298-
}
299263

300264
/**
301265
* Parse applyTo field into an array of patterns
@@ -663,7 +627,6 @@ function generateToolsData() {
663627
*/
664628
function generateSearchIndex(
665629
agents,
666-
prompts,
667630
instructions,
668631
hooks,
669632
workflows,
@@ -686,18 +649,6 @@ function generateSearchIndex(
686649
});
687650
}
688651

689-
for (const prompt of prompts) {
690-
index.push({
691-
type: "prompt",
692-
id: prompt.id,
693-
title: prompt.title,
694-
description: prompt.description,
695-
path: prompt.path,
696-
lastUpdated: prompt.lastUpdated,
697-
searchText: `${prompt.title} ${prompt.description}`.toLowerCase(),
698-
});
699-
}
700-
701652
for (const instruction of instructions) {
702653
index.push({
703654
type: "instruction",
@@ -874,7 +825,7 @@ async function main() {
874825
// Load git dates for all resource files (single efficient git command)
875826
console.log("Loading git history for last updated dates...");
876827
const gitDates = getGitFileDates(
877-
["agents/", "prompts/", "instructions/", "hooks/", "workflows/", "skills/", "plugins/"],
828+
["agents/", "instructions/", "hooks/", "workflows/", "skills/", "plugins/"],
878829
ROOT_FOLDER
879830
);
880831
console.log(`✓ Loaded dates for ${gitDates.size} files\n`);
@@ -892,6 +843,7 @@ async function main() {
892843
`✓ Generated ${hooks.length} hooks (${hooksData.filters.hooks.length} hook types, ${hooksData.filters.tags.length} tags)`
893844
);
894845

846+
<<<<<<< HEAD
895847
const workflowsData = generateWorkflowsData(gitDates);
896848
const workflows = workflowsData.items;
897849
console.log(
@@ -904,6 +856,8 @@ async function main() {
904856
`✓ Generated ${prompts.length} prompts (${promptsData.filters.tools.length} tools)`
905857
);
906858

859+
=======
860+
>>>>>>> 525a2f5 (Remove prompts from website generation and contributor scripts)
907861
const instructionsData = generateInstructionsData(gitDates);
908862
const instructions = instructionsData.items;
909863
console.log(
@@ -935,7 +889,6 @@ async function main() {
935889

936890
const searchIndex = generateSearchIndex(
937891
agents,
938-
prompts,
939892
instructions,
940893
hooks,
941894
workflows,
@@ -956,6 +909,7 @@ async function main() {
956909
);
957910

958911
fs.writeFileSync(
912+
<<<<<<< HEAD
959913
path.join(WEBSITE_DATA_DIR, "workflows.json"),
960914
JSON.stringify(workflowsData, null, 2)
961915
);
@@ -966,6 +920,8 @@ async function main() {
966920
);
967921

968922
fs.writeFileSync(
923+
=======
924+
>>>>>>> 525a2f5 (Remove prompts from website generation and contributor scripts)
969925
path.join(WEBSITE_DATA_DIR, "instructions.json"),
970926
JSON.stringify(instructionsData, null, 2)
971927
);
@@ -1000,7 +956,6 @@ async function main() {
1000956
generated: new Date().toISOString(),
1001957
counts: {
1002958
agents: agents.length,
1003-
prompts: prompts.length,
1004959
instructions: instructions.length,
1005960
skills: skills.length,
1006961
hooks: hooks.length,

0 commit comments

Comments
 (0)