prpm 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,232 @@
1
+ {
2
+ "$schema": "../../schemas/format-capabilities.schema.json",
3
+ "version": "1.0.2",
4
+ "description": "Format capability matrix for PRPM converters - defines which subtypes each format supports and progressive disclosure fallbacks",
5
+ "lastVerified": "2025-12-06",
6
+ "verificationSources": {
7
+ "claude": "https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview",
8
+ "copilot": "https://github.blog/changelog/2025-08-28-copilot-coding-agent-now-supports-agents-md-custom-instructions/",
9
+ "cursor": "https://docs.cursor.com/context/rules",
10
+ "continue": "https://docs.continue.dev/reference",
11
+ "windsurf": "https://docs.codeium.com/windsurf/cascade",
12
+ "gemini": "https://geminicli.com/docs/extensions/",
13
+ "aider": "https://aider.chat/docs/usage/conventions.html",
14
+ "replit": "https://docs.replit.com/replitai/agent",
15
+ "zed": "https://zed.dev/docs/assistant/assistant-settings"
16
+ },
17
+ "formats": {
18
+ "cursor": {
19
+ "name": "Cursor",
20
+ "supportsSkills": false,
21
+ "supportsPlugins": false,
22
+ "supportsExtensions": false,
23
+ "supportsAgents": false,
24
+ "supportsAgentsMd": true,
25
+ "supportsSlashCommands": true,
26
+ "markdownFallback": "cursor-rules.md",
27
+ "notes": "Cursor supports AGENTS.md files for project instructions. Custom slash commands in .cursor/commands/*.md (introduced v1.6, Sept 2025). Built-in /summarize command. Rules are appended automatically, slash commands are explicit prompts with more weight. No native agent/skill/plugin packages."
28
+ },
29
+ "claude": {
30
+ "name": "Claude Code",
31
+ "supportsSkills": true,
32
+ "supportsPlugins": true,
33
+ "supportsExtensions": false,
34
+ "supportsAgents": true,
35
+ "supportsAgentsMd": false,
36
+ "markdownFallback": "CLAUDE.md",
37
+ "notes": "Claude Code supports skills, agents, and plugins. Uses CLAUDE.md (not AGENTS.md) for project-specific instructions. Feature request open for AGENTS.md support (Issue #6235)."
38
+ },
39
+ "continue": {
40
+ "name": "Continue",
41
+ "supportsSkills": false,
42
+ "supportsPlugins": false,
43
+ "supportsExtensions": false,
44
+ "supportsAgents": false,
45
+ "supportsAgentsMd": false,
46
+ "markdownFallback": "continue-prompts.md",
47
+ "notes": "Continue uses simple prompt files. No native support for advanced package types."
48
+ },
49
+ "windsurf": {
50
+ "name": "Windsurf",
51
+ "supportsSkills": false,
52
+ "supportsPlugins": false,
53
+ "supportsExtensions": false,
54
+ "supportsAgents": false,
55
+ "supportsAgentsMd": false,
56
+ "markdownFallback": "windsurf-rules.md",
57
+ "notes": "Windsurf uses markdown rules with 12K character limit. No advanced package support."
58
+ },
59
+ "copilot": {
60
+ "name": "GitHub Copilot",
61
+ "supportsSkills": false,
62
+ "supportsPlugins": false,
63
+ "supportsExtensions": false,
64
+ "supportsAgents": true,
65
+ "supportsAgentsMd": true,
66
+ "markdownFallback": "copilot-instructions.md",
67
+ "notes": "GitHub Copilot coding agent supports AGENTS.md, CLAUDE.md, GEMINI.md, and .instructions.md custom instructions (as of August 2025). Full agents.md support."
68
+ },
69
+ "kiro": {
70
+ "name": "Kiro AI",
71
+ "supportsSkills": false,
72
+ "supportsPlugins": false,
73
+ "supportsExtensions": false,
74
+ "supportsAgents": true,
75
+ "supportsAgentsMd": true,
76
+ "markdownFallback": "kiro-agent.md",
77
+ "notes": "Kiro supports agents in .kiro/agents/ directory. Full agents.md support."
78
+ },
79
+ "gemini": {
80
+ "name": "Gemini CLI",
81
+ "supportsSkills": false,
82
+ "supportsPlugins": false,
83
+ "supportsExtensions": true,
84
+ "supportsAgents": false,
85
+ "supportsAgentsMd": false,
86
+ "supportsSlashCommands": true,
87
+ "markdownFallback": "GEMINI.md",
88
+ "notes": "Gemini CLI uses extensions in gemini-extension.json. Custom slash commands in ~/.gemini/commands/ (user-scoped) or .gemini/commands/ (project-scoped). Built-in commands: /help, /copy, /mcp, /memory, /directory. Only supports GEMINI.md for project context. Does not support AGENT.md or AGENTS.md."
89
+ },
90
+ "opencode": {
91
+ "name": "OpenCode",
92
+ "supportsSkills": false,
93
+ "supportsPlugins": true,
94
+ "supportsExtensions": false,
95
+ "supportsAgents": true,
96
+ "supportsAgentsMd": true,
97
+ "supportsSlashCommands": true,
98
+ "markdownFallback": "opencode-agent.md",
99
+ "notes": "OpenCode supports agents with mode/model/temperature config. Plugins are JavaScript/TypeScript modules in .opencode/plugin with 40+ event hooks. Slash commands available. Full agents.md support."
100
+ },
101
+ "ruler": {
102
+ "name": "Ruler",
103
+ "supportsSkills": false,
104
+ "supportsPlugins": false,
105
+ "supportsExtensions": false,
106
+ "supportsAgents": true,
107
+ "supportsAgentsMd": true,
108
+ "markdownFallback": "ruler-rules.md",
109
+ "notes": "Ruler supports agents in .ruler/agents/ directory. Full agents.md support."
110
+ },
111
+ "droid": {
112
+ "name": "Factory Droid",
113
+ "supportsSkills": true,
114
+ "supportsPlugins": false,
115
+ "supportsExtensions": false,
116
+ "supportsAgents": true,
117
+ "supportsAgentsMd": true,
118
+ "markdownFallback": "droid-skill.md",
119
+ "notes": "Factory Droid supports both skills and agents. Full agents.md support."
120
+ },
121
+ "trae": {
122
+ "name": "Trae",
123
+ "supportsSkills": false,
124
+ "supportsPlugins": false,
125
+ "supportsExtensions": false,
126
+ "supportsAgents": false,
127
+ "supportsAgentsMd": false,
128
+ "markdownFallback": "trae-rules.md",
129
+ "notes": "Trae uses simple markdown rules. No advanced package support."
130
+ },
131
+ "aider": {
132
+ "name": "Aider",
133
+ "supportsSkills": false,
134
+ "supportsPlugins": false,
135
+ "supportsExtensions": false,
136
+ "supportsAgents": false,
137
+ "supportsAgentsMd": false,
138
+ "markdownFallback": "CONVENTIONS.md",
139
+ "notes": "Aider uses CONVENTIONS.md for coding standards. No advanced package support."
140
+ },
141
+ "zencoder": {
142
+ "name": "Zencoder",
143
+ "supportsSkills": false,
144
+ "supportsPlugins": false,
145
+ "supportsExtensions": false,
146
+ "supportsAgents": false,
147
+ "supportsAgentsMd": false,
148
+ "markdownFallback": "zencoder-rules.md",
149
+ "notes": "Zencoder uses simple rules with glob patterns. No advanced package support."
150
+ },
151
+ "replit": {
152
+ "name": "Replit Agent",
153
+ "supportsSkills": false,
154
+ "supportsPlugins": false,
155
+ "supportsExtensions": false,
156
+ "supportsAgents": true,
157
+ "supportsAgentsMd": true,
158
+ "markdownFallback": "AGENTS.md",
159
+ "notes": "Replit Agent supports AGENTS.md for custom agent instructions. Full agents.md support following the agent-rules.org standard."
160
+ },
161
+ "zed": {
162
+ "name": "Zed",
163
+ "supportsSkills": false,
164
+ "supportsPlugins": false,
165
+ "supportsExtensions": true,
166
+ "supportsAgents": false,
167
+ "supportsAgentsMd": true,
168
+ "supportsSlashCommands": true,
169
+ "markdownFallback": ".rules",
170
+ "notes": "Zed supports .rules files (plain markdown, no frontmatter). Slash commands can be used in rules with /file, /diagnostics, /fetch, etc. Extensions written in Rust/WASM with extension.toml manifest. Also reads .cursorrules, .windsurfrules, .clinerules, AGENTS.md, CLAUDE.md, GEMINI.md in priority order. Extensions installed to ~/Library/Application Support/Zed/extensions (macOS). License required: MIT, Apache 2.0, BSD 3-Clause, or GPLv3."
171
+ },
172
+ "codex": {
173
+ "name": "OpenAI Codex CLI",
174
+ "supportsSkills": false,
175
+ "supportsPlugins": false,
176
+ "supportsExtensions": false,
177
+ "supportsAgents": true,
178
+ "supportsAgentsMd": true,
179
+ "supportsSlashCommands": false,
180
+ "slashCommandFallback": "agents.md",
181
+ "markdownFallback": "AGENTS.md",
182
+ "notes": "OpenAI Codex CLI uses AGENTS.md for project instructions. No native slash commands - slash commands are converted to named sections in AGENTS.md that users invoke by saying the command name (e.g., 'build-actions' not '/build-actions')."
183
+ },
184
+ "agents.md": {
185
+ "name": "agents.md (Universal)",
186
+ "supportsSkills": false,
187
+ "supportsPlugins": false,
188
+ "supportsExtensions": false,
189
+ "supportsAgents": true,
190
+ "supportsAgentsMd": true,
191
+ "markdownFallback": "agents.md",
192
+ "notes": "Universal agents.md format - works with OpenAI, Gemini, Claude, and most AI systems."
193
+ },
194
+ "mcp": {
195
+ "name": "Model Context Protocol",
196
+ "supportsSkills": false,
197
+ "supportsPlugins": true,
198
+ "supportsExtensions": false,
199
+ "supportsAgents": false,
200
+ "supportsAgentsMd": false,
201
+ "markdownFallback": "mcp-server.json",
202
+ "notes": "MCP is a server protocol, not a package format. Supports plugins via server configuration."
203
+ },
204
+ "generic": {
205
+ "name": "Generic (Markdown)",
206
+ "supportsSkills": false,
207
+ "supportsPlugins": false,
208
+ "supportsExtensions": false,
209
+ "supportsAgents": true,
210
+ "supportsAgentsMd": true,
211
+ "markdownFallback": "README.md",
212
+ "notes": "Generic markdown format for maximum compatibility. Supports agents.md convention."
213
+ }
214
+ },
215
+ "agentsMdSupport": {
216
+ "description": "Formats that intelligently support agents.md for progressive disclosure",
217
+ "formats": [
218
+ "cursor",
219
+ "copilot",
220
+ "kiro",
221
+ "opencode",
222
+ "ruler",
223
+ "droid",
224
+ "replit",
225
+ "zed",
226
+ "codex",
227
+ "agents.md",
228
+ "generic"
229
+ ],
230
+ "notes": "These formats can use AGENTS.md as a universal fallback. Claude Code uses CLAUDE.md instead (not AGENTS.md). Gemini uses GEMINI.md instead. Cursor added AGENTS.md support in version 1.6+. GitHub Copilot added AGENTS.md support in August 2025. Zed reads AGENTS.md along with other rule file formats."
231
+ }
232
+ }
package/dist/index.js CHANGED
@@ -815,7 +815,8 @@ var init_taxonomy_utils = __esm({
815
815
  "trae",
816
816
  "replit",
817
817
  "zencoder",
818
- "droid"
818
+ "droid",
819
+ "codex"
819
820
  ];
820
821
  }
821
822
  });
@@ -852,6 +853,25 @@ function fromClaude(content, metadata, sourceFormat = "claude", explicitSubtype)
852
853
  }
853
854
  metadataSection.data.claudeAgent.model = frontmatter.model;
854
855
  }
856
+ const argumentHint = frontmatter["argument-hint"];
857
+ const hasSlashCommandFields = argumentHint || frontmatter["allowed-tools"] || frontmatter["disable-model-invocation"];
858
+ if (hasSlashCommandFields) {
859
+ metadataSection.data.claudeSlashCommand = {
860
+ description: frontmatter.description
861
+ };
862
+ if (argumentHint) {
863
+ metadataSection.data.claudeSlashCommand.argumentHint = argumentHint;
864
+ }
865
+ if (frontmatter["allowed-tools"]) {
866
+ metadataSection.data.claudeSlashCommand.allowedTools = frontmatter["allowed-tools"];
867
+ }
868
+ if (frontmatter.model) {
869
+ metadataSection.data.claudeSlashCommand.model = frontmatter.model;
870
+ }
871
+ if (frontmatter["disable-model-invocation"] !== void 0) {
872
+ metadataSection.data.claudeSlashCommand.disableModelInvocation = frontmatter["disable-model-invocation"] === "true" || frontmatter["disable-model-invocation"] === true;
873
+ }
874
+ }
855
875
  const { sections: bodySections, h1Title, h1Icon } = parseMarkdownBody(body);
856
876
  if (h1Title) {
857
877
  metadataSection.data.title = h1Title;
@@ -10564,7 +10584,11 @@ function toGemini(pkg, options = {}) {
10564
10584
  const warnings = [];
10565
10585
  let qualityScore = 100;
10566
10586
  try {
10567
- const prompt3 = buildPrompt(pkg.content, warnings);
10587
+ let prompt3 = buildPrompt(pkg.content, warnings);
10588
+ const argumentHint = extractArgumentHint(pkg);
10589
+ if (argumentHint) {
10590
+ prompt3 = integrateArgumentsIntoPrompt(prompt3, argumentHint, warnings);
10591
+ }
10568
10592
  const geminiCommand = {
10569
10593
  prompt: prompt3
10570
10594
  };
@@ -10723,6 +10747,89 @@ function convertContext7(section) {
10723
10747
  lines.push(section.content);
10724
10748
  return lines.join("\n");
10725
10749
  }
10750
+ function extractArgumentHint(pkg) {
10751
+ var _a, _b, _c, _d, _e;
10752
+ const metadataSection = pkg.content.sections.find((s) => s.type === "metadata");
10753
+ if (metadataSection && metadataSection.type === "metadata") {
10754
+ if ((_a = metadataSection.data.claudeSlashCommand) == null ? void 0 : _a.argumentHint) {
10755
+ return metadataSection.data.claudeSlashCommand.argumentHint;
10756
+ }
10757
+ if ((_b = metadataSection.data.opencodeSlashCommand) == null ? void 0 : _b.argumentHint) {
10758
+ return metadataSection.data.opencodeSlashCommand.argumentHint;
10759
+ }
10760
+ if ((_c = metadataSection.data.droid) == null ? void 0 : _c.argumentHint) {
10761
+ return metadataSection.data.droid.argumentHint;
10762
+ }
10763
+ }
10764
+ if ((_e = (_d = pkg.metadata) == null ? void 0 : _d.droid) == null ? void 0 : _e.argumentHint) {
10765
+ return pkg.metadata.droid.argumentHint;
10766
+ }
10767
+ return void 0;
10768
+ }
10769
+ function parseArgumentHint(hint) {
10770
+ if (Array.isArray(hint)) {
10771
+ return hint;
10772
+ }
10773
+ const bracketMatches = hint.match(/\[([^\]]+)\]/g);
10774
+ if (bracketMatches) {
10775
+ return bracketMatches.map((m) => m.replace(/^\[|\]$/g, ""));
10776
+ }
10777
+ return hint.split(/\s+/).filter(Boolean);
10778
+ }
10779
+ function integrateArgumentsIntoPrompt(prompt3, argumentHint, warnings) {
10780
+ const args = parseArgumentHint(argumentHint);
10781
+ if (args.length === 0) {
10782
+ return prompt3;
10783
+ }
10784
+ let translatedPrompt = translatePositionalArgs(prompt3, args, warnings);
10785
+ const usageFormat = args.map((arg) => `<${arg}>`).join(" ");
10786
+ const usageSection = `**Expected Arguments:** ${usageFormat}
10787
+
10788
+ The user will provide these arguments which are available via {{args}}.
10789
+
10790
+ `;
10791
+ if (translatedPrompt.includes("{{args}}")) {
10792
+ return usageSection + translatedPrompt;
10793
+ }
10794
+ const instructionHeaders = /^(#+\s*(?:Instructions?|Overview|Task):?\s*\n)/im;
10795
+ const match = translatedPrompt.match(instructionHeaders);
10796
+ if (match) {
10797
+ const insertPoint = match.index + match[0].length;
10798
+ const before = translatedPrompt.slice(0, insertPoint);
10799
+ const after = translatedPrompt.slice(insertPoint);
10800
+ return usageSection + before + `
10801
+ **Arguments provided:** {{args}}
10802
+
10803
+ ` + after;
10804
+ }
10805
+ return usageSection + `**Arguments provided:** {{args}}
10806
+
10807
+ ` + translatedPrompt;
10808
+ }
10809
+ function translatePositionalArgs(prompt3, argNames, warnings) {
10810
+ let result = prompt3;
10811
+ const hasPositionalArgs = /\$\d+/.test(prompt3);
10812
+ if (!hasPositionalArgs) {
10813
+ return result;
10814
+ }
10815
+ for (let i = 0; i < argNames.length; i++) {
10816
+ const positionalArg = `$${i + 1}`;
10817
+ const namedPlaceholder = `{{${argNames[i]}}}`;
10818
+ const regex = new RegExp(`\\$${i + 1}(?![0-9])`, "g");
10819
+ result = result.replace(regex, namedPlaceholder);
10820
+ }
10821
+ const remainingArgs = result.match(/\$(\d+)/g);
10822
+ if (remainingArgs) {
10823
+ const unmappedArgs = remainingArgs.filter((arg) => {
10824
+ const num = parseInt(arg.slice(1), 10);
10825
+ return num > argNames.length;
10826
+ });
10827
+ if (unmappedArgs.length > 0) {
10828
+ warnings.push(`Positional arguments ${unmappedArgs.join(", ")} found but no corresponding argumentHint names provided`);
10829
+ }
10830
+ }
10831
+ return result;
10832
+ }
10726
10833
  var TOML2;
10727
10834
  var init_to_gemini = __esm({
10728
10835
  "../converters/dist/to-gemini.js"() {
@@ -12043,6 +12150,261 @@ var init_to_zed = __esm({
12043
12150
  }
12044
12151
  });
12045
12152
 
12153
+ // ../converters/dist/to-codex.js
12154
+ function toCodex(pkg, options = {}) {
12155
+ const warnings = [];
12156
+ let qualityScore = 100;
12157
+ try {
12158
+ const config = options.codexConfig || {};
12159
+ const isSlashCommand = pkg.subtype === "slash-command";
12160
+ let content;
12161
+ if (isSlashCommand) {
12162
+ content = convertSlashCommandToSection(pkg, warnings);
12163
+ if (config.appendMode && config.existingContent) {
12164
+ content = appendToExistingAgentsMd(config.existingContent, content, pkg.name);
12165
+ }
12166
+ } else {
12167
+ content = convertToAgentsMd(pkg, warnings);
12168
+ }
12169
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
12170
+ if (lossyConversion) {
12171
+ qualityScore -= 10;
12172
+ }
12173
+ return {
12174
+ content,
12175
+ format: "codex",
12176
+ warnings: warnings.length > 0 ? warnings : void 0,
12177
+ lossyConversion,
12178
+ qualityScore
12179
+ };
12180
+ } catch (error) {
12181
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
12182
+ return {
12183
+ content: "",
12184
+ format: "codex",
12185
+ warnings,
12186
+ lossyConversion: true,
12187
+ qualityScore: 0
12188
+ };
12189
+ }
12190
+ }
12191
+ function convertSlashCommandToSection(pkg, warnings) {
12192
+ const lines = [];
12193
+ const commandName = pkg.name.replace(/^\//, "");
12194
+ const metadataSection = pkg.content.sections.find((s) => s.type === "metadata");
12195
+ let argumentHint;
12196
+ let description = pkg.description;
12197
+ if (metadataSection && metadataSection.type === "metadata") {
12198
+ const claudeSlashCommand = metadataSection.data.claudeSlashCommand;
12199
+ if (claudeSlashCommand) {
12200
+ argumentHint = claudeSlashCommand.argumentHint;
12201
+ if (claudeSlashCommand.description) {
12202
+ description = claudeSlashCommand.description;
12203
+ }
12204
+ }
12205
+ }
12206
+ lines.push(`## ${commandName}`);
12207
+ lines.push("");
12208
+ if (argumentHint) {
12209
+ const args = formatArgumentHint(argumentHint);
12210
+ lines.push(`**Usage:** Say "${commandName} ${args}" to invoke this command`);
12211
+ } else {
12212
+ lines.push(`**Usage:** Say "${commandName}" to invoke this command`);
12213
+ }
12214
+ lines.push("");
12215
+ if (description) {
12216
+ lines.push(`**Description:** ${description}`);
12217
+ lines.push("");
12218
+ }
12219
+ if (argumentHint) {
12220
+ const argNames = parseArgumentHint2(argumentHint);
12221
+ if (argNames.length > 0) {
12222
+ lines.push("**Arguments:**");
12223
+ argNames.forEach((arg, i) => {
12224
+ lines.push(`- \`${arg}\` - Argument ${i + 1}`);
12225
+ });
12226
+ lines.push("");
12227
+ }
12228
+ }
12229
+ lines.push("---");
12230
+ lines.push("");
12231
+ lines.push(`When the user says "${commandName}" or asks to "${commandName.replace(/-/g, " ")}", follow these instructions:`);
12232
+ lines.push("");
12233
+ for (const section of pkg.content.sections) {
12234
+ if (section.type === "metadata")
12235
+ continue;
12236
+ if (section.type === "tools") {
12237
+ warnings.push("Tools section skipped (not supported by Codex AGENTS.md)");
12238
+ continue;
12239
+ }
12240
+ if (section.type === "persona") {
12241
+ warnings.push("Persona section skipped (not supported by Codex AGENTS.md)");
12242
+ continue;
12243
+ }
12244
+ const sectionContent = convertSection13(section, warnings);
12245
+ if (sectionContent) {
12246
+ lines.push(sectionContent);
12247
+ lines.push("");
12248
+ }
12249
+ }
12250
+ return lines.join("\n").trim();
12251
+ }
12252
+ function convertToAgentsMd(pkg, warnings) {
12253
+ var _a;
12254
+ const lines = [];
12255
+ const title = ((_a = pkg.metadata) == null ? void 0 : _a.title) || pkg.name;
12256
+ lines.push(`# ${title}`);
12257
+ lines.push("");
12258
+ if (pkg.description) {
12259
+ lines.push(pkg.description);
12260
+ lines.push("");
12261
+ }
12262
+ for (const section of pkg.content.sections) {
12263
+ if (section.type === "metadata")
12264
+ continue;
12265
+ if (section.type === "tools") {
12266
+ warnings.push("Tools section skipped (not supported by Codex AGENTS.md)");
12267
+ continue;
12268
+ }
12269
+ if (section.type === "persona") {
12270
+ warnings.push("Persona section skipped (not supported by Codex AGENTS.md)");
12271
+ continue;
12272
+ }
12273
+ const sectionContent = convertSection13(section, warnings);
12274
+ if (sectionContent) {
12275
+ lines.push(sectionContent);
12276
+ lines.push("");
12277
+ }
12278
+ }
12279
+ return lines.join("\n").trim();
12280
+ }
12281
+ function appendToExistingAgentsMd(existingContent, newSection, commandName) {
12282
+ const sectionHeader = `## ${commandName.replace(/^\//, "")}`;
12283
+ if (existingContent.includes(sectionHeader)) {
12284
+ const regex = new RegExp(`## ${commandName.replace(/^\//, "")}[\\s\\S]*?(?=## |$)`, "g");
12285
+ return existingContent.replace(regex, newSection + "\n\n");
12286
+ }
12287
+ const trimmedExisting = existingContent.trim();
12288
+ return `${trimmedExisting}
12289
+
12290
+ ${newSection}`;
12291
+ }
12292
+ function convertSection13(section, warnings) {
12293
+ switch (section.type) {
12294
+ case "instructions":
12295
+ return convertInstructions13(section);
12296
+ case "rules":
12297
+ return convertRules13(section);
12298
+ case "examples":
12299
+ return convertExamples13(section);
12300
+ case "context":
12301
+ return convertContext13(section);
12302
+ case "hook":
12303
+ warnings.push("Hook section skipped (not supported by Codex)");
12304
+ return "";
12305
+ case "cursor-hook":
12306
+ warnings.push("Cursor hook section skipped (not supported by Codex)");
12307
+ return "";
12308
+ case "file-reference":
12309
+ warnings.push("File reference section skipped (not supported by Codex)");
12310
+ return "";
12311
+ case "custom":
12312
+ if (!section.editorType || section.editorType === "codex") {
12313
+ return section.content;
12314
+ }
12315
+ warnings.push(`Custom ${section.editorType} section skipped`);
12316
+ return "";
12317
+ default:
12318
+ return "";
12319
+ }
12320
+ }
12321
+ function convertInstructions13(section) {
12322
+ const lines = [];
12323
+ lines.push(`### ${section.title}`);
12324
+ lines.push("");
12325
+ if (section.priority === "high") {
12326
+ lines.push("**Important:**");
12327
+ lines.push("");
12328
+ }
12329
+ lines.push(section.content);
12330
+ return lines.join("\n");
12331
+ }
12332
+ function convertRules13(section) {
12333
+ const lines = [];
12334
+ lines.push(`### ${section.title}`);
12335
+ lines.push("");
12336
+ section.items.forEach((rule, index) => {
12337
+ const prefix = section.ordered ? `${index + 1}.` : "-";
12338
+ lines.push(`${prefix} ${rule.content}`);
12339
+ if (rule.rationale) {
12340
+ lines.push(` - Rationale: ${rule.rationale}`);
12341
+ }
12342
+ if (rule.examples && rule.examples.length > 0) {
12343
+ rule.examples.forEach((example) => {
12344
+ lines.push(` - Example: \`${example}\``);
12345
+ });
12346
+ }
12347
+ });
12348
+ return lines.join("\n");
12349
+ }
12350
+ function convertExamples13(section) {
12351
+ const lines = [];
12352
+ lines.push(`### ${section.title}`);
12353
+ lines.push("");
12354
+ section.examples.forEach((example) => {
12355
+ if (example.good === false) {
12356
+ lines.push(`#### \u274C Avoid: ${example.description}`);
12357
+ } else if (example.good === true) {
12358
+ lines.push(`#### \u2705 Preferred: ${example.description}`);
12359
+ } else {
12360
+ lines.push(`#### ${example.description}`);
12361
+ }
12362
+ lines.push("");
12363
+ const lang = example.language || "";
12364
+ lines.push("```" + lang);
12365
+ lines.push(example.code);
12366
+ lines.push("```");
12367
+ lines.push("");
12368
+ });
12369
+ return lines.join("\n");
12370
+ }
12371
+ function convertContext13(section) {
12372
+ const lines = [];
12373
+ lines.push(`### ${section.title}`);
12374
+ lines.push("");
12375
+ lines.push(section.content);
12376
+ return lines.join("\n");
12377
+ }
12378
+ function formatArgumentHint(hint) {
12379
+ if (Array.isArray(hint)) {
12380
+ return hint.map((arg) => `<${arg}>`).join(" ");
12381
+ }
12382
+ const bracketMatches = hint.match(/\[([^\]]+)\]/g);
12383
+ if (bracketMatches) {
12384
+ return bracketMatches.map((m) => `<${m.replace(/^\[|\]$/g, "")}>`).join(" ");
12385
+ }
12386
+ return hint.split(/\s+/).filter(Boolean).map((arg) => `<${arg}>`).join(" ");
12387
+ }
12388
+ function parseArgumentHint2(hint) {
12389
+ if (Array.isArray(hint)) {
12390
+ return hint;
12391
+ }
12392
+ const bracketMatches = hint.match(/\[([^\]]+)\]/g);
12393
+ if (bracketMatches) {
12394
+ return bracketMatches.map((m) => m.replace(/^\[|\]$/g, ""));
12395
+ }
12396
+ return hint.split(/\s+/).filter(Boolean);
12397
+ }
12398
+ function generateFilename2() {
12399
+ return "AGENTS.md";
12400
+ }
12401
+ var init_to_codex = __esm({
12402
+ "../converters/dist/to-codex.js"() {
12403
+ "use strict";
12404
+ init_cjs_shims();
12405
+ }
12406
+ });
12407
+
12046
12408
  // ../converters/dist/to-mcp-server.js
12047
12409
  function toMCPServer(pkg) {
12048
12410
  var _a, _b;
@@ -12457,6 +12819,36 @@ var init_format_registry = __esm({
12457
12819
  }
12458
12820
  }
12459
12821
  },
12822
+ codex: {
12823
+ name: "OpenAI Codex CLI",
12824
+ description: "OpenAI Codex CLI using AGENTS.md for project instructions",
12825
+ subtypes: {
12826
+ rule: {
12827
+ directory: ".",
12828
+ filePatterns: ["AGENTS.md"],
12829
+ fileExtension: ".md"
12830
+ },
12831
+ "slash-command": {
12832
+ directory: ".",
12833
+ filePatterns: ["AGENTS.md"],
12834
+ fileExtension: ".md"
12835
+ },
12836
+ skill: {
12837
+ directory: ".openskills",
12838
+ filePatterns: ["*.md"],
12839
+ nested: true,
12840
+ usesPackageSubdirectory: true,
12841
+ fileExtension: ".md"
12842
+ },
12843
+ agent: {
12844
+ directory: ".openagents",
12845
+ filePatterns: ["*.md"],
12846
+ nested: true,
12847
+ usesPackageSubdirectory: true,
12848
+ fileExtension: ".md"
12849
+ }
12850
+ }
12851
+ },
12460
12852
  "gemini.md": {
12461
12853
  name: "GEMINI.md",
12462
12854
  description: "Gemini GEMINI.md project instructions",
@@ -12926,6 +13318,7 @@ __export(dist_exports, {
12926
13318
  fromZencoder: () => fromZencoder,
12927
13319
  geminiMdSchema: () => geminiMdSchema,
12928
13320
  geminiSchema: () => geminiSchema,
13321
+ generateCodexFilename: () => generateFilename2,
12929
13322
  generateMCPServerPackage: () => generateMCPServerPackage,
12930
13323
  generatePluginJson: () => generatePluginJson,
12931
13324
  generateZedFilename: () => generateFilename,
@@ -12990,6 +13383,7 @@ __export(dist_exports, {
12990
13383
  toClaude: () => toClaude,
12991
13384
  toClaudeMd: () => toClaudeMd,
12992
13385
  toClaudePlugin: () => toClaudePlugin,
13386
+ toCodex: () => toCodex,
12993
13387
  toContinue: () => toContinue,
12994
13388
  toCopilot: () => toCopilot,
12995
13389
  toCursor: () => toCursor,
@@ -13063,6 +13457,7 @@ var init_dist = __esm({
13063
13457
  init_to_zencoder();
13064
13458
  init_to_replit();
13065
13459
  init_to_zed();
13460
+ init_to_codex();
13066
13461
  init_to_mcp_server();
13067
13462
  init_taxonomy_utils();
13068
13463
  init_validation();
@@ -13124,14 +13519,15 @@ async function directoryExists(dirPath) {
13124
13519
  }
13125
13520
  function getManifestFilename(format) {
13126
13521
  switch (format) {
13127
- case "agents.md":
13128
- return "AGENTS.md";
13522
+ // Formats with custom manifest files
13129
13523
  case "gemini.md":
13130
13524
  return "GEMINI.md";
13131
13525
  case "claude.md":
13132
13526
  return "CLAUDE.md";
13133
13527
  case "aider":
13134
13528
  return "CONVENTIONS.md";
13529
+ // All other formats use AGENTS.md for progressive disclosure
13530
+ // Including: agents.md, codex, cursor, copilot, kiro, opencode, ruler, replit, zed, generic
13135
13531
  default:
13136
13532
  return "AGENTS.md";
13137
13533
  }
@@ -15904,6 +16300,7 @@ function getPackageIcon2(format, subtype) {
15904
16300
  "copilot": "\u2708\uFE0F",
15905
16301
  "kiro": "\u{1F3AF}",
15906
16302
  "gemini": "\u2728",
16303
+ "gemini-extension": "\u2728",
15907
16304
  "gemini.md": "\u2728",
15908
16305
  "claude.md": "\u{1F916}",
15909
16306
  "opencode": "\u26A1",
@@ -15913,6 +16310,7 @@ function getPackageIcon2(format, subtype) {
15913
16310
  "zencoder": "\u26A1",
15914
16311
  "replit": "\u{1F52E}",
15915
16312
  "zed": "\u26A1",
16313
+ "codex": "\u{1F9E0}",
15916
16314
  "mcp": "\u{1F517}",
15917
16315
  "agents.md": "\u{1F4DD}",
15918
16316
  "ruler": "\u{1F4CF}",
@@ -15929,6 +16327,7 @@ function getPackageLabel2(format, subtype) {
15929
16327
  "copilot": "GitHub Copilot",
15930
16328
  "kiro": "Kiro",
15931
16329
  "gemini": "Gemini",
16330
+ "gemini-extension": "Gemini Extension",
15932
16331
  "gemini.md": "Gemini",
15933
16332
  "claude.md": "Claude",
15934
16333
  "opencode": "OpenCode",
@@ -15938,6 +16337,7 @@ function getPackageLabel2(format, subtype) {
15938
16337
  "zencoder": "Zencoder",
15939
16338
  "replit": "Replit",
15940
16339
  "zed": "Zed",
16340
+ "codex": "Codex",
15941
16341
  "mcp": "MCP",
15942
16342
  "agents.md": "Agents.md",
15943
16343
  "ruler": "Ruler",
@@ -16198,7 +16598,7 @@ async function handleInstall(packageSpec, options) {
16198
16598
  const tarball = await client.downloadPackage(tarballUrl);
16199
16599
  const lockfileKeyForVerification = getLockfileKey(packageId, targetFormat);
16200
16600
  const existingEntry = lockfile == null ? void 0 : lockfile.packages[lockfileKeyForVerification];
16201
- if (existingEntry == null ? void 0 : existingEntry.integrity) {
16601
+ if ((existingEntry == null ? void 0 : existingEntry.integrity) && existingEntry.version === actualVersion) {
16202
16602
  console.log(` \u{1F512} Verifying integrity...`);
16203
16603
  const isValid = verifyPackageIntegrity(lockfile, packageId, tarball, targetFormat);
16204
16604
  if (!isValid) {
@@ -16358,6 +16758,9 @@ This could indicate:
16358
16758
  case "replit":
16359
16759
  convertedContent = toReplit(canonicalPkg).content;
16360
16760
  break;
16761
+ case "codex":
16762
+ convertedContent = toCodex(canonicalPkg).content;
16763
+ break;
16361
16764
  case "generic":
16362
16765
  convertedContent = toCursor(canonicalPkg).content;
16363
16766
  break;
@@ -16737,7 +17140,35 @@ ${afterFrontmatter}`;
16737
17140
  }
16738
17141
  }
16739
17142
  let progressiveDisclosureMetadata;
16740
- if ((effectiveFormat === "agents.md" || effectiveFormat === "gemini.md" || effectiveFormat === "claude.md" || effectiveFormat === "aider") && (effectiveSubtype === "skill" || effectiveSubtype === "agent") && !options.noAppend) {
17143
+ const progressiveDisclosureFormats = [
17144
+ "agents.md",
17145
+ // Universal AGENTS.md format
17146
+ "gemini.md",
17147
+ // Uses GEMINI.md
17148
+ "claude.md",
17149
+ // Uses CLAUDE.md
17150
+ "aider",
17151
+ // Uses CONVENTIONS.md
17152
+ "codex",
17153
+ // Uses AGENTS.md (no native skills)
17154
+ "cursor",
17155
+ // Uses AGENTS.md (no native skills)
17156
+ "copilot",
17157
+ // Uses AGENTS.md (no native skills)
17158
+ "kiro",
17159
+ // Uses AGENTS.md (no native skills)
17160
+ "opencode",
17161
+ // Uses AGENTS.md (no native skills)
17162
+ "ruler",
17163
+ // Uses AGENTS.md (no native skills)
17164
+ "replit",
17165
+ // Uses AGENTS.md (no native skills)
17166
+ "zed",
17167
+ // Uses AGENTS.md (no native skills)
17168
+ "generic"
17169
+ // Uses AGENTS.md (fallback format)
17170
+ ];
17171
+ if (progressiveDisclosureFormats.includes(effectiveFormat) && (effectiveSubtype === "skill" || effectiveSubtype === "agent") && !options.noAppend) {
16741
17172
  if (!destDir) {
16742
17173
  throw new Error("Internal error: destDir not set for progressive disclosure installation");
16743
17174
  }
@@ -19416,6 +19847,7 @@ function getPackageIcon(format, subtype) {
19416
19847
  "copilot": "\u2708\uFE0F",
19417
19848
  "kiro": "\u{1F3AF}",
19418
19849
  "gemini": "\u2728",
19850
+ "gemini-extension": "\u2728",
19419
19851
  "gemini.md": "\u2728",
19420
19852
  "claude.md": "\u{1F916}",
19421
19853
  "opencode": "\u26A1",
@@ -19425,6 +19857,7 @@ function getPackageIcon(format, subtype) {
19425
19857
  "zencoder": "\u26A1",
19426
19858
  "replit": "\u{1F52E}",
19427
19859
  "zed": "\u26A1",
19860
+ "codex": "\u{1F9E0}",
19428
19861
  "mcp": "\u{1F517}",
19429
19862
  "agents.md": "\u{1F4DD}",
19430
19863
  "ruler": "\u{1F4CF}",
@@ -19441,6 +19874,7 @@ function getPackageLabel(format, subtype) {
19441
19874
  "copilot": "GitHub Copilot",
19442
19875
  "kiro": "Kiro",
19443
19876
  "gemini": "Gemini",
19877
+ "gemini-extension": "Gemini Extension",
19444
19878
  "gemini.md": "Gemini",
19445
19879
  "claude.md": "Claude",
19446
19880
  "opencode": "OpenCode",
@@ -19450,6 +19884,7 @@ function getPackageLabel(format, subtype) {
19450
19884
  "zencoder": "Zencoder",
19451
19885
  "replit": "Replit",
19452
19886
  "zed": "Zed",
19887
+ "codex": "Codex",
19453
19888
  "mcp": "MCP",
19454
19889
  "agents.md": "Agents.md",
19455
19890
  "ruler": "Ruler",
@@ -23568,6 +24003,8 @@ function getDefaultPath(format, filename, subtype, customName) {
23568
24003
  return (0, import_path23.join)(process.cwd(), ".zencoder", `${baseName}.md`);
23569
24004
  case "droid":
23570
24005
  return (0, import_path23.join)(process.cwd(), ".factory", `${baseName}.md`);
24006
+ case "codex":
24007
+ return (0, import_path23.join)(process.cwd(), "AGENTS.md");
23571
24008
  default:
23572
24009
  throw new CLIError(`Unknown format: ${format}`);
23573
24010
  }
@@ -23819,6 +24256,9 @@ async function handleConvert(sourcePath, options) {
23819
24256
  case "droid":
23820
24257
  result = toDroid(canonicalPkg);
23821
24258
  break;
24259
+ case "codex":
24260
+ result = toCodex(canonicalPkg);
24261
+ break;
23822
24262
  default:
23823
24263
  throw new CLIError(`Unsupported target format: ${options.to}`);
23824
24264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Prompt Package Manager CLI - Install and manage prompt-based files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -45,9 +45,9 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "@octokit/rest": "^22.0.0",
48
- "@pr-pm/converters": "^2.1.0",
49
- "@pr-pm/registry-client": "^2.3.0",
50
- "@pr-pm/types": "^2.1.0",
48
+ "@pr-pm/converters": "^2.1.2",
49
+ "@pr-pm/registry-client": "^2.3.2",
50
+ "@pr-pm/types": "^2.1.2",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",