@c0x12c/spartan-ai-toolkit 1.12.0 → 1.14.0
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/VERSION +1 -1
- package/bin/cli.js +29 -1
- package/commands/spartan/build.md +205 -756
- package/commands/spartan/web-to-prd.md +284 -75
- package/lib/worktree.sh +104 -0
- package/package.json +4 -2
- package/skills/web-to-prd/SKILL.md +58 -54
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.14.0
|
package/bin/cli.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// npx spartan-ai-toolkit@latest --all
|
|
9
9
|
// npx spartan-ai-toolkit@latest --local
|
|
10
10
|
|
|
11
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync, cpSync, readdirSync } from 'node:fs';
|
|
11
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, cpSync, readdirSync, copyFileSync } from 'node:fs';
|
|
12
12
|
import { join, dirname, resolve as pathResolve } from 'node:path';
|
|
13
13
|
import { createInterface } from 'node:readline';
|
|
14
14
|
import { homedir } from 'node:os';
|
|
@@ -707,6 +707,34 @@ async function main() {
|
|
|
707
707
|
closeRL();
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
+
// Generate Codex-compatible skills for codex agent
|
|
711
|
+
if (agent === 'codex') {
|
|
712
|
+
console.log(`${blue('[+]')} ${bold('Generating Codex skills...')}`);
|
|
713
|
+
try {
|
|
714
|
+
const { execSync } = await import('child_process');
|
|
715
|
+
const repoRoot = join(PKG_ROOT, '..');
|
|
716
|
+
execSync('node toolkit/scripts/gen-codex-skills.js', { cwd: repoRoot, stdio: 'pipe' });
|
|
717
|
+
const srcAgents = join(repoRoot, '.agents', 'skills');
|
|
718
|
+
const targets = getTargets();
|
|
719
|
+
const destBase = join(targets.base, '..', '.agents', 'skills');
|
|
720
|
+
if (existsSync(srcAgents)) {
|
|
721
|
+
mkdirSync(destBase, { recursive: true });
|
|
722
|
+
const dirs = readdirSync(srcAgents, { withFileTypes: true }).filter(d => d.isDirectory());
|
|
723
|
+
for (const d of dirs) {
|
|
724
|
+
const destAgentsDir = join(destBase, d.name, 'agents');
|
|
725
|
+
mkdirSync(destAgentsDir, { recursive: true });
|
|
726
|
+
const skillSrc = join(srcAgents, d.name, 'SKILL.md');
|
|
727
|
+
const yamlSrc = join(srcAgents, d.name, 'agents', 'openai.yaml');
|
|
728
|
+
if (existsSync(skillSrc)) copyFileSync(skillSrc, join(destBase, d.name, 'SKILL.md'));
|
|
729
|
+
if (existsSync(yamlSrc)) copyFileSync(yamlSrc, join(destAgentsDir, 'openai.yaml'));
|
|
730
|
+
}
|
|
731
|
+
console.log(` ${green('+')} ${dirs.length} Codex skills generated in .agents/skills/\n`);
|
|
732
|
+
}
|
|
733
|
+
} catch (e) {
|
|
734
|
+
console.log(` ${C.yellow}Warning: Codex skill generation failed — ${e.message}${C.reset}\n`);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
710
738
|
// Export AGENTS.md alongside normal install when --format=agents-md
|
|
711
739
|
if (format === 'agents-md' && (agent === 'claude-code' || agent === 'codex')) {
|
|
712
740
|
const cwd = process.cwd();
|