@solidactions/cli 1.5.0 → 1.6.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/README.md CHANGED
@@ -12,7 +12,7 @@ npm install -g @solidactions/cli
12
12
 
13
13
  ```bash
14
14
  solidactions init <api-key> # Initialize (prompts for workspace)
15
- solidactions init <api-key> --workspace <name> # Initialize with workspace
15
+ solidactions ai init # Install AI skills and SDK reference (required for AI-assisted dev)
16
16
  solidactions project deploy <project> <path> # Deploy a project
17
17
  solidactions run start <project> <workflow> # Trigger a workflow
18
18
  solidactions run view <run-id> # Inspect a run
@@ -127,16 +127,20 @@ Use `solidactions <command> --help` for full flag details on any command.
127
127
 
128
128
  | Command | Key Flags | Description |
129
129
  |---------|-----------|-------------|
130
- | `ai init` | `--claude`, `--agents`, `--no-skills` | Install AI helper docs |
130
+ | `ai init` | `--claude`, `--agents` | Install AI skills and SDK reference |
131
131
  | `ai examples [names...]` | `--all`, `--overwrite` | Install example workflows |
132
132
 
133
- By default, `ai init` also installs three lazy-loaded SolidActions skills
134
- into `.claude/skills/`. These activate automatically when you scaffold a
135
- project, write workflow code, or deploy. The CLAUDE.md injection becomes
136
- a slim pointer to keep always-loaded context light.
137
-
138
- Pass `--no-skills` to skip the skill install and get the legacy full
139
- CLAUDE.md content instead.
133
+ `ai init` installs three auto-activating SolidActions skills and a
134
+ full SDK reference into your project:
135
+
136
+ - Skills go to `.claude/skills/` (for `--claude` / Claude Code) or
137
+ `.agents/skills/` (for `--agents` / Codex, Cursor, Gemini, Windsurf).
138
+ Codex auto-discovers the `.agents/skills/` path see
139
+ https://developers.openai.com/codex/skills.
140
+ - The SDK reference is saved to `.solidactions/sdk-reference.md`.
141
+ - A slim pointer section is injected into `CLAUDE.md` or `AGENTS.md`
142
+ listing the skills and inlining the highest-cost hard rules
143
+ (determinism, step discipline, messaging) as a safety net.
140
144
 
141
145
  ## Development
142
146
 
@@ -14,7 +14,7 @@ const markers_1 = require("../utils/markers");
14
14
  const skills_1 = require("../utils/skills");
15
15
  async function aiInit(options = {}) {
16
16
  try {
17
- // Determine target file
17
+ // Determine target file.
18
18
  let targetFile;
19
19
  if (options.claude && options.agents) {
20
20
  console.error(chalk_1.default.red('Please specify only one of --claude or --agents'));
@@ -32,8 +32,8 @@ async function aiInit(options = {}) {
32
32
  name: 'file',
33
33
  message: 'Which AI helper file?',
34
34
  choices: [
35
- { title: 'CLAUDE.md', value: 'CLAUDE.md' },
36
- { title: 'AGENTS.md', value: 'AGENTS.md' },
35
+ { title: 'CLAUDE.md (Claude Code)', value: 'CLAUDE.md' },
36
+ { title: 'AGENTS.md (Codex, Cursor, Gemini, etc.)', value: 'AGENTS.md' },
37
37
  ],
38
38
  });
39
39
  if (!response.file) {
@@ -42,58 +42,27 @@ async function aiInit(options = {}) {
42
42
  }
43
43
  targetFile = response.file;
44
44
  }
45
- // Decide whether to install skills (default true; --no-skills opts out)
46
- const installSkillsEnabled = options.skills !== false;
47
- // Determine skill targets if installing.
48
- // Skills are Claude Code-specific (.claude/skills/) and not meaningful for other AI tools.
49
- let skillTargets = [];
50
- if (installSkillsEnabled && targetFile === 'CLAUDE.md') {
51
- skillTargets = (0, skills_1.detectSkillTargets)();
52
- if (skillTargets.length === 0) {
53
- const resp = await (0, prompts_1.default)({
54
- type: 'confirm',
55
- name: 'create',
56
- message: 'No `.claude/` directory found. Create `.claude/skills/` for SolidActions skills?',
57
- initial: true,
58
- });
59
- if (resp.create === undefined) {
60
- // User cancelled (Ctrl+C) — treat as abort, not decline
61
- console.log(chalk_1.default.yellow('Cancelled.'));
62
- process.exit(0);
63
- }
64
- else if (resp.create) {
65
- skillTargets = [path_1.default.join(process.cwd(), '.claude', 'skills')];
66
- }
67
- else {
68
- console.log(chalk_1.default.yellow('Skipping skill install. Run with --no-skills to silence this prompt.'));
69
- }
70
- }
71
- }
72
45
  console.log(chalk_1.default.blue('Fetching AI helper content...'));
73
- // Fetch CLAUDE.md content (slim pointer if skills installed, else full)
74
- const aiContent = await (0, skills_1.fetchClaudeMdContent)(skillTargets.length > 0);
75
- // Fetch SDK reference (always)
46
+ // Fetch slim helper content for the chosen target.
47
+ const aiContent = await (0, skills_1.fetchAiHelperContent)(targetFile);
48
+ // Fetch SDK reference (always).
76
49
  const sdkContent = await (0, github_1.fetchRawFile)('SolidActions', 'solidactions-ts-sdk', 'docs/sdk-reference.md');
77
- // Save SDK reference to .solidactions/sdk-reference.md
50
+ // Save SDK reference to .solidactions/sdk-reference.md.
78
51
  fs_extra_1.default.ensureDirSync('.solidactions');
79
52
  fs_1.default.writeFileSync('.solidactions/sdk-reference.md', sdkContent, 'utf8');
80
53
  console.log(chalk_1.default.green('✓ SDK reference saved to .solidactions/sdk-reference.md'));
81
- // Install skills if enabled and targets exist
82
- if (skillTargets.length > 0) {
83
- console.log(chalk_1.default.blue('Installing SolidActions skills...'));
84
- const { written } = await (0, skills_1.installSkills)(skillTargets);
85
- for (const f of written) {
86
- console.log(chalk_1.default.green(`✓ ${path_1.default.relative(process.cwd(), f)}`));
87
- }
54
+ // Always install skills no prompt. The user chose `ai init <target>`,
55
+ // so they want AI tooling set up.
56
+ const targetDir = (0, skills_1.skillTargetDir)(targetFile);
57
+ console.log(chalk_1.default.blue(`Installing SolidActions skills to ${path_1.default.relative(process.cwd(), targetDir)}/ ...`));
58
+ const { written } = await (0, skills_1.installSkills)(targetDir);
59
+ for (const f of written) {
60
+ console.log(chalk_1.default.green(`✓ ${path_1.default.relative(process.cwd(), f)}`));
88
61
  }
89
- // Upsert main AI helper section
62
+ // Upsert the AI helper marker section.
90
63
  (0, markers_1.upsertMarkerSection)(targetFile, 'SolidActions', aiContent);
91
- // Upsert SDK reference pointer section
92
- const sdkReferenceNote = `## SolidActions SDK Reference
93
-
94
- The full SDK API reference is available at \`.solidactions/sdk-reference.md\`. Refer to it for detailed function signatures, error classes, retry configuration, and advanced patterns like forking, streaming, and signal URLs.`;
95
- (0, markers_1.upsertMarkerSection)(targetFile, 'SolidActions SDK Reference', sdkReferenceNote);
96
64
  console.log(chalk_1.default.green(`✓ AI helper installed to ${targetFile}`));
65
+ console.log(chalk_1.default.gray(' Existing files may still contain a separate "SolidActions SDK Reference" marker block from older CLI versions. That content is now redundant and can be deleted manually.'));
97
66
  }
98
67
  catch (error) {
99
68
  if (error.message?.includes('rate limit')) {
@@ -152,6 +152,9 @@ async function init(apiKey, options) {
152
152
  console.log(chalk_1.default.yellow('Could not set workspace. Run `solidactions workspace set` later.'));
153
153
  }
154
154
  console.log('');
155
+ console.log(chalk_1.default.blue('Next step — install AI helper docs and skills:'));
156
+ console.log(chalk_1.default.gray(' solidactions ai init Picks CLAUDE.md or AGENTS.md interactively'));
157
+ console.log('');
155
158
  console.log(chalk_1.default.blue('Quick start:'));
156
159
  console.log(chalk_1.default.gray(' solidactions project deploy <name> Deploy current directory'));
157
160
  console.log(chalk_1.default.gray(' solidactions run start <proj> <wf> Run a workflow'));
package/dist/index.js CHANGED
@@ -311,10 +311,9 @@ workspace
311
311
  const ai = program.command('ai').description('AI helper tools');
312
312
  ai
313
313
  .command('init')
314
- .description('Install AI helper documentation (CLAUDE.md or AGENTS.md) for AI-assisted workflow development')
314
+ .description('Install SolidActions AI skills and SDK reference for AI-assisted development')
315
315
  .option('--claude', 'Use CLAUDE.md (for Claude Code)')
316
- .option('--agents', 'Use AGENTS.md (for Cursor, Windsurf, etc.)')
317
- .option('--no-skills', 'Skip installing SolidActions skill files (uses legacy full CLAUDE.md injection)')
316
+ .option('--agents', 'Use AGENTS.md (for Codex, Cursor, Gemini, Windsurf, etc.)')
318
317
  .action((options) => { (0, ai_init_1.aiInit)(options); });
319
318
  ai
320
319
  .command('examples')
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.detectSkillTargets = detectSkillTargets;
6
+ exports.skillTargetDir = skillTargetDir;
7
7
  exports.installSkills = installSkills;
8
- exports.fetchClaudeMdContent = fetchClaudeMdContent;
8
+ exports.fetchAiHelperContent = fetchAiHelperContent;
9
9
  const fs_1 = __importDefault(require("fs"));
10
10
  const path_1 = __importDefault(require("path"));
11
11
  const fs_extra_1 = __importDefault(require("fs-extra"));
@@ -19,53 +19,41 @@ const EXAMPLES_OWNER = 'SolidActions';
19
19
  const EXAMPLES_REPO = 'solidactions-examples';
20
20
  const SKILLS_PATH_PREFIX = 'skills';
21
21
  /**
22
- * Detect which AI-tool skill directories should receive skills.
23
- * Returns absolute paths to the target skills/ subdirectories.
22
+ * Resolve the skills directory for an AI helper target.
24
23
  *
25
- * v1 supports Claude Code only. Codex was resolved as user-global
26
- * (~/.codex/skills) with no project-local equivalent, so it is
27
- * intentionally NOT a target here.
24
+ * - `CLAUDE.md` `<cwd>/.claude/skills/` (Claude Code convention)
25
+ * - `AGENTS.md` → `<cwd>/.agents/skills/` (Codex auto-discovers this path;
26
+ * Cursor/Gemini read via AGENTS.md pointers)
28
27
  *
29
- * Detection rules:
30
- * - If `.claude/` exists in cwd → include `.claude/skills/`
31
- * - If neither exists → return empty (caller should prompt)
28
+ * The directory does not need to exist — the caller creates it.
32
29
  */
33
- function detectSkillTargets(cwd = process.cwd()) {
34
- const targets = [];
35
- if (fs_1.default.existsSync(path_1.default.join(cwd, '.claude'))) {
36
- targets.push(path_1.default.join(cwd, '.claude', 'skills'));
30
+ function skillTargetDir(targetFile, cwd = process.cwd()) {
31
+ if (targetFile === 'CLAUDE.md') {
32
+ return path_1.default.join(cwd, '.claude', 'skills');
37
33
  }
38
- return targets;
34
+ return path_1.default.join(cwd, '.agents', 'skills');
39
35
  }
40
36
  /**
41
37
  * Fetch all SolidActions skill files from the examples repo and write
42
- * them into each target directory. Overwrites existing files (skills
38
+ * them into the target directory. Overwrites existing files (skills
43
39
  * are versioned upstream).
44
40
  */
45
- async function installSkills(targetDirs) {
41
+ async function installSkills(targetDir) {
46
42
  const written = [];
47
- for (const dir of targetDirs) {
48
- fs_extra_1.default.ensureDirSync(dir);
49
- }
43
+ fs_extra_1.default.ensureDirSync(targetDir);
50
44
  for (const skillName of SKILL_NAMES) {
51
45
  const remotePath = `${SKILLS_PATH_PREFIX}/${skillName}.md`;
52
46
  const content = await (0, github_1.fetchRawFile)(EXAMPLES_OWNER, EXAMPLES_REPO, remotePath);
53
- for (const dir of targetDirs) {
54
- const filePath = path_1.default.join(dir, `${skillName}.md`);
55
- fs_1.default.writeFileSync(filePath, content, 'utf8');
56
- written.push(filePath);
57
- }
47
+ const filePath = path_1.default.join(targetDir, `${skillName}.md`);
48
+ fs_1.default.writeFileSync(filePath, content, 'utf8');
49
+ written.push(filePath);
58
50
  }
59
51
  return { written };
60
52
  }
61
53
  /**
62
- * Pick the right CLAUDE.md content variant from the examples repo
63
- * based on whether skills are being installed.
64
- *
65
- * - skillsInstalled = true → fetches CLAUDE-skills-pointer.md (slim)
66
- * - skillsInstalled = false → fetches CLAUDE.md (full, legacy)
54
+ * Fetch the slim AI-helper content for the target file from the examples
55
+ * repo. Single source per target no legacy fallback.
67
56
  */
68
- async function fetchClaudeMdContent(skillsInstalled) {
69
- const file = skillsInstalled ? 'CLAUDE-skills-pointer.md' : 'CLAUDE.md';
70
- return (0, github_1.fetchRawFile)(EXAMPLES_OWNER, EXAMPLES_REPO, file);
57
+ async function fetchAiHelperContent(targetFile) {
58
+ return (0, github_1.fetchRawFile)(EXAMPLES_OWNER, EXAMPLES_REPO, targetFile);
71
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidactions/cli",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "SolidActions CLI - Deploy and manage workflow automation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {