@1tool/js-boost 1.3.0 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1tool/js-boost",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Laravel Boost-inspired CLI for JavaScript projects — generates agent files from your .ai/ folder",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1,27 +1,13 @@
1
1
  import { buildMcpMarkdownSection } from '../utils/mcp.js';
2
2
 
3
- /**
4
- * Generate AGENTS.md — the universal standard read by Codex, Cursor,
5
- * GitHub Copilot, Gemini CLI, and most other agents.
6
- *
7
- * This is the single source of truth. All other agent files reference this.
8
- */
9
- export function generateAgentsMd(guidelines, skills, mcpServers, config = {}) {
10
- const projectName = config.projectName || 'this project';
11
- const projectDescription = config.projectDescription || '';
3
+ export function generateAgentsMd(guidelines, skills, mcpServers) {
12
4
  const sections = [];
13
5
 
14
- // Header
15
- sections.push(`# AGENTS.md`);
16
- sections.push(`> Agent instructions for ${projectName}. Generated by [js-boost](https://github.com/your-org/js-boost) — do not edit manually.`);
17
- if (projectDescription) sections.push(`\n${projectDescription}`);
6
+ sections.push('# Project Guidelines');
18
7
  sections.push('');
19
-
20
- // Table of contents hint
21
8
  sections.push('---');
22
9
  sections.push('');
23
10
 
24
- // Guidelines — inline all content from .ai/guidelines/
25
11
  if (guidelines.length > 0) {
26
12
  sections.push('## Guidelines');
27
13
  sections.push('');
@@ -29,13 +15,11 @@ export function generateAgentsMd(guidelines, skills, mcpServers, config = {}) {
29
15
  sections.push('');
30
16
 
31
17
  for (const g of guidelines) {
32
- // Include the full content of each guideline file
33
18
  sections.push(g.content);
34
19
  sections.push('');
35
20
  }
36
21
  }
37
22
 
38
- // Skills — reference section with name + description
39
23
  if (skills.length > 0) {
40
24
  sections.push('## Agent Skills');
41
25
  sections.push('');
@@ -50,15 +34,9 @@ export function generateAgentsMd(guidelines, skills, mcpServers, config = {}) {
50
34
  }
51
35
  }
52
36
 
53
- // MCP section
54
37
  if (Object.keys(mcpServers).length > 0) {
55
38
  sections.push(buildMcpMarkdownSection(mcpServers));
56
39
  }
57
40
 
58
- // Footer
59
- sections.push('---');
60
- sections.push('');
61
- sections.push('*This file is auto-generated by `js-boost`. Run `npx js-boost generate` to regenerate.*');
62
-
63
41
  return sections.join('\n');
64
42
  }
@@ -7,13 +7,10 @@ import { buildMcpMarkdownSection } from '../utils/mcp.js';
7
7
  * guidelines content here (Claude benefits from having everything upfront),
8
8
  * plus Claude-specific directives for loading skills.
9
9
  */
10
- export function generateClaudeMd(guidelines, skills, mcpServers, config = {}) {
11
- const projectName = config.projectName || 'this project';
10
+ export function generateClaudeMd(guidelines, skills, mcpServers) {
12
11
  const sections = [];
13
12
 
14
- sections.push(`# CLAUDE.md — ${projectName}`);
15
- sections.push('');
16
- sections.push('> Generated by [js-boost](https://github.com/your-org/js-boost). Do not edit manually — edit `.ai/guidelines/` and `.ai/skills/` instead, then run `npx js-boost generate`.');
13
+ sections.push('# Project Guidelines');
17
14
  sections.push('');
18
15
  sections.push('---');
19
16
  sections.push('');
@@ -1,11 +1,4 @@
1
- /**
2
- * Generate .cursor/rules/js-boost.mdc for Cursor.
3
- *
4
- * Cursor reads .cursorrules (legacy) or .cursor/rules/*.mdc (v0.43+).
5
- * We generate the modern .cursor/rules/ format.
6
- * Each guideline becomes its own rule file for better organization.
7
- */
8
- export function generateCursorRules(guidelines, skills, config = {}) {
1
+ export function generateCursorRules(guidelines, skills) {
9
2
  const sections = [];
10
3
 
11
4
  sections.push('---');
@@ -14,8 +7,9 @@ export function generateCursorRules(guidelines, skills, config = {}) {
14
7
  sections.push('alwaysApply: true');
15
8
  sections.push('---');
16
9
  sections.push('');
10
+ sections.push('# Project Guidelines');
11
+ sections.push('');
17
12
 
18
- // Inline all guidelines
19
13
  if (guidelines.length > 0) {
20
14
  for (const g of guidelines) {
21
15
  sections.push(g.content);
@@ -23,7 +17,6 @@ export function generateCursorRules(guidelines, skills, config = {}) {
23
17
  }
24
18
  }
25
19
 
26
- // Skills reference
27
20
  if (skills.length > 0) {
28
21
  sections.push('## Available Skills');
29
22
  sections.push('');
@@ -34,25 +27,17 @@ export function generateCursorRules(guidelines, skills, config = {}) {
34
27
  sections.push('');
35
28
  }
36
29
 
37
- sections.push('---');
38
- sections.push('*Auto-generated by `js-boost`*');
39
-
40
30
  return sections.join('\n');
41
31
  }
42
32
 
43
- /**
44
- * Also generate legacy .cursorrules for older Cursor versions
45
- */
46
- export function generateCursorRulesLegacy(guidelines, skills, config = {}) {
33
+ export function generateCursorRulesLegacy(guidelines, skills) {
47
34
  const sections = [];
48
35
 
49
- sections.push('# Cursor Rules');
50
- sections.push('# Generated by js-boost — edit .ai/guidelines/ instead');
36
+ sections.push('# Project Guidelines');
51
37
  sections.push('');
52
38
 
53
39
  if (guidelines.length > 0) {
54
40
  for (const g of guidelines) {
55
- // Strip markdown headings for legacy format compatibility
56
41
  sections.push(g.content);
57
42
  sections.push('');
58
43
  }
@@ -60,8 +45,10 @@ export function generateCursorRulesLegacy(guidelines, skills, config = {}) {
60
45
 
61
46
  if (skills.length > 0) {
62
47
  sections.push('## Skills');
48
+ sections.push('');
63
49
  for (const skill of skills) {
64
- sections.push(`- ${skill.name}: .ai/skills/${skill.dir}/SKILL.md`);
50
+ sections.push(`- **${skill.name}**: .ai/skills/${skill.dir}/SKILL.md`);
51
+ if (skill.description) sections.push(` ${skill.description}`);
65
52
  }
66
53
  }
67
54
 
@@ -1,20 +1,9 @@
1
- /**
2
- * Generate .junie/guidelines.md for JetBrains Junie.
3
- *
4
- * Junie reads .junie/guidelines.md and uses it as persistent context
5
- * for every task. Skills need to be referenced explicitly since Junie
6
- * doesn't auto-load them from directories.
7
- */
8
- export function generateJunieGuidelines(guidelines, skills, config = {}) {
9
- const projectName = config.projectName || 'this project';
1
+ export function generateJunieGuidelines(guidelines, skills) {
10
2
  const sections = [];
11
3
 
12
- sections.push(`# Junie Guidelines — ${projectName}`);
13
- sections.push('');
14
- sections.push('> Generated by [js-boost](https://github.com/your-org/js-boost). Do not edit manually.');
4
+ sections.push('# Project Guidelines');
15
5
  sections.push('');
16
6
 
17
- // Inline all guidelines
18
7
  if (guidelines.length > 0) {
19
8
  for (const g of guidelines) {
20
9
  sections.push(g.content);
@@ -22,7 +11,6 @@ export function generateJunieGuidelines(guidelines, skills, config = {}) {
22
11
  }
23
12
  }
24
13
 
25
- // Skills reference
26
14
  if (skills.length > 0) {
27
15
  sections.push('## Available Skills');
28
16
  sections.push('');
@@ -35,8 +23,5 @@ export function generateJunieGuidelines(guidelines, skills, config = {}) {
35
23
  sections.push('');
36
24
  }
37
25
 
38
- sections.push('---');
39
- sections.push('*Auto-generated by `js-boost`. Source: `.ai/`*');
40
-
41
26
  return sections.join('\n');
42
27
  }
@@ -1,16 +1,11 @@
1
- /**
2
- * Generate .kiro/steering/guidelines.md
3
- * Kiro uses steering documents in .kiro/steering/ for project context.
4
- */
5
- export function generateKiroSteering(guidelines, skills, config) {
6
- const projectName = config.projectName || 'This project';
1
+ export function generateKiroSteering(guidelines, skills) {
7
2
  const lines = [];
8
3
 
9
4
  lines.push('---');
10
5
  lines.push('inclusion: always');
11
6
  lines.push('---');
12
7
  lines.push('');
13
- lines.push(`# ${projectName} — AI Guidelines`);
8
+ lines.push('# Project Guidelines');
14
9
  lines.push('');
15
10
 
16
11
  if (guidelines.length > 0) {
@@ -21,15 +16,16 @@ export function generateKiroSteering(guidelines, skills, config) {
21
16
  }
22
17
 
23
18
  if (skills.length > 0) {
24
- lines.push('## Skills');
19
+ lines.push('## Available Skills');
25
20
  lines.push('');
26
- lines.push('The following skills are available for this project:');
21
+ lines.push('The following skill files contain detailed patterns. Read the relevant SKILL.md before working on tasks in that domain:');
27
22
  lines.push('');
28
23
  for (const skill of skills) {
29
- lines.push(`- **${skill.name}**: ${skill.description || skill.dir}`);
24
+ lines.push(`- **${skill.name}**: \`.ai/skills/${skill.dir}/SKILL.md\``);
25
+ if (skill.description) lines.push(` ${skill.description}`);
30
26
  }
31
27
  lines.push('');
32
28
  }
33
29
 
34
30
  return lines.join('\n');
35
- }
31
+ }
package/src/utils/mcp.js CHANGED
@@ -34,18 +34,17 @@ export function generateMcpJson(servers) {
34
34
 
35
35
  for (const [key, server] of Object.entries(servers)) {
36
36
  if (server.type === 'http') {
37
- const args = ['-y', 'mcp-remote', server.url];
38
- if (server.headers) {
39
- for (const [k, v] of Object.entries(server.headers)) {
40
- args.push('--header', `${k}: ${v}`);
41
- }
42
- }
43
- mcpServers[key] = { command: 'npx', args };
37
+ mcpServers[key] = {
38
+ type: 'http',
39
+ url: server.url,
40
+ ...(server.headers ? { headers: server.headers } : {}),
41
+ };
44
42
  } else if (server.command) {
45
43
  mcpServers[key] = {
44
+ type: 'stdio',
46
45
  command: server.command,
47
46
  args: server.args || [],
48
- ...(server.env ? { env: server.env } : {}),
47
+ env: server.env || {},
49
48
  };
50
49
  }
51
50
  }