worclaude 1.3.4 → 1.3.6
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 +1 -1
- package/src/commands/init.js +9 -7
- package/src/core/merger.js +6 -6
- package/src/core/scaffolder.js +3 -1
- package/src/data/agents.js +7 -7
- /package/templates/{claude-md.md → core/claude-md.md} +0 -0
- /package/templates/{mcp-json.json → core/mcp-json.json} +0 -0
- /package/templates/{progress-md.md → core/progress-md.md} +0 -0
- /package/templates/{workflow-meta.json → core/workflow-meta.json} +0 -0
- /package/templates/{spec-md-backend.md → specs/spec-md-backend.md} +0 -0
- /package/templates/{spec-md-cli.md → specs/spec-md-cli.md} +0 -0
- /package/templates/{spec-md-data.md → specs/spec-md-data.md} +0 -0
- /package/templates/{spec-md-devops.md → specs/spec-md-devops.md} +0 -0
- /package/templates/{spec-md-frontend.md → specs/spec-md-frontend.md} +0 -0
- /package/templates/{spec-md-fullstack.md → specs/spec-md-fullstack.md} +0 -0
- /package/templates/{spec-md-library.md → specs/spec-md-library.md} +0 -0
- /package/templates/{spec-md.md → specs/spec-md.md} +0 -0
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -380,7 +380,7 @@ async function scaffoldFresh(projectRoot, selections, variables, settingsStr, ve
|
|
|
380
380
|
const spinner = ora('Creating workflow structure...').start();
|
|
381
381
|
|
|
382
382
|
try {
|
|
383
|
-
await scaffoldFile('claude-md.md', 'CLAUDE.md', variables, projectRoot);
|
|
383
|
+
await scaffoldFile('core/claude-md.md', 'CLAUDE.md', variables, projectRoot);
|
|
384
384
|
spinner.text = 'Created CLAUDE.md';
|
|
385
385
|
|
|
386
386
|
await writeFile(path.join(projectRoot, '.claude', 'settings.json'), settingsStr);
|
|
@@ -444,7 +444,7 @@ async function scaffoldFresh(projectRoot, selections, variables, settingsStr, ve
|
|
|
444
444
|
);
|
|
445
445
|
spinner.text = 'Created agent routing guide';
|
|
446
446
|
|
|
447
|
-
await scaffoldFile('mcp-json.json', '.mcp.json', {}, projectRoot);
|
|
447
|
+
await scaffoldFile('core/mcp-json.json', '.mcp.json', {}, projectRoot);
|
|
448
448
|
spinner.text = 'Created .mcp.json';
|
|
449
449
|
|
|
450
450
|
await updateGitignore(projectRoot);
|
|
@@ -456,7 +456,7 @@ async function scaffoldFresh(projectRoot, selections, variables, settingsStr, ve
|
|
|
456
456
|
|
|
457
457
|
if (!(await fileExists(progressPath))) {
|
|
458
458
|
await scaffoldFile(
|
|
459
|
-
'progress-md.md',
|
|
459
|
+
'core/progress-md.md',
|
|
460
460
|
path.join('docs', 'spec', 'PROGRESS.md'),
|
|
461
461
|
variables,
|
|
462
462
|
projectRoot
|
|
@@ -466,7 +466,7 @@ async function scaffoldFresh(projectRoot, selections, variables, settingsStr, ve
|
|
|
466
466
|
}
|
|
467
467
|
if (!(await fileExists(specPath))) {
|
|
468
468
|
const primaryType = projectTypes[0];
|
|
469
|
-
const specTemplate = SPEC_MD_TEMPLATE_MAP[primaryType] || 'spec-md.md';
|
|
469
|
+
const specTemplate = SPEC_MD_TEMPLATE_MAP[primaryType] || 'specs/spec-md.md';
|
|
470
470
|
await scaffoldFile(
|
|
471
471
|
specTemplate,
|
|
472
472
|
path.join('docs', 'spec', 'SPEC.md'),
|
|
@@ -505,9 +505,11 @@ function displayFreshSuccess(selections, skipped) {
|
|
|
505
505
|
display.success('.gitignore');
|
|
506
506
|
if (skipped.progressMd) {
|
|
507
507
|
display.dim(' docs/spec/PROGRESS.md — already exists, skipped');
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
|
|
508
|
+
}
|
|
509
|
+
if (skipped.specMd) {
|
|
510
|
+
display.dim(' docs/spec/SPEC.md — already exists, skipped');
|
|
511
|
+
}
|
|
512
|
+
if (!skipped.progressMd && !skipped.specMd) {
|
|
511
513
|
display.success(`docs/spec/${display.dimColor(' PROGRESS.md, SPEC.md')}`);
|
|
512
514
|
}
|
|
513
515
|
|
package/src/core/merger.js
CHANGED
|
@@ -321,14 +321,14 @@ function countHooks(hooks) {
|
|
|
321
321
|
|
|
322
322
|
async function mergeMcpJson(projectRoot, existingScan) {
|
|
323
323
|
if (!existingScan.hasMcpJson) {
|
|
324
|
-
await scaffoldFile('mcp-json.json', '.mcp.json', {}, projectRoot);
|
|
324
|
+
await scaffoldFile('core/mcp-json.json', '.mcp.json', {}, projectRoot);
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// Merge mcpServers — user's servers take priority
|
|
329
329
|
const existingRaw = await readFile(path.join(projectRoot, '.mcp.json'));
|
|
330
330
|
const existing = parseUserJson(existingRaw, '.mcp.json');
|
|
331
|
-
const workflowRaw = await readTemplate('mcp-json.json');
|
|
331
|
+
const workflowRaw = await readTemplate('core/mcp-json.json');
|
|
332
332
|
const workflow = JSON.parse(workflowRaw);
|
|
333
333
|
|
|
334
334
|
const merged = {
|
|
@@ -342,7 +342,7 @@ async function mergeMcpJson(projectRoot, existingScan) {
|
|
|
342
342
|
async function mergeDocSpecs(projectRoot, existingScan, variables, selections, report) {
|
|
343
343
|
if (!existingScan.hasProgressMd) {
|
|
344
344
|
await scaffoldFile(
|
|
345
|
-
'progress-md.md',
|
|
345
|
+
'core/progress-md.md',
|
|
346
346
|
path.join('docs', 'spec', 'PROGRESS.md'),
|
|
347
347
|
variables,
|
|
348
348
|
projectRoot
|
|
@@ -352,7 +352,7 @@ async function mergeDocSpecs(projectRoot, existingScan, variables, selections, r
|
|
|
352
352
|
|
|
353
353
|
if (!existingScan.hasSpecMd) {
|
|
354
354
|
const primaryType = selections.projectTypes[0];
|
|
355
|
-
const specTemplate = SPEC_MD_TEMPLATE_MAP[primaryType] || 'spec-md.md';
|
|
355
|
+
const specTemplate = SPEC_MD_TEMPLATE_MAP[primaryType] || 'specs/spec-md.md';
|
|
356
356
|
await scaffoldFile(specTemplate, path.join('docs', 'spec', 'SPEC.md'), variables, projectRoot);
|
|
357
357
|
}
|
|
358
358
|
report.skipped.specMd = existingScan.hasSpecMd;
|
|
@@ -361,13 +361,13 @@ async function mergeDocSpecs(projectRoot, existingScan, variables, selections, r
|
|
|
361
361
|
async function handleClaudeMd(projectRoot, existingScan, variables, report) {
|
|
362
362
|
if (!existingScan.hasClaudeMd) {
|
|
363
363
|
// No CLAUDE.md — scaffold fresh
|
|
364
|
-
await scaffoldFile('claude-md.md', 'CLAUDE.md', variables, projectRoot);
|
|
364
|
+
await scaffoldFile('core/claude-md.md', 'CLAUDE.md', variables, projectRoot);
|
|
365
365
|
report.claudeMdHandling = 'created';
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
const existingContent = await readFile(path.join(projectRoot, 'CLAUDE.md'));
|
|
370
|
-
const renderedTemplate = substituteVariables(await readTemplate('claude-md.md'), variables);
|
|
370
|
+
const renderedTemplate = substituteVariables(await readTemplate('core/claude-md.md'), variables);
|
|
371
371
|
const missingSections = detectMissingSections(existingContent);
|
|
372
372
|
|
|
373
373
|
if (missingSections.length === 0) {
|
package/src/core/scaffolder.js
CHANGED
|
@@ -50,8 +50,10 @@ export async function updateGitignore(projectDir) {
|
|
|
50
50
|
const header = '# Worclaude (generated workflow files)';
|
|
51
51
|
|
|
52
52
|
let content = '';
|
|
53
|
-
|
|
53
|
+
try {
|
|
54
54
|
content = await fs.readFile(gitignorePath, 'utf8');
|
|
55
|
+
} catch (err) {
|
|
56
|
+
if (err.code !== 'ENOENT') throw err;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
const missing = entries.filter((entry) => !content.includes(entry));
|
package/src/data/agents.js
CHANGED
|
@@ -283,13 +283,13 @@ export const PROJECT_TYPE_TO_CATEGORIES = {
|
|
|
283
283
|
};
|
|
284
284
|
|
|
285
285
|
export const SPEC_MD_TEMPLATE_MAP = {
|
|
286
|
-
'Full-stack web application': 'spec-md-fullstack.md',
|
|
287
|
-
'Backend / API': 'spec-md-backend.md',
|
|
288
|
-
'Frontend / UI': 'spec-md-frontend.md',
|
|
289
|
-
'CLI tool': 'spec-md-cli.md',
|
|
290
|
-
'Data / ML / AI': 'spec-md-data.md',
|
|
291
|
-
'Library / Package': 'spec-md-library.md',
|
|
292
|
-
'DevOps / Infrastructure': 'spec-md-devops.md',
|
|
286
|
+
'Full-stack web application': 'specs/spec-md-fullstack.md',
|
|
287
|
+
'Backend / API': 'specs/spec-md-backend.md',
|
|
288
|
+
'Frontend / UI': 'specs/spec-md-frontend.md',
|
|
289
|
+
'CLI tool': 'specs/spec-md-cli.md',
|
|
290
|
+
'Data / ML / AI': 'specs/spec-md-data.md',
|
|
291
|
+
'Library / Package': 'specs/spec-md-library.md',
|
|
292
|
+
'DevOps / Infrastructure': 'specs/spec-md-devops.md',
|
|
293
293
|
};
|
|
294
294
|
|
|
295
295
|
export const CONFIRMATION_STEPS = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|