@guru-ai-product/ai-product-kit 0.2.251117175346 → 0.2.251117192248
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/bin/setup.js +129 -14
- package/package.json +1 -1
- package/skills/aipk_aso-new-release/GURU_AI.md +1 -1
- package/skills/aipk_development/GURU_AI.md +1 -1
- package/skills/aipk_format-requirement-pages-with-design/GURU_AI.md +1 -1
- package/skills/aipk_init_project/GURU_AI.md +2 -2
- package/skills/aipk_initiative-planning/GURU_AI.md +1 -1
- package/skills/aipk_requirements-changes/GURU_AI.md +1 -1
- package/skills/aipk_requirements-documentation/GURU_AI.md +1 -1
- package/skills/aipk_requirements-intake/GURU_AI.md +1 -1
- package/skills/aipk_skill_generate/GURU_AI.md +1 -1
- package/skills/aipk_tool_prompts/GURU_AI.md +1 -1
- package/skills/aipk_update-requirements-from-design/GURU_AI.md +1 -1
package/bin/setup.js
CHANGED
|
@@ -110,8 +110,8 @@ function ensureAgentsMd() {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
const skills = collectSkillMetadata();
|
|
113
|
-
const
|
|
114
|
-
const updated =
|
|
113
|
+
const newTemplate = renderAgentsTemplateForSkills(skills);
|
|
114
|
+
const updated = mergeAgentsContent(content, newTemplate);
|
|
115
115
|
|
|
116
116
|
if (updated !== content) {
|
|
117
117
|
fs.writeFileSync(agentsPath, updated, 'utf8');
|
|
@@ -242,20 +242,135 @@ function generateSkillEntries(skills) {
|
|
|
242
242
|
.join('\n\n');
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
function
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
function mergeAgentsContent(existingContent, newTemplate) {
|
|
246
|
+
const templateParts = parseTemplate(newTemplate);
|
|
247
|
+
const existingParts = parseExistingContent(existingContent);
|
|
248
|
+
|
|
249
|
+
const parts = [];
|
|
250
|
+
|
|
251
|
+
if (existingParts.beforeProjectOverview) {
|
|
252
|
+
parts.push(existingParts.beforeProjectOverview);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (existingParts.projectOverview) {
|
|
256
|
+
parts.push(existingParts.projectOverview);
|
|
257
|
+
} else if (templateParts.projectOverview) {
|
|
258
|
+
parts.push(templateParts.projectOverview);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (templateParts.conventions) {
|
|
262
|
+
parts.push(templateParts.conventions);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (templateParts.skillsBundleAccess) {
|
|
266
|
+
parts.push(templateParts.skillsBundleAccess);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (templateParts.skillsSystem) {
|
|
270
|
+
parts.push(templateParts.skillsSystem);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (templateParts.ruleComment) {
|
|
274
|
+
parts.push(templateParts.ruleComment);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (existingParts.afterRuleComment) {
|
|
278
|
+
parts.push(existingParts.afterRuleComment);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return parts.join('\n\n').trim() + '\n';
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function parseTemplate(template) {
|
|
285
|
+
const parts = {};
|
|
286
|
+
|
|
287
|
+
const projectOverviewIndex = template.indexOf('# Project Overview');
|
|
288
|
+
if (projectOverviewIndex !== -1) {
|
|
289
|
+
const afterProjectOverview = template.substring(projectOverviewIndex);
|
|
290
|
+
const conventionsIndex = afterProjectOverview.indexOf('\n## Conventions');
|
|
291
|
+
if (conventionsIndex !== -1) {
|
|
292
|
+
parts.projectOverview = afterProjectOverview.substring(0, conventionsIndex).trim();
|
|
293
|
+
} else {
|
|
294
|
+
const skillsSystemTagMatch = afterProjectOverview.match(/<skills_system[\s>]/);
|
|
295
|
+
if (skillsSystemTagMatch) {
|
|
296
|
+
const skillsSystemTagIndex = afterProjectOverview.indexOf(skillsSystemTagMatch[0]);
|
|
297
|
+
parts.projectOverview = afterProjectOverview.substring(0, skillsSystemTagIndex).trim();
|
|
298
|
+
} else {
|
|
299
|
+
parts.projectOverview = afterProjectOverview.trim();
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const conventionsIndex = template.indexOf('## Conventions');
|
|
305
|
+
if (conventionsIndex !== -1) {
|
|
306
|
+
const afterConventions = template.substring(conventionsIndex);
|
|
307
|
+
const skillsBundleAccessIndex = afterConventions.indexOf('\n## Skills Bundle Access');
|
|
308
|
+
if (skillsBundleAccessIndex !== -1) {
|
|
309
|
+
parts.conventions = afterConventions.substring(0, skillsBundleAccessIndex).trim();
|
|
310
|
+
} else {
|
|
311
|
+
const skillsSystemTagMatch = afterConventions.match(/<skills_system[\s>]/);
|
|
312
|
+
if (skillsSystemTagMatch) {
|
|
313
|
+
const skillsSystemTagIndex = afterConventions.indexOf(skillsSystemTagMatch[0]);
|
|
314
|
+
parts.conventions = afterConventions.substring(0, skillsSystemTagIndex).trim();
|
|
315
|
+
} else {
|
|
316
|
+
parts.conventions = afterConventions.trim();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const skillsBundleAccessIndex = template.indexOf('## Skills Bundle Access');
|
|
322
|
+
if (skillsBundleAccessIndex !== -1) {
|
|
323
|
+
const afterSkillsBundleAccess = template.substring(skillsBundleAccessIndex);
|
|
324
|
+
const skillsSystemTagMatch = afterSkillsBundleAccess.match(/<skills_system[\s>]/);
|
|
325
|
+
if (skillsSystemTagMatch) {
|
|
326
|
+
const skillsSystemTagIndex = afterSkillsBundleAccess.indexOf(skillsSystemTagMatch[0]);
|
|
327
|
+
parts.skillsBundleAccess = afterSkillsBundleAccess.substring(0, skillsSystemTagIndex).trim();
|
|
328
|
+
} else {
|
|
329
|
+
parts.skillsBundleAccess = afterSkillsBundleAccess.trim();
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const skillsSystemMatch = template.match(/<skills_system[\s\S]*?<\/skills_system>/);
|
|
334
|
+
if (skillsSystemMatch) {
|
|
335
|
+
parts.skillsSystem = skillsSystemMatch[0];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const ruleCommentMatch = template.match(/<!-- rule:[\s\S]*?-->/);
|
|
339
|
+
if (ruleCommentMatch) {
|
|
340
|
+
parts.ruleComment = ruleCommentMatch[0];
|
|
249
341
|
}
|
|
250
342
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
343
|
+
return parts;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
function parseExistingContent(content) {
|
|
347
|
+
const parts = {};
|
|
348
|
+
|
|
349
|
+
const projectOverviewStart = content.search(/# Project Overview/);
|
|
350
|
+
if (projectOverviewStart === -1) {
|
|
351
|
+
const beforeConventions = content.split(/## Conventions|<skills_system/)[0].trim();
|
|
352
|
+
if (beforeConventions) {
|
|
353
|
+
parts.beforeProjectOverview = beforeConventions;
|
|
354
|
+
}
|
|
355
|
+
return parts;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (projectOverviewStart > 0) {
|
|
359
|
+
parts.beforeProjectOverview = content.substring(0, projectOverviewStart).trim();
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const projectOverviewMatch = content.substring(projectOverviewStart).match(/# Project Overview\s*\n([\s\S]*?)(?=\n## Conventions|<skills_system|$)/);
|
|
363
|
+
if (projectOverviewMatch) {
|
|
364
|
+
parts.projectOverview = `# Project Overview\n${projectOverviewMatch[1].trim()}`;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
const ruleCommentMatch = content.match(/<!-- rule:[\s\S]*?-->/);
|
|
368
|
+
if (ruleCommentMatch) {
|
|
369
|
+
const afterRuleComment = content.substring(content.indexOf(ruleCommentMatch[0]) + ruleCommentMatch[0].length).trim();
|
|
370
|
+
if (afterRuleComment) {
|
|
371
|
+
parts.afterRuleComment = afterRuleComment;
|
|
372
|
+
}
|
|
258
373
|
}
|
|
259
374
|
|
|
260
|
-
return
|
|
375
|
+
return parts;
|
|
261
376
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# GURU AI Snapshot
|
|
2
2
|
|
|
3
|
-
Last refreshed: 2025-11-
|
|
3
|
+
Last refreshed: 2025-11-17T11:22:48.910Z
|
|
4
4
|
|
|
5
5
|
| File | Last Modified (UTC) |
|
|
6
6
|
| --- | --- |
|
|
7
7
|
| `scripts/check_agents.sh` | 2025-11-13T09:03:47.702Z |
|
|
8
8
|
| `skill.ini` | 2025-11-13T09:47:02.793Z |
|
|
9
9
|
| `SKILL.md` | 2025-11-13T10:06:33.764Z |
|
|
10
|
-
| `template/AGENTS_TEMPLATE.md` | 2025-11-
|
|
10
|
+
| `template/AGENTS_TEMPLATE.md` | 2025-11-17T11:22:48.804Z |
|