aiblueprint-cli 1.4.70 → 1.4.72
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/dist/cli.js +9 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -36563,20 +36563,21 @@ async function ensureClaudeInstructionSymlink(result, agentsPath, claudePath, dr
|
|
|
36563
36563
|
}
|
|
36564
36564
|
async function writeRepositoryInstructionIndex(result, folders, dryRun = false) {
|
|
36565
36565
|
const rulesDir = path17.join(folders.agentsDir, "rules");
|
|
36566
|
-
|
|
36567
|
-
|
|
36568
|
-
|
|
36569
|
-
const rules = dryRun ? await collectPlannedRuleIndexEntries(result, folders.rootDir) : await collectRuleIndexEntries(rulesDir, folders.rootDir);
|
|
36570
|
-
|
|
36566
|
+
const agentsPath = path17.join(folders.rootDir, "AGENTS.md");
|
|
36567
|
+
const claudePath = path17.join(folders.rootDir, "CLAUDE.md");
|
|
36568
|
+
const rulesDirExists = await pathExistsOrSymlink(rulesDir);
|
|
36569
|
+
const rules = dryRun || rulesDirExists ? dryRun ? await collectPlannedRuleIndexEntries(result, folders.rootDir) : await collectRuleIndexEntries(rulesDir, folders.rootDir) : [];
|
|
36570
|
+
const agentsExists = await pathExistsOrSymlink(agentsPath);
|
|
36571
|
+
const claudeExists = await pathExistsOrSymlink(claudePath);
|
|
36572
|
+
if (rules.length === 0 && !agentsExists && !claudeExists) {
|
|
36571
36573
|
return;
|
|
36572
36574
|
}
|
|
36573
36575
|
const existing = stripGeneratedRulesIndex(await readExistingInstructions(folders.rootDir));
|
|
36574
|
-
const content = `${existing}
|
|
36576
|
+
const content = rules.length > 0 ? `${existing}
|
|
36575
36577
|
|
|
36576
36578
|
${renderRulesIndexBlock(rules)}
|
|
36579
|
+
` : `${existing.trimEnd()}
|
|
36577
36580
|
`;
|
|
36578
|
-
const agentsPath = path17.join(folders.rootDir, "AGENTS.md");
|
|
36579
|
-
const claudePath = path17.join(folders.rootDir, "CLAUDE.md");
|
|
36580
36581
|
const agentsStat = await import_fs_extra13.default.lstat(agentsPath).catch(() => null);
|
|
36581
36582
|
if (agentsStat) {
|
|
36582
36583
|
if (dryRun) {
|