@caupulican/pi-adaptative 0.80.76 → 0.80.78

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.
@@ -2553,6 +2553,12 @@ export class InteractiveMode {
2553
2553
  await this.handleReloadCommand();
2554
2554
  return;
2555
2555
  }
2556
+ if (text === "/curate" || text.startsWith("/curate ")) {
2557
+ const args = text.slice("/curate".length).trim();
2558
+ this.editor.setText("");
2559
+ this.handleCurateCommand(args);
2560
+ return;
2561
+ }
2556
2562
  if (text === "/install-resources" || text.startsWith("/install-resources ")) {
2557
2563
  const args = text.slice("/install-resources".length).trim();
2558
2564
  this.editor.setText("");
@@ -7500,6 +7506,38 @@ export class InteractiveMode {
7500
7506
  this.showError(error instanceof Error ? error.message : String(error));
7501
7507
  }
7502
7508
  }
7509
+ /**
7510
+ * `/curate` — skill curator (#32). With no args, lists reflection-promoted skills proposed for
7511
+ * archival (stale/unused) and pairs proposed for consolidation (overlapping). PROPOSE-ONLY: the user
7512
+ * applies actions explicitly via `/curate archive <name>` / `/curate restore <name>`. Never touches
7513
+ * hand-authored skills; archival is restorable.
7514
+ */
7515
+ handleCurateCommand(args) {
7516
+ const [sub, name] = args.split(/\s+/, 2);
7517
+ if (sub === "archive" && name) {
7518
+ this.showStatus(this.session.archivePromotedSkill(name)
7519
+ ? `Archived promoted skill '${name}'`
7520
+ : `Could not archive '${name}' (not a promoted skill?)`);
7521
+ return;
7522
+ }
7523
+ if (sub === "restore" && name) {
7524
+ this.showStatus(this.session.restorePromotedSkill(name) ? `Restored skill '${name}'` : `Could not restore '${name}'`);
7525
+ return;
7526
+ }
7527
+ const proposals = this.session.proposeSkillCuration();
7528
+ if (proposals.archive.length === 0 && proposals.consolidate.length === 0) {
7529
+ this.showStatus("Curator: no stale or overlapping promoted skills. Nothing to propose.");
7530
+ return;
7531
+ }
7532
+ const lines = ["Skill curator proposals (nothing applied automatically):"];
7533
+ for (const a of proposals.archive) {
7534
+ lines.push(` • archive '${a.name}' — ${a.reason} → /curate archive ${a.name}`);
7535
+ }
7536
+ for (const c of proposals.consolidate) {
7537
+ lines.push(` • consider merging '${c.names[0]}' + '${c.names[1]}' (overlap ${(c.overlap * 100) | 0}%)`);
7538
+ }
7539
+ this.showStatus(lines.join("\n"));
7540
+ }
7503
7541
  async handleConfigBackupCommand(fileArg) {
7504
7542
  try {
7505
7543
  const profilesDir = path.join(getAgentDir(), "profiles");