@orderful/droid 0.18.0 → 0.20.0

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/bin/droid.js +189 -82
  3. package/dist/index.js +175 -72
  4. package/dist/lib/config.d.ts.map +1 -1
  5. package/dist/lib/migrations.d.ts +30 -0
  6. package/dist/lib/migrations.d.ts.map +1 -0
  7. package/dist/lib/skill-config.d.ts.map +1 -1
  8. package/dist/lib/skills.d.ts.map +1 -1
  9. package/dist/lib/types.d.ts +10 -0
  10. package/dist/lib/types.d.ts.map +1 -1
  11. package/dist/tools/brain/TOOL.yaml +1 -1
  12. package/dist/tools/coach/TOOL.yaml +1 -1
  13. package/dist/tools/codex/TOOL.yaml +32 -0
  14. package/dist/tools/codex/commands/codex.md +70 -0
  15. package/dist/tools/codex/skills/droid-codex/SKILL.md +266 -0
  16. package/dist/tools/codex/skills/droid-codex/references/creating.md +150 -0
  17. package/dist/tools/codex/skills/droid-codex/references/decisions.md +128 -0
  18. package/dist/tools/codex/skills/droid-codex/references/loading.md +163 -0
  19. package/dist/tools/codex/skills/droid-codex/references/topics.md +213 -0
  20. package/dist/tools/comments/TOOL.yaml +1 -1
  21. package/dist/tools/droid/skills/droid/SKILL.md +8 -0
  22. package/dist/tools/project/TOOL.yaml +1 -1
  23. package/package.json +1 -1
  24. package/src/lib/config.ts +13 -2
  25. package/src/lib/migrations.test.ts +163 -0
  26. package/src/lib/migrations.ts +182 -0
  27. package/src/lib/skill-config.ts +3 -1
  28. package/src/lib/skills.ts +10 -1
  29. package/src/lib/types.ts +11 -0
  30. package/src/tools/brain/TOOL.yaml +1 -1
  31. package/src/tools/coach/TOOL.yaml +1 -1
  32. package/src/tools/codex/TOOL.yaml +32 -0
  33. package/src/tools/codex/commands/codex.md +70 -0
  34. package/src/tools/codex/skills/droid-codex/SKILL.md +266 -0
  35. package/src/tools/codex/skills/droid-codex/references/creating.md +150 -0
  36. package/src/tools/codex/skills/droid-codex/references/decisions.md +128 -0
  37. package/src/tools/codex/skills/droid-codex/references/loading.md +163 -0
  38. package/src/tools/codex/skills/droid-codex/references/topics.md +213 -0
  39. package/src/tools/comments/TOOL.yaml +1 -1
  40. package/src/tools/droid/skills/droid/SKILL.md +8 -0
  41. package/src/tools/project/TOOL.yaml +1 -1
package/dist/index.js CHANGED
@@ -140,8 +140,12 @@ function getConfigPath() {
140
140
  function getConfigDir() {
141
141
  return CONFIG_DIR;
142
142
  }
143
+ function normalizeSkillNameForConfig(skillName) {
144
+ return skillName.replace(/^droid-/, "");
145
+ }
143
146
  function getSkillOverridesPath(skillName) {
144
- return join(CONFIG_DIR, "skills", skillName, "overrides.yaml");
147
+ const normalizedName = normalizeSkillNameForConfig(skillName);
148
+ return join(CONFIG_DIR, "skills", normalizedName, "overrides.yaml");
145
149
  }
146
150
  function loadSkillOverrides(skillName) {
147
151
  const overridesPath = getSkillOverridesPath(skillName);
@@ -156,8 +160,9 @@ function loadSkillOverrides(skillName) {
156
160
  }
157
161
  }
158
162
  function saveSkillOverrides(skillName, overrides) {
163
+ const normalizedName = normalizeSkillNameForConfig(skillName);
159
164
  const overridesPath = getSkillOverridesPath(skillName);
160
- const skillDir = join(CONFIG_DIR, "skills", skillName);
165
+ const skillDir = join(CONFIG_DIR, "skills", normalizedName);
161
166
  if (!existsSync(skillDir)) {
162
167
  mkdirSync(skillDir, { recursive: true });
163
168
  }
@@ -182,8 +187,8 @@ function setAutoUpdateConfig(updates) {
182
187
  }
183
188
 
184
189
  // src/lib/skills.ts
185
- import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync5, mkdirSync as mkdirSync3, writeFileSync as writeFileSync3, rmSync } from "fs";
186
- import { join as join6, dirname as dirname4 } from "path";
190
+ import { existsSync as existsSync5, readdirSync as readdirSync3, readFileSync as readFileSync5, mkdirSync as mkdirSync4, writeFileSync as writeFileSync3, rmSync as rmSync2 } from "fs";
191
+ import { join as join7, dirname as dirname5, basename } from "path";
187
192
  import { fileURLToPath as fileURLToPath4 } from "url";
188
193
  import YAML4 from "yaml";
189
194
 
@@ -457,11 +462,104 @@ function uninstallAgent(agentName) {
457
462
  }
458
463
  }
459
464
 
465
+ // src/lib/migrations.ts
466
+ import { existsSync as existsSync4, appendFileSync, mkdirSync as mkdirSync3, renameSync, rmSync } from "fs";
467
+ import { join as join6, dirname as dirname4 } from "path";
468
+ var MIGRATIONS_LOG_FILE = ".migrations.log";
469
+ function getMigrationsLogPath() {
470
+ return join6(getConfigDir(), MIGRATIONS_LOG_FILE);
471
+ }
472
+ function logMigration(toolName, fromVersion, toVersion, status, error) {
473
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
474
+ const logEntry = error ? `${timestamp} ${toolName} ${fromVersion} \u2192 ${toVersion} ${status}: ${error}
475
+ ` : `${timestamp} ${toolName} ${fromVersion} \u2192 ${toVersion} ${status}
476
+ `;
477
+ const logPath = getMigrationsLogPath();
478
+ const logDir = dirname4(logPath);
479
+ if (!existsSync4(logDir)) {
480
+ mkdirSync3(logDir, { recursive: true });
481
+ }
482
+ appendFileSync(logPath, logEntry);
483
+ }
484
+ function createConfigDirMigration(skillName, version) {
485
+ const unprefixedName = skillName.replace(/^droid-/, "");
486
+ return {
487
+ version,
488
+ description: `Move ${skillName} config to unprefixed location`,
489
+ up: (configDir) => {
490
+ const oldDir = join6(configDir, "skills", skillName);
491
+ const newDir = join6(configDir, "skills", unprefixedName);
492
+ if (existsSync4(oldDir) && !existsSync4(newDir)) {
493
+ const parentDir = dirname4(newDir);
494
+ if (!existsSync4(parentDir)) {
495
+ mkdirSync3(parentDir, { recursive: true });
496
+ }
497
+ renameSync(oldDir, newDir);
498
+ } else if (existsSync4(oldDir) && existsSync4(newDir)) {
499
+ rmSync(oldDir, { recursive: true });
500
+ }
501
+ }
502
+ };
503
+ }
504
+ var TOOL_MIGRATIONS = {
505
+ brain: [createConfigDirMigration("droid-brain", "0.2.3")],
506
+ comments: [createConfigDirMigration("droid-comments", "0.2.6")],
507
+ project: [createConfigDirMigration("droid-project", "0.1.5")],
508
+ coach: [createConfigDirMigration("droid-coach", "0.1.3")]
509
+ };
510
+ function getToolMigrations(toolName) {
511
+ return TOOL_MIGRATIONS[toolName] ?? [];
512
+ }
513
+ function getLastMigratedVersion(toolName) {
514
+ const config = loadConfig();
515
+ return config.migrations?.[toolName] ?? "0.0.0";
516
+ }
517
+ function setLastMigratedVersion(toolName, version) {
518
+ const config = loadConfig();
519
+ if (!config.migrations) {
520
+ config.migrations = {};
521
+ }
522
+ config.migrations[toolName] = version;
523
+ saveConfig(config);
524
+ }
525
+ function runMigrations(toolName, fromVersion, toVersion) {
526
+ const migrations = getToolMigrations(toolName);
527
+ const pendingMigrations = migrations.filter((m) => {
528
+ const afterFrom = compareSemver(m.version, fromVersion) > 0;
529
+ const beforeOrAtTo = compareSemver(m.version, toVersion) <= 0;
530
+ return afterFrom && beforeOrAtTo;
531
+ });
532
+ if (pendingMigrations.length === 0) {
533
+ setLastMigratedVersion(toolName, toVersion);
534
+ return { success: true };
535
+ }
536
+ const configDir = getConfigDir();
537
+ for (const migration of pendingMigrations) {
538
+ try {
539
+ migration.up(configDir);
540
+ logMigration(toolName, fromVersion, migration.version, "OK");
541
+ } catch (error) {
542
+ const errorMessage = error instanceof Error ? error.message : String(error);
543
+ logMigration(toolName, fromVersion, migration.version, "FAILED", errorMessage);
544
+ return { success: false, error: `Migration ${migration.version} failed: ${errorMessage}` };
545
+ }
546
+ }
547
+ setLastMigratedVersion(toolName, toVersion);
548
+ return { success: true };
549
+ }
550
+ function runToolMigrations(toolName, installedVersion) {
551
+ const lastMigrated = getLastMigratedVersion(toolName);
552
+ if (compareSemver(installedVersion, lastMigrated) <= 0) {
553
+ return { success: true };
554
+ }
555
+ return runMigrations(toolName, lastMigrated, installedVersion);
556
+ }
557
+
460
558
  // src/lib/skills.ts
461
559
  var DROID_SKILLS_START = "<!-- droid-skills-start -->";
462
560
  var DROID_SKILLS_END = "<!-- droid-skills-end -->";
463
- var __dirname4 = dirname4(fileURLToPath4(import.meta.url));
464
- var BUNDLED_SKILLS_DIR = join6(__dirname4, "../tools");
561
+ var __dirname4 = dirname5(fileURLToPath4(import.meta.url));
562
+ var BUNDLED_SKILLS_DIR = join7(__dirname4, "../tools");
465
563
  function getBundledSkillsDir() {
466
564
  return BUNDLED_SKILLS_DIR;
467
565
  }
@@ -477,7 +575,7 @@ function getPlatformConfigPath(platform) {
477
575
  function updatePlatformConfigSkills(platform, installedSkills) {
478
576
  const configPath = getPlatformConfigPath(platform);
479
577
  let content = "";
480
- if (existsSync4(configPath)) {
578
+ if (existsSync5(configPath)) {
481
579
  content = readFileSync5(configPath, "utf-8");
482
580
  }
483
581
  const skillLines = installedSkills.map((name) => {
@@ -496,9 +594,9 @@ ${DROID_SKILLS_END}` : "";
496
594
  } else if (skillsSection) {
497
595
  content = content.trim() + "\n\n" + skillsSection + "\n";
498
596
  }
499
- const configDir = dirname4(configPath);
500
- if (!existsSync4(configDir)) {
501
- mkdirSync3(configDir, { recursive: true });
597
+ const configDir = dirname5(configPath);
598
+ if (!existsSync5(configDir)) {
599
+ mkdirSync4(configDir, { recursive: true });
502
600
  }
503
601
  writeFileSync3(configPath, content, "utf-8");
504
602
  }
@@ -519,8 +617,8 @@ function parseSkillFrontmatter(content) {
519
617
  }
520
618
  }
521
619
  function loadSkillManifest(skillDir) {
522
- const skillMdPath = join6(skillDir, "SKILL.md");
523
- if (!existsSync4(skillMdPath)) {
620
+ const skillMdPath = join7(skillDir, "SKILL.md");
621
+ if (!existsSync5(skillMdPath)) {
524
622
  return null;
525
623
  }
526
624
  const content = readFileSync5(skillMdPath, "utf-8");
@@ -528,7 +626,7 @@ function loadSkillManifest(skillDir) {
528
626
  if (!frontmatter || !frontmatter.name) {
529
627
  return null;
530
628
  }
531
- const toolDir = dirname4(dirname4(skillDir));
629
+ const toolDir = dirname5(dirname5(skillDir));
532
630
  const toolManifest = loadToolManifest(toolDir);
533
631
  return {
534
632
  name: frontmatter.name,
@@ -540,17 +638,17 @@ function loadSkillManifest(skillDir) {
540
638
  };
541
639
  }
542
640
  function findSkillPath(skillName) {
543
- if (!existsSync4(BUNDLED_SKILLS_DIR)) {
641
+ if (!existsSync5(BUNDLED_SKILLS_DIR)) {
544
642
  return null;
545
643
  }
546
644
  const toolDirs = readdirSync3(BUNDLED_SKILLS_DIR, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
547
645
  for (const toolName of toolDirs) {
548
- const skillsDir = join6(BUNDLED_SKILLS_DIR, toolName, "skills");
549
- if (!existsSync4(skillsDir)) continue;
550
- const skillDir = join6(skillsDir, skillName);
551
- if (existsSync4(skillDir) && existsSync4(join6(skillDir, "SKILL.md"))) {
646
+ const skillsDir = join7(BUNDLED_SKILLS_DIR, toolName, "skills");
647
+ if (!existsSync5(skillsDir)) continue;
648
+ const skillDir = join7(skillsDir, skillName);
649
+ if (existsSync5(skillDir) && existsSync5(join7(skillDir, "SKILL.md"))) {
552
650
  return {
553
- toolDir: join6(BUNDLED_SKILLS_DIR, toolName),
651
+ toolDir: join7(BUNDLED_SKILLS_DIR, toolName),
554
652
  skillDir
555
653
  };
556
654
  }
@@ -558,17 +656,17 @@ function findSkillPath(skillName) {
558
656
  return null;
559
657
  }
560
658
  function getBundledSkills() {
561
- if (!existsSync4(BUNDLED_SKILLS_DIR)) {
659
+ if (!existsSync5(BUNDLED_SKILLS_DIR)) {
562
660
  return [];
563
661
  }
564
662
  const toolDirs = readdirSync3(BUNDLED_SKILLS_DIR, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
565
663
  const skills = [];
566
664
  for (const toolName of toolDirs) {
567
- const skillsDir = join6(BUNDLED_SKILLS_DIR, toolName, "skills");
568
- if (!existsSync4(skillsDir)) continue;
665
+ const skillsDir = join7(BUNDLED_SKILLS_DIR, toolName, "skills");
666
+ if (!existsSync5(skillsDir)) continue;
569
667
  const skillSubdirs = readdirSync3(skillsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
570
668
  for (const skillName of skillSubdirs) {
571
- const manifest = loadSkillManifest(join6(skillsDir, skillName));
669
+ const manifest = loadSkillManifest(join7(skillsDir, skillName));
572
670
  if (manifest) {
573
671
  skills.push(manifest);
574
672
  }
@@ -691,15 +789,15 @@ function installSkill(skillName) {
691
789
  }
692
790
  }
693
791
  const skillsPath = getSkillsInstallPath(config.platform);
694
- const targetSkillDir = join6(skillsPath, skillName);
792
+ const targetSkillDir = join7(skillsPath, skillName);
695
793
  const commandsPath = getCommandsInstallPath(config.platform);
696
794
  const tools = getPlatformTools(config);
697
795
  if (skillName.startsWith("droid-")) {
698
796
  const oldSkillName = skillName.replace(/^droid-/, "");
699
- const oldSkillDir = join6(skillsPath, oldSkillName);
700
- if (existsSync4(oldSkillDir)) {
797
+ const oldSkillDir = join7(skillsPath, oldSkillName);
798
+ if (existsSync5(oldSkillDir)) {
701
799
  try {
702
- rmSync(oldSkillDir, { recursive: true });
800
+ rmSync2(oldSkillDir, { recursive: true });
703
801
  } catch (error) {
704
802
  console.warn(`Warning: Could not remove old skill directory ${oldSkillDir}: ${error}`);
705
803
  }
@@ -710,14 +808,14 @@ function installSkill(skillName) {
710
808
  saveConfig(config);
711
809
  }
712
810
  }
713
- const commandsSource = join6(toolDir, "commands");
714
- const agentsSource = join6(toolDir, "agents");
811
+ const commandsSource = join7(toolDir, "commands");
812
+ const agentsSource = join7(toolDir, "agents");
715
813
  if (!tools[skillName]) {
716
- if (existsSync4(commandsSource)) {
814
+ if (existsSync5(commandsSource)) {
717
815
  const commandFiles = readdirSync3(commandsSource).filter((f) => f.endsWith(".md") && f.toLowerCase() !== "readme.md");
718
816
  for (const file of commandFiles) {
719
- const targetCommandPath = join6(commandsPath, file);
720
- if (existsSync4(targetCommandPath)) {
817
+ const targetCommandPath = join7(commandsPath, file);
818
+ if (existsSync5(targetCommandPath)) {
721
819
  const commandName = file.replace(".md", "");
722
820
  return {
723
821
  success: false,
@@ -726,7 +824,7 @@ function installSkill(skillName) {
726
824
  }
727
825
  }
728
826
  }
729
- if (existsSync4(agentsSource)) {
827
+ if (existsSync5(agentsSource)) {
730
828
  const agentDirs = readdirSync3(agentsSource, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
731
829
  for (const agentName of agentDirs) {
732
830
  if (isAgentInstalled(agentName)) {
@@ -738,49 +836,49 @@ function installSkill(skillName) {
738
836
  }
739
837
  }
740
838
  }
741
- if (!existsSync4(skillsPath)) {
742
- mkdirSync3(skillsPath, { recursive: true });
839
+ if (!existsSync5(skillsPath)) {
840
+ mkdirSync4(skillsPath, { recursive: true });
743
841
  }
744
- const skillMdSource = join6(skillDir, "SKILL.md");
745
- if (existsSync4(skillMdSource)) {
746
- if (!existsSync4(targetSkillDir)) {
747
- mkdirSync3(targetSkillDir, { recursive: true });
842
+ const skillMdSource = join7(skillDir, "SKILL.md");
843
+ if (existsSync5(skillMdSource)) {
844
+ if (!existsSync5(targetSkillDir)) {
845
+ mkdirSync4(targetSkillDir, { recursive: true });
748
846
  }
749
- const skillMdTarget = join6(targetSkillDir, "SKILL.md");
847
+ const skillMdTarget = join7(targetSkillDir, "SKILL.md");
750
848
  const content = readFileSync5(skillMdSource, "utf-8");
751
849
  writeFileSync3(skillMdTarget, content);
752
850
  }
753
- const referencesSource = join6(skillDir, "references");
754
- if (existsSync4(referencesSource)) {
755
- const targetReferencesDir = join6(targetSkillDir, "references");
756
- if (!existsSync4(targetReferencesDir)) {
757
- mkdirSync3(targetReferencesDir, { recursive: true });
851
+ const referencesSource = join7(skillDir, "references");
852
+ if (existsSync5(referencesSource)) {
853
+ const targetReferencesDir = join7(targetSkillDir, "references");
854
+ if (!existsSync5(targetReferencesDir)) {
855
+ mkdirSync4(targetReferencesDir, { recursive: true });
758
856
  }
759
857
  const referenceFiles = readdirSync3(referencesSource).filter((f) => f.endsWith(".md"));
760
858
  for (const file of referenceFiles) {
761
- const sourcePath = join6(referencesSource, file);
762
- const targetPath = join6(targetReferencesDir, file);
859
+ const sourcePath = join7(referencesSource, file);
860
+ const targetPath = join7(targetReferencesDir, file);
763
861
  const content = readFileSync5(sourcePath, "utf-8");
764
862
  writeFileSync3(targetPath, content);
765
863
  }
766
864
  }
767
- if (existsSync4(commandsSource)) {
768
- if (!existsSync4(commandsPath)) {
769
- mkdirSync3(commandsPath, { recursive: true });
865
+ if (existsSync5(commandsSource)) {
866
+ if (!existsSync5(commandsPath)) {
867
+ mkdirSync4(commandsPath, { recursive: true });
770
868
  }
771
869
  const commandFiles = readdirSync3(commandsSource).filter((f) => f.endsWith(".md") && f.toLowerCase() !== "readme.md");
772
870
  for (const file of commandFiles) {
773
- const sourcePath = join6(commandsSource, file);
774
- const targetPath = join6(commandsPath, file);
871
+ const sourcePath = join7(commandsSource, file);
872
+ const targetPath = join7(commandsPath, file);
775
873
  const content = readFileSync5(sourcePath, "utf-8");
776
874
  writeFileSync3(targetPath, content);
777
875
  }
778
876
  }
779
877
  const installedAgents = [];
780
- if (existsSync4(agentsSource)) {
878
+ if (existsSync5(agentsSource)) {
781
879
  const agentDirs = readdirSync3(agentsSource, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
782
880
  for (const agentName of agentDirs) {
783
- const agentDir = join6(agentsSource, agentName);
881
+ const agentDir = join7(agentsSource, agentName);
784
882
  const result = installAgentFromPath(agentDir, agentName);
785
883
  if (result.success) {
786
884
  installedAgents.push(agentName);
@@ -799,6 +897,11 @@ function installSkill(skillName) {
799
897
  saveConfig(config);
800
898
  const installedSkillNames = Object.keys(updatedTools);
801
899
  updatePlatformConfigSkills(config.platform, installedSkillNames);
900
+ const toolName = basename(toolDir);
901
+ const migrationResult = runToolMigrations(toolName, manifest.version);
902
+ if (!migrationResult.success) {
903
+ console.warn(`Warning: Migration failed for ${toolName}: ${migrationResult.error}`);
904
+ }
802
905
  return { success: true, message: `Installed ${skillName} v${manifest.version}` };
803
906
  }
804
907
  function uninstallSkill(skillName) {
@@ -808,19 +911,19 @@ function uninstallSkill(skillName) {
808
911
  return { success: false, message: `Skill '${skillName}' is not installed` };
809
912
  }
810
913
  const skillsPath = getSkillsInstallPath(config.platform);
811
- const skillDir = join6(skillsPath, skillName);
812
- if (existsSync4(skillDir)) {
813
- rmSync(skillDir, { recursive: true });
914
+ const skillDir = join7(skillsPath, skillName);
915
+ if (existsSync5(skillDir)) {
916
+ rmSync2(skillDir, { recursive: true });
814
917
  }
815
918
  const skillPath = findSkillPath(skillName);
816
919
  const commandsPath = getCommandsInstallPath(config.platform);
817
- const commandsSource = skillPath ? join6(skillPath.toolDir, "commands") : null;
818
- if (commandsSource && existsSync4(commandsSource)) {
920
+ const commandsSource = skillPath ? join7(skillPath.toolDir, "commands") : null;
921
+ if (commandsSource && existsSync5(commandsSource)) {
819
922
  const commandFiles = readdirSync3(commandsSource).filter((f) => f.endsWith(".md") && f.toLowerCase() !== "readme.md");
820
923
  for (const file of commandFiles) {
821
- const commandPath = join6(commandsPath, file);
822
- if (existsSync4(commandPath)) {
823
- rmSync(commandPath);
924
+ const commandPath = join7(commandsPath, file);
925
+ if (existsSync5(commandPath)) {
926
+ rmSync2(commandPath);
824
927
  }
825
928
  }
826
929
  }
@@ -856,7 +959,7 @@ function isCommandInstalled(commandName, skillName) {
856
959
  const commandsPath = getCommandsInstallPath(config.platform);
857
960
  const cmdPart = commandName.startsWith(skillName + " ") ? commandName.slice(skillName.length + 1) : commandName;
858
961
  const filename = cmdPart.replace(/\s+/g, "-") + ".md";
859
- return existsSync4(join6(commandsPath, filename));
962
+ return existsSync5(join7(commandsPath, filename));
860
963
  }
861
964
  function installCommand(commandName, skillName) {
862
965
  const config = loadConfig();
@@ -864,8 +967,8 @@ function installCommand(commandName, skillName) {
864
967
  if (!skillPath) {
865
968
  return { success: false, message: `Skill '${skillName}' not found` };
866
969
  }
867
- const commandsDir = join6(skillPath.toolDir, "commands");
868
- if (!existsSync4(commandsDir)) {
970
+ const commandsDir = join7(skillPath.toolDir, "commands");
971
+ if (!existsSync5(commandsDir)) {
869
972
  return { success: false, message: `No commands found for skill '${skillName}'` };
870
973
  }
871
974
  const cmdPart = commandName.startsWith(skillName + " ") ? commandName.slice(skillName.length + 1) : commandName;
@@ -878,11 +981,11 @@ function installCommand(commandName, skillName) {
878
981
  return { success: false, message: `Command file not found for: ${commandName}` };
879
982
  }
880
983
  const commandsPath = getCommandsInstallPath(config.platform);
881
- if (!existsSync4(commandsPath)) {
882
- mkdirSync3(commandsPath, { recursive: true });
984
+ if (!existsSync5(commandsPath)) {
985
+ mkdirSync4(commandsPath, { recursive: true });
883
986
  }
884
- const actualSourcePath = join6(commandsDir, sourceFile);
885
- const targetPath = join6(commandsPath, sourceFile);
987
+ const actualSourcePath = join7(commandsDir, sourceFile);
988
+ const targetPath = join7(commandsPath, sourceFile);
886
989
  try {
887
990
  const content = readFileSync5(actualSourcePath, "utf-8");
888
991
  writeFileSync3(targetPath, content);
@@ -906,10 +1009,10 @@ function uninstallCommand(commandName, skillName) {
906
1009
  cmdPart.replace(/\s+/g, "-") + ".md"
907
1010
  ];
908
1011
  for (const filename of possibleFilenames) {
909
- const commandPath = join6(commandsPath, filename);
910
- if (existsSync4(commandPath)) {
1012
+ const commandPath = join7(commandsPath, filename);
1013
+ if (existsSync5(commandPath)) {
911
1014
  try {
912
- rmSync(commandPath);
1015
+ rmSync2(commandPath);
913
1016
  return { success: true, message: `Uninstalled /${commandName}` };
914
1017
  } catch (error) {
915
1018
  return { success: false, message: `Failed to uninstall command: ${error}` };
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,WAAW,EAA0B,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAgDxI;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAItC;AAED;;GAEG;AACH,wB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pD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAanD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAchE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAWD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAapE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAWrF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,gBAAgB,CAMtD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAQ5E"}
@@ -0,0 +1,30 @@
1
+ import { type Migration } from './types';
2
+ /**
3
+ * Get migrations for a tool
4
+ */
5
+ export declare function getToolMigrations(toolName: string): Migration[];
6
+ /**
7
+ * Get the last migrated version for a tool
8
+ */
9
+ export declare function getLastMigratedVersion(toolName: string): string;
10
+ /**
11
+ * Update the last migrated version for a tool
12
+ */
13
+ export declare function setLastMigratedVersion(toolName: string, version: string): void;
14
+ /**
15
+ * Run migrations for a tool between two versions
16
+ * Returns true if all migrations succeeded, false otherwise
17
+ */
18
+ export declare function runMigrations(toolName: string, fromVersion: string, toVersion: string): {
19
+ success: boolean;
20
+ error?: string;
21
+ };
22
+ /**
23
+ * Run migrations for a tool after install/update
24
+ * Call this after installSkill() completes
25
+ */
26
+ export declare function runToolMigrations(toolName: string, installedVersion: string): {
27
+ success: boolean;
28
+ error?: string;
29
+ };
30
+ //# sourceMappingURL=migrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/lib/migrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AA4FzC;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,CAE/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAO9E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAiCtC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,GACvB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAStC"}
@@ -1 +1 @@
1
- {"version":3,"file":"skill-config.d.ts","sourceRoot":"","sources":["../../src/lib/skill-config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnF;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAC1C,QAAQ,GAAE,OAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAgFf"}
1
+ {"version":3,"file":"skill-config.d.ts","sourceRoot":"","sources":["../../src/lib/skill-config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,YAAY,EA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AE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAgDvF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,CAUlE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAkBlF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA6CvC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAqCvC"}
@@ -39,6 +39,7 @@ export interface DroidConfig {
39
39
  git_username: string;
40
40
  platforms: Record<string, PlatformConfig>;
41
41
  auto_update?: AutoUpdateConfig;
42
+ migrations?: Record<string, string>;
42
43
  }
43
44
  export interface LegacyDroidConfig {
44
45
  ai_tool: Platform;
@@ -84,6 +85,15 @@ export interface ConfigOption {
84
85
  export interface SkillOverrides {
85
86
  [key: string]: string | boolean | number;
86
87
  }
88
+ /**
89
+ * Tool migration function
90
+ * Should be idempotent - safe to run multiple times
91
+ */
92
+ export interface Migration {
93
+ version: string;
94
+ description: string;
95
+ up: (configDir: string) => Promise<void> | void;
96
+ }
87
97
  /**
88
98
  * Tool manifest structure (TOOL.yaml)
89
99
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,UAAU,gBAAgB;IAC1B,QAAQ,aAAa;CACtB;AAID,QAAA,MAAM,WAAW,iBAAW,CAAC;A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,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAC9C"}
@@ -1,6 +1,6 @@
1
1
  name: brain
2
2
  description: "Your scratchpad (or brain) - a collaborative space for planning and research. Create docs with /brain plan, /brain research, or /brain review. Use @mentions for async discussion. Docs persist across sessions."
3
- version: 0.2.2
3
+ version: 0.2.3
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -1,6 +1,6 @@
1
1
  name: coach
2
2
  description: "Learning-mode AI assistance - AI as coach, not crutch. Use /coach plan for co-authored planning, /coach scaffold for structure with hints, /coach review for Socratic questions."
3
- version: 0.1.2
3
+ version: 0.1.3
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -0,0 +1,32 @@
1
+ name: codex
2
+ description: "Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or adding explored topics."
3
+ version: 0.1.0
4
+ status: beta
5
+
6
+ includes:
7
+ skills:
8
+ - name: droid-codex
9
+ required: true
10
+ commands:
11
+ - codex
12
+ agents: []
13
+
14
+ dependencies: []
15
+
16
+ # Prerequisites checked on install
17
+ prerequisites:
18
+ - name: gh
19
+ description: GitHub CLI for PR workflows
20
+ check: "gh --version"
21
+ install_hint: "brew install gh && gh auth login"
22
+
23
+ config_schema:
24
+ codex_repo:
25
+ type: string
26
+ description: Path to local orderful-codex repository (required)
27
+ required: true
28
+ default: "~/src/github.com/orderful-codex"
29
+ freshness_days:
30
+ type: number
31
+ description: Days before showing staleness warning
32
+ default: 30
@@ -0,0 +1,70 @@
1
+ ---
2
+ description: Shared organizational knowledge - PRDs, tech designs, patterns, and explored topics
3
+ argument-hint: "[projects | patterns | topics | {name} | search {query} | new {name} | decision {text} | add topic {name}]"
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash(gh:*), Bash(git:*), Bash(ls:*), Bash(mkdir:*)
5
+ ---
6
+
7
+ # /codex
8
+
9
+ Entry point for shared organizational knowledge. See the **codex skill** for full behaviour.
10
+
11
+ > Context is AI's multiplier. This is Orderful's.
12
+
13
+ ## Arguments
14
+
15
+ $ARGUMENTS
16
+
17
+ ## Prerequisites
18
+
19
+ Before first use, verify:
20
+
21
+ 1. **Repo cloned** at configured `codex_repo` path
22
+ 2. **gh CLI** installed and authenticated
23
+
24
+ ## Usage
25
+
26
+ ```bash
27
+ /codex # Show categories (projects, patterns, topics)
28
+ /codex projects # List projects
29
+ /codex patterns # List patterns
30
+ /codex topics # List topics
31
+ /codex {name} # Load entry (searches all categories)
32
+ /codex search {query} # Search across everything
33
+ /codex new {name} # Scaffold new project from templates
34
+ /codex decision {text} # Append to active project's DECISIONS.md
35
+ /codex snapshot {file} {name} # Import PDF/markdown to project
36
+ /codex add topic {name} # Add explored topic with freshness metadata
37
+ ```
38
+
39
+ ## Configuration
40
+
41
+ **ALWAYS read `~/.droid/skills/codex/overrides.yaml` first.**
42
+
43
+ - `codex_repo` - Path to local orderful-codex repository (required)
44
+ - `freshness_days` - Days before showing staleness warning (default: 30)
45
+
46
+ ## Behaviour
47
+
48
+ Refer to the codex skill for:
49
+ - **Loading**: How to search, handle matches, check freshness, auto-generate CONTEXT.md
50
+ - **Decisions**: How to append to active project's DECISIONS.md
51
+ - **Topics**: How to capture explored codebase areas with freshness metadata
52
+ - **Creating**: How to scaffold new projects from templates
53
+
54
+ The skill's `references/` folder contains detailed procedures for each workflow.
55
+
56
+ ## Examples
57
+
58
+ ```bash
59
+ # Load project context
60
+ /codex transaction-templates
61
+
62
+ # Search for webhook-related content
63
+ /codex search webhook
64
+
65
+ # Capture a decision during implementation
66
+ /codex decision "Using UUIDv7 for IDs because it's sortable and includes timestamp"
67
+
68
+ # Save today's exploration as a topic
69
+ /codex add topic organization-hierarchy
70
+ ```