facult 2.17.12 → 2.17.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "facult",
3
- "version": "2.17.12",
3
+ "version": "2.17.14",
4
4
  "description": "Manage canonical AI capabilities, sync surfaces, and evolution state.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/ai.ts CHANGED
@@ -870,8 +870,11 @@ function inferProposalKind(args: {
870
870
  targetPath: string | null;
871
871
  targetKind?: GraphNodeKind | null;
872
872
  }): ProposalKind {
873
+ if (args.targetKind === "skill" && args.targetPath) {
874
+ return "update_asset";
875
+ }
873
876
  if (args.target.includes("/skills/") || args.target.endsWith("/SKILL.md")) {
874
- return "add_skill";
877
+ return args.targetPath ? "update_asset" : "add_skill";
875
878
  }
876
879
  if (args.target.includes("/snippets/")) {
877
880
  return "extract_snippet";
@@ -1626,7 +1629,10 @@ async function resolveProposalTargetNode(
1626
1629
  homeDir,
1627
1630
  rootDir: args.rootDir,
1628
1631
  });
1629
- const pathValue = node?.path ?? fallbackPath;
1632
+ const pathValue =
1633
+ node?.kind === "skill" && node.path
1634
+ ? join(node.path, "SKILL.md")
1635
+ : (node?.path ?? fallbackPath);
1630
1636
  if (!pathValue) {
1631
1637
  throw new Error(`Could not resolve target path for ${target}`);
1632
1638
  }
package/src/remote.ts CHANGED
@@ -3603,13 +3603,12 @@ export async function templatesCommand(
3603
3603
  cwd: ctx.cwd,
3604
3604
  rootDir:
3605
3605
  parsedArgs.rootArg ??
3606
- ctx.rootDir ??
3607
3606
  (parsedArgs.projectRootArg
3608
3607
  ? projectAiRootFromProjectArg(
3609
3608
  parsedArgs.projectRootArg,
3610
3609
  ctx.homeDir
3611
3610
  )
3612
- : undefined),
3611
+ : ctx.rootDir),
3613
3612
  homeDir: ctx.homeDir,
3614
3613
  dryRun,
3615
3614
  force,