@jayjiang/byoao 1.1.0 → 1.1.1

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 (68) hide show
  1. package/dist/assets/obsidian-skills/byoao-conventions.md +103 -0
  2. package/dist/assets/obsidian-skills/defuddle.md +41 -0
  3. package/dist/assets/obsidian-skills/json-canvas.md +244 -0
  4. package/dist/assets/obsidian-skills/obsidian-bases.md +497 -0
  5. package/dist/assets/obsidian-skills/obsidian-cli.md +106 -0
  6. package/dist/assets/obsidian-skills/obsidian-markdown.md +196 -0
  7. package/dist/assets/obsidian-skills/vault-thinking.md +40 -0
  8. package/{src/assets/presets/common/AGENT.md.hbs → dist/assets/presets/common/AGENTS.md.hbs} +11 -15
  9. package/dist/assets/presets/common/Glossary.md.hbs +16 -0
  10. package/dist/assets/presets/common/Start Here.md.hbs +137 -0
  11. package/dist/assets/presets/common/obsidian/core-plugins.json +33 -0
  12. package/dist/assets/presets/common/obsidian/daily-notes.json +5 -0
  13. package/dist/assets/presets/common/obsidian/templates.json +3 -0
  14. package/dist/assets/presets/common/templates/Daily Note.md +19 -0
  15. package/dist/assets/presets/common/templates/Decision Record.md +32 -0
  16. package/dist/assets/presets/common/templates/Investigation.md +34 -0
  17. package/dist/assets/presets/common/templates/Meeting Notes.md +25 -0
  18. package/dist/assets/presets/minimal/preset.json +28 -0
  19. package/dist/assets/presets/pm-tpm/agent-section.hbs +15 -0
  20. package/dist/assets/presets/pm-tpm/preset.json +43 -0
  21. package/dist/assets/presets/pm-tpm/templates/Feature Doc.md +45 -0
  22. package/dist/assets/presets/pm-tpm/templates/Sprint Handoff.md +38 -0
  23. package/dist/cli/cli-program.js +1 -1
  24. package/dist/cli/cli-program.js.map +1 -1
  25. package/dist/hooks/__tests__/system-transform.test.js +47 -29
  26. package/dist/hooks/__tests__/system-transform.test.js.map +1 -1
  27. package/dist/hooks/system-transform.js +2 -113
  28. package/dist/hooks/system-transform.js.map +1 -1
  29. package/dist/index.js +118 -179
  30. package/dist/lib/cjs-modules.js +4 -1
  31. package/dist/lib/cjs-modules.js.map +1 -1
  32. package/dist/tools/add-person.js +1 -1
  33. package/dist/tools/add-person.js.map +1 -1
  34. package/dist/tools/add-project.js +1 -1
  35. package/dist/tools/add-project.js.map +1 -1
  36. package/dist/tools/init-vault.js +1 -1
  37. package/dist/tools/init-vault.js.map +1 -1
  38. package/dist/tools/vault-doctor.js +1 -1
  39. package/dist/tools/vault-doctor.js.map +1 -1
  40. package/dist/vault/__tests__/create.test.js +5 -5
  41. package/dist/vault/__tests__/create.test.js.map +1 -1
  42. package/dist/vault/__tests__/obsidian-cli.test.js +108 -0
  43. package/dist/vault/__tests__/obsidian-cli.test.js.map +1 -0
  44. package/dist/vault/create.js +10 -11
  45. package/dist/vault/create.js.map +1 -1
  46. package/dist/vault/doctor.js +15 -6
  47. package/dist/vault/doctor.js.map +1 -1
  48. package/dist/vault/manifest.js +1 -1
  49. package/dist/vault/member.js +2 -2
  50. package/dist/vault/member.js.map +1 -1
  51. package/dist/vault/obsidian-cli.js +28 -5
  52. package/dist/vault/obsidian-cli.js.map +1 -1
  53. package/dist/vault/project.js +2 -2
  54. package/dist/vault/project.js.map +1 -1
  55. package/dist/vault/self-update.js +1 -1
  56. package/dist/vault/status.js +3 -2
  57. package/dist/vault/status.js.map +1 -1
  58. package/dist/vault/upgrade.js +7 -1
  59. package/dist/vault/upgrade.js.map +1 -1
  60. package/dist/vault/vault-detect.js +4 -3
  61. package/dist/vault/vault-detect.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/assets/obsidian-skills/byoao-conventions.md +2 -2
  64. package/src/assets/presets/common/AGENTS.md.hbs +46 -0
  65. package/src/assets/presets/common/Start Here.md.hbs +2 -2
  66. package/src/skills/diagnose.md +7 -7
  67. package/src/skills/organize.md +1 -1
  68. package/src/skills/weave.md +1 -1
package/dist/index.js CHANGED
@@ -4682,13 +4682,13 @@ var require_ast = __commonJS({
4682
4682
  helperExpression: function helperExpression(node) {
4683
4683
  return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
4684
4684
  },
4685
- scopedId: function scopedId(path18) {
4686
- return /^\.|this\b/.test(path18.original);
4685
+ scopedId: function scopedId(path17) {
4686
+ return /^\.|this\b/.test(path17.original);
4687
4687
  },
4688
4688
  // an ID is simple if it only has one part, and that part is not
4689
4689
  // `..` or `this`.
4690
- simpleId: function simpleId(path18) {
4691
- return path18.parts.length === 1 && !AST.helpers.scopedId(path18) && !path18.depth;
4690
+ simpleId: function simpleId(path17) {
4691
+ return path17.parts.length === 1 && !AST.helpers.scopedId(path17) && !path17.depth;
4692
4692
  }
4693
4693
  }
4694
4694
  };
@@ -5758,12 +5758,12 @@ var require_helpers2 = __commonJS({
5758
5758
  loc
5759
5759
  };
5760
5760
  }
5761
- function prepareMustache(path18, params, hash2, open, strip, locInfo) {
5761
+ function prepareMustache(path17, params, hash2, open, strip, locInfo) {
5762
5762
  var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
5763
5763
  var decorator = /\*/.test(open);
5764
5764
  return {
5765
5765
  type: decorator ? "Decorator" : "MustacheStatement",
5766
- path: path18,
5766
+ path: path17,
5767
5767
  params,
5768
5768
  hash: hash2,
5769
5769
  escaped,
@@ -6033,9 +6033,9 @@ var require_compiler = __commonJS({
6033
6033
  },
6034
6034
  DecoratorBlock: function DecoratorBlock(decorator) {
6035
6035
  var program = decorator.program && this.compileProgram(decorator.program);
6036
- var params = this.setupFullMustacheParams(decorator, program, void 0), path18 = decorator.path;
6036
+ var params = this.setupFullMustacheParams(decorator, program, void 0), path17 = decorator.path;
6037
6037
  this.useDecorators = true;
6038
- this.opcode("registerDecorator", params.length, path18.original);
6038
+ this.opcode("registerDecorator", params.length, path17.original);
6039
6039
  },
6040
6040
  PartialStatement: function PartialStatement(partial2) {
6041
6041
  this.usePartial = true;
@@ -6099,46 +6099,46 @@ var require_compiler = __commonJS({
6099
6099
  }
6100
6100
  },
6101
6101
  ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
6102
- var path18 = sexpr.path, name = path18.parts[0], isBlock = program != null || inverse != null;
6103
- this.opcode("getContext", path18.depth);
6102
+ var path17 = sexpr.path, name = path17.parts[0], isBlock = program != null || inverse != null;
6103
+ this.opcode("getContext", path17.depth);
6104
6104
  this.opcode("pushProgram", program);
6105
6105
  this.opcode("pushProgram", inverse);
6106
- path18.strict = true;
6107
- this.accept(path18);
6106
+ path17.strict = true;
6107
+ this.accept(path17);
6108
6108
  this.opcode("invokeAmbiguous", name, isBlock);
6109
6109
  },
6110
6110
  simpleSexpr: function simpleSexpr(sexpr) {
6111
- var path18 = sexpr.path;
6112
- path18.strict = true;
6113
- this.accept(path18);
6111
+ var path17 = sexpr.path;
6112
+ path17.strict = true;
6113
+ this.accept(path17);
6114
6114
  this.opcode("resolvePossibleLambda");
6115
6115
  },
6116
6116
  helperSexpr: function helperSexpr(sexpr, program, inverse) {
6117
- var params = this.setupFullMustacheParams(sexpr, program, inverse), path18 = sexpr.path, name = path18.parts[0];
6117
+ var params = this.setupFullMustacheParams(sexpr, program, inverse), path17 = sexpr.path, name = path17.parts[0];
6118
6118
  if (this.options.knownHelpers[name]) {
6119
6119
  this.opcode("invokeKnownHelper", params.length, name);
6120
6120
  } else if (this.options.knownHelpersOnly) {
6121
6121
  throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
6122
6122
  } else {
6123
- path18.strict = true;
6124
- path18.falsy = true;
6125
- this.accept(path18);
6126
- this.opcode("invokeHelper", params.length, path18.original, _ast2["default"].helpers.simpleId(path18));
6123
+ path17.strict = true;
6124
+ path17.falsy = true;
6125
+ this.accept(path17);
6126
+ this.opcode("invokeHelper", params.length, path17.original, _ast2["default"].helpers.simpleId(path17));
6127
6127
  }
6128
6128
  },
6129
- PathExpression: function PathExpression(path18) {
6130
- this.addDepth(path18.depth);
6131
- this.opcode("getContext", path18.depth);
6132
- var name = path18.parts[0], scoped = _ast2["default"].helpers.scopedId(path18), blockParamId = !path18.depth && !scoped && this.blockParamIndex(name);
6129
+ PathExpression: function PathExpression(path17) {
6130
+ this.addDepth(path17.depth);
6131
+ this.opcode("getContext", path17.depth);
6132
+ var name = path17.parts[0], scoped = _ast2["default"].helpers.scopedId(path17), blockParamId = !path17.depth && !scoped && this.blockParamIndex(name);
6133
6133
  if (blockParamId) {
6134
- this.opcode("lookupBlockParam", blockParamId, path18.parts);
6134
+ this.opcode("lookupBlockParam", blockParamId, path17.parts);
6135
6135
  } else if (!name) {
6136
6136
  this.opcode("pushContext");
6137
- } else if (path18.data) {
6137
+ } else if (path17.data) {
6138
6138
  this.options.data = true;
6139
- this.opcode("lookupData", path18.depth, path18.parts, path18.strict);
6139
+ this.opcode("lookupData", path17.depth, path17.parts, path17.strict);
6140
6140
  } else {
6141
- this.opcode("lookupOnContext", path18.parts, path18.falsy, path18.strict, scoped);
6141
+ this.opcode("lookupOnContext", path17.parts, path17.falsy, path17.strict, scoped);
6142
6142
  }
6143
6143
  },
6144
6144
  StringLiteral: function StringLiteral(string4) {
@@ -6488,16 +6488,16 @@ var require_util = __commonJS({
6488
6488
  }
6489
6489
  exports2.urlGenerate = urlGenerate;
6490
6490
  function normalize(aPath) {
6491
- var path18 = aPath;
6491
+ var path17 = aPath;
6492
6492
  var url2 = urlParse(aPath);
6493
6493
  if (url2) {
6494
6494
  if (!url2.path) {
6495
6495
  return aPath;
6496
6496
  }
6497
- path18 = url2.path;
6497
+ path17 = url2.path;
6498
6498
  }
6499
- var isAbsolute = exports2.isAbsolute(path18);
6500
- var parts = path18.split(/\/+/);
6499
+ var isAbsolute = exports2.isAbsolute(path17);
6500
+ var parts = path17.split(/\/+/);
6501
6501
  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
6502
6502
  part = parts[i];
6503
6503
  if (part === ".") {
@@ -6514,15 +6514,15 @@ var require_util = __commonJS({
6514
6514
  }
6515
6515
  }
6516
6516
  }
6517
- path18 = parts.join("/");
6518
- if (path18 === "") {
6519
- path18 = isAbsolute ? "/" : ".";
6517
+ path17 = parts.join("/");
6518
+ if (path17 === "") {
6519
+ path17 = isAbsolute ? "/" : ".";
6520
6520
  }
6521
6521
  if (url2) {
6522
- url2.path = path18;
6522
+ url2.path = path17;
6523
6523
  return urlGenerate(url2);
6524
6524
  }
6525
- return path18;
6525
+ return path17;
6526
6526
  }
6527
6527
  exports2.normalize = normalize;
6528
6528
  function join2(aRoot, aPath) {
@@ -9303,8 +9303,8 @@ var require_printer = __commonJS({
9303
9303
  return this.accept(sexpr.path) + " " + params + hash2;
9304
9304
  };
9305
9305
  PrintVisitor.prototype.PathExpression = function(id) {
9306
- var path18 = id.parts.join("/");
9307
- return (id.data ? "@" : "") + "PATH:" + path18;
9306
+ var path17 = id.parts.join("/");
9307
+ return (id.data ? "@" : "") + "PATH:" + path17;
9308
9308
  };
9309
9309
  PrintVisitor.prototype.StringLiteral = function(string4) {
9310
9310
  return '"' + string4.value + '"';
@@ -12015,10 +12015,10 @@ function mergeDefs(...defs) {
12015
12015
  function cloneDef(schema) {
12016
12016
  return mergeDefs(schema._zod.def);
12017
12017
  }
12018
- function getElementAtPath(obj, path18) {
12019
- if (!path18)
12018
+ function getElementAtPath(obj, path17) {
12019
+ if (!path17)
12020
12020
  return obj;
12021
- return path18.reduce((acc, key) => acc?.[key], obj);
12021
+ return path17.reduce((acc, key) => acc?.[key], obj);
12022
12022
  }
12023
12023
  function promiseAllObject(promisesObj) {
12024
12024
  const keys = Object.keys(promisesObj);
@@ -12379,11 +12379,11 @@ function aborted(x, startIndex = 0) {
12379
12379
  }
12380
12380
  return false;
12381
12381
  }
12382
- function prefixIssues(path18, issues) {
12382
+ function prefixIssues(path17, issues) {
12383
12383
  return issues.map((iss) => {
12384
12384
  var _a;
12385
12385
  (_a = iss).path ?? (_a.path = []);
12386
- iss.path.unshift(path18);
12386
+ iss.path.unshift(path17);
12387
12387
  return iss;
12388
12388
  });
12389
12389
  }
@@ -12551,7 +12551,7 @@ function treeifyError(error45, _mapper) {
12551
12551
  return issue2.message;
12552
12552
  };
12553
12553
  const result = { errors: [] };
12554
- const processError = (error46, path18 = []) => {
12554
+ const processError = (error46, path17 = []) => {
12555
12555
  var _a, _b;
12556
12556
  for (const issue2 of error46.issues) {
12557
12557
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -12561,7 +12561,7 @@ function treeifyError(error45, _mapper) {
12561
12561
  } else if (issue2.code === "invalid_element") {
12562
12562
  processError({ issues: issue2.issues }, issue2.path);
12563
12563
  } else {
12564
- const fullpath = [...path18, ...issue2.path];
12564
+ const fullpath = [...path17, ...issue2.path];
12565
12565
  if (fullpath.length === 0) {
12566
12566
  result.errors.push(mapper(issue2));
12567
12567
  continue;
@@ -12593,8 +12593,8 @@ function treeifyError(error45, _mapper) {
12593
12593
  }
12594
12594
  function toDotPath(_path) {
12595
12595
  const segs = [];
12596
- const path18 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
12597
- for (const seg of path18) {
12596
+ const path17 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
12597
+ for (const seg of path17) {
12598
12598
  if (typeof seg === "number")
12599
12599
  segs.push(`[${seg}]`);
12600
12600
  else if (typeof seg === "symbol")
@@ -23713,6 +23713,9 @@ var _semver = __toESM(require_semver2(), 1);
23713
23713
  import * as nodeFs from "node:fs";
23714
23714
  import * as nodeFsPromises from "node:fs/promises";
23715
23715
  import nodePath from "node:path";
23716
+ async function rename2(oldPath, newPath) {
23717
+ await nodeFsPromises.rename(oldPath, newPath);
23718
+ }
23716
23719
  async function copy(src, dest) {
23717
23720
  await nodeFsPromises.cp(src, dest, { recursive: true });
23718
23721
  }
@@ -23761,6 +23764,7 @@ var fs = {
23761
23764
  readdir: nodeFsPromises.readdir,
23762
23765
  mkdir: nodeFsPromises.mkdir,
23763
23766
  copy,
23767
+ rename: rename2,
23764
23768
  ensureDir,
23765
23769
  pathExists,
23766
23770
  pathExistsSync,
@@ -24272,8 +24276,8 @@ function getErrorMap2() {
24272
24276
 
24273
24277
  // node_modules/zod/v3/helpers/parseUtil.js
24274
24278
  var makeIssue = (params) => {
24275
- const { data, path: path18, errorMaps, issueData } = params;
24276
- const fullPath = [...path18, ...issueData.path || []];
24279
+ const { data, path: path17, errorMaps, issueData } = params;
24280
+ const fullPath = [...path17, ...issueData.path || []];
24277
24281
  const fullIssue = {
24278
24282
  ...issueData,
24279
24283
  path: fullPath
@@ -24389,11 +24393,11 @@ var errorUtil;
24389
24393
 
24390
24394
  // node_modules/zod/v3/types.js
24391
24395
  var ParseInputLazyPath = class {
24392
- constructor(parent, value, path18, key) {
24396
+ constructor(parent, value, path17, key) {
24393
24397
  this._cachedPath = [];
24394
24398
  this.parent = parent;
24395
24399
  this.data = value;
24396
- this._path = path18;
24400
+ this._path = path17;
24397
24401
  this._key = key;
24398
24402
  }
24399
24403
  get path() {
@@ -28283,7 +28287,7 @@ async function configureProvider(provider, gcpProjectId) {
28283
28287
 
28284
28288
  // dist/vault/manifest.js
28285
28289
  import path4 from "node:path";
28286
- var PKG_VERSION = "1.1.0";
28290
+ var PKG_VERSION = "1.1.1";
28287
28291
  var InfrastructureSchema = external_exports2.object({
28288
28292
  skills: external_exports2.array(external_exports2.string()).default([]),
28289
28293
  commands: external_exports2.array(external_exports2.string()).default([]),
@@ -28348,9 +28352,10 @@ function detectVaultContext(dir) {
28348
28352
  const hasObsidian = fs.existsSync(path5.join(candidate, ".obsidian"));
28349
28353
  if (!hasObsidian)
28350
28354
  continue;
28351
- const hasAgentMd = fs.existsSync(path5.join(candidate, "AGENT.md"));
28355
+ const hasAgentsMd = fs.existsSync(path5.join(candidate, "AGENTS.md"));
28356
+ const hasAgentMdFallback = fs.existsSync(path5.join(candidate, "AGENT.md"));
28352
28357
  const hasGlossary = fs.existsSync(path5.join(candidate, "Knowledge", "Glossary.md"));
28353
- if (hasAgentMd || hasGlossary) {
28358
+ if (hasAgentsMd || hasAgentMdFallback || hasGlossary) {
28354
28359
  return candidate;
28355
28360
  }
28356
28361
  }
@@ -28464,8 +28469,8 @@ async function createMinimalCore(ctx, glossaryEntries = []) {
28464
28469
  ctx.filesCreated++;
28465
28470
  }
28466
28471
  }
28467
- async function createAgentMd(ctx, ownerName, presetConfig, presetDir, projects, jiraHost, jiraProject) {
28468
- const agentSkeletonTemplate = await fs.readFile(path6.join(ctx.commonDir, "AGENT.md.hbs"), "utf-8");
28472
+ async function createAgentsMd(ctx, ownerName, presetConfig, presetDir, projects, jiraHost, jiraProject) {
28473
+ const agentsTemplate = await fs.readFile(path6.join(ctx.commonDir, "AGENTS.md.hbs"), "utf-8");
28469
28474
  let roleSection = "";
28470
28475
  const agentSectionPath = path6.join(presetDir, "agent-section.hbs");
28471
28476
  if (await fs.pathExists(agentSectionPath)) {
@@ -28483,14 +28488,14 @@ async function createAgentMd(ctx, ownerName, presetConfig, presetDir, projects,
28483
28488
  HAS_JIRA: !!(jiraHost && jiraProject)
28484
28489
  });
28485
28490
  }
28486
- const agentContent = renderTemplate(agentSkeletonTemplate, {
28491
+ const agentsContent = renderTemplate(agentsTemplate, {
28487
28492
  KB_NAME: ctx.kbName,
28488
28493
  OWNER_NAME: ownerName,
28489
28494
  ROLE_SECTION: roleSection
28490
28495
  });
28491
- const agentMdPath = path6.join(ctx.vaultPath, "AGENT.md");
28492
- if (!await fs.pathExists(agentMdPath)) {
28493
- await fs.writeFile(agentMdPath, agentContent);
28496
+ const agentsMdPath = path6.join(ctx.vaultPath, "AGENTS.md");
28497
+ if (!await fs.pathExists(agentsMdPath)) {
28498
+ await fs.writeFile(agentsMdPath, agentsContent);
28494
28499
  ctx.filesCreated++;
28495
28500
  }
28496
28501
  }
@@ -28634,7 +28639,7 @@ async function createVault(config2) {
28634
28639
  }
28635
28640
  await createMinimalCore(ctx, glossaryEntries);
28636
28641
  const allTemplateNames = await applyPresetOverlay(ctx, presetConfig, presetDir);
28637
- await createAgentMd(ctx, config2.ownerName, presetConfig, presetDir, projects, jiraHost, jiraProject);
28642
+ await createAgentsMd(ctx, config2.ownerName, presetConfig, presetDir, projects, jiraHost, jiraProject);
28638
28643
  await createPeopleNotes(ctx, members);
28639
28644
  await createProjectNotes(ctx, projects);
28640
28645
  const hasPeopleDir = presetConfig.directories.includes("People") || members.length > 0;
@@ -28847,7 +28852,7 @@ function formatObsidianStatus(status) {
28847
28852
  import path7 from "node:path";
28848
28853
  import os3 from "node:os";
28849
28854
  var byoao_init_vault = tool({
28850
- description: "Create a personal knowledge base in Obsidian. Creates directory structure, templates, glossary, agent routing file (AGENT.md), and optional people/project notes with wikilinks. Checks that Obsidian is installed first.",
28855
+ description: "Create a personal knowledge base in Obsidian. Creates directory structure, templates, glossary, agent routing file (AGENTS.md), and optional people/project notes with wikilinks. Checks that Obsidian is installed first.",
28851
28856
  args: {
28852
28857
  kbName: tool.schema.string().describe(`Knowledge base name (e.g. "Jay's KB")`),
28853
28858
  ownerName: tool.schema.string().optional().describe("Owner's name"),
@@ -29032,7 +29037,7 @@ ${tableRow}`);
29032
29037
  }
29033
29038
  await fs.writeFile(teamIndexPath, teamContent);
29034
29039
  }
29035
- for (const agentFile of ["AGENT.md"]) {
29040
+ for (const agentFile of ["AGENTS.md", "AGENT.md"]) {
29036
29041
  const agentPath = path8.join(vaultPath, agentFile);
29037
29042
  if (await fs.pathExists(agentPath)) {
29038
29043
  let agentContent = await fs.readFile(agentPath, "utf-8");
@@ -29060,7 +29065,7 @@ ${tableRow}`);
29060
29065
 
29061
29066
  // dist/tools/add-person.js
29062
29067
  var byoao_add_person = tool({
29063
- description: "Add a person note to an existing vault. Creates a person note in People/ and updates the team index and AGENT.md wikilinks.",
29068
+ description: "Add a person note to an existing vault. Creates a person note in People/ and updates the team index and AGENTS.md wikilinks.",
29064
29069
  args: {
29065
29070
  vaultPath: tool.schema.string().describe("Path to the Obsidian vault"),
29066
29071
  name: tool.schema.string().describe("Person's full name"),
@@ -29124,7 +29129,7 @@ ${projectLine}$3`);
29124
29129
  await fs.writeFile(teamIndexPath, teamContent);
29125
29130
  }
29126
29131
  }
29127
- for (const agentFile of ["AGENT.md"]) {
29132
+ for (const agentFile of ["AGENTS.md", "AGENT.md"]) {
29128
29133
  const agentPath = path9.join(vaultPath, agentFile);
29129
29134
  if (await fs.pathExists(agentPath)) {
29130
29135
  let agentContent = await fs.readFile(agentPath, "utf-8");
@@ -29145,7 +29150,7 @@ ${projectLine}$3`);
29145
29150
 
29146
29151
  // dist/tools/add-project.js
29147
29152
  var byoao_add_project = tool({
29148
- description: "Add a new project note to an existing vault. Creates a project note in Projects/ and updates the team index and AGENT.md wikilinks.",
29153
+ description: "Add a new project note to an existing vault. Creates a project note in Projects/ and updates the team index and AGENTS.md wikilinks.",
29149
29154
  args: {
29150
29155
  vaultPath: tool.schema.string().describe("Path to the Obsidian vault"),
29151
29156
  name: tool.schema.string().describe("Project name"),
@@ -29296,7 +29301,7 @@ async function getVaultStatus(vaultPath) {
29296
29301
  brokenLinks: Array.from(brokenLinksSet),
29297
29302
  directories,
29298
29303
  hasObsidianConfig: await fs.pathExists(path11.join(vaultPath, ".obsidian")),
29299
- hasAgentMd: await fs.pathExists(path11.join(vaultPath, "AGENT.md")),
29304
+ hasAgentMd: await fs.pathExists(path11.join(vaultPath, "AGENTS.md")) || await fs.pathExists(path11.join(vaultPath, "AGENT.md")),
29300
29305
  hasGlossary: await fs.pathExists(path11.join(vaultPath, "Knowledge/Glossary.md"))
29301
29306
  };
29302
29307
  }
@@ -29316,7 +29321,7 @@ function formatVaultStatus(status) {
29316
29321
  }
29317
29322
  lines.push("");
29318
29323
  lines.push(`Config: ${status.hasObsidianConfig ? "\u2713" : "\u2717"} .obsidian/`);
29319
- lines.push(`Agent: ${status.hasAgentMd ? "\u2713" : "\u2717"} AGENT.md`);
29324
+ lines.push(`Agent: ${status.hasAgentMd ? "\u2713" : "\u2717"} AGENTS.md`);
29320
29325
  lines.push(`Glossary: ${status.hasGlossary ? "\u2713" : "\u2717"} Glossary.md`);
29321
29326
  if (status.brokenLinks.length > 0) {
29322
29327
  lines.push("");
@@ -29416,16 +29421,24 @@ async function getVaultDiagnosis(vaultPath) {
29416
29421
  if (!hasIssue)
29417
29422
  healthyNotes++;
29418
29423
  }
29419
- const agentPath = path12.join(vaultPath, "AGENT.md");
29420
- if (await fs.pathExists(agentPath)) {
29421
- const agentContent = await fs.readFile(agentPath, "utf-8");
29424
+ let agentContent = null;
29425
+ let agentResolvedPath = path12.join(vaultPath, "AGENTS.md");
29426
+ if (await fs.pathExists(agentResolvedPath)) {
29427
+ agentContent = await fs.readFile(agentResolvedPath, "utf-8");
29428
+ } else {
29429
+ agentResolvedPath = path12.join(vaultPath, "AGENT.md");
29430
+ if (await fs.pathExists(agentResolvedPath)) {
29431
+ agentContent = await fs.readFile(agentResolvedPath, "utf-8");
29432
+ }
29433
+ }
29434
+ if (agentContent !== null) {
29422
29435
  const agentLinks = extractWikilinks2(agentContent);
29423
29436
  for (const linkTarget of agentLinks) {
29424
29437
  if (!noteNames.has(linkTarget)) {
29425
29438
  issues.push({
29426
29439
  severity: "warning",
29427
29440
  category: "agent-drift",
29428
- message: `AGENT.md links to [[${linkTarget}]] but no matching note found`
29441
+ message: `AGENTS.md links to [[${linkTarget}]] but no matching note found`
29429
29442
  });
29430
29443
  }
29431
29444
  }
@@ -29445,7 +29458,7 @@ async function getVaultDiagnosis(vaultPath) {
29445
29458
  const relativePath = path12.relative(vaultPath, filePath);
29446
29459
  if (relativePath.startsWith("Knowledge/templates/"))
29447
29460
  continue;
29448
- if (relativePath === "AGENT.md")
29461
+ if (relativePath === "AGENT.md" || relativePath === "AGENTS.md")
29449
29462
  continue;
29450
29463
  const name = path12.basename(filePath, ".md");
29451
29464
  const outgoing = allLinksMap.get(name) || /* @__PURE__ */ new Set();
@@ -29487,7 +29500,7 @@ async function getVaultDiagnosis(vaultPath) {
29487
29500
 
29488
29501
  // dist/tools/vault-doctor.js
29489
29502
  var byoao_vault_doctor = tool({
29490
- description: "Scan an Obsidian vault and produce a diagnostic report. Checks: missing frontmatter, missing type/tags, AGENT.md drift, orphan notes, broken wikilinks.",
29503
+ description: "Scan an Obsidian vault and produce a diagnostic report. Checks: missing frontmatter, missing type/tags, AGENTS.md drift, orphan notes, broken wikilinks.",
29491
29504
  args: {
29492
29505
  vaultPath: tool.schema.string().describe("Absolute path to the Obsidian vault")
29493
29506
  },
@@ -29557,14 +29570,30 @@ var byoao_switch_provider = tool({
29557
29570
  import path13 from "node:path";
29558
29571
 
29559
29572
  // dist/vault/obsidian-cli.js
29560
- import { execFileSync } from "node:child_process";
29573
+ import { execFileSync, execSync as execSync3 } from "node:child_process";
29574
+ import { platform as platform2 } from "node:os";
29575
+ var _cliAvailableCache = null;
29561
29576
  function isObsidianCliAvailable() {
29577
+ if (_cliAvailableCache !== null)
29578
+ return _cliAvailableCache;
29579
+ const os5 = platform2();
29562
29580
  try {
29563
- execFileSync("obsidian", ["--version"], { stdio: "pipe" });
29564
- return true;
29581
+ if (os5 === "darwin") {
29582
+ execSync3("pgrep -x Obsidian", { stdio: "pipe", timeout: 3e3 });
29583
+ _cliAvailableCache = true;
29584
+ } else if (os5 === "linux") {
29585
+ execSync3("pgrep -x obsidian", { stdio: "pipe", timeout: 3e3 });
29586
+ _cliAvailableCache = true;
29587
+ } else if (os5 === "win32") {
29588
+ const result = execSync3('tasklist /FI "IMAGENAME eq Obsidian.exe" /NH', { stdio: "pipe", timeout: 3e3, encoding: "utf-8" });
29589
+ _cliAvailableCache = result.includes("Obsidian.exe");
29590
+ } else {
29591
+ _cliAvailableCache = false;
29592
+ }
29565
29593
  } catch {
29566
- return false;
29594
+ _cliAvailableCache = false;
29567
29595
  }
29596
+ return _cliAvailableCache;
29568
29597
  }
29569
29598
  function execObsidianCmd(args) {
29570
29599
  try {
@@ -30019,7 +30048,7 @@ async function upgradeVault(vaultPath, options2) {
30019
30048
  const { preset, dryRun = false, force = false } = options2 ?? {};
30020
30049
  const detectedPath = detectVaultContext(vaultPath);
30021
30050
  if (!detectedPath) {
30022
- throw new Error(`No BYOAO vault detected at "${vaultPath}". Expected .obsidian/ and AGENT.md or Knowledge/Glossary.md.`);
30051
+ throw new Error(`No BYOAO vault detected at "${vaultPath}". Expected .obsidian/ and AGENTS.md or Knowledge/Glossary.md.`);
30023
30052
  }
30024
30053
  let manifest = await readManifest(vaultPath);
30025
30054
  if (!manifest) {
@@ -30038,6 +30067,11 @@ async function upgradeVault(vaultPath, options2) {
30038
30067
  dryRun
30039
30068
  };
30040
30069
  }
30070
+ const legacyAgentMd = path15.join(vaultPath, "AGENT.md");
30071
+ const newAgentsMd = path15.join(vaultPath, "AGENTS.md");
30072
+ if (!dryRun && await fs.pathExists(legacyAgentMd) && !await fs.pathExists(newAgentsMd)) {
30073
+ await fs.rename(legacyAgentMd, newAgentsMd);
30074
+ }
30041
30075
  const effectivePreset = preset ?? manifest.preset;
30042
30076
  const packageAssets = resolvePackageAssets(effectivePreset);
30043
30077
  const plan = buildUpgradePlan(vaultPath, manifest, packageAssets);
@@ -30153,7 +30187,7 @@ var byoao_vault_upgrade = tool({
30153
30187
  });
30154
30188
 
30155
30189
  // dist/tools/mcp-auth.js
30156
- import { spawn, execSync as execSync3 } from "node:child_process";
30190
+ import { spawn, execSync as execSync4 } from "node:child_process";
30157
30191
  import path16 from "node:path";
30158
30192
  import os4 from "node:os";
30159
30193
  function findOpencodeBinary() {
@@ -30163,7 +30197,7 @@ function findOpencodeBinary() {
30163
30197
  ];
30164
30198
  for (const p of candidates) {
30165
30199
  try {
30166
- execSync3(`test -x "${p}"`, { stdio: "pipe" });
30200
+ execSync4(`test -x "${p}"`, { stdio: "pipe" });
30167
30201
  return p;
30168
30202
  } catch {
30169
30203
  }
@@ -30261,13 +30295,10 @@ The user may need to:
30261
30295
  }
30262
30296
  });
30263
30297
 
30264
- // dist/hooks/system-transform.js
30265
- import path17 from "node:path";
30266
-
30267
30298
  // dist/lib/logger.js
30268
30299
  import { join } from "node:path";
30269
30300
  import { homedir } from "node:os";
30270
- import { appendFile, stat, rename, mkdir as mkdir2, readFile as readFile2, unlink } from "node:fs/promises";
30301
+ import { appendFile, stat, rename as rename3, mkdir as mkdir2, readFile as readFile2, unlink } from "node:fs/promises";
30271
30302
  var LOG_DIR = process.env.BYOAO_LOG_DIR || join(homedir(), ".byoao", "logs");
30272
30303
  var LOG_FILE = join(LOG_DIR, "error.log");
30273
30304
  var MAX_LOG_SIZE = 512 * 1024;
@@ -30312,7 +30343,7 @@ async function rotateIfNeeded() {
30312
30343
  try {
30313
30344
  const s = await stat(LOG_FILE);
30314
30345
  if (s.size >= MAX_LOG_SIZE) {
30315
- await rename(LOG_FILE, ROTATED_FILE);
30346
+ await rename3(LOG_FILE, ROTATED_FILE);
30316
30347
  }
30317
30348
  } catch {
30318
30349
  }
@@ -30341,86 +30372,6 @@ async function log(level, source, message, options2) {
30341
30372
  }
30342
30373
 
30343
30374
  // dist/hooks/system-transform.js
30344
- function readAgentMdFromCwd() {
30345
- const candidates = [
30346
- path17.join(process.cwd(), "AGENT.md"),
30347
- path17.join(process.cwd(), "..", "AGENT.md")
30348
- ];
30349
- for (const candidate of candidates) {
30350
- if (fs.existsSync(candidate)) {
30351
- try {
30352
- return fs.readFileSync(candidate, "utf-8");
30353
- } catch {
30354
- void log("warn", "hook:system-transform", "Failed to read AGENT.md", {
30355
- context: { path: candidate }
30356
- }).catch(() => {
30357
- });
30358
- return null;
30359
- }
30360
- }
30361
- }
30362
- return null;
30363
- }
30364
- function buildNavigationStrategy(vaultPath) {
30365
- const cliAvailable = isObsidianCliAvailable();
30366
- const header = [
30367
- "\n---",
30368
- "## BYOAO Navigation Strategy",
30369
- "",
30370
- "### Scope",
30371
- "",
30372
- `This session is connected to a BYOAO knowledge base at: \`${vaultPath}\``,
30373
- ""
30374
- ];
30375
- const scopeLines = cliAvailable ? [
30376
- `- **Inside the vault** (\`${vaultPath}/\` and its subdirectories): **ALWAYS use Obsidian CLI first** (see /obsidian-cli skill) or BYOAO tools (\`byoao_search_vault\`, \`byoao_note_read\`, \`byoao_graph_health\`). Obsidian CLI is graph-aware and understands wikilinks, backlinks, and frontmatter \u2014 grep/cat/find do not. Only fall back to find/grep when Obsidian CLI returns no results for a given query.`,
30377
- `- **Outside the vault** (code repositories, config files, system paths, etc.): use any appropriate tool (grep, cat, read, bash, etc.) freely.`
30378
- ] : [
30379
- `- **Obsidian CLI is NOT available** (either not installed or Obsidian is not running). Use built-in tools (find, grep, read) to access vault notes at \`${vaultPath}/\`.`,
30380
- `- BYOAO tools (\`byoao_search_vault\`, \`byoao_note_read\`, \`byoao_graph_health\`) are still available and preferred over raw find/grep when possible.`,
30381
- `- **Outside the vault** (code repositories, config files, system paths, etc.): use any appropriate tool freely.`
30382
- ];
30383
- const navigationSteps = cliAvailable ? [
30384
- "### Navigation Pattern (Progressive Disclosure)",
30385
- "",
30386
- "1. Read [[Glossary]] first \u2014 the entity dictionary for this knowledge base.",
30387
- " Every term is a key concept the user cares about.",
30388
- "2. Use `obsidian properties sort=count counts` to understand vault structure",
30389
- "3. Search by `domain` property or tags to find relevant notes",
30390
- "4. Read the `references` frontmatter of found notes for deeper context",
30391
- "5. Use `obsidian backlinks` to discover related notes the user didn't mention",
30392
- "6. Chain: Glossary \u2192 domain notes \u2192 references \u2192 backlinks \u2192 details",
30393
- "",
30394
- "If an Obsidian CLI search returns no results, retry with find/grep as a fallback."
30395
- ] : [
30396
- "### Navigation Pattern (Progressive Disclosure)",
30397
- "",
30398
- "1. Read [[Glossary]] first \u2014 the entity dictionary for this knowledge base.",
30399
- " Every term is a key concept the user cares about.",
30400
- "2. Use `byoao_search_vault` or grep frontmatter fields to understand vault structure",
30401
- "3. Search by `domain` property or tags to find relevant notes",
30402
- "4. Read the `references` frontmatter of found notes for deeper context",
30403
- "5. Use grep for `[[note name]]` patterns to discover backlinks manually",
30404
- "6. Chain: Glossary \u2192 domain notes \u2192 references \u2192 backlinks \u2192 details"
30405
- ];
30406
- const footer = [
30407
- "",
30408
- "### Key Frontmatter Fields",
30409
- "",
30410
- "| Field | Purpose |",
30411
- "|-------------|--------------------------------------------------|",
30412
- "| `domain` | Knowledge area \u2014 use to find related notes |",
30413
- "| `references`| Related notes \u2014 follow for deeper context |",
30414
- "| `type` | Note kind (meeting, idea, reference, daily, etc) |",
30415
- "| `tags` | Flexible categorization |",
30416
- "",
30417
- "### Vault Health",
30418
- "",
30419
- "If you notice broken wikilinks, orphan notes, or missing frontmatter while working,",
30420
- "suggest that the user run `/diagnose` to get a full vault health report."
30421
- ];
30422
- return [...header, ...scopeLines, "", ...navigationSteps, ...footer].join("\n");
30423
- }
30424
30375
  async function buildMcpAuthGuidance() {
30425
30376
  try {
30426
30377
  const config2 = await readOpencodeConfig();
@@ -30458,18 +30409,6 @@ async function buildMcpAuthGuidance() {
30458
30409
  }
30459
30410
  }
30460
30411
  async function systemTransformHook(_input, output) {
30461
- const agentMd = readAgentMdFromCwd();
30462
- if (agentMd) {
30463
- output.system.push(`
30464
- ---
30465
- ## BYOAO Vault Context (from AGENT.md)
30466
-
30467
- ${agentMd}`);
30468
- }
30469
- const vaultPath = detectVaultContext(process.cwd());
30470
- if (vaultPath) {
30471
- output.system.push(buildNavigationStrategy(vaultPath));
30472
- }
30473
30412
  const mcpGuidance = await buildMcpAuthGuidance();
30474
30413
  if (mcpGuidance) {
30475
30414
  output.system.push(mcpGuidance);
@@ -2,6 +2,9 @@
2
2
  import * as nodeFs from "node:fs";
3
3
  import * as nodeFsPromises from "node:fs/promises";
4
4
  import nodePath from "node:path";
5
+ async function rename(oldPath, newPath) {
6
+ await nodeFsPromises.rename(oldPath, newPath);
7
+ }
5
8
  async function copy(src, dest) {
6
9
  await nodeFsPromises.cp(src, dest, { recursive: true });
7
10
  }
@@ -50,7 +53,7 @@ export const fs = {
50
53
  writeFile: nodeFsPromises.writeFile,
51
54
  readdir: nodeFsPromises.readdir,
52
55
  mkdir: nodeFsPromises.mkdir,
53
- copy, ensureDir, pathExists, pathExistsSync,
56
+ copy, rename, ensureDir, pathExists, pathExistsSync,
54
57
  readJson, readJsonSync, writeJson, writeJsonSync,
55
58
  remove, removeSync,
56
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"cjs-modules.js","sourceRoot":"","sources":["../../src/lib/cjs-modules.ts"],"names":[],"mappings":"AAeA,iFAAiF;AACjF,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,KAAK,UAAU,IAAI,CAAC,GAAW,EAAE,IAAY;IAC3C,MAAM,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1D,CAAC;AACD,KAAK,UAAU,SAAS,CAAC,OAAe;IACtC,MAAM,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3D,CAAC;AACD,KAAK,UAAU,UAAU,CAAC,QAAgB;IACxC,IAAI,CAAC;QAAC,MAAM,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,KAAK,CAAC;IAAC,CAAC;AACrF,CAAC;AACD,SAAS,cAAc,CAAC,QAAgB;IACtC,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AACD,KAAK,UAAU,QAAQ,CAAC,QAAgB;IACtC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AACD,SAAS,YAAY,CAAC,QAAgB;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5D,CAAC;AACD,KAAK,UAAU,SAAS,CAAC,QAA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