You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Minor Changes
d6e5ee3: A failed agentsmesh lessons ... --json command now has a stable code field (for example UNKNOWN_TOPIC or UNRECALLABLE_LESSON) next to error, and lessons strip-markers now reports a failed write with the same exit codes as the other write commands. The agentsmesh/lessons entry now exports the capture error classes, LessonsWriteRefusedError, isCaptureRejection and a LessonsErrorCode type. The MCP tool lessons_query now returns a warning when the lessons graph cannot be read, so an empty result is no longer mistaken for "no match".
Patch Changes
f8f046e: Commands now stop with exit code 2 when you pass a flag they do not accept, and suggest the closest one (for example --dryrun now says "Did you mean --dry-run?" instead of running a real generate). With --json, the same error comes back as a failure envelope. A config error now names the wrong key (targets[1]: …, features: …) in agentsmesh.yaml and agentsmesh.local.yaml, and no longer prints the full list of target ids.
2b8000c: agentsmesh generate now deletes the generated files of a target you removed from targets:, and the folders that became empty. It also does this when the run has nothing to generate. It deletes a file only when nobody has edited it since agentsmesh wrote it. Files you edited, and shared tool configs such as .cursor/mcp.json, are kept with a warning. --dry-run lists what would go, and generate --check fails (exit 1) while such files are still on disk, instead of saying the files are in sync. The summary now counts the removed files (Generated: 0 created, 0 updated, 3 removed, 13 unchanged), and --json output has removed and kept lists. A --targets run never deletes anything. The MCP generate tool reports them too: its result has removed and kept lists, and one warning for each kept file.
d6e5ee3: agentsmesh lessons add now refuses a file glob that matches every file (such as ** or **/*) with exit code 2 and the code CATCH_ALL_GLOB; use --scope always for a rule that applies to every task, or a file-class glob like src/lib/use*Form*.ts. Adding a rule again with different case, a trailing period, or wrapping quotes now updates the existing lesson instead of creating a near-duplicate. The capture hint after a failed command now names the program that really ran, and skips VAR=value words, sudo, env, time, nice, nohup, command, exec, and flags, so it no longer suggests triggers like -d\b or \bsudo\b.
d6e5ee3: lessons add run from a subfolder now reads a relative --trigger-file from that folder when the path does not exist from the project root, saves it project-relative, and says when it moved the glob. A catch-all file glob is now also refused when another lesson already holds it, and a failed cd no longer suggests a \bcd\b command trigger. The MCP tool lessons_query now returns a warning when a legacy lessons store could not be migrated, and agentsmesh/lessons also exports CatchAllGlobError, the curation errors (UnknownLessonError, SelfMergeError and the rest) and the RecallHookOutcome and ScaffoldLessonsOptions types.
d6e5ee3: agentsmesh init --lessons on a project set up earlier now creates .agentsmesh/hooks.yaml when it is missing and wires the recall hook into it, so generate projects the hook. The init output always says what happened to the hook (created, wired, already current, or skipped and why), and a re-run keeps a matcher you narrowed in hooks.yaml. Both init --lessons and generate now warn when hooks is missing from features, because the recall hook would never reach any tool.
d6e5ee3: The lessons recall hook now warns before git add, git commit or a --continue of a merge, rebase or cherry-pick while lessons.json is still in a conflict that the merge driver did not finish, so the other branch's lessons are not dropped by accident. lessons validate and lessons resolve no longer call a repaired merge result data loss (resolve keeps it and says it is already resolved), read files that start with a UTF-8 BOM, and use the common ancestor that fallback conflict markers now keep. The merge driver also warns on stderr when it cannot read the common ancestor.
d6e5ee3: lessons query now ranks and de-duplicates like the MCP lessons_query tool and the recall hook: --always rules are shown once per session (use --no-dedup to see them again), and a lesson that kept failing after delivery is down-ranked in the CLI too. A relative --file typed in a subfolder is now read from that folder, and the "output is capped" hint points to --format json. Recall also reports a failed legacy migration instead of hiding it.
d6e5ee3: lessons add run from a subfolder of a git repo that has no lessons yet now saves at the repository root, the same place the MCP tools use, instead of creating a second store in the subfolder. Lessons lookups (CLI, recall hook and MCP) now stop at the first .git folder or file, so a nested worktree or submodule no longer reads its parent checkout's lessons.
d6e5ee3: lessons merge now keeps an always-on rule always-on, keeps the loser's rationale, and keeps the earlier creation date. Lessons that were merged into a lesson you later merge or deprecate now move with it, so lessons deprecate works on any lesson (before, it was refused for every lesson that others had been merged into). Always-on lessons no longer show a "can never be recalled" warning, lessons untrigger lets you remove their last trigger, and merge, deprecate and untrigger errors now carry a stable code.