diff --git a/packages/cli/README.md b/packages/cli/README.md index 87ed4e0e..ff6415d1 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -406,13 +406,13 @@ the override without editing JSON by hand. `sources add` appends by default. `--position ` inserts at the 1-based position among configurable directories, so `--position 1` gives that directory -the highest priority after the fixed cwd source. `sources remove` accepts either -that configurable position or an exact path. +the highest priority after the fixed `cwd` and `cwd:agents` sources. `sources +remove` accepts either that configurable position or an exact path. Examples: ```sh -# Show the full source cascade, including fixed cwd and library entries +# Show the full source cascade, including fixed cwd/cwd:agents and library entries agentworkforce sources list # Install personas from another checkout, below the default user persona dir diff --git a/packages/cli/src/cli-impl.ts b/packages/cli/src/cli-impl.ts index 9dfa5014..1d03cb3e 100644 --- a/packages/cli/src/cli-impl.ts +++ b/packages/cli/src/cli-impl.ts @@ -1757,10 +1757,11 @@ function buildFastLaunchPlan(input: { // dirs, so every persona JSON in every layer is a resolution input. for (const name of entries) { if (dir.nested) { - // One persona per subdirectory. The subdirectory's own mtime witnesses - // the compile that first creates persona.json, which the parent dir's - // stat does not see. - digests.push(statDigestOf(join(dir.dir, name))); + // One persona per subdirectory. A missing file digests to nulls, so + // this one entry witnesses both the compile that first writes + // persona.json and later edits to it. Digesting the subdirectory too + // would invalidate the plan every time an unrelated sibling — the + // handler, the README, agent-card.json — is added or rewritten. digests.push(statDigestOf(join(dir.dir, name, NESTED_PERSONA_FILENAME))); } else if (name.endsWith('.json')) { digests.push(statDigestOf(join(dir.dir, name)));