fs-extra routes all async operations through graceful-fs, whose EMFILE retry queue causes non-deterministic file loss on macOS APFS during bulk copy operations (~500+ files). Approximately 50% of install runs lose 26+ files from _bmad/. Replace fs-extra entirely with a thin native wrapper (tools/cli/lib/fs.js) that provides the same API surface backed by node:fs and node:fs/promises. Copy and remove operations use synchronous native calls to eliminate the race condition. Verified across 8+ consecutive runs with zero file loss. - Add tools/cli/lib/fs.js native wrapper with full fs-extra API compat - Update all 40 files to require the wrapper instead of fs-extra - Remove fs-extra from package.json dependencies - Add 37-test suite including 250-file bulk copy determinism test |
||
|---|---|---|
| .. | ||
| agent | ||
| activation-builder.js | ||
| agent-analyzer.js | ||
| agent-party-generator.js | ||
| cli-utils.js | ||
| config.js | ||
| file-ops.js | ||
| fs.js | ||
| platform-codes.js | ||
| project-root.js | ||
| prompts.js | ||
| ui.js | ||
| xml-handler.js | ||
| xml-to-markdown.js | ||
| yaml-format.js | ||
| yaml-xml-builder.js | ||