manifest generate will no longer fail when module has no agents and its first (#1998)

This commit is contained in:
Brian 2026-03-15 01:46:16 -05:00 committed by GitHub
parent 9fa51d996b
commit cbb8b98876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -267,9 +267,11 @@ class Manifest {
* @param {Object} options - Optional version info * @param {Object} options - Optional version info
*/ */
async addModule(bmadDir, moduleName, options = {}) { async addModule(bmadDir, moduleName, options = {}) {
const manifest = await this._readRaw(bmadDir); let manifest = await this._readRaw(bmadDir);
if (!manifest) { if (!manifest) {
throw new Error('No manifest found'); // Bootstrap a minimal manifest if it doesn't exist yet
// (e.g., skill-only modules with no agents to compile)
manifest = { modules: [] };
} }
if (!manifest.modules) { if (!manifest.modules) {