manifest generate will no longer fail when module has no agents and its first

This commit is contained in:
Brian Madison 2026-03-15 01:45:00 -05:00
parent 9fa51d996b
commit f35f620e08
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) {