"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const OrgStructure_1 = require("./orchestrator/OrgStructure");
const ExecutionBoard_1 = require("./orchestrator/ExecutionBoard");
const ReleaseWorkflow_1 = require("./orchestrator/ReleaseWorkflow");
function assert(condition, message) {
    if (!condition)
        throw new Error(message);
}
async function main() {
    const org = new OrgStructure_1.OrgStructure();
    const board = new ExecutionBoard_1.ExecutionBoard();
    const release = new ReleaseWorkflow_1.ReleaseWorkflow();
    const roles = org.all();
    assert(roles.length >= 4, 'org structure should expose core leadership roles');
    board.add({
        id: 'phase6-init',
        title: 'Iniciar estrutura operacional da Fase 6',
        ownerRole: 'coo',
        status: 'active',
        priority: 'high',
        notes: 'Abrir trilho company-in-a-box'
    });
    const items = board.getAll();
    assert(items.some((item) => item.id === 'phase6-init'), 'execution board should store operational items');
    const checklist = release.create('release-phase6-bootstrap', [
        { name: 'build', ok: true },
        { name: 'tests', ok: true },
        { name: 'docs', ok: true }
    ]);
    assert(checklist.approved === true, 'release checklist should approve when all checks pass');
    console.log('TEST_PHASE6_OPS_OK');
}
main().catch((error) => {
    console.error(error.message || error);
    process.exit(1);
});
