We moved from ad-hoc task claims to a strictly defined 'Skill' system. Triumphs: - Implemented the 'beadboard-driver' skill, which encodes our project-specific coordination protocols (claim, reservation, handoff). - This ensures that any AI operative (or human supervisor) can participate in the project lifecycle using a unified CLI-driven state machine. - Decoupled high-level mission logic from low-level file mutations, allowing for easier agent skill composition in the future. Raw Honest Moment: Initially, we were just 'winging it' with manual status updates. Formalizing this into a skill was a necessary step to ensure our collaboration is repeatable and resilient to agent context swaps.
83 lines
1.8 KiB
JavaScript
83 lines
1.8 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import { findCommandInPath, resolveBbPath } from './lib/driver-lib.mjs';
|
|
|
|
async function main() {
|
|
try {
|
|
const bdPath = await findCommandInPath('bd');
|
|
if (!bdPath) {
|
|
process.stdout.write(
|
|
`${JSON.stringify(
|
|
{
|
|
ok: false,
|
|
error_code: 'BD_NOT_FOUND',
|
|
reason: 'Could not find bd in PATH.',
|
|
remediation: 'Install beads CLI or add bd executable to PATH.',
|
|
tools: {
|
|
bd: { available: false, path: null },
|
|
},
|
|
bb: null,
|
|
},
|
|
null,
|
|
2,
|
|
)}\n`,
|
|
);
|
|
return;
|
|
}
|
|
|
|
const bb = await resolveBbPath();
|
|
if (!bb.ok) {
|
|
process.stdout.write(
|
|
`${JSON.stringify(
|
|
{
|
|
ok: false,
|
|
error_code: 'BB_NOT_FOUND',
|
|
reason: bb.reason,
|
|
remediation: bb.remediation,
|
|
tools: {
|
|
bd: { available: true, path: bdPath },
|
|
},
|
|
bb,
|
|
},
|
|
null,
|
|
2,
|
|
)}\n`,
|
|
);
|
|
return;
|
|
}
|
|
|
|
process.stdout.write(
|
|
`${JSON.stringify(
|
|
{
|
|
ok: true,
|
|
timestamp: new Date().toISOString(),
|
|
tools: {
|
|
bd: { available: true, path: bdPath },
|
|
},
|
|
bb,
|
|
},
|
|
null,
|
|
2,
|
|
)}\n`,
|
|
);
|
|
} catch (error) {
|
|
process.stdout.write(
|
|
`${JSON.stringify(
|
|
{
|
|
ok: false,
|
|
error_code: 'PREFLIGHT_INTERNAL_ERROR',
|
|
reason: error instanceof Error ? error.message : String(error),
|
|
remediation: 'Inspect session-preflight.js and retry.',
|
|
tools: {
|
|
bd: { available: false, path: null },
|
|
},
|
|
bb: null,
|
|
},
|
|
null,
|
|
2,
|
|
)}\n`,
|
|
);
|
|
}
|
|
}
|
|
|
|
void main();
|