From 003aba31798c3ed29d12e2be95cf30a100e9983e Mon Sep 17 00:00:00 2001 From: ZenchantLive Date: Tue, 3 Mar 2026 19:23:53 -0800 Subject: [PATCH] test(skill): add bb mail lifecycle and preflight coverage --- package.json | 2 +- .../scripts/ensure-bb-mail-configured.mjs | 124 +++++++++++++++ .../bb-mail-integration.contract.test.mjs | 130 +++++++++++++++ ...nsure-bb-mail-configured.contract.test.mjs | 36 +++++ .../tests/resolve-bb.contract.test.mjs | 17 +- skills/beadboard-driver/tests/run-tests.mjs | 2 + .../tests/session-preflight.contract.test.mjs | 17 +- src/lib/agent-mail.ts | 10 +- .../ensure-bb-mail-configured.test.ts | 35 ++++ .../beadboard-driver/resolve-bb.test.ts | 39 +++-- .../session-preflight.test.ts | 17 +- tmp/bbmaf88zP8rv/.beads/.gitignore | 49 ------ tmp/bbmaf88zP8rv/.beads/README.md | 81 ---------- tmp/bbmaf88zP8rv/.beads/config.yaml | 55 ------- tmp/bbmaf88zP8rv/.beads/interactions.jsonl | 0 tmp/bbmaf88zP8rv/.beads/metadata.json | 6 - tmp/bbmaf88zP8rv/.gitignore | 4 - tmp/bbmaf88zP8rv/AGENTS.md | 150 ------------------ tmp/bbmaf8BMD1mI/.beads/.gitignore | 49 ------ tmp/bbmaf8BMD1mI/.beads/README.md | 81 ---------- tmp/bbmaf8BMD1mI/.beads/config.yaml | 55 ------- tmp/bbmaf8BMD1mI/.beads/interactions.jsonl | 0 tmp/bbmaf8BMD1mI/.beads/metadata.json | 6 - tmp/bbmaf8BMD1mI/.gitignore | 4 - tmp/bbmaf8BMD1mI/AGENTS.md | 150 ------------------ tmp/bbmaf8BaArXC/.beads/.gitignore | 49 ------ tmp/bbmaf8BaArXC/.beads/README.md | 81 ---------- tmp/bbmaf8BaArXC/.beads/config.yaml | 55 ------- tmp/bbmaf8BaArXC/.beads/interactions.jsonl | 0 tmp/bbmaf8BaArXC/.beads/metadata.json | 6 - tmp/bbmaf8BaArXC/.gitignore | 4 - tmp/bbmaf8BaArXC/AGENTS.md | 150 ------------------ tmp/bbmaf8FZn4MJ/.beads/.gitignore | 49 ------ tmp/bbmaf8FZn4MJ/.beads/README.md | 81 ---------- tmp/bbmaf8FZn4MJ/.beads/config.yaml | 55 ------- tmp/bbmaf8FZn4MJ/.beads/interactions.jsonl | 0 tmp/bbmaf8FZn4MJ/.beads/metadata.json | 6 - tmp/bbmaf8FZn4MJ/.gitignore | 4 - tmp/bbmaf8FZn4MJ/AGENTS.md | 150 ------------------ tmp/bbmaf8GJ6CIz/.beads/.gitignore | 49 ------ tmp/bbmaf8GJ6CIz/.beads/README.md | 81 ---------- tmp/bbmaf8GJ6CIz/.beads/config.yaml | 55 ------- tmp/bbmaf8GJ6CIz/.beads/interactions.jsonl | 0 tmp/bbmaf8GJ6CIz/.beads/metadata.json | 6 - tmp/bbmaf8GJ6CIz/.gitignore | 4 - tmp/bbmaf8GJ6CIz/AGENTS.md | 150 ------------------ tmp/bbmaf8Kx5GEB/.beads/.gitignore | 49 ------ tmp/bbmaf8Kx5GEB/.beads/README.md | 81 ---------- tmp/bbmaf8Kx5GEB/.beads/config.yaml | 55 ------- tmp/bbmaf8Kx5GEB/.beads/hooks/post-checkout | 9 -- tmp/bbmaf8Kx5GEB/.beads/hooks/post-merge | 9 -- tmp/bbmaf8Kx5GEB/.beads/hooks/pre-commit | 9 -- tmp/bbmaf8Kx5GEB/.beads/hooks/pre-push | 9 -- .../.beads/hooks/prepare-commit-msg | 9 -- tmp/bbmaf8Kx5GEB/.beads/interactions.jsonl | 0 tmp/bbmaf8Kx5GEB/.beads/metadata.json | 6 - tmp/bbmaf8Kx5GEB/.gitignore | 4 - tmp/bbmaf8Kx5GEB/AGENTS.md | 150 ------------------ 58 files changed, 402 insertions(+), 2142 deletions(-) create mode 100644 skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs create mode 100644 skills/beadboard-driver/tests/bb-mail-integration.contract.test.mjs create mode 100644 skills/beadboard-driver/tests/ensure-bb-mail-configured.contract.test.mjs create mode 100644 tests/skills/beadboard-driver/ensure-bb-mail-configured.test.ts delete mode 100644 tmp/bbmaf88zP8rv/.beads/.gitignore delete mode 100644 tmp/bbmaf88zP8rv/.beads/README.md delete mode 100644 tmp/bbmaf88zP8rv/.beads/config.yaml delete mode 100644 tmp/bbmaf88zP8rv/.beads/interactions.jsonl delete mode 100644 tmp/bbmaf88zP8rv/.beads/metadata.json delete mode 100644 tmp/bbmaf88zP8rv/.gitignore delete mode 100644 tmp/bbmaf88zP8rv/AGENTS.md delete mode 100644 tmp/bbmaf8BMD1mI/.beads/.gitignore delete mode 100644 tmp/bbmaf8BMD1mI/.beads/README.md delete mode 100644 tmp/bbmaf8BMD1mI/.beads/config.yaml delete mode 100644 tmp/bbmaf8BMD1mI/.beads/interactions.jsonl delete mode 100644 tmp/bbmaf8BMD1mI/.beads/metadata.json delete mode 100644 tmp/bbmaf8BMD1mI/.gitignore delete mode 100644 tmp/bbmaf8BMD1mI/AGENTS.md delete mode 100644 tmp/bbmaf8BaArXC/.beads/.gitignore delete mode 100644 tmp/bbmaf8BaArXC/.beads/README.md delete mode 100644 tmp/bbmaf8BaArXC/.beads/config.yaml delete mode 100644 tmp/bbmaf8BaArXC/.beads/interactions.jsonl delete mode 100644 tmp/bbmaf8BaArXC/.beads/metadata.json delete mode 100644 tmp/bbmaf8BaArXC/.gitignore delete mode 100644 tmp/bbmaf8BaArXC/AGENTS.md delete mode 100644 tmp/bbmaf8FZn4MJ/.beads/.gitignore delete mode 100644 tmp/bbmaf8FZn4MJ/.beads/README.md delete mode 100644 tmp/bbmaf8FZn4MJ/.beads/config.yaml delete mode 100644 tmp/bbmaf8FZn4MJ/.beads/interactions.jsonl delete mode 100644 tmp/bbmaf8FZn4MJ/.beads/metadata.json delete mode 100644 tmp/bbmaf8FZn4MJ/.gitignore delete mode 100644 tmp/bbmaf8FZn4MJ/AGENTS.md delete mode 100644 tmp/bbmaf8GJ6CIz/.beads/.gitignore delete mode 100644 tmp/bbmaf8GJ6CIz/.beads/README.md delete mode 100644 tmp/bbmaf8GJ6CIz/.beads/config.yaml delete mode 100644 tmp/bbmaf8GJ6CIz/.beads/interactions.jsonl delete mode 100644 tmp/bbmaf8GJ6CIz/.beads/metadata.json delete mode 100644 tmp/bbmaf8GJ6CIz/.gitignore delete mode 100644 tmp/bbmaf8GJ6CIz/AGENTS.md delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/.gitignore delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/README.md delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/config.yaml delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/hooks/post-checkout delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/hooks/post-merge delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/hooks/pre-commit delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/hooks/pre-push delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/hooks/prepare-commit-msg delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/interactions.jsonl delete mode 100644 tmp/bbmaf8Kx5GEB/.beads/metadata.json delete mode 100644 tmp/bbmaf8Kx5GEB/.gitignore delete mode 100644 tmp/bbmaf8Kx5GEB/AGENTS.md diff --git a/package.json b/package.json index 37a32ec..1208a61 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "next start", "lint": "eslint .", "typecheck": "tsc --noEmit", - "test": "node --test tests/bootstrap.test.mjs && node --import tsx --test tests/components/shared/base-card.test.tsx && node --import tsx --test tests/components/shared/agent-avatar.test.tsx && node --import tsx --test tests/components/sessions/sessions-header.test.ts && node --import tsx --test tests/components/sessions/agent-station-logic.test.ts && node --import tsx --test tests/lib/parser.test.ts && node --import tsx --test tests/lib/pathing.test.ts && node --import tsx --test tests/components/shared/left-panel.test.tsx && node --import tsx --test tests/components/shared/top-bar.test.tsx && node --import tsx --test tests/components/shared/mobile-nav.test.tsx && node --import tsx --test tests/components/swarm/swarm-card.test.tsx && node --import tsx --test tests/hooks/url-state-integration.test.ts && node --import tsx --test tests/hooks/use-graph-analysis.test.ts && node --import tsx --test tests/components/graph/smart-dag.test.tsx && node --import tsx --test tests/components/unified-shell.test.tsx && node --import tsx --test tests/components/blocked-triage-modal.test.tsx && node --import tsx --test tests/components/graph/graph-node-labels.test.tsx && node --import tsx --test tests/components/graph/graph-node-assign.test.tsx && node --import tsx --test tests/components/graph/graph-node-conversation.test.tsx && node --import tsx --test tests/lib/coord-schema.test.ts && node --import tsx --test tests/lib/install-manifest.test.ts && node --import tsx --test tests/lib/runtime-manager.test.ts && node --import tsx --test tests/lib/coord-events.test.ts && node --import tsx --test tests/api/coord-events-route.test.ts && node --import tsx --test tests/lib/coord-projections-inbox.test.ts && node --import tsx --test tests/lib/coord-projections-reservations.test.ts && node --import tsx --test tests/components/sessions/conversation-drawer-coord.test.tsx && node --import tsx --test tests/scripts/beadboard-launcher.test.ts && node --import tsx --test tests/scripts/beadboard-launcher-runtime.test.ts && node --import tsx --test tests/scripts/beadboard-launcher-status-text.test.ts && node --import tsx --test tests/scripts/install-wrappers-contract.test.ts && node --import tsx --test tests/scripts/install-sh-smoke.test.ts && node --import tsx --test tests/scripts/install-legacy-migration.test.ts && node --import tsx --test tests/scripts/installer-ci-contract.test.ts && node --import tsx --test tests/docs/installer-quickstart-contract.test.ts && node --import tsx --test tests/docs/runtime-manager-adr-contract.test.ts && node --import tsx --test tests/cli/beadboard-cli.test.ts && node --import tsx --test tests/cli/beadboard-bin-routing.test.ts && node --import tsx --test tests/cli/beadboard-help-output.test.ts && node --import tsx --test tests/skills/beadboard-driver/resolve-bb.test.ts && node --import tsx --test tests/skills/beadboard-driver/session-preflight.test.ts && node --import tsx --test tests/skills/beadboard-driver/generate-agent-name.test.ts && node --import tsx --test tests/skills/beadboard-driver/readiness-report.test.ts && node --import tsx --test tests/skills/beadboard-driver/skill-local-runner.test.ts && node --import tsx --test tests/skills/beadboard-driver/diagnose-env.test.ts && node --import tsx --test tests/skills/beadboard-driver/heal-common-issues.test.ts && node --import tsx --test tests/lib/epic-graph.test.ts && node --import tsx --test tests/components/shared/left-panel-filtering.test.ts && node --import tsx --test tests/hooks/use-beads-subscription-contract.test.ts && node --import tsx --test tests/components/graph/dependency-graph-hide-closed-contract.test.ts && node --import tsx --test tests/components/shared/unified-shell-hide-closed-contract.test.ts && node --import tsx --test tests/lib/agent-registry.test.ts && node --import tsx --test tests/api/agents-mail.test.ts && node --import tsx --test tests/skills/beadboard-driver/bb-mail-shim.test.ts", + "test": "node --test tests/bootstrap.test.mjs && node --import tsx --test tests/components/shared/base-card.test.tsx && node --import tsx --test tests/components/shared/agent-avatar.test.tsx && node --import tsx --test tests/components/sessions/sessions-header.test.ts && node --import tsx --test tests/components/sessions/agent-station-logic.test.ts && node --import tsx --test tests/lib/parser.test.ts && node --import tsx --test tests/lib/pathing.test.ts && node --import tsx --test tests/components/shared/left-panel.test.tsx && node --import tsx --test tests/components/shared/top-bar.test.tsx && node --import tsx --test tests/components/shared/mobile-nav.test.tsx && node --import tsx --test tests/components/swarm/swarm-card.test.tsx && node --import tsx --test tests/hooks/url-state-integration.test.ts && node --import tsx --test tests/hooks/use-graph-analysis.test.ts && node --import tsx --test tests/components/graph/smart-dag.test.tsx && node --import tsx --test tests/components/unified-shell.test.tsx && node --import tsx --test tests/components/blocked-triage-modal.test.tsx && node --import tsx --test tests/components/graph/graph-node-labels.test.tsx && node --import tsx --test tests/components/graph/graph-node-assign.test.tsx && node --import tsx --test tests/components/graph/graph-node-conversation.test.tsx && node --import tsx --test tests/lib/coord-schema.test.ts && node --import tsx --test tests/lib/install-manifest.test.ts && node --import tsx --test tests/lib/runtime-manager.test.ts && node --import tsx --test tests/lib/coord-events.test.ts && node --import tsx --test tests/api/coord-events-route.test.ts && node --import tsx --test tests/lib/coord-projections-inbox.test.ts && node --import tsx --test tests/lib/coord-projections-reservations.test.ts && node --import tsx --test tests/components/sessions/conversation-drawer-coord.test.tsx && node --import tsx --test tests/scripts/beadboard-launcher.test.ts && node --import tsx --test tests/scripts/beadboard-launcher-runtime.test.ts && node --import tsx --test tests/scripts/beadboard-launcher-status-text.test.ts && node --import tsx --test tests/scripts/install-wrappers-contract.test.ts && node --import tsx --test tests/scripts/install-sh-smoke.test.ts && node --import tsx --test tests/scripts/install-legacy-migration.test.ts && node --import tsx --test tests/scripts/installer-ci-contract.test.ts && node --import tsx --test tests/docs/installer-quickstart-contract.test.ts && node --import tsx --test tests/docs/runtime-manager-adr-contract.test.ts && node --import tsx --test tests/cli/beadboard-cli.test.ts && node --import tsx --test tests/cli/beadboard-bin-routing.test.ts && node --import tsx --test tests/cli/beadboard-help-output.test.ts && node --import tsx --test tests/skills/beadboard-driver/resolve-bb.test.ts && node --import tsx --test tests/skills/beadboard-driver/session-preflight.test.ts && node --import tsx --test tests/skills/beadboard-driver/generate-agent-name.test.ts && node --import tsx --test tests/skills/beadboard-driver/readiness-report.test.ts && node --import tsx --test tests/skills/beadboard-driver/skill-local-runner.test.ts && node --import tsx --test tests/skills/beadboard-driver/diagnose-env.test.ts && node --import tsx --test tests/skills/beadboard-driver/heal-common-issues.test.ts && node --import tsx --test tests/lib/epic-graph.test.ts && node --import tsx --test tests/components/shared/left-panel-filtering.test.ts && node --import tsx --test tests/hooks/use-beads-subscription-contract.test.ts && node --import tsx --test tests/components/graph/dependency-graph-hide-closed-contract.test.ts && node --import tsx --test tests/components/shared/unified-shell-hide-closed-contract.test.ts && node --import tsx --test tests/lib/agent-registry.test.ts && node --import tsx --test tests/api/agents-mail.test.ts && node --import tsx --test tests/skills/beadboard-driver/bb-mail-shim.test.ts && node --import tsx --test tests/skills/beadboard-driver/ensure-bb-mail-configured.test.ts && node skills/beadboard-driver/tests/run-tests.mjs", "video": "remotion preview src/video/index.ts", "video:render": "remotion render src/video/index.ts Main out/video.mp4", "video:thumbnail": "remotion still src/video/index.ts Main out/thumbnail.png --frame=60" diff --git a/skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs b/skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs new file mode 100644 index 0000000..9e4f5c1 --- /dev/null +++ b/skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs @@ -0,0 +1,124 @@ +#!/usr/bin/env node + +import { spawnSync } from 'node:child_process'; +import { fileURLToPath } from 'node:url'; +import { dirname, join } from 'node:path'; + +import { findCommandInPath } from './lib/driver-lib.mjs'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +function readMailDelegate(bdPath) { + const result = spawnSync(bdPath, ['config', 'get', 'mail.delegate'], { + stdio: 'pipe', + shell: false, + }); + + const stdout = result.stdout?.toString().trim() || ''; + const stderr = result.stderr?.toString().trim() || ''; + + return { + ok: result.status === 0, + delegate: stdout, + stderr, + }; +} + +async function main() { + const bdPath = await findCommandInPath('bd'); + const shimPath = join(__dirname, 'bb-mail-shim.mjs'); + const expected = `node ${shimPath}`; + + if (!bdPath) { + process.stdout.write( + `${JSON.stringify( + { + ok: false, + error_code: 'BD_NOT_FOUND', + reason: 'Could not find bd in PATH.', + remediation: + process.platform === 'win32' + ? 'Primary: npm i -g beadboard. Fallback: powershell -ExecutionPolicy Bypass -File .\\install\\install.ps1. Then ensure bd is available in PATH.' + : 'Primary: npm i -g beadboard. Fallback: bash ./install/install.sh. Then ensure bd is available in PATH.', + expected_delegate: expected, + delegate: null, + }, + null, + 2, + )}\n`, + ); + return; + } + + const delegate = readMailDelegate(bdPath); + + if (!delegate.ok || !delegate.delegate) { + process.stdout.write( + `${JSON.stringify( + { + ok: false, + error_code: 'MAIL_DELEGATE_MISSING', + reason: delegate.stderr || 'mail.delegate is not configured.', + remediation: `Run: bd config set mail.delegate "${expected}"`, + expected_delegate: expected, + delegate: delegate.delegate || null, + }, + null, + 2, + )}\n`, + ); + return; + } + + if (delegate.delegate !== expected) { + process.stdout.write( + `${JSON.stringify( + { + ok: false, + error_code: 'MAIL_DELEGATE_MISMATCH', + reason: 'mail.delegate is set, but not to the BeadBoard bb-mail shim command.', + remediation: `Run: bd config set mail.delegate "${expected}"`, + expected_delegate: expected, + delegate: delegate.delegate, + }, + null, + 2, + )}\n`, + ); + return; + } + + const actor = (process.env.BB_AGENT || process.env.BD_ACTOR || '').trim(); + if (!actor) { + process.stdout.write( + `${JSON.stringify( + { + ok: false, + error_code: 'BB_AGENT_NOT_SET', + reason: 'mail.delegate is configured, but BB_AGENT/BD_ACTOR is missing.', + remediation: 'Set BB_AGENT (preferred) or BD_ACTOR before using bd mail.', + expected_delegate: expected, + delegate: delegate.delegate, + }, + null, + 2, + )}\n`, + ); + return; + } + + process.stdout.write( + `${JSON.stringify( + { + ok: true, + expected_delegate: expected, + delegate: delegate.delegate, + actor, + }, + null, + 2, + )}\n`, + ); +} + +void main(); diff --git a/skills/beadboard-driver/tests/bb-mail-integration.contract.test.mjs b/skills/beadboard-driver/tests/bb-mail-integration.contract.test.mjs new file mode 100644 index 0000000..9f959e7 --- /dev/null +++ b/skills/beadboard-driver/tests/bb-mail-integration.contract.test.mjs @@ -0,0 +1,130 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import { execFile } from 'node:child_process'; +import { promisify } from 'node:util'; + +const execFileAsync = promisify(execFile); +const repoRoot = path.resolve('.'); +const shimPath = path.resolve('skills/beadboard-driver/scripts/bb-mail-shim.mjs'); +const cliPath = path.resolve('src/cli/beadboard-cli.ts'); +const tsxLoader = path.resolve('node_modules/tsx/dist/loader.mjs'); + +async function withTempDir(run) { + const root = await fs.mkdtemp(path.join(os.tmpdir(), 'bb-skill-mail-it-')); + try { + await run(root); + } finally { + await fs.rm(root, { recursive: true, force: true }); + } +} + +function randomAgent(base) { + return `${base}-${Date.now()}-${Math.random().toString(16).slice(2, 6)}`.toLowerCase(); +} + +async function writeBbProxy(binDir) { + await fs.mkdir(binDir, { recursive: true }); + + const bbPath = path.join(binDir, 'bb'); + await fs.writeFile( + bbPath, + `#!/usr/bin/env sh\nexec node --import "${tsxLoader}" "${cliPath}" "$@"\n`, + 'utf8', + ); + await fs.chmod(bbPath, 0o755); + + if (process.platform === 'win32') { + const bbCmdPath = path.join(binDir, 'bb.cmd'); + await fs.writeFile( + bbCmdPath, + `@echo off\r\nnode --import "${tsxLoader}" "${cliPath}" %*\r\n`, + 'utf8', + ); + } +} + +async function runBb(args, env) { + const bbExecutable = process.platform === 'win32' ? 'bb.cmd' : 'bb'; + const { stdout } = await execFileAsync(bbExecutable, args, { + cwd: repoRoot, + env, + }); + return stdout; +} + +test('bb-mail integration contract: send -> inbox -> read -> ack lifecycle', async () => { + await withTempDir(async (root) => { + const binDir = path.join(root, 'bin'); + const homeDir = path.join(root, 'home'); + await writeBbProxy(binDir); + + const sender = randomAgent('maf8-sender'); + const recipient = randomAgent('maf8-recipient'); + + const baseEnv = { + ...process.env, + PATH: `${binDir}${path.delimiter}${process.env.PATH || ''}`, + HOME: homeDir, + USERPROFILE: homeDir, + }; + + const senderRegRaw = await runBb(['agent', 'register', '--name', sender, '--role', 'ui', '--json'], baseEnv); + const senderReg = JSON.parse(senderRegRaw); + assert.equal(senderReg.ok, true); + + const recipientRegRaw = await runBb(['agent', 'register', '--name', recipient, '--role', 'graph', '--json'], baseEnv); + const recipientReg = JSON.parse(recipientRegRaw); + assert.equal(recipientReg.ok, true); + + await execFileAsync( + process.execPath, + [ + shimPath, + 'send', + '--to', + recipient, + '--bead', + 'beadboard-maf.8', + '--category', + 'HANDOFF', + '--subject', + 'Contract handoff', + '--body', + 'Please validate and ack.', + ], + { + cwd: repoRoot, + env: { ...baseEnv, BB_AGENT: sender }, + }, + ); + + const inboxResult = await execFileAsync(process.execPath, [shimPath, 'inbox', '--state', 'unread', '--limit', '10'], { + cwd: repoRoot, + env: { ...baseEnv, BB_AGENT: recipient }, + }); + + const messageMatch = inboxResult.stdout.match(/\[([^\]]+)\]/); + assert.ok(messageMatch, `expected message id in inbox output, got: ${inboxResult.stdout}`); + const messageId = messageMatch[1]; + + await execFileAsync(process.execPath, [shimPath, 'read', messageId], { + cwd: repoRoot, + env: { ...baseEnv, BB_AGENT: recipient }, + }); + + await execFileAsync(process.execPath, [shimPath, 'ack', messageId], { + cwd: repoRoot, + env: { ...baseEnv, BB_AGENT: recipient }, + }); + + const ackedRaw = await runBb(['agent', 'inbox', '--agent', recipient, '--state', 'acked', '--limit', '25', '--json'], baseEnv); + const acked = JSON.parse(ackedRaw); + + assert.equal(acked.ok, true); + assert.ok(Array.isArray(acked.data)); + assert.ok(acked.data.some((message) => message.message_id === messageId && message.state === 'acked')); + }); +}); diff --git a/skills/beadboard-driver/tests/ensure-bb-mail-configured.contract.test.mjs b/skills/beadboard-driver/tests/ensure-bb-mail-configured.contract.test.mjs new file mode 100644 index 0000000..a2a34aa --- /dev/null +++ b/skills/beadboard-driver/tests/ensure-bb-mail-configured.contract.test.mjs @@ -0,0 +1,36 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import { execFile } from 'node:child_process'; +import { promisify } from 'node:util'; + +const execFileAsync = promisify(execFile); +const scriptPath = path.resolve('skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs'); + +async function withTempDir(run) { + const root = await fs.mkdtemp(path.join(os.tmpdir(), 'bb-skill-mailcfg-')); + try { + await run(root); + } finally { + await fs.rm(root, { recursive: true, force: true }); + } +} + +test('ensure-bb-mail-configured contract: missing delegate shows remediation', async () => { + await withTempDir(async (root) => { + const { stdout } = await execFileAsync(process.execPath, [scriptPath], { + cwd: root, + env: { + ...process.env, + BB_AGENT: 'contract-agent', + }, + }); + + const result = JSON.parse(stdout); + assert.equal(result.ok, false); + assert.equal(result.error_code, 'MAIL_DELEGATE_MISSING'); + assert.match(String(result.remediation), /bd config set mail\.delegate/i); + }); +}); diff --git a/skills/beadboard-driver/tests/resolve-bb.contract.test.mjs b/skills/beadboard-driver/tests/resolve-bb.contract.test.mjs index 9388efc..01256a0 100644 --- a/skills/beadboard-driver/tests/resolve-bb.contract.test.mjs +++ b/skills/beadboard-driver/tests/resolve-bb.contract.test.mjs @@ -12,12 +12,25 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const scriptPath = path.resolve(__dirname, '..', 'scripts', 'resolve-bb.mjs'); +async function createRepoEntrypoint(repo) { + await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); + if (process.platform === 'win32') { + const bbPath = path.join(repo, 'bb.ps1'); + await fs.writeFile(bbPath, 'echo ok', 'utf8'); + return bbPath; + } + const bbPath = path.join(repo, 'bin', 'beadboard.js'); + await fs.mkdir(path.dirname(bbPath), { recursive: true }); + await fs.writeFile(bbPath, '#!/usr/bin/env node\nconsole.log("ok");\n', 'utf8'); + await fs.chmod(bbPath, 0o755); + return bbPath; +} + test('resolve-bb contract: BB_REPO source', async () => { const root = await fs.mkdtemp(path.join(os.tmpdir(), 'bb-skill-contract-resolve-')); try { const repo = path.join(root, 'beadboard'); - await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); - await fs.writeFile(path.join(repo, 'bb.ps1'), 'echo ok', 'utf8'); + await createRepoEntrypoint(repo); const { stdout } = await execFileAsync(process.execPath, [scriptPath], { env: { ...process.env, BB_REPO: repo, BB_SKILL_HOME: path.join(root, 'home'), PATH: '' }, diff --git a/skills/beadboard-driver/tests/run-tests.mjs b/skills/beadboard-driver/tests/run-tests.mjs index dbecfce..990a479 100644 --- a/skills/beadboard-driver/tests/run-tests.mjs +++ b/skills/beadboard-driver/tests/run-tests.mjs @@ -11,6 +11,8 @@ const tests = [ path.join(__dirname, 'resolve-bb.contract.test.mjs'), path.join(__dirname, 'generate-agent-name.contract.test.mjs'), path.join(__dirname, 'session-preflight.contract.test.mjs'), + path.join(__dirname, 'ensure-bb-mail-configured.contract.test.mjs'), + path.join(__dirname, 'bb-mail-integration.contract.test.mjs'), path.join(__dirname, 'readiness-report.contract.test.mjs'), path.join(__dirname, 'diagnose-env.contract.test.mjs'), path.join(__dirname, 'heal-common-issues.contract.test.mjs'), diff --git a/skills/beadboard-driver/tests/session-preflight.contract.test.mjs b/skills/beadboard-driver/tests/session-preflight.contract.test.mjs index 8916e65..0e7a366 100644 --- a/skills/beadboard-driver/tests/session-preflight.contract.test.mjs +++ b/skills/beadboard-driver/tests/session-preflight.contract.test.mjs @@ -12,6 +12,20 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const scriptPath = path.resolve(__dirname, '..', 'scripts', 'session-preflight.mjs'); +async function createRepoEntrypoint(repo) { + await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); + if (process.platform === 'win32') { + const bbPath = path.join(repo, 'bb.ps1'); + await fs.writeFile(bbPath, 'echo ok', 'utf8'); + return bbPath; + } + const bbPath = path.join(repo, 'bin', 'beadboard.js'); + await fs.mkdir(path.dirname(bbPath), { recursive: true }); + await fs.writeFile(bbPath, '#!/usr/bin/env node\nconsole.log("ok");\n', 'utf8'); + await fs.chmod(bbPath, 0o755); + return bbPath; +} + test('session-preflight contract: surfaces BD_NOT_FOUND when missing', async () => { const { stdout } = await execFileAsync(process.execPath, [scriptPath], { env: { ...process.env, PATH: '' }, @@ -28,9 +42,8 @@ test('session-preflight contract: succeeds with bd + BB_REPO', async () => { const toolsDir = path.join(root, 'tools'); const bdExecutable = process.platform === 'win32' ? 'bd.cmd' : 'bd'; const bdPath = path.join(toolsDir, bdExecutable); - await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); + await createRepoEntrypoint(repo); await fs.mkdir(toolsDir, { recursive: true }); - await fs.writeFile(path.join(repo, 'bb.ps1'), 'echo ok', 'utf8'); if (process.platform === 'win32') { await fs.writeFile(bdPath, '@echo off\r\necho beads\r\n', 'utf8'); } else { diff --git a/src/lib/agent-mail.ts b/src/lib/agent-mail.ts index 76389d0..efc56b3 100644 --- a/src/lib/agent-mail.ts +++ b/src/lib/agent-mail.ts @@ -134,11 +134,11 @@ function requiresAck(category: MessageCategory): boolean { return category === 'HANDOFF' || category === 'BLOCKED'; } -function defaultMessageId(nowIso: string): string { - const seed = Math.random().toString(16).slice(2, 6); - const compact = nowIso.replace(/[-:]/g, '').replace('.000Z', '').replace('T', '_'); - return `msg_${compact}_${seed}`; -} +function defaultMessageId(nowIso: string): string { + const seed = Math.random().toString(16).slice(2, 6); + const compact = nowIso.replace(/[.:-]/g, '').replace('T', '_').replace('Z', ''); + return `msg_${compact}_${seed}`; +} async function appendInboxMessage(agentId: string, message: AgentMessage): Promise { const filePath = inboxFilePath(agentId); diff --git a/tests/skills/beadboard-driver/ensure-bb-mail-configured.test.ts b/tests/skills/beadboard-driver/ensure-bb-mail-configured.test.ts new file mode 100644 index 0000000..eea55d4 --- /dev/null +++ b/tests/skills/beadboard-driver/ensure-bb-mail-configured.test.ts @@ -0,0 +1,35 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import { execFile } from 'node:child_process'; +import { promisify } from 'node:util'; + +const execFileAsync = promisify(execFile); +const scriptPath = path.resolve('skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs'); + +async function withTempDir(run: (root: string) => Promise) { + const root = await fs.mkdtemp(path.join(os.tmpdir(), 'bb-skill-mailcfg-ts-')); + try { + await run(root); + } finally { + await fs.rm(root, { recursive: true, force: true }); + } +} + +test('ensure-bb-mail-configured reports missing delegate outside initialized repo', async () => { + await withTempDir(async (root) => { + const { stdout } = await execFileAsync(process.execPath, [scriptPath], { + cwd: root, + env: { + ...process.env, + BB_AGENT: 'test-agent', + }, + }); + + const result = JSON.parse(stdout); + assert.equal(result.ok, false); + assert.equal(result.error_code, 'MAIL_DELEGATE_MISSING'); + }); +}); diff --git a/tests/skills/beadboard-driver/resolve-bb.test.ts b/tests/skills/beadboard-driver/resolve-bb.test.ts index 0451ef8..fdfcd31 100644 --- a/tests/skills/beadboard-driver/resolve-bb.test.ts +++ b/tests/skills/beadboard-driver/resolve-bb.test.ts @@ -9,6 +9,20 @@ import { promisify } from 'node:util'; const execFileAsync = promisify(execFile); const scriptPath = path.resolve('skills/beadboard-driver/scripts/resolve-bb.mjs'); +async function createRepoEntrypoint(repo: string): Promise { + await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); + if (process.platform === 'win32') { + const bbPath = path.join(repo, 'bb.ps1'); + await fs.writeFile(bbPath, 'echo ok', 'utf8'); + return bbPath; + } + const bbPath = path.join(repo, 'bin', 'beadboard.js'); + await fs.mkdir(path.dirname(bbPath), { recursive: true }); + await fs.writeFile(bbPath, '#!/usr/bin/env node\nconsole.log("ok");\n', 'utf8'); + await fs.chmod(bbPath, 0o755); + return bbPath; +} + async function runResolve(env: Record = {}) { const { stdout } = await execFileAsync(process.execPath, [scriptPath], { env: { ...process.env, ...env }, @@ -28,8 +42,7 @@ async function withTempDir(run: (root: string) => Promise) { test('resolve-bb uses BB_REPO and returns env source', async () => { await withTempDir(async (root) => { const repo = path.join(root, 'beadboard'); - await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); - await fs.writeFile(path.join(repo, 'bb.ps1'), 'echo ok', 'utf8'); + const expectedPath = await createRepoEntrypoint(repo); const result = await runResolve({ BB_REPO: repo, @@ -39,7 +52,7 @@ test('resolve-bb uses BB_REPO and returns env source', async () => { assert.equal(result.ok, true); assert.equal(result.source, 'env'); - assert.equal(result.resolved_path, path.join(repo, 'bb.ps1')); + assert.equal(result.resolved_path, expectedPath); }); }); @@ -68,12 +81,11 @@ test('resolve-bb uses cache when env and global are unavailable', async () => { await withTempDir(async (root) => { const repo = path.join(root, 'beadboard'); const home = path.join(root, 'home'); - await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); - await fs.writeFile(path.join(repo, 'bb.ps1'), 'echo ok', 'utf8'); + const expectedPath = await createRepoEntrypoint(repo); await fs.mkdir(path.join(home, '.beadboard'), { recursive: true }); await fs.writeFile( path.join(home, '.beadboard', 'skill-config.json'), - JSON.stringify({ bb_path: path.join(repo, 'bb.ps1') }, null, 2), + JSON.stringify({ bb_path: expectedPath }, null, 2), 'utf8', ); @@ -91,8 +103,7 @@ test('resolve-bb discovers repo and self-updates cache', async () => { await withTempDir(async (root) => { const repo = path.join(root, 'workspace', 'beadboard'); const home = path.join(root, 'home'); - await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); - await fs.writeFile(path.join(repo, 'bb.ps1'), 'echo ok', 'utf8'); + const expectedPath = await createRepoEntrypoint(repo); const result = await runResolve({ BB_SKILL_HOME: home, @@ -105,7 +116,7 @@ test('resolve-bb discovers repo and self-updates cache', async () => { const cacheRaw = await fs.readFile(path.join(home, '.beadboard', 'skill-config.json'), 'utf8'); const cache = JSON.parse(cacheRaw); - assert.equal(cache.bb_path, path.join(repo, 'bb.ps1')); + assert.equal(cache.bb_path, expectedPath); }); }); @@ -115,14 +126,12 @@ test('resolve-bb uses BB_REPO over cache and rewrites stale cache', async () => const repoB = path.join(root, 'repo-b'); const home = path.join(root, 'home'); - await fs.mkdir(path.join(repoA, 'tools'), { recursive: true }); - await fs.mkdir(path.join(repoB, 'tools'), { recursive: true }); - await fs.writeFile(path.join(repoA, 'bb.ps1'), 'echo a', 'utf8'); - await fs.writeFile(path.join(repoB, 'bb.ps1'), 'echo b', 'utf8'); + const repoAPath = await createRepoEntrypoint(repoA); + const repoBPath = await createRepoEntrypoint(repoB); await fs.mkdir(path.join(home, '.beadboard'), { recursive: true }); await fs.writeFile( path.join(home, '.beadboard', 'skill-config.json'), - JSON.stringify({ bb_path: path.join(repoA, 'bb.ps1') }, null, 2), + JSON.stringify({ bb_path: repoAPath }, null, 2), 'utf8', ); @@ -138,6 +147,6 @@ test('resolve-bb uses BB_REPO over cache and rewrites stale cache', async () => const cacheRaw = await fs.readFile(path.join(home, '.beadboard', 'skill-config.json'), 'utf8'); const cache = JSON.parse(cacheRaw); - assert.equal(cache.bb_path, path.join(repoB, 'bb.ps1')); + assert.equal(cache.bb_path, repoBPath); }); }); diff --git a/tests/skills/beadboard-driver/session-preflight.test.ts b/tests/skills/beadboard-driver/session-preflight.test.ts index 6355843..a656fed 100644 --- a/tests/skills/beadboard-driver/session-preflight.test.ts +++ b/tests/skills/beadboard-driver/session-preflight.test.ts @@ -9,6 +9,20 @@ import { promisify } from 'node:util'; const execFileAsync = promisify(execFile); const scriptPath = path.resolve('skills/beadboard-driver/scripts/session-preflight.mjs'); +async function createRepoEntrypoint(repo: string): Promise { + await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); + if (process.platform === 'win32') { + const bbPath = path.join(repo, 'bb.ps1'); + await fs.writeFile(bbPath, 'echo ok', 'utf8'); + return bbPath; + } + const bbPath = path.join(repo, 'bin', 'beadboard.js'); + await fs.mkdir(path.dirname(bbPath), { recursive: true }); + await fs.writeFile(bbPath, '#!/usr/bin/env node\nconsole.log("ok");\n', 'utf8'); + await fs.chmod(bbPath, 0o755); + return bbPath; +} + async function runPreflight(env: Record = {}) { const { stdout } = await execFileAsync(process.execPath, [scriptPath], { env: { ...process.env, ...env }, @@ -47,9 +61,8 @@ test('session-preflight succeeds with fake bd and BB_REPO', async () => { const bdExecutable = process.platform === 'win32' ? 'bd.cmd' : 'bd'; const bdCmd = path.join(toolsDir, bdExecutable); - await fs.mkdir(path.join(repo, 'tools'), { recursive: true }); + await createRepoEntrypoint(repo); await fs.mkdir(toolsDir, { recursive: true }); - await fs.writeFile(path.join(repo, 'bb.ps1'), 'echo ok', 'utf8'); if (process.platform === 'win32') { await fs.writeFile(bdCmd, '@echo off\r\necho beads\r\n', 'utf8'); } else { diff --git a/tmp/bbmaf88zP8rv/.beads/.gitignore b/tmp/bbmaf88zP8rv/.beads/.gitignore deleted file mode 100644 index e6fb002..0000000 --- a/tmp/bbmaf88zP8rv/.beads/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Dolt database (managed by Dolt, not git) -dolt/ -dolt-access.lock - -# Runtime files -bd.sock -bd.sock.startlock -sync-state.json -last-touched - -# Local version tracking (prevents upgrade notification spam after git ops) -.local_version - -# Worktree redirect file (contains relative path to main repo's .beads/) -# Must not be committed as paths would be wrong in other clones -redirect - -# Sync state (local-only, per-machine) -# These files are machine-specific and should not be shared across clones -.sync.lock -export-state/ - -# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) -ephemeral.sqlite3 -ephemeral.sqlite3-journal -ephemeral.sqlite3-wal -ephemeral.sqlite3-shm - -# Dolt server management (auto-started by bd) -dolt-server.pid -dolt-server.log -dolt-server.lock - -# Legacy files (from pre-Dolt versions) -*.db -*.db?* -*.db-journal -*.db-wal -*.db-shm -db.sqlite -bd.db -daemon.lock -daemon.log -daemon-*.log.gz -daemon.pid -# NOTE: Do NOT add negation patterns here. -# They would override fork protection in .git/info/exclude. -# Config files (metadata.json, config.yaml) are tracked by git by default -# since no pattern above ignores them. diff --git a/tmp/bbmaf88zP8rv/.beads/README.md b/tmp/bbmaf88zP8rv/.beads/README.md deleted file mode 100644 index 0efd932..0000000 --- a/tmp/bbmaf88zP8rv/.beads/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Beads - AI-Native Issue Tracking - -Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. - -## What is Beads? - -Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. - -**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) - -## Quick Start - -### Essential Commands - -```bash -# Create new issues -bd create "Add user authentication" - -# View all issues -bd list - -# View issue details -bd show - -# Update issue status -bd update --claim -bd update --status done - -# Sync with Dolt remote -bd dolt push -``` - -### Working with Issues - -Issues in Beads are: -- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code -- **AI-friendly**: CLI-first design works perfectly with AI coding agents -- **Branch-aware**: Issues can follow your branch workflow -- **Always in sync**: Auto-syncs with your commits - -## Why Beads? - -✨ **AI-Native Design** -- Built specifically for AI-assisted development workflows -- CLI-first interface works seamlessly with AI coding agents -- No context switching to web UIs - -🚀 **Developer Focused** -- Issues live in your repo, right next to your code -- Works offline, syncs when you push -- Fast, lightweight, and stays out of your way - -🔧 **Git Integration** -- Automatic sync with git commits -- Branch-aware issue tracking -- Intelligent JSONL merge resolution - -## Get Started with Beads - -Try Beads in your own projects: - -```bash -# Install Beads -curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash - -# Initialize in your repo -bd init - -# Create your first issue -bd create "Try out Beads" -``` - -## Learn More - -- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) -- **Quick Start Guide**: Run `bd quickstart` -- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) - ---- - -*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/tmp/bbmaf88zP8rv/.beads/config.yaml b/tmp/bbmaf88zP8rv/.beads/config.yaml deleted file mode 100644 index fe6eeae..0000000 --- a/tmp/bbmaf88zP8rv/.beads/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Beads Configuration File -# This file configures default behavior for all bd commands in this repository -# All settings can also be set via environment variables (BD_* prefix) -# or overridden with command-line flags - -# Issue prefix for this repository (used by bd init) -# If not set, bd init will auto-detect from directory name -# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. -# issue-prefix: "" - -# Use no-db mode: load from JSONL, write back after each command -# When true, bd will use .beads/issues.jsonl as the source of truth -# instead of the Dolt database -# no-db: false - -# Enable JSON output by default -# json: false - -# Feedback title formatting for mutating commands (create/update/close/dep/edit) -# 0 = hide titles, N > 0 = truncate to N characters -# output: -# title-length: 255 - -# Default actor for audit trails (overridden by BD_ACTOR or --actor) -# actor: "" - -# Export events (audit trail) to .beads/events.jsonl on each flush/sync -# When enabled, new events are appended incrementally using a high-water mark. -# Use 'bd export --events' to trigger manually regardless of this setting. -# events-export: false - -# Multi-repo configuration (experimental - bd-307) -# Allows hydrating from multiple repositories and routing writes to the correct JSONL -# repos: -# primary: "." # Primary repo (where this database lives) -# additional: # Additional repos to hydrate from (read-only) -# - ~/beads-planning # Personal planning repo -# - ~/work-planning # Work planning repo - -# JSONL backup (periodic export for off-machine recovery) -# Auto-enabled when a git remote exists. Override explicitly: -# backup: -# enabled: false # Disable auto-backup entirely -# interval: 15m # Minimum time between auto-exports -# git-push: false # Disable git push (export locally only) -# git-repo: "" # Separate git repo for backups (default: project repo) - -# Integration settings (access with 'bd config get/set') -# These are stored in the database, not in this file: -# - jira.url -# - jira.project -# - linear.url -# - linear.api-key -# - github.org -# - github.repo diff --git a/tmp/bbmaf88zP8rv/.beads/interactions.jsonl b/tmp/bbmaf88zP8rv/.beads/interactions.jsonl deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/bbmaf88zP8rv/.beads/metadata.json b/tmp/bbmaf88zP8rv/.beads/metadata.json deleted file mode 100644 index fdbd166..0000000 --- a/tmp/bbmaf88zP8rv/.beads/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "database": "dolt", - "backend": "dolt", - "dolt_mode": "server", - "dolt_database": "bbmaf88zP8rv" -} \ No newline at end of file diff --git a/tmp/bbmaf88zP8rv/.gitignore b/tmp/bbmaf88zP8rv/.gitignore deleted file mode 100644 index dc7a30c..0000000 --- a/tmp/bbmaf88zP8rv/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# Dolt database files (added by bd init) -.dolt/ -*.db diff --git a/tmp/bbmaf88zP8rv/AGENTS.md b/tmp/bbmaf88zP8rv/AGENTS.md deleted file mode 100644 index f923f4b..0000000 --- a/tmp/bbmaf88zP8rv/AGENTS.md +++ /dev/null @@ -1,150 +0,0 @@ -# Agent Instructions - -This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. - -## Quick Reference - -```bash -bd ready # Find available work -bd show # View issue details -bd update --claim # Claim work atomically -bd close # Complete work -bd sync # Sync with git -``` - -## Non-Interactive Shell Commands - -**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts. - -Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input. - -**Use these forms instead:** -```bash -# Force overwrite without prompting -cp -f source dest # NOT: cp source dest -mv -f source dest # NOT: mv source dest -rm -f file # NOT: rm file - -# For recursive operations -rm -rf directory # NOT: rm -r directory -cp -rf source dest # NOT: cp -r source dest -``` - -**Other commands that may prompt:** -- `scp` - use `-o BatchMode=yes` for non-interactive -- `ssh` - use `-o BatchMode=yes` to fail instead of prompting -- `apt-get` - use `-y` flag -- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var - - -## Issue Tracking with bd (beads) - -**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods. - -### Why bd? - -- Dependency-aware: Track blockers and relationships between issues -- Git-friendly: Auto-syncs to JSONL for version control -- Agent-optimized: JSON output, ready work detection, discovered-from links -- Prevents duplicate tracking systems and confusion - -### Quick Start - -**Check for ready work:** - -```bash -bd ready --json -``` - -**Create new issues:** - -```bash -bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json -bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json -``` - -**Claim and update:** - -```bash -bd update --claim --json -bd update bd-42 --priority 1 --json -``` - -**Complete work:** - -```bash -bd close bd-42 --reason "Completed" --json -``` - -### Issue Types - -- `bug` - Something broken -- `feature` - New functionality -- `task` - Work item (tests, docs, refactoring) -- `epic` - Large feature with subtasks -- `chore` - Maintenance (dependencies, tooling) - -### Priorities - -- `0` - Critical (security, data loss, broken builds) -- `1` - High (major features, important bugs) -- `2` - Medium (default, nice-to-have) -- `3` - Low (polish, optimization) -- `4` - Backlog (future ideas) - -### Workflow for AI Agents - -1. **Check ready work**: `bd ready` shows unblocked issues -2. **Claim your task atomically**: `bd update --claim` -3. **Work on it**: Implement, test, document -4. **Discover new work?** Create linked issue: - - `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:` -5. **Complete**: `bd close --reason "Done"` - -### Auto-Sync - -bd automatically syncs with git: - -- Exports to `.beads/issues.jsonl` after changes (5s debounce) -- Imports from JSONL when newer (e.g., after `git pull`) -- No manual export/import needed! - -### Important Rules - -- ✅ Use bd for ALL task tracking -- ✅ Always use `--json` flag for programmatic use -- ✅ Link discovered work with `discovered-from` dependencies -- ✅ Check `bd ready` before asking "what should I work on?" -- ❌ Do NOT create markdown TODO lists -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems - -For more details, see README.md and docs/QUICKSTART.md. - - - -## Landing the Plane (Session Completion) - -**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. - -**MANDATORY WORKFLOW:** - -1. **File issues for remaining work** - Create issues for anything that needs follow-up -2. **Run quality gates** (if code changed) - Tests, linters, builds -3. **Update issue status** - Close finished work, update in-progress items -4. **PUSH TO REMOTE** - This is MANDATORY: - ```bash - git pull --rebase - bd sync - git push - git status # MUST show "up to date with origin" - ``` -5. **Clean up** - Clear stashes, prune remote branches -6. **Verify** - All changes committed AND pushed -7. **Hand off** - Provide context for next session - -**CRITICAL RULES:** -- Work is NOT complete until `git push` succeeds -- NEVER stop before pushing - that leaves work stranded locally -- NEVER say "ready to push when you are" - YOU must push -- If push fails, resolve and retry until it succeeds diff --git a/tmp/bbmaf8BMD1mI/.beads/.gitignore b/tmp/bbmaf8BMD1mI/.beads/.gitignore deleted file mode 100644 index e6fb002..0000000 --- a/tmp/bbmaf8BMD1mI/.beads/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Dolt database (managed by Dolt, not git) -dolt/ -dolt-access.lock - -# Runtime files -bd.sock -bd.sock.startlock -sync-state.json -last-touched - -# Local version tracking (prevents upgrade notification spam after git ops) -.local_version - -# Worktree redirect file (contains relative path to main repo's .beads/) -# Must not be committed as paths would be wrong in other clones -redirect - -# Sync state (local-only, per-machine) -# These files are machine-specific and should not be shared across clones -.sync.lock -export-state/ - -# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) -ephemeral.sqlite3 -ephemeral.sqlite3-journal -ephemeral.sqlite3-wal -ephemeral.sqlite3-shm - -# Dolt server management (auto-started by bd) -dolt-server.pid -dolt-server.log -dolt-server.lock - -# Legacy files (from pre-Dolt versions) -*.db -*.db?* -*.db-journal -*.db-wal -*.db-shm -db.sqlite -bd.db -daemon.lock -daemon.log -daemon-*.log.gz -daemon.pid -# NOTE: Do NOT add negation patterns here. -# They would override fork protection in .git/info/exclude. -# Config files (metadata.json, config.yaml) are tracked by git by default -# since no pattern above ignores them. diff --git a/tmp/bbmaf8BMD1mI/.beads/README.md b/tmp/bbmaf8BMD1mI/.beads/README.md deleted file mode 100644 index 0efd932..0000000 --- a/tmp/bbmaf8BMD1mI/.beads/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Beads - AI-Native Issue Tracking - -Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. - -## What is Beads? - -Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. - -**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) - -## Quick Start - -### Essential Commands - -```bash -# Create new issues -bd create "Add user authentication" - -# View all issues -bd list - -# View issue details -bd show - -# Update issue status -bd update --claim -bd update --status done - -# Sync with Dolt remote -bd dolt push -``` - -### Working with Issues - -Issues in Beads are: -- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code -- **AI-friendly**: CLI-first design works perfectly with AI coding agents -- **Branch-aware**: Issues can follow your branch workflow -- **Always in sync**: Auto-syncs with your commits - -## Why Beads? - -✨ **AI-Native Design** -- Built specifically for AI-assisted development workflows -- CLI-first interface works seamlessly with AI coding agents -- No context switching to web UIs - -🚀 **Developer Focused** -- Issues live in your repo, right next to your code -- Works offline, syncs when you push -- Fast, lightweight, and stays out of your way - -🔧 **Git Integration** -- Automatic sync with git commits -- Branch-aware issue tracking -- Intelligent JSONL merge resolution - -## Get Started with Beads - -Try Beads in your own projects: - -```bash -# Install Beads -curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash - -# Initialize in your repo -bd init - -# Create your first issue -bd create "Try out Beads" -``` - -## Learn More - -- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) -- **Quick Start Guide**: Run `bd quickstart` -- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) - ---- - -*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/tmp/bbmaf8BMD1mI/.beads/config.yaml b/tmp/bbmaf8BMD1mI/.beads/config.yaml deleted file mode 100644 index fe6eeae..0000000 --- a/tmp/bbmaf8BMD1mI/.beads/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Beads Configuration File -# This file configures default behavior for all bd commands in this repository -# All settings can also be set via environment variables (BD_* prefix) -# or overridden with command-line flags - -# Issue prefix for this repository (used by bd init) -# If not set, bd init will auto-detect from directory name -# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. -# issue-prefix: "" - -# Use no-db mode: load from JSONL, write back after each command -# When true, bd will use .beads/issues.jsonl as the source of truth -# instead of the Dolt database -# no-db: false - -# Enable JSON output by default -# json: false - -# Feedback title formatting for mutating commands (create/update/close/dep/edit) -# 0 = hide titles, N > 0 = truncate to N characters -# output: -# title-length: 255 - -# Default actor for audit trails (overridden by BD_ACTOR or --actor) -# actor: "" - -# Export events (audit trail) to .beads/events.jsonl on each flush/sync -# When enabled, new events are appended incrementally using a high-water mark. -# Use 'bd export --events' to trigger manually regardless of this setting. -# events-export: false - -# Multi-repo configuration (experimental - bd-307) -# Allows hydrating from multiple repositories and routing writes to the correct JSONL -# repos: -# primary: "." # Primary repo (where this database lives) -# additional: # Additional repos to hydrate from (read-only) -# - ~/beads-planning # Personal planning repo -# - ~/work-planning # Work planning repo - -# JSONL backup (periodic export for off-machine recovery) -# Auto-enabled when a git remote exists. Override explicitly: -# backup: -# enabled: false # Disable auto-backup entirely -# interval: 15m # Minimum time between auto-exports -# git-push: false # Disable git push (export locally only) -# git-repo: "" # Separate git repo for backups (default: project repo) - -# Integration settings (access with 'bd config get/set') -# These are stored in the database, not in this file: -# - jira.url -# - jira.project -# - linear.url -# - linear.api-key -# - github.org -# - github.repo diff --git a/tmp/bbmaf8BMD1mI/.beads/interactions.jsonl b/tmp/bbmaf8BMD1mI/.beads/interactions.jsonl deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/bbmaf8BMD1mI/.beads/metadata.json b/tmp/bbmaf8BMD1mI/.beads/metadata.json deleted file mode 100644 index b6da129..0000000 --- a/tmp/bbmaf8BMD1mI/.beads/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "database": "dolt", - "backend": "dolt", - "dolt_mode": "server", - "dolt_database": "bbmaf8BMD1mI" -} \ No newline at end of file diff --git a/tmp/bbmaf8BMD1mI/.gitignore b/tmp/bbmaf8BMD1mI/.gitignore deleted file mode 100644 index dc7a30c..0000000 --- a/tmp/bbmaf8BMD1mI/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# Dolt database files (added by bd init) -.dolt/ -*.db diff --git a/tmp/bbmaf8BMD1mI/AGENTS.md b/tmp/bbmaf8BMD1mI/AGENTS.md deleted file mode 100644 index f923f4b..0000000 --- a/tmp/bbmaf8BMD1mI/AGENTS.md +++ /dev/null @@ -1,150 +0,0 @@ -# Agent Instructions - -This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. - -## Quick Reference - -```bash -bd ready # Find available work -bd show # View issue details -bd update --claim # Claim work atomically -bd close # Complete work -bd sync # Sync with git -``` - -## Non-Interactive Shell Commands - -**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts. - -Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input. - -**Use these forms instead:** -```bash -# Force overwrite without prompting -cp -f source dest # NOT: cp source dest -mv -f source dest # NOT: mv source dest -rm -f file # NOT: rm file - -# For recursive operations -rm -rf directory # NOT: rm -r directory -cp -rf source dest # NOT: cp -r source dest -``` - -**Other commands that may prompt:** -- `scp` - use `-o BatchMode=yes` for non-interactive -- `ssh` - use `-o BatchMode=yes` to fail instead of prompting -- `apt-get` - use `-y` flag -- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var - - -## Issue Tracking with bd (beads) - -**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods. - -### Why bd? - -- Dependency-aware: Track blockers and relationships between issues -- Git-friendly: Auto-syncs to JSONL for version control -- Agent-optimized: JSON output, ready work detection, discovered-from links -- Prevents duplicate tracking systems and confusion - -### Quick Start - -**Check for ready work:** - -```bash -bd ready --json -``` - -**Create new issues:** - -```bash -bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json -bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json -``` - -**Claim and update:** - -```bash -bd update --claim --json -bd update bd-42 --priority 1 --json -``` - -**Complete work:** - -```bash -bd close bd-42 --reason "Completed" --json -``` - -### Issue Types - -- `bug` - Something broken -- `feature` - New functionality -- `task` - Work item (tests, docs, refactoring) -- `epic` - Large feature with subtasks -- `chore` - Maintenance (dependencies, tooling) - -### Priorities - -- `0` - Critical (security, data loss, broken builds) -- `1` - High (major features, important bugs) -- `2` - Medium (default, nice-to-have) -- `3` - Low (polish, optimization) -- `4` - Backlog (future ideas) - -### Workflow for AI Agents - -1. **Check ready work**: `bd ready` shows unblocked issues -2. **Claim your task atomically**: `bd update --claim` -3. **Work on it**: Implement, test, document -4. **Discover new work?** Create linked issue: - - `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:` -5. **Complete**: `bd close --reason "Done"` - -### Auto-Sync - -bd automatically syncs with git: - -- Exports to `.beads/issues.jsonl` after changes (5s debounce) -- Imports from JSONL when newer (e.g., after `git pull`) -- No manual export/import needed! - -### Important Rules - -- ✅ Use bd for ALL task tracking -- ✅ Always use `--json` flag for programmatic use -- ✅ Link discovered work with `discovered-from` dependencies -- ✅ Check `bd ready` before asking "what should I work on?" -- ❌ Do NOT create markdown TODO lists -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems - -For more details, see README.md and docs/QUICKSTART.md. - - - -## Landing the Plane (Session Completion) - -**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. - -**MANDATORY WORKFLOW:** - -1. **File issues for remaining work** - Create issues for anything that needs follow-up -2. **Run quality gates** (if code changed) - Tests, linters, builds -3. **Update issue status** - Close finished work, update in-progress items -4. **PUSH TO REMOTE** - This is MANDATORY: - ```bash - git pull --rebase - bd sync - git push - git status # MUST show "up to date with origin" - ``` -5. **Clean up** - Clear stashes, prune remote branches -6. **Verify** - All changes committed AND pushed -7. **Hand off** - Provide context for next session - -**CRITICAL RULES:** -- Work is NOT complete until `git push` succeeds -- NEVER stop before pushing - that leaves work stranded locally -- NEVER say "ready to push when you are" - YOU must push -- If push fails, resolve and retry until it succeeds diff --git a/tmp/bbmaf8BaArXC/.beads/.gitignore b/tmp/bbmaf8BaArXC/.beads/.gitignore deleted file mode 100644 index e6fb002..0000000 --- a/tmp/bbmaf8BaArXC/.beads/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Dolt database (managed by Dolt, not git) -dolt/ -dolt-access.lock - -# Runtime files -bd.sock -bd.sock.startlock -sync-state.json -last-touched - -# Local version tracking (prevents upgrade notification spam after git ops) -.local_version - -# Worktree redirect file (contains relative path to main repo's .beads/) -# Must not be committed as paths would be wrong in other clones -redirect - -# Sync state (local-only, per-machine) -# These files are machine-specific and should not be shared across clones -.sync.lock -export-state/ - -# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) -ephemeral.sqlite3 -ephemeral.sqlite3-journal -ephemeral.sqlite3-wal -ephemeral.sqlite3-shm - -# Dolt server management (auto-started by bd) -dolt-server.pid -dolt-server.log -dolt-server.lock - -# Legacy files (from pre-Dolt versions) -*.db -*.db?* -*.db-journal -*.db-wal -*.db-shm -db.sqlite -bd.db -daemon.lock -daemon.log -daemon-*.log.gz -daemon.pid -# NOTE: Do NOT add negation patterns here. -# They would override fork protection in .git/info/exclude. -# Config files (metadata.json, config.yaml) are tracked by git by default -# since no pattern above ignores them. diff --git a/tmp/bbmaf8BaArXC/.beads/README.md b/tmp/bbmaf8BaArXC/.beads/README.md deleted file mode 100644 index 0efd932..0000000 --- a/tmp/bbmaf8BaArXC/.beads/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Beads - AI-Native Issue Tracking - -Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. - -## What is Beads? - -Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. - -**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) - -## Quick Start - -### Essential Commands - -```bash -# Create new issues -bd create "Add user authentication" - -# View all issues -bd list - -# View issue details -bd show - -# Update issue status -bd update --claim -bd update --status done - -# Sync with Dolt remote -bd dolt push -``` - -### Working with Issues - -Issues in Beads are: -- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code -- **AI-friendly**: CLI-first design works perfectly with AI coding agents -- **Branch-aware**: Issues can follow your branch workflow -- **Always in sync**: Auto-syncs with your commits - -## Why Beads? - -✨ **AI-Native Design** -- Built specifically for AI-assisted development workflows -- CLI-first interface works seamlessly with AI coding agents -- No context switching to web UIs - -🚀 **Developer Focused** -- Issues live in your repo, right next to your code -- Works offline, syncs when you push -- Fast, lightweight, and stays out of your way - -🔧 **Git Integration** -- Automatic sync with git commits -- Branch-aware issue tracking -- Intelligent JSONL merge resolution - -## Get Started with Beads - -Try Beads in your own projects: - -```bash -# Install Beads -curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash - -# Initialize in your repo -bd init - -# Create your first issue -bd create "Try out Beads" -``` - -## Learn More - -- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) -- **Quick Start Guide**: Run `bd quickstart` -- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) - ---- - -*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/tmp/bbmaf8BaArXC/.beads/config.yaml b/tmp/bbmaf8BaArXC/.beads/config.yaml deleted file mode 100644 index fe6eeae..0000000 --- a/tmp/bbmaf8BaArXC/.beads/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Beads Configuration File -# This file configures default behavior for all bd commands in this repository -# All settings can also be set via environment variables (BD_* prefix) -# or overridden with command-line flags - -# Issue prefix for this repository (used by bd init) -# If not set, bd init will auto-detect from directory name -# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. -# issue-prefix: "" - -# Use no-db mode: load from JSONL, write back after each command -# When true, bd will use .beads/issues.jsonl as the source of truth -# instead of the Dolt database -# no-db: false - -# Enable JSON output by default -# json: false - -# Feedback title formatting for mutating commands (create/update/close/dep/edit) -# 0 = hide titles, N > 0 = truncate to N characters -# output: -# title-length: 255 - -# Default actor for audit trails (overridden by BD_ACTOR or --actor) -# actor: "" - -# Export events (audit trail) to .beads/events.jsonl on each flush/sync -# When enabled, new events are appended incrementally using a high-water mark. -# Use 'bd export --events' to trigger manually regardless of this setting. -# events-export: false - -# Multi-repo configuration (experimental - bd-307) -# Allows hydrating from multiple repositories and routing writes to the correct JSONL -# repos: -# primary: "." # Primary repo (where this database lives) -# additional: # Additional repos to hydrate from (read-only) -# - ~/beads-planning # Personal planning repo -# - ~/work-planning # Work planning repo - -# JSONL backup (periodic export for off-machine recovery) -# Auto-enabled when a git remote exists. Override explicitly: -# backup: -# enabled: false # Disable auto-backup entirely -# interval: 15m # Minimum time between auto-exports -# git-push: false # Disable git push (export locally only) -# git-repo: "" # Separate git repo for backups (default: project repo) - -# Integration settings (access with 'bd config get/set') -# These are stored in the database, not in this file: -# - jira.url -# - jira.project -# - linear.url -# - linear.api-key -# - github.org -# - github.repo diff --git a/tmp/bbmaf8BaArXC/.beads/interactions.jsonl b/tmp/bbmaf8BaArXC/.beads/interactions.jsonl deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/bbmaf8BaArXC/.beads/metadata.json b/tmp/bbmaf8BaArXC/.beads/metadata.json deleted file mode 100644 index afc07bc..0000000 --- a/tmp/bbmaf8BaArXC/.beads/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "database": "dolt", - "backend": "dolt", - "dolt_mode": "server", - "dolt_database": "bbmaf8BaArXC" -} \ No newline at end of file diff --git a/tmp/bbmaf8BaArXC/.gitignore b/tmp/bbmaf8BaArXC/.gitignore deleted file mode 100644 index dc7a30c..0000000 --- a/tmp/bbmaf8BaArXC/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# Dolt database files (added by bd init) -.dolt/ -*.db diff --git a/tmp/bbmaf8BaArXC/AGENTS.md b/tmp/bbmaf8BaArXC/AGENTS.md deleted file mode 100644 index f923f4b..0000000 --- a/tmp/bbmaf8BaArXC/AGENTS.md +++ /dev/null @@ -1,150 +0,0 @@ -# Agent Instructions - -This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. - -## Quick Reference - -```bash -bd ready # Find available work -bd show # View issue details -bd update --claim # Claim work atomically -bd close # Complete work -bd sync # Sync with git -``` - -## Non-Interactive Shell Commands - -**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts. - -Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input. - -**Use these forms instead:** -```bash -# Force overwrite without prompting -cp -f source dest # NOT: cp source dest -mv -f source dest # NOT: mv source dest -rm -f file # NOT: rm file - -# For recursive operations -rm -rf directory # NOT: rm -r directory -cp -rf source dest # NOT: cp -r source dest -``` - -**Other commands that may prompt:** -- `scp` - use `-o BatchMode=yes` for non-interactive -- `ssh` - use `-o BatchMode=yes` to fail instead of prompting -- `apt-get` - use `-y` flag -- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var - - -## Issue Tracking with bd (beads) - -**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods. - -### Why bd? - -- Dependency-aware: Track blockers and relationships between issues -- Git-friendly: Auto-syncs to JSONL for version control -- Agent-optimized: JSON output, ready work detection, discovered-from links -- Prevents duplicate tracking systems and confusion - -### Quick Start - -**Check for ready work:** - -```bash -bd ready --json -``` - -**Create new issues:** - -```bash -bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json -bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json -``` - -**Claim and update:** - -```bash -bd update --claim --json -bd update bd-42 --priority 1 --json -``` - -**Complete work:** - -```bash -bd close bd-42 --reason "Completed" --json -``` - -### Issue Types - -- `bug` - Something broken -- `feature` - New functionality -- `task` - Work item (tests, docs, refactoring) -- `epic` - Large feature with subtasks -- `chore` - Maintenance (dependencies, tooling) - -### Priorities - -- `0` - Critical (security, data loss, broken builds) -- `1` - High (major features, important bugs) -- `2` - Medium (default, nice-to-have) -- `3` - Low (polish, optimization) -- `4` - Backlog (future ideas) - -### Workflow for AI Agents - -1. **Check ready work**: `bd ready` shows unblocked issues -2. **Claim your task atomically**: `bd update --claim` -3. **Work on it**: Implement, test, document -4. **Discover new work?** Create linked issue: - - `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:` -5. **Complete**: `bd close --reason "Done"` - -### Auto-Sync - -bd automatically syncs with git: - -- Exports to `.beads/issues.jsonl` after changes (5s debounce) -- Imports from JSONL when newer (e.g., after `git pull`) -- No manual export/import needed! - -### Important Rules - -- ✅ Use bd for ALL task tracking -- ✅ Always use `--json` flag for programmatic use -- ✅ Link discovered work with `discovered-from` dependencies -- ✅ Check `bd ready` before asking "what should I work on?" -- ❌ Do NOT create markdown TODO lists -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems - -For more details, see README.md and docs/QUICKSTART.md. - - - -## Landing the Plane (Session Completion) - -**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. - -**MANDATORY WORKFLOW:** - -1. **File issues for remaining work** - Create issues for anything that needs follow-up -2. **Run quality gates** (if code changed) - Tests, linters, builds -3. **Update issue status** - Close finished work, update in-progress items -4. **PUSH TO REMOTE** - This is MANDATORY: - ```bash - git pull --rebase - bd sync - git push - git status # MUST show "up to date with origin" - ``` -5. **Clean up** - Clear stashes, prune remote branches -6. **Verify** - All changes committed AND pushed -7. **Hand off** - Provide context for next session - -**CRITICAL RULES:** -- Work is NOT complete until `git push` succeeds -- NEVER stop before pushing - that leaves work stranded locally -- NEVER say "ready to push when you are" - YOU must push -- If push fails, resolve and retry until it succeeds diff --git a/tmp/bbmaf8FZn4MJ/.beads/.gitignore b/tmp/bbmaf8FZn4MJ/.beads/.gitignore deleted file mode 100644 index e6fb002..0000000 --- a/tmp/bbmaf8FZn4MJ/.beads/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Dolt database (managed by Dolt, not git) -dolt/ -dolt-access.lock - -# Runtime files -bd.sock -bd.sock.startlock -sync-state.json -last-touched - -# Local version tracking (prevents upgrade notification spam after git ops) -.local_version - -# Worktree redirect file (contains relative path to main repo's .beads/) -# Must not be committed as paths would be wrong in other clones -redirect - -# Sync state (local-only, per-machine) -# These files are machine-specific and should not be shared across clones -.sync.lock -export-state/ - -# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) -ephemeral.sqlite3 -ephemeral.sqlite3-journal -ephemeral.sqlite3-wal -ephemeral.sqlite3-shm - -# Dolt server management (auto-started by bd) -dolt-server.pid -dolt-server.log -dolt-server.lock - -# Legacy files (from pre-Dolt versions) -*.db -*.db?* -*.db-journal -*.db-wal -*.db-shm -db.sqlite -bd.db -daemon.lock -daemon.log -daemon-*.log.gz -daemon.pid -# NOTE: Do NOT add negation patterns here. -# They would override fork protection in .git/info/exclude. -# Config files (metadata.json, config.yaml) are tracked by git by default -# since no pattern above ignores them. diff --git a/tmp/bbmaf8FZn4MJ/.beads/README.md b/tmp/bbmaf8FZn4MJ/.beads/README.md deleted file mode 100644 index 0efd932..0000000 --- a/tmp/bbmaf8FZn4MJ/.beads/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Beads - AI-Native Issue Tracking - -Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. - -## What is Beads? - -Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. - -**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) - -## Quick Start - -### Essential Commands - -```bash -# Create new issues -bd create "Add user authentication" - -# View all issues -bd list - -# View issue details -bd show - -# Update issue status -bd update --claim -bd update --status done - -# Sync with Dolt remote -bd dolt push -``` - -### Working with Issues - -Issues in Beads are: -- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code -- **AI-friendly**: CLI-first design works perfectly with AI coding agents -- **Branch-aware**: Issues can follow your branch workflow -- **Always in sync**: Auto-syncs with your commits - -## Why Beads? - -✨ **AI-Native Design** -- Built specifically for AI-assisted development workflows -- CLI-first interface works seamlessly with AI coding agents -- No context switching to web UIs - -🚀 **Developer Focused** -- Issues live in your repo, right next to your code -- Works offline, syncs when you push -- Fast, lightweight, and stays out of your way - -🔧 **Git Integration** -- Automatic sync with git commits -- Branch-aware issue tracking -- Intelligent JSONL merge resolution - -## Get Started with Beads - -Try Beads in your own projects: - -```bash -# Install Beads -curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash - -# Initialize in your repo -bd init - -# Create your first issue -bd create "Try out Beads" -``` - -## Learn More - -- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) -- **Quick Start Guide**: Run `bd quickstart` -- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) - ---- - -*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/tmp/bbmaf8FZn4MJ/.beads/config.yaml b/tmp/bbmaf8FZn4MJ/.beads/config.yaml deleted file mode 100644 index fe6eeae..0000000 --- a/tmp/bbmaf8FZn4MJ/.beads/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Beads Configuration File -# This file configures default behavior for all bd commands in this repository -# All settings can also be set via environment variables (BD_* prefix) -# or overridden with command-line flags - -# Issue prefix for this repository (used by bd init) -# If not set, bd init will auto-detect from directory name -# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. -# issue-prefix: "" - -# Use no-db mode: load from JSONL, write back after each command -# When true, bd will use .beads/issues.jsonl as the source of truth -# instead of the Dolt database -# no-db: false - -# Enable JSON output by default -# json: false - -# Feedback title formatting for mutating commands (create/update/close/dep/edit) -# 0 = hide titles, N > 0 = truncate to N characters -# output: -# title-length: 255 - -# Default actor for audit trails (overridden by BD_ACTOR or --actor) -# actor: "" - -# Export events (audit trail) to .beads/events.jsonl on each flush/sync -# When enabled, new events are appended incrementally using a high-water mark. -# Use 'bd export --events' to trigger manually regardless of this setting. -# events-export: false - -# Multi-repo configuration (experimental - bd-307) -# Allows hydrating from multiple repositories and routing writes to the correct JSONL -# repos: -# primary: "." # Primary repo (where this database lives) -# additional: # Additional repos to hydrate from (read-only) -# - ~/beads-planning # Personal planning repo -# - ~/work-planning # Work planning repo - -# JSONL backup (periodic export for off-machine recovery) -# Auto-enabled when a git remote exists. Override explicitly: -# backup: -# enabled: false # Disable auto-backup entirely -# interval: 15m # Minimum time between auto-exports -# git-push: false # Disable git push (export locally only) -# git-repo: "" # Separate git repo for backups (default: project repo) - -# Integration settings (access with 'bd config get/set') -# These are stored in the database, not in this file: -# - jira.url -# - jira.project -# - linear.url -# - linear.api-key -# - github.org -# - github.repo diff --git a/tmp/bbmaf8FZn4MJ/.beads/interactions.jsonl b/tmp/bbmaf8FZn4MJ/.beads/interactions.jsonl deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/bbmaf8FZn4MJ/.beads/metadata.json b/tmp/bbmaf8FZn4MJ/.beads/metadata.json deleted file mode 100644 index 643a6bf..0000000 --- a/tmp/bbmaf8FZn4MJ/.beads/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "database": "dolt", - "backend": "dolt", - "dolt_mode": "server", - "dolt_database": "bbmaf8FZn4MJ" -} \ No newline at end of file diff --git a/tmp/bbmaf8FZn4MJ/.gitignore b/tmp/bbmaf8FZn4MJ/.gitignore deleted file mode 100644 index dc7a30c..0000000 --- a/tmp/bbmaf8FZn4MJ/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# Dolt database files (added by bd init) -.dolt/ -*.db diff --git a/tmp/bbmaf8FZn4MJ/AGENTS.md b/tmp/bbmaf8FZn4MJ/AGENTS.md deleted file mode 100644 index f923f4b..0000000 --- a/tmp/bbmaf8FZn4MJ/AGENTS.md +++ /dev/null @@ -1,150 +0,0 @@ -# Agent Instructions - -This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. - -## Quick Reference - -```bash -bd ready # Find available work -bd show # View issue details -bd update --claim # Claim work atomically -bd close # Complete work -bd sync # Sync with git -``` - -## Non-Interactive Shell Commands - -**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts. - -Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input. - -**Use these forms instead:** -```bash -# Force overwrite without prompting -cp -f source dest # NOT: cp source dest -mv -f source dest # NOT: mv source dest -rm -f file # NOT: rm file - -# For recursive operations -rm -rf directory # NOT: rm -r directory -cp -rf source dest # NOT: cp -r source dest -``` - -**Other commands that may prompt:** -- `scp` - use `-o BatchMode=yes` for non-interactive -- `ssh` - use `-o BatchMode=yes` to fail instead of prompting -- `apt-get` - use `-y` flag -- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var - - -## Issue Tracking with bd (beads) - -**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods. - -### Why bd? - -- Dependency-aware: Track blockers and relationships between issues -- Git-friendly: Auto-syncs to JSONL for version control -- Agent-optimized: JSON output, ready work detection, discovered-from links -- Prevents duplicate tracking systems and confusion - -### Quick Start - -**Check for ready work:** - -```bash -bd ready --json -``` - -**Create new issues:** - -```bash -bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json -bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json -``` - -**Claim and update:** - -```bash -bd update --claim --json -bd update bd-42 --priority 1 --json -``` - -**Complete work:** - -```bash -bd close bd-42 --reason "Completed" --json -``` - -### Issue Types - -- `bug` - Something broken -- `feature` - New functionality -- `task` - Work item (tests, docs, refactoring) -- `epic` - Large feature with subtasks -- `chore` - Maintenance (dependencies, tooling) - -### Priorities - -- `0` - Critical (security, data loss, broken builds) -- `1` - High (major features, important bugs) -- `2` - Medium (default, nice-to-have) -- `3` - Low (polish, optimization) -- `4` - Backlog (future ideas) - -### Workflow for AI Agents - -1. **Check ready work**: `bd ready` shows unblocked issues -2. **Claim your task atomically**: `bd update --claim` -3. **Work on it**: Implement, test, document -4. **Discover new work?** Create linked issue: - - `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:` -5. **Complete**: `bd close --reason "Done"` - -### Auto-Sync - -bd automatically syncs with git: - -- Exports to `.beads/issues.jsonl` after changes (5s debounce) -- Imports from JSONL when newer (e.g., after `git pull`) -- No manual export/import needed! - -### Important Rules - -- ✅ Use bd for ALL task tracking -- ✅ Always use `--json` flag for programmatic use -- ✅ Link discovered work with `discovered-from` dependencies -- ✅ Check `bd ready` before asking "what should I work on?" -- ❌ Do NOT create markdown TODO lists -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems - -For more details, see README.md and docs/QUICKSTART.md. - - - -## Landing the Plane (Session Completion) - -**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. - -**MANDATORY WORKFLOW:** - -1. **File issues for remaining work** - Create issues for anything that needs follow-up -2. **Run quality gates** (if code changed) - Tests, linters, builds -3. **Update issue status** - Close finished work, update in-progress items -4. **PUSH TO REMOTE** - This is MANDATORY: - ```bash - git pull --rebase - bd sync - git push - git status # MUST show "up to date with origin" - ``` -5. **Clean up** - Clear stashes, prune remote branches -6. **Verify** - All changes committed AND pushed -7. **Hand off** - Provide context for next session - -**CRITICAL RULES:** -- Work is NOT complete until `git push` succeeds -- NEVER stop before pushing - that leaves work stranded locally -- NEVER say "ready to push when you are" - YOU must push -- If push fails, resolve and retry until it succeeds diff --git a/tmp/bbmaf8GJ6CIz/.beads/.gitignore b/tmp/bbmaf8GJ6CIz/.beads/.gitignore deleted file mode 100644 index e6fb002..0000000 --- a/tmp/bbmaf8GJ6CIz/.beads/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Dolt database (managed by Dolt, not git) -dolt/ -dolt-access.lock - -# Runtime files -bd.sock -bd.sock.startlock -sync-state.json -last-touched - -# Local version tracking (prevents upgrade notification spam after git ops) -.local_version - -# Worktree redirect file (contains relative path to main repo's .beads/) -# Must not be committed as paths would be wrong in other clones -redirect - -# Sync state (local-only, per-machine) -# These files are machine-specific and should not be shared across clones -.sync.lock -export-state/ - -# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) -ephemeral.sqlite3 -ephemeral.sqlite3-journal -ephemeral.sqlite3-wal -ephemeral.sqlite3-shm - -# Dolt server management (auto-started by bd) -dolt-server.pid -dolt-server.log -dolt-server.lock - -# Legacy files (from pre-Dolt versions) -*.db -*.db?* -*.db-journal -*.db-wal -*.db-shm -db.sqlite -bd.db -daemon.lock -daemon.log -daemon-*.log.gz -daemon.pid -# NOTE: Do NOT add negation patterns here. -# They would override fork protection in .git/info/exclude. -# Config files (metadata.json, config.yaml) are tracked by git by default -# since no pattern above ignores them. diff --git a/tmp/bbmaf8GJ6CIz/.beads/README.md b/tmp/bbmaf8GJ6CIz/.beads/README.md deleted file mode 100644 index 0efd932..0000000 --- a/tmp/bbmaf8GJ6CIz/.beads/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Beads - AI-Native Issue Tracking - -Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. - -## What is Beads? - -Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. - -**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) - -## Quick Start - -### Essential Commands - -```bash -# Create new issues -bd create "Add user authentication" - -# View all issues -bd list - -# View issue details -bd show - -# Update issue status -bd update --claim -bd update --status done - -# Sync with Dolt remote -bd dolt push -``` - -### Working with Issues - -Issues in Beads are: -- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code -- **AI-friendly**: CLI-first design works perfectly with AI coding agents -- **Branch-aware**: Issues can follow your branch workflow -- **Always in sync**: Auto-syncs with your commits - -## Why Beads? - -✨ **AI-Native Design** -- Built specifically for AI-assisted development workflows -- CLI-first interface works seamlessly with AI coding agents -- No context switching to web UIs - -🚀 **Developer Focused** -- Issues live in your repo, right next to your code -- Works offline, syncs when you push -- Fast, lightweight, and stays out of your way - -🔧 **Git Integration** -- Automatic sync with git commits -- Branch-aware issue tracking -- Intelligent JSONL merge resolution - -## Get Started with Beads - -Try Beads in your own projects: - -```bash -# Install Beads -curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash - -# Initialize in your repo -bd init - -# Create your first issue -bd create "Try out Beads" -``` - -## Learn More - -- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) -- **Quick Start Guide**: Run `bd quickstart` -- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) - ---- - -*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/tmp/bbmaf8GJ6CIz/.beads/config.yaml b/tmp/bbmaf8GJ6CIz/.beads/config.yaml deleted file mode 100644 index fe6eeae..0000000 --- a/tmp/bbmaf8GJ6CIz/.beads/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Beads Configuration File -# This file configures default behavior for all bd commands in this repository -# All settings can also be set via environment variables (BD_* prefix) -# or overridden with command-line flags - -# Issue prefix for this repository (used by bd init) -# If not set, bd init will auto-detect from directory name -# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. -# issue-prefix: "" - -# Use no-db mode: load from JSONL, write back after each command -# When true, bd will use .beads/issues.jsonl as the source of truth -# instead of the Dolt database -# no-db: false - -# Enable JSON output by default -# json: false - -# Feedback title formatting for mutating commands (create/update/close/dep/edit) -# 0 = hide titles, N > 0 = truncate to N characters -# output: -# title-length: 255 - -# Default actor for audit trails (overridden by BD_ACTOR or --actor) -# actor: "" - -# Export events (audit trail) to .beads/events.jsonl on each flush/sync -# When enabled, new events are appended incrementally using a high-water mark. -# Use 'bd export --events' to trigger manually regardless of this setting. -# events-export: false - -# Multi-repo configuration (experimental - bd-307) -# Allows hydrating from multiple repositories and routing writes to the correct JSONL -# repos: -# primary: "." # Primary repo (where this database lives) -# additional: # Additional repos to hydrate from (read-only) -# - ~/beads-planning # Personal planning repo -# - ~/work-planning # Work planning repo - -# JSONL backup (periodic export for off-machine recovery) -# Auto-enabled when a git remote exists. Override explicitly: -# backup: -# enabled: false # Disable auto-backup entirely -# interval: 15m # Minimum time between auto-exports -# git-push: false # Disable git push (export locally only) -# git-repo: "" # Separate git repo for backups (default: project repo) - -# Integration settings (access with 'bd config get/set') -# These are stored in the database, not in this file: -# - jira.url -# - jira.project -# - linear.url -# - linear.api-key -# - github.org -# - github.repo diff --git a/tmp/bbmaf8GJ6CIz/.beads/interactions.jsonl b/tmp/bbmaf8GJ6CIz/.beads/interactions.jsonl deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/bbmaf8GJ6CIz/.beads/metadata.json b/tmp/bbmaf8GJ6CIz/.beads/metadata.json deleted file mode 100644 index 5c61166..0000000 --- a/tmp/bbmaf8GJ6CIz/.beads/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "database": "dolt", - "backend": "dolt", - "dolt_mode": "server", - "dolt_database": "bbmaf8GJ6CIz" -} \ No newline at end of file diff --git a/tmp/bbmaf8GJ6CIz/.gitignore b/tmp/bbmaf8GJ6CIz/.gitignore deleted file mode 100644 index dc7a30c..0000000 --- a/tmp/bbmaf8GJ6CIz/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# Dolt database files (added by bd init) -.dolt/ -*.db diff --git a/tmp/bbmaf8GJ6CIz/AGENTS.md b/tmp/bbmaf8GJ6CIz/AGENTS.md deleted file mode 100644 index f923f4b..0000000 --- a/tmp/bbmaf8GJ6CIz/AGENTS.md +++ /dev/null @@ -1,150 +0,0 @@ -# Agent Instructions - -This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. - -## Quick Reference - -```bash -bd ready # Find available work -bd show # View issue details -bd update --claim # Claim work atomically -bd close # Complete work -bd sync # Sync with git -``` - -## Non-Interactive Shell Commands - -**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts. - -Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input. - -**Use these forms instead:** -```bash -# Force overwrite without prompting -cp -f source dest # NOT: cp source dest -mv -f source dest # NOT: mv source dest -rm -f file # NOT: rm file - -# For recursive operations -rm -rf directory # NOT: rm -r directory -cp -rf source dest # NOT: cp -r source dest -``` - -**Other commands that may prompt:** -- `scp` - use `-o BatchMode=yes` for non-interactive -- `ssh` - use `-o BatchMode=yes` to fail instead of prompting -- `apt-get` - use `-y` flag -- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var - - -## Issue Tracking with bd (beads) - -**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods. - -### Why bd? - -- Dependency-aware: Track blockers and relationships between issues -- Git-friendly: Auto-syncs to JSONL for version control -- Agent-optimized: JSON output, ready work detection, discovered-from links -- Prevents duplicate tracking systems and confusion - -### Quick Start - -**Check for ready work:** - -```bash -bd ready --json -``` - -**Create new issues:** - -```bash -bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json -bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json -``` - -**Claim and update:** - -```bash -bd update --claim --json -bd update bd-42 --priority 1 --json -``` - -**Complete work:** - -```bash -bd close bd-42 --reason "Completed" --json -``` - -### Issue Types - -- `bug` - Something broken -- `feature` - New functionality -- `task` - Work item (tests, docs, refactoring) -- `epic` - Large feature with subtasks -- `chore` - Maintenance (dependencies, tooling) - -### Priorities - -- `0` - Critical (security, data loss, broken builds) -- `1` - High (major features, important bugs) -- `2` - Medium (default, nice-to-have) -- `3` - Low (polish, optimization) -- `4` - Backlog (future ideas) - -### Workflow for AI Agents - -1. **Check ready work**: `bd ready` shows unblocked issues -2. **Claim your task atomically**: `bd update --claim` -3. **Work on it**: Implement, test, document -4. **Discover new work?** Create linked issue: - - `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:` -5. **Complete**: `bd close --reason "Done"` - -### Auto-Sync - -bd automatically syncs with git: - -- Exports to `.beads/issues.jsonl` after changes (5s debounce) -- Imports from JSONL when newer (e.g., after `git pull`) -- No manual export/import needed! - -### Important Rules - -- ✅ Use bd for ALL task tracking -- ✅ Always use `--json` flag for programmatic use -- ✅ Link discovered work with `discovered-from` dependencies -- ✅ Check `bd ready` before asking "what should I work on?" -- ❌ Do NOT create markdown TODO lists -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems - -For more details, see README.md and docs/QUICKSTART.md. - - - -## Landing the Plane (Session Completion) - -**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. - -**MANDATORY WORKFLOW:** - -1. **File issues for remaining work** - Create issues for anything that needs follow-up -2. **Run quality gates** (if code changed) - Tests, linters, builds -3. **Update issue status** - Close finished work, update in-progress items -4. **PUSH TO REMOTE** - This is MANDATORY: - ```bash - git pull --rebase - bd sync - git push - git status # MUST show "up to date with origin" - ``` -5. **Clean up** - Clear stashes, prune remote branches -6. **Verify** - All changes committed AND pushed -7. **Hand off** - Provide context for next session - -**CRITICAL RULES:** -- Work is NOT complete until `git push` succeeds -- NEVER stop before pushing - that leaves work stranded locally -- NEVER say "ready to push when you are" - YOU must push -- If push fails, resolve and retry until it succeeds diff --git a/tmp/bbmaf8Kx5GEB/.beads/.gitignore b/tmp/bbmaf8Kx5GEB/.beads/.gitignore deleted file mode 100644 index e6fb002..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# Dolt database (managed by Dolt, not git) -dolt/ -dolt-access.lock - -# Runtime files -bd.sock -bd.sock.startlock -sync-state.json -last-touched - -# Local version tracking (prevents upgrade notification spam after git ops) -.local_version - -# Worktree redirect file (contains relative path to main repo's .beads/) -# Must not be committed as paths would be wrong in other clones -redirect - -# Sync state (local-only, per-machine) -# These files are machine-specific and should not be shared across clones -.sync.lock -export-state/ - -# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned) -ephemeral.sqlite3 -ephemeral.sqlite3-journal -ephemeral.sqlite3-wal -ephemeral.sqlite3-shm - -# Dolt server management (auto-started by bd) -dolt-server.pid -dolt-server.log -dolt-server.lock - -# Legacy files (from pre-Dolt versions) -*.db -*.db?* -*.db-journal -*.db-wal -*.db-shm -db.sqlite -bd.db -daemon.lock -daemon.log -daemon-*.log.gz -daemon.pid -# NOTE: Do NOT add negation patterns here. -# They would override fork protection in .git/info/exclude. -# Config files (metadata.json, config.yaml) are tracked by git by default -# since no pattern above ignores them. diff --git a/tmp/bbmaf8Kx5GEB/.beads/README.md b/tmp/bbmaf8Kx5GEB/.beads/README.md deleted file mode 100644 index 0efd932..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Beads - AI-Native Issue Tracking - -Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. - -## What is Beads? - -Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. - -**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) - -## Quick Start - -### Essential Commands - -```bash -# Create new issues -bd create "Add user authentication" - -# View all issues -bd list - -# View issue details -bd show - -# Update issue status -bd update --claim -bd update --status done - -# Sync with Dolt remote -bd dolt push -``` - -### Working with Issues - -Issues in Beads are: -- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code -- **AI-friendly**: CLI-first design works perfectly with AI coding agents -- **Branch-aware**: Issues can follow your branch workflow -- **Always in sync**: Auto-syncs with your commits - -## Why Beads? - -✨ **AI-Native Design** -- Built specifically for AI-assisted development workflows -- CLI-first interface works seamlessly with AI coding agents -- No context switching to web UIs - -🚀 **Developer Focused** -- Issues live in your repo, right next to your code -- Works offline, syncs when you push -- Fast, lightweight, and stays out of your way - -🔧 **Git Integration** -- Automatic sync with git commits -- Branch-aware issue tracking -- Intelligent JSONL merge resolution - -## Get Started with Beads - -Try Beads in your own projects: - -```bash -# Install Beads -curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash - -# Initialize in your repo -bd init - -# Create your first issue -bd create "Try out Beads" -``` - -## Learn More - -- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) -- **Quick Start Guide**: Run `bd quickstart` -- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) - ---- - -*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/tmp/bbmaf8Kx5GEB/.beads/config.yaml b/tmp/bbmaf8Kx5GEB/.beads/config.yaml deleted file mode 100644 index fe6eeae..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# Beads Configuration File -# This file configures default behavior for all bd commands in this repository -# All settings can also be set via environment variables (BD_* prefix) -# or overridden with command-line flags - -# Issue prefix for this repository (used by bd init) -# If not set, bd init will auto-detect from directory name -# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. -# issue-prefix: "" - -# Use no-db mode: load from JSONL, write back after each command -# When true, bd will use .beads/issues.jsonl as the source of truth -# instead of the Dolt database -# no-db: false - -# Enable JSON output by default -# json: false - -# Feedback title formatting for mutating commands (create/update/close/dep/edit) -# 0 = hide titles, N > 0 = truncate to N characters -# output: -# title-length: 255 - -# Default actor for audit trails (overridden by BD_ACTOR or --actor) -# actor: "" - -# Export events (audit trail) to .beads/events.jsonl on each flush/sync -# When enabled, new events are appended incrementally using a high-water mark. -# Use 'bd export --events' to trigger manually regardless of this setting. -# events-export: false - -# Multi-repo configuration (experimental - bd-307) -# Allows hydrating from multiple repositories and routing writes to the correct JSONL -# repos: -# primary: "." # Primary repo (where this database lives) -# additional: # Additional repos to hydrate from (read-only) -# - ~/beads-planning # Personal planning repo -# - ~/work-planning # Work planning repo - -# JSONL backup (periodic export for off-machine recovery) -# Auto-enabled when a git remote exists. Override explicitly: -# backup: -# enabled: false # Disable auto-backup entirely -# interval: 15m # Minimum time between auto-exports -# git-push: false # Disable git push (export locally only) -# git-repo: "" # Separate git repo for backups (default: project repo) - -# Integration settings (access with 'bd config get/set') -# These are stored in the database, not in this file: -# - jira.url -# - jira.project -# - linear.url -# - linear.api-key -# - github.org -# - github.repo diff --git a/tmp/bbmaf8Kx5GEB/.beads/hooks/post-checkout b/tmp/bbmaf8Kx5GEB/.beads/hooks/post-checkout deleted file mode 100644 index 206fe24..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/hooks/post-checkout +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh -# --- BEGIN BEADS INTEGRATION v0.57.0 --- -# This section is managed by beads. Do not remove these markers. -if command -v bd >/dev/null 2>&1; then - export BD_GIT_HOOK=1 - bd hooks run post-checkout "$@" - _bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi -fi -# --- END BEADS INTEGRATION --- diff --git a/tmp/bbmaf8Kx5GEB/.beads/hooks/post-merge b/tmp/bbmaf8Kx5GEB/.beads/hooks/post-merge deleted file mode 100644 index 73fc60c..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/hooks/post-merge +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh -# --- BEGIN BEADS INTEGRATION v0.57.0 --- -# This section is managed by beads. Do not remove these markers. -if command -v bd >/dev/null 2>&1; then - export BD_GIT_HOOK=1 - bd hooks run post-merge "$@" - _bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi -fi -# --- END BEADS INTEGRATION --- diff --git a/tmp/bbmaf8Kx5GEB/.beads/hooks/pre-commit b/tmp/bbmaf8Kx5GEB/.beads/hooks/pre-commit deleted file mode 100644 index 90dc813..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/hooks/pre-commit +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh -# --- BEGIN BEADS INTEGRATION v0.57.0 --- -# This section is managed by beads. Do not remove these markers. -if command -v bd >/dev/null 2>&1; then - export BD_GIT_HOOK=1 - bd hooks run pre-commit "$@" - _bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi -fi -# --- END BEADS INTEGRATION --- diff --git a/tmp/bbmaf8Kx5GEB/.beads/hooks/pre-push b/tmp/bbmaf8Kx5GEB/.beads/hooks/pre-push deleted file mode 100644 index 7c3dd9b..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/hooks/pre-push +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh -# --- BEGIN BEADS INTEGRATION v0.57.0 --- -# This section is managed by beads. Do not remove these markers. -if command -v bd >/dev/null 2>&1; then - export BD_GIT_HOOK=1 - bd hooks run pre-push "$@" - _bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi -fi -# --- END BEADS INTEGRATION --- diff --git a/tmp/bbmaf8Kx5GEB/.beads/hooks/prepare-commit-msg b/tmp/bbmaf8Kx5GEB/.beads/hooks/prepare-commit-msg deleted file mode 100644 index a9023a4..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/hooks/prepare-commit-msg +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh -# --- BEGIN BEADS INTEGRATION v0.57.0 --- -# This section is managed by beads. Do not remove these markers. -if command -v bd >/dev/null 2>&1; then - export BD_GIT_HOOK=1 - bd hooks run prepare-commit-msg "$@" - _bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi -fi -# --- END BEADS INTEGRATION --- diff --git a/tmp/bbmaf8Kx5GEB/.beads/interactions.jsonl b/tmp/bbmaf8Kx5GEB/.beads/interactions.jsonl deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/bbmaf8Kx5GEB/.beads/metadata.json b/tmp/bbmaf8Kx5GEB/.beads/metadata.json deleted file mode 100644 index cd1d9ec..0000000 --- a/tmp/bbmaf8Kx5GEB/.beads/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "database": "dolt", - "backend": "dolt", - "dolt_mode": "server", - "dolt_database": "bbmaf8Kx5GEB" -} \ No newline at end of file diff --git a/tmp/bbmaf8Kx5GEB/.gitignore b/tmp/bbmaf8Kx5GEB/.gitignore deleted file mode 100644 index dc7a30c..0000000 --- a/tmp/bbmaf8Kx5GEB/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# Dolt database files (added by bd init) -.dolt/ -*.db diff --git a/tmp/bbmaf8Kx5GEB/AGENTS.md b/tmp/bbmaf8Kx5GEB/AGENTS.md deleted file mode 100644 index f923f4b..0000000 --- a/tmp/bbmaf8Kx5GEB/AGENTS.md +++ /dev/null @@ -1,150 +0,0 @@ -# Agent Instructions - -This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. - -## Quick Reference - -```bash -bd ready # Find available work -bd show # View issue details -bd update --claim # Claim work atomically -bd close # Complete work -bd sync # Sync with git -``` - -## Non-Interactive Shell Commands - -**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts. - -Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input. - -**Use these forms instead:** -```bash -# Force overwrite without prompting -cp -f source dest # NOT: cp source dest -mv -f source dest # NOT: mv source dest -rm -f file # NOT: rm file - -# For recursive operations -rm -rf directory # NOT: rm -r directory -cp -rf source dest # NOT: cp -r source dest -``` - -**Other commands that may prompt:** -- `scp` - use `-o BatchMode=yes` for non-interactive -- `ssh` - use `-o BatchMode=yes` to fail instead of prompting -- `apt-get` - use `-y` flag -- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var - - -## Issue Tracking with bd (beads) - -**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods. - -### Why bd? - -- Dependency-aware: Track blockers and relationships between issues -- Git-friendly: Auto-syncs to JSONL for version control -- Agent-optimized: JSON output, ready work detection, discovered-from links -- Prevents duplicate tracking systems and confusion - -### Quick Start - -**Check for ready work:** - -```bash -bd ready --json -``` - -**Create new issues:** - -```bash -bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json -bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json -``` - -**Claim and update:** - -```bash -bd update --claim --json -bd update bd-42 --priority 1 --json -``` - -**Complete work:** - -```bash -bd close bd-42 --reason "Completed" --json -``` - -### Issue Types - -- `bug` - Something broken -- `feature` - New functionality -- `task` - Work item (tests, docs, refactoring) -- `epic` - Large feature with subtasks -- `chore` - Maintenance (dependencies, tooling) - -### Priorities - -- `0` - Critical (security, data loss, broken builds) -- `1` - High (major features, important bugs) -- `2` - Medium (default, nice-to-have) -- `3` - Low (polish, optimization) -- `4` - Backlog (future ideas) - -### Workflow for AI Agents - -1. **Check ready work**: `bd ready` shows unblocked issues -2. **Claim your task atomically**: `bd update --claim` -3. **Work on it**: Implement, test, document -4. **Discover new work?** Create linked issue: - - `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:` -5. **Complete**: `bd close --reason "Done"` - -### Auto-Sync - -bd automatically syncs with git: - -- Exports to `.beads/issues.jsonl` after changes (5s debounce) -- Imports from JSONL when newer (e.g., after `git pull`) -- No manual export/import needed! - -### Important Rules - -- ✅ Use bd for ALL task tracking -- ✅ Always use `--json` flag for programmatic use -- ✅ Link discovered work with `discovered-from` dependencies -- ✅ Check `bd ready` before asking "what should I work on?" -- ❌ Do NOT create markdown TODO lists -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems - -For more details, see README.md and docs/QUICKSTART.md. - - - -## Landing the Plane (Session Completion) - -**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. - -**MANDATORY WORKFLOW:** - -1. **File issues for remaining work** - Create issues for anything that needs follow-up -2. **Run quality gates** (if code changed) - Tests, linters, builds -3. **Update issue status** - Close finished work, update in-progress items -4. **PUSH TO REMOTE** - This is MANDATORY: - ```bash - git pull --rebase - bd sync - git push - git status # MUST show "up to date with origin" - ``` -5. **Clean up** - Clear stashes, prune remote branches -6. **Verify** - All changes committed AND pushed -7. **Hand off** - Provide context for next session - -**CRITICAL RULES:** -- Work is NOT complete until `git push` succeeds -- NEVER stop before pushing - that leaves work stranded locally -- NEVER say "ready to push when you are" - YOU must push -- If push fails, resolve and retry until it succeeds