refactor: drop discover command, agents create new tasks instead

This commit is contained in:
Dustin Byrne
2026-03-25 20:17:38 -04:00
parent 8a2a5ac14b
commit 66a62b9bcb
7 changed files with 8 additions and 87 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env node
import { runDashboard } from "./commands/dashboard.js";
import { runTaskCreate, runTaskList, runTaskMove, runTaskMerge, runTaskUpdate, runTaskLog, runTaskDiscover, runTaskShow } from "./commands/task.js";
import { runTaskCreate, runTaskList, runTaskMove, runTaskMerge, runTaskUpdate, runTaskLog, runTaskShow } from "./commands/task.js";
const HELP = `
hai — AI-orchestrated task board
@@ -14,7 +14,6 @@ Usage:
hai task move <id> <col> Move a task to a column
hai task update <id> <step> <status> Update step status (pending|in-progress|done|skipped)
hai task log <id> <message> Add a log entry
hai task discover <id> <what> <disp> Record a discovery
hai task merge <id> Merge an in-review task and close it
Options:
@@ -95,15 +94,6 @@ async function main() {
await runTaskLog(id, message);
break;
}
case "discover": {
const id = args[2], what = args[3], disp = args[4], loc = args[5];
if (!id || !what || !disp) {
console.error("Usage: hai task discover <id> <discovery> <disposition> [location]");
process.exit(1);
}
await runTaskDiscover(id, what, disp, loc);
break;
}
case "merge": {
const id = args[2];
if (!id) { console.error("Usage: hai task merge <id>"); process.exit(1); }

View File

@@ -101,17 +101,6 @@ export async function runTaskLog(id: string, message: string, outcome?: string)
console.log();
}
export async function runTaskDiscover(id: string, discovery: string, disposition: string, location?: string) {
const store = await getStore();
await store.addDiscovery(id, discovery, disposition, location);
console.log();
console.log(` ✓ ${id}: discovery recorded`);
console.log(` ${discovery}`);
console.log(` → ${disposition}`);
console.log();
}
export async function runTaskShow(id: string) {
const store = await getStore();
const task = await store.getTask(id);
@@ -139,15 +128,6 @@ export async function runTaskShow(id: string) {
console.log();
}
// Discoveries
if (task.discoveries.length > 0) {
console.log(` Discoveries:`);
for (const d of task.discoveries) {
console.log(` • ${d.discovery} → ${d.disposition}${d.location ? ` (${d.location})` : ""}`);
}
console.log();
}
// Recent log
if (task.log.length > 0) {
const recent = task.log.slice(-5);