jfl 0.6.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -951
- package/dist/commands/context-hub.d.ts.map +1 -1
- package/dist/commands/context-hub.js +96 -0
- package/dist/commands/context-hub.js.map +1 -1
- package/dist/commands/kanban.d.ts +34 -0
- package/dist/commands/kanban.d.ts.map +1 -0
- package/dist/commands/kanban.js +216 -0
- package/dist/commands/kanban.js.map +1 -0
- package/dist/commands/peter.d.ts.map +1 -1
- package/dist/commands/peter.js +37 -0
- package/dist/commands/peter.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +62 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +28 -0
- package/dist/commands/verify.js.map +1 -1
- package/dist/dashboard-static/assets/index-CW8oWAdr.css +1 -0
- package/dist/dashboard-static/assets/index-Ck8f9dcM.js +121 -0
- package/dist/dashboard-static/index.html +2 -2
- package/dist/index.js +62 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/flow-engine.d.ts.map +1 -1
- package/dist/lib/flow-engine.js +38 -8
- package/dist/lib/flow-engine.js.map +1 -1
- package/dist/lib/kanban-github.d.ts +81 -0
- package/dist/lib/kanban-github.d.ts.map +1 -0
- package/dist/lib/kanban-github.js +318 -0
- package/dist/lib/kanban-github.js.map +1 -0
- package/dist/lib/kanban.d.ts +131 -0
- package/dist/lib/kanban.d.ts.map +1 -0
- package/dist/lib/kanban.js +340 -0
- package/dist/lib/kanban.js.map +1 -0
- package/dist/lib/service-gtm.d.ts.map +1 -1
- package/dist/lib/service-gtm.js +11 -0
- package/dist/lib/service-gtm.js.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard-static/assets/index-CW9ZxqX8.css +0 -1
- package/dist/dashboard-static/assets/index-DNN__p4K.js +0 -121
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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|
|
1
|
+
/**
|
|
2
|
+
* GitHub Issues-backed Kanban
|
|
3
|
+
*
|
|
4
|
+
* The board is a VIEW over GitHub Issues with jfl/ labels.
|
|
5
|
+
* No local state — git is the source of truth.
|
|
6
|
+
*/
|
|
7
|
+
import { execSync } from "child_process";
|
|
8
|
+
import { existsSync, readFileSync, writeFileSync, unlinkSync } from "fs";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
const COLUMN_LABELS = {
|
|
11
|
+
backlog: "jfl/backlog",
|
|
12
|
+
in_progress: "jfl/in-progress",
|
|
13
|
+
eval: "jfl/eval",
|
|
14
|
+
done: "jfl/done",
|
|
15
|
+
};
|
|
16
|
+
const LABEL_TO_COLUMN = {
|
|
17
|
+
"jfl/backlog": "backlog",
|
|
18
|
+
"jfl/in-progress": "in_progress",
|
|
19
|
+
"jfl/eval": "eval",
|
|
20
|
+
"jfl/done": "done",
|
|
21
|
+
};
|
|
22
|
+
function gh(args, cwd) {
|
|
23
|
+
try {
|
|
24
|
+
return execSync(`gh ${args}`, {
|
|
25
|
+
cwd,
|
|
26
|
+
encoding: "utf-8",
|
|
27
|
+
timeout: 15000,
|
|
28
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
29
|
+
}).trim();
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
throw new Error(`gh command failed: ${err.stderr || err.message}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function getRepo(projectRoot) {
|
|
36
|
+
try {
|
|
37
|
+
const remote = execSync("git remote get-url origin", {
|
|
38
|
+
cwd: projectRoot, encoding: "utf-8", timeout: 5000,
|
|
39
|
+
}).trim();
|
|
40
|
+
// Extract owner/repo from git URL
|
|
41
|
+
const match = remote.match(/github\.com[:/](.+?)(?:\.git)?$/);
|
|
42
|
+
return match ? match[1] : "";
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function parseIssue(issue) {
|
|
49
|
+
const labels = (issue.labels ?? []).map((l) => typeof l === "string" ? l : l.name);
|
|
50
|
+
// Determine column from labels
|
|
51
|
+
let column = "backlog";
|
|
52
|
+
for (const label of labels) {
|
|
53
|
+
if (LABEL_TO_COLUMN[label]) {
|
|
54
|
+
column = LABEL_TO_COLUMN[label];
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Extract scope
|
|
59
|
+
const scopeLabel = labels.find((l) => l.startsWith("scope:"));
|
|
60
|
+
const scope = scopeLabel ? scopeLabel.replace("scope:", "") : "";
|
|
61
|
+
// Extract source
|
|
62
|
+
const sourceLabel = labels.find((l) => l.startsWith("source:"));
|
|
63
|
+
const source = sourceLabel ? sourceLabel.replace("source:", "") : "human";
|
|
64
|
+
// Extract priority
|
|
65
|
+
let priority = 0;
|
|
66
|
+
if (labels.includes("priority:critical"))
|
|
67
|
+
priority = 9;
|
|
68
|
+
else if (labels.includes("priority:high"))
|
|
69
|
+
priority = 6;
|
|
70
|
+
else if (labels.includes("priority:low"))
|
|
71
|
+
priority = 2;
|
|
72
|
+
// Filter to user-facing labels (not jfl/ or scope: or source: or priority:)
|
|
73
|
+
const userLabels = labels.filter((l) => !l.startsWith("jfl/") && !l.startsWith("scope:") && !l.startsWith("source:") && !l.startsWith("priority:"));
|
|
74
|
+
// Extract agent from assignee
|
|
75
|
+
const assignee = issue.assignees?.[0]?.login ?? "";
|
|
76
|
+
// Parse links from body (metadata block)
|
|
77
|
+
const links = parseLinksFromBody(issue.body ?? "");
|
|
78
|
+
return {
|
|
79
|
+
id: `#${issue.number}`,
|
|
80
|
+
number: issue.number,
|
|
81
|
+
title: issue.title ?? "",
|
|
82
|
+
description: (issue.body ?? "").slice(0, 500),
|
|
83
|
+
column,
|
|
84
|
+
source,
|
|
85
|
+
agent: assignee,
|
|
86
|
+
priority,
|
|
87
|
+
score: null,
|
|
88
|
+
scope,
|
|
89
|
+
labels: userLabels,
|
|
90
|
+
createdAt: issue.createdAt ?? "",
|
|
91
|
+
updatedAt: issue.updatedAt ?? "",
|
|
92
|
+
url: issue.url ?? "",
|
|
93
|
+
links,
|
|
94
|
+
metadata: {},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function parseLinksFromBody(body) {
|
|
98
|
+
const links = {};
|
|
99
|
+
// Look for metadata block: <!-- jfl: ... -->
|
|
100
|
+
const metaMatch = body.match(/<!--\s*jfl:([\s\S]*?)-->/);
|
|
101
|
+
if (metaMatch) {
|
|
102
|
+
const meta = metaMatch[1];
|
|
103
|
+
const prMatch = meta.match(/pr:\s*(\d+)/);
|
|
104
|
+
if (prMatch)
|
|
105
|
+
links.pr = parseInt(prMatch[1]);
|
|
106
|
+
const evalMatch = meta.match(/eval:\s*(.+)/);
|
|
107
|
+
if (evalMatch)
|
|
108
|
+
links.eval = evalMatch[1].trim();
|
|
109
|
+
const journalMatch = meta.match(/journal:\s*(.+)/);
|
|
110
|
+
if (journalMatch)
|
|
111
|
+
links.journal = journalMatch[1].trim();
|
|
112
|
+
const violationMatch = meta.match(/violation:\s*(.+)/);
|
|
113
|
+
if (violationMatch)
|
|
114
|
+
links.violation = violationMatch[1].trim();
|
|
115
|
+
const sessionMatch = meta.match(/session:\s*(.+)/);
|
|
116
|
+
if (sessionMatch)
|
|
117
|
+
links.session = sessionMatch[1].trim();
|
|
118
|
+
}
|
|
119
|
+
// Also check for PR cross-references in body
|
|
120
|
+
const prRef = body.match(/(?:Closes|Fixes|Addresses)\s+#(\d+)/i);
|
|
121
|
+
if (prRef && !links.pr)
|
|
122
|
+
links.pr = parseInt(prRef[1]);
|
|
123
|
+
return links;
|
|
124
|
+
}
|
|
125
|
+
export class GitHubKanban {
|
|
126
|
+
projectRoot;
|
|
127
|
+
repo;
|
|
128
|
+
constructor(projectRoot) {
|
|
129
|
+
this.projectRoot = projectRoot;
|
|
130
|
+
this.repo = getRepo(projectRoot);
|
|
131
|
+
if (!this.repo) {
|
|
132
|
+
throw new Error("Could not determine GitHub repo from git remote");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** Fetch all kanban issues (any jfl/ label) */
|
|
136
|
+
async getCards(filter) {
|
|
137
|
+
// Build label filter
|
|
138
|
+
const labelFilters = [];
|
|
139
|
+
if (filter?.column) {
|
|
140
|
+
labelFilters.push(COLUMN_LABELS[filter.column]);
|
|
141
|
+
}
|
|
142
|
+
if (filter?.scope) {
|
|
143
|
+
labelFilters.push(`scope:${filter.scope}`);
|
|
144
|
+
}
|
|
145
|
+
if (filter?.source) {
|
|
146
|
+
labelFilters.push(`source:${filter.source}`);
|
|
147
|
+
}
|
|
148
|
+
// If no column filter, get all kanban issues (any jfl/ label)
|
|
149
|
+
let labelArg;
|
|
150
|
+
if (labelFilters.length > 0) {
|
|
151
|
+
labelArg = labelFilters.map(l => `--label "${l}"`).join(" ");
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
// Get issues with ANY jfl/ column label
|
|
155
|
+
// gh doesn't support OR on labels, so fetch each column separately
|
|
156
|
+
const allCards = [];
|
|
157
|
+
for (const col of Object.values(COLUMN_LABELS)) {
|
|
158
|
+
const scopeArg = filter?.scope ? `--label "scope:${filter.scope}"` : "";
|
|
159
|
+
const stateArg = col === "jfl/done" ? "--state closed" : "--state open";
|
|
160
|
+
const raw = gh(`issue list --repo ${this.repo} --label "${col}" ${scopeArg} ${stateArg} --limit 100 --json number,title,body,labels,assignees,createdAt,updatedAt,url,state`, this.projectRoot);
|
|
161
|
+
const issues = JSON.parse(raw || "[]");
|
|
162
|
+
allCards.push(...issues.map(parseIssue));
|
|
163
|
+
}
|
|
164
|
+
return allCards.sort((a, b) => b.priority - a.priority);
|
|
165
|
+
}
|
|
166
|
+
const raw = gh(`issue list --repo ${this.repo} ${labelArg} --state all --limit 100 --json number,title,body,labels,assignees,createdAt,updatedAt,url,state`, this.projectRoot);
|
|
167
|
+
return JSON.parse(raw || "[]").map(parseIssue).sort((a, b) => b.priority - a.priority);
|
|
168
|
+
}
|
|
169
|
+
/** Get board grouped by column */
|
|
170
|
+
async getBoard(filter) {
|
|
171
|
+
const cards = await this.getCards(filter);
|
|
172
|
+
const board = {
|
|
173
|
+
backlog: [], in_progress: [], eval: [], done: [],
|
|
174
|
+
};
|
|
175
|
+
for (const card of cards) {
|
|
176
|
+
board[card.column].push(card);
|
|
177
|
+
}
|
|
178
|
+
// Sort each column by priority desc
|
|
179
|
+
for (const col of Object.keys(board)) {
|
|
180
|
+
board[col].sort((a, b) => b.priority - a.priority);
|
|
181
|
+
}
|
|
182
|
+
return board;
|
|
183
|
+
}
|
|
184
|
+
/** Create a new kanban issue */
|
|
185
|
+
create(opts) {
|
|
186
|
+
const labels = ["jfl/backlog"];
|
|
187
|
+
// Scope
|
|
188
|
+
if (opts.scope) {
|
|
189
|
+
const valid = this.getValidScopes();
|
|
190
|
+
if (valid.length > 0 && !valid.includes(opts.scope)) {
|
|
191
|
+
throw new Error(`Invalid scope "${opts.scope}". Valid: ${valid.join(", ")}`);
|
|
192
|
+
}
|
|
193
|
+
labels.push(`scope:${opts.scope}`);
|
|
194
|
+
}
|
|
195
|
+
// Source
|
|
196
|
+
labels.push(`source:${opts.source ?? "human"}`);
|
|
197
|
+
// Priority
|
|
198
|
+
const p = opts.priority ?? 0;
|
|
199
|
+
if (p >= 8)
|
|
200
|
+
labels.push("priority:critical");
|
|
201
|
+
else if (p >= 5)
|
|
202
|
+
labels.push("priority:high");
|
|
203
|
+
else if (p >= 1)
|
|
204
|
+
labels.push("priority:low");
|
|
205
|
+
// User labels
|
|
206
|
+
if (opts.labels)
|
|
207
|
+
labels.push(...opts.labels);
|
|
208
|
+
// Build body with metadata block
|
|
209
|
+
let body = opts.description ?? "";
|
|
210
|
+
if (opts.links && Object.keys(opts.links).length > 0) {
|
|
211
|
+
body += `\n\n<!-- jfl:\n`;
|
|
212
|
+
for (const [k, v] of Object.entries(opts.links)) {
|
|
213
|
+
if (v !== undefined)
|
|
214
|
+
body += `${k}: ${v}\n`;
|
|
215
|
+
}
|
|
216
|
+
body += `-->`;
|
|
217
|
+
}
|
|
218
|
+
const labelArgs = labels.map(l => `--label "${l}"`).join(" ");
|
|
219
|
+
const assigneeArg = opts.agent ? `--assignee "${opts.agent}"` : "";
|
|
220
|
+
// Write body to temp file to avoid shell escaping issues
|
|
221
|
+
const tmpBody = join(this.projectRoot, ".jfl", ".kanban-body.tmp");
|
|
222
|
+
writeFileSync(tmpBody, body);
|
|
223
|
+
try {
|
|
224
|
+
const result = gh(`issue create --repo ${this.repo} --title "${opts.title.replace(/"/g, '\\"')}" --body-file "${tmpBody}" ${labelArgs} ${assigneeArg}`, this.projectRoot);
|
|
225
|
+
// gh issue create returns the URL
|
|
226
|
+
const numMatch = result.match(/\/issues\/(\d+)/);
|
|
227
|
+
return numMatch ? parseInt(numMatch[1]) : 0;
|
|
228
|
+
}
|
|
229
|
+
finally {
|
|
230
|
+
try {
|
|
231
|
+
unlinkSync(tmpBody);
|
|
232
|
+
}
|
|
233
|
+
catch { }
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/** Move a card to a different column */
|
|
237
|
+
move(issueNumber, column) {
|
|
238
|
+
// Remove all column labels, add the new one
|
|
239
|
+
const removeArgs = Object.values(COLUMN_LABELS)
|
|
240
|
+
.map(l => `--remove-label "${l}"`)
|
|
241
|
+
.join(" ");
|
|
242
|
+
const addArg = `--add-label "${COLUMN_LABELS[column]}"`;
|
|
243
|
+
// If moving to done, close the issue
|
|
244
|
+
const stateArg = column === "done" ? "--state closed" : "--state open";
|
|
245
|
+
gh(`issue edit ${issueNumber} --repo ${this.repo} ${removeArgs} ${addArg}`, this.projectRoot);
|
|
246
|
+
// Set state separately (close/reopen)
|
|
247
|
+
try {
|
|
248
|
+
gh(`issue edit ${issueNumber} --repo ${this.repo} ${stateArg}`, this.projectRoot);
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// State might already be correct
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** Pick a card (assign agent, move to in_progress) */
|
|
255
|
+
pick(issueNumber, agent) {
|
|
256
|
+
this.move(issueNumber, "in_progress");
|
|
257
|
+
gh(`issue edit ${issueNumber} --repo ${this.repo} --add-assignee "${agent}"`, this.projectRoot);
|
|
258
|
+
}
|
|
259
|
+
/** Get registered services from config */
|
|
260
|
+
getValidScopes() {
|
|
261
|
+
try {
|
|
262
|
+
const configPath = join(this.projectRoot, ".jfl", "config.json");
|
|
263
|
+
if (!existsSync(configPath))
|
|
264
|
+
return [];
|
|
265
|
+
const config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
266
|
+
return (config.registered_services ?? []).map((s) => s.name).filter(Boolean);
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
return [];
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/** Get workspace info */
|
|
273
|
+
getWorkspaceInfo() {
|
|
274
|
+
try {
|
|
275
|
+
const configPath = join(this.projectRoot, ".jfl", "config.json");
|
|
276
|
+
if (!existsSync(configPath))
|
|
277
|
+
return { name: "", type: "standalone", repo: this.repo };
|
|
278
|
+
const config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
279
|
+
return { name: config.name ?? "", type: config.type ?? "standalone", repo: this.repo };
|
|
280
|
+
}
|
|
281
|
+
catch {
|
|
282
|
+
return { name: "", type: "standalone", repo: this.repo };
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/** Get registered services */
|
|
286
|
+
getRegisteredServices() {
|
|
287
|
+
try {
|
|
288
|
+
const configPath = join(this.projectRoot, ".jfl", "config.json");
|
|
289
|
+
if (!existsSync(configPath))
|
|
290
|
+
return [];
|
|
291
|
+
const config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
292
|
+
return (config.registered_services ?? []).map((s) => ({
|
|
293
|
+
name: s.name ?? "", path: s.path ?? "", type: s.type ?? "",
|
|
294
|
+
}));
|
|
295
|
+
}
|
|
296
|
+
catch {
|
|
297
|
+
return [];
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/** Bootstrap labels on a repo */
|
|
301
|
+
static bootstrap(repo) {
|
|
302
|
+
const labels = [
|
|
303
|
+
{ name: "jfl/backlog", color: "333333", desc: "Kanban: backlog" },
|
|
304
|
+
{ name: "jfl/in-progress", color: "FBCA04", desc: "Kanban: in progress" },
|
|
305
|
+
{ name: "jfl/eval", color: "D93F0B", desc: "Kanban: in review/eval" },
|
|
306
|
+
{ name: "jfl/done", color: "2DA44E", desc: "Kanban: done" },
|
|
307
|
+
];
|
|
308
|
+
for (const l of labels) {
|
|
309
|
+
try {
|
|
310
|
+
execSync(`gh label create "${l.name}" --repo ${repo} --color ${l.color} --description "${l.desc}" --force`, {
|
|
311
|
+
encoding: "utf-8", timeout: 10000,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
catch { }
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
//# sourceMappingURL=kanban-github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban-github.js","sourceRoot":"","sources":["../../src/lib/kanban-github.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,aAAa,GAA2B;IAC5C,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;CACjB,CAAA;AAED,MAAM,eAAe,GAA2B;IAC9C,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,aAAa;IAChC,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,MAAM;CACnB,CAAA;AA6BD,SAAS,EAAE,CAAC,IAAY,EAAE,GAAY;IACpC,IAAI,CAAC;QACH,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AC;CACF"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanban — append-only event log for task board state
|
|
3
|
+
*
|
|
4
|
+
* Unix philosophy: .jfl/kanban.jsonl is the source of truth.
|
|
5
|
+
* Everything else (CLI, dashboard, API) is a view.
|
|
6
|
+
*
|
|
7
|
+
* @purpose Kanban data layer — create, move, pick, list cards
|
|
8
|
+
*/
|
|
9
|
+
export interface KanbanEvent {
|
|
10
|
+
ts: string;
|
|
11
|
+
action: "create" | "move" | "pick" | "done" | "archive" | "update";
|
|
12
|
+
id: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
column?: string;
|
|
16
|
+
source?: "human" | "agent" | "setup" | "verify" | "findings";
|
|
17
|
+
agent?: string;
|
|
18
|
+
priority?: number;
|
|
19
|
+
score?: number;
|
|
20
|
+
scope?: string;
|
|
21
|
+
labels?: string[];
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
export interface KanbanCard {
|
|
25
|
+
id: string;
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
column: string;
|
|
29
|
+
source: string;
|
|
30
|
+
agent: string;
|
|
31
|
+
priority: number;
|
|
32
|
+
score: number | null;
|
|
33
|
+
scope: string;
|
|
34
|
+
labels: string[];
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
metadata: Record<string, unknown>;
|
|
38
|
+
links: {
|
|
39
|
+
journal?: string;
|
|
40
|
+
eval?: string;
|
|
41
|
+
pr?: number;
|
|
42
|
+
pr_url?: string;
|
|
43
|
+
violation?: string;
|
|
44
|
+
session?: string;
|
|
45
|
+
docs?: string[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export type Column = "backlog" | "in_progress" | "eval" | "done" | "archived";
|
|
49
|
+
export declare class Kanban {
|
|
50
|
+
private logPath;
|
|
51
|
+
private projectRoot;
|
|
52
|
+
constructor(projectRoot: string);
|
|
53
|
+
private append;
|
|
54
|
+
private readEvents;
|
|
55
|
+
/** Replay events to get current card state */
|
|
56
|
+
getCards(): KanbanCard[];
|
|
57
|
+
/** Get cards, optionally filtered by scope or label */
|
|
58
|
+
getFiltered(opts?: {
|
|
59
|
+
scope?: string;
|
|
60
|
+
label?: string;
|
|
61
|
+
source?: string;
|
|
62
|
+
}): KanbanCard[];
|
|
63
|
+
/** Get cards grouped by column */
|
|
64
|
+
getBoard(filter?: {
|
|
65
|
+
scope?: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
source?: string;
|
|
68
|
+
}): Record<Column, KanbanCard[]>;
|
|
69
|
+
/** Create a new card */
|
|
70
|
+
create(opts: {
|
|
71
|
+
title: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
source?: KanbanEvent["source"];
|
|
74
|
+
agent?: string;
|
|
75
|
+
priority?: number;
|
|
76
|
+
scope?: string;
|
|
77
|
+
labels?: string[];
|
|
78
|
+
metadata?: Record<string, unknown>;
|
|
79
|
+
}): string;
|
|
80
|
+
/** Get the default scope from .jfl/config.json */
|
|
81
|
+
private getDefaultScope;
|
|
82
|
+
/** Read the workspace config (.jfl/config.json) */
|
|
83
|
+
private readConfig;
|
|
84
|
+
/** Get registered services from config (the source of truth for scopes) */
|
|
85
|
+
getRegisteredServices(): Array<{
|
|
86
|
+
name: string;
|
|
87
|
+
path: string;
|
|
88
|
+
type: string;
|
|
89
|
+
}>;
|
|
90
|
+
/** Get registered agents from config */
|
|
91
|
+
getRegisteredAgents(): Array<{
|
|
92
|
+
id: string;
|
|
93
|
+
runtime: string;
|
|
94
|
+
}>;
|
|
95
|
+
/** Get workspace type and name */
|
|
96
|
+
getWorkspaceInfo(): {
|
|
97
|
+
name: string;
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
/** Valid scopes = registered service names */
|
|
101
|
+
getValidScopes(): string[];
|
|
102
|
+
/** Validate scope against registered services */
|
|
103
|
+
isValidScope(scope: string): boolean;
|
|
104
|
+
/** Move a card to a column */
|
|
105
|
+
move(id: string, column: Column, opts?: {
|
|
106
|
+
agent?: string;
|
|
107
|
+
score?: number;
|
|
108
|
+
}): void;
|
|
109
|
+
/** Agent picks top card from backlog */
|
|
110
|
+
pick(agentName?: string): KanbanCard | null;
|
|
111
|
+
/** Mark card done */
|
|
112
|
+
done(id: string, opts?: {
|
|
113
|
+
score?: number;
|
|
114
|
+
agent?: string;
|
|
115
|
+
}): void;
|
|
116
|
+
/** Import cards from jfl setup recommendations or verify violations */
|
|
117
|
+
importFromSetup(recommendations: Array<{
|
|
118
|
+
name: string;
|
|
119
|
+
rationale: string;
|
|
120
|
+
confidence: number;
|
|
121
|
+
}>): string[];
|
|
122
|
+
importFromViolations(violations: Array<{
|
|
123
|
+
invariant: string;
|
|
124
|
+
trace: string;
|
|
125
|
+
}>): string[];
|
|
126
|
+
/** Get log path for piping */
|
|
127
|
+
get path(): string;
|
|
128
|
+
/** Get column names */
|
|
129
|
+
static get columns(): Column[];
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=kanban.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban.d.ts","sourceRoot":"","sources":["../../src/lib/kanban.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA6BH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;IAClE,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAA;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM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