claude-kan 1.0.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/LICENSE +21 -0
- package/README.md +136 -0
- package/dist/cli/index.d.ts +11 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +70 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +5 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +206 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +299 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/card.d.ts +29 -0
- package/dist/core/card.d.ts.map +1 -0
- package/dist/core/card.js +188 -0
- package/dist/core/card.js.map +1 -0
- package/dist/core/conflict.d.ts +13 -0
- package/dist/core/conflict.d.ts.map +1 -0
- package/dist/core/conflict.js +85 -0
- package/dist/core/conflict.js.map +1 -0
- package/dist/core/kanban.d.ts +22 -0
- package/dist/core/kanban.d.ts.map +1 -0
- package/dist/core/kanban.js +53 -0
- package/dist/core/kanban.js.map +1 -0
- package/dist/core/session.d.ts +21 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +115 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/types.d.ts +50 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +6 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/skills/kanboard.d.ts +8 -0
- package/dist/skills/kanboard.d.ts.map +1 -0
- package/dist/skills/kanboard.js +118 -0
- package/dist/skills/kanboard.js.map +1 -0
- package/dist/skills/kanboardfull.d.ts +7 -0
- package/dist/skills/kanboardfull.d.ts.map +1 -0
- package/dist/skills/kanboardfull.js +137 -0
- package/dist/skills/kanboardfull.js.map +1 -0
- package/dist/skills/kanboardweb.d.ts +11 -0
- package/dist/skills/kanboardweb.d.ts.map +1 -0
- package/dist/skills/kanboardweb.js +489 -0
- package/dist/skills/kanboardweb.js.map +1 -0
- package/dist/skills/kancard.d.ts +10 -0
- package/dist/skills/kancard.d.ts.map +1 -0
- package/dist/skills/kancard.js +169 -0
- package/dist/skills/kancard.js.map +1 -0
- package/dist/skills/kancreate.d.ts +6 -0
- package/dist/skills/kancreate.d.ts.map +1 -0
- package/dist/skills/kancreate.js +60 -0
- package/dist/skills/kancreate.js.map +1 -0
- package/dist/skills/kandoctor.d.ts +17 -0
- package/dist/skills/kandoctor.d.ts.map +1 -0
- package/dist/skills/kandoctor.js +401 -0
- package/dist/skills/kandoctor.js.map +1 -0
- package/dist/skills/kanhelp.d.ts +7 -0
- package/dist/skills/kanhelp.d.ts.map +1 -0
- package/dist/skills/kanhelp.js +194 -0
- package/dist/skills/kanhelp.js.map +1 -0
- package/dist/skills/kanprune.d.ts +11 -0
- package/dist/skills/kanprune.d.ts.map +1 -0
- package/dist/skills/kanprune.js +131 -0
- package/dist/skills/kanprune.js.map +1 -0
- package/dist/skills/kansync.d.ts +7 -0
- package/dist/skills/kansync.d.ts.map +1 -0
- package/dist/skills/kansync.js +41 -0
- package/dist/skills/kansync.js.map +1 -0
- package/dist/skills/kanupdate.d.ts +6 -0
- package/dist/skills/kanupdate.d.ts.map +1 -0
- package/dist/skills/kanupdate.js +74 -0
- package/dist/skills/kanupdate.js.map +1 -0
- package/dist/skills/session-debug.d.ts +6 -0
- package/dist/skills/session-debug.d.ts.map +1 -0
- package/dist/skills/session-debug.js +124 -0
- package/dist/skills/session-debug.js.map +1 -0
- package/dist/templates/skill-templates/kanboard/SKILL.md +26 -0
- package/dist/templates/skill-templates/kanboardfull/SKILL.md +28 -0
- package/dist/templates/skill-templates/kanboardweb/SKILL.md +137 -0
- package/dist/templates/skill-templates/kancard/SKILL.md +70 -0
- package/dist/templates/skill-templates/kancreate/SKILL.md +45 -0
- package/dist/templates/skill-templates/kandoctor/SKILL.md +58 -0
- package/dist/templates/skill-templates/kanhelp/SKILL.md +34 -0
- package/dist/templates/skill-templates/kanprune/SKILL.md +102 -0
- package/dist/templates/skill-templates/kansync/SKILL.md +21 -0
- package/dist/templates/skill-templates/kanupdate/SKILL.md +44 -0
- package/dist/templates/skill-templates/session-debug/SKILL.md +25 -0
- package/package.json +50 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanban board operations and display
|
|
3
|
+
*/
|
|
4
|
+
import { KanbanStatus } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Get all cards organized by status
|
|
7
|
+
*/
|
|
8
|
+
export declare function getKanbanBoard(): Record<KanbanStatus, Array<{
|
|
9
|
+
path: string;
|
|
10
|
+
title: string;
|
|
11
|
+
session: string;
|
|
12
|
+
taskId?: string;
|
|
13
|
+
}>>;
|
|
14
|
+
/**
|
|
15
|
+
* Sync the Kanban board with current state
|
|
16
|
+
* This can be called manually via the /kansync skill
|
|
17
|
+
*/
|
|
18
|
+
export declare function syncKanban(): {
|
|
19
|
+
synced: number;
|
|
20
|
+
errors: string[];
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=kanban.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban.d.ts","sourceRoot":"","sources":["../../src/core/kanban.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAqB/H;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAkBjE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Kanban board operations and display
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getKanbanBoard = getKanbanBoard;
|
|
7
|
+
exports.syncKanban = syncKanban;
|
|
8
|
+
const card_1 = require("./card");
|
|
9
|
+
/**
|
|
10
|
+
* Get all cards organized by status
|
|
11
|
+
*/
|
|
12
|
+
function getKanbanBoard() {
|
|
13
|
+
const statuses = ['pending', 'in_progress', 'completed', 'parkinglot', 'deleted'];
|
|
14
|
+
const board = {
|
|
15
|
+
pending: [],
|
|
16
|
+
in_progress: [],
|
|
17
|
+
completed: [],
|
|
18
|
+
parkinglot: [],
|
|
19
|
+
deleted: []
|
|
20
|
+
};
|
|
21
|
+
for (const status of statuses) {
|
|
22
|
+
const cards = (0, card_1.getCardsByStatus)(status);
|
|
23
|
+
board[status] = cards.map(({ path, card }) => ({
|
|
24
|
+
path,
|
|
25
|
+
title: card.subject,
|
|
26
|
+
session: card.session,
|
|
27
|
+
taskId: card.taskId
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
return board;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sync the Kanban board with current state
|
|
34
|
+
* This can be called manually via the /kansync skill
|
|
35
|
+
*/
|
|
36
|
+
function syncKanban() {
|
|
37
|
+
const errors = [];
|
|
38
|
+
let synced = 0;
|
|
39
|
+
try {
|
|
40
|
+
// Get current board state
|
|
41
|
+
const board = getKanbanBoard();
|
|
42
|
+
// Count total cards
|
|
43
|
+
const totalCards = Object.values(board).reduce((sum, cards) => sum + cards.length, 0);
|
|
44
|
+
synced = totalCards;
|
|
45
|
+
return { synced, errors };
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
49
|
+
errors.push(message);
|
|
50
|
+
return { synced, errors };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=kanban.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban.js","sourceRoot":"","sources":["../../src/core/kanban.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAQH,wCAqBC;AAMD,gCAkBC;AAlDD,iCAA0C;AAE1C;;GAEG;AACH,SAAgB,cAAc;IAC5B,MAAM,QAAQ,GAAmB,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IAClG,MAAM,KAAK,GAAmG;QAC5G,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAA,uBAAgB,EAAC,MAAM,CAAC,CAAC;QACvC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YAC7C,IAAI;YACJ,KAAK,EAAE,IAAI,CAAC,OAAO;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,CAAC;IACN,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAgB,UAAU;IACxB,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,CAAC;QACH,0BAA0B;QAC1B,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;QAE/B,oBAAoB;QACpB,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACtF,MAAM,GAAG,UAAU,CAAC;QAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session tracking utilities
|
|
3
|
+
*/
|
|
4
|
+
import { TodoIndexMetadata } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Get the current Claude Code session ID
|
|
7
|
+
* Tries multiple sources in priority order:
|
|
8
|
+
* 1. Environment variable CLAUDE_SESSION_ID
|
|
9
|
+
* 2. Most recently modified session file in Claude Code's project directory
|
|
10
|
+
* 3. Fallback to 'unknown'
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSessionId(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Update the todo.md index file with task reference and session info
|
|
15
|
+
*/
|
|
16
|
+
export declare function updateTodoIndex(taskFile: string, sessionId: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Get session info from todo.md
|
|
19
|
+
*/
|
|
20
|
+
export declare function getSessionInfo(): TodoIndexMetadata | null;
|
|
21
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/core/session.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAsCrC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAiDzE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,GAAG,IAAI,CAezD"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Session tracking utilities
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getSessionId = getSessionId;
|
|
10
|
+
exports.updateTodoIndex = updateTodoIndex;
|
|
11
|
+
exports.getSessionInfo = getSessionInfo;
|
|
12
|
+
const fs_1 = __importDefault(require("fs"));
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
|
+
const yaml_1 = __importDefault(require("yaml"));
|
|
15
|
+
/**
|
|
16
|
+
* Get the current Claude Code session ID
|
|
17
|
+
* Tries multiple sources in priority order:
|
|
18
|
+
* 1. Environment variable CLAUDE_SESSION_ID
|
|
19
|
+
* 2. Most recently modified session file in Claude Code's project directory
|
|
20
|
+
* 3. Fallback to 'unknown'
|
|
21
|
+
*/
|
|
22
|
+
function getSessionId() {
|
|
23
|
+
// Try environment variable first
|
|
24
|
+
if (process.env.CLAUDE_SESSION_ID) {
|
|
25
|
+
return process.env.CLAUDE_SESSION_ID;
|
|
26
|
+
}
|
|
27
|
+
// Try to find current session from Claude Code's files
|
|
28
|
+
try {
|
|
29
|
+
const projectPath = process.cwd();
|
|
30
|
+
const sanitizedPath = projectPath.replace(/\//g, '-').substring(1);
|
|
31
|
+
const sessionsDir = path_1.default.join(process.env.HOME || '~', '.claude/projects', `-${sanitizedPath}`);
|
|
32
|
+
if (fs_1.default.existsSync(sessionsDir)) {
|
|
33
|
+
// Find the most recently modified .jsonl file
|
|
34
|
+
const files = fs_1.default.readdirSync(sessionsDir)
|
|
35
|
+
.filter(f => f.endsWith('.jsonl'))
|
|
36
|
+
.map(f => ({
|
|
37
|
+
name: f,
|
|
38
|
+
path: path_1.default.join(sessionsDir, f),
|
|
39
|
+
mtime: fs_1.default.statSync(path_1.default.join(sessionsDir, f)).mtime.getTime()
|
|
40
|
+
}))
|
|
41
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
42
|
+
if (files.length > 0) {
|
|
43
|
+
// Extract session ID from filename (remove .jsonl extension)
|
|
44
|
+
const sessionId = files[0].name.replace('.jsonl', '');
|
|
45
|
+
return sessionId;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
// If we can't determine session, fall through to default
|
|
51
|
+
}
|
|
52
|
+
return 'unknown';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Update the todo.md index file with task reference and session info
|
|
56
|
+
*/
|
|
57
|
+
function updateTodoIndex(taskFile, sessionId) {
|
|
58
|
+
const todoPath = 'docs/tasks/todo.md';
|
|
59
|
+
if (!fs_1.default.existsSync(todoPath)) {
|
|
60
|
+
throw new Error(`todo.md not found at ${todoPath}`);
|
|
61
|
+
}
|
|
62
|
+
let content = fs_1.default.readFileSync(todoPath, 'utf-8');
|
|
63
|
+
// Parse existing frontmatter
|
|
64
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
65
|
+
let frontmatter;
|
|
66
|
+
if (frontmatterMatch) {
|
|
67
|
+
const parsed = yaml_1.default.parse(frontmatterMatch[1]);
|
|
68
|
+
frontmatter = {
|
|
69
|
+
lastSession: parsed.currentSession || null,
|
|
70
|
+
currentSession: sessionId,
|
|
71
|
+
updatedAt: new Date().toISOString()
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
// No frontmatter exists, create new
|
|
76
|
+
frontmatter = {
|
|
77
|
+
lastSession: null,
|
|
78
|
+
currentSession: sessionId,
|
|
79
|
+
updatedAt: new Date().toISOString()
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// Create task reference
|
|
83
|
+
const relativePath = path_1.default.relative('docs/tasks', taskFile);
|
|
84
|
+
const taskEntry = `- [ ] ${relativePath} (Session: ${sessionId.slice(0, 8)})`;
|
|
85
|
+
// Reconstruct content
|
|
86
|
+
const newFrontmatter = `---\n${yaml_1.default.stringify(frontmatter)}---\n`;
|
|
87
|
+
// Extract body (everything after frontmatter, or entire content if no frontmatter)
|
|
88
|
+
let body;
|
|
89
|
+
if (frontmatterMatch) {
|
|
90
|
+
const bodyMatch = content.match(/---\n[\s\S]*?\n---\n([\s\S]*)/);
|
|
91
|
+
body = bodyMatch ? bodyMatch[1] : '';
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
body = content;
|
|
95
|
+
}
|
|
96
|
+
// Append task entry to body
|
|
97
|
+
const updatedContent = newFrontmatter + body.trim() + '\n\n' + taskEntry + '\n';
|
|
98
|
+
fs_1.default.writeFileSync(todoPath, updatedContent);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get session info from todo.md
|
|
102
|
+
*/
|
|
103
|
+
function getSessionInfo() {
|
|
104
|
+
const todoPath = 'docs/tasks/todo.md';
|
|
105
|
+
if (!fs_1.default.existsSync(todoPath)) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
const content = fs_1.default.readFileSync(todoPath, 'utf-8');
|
|
109
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
110
|
+
if (!frontmatterMatch) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return yaml_1.default.parse(frontmatterMatch[1]);
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","s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,OAAO,cAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAsB,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core TypeScript types for the Kanban system
|
|
3
|
+
*/
|
|
4
|
+
export type KanbanStatus = 'pending' | 'in_progress' | 'completed' | 'parkinglot' | 'deleted';
|
|
5
|
+
export interface TaskCard {
|
|
6
|
+
session: string;
|
|
7
|
+
status: KanbanStatus;
|
|
8
|
+
created: string;
|
|
9
|
+
updated: string;
|
|
10
|
+
taskId?: string;
|
|
11
|
+
subject: string;
|
|
12
|
+
description: string;
|
|
13
|
+
steps: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ProjectAnalysis {
|
|
16
|
+
hasTasksDir: boolean;
|
|
17
|
+
hasTodoMd: boolean;
|
|
18
|
+
hasLessonsMd: boolean;
|
|
19
|
+
isGitRepo: boolean;
|
|
20
|
+
hasClaudeDir: boolean;
|
|
21
|
+
projectRoot: string;
|
|
22
|
+
}
|
|
23
|
+
export interface Conflict {
|
|
24
|
+
file: string;
|
|
25
|
+
message: string;
|
|
26
|
+
resolution: string;
|
|
27
|
+
severity: 'warning' | 'error';
|
|
28
|
+
}
|
|
29
|
+
export interface TodoIndexMetadata {
|
|
30
|
+
lastSession: string | null;
|
|
31
|
+
currentSession: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
}
|
|
34
|
+
export interface HookInput {
|
|
35
|
+
toolName: string;
|
|
36
|
+
toolInput: {
|
|
37
|
+
subject?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
taskId?: string;
|
|
40
|
+
status?: 'pending' | 'in_progress' | 'completed' | 'deleted';
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
toolOutput?: any;
|
|
44
|
+
}
|
|
45
|
+
export interface HookOutput {
|
|
46
|
+
decision?: 'proceed' | 'block' | 'ask';
|
|
47
|
+
additionalContext?: string;
|
|
48
|
+
systemMessage?: string;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,CAAC;AAE9F,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;QAC7D,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @findependence/claude-kanban
|
|
3
|
+
*
|
|
4
|
+
* Persistent Kanban system for Claude Code tasks
|
|
5
|
+
* Integrates with Claude Code's native TaskCreate/TaskUpdate tools
|
|
6
|
+
*/
|
|
7
|
+
export * from './core/types';
|
|
8
|
+
export * from './core/session';
|
|
9
|
+
export * from './core/card';
|
|
10
|
+
export * from './core/kanban';
|
|
11
|
+
export * from './core/conflict';
|
|
12
|
+
export * from './skills/kanboard';
|
|
13
|
+
export * from './skills/kansync';
|
|
14
|
+
export * from './skills/kanhelp';
|
|
15
|
+
export * from './skills/kandoctor';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @findependence/claude-kanban
|
|
4
|
+
*
|
|
5
|
+
* Persistent Kanban system for Claude Code tasks
|
|
6
|
+
* Integrates with Claude Code's native TaskCreate/TaskUpdate tools
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./core/types"), exports);
|
|
24
|
+
__exportStar(require("./core/session"), exports);
|
|
25
|
+
__exportStar(require("./core/card"), exports);
|
|
26
|
+
__exportStar(require("./core/kanban"), exports);
|
|
27
|
+
__exportStar(require("./core/conflict"), exports);
|
|
28
|
+
__exportStar(require("./skills/kanboard"), exports);
|
|
29
|
+
__exportStar(require("./skills/kansync"), exports);
|
|
30
|
+
__exportStar(require("./skills/kanhelp"), exports);
|
|
31
|
+
__exportStar(require("./skills/kandoctor"), exports);
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,iDAA+B;AAC/B,8CAA4B;AAC5B,gDAA8B;AAC9B,kDAAgC;AAChC,oDAAkC;AAClC,mDAAiC;AACjC,mDAAiC;AACjC,qDAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanboard.d.ts","sourceRoot":"","sources":["../../src/skills/kanboard.ts"],"names":[],"mappings":";AACA;;;GAGG;AAkBH,iBAAS,aAAa,SAwGrB;AAOD,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Kanboard skill - Display text-based Kanban board
|
|
5
|
+
* Compact, information-dense design
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.displayKanban = displayKanban;
|
|
9
|
+
const kanban_1 = require("../core/kanban");
|
|
10
|
+
// ANSI styling - extended palette
|
|
11
|
+
const colors = {
|
|
12
|
+
yellow: (text) => `\x1b[33m${text}\x1b[0m`,
|
|
13
|
+
blue: (text) => `\x1b[34m${text}\x1b[0m`,
|
|
14
|
+
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
15
|
+
gray: (text) => `\x1b[90m${text}\x1b[0m`,
|
|
16
|
+
cyan: (text) => `\x1b[36m${text}\x1b[0m`,
|
|
17
|
+
magenta: (text) => `\x1b[35m${text}\x1b[0m`,
|
|
18
|
+
red: (text) => `\x1b[31m${text}\x1b[0m`,
|
|
19
|
+
bold: (text) => `\x1b[1m${text}\x1b[0m`,
|
|
20
|
+
dim: (text) => `\x1b[2m${text}\x1b[0m`,
|
|
21
|
+
inverse: (text) => `\x1b[7m${text}\x1b[0m`
|
|
22
|
+
};
|
|
23
|
+
function displayKanban() {
|
|
24
|
+
try {
|
|
25
|
+
const board = (0, kanban_1.getKanbanBoard)();
|
|
26
|
+
// Count cards
|
|
27
|
+
const counts = {
|
|
28
|
+
pending: board.pending.length,
|
|
29
|
+
in_progress: board.in_progress.length,
|
|
30
|
+
completed: board.completed.length,
|
|
31
|
+
parkinglot: board.parkinglot.length,
|
|
32
|
+
deleted: board.deleted.length
|
|
33
|
+
};
|
|
34
|
+
const total = Object.values(counts).reduce((a, b) => a + b, 0);
|
|
35
|
+
// Header with counts - single line
|
|
36
|
+
console.log(colors.bold(colors.cyan('┌─ KANBAN ')) +
|
|
37
|
+
colors.dim('│ ') +
|
|
38
|
+
colors.yellow(`⏳${counts.pending}`) + colors.dim(' │ ') +
|
|
39
|
+
colors.blue(`▶${counts.in_progress}`) + colors.dim(' │ ') +
|
|
40
|
+
colors.green(`✓${counts.completed}`) + colors.dim(' │ ') +
|
|
41
|
+
colors.gray(`◼${counts.parkinglot}`) + colors.dim(' │ ') +
|
|
42
|
+
colors.red(`✗${counts.deleted}`) + colors.dim(' │ ') +
|
|
43
|
+
colors.dim(`Σ${total}`));
|
|
44
|
+
// Only show columns that have cards
|
|
45
|
+
const activeColumns = [];
|
|
46
|
+
if (counts.pending > 0) {
|
|
47
|
+
activeColumns.push({
|
|
48
|
+
name: 'PENDING',
|
|
49
|
+
symbol: '⏳',
|
|
50
|
+
color: colors.yellow,
|
|
51
|
+
cards: board.pending
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (counts.in_progress > 0) {
|
|
55
|
+
activeColumns.push({
|
|
56
|
+
name: 'IN PROGRESS',
|
|
57
|
+
symbol: '▶',
|
|
58
|
+
color: colors.blue,
|
|
59
|
+
cards: board.in_progress
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (counts.completed > 0) {
|
|
63
|
+
activeColumns.push({
|
|
64
|
+
name: 'COMPLETED',
|
|
65
|
+
symbol: '✓',
|
|
66
|
+
color: colors.green,
|
|
67
|
+
cards: board.completed
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (counts.parkinglot > 0) {
|
|
71
|
+
activeColumns.push({
|
|
72
|
+
name: 'PARKING LOT',
|
|
73
|
+
symbol: '◼',
|
|
74
|
+
color: colors.gray,
|
|
75
|
+
cards: board.parkinglot
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (counts.deleted > 0) {
|
|
79
|
+
activeColumns.push({
|
|
80
|
+
name: 'DELETED',
|
|
81
|
+
symbol: '✗',
|
|
82
|
+
color: colors.red,
|
|
83
|
+
cards: board.deleted
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (total === 0) {
|
|
87
|
+
console.log(colors.dim('└─ No cards yet. Use /kancreate to add tasks.\n'));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
// Display each active column compactly
|
|
91
|
+
activeColumns.forEach((col, idx) => {
|
|
92
|
+
const isLast = idx === activeColumns.length - 1;
|
|
93
|
+
const prefix = isLast ? '└─' : '├─';
|
|
94
|
+
console.log(colors.dim(prefix) + ' ' +
|
|
95
|
+
col.color(colors.bold(col.symbol + ' ' + col.name)) +
|
|
96
|
+
colors.dim(` (${col.cards.length})`));
|
|
97
|
+
col.cards.forEach((card, cardIdx) => {
|
|
98
|
+
const isLastCard = cardIdx === col.cards.length - 1;
|
|
99
|
+
const cardPrefix = isLast
|
|
100
|
+
? (isLastCard ? ' └─' : ' ├─')
|
|
101
|
+
: (isLastCard ? '│ └─' : '│ ├─');
|
|
102
|
+
const sessionTag = colors.dim(`[${card.session.slice(0, 8)}]`);
|
|
103
|
+
console.log(colors.dim(cardPrefix) + ' ' + card.title + ' ' + sessionTag);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
console.log(''); // Final newline
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
110
|
+
console.error('Error displaying Kanban board:', message);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Run if executed directly
|
|
115
|
+
if (require.main === module) {
|
|
116
|
+
displayKanban();
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=kanboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanboard.js","sourceRoot":"","sources":["../../src/skills/kanboard.ts"],"names":[],"mappings":";;AACA;;;GAGG;;AAiIM,sCAAa;AA/HtB,2CAAgD;AAEhD,kCAAkC;AAClC,MAAM,MAAM,GAAG;IACb,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAClD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAChD,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IACjD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAChD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAChD,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IACnD,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS;IAC/C,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,IAAI,SAAS;IAC/C,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,IAAI,SAAS;IAC9C,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,IAAI,SAAS;CACnD,CAAC;AAEF,SAAS,aAAa;IACpB,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAA,uBAAc,GAAE,CAAC;QAE/B,cAAc;QACd,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;YAC7B,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM;YACrC,SAA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AC,EAAE,CAAC,CAAC,CAAC,gBAAgB;IAEnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,2BAA2B;AAC3B,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,aAAa,EAAE,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanboardfull.d.ts","sourceRoot":"","sources":["../../src/skills/kanboardfull.ts"],"names":[],"mappings":";AACA;;GAEG;AAgBH,iBAAS,iBAAiB,SAkIzB;AAOD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Kanboardfull skill - Display full Kanban board with all columns
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.displayKanbanFull = displayKanbanFull;
|
|
8
|
+
const kanban_1 = require("../core/kanban");
|
|
9
|
+
// ANSI styling
|
|
10
|
+
const colors = {
|
|
11
|
+
yellow: (text) => `\x1b[33m${text}\x1b[0m`,
|
|
12
|
+
blue: (text) => `\x1b[34m${text}\x1b[0m`,
|
|
13
|
+
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
14
|
+
gray: (text) => `\x1b[90m${text}\x1b[0m`,
|
|
15
|
+
cyan: (text) => `\x1b[36m${text}\x1b[0m`,
|
|
16
|
+
red: (text) => `\x1b[31m${text}\x1b[0m`,
|
|
17
|
+
bold: (text) => `\x1b[1m${text}\x1b[0m`,
|
|
18
|
+
dim: (text) => `\x1b[2m${text}\x1b[0m`
|
|
19
|
+
};
|
|
20
|
+
function displayKanbanFull() {
|
|
21
|
+
try {
|
|
22
|
+
const board = (0, kanban_1.getKanbanBoard)();
|
|
23
|
+
// Count cards
|
|
24
|
+
const counts = {
|
|
25
|
+
pending: board.pending.length,
|
|
26
|
+
in_progress: board.in_progress.length,
|
|
27
|
+
completed: board.completed.length,
|
|
28
|
+
parkinglot: board.parkinglot.length,
|
|
29
|
+
deleted: board.deleted.length
|
|
30
|
+
};
|
|
31
|
+
const total = Object.values(counts).reduce((a, b) => a + b, 0);
|
|
32
|
+
// Header with full metrics
|
|
33
|
+
console.log(colors.bold(colors.cyan('┌─ KANBAN BOARD [FULL VIEW]')));
|
|
34
|
+
console.log(colors.dim('├─ ') +
|
|
35
|
+
colors.yellow(`PENDING: ${counts.pending}`) + colors.dim(' │ ') +
|
|
36
|
+
colors.blue(`IN PROGRESS: ${counts.in_progress}`) + colors.dim(' │ ') +
|
|
37
|
+
colors.green(`COMPLETED: ${counts.completed}`) + colors.dim(' │ ') +
|
|
38
|
+
colors.gray(`PARKING LOT: ${counts.parkinglot}`) + colors.dim(' │ ') +
|
|
39
|
+
colors.red(`DELETED: ${counts.deleted}`));
|
|
40
|
+
console.log(colors.dim('├─ ') + colors.bold(`Total Cards: ${total}`));
|
|
41
|
+
console.log(colors.dim('│'));
|
|
42
|
+
// Always show all columns
|
|
43
|
+
const allColumns = [
|
|
44
|
+
{
|
|
45
|
+
name: 'PENDING',
|
|
46
|
+
symbol: '⏳',
|
|
47
|
+
color: colors.yellow,
|
|
48
|
+
cards: board.pending
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'IN PROGRESS',
|
|
52
|
+
symbol: '▶',
|
|
53
|
+
color: colors.blue,
|
|
54
|
+
cards: board.in_progress
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'COMPLETED',
|
|
58
|
+
symbol: '✓',
|
|
59
|
+
color: colors.green,
|
|
60
|
+
cards: board.completed
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'PARKING LOT',
|
|
64
|
+
symbol: '◼',
|
|
65
|
+
color: colors.gray,
|
|
66
|
+
cards: board.parkinglot
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'DELETED',
|
|
70
|
+
symbol: '✗',
|
|
71
|
+
color: colors.red,
|
|
72
|
+
cards: board.deleted
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
// Display each column
|
|
76
|
+
allColumns.forEach((col, idx) => {
|
|
77
|
+
const isLast = idx === allColumns.length - 1;
|
|
78
|
+
const prefix = isLast ? '└─' : '├─';
|
|
79
|
+
console.log(colors.dim(prefix) + ' ' +
|
|
80
|
+
col.color(colors.bold(col.name)) +
|
|
81
|
+
colors.dim(` [${col.cards.length} card${col.cards.length !== 1 ? 's' : ''}]`));
|
|
82
|
+
if (col.cards.length === 0) {
|
|
83
|
+
// Show empty indicator
|
|
84
|
+
const emptyPrefix = isLast ? ' ' : '│ ';
|
|
85
|
+
console.log(colors.dim(emptyPrefix + ' No cards in this column'));
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
col.cards.forEach((card, cardIdx) => {
|
|
89
|
+
const isLastCard = cardIdx === col.cards.length - 1;
|
|
90
|
+
const cardPrefix = isLast
|
|
91
|
+
? (isLastCard ? ' └─' : ' ├─')
|
|
92
|
+
: (isLastCard ? '│ └─' : '│ ├─');
|
|
93
|
+
// Show full card title and full session ID
|
|
94
|
+
console.log(colors.dim(cardPrefix) + ' ' + colors.bold(card.title));
|
|
95
|
+
// Show session details on next line
|
|
96
|
+
const sessionPrefix = isLast
|
|
97
|
+
? (isLastCard ? ' ' : ' │ ')
|
|
98
|
+
: (isLastCard ? '│ ' : '│ │ ');
|
|
99
|
+
console.log(colors.dim(sessionPrefix + `Session: ${card.session}`));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
// Examples footer (only if there are cards)
|
|
104
|
+
if (total > 0) {
|
|
105
|
+
console.log('');
|
|
106
|
+
console.log(colors.dim('═══════════════════════════════════════════════════════'));
|
|
107
|
+
console.log(colors.bold(colors.cyan('💡 Query Individual Cards:')));
|
|
108
|
+
console.log('');
|
|
109
|
+
console.log(colors.dim(' Use /kancard to view detailed card information:'));
|
|
110
|
+
console.log('');
|
|
111
|
+
// Show examples based on available cards
|
|
112
|
+
const exampleCard = board.pending[0] || board.in_progress[0] || board.completed[0] || board.parkinglot[0] || board.deleted[0];
|
|
113
|
+
if (exampleCard) {
|
|
114
|
+
const shortSession = exampleCard.session.slice(0, 8);
|
|
115
|
+
const titleWords = exampleCard.title.split(' ').slice(0, 2).join(' ');
|
|
116
|
+
console.log(colors.yellow(' By title:') + colors.dim(` /kancard "${titleWords}"`));
|
|
117
|
+
console.log(colors.yellow(' By session:') + colors.dim(` /kancard ${shortSession}`));
|
|
118
|
+
if (exampleCard.taskId) {
|
|
119
|
+
const taskNum = exampleCard.taskId.split('-').pop();
|
|
120
|
+
console.log(colors.yellow(' By task ID:') + colors.dim(` /kancard ${taskNum}`));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
console.log('');
|
|
124
|
+
}
|
|
125
|
+
console.log(''); // Final newline
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
129
|
+
console.error('Error displaying Kanban board:', message);
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// Run if executed directly
|
|
134
|
+
if (require.main === module) {
|
|
135
|
+
displayKanbanFull();
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=kanboardfull.js.map
|