@the-bearded-bear/claude-craft 7.35.0 → 8.1.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/Dev/scripts/install-php-rules.sh +1 -1
- package/Dev/scripts/validate-skills-spec.sh +121 -0
- package/README.md +13 -11
- package/cli/index.js +6 -0
- package/cli/kanban/client/index.html +17 -0
- package/cli/kanban/client/src/App.svelte +106 -0
- package/cli/kanban/client/src/app.css +175 -0
- package/cli/kanban/client/src/lib/router.svelte.js +19 -0
- package/cli/kanban/client/src/lib/store.svelte.js +132 -0
- package/cli/kanban/client/src/main.js +6 -0
- package/cli/kanban/client/src/views/BacklogView.svelte +344 -0
- package/cli/kanban/client/src/views/BurndownView.svelte +189 -0
- package/cli/kanban/client/src/views/DepsView.svelte +334 -0
- package/cli/kanban/client/src/views/DocsView.svelte +451 -0
- package/cli/kanban/client/src/views/KanbanView.svelte +227 -0
- package/cli/kanban/client/vite.config.js +21 -0
- package/cli/kanban/server/app.js +201 -0
- package/cli/kanban/server/middleware/security.js +53 -0
- package/cli/kanban/server/services/event-bus.js +33 -0
- package/cli/kanban/server/services/file-scanner.js +113 -0
- package/cli/kanban/server/services/file-watcher.js +68 -0
- package/cli/kanban/server/services/file-writer.js +107 -0
- package/cli/kanban/server/services/frontmatter.js +55 -0
- package/cli/kanban/server/services/repository.js +173 -0
- package/cli/kanban/server/services/sprint-cache.js +208 -0
- package/cli/kanban/server/services/state-machine.js +156 -0
- package/cli/kanban/shared/schemas.js +127 -0
- package/cli/lib/help.js +4 -0
- package/cli/lib/kanban.js +103 -0
- package/package.json +21 -3
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* claude-craft kanban : launches a local HTTP server that serves an interactive
|
|
3
|
+
* Kanban view of a BMAD v6 project-management/ directory.
|
|
4
|
+
*
|
|
5
|
+
* Usage : claude-craft kanban [--port=3737] [--open] [--readonly] [--no-watch]
|
|
6
|
+
*
|
|
7
|
+
* @module cli/lib/kanban
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import fs from 'node:fs';
|
|
12
|
+
import { spawn } from 'node:child_process';
|
|
13
|
+
import colors from './colors.js';
|
|
14
|
+
|
|
15
|
+
const c = colors;
|
|
16
|
+
|
|
17
|
+
function resolvePM(targetPath) {
|
|
18
|
+
const abs = path.resolve(targetPath);
|
|
19
|
+
const pm = path.join(abs, 'project-management');
|
|
20
|
+
if (!fs.existsSync(pm) || !fs.statSync(pm).isDirectory()) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return { projectRoot: abs, pmDir: pm };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function openBrowser(url) {
|
|
27
|
+
const opener = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
28
|
+
try {
|
|
29
|
+
spawn(opener, [url], { detached: true, stdio: 'ignore' }).unref();
|
|
30
|
+
} catch {
|
|
31
|
+
/* best-effort ; user can click the printed URL */
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {object} opts
|
|
37
|
+
* @param {string} opts.targetPath
|
|
38
|
+
* @param {object} opts.options - parsed CLI options
|
|
39
|
+
*/
|
|
40
|
+
export async function runKanban({ targetPath, options }) {
|
|
41
|
+
const resolved = resolvePM(targetPath);
|
|
42
|
+
if (!resolved) {
|
|
43
|
+
console.error(
|
|
44
|
+
`${c.red}Error: no 'project-management/' directory found under ${path.resolve(targetPath)}.${c.reset}\n` +
|
|
45
|
+
`Run ${c.bold}/workflow:plan${c.reset} in Claude Code first, or cd into a BMAD project.`
|
|
46
|
+
);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
const { projectRoot, pmDir } = resolved;
|
|
50
|
+
|
|
51
|
+
const port = Number(options.port ?? 3737);
|
|
52
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
53
|
+
console.error(`${c.red}Error: invalid --port value "${options.port}"${c.reset}`);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
const readonly = !!options.readonly;
|
|
57
|
+
const watch = options.watch !== false && !options['no-watch'];
|
|
58
|
+
const shouldOpen = !!options.open;
|
|
59
|
+
|
|
60
|
+
// Lazy-load server deps (avoids loading Hono/chokidar on unrelated CLI commands).
|
|
61
|
+
const { Repository } = await import('../kanban/server/services/repository.js');
|
|
62
|
+
const { createApp } = await import('../kanban/server/app.js');
|
|
63
|
+
const { EventBus } = await import('../kanban/server/services/event-bus.js');
|
|
64
|
+
const { serve } = await import('@hono/node-server');
|
|
65
|
+
|
|
66
|
+
const repository = new Repository(pmDir);
|
|
67
|
+
await repository.refresh();
|
|
68
|
+
const eventBus = new EventBus();
|
|
69
|
+
const app = createApp({ repository, port, readonly, eventBus, projectRoot });
|
|
70
|
+
|
|
71
|
+
let stopWatcher = null;
|
|
72
|
+
if (watch) {
|
|
73
|
+
const { startWatcher } = await import('../kanban/server/services/file-watcher.js');
|
|
74
|
+
const handle = startWatcher({ rootDir: pmDir, repository, eventBus });
|
|
75
|
+
stopWatcher = handle.stop;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const server = serve({
|
|
79
|
+
fetch: app.fetch,
|
|
80
|
+
hostname: '127.0.0.1',
|
|
81
|
+
port,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const url = `http://127.0.0.1:${port}`;
|
|
85
|
+
console.log(`${c.green}claude-craft kanban${c.reset} serving ${c.bold}${pmDir}${c.reset}`);
|
|
86
|
+
console.log(` ${c.cyan}${url}${c.reset}${readonly ? ` ${c.dim}(readonly)${c.reset}` : ''}`);
|
|
87
|
+
console.log(` ${c.dim}watching:${c.reset} ${watch ? 'yes' : 'no'}`);
|
|
88
|
+
console.log(` ${c.dim}Press Ctrl+C to stop.${c.reset}\n`);
|
|
89
|
+
|
|
90
|
+
if (shouldOpen) openBrowser(url);
|
|
91
|
+
|
|
92
|
+
const shutdown = async () => {
|
|
93
|
+
console.log(`\n${c.dim}stopping...${c.reset}`);
|
|
94
|
+
if (stopWatcher) await stopWatcher();
|
|
95
|
+
if (server && typeof server.close === 'function') {
|
|
96
|
+
await new Promise((resolve) => server.close(resolve));
|
|
97
|
+
}
|
|
98
|
+
eventBus.clear();
|
|
99
|
+
process.exit(0);
|
|
100
|
+
};
|
|
101
|
+
process.on('SIGINT', shutdown);
|
|
102
|
+
process.on('SIGTERM', shutdown);
|
|
103
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-bearded-bear/claude-craft",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "A comprehensive framework for AI-assisted development with Claude Code. Install standardized rules, agents, and commands for your projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli/index.js",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"lint:i18n": "bash scripts/verify-i18n-parity.sh",
|
|
22
22
|
"format:check": "prettier --check cli/",
|
|
23
23
|
"format": "prettier --write cli/",
|
|
24
|
+
"kanban:build": "vite build --config cli/kanban/client/vite.config.js",
|
|
25
|
+
"kanban:dev": "vite --config cli/kanban/client/vite.config.js",
|
|
24
26
|
"vale:check": "vale docs/ .claude/CLAUDE.md README.md CHANGELOG.md",
|
|
25
27
|
"vale:sync": "vale sync",
|
|
26
28
|
"commitlint": "commitlint --edit",
|
|
@@ -56,11 +58,14 @@
|
|
|
56
58
|
"devDependencies": {
|
|
57
59
|
"@commitlint/cli": "^20.0.0",
|
|
58
60
|
"@commitlint/config-conventional": "^20.0.0",
|
|
59
|
-
"@vitest/coverage-v8": "^4.0.0",
|
|
60
61
|
"@eslint/js": "^10.0.0",
|
|
62
|
+
"@sveltejs/vite-plugin-svelte": "^5.1.1",
|
|
63
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
61
64
|
"eslint": "^10.0.0",
|
|
62
65
|
"eslint-config-prettier": "^10.0.0",
|
|
63
66
|
"prettier": "^3.4.0",
|
|
67
|
+
"svelte": "^5.55.4",
|
|
68
|
+
"vite": "^6.4.2",
|
|
64
69
|
"vitest": "^4.0.0"
|
|
65
70
|
},
|
|
66
71
|
"files": [
|
|
@@ -70,5 +75,18 @@
|
|
|
70
75
|
"Infra/",
|
|
71
76
|
"Project/",
|
|
72
77
|
"Tools/"
|
|
73
|
-
]
|
|
78
|
+
],
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@hono/node-server": "^1.19.14",
|
|
81
|
+
"chokidar": "^4.0.3",
|
|
82
|
+
"cytoscape": "^3.33.2",
|
|
83
|
+
"cytoscape-dagre": "^2.5.0",
|
|
84
|
+
"dompurify": "^3.4.0",
|
|
85
|
+
"gray-matter": "^4.0.3",
|
|
86
|
+
"hono": "^4.12.14",
|
|
87
|
+
"js-yaml": "^4.1.1",
|
|
88
|
+
"marked": "^14.1.4",
|
|
89
|
+
"uplot": "^1.6.32",
|
|
90
|
+
"zod": "^3.25.76"
|
|
91
|
+
}
|
|
74
92
|
}
|