bmad-viewer 0.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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -0
  3. package/bin/cli.js +139 -0
  4. package/example-data/_bmad/bmm/agents/analyst.md +10 -0
  5. package/example-data/_bmad/bmm/agents/architect.md +10 -0
  6. package/example-data/_bmad/bmm/config.yaml +4 -0
  7. package/example-data/_bmad/core/manifest.csv +4 -0
  8. package/example-data/_bmad-output/implementation-artifacts/sprint-status.yaml +16 -0
  9. package/example-data/_bmad-output/planning-artifacts/product-brief.md +22 -0
  10. package/package.json +56 -0
  11. package/public/client.js +368 -0
  12. package/public/styles.css +146 -0
  13. package/src/components/badge.js +11 -0
  14. package/src/components/content-area.js +14 -0
  15. package/src/components/header-bar.js +21 -0
  16. package/src/components/kanban-card.js +17 -0
  17. package/src/components/kanban-column.js +17 -0
  18. package/src/components/lens-tabs.js +14 -0
  19. package/src/components/progress-bar.js +12 -0
  20. package/src/components/search-modal.js +18 -0
  21. package/src/components/sidebar-nav.js +147 -0
  22. package/src/components/stats-box.js +25 -0
  23. package/src/data/bmad-detector.js +83 -0
  24. package/src/data/data-model.js +424 -0
  25. package/src/parsers/parse-csv.js +101 -0
  26. package/src/parsers/parse-markdown.js +55 -0
  27. package/src/parsers/parse-yaml.js +46 -0
  28. package/src/parsers/result-type.js +37 -0
  29. package/src/routing/hash-router.js +54 -0
  30. package/src/search/fuzzy-search.js +137 -0
  31. package/src/server/http-server.js +122 -0
  32. package/src/server/mime-types.js +24 -0
  33. package/src/server/port-finder.js +42 -0
  34. package/src/server/renderer.js +144 -0
  35. package/src/server/static-generator.js +56 -0
  36. package/src/server/websocket.js +132 -0
  37. package/src/templates/base-layout.js +47 -0
  38. package/src/templates/inline-theme-script.js +10 -0
  39. package/src/theme/theme-manager.js +25 -0
  40. package/src/utils/error-aggregator.js +66 -0
  41. package/src/utils/html-escape.js +17 -0
  42. package/src/utils/path-utils.js +31 -0
  43. package/src/watchers/file-watcher.js +34 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bmad-viewer contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # bmad-viewer
2
+
3
+ Visual dashboard for BMAD (Boring Maintainable Agile Development) projects.
4
+
5
+ ## Features
6
+
7
+ - 📊 Live project dashboard with sprint status visualization
8
+ - 🔍 Fuzzy search across agents, workflows, and tools
9
+ - 📝 Markdown-based wiki with auto-refresh
10
+ - 🎨 Dark/light theme support
11
+ - 🚀 Zero-config - auto-detects `_bmad/` folder
12
+ - 📦 Installable via npx - no global installation needed
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ # Run in a BMAD project directory
18
+ npx bmad-viewer
19
+
20
+ # Or specify a custom path
21
+ npx bmad-viewer --path /path/to/bmad/project
22
+
23
+ # Custom port
24
+ npx bmad-viewer --port 8080
25
+ ```
26
+
27
+ ## Requirements
28
+
29
+ - Node.js 18+ (LTS)
30
+
31
+ ## Development
32
+
33
+ ```bash
34
+ # Install dependencies
35
+ npm install
36
+
37
+ # Run tests
38
+ npm test
39
+
40
+ # Lint code
41
+ npm run lint
42
+
43
+ # Format code
44
+ npm run format
45
+ ```
46
+
47
+ ## License
48
+
49
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { dirname, join } from 'node:path';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
10
+
11
+ const args = process.argv.slice(2);
12
+
13
+ // Parse CLI flags
14
+ const flags = {
15
+ port: null,
16
+ path: null,
17
+ output: null,
18
+ noOpen: false,
19
+ version: false,
20
+ help: false,
21
+ };
22
+
23
+ for (let i = 0; i < args.length; i++) {
24
+ switch (args[i]) {
25
+ case '--version':
26
+ case '-v':
27
+ flags.version = true;
28
+ break;
29
+ case '--help':
30
+ case '-h':
31
+ flags.help = true;
32
+ break;
33
+ case '--port':
34
+ case '-p':
35
+ flags.port = Number.parseInt(args[++i], 10);
36
+ break;
37
+ case '--path':
38
+ flags.path = args[++i];
39
+ break;
40
+ case '--output':
41
+ case '-o':
42
+ flags.output = args[++i];
43
+ break;
44
+ case '--no-open':
45
+ flags.noOpen = true;
46
+ break;
47
+ default:
48
+ console.error(`Unknown flag: ${args[i]}`);
49
+ console.error('Run "bmad-viewer --help" for usage information.');
50
+ process.exit(1);
51
+ }
52
+ }
53
+
54
+ // --version
55
+ if (flags.version) {
56
+ console.log(`bmad-viewer v${pkg.version}`);
57
+ process.exit(0);
58
+ }
59
+
60
+ // --help
61
+ if (flags.help) {
62
+ console.log(`
63
+ bmad-viewer v${pkg.version}
64
+ Visual dashboard for BMAD projects
65
+
66
+ Usage:
67
+ bmad-viewer [options]
68
+
69
+ Options:
70
+ --port, -p <port> Set server port (default: auto-detect from 4000)
71
+ --path <dir> Path to BMAD project (default: auto-detect _bmad/)
72
+ --output, -o <dir> Generate static HTML files (no server)
73
+ --no-open Don't open browser automatically
74
+ --version, -v Show version number
75
+ --help, -h Show this help message
76
+
77
+ Examples:
78
+ npx bmad-viewer Auto-detect and serve
79
+ npx bmad-viewer --port 8080 Use specific port
80
+ npx bmad-viewer --path ./my-project Specify project path
81
+ npx bmad-viewer --output ./docs Generate static files
82
+ `);
83
+ process.exit(0);
84
+ }
85
+
86
+ // Validate port
87
+ if (flags.port !== null) {
88
+ if (Number.isNaN(flags.port) || flags.port < 1024 || flags.port > 65535) {
89
+ console.error('Error: Port must be between 1024-65535');
90
+ process.exit(1);
91
+ }
92
+ }
93
+
94
+ // Validate path
95
+ if (flags.path !== null) {
96
+ const { existsSync, statSync } = await import('node:fs');
97
+ if (!existsSync(flags.path) || !statSync(flags.path).isDirectory()) {
98
+ console.error(`Error: Path does not exist or is not a directory: ${flags.path}`);
99
+ process.exit(1);
100
+ }
101
+ }
102
+
103
+ // Import and start the application
104
+ const { detectBmadDir } = await import('../src/data/bmad-detector.js');
105
+ const { startServer } = await import('../src/server/http-server.js');
106
+ const { generateStaticSite } = await import('../src/server/static-generator.js');
107
+
108
+ // Detect BMAD directory
109
+ const bmadDir = flags.path || detectBmadDir(process.cwd());
110
+
111
+ if (!bmadDir) {
112
+ console.error(`
113
+ Error: No BMAD installation found.
114
+
115
+ bmad-viewer looked for a _bmad/ folder in the current directory
116
+ and up to 3 parent directories, but couldn't find one.
117
+
118
+ Solutions:
119
+ 1. Run this command from within a BMAD project directory
120
+ 2. Specify the path: bmad-viewer --path /path/to/project
121
+ 3. Try the example data: bmad-viewer --path ./node_modules/bmad-viewer/example-data
122
+
123
+ Learn more: https://github.com/bmad-method/BMAD-METHOD
124
+ `);
125
+ process.exit(1);
126
+ }
127
+
128
+ // Static generation mode
129
+ if (flags.output) {
130
+ await generateStaticSite(bmadDir, flags.output);
131
+ process.exit(0);
132
+ }
133
+
134
+ // Server mode (default)
135
+ await startServer({
136
+ port: flags.port,
137
+ bmadDir,
138
+ open: !flags.noOpen,
139
+ });
@@ -0,0 +1,10 @@
1
+ # Analyst Agent
2
+
3
+ The Analyst agent helps you research and analyze requirements for your project.
4
+
5
+ ## Responsibilities
6
+
7
+ - Gather business requirements
8
+ - Analyze market conditions
9
+ - Create product briefs
10
+ - Validate assumptions
@@ -0,0 +1,10 @@
1
+ # Architect Agent
2
+
3
+ The Architect agent makes technology and architecture decisions for your project.
4
+
5
+ ## Responsibilities
6
+
7
+ - Select technology stack
8
+ - Define project structure
9
+ - Create architecture documentation
10
+ - Make implementation pattern decisions
@@ -0,0 +1,4 @@
1
+ project_name: example-project
2
+ user_name: Demo User
3
+ communication_language: english
4
+ version: "6.0.0"
@@ -0,0 +1,4 @@
1
+ ID,Title,Type,Description
2
+ bmad-master,BMAD Master,agent,Master orchestrator for BMAD methodology
3
+ workflow-engine,Workflow Engine,tool,Core workflow execution engine
4
+ brainstorming,Brainstorming,workflow,Interactive brainstorming sessions
@@ -0,0 +1,16 @@
1
+ generated: 2026-02-16
2
+ project: example-project
3
+ tracking_system: file-system
4
+ story_location: _bmad-output/implementation-artifacts
5
+
6
+ development_status:
7
+ epic-1: in-progress
8
+ 1-1-project-setup: done
9
+ 1-2-basic-functionality: in-progress
10
+ 1-3-user-interface: backlog
11
+ epic-1-retrospective: optional
12
+
13
+ epic-2: backlog
14
+ 2-1-advanced-features: backlog
15
+ 2-2-testing: backlog
16
+ epic-2-retrospective: optional
@@ -0,0 +1,22 @@
1
+ # Product Brief: Example Project
2
+
3
+ ## Vision
4
+
5
+ An example project demonstrating BMAD methodology in action.
6
+
7
+ ## Problem Statement
8
+
9
+ Developers need a clear methodology for AI-assisted development.
10
+
11
+ ## Target Users
12
+
13
+ - Solo developers
14
+ - Small development teams
15
+ - AI-assisted development practitioners
16
+
17
+ ## Key Features
18
+
19
+ 1. Structured planning workflow
20
+ 2. Epic and story organization
21
+ 3. Sprint tracking and status
22
+ 4. Code review processes
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "bmad-viewer",
3
+ "version": "0.1.0",
4
+ "description": "Visual dashboard for BMAD (Boring Maintainable Agile Development) projects. Wiki browser + sprint status viewer with live reload.",
5
+ "type": "module",
6
+ "bin": {
7
+ "bmad-viewer": "./bin/cli.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "public",
13
+ "example-data",
14
+ "LICENSE",
15
+ "README.md"
16
+ ],
17
+ "engines": {
18
+ "node": ">=18.0.0"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/CamiloValderramaGonzalez/bmad-viewer.git"
23
+ },
24
+ "homepage": "https://github.com/CamiloValderramaGonzalez/bmad-viewer#readme",
25
+ "bugs": {
26
+ "url": "https://github.com/CamiloValderramaGonzalez/bmad-viewer/issues"
27
+ },
28
+ "dependencies": {
29
+ "chokidar": "^4.0.1",
30
+ "fuse.js": "^7.0.0",
31
+ "js-yaml": "^4.1.0",
32
+ "marked": "^15.0.4"
33
+ },
34
+ "devDependencies": {
35
+ "@biomejs/biome": "^1.9.4"
36
+ },
37
+ "scripts": {
38
+ "test": "node --test",
39
+ "lint": "biome check .",
40
+ "format": "biome format --write ."
41
+ },
42
+ "keywords": [
43
+ "bmad",
44
+ "agile",
45
+ "dashboard",
46
+ "cli",
47
+ "viewer",
48
+ "wiki",
49
+ "sprint",
50
+ "kanban",
51
+ "markdown",
52
+ "project-management"
53
+ ],
54
+ "author": "",
55
+ "license": "MIT"
56
+ }