@sugar-crash-studios/vibe-forge 0.4.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 (201) hide show
  1. package/.claude/commands/clear-attention.md +63 -0
  2. package/.claude/commands/compact-context.md +52 -0
  3. package/.claude/commands/configure-vcs.md +102 -0
  4. package/.claude/commands/forge.md +171 -0
  5. package/.claude/commands/need-help.md +77 -0
  6. package/.claude/commands/update-status.md +64 -0
  7. package/.claude/commands/worker-loop.md +106 -0
  8. package/.claude/hooks/worker-loop.js +198 -0
  9. package/.claude/scripts/setup-worker-loop.sh +45 -0
  10. package/.claude/settings.local.json +46 -0
  11. package/LICENSE +21 -0
  12. package/README.md +238 -0
  13. package/agents/aegis/personality.md +294 -0
  14. package/agents/anvil/personality.md +276 -0
  15. package/agents/architect/personality.md +258 -0
  16. package/agents/crucible/personality.md +360 -0
  17. package/agents/ember/personality.md +291 -0
  18. package/agents/forge-master/capabilities.md +144 -0
  19. package/agents/forge-master/context-template.md +128 -0
  20. package/agents/forge-master/personality.md +138 -0
  21. package/agents/furnace/personality.md +340 -0
  22. package/agents/herald/personality.md +247 -0
  23. package/agents/loki/personality.md +108 -0
  24. package/agents/oracle/personality.md +283 -0
  25. package/agents/pixel/personality.md +113 -0
  26. package/agents/planning-hub/personality.md +320 -0
  27. package/agents/scribe/personality.md +251 -0
  28. package/agents/temper/personality.md +218 -0
  29. package/bin/cli.js +375 -0
  30. package/bin/dashboard/api/agents.js +333 -0
  31. package/bin/dashboard/api/dispatch.js +483 -0
  32. package/bin/dashboard/api/tasks.js +416 -0
  33. package/bin/dashboard/frontend/index.html +13 -0
  34. package/bin/dashboard/frontend/package.json +16 -0
  35. package/bin/dashboard/frontend/src/App.svelte +222 -0
  36. package/bin/dashboard/frontend/src/app.css +1777 -0
  37. package/bin/dashboard/frontend/src/lib/components/AgentCard.svelte +60 -0
  38. package/bin/dashboard/frontend/src/lib/components/AgentsPanel.svelte +57 -0
  39. package/bin/dashboard/frontend/src/lib/components/DispatchModal.svelte +180 -0
  40. package/bin/dashboard/frontend/src/lib/components/Footer.svelte +33 -0
  41. package/bin/dashboard/frontend/src/lib/components/Header.svelte +84 -0
  42. package/bin/dashboard/frontend/src/lib/components/IssueCard.svelte +33 -0
  43. package/bin/dashboard/frontend/src/lib/components/IssuesPanel.svelte +73 -0
  44. package/bin/dashboard/frontend/src/lib/components/KeyboardShortcutsModal.svelte +108 -0
  45. package/bin/dashboard/frontend/src/lib/components/MobileTabs.svelte +52 -0
  46. package/bin/dashboard/frontend/src/lib/components/NotificationCard.svelte +60 -0
  47. package/bin/dashboard/frontend/src/lib/components/NotificationsPanel.svelte +44 -0
  48. package/bin/dashboard/frontend/src/lib/components/TaskCard.svelte +63 -0
  49. package/bin/dashboard/frontend/src/lib/components/TasksPanel.svelte +82 -0
  50. package/bin/dashboard/frontend/src/lib/components/Toast.svelte +45 -0
  51. package/bin/dashboard/frontend/src/lib/stores/agents.js +34 -0
  52. package/bin/dashboard/frontend/src/lib/stores/issues.js +54 -0
  53. package/bin/dashboard/frontend/src/lib/stores/notifications.js +48 -0
  54. package/bin/dashboard/frontend/src/lib/stores/tasks.js +63 -0
  55. package/bin/dashboard/frontend/src/lib/stores/theme.js +33 -0
  56. package/bin/dashboard/frontend/src/lib/stores/toast.js +35 -0
  57. package/bin/dashboard/frontend/src/lib/stores/ui.js +25 -0
  58. package/bin/dashboard/frontend/src/lib/stores/voice.js +275 -0
  59. package/bin/dashboard/frontend/src/lib/stores/websocket.js +295 -0
  60. package/bin/dashboard/frontend/src/lib/utils/api.js +101 -0
  61. package/bin/dashboard/frontend/src/lib/utils/formatters.js +54 -0
  62. package/bin/dashboard/frontend/src/main.js +9 -0
  63. package/bin/dashboard/frontend/svelte.config.js +5 -0
  64. package/bin/dashboard/frontend/vite.config.js +20 -0
  65. package/bin/dashboard/public/assets/index-DnfVj9Ce.css +1 -0
  66. package/bin/dashboard/public/assets/index-Ze5h0kXQ.js +2 -0
  67. package/bin/dashboard/public/index.html +14 -0
  68. package/bin/dashboard/server.js +566 -0
  69. package/bin/forge-daemon.sh +463 -0
  70. package/bin/forge-setup.sh +645 -0
  71. package/bin/forge-spawn.sh +164 -0
  72. package/bin/forge.cmd +83 -0
  73. package/bin/forge.sh +533 -0
  74. package/bin/lib/agents.sh +177 -0
  75. package/bin/lib/colors.sh +44 -0
  76. package/bin/lib/config.sh +347 -0
  77. package/bin/lib/constants.sh +241 -0
  78. package/bin/lib/daemon/display.sh +128 -0
  79. package/bin/lib/daemon/notifications.sh +263 -0
  80. package/bin/lib/daemon/routing.sh +77 -0
  81. package/bin/lib/daemon/state.sh +115 -0
  82. package/bin/lib/daemon/sync.sh +95 -0
  83. package/bin/lib/database.sh +310 -0
  84. package/bin/lib/heimdall-setup.js +113 -0
  85. package/bin/lib/heimdall.js +265 -0
  86. package/bin/lib/json.sh +264 -0
  87. package/bin/lib/terminal.js +451 -0
  88. package/bin/lib/util.sh +126 -0
  89. package/bin/lib/vcs.js +349 -0
  90. package/config/agent-manifest.yaml +203 -0
  91. package/config/agents.json +168 -0
  92. package/config/task-template.md +159 -0
  93. package/config/task-types.yaml +106 -0
  94. package/context/agent-status/aegis.json +7 -0
  95. package/context/agent-status/anvil.json +7 -0
  96. package/context/agent-status/architect.json +7 -0
  97. package/context/agent-status/crucible.json +7 -0
  98. package/context/agent-status/ember.json +7 -0
  99. package/context/agent-status/furnace.json +7 -0
  100. package/context/agent-status/loki.json +7 -0
  101. package/context/agent-status/oracle.json +7 -0
  102. package/context/agent-status/pixel.json +7 -0
  103. package/context/agent-status/planning-hub.json +7 -0
  104. package/context/agent-status/scribe.json +7 -0
  105. package/context/agent-status/temper.json +7 -0
  106. package/context/feature-brainstorm.md +426 -0
  107. package/context/forge-state.yaml +19 -0
  108. package/context/modern-conventions.md +129 -0
  109. package/context/project-context-template.md +122 -0
  110. package/context/project-context.md +122 -0
  111. package/docs/TODO.md +150 -0
  112. package/docs/agents.md +409 -0
  113. package/docs/architecture/decisions/ADR-001-daemon-modularization.md +122 -0
  114. package/docs/architecture/vibe-lab-integration.md +684 -0
  115. package/docs/architecture.md +194 -0
  116. package/docs/bmad-gap-analysis-2026-03-31.md +444 -0
  117. package/docs/cleanup-workflow.md +329 -0
  118. package/docs/commands.md +451 -0
  119. package/docs/dashboard-mockup.html +989 -0
  120. package/docs/getting-started.md +261 -0
  121. package/docs/integration/forge-ownership-policy.md +112 -0
  122. package/docs/npm-publishing.md +132 -0
  123. package/docs/roadmap-2026.md +519 -0
  124. package/docs/security.md +144 -0
  125. package/docs/wireframes/dashboard-mvp.md +1164 -0
  126. package/docs/workflows/README.md +32 -0
  127. package/docs/workflows/azure-devops.md +108 -0
  128. package/docs/workflows/bitbucket.md +104 -0
  129. package/docs/workflows/git-only.md +130 -0
  130. package/docs/workflows/gitea.md +168 -0
  131. package/docs/workflows/github.md +103 -0
  132. package/docs/workflows/gitlab.md +105 -0
  133. package/docs/workflows.md +454 -0
  134. package/package.json +73 -0
  135. package/tasks/completed/ARCH-001-duplicate-agent-config.md +121 -0
  136. package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +88 -0
  137. package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +77 -0
  138. package/tasks/completed/ARCH-009-test-organization.md +78 -0
  139. package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +94 -0
  140. package/tasks/completed/ARCH-012-tmp-files-in-root.md +71 -0
  141. package/tasks/completed/ARCH-013-exit-code-constants.md +65 -0
  142. package/tasks/completed/ARCH-014-sed-incompatibility.md +96 -0
  143. package/tasks/completed/ARCH-015-docs-todo-tracking.md +83 -0
  144. package/tasks/completed/BUG-dash-001-tasks-filter-error.md +31 -0
  145. package/tasks/completed/BUG-dash-002-agents-unknown.md +41 -0
  146. package/tasks/completed/CLEAN-001.md +38 -0
  147. package/tasks/completed/CLEAN-002.md +43 -0
  148. package/tasks/completed/CLEAN-003.md +47 -0
  149. package/tasks/completed/CLEAN-004.md +56 -0
  150. package/tasks/completed/CLEAN-005.md +75 -0
  151. package/tasks/completed/CLEAN-006.md +47 -0
  152. package/tasks/completed/CLEAN-007.md +34 -0
  153. package/tasks/completed/CLEAN-008.md +49 -0
  154. package/tasks/completed/CLEAN-012.md +58 -0
  155. package/tasks/completed/CLEAN-013.md +45 -0
  156. package/tasks/completed/FEATURE-001a-dashboard-wireframes.md +162 -0
  157. package/tasks/completed/IMPL-007a-daemon-notifications-module.md +82 -0
  158. package/tasks/completed/IMPL-007b-daemon-sync-module.md +71 -0
  159. package/tasks/completed/IMPL-007c-daemon-state-module.md +80 -0
  160. package/tasks/completed/IMPL-007d-daemon-routing-module.md +77 -0
  161. package/tasks/completed/IMPL-007e-daemon-display-module.md +77 -0
  162. package/tasks/completed/IMPL-007f-daemon-integration.md +124 -0
  163. package/tasks/completed/PLAT-1-heimdall.md +420 -0
  164. package/tasks/completed/SEC-001-sql-injection-fix.md +58 -0
  165. package/tasks/completed/SEC-002-notification-injection-fix.md +45 -0
  166. package/tasks/completed/SEC-003-eval-injection-fix.md +54 -0
  167. package/tasks/completed/SEC-004-pid-race-condition-fix.md +49 -0
  168. package/tasks/completed/SEC-005-worker-loop-path-fix.md +51 -0
  169. package/tasks/completed/SEC-006-eval-agent-names.md +55 -0
  170. package/tasks/completed/SEC-007-spawn-escaping.md +67 -0
  171. package/tasks/completed/TASK-DASH-001-server-infrastructure.md +185 -0
  172. package/tasks/completed/TASK-anvil-001-dashboard-frontend.md +133 -0
  173. package/tasks/completed/review-bmad-aegis.md +89 -0
  174. package/tasks/completed/review-bmad-anvil.md +80 -0
  175. package/tasks/completed/review-bmad-crucible.md +81 -0
  176. package/tasks/completed/review-bmad-ember.md +90 -0
  177. package/tasks/completed/review-bmad-furnace.md +79 -0
  178. package/tasks/completed/review-bmad-pixel.md +82 -0
  179. package/tasks/completed/review-bmad-scribe.md +92 -0
  180. package/tasks/completed/review-bmad-sentinel.md +83 -0
  181. package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +72 -0
  182. package/tasks/pending/ARCH-005-missing-src-directory.md +95 -0
  183. package/tasks/pending/ARCH-006-task-template-location.md +64 -0
  184. package/tasks/pending/ARCH-008-forge-master-vs-hub.md +81 -0
  185. package/tasks/pending/ARCH-010-missing-index-files.md +84 -0
  186. package/tasks/pending/CLEAN-009.md +31 -0
  187. package/tasks/pending/CLEAN-010.md +30 -0
  188. package/tasks/pending/CLEAN-011.md +30 -0
  189. package/tasks/pending/CLEAN-014.md +32 -0
  190. package/tasks/pending/DESIGN-dash-001-layout-review.md +45 -0
  191. package/tasks/pending/FEATURE-001-dashboard-mvp.md +268 -0
  192. package/tasks/review/ARCH-007-daemon-monolith.md +162 -0
  193. package/tasks/review/bmad-review-aegis.md +349 -0
  194. package/tasks/review/bmad-review-anvil.md +259 -0
  195. package/tasks/review/bmad-review-crucible.md +277 -0
  196. package/tasks/review/bmad-review-ember.md +307 -0
  197. package/tasks/review/bmad-review-furnace.md +285 -0
  198. package/tasks/review/bmad-review-pixel.md +329 -0
  199. package/tasks/review/bmad-review-scribe.md +361 -0
  200. package/tasks/review/bmad-review-sentinel.md +242 -0
  201. package/tasks/review/task-001.md +78 -0
@@ -0,0 +1,307 @@
1
+ # BMAD vs Vibe Forge: DevOps & Infrastructure Review
2
+
3
+ **Reviewer:** Ember (DevOps Specialist)
4
+ **Date:** 2026-03-31
5
+ **Task:** review-bmad-ember
6
+ **BMAD version reviewed:** 6.2.2
7
+
8
+ ---
9
+
10
+ ## Executive Summary
11
+
12
+ BMAD-METHOD and Vibe Forge take fundamentally different architectural approaches. BMAD is a **static content package** - a CLI tool that installs Markdown files into an IDE. It has no runtime daemons, no containers, and no server infrastructure to operate. Vibe Forge is an **active orchestration system** with a running daemon, SQLite persistence, agent status tracking, and real task routing. This means most of Vibe Forge's infrastructure concerns have no BMAD equivalent to compare against - Vibe Forge is simply doing more.
13
+
14
+ That said, BMAD's CI/CD pipeline and release automation are meaningfully more mature and have specific patterns Vibe Forge should adopt.
15
+
16
+ ---
17
+
18
+ ## 1. CI/CD Pipeline Analysis
19
+
20
+ ### Vibe Forge Current State
21
+
22
+ Three workflows:
23
+ - `ci.yml` - PR checks, lint, multi-OS install test, shellcheck, unit tests
24
+ - `publish.yml` - npm publish on release (with semver validation + provenance)
25
+ - `docs.yml` - VitePress deploy to GitHub Pages
26
+
27
+ **Strengths:**
28
+ - Multi-OS matrix (ubuntu, macos, windows) for install testing - critical for a cross-platform CLI
29
+ - ShellCheck integration (pinned to `ludeeus/action-shellcheck@2.0.0`)
30
+ - npm publish uses `--provenance` (OIDC trusted publishing)
31
+ - Semver validation on manual version input
32
+ - Post-publish verification step (`npm view vibe-forge version` after 30s)
33
+ - Branch naming convention enforcement in PRs (warning, non-blocking)
34
+ - Direct-to-main PR block enforcement
35
+
36
+ **Gaps vs BMAD:**
37
+
38
+ | Feature | Vibe Forge | BMAD |
39
+ |---------|-----------|------|
40
+ | Parallel quality jobs | Sequential in single job | 5 parallel jobs (prettier, eslint, markdownlint, docs, validate) |
41
+ | Markdown linting in CI | None | `markdownlint-cli2` runs on every PR |
42
+ | Formatting enforcement | None | `prettier --check` blocks PRs |
43
+ | Docs build validation | Only on push to main | Runs on every PR |
44
+ | Pre-commit hooks | None | Husky: lint-staged + tests + docs validation |
45
+ | Auto-prerelease channel | None | `@next` tag auto-published on every main push |
46
+ | Two-track release | Manual only | Auto-prerelease (`@next`) + manual stable (`@latest`) |
47
+ | External validation | None | `validate:refs` and `validate:skills` catch broken internal links |
48
+ | Discord notifications | None | Release + PR + issue notifications to community channel |
49
+ | Community bot (CodeRabbit) | None | `coderabbitai review` auto-triggered on PR ready-for-review |
50
+
51
+ **Key Gap: No `@next` channel.** Vibe Forge has no auto-prerelease. Every publish is manual and goes straight to `@latest`. BMAD's two-track system (auto `@next` on main, manual stable promotion) is the safer pattern - it lets users test bleeding-edge without touching the stable channel.
52
+
53
+ **Key Gap: No pre-commit hooks.** BMAD uses Husky to run format/lint/tests locally before commit. Vibe Forge relies entirely on CI for feedback. This slows down the feedback loop significantly.
54
+
55
+ **Key Gap: No markdown linting.** The entire Vibe Forge framework is Markdown-driven (agent personalities, task files, docs). No lint runs on these. Agent personality files could have broken formatting that passes CI silently.
56
+
57
+ ---
58
+
59
+ ## 2. Daemon Architecture Deep Dive
60
+
61
+ ### `forge-daemon.sh` Assessment
62
+
63
+ This is Vibe Forge's most sophisticated infrastructure piece. BMAD has no equivalent.
64
+
65
+ **What it does well:**
66
+
67
+ - **Atomic state writes:** `forge-state.yaml` is written to a temp file then `mv`'d - correct pattern, avoids partial reads by agents
68
+ - **Symlink protection:** `safe_move_task()` checks for and skips symlinks before task routing - good security practice
69
+ - **Directory traversal protection:** Validates destination is within `FORGE_ROOT` before any file move
70
+ - **Notification sanitization:** `sanitize_notification_message()` strips injection-dangerous chars before passing to `powershell.exe`/`osascript`/`notify-send`
71
+ - **flock for startup:** Uses `flock -n 200` to prevent race condition when multiple daemon instances try to start simultaneously (falls back gracefully if flock unavailable)
72
+ - **Adaptive polling:** Switches between 5s (active) and 30s (idle) intervals based on worker activity, reducing unnecessary I/O when nothing is happening
73
+ - **SQLite persistence:** Agent status aggregated from JSON files into SQLite with mtime filtering - only re-reads files that changed
74
+ - **SQL injection prevention:** `db_escape()` throughout, numeric validation on mtime/minutes/days before interpolating into queries
75
+ - **Log rotation:** File-size-based rotation at 1MB, notification log trimming at 1000 entries
76
+ - **Stale agent detection:** Agents not updated in 5 minutes flagged in dashboard; entries deleted after 30 minutes
77
+
78
+ **Issues / Weaknesses:**
79
+
80
+ 1. **No daemon restart on crash.** If the daemon process dies (OOM, unhandled signal, disk error), there is no watchdog or `supervisord`/`systemd` unit to restart it. Users would see stale state with no indication the daemon stopped, only that status is stale.
81
+
82
+ 2. **`kill` for stop is not graceful.** `cmd_stop()` sends `kill $pid` (SIGTERM) then immediately removes the PID/lock files. If the daemon is mid-write to `forge-state.yaml`, the partial temp file `.tmp.$$` may be orphaned. Should wait for confirmation the process stopped.
83
+
84
+ 3. **Cross-platform `stat` for file mtime is fragile.** The daemon uses `stat -c %Y` (Linux) with fallback to `stat -f %m` (macOS). On MSYS2/Git Bash on Windows, `stat` behavior differs and the fallback `echo "0"` means the mtime check always fails, causing re-reads of all status files every iteration.
85
+
86
+ 4. **`date -d` for timestamp parsing is Linux-only.** `build_worker_status()` and `display_worker_status()` use `date -d "$updated"` to compute staleness. On macOS this requires `date -j -f` (BSD date). The fallback `echo "0"` means staleness is never detected on macOS. The `STALE_STATUS_THRESHOLD` logic is effectively dead on macOS.
87
+
88
+ 5. **Maintenance interval is iteration-count based, not time-based.** With adaptive polling, `MAINTENANCE_INTERVAL=100` iterations could mean 100 * 5s = 8.3 minutes (active) or 100 * 30s = 50 minutes (idle). This is inconsistent. Maintenance (log rotation, stale cleanup) should run on elapsed time.
89
+
90
+ 6. **No health endpoint.** There is no way for an external process or monitoring tool to query "is the daemon healthy?" Other than checking the PID file and log recency, there is no programmatic health check.
91
+
92
+ 7. **`status_history` table is populated nowhere.** `db_record_status_history()` exists but is never called in the daemon loop. The history table is created, indexed, and pruned - but it accumulates no data. This is dead infrastructure.
93
+
94
+ 8. **Windows PowerShell toast notification is fire-and-forget.** The spawned `powershell.exe` process for urgent notifications has no error handling. On systems where toast notifications are disabled (common in enterprise), the process silently fails. The `&` background discard is intentional but means notification failures are invisible.
95
+
96
+ ---
97
+
98
+ ## 3. Cross-Platform Support Assessment
99
+
100
+ ### Vibe Forge
101
+
102
+ - `forge-setup.sh` detects MINGW/MSYS/CYGWIN for Windows, Darwin, Linux
103
+ - Finds Git Bash via hardcoded path list + `where git` fallback
104
+ - `util.sh` presumably has cross-platform `sed -i` helper (`sed_inplace`)
105
+ - Multi-OS CI matrix validates `node bin/cli.js` works on all three platforms
106
+ - Windows Terminal spawn support (`forge spawn`)
107
+
108
+ **Known cross-platform gaps identified:**
109
+ - `stat` for mtime (daemon): different flags on Linux vs macOS vs Git Bash
110
+ - `date -d` (daemon staleness): Linux-only, broken on macOS
111
+ - `flock`: Available on Linux, often missing on macOS (needs `brew install util-linux`) and Git Bash
112
+
113
+ ### BMAD
114
+
115
+ - Pure Node.js - inherently more portable than bash
116
+ - 25+ IDE platform targets defined in `platform-codes.yaml`
117
+ - Explicit Windows stdin `error` event suppression
118
+ - Path separators normalized (`replaceAll('\\', '/')`) before writing to files
119
+ - `.nvmrc` pins Node 22 for reproducibility
120
+
121
+ **Verdict:** BMAD's Node.js-first approach is more portable by default. Vibe Forge's bash-heavy implementation requires significant per-platform testing. The multi-OS CI matrix catches install failures but not runtime daemon behavior differences.
122
+
123
+ ---
124
+
125
+ ## 4. Automation Quality Assessment
126
+
127
+ ### Shell Scripts
128
+
129
+ The Vibe Forge bin scripts are well-structured and security-conscious for bash. Key observations:
130
+
131
+ **`bin/lib/database.sh`:**
132
+ - Proper SQL injection prevention via `db_escape()`
133
+ - Identifier validation (`db_validate_identifier()`)
134
+ - Numeric validation before interpolation
135
+ - Guard function `db_require_init()` prevents accidental uninitialized calls
136
+ - SQLite `ON CONFLICT DO UPDATE` (upsert) pattern is correct
137
+
138
+ **`bin/lib/constants.sh`:**
139
+ - Centralized exit codes (following sysexits.h conventions)
140
+ - Agent whitelist for security in `VALID_AGENTS`
141
+ - Comprehensive aliases map
142
+ - Well-commented, sync notes included
143
+ - `STALE_STATUS_THRESHOLD=300` but the staleness check in the daemon is broken on macOS (see above)
144
+
145
+ **`forge-setup.sh`:**
146
+ - Non-interactive mode flag for CI/automation
147
+ - Tech stack auto-detection from common project files
148
+ - Cross-platform config written correctly
149
+ - VCS detection via Node.js (`vcs.js`) rather than bash - smart choice for portability
150
+
151
+ **Idempotency:** Setup is largely idempotent (checks if config/context already exists). Daemon start checks for running PID. Task routing uses `safe_move_task()` which checks existence. Generally good.
152
+
153
+ **Error handling:** Scripts use `set -e`. Exit codes are standardized. Functions return meaningful codes. However, the daemon's `daemon_loop` traps `EXIT` but not `ERR` - an unhandled error in a loop iteration would not be logged before exit.
154
+
155
+ ---
156
+
157
+ ## 5. Monitoring and Observability
158
+
159
+ ### Vibe Forge
160
+
161
+ - `forge-state.yaml` - task counts, worker statuses, attention alerts (pull-based, refreshed by daemon)
162
+ - `context/agent-status/*.json` - per-agent status files (push-based, written by agents)
163
+ - `.forge/daemon.log` - daemon activity log (rotated at 1MB)
164
+ - `.forge/notifications.log` - human-readable notification history
165
+ - SQLite status history table (schema exists, data never written - dead)
166
+ - Platform-specific toast notifications for urgent alerts
167
+
168
+ **Missing:**
169
+ - No metrics (task throughput, avg completion time, worker utilization)
170
+ - No structured logging (plain text, hard to parse/query)
171
+ - No alerting on daemon death
172
+ - No CI visibility into per-agent performance over time
173
+ - The `status_history` table would provide all of this if actually populated
174
+
175
+ ### BMAD
176
+
177
+ - Discord webhook for release/PR/issue events (external visibility)
178
+ - `--debug` flag for manifest generation tracing
179
+ - npm version check on CLI startup
180
+ - Verbose clack/prompts output during install
181
+
182
+ BMAD has no operational monitoring (no daemon to monitor). Its observability is release-event-driven, not runtime-operational.
183
+
184
+ ---
185
+
186
+ ## 6. Container Support
187
+
188
+ ### Vibe Forge
189
+
190
+ None. No Dockerfile, no `docker-compose.yml`, no container references anywhere.
191
+
192
+ ### BMAD
193
+
194
+ None. By design - purely a CLI + Markdown content package.
195
+
196
+ **Assessment for Vibe Forge:** Container support is not clearly needed yet. The forge runs on developer workstations, not in servers. However, a `Dockerfile` for the daemon would enable:
197
+ - Running the forge backend in CI environments without a full developer machine
198
+ - Reproducible daemon environment (solves cross-platform bash issues)
199
+ - Future hosted/SaaS mode
200
+
201
+ This is a future concern, not a current gap.
202
+
203
+ ---
204
+
205
+ ## 7. Environment Management
206
+
207
+ ### Vibe Forge
208
+
209
+ - `.forge/config.json` stores platform, git bash path, vcs type, validated flag, daemon/worker-loop preferences
210
+ - `context/project-context.md` holds project-specific context for agents
211
+ - No `.env` file pattern
212
+ - No environment variable management beyond `CLAUDE_CODE_GIT_BASH_PATH`
213
+ - Node version not pinned (no `.nvmrc`)
214
+ - npm version pinned in `publish.yml` but not project-wide
215
+
216
+ ### BMAD
217
+
218
+ - Node version pinned to 22 via `.nvmrc`
219
+ - npm `engines` field in `package.json` (`>=20.0.0`)
220
+ - Installation options stored in project config, not environment variables
221
+ - No secrets management (no server-side runtime)
222
+
223
+ **Gap: No `.nvmrc`/`engines` in Vibe Forge.** If a contributor's local Node differs from the CI Node (`20` in CI currently), subtle incompatibilities can emerge. The CI uses Node 20 but nothing enforces this locally.
224
+
225
+ ---
226
+
227
+ ## 8. Release Automation (Herald Comparison)
228
+
229
+ ### Vibe Forge Herald
230
+
231
+ Herald is described as the Release Manager agent. Its personality handles deployment and release coordination. The `publish.yml` workflow handles the technical publication to npm.
232
+
233
+ Current release flow:
234
+ 1. Manual GitHub Release creation triggers `publish.yml`
235
+ 2. Workflow validates optional version input (semver)
236
+ 3. Bumps version if provided
237
+ 4. Publishes to npm with provenance
238
+ 5. Verifies npm availability after 30s
239
+
240
+ ### BMAD Release Flow
241
+
242
+ 1. Automatic `@next` prerelease on every main push (touching source)
243
+ 2. Manual `workflow_dispatch` promotes to `@latest`
244
+ 3. Version computed from npm registry (not just package.json)
245
+ 4. Commits version bump + creates git tag using GitHub App token (bypasses branch protection)
246
+ 5. Generates GitHub Release from `CHANGELOG.md` section
247
+ 6. Discord notification to community
248
+
249
+ **Gaps in Vibe Forge:**
250
+ - No `@next` / prerelease channel
251
+ - No automatic CHANGELOG-to-Release-notes extraction
252
+ - No git tag creation in CI (manual tagging required)
253
+ - No community notification on release
254
+ - Verify step uses `sleep 30` which is fragile (npm propagation can take longer)
255
+
256
+ ---
257
+
258
+ ## 9. Summary: Gaps and Recommendations
259
+
260
+ ### P1 - High Impact, Low Effort
261
+
262
+ 1. **Add `.nvmrc` and `engines` field to `package.json`** - Pin Node version for reproducibility. CI uses Node 20; enforce it locally too.
263
+
264
+ 2. **Add `markdownlint` to CI** - All agent personalities, task templates, and docs are Markdown. Currently zero lint coverage on them. `markdownlint-cli2` is easy to add as a parallel job.
265
+
266
+ 3. **Fix `date -d` macOS incompatibility in daemon** - The staleness detection in `build_worker_status()` and `display_worker_status()` is dead on macOS due to BSD `date` syntax. This silently breaks a key monitoring feature.
267
+
268
+ 4. **Fix `stat` mtime on Git Bash/Windows in daemon** - The mtime comparison for status file change detection always falls back to `0` on Windows Git Bash, causing the daemon to re-read and re-sync all agent status files on every iteration.
269
+
270
+ 5. **Wire up `db_record_status_history()`** - The history table schema, index, and pruning are all implemented but `db_record_status_history()` is never called. Call it in `db_upsert_agent_status()` to enable metrics. One line of change, unlocks task throughput and worker utilization analytics.
271
+
272
+ ### P2 - High Impact, Medium Effort
273
+
274
+ 6. **Add Husky pre-commit hooks** - Mirror CI checks locally (format, lint, shellcheck). Catches issues before push. Reduces CI feedback loop from minutes to seconds.
275
+
276
+ 7. **Add `@next` prerelease channel** - Automatic prerelease on main push. Allows testing of new agent/skill changes without touching `@latest`. Reduces risk of publishing broken releases to users.
277
+
278
+ 8. **Add prettier/formatting enforcement to CI** - Currently only shellcheck runs. JavaScript and Markdown files have no formatting gate. Inconsistent formatting accumulates over time.
279
+
280
+ 9. **Add daemon watchdog** - If the daemon crashes, workers continue writing status files but routing and state updates stop silently. A simple watchdog (cron or supervisor) that checks the PID and restarts the daemon would prevent invisible failures.
281
+
282
+ ### P3 - Medium Impact, Medium Effort
283
+
284
+ 10. **Maintenance interval: time-based, not iteration-based** - Replace `MAINTENANCE_INTERVAL=100` counter with an epoch-based last-maintenance timestamp check. This makes maintenance behavior predictable regardless of adaptive polling rate.
285
+
286
+ 11. **Graceful daemon stop** - `cmd_stop()` should wait for the daemon process to exit (with timeout) before removing PID/lock files, rather than fire-and-forget SIGTERM.
287
+
288
+ 12. **Add CHANGELOG-to-Release extraction in `publish.yml`** - Generate GitHub Release body from CHANGELOG automatically instead of requiring manual release notes. BMAD does this cleanly.
289
+
290
+ 13. **Structured daemon logging** - Replace plain-text daemon log with structured JSON lines. Enables future log analysis, metrics extraction, and tooling integration.
291
+
292
+ ### P4 - Lower Priority / Future
293
+
294
+ 14. **Discord/webhook release notifications** - Community transparency on releases. BMAD does this; adds engagement signal.
295
+ 15. **CodeRabbit or equivalent AI PR review** - Automated first-pass review on PRs.
296
+ 16. **Dockerfile for daemon** - Enables CI/hosted mode, solves cross-platform bash issues.
297
+ 17. **npm `@next` install docs** - If `@next` channel is added, document how to opt in.
298
+
299
+ ---
300
+
301
+ ## Acceptance Criteria Status
302
+
303
+ - [x] Read all relevant scripts and CI configs
304
+ - [x] Fetch and review BMAD repo
305
+ - [x] Identify daemon/orchestration improvements
306
+ - [x] Assess CI/CD gaps
307
+ - [x] Write findings to tasks/review/bmad-review-ember.md
@@ -0,0 +1,285 @@
1
+ ---
2
+ id: bmad-review-furnace
3
+ title: "BMAD vs Vibe Forge: Backend/Infrastructure Review"
4
+ completed_by: furnace
5
+ completed_at: 2026-03-31T00:00:00Z
6
+ epic: BMAD-REVIEW
7
+ ---
8
+
9
+ # BMAD vs Vibe Forge: Backend/Infrastructure Findings
10
+
11
+ Reviewed by: Furnace
12
+ Date: 2026-03-31
13
+ Focus: Backend agent, task data model, API scaffolding, data flow, error handling, daemon/orchestration
14
+
15
+ ---
16
+
17
+ ## 1. Backend Agent Comparison: Furnace vs BMAD's Amelia
18
+
19
+ ### BMAD's Approach
20
+
21
+ BMAD has **one generalist dev agent - Amelia** (`bmad-agent-dev`). She handles all code: frontend, backend, database, CLI. There is no frontend/backend split. Her skills are:
22
+ - `DS` - Develop story (implement a story end-to-end)
23
+ - `CR` - Code review
24
+
25
+ Supporting Amelia is **Bob (Scrum Master)** who owns story creation and fills in the Dev Notes section with architecture guardrails, relevant file paths, and tech constraints before Amelia ever touches code. This front-loading is explicit and enforced.
26
+
27
+ ### Vibe Forge's Approach
28
+
29
+ Furnace is domain-specialized (backend only). This is structurally sound for parallel multi-agent work but creates gaps:
30
+
31
+ **What BMAD does that Furnace doesn't:**
32
+
33
+ 1. **No pre-implementation story enrichment.** BMAD's create-story workflow (Bob) loads the full PRD, epics, architecture docs, and UX designs before writing the story. The resulting story file contains a "Dev Notes" section with:
34
+ - Architecture guardrails the dev MUST follow
35
+ - Relevant source tree paths to touch
36
+ - Testing standards summary
37
+ - Cross-referenced citations to architecture docs
38
+
39
+ Vibe Forge tasks have a "Relevant Files" section but no enforced architecture-grounding step. Agents receive tasks that may lack critical context.
40
+
41
+ 2. **No "Dev Agent Record" on completed work.** BMAD story files track:
42
+ - Agent model version used
43
+ - Completion notes
44
+ - Debug log references
45
+ - **Full file list** (every file changed)
46
+
47
+ Vibe Forge completion summaries have `files_modified` and `files_created` but no model version tracking and no debug log refs.
48
+
49
+ 3. **No HALT condition protocol.** BMAD's dev-story workflow defines explicit halt conditions:
50
+ - New external dependency required
51
+ - 3 consecutive failures on same test
52
+ - Missing or conflicting configuration
53
+ - Ambiguous requirements
54
+
55
+ Furnace just has "report blocked" with no structured criteria.
56
+
57
+ 4. **Strict TDD enforcement.** BMAD mandates red-green-refactor per task/subtask. Writing the failing test before implementation is a workflow step, not a guideline. Vibe Forge's patterns suggest TDD but don't enforce the sequence at the workflow level.
58
+
59
+ **What Furnace does better:**
60
+
61
+ - Domain ownership is explicit. Clear boundaries prevent agents from stepping on each other.
62
+ - Security consciousness is baked in (auth, validation, sanitization as principles).
63
+ - Result type pattern for error handling (`Result<T, E>`) is production-grade.
64
+
65
+ **Gap severity: High.** Missing story enrichment means Furnace may implement against wrong architecture assumptions.
66
+
67
+ ---
68
+
69
+ ## 2. Task Data Model Comparison
70
+
71
+ ### Vibe Forge Task (config/task-template.md)
72
+
73
+ ```
74
+ id, title, type, priority, status, assigned_to, blocked_by, depends_on,
75
+ estimated_complexity, epic, story (optional)
76
+ ```
77
+
78
+ Body sections: Context, Relevant Files, Dependencies, Background, Acceptance Criteria, Agent Instructions, Output Expected, Completion Summary.
79
+
80
+ ### BMAD Story Template
81
+
82
+ ```
83
+ Story N.M: Title
84
+ Status: (inline, not frontmatter)
85
+
86
+ ## Story (user story format: As a / I want / So that)
87
+ ## Acceptance Criteria (numbered, not checkboxes)
88
+ ## Tasks / Subtasks (checkbox tree with AC references)
89
+ ## Dev Notes (architecture refs, path refs, testing standards)
90
+ ## Dev Agent Record (model version, debug logs, file list, completion notes)
91
+ ```
92
+
93
+ ### Gap Analysis
94
+
95
+ | Dimension | Vibe Forge | BMAD | Gap |
96
+ |---|---|---|---|
97
+ | Routing metadata | ✅ type, assigned_to | ❌ none (human routes) | VF wins |
98
+ | Dependency tracking | ✅ blocked_by, depends_on | ❌ none in story | VF wins |
99
+ | Architecture grounding | ❌ optional background | ✅ Dev Notes (enforced) | BMAD wins |
100
+ | File list tracking | Partial (in completion) | ✅ per-task in Dev Agent Record | BMAD wins |
101
+ | Agent model versioning | ❌ missing | ✅ tracked | BMAD wins |
102
+ | User story framing | ❌ missing | ✅ As a/I want/So that | BMAD wins |
103
+ | Task/subtask tree | ❌ AC only | ✅ Tasks -> Subtasks with AC refs | BMAD wins |
104
+ | Completion checklist | Informal | ✅ formal checklist.md | BMAD wins |
105
+ | SLA / complexity timing | ✅ estimated_minutes per type | ❌ none | VF wins |
106
+ | Numeric story ordering | ❌ none | ✅ epic_num.story_num | BMAD wins |
107
+
108
+ **Three specific improvements to add:**
109
+
110
+ 1. **Add `tasks` section to task template** - a checkbox tree where each task maps to one or more AC items. BMAD's `- [ ] Task 1 (AC: #1)` format gives explicit AC traceability per implementation unit.
111
+
112
+ 2. **Add `dev_notes` section** - architecture guardrails, relevant source paths, tech constraints. Should be filled by Hub/Architect before assignment, not left to the implementing agent to discover.
113
+
114
+ 3. **Add `file_list` to Completion Summary** - every file created or modified, not just "files_created" and "files_modified" aggregates. This feeds Sentinel review and future metrics.
115
+
116
+ ---
117
+
118
+ ## 3. API/Service Project Scaffolding
119
+
120
+ ### BMAD
121
+
122
+ BMAD has `bmad-create-architecture` (Winston) which generates architecture documents before implementation begins. The `bmad-create-story` workflow then explicitly loads these architecture docs and injects relevant constraints into the story's Dev Notes. The flow is:
123
+
124
+ ```
125
+ Winston creates architecture doc -> Bob reads it when creating stories ->
126
+ Dev Notes contain specific file paths, patterns, and constraints ->
127
+ Amelia implements against grounded instructions
128
+ ```
129
+
130
+ BMAD also has `bmad-generate-project-context` for brownfield projects - generates a `project-context.md` that all agents load.
131
+
132
+ ### Vibe Forge
133
+
134
+ Furnace owns `/src/api/**`, `/src/services/**`, `/src/models/**`, `/src/middleware/**`, but:
135
+ - No scaffolding workflow exists
136
+ - No architecture-to-task injection pipeline
137
+ - `project-context.md` exists as a template but is populated manually
138
+ - No dedicated Architect agent that runs before implementation tasks are created (there is an `architect` agent in constants.sh but no corresponding task creation workflow)
139
+
140
+ **Specific gap:** Tasks arrive at Furnace without guaranteed architecture grounding. If the Architect agent defined `Result<T, E>` as the service layer pattern, that constraint should appear in every backend task's Dev Notes - not discovered by Furnace via convention.
141
+
142
+ **Improvement:** The Hub's task creation flow should have a step that loads architecture docs and injects relevant patterns into `dev_notes` before assigning to Furnace. This is workflow infrastructure, not just documentation.
143
+
144
+ ---
145
+
146
+ ## 4. Data Flow Between Agents
147
+
148
+ ### Vibe Forge
149
+
150
+ ```
151
+ Task file created in tasks/pending/
152
+ -> Daemon detects, notifies
153
+ -> Agent picks up, moves to tasks/in-progress/
154
+ -> Agent completes, moves to tasks/completed/
155
+ -> Daemon auto-routes to tasks/review/
156
+ -> Sentinel reviews, moves to tasks/approved/ or tasks/needs-changes/
157
+ -> Daemon auto-routes approved to tasks/merged/
158
+ ```
159
+
160
+ State is distributed: task files carry status, `context/agent-status/*.json` tracks live agent state, SQLite aggregates both.
161
+
162
+ ### BMAD
163
+
164
+ ```
165
+ sprint-status.yaml is the single coordination file
166
+ -> Agents read it to find next ready-for-dev story
167
+ -> Agent updates status in the file on start and completion
168
+ -> Human mediates agent transitions
169
+ ```
170
+
171
+ No daemon. State is centralized in one YAML file. No automated routing.
172
+
173
+ ### Gap Analysis
174
+
175
+ **Where Vibe Forge wins:** Fully automated routing. Agents don't need to manually poll or coordinate. The daemon handles task lifecycle transitions. OS-level notifications. SQLite metrics.
176
+
177
+ **Where BMAD wins:**
178
+
179
+ 1. **Sprint-status.yaml is a queryable state contract.** Any agent can inspect the full project's implementation state (all stories, all epics, backlog through done) from one file. Vibe Forge has no equivalent cross-task state view. `forge-state.yaml` has counts but not per-task status.
180
+
181
+ 2. **Stories carry forward learnings.** The create-story workflow reads previous story files when creating new ones, allowing accumulated implementation notes to inform the next story's Dev Notes. Vibe Forge tasks are independent - no mechanism to forward learnings between tasks.
182
+
183
+ 3. **Dependency resolution at story creation time.** By grounding stories in architecture docs before dev starts, BMAD reduces mid-task blockers. Vibe Forge tasks can arrive with unresolved architecture questions.
184
+
185
+ **Specific improvement:** Add a `context/sprint-state.yaml` that tracks per-task status, not just counts. The daemon should write task-level status entries (id, assigned_to, status, updated) when it routes tasks. This gives agents a single file to query: "what's in-progress? what just completed? what's blocked?"
186
+
187
+ ---
188
+
189
+ ## 5. Error Handling and Failure Patterns
190
+
191
+ ### BMAD
192
+
193
+ BMAD's dev-story workflow defines explicit **HALT conditions** - circumstances where the agent must stop and request human input:
194
+
195
+ - New external dependency required (package not in project)
196
+ - 3 consecutive test failures on the same test
197
+ - Configuration is missing or contradictory
198
+ - Story requirements are ambiguous or contradictory
199
+
200
+ BMAD also has a formal **Definition of Done checklist** (`checklist.md`) with explicit gates across: context, implementation, testing, documentation, and final status. The agent cannot self-declare completion without satisfying the checklist.
201
+
202
+ ### Vibe Forge
203
+
204
+ - `blocked` status exists but HALT criteria are undefined
205
+ - `/need-help` skill creates an attention file but no formal trigger conditions
206
+ - No Definition of Done checklist - completion is declared via agent-written summary
207
+ - No maximum retry / escalation policy
208
+
209
+ **Three specific improvements:**
210
+
211
+ 1. **Define HALT criteria in agent personality files.** Furnace should have an explicit list: "HALT and report blocked if: (a) required package not in package.json, (b) schema change needed that affects live data, (c) DB migration would be destructive, (d) auth pattern conflicts with existing middleware, (e) 3 consecutive test failures on same test."
212
+
213
+ 2. **Add a formal Definition of Done checklist** to `config/task-template.md`. Minimal for backend tasks:
214
+ - [ ] All acceptance criteria checked
215
+ - [ ] Unit tests written and passing
216
+ - [ ] Integration tests written and passing
217
+ - [ ] No linting errors
218
+ - [ ] File list complete in completion summary
219
+ - [ ] No hardcoded secrets
220
+ - [ ] Error paths handled (not swallowed)
221
+ - [ ] DB migration safe (no data loss without explicit warning)
222
+
223
+ 3. **Add escalation timeout.** If a task stays in `tasks/in-progress/` for longer than `estimated_minutes * 3`, the daemon should auto-escalate to `tasks/attention/`. Currently there is no time-based escalation.
224
+
225
+ ---
226
+
227
+ ## 6. Daemon/Orchestration Gap
228
+
229
+ ### Vibe Forge Daemon Strengths
230
+
231
+ The daemon is a genuine competitive advantage over BMAD:
232
+ - Automated task routing (completed -> review, approved -> merged)
233
+ - Adaptive polling (active: 5s, idle: 30s)
234
+ - SQLite state persistence with mtime-filtered sync
235
+ - OS-level toast notifications (Windows/macOS/Linux)
236
+ - Agent status staleness detection
237
+ - Log rotation and maintenance
238
+ - Symlink attack prevention, path traversal protection
239
+
240
+ BMAD has none of this - it is 100% human-mediated.
241
+
242
+ ### Daemon Gaps
243
+
244
+ 1. **No dependency resolution.** The daemon moves all completed tasks to review regardless of downstream task dependencies. If Task B depends on Task A, Task B should stay in pending until Task A is merged. The `depends_on` and `blocked_by` fields in the task frontmatter exist but the daemon does not act on them.
245
+
246
+ 2. **No time-based escalation.** Tasks can stall in `tasks/in-progress/` indefinitely. The daemon tracks `updated_at` per agent but does not correlate agent work duration against task `estimated_complexity`.
247
+
248
+ 3. **No dead-letter queue.** If a task file becomes corrupted or unparseable, the daemon logs a warning and moves on. There is no `tasks/failed/` folder for tasks that have errored out permanently.
249
+
250
+ 4. **No metrics API.** `status_history` table is populated but never surfaced. There is no way to query: average task completion time, which agents are slowest, task failure rates. The data exists, the query layer does not.
251
+
252
+ 5. **No cross-task sprint state.** As noted above, `forge-state.yaml` has counts but not per-task status. An agent cannot ask the daemon "what tasks are currently in-progress for the current epic?"
253
+
254
+ 6. **Completed tasks bypass review for this task type.** The task is type `review` but it gets auto-routed by the daemon to `tasks/review/` on completion. Review tasks routing to review creates a loop. The daemon should respect `task_types.yaml` `auto_assign: true` flags and not re-queue tasks that are themselves review outputs.
255
+
256
+ ---
257
+
258
+ ## Summary: Priority Improvements
259
+
260
+ | Priority | Gap | Effort |
261
+ |---|---|---|
262
+ | HIGH | Add `dev_notes` to task template (architecture guardrails, relevant paths) | Low |
263
+ | HIGH | Add `tasks` subtask tree to task template (with AC refs) | Low |
264
+ | HIGH | Define HALT criteria per agent personality | Low |
265
+ | HIGH | Add formal DoD checklist to task template | Low |
266
+ | MEDIUM | Daemon: time-based escalation for stale in-progress tasks | Medium |
267
+ | MEDIUM | Daemon: dependency resolution (hold tasks with unresolved depends_on) | Medium |
268
+ | MEDIUM | Add `context/sprint-state.yaml` with per-task status (daemon-maintained) | Medium |
269
+ | MEDIUM | Add `file_list` to completion summary (not just created/modified split) | Low |
270
+ | LOW | Daemon: dead-letter queue (tasks/failed/) | Medium |
271
+ | LOW | Daemon: surface status_history as metrics endpoint | Medium |
272
+
273
+ ---
274
+
275
+ ## Files Reviewed
276
+
277
+ - `agents/furnace/personality.md`
278
+ - `bin/forge-daemon.sh`
279
+ - `bin/lib/database.sh`
280
+ - `bin/lib/constants.sh`
281
+ - `config/task-template.md`
282
+ - `config/task-types.yaml`
283
+ - BMAD repo: `src/bmm-skills/` (all phases, fetched via GitHub API)
284
+ - BMAD: `bmad-agent-dev`, `bmad-agent-sm`, `bmad-dev-story`, `bmad-create-story` workflows
285
+ - BMAD: `module.yaml`, story template, checklist.md