@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,126 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Vibe Forge - Cross-Platform Utilities
4
+ # Source this file in other scripts: source "$SCRIPT_DIR/lib/util.sh"
5
+ #
6
+ # Contains cross-platform helper functions that abstract away differences
7
+ # between macOS/BSD, Linux, and Windows (Git Bash).
8
+ #
9
+
10
+ # =============================================================================
11
+ # Cross-Platform sed In-Place Editing
12
+ # =============================================================================
13
+ # macOS/BSD sed requires `sed -i ''` (empty string for backup extension)
14
+ # Linux/GNU sed requires `sed -i` (no argument after -i)
15
+ # Windows Git Bash uses GNU sed, so same as Linux
16
+ #
17
+ # Usage:
18
+ # sed_inplace 's/foo/bar/' file.txt
19
+ # sed_inplace 's/foo/bar/g' file.txt
20
+ #
21
+ # Arguments:
22
+ # $1 - sed expression (the pattern to apply)
23
+ # $2 - file to edit
24
+ #
25
+ # Returns:
26
+ # 0 on success, non-zero on failure
27
+ #
28
+ # Example:
29
+ # sed_inplace 's/"validated": false/"validated": true/' "$config_file"
30
+
31
+ sed_inplace() {
32
+ local pattern="$1"
33
+ local file="$2"
34
+
35
+ # Validate arguments
36
+ if [[ -z "$pattern" ]]; then
37
+ echo "sed_inplace: error: pattern argument required" >&2
38
+ return 1
39
+ fi
40
+
41
+ if [[ -z "$file" ]]; then
42
+ echo "sed_inplace: error: file argument required" >&2
43
+ return 1
44
+ fi
45
+
46
+ if [[ ! -f "$file" ]]; then
47
+ echo "sed_inplace: error: file does not exist: $file" >&2
48
+ return 1
49
+ fi
50
+
51
+ # SECURITY: Refuse to edit symlinks to prevent symlink attacks
52
+ if [[ -L "$file" ]]; then
53
+ echo "sed_inplace: error: refusing to edit symlink: $file" >&2
54
+ return 1
55
+ fi
56
+
57
+ # Platform-specific sed invocation
58
+ if [[ "$(uname)" == "Darwin" ]]; then
59
+ # macOS/BSD sed requires empty string after -i
60
+ sed -i '' "$pattern" "$file"
61
+ else
62
+ # Linux and Windows (Git Bash) use GNU sed
63
+ sed -i "$pattern" "$file"
64
+ fi
65
+ }
66
+
67
+ # =============================================================================
68
+ # Detect Platform
69
+ # =============================================================================
70
+ # Returns a normalized platform name
71
+ #
72
+ # Usage:
73
+ # platform=$(get_platform)
74
+ # if [[ "$platform" == "macos" ]]; then ...
75
+ #
76
+ # Returns:
77
+ # "windows" - Windows (detected via MINGW/MSYS/Cygwin environment)
78
+ # "macos" - macOS (Darwin)
79
+ # "linux" - Linux
80
+ # "unknown" - Unrecognized platform
81
+
82
+ get_platform() {
83
+ case "$(uname -s)" in
84
+ MINGW*|MSYS*|CYGWIN*)
85
+ echo "windows"
86
+ ;;
87
+ Darwin)
88
+ echo "macos"
89
+ ;;
90
+ Linux)
91
+ echo "linux"
92
+ ;;
93
+ *)
94
+ echo "unknown"
95
+ ;;
96
+ esac
97
+ }
98
+
99
+ # =============================================================================
100
+ # Check if running in Git Bash on Windows
101
+ # =============================================================================
102
+ # Useful for Windows-specific behavior that differs from Linux
103
+
104
+ is_git_bash() {
105
+ [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]]
106
+ }
107
+
108
+ # =============================================================================
109
+ # Cross-Platform stat for File Size
110
+ # =============================================================================
111
+ # macOS uses `stat -f%z` while Linux uses `stat --format=%s`
112
+ #
113
+ # Usage:
114
+ # size=$(get_file_size file.txt)
115
+
116
+ get_file_size() {
117
+ local file="$1"
118
+
119
+ if [[ ! -f "$file" ]]; then
120
+ echo 0
121
+ return 1
122
+ fi
123
+
124
+ # Try macOS/BSD syntax first, fall back to GNU syntax
125
+ stat -f%z "$file" 2>/dev/null || stat --format=%s "$file" 2>/dev/null || echo 0
126
+ }
package/bin/lib/vcs.js ADDED
@@ -0,0 +1,349 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Vibe Forge - VCS Detection and Configuration
4
+ *
5
+ * Detects version control system and platform from project structure.
6
+ * Used by forge-setup.sh and /configure-vcs skill.
7
+ *
8
+ * Usage:
9
+ * node vcs.js detect [project-path] Detect VCS type
10
+ * node vcs.js get [project-path] Get current VCS config
11
+ * node vcs.js set <type> [project-path] Set VCS type manually
12
+ * node vcs.js init <type> [project-path] Initialize VCS folders
13
+ */
14
+
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+
18
+ // VCS types and their detection patterns
19
+ const VCS_TYPES = {
20
+ github: {
21
+ name: 'GitHub',
22
+ detect: ['.github/', '.github/workflows/'],
23
+ folders: ['.github/workflows'],
24
+ prCommand: 'gh pr create',
25
+ ciFile: '.github/workflows/ci.yml',
26
+ },
27
+ gitlab: {
28
+ name: 'GitLab',
29
+ detect: ['.gitlab-ci.yml', '.gitlab/'],
30
+ folders: ['.gitlab'],
31
+ prCommand: 'git push -o merge_request.create',
32
+ ciFile: '.gitlab-ci.yml',
33
+ },
34
+ gitea: {
35
+ name: 'Gitea',
36
+ detect: ['.gitea/', '.gitea/workflows/'],
37
+ folders: ['.gitea/workflows'],
38
+ prCommand: 'tea pr create',
39
+ ciFile: '.gitea/workflows/ci.yml',
40
+ },
41
+ bitbucket: {
42
+ name: 'Bitbucket',
43
+ detect: ['bitbucket-pipelines.yml'],
44
+ folders: [],
45
+ prCommand: 'Manual PR via Bitbucket UI',
46
+ ciFile: 'bitbucket-pipelines.yml',
47
+ },
48
+ 'azure-devops': {
49
+ name: 'Azure DevOps',
50
+ detect: ['azure-pipelines.yml', '.azure/'],
51
+ folders: ['.azure'],
52
+ prCommand: 'az repos pr create',
53
+ ciFile: 'azure-pipelines.yml',
54
+ },
55
+ 'git-only': {
56
+ name: 'Git (no platform)',
57
+ detect: ['.git/'],
58
+ folders: [],
59
+ prCommand: null,
60
+ ciFile: null,
61
+ },
62
+ none: {
63
+ name: 'No VCS',
64
+ detect: [],
65
+ folders: [],
66
+ prCommand: null,
67
+ ciFile: null,
68
+ },
69
+ };
70
+
71
+ /**
72
+ * Detect VCS type from project structure
73
+ */
74
+ function detectVcs(projectPath = process.cwd()) {
75
+ const result = {
76
+ type: 'none',
77
+ autoDetected: true,
78
+ hasGit: false,
79
+ platform: null,
80
+ confidence: 'low',
81
+ };
82
+
83
+ // Check for .git directory first
84
+ const gitDir = path.join(projectPath, '.git');
85
+ if (fs.existsSync(gitDir)) {
86
+ result.hasGit = true;
87
+ result.type = 'git-only';
88
+ result.confidence = 'medium';
89
+ }
90
+
91
+ // Check for platform-specific indicators (in order of specificity)
92
+ const platforms = ['github', 'gitlab', 'gitea', 'azure-devops', 'bitbucket'];
93
+
94
+ for (const platform of platforms) {
95
+ const config = VCS_TYPES[platform];
96
+ for (const pattern of config.detect) {
97
+ const checkPath = path.join(projectPath, pattern);
98
+ if (fs.existsSync(checkPath)) {
99
+ result.type = platform;
100
+ result.platform = config.name;
101
+ result.confidence = 'high';
102
+ return result;
103
+ }
104
+ }
105
+ }
106
+
107
+ // Try to detect from git remote
108
+ if (result.hasGit) {
109
+ try {
110
+ const gitConfigPath = path.join(gitDir, 'config');
111
+ if (fs.existsSync(gitConfigPath)) {
112
+ const gitConfig = fs.readFileSync(gitConfigPath, 'utf8');
113
+
114
+ if (gitConfig.includes('github.com')) {
115
+ result.type = 'github';
116
+ result.platform = 'GitHub';
117
+ result.confidence = 'medium';
118
+ } else if (gitConfig.includes('gitlab.com') || gitConfig.includes('gitlab')) {
119
+ result.type = 'gitlab';
120
+ result.platform = 'GitLab';
121
+ result.confidence = 'medium';
122
+ } else if (gitConfig.includes('gitea') || gitConfig.includes('codeberg.org')) {
123
+ // Gitea instances (including Codeberg which runs on Gitea)
124
+ result.type = 'gitea';
125
+ result.platform = 'Gitea';
126
+ result.confidence = 'medium';
127
+ } else if (gitConfig.includes('bitbucket.org')) {
128
+ result.type = 'bitbucket';
129
+ result.platform = 'Bitbucket';
130
+ result.confidence = 'medium';
131
+ } else if (gitConfig.includes('dev.azure.com') || gitConfig.includes('visualstudio.com')) {
132
+ result.type = 'azure-devops';
133
+ result.platform = 'Azure DevOps';
134
+ result.confidence = 'medium';
135
+ }
136
+ }
137
+ } catch (e) {
138
+ // Ignore git config read errors
139
+ }
140
+ }
141
+
142
+ return result;
143
+ }
144
+
145
+ /**
146
+ * Get current VCS configuration from forge config
147
+ */
148
+ function getVcsConfig(projectPath = process.cwd()) {
149
+ const configFile = path.join(projectPath, '.forge', 'config.json');
150
+
151
+ if (!fs.existsSync(configFile)) {
152
+ return null;
153
+ }
154
+
155
+ try {
156
+ const config = JSON.parse(fs.readFileSync(configFile, 'utf8'));
157
+ return config.vcs || null;
158
+ } catch (e) {
159
+ return null;
160
+ }
161
+ }
162
+
163
+ /**
164
+ * Save VCS configuration to forge config
165
+ */
166
+ function setVcsConfig(vcsType, projectPath = process.cwd()) {
167
+ const configDir = path.join(projectPath, '.forge');
168
+ const configFile = path.join(configDir, 'config.json');
169
+
170
+ // Ensure directory exists
171
+ if (!fs.existsSync(configDir)) {
172
+ fs.mkdirSync(configDir, { recursive: true });
173
+ }
174
+
175
+ // Load existing config or create new
176
+ let config = {};
177
+ if (fs.existsSync(configFile)) {
178
+ try {
179
+ config = JSON.parse(fs.readFileSync(configFile, 'utf8'));
180
+ } catch (e) {
181
+ // Start fresh if invalid
182
+ }
183
+ }
184
+
185
+ // Validate VCS type
186
+ if (!VCS_TYPES[vcsType]) {
187
+ console.error(`Invalid VCS type: ${vcsType}`);
188
+ console.error(`Valid types: ${Object.keys(VCS_TYPES).join(', ')}`);
189
+ process.exit(1);
190
+ }
191
+
192
+ // Update VCS config
193
+ config.vcs = {
194
+ type: vcsType,
195
+ name: VCS_TYPES[vcsType].name,
196
+ autoDetected: false,
197
+ lastUpdated: new Date().toISOString(),
198
+ };
199
+
200
+ fs.writeFileSync(configFile, JSON.stringify(config, null, 2) + '\n');
201
+
202
+ return config.vcs;
203
+ }
204
+
205
+ /**
206
+ * Initialize VCS folders for the selected platform
207
+ */
208
+ function initVcsFolders(vcsType, projectPath = process.cwd()) {
209
+ if (!VCS_TYPES[vcsType]) {
210
+ console.error(`Invalid VCS type: ${vcsType}`);
211
+ process.exit(1);
212
+ }
213
+
214
+ const config = VCS_TYPES[vcsType];
215
+ const created = [];
216
+
217
+ // Initialize .git if needed and type isn't 'none'
218
+ if (vcsType !== 'none') {
219
+ const gitDir = path.join(projectPath, '.git');
220
+ if (!fs.existsSync(gitDir)) {
221
+ // Don't auto-init git, just note it's needed
222
+ console.log('Note: Run "git init" to initialize git repository');
223
+ }
224
+ }
225
+
226
+ // Create platform-specific folders
227
+ for (const folder of config.folders) {
228
+ const folderPath = path.join(projectPath, folder);
229
+ if (!fs.existsSync(folderPath)) {
230
+ fs.mkdirSync(folderPath, { recursive: true });
231
+ created.push(folder);
232
+ }
233
+ }
234
+
235
+ return created;
236
+ }
237
+
238
+ /**
239
+ * Get workflow guidance for the detected VCS type
240
+ */
241
+ function getWorkflowGuidance(vcsType) {
242
+ const config = VCS_TYPES[vcsType];
243
+ if (!config) return null;
244
+
245
+ return {
246
+ type: vcsType,
247
+ name: config.name,
248
+ prCommand: config.prCommand,
249
+ ciFile: config.ciFile,
250
+ branchWorkflow: vcsType !== 'none',
251
+ hasPullRequests: config.prCommand !== null,
252
+ hasCI: config.ciFile !== null,
253
+ };
254
+ }
255
+
256
+ // CLI interface
257
+ function main() {
258
+ const args = process.argv.slice(2);
259
+ const command = args[0] || 'detect';
260
+ const arg1 = args[1];
261
+ const arg2 = args[2];
262
+
263
+ switch (command) {
264
+ case 'detect': {
265
+ const projectPath = arg1 || process.cwd();
266
+ const result = detectVcs(projectPath);
267
+ console.log(JSON.stringify(result, null, 2));
268
+ break;
269
+ }
270
+
271
+ case 'get': {
272
+ const projectPath = arg1 || process.cwd();
273
+ const config = getVcsConfig(projectPath);
274
+ if (config) {
275
+ console.log(JSON.stringify(config, null, 2));
276
+ } else {
277
+ console.log('null');
278
+ process.exit(1);
279
+ }
280
+ break;
281
+ }
282
+
283
+ case 'set': {
284
+ const vcsType = arg1;
285
+ const projectPath = arg2 || process.cwd();
286
+ if (!vcsType) {
287
+ console.error('Usage: node vcs.js set <type> [project-path]');
288
+ console.error(`Types: ${Object.keys(VCS_TYPES).join(', ')}`);
289
+ process.exit(1);
290
+ }
291
+ const result = setVcsConfig(vcsType, projectPath);
292
+ console.log(JSON.stringify(result, null, 2));
293
+ break;
294
+ }
295
+
296
+ case 'init': {
297
+ const vcsType = arg1;
298
+ const projectPath = arg2 || process.cwd();
299
+ if (!vcsType) {
300
+ console.error('Usage: node vcs.js init <type> [project-path]');
301
+ process.exit(1);
302
+ }
303
+ const created = initVcsFolders(vcsType, projectPath);
304
+ setVcsConfig(vcsType, projectPath);
305
+ console.log(JSON.stringify({ type: vcsType, foldersCreated: created }, null, 2));
306
+ break;
307
+ }
308
+
309
+ case 'guidance': {
310
+ const vcsType = arg1;
311
+ if (!vcsType) {
312
+ console.error('Usage: node vcs.js guidance <type>');
313
+ process.exit(1);
314
+ }
315
+ const guidance = getWorkflowGuidance(vcsType);
316
+ console.log(JSON.stringify(guidance, null, 2));
317
+ break;
318
+ }
319
+
320
+ case 'types': {
321
+ const types = Object.entries(VCS_TYPES).map(([key, val]) => ({
322
+ type: key,
323
+ name: val.name,
324
+ }));
325
+ console.log(JSON.stringify(types, null, 2));
326
+ break;
327
+ }
328
+
329
+ default:
330
+ console.error(`Unknown command: ${command}`);
331
+ console.error('Commands: detect, get, set, init, guidance, types');
332
+ process.exit(1);
333
+ }
334
+ }
335
+
336
+ // Export for use as module
337
+ module.exports = {
338
+ detectVcs,
339
+ getVcsConfig,
340
+ setVcsConfig,
341
+ initVcsFolders,
342
+ getWorkflowGuidance,
343
+ VCS_TYPES,
344
+ };
345
+
346
+ // Run CLI if executed directly
347
+ if (require.main === module) {
348
+ main();
349
+ }
@@ -0,0 +1,203 @@
1
+ # Vibe Forge Agent Manifest - DOCUMENTATION ONLY
2
+ # ================================================
3
+ # WARNING: This file is NON-NORMATIVE documentation.
4
+ #
5
+ # SINGLE SOURCE OF TRUTH: config/agents.json
6
+ #
7
+ # This file provides rich documentation about agent personalities, principles,
8
+ # and communication styles. It is NOT read by code. Any changes to agent
9
+ # configuration MUST be made in agents.json.
10
+ #
11
+ # The information here is supplementary for human readers and can be used
12
+ # as a reference when crafting agent personality files in agents/<name>/personality.md
13
+ #
14
+ # Last sync with agents.json: 2026-01-16
15
+
16
+ version: "1.0.0"
17
+ _status: "documentation-only"
18
+
19
+ # Core Agents - Always available
20
+ core_agents:
21
+ hub:
22
+ name: "Planning Hub"
23
+ aliases: ["planning", "master", "forge-master"]
24
+ icon: "โš’๏ธ"
25
+ role: "Chief Orchestrator"
26
+ type: orchestrator
27
+ persistent: true
28
+ terminal_tab: 1
29
+ description: "Task distribution, progress tracking, agent coordination"
30
+ source: "bmad-master"
31
+ personality: "/agents/planning-hub/personality.md"
32
+ capabilities: "/agents/planning-hub/capabilities.md"
33
+ context_template: "/agents/planning-hub/context-template.md"
34
+
35
+ temper:
36
+ name: "Temper"
37
+ icon: "โš–๏ธ"
38
+ role: "Code Reviewer"
39
+ type: reviewer
40
+ persistent: true
41
+ terminal_tab: 5
42
+ description: "Quality gates, code review, PR approval"
43
+ source: "new"
44
+ personality: "/agents/temper/personality.md"
45
+ communication_style: "Adversarial but constructive. Finds problems others miss. Never says 'looks good' without evidence."
46
+ principles:
47
+ - "Every PR hides at least one issue - find it"
48
+ - "Review for correctness first, style second"
49
+ - "Security and performance are non-negotiable"
50
+ - "Praise specific good decisions, not general quality"
51
+
52
+ # Worker Agents - Spun up per task or persistent
53
+ worker_agents:
54
+ anvil:
55
+ name: "Anvil"
56
+ icon: "๐Ÿ”จ"
57
+ role: "Frontend Developer"
58
+ type: worker
59
+ persistent: true
60
+ terminal_tab: 2
61
+ description: "UI components, React/Vue, CSS, client-side logic"
62
+ source: "dev (Amelia)"
63
+ task_types: ["frontend", "component", "ui", "styling"]
64
+ communication_style: "Ultra-succinct. Speaks in file paths and component names. No fluff, all precision."
65
+ principles:
66
+ - "Component isolation - props in, events out"
67
+ - "Accessibility is not optional"
68
+ - "Test user interactions, not implementation"
69
+ - "Performance budget is sacred"
70
+
71
+ furnace:
72
+ name: "Furnace"
73
+ icon: "๐Ÿ”ฅ"
74
+ role: "Backend Developer"
75
+ type: worker
76
+ persistent: true
77
+ terminal_tab: 3
78
+ description: "API endpoints, database, server logic, services"
79
+ source: "dev (Amelia)"
80
+ task_types: ["backend", "api", "database", "service"]
81
+ communication_style: "Terse and technical. Thinks in data flows and error states. Documents edge cases obsessively."
82
+ principles:
83
+ - "API contracts are promises - don't break them"
84
+ - "Handle errors explicitly, never swallow"
85
+ - "Database migrations are one-way streets"
86
+ - "Log what matters, not everything"
87
+
88
+ crucible:
89
+ name: "Crucible"
90
+ icon: "๐Ÿงช"
91
+ role: "Tester / QA"
92
+ type: worker
93
+ persistent: true
94
+ terminal_tab: 4
95
+ description: "Test writing, bug hunting, quality validation"
96
+ source: "tea (Murat)"
97
+ task_types: ["test", "qa", "bugfix", "e2e"]
98
+ communication_style: "Risk-focused. Speaks in test scenarios and edge cases. Celebrates finding bugs."
99
+ principles:
100
+ - "If it's not tested, it's broken"
101
+ - "Test behavior, not implementation"
102
+ - "Flaky tests are worse than no tests"
103
+ - "Bug reports need reproduction steps"
104
+
105
+ scribe:
106
+ name: "Scribe"
107
+ icon: "๐Ÿ“œ"
108
+ role: "Documentation Specialist"
109
+ type: worker
110
+ persistent: false
111
+ description: "Docs, README, API documentation, inline comments"
112
+ source: "tech-writer (Paige)"
113
+ task_types: ["docs", "readme", "api-docs", "comments"]
114
+ communication_style: "Patient educator. Makes complex simple. Celebrates clarity."
115
+ principles:
116
+ - "Documentation is teaching"
117
+ - "Examples > explanations"
118
+ - "Keep docs near code"
119
+ - "Update docs with code changes"
120
+
121
+ herald:
122
+ name: "Herald"
123
+ icon: "๐Ÿ“ฏ"
124
+ role: "Release Manager"
125
+ type: worker
126
+ persistent: false
127
+ description: "Versioning, changelog, deployment, release notes"
128
+ source: "new"
129
+ task_types: ["release", "deploy", "changelog", "version"]
130
+ communication_style: "Ceremonial and precise. Treats releases as milestones. Documents everything."
131
+ principles:
132
+ - "Semantic versioning is law"
133
+ - "Changelogs tell stories"
134
+ - "Release notes are for users"
135
+ - "Rollback plans are mandatory"
136
+
137
+ # Optional Specialist Agents - On-demand only
138
+ specialist_agents:
139
+ ember:
140
+ name: "Ember"
141
+ icon: "โš™๏ธ"
142
+ role: "DevOps Engineer"
143
+ type: specialist
144
+ persistent: false
145
+ description: "Infrastructure, CI/CD, Docker, server management"
146
+ source: "new"
147
+ task_types: ["devops", "infra", "ci-cd", "docker"]
148
+ communication_style: "Infrastructure-first thinking. Speaks in pipelines and containers."
149
+ principles:
150
+ - "Automate everything repeatable"
151
+ - "Infrastructure as code"
152
+ - "Monitoring before shipping"
153
+
154
+ aegis:
155
+ name: "Aegis"
156
+ icon: "๐Ÿ”’"
157
+ role: "Security Specialist"
158
+ type: specialist
159
+ persistent: false
160
+ description: "Security audit, vulnerability assessment, hardening"
161
+ source: "new"
162
+ task_types: ["security", "audit", "vulnerability"]
163
+ requires_approval: true
164
+ communication_style: "Paranoid by design. Assumes breach. Questions everything."
165
+ principles:
166
+ - "Defense in depth"
167
+ - "Least privilege always"
168
+ - "Security is everyone's job"
169
+
170
+ # Agent Communication Settings
171
+ communication:
172
+ method: "file-based" # file-based | websocket | hybrid
173
+ task_poll_interval_ms: 1000
174
+ heartbeat_interval_ms: 5000
175
+ notification_method: "hybrid" # File watchers + optional WebSocket
176
+
177
+ # Terminal Layout (Windows Terminal)
178
+ terminal_layout:
179
+ tab_1:
180
+ name: "Forge Master"
181
+ split: true
182
+ left: "agent" # Claude Code session
183
+ right: "output" # Command output
184
+ tab_2:
185
+ name: "Anvil (Frontend)"
186
+ split: true
187
+ left: "agent"
188
+ right: "output"
189
+ tab_3:
190
+ name: "Furnace (Backend)"
191
+ split: true
192
+ left: "agent"
193
+ right: "output"
194
+ tab_4:
195
+ name: "Crucible (Testing)"
196
+ split: true
197
+ left: "agent"
198
+ right: "output"
199
+ tab_5:
200
+ name: "Sentinel (Review)"
201
+ split: true
202
+ left: "agent"
203
+ right: "output"