vibe-forge 0.4.0 → 0.8.2
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/.claude/commands/clear-attention.md +63 -63
- package/.claude/commands/compact-context.md +52 -0
- package/.claude/commands/configure-vcs.md +5 -5
- package/.claude/commands/forge.md +50 -3
- package/.claude/commands/need-help.md +77 -77
- package/.claude/commands/update-status.md +64 -64
- package/.claude/commands/worker-loop.md +106 -106
- package/.claude/hooks/worker-loop.js +37 -4
- package/.claude/scripts/setup-worker-loop.sh +45 -45
- package/.claude/settings.json +89 -0
- package/LICENSE +21 -21
- package/README.md +211 -232
- package/agents/aegis/personality.md +35 -1
- package/agents/anvil/personality.md +39 -1
- package/agents/architect/personality.md +26 -0
- package/agents/crucible/personality.md +54 -1
- package/agents/crucible-x/personality.md +210 -0
- package/agents/ember/personality.md +29 -1
- package/agents/flux/personality.md +248 -0
- package/agents/furnace/personality.md +52 -1
- package/agents/herald/personality.md +3 -1
- package/agents/loki/personality.md +108 -0
- package/agents/oracle/personality.md +284 -0
- package/agents/pixel/personality.md +140 -0
- package/agents/planning-hub/personality.md +222 -0
- package/agents/scribe/personality.md +3 -1
- package/agents/slag/personality.md +268 -0
- package/agents/{sentinel → temper}/personality.md +85 -9
- package/bin/cli.js +77 -30
- package/bin/dashboard/api/agents.js +333 -0
- package/bin/dashboard/api/dispatch.js +507 -0
- package/bin/dashboard/api/tasks.js +416 -0
- package/bin/dashboard/public/assets/index-BpHfsx1r.js +2 -0
- package/bin/dashboard/public/assets/index-QODv4Zn9.css +1 -0
- package/bin/dashboard/public/index.html +14 -0
- package/bin/dashboard/server.js +645 -0
- package/bin/forge-daemon.sh +176 -550
- package/bin/forge-setup.sh +28 -11
- package/bin/forge-spawn.sh +5 -5
- package/bin/forge.cmd +83 -83
- package/bin/forge.sh +210 -31
- package/config/agent-manifest.yaml +237 -243
- package/config/agents.json +207 -132
- package/config/task-types.yaml +111 -106
- package/context/agent-overrides/README.md +41 -0
- package/context/architecture.md +42 -0
- package/context/modern-conventions.md +129 -129
- package/docs/agents.md +473 -409
- package/docs/architecture.md +194 -162
- package/docs/commands.md +451 -388
- package/docs/security.md +195 -144
- package/package.json +38 -11
- package/src/lib/check-aliases.js +50 -0
- package/{bin → src}/lib/colors.sh +2 -1
- package/src/lib/config.sh +347 -0
- package/{bin → src}/lib/constants.sh +48 -13
- package/src/lib/daemon/budgets.sh +107 -0
- package/src/lib/daemon/dependencies.sh +146 -0
- package/src/lib/daemon/display.sh +128 -0
- package/src/lib/daemon/notifications.sh +273 -0
- package/src/lib/daemon/routing.sh +93 -0
- package/src/lib/daemon/state.sh +163 -0
- package/src/lib/daemon/sync.sh +103 -0
- package/{bin → src}/lib/database.sh +52 -0
- package/src/lib/frontmatter.js +106 -0
- package/src/lib/heimdall-setup.js +113 -0
- package/src/lib/heimdall.js +265 -0
- package/src/lib/index.sh +25 -0
- package/{bin → src}/lib/json.sh +7 -1
- package/{bin → src}/lib/terminal.js +7 -1
- package/.claude/settings.local.json +0 -33
- package/agents/forge-master/capabilities.md +0 -144
- package/agents/forge-master/context-template.md +0 -128
- package/agents/forge-master/personality.md +0 -138
- package/bin/lib/config.sh +0 -313
- package/config/task-template.md +0 -87
- package/context/forge-state.yaml +0 -19
- package/docs/TODO.md +0 -150
- package/docs/getting-started.md +0 -243
- package/docs/npm-publishing.md +0 -95
- package/docs/workflows/README.md +0 -32
- package/docs/workflows/azure-devops.md +0 -108
- package/docs/workflows/bitbucket.md +0 -104
- package/docs/workflows/git-only.md +0 -130
- package/docs/workflows/gitea.md +0 -168
- package/docs/workflows/github.md +0 -103
- package/docs/workflows/gitlab.md +0 -105
- package/docs/workflows.md +0 -454
- package/tasks/completed/ARCH-001-duplicate-agent-config.md +0 -121
- package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +0 -88
- package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +0 -77
- package/tasks/completed/ARCH-009-test-organization.md +0 -78
- package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +0 -94
- package/tasks/completed/ARCH-012-tmp-files-in-root.md +0 -71
- package/tasks/completed/ARCH-013-exit-code-constants.md +0 -65
- package/tasks/completed/ARCH-014-sed-incompatibility.md +0 -96
- package/tasks/completed/ARCH-015-docs-todo-tracking.md +0 -83
- package/tasks/completed/CLEAN-001.md +0 -38
- package/tasks/completed/CLEAN-003.md +0 -47
- package/tasks/completed/CLEAN-004.md +0 -56
- package/tasks/completed/CLEAN-005.md +0 -75
- package/tasks/completed/CLEAN-006.md +0 -47
- package/tasks/completed/CLEAN-007.md +0 -34
- package/tasks/completed/CLEAN-008.md +0 -49
- package/tasks/completed/CLEAN-012.md +0 -58
- package/tasks/completed/CLEAN-013.md +0 -45
- package/tasks/completed/SEC-001-sql-injection-fix.md +0 -58
- package/tasks/completed/SEC-002-notification-injection-fix.md +0 -45
- package/tasks/completed/SEC-003-eval-injection-fix.md +0 -54
- package/tasks/completed/SEC-004-pid-race-condition-fix.md +0 -49
- package/tasks/completed/SEC-005-worker-loop-path-fix.md +0 -51
- package/tasks/completed/SEC-006-eval-agent-names.md +0 -55
- package/tasks/completed/SEC-007-spawn-escaping.md +0 -67
- package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +0 -72
- package/tasks/pending/ARCH-005-missing-src-directory.md +0 -95
- package/tasks/pending/ARCH-006-task-template-location.md +0 -64
- package/tasks/pending/ARCH-007-daemon-monolith.md +0 -91
- package/tasks/pending/ARCH-008-forge-master-vs-hub.md +0 -81
- package/tasks/pending/ARCH-010-missing-index-files.md +0 -84
- package/tasks/pending/CLEAN-002.md +0 -29
- package/tasks/pending/CLEAN-009.md +0 -31
- package/tasks/pending/CLEAN-010.md +0 -30
- package/tasks/pending/CLEAN-011.md +0 -30
- package/tasks/pending/CLEAN-014.md +0 -32
- package/tasks/review/task-001.md +0 -78
- /package/{bin → src}/lib/agents.sh +0 -0
- /package/{bin → src}/lib/util.sh +0 -0
- /package/{bin → src}/lib/vcs.js +0 -0
- /package/{context → templates}/project-context-template.md +0 -0
package/docs/security.md
CHANGED
|
@@ -1,144 +1,195 @@
|
|
|
1
|
-
# Vibe Forge Security Documentation
|
|
2
|
-
|
|
3
|
-
This document explains security considerations and intentional design decisions in Vibe Forge.
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
###
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
The
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
1
|
+
# Vibe Forge Security Documentation
|
|
2
|
+
|
|
3
|
+
This document explains security considerations and intentional design decisions in Vibe Forge.
|
|
4
|
+
|
|
5
|
+
## Agent Permission Model
|
|
6
|
+
|
|
7
|
+
### How It Works
|
|
8
|
+
|
|
9
|
+
Vibe Forge agents run with **allowlist-based permissions** defined in `.claude/settings.json`. This replaces the previous `--dangerously-skip-permissions` approach with a defense-in-depth model:
|
|
10
|
+
|
|
11
|
+
1. **Allowlist** (`.claude/settings.json`) - Pre-approves safe operations (file reads, writes, git, npm, etc.)
|
|
12
|
+
2. **Heimdall** (pre-tool hook) - Intercepts and gates forge-specific policy (branch protection, etc.)
|
|
13
|
+
3. **Claude Code native prompts** - Anything not in the allowlist still requires user approval
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Agent wants to run a command
|
|
17
|
+
|
|
|
18
|
+
v
|
|
19
|
+
┌─────────────────┐
|
|
20
|
+
│ Allowlist check │──── Not allowed ──> User prompted
|
|
21
|
+
└────────┬────────┘
|
|
22
|
+
│ Allowed
|
|
23
|
+
v
|
|
24
|
+
┌─────────────────┐
|
|
25
|
+
│ Heimdall hook │──── Policy violation ──> Blocked
|
|
26
|
+
└────────┬────────┘
|
|
27
|
+
│ Pass
|
|
28
|
+
v
|
|
29
|
+
Executed
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### What Agents Can Do Without Prompting
|
|
33
|
+
|
|
34
|
+
The allowlist covers normal development operations:
|
|
35
|
+
- Read, write, and edit files
|
|
36
|
+
- Search with glob/grep
|
|
37
|
+
- Run git commands (status, diff, add, commit, push, branch, etc.)
|
|
38
|
+
- Run GitHub CLI (PRs, runs, workflows)
|
|
39
|
+
- Run npm (test, install, audit, build)
|
|
40
|
+
- Run node/npx scripts
|
|
41
|
+
- File operations (ls, cp, mv, mkdir, find)
|
|
42
|
+
- SQLite operations
|
|
43
|
+
|
|
44
|
+
### What Still Requires Approval
|
|
45
|
+
|
|
46
|
+
Anything not in the allowlist prompts the user:
|
|
47
|
+
- Installing system packages (apt, brew, etc.)
|
|
48
|
+
- Running unfamiliar binaries
|
|
49
|
+
- Network operations (curl, wget) unless via node
|
|
50
|
+
- Destructive operations not covered by git (rm -rf, etc.)
|
|
51
|
+
|
|
52
|
+
### Heimdall Policy Layer
|
|
53
|
+
|
|
54
|
+
Heimdall is a pre-tool hook that enforces forge-specific rules on top of the allowlist:
|
|
55
|
+
- Blocks direct pushes to main/master
|
|
56
|
+
- Enforces branch naming conventions
|
|
57
|
+
- Gates security-sensitive operations
|
|
58
|
+
|
|
59
|
+
Heimdall runs on every Bash tool call regardless of allowlist status.
|
|
60
|
+
|
|
61
|
+
### Why Not --dangerously-skip-permissions?
|
|
62
|
+
|
|
63
|
+
The `--dsp` flag disables ALL permission checks. The allowlist approach is better because:
|
|
64
|
+
- Only known-safe operations are pre-approved
|
|
65
|
+
- Unknown commands still prompt for approval
|
|
66
|
+
- Heimdall policies still enforce forge rules
|
|
67
|
+
- The security posture is auditable (read `.claude/settings.json`)
|
|
68
|
+
|
|
69
|
+
Users who prefer the fully autonomous workflow can still use `--dsp` in their own terminals.
|
|
70
|
+
|
|
71
|
+
### Trust Boundary: Shared Allowlist
|
|
72
|
+
|
|
73
|
+
All forge agents share a single allowlist defined in `.claude/settings.json`. There are no per-agent permission boundaries. This means:
|
|
74
|
+
|
|
75
|
+
- **Anvil** (frontend) has the same file-write permissions as **Aegis** (security)
|
|
76
|
+
- A compromised or confused agent personality cannot be contained by permissions alone
|
|
77
|
+
- Heimdall policies provide some per-agent gating (e.g. branch protection) but do not restrict filesystem scope
|
|
78
|
+
|
|
79
|
+
This is an accepted architectural trade-off. Per-agent permission boundaries would require separate `settings.json` files per agent and a launcher that selects the correct one, which adds complexity without proportional security benefit in a single-developer, local-only workflow.
|
|
80
|
+
|
|
81
|
+
**Mitigations:**
|
|
82
|
+
- Version control (git) makes all file changes reviewable and revertible
|
|
83
|
+
- Heimdall enforces structural policies (no direct push to main, naming conventions)
|
|
84
|
+
- Sentinel code review catches inappropriate changes before merge
|
|
85
|
+
- The dashboard provides visibility into what each agent is doing
|
|
86
|
+
|
|
87
|
+
**Future consideration:** If Vibe Forge supports multi-developer or remote execution (T3-4), per-agent permission boundaries should be revisited.
|
|
88
|
+
|
|
89
|
+
## Dashboard Security
|
|
90
|
+
|
|
91
|
+
### Session Token Authentication
|
|
92
|
+
|
|
93
|
+
The dashboard server generates a cryptographic session token at startup:
|
|
94
|
+
- Written to `.forge/dashboard.token` with mode 0600
|
|
95
|
+
- All API endpoints require `X-Forge-Token` header
|
|
96
|
+
- WebSocket connections require `?token=` query parameter
|
|
97
|
+
- Token is cleaned up on server shutdown
|
|
98
|
+
- `/api/health` is exempt (monitoring probes)
|
|
99
|
+
|
|
100
|
+
### Same-Origin Protection
|
|
101
|
+
|
|
102
|
+
The dashboard serves no CORS headers. Browsers enforce same-origin policy, meaning:
|
|
103
|
+
- Only the dashboard UI (served from the same origin) can call the API
|
|
104
|
+
- Cross-origin requests from malicious websites are blocked
|
|
105
|
+
- The `/api/token` bootstrap endpoint is protected by same-origin policy
|
|
106
|
+
|
|
107
|
+
### Why This Matters
|
|
108
|
+
|
|
109
|
+
Without these protections, any website you visit could dispatch tasks to your forge agents via cross-origin API calls. Combined with agent permissions, this would allow arbitrary code execution. The session token + same-origin combination eliminates this attack vector.
|
|
110
|
+
|
|
111
|
+
## Additional Security Measures
|
|
112
|
+
|
|
113
|
+
### Agent Whitelist Validation
|
|
114
|
+
|
|
115
|
+
All agent names go through strict whitelist validation before execution:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
resolve_agent() {
|
|
119
|
+
local canonical="${AGENT_ALIASES[$normalized]:-}"
|
|
120
|
+
if [[ -n "$canonical" ]]; then
|
|
121
|
+
echo "$canonical"
|
|
122
|
+
return 0
|
|
123
|
+
fi
|
|
124
|
+
return 1 # Reject unknown agents
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Path Traversal Protection
|
|
129
|
+
|
|
130
|
+
Personality file paths are validated to remain within expected directories:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
get_agent_personality_path() {
|
|
134
|
+
local real_path=$(cd "$(dirname "$personality_path")" && pwd)/$(basename "$personality_path")
|
|
135
|
+
local agents_dir=$(cd "$forge_root/agents" && pwd)
|
|
136
|
+
if [[ "$real_path" != "$agents_dir"/* ]]; then
|
|
137
|
+
echo "Security error: Path traversal detected" >&2
|
|
138
|
+
return 1
|
|
139
|
+
fi
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Daemon Security
|
|
144
|
+
|
|
145
|
+
The background daemon includes:
|
|
146
|
+
- **Symlink protection**: Skips symlinks to prevent symlink attacks
|
|
147
|
+
- **Path validation**: Verifies destinations within FORGE_ROOT
|
|
148
|
+
- **Atomic operations**: Temp files + move for safe writes
|
|
149
|
+
- **Lock files**: Prevents multiple daemon instances
|
|
150
|
+
- **SQL escaping**: All database inputs go through `db_escape()`
|
|
151
|
+
- **Input sanitization**: Frontmatter extraction strips shell metacharacters
|
|
152
|
+
|
|
153
|
+
### Alias Collision Detection
|
|
154
|
+
|
|
155
|
+
Agent alias collisions are checked at three levels:
|
|
156
|
+
- Pre-commit hook (local development)
|
|
157
|
+
- CI lint job (GitHub Actions)
|
|
158
|
+
- `forge init` (project setup)
|
|
159
|
+
|
|
160
|
+
## Risks to Be Aware Of
|
|
161
|
+
|
|
162
|
+
1. **Allowlisted operations execute without confirmation** - agents can modify files, run tests, and push code
|
|
163
|
+
2. **Prompt injection** - crafted task files or context could influence agent behavior
|
|
164
|
+
3. **Heimdall is not exhaustive** - it enforces known policies, not all possible risks
|
|
165
|
+
4. **Local network exposure** - the dashboard binds to localhost only; changing this has security implications
|
|
166
|
+
|
|
167
|
+
## Recommendations
|
|
168
|
+
|
|
169
|
+
1. **Use in development environments only**
|
|
170
|
+
2. **Use with version control** - git makes it easy to review and revert
|
|
171
|
+
3. **Review at checkpoints** - check agent work during task transitions
|
|
172
|
+
4. **Keep project context secure** - don't include secrets in context files
|
|
173
|
+
5. **Audit the allowlist** - review `.claude/settings.json` for your comfort level
|
|
174
|
+
6. **Run in isolated environments** - consider containers for sensitive projects
|
|
175
|
+
|
|
176
|
+
## Reporting Security Issues
|
|
177
|
+
|
|
178
|
+
If you discover a security vulnerability in Vibe Forge:
|
|
179
|
+
|
|
180
|
+
1. **Do not open a public issue**
|
|
181
|
+
2. Email security concerns to the maintainers
|
|
182
|
+
3. Include steps to reproduce
|
|
183
|
+
4. Allow time for a fix before public disclosure
|
|
184
|
+
|
|
185
|
+
## Security Checklist for Contributors
|
|
186
|
+
|
|
187
|
+
When contributing to Vibe Forge:
|
|
188
|
+
|
|
189
|
+
- [ ] Never pass user input directly to shell commands
|
|
190
|
+
- [ ] Always validate agent names against the whitelist
|
|
191
|
+
- [ ] Use safe JSON parsing (Node.js, not grep/cut)
|
|
192
|
+
- [ ] Validate file paths don't traverse outside expected directories
|
|
193
|
+
- [ ] Use atomic file operations where race conditions are possible
|
|
194
|
+
- [ ] Add tests for security-sensitive functions
|
|
195
|
+
- [ ] Document any new security considerations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe-forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Multi-agent development orchestration system for terminal-native vibe coding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vibe-coding",
|
|
@@ -13,38 +13,65 @@
|
|
|
13
13
|
"terminal",
|
|
14
14
|
"cli"
|
|
15
15
|
],
|
|
16
|
-
"author": "
|
|
16
|
+
"author": "sugar-crash-studios",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/
|
|
20
|
+
"url": "git+https://github.com/sugar-crash-studios/vibe-forge.git"
|
|
21
21
|
},
|
|
22
|
-
"homepage": "https://github.com/
|
|
22
|
+
"homepage": "https://github.com/sugar-crash-studios/vibe-forge#readme",
|
|
23
23
|
"bugs": {
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/sugar-crash-studios/vibe-forge/issues"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
25
28
|
},
|
|
26
29
|
"bin": {
|
|
27
30
|
"vibe-forge": "bin/cli.js"
|
|
28
31
|
},
|
|
29
32
|
"files": [
|
|
30
|
-
"bin/",
|
|
33
|
+
"bin/cli.js",
|
|
34
|
+
"src/lib/",
|
|
35
|
+
"bin/forge.cmd",
|
|
36
|
+
"bin/forge.sh",
|
|
37
|
+
"bin/forge-daemon.sh",
|
|
38
|
+
"bin/forge-setup.sh",
|
|
39
|
+
"bin/forge-spawn.sh",
|
|
40
|
+
"bin/dashboard/server.js",
|
|
41
|
+
"bin/dashboard/api/",
|
|
42
|
+
"bin/dashboard/public/",
|
|
31
43
|
"agents/",
|
|
32
44
|
"config/",
|
|
33
|
-
"context
|
|
34
|
-
"
|
|
35
|
-
".
|
|
36
|
-
"
|
|
45
|
+
"templates/project-context-template.md",
|
|
46
|
+
"context/architecture.md",
|
|
47
|
+
"context/modern-conventions.md",
|
|
48
|
+
"context/agent-overrides/README.md",
|
|
49
|
+
".claude/commands/",
|
|
50
|
+
".claude/hooks/",
|
|
51
|
+
".claude/scripts/",
|
|
52
|
+
".claude/settings.json",
|
|
53
|
+
"docs/security.md",
|
|
54
|
+
"docs/architecture.md",
|
|
55
|
+
"docs/agents.md",
|
|
56
|
+
"docs/commands.md"
|
|
37
57
|
],
|
|
38
58
|
"scripts": {
|
|
59
|
+
"prepare": "husky",
|
|
39
60
|
"test": "node --no-warnings node_modules/jest/bin/jest.js tests/unit/",
|
|
40
61
|
"test:unit": "node --no-warnings node_modules/jest/bin/jest.js tests/unit/",
|
|
41
62
|
"test:integration": "node --no-warnings node_modules/jest/bin/jest.js tests/integration/",
|
|
42
63
|
"test:all": "node --no-warnings node_modules/jest/bin/jest.js tests/"
|
|
43
64
|
},
|
|
44
65
|
"devDependencies": {
|
|
45
|
-
"
|
|
66
|
+
"husky": "^9.1.7",
|
|
67
|
+
"jest": "^30.0.0",
|
|
68
|
+
"ws": "^8.18.0"
|
|
46
69
|
},
|
|
47
70
|
"engines": {
|
|
48
71
|
"node": ">=16.0.0"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"js-yaml": "^4.1.1",
|
|
75
|
+
"msedge-tts": "^2.0.4"
|
|
49
76
|
}
|
|
50
77
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Agent alias collision detector.
|
|
4
|
+
*
|
|
5
|
+
* Used by:
|
|
6
|
+
* - .husky/pre-commit (pre-commit hook)
|
|
7
|
+
* - .github/workflows/ci.yml (CI lint job)
|
|
8
|
+
* - bin/cli.js validateAgentsConfig() (forge init)
|
|
9
|
+
*
|
|
10
|
+
* Exit code 0: no collisions
|
|
11
|
+
* Exit code 1: collisions found (printed to stderr)
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
|
|
17
|
+
const configPath = process.argv[2] || path.join(__dirname, '..', '..', 'config', 'agents.json');
|
|
18
|
+
|
|
19
|
+
if (!fs.existsSync(configPath)) {
|
|
20
|
+
// No agents.json is fine (e.g., fresh clone before setup)
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let config;
|
|
25
|
+
try {
|
|
26
|
+
config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
27
|
+
} catch (err) {
|
|
28
|
+
console.error(`ERROR: Failed to parse ${configPath}: ${err.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const agents = config.agents || {};
|
|
33
|
+
const seen = {};
|
|
34
|
+
const dupes = [];
|
|
35
|
+
|
|
36
|
+
for (const [name, info] of Object.entries(agents)) {
|
|
37
|
+
for (const alias of [name, ...(info.aliases || [])]) {
|
|
38
|
+
if (seen[alias] && seen[alias] !== name) {
|
|
39
|
+
dupes.push(`${alias} (${seen[alias]} vs ${name})`);
|
|
40
|
+
}
|
|
41
|
+
seen[alias] = name;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (dupes.length) {
|
|
46
|
+
console.error(`ERROR: Alias collision in agents.json: ${dupes.join(', ')}`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log(`No alias collisions found (${Object.keys(agents).length} agents checked)`);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
#
|
|
3
3
|
# Vibe Forge - Shared Color Definitions and Logging
|
|
4
|
-
# Source this file in other scripts: source "$
|
|
4
|
+
# Source this file in other scripts: source "$LIB_DIR/colors.sh"
|
|
5
|
+
# NOTE: JavaScript equivalent exists in bin/cli.js:26-33. Keep in sync.
|
|
5
6
|
#
|
|
6
7
|
|
|
7
8
|
# Colors (only if terminal supports them)
|