feat: add Vibe Code (vibe) as a supported tool target - #1861
Conversation
Add first-class support for Vibe Code so teams can generate and import Vibe's native config from the unified .rulesync source of truth. Native implementations across six features: - rules -> AGENTS.md (project) / ~/.vibe/AGENTS.md (global) - ignore -> .vibeignore - mcp -> .vibe/config.toml ([[mcp_servers]], TOML) - permissions -> .vibe/config.toml (tools / enabled_tools / disabled_tools) - subagents -> .vibe/agents/*.toml (TOML frontmatter) - skills -> .vibe/skills/ (+ .agents/skills/ alt root, project only) Wire vibe into all six feature processors, the gitignore registry, README, and docs/reference/supported-tools.md. MCP and permissions share .vibe/config.toml via read-merge so neither clobbers the other. Canonical edit/write permission categories both map to write_file and merge through a shared tools accumulator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
VibePermissions.fromRulesyncPermissions only added new denies to disabled_tools and never touched enabled_tools, so a prior .vibe/config.toml could keep a stale filter that overrode the current rulesync permissions (e.g. disabled_tools = ["write_file"] surviving a later edit/write -> allow, or a stale enabled_tools allow-list). Clear both enabled_tools and disabled_tools for every tool the current rulesync permissions own before reapplying state, while preserving filters for tools rulesync does not configure. Add regression tests for deny -> allow, stale enabled_tools deny, and unowned-filter preservation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI "Code Quality & Tests" failed on CSpell unknown words introduced by
the Vibe target. Add `vibeignore` (the .vibeignore filename) and
`devstral` (a Mistral model used in an MCP test fixture) to cspell.json,
and rename the subagent test fixture redteam.{md,toml} to
security-reviewer.{md,toml} so the file name is self-describing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thank you for your contribution! Unfortunately, this PR has 2431 added lines, which exceeds the limit of 1000 lines for external contributors. Please split your changes into smaller PRs. See CONTRIBUTING.md for details. |
dyoshikawa
left a comment
There was a problem hiding this comment.
This is a clean, complete new-tool implementation — wiring is consistent across tool-targets, all six feature processors, gitignore, the README and docs/reference/supported-tools.md (plus the synced skills copy), and the test-count assertions are updated in lockstep. Happy-path E2E generate+import coverage exists for every supported feature, including the global and MCP-preservation regression cases for permissions and the .agents/skills fallback for skills. Security review found nothing and CI is green, so the code quality isn't the concern here.
The one thing holding this back from merge is external-spec verification. The entire value of this target depends on the file paths and config schemas matching Vibe Code's real behavior, and the PR description itself flags that this needs verifying before release. I left inline notes on the highest-risk spots — the global rules path, and the supportsGlobal claims for MCP/permissions. Could you confirm each path and schema against Vibe's official docs before we merge? In particular, please double-check that Vibe actually reads a user-level ~/.vibe/config.toml; if it only reads the project-level .vibe/config.toml, the global generation would write a file Vibe never loads, and we shouldn't claim global scope in the matrix (per .claude/rules/feature-change-guidelines.md).
One minor maintainability nit beyond the inline comments: MCP and permissions both read-merge .vibe/config.toml and rely on mcp running before permissions in generate.ts (each preserves the other's keys). A short comment in vibe-mcp.ts / vibe-permissions.ts noting that cross-feature dependency would help future maintainers — right now the safety is implicit in the pipeline ordering.
| if (global) { | ||
| return { | ||
| root: { | ||
| relativeDirPath: ".vibe", |
There was a problem hiding this comment.
This whole path/convention surface (global ~/.vibe/AGENTS.md here, plus .vibe/config.toml schema, transport names, the tools/enabled_tools/disabled_tools permission schema, the subagent TOML schema, and .vibe/skills + .agents/skills discovery) rests on Vibe Code's actual behavior, which the PR body notes still needs verifying. If any of these diverge from real Vibe behavior the generated output is silently wrong. Could you confirm each against Vibe's official documentation before merge?
| class: VibeMcp, | ||
| meta: { | ||
| supportsProject: true, | ||
| supportsGlobal: true, |
There was a problem hiding this comment.
supportsGlobal: true here assumes Vibe reads a user-level ~/.vibe/config.toml. If Vibe only reads the project-level .vibe/config.toml, global generation produces a file Vibe never loads, and the docs matrix shouldn't mark MCP as global-supported (per .claude/rules/feature-change-guidelines.md, global scope should only be claimed when the tool actually reads a user-level config at that path). Please confirm before merge.
| class: VibePermissions, | ||
| meta: { | ||
| supportsProject: true, | ||
| supportsGlobal: true, |
There was a problem hiding this comment.
Same global-scope concern as the MCP processor: supportsGlobal: true assumes a user-level ~/.vibe/config.toml exists and is read by Vibe. Please confirm Vibe supports a user-level config before claiming global scope here and in the docs matrix.
| bash: "bash", | ||
| read: "read_file", | ||
| edit: "write_file", | ||
| write: "write_file", |
There was a problem hiding this comment.
Both canonical edit and write map to write_file, and write_file imports back as edit, so the round-trip isn't identity — a user who configured write will see it rewritten to edit on the next generate. The merge handles the collision correctly and there's a regression test, so this is fine to ship; just flagging the lossy round-trip for awareness.
|
@sirmacik Thank you! |
Intent
Add first-class support for Vibe Code to rulesync so teams can generate and import Vibe's native config from the unified
.rulesync/source of truth. Brings Vibe to parity with peer agentic CLIs (Codex, OpenCode, Cursor) across the feature matrix.What Changed
vibetool target registered insrc/types/tool-targets.ts.AGENTS.md(project) /~/.vibe/AGENTS.md(global).vibeignore.vibe/config.toml([[mcp_servers]], TOML).vibe/config.toml(tools/enabled_tools/disabled_tools).vibe/agents/*.toml(TOML frontmatter, mirrors codexcli pattern).vibe/skills/(+.agents/skills/alt root, project only)vibeinto all six feature processors, the gitignore registry, README, anddocs/reference/supported-tools.md..vibe/config.toml; both read-merge existing content so neither clobbers the other.Config / Flags
--targets vibe(or*) and--featuresselectors.commandsandhooksare intentionally not supported (Vibe has no native equivalent) — reflected in the docs matrix.askis unsupported (logged + skipped); canonicaledit/writeboth map to Vibe'swrite_file.Impact
rulesync generate/importnow acceptvibe;.gitignoregeneration emits Vibe paths when the target is selected.Risks
config.tomlbetween MCP + permissions — mitigated by read-merge; covered by an e2e "preserve MCP config" test.edit/write→write_filecollision — handled:fromRulesyncPermissionsmerges via thetoolsaccumulator instead of re-reading the original config; regression test added.enabled_toolsanddisabled_toolsare reconciled for tools rulesync owns, so a changed permission is no longer overridden by leftover filters; regression tests added.~/.vibe/AGENTS.mdand.vibe/config.tomlpaths rest on Vibe's docs; verify before release.Validation Plan
vibe-*tests pass (incl. edit/write merge and stale-filter reconciliation regression tests).vitest.e2e.config.ts).tsc --noEmitclean; full suite green.pnpm cicheck(code + content) andpnpm dev gitignoreto refresh.gitignore.Rollout / Backout
--targets vibe.