Skip to content

feat(openbitfun): add OpenBitFun target - #3973

Merged
dyoshikawa merged 3 commits into
mainfrom
feat-openbitfun-target
Nov 25, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
feat-openbitfun-target

Conversation

@dyoshikawa

@dyoshikawa dyoshikawa commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds an openbitfun target for OpenBitFun covering skills, subagents and hooks, each in project and global scope. Paths and formats were checked against upstream path_manager.rs, custom_agent.rs, the skills docs and docs/features/agent-hooks.md.

What changed

Feature Project Global (--global)
skills .openbitfun/skills/<name>/SKILL.md OpenBitFun's user skills dir: ~/.local/share/openbitfun/skills (Linux), ~/Library/Application Support/openbitfun/skills (macOS), %APPDATA%\openbitfun\skills (Windows)
subagents .openbitfun/agents/*.md <user root>/agents
hooks .openbitfun/config/hooks.json <user root>/config/hooks.json

<user root> is ~/.config/openbitfun (Linux), ~/Library/Application Support/openbitfun (macOS), %APPDATA%\openbitfun (Windows).

  • Skills: reuse AgentsSkillsSkill, the same way qoder / trae do.
  • Subagents: write name, description (empty string if missing, since OpenBitFun requires it) and kind: subagent, then spread the openbitfun: frontmatter block on top (kind, tools, model, readonly, review, id, user_context_policy, ...). On import, native fields go back into openbitfun: and the default kind: subagent is dropped.
  • Hooks: OpenBitFun implements the Codex hook contract. The Codex hooks.json generation and import code is now in two shared helpers in codexcli-hooks.ts (buildCodexStyleHooksFile and codexStyleHooksToRulesyncContent). Codex CLI output is unchanged. OpenBitFun's converter config is Codex's with these changes:
    • It drops the events OpenBitFun does not dispatch (Interrupt, PreModelRequest, PostModelRequest).
    • It runs only command handlers.
    • It does not forward async / additionalContextLimit: OpenBitFun's parse_handler reads only command, commandWindows, timeout and statusMessage. A handler with a timeout that is not a positive integer is dropped with a warning, because OpenBitFun skips it as invalid.
    • It translates Bash in matchers to OpenBitFun's ExecCommand (and back on import). A preToolUse / permissionRequest matcher that names a tool OpenBitFun lacks gets a warning. The docs note that the shell command is tool_input.cmd.
    • It reads the new openbitfun.hooks override block.
    • The docs note that project hooks only run when app.hooks.project_hooks_enabled is on.
  • OS-dependent global paths are picked from process.platform in src/constants/openbitfun-paths.ts, the same approach as Warp's warpcliConfigDir(). $XDG_CONFIG_HOME / $XDG_DATA_HOME / OPENBITFUN_USER_ROOT are not followed, because global output is written relative to the home dir. Rulesync warns once when a non-default XDG value on Linux would move OpenBitFun's user tree.
  • Tool tuples, display name, the processor registrations, unit tests and the e2e happy paths (generate / orphan / import / global) are updated. So are the file-formats.md notes, the generated tables and docs content, .gitignore and cspell.

Deviation from the requested scope

  • The global skills dir on Linux is ~/.local/share/openbitfun/skills, not ~/.config/openbitfun/skills. Upstream user_skills_dir() uses dirs::data_local_dir() on Linux (and the registry loads user skills from there), so this follows the source.

Not in scope

Rules (OpenBitFun already reads AGENTS.md / CLAUDE.md / .claude/rules), permissions (tool_permissions.json), MCP (app config store), commands, ignore.

Closes #3956

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 3 commits November 25, 2026 15:47
OpenBitFun (formerly BitFun) reads its own .openbitfun/ project tree and
an OS-dependent user tree. The new `openbitfun` target writes, in project
and global scope:

- skills: .openbitfun/skills/<name>/SKILL.md (Agent Skills layout); global
  in OpenBitFun's user skills dir (~/.local/share/openbitfun/skills on
  Linux, ~/Library/Application Support/openbitfun/skills on macOS,
  %APPDATA%\openbitfun\skills on Windows), per path_manager.rs.
- subagents: .openbitfun/agents/*.md custom agents with kind: subagent
  and the `openbitfun` frontmatter block (tools, model, readonly, review,
  ...) spread on top; global under <user root>/agents.
- hooks: Codex-shaped .openbitfun/config/hooks.json; global under
  <user root>/config/hooks.json. Generated by the Codex hooks translation,
  now factored into shared helpers, limited to the events OpenBitFun
  dispatches and to command handlers. Project hooks only run when
  app.hooks.project_hooks_enabled is on (documented).

Global paths are picked from process.platform, like the Warp CLI config
dir. Rules (already read from AGENTS.md / CLAUDE.md / .claude/rules),
permissions, MCP, commands and ignore are out of scope.

Closes #3956

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
# Conflicts:
#	docs/reference/file-formats.md
#	src/generated/docs-content.ts
…ler rules

- Translate `Bash` in hook matchers to OpenBitFun's `ExecCommand` tool
  (and back on import), and warn on preToolUse / permissionRequest
  matchers naming tools OpenBitFun has no built-in for, since such a
  guard would never fire.
- Drop handlers whose timeout OpenBitFun's parse_handler rejects (not a
  positive integer) with an OpenBitFun-specific reason, and restore the
  Codex CLI rejection text unchanged.
- Warn when a non-default $XDG_CONFIG_HOME / $XDG_DATA_HOME moves
  OpenBitFun's Linux user tree away from where rulesync writes it.
- Document the ExecCommand / tool_input.cmd difference and list
  OpenBitFun among the preserveUnownedHooks targets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
@dyoshikawa
dyoshikawa merged commit ce0d4e1 into main Nov 25, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the feat-openbitfun-target branch November 25, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Propose an OpenBitFun target: .openbitfun/ agents, skills, hooks.json, permissions

1 participant