Skip to content

Commit 356f21d

Browse files
authored
Merge pull request #1 from stefanc-ai2/simplify
refactor(cli): rebrand to cq with ccb aliases
2 parents 090cae1 + a93d850 commit 356f21d

57 files changed

Lines changed: 1068 additions & 1001 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cross-platform-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656
5757
- name: Test unified commands syntax
5858
run: |
59-
chmod +x bin/ask bin/ping
59+
chmod +x cq bin/ask bin/ping bin/cq-mounted
60+
python cq --help
6061
python bin/ask --help
6162
python bin/ping --help
63+
python bin/cq-mounted --help
6264
echo "✅ Unified commands syntax test passed"

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
python -m pip install pytest
3030
3131
- name: Syntax check
32-
run: python -m compileall -q lib bin ccb
32+
run: python -m compileall -q lib bin cq
3333

3434
- name: Run tests
3535
run: pytest test/ -v --tb=short

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ __pycache__/
66
docs/
77
!docs/**/*.md
88
tests/
9-
.ccb_config/
9+
.cq_config/
1010
.codex-session
1111
.gemini-session
1212
.claude-session

AGENTS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
## Project Structure & Module Organization
44

5-
- `ccb`: primary CLI entrypoint (launcher/orchestrator).
5+
- `cq`: primary CLI entrypoint (launcher/orchestrator).
66
- `lib/`: Python implementation (terminal backends, protocol markers, config/session utilities).
7-
- `bin/`: small CLI tools and wrappers (e.g. `ask`, `ping`, `ccb-mounted`).
7+
- `bin/`: small CLI tools and wrappers (e.g. `ask`, `ping`, `cq-mounted`).
88
- `test/`: `pytest` suite (+ a few `test/system_*.sh` scripts).
99
- `claude_skills/`, `codex_skills/`: provider skill bundles installed by `install.sh`.
1010

1111
## Build, Test, and Development Commands
1212

13-
- `python -m compileall -q lib bin ccb`: fast syntax/type-syntax sanity check (matches CI).
13+
- `python -m compileall -q lib bin cq`: fast syntax/type-syntax sanity check (matches CI).
1414
- `python -m pip install -U pip pytest`: install test runner.
1515
- `python -m pytest test/ -v --tb=short`: run the full test suite locally.
1616
- `./install.sh install` / `./install.sh uninstall`: install or remove local commands (see env vars in `install.sh` header).
17-
- `./ccb -h`: run the launcher from the repo checkout (no install required).
17+
- `./cq -h`: run the launcher from the repo checkout (no install required).
1818

1919
## Coding Style & Naming Conventions
2020

@@ -43,8 +43,8 @@
4343

4444
## Security & Configuration Tips
4545

46-
- Don’t commit local session/config artifacts under `.ccb_config/` or provider runtime/session files.
47-
- Prefer configuration via `ccb.config` (`.ccb_config/ccb.config` or `~/.ccb/ccb.config`) and environment variables; avoid hardcoding paths or secrets.
46+
- Don’t commit local session/config artifacts under `.cq_config/` or provider runtime/session files.
47+
- Prefer configuration via `cq.config` (`.cq_config/cq.config` or `~/.cq/cq.config`) and environment variables; avoid hardcoding paths or secrets.
4848

4949
## Beads (Issue Tracking)
5050

CLAUDE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with code in this reposi
44

55
## Project Overview
66

7-
Claude Code Bridge (`ccb`) is a split-pane collaboration tool for **Claude** and **Codex**.
7+
Code Quorum (`cq`) is a split-pane collaboration tool for **Claude** and **Codex**.
88

99
Current design constraints:
1010
- Providers: `claude`, `codex` only
@@ -19,7 +19,7 @@ Current design constraints:
1919

2020
```bash
2121
# Syntax check
22-
python -m compileall -q lib bin ccb test
22+
python -m compileall -q lib bin cq test
2323

2424
# Run all tests
2525
python -m pytest test/ -v --tb=short
@@ -32,21 +32,21 @@ TERM=xterm-256color python -m pytest test/ -v --tb=short
3232

3333
### Entry points
3434

35-
- `ccb`: launcher/orchestrator (starts panes, writes `.ccb_config/.{provider}-session`)
35+
- `cq`: launcher/orchestrator (starts panes, writes `.cq_config/.{provider}-session`)
3636
- `bin/ask`: send-only message delivery into a provider pane (async; prints req_id)
3737
- `bin/ping`: provider connectivity check
38-
- `bin/ccb-mounted`: report mounted providers for the current directory
38+
- `bin/cq-mounted`: report mounted providers for the current directory
3939

4040
### Key modules
4141

4242
- `lib/terminal.py`: terminal backend abstraction (`TmuxBackend`, `WeztermBackend`)
4343
- `lib/*_session.py`: loads per-project session bindings and ensures pane liveness
44-
- `lib/ccb_protocol.py`: protocol markers (`CCB_REQ_ID`, `CCB_REPLY`, `CCB_FROM`) + wrapping helpers
44+
- `lib/cq_protocol.py`: protocol markers (`CQ_REQ_ID`, `CQ_REPLY`, `CQ_FROM`) + wrapping helpers
4545
- `lib/project_id.py`, `lib/session_utils.py`, `lib/session_registry.py`: project isolation and session lookup
4646

4747
### Session isolation
4848

49-
Session resolution is scoped to the current project via `.ccb_config/`.
49+
Session resolution is scoped to the current project via `.cq_config/`.
5050
This enables running multiple repositories (repo A and repo B) without cross-talk.
5151

5252
## Beads (Issue Tracking)

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22

3-
# Claude Code Bridge (`ccb`)
3+
# Code Quorum (`cq`)
44

55
Split-pane collaboration between **Claude** and **Codex** using **tmux** or **WezTerm**.
66

@@ -16,7 +16,7 @@ Split-pane collaboration between **Claude** and **Codex** using **tmux** or **We
1616

1717
## What it does
1818

19-
- `ccb` starts **Claude** and/or **Codex** in separate panes and writes per-project session files under `.ccb_config/`.
19+
- `cq` starts **Claude** and/or **Codex** in separate panes and writes per-project session files under `.cq_config/`.
2020
- `ask` sends a message directly to the target pane (send-only, always async).
2121
- Replies come back **in the pane** via `ask --reply-to ...` (bidirectional “reply-via-ask”).
2222

@@ -28,7 +28,7 @@ No log tailing/monitoring is required or used.
2828

2929
- Python **3.10+**
3030
- Either:
31-
- tmux (run `tmux` first, then run `ccb` inside tmux), or
31+
- tmux (run `tmux` first, then run `cq` inside tmux), or
3232
- WezTerm (recommended)
3333
- The `claude` CLI and the `codex` CLI installed and on `PATH`
3434

@@ -43,8 +43,8 @@ From a repo checkout:
4343
```
4444

4545
This installs:
46-
- executables into `~/.local/bin` (or `$CODEX_BIN_DIR`)
47-
- project files into `~/.local/share/codex-dual` (or `$CODEX_INSTALL_PREFIX`)
46+
- executables into `~/.local/bin` (or `$CQ_BIN_DIR`)
47+
- project files into `~/.local/share/code-quorum` (or `$CQ_INSTALL_PREFIX`)
4848
- skills into `~/.claude/skills` and `${CODEX_HOME:-~/.codex}/skills`
4949

5050
Uninstall:
@@ -57,11 +57,11 @@ Uninstall:
5757

5858
## Quickstart
5959

60-
From your project directory (must contain `.ccb_config/`):
60+
From your project directory (must contain `.cq_config/`):
6161

6262
```bash
63-
mkdir -p .ccb_config
64-
ccb codex,claude
63+
mkdir -p .cq_config
64+
cq codex,claude
6565
```
6666

6767
Send a message to a provider:
@@ -85,7 +85,7 @@ ask codex --reply-to <REQ_ID> --caller claude "Here are my notes..."
8585
ask claude --reply-to <REQ_ID> --caller codex "Here are my notes..."
8686
```
8787

88-
Tip: when you *expect* reply-via-ask, set a stable id with `--req-id`. `ask` includes a `CCB_REQ_ID: <id>` line at the top automatically so the recipient can copy it.
88+
Tip: when you *expect* reply-via-ask, set a stable id with `--req-id`. `ask` includes a `CQ_REQ_ID: <id>` line at the top automatically so the recipient can copy it.
8989

9090
```bash
9191
REQ_ID="$(python -c 'import secrets; print(secrets.token_hex(16))')"
@@ -98,9 +98,9 @@ EOF
9898
The reply is wrapped with protocol markers so the caller can identify it:
9999

100100
```
101-
CCB_REPLY: <REQ_ID>
102-
CCB_FROM: claude
103-
[CCB_RESULT] No reply required.
101+
CQ_REPLY: <REQ_ID>
102+
CQ_FROM: claude
103+
[CQ_RESULT] No reply required.
104104
105105
...message...
106106
```
@@ -109,19 +109,19 @@ CCB_FROM: claude
109109

110110
## Session isolation (repo A vs repo B)
111111

112-
By default, `ask` resolves sessions **only** for the current project via `.ccb_config/` and will not talk to sessions from a different repository.
112+
By default, `ask` resolves sessions **only** for the current project via `.cq_config/` and will not talk to sessions from a different repository.
113113

114114
To check what is currently mounted:
115115

116116
```bash
117-
ccb-mounted --json
117+
cq-mounted --json
118118
```
119119

120120
---
121121

122122
## Development
123123

124124
```bash
125-
python -m compileall -q lib bin ccb test
125+
python -m compileall -q lib bin cq test
126126
python -m pytest test/ -v --tb=short
127127
```

bin/ask

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ from compat import read_stdin_text, setup_windows_encoding
4747

4848
setup_windows_encoding()
4949

50-
from ccb_protocol import make_req_id, wrap_reply_payload, wrap_request_prompt
50+
from cq_protocol import make_req_id, wrap_reply_payload, wrap_request_prompt
5151
from claude_session import load_project_session as load_claude_session
5252
from cli_output import EXIT_ERROR, EXIT_OK
5353
from codex_session import load_project_session as load_codex_session
@@ -61,10 +61,10 @@ def _env_bool(name: str, default: bool = False) -> bool:
6161

6262

6363
def _default_caller() -> str:
64-
caller = (os.environ.get("CCB_CALLER") or "").strip()
64+
caller = (os.environ.get("CQ_CALLER") or "").strip()
6565
if caller:
6666
return caller
67-
if _env_bool("CCB_MANAGED", False):
67+
if _env_bool("CQ_MANAGED", False):
6868
return "codex"
6969
if os.environ.get("CODEX_SESSION_ID") or os.environ.get("CODEX_RUNTIME_DIR"):
7070
return "codex"
@@ -75,7 +75,7 @@ def _resolve_req_id(override_req_id: str | None) -> str:
7575
explicit = (override_req_id or "").strip()
7676
if explicit:
7777
return explicit
78-
env_req_id = (os.environ.get("CCB_REQ_ID") or "").strip()
78+
env_req_id = (os.environ.get("CQ_REQ_ID") or "").strip()
7979
return env_req_id or make_req_id()
8080

8181

@@ -124,13 +124,13 @@ def main(argv: list[str]) -> int:
124124
"--req-id",
125125
dest="override_req_id",
126126
default=None,
127-
help="Override the request id (default: CCB_REQ_ID env var, else auto-generated 32-hex).",
127+
help="Override the request id (default: CQ_REQ_ID env var, else auto-generated 32-hex).",
128128
)
129129
parser.add_argument(
130130
"--caller",
131131
dest="caller",
132132
default=None,
133-
help="Override the `CCB_FROM` value in reply payloads (only used with --reply-to).",
133+
help="Override the `CQ_FROM` value in reply payloads (only used with --reply-to).",
134134
)
135135
parser.add_argument(
136136
"message",
@@ -184,7 +184,7 @@ def main(argv: list[str]) -> int:
184184
f"[ERROR] No active {provider} session found for this directory.",
185185
file=sys.stderr,
186186
)
187-
print(f"[ERROR] Run `ccb {provider}` in this project first.", file=sys.stderr)
187+
print(f"[ERROR] Run `cq {provider}` in this project first.", file=sys.stderr)
188188
return EXIT_ERROR
189189

190190
ok, pane_or_err = session.ensure_pane()

bin/ccb-mounted renamed to bin/cq-mounted

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/usr/bin/env python3
22
"""
3-
ccb-mounted - Check which CCB providers are mounted.
3+
cq-mounted - Check which Code Quorum providers are mounted.
44
55
A provider is "mounted" if:
6-
1. Session file exists (.ccb_config/.{provider}-session or .{provider}-session) and is active
6+
1. Session file exists (.cq_config/.{provider}-session or .{provider}-session) and is active
77
2. Pane is reachable/alive (best-effort) - OR socket access is blocked (sandbox mode)
88
99
Usage:
10-
ccb-mounted [CWD] [--json|--simple] [--include-inactive]
10+
cq-mounted [CWD] [--json|--simple] [--include-inactive]
1111
1212
Examples:
13-
ccb-mounted
14-
ccb-mounted --simple
15-
ccb-mounted /path/to/project --json
13+
cq-mounted
14+
cq-mounted --simple
15+
cq-mounted /path/to/project --json
1616
"""
1717

1818
import sys
@@ -34,7 +34,7 @@ PROVIDERS = ["codex", "claude"]
3434
def find_session_file_path(cwd: Path, provider: str) -> Path | None:
3535
"""Return the provider session file path if present."""
3636
candidates = (
37-
cwd / ".ccb_config" / f".{provider}-session",
37+
cwd / ".cq_config" / f".{provider}-session",
3838
cwd / f".{provider}-session",
3939
)
4040
for p in candidates:
@@ -132,8 +132,8 @@ def can_connect_localhost() -> bool:
132132

133133
def main():
134134
parser = argparse.ArgumentParser(
135-
prog="ccb-mounted",
136-
description="Check which CCB providers are mounted for a project directory.",
135+
prog=Path(sys.argv[0]).name or "cq-mounted",
136+
description="Check which Code Quorum providers are mounted for a project directory.",
137137
)
138138
parser.add_argument("cwd", nargs="?", default=".", help="Project directory (default: current working directory).")
139139
fmt_group = parser.add_mutually_exclusive_group()

bin/ping

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _load_session(provider: str, *, work_dir: Path, session_file: Path | None) -
6262
session = load_claude_session(work_dir)
6363

6464
if not session:
65-
return None, f"No active {provider} session found for this directory. Run `ccb {provider}` first."
65+
return None, f"No active {provider} session found for this directory. Run `cq {provider}` first."
6666

6767
if _is_inactive(getattr(session, "data", {})):
6868
return None, f"Session is inactive: {getattr(session, 'session_file', '')}"

claude_skills/all-plan/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: all-plan
3-
description: Collaborative planning with mounted CLIs only. Automatically detects active providers via ccb-mounted.
3+
description: Collaborative planning with mounted CLIs only. Automatically detects active providers via cq-mounted.
44
metadata:
55
short-description: Collaborative planning with mounted CLIs
66
---
@@ -9,7 +9,7 @@ metadata:
99

1010
Collaborative planning involving only the mounted/active CLIs with iterative refinement.
1111

12-
**IMPORTANT**: This skill automatically detects which providers are active by running `ccb-mounted`. It will only dispatch to providers that are actually mounted. For example, if you ran `ccb claude codex`, only Claude and Codex will participate in the planning.
12+
**IMPORTANT**: This skill automatically detects which providers are active by running `cq-mounted`. It will only dispatch to providers that are actually mounted. For example, if you ran `cq claude codex`, only Claude and Codex will participate in the planning.
1313

1414
Note: After dispatching planning requests via `ask`, draft your own independent design, then end your turn to collect replies via reply-via-ask.
1515

0 commit comments

Comments
 (0)