claudekit-codex-sync 0.1.0 → 0.2.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 (33) hide show
  1. package/README.md +76 -59
  2. package/docs/codebase-summary.md +40 -43
  3. package/docs/codex-vs-claude-agents.md +53 -42
  4. package/docs/installation-guide.md +67 -23
  5. package/docs/project-overview-pdr.md +20 -26
  6. package/docs/project-roadmap.md +26 -32
  7. package/docs/system-architecture.md +45 -82
  8. package/package.json +4 -3
  9. package/plans/260223-1310-v02-cli-redesign-cleanup/phase-01-delete-dead-code.md +88 -0
  10. package/plans/260223-1310-v02-cli-redesign-cleanup/phase-02-cli-redesign.md +316 -0
  11. package/plans/260223-1310-v02-cli-redesign-cleanup/phase-03-symlink-venv.md +148 -0
  12. package/plans/260223-1310-v02-cli-redesign-cleanup/phase-04-wire-unused-functions.md +151 -0
  13. package/plans/260223-1310-v02-cli-redesign-cleanup/phase-05-safety-tests-docs.md +206 -0
  14. package/plans/260223-1310-v02-cli-redesign-cleanup/plan.md +18 -0
  15. package/plans/reports/planner-260223-v02-cli-redesign-cleanup-validation.md +95 -0
  16. package/plans/reports/project-manager-260223-v02-cli-redesign-cleanup-finalization.md +28 -0
  17. package/src/claudekit_codex_sync/asset_sync_dir.py +60 -9
  18. package/src/claudekit_codex_sync/asset_sync_zip.py +16 -5
  19. package/src/claudekit_codex_sync/clean_target.py +49 -0
  20. package/src/claudekit_codex_sync/cli.py +113 -81
  21. package/src/claudekit_codex_sync/constants.py +2 -13
  22. package/src/claudekit_codex_sync/dep_bootstrapper.py +71 -29
  23. package/src/claudekit_codex_sync/path_normalizer.py +2 -0
  24. package/src/claudekit_codex_sync/source_resolver.py +10 -2
  25. package/src/claudekit_codex_sync/sync_registry.py +1 -0
  26. package/templates/agents-md.md +5 -8
  27. package/tests/test_clean_target.py +55 -0
  28. package/tests/test_cli_args.py +57 -0
  29. package/reports/brainstorm-260222-2051-claudekit-codex-community-sync.md +0 -113
  30. package/scripts/bootstrap-claudekit-skill-scripts.sh +0 -150
  31. package/scripts/claudekit-sync-all.py +0 -1150
  32. package/scripts/export-claudekit-prompts.sh +0 -221
  33. package/scripts/normalize-claudekit-for-codex.sh +0 -261
package/README.md CHANGED
@@ -1,70 +1,92 @@
1
1
  # claudekit-codex-sync
2
2
 
3
- Sync [ClaudeKit](https://github.com/anthropics/claudekit) skills, agents, prompts, and configuration to [Codex CLI](https://developers.openai.com/codex).
3
+ Sync [ClaudeKit](https://github.com/anthropics/claudekit) skills, config assets, prompts, and runtime setup to [Codex CLI](https://developers.openai.com/codex).
4
4
 
5
5
  ## Problem
6
6
 
7
- ClaudeKit stores agent definitions (`.md` with YAML frontmatter), skills, prompts, and config under `~/.claude/`. Codex CLI uses a different layout under `~/.codex/` with `.toml` agents, GPT model names, and TOML-based config. Manually migrating is tedious and error-prone.
7
+ ClaudeKit uses `~/.claude/` conventions and agent markdown frontmatter. Codex uses `~/.codex/`, TOML config, and different runtime defaults. Manual migration is slow and error-prone.
8
8
 
9
9
  ## What It Does
10
10
 
11
11
  | Step | Action |
12
12
  |---|---|
13
- | **Source resolve** | Detects `~/.claude/` (live) or ClaudeKit export zip |
14
- | **Asset sync** | Copies agents, commands, rules, scripts `~/.codex/claudekit/` |
15
- | **Skill sync** | Copies 54+ skills → `~/.codex/skills/` |
16
- | **Path normalize** | Rewrites `.claude` `.codex` in all synced files |
17
- | **Agent convert** | `.md` (YAML frontmatter) → `.toml` with model mapping |
18
- | **Model mapping** | `opus gpt-5.3-codex`, `haiku → gpt-5.3-codex-spark` |
19
- | **Config enforce** | Sets `multi_agent`, `child_agents_md`, registers `[agents.*]` |
13
+ | **Scope select** | Sync to project `./.codex/` (default) or global `~/.codex/` (`-g`) |
14
+ | **Fresh clean** | Optional `-f` cleanup of target dirs before sync |
15
+ | **Source resolve** | Uses live `~/.claude/` or `--zip` export |
16
+ | **Asset sync** | Copies commands/output-styles/scripts and `.env.example` to `codex_home/claudekit/` |
17
+ | **Skill sync** | Copies skills into `codex_home/skills/` |
18
+ | **Path normalize** | Rewrites `.claude` references to `.codex` |
19
+ | **Config enforce** | Ensures `config.toml`, feature flags, and agent registration |
20
20
  | **Prompt export** | Generates Codex-compatible prompt files |
21
- | **Dep bootstrap** | Installs Python/Node deps for skills requiring them |
22
- | **Runtime verify** | Health-checks the synced environment |
21
+ | **Dep bootstrap** | Symlink-first venv strategy, fallback install |
22
+ | **Runtime verify** | Health-checks synced environment |
23
23
 
24
24
  ## Installation
25
25
 
26
26
  ```bash
27
- # Clone and install globally
27
+ # Install from npm registry
28
+ npm install -g claudekit-codex-sync
29
+
30
+ # Or install from source
28
31
  git clone https://github.com/vinhawk-66/claudekit-codex-sync.git
29
32
  cd claudekit-codex-sync
30
33
  npm install -g .
31
34
  ```
32
35
 
36
+ ## Quick Start
37
+
38
+ ```bash
39
+ # Project sync (to ./.codex/)
40
+ ckc-sync
41
+
42
+ # Global sync (to ~/.codex/)
43
+ ckc-sync -g
44
+
45
+ # Fresh global re-sync
46
+ ckc-sync -g -f
47
+
48
+ # Preview only
49
+ ckc-sync -g -n
50
+ ```
51
+
33
52
  ## Usage
34
53
 
35
54
  ```bash
36
- # Sync from live ~/.claude/ directory
37
- ck-codex-sync --source-mode live
55
+ # Custom live source (instead of ~/.claude)
56
+ ckc-sync --source /path/to/.claude
38
57
 
39
58
  # Sync from exported zip
40
- ck-codex-sync --zip claudekit-export.zip
41
-
42
- # Preview without changes
43
- ck-codex-sync --source-mode live --dry-run
59
+ ckc-sync --zip claudekit-export.zip --force
44
60
 
45
61
  # Include MCP skills
46
- ck-codex-sync --source-mode live --include-mcp
62
+ ckc-sync --mcp
63
+
64
+ # Skip dependency bootstrap
65
+ ckc-sync --no-deps
66
+
67
+ # Overwrite user-edited managed assets
68
+ ckc-sync --force
69
+
70
+ # Backward-compatible command name
71
+ ck-codex-sync -g -n
47
72
  ```
48
73
 
49
74
  ## CLI Options
50
75
 
51
76
  ```
52
- --source-mode live|zip|auto Source selection (default: auto)
53
- --source-dir PATH Custom source directory
54
- --zip PATH Specific zip file
55
- --codex-home PATH Codex home (default: ~/.codex)
56
- --include-mcp Include MCP skills
57
- --include-hooks Include hooks
58
- --skip-bootstrap Skip dependency installation
59
- --skip-verify Skip runtime verification
60
- --skip-agent-toml Skip agent TOML normalization
61
- --respect-edits Backup user-edited files
62
- --dry-run Preview mode
77
+ -g, --global Sync to ~/.codex/ (default: ./.codex/)
78
+ -f, --fresh Clean target dirs before sync
79
+ --force Overwrite user-edited files without backup (required for zip write mode)
80
+ --zip PATH Sync from zip instead of live ~/.claude/
81
+ --source PATH Custom source dir (default: ~/.claude/)
82
+ --mcp Include MCP skills
83
+ --no-deps Skip dependency bootstrap (venv)
84
+ -n, --dry-run Preview only
63
85
  ```
64
86
 
65
87
  ## Agent Model Mapping
66
88
 
67
- Per [official Codex docs](https://developers.openai.com/codex/multi-agent), each agent role can override `model`, `model_reasoning_effort`, and `sandbox_mode`:
89
+ Per [official Codex docs](https://developers.openai.com/codex/multi-agent):
68
90
 
69
91
  | Claude Model | Codex Model | Reasoning | Used By |
70
92
  |---|---|---|---|
@@ -72,35 +94,30 @@ Per [official Codex docs](https://developers.openai.com/codex/multi-agent), each
72
94
  | `sonnet` | `gpt-5.3-codex` | high | debugger, fullstack_developer |
73
95
  | `haiku` | `gpt-5.3-codex-spark` | medium | researcher, tester, docs_manager |
74
96
 
75
- Read-only agents (brainstormer, code_reviewer, researcher, project_manager, journal_writer) get `sandbox_mode = "read-only"`.
76
-
77
- ## Related Tools
78
-
79
- - **[ccs](https://www.npmjs.com/package/@kaitranntt/ccs)** (`@kaitranntt/ccs`) — Claude Code Profile & Model Switcher. Allows running Claude Code with different model backends including Codex models via CLIProxy. Example: `ccs codex` launches Claude Code using Codex as the backend model.
80
- - **[Codex CLI](https://github.com/openai/codex)** (`@openai/codex`) — OpenAI's coding agent CLI.
97
+ Read-only roles remain: brainstormer, code_reviewer, researcher, project_manager, journal_writer.
81
98
 
82
99
  ## Project Structure
83
100
 
84
101
  ```
85
- ├── bin/ck-codex-sync.js # npm CLI entry point
86
- ├── src/claudekit_codex_sync/ # Python modules (13 files, ~1500 LOC)
87
- │ ├── cli.py # Main orchestrator
88
- │ ├── source_resolver.py # Source detection (live/zip/auto)
89
- │ ├── asset_sync_dir.py # Directory-based sync
90
- │ ├── asset_sync_zip.py # Zip-based sync
91
- │ ├── path_normalizer.py # Path rewriting + agent .md→.toml
92
- │ ├── config_enforcer.py # Config, multi-agent, agent registration
93
- │ ├── prompt_exporter.py # Prompt file generation
94
- │ ├── bridge_generator.py # Bridge skill for Codex
95
- │ ├── dep_bootstrapper.py # Dependency installation
96
- │ ├── runtime_verifier.py # Health checks
97
- │ ├── sync_registry.py # Backup/registry (SHA-256)
98
- │ ├── constants.py # Replacements, model maps
99
- └── utils.py # Shared utilities
100
- ├── templates/ # Template files for generated content
101
- ├── tests/ # pytest suite
102
- ├── scripts/ # Legacy standalone scripts
103
- └── docs/ # Documentation
102
+ ├── bin/ck-codex-sync.js
103
+ ├── src/claudekit_codex_sync/
104
+ │ ├── cli.py
105
+ │ ├── clean_target.py
106
+ │ ├── source_resolver.py
107
+ │ ├── asset_sync_dir.py
108
+ │ ├── asset_sync_zip.py
109
+ │ ├── path_normalizer.py
110
+ │ ├── config_enforcer.py
111
+ │ ├── prompt_exporter.py
112
+ │ ├── bridge_generator.py
113
+ │ ├── dep_bootstrapper.py
114
+ │ ├── runtime_verifier.py
115
+ │ ├── sync_registry.py
116
+ ├── constants.py
117
+ │ └── utils.py
118
+ ├── templates/
119
+ ├── tests/
120
+ └── docs/
104
121
  ```
105
122
 
106
123
  ## Development
@@ -109,11 +126,11 @@ Read-only agents (brainstormer, code_reviewer, researcher, project_manager, jour
109
126
  # Run tests
110
127
  PYTHONPATH=src python3 -m pytest tests/ -v
111
128
 
112
- # Lint
129
+ # Compile check
113
130
  python3 -m py_compile src/claudekit_codex_sync/*.py
114
131
 
115
- # Run sync locally
116
- PYTHONPATH=src python3 -m claudekit_codex_sync.cli --source-mode live --dry-run
132
+ # Local dry-run sync
133
+ PYTHONPATH=src python3 -m claudekit_codex_sync.cli -n
117
134
  ```
118
135
 
119
136
  ## Documentation
@@ -2,82 +2,79 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- **claudekit-codex-sync** bridges ClaudeKit (`~/.claude/`) to Codex CLI (`~/.codex/`) by syncing skills, agents, prompts, and configuration. Written primarily in Python with a Node.js CLI wrapper.
5
+ **claudekit-codex-sync** bridges ClaudeKit (`~/.claude/`) to Codex CLI (`.codex/` project scope by default, optional global `~/.codex/`) by syncing skills, assets, prompts, and runtime defaults.
6
6
 
7
7
  ## Stats
8
8
 
9
- | Component | Files | LOC | Purpose |
10
- |---|---|---|---|
11
- | `src/claudekit_codex_sync/` | 13 | ~1500 | Core Python modules |
12
- | `templates/` | 5 | ~280 | Generated file templates |
13
- | `tests/` | 2 | ~106 | pytest-based test suite |
14
- | `scripts/` | 4 | ~1780 | Legacy standalone scripts |
15
- | `bin/` | 2 | ~20 | npm CLI entry point |
9
+ | Component | Files | Purpose |
10
+ |---|---|---|
11
+ | `src/claudekit_codex_sync/` | 14 | Core Python sync modules |
12
+ | `templates/` | 6 | Generated content templates |
13
+ | `tests/` | 4 | pytest suite |
14
+ | `bin/` | 2 | npm CLI entry points |
16
15
 
17
16
  ## Module Map
18
17
 
19
18
  ### Core Orchestration
20
19
 
21
- - **`cli.py`** (199 LOC) — Main entry point. Parses args, coordinates all sync phases, outputs JSON summary. Supports `live` (directory) and `zip` source modes.
20
+ - **`cli.py`** — Main entry point with 8-flag interface (`-g`, `-f`, `--force`, `--zip`, `--source`, `--mcp`, `--no-deps`, `-n`).
21
+ - **`clean_target.py`** — Fresh-sync cleaner for `--fresh` (preserves `skills/.venv`).
22
22
 
23
23
  ### Source Resolution
24
24
 
25
- - **`source_resolver.py`** (78 LOC) Detects ClaudeKit source: `~/.claude/` for live mode, finds latest zip for zip mode. Validates source has required structure.
26
-
27
- ### Asset Sync
28
-
29
- - **`asset_sync_dir.py`** (125 LOC) — Copies assets and skills from a live `~/.claude/` directory to `~/.codex/`. Handles `ASSET_DIRS` (agents, commands, rules, scripts) and `ASSET_FILES`.
30
- - **`asset_sync_zip.py`** (140 LOC) — Same as above but from a ClaudeKit export zip file.
25
+ - **`source_resolver.py`** — Live source discovery and zip source lookup.
31
26
 
32
- ### Path Normalization
27
+ ### Asset & Skill Sync
33
28
 
34
- - **`path_normalizer.py`** (248 LOC) Rewrites `.claude` `.codex` paths in all synced files. Also converts ClaudeKit agent `.md` files (with YAML frontmatter) to Codex `.toml` format with correct model mapping.
35
- - **`constants.py`** (104 LOC) All replacement patterns (`SKILL_MD_REPLACEMENTS`, `AGENT_TOML_REPLACEMENTS`, `CLAUDE_SYNTAX_ADAPTATIONS`), model mapping tables, and read-only role sets.
29
+ - **`asset_sync_dir.py`** — Live sync for assets and skills with registry-aware overwrite/backup behavior for managed assets.
30
+ - **`asset_sync_zip.py`** — Zip-based sync path.
36
31
 
37
- ### Configuration
32
+ ### Normalization & Conversion
38
33
 
39
- - **`config_enforcer.py`** (140 LOC) Ensures `config.toml` has correct structure, enforces `multi_agent` + `child_agents_md` feature flags, auto-registers `[agents.*]` sections from TOML files.
34
+ - **`path_normalizer.py`** — `.claude` path rewrites, copywriting script patch, agent markdown-to-TOML conversion.
35
+ - **`constants.py`** — Replacement patterns, model mapping, asset allowlists.
40
36
 
41
- ### Prompt & Bridge
37
+ ### Config & Prompting
42
38
 
43
- - **`prompt_exporter.py`** (89 LOC) Exports ClaudeKit prompts to Codex-compatible format.
44
- - **`bridge_generator.py`** (33 LOC) Creates a bridge skill in `~/.codex/skills/claudekit-command-bridge/`.
39
+ - **`config_enforcer.py`** — `config.toml` enforcement + agent registration.
40
+ - **`prompt_exporter.py`** — Prompt generation.
41
+ - **`bridge_generator.py`** — Bridge skill generation.
45
42
 
46
- ### Support
43
+ ### Runtime Support
47
44
 
48
- - **`dep_bootstrapper.py`** (73 LOC) Installs Python/Node dependencies for skills that require them.
49
- - **`runtime_verifier.py`** (32 LOC) Verifies synced environment health (codex help, copywriting, prompt count, skill count).
50
- - **`sync_registry.py`** (77 LOC) SHA-256 checksum registry for tracking synced files and detecting user edits.
51
- - **`utils.py`** (130 LOC) — Shared utilities: `apply_replacements()`, `load_template()`, `write_text_if_changed()`, `SyncError`.
45
+ - **`dep_bootstrapper.py`** Symlink-first dependency bootstrap (`~/.claude/skills/.venv` -> `codex_home/skills/.venv` fallback to create/install).
46
+ - **`runtime_verifier.py`** — Runtime health checks.
47
+ - **`sync_registry.py`** — Sync registry and user-edit detection helpers.
48
+ - **`utils.py`** — Shared helpers and `SyncError`.
52
49
 
53
50
  ## Data Flow
54
51
 
55
52
  ```
56
53
  Source (~/.claude/ or zip)
57
54
 
58
- source_resolver.py → detect source type
55
+ source_resolver.py
59
56
 
60
- asset_sync_dir/zip.py copy agents, skills, commands
57
+ asset_sync_dir.py / asset_sync_zip.py
61
58
 
62
- path_normalizer.py → rewrite paths + convert .md→.toml agents
59
+ path_normalizer.py
63
60
 
64
- config_enforcer.py → update config.toml + register agents
61
+ config_enforcer.py
65
62
 
66
- prompt_exporter.py → generate prompt files
63
+ prompt_exporter.py
67
64
 
68
- dep_bootstrapper.py → install skill dependencies
65
+ dep_bootstrapper.py
69
66
 
70
- runtime_verifier.py → health check
67
+ runtime_verifier.py
71
68
 
72
- Output: ~/.codex/ fully configured for Codex CLI
69
+ Configured Codex home (.codex project scope or ~/.codex global)
73
70
  ```
74
71
 
75
72
  ## Test Coverage
76
73
 
77
- | File | Tests | Coverage |
78
- |---|---|---|
79
- | `config_enforcer.py` | 4 | Feature flag enforcement |
80
- | `path_normalizer.py` | 7 | Path replacement patterns |
81
- | **Total** | **11** | Core functionality |
82
-
83
- Untested modules (need coverage): `cli.py`, `asset_sync_dir.py`, `asset_sync_zip.py`, `source_resolver.py`, `prompt_exporter.py`, `dep_bootstrapper.py`, `runtime_verifier.py`, `sync_registry.py`, `bridge_generator.py`, `utils.py`.
74
+ | File | Tests |
75
+ |---|---|
76
+ | `tests/test_config_enforcer.py` | 4 |
77
+ | `tests/test_path_normalizer.py` | 7 |
78
+ | `tests/test_clean_target.py` | 4 |
79
+ | `tests/test_cli_args.py` | 6 |
80
+ | **Total** | **21** |
@@ -1,49 +1,60 @@
1
1
  # Codex vs Claude Agents
2
2
 
3
- This document outlines the differences between Claude Code agents and Codex agents, and what is lost or preserved during sync.
3
+ Differences between Claude Code (ClaudeKit) agents and Codex CLI agents, and how this sync tool handles the translation.
4
4
 
5
- ## Key Differences
5
+ ## Agent Definition Format
6
6
 
7
- | Feature | Claude Code | Codex CLI |
8
- |---------|-------------|-----------|
9
- | **Agent Definition** | TOML files with `[[agents]]` sections | TOML files with `[[agents]]` sections |
10
- | **Model Selection** | `model` frontmatter field | No per-agent model selection |
11
- | **Tool Restrictions** | `tools` frontmatter field | No tool restrictions (all tools available) |
12
- | **Memory** | `memory` frontmatter field | `developer_instructions` text only |
13
- | **Delegation** | `Task()` tool for explicit delegation | Auto-spawn via `multi_agent = true` |
7
+ | Aspect | Claude Code (ClaudeKit) | Codex CLI |
8
+ |---|---|---|
9
+ | **File format** | `.md` with YAML frontmatter | `.toml` |
10
+ | **Instructions** | Markdown body below `---` | `developer_instructions = """..."""` |
11
+ | **Model** | `model: opus/sonnet/haiku` | `model = "gpt-5.3-codex"` (per-agent override) |
12
+ | **Reasoning** | Not configurable | `model_reasoning_effort = "xhigh/high/medium"` |
13
+ | **Sandbox** | Not configurable | `sandbox_mode = "read-only/workspace-write"` |
14
+ | **Tools** | `tools: [Glob, Grep, Read, ...]` | All tools available (no restriction) |
15
+ | **Delegation** | `Task(planner)` explicit call | Auto-spawn by model + `/agent` to switch threads |
16
+ | **Memory** | `memory: project` field | Instructions text + AGENTS.md |
14
17
 
15
- ## What Transfers
18
+ ## What the Sync Preserves
16
19
 
17
- The following are preserved during ClaudeKit -> Codex sync:
20
+ - Agent name and slug
21
+ - ✅ Developer instructions (full markdown body)
22
+ - ✅ Description (from YAML frontmatter)
23
+ - ✅ Model selection → mapped to Codex equivalents
24
+ - ✅ Sandbox mode settings
25
+ - ✅ File structure (`~/.codex/agents/`)
26
+ - ✅ Config registration (`[agents.*]` in config.toml)
18
27
 
19
- - **Agent name and description** - Basic identity
20
- - **Developer instructions** - Core behavior guidance
21
- - **Sandbox mode settings** - Security constraints
22
- - **Agent file structure** - Organized in `~/.codex/agents/`
28
+ ## What Changes
23
29
 
24
- ## What's Lost
30
+ ### Model Mapping
25
31
 
26
- The following Claude-specific features are stripped or adapted:
32
+ The sync automatically maps Claude model names to Codex equivalents:
27
33
 
28
- 1. **Explicit Task() delegation syntax**
29
- - Claude: `Task(subagent_type="researcher", ...)`
30
- - Codex: Auto-spawn based on context
34
+ ```
35
+ opus → gpt-5.3-codex + model_reasoning_effort = "xhigh"
36
+ sonnet gpt-5.3-codex + model_reasoning_effort = "high"
37
+ haiku → gpt-5.3-codex-spark + model_reasoning_effort = "medium"
38
+ ```
39
+
40
+ ### Sandbox Assignment
31
41
 
32
- 2. **Tool restrictions**
33
- - Claude: `tools = ["Read", "Grep", "Edit"]` limits available tools
34
- - Codex: All tools available to all agents
42
+ Agents that only read/analyze get `sandbox_mode = "read-only"`:
43
+ - brainstormer, code_reviewer, researcher, project_manager, journal_writer
35
44
 
36
- 3. **Model selection**
37
- - Claude: `model = "haiku"` for cost/performance tuning
38
- - Codex: Single model for all operations
45
+ Agents that write code get `sandbox_mode = "workspace-write"`:
46
+ - planner, debugger, fullstack_developer, tester, code_simplifier, etc.
39
47
 
40
- 4. **Memory configuration**
41
- - Claude: `memory` section with context management
42
- - Codex: Instructions embedded in developer text
48
+ ### Delegation Syntax
49
+
50
+ ```diff
51
+ - Task(subagent_type="researcher", ...)
52
+ + delegate to the researcher agent
53
+ ```
43
54
 
44
- ## Path Normalization
55
+ `Task()` calls are rewritten to natural language since Codex uses model-driven auto-spawning.
45
56
 
46
- Agent TOMLs are automatically normalized during sync:
57
+ ### Path Normalization
47
58
 
48
59
  ```diff
49
60
  - $HOME/.claude/skills/
@@ -53,22 +64,22 @@ Agent TOMLs are automatically normalized during sync:
53
64
  + ~/.codex/
54
65
  ```
55
66
 
56
- ## Multi-Agent Configuration
67
+ ## What's Not Supported
68
+
69
+ - **Tool restrictions**: Claude's `tools = [...]` field is dropped — Codex gives all tools to all agents
70
+ - **Memory config**: Claude's `memory: project` is dropped — use `developer_instructions` text instead
71
+ - **Explicit model names**: Claude-specific model names are replaced, not preserved
72
+
73
+ ## Multi-Agent in Codex
57
74
 
58
- After sync, enable multi-agent mode:
75
+ After sync, Codex supports multi-agent workflows via:
59
76
 
60
77
  ```toml
61
78
  [features]
62
79
  multi_agent = true
80
+ child_agents_md = true
63
81
  ```
64
82
 
65
- This allows Codex to auto-spawn sub-agents based on task context, similar to Claude's `Task()` delegation but without explicit syntax.
66
-
67
- ## Recommendation
68
-
69
- For maximum compatibility:
83
+ Built-in roles: `default`, `worker`, `explorer`. Custom roles (from your synced agents) are spawned by the model based on `description` in `[agents.*]` config sections.
70
84
 
71
- 1. Write agent instructions assuming all tools are available
72
- 2. Use natural language for delegation intent (e.g., "use the researcher agent")
73
- 3. Keep agent instructions under 2000 tokens
74
- 4. Test agents after sync to verify behavior
85
+ Use `/agent` in interactive Codex CLI to switch between active sub-agent threads.
@@ -2,63 +2,107 @@
2
2
 
3
3
  ## Prerequisites
4
4
 
5
- - Python 3.9+
6
- - Node.js 18+ (for npm installation)
7
- - Codex CLI installed
5
+ - Python 3.12+
6
+ - Node.js 18+
7
+ - [Codex CLI](https://developers.openai.com/codex/cli) installed (`npm install -g @openai/codex`)
8
+ - ClaudeKit installed (`~/.claude/` exists) or exported ClaudeKit zip
9
+
10
+ ## Install via npm
11
+
12
+ ```bash
13
+ npm install -g claudekit-codex-sync
14
+ ```
8
15
 
9
16
  ## Install from Source
10
17
 
11
18
  ```bash
12
- cd /home/vinhawk/claudekit-codex-sync
19
+ git clone https://github.com/vinhawk-66/claudekit-codex-sync.git
20
+ cd claudekit-codex-sync
13
21
  npm install -g .
14
22
  ```
15
23
 
16
24
  ## Verify Installation
17
25
 
18
26
  ```bash
27
+ ckc-sync --help
19
28
  ck-codex-sync --help
20
29
  ```
21
30
 
22
31
  ## Usage
23
32
 
24
- ### Basic Sync (from zip)
33
+ ### Project sync (default target: `./.codex/`)
25
34
 
26
35
  ```bash
27
- ck-codex-sync
36
+ ckc-sync
28
37
  ```
29
38
 
30
- ### Live Source Mode (from ~/.claude/)
39
+ ### Global sync (`~/.codex/`)
31
40
 
32
41
  ```bash
33
- ck-codex-sync --source-mode live
42
+ ckc-sync -g
34
43
  ```
35
44
 
36
- ### Include MCP Skills
45
+ ### Fresh re-sync
37
46
 
38
47
  ```bash
39
- ck-codex-sync --include-mcp
48
+ ckc-sync -g -f
40
49
  ```
41
50
 
42
- ### Dry Run
51
+ ### Preview only
43
52
 
44
53
  ```bash
45
- ck-codex-sync --dry-run
54
+ ckc-sync -g -n
46
55
  ```
47
56
 
48
- ## Configuration
49
-
50
- The tool automatically configures:
57
+ ### Zip source
51
58
 
52
- - `~/.codex/config.toml` - Codex configuration
53
- - `~/.codex/agents/` - Agent definitions
54
- - `~/.codex/skills/` - Skill definitions
55
- - `~/.codex/prompts/` - Custom prompts
59
+ ```bash
60
+ ckc-sync --zip path/to/claudekit-export.zip --force
61
+ ```
56
62
 
57
- ## Post-Install Verification
63
+ ### Custom live source
58
64
 
59
65
  ```bash
60
- # Check multi-agent is enabled
61
- codex features list | grep multi_agent
66
+ ckc-sync --source /path/to/.claude
67
+ ```
62
68
 
63
- # Should show: multi_agent experimental true
69
+ ## Full Options
70
+
71
+ ```
72
+ -g, --global Sync to ~/.codex/ (default: ./.codex/)
73
+ -f, --fresh Clean target dirs before sync
74
+ --force Overwrite user-edited files without backup (required for zip write mode)
75
+ --zip PATH Sync from zip instead of live ~/.claude/
76
+ --source PATH Custom source dir (default: ~/.claude/)
77
+ --mcp Include MCP skills
78
+ --no-deps Skip dependency bootstrap (venv)
79
+ -n, --dry-run Preview only
64
80
  ```
81
+
82
+ ## What Gets Synced
83
+
84
+ | Source/Input | Destination |
85
+ |---|---|
86
+ | `skills/*/` | `codex_home/skills/*/` |
87
+ | `commands/` | `codex_home/claudekit/commands/` |
88
+ | `output-styles/` | `codex_home/claudekit/output-styles/` |
89
+ | `scripts/` | `codex_home/claudekit/scripts/` |
90
+ | `.env.example` | `codex_home/claudekit/.env.example` |
91
+ | Generated from `codex_home/claudekit/commands/*.md` | `codex_home/prompts/*.md` |
92
+
93
+ Notes:
94
+ - In zip mode, `hooks/` entries are also synced to `codex_home/claudekit/hooks/`.
95
+
96
+ ## Post-Install
97
+
98
+ After sync:
99
+
100
+ ```bash
101
+ codex --help
102
+ ```
103
+
104
+ The sync process enforces:
105
+ - `[features] multi_agent = true`
106
+ - `[features] child_agents_md = true`
107
+ - Bridge skill setup
108
+ - Agent registration for available `codex_home/agents/*.toml`
@@ -1,44 +1,38 @@
1
- # Project Overview PDR
1
+ # Project Overview - PDR
2
2
 
3
3
  ## Product
4
4
 
5
- **claudekit-codex-sync** — CLI tool that syncs ClaudeKit configuration to OpenAI Codex CLI.
5
+ **claudekit-codex-sync** — CLI tool that syncs ClaudeKit configuration into Codex CLI-compatible layout.
6
6
 
7
7
  ## Problem Statement
8
8
 
9
- ClaudeKit users who also use Codex CLI face duplicate setup: re-configuring agents, skills, prompts, and paths. The two platforms use incompatible formats (ClaudeKit: Markdown agents with YAML frontmatter, Claude model names; Codex: TOML agents, GPT model names).
9
+ ClaudeKit and Codex CLI use different file layouts, model naming, and config conventions. Users migrating between tools spend time on repetitive manual setup.
10
10
 
11
11
  ## Solution
12
12
 
13
- A single-command sync tool that:
14
- 1. Copies all assets from `~/.claude/` → `~/.codex/`
15
- 2. Rewrites paths (`.claude` `.codex`)
16
- 3. Converts agent definitions (`.md` `.toml`)
17
- 4. Maps model names (`opus` → `gpt-5.3-codex`, `haiku` → `gpt-5.3-codex-spark`)
18
- 5. Configures multi-agent features and registers agent roles
13
+ Single-command sync that:
14
+ 1. Copies skills and managed assets from ClaudeKit source
15
+ 2. Normalizes path references (`.claude` -> `.codex`)
16
+ 3. Enforces Codex config defaults and feature flags
17
+ 4. Registers available agents
18
+ 5. Exports prompts and verifies runtime readiness
19
19
 
20
20
  ## Target Users
21
21
 
22
- ClaudeKit power-users who also use or are migrating to Codex CLI.
22
+ ClaudeKit users moving to or co-using Codex CLI.
23
23
 
24
24
  ## Key Metrics
25
25
 
26
- - Zero manual configuration needed after sync
27
- - All synced agents load correctly in Codex
28
- - No `.claude` path references remain in synced files
29
- - 14+ agent roles with correct model assignments
26
+ - Project-scope default sync (`./.codex`) with optional global scope (`-g`)
27
+ - 21 automated tests covering core path normalization/config plus CLI parsing and fresh-clean behavior
28
+ - Backward-compatible command alias (`ck-codex-sync`) retained during v0.2
29
+ - Faster bootstrap for existing ClaudeKit users via symlink-first venv reuse
30
30
 
31
31
  ## Status
32
32
 
33
- **v0.1.0** — Functional. All core features implemented:
34
- - [x] Live directory sync
35
- - [x] Zip archive sync
36
- - [x] Path normalization (37+ files per sync)
37
- - [x] Agent .md → .toml conversion with model mapping
38
- - [x] Multi-agent config (multi_agent + child_agents_md)
39
- - [x] Agent registration (14 roles)
40
- - [x] Prompt export (20+ prompts)
41
- - [x] Dependency bootstrap
42
- - [x] Runtime verification
43
- - [ ] Full test coverage (11/~40 target tests)
44
- - [ ] Idempotent re-sync (partial — registry exists but not fully wired)
33
+ **v0.2.0** — CLI redesign and cleanup complete:
34
+ - [x] New `ckc-sync` command surface
35
+ - [x] `--fresh` clean target workflow
36
+ - [x] `--force` overwrite handling for managed assets
37
+ - [x] Symlink-first dependency bootstrap
38
+ - [x] Expanded tests and docs refresh