Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Commit 79c1340

Browse files
z23ccclaude
andcommitted
feat(codex): add Codex CLI skills/agents and simplify install flow
Add codex/ directory with TOML agent definitions and skill markdown for OpenAI Codex CLI integration. Simplify install-codex.sh to use ~/.flow/bin/ as the canonical flowctl path. Update plugin.json with full interface metadata and streamlined README instructions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 27a869e commit 79c1340

92 files changed

Lines changed: 16707 additions & 34 deletions

File tree

Some content is hidden

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

.agents/plugins/marketplace.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
2+
"name": "flow-code-marketplace",
3+
"interface": {
4+
"displayName": "Flow-Code Plugins"
5+
},
26
"plugins": [
37
{
48
"name": "flow-code",
59
"source": {
610
"source": "local",
7-
"path": "."
11+
"path": "./plugins/flow-code"
812
},
913
"policy": {
1014
"installation": "AVAILABLE",
1115
"authentication": "ON_INSTALL"
12-
}
16+
},
17+
"category": "Productivity"
1318
}
1419
]
1520
}

.codex-plugin/plugin.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
{
22
"name": "flow-code",
33
"version": "0.1.31",
4-
"description": "Zero-dependency planning + execution with .flow/ task tracking and Ralph autonomous mode (multi-model review gates). Worker subagent per task with git worktree isolation for parallel execution. Three-layer quality system (guard + RP plan-review + Codex adversarial). Full-auto by default — AI decides from context, zero questions. Teams-default with file locking, DAG mutation, Codex-driven conflict resolution, auto draft-PR. Auto-detected stack profiles with one-command guard (test/lint/typecheck). Enhanced agent definitions with permissionMode/maxTurns/effort. Lifecycle hooks with state preservation (PreCompact injects .flow state into compaction, TaskCompleted auto-unlocks files, SubagentStart context injection). Memory v2 with atomic entries, dedup, and progressive disclosure. TDD enforcement mode. Multi-epic queue with dependency visualization. Includes 20 subagents, 25+ commands, 23 skills.",
4+
"description": "Zero-dependency planning + execution with .flow/ task tracking and Ralph autonomous mode (multi-model review gates). Worker subagent per task with git worktree isolation for parallel execution. Three-layer quality system (guard + RP plan-review + Codex adversarial). Full-auto by default. Teams-default with file locking, DAG mutation, Codex-driven conflict resolution, auto draft-PR.",
55
"author": {
66
"name": "z23cc",
77
"url": "https://github.com/z23cc"
8+
},
9+
"homepage": "https://github.com/z23cc/flow-code",
10+
"repository": "https://github.com/z23cc/flow-code",
11+
"license": "MIT",
12+
"keywords": [
13+
"workflow",
14+
"planning",
15+
"execution",
16+
"automation",
17+
"ai",
18+
"codex"
19+
],
20+
"skills": "./codex/skills/",
21+
"interface": {
22+
"displayName": "Flow-Code",
23+
"shortDescription": "Plan-first workflow with subagent execution",
24+
"longDescription": "Structured plan-first workflow engine. Tracks epics and tasks in .flow/ directory. Spawns isolated worker subagents per task. Ralph mode enables fully autonomous execution with multi-model review gates. 24 subagents, 25+ commands, 23 skills.",
25+
"developerName": "z23cc",
26+
"category": "Productivity",
27+
"capabilities": [
28+
"Read",
29+
"Write"
30+
],
31+
"websiteURL": "https://github.com/z23cc/flow-code",
32+
"brandColor": "#3B82F6"
833
}
934
}

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,38 +1836,29 @@ CODEX_MAX_THREADS=12 \
18361836

18371837
**Install:**
18381838
```bash
1839-
# Clone the marketplace repo (one-time)
1839+
# Clone and install (one-time)
18401840
git clone https://github.com/z23cc/flow-code.git
18411841
cd flow-code
1842-
1843-
# Run the install script
1844-
./scripts/install-codex.sh flow-code
1842+
./scripts/install-codex.sh
18451843
```
18461844

1847-
> Codex doesn't have a plugin marketplace yet, so installation requires cloning this repo and running the install script. The script copies everything to `~/.codex/` — you can delete the clone after install (re-clone to update).
1845+
> The script copies skills/agents/prompts to `~/.codex/` and flowctl to `~/.flow/bin/`. Add `export PATH="$HOME/.flow/bin:$PATH"` to your shell profile.
18481846
18491847
**Per-project setup** (run in each project):
18501848
```bash
18511849
# Initialize .flow/ directory
1852-
~/.codex/bin/flowctl init
1853-
1854-
# Optional: copy flowctl locally for project portability
1855-
mkdir -p .flow/bin
1856-
cp ~/.codex/bin/flowctl .flow/bin/
1857-
cp ~/.codex/bin/flowctl.py .flow/bin/
1858-
cp -r ~/.codex/bin/flowctl .flow/bin/flowctl
1859-
chmod +x .flow/bin/flowctl
1850+
flowctl init
18601851

18611852
# Optional: configure review backend (codex recommended for Codex CLI)
1862-
~/.codex/bin/flowctl config set review.backend codex
1853+
flowctl config set review.backend codex
18631854
```
18641855

18651856
**Optional AGENTS.md snippet** (helps Codex understand flow-code):
18661857
```markdown
18671858
<!-- BEGIN FLOW-CODE -->
18681859
## Flow-Code
18691860

1870-
This project uses Flow-Code for task tracking. Use `.flow/bin/flowctl` or `~/.codex/bin/flowctl`.
1861+
This project uses Flow-Code for task tracking. `flowctl` must be in PATH (`~/.flow/bin/`).
18711862

18721863
Quick commands:
18731864
- `flowctl list` — list epics + tasks

README_CN.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,38 +1710,29 @@ CODEX_MAX_THREADS=12 \
17101710

17111711
**安装:**
17121712
```bash
1713-
# 克隆市场仓库(一次性)
1713+
# 克隆并安装(一次性)
17141714
git clone https://github.com/z23cc/flow-code.git
17151715
cd flow-code
1716-
1717-
# 运行安装脚本
1718-
./scripts/install-codex.sh flow-code
1716+
./scripts/install-codex.sh
17191717
```
17201718

1721-
> Codex 还没有插件市场,所以安装需要克隆此仓库并运行安装脚本。脚本将所有内容复制到 `~/.codex/` — 安装后可以删除克隆(重新克隆以更新)
1719+
> 脚本将 skills/agents/prompts 复制到 `~/.codex/`,flowctl 复制到 `~/.flow/bin/`。请将 `export PATH="$HOME/.flow/bin:$PATH"` 加入 shell 配置文件
17221720
17231721
**每个项目设置**(在每个项目中运行):
17241722
```bash
17251723
# 初始化 .flow/ 目录
1726-
~/.codex/bin/flowctl init
1727-
1728-
# 可选:本地复制 flowctl 以保证项目可移植性
1729-
mkdir -p .flow/bin
1730-
cp ~/.codex/bin/flowctl .flow/bin/
1731-
cp ~/.codex/bin/flowctl.py .flow/bin/
1732-
cp -r ~/.codex/bin/flowctl .flow/bin/flowctl
1733-
chmod +x .flow/bin/flowctl
1724+
flowctl init
17341725

17351726
# 可选:配置审查后端(推荐 codex)
1736-
~/.codex/bin/flowctl config set review.backend codex
1727+
flowctl config set review.backend codex
17371728
```
17381729

17391730
**可选 AGENTS.md 片段**(帮助 Codex 理解 flow-code):
17401731
```markdown
17411732
<!-- BEGIN FLOW-CODE -->
17421733
## Flow-Code
17431734

1744-
本项目使用 Flow-Code 进行任务追踪。使用 `.flow/bin/flowctl` `~/.codex/bin/flowctl`
1735+
本项目使用 Flow-Code 进行任务追踪。`flowctl` 需在 PATH 中(`~/.flow/bin/`
17451736

17461737
快速命令:
17471738
- `flowctl list` — 列出 epic + 任务

codex/agents/agents-md-scout.toml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Auto-generated by flowctl codex sync — do not edit manually
2+
name = "agents-md-scout"
3+
description = "Used by /flow-code:prime to analyze CLAUDE.md and AGENTS.md quality and completeness. Do not invoke directly."
4+
model = "gpt-5.4"
5+
model_reasoning_effort = "high"
6+
sandbox_mode = "read-only"
7+
8+
developer_instructions = """
9+
10+
You are a CLAUDE.md scout for agent readiness assessment. Analyze agent instruction files for completeness and quality.
11+
12+
## Why This Matters
13+
14+
Agents work better when they understand:
15+
- Project conventions (naming, structure, patterns)
16+
- Build/test commands (how to verify their work)
17+
- What NOT to do (common pitfalls, forbidden patterns)
18+
- Where things live (key directories, entry points)
19+
20+
Without CLAUDE.md, agents guess. Guessing wastes cycles.
21+
22+
## Scan Targets
23+
24+
### File Locations
25+
```bash
26+
# CLAUDE.md locations (priority order)
27+
ls -la CLAUDE.md .claude/CLAUDE.md 2>/dev/null
28+
29+
# AGENTS.md (Codex/other agents)
30+
ls -la AGENTS.md .agents/AGENTS.md 2>/dev/null
31+
32+
# Related instruction files
33+
ls -la CONTRIBUTING.md DEVELOPMENT.md .github/CONTRIBUTING.md 2>/dev/null
34+
```
35+
36+
### Content Analysis (if files exist)
37+
38+
Read the files and check for these sections:
39+
40+
**Essential sections:**
41+
- Project overview / purpose
42+
- Build commands (how to build)
43+
- Test commands (how to run tests)
44+
- Key directories / structure
45+
46+
**Valuable sections:**
47+
- Code style / conventions
48+
- Common patterns to follow
49+
- Things to avoid / pitfalls
50+
- Dependencies / setup instructions
51+
52+
**Advanced sections:**
53+
- Architecture overview
54+
- Data flow / key abstractions
55+
- Performance considerations
56+
- Security guidelines
57+
58+
## Quality Signals
59+
60+
**Good CLAUDE.md:**
61+
- Specific commands (not "run tests" but `pnpm test`)
62+
- File paths with context (`src/api/` for API routes)
63+
- Do/Don't lists with rationale
64+
- Links to detailed docs for deep dives
65+
66+
**Weak CLAUDE.md:**
67+
- Generic advice ("write clean code")
68+
- Missing build/test commands
69+
- No mention of project structure
70+
- Outdated information (references removed files)
71+
72+
## Output Format
73+
74+
```markdown
75+
## CLAUDE.md Scout Findings
76+
77+
### Files Found
78+
- CLAUDE.md: ✅ Found at [path] / ❌ Missing
79+
- AGENTS.md: ✅ Found at [path] / ❌ Missing
80+
- CONTRIBUTING.md: ✅ Found / ❌ Missing
81+
82+
### Content Analysis (if CLAUDE.md exists)
83+
84+
**Coverage Score: X/10**
85+
86+
| Section | Status | Notes |
87+
|---------|--------|-------|
88+
| Project overview | ✅/❌ | [brief note] |
89+
| Build commands | ✅/❌ | [brief note] |
90+
| Test commands | ✅/❌ | [brief note] |
91+
| Directory structure | ✅/❌ | [brief note] |
92+
| Code conventions | ✅/❌ | [brief note] |
93+
| Patterns to follow | ✅/❌ | [brief note] |
94+
| Things to avoid | ✅/❌ | [brief note] |
95+
| Setup instructions | ✅/❌ | [brief note] |
96+
97+
**Strengths:**
98+
- [What's done well]
99+
100+
**Gaps:**
101+
- [What's missing or weak]
102+
103+
### If CLAUDE.md Missing
104+
105+
**Detected from repo scan:**
106+
- Build tool: [detected or unknown]
107+
- Test framework: [detected or unknown]
108+
- Key directories: [list]
109+
- Package manager: [detected]
110+
111+
**Recommended sections to create:**
112+
1. [Most important missing section]
113+
2. [Second priority]
114+
3. [Third priority]
115+
116+
### Recommendations
117+
- [Priority 1]: [specific action]
118+
- [Priority 2]: [specific action]
119+
```
120+
121+
## Rules
122+
123+
- If CLAUDE.md exists, read and analyze it
124+
- If missing, scan repo for info that SHOULD be in CLAUDE.md
125+
- Check for staleness (references to files that don't exist)
126+
- Note if CONTRIBUTING.md duplicates what should be in CLAUDE.md
127+
- Don't penalize for missing advanced sections in small projects
128+
"""

0 commit comments

Comments
 (0)