Skip to content

Commit 4b58e2e

Browse files
committed
feat: Update CHANGELOG, README, and setup-fast-tools for streamlined workflow and new defaults
1 parent f4a1629 commit 4b58e2e

File tree

5 files changed

+58
-76
lines changed

5 files changed

+58
-76
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
This project adheres to semantic versioning. Dates are in YYYY-MM-DD.
66

7+
## [0.2.1] - 2025-09-16
8+
9+
- feat: Default `cdx` pass-through now targets `gpt-5-codex` and enables experimental reasoning summaries.
10+
- fix: `setup-fast-tools` now works from the current directory, creating `AGENTS.md` when missing and appending the fast-tools prompt without duplicate noise.
11+
- docs: Update `/setup-fast-tools`, README, and CHANGELOG to reflect the streamlined workflow.
12+
713
## [0.2.0] - 2025-09-16
814

915
- fix: Prompt installer now searches correct locations in order of preference and respects `REPO_PROMPTS_DIR`.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ cdx -- --profile NAME # pass through to codex with defaults
4343
cdx raw <args> # run codex without defaults
4444
```
4545

46+
> Default pass-through now targets `gpt-5-codex` with `model_reasoning_effort="high"`, `model_reasoning_summary="auto"`, and `model_reasoning_summary_format="experimental"` while enabling `--search` and `--dangerously-bypass-approvals-and-sandbox`. Use `cdx raw` to skip these defaults.
47+
4648
## Repo at a Glance
4749

4850
```text
@@ -64,7 +66,7 @@ cdx/
6466
- `cdx/scripts/` — utilities (e.g., `setup-fast-tools.sh`).
6567
- `cdx/smoke-test.sh` — non‑destructive health check.
6668

67-
> Tip: Append the fast‑tools prompt to `AGENTS.md` with `bash cdx/scripts/setup-fast-tools.sh` (idempotent; add `--install-deps` to install rg/fd/jq). If your prompts live elsewhere, set `REPO_PROMPTS_DIR=/path/to/prompts` before running `cdx prompts`.
69+
> Tip: Append the fast‑tools prompt to `AGENTS.md` with `bash cdx/scripts/setup-fast-tools.sh` (creates the file if missing; add `--install-deps` to install rg/fd/jq). If your prompts live elsewhere, set `REPO_PROMPTS_DIR=/path/to/prompts` before running `cdx prompts`.
6870
6971
## Requirements & Troubleshooting
7072

cdx/cdx.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ _cdx__detect_plugin_dir() {
3535
# Configuration (overridable via env) #
3636
#########################################
3737
: "${CODEX_BIN:=codex}"
38-
: "${CDX_VERSION:=0.2.0}"
38+
: "${CDX_VERSION:=0.2.1}"
3939
: "${CDX_BUILD_DATE:=2025-09-16}"
4040
: "${CODEX_PLUGIN_DIR:=$(_cdx__detect_plugin_dir)}"
4141
: "${CDX_CHECK_UPDATES:=}"
4242

4343
# Opinionated defaults for pass-through invocations of `codex`.
4444
_CDX_DEFAULT_FLAGS=(
45-
-m gpt-5
45+
-m gpt-5-codex
4646
-c 'model_reasoning_effort="high"'
4747
-c 'model_reasoning_summary="auto"'
48+
-c 'model_reasoning_summary_format="experimental"'
4849
--search
4950
--dangerously-bypass-approvals-and-sandbox
5051
)

cdx/prompts/setup-fast-tools.md

Lines changed: 19 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,37 @@
11
# /setup-fast-tools
22

3-
Append the project’s fast-tools prompt to `AGENTS.md` without attempting to install any system packages. This avoids requiring `sudo`.
4-
5-
What this does:
6-
7-
- Detects `AGENTS.md` and `cdx/agents/fast-tools.md` (or `agents/fast-tools.md`) in the current repo.
8-
- Checks for the `FAST-TOOLS PROMPT v1` watermark to avoid duplicates.
9-
- Appends the prompt if not already present.
10-
11-
It does not install `ripgrep`, `fd`/`fdfind`, or `jq`. If you need those tools, install them separately using your OS package manager (see brief guidance inside `cdx/agents/fast-tools.md`).
12-
13-
Run this minimal, no-sudo snippet:
3+
Append the fast-tools prompt from `./cdx/agents/fast-tools.md` into `./AGENTS.md` for the current working directory whenever it is missing.
144

155
```bash
166
set -euo pipefail
177

18-
# Find repo root (or stay in CWD if not a git repo)
19-
repo_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
20-
agents="$repo_root/AGENTS.md"
21-
if [ -f "$repo_root/cdx/agents/fast-tools.md" ]; then
22-
prompt_src="$repo_root/cdx/agents/fast-tools.md"
23-
elif [ -f "$repo_root/agents/fast-tools.md" ]; then
24-
prompt_src="$repo_root/agents/fast-tools.md"
25-
else
26-
echo "Prompt file missing under cdx/agents or agents in $repo_root" >&2
27-
exit 1
28-
fi
8+
cwd=$(pwd)
9+
prompt_src="$cwd/cdx/agents/fast-tools.md"
10+
agents="$cwd/AGENTS.md"
2911

30-
if [ ! -f "$agents" ]; then
31-
echo "AGENTS.md not found under $repo_root" >&2
32-
exit 1
33-
fi
3412
if [ ! -f "$prompt_src" ]; then
35-
echo "Prompt file missing: $prompt_src" >&2
13+
echo "Missing $prompt_src" >&2
3614
exit 1
3715
fi
3816

39-
# Avoid duplicates using rg if available, otherwise grep
40-
if command -v rg >/dev/null 2>&1; then
41-
if rg -q "FAST-TOOLS PROMPT v1" "$agents"; then
42-
echo "FAST-TOOLS prompt already present — nothing to do."
17+
if [ -f "$agents" ]; then
18+
if command -v rg >/dev/null 2>&1; then
19+
if rg -q "FAST-TOOLS PROMPT v1" "$agents"; then
20+
echo "FAST-TOOLS prompt already present."
21+
exit 0
22+
fi
23+
elif grep -q "FAST-TOOLS PROMPT v1" "$agents"; then
24+
echo "FAST-TOOLS prompt already present."
4325
exit 0
4426
fi
4527
else
46-
if grep -q "FAST-TOOLS PROMPT v1" "$agents"; then
47-
echo "FAST-TOOLS prompt already present — nothing to do."
48-
exit 0
49-
fi
28+
touch "$agents"
5029
fi
5130

52-
printf "\n\n" >> "$agents"
53-
cat "$prompt_src" >> "$agents"
54-
echo "Appended fast-tools prompt to AGENTS.md"
55-
```
56-
57-
## Quick Setup Script
58-
59-
Tell the user to that they need to install dependencies / third party tools after the prompt is appended to AGENTS.md, which they can utilise the following prompts for.
60-
61-
```bash
62-
# Append prompt (idempotent)
63-
bash cdx/scripts/setup-fast-tools.sh
31+
if [ -s "$agents" ]; then
32+
printf "\n\n" >> "$agents"
33+
fi
6434

65-
# Append and install ripgrep/fd/jq (best effort)
66-
bash cdx/scripts/setup-fast-tools.sh --install-deps
35+
cat "$prompt_src" >> "$agents"
36+
echo "Appended fast-tools prompt to $agents"
6737
```
68-
69-
Notes:
70-
71-
- Non-interactive envs can add `--non-interactive` or `--dry-run` to print commands.
72-
- Debian/Ubuntu may provide `fdfind` instead of `fd` (use `alias fd=fdfind`).

cdx/scripts/setup-fast-tools.sh

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,43 +57,51 @@ while [ $# -gt 0 ]; do
5757
shift
5858
done
5959

60-
# Find repo root (or stay in CWD if not a git repo)
61-
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
62-
AGENTS="$REPO_ROOT/AGENTS.md"
63-
# Determine prompt source (prefer cdx/agents, then agents)
64-
if [ -f "$REPO_ROOT/cdx/agents/fast-tools.md" ]; then
65-
PROMPT_SRC="$REPO_ROOT/cdx/agents/fast-tools.md"
66-
elif [ -f "$REPO_ROOT/agents/fast-tools.md" ]; then
67-
PROMPT_SRC="$REPO_ROOT/agents/fast-tools.md"
60+
# Operate from the current working directory so the prompt wires into the local AGENTS.md.
61+
CWD=$(pwd)
62+
AGENTS="$CWD/AGENTS.md"
63+
if [ -f "$CWD/cdx/agents/fast-tools.md" ]; then
64+
PROMPT_SRC="$CWD/cdx/agents/fast-tools.md"
65+
elif [ -f "$CWD/agents/fast-tools.md" ]; then
66+
PROMPT_SRC="$CWD/agents/fast-tools.md"
6867
else
69-
PROMPT_SRC="$REPO_ROOT/cdx/agents/fast-tools.md" # final fallback for messaging
68+
PROMPT_SRC="$CWD/cdx/agents/fast-tools.md"
7069
fi
7170

72-
if [ ! -f "$AGENTS" ]; then
73-
err "AGENTS.md not found under $REPO_ROOT"
74-
exit 1
75-
fi
7671
if [ ! -f "$PROMPT_SRC" ]; then
7772
err "Prompt file missing: $PROMPT_SRC"
7873
exit 1
7974
fi
8075

76+
if [ ! -f "$AGENTS" ]; then
77+
log "AGENTS.md not found; creating $AGENTS"
78+
run touch "$AGENTS"
79+
fi
80+
81+
append_fast_tools_prompt() {
82+
if [ "$DRY_RUN" -eq 1 ]; then
83+
log "Dry run: would append fast-tools prompt to $AGENTS"
84+
return 0
85+
fi
86+
if [ -s "$AGENTS" ]; then
87+
printf "\n\n" >> "$AGENTS"
88+
fi
89+
cat "$PROMPT_SRC" >> "$AGENTS"
90+
log "Appended fast-tools prompt to $AGENTS"
91+
}
92+
8193
# Avoid duplicates using rg if available, otherwise grep
8294
if have rg; then
8395
if rg -q "FAST-TOOLS PROMPT v1" "$AGENTS"; then
8496
log "FAST-TOOLS prompt already present — skipping append."
8597
else
86-
run printf "\n\n" >> "$AGENTS"
87-
run cat "$PROMPT_SRC" >> "$AGENTS"
88-
log "Appended fast-tools prompt to AGENTS.md"
98+
append_fast_tools_prompt
8999
fi
90100
else
91101
if grep -q "FAST-TOOLS PROMPT v1" "$AGENTS"; then
92102
log "FAST-TOOLS prompt already present — skipping append."
93103
else
94-
run printf "\n\n" >> "$AGENTS"
95-
run cat "$PROMPT_SRC" >> "$AGENTS"
96-
log "Appended fast-tools prompt to AGENTS.md"
104+
append_fast_tools_prompt
97105
fi
98106
fi
99107

0 commit comments

Comments
 (0)