Skip to content

Commit a655cea

Browse files
committed
Enable arrow preset selection
1 parent 6f686c9 commit a655cea

54 files changed

Lines changed: 1132 additions & 599 deletions

Some content is hidden

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

QUICKSTART.ko.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ uv run repoagents ops status
3838
cat .ai-repoagents/reports/ops/latest.json
3939
```
4040

41-
`uv run repoagents init`을 플래그 없이 실행하면 대화형 초기화가 시작됩니다. 초기 설정을 deterministic mock backend로 두고 싶다면 `--backend mock` 사용하면 됩니다. GitHub 없이 로컬 JSON inbox로만 돌리려면 `--tracker-kind local_file`를 사용하면 됩니다.
41+
`uv run repoagents init`을 플래그 없이 실행하면 대화형 초기화가 시작됩니다. GitHub 없이 로컬 JSON inbox로만 돌리려면 `--tracker-kind local_file` 사용하면 됩니다. 라이브 Codex 세션 없이 오프라인 walkthrough를 하고 싶다면 저장소에 포함된 demo script가 결정적인 fake `codex` shim을 자동으로 설치합니다.
4242

4343
생성되는 제어 파일:
4444

@@ -108,11 +108,16 @@ bash scripts/release_preflight.sh
108108
```bash
109109
cd examples/python-lib
110110
uv run repoagents init --preset python-library --fixture-issues issues.json --tracker-repo demo/python-lib
111+
uv run --project /path/to/RepoAgents python -m repoagents.testing.fake_codex \
112+
--install-shim .ai-repoagents/demo-bin/codex \
113+
--project-root /path/to/RepoAgents
111114
python3 - <<'PY'
112115
from pathlib import Path
116+
import yaml
113117
path = Path(".ai-repoagents/repoagents.yaml")
114-
body = path.read_text()
115-
path.write_text(body.replace("mode: codex", "mode: mock"))
118+
payload = yaml.safe_load(path.read_text())
119+
payload["codex"]["command"] = str((Path(".ai-repoagents/demo-bin/codex")).resolve())
120+
path.write_text(yaml.safe_dump(payload, sort_keys=False))
116121
PY
117122
uv run repoagents run --dry-run
118123
uv run repoagents run --once
@@ -172,7 +177,7 @@ tracker:
172177
173178
```bash
174179
cd examples/local-file-inbox
175-
uv run repoagents init --preset python-library --tracker-kind local_file --tracker-path issues.json --backend mock
180+
uv run repoagents init --preset python-library --tracker-kind local_file --tracker-path issues.json
176181
uv run repoagents trigger 1
177182
uv run repoagents dashboard
178183
```
@@ -184,7 +189,7 @@ bash ../../scripts/demo_local_file_sync.sh
184189

185190
```bash
186191
cd examples/local-markdown-inbox
187-
uv run repoagents init --preset python-library --tracker-kind local_markdown --tracker-path issues --backend mock
192+
uv run repoagents init --preset python-library --tracker-kind local_markdown --tracker-path issues
188193
uv run repoagents trigger 1
189194
uv run repoagents dashboard
190195
```

QUICKSTART.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ uv run repoagents ops status
3636
cat .ai-repoagents/reports/ops/latest.json
3737
```
3838

39-
Running `uv run repoagents init` without flags starts an interactive setup flow. Use `--backend mock` if you want the initialized config to default to the deterministic mock backend. Use `--tracker-kind local_file` when you want a local JSON inbox instead of GitHub.
39+
Running `uv run repoagents init` without flags starts an interactive setup flow. Use `--tracker-kind local_file` when you want a local JSON inbox instead of GitHub. The repo-level demo scripts install a deterministic fake `codex` shim when you want offline walkthroughs without a live Codex session.
4040

4141
Generated control files:
4242

@@ -106,11 +106,16 @@ That wrapper runs `repoagents release check --format all`, which executes releas
106106
```bash
107107
cd examples/python-lib
108108
uv run repoagents init --preset python-library --fixture-issues issues.json --tracker-repo demo/python-lib
109+
uv run --project /path/to/RepoAgents python -m repoagents.testing.fake_codex \
110+
--install-shim .ai-repoagents/demo-bin/codex \
111+
--project-root /path/to/RepoAgents
109112
python3 - <<'PY'
110113
from pathlib import Path
114+
import yaml
111115
path = Path(".ai-repoagents/repoagents.yaml")
112-
body = path.read_text()
113-
path.write_text(body.replace("mode: codex", "mode: mock"))
116+
payload = yaml.safe_load(path.read_text())
117+
payload["codex"]["command"] = str((Path(".ai-repoagents/demo-bin/codex")).resolve())
118+
path.write_text(yaml.safe_dump(payload, sort_keys=False))
114119
PY
115120
uv run repoagents run --dry-run
116121
uv run repoagents run --once
@@ -142,7 +147,7 @@ The bundled offline examples for that path are:
142147
143148
```bash
144149
cd examples/local-file-inbox
145-
uv run repoagents init --preset python-library --tracker-kind local_file --tracker-path issues.json --backend mock
150+
uv run repoagents init --preset python-library --tracker-kind local_file --tracker-path issues.json
146151
uv run repoagents trigger 1
147152
uv run repoagents dashboard
148153
```
@@ -154,7 +159,7 @@ bash ../../scripts/demo_local_file_sync.sh
154159

155160
```bash
156161
cd examples/local-markdown-inbox
157-
uv run repoagents init --preset python-library --tracker-kind local_markdown --tracker-path issues --backend mock
162+
uv run repoagents init --preset python-library --tracker-kind local_markdown --tracker-path issues
158163
uv run repoagents trigger 1
159164
uv run repoagents dashboard
160165
```

README.ko.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ uv run repoagents doctor
8989
유용한 초기화 변형:
9090

9191
- `uv run repoagents init`은 대화형 설정 흐름을 시작합니다.
92-
- `uv run repoagents init --backend mock`은 deterministic mock backend를 기본값으로 심습니다.
92+
- 대화형 preset 선택기는 방향키로 이동할 수 있고, 공통 기본 스캐폴드를 위한 `none` 옵션도 제공합니다.
93+
- `tracker.kind=github`일 때는 interactive init이 `gh`로 tracker repo 존재 여부를 확인하고, 아직 없으면 `public` 또는 `private`를 골라 바로 생성할 수 있습니다.
9394
- `uv run repoagents init --tracker-kind local_file --tracker-path issues.json`은 GitHub 대신 로컬 JSON inbox를 사용합니다.
9495
- `uv run repoagents init --tracker-kind local_markdown --tracker-path issues`는 로컬 Markdown issue 디렉터리를 사용합니다.
9596
- 로컬 오프라인 tracker는 `.ai-repoagents/sync/<tracker>/issue-<id>/` 아래에 publish proposal을 stage할 수 있습니다.
9697
- 로컬 Markdown tracker는 쓰기가 켜져 있으면 publish 제안을 `.ai-repoagents/sync/local-markdown/issue-<id>/` 아래에 stage합니다.
98+
- 저장소에 포함된 demo script는 오프라인 walkthrough를 위해 결정적인 fake `codex` shim을 자동으로 설치합니다.
9799
- `uv run repoagents init --upgrade`는 로컬 managed 파일을 덮어쓰지 않고 scaffold drift를 점검합니다.
98100

99101
### preset 고르기
@@ -102,6 +104,7 @@ preset은 핵심 `triage -> planner -> engineer -> reviewer` 파이프라인 자
102104

103105
| preset | 잘 맞는 저장소 | 기본적으로 더 강조하는 것 | 이런 경우 고르기 좋음 |
104106
| --- | --- | --- | --- |
107+
| `none` | 저장소 유형별 튜닝 없이 공통 RepoAgents 기본값만 쓰고 싶은 저장소 | 중립적인 워크플로 가이드, 명시적인 리스크 표면화, 최소한의 도메인 가정 | preset별 정책 편향 없이 시작하고 나중에 스캐폴드를 다듬고 싶을 때 |
105108
| `python-library` | Python 패키지, CLI, API, 백엔드 서비스 | 작은 Python 코드 변경, 집중된 테스트, 패키징 위생, API surface 변경 요약 | 저장소의 중심이 `src/`, `tests/`, `pyproject.toml`에 있거나, 가장 무난한 기본값으로 시작하고 싶을 때 |
106109
| `web-app` | 프론트엔드 앱, UI가 있는 풀스택 저장소 | 컴포넌트/라우트 단위 변경, 시각적 회귀 경계, env/deploy 설정 주의 | 페이지, 정적 자산, 라우트, 서버/클라이언트 코드가 함께 있고 UI 깨짐과 설정 drift가 중요할 때 |
107110
| `docs-only` | 문서 사이트, 핸드북 저장소, 스펙 저장소, 예제 중심 문서 프로젝트 | Markdown과 문서 도구, 예제, 복붙 정확성 유지, 명시적 요청 없는 코드 변경 억제 | 저장소의 주된 산출물이 문서이고, 제품 코드 변경은 예외적으로만 허용하고 싶을 때 |
@@ -110,6 +113,7 @@ preset은 핵심 `triage -> planner -> engineer -> reviewer` 파이프라인 자
110113
실전 기준으로 고르면:
111114

112115
- 애매하면 `python-library`부터 시작하는 편이 가장 안전합니다.
116+
- 저장소 성격을 아직 정하지 않았거나 공통 기본값만 원하면 `none`을 고르면 됩니다.
113117
- 브라우저/UI 동작이 리뷰 범위에 직접 들어오면 `web-app`이 더 잘 맞습니다.
114118
- “요청 없이는 제품 코드를 건드리지 않는 것”이 핵심이면 `docs-only`가 좋습니다.
115119
- 실험 맥락과 산출물 보존이 정리 편의보다 중요하면 `research-project`를 고르면 됩니다.
@@ -161,7 +165,7 @@ WORKFLOW.md
161165

162166
## 데모 경로
163167

164-
예제들은 로컬 fixture issue와 mock backend를 기준으로 설계되어 있어서, 동작은 결정적이면서도 실운영 구조는 그대로 유지됩니다.
168+
예제들은 로컬 fixture issue와 오프라인 fake `codex` shim을 기준으로 설계되어 있어서, 동작은 결정적이면서도 실운영 구조는 그대로 유지됩니다.
165169

166170
추천 시작 경로:
167171

@@ -198,11 +202,16 @@ WORKFLOW.md
198202
```bash
199203
cd examples/python-lib
200204
uv run repoagents init --preset python-library --fixture-issues issues.json --tracker-repo demo/python-lib
205+
uv run --project /path/to/RepoAgents python -m repoagents.testing.fake_codex \
206+
--install-shim .ai-repoagents/demo-bin/codex \
207+
--project-root /path/to/RepoAgents
201208
python3 - <<'PY'
202209
from pathlib import Path
210+
import yaml
203211
path = Path(".ai-repoagents/repoagents.yaml")
204-
body = path.read_text()
205-
path.write_text(body.replace("mode: codex", "mode: mock"))
212+
payload = yaml.safe_load(path.read_text())
213+
payload["codex"]["command"] = str((Path(".ai-repoagents/demo-bin/codex")).resolve())
214+
path.write_text(yaml.safe_dump(payload, sort_keys=False))
206215
PY
207216
uv run repoagents doctor
208217
uv run repoagents run --dry-run
@@ -301,8 +310,8 @@ Codex smoke test는 read-only opt-in 경로이며, Codex CLI가 설치되고 로
301310

302311
```bash
303312
repoagents init
313+
repoagents init --preset none
304314
repoagents init --preset python-library
305-
repoagents init --backend mock
306315
repoagents init --preset web-app
307316
repoagents init --preset docs-only
308317
repoagents init --preset research-project
@@ -472,7 +481,7 @@ RepoAgents는 숨겨진 시스템 프롬프트 대신 저장소 파일로 Codex
472481
- GitHub 연동은 issue 중심이며 branch와 PR 생성은 의도적으로 보수적으로 제한되어 있습니다.
473482
- 로컬 오프라인 tracker는 hosted 시스템에 직접 쓰지 않고 `.ai-repoagents/sync/` 아래에 proposal을 stage합니다.
474483
- Codex backend는 동작하는 `codex exec` 설치와 로그인 상태를 전제로 합니다.
475-
- mock backend는 결정적이지만 작은 휴리스틱 수정만 수행합니다.
484+
- 오프라인 fake `codex` demo shim은 결정적이지만 작은 휴리스틱 수정만 수행합니다.
476485
- 기본 workspace 전략은 `copy`이며, `worktree`를 쓰려면 대상 저장소가 유효한 Git work tree여야 합니다.
477486
- 대시보드는 정적 HTML이며 client-side 필터링과 timed reload는 지원하지만 server-push sync나 multi-user hosting은 지원하지 않습니다.
478487

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ uv run repoagents doctor
8989
Useful setup variations:
9090

9191
- `uv run repoagents init` starts the interactive setup flow.
92-
- `uv run repoagents init --backend mock` seeds the repo with the deterministic mock backend.
92+
- the interactive preset picker supports arrow-key selection and includes a `none` option for the shared baseline scaffold.
93+
- when `tracker.kind=github`, interactive init can verify the tracker repo with `gh` and offer to create it with a `public` or `private` visibility choice if it does not exist yet.
9394
- `uv run repoagents init --tracker-kind local_file --tracker-path issues.json` uses a local JSON inbox instead of GitHub.
9495
- `uv run repoagents init --tracker-kind local_markdown --tracker-path issues` uses a local Markdown issue directory.
9596
- local offline trackers can stage publication proposals under `.ai-repoagents/sync/<tracker>/issue-<id>/`.
9697
- local Markdown trackers with writes enabled stage publication proposals under `.ai-repoagents/sync/local-markdown/issue-<id>/`.
98+
- repo-level demo scripts install a deterministic fake `codex` shim for offline walkthroughs.
9799
- `uv run repoagents init --upgrade` inspects managed scaffold drift without overwriting local managed-file edits.
98100

99101
### Choosing a preset
@@ -102,6 +104,7 @@ Presets do not change the core `triage -> planner -> engineer -> reviewer` pipel
102104

103105
| Preset | Best for | What it biases toward | Pick it when |
104106
| --- | --- | --- | --- |
107+
| `none` | Repositories that want the shared RepoAgents baseline without repo-type tuning | Neutral workflow guidance, explicit risk surfacing, and minimal domain assumptions | You want to start without preset-specific policy bias and refine the scaffold later |
105108
| `python-library` | Python packages, CLIs, APIs, and backend services | Small Python code changes, focused tests, packaging hygiene, and explicit API-surface notes | Most of the repo lives in `src/`, `tests/`, and `pyproject.toml`, or you want the safest default starting point |
106109
| `web-app` | Frontend apps or full-stack repos with UI and deployment concerns | Focused component/route changes, visual-regression awareness, and careful handling of env/deploy config | The repo ships pages, assets, routes, or server/client code where UI breakage and config drift matter |
107110
| `docs-only` | Documentation sites, handbook repos, specs, or example-heavy docs projects | Staying inside Markdown, docs tooling, examples, and copy/paste accuracy unless code edits are explicitly requested | The repository is primarily prose and reference material, and maintainers want code changes to stay exceptional |
@@ -110,6 +113,7 @@ Presets do not change the core `triage -> planner -> engineer -> reviewer` pipel
110113
Practical rule of thumb:
111114

112115
- Start with `python-library` if the repo is mostly application or library code and you are unsure.
116+
- Use `none` when you want the baseline RepoAgents scaffold without repository-type tuning.
113117
- Use `web-app` when browser/UI behavior is part of the review surface, not just implementation detail.
114118
- Use `docs-only` when “do not wander into product code unless asked” is the main requirement.
115119
- Use `research-project` when preserving experiment context matters more than keeping the tree tidy.
@@ -161,7 +165,7 @@ The operating model stays in the repo, so maintainers can inspect and evolve it
161165

162166
## Demo Paths
163167

164-
The examples are designed for local fixture issues and the mock backend. That keeps demos deterministic while preserving the production architecture.
168+
The examples are designed for local fixture issues and an offline fake `codex` shim. That keeps demos deterministic while preserving the production architecture.
165169

166170
Recommended first runs:
167171

@@ -198,11 +202,16 @@ Recommended first runs:
198202
```bash
199203
cd examples/python-lib
200204
uv run repoagents init --preset python-library --fixture-issues issues.json --tracker-repo demo/python-lib
205+
uv run --project /path/to/RepoAgents python -m repoagents.testing.fake_codex \
206+
--install-shim .ai-repoagents/demo-bin/codex \
207+
--project-root /path/to/RepoAgents
201208
python3 - <<'PY'
202209
from pathlib import Path
210+
import yaml
203211
path = Path(".ai-repoagents/repoagents.yaml")
204-
body = path.read_text()
205-
path.write_text(body.replace("mode: codex", "mode: mock"))
212+
payload = yaml.safe_load(path.read_text())
213+
payload["codex"]["command"] = str((Path(".ai-repoagents/demo-bin/codex")).resolve())
214+
path.write_text(yaml.safe_dump(payload, sort_keys=False))
206215
PY
207216
uv run repoagents doctor
208217
uv run repoagents run --dry-run
@@ -301,8 +310,8 @@ The Codex smoke test is read-only, opt-in, and only runs when Codex CLI is insta
301310

302311
```bash
303312
repoagents init
313+
repoagents init --preset none
304314
repoagents init --preset python-library
305-
repoagents init --backend mock
306315
repoagents init --preset web-app
307316
repoagents init --preset docs-only
308317
repoagents init --preset research-project
@@ -472,7 +481,7 @@ Current limitations:
472481
- GitHub integration is issue-focused; branch and PR creation remain intentionally conservative.
473482
- local offline trackers stage proposals under `.ai-repoagents/sync/` instead of writing directly to hosted systems.
474483
- The Codex backend expects a working `codex exec` installation and login state.
475-
- The mock backend is deterministic but only applies small heuristic edits.
484+
- The offline fake `codex` demo shim is deterministic but only applies small heuristic edits.
476485
- `copy` remains the default workspace strategy; `worktree` requires the target repo to be a valid Git work tree.
477486
- The dashboard is still static HTML; it supports client-side filtering and timed reload, but not server-push sync or multi-user hosting.
478487

docs/architecture.ko.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RepoAgents는 저장소 내부 제어 파일을 설치하고, 그 위에서 이
88

99
- Symphony wrapper가 아닌 독립 구현
1010
- Codex CLI를 기본 worker 엔진으로 사용
11-
- 테스트와 로컬 데모를 위한 결정적 mock backend 제공
11+
- 테스트와 로컬 데모를 위한 결정적 fake Codex helper 제공
1212
- 유지보수자가 직접 검토 가능한 저장소 로컬 프롬프트와 정책
1313
- 보수적인 human approval 기본값
1414

@@ -22,8 +22,9 @@ src/repoagents/
2222
tracker/ GitHub issue adapter 추상화
2323
orchestrator/ polling loop, retry, 상태 복구, 스케줄링
2424
roles/ triage / planner / engineer / reviewer 인터페이스
25-
backend/ Codex CLI runner와 mock backend
25+
backend/ Codex CLI runner
2626
prompts/ Jinja 기반 프롬프트 렌더링
27+
testing/ 테스트와 데모용 결정적 fake Codex helper
2728
workspace/ 이슈별 격리 작업공간 준비
2829
policies/ diff guardrail과 human-approval 규칙
2930
models/ 명시적 issue, 상태, 역할 결과 스키마
@@ -76,13 +77,11 @@ flowchart TD
7677

7778
실제 worker runtime은 RepoAgents 밖에 있습니다. RepoAgents는 오케스트레이션하고, Codex가 실행합니다.
7879

79-
### Mock backend
80+
## 테스트 helper
8081

81-
- 테스트와 로컬 데모를 위해 결정적 동작 제공
82-
- 역할 결과를 시뮬레이션함
83-
- `engineer` 단계에서 작은 휴리스틱 파일 변경을 적용함
84-
- diff 기반 review signal에서 reviewer note를 도출함
85-
- 네트워크나 Codex 없이 end-to-end 실행 가능
82+
- `repoagents.testing.fake_codex`는 테스트와 로컬 데모를 위한 결정적 fake Codex helper를 제공합니다
83+
- 역할 결과를 시뮬레이션하고, `engineer` 단계에서 작은 휴리스틱 파일 변경을 적용하고, 로컬 shim을 통해 구조화된 JSON을 돌려줄 수 있습니다
84+
- 저장소에 포함된 demo script는 `codex.command`를 이 shim으로 바꿔서 오프라인 walkthrough를 반복 가능하게 유지합니다
8685

8786
## 상태 모델
8887

@@ -106,7 +105,7 @@ flowchart TD
106105
- `--dry-run`에서는 외부 쓰기 차단
107106
- 머지 모드는 항상 `human_approval`
108107
- secret 유사 파일, CI/CD 변경, auth 민감 경로, 대규모 삭제를 guardrail이 감지
109-
- reviewer prompt와 mock backend는 모두 diff/test/scope review signal을 사용함
108+
- reviewer prompt와 fake Codex 테스트 helper는 모두 diff/test/scope review signal을 사용함
110109
- 정책 위반이 있으면 reviewer 결과를 `request_changes`로 덮어쓸 수 있음
111110

112111
## Workspace isolation

0 commit comments

Comments
 (0)