roles: cut the start-up reading of a Codex role (bootstrap lines, fix-up Read section, setup step)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, python
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Start with shared/dev-team/skills/bootstrap/references/project-setup.md, references/spec-template.md, and the implementer and reviewer role prompts; trace how those files are built and passed to each role. The issue proposes three independent changes, so choose one and check its corresponding acceptance criteria. Run python3 scripts/build.py --check and the relevant tests; for the fix-up reading change, include a small before-and-after dispatch token comparison in the PR.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Each Codex role reads a large set of start-up documents before it reads its task. Codex sends the full conversation again on each model call, so each start-up read is paid again on each later command of the run. On 2026-12-01 (plugin 0.12.2, Codex CLI 0.172.0, gpt-6.1-sol), five dispatches in one project had these totals, from the last turn.completed usage event of each events.jsonl:
| Dispatch | Input tokens | Cached | Output tokens | Commands |
|---|---|---|---|---|
| Implementer, last part of a feature | 4.0 M | 97% | 11.5 k | 57 |
| Reviewer, first round | 4.4 M | 97% | 26.9 k | 70 |
| Implementer, fix-up of 23 lines | 2.2 M | 97% | 12.7 k | 29 |
| Reviewer, re-review of that fix | 2.3 M | 95% | 15.9 k | 47 |
| Implementer, fix-up of one test | 1.8 M | 97% | 8.9 k | 24 |
Each run read 125–215 k characters of start-up documents before its task files. In the two long runs, these reads were roughly a third to a half of the input. In the two fix-ups, they were most of it. (The share is an estimate. Some commands read start-up documents and task files together.)
The 23-line fix-up began with these commands, in order:
cat AGENTS.md; cat <plugin cache>/skills/orchestrate/SKILL.md; cat <plugin cache>/skills/writing-for-agents/SKILL.md
git show origin/main:CODING_STANDARDS.md; cat <plugin cache>/skills/orchestrate/references/codex.md; cat .dev-team.toml; rg -n 'setup|hook' scripts/ .dev*
git show origin/main:docs/decisions/README.md; git show origin/main:docs/running.md; <tracker> issues list ...
git show origin/main:docs/agent-notes.md; git show origin/main:docs/writing.md; git show origin/main:docs/glossary.md; cat docs/briefs/<component>.md # 47 k characters
cat scripts/check.sh; cat .githooks/pre-push; rg --files scripts | rg 'setup|worktree'
Causes in the plugin
- The bootstrap lines apply to each agent that reads
AGENTS.md.shared/dev-team/skills/bootstrap/references/project-setup.md(grep -n 'before the first edit of each task') writes these lines into the project'sAGENTS.md: "Load/dev-team:orchestrate($orchestratein Codex) before the first edit of each task that ends in a PR" and "Load/dev-team:writing-for-agents… before you write or edit technical prose …". Each role prompt starts with "Read AGENTS.md for the project". A role does its task, which ends in a PR, and writes commit messages. Thus it obeys both lines. It loads the orchestrator's skill and references (about 20 k characters), which tell the main session how to delegate and are of no use to a role. Each role also loads writing-for-agents (12 k characters) for each commit message. - The fix-up template has no "Read" section. The full template has "Read" with "(Read nothing else …)", and the first runs of the session followed it. A fix-up spec made from "For a fix-up round" (
references/spec-template.md) has only the PR, the findings and the items not to change. With no reading limit, the role does the project's full session-start reading, and it also reads whole briefs. - The setup step makes each role search for a setup script. The implementer role says "Run the worktree setup for the project" (
roles/implementer.md, section 2, step 1). The reviewer role says "Run the private environment setup for the project". This project has no setup script. Each run searched for one again (rg 'setup|venv|private' scripts .devcontainer README.md), with 10–40 k characters of output.
Proposed changes
- Scope the bootstrap lines to the orchestrating session. For example: "In the main session, load
/dev-team:orchestrate…". A dev-team role gets its workflow from its role prompt. For writing-for-agents, choose one of two ways: give the roles the writing rules that a commit message and a PR body need in the role prompt, or keep the line and accept the load once per run. Measure the role prompt's size before and after. - Add a "Read" item to "For a fix-up round": the files and line ranges of the findings, and "Read nothing else". Say in the role prompt that a role reads the files that its spec's "Read" names, and the project documents that the spec names. A role does not do the project's session-start reading.
- Let a project state its setup once, for example
[setup] worktree = "none"or a command in.dev-team.toml. The launcher puts it in the handoff. Then the role runs it, or skips the step, and does not search.
Each change is independent. An agent can do one at a time.
Acceptance
- A Codex dispatch of a fix-up spec on a project with a long
AGENTS.mdreads only the files that the spec names, plusAGENTS.md, the project's coding standards and the role's own references. Compare the input tokens of a small fix-up dispatch before and after the change (one sample run is enough; give the numbers in the PR). - Run
python3 scripts/build.py,--checkand the tests of this repository'sAGENTS.md. Each change needs an independent review (AGENTS.md).
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 0
- Merge trung bình
- 29 phút
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của j3ko/agent-plugins
-
next
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
j3ko/agent-plugins#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
next
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
j3ko/agent-plugins#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
next
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
j3ko/agent-plugins#78 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
next
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
j3ko/agent-plugins#77 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
j3ko/agent-plugins#76 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của j3ko/agent-plugins
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jxxghp/MoviePilot#7699 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test_real_pandoc_failure_is_one_path_free_line fails on macOS CI with current Homebrew pandocĐang mởbug TAG: unit tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
learningequality/ricecooker#898 ·
-
bug:unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Heroic-Games-Launcher/HeroicGamesLauncher#6187 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
BCStudentSoftwareDevTeam/cas#491 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
freelawproject/litigant-portal#1285 ·
Maintainer thường phản hồi trong vòng 2 ngày