@iamdevlinph/codex-kit 1.0.8 → 1.0.10
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.
- package/README.md +30 -9
- package/assets/SUBAGENT_ROUTING.md +25 -9
- package/assets/TEMPLATE_AGENTS.md +28 -2
- package/assets/agents/code-explorer.toml +3 -2
- package/assets/agents/code-reviewer.toml +1 -0
- package/assets/agents/implementer.toml +2 -0
- package/assets/agents/quick-implementer.toml +3 -1
- package/bin/codex-kit.js +26 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Portable Codex setup for new devices and multiple projects. It provides:
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- three automatically routed roles plus a manual quick implementer
|
|
6
6
|
- automatic global role routing
|
|
7
7
|
- a reusable, stack-neutral `AGENTS.md` template
|
|
8
8
|
- safe commands for global setup, project synchronization, and reconciliation
|
|
@@ -37,26 +37,43 @@ routing hook supplies the current `SUBAGENT_ROUTING.md`; the root classifies the
|
|
|
37
37
|
task and delegates substantive work to the exact matching role. The role's agent
|
|
38
38
|
TOML—not the routing policy—selects its model and reasoning effort. To avoid
|
|
39
39
|
subagent startup overhead, the root may directly handle planning, conversation,
|
|
40
|
-
read-only checks, documentation,
|
|
41
|
-
|
|
40
|
+
read-only checks, documentation, bookkeeping, and clear changes spanning up to
|
|
41
|
+
roughly three files. Automatic delegation is reserved for broad discovery,
|
|
42
|
+
large multi-file implementation or debugging, and high-risk review.
|
|
43
|
+
|
|
44
|
+
`quick-implementer` remains installed for explicit manual delegation but is not
|
|
45
|
+
selected by the default automatic route. The root reuses delegated test evidence
|
|
46
|
+
and normally performs only lightweight integration checks.
|
|
42
47
|
|
|
43
48
|
`global configure` sets these defaults while preserving unrelated settings:
|
|
44
49
|
|
|
45
50
|
```toml
|
|
46
51
|
model = "gpt-5.6-sol"
|
|
47
|
-
model_reasoning_effort = "
|
|
52
|
+
model_reasoning_effort = "low"
|
|
48
53
|
plan_mode_reasoning_effort = "high"
|
|
49
54
|
```
|
|
50
55
|
|
|
51
|
-
This keeps ordinary root work
|
|
56
|
+
This keeps ordinary root work light while retaining high reasoning in Plan
|
|
52
57
|
Mode. Override either effort independently when needed:
|
|
53
58
|
|
|
54
59
|
```sh
|
|
55
60
|
codex-kit global configure \
|
|
56
|
-
--reasoning-effort
|
|
61
|
+
--reasoning-effort low \
|
|
57
62
|
--plan-reasoning-effort high
|
|
58
63
|
```
|
|
59
64
|
|
|
65
|
+
Automatic role models are tuned by task shape: Terra-medium performs broad
|
|
66
|
+
repository exploration, Luna-high performs large implementation slices, and
|
|
67
|
+
Sol-high reviews consequential changes. Luna-medium `quick-implementer` remains
|
|
68
|
+
manual-only.
|
|
69
|
+
|
|
70
|
+
Delegation is time-bounded. The root waits once for up to 60 seconds, requests
|
|
71
|
+
one progress update, and then enforces a three-minute read/review/manual-quick
|
|
72
|
+
deadline or five-minute implementation deadline. Validation commands that make
|
|
73
|
+
no progress for two minutes are stopped unless the repository documents a
|
|
74
|
+
longer normal runtime. Root and worker never run the same validation
|
|
75
|
+
concurrently.
|
|
76
|
+
|
|
60
77
|
Before changing these keys, codex-kit creates a timestamped `config.toml`
|
|
61
78
|
backup and records their previous values. `global uninstall` restores those
|
|
62
79
|
values without replacing unrelated configuration changed afterward.
|
|
@@ -151,9 +168,13 @@ pnpm dlx @iamdevlinph/codex-kit@latest project sync
|
|
|
151
168
|
codex-kit project status
|
|
152
169
|
```
|
|
153
170
|
|
|
154
|
-
`project sync` never edits `AGENTS.md
|
|
155
|
-
only applicable reusable changes while preserving local
|
|
156
|
-
|
|
171
|
+
`project sync` never edits `AGENTS.md` or project skills. It prints a prompt
|
|
172
|
+
asking Codex to merge only applicable reusable changes while preserving local
|
|
173
|
+
adaptations. Reconciliation keeps always-on rules in `AGENTS.md` and may create
|
|
174
|
+
or update task-specific workflows under `.agents/skills` when the updated
|
|
175
|
+
template warrants them. Critical safety and authorization rules remain in
|
|
176
|
+
`AGENTS.md`, and speculative skills are avoided. After reviewing the semantic
|
|
177
|
+
merge and any skill changes, record the applied template hash:
|
|
157
178
|
|
|
158
179
|
```sh
|
|
159
180
|
codex-kit project mark-applied
|
|
@@ -7,7 +7,8 @@ model name; each agent definition owns its model and reasoning effort.
|
|
|
7
7
|
The parent owns requirements, architecture, sequencing, integration, and final
|
|
8
8
|
validation. It may directly handle planning, conversation, status, read-only
|
|
9
9
|
checks, documentation and instruction updates, configuration bookkeeping,
|
|
10
|
-
template reconciliation, and
|
|
10
|
+
template reconciliation, and clear low-to-medium-risk changes spanning up to
|
|
11
|
+
roughly three files when no broad discovery or architectural decision is needed.
|
|
11
12
|
When a substantive route below matches, spawn that exact role before performing
|
|
12
13
|
the role's work. The user does not need to request delegation.
|
|
13
14
|
|
|
@@ -15,10 +16,8 @@ Select custom agents by exact name:
|
|
|
15
16
|
|
|
16
17
|
- Broad repository discovery, contract tracing, or search across many files:
|
|
17
18
|
`code-explorer`
|
|
18
|
-
-
|
|
19
|
-
tests
|
|
20
|
-
`quick-implementer`
|
|
21
|
-
- Multi-file behavior changes, debugging, migrations, or substantial tests:
|
|
19
|
+
- Large multi-file behavior changes, non-obvious debugging, migrations, or
|
|
20
|
+
substantial tests:
|
|
22
21
|
`implementer`
|
|
23
22
|
- Independent review of security-sensitive, architectural, public-API,
|
|
24
23
|
concurrency, migration, or otherwise difficult-to-validate changes:
|
|
@@ -34,16 +33,33 @@ Prefer the parent fast path when delegation would cost more than the work. Do no
|
|
|
34
33
|
spawn a subagent solely because a tool will write a file. Delegate based on task
|
|
35
34
|
complexity, context isolation, testing needs, and review risk.
|
|
36
35
|
|
|
36
|
+
`quick-implementer` remains installed for explicit manual delegation, but the
|
|
37
|
+
default automatic routing policy does not select it.
|
|
38
|
+
|
|
37
39
|
An assigned implementation agent performs its edits directly and must not
|
|
38
|
-
delegate them again. Use
|
|
39
|
-
|
|
40
|
+
delegate them again. Use one implementation agent per slice. Read-only agents
|
|
41
|
+
never modify files.
|
|
40
42
|
|
|
41
43
|
For every delegation:
|
|
42
44
|
|
|
43
45
|
- Give the agent a bounded task and the relevant requirements.
|
|
46
|
+
- Include the role deadline: three minutes for `code-explorer`,
|
|
47
|
+
`code-reviewer`, or a manually requested `quick-implementer`; five minutes
|
|
48
|
+
for `implementer`.
|
|
44
49
|
- Request a concise, decision-ready result.
|
|
45
|
-
- Wait for the
|
|
46
|
-
|
|
50
|
+
- Wait once for at most 60 seconds. If the agent is still running, request one
|
|
51
|
+
concise progress update. Never issue consecutive wait cycles without new
|
|
52
|
+
progress, steering, or independent useful work.
|
|
53
|
+
- If the role deadline expires, tell the agent to stop commands and return its
|
|
54
|
+
stable partial result. Interrupt it if it does not respond, preserve its
|
|
55
|
+
edits, and finish locally.
|
|
56
|
+
- Do not run the same validation concurrently in the parent and worker. A
|
|
57
|
+
validation command that produces no result within two minutes is hung unless
|
|
58
|
+
repository guidance documents a longer normal runtime; stop it and report the
|
|
59
|
+
evidence instead of retrying it repeatedly.
|
|
60
|
+
- Reuse returned exploration and test evidence. The parent should run only
|
|
61
|
+
lightweight integration checks unless the work is high-risk or the evidence
|
|
62
|
+
is incomplete.
|
|
47
63
|
|
|
48
64
|
There is no commit-pusher role. Never delegate Git publishing. Do not stage,
|
|
49
65
|
commit, tag, or push unless the user explicitly requests that operation in the
|
|
@@ -13,6 +13,28 @@ the managed markers.
|
|
|
13
13
|
priorities, deferred requirements, product or implementation decisions, and
|
|
14
14
|
major completed milestones.
|
|
15
15
|
|
|
16
|
+
## Instructions And Skills
|
|
17
|
+
|
|
18
|
+
- Keep `AGENTS.md` focused on durable, always-applicable repository context:
|
|
19
|
+
architecture, conventions, commands, safety and authorization boundaries,
|
|
20
|
+
verification expectations, and concise pointers to specialized workflows.
|
|
21
|
+
- Use project skills under `.agents/skills/<skill-name>/SKILL.md` for repeatable,
|
|
22
|
+
task-specific workflows or detailed guidance needed only for matching tasks.
|
|
23
|
+
- In existing projects, review large task-specific procedures in `AGENTS.md`.
|
|
24
|
+
When a procedure is reusable and conditionally relevant, extract it into a
|
|
25
|
+
project skill and leave a concise routing rule in `AGENTS.md`.
|
|
26
|
+
- Preserve critical safety, authorization, destructive-operation, database, and
|
|
27
|
+
deployment restrictions in `AGENTS.md`, even when a skill contains the
|
|
28
|
+
detailed workflow.
|
|
29
|
+
- In new projects, begin with a concise `AGENTS.md`. Add a skill only after a
|
|
30
|
+
concrete repeatable workflow or specialized procedure is identified; do not
|
|
31
|
+
create speculative skills.
|
|
32
|
+
- Avoid duplicating detailed instructions between `AGENTS.md` and `SKILL.md`.
|
|
33
|
+
Keep the always-on rule in `AGENTS.md` and the conditional procedure in the
|
|
34
|
+
skill.
|
|
35
|
+
- Each project skill must use valid YAML frontmatter with a clear `name` and a
|
|
36
|
+
`description` that states when the skill should trigger.
|
|
37
|
+
|
|
16
38
|
## Template Maintenance
|
|
17
39
|
|
|
18
40
|
- Projects normally use `AGENTS.md` as the active instruction file. The source
|
|
@@ -52,8 +74,12 @@ contents of TEMPLATE_AGENTS.md between
|
|
|
52
74
|
<!-- END codex-kit:shared-template -->. Preserve every repository-specific
|
|
53
75
|
instruction from the current AGENTS.md after the managed block under
|
|
54
76
|
# Project-Specific Instructions, remove only duplicate shared rules, and do not
|
|
55
|
-
change project behavior.
|
|
56
|
-
|
|
77
|
+
change project behavior. Review existing project skills under .agents/skills and
|
|
78
|
+
move conditionally relevant, repeatable procedures out of AGENTS.md only when a
|
|
79
|
+
skill is warranted. Preserve critical safety and authorization rules in
|
|
80
|
+
AGENTS.md, preserve existing relevant skills, avoid speculative skills, and
|
|
81
|
+
validate any skill you create or modify. Afterward, summarize what was preserved,
|
|
82
|
+
what moved into a skill, and whether any local rules appear template-worthy.
|
|
57
83
|
```
|
|
58
84
|
|
|
59
85
|
## Core Behavior
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
name = "code-explorer"
|
|
2
2
|
description = "Read-only codebase scout. Use BEFORE planning or implementing when the task requires sweeping many files, directories, or naming conventions to locate relevant code, contracts, and gotchas. Returns a condensed structured report — never raw file dumps. Does not modify code."
|
|
3
|
-
model = "gpt-5.6-
|
|
3
|
+
model = "gpt-5.6-terra"
|
|
4
4
|
model_reasoning_effort = "medium"
|
|
5
5
|
sandbox_mode = "read-only"
|
|
6
6
|
developer_instructions = """
|
|
7
7
|
# Code Explorer (Read-Only Scout)
|
|
8
8
|
|
|
9
|
-
Begin your first user-visible response with this progress message exactly once: `Delegating to custom code-explorer — gpt-5.6-
|
|
9
|
+
Begin your first user-visible response with this progress message exactly once: `Delegating to custom code-explorer — gpt-5.6-terra, medium reasoning.`
|
|
10
10
|
|
|
11
11
|
You locate and distill the code relevant to a task so the orchestrator never has to hold raw search output in its own context.
|
|
12
12
|
|
|
@@ -24,6 +24,7 @@ You locate and distill the code relevant to a task so the orchestrator never has
|
|
|
24
24
|
|
|
25
25
|
## Rules
|
|
26
26
|
- Keep it lean: exploration is retrieval, not reasoning. Stop searching once you can answer the question — don't exhaustively map the repo.
|
|
27
|
+
- Finish within three minutes. At the deadline, stop searching and return the best supported partial report immediately.
|
|
27
28
|
- Read-only: never edit, write, or run state-changing commands. Tests/builds are the implementer's job.
|
|
28
29
|
- No raw dumps: never paste whole files or long grep output into your report — that defeats the purpose of delegating exploration.
|
|
29
30
|
- If you find nothing, say so plainly and list where you looked.
|
|
@@ -18,6 +18,7 @@ P3 Low, with precise file and line references.
|
|
|
18
18
|
|
|
19
19
|
## Rules
|
|
20
20
|
- Keep it lean: surface the few high-confidence, high-impact findings rather than an exhaustive nitpick list. Rank by severity.
|
|
21
|
+
- Finish within three minutes. At the deadline, stop and return the findings already supported by the diff.
|
|
21
22
|
- Review only — do not modify code unless the caller explicitly asks you to fix findings.
|
|
22
23
|
- Block merge on P0/P1; call out exploitability and impact for security findings.
|
|
23
24
|
- If the diff is empty, say so and ask what to review.
|
|
@@ -18,6 +18,8 @@ You write the actual code, its unit tests, and you run those tests to prove the
|
|
|
18
18
|
|
|
19
19
|
## Rules
|
|
20
20
|
- No change is done until its tests are green and you've shown the output.
|
|
21
|
+
- Finish within five minutes. At the deadline, stop running commands and return the stable edits with exact incomplete or failing validation evidence.
|
|
22
|
+
- Run one validation process at a time. Stop a command that produces no result within two minutes unless repository guidance documents a longer normal runtime; report it as hung instead of repeatedly retrying it.
|
|
21
23
|
- Don't expand scope beyond the assigned slice; flag anything else you notice.
|
|
22
24
|
- Never mark your own work as reviewed — that's the code-reviewer's job.
|
|
23
25
|
- Never stage, commit, or push.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "quick-implementer"
|
|
2
|
-
description = "
|
|
2
|
+
description = "Manual-only focused agent for small, mechanical, well-specified changes in one or two files. Not selected by codex-kit's default automatic routing. Implements the change, adds or updates focused tests when applicable, and runs narrow validation."
|
|
3
3
|
model = "gpt-5.6-luna"
|
|
4
4
|
model_reasoning_effort = "medium"
|
|
5
5
|
developer_instructions = """
|
|
@@ -8,6 +8,7 @@ developer_instructions = """
|
|
|
8
8
|
Begin your first user-visible response with this progress message exactly once: `Delegating to custom quick-implementer — gpt-5.6-luna, medium reasoning.`
|
|
9
9
|
|
|
10
10
|
Handle small, explicit, low-risk code or configuration changes with minimal context and output.
|
|
11
|
+
This role is available for explicit manual delegation and is not part of codex-kit's default automatic route.
|
|
11
12
|
|
|
12
13
|
## Fit check
|
|
13
14
|
Proceed only when the requested change is well specified, localized to one or two files, and does not require architecture decisions. If the contract is unclear, the affected surface is broader, or failures require deep diagnosis, stop and recommend `implementer`.
|
|
@@ -21,6 +22,7 @@ Proceed only when the requested change is well specified, localized to one or tw
|
|
|
21
22
|
|
|
22
23
|
## Rules
|
|
23
24
|
- Never broaden scope or refactor adjacent code.
|
|
25
|
+
- Finish within three minutes. Stop a validation command that produces no result within two minutes and return the stable edits with the hang reported.
|
|
24
26
|
- Never claim success without showing the validation result.
|
|
25
27
|
- Never commit or push.
|
|
26
28
|
- Keep command output summarized; do not return raw file dumps.
|
package/bin/codex-kit.js
CHANGED
|
@@ -21,7 +21,7 @@ const STATE_FILE = ".codex-kit-state.json";
|
|
|
21
21
|
const PROJECT_STATE_FILE = ".codex-kit-state.json";
|
|
22
22
|
const REGISTRY = PACKAGE.publishConfig?.registry ?? "https://registry.npmjs.org";
|
|
23
23
|
const DEFAULT_ORCHESTRATOR = "gpt-5.6-sol";
|
|
24
|
-
const DEFAULT_REASONING_EFFORT = "
|
|
24
|
+
const DEFAULT_REASONING_EFFORT = "low";
|
|
25
25
|
const DEFAULT_PLAN_REASONING_EFFORT = "high";
|
|
26
26
|
const sha256 = (data) => createHash("sha256").update(data).digest("hex");
|
|
27
27
|
const read = (file) => readFileSync(file);
|
|
@@ -266,7 +266,29 @@ function saveProjectState(cwd, state) {
|
|
|
266
266
|
write(join(cwd, PROJECT_STATE_FILE), `${JSON.stringify(state, null, 2)}\n`);
|
|
267
267
|
}
|
|
268
268
|
function templatePrompt() {
|
|
269
|
-
return `Template reference updated. Ask Codex
|
|
269
|
+
return `Template reference updated. Ask Codex:
|
|
270
|
+
|
|
271
|
+
The project's TEMPLATE_AGENTS.md was refreshed from codex-kit. Compare it with
|
|
272
|
+
AGENTS.md and merge only new or changed reusable guidelines that apply to this
|
|
273
|
+
repository.
|
|
274
|
+
|
|
275
|
+
Keep durable, always-applicable repository rules in AGENTS.md. When the updated
|
|
276
|
+
template identifies a repeatable, task-specific procedure, inspect existing
|
|
277
|
+
project skills under .agents/skills and create or update a skill only when it
|
|
278
|
+
would reduce conditional detail in AGENTS.md. Preserve existing relevant skills
|
|
279
|
+
and avoid duplicating detailed instructions between AGENTS.md and SKILL.md.
|
|
280
|
+
|
|
281
|
+
Keep critical safety, authorization, database, deployment, and destructive-
|
|
282
|
+
operation restrictions in AGENTS.md even when a skill contains the detailed
|
|
283
|
+
workflow. Do not create speculative skills.
|
|
284
|
+
|
|
285
|
+
Preserve project-specific instructions and existing adaptations. Do not replace
|
|
286
|
+
AGENTS.md wholesale. If a template rule conflicts with a local rule, keep the
|
|
287
|
+
local rule and report the conflict.
|
|
288
|
+
|
|
289
|
+
Summarize what was added, updated, skipped, adapted, or moved into a skill, and
|
|
290
|
+
why. Validate any created or modified skills. When finished, run codex-kit
|
|
291
|
+
project mark-applied.`;
|
|
270
292
|
}
|
|
271
293
|
function managedBlock(content, begin, end) {
|
|
272
294
|
return `${begin}\n${content.trimEnd()}\n${end}`;
|
|
@@ -796,7 +818,7 @@ Options by command:
|
|
|
796
818
|
--force Replace modified config managed by codex-kit.
|
|
797
819
|
--orchestrator MODEL Set the root/orchestrator model (default: gpt-5.6-sol).
|
|
798
820
|
--model MODEL Alias for --orchestrator.
|
|
799
|
-
--reasoning-effort LEVEL Set normal reasoning effort (default:
|
|
821
|
+
--reasoning-effort LEVEL Set normal reasoning effort (default: low).
|
|
800
822
|
--plan-reasoning-effort LEVEL Set Plan-mode reasoning effort (default: high).
|
|
801
823
|
|
|
802
824
|
global list, global uninstall
|
|
@@ -811,7 +833,7 @@ Options by command:
|
|
|
811
833
|
|
|
812
834
|
Examples:
|
|
813
835
|
codex-kit global install --force
|
|
814
|
-
codex-kit global configure --reasoning-effort
|
|
836
|
+
codex-kit global configure --reasoning-effort low --plan-reasoning-effort high
|
|
815
837
|
codex-kit project sync --cwd /path/to/project --force
|
|
816
838
|
codex-kit project status --cwd /path/to/project`);
|
|
817
839
|
}
|