@iamdevlinph/codex-kit 1.0.9 → 1.0.11

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 CHANGED
@@ -41,6 +41,13 @@ read-only checks, documentation, bookkeeping, and clear changes spanning up to
41
41
  roughly three files. Automatic delegation is reserved for broad discovery,
42
42
  large multi-file implementation or debugging, and high-risk review.
43
43
 
44
+ For a substantial task that splits into genuinely independent slices, the root
45
+ may run multiple `implementer` instances concurrently. Each receives exclusive
46
+ file or module ownership and separate validation scope. Work that shares types,
47
+ schemas, configuration, generated artifacts, migrations, lockfiles, or dependency
48
+ ordering stays with one implementer or runs sequentially; multiple files alone
49
+ do not justify duplicate agents.
50
+
44
51
  `quick-implementer` remains installed for explicit manual delegation but is not
45
52
  selected by the default automatic route. The root reuses delegated test evidence
46
53
  and normally performs only lightweight integration checks.
@@ -133,13 +140,12 @@ pnpm dlx @iamdevlinph/codex-kit@latest project init
133
140
 
134
141
  This creates:
135
142
 
136
- - `AGENTS.md`, containing the reusable defaults and a project-specific section
143
+ - `AGENTS.md`, containing a project-specific section ready for reconciliation
137
144
  - `TEMPLATE_AGENTS.md`, a local reference copy used for future comparisons
138
145
  - `.codex-kit-state.json`, reconciliation bookkeeping
139
146
 
140
- The template reference is not an active Codex instruction file. Add repository
141
- commands, paths, architecture, integrations, and exceptions to the
142
- project-specific section of `AGENTS.md`.
147
+ Add repository commands, paths, architecture, integrations, and exceptions to
148
+ the project-specific section of `AGENTS.md`.
143
149
 
144
150
  ### Generate project-specific guidance
145
151
 
@@ -168,9 +174,13 @@ pnpm dlx @iamdevlinph/codex-kit@latest project sync
168
174
  codex-kit project status
169
175
  ```
170
176
 
171
- `project sync` never edits `AGENTS.md`. It prints a prompt asking Codex to merge
172
- only applicable reusable changes while preserving local adaptations. After
173
- reviewing the semantic merge, record the applied template hash:
177
+ `project sync` never edits `AGENTS.md` or project skills. It prints a prompt
178
+ asking Codex to merge only applicable reusable changes while preserving local
179
+ adaptations. Reconciliation keeps always-on rules in `AGENTS.md` and may create
180
+ or update task-specific workflows under `.agents/skills` when the updated
181
+ template warrants them. Critical safety and authorization rules remain in
182
+ `AGENTS.md`, and speculative skills are avoided. After reviewing the semantic
183
+ merge and any skill changes, record the applied template hash:
174
184
 
175
185
  ```sh
176
186
  codex-kit project mark-applied
@@ -26,8 +26,17 @@ Select custom agents by exact name:
26
26
  For tasks with multiple phases, sequence only the roles that add value. For
27
27
  example, use `code-explorer` before implementation only when broad discovery is
28
28
  actually needed, and use `code-reviewer` after implementation only when the
29
- change meets its risk threshold. Avoid parallel write-heavy work and never assign
30
- overlapping files to multiple agents.
29
+ change meets its risk threshold. Avoid parallel write-heavy work by default and
30
+ never assign overlapping files to multiple agents.
31
+
32
+ Multiple `implementer` instances may run concurrently only when a substantial
33
+ task divides into genuinely independent slices. Give each instance exclusive
34
+ ownership of named files or modules and a separate validation scope. Do not
35
+ parallelize slices that share schemas, types, configuration, lockfiles, generated
36
+ artifacts, migrations, or dependency ordering. If ownership overlaps or one
37
+ slice depends on another, use one implementation agent or sequence the agents.
38
+ The parent performs final integration validation after all slices return. Do not
39
+ spawn duplicate agents merely because multiple files are involved.
31
40
 
32
41
  Prefer the parent fast path when delegation would cost more than the work. Do not
33
42
  spawn a subagent solely because a tool will write a file. Delegate based on task
@@ -13,15 +13,41 @@ 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
- - Projects normally use `AGENTS.md` as the active instruction file. The source
19
- template is `assets/TEMPLATE_AGENTS.md` in the private `codex-kit` repository
20
- and public package.
21
- - A project-local `TEMPLATE_AGENTS.md` is an optional temporary sync/reference
22
- copy, not an active file or automatic update path. Updating `AGENTS.md` does
23
- not update either template, and an updated `AGENTS.md` need not be copied back
24
- to its local reference.
40
+ - `TEMPLATE_AGENTS.md` is a staged reference copy of codex-kit's reusable
41
+ instructions, not active project guidance. Active repository guidance lives
42
+ in `AGENTS.md` and applicable project skills under `.agents/skills`.
43
+ - When `codex-kit project status` reports `reconciliation required`, compare the
44
+ template reference with `AGENTS.md`, apply relevant reusable changes, preserve
45
+ project-specific rules, reconcile applicable skills, then run
46
+ `codex-kit project mark-applied`.
47
+ - Keep project-specific rules out of `TEMPLATE_AGENTS.md`. Treat local template
48
+ edits as candidates that must be generalized and promoted to the canonical
49
+ `assets/TEMPLATE_AGENTS.md` in the codex-kit repository. Updating `AGENTS.md`
50
+ does not update either template automatically.
25
51
  - Keep project-specific context outside the managed `AGENTS.md` block; keep only
26
52
  reusable cross-project rules in the packaged template.
27
53
  - When a request introduces a reusable workflow preference, convention, agent
@@ -52,8 +78,13 @@ contents of TEMPLATE_AGENTS.md between
52
78
  <!-- END codex-kit:shared-template -->. Preserve every repository-specific
53
79
  instruction from the current AGENTS.md after the managed block under
54
80
  # Project-Specific Instructions, remove only duplicate shared rules, and do not
55
- change project behavior. Afterward, summarize what was preserved and whether any
56
- local rules appear template-worthy.
81
+ change project behavior. Review existing project skills under .agents/skills and
82
+ move conditionally relevant, repeatable procedures out of AGENTS.md only when a
83
+ skill is warranted. Preserve critical safety and authorization rules in
84
+ AGENTS.md, preserve existing relevant skills, avoid speculative skills, and
85
+ validate any skill you create or modify. Afterward, summarize what was
86
+ preserved, what moved into a skill, and whether any local rules appear
87
+ template-worthy.
57
88
  ```
58
89
 
59
90
  ## Core Behavior
@@ -84,6 +115,13 @@ local rules appear template-worthy.
84
115
  - Avoid broad commands. After changes, run the smallest targeted verification
85
116
  that meaningfully validates them when practical, then report the command and
86
117
  result. Use the repository's documented package manager and scripts.
118
+ - For behavior changes and bug fixes, add or update the smallest focused
119
+ automated tests that meaningfully prevent regression when the repository has
120
+ an established test setup.
121
+ - Do not introduce a test framework or create low-value tests solely to satisfy
122
+ this rule. If automated coverage is impractical, explain why and perform the
123
+ strongest targeted verification available.
124
+ - Run the relevant focused tests after changing tested behavior.
87
125
  - Do not change dependencies, global tools, or the environment by default.
88
126
  - Do not run local or remote database inspection, generation, migration, or SQL
89
127
  commands unless the task requires them.
package/bin/codex-kit.js CHANGED
@@ -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:\n\nThe project's TEMPLATE_AGENTS.md was refreshed from codex-kit. Compare it with\nAGENTS.md and merge only new or changed reusable guidelines that apply to this\nrepository. Preserve project-specific instructions and existing adaptations. Do\nnot replace AGENTS.md wholesale. If a template rule conflicts with a local rule,\nkeep the local rule and report the conflict. Summarize what was added, updated,\nskipped, or adapted, and why. When finished, run codex-kit project mark-applied.`;
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}`;
@@ -600,7 +622,10 @@ function syncProject(options) {
600
622
  };
601
623
  saveProjectState(cwd, state);
602
624
  if (!existsSync(agentsFile)) {
603
- const contents = "# Project-Specific Instructions\n\n<!-- Add repository-specific commands, architecture, and exceptions here. -->\n";
625
+ const contents = `# Project-Specific Instructions
626
+
627
+ <!-- Add repository-specific commands, architecture, and exceptions here. -->
628
+ `;
604
629
  write(agentsFile, contents);
605
630
  console.log(`created project instructions file: ${agentsFile}`);
606
631
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamdevlinph/codex-kit",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Portable Codex subagents and project AGENTS.md defaults.",
5
5
  "type": "module",
6
6
  "bin": {