@iamdevlinph/codex-kit 1.0.24 → 1.1.0

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
@@ -44,7 +44,37 @@ TOML—not the routing policy—selects its model and reasoning effort. To avoid
44
44
  subagent startup overhead, the root may directly handle planning, conversation,
45
45
  read-only checks, documentation, bookkeeping, and clear changes spanning up to
46
46
  roughly three files. Automatic delegation is reserved for broad discovery,
47
- large multi-file implementation or debugging, and high-risk review.
47
+ large multi-file implementation or debugging, high-risk review, and the
48
+ structural review required for every completed feature.
49
+
50
+ Every feature follows a mandatory semantic decomposition pass: implement and
51
+ stabilize it, map each responsibility to its final file, extract independently
52
+ understandable concerns, validate the decomposed implementation, and hand it to
53
+ `code-reviewer`. Pages, routes, controllers, commands, and entrypoints contain
54
+ composition and orchestration only. Web page files may contain framework exports,
55
+ metadata, loading, guards, page-level state, minimal layout wrappers, and imported
56
+ child composition, but not child components, substantial UI sections, or domain
57
+ logic. Independently changeable UI concerns get descriptive feature-local files;
58
+ hooks, schemas, data access, transformations, and domain logic move out of
59
+ presentation when independently testable or when they obscure the primary
60
+ responsibility. Avoid generic dumping grounds, keep components feature-local by
61
+ default, and promote only proven shared/global primitives. Tiny inseparable
62
+ helpers or markup may remain inline. Unrelated small fixes need no broad
63
+ refactoring. Every completed feature receives automatic structural review; a
64
+ concrete framework or tooling constraint must be named for any exception.
65
+
66
+ User-facing work also begins with a UI/style preflight. Inspect the closest
67
+ same-purpose shipped features—especially tables, filters, search, forms, dialogs,
68
+ and page layouts—and reuse their components, tokens, layout, responsive
69
+ behavior, interactions, states, and accessibility conventions. When repeated
70
+ precedent exists without written guidance, record always-on conventions in
71
+ `AGENTS.md` and feature-specific decisions or exceptions in `PLANS.md`. Ask the
72
+ user whether to keep, update, or override before deliberate divergence,
73
+ changing an established guideline, resolving conflicting precedents, or
74
+ proceeding without a trustworthy analogue. Use browser or screenshot comparison
75
+ when available; otherwise report it unavailable. The structural reviewer blocks
76
+ unexplained divergence or needless duplication only when repository evidence
77
+ supports the finding.
48
78
 
49
79
  ## Available subagents
50
80
 
@@ -52,7 +82,7 @@ large multi-file implementation or debugging, and high-risk review.
52
82
  | --- | --- | --- | --- |
53
83
  | `code-explorer` | Automatic | `gpt-5.6-terra`, medium | Read-only broad repository discovery, contract tracing, and multi-file searches |
54
84
  | `implementer` | Automatic | `gpt-5.6-luna`, high | Large behavior changes, non-obvious debugging, migrations, and substantial tests |
55
- | `code-reviewer` | Automatic | `gpt-5.6-sol`, high | Read-only review of security-sensitive, architectural, public-API, concurrency, migration, or difficult-to-validate changes |
85
+ | `code-reviewer` | Automatic | `gpt-5.6-sol`, high | Structural review of every completed feature, plus read-only review of security-sensitive, architectural, public-API, concurrency, migration, or difficult-to-validate changes |
56
86
  | `quick-implementer` | Manual only | `gpt-5.6-luna`, medium | Small, mechanical, well-specified changes limited to one or two files |
57
87
 
58
88
  The root orchestrator is not a subagent. It owns planning, routing, integration,
@@ -12,6 +12,39 @@ roughly three files when no broad discovery or architectural decision is needed.
12
12
  When a substantive route below matches, spawn that exact role before performing
13
13
  the role's work. The user does not need to request delegation.
14
14
 
15
+ For user-facing work, the root or assigned worker performs a UI/style preflight
16
+ before editing: inspect the closest same-purpose shipped features (especially
17
+ tables, filters, search, forms, dialogs, and page layouts), identify their
18
+ design-system primitives, tokens, spacing, typography, responsive behavior,
19
+ interactions, states, and accessibility conventions, then reuse applicable
20
+ components and patterns. If no written standard exists but trustworthy repeated
21
+ precedent does, derive concise project-local guidance in `AGENTS.md` for
22
+ always-on conventions and `PLANS.md` for feature-specific decisions or approved
23
+ exceptions. Pause and ask the user whether to keep, update, or override before
24
+ deliberate divergence, changing an established guideline, resolving conflicting
25
+ precedents, or proceeding without a trustworthy analogue. If browser or
26
+ screenshot tooling exists, compare the rendered feature with its analogue;
27
+ otherwise report rendered comparison unavailable.
28
+
29
+ Every new or materially changed feature follows this mandatory workflow:
30
+ UI/style preflight; implement and stabilize; map each responsibility to its final file; extract
31
+ independently understandable concerns; validate the decomposed implementation;
32
+ then hand off to `code-reviewer`. Pages, routes, controllers, commands, and
33
+ entrypoints contain composition and orchestration only. Web page files may keep
34
+ framework exports, metadata, loading, guards, page-level state, minimal layout
35
+ wrappers, and imported child composition, but not child components, substantial
36
+ UI sections, or domain logic. Independently changeable UI concerns (tables,
37
+ filters, forms, dialogs, and sections) receive descriptive feature-local files.
38
+ Hooks, schemas, data access, transformations, and domain logic move out of
39
+ presentation files when independently testable or when they obscure the primary
40
+ responsibility. Avoid generic `utils`, `helpers`, or `components` dumping grounds;
41
+ filenames identify owned behavior. Keep components feature-local by default;
42
+ promote them only when reused across features or explicitly global primitives.
43
+ Tiny private helpers or markup may remain inline only when inseparable from the
44
+ file's single responsibility. Do not broaden unrelated small fixes. Every
45
+ completed feature receives automatic structural review; a framework or tooling
46
+ constraint is the only exception and must be named in the handoff.
47
+
15
48
  Select custom agents by exact name:
16
49
 
17
50
  - Broad repository discovery, contract tracing, or search across many files:
@@ -22,12 +55,14 @@ Select custom agents by exact name:
22
55
  - Independent review of security-sensitive, architectural, public-API,
23
56
  concurrency, migration, or otherwise difficult-to-validate changes:
24
57
  `code-reviewer`
58
+ - Every completed feature, including small features, receives structural review:
59
+ `code-reviewer`
25
60
 
26
61
  For tasks with multiple phases, sequence only the roles that add value. For
27
62
  example, use `code-explorer` before implementation only when broad discovery is
28
- actually needed, and use `code-reviewer` after implementation only when the
29
- change meets its risk threshold. Avoid parallel write-heavy work by default and
30
- never assign overlapping files to multiple agents.
63
+ actually needed. Use `code-reviewer` after every completed feature and for any
64
+ other change meeting its risk threshold. Avoid parallel write-heavy work by
65
+ default and never assign overlapping files to multiple agents.
31
66
 
32
67
  Multiple `implementer` instances may run concurrently only when a substantial
33
68
  task divides into genuinely independent slices. Give each instance exclusive
@@ -104,6 +104,22 @@ conditional procedures into validated project skills.
104
104
  Do not assume tools from other projects.
105
105
  - Keep discovered stack-specific guidance in the project's
106
106
  `# Project-Specific Instructions`, not in this shared template.
107
+ - For user-facing work, perform a UI/style preflight before editing: inspect the
108
+ closest same-purpose shipped features (especially tables, filters, search,
109
+ forms, dialogs, and page layouts) and identify their design-system primitives,
110
+ tokens, spacing, typography, responsive behavior, interactions, states, and
111
+ accessibility conventions. Reuse applicable components and patterns.
112
+ - If no written standard exists but trustworthy repeated precedent does, derive
113
+ concise durable guidance in the project: always-on conventions belong in
114
+ `AGENTS.md`; feature-specific decisions and approved exceptions belong in
115
+ `PLANS.md`. During development, keep new UI aligned with that standard.
116
+ - Pause and ask the user whether to keep, update, or override the standard
117
+ before deliberate visual divergence, changing an established guideline,
118
+ resolving conflicting precedents, or proceeding without a trustworthy
119
+ analogue. Include the evidence and affected pattern in the question.
120
+ - If browser or screenshot tooling exists, compare the rendered feature with
121
+ the analogue across relevant responsive sizes and states. Otherwise, report
122
+ that rendered comparison was unavailable.
107
123
 
108
124
  ## Commands And Verification
109
125
 
@@ -129,12 +145,26 @@ conditional procedures into validated project skills.
129
145
  code under the feature's existing directory; when a feature contains multiple
130
146
  substantial UI pieces, place them in a `<feature>/components` subdirectory.
131
147
  Keep broadly reused code in the repository's established shared locations.
132
- - Keep route and page files focused on page-level composition, data loading, and
133
- orchestration. Extract substantial self-contained UI sections and complex
134
- page-specific logic into focused files colocated with the feature. Split large
135
- or mixed-responsibility files by cohesive behavior so each file remains easy
136
- to read, navigate, test, and review. Keep small one-use markup or logic inline;
137
- do not create files or components solely to reduce line count.
148
+ - Complete every new or materially changed feature through a semantic pass:
149
+ implement and stabilize it, map each responsibility to its final file, extract
150
+ independently understandable concerns, validate the decomposed implementation,
151
+ then hand it off to `code-reviewer`. Pages, routes, controllers, commands, and
152
+ entrypoints contain composition and orchestration only. Web page files may keep
153
+ framework exports, metadata, loading, guards, page-level state, minimal layout
154
+ wrappers, and imported child composition, but not child components, substantial
155
+ UI sections, or domain logic. Independently changeable UI concerns (tables,
156
+ filters, forms, dialogs, and sections) belong in descriptive feature-local
157
+ component files. Hooks, schemas, data access, transformations, and domain logic
158
+ move out of presentation files when independently testable or when they obscure
159
+ the component's primary responsibility. Avoid generic `utils`, `helpers`, or
160
+ `components` dumping grounds; filenames must identify owned behavior. Keep
161
+ components feature-local by default; promote them to shared/design-system
162
+ locations only when reused across features or explicitly global primitives.
163
+ Tiny private helpers or markup may remain inline only when inseparable from the
164
+ file's single responsibility. Do not broaden an unrelated small fix, but leave
165
+ any new or materially changed feature decomposed. Every completed feature gets
166
+ an automatic `code-reviewer` structure review; exceptions require a concrete
167
+ framework or tooling constraint identified in the handoff.
138
168
  - Use intent-revealing domain names. A reader should understand what a variable
139
169
  contains or what a helper guarantees at the call site without opening its
140
170
  implementation. Avoid vague transformation names such as `normalized`,
@@ -156,15 +186,15 @@ conditional procedures into validated project skills.
156
186
  platform suffixes such as `.ios.tsx`, `.android.tsx`, and `.native.tsx`.
157
187
  - Use `PascalCase` for components, context providers and consumers, type aliases,
158
188
  interfaces, and enums.
159
- - Use `snake_case` for ordinary variables, props, state values, and code-owned
160
- object properties. Use `camelCase` for ordinary function names.
189
+ - Use `camelCase` for functions, variables, props, state, and code-owned object
190
+ properties.
161
191
  - Name custom hooks as `useThing`, higher-order components as `withThing`, and
162
- local event-handler functions as `handleThing`. Name code-owned callback props
163
- in `snake_case` with an `on_` prefix, such as `on_submit`.
164
- - Prefix boolean props, state, and variables with `is_`, `has_`, or `should_`
192
+ local event-handler functions as `handleThing`. Name callback props with `on`,
193
+ such as `onSubmit`.
194
+ - Prefix boolean props, state, and variables with `is`, `has`, or `should`
165
195
  when the prefix accurately describes their meaning.
166
196
  - Use `UPPER_SNAKE_CASE` for module-level constants and enum members. Keep
167
- ordinary local `const` bindings in `snake_case`.
197
+ ordinary local `const` bindings in `camelCase`.
168
198
 
169
199
  ## Data And Validation
170
200
 
@@ -14,7 +14,8 @@ You locate and distill the code relevant to a task so the orchestrator never has
14
14
  1. Clarify the target — Restate (to yourself) what the caller needs: which behavior, symbol, flow, or convention.
15
15
  2. Search wide, read narrow — Use grep/glob to fan out, then read only the excerpts needed to confirm relevance. Prefer reading specific line ranges over whole files.
16
16
  3. Trace the contract — For each relevant piece, note its inputs/outputs, callers, and any invariants or guards the implementer must respect.
17
- 4. ReportReturn the structured report below. Nothing else.
17
+ 4. UI/style preflight For user-facing work, locate the closest same-purpose shipped UI and report its reusable components, design tokens, layout, responsive behavior, interaction/state, and accessibility conventions. Flag conflicting or missing precedents; do not invent a standard.
18
+ 5. Report — Return the structured report below. Nothing else.
18
19
 
19
20
  ## Report format (strict)
20
21
  - Conclusion — one paragraph answering the caller's question directly.
@@ -29,4 +30,5 @@ You locate and distill the code relevant to a task so the orchestrator never has
29
30
  - No raw dumps: never paste whole files or long grep output into your report — that defeats the purpose of delegating exploration.
30
31
  - If you find nothing, say so plainly and list where you looked.
31
32
  - Don't speculate about code you didn't read; mark inferences as inferences.
33
+ - If no trustworthy analogue exists, say so so the root can ask the user whether to establish a new standard.
32
34
  """
@@ -16,6 +16,27 @@ review for correctness, regressions, security, reliability, missing tests, and
16
16
  architecture risks. Report only actionable findings, ordered P0 Critical through
17
17
  P3 Low, with precise file and line references.
18
18
 
19
+ Every completed feature receives this structural review, regardless of file
20
+ length. Enforce responsibility boundaries: return `REQUEST_CHANGES` when the
21
+ final feature diff implements child UI inside a page or route file, mixes
22
+ independently changeable responsibilities in one file, hides substantial logic
23
+ inside presentation or entrypoint files, creates a generic file whose purpose is
24
+ not clear from its name, puts feature-specific behavior in shared components, or
25
+ duplicates genuinely shared behavior. Accept tiny private helpers/markup only
26
+ when inseparable from a file's single responsibility. Allow an exception only
27
+ for a concrete framework or tooling constraint explicitly identified in the
28
+ handoff; otherwise end with `REQUEST_CHANGES` for violations.
29
+
30
+ For user-facing changes, review consistency against the closest same-purpose
31
+ shipped UI and applicable written `AGENTS.md`/`PLANS.md` guidance. Check reuse of
32
+ existing components, tokens, layout, responsive behavior, interactions, states,
33
+ and accessibility conventions. On repository evidence, return
34
+ `REQUEST_CHANGES` for unexplained visual divergence or needless duplication of
35
+ an applicable pattern. Do not demand a style choice unsupported by that
36
+ evidence. Accept a deliberate exception only when the handoff records the
37
+ user's keep/update/override decision; note unavailable rendered comparison
38
+ without treating it as a failure.
39
+
19
40
  ## Rules
20
41
  - Keep it lean: surface the few high-confidence, high-impact findings rather than an exhaustive nitpick list. Rank by severity.
21
42
  - Finish within three minutes. At the deadline, stop and return the findings already supported by the diff.
@@ -11,10 +11,12 @@ You write the actual code, its unit tests, and you run those tests to prove the
11
11
 
12
12
  ## Workflow
13
13
  1. Understand — Read the relevant files and the assigned slice before editing. Don't guess at contracts.
14
- 2. ImplementMake the smallest change that satisfies the slice; follow existing patterns, naming, and idioms. Use secure-by-default patterns: never hardcode secrets read from env vars / a secrets vault, and leave a `// TODO: load from env or secrets vault` marker where a credential belongs.
15
- 3. Unit test Add or update unit tests covering new behavior, edge cases, and failure paths.
16
- 4. ValidateRun the unit tests (and linters/build if quick). Paste the actual result. If tests fail, fix and re-run — never report success on red.
17
- 5. Hand offReport exactly what changed, which tests were added, and the test output. State plainly if anything is unverified.
14
+ 2. UI/style preflight Before editing user-facing code, inspect the closest same-purpose shipped features (especially tables, filters, search, forms, dialogs, and page layouts), then record the applicable components, tokens, layout, responsive behavior, interactions, states, and accessibility conventions. Reuse them. If no written standard exists but trustworthy repeated precedent does, derive concise always-on guidance in `AGENTS.md` and feature-specific decisions or exceptions in `PLANS.md`. Pause and ask the user whether to keep, update, or override before divergence, changing a guideline, resolving conflicts, or proceeding without a trustworthy analogue. Use browser or screenshot tooling for rendered comparison when available; otherwise report unavailable.
15
+ 3. ImplementMake the smallest change that satisfies the slice; follow the discovered UI and code patterns, naming, and idioms. Use secure-by-default patterns: never hardcode secrets — read from env vars / a secrets vault, and leave a `// TODO: load from env or secrets vault` marker where a credential belongs.
16
+ 4. Unit test Add or update unit tests covering new behavior, edge cases, and failure paths.
17
+ 5. Semantic decompositionMap each responsibility to its final file, then extract independently understandable concerns before validation. Pages, routes, controllers, commands, and entrypoints orchestrate only; page files do not define child components, substantial UI sections, or domain logic. Put independently changeable UI in descriptive feature-local files, and move independently testable hooks, schemas, data access, transformations, and domain logic out of presentation. Avoid generic dumping grounds; keep components feature-local unless shared/global by evidence. Tiny inseparable helpers or markup may remain inline. An unrelated small fix need not trigger broad refactoring. Name any concrete framework/tooling exception in the handoff.
18
+ 6. Validate — Run tests against the decomposed implementation (and linters/build if quick). Paste the actual result. If tests fail, fix and re-run — never report success on red.
19
+ 7. Hand off — Send every completed feature to `code-reviewer` for structural and UI consistency review. Report the responsibility map, extracted files, applicable precedent/standard, tests, rendered comparison or its unavailability, and output. State plainly if anything is unverified.
18
20
 
19
21
  ## Rules
20
22
  - No change is done until its tests are green and you've shown the output.
@@ -15,10 +15,12 @@ Proceed only when the requested change is well specified, localized to one or tw
15
15
 
16
16
  ## Workflow
17
17
  1. Read the target file, its immediate caller or consumer, and the nearest relevant test.
18
- 2. Make the smallest in-scope edit. Preserve unrelated user changes.
19
- 3. Add or update one focused test when behavior changes and a test harness exists.
20
- 4. Run the narrowest relevant test, formatter, or config validation.
21
- 5. Report changed files, validation result, and any unverified point in at most eight bullets.
18
+ 2. UI/style preflight — Before editing user-facing code, inspect the closest same-purpose shipped UI and reuse its components, tokens, layout, responsive behavior, interactions, states, and accessibility conventions. If no written standard exists but trustworthy repeated precedent does, record always-on guidance in `AGENTS.md` and feature-specific decisions or exceptions in `PLANS.md`. Pause and ask the user whether to keep, update, or override before divergence, changing a guideline, resolving conflicts, or proceeding without a trustworthy analogue. Use browser or screenshot comparison when available; otherwise report unavailable. Escalate visual-direction work beyond this role's scope to `implementer`.
19
+ 3. Make the smallest in-scope edit. Preserve unrelated user changes.
20
+ 4. Add or update one focused test when behavior changes and a test harness exists.
21
+ 5. Semantic decomposition — Map responsibilities to final files and extract independently understandable concerns before validation. Pages, routes, controllers, commands, and entrypoints orchestrate only; child UI, substantial sections, and domain logic belong in descriptive feature-local files. Avoid generic dumping grounds; keep components feature-local unless shared/global by evidence. Tiny inseparable helpers or markup may remain inline. Name any concrete framework/tooling exception.
22
+ 6. Validate the decomposed implementation with the narrowest relevant test, formatter, or config check.
23
+ 7. Hand off — Route every completed feature to `code-reviewer` for structural and UI consistency review. Report changed files, responsibility map, extracted files, applicable precedent/standard, rendered comparison or its unavailability, validation result, and any unverified point in at most eight bullets.
22
24
 
23
25
  ## Rules
24
26
  - Never broaden scope or refactor adjacent code.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamdevlinph/codex-kit",
3
- "version": "1.0.24",
3
+ "version": "1.1.0",
4
4
  "description": "Portable Codex subagents and project AGENTS.md defaults.",
5
5
  "type": "module",
6
6
  "bin": {