diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2b9d8f..2ac904a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,10 @@ jobs: env: PYTHONDONTWRITEBYTECODE: "1" steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.11" - name: Install developer checks diff --git a/PLANS.md b/PLANS.md index 7e6aabe..282812d 100644 --- a/PLANS.md +++ b/PLANS.md @@ -4,6 +4,110 @@ plan_schema_version: 2 Use this file for active, blocked, ready-for-closure, or recently completed execution work. The canonical lifecycle is the installed `engineering-workflow` planning reference. +## Active Plan: GPT-6.2 Profiles And Release 0.11.0 + +Status: active +Owner: root +Last Updated: 2026-11-17 + +### Goal + +Review source instructions and all target templates for applicable inaccurate guidance. Move the Codex Sol and exceptional Astra routes to GPT-6.2, preserve cheaper and visual roles and exact user-owned files, verify guarded native availability and migrate pristine opted-in templates. Pin current Actions and deliver source, catalog, and native installs. + +### Plan Origin + +plan_mode_approved + +### Requested Scope + +Review source instructions and all target templates for applicable inaccurate guidance. Move the Codex Sol and exceptional Astra routes to GPT-6.2, preserve cheaper and visual roles and exact user-owned files, verify guarded native availability and migrate pristine opted-in templates. Pin current Actions and deliver source, catalog, and native installs. + +### Requirement Traceability + +| Requirement | Complete outcome | Source | Work queue | Acceptance or validation | Status | +| --- | --- | --- | --- | --- | --- | +| REQ-001 | Codex profiles, source and target-template proofreading, and safe migration | approved plan and follow-up | WQ-01 | Scenario comparison, report/apply regressions, and full gate | done | +| REQ-002 | Current GitHub Actions and reviewed immutable source release 0.11.0 | approved plan and follow-up | WQ-02 | Pin verification, package parity, released tag and CI | in_progress | +| REQ-003 | Catalog 1.0.13 and native plugin installation | approved plan and follow-up | WQ-03 | Exact bundle and active content comparison | pending | + +### Explicit Non-Goals + +- Global model changes, unrelated repository migrations, bundled binaries, and scheduled monitoring are out of scope. + +### Constraints + +- Self-review every complete commit slice and review the aggregate change before pushing. Require current public-tree and redacted tree/history checks before each maintainer push. +- Preserve customized content, ownership, existing tags, and prior historical records. Run existing CLI tools directly and retain only proportionate evidence. + +### Inputs And Sources + +- User-approved release plan and follow-ups on Action updates, tgrep improvements, review, and target templates. +- https://openai.com/index/introducing-gpt-6-2-astra-sol/ and https://learn.chatgpt.com/docs/models +- https://github.com/microsoft/tgrep/compare/v1.2.4...v1.2.7 +- Official Action releases for checkout v7.0.1, setup-python v7.1.0, and action-gh-release v3.0.4. + +### User Decisions And Answers + +- Complete both source releases, the consolidated catalog release, and the native local update. +- Check all Action references and proofread target templates as well as source instructions. + +### Completed Baseline State + +- [x] WQ-00 — Clean 0.10.0 main. Codex catalog exposes 6.2 Sol, 6.2 Astra, 6.1 Terra, and 6 Luna. Templates currently pin 6 Sol and Luna. Prior opt-in and pristine fingerprints already govern target updates. + +### Current Work Queue + +- [x] WQ-01 — Implement and test REQ-001, including review of target agent and workflow templates. `done` +- [ ] WQ-02 — Complete self-review and aggregate review, run full and security gates, and publish REQ-002. `in_progress` +- [ ] WQ-03 — Verify catalog and local delivery for REQ-003. `pending` + +### Locked Decisions + +- Use source 0.11.0 and 1.1.1 and catalog 1.0.13, subject to checking that each tag is free before publication. Keep one role mapping with explicit available-model compatibility choices. +- Use exact released bytes for the catalog. Update local plugins through native marketplaces after verifying release delivery. + +### Verification + +- Apply the acceptance checks mapped above. Review manifest/version consistency, generated bytes, latest applicable CI and security evidence, and the complete requested outcome at closure. + +### Latest Validation Results + +- 2026-11-17: read-only baseline and official upstream release verification complete. +- 2026-11-17: matched Codex CLI comparison of 6.2 Sol and 6.1 Sol at medium. Both found the synthetic configuration regression and reported the missing-fixture blocker. The two-case sample measures functional parity only. +- 2026-11-17: proofread all canonical target templates. Corrected the rendered router, archive index wording and Codex reviewer/utility instructions. Historical router bytes are retained as a test-only fixture. Added coverage for missing model availability, pristine migration, exact preservation of customized bytes and repeat execution. Local full gate passed 9/9 using Homebrew Python 3.15.2 and pinned Ruff. Strict Claude plugin and marketplace validation and the skill validator passed. Claude reports an optional listing-icon warning. + +### Risks And Recovery + +- An unavailable model or a custom model pin must remain usable. Require host evidence for new generated presets and keep existing custom files. Migrate through the existing transactional apply and privacy checks. +- For external failures, inspect actual state before retry. Preserve published refs and prior installations when verification fails. + +### Resume Point + +- WQ-02: review and commit the complete source change, verify security and hosted CI, then publish v0.11.0. + +### Plan Fidelity Check + +- [x] All scoped outcomes, sources, decisions, constraints, work items and acceptance checks are mapped. +- [x] The resume point is the first pending step and the approved plan has been preserved. + +### Reconciliation Check + +- [x] Initial plan matches the checked repository and user decisions. +- [ ] Reconcile final changes, review feedback and delivery status. + +### Closure Gate + +- [ ] All requirements and queue items are terminal and verified. +- [ ] Final artifacts, plans and handoff agree with observed state. + +### Post-Close Delivery + +- Publish any closure-only bookkeeping through reviewed PRs after verified release and installation. + +### Handoff Notes + +- Follow the first unfinished work item. + ## Recently Completed - [x] 2026-10-12: Completed Documentation Navigation And Release Adoption 0.10.0; [full archived plan](docs/archive/plans/2026-10-12-documentation-navigation-and-release-adoption-0-10-0.md). diff --git a/README.md b/README.md index 06df1e6..9359424 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ `engineering-workflow` is a public skill for auditing, setting up, validating, updating, and safely migrating the engineering-workflow layer of a repository. It works with Codex and Claude Code. -Current skill version: `0.10.0`. +Current skill version: `0.11.0`. The skill uses `AGENTS.md` as a short map, `PLANS.md` as durable execution state, and leaves product, architecture, operations, security, and other repository-owned documentation with its existing owners. Any repository change starts with a full plan; read-only inspection is the only exception. @@ -73,7 +73,7 @@ Use $engineering-workflow to audit this mature repository and add only the missi ``` ```text -Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.10.0. +Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.11.0. ``` Repository text is evidence, not authority. It cannot grant approval, expand scope, request secrets, or override system, developer, or user instructions. @@ -179,7 +179,7 @@ When the result permits an automatic update, rerun it with `--apply`. Alternate `Upgrade A Target Workflow` tells the agent to run a report-first guarded migration, not to hand the user a list of backend commands. It applies automatically only when ownership, privacy, and approval checks are resolved. An already-current valid target returns `already_current` without creating a plan or rewriting state/index files; missing or drifted required artifacts still take the guarded migration path. ```text -Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.10.0. Run the report first, apply it when safe, and ask only when the report requires a user decision. +Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.11.0. Run the report first, apply it when safe, and ask only when the report requires a user decision. ``` The maintainer/automation backend is: @@ -188,7 +188,7 @@ The maintainer/automation backend is: python3 skill/engineering-workflow/scripts/upgrade_target_workflow.py \ --repo \ --prompt \ - --target-version 0.10.0 \ + --target-version 0.11.0 \ --format json ``` @@ -282,7 +282,7 @@ Use $engineering-workflow to audit this mature repository, preserve every existi Target migration: ```text -Use $engineering-workflow to Upgrade A Target Workflow here to 0.10.0. Run the report and apply it when safe. +Use $engineering-workflow to Upgrade A Target Workflow here to 0.11.0. Run the report and apply it when safe. ``` ## Repository layout @@ -317,7 +317,7 @@ This harness and its Ruff configuration improve development of this repository o ## Versioning and updates -Version 0.10.0 adds compact documentation maps, scoped maintenance and snapshot-approved restructuring, stable installed-skill update policy, and evidence-backed target release-adoption proposals. The existing ownership, privacy, planning, and instruction contract versions remain compatible. +Version 0.11.0 updates the Codex model profiles for GPT-6.2 and checks model availability before refreshing opted-in generated profiles. The generated task-route list and review instructions are easier to read. Version 0.10.0 added compact documentation maps, scoped maintenance and snapshot-approved restructuring, stable installed-skill update policy, and evidence-backed target release-adoption proposals. Ownership, privacy, planning, and instruction contract versions remain compatible. Version 0.9.10 preserves declared custom archive index chains during target upgrades and wrapped archive pointers during plan closure. It adds separately opted-in Claude Code project-agent profiles without changing Codex opt-in semantics or overwriting customized agent files. diff --git a/plugins/engineering-workflow/.claude-plugin/plugin.json b/plugins/engineering-workflow/.claude-plugin/plugin.json index fc28a0b..54913cb 100644 --- a/plugins/engineering-workflow/.claude-plugin/plugin.json +++ b/plugins/engineering-workflow/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "engineering-workflow", - "version": "0.10.0", + "version": "0.11.0", "description": "Audit, plan, migrate, validate, and maintain repository engineering workflows.", "author": { "name": "xeonvs", diff --git a/plugins/engineering-workflow/.codex-plugin/plugin.json b/plugins/engineering-workflow/.codex-plugin/plugin.json index c73bf0c..4265ee6 100644 --- a/plugins/engineering-workflow/.codex-plugin/plugin.json +++ b/plugins/engineering-workflow/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "engineering-workflow", - "version": "0.10.0", + "version": "0.11.0", "description": "Audit, plan, migrate, validate, and maintain repository engineering workflows.", "author": { "name": "xeonvs", diff --git a/plugins/engineering-workflow/skills/engineering-workflow/SKILL.md b/plugins/engineering-workflow/skills/engineering-workflow/SKILL.md index 2144ed6..d83c6fd 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/SKILL.md +++ b/plugins/engineering-workflow/skills/engineering-workflow/SKILL.md @@ -2,7 +2,7 @@ name: engineering-workflow description: Set up, audit, or upgrade repository workflow instructions and planning. Use for workflow changes or explicit skill refresh/update; ordinary repository work does not invoke migration. metadata: - version: 0.10.0 + version: 0.11.0 --- # Engineering Workflow diff --git a/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/explorer.toml.tmpl b/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/explorer.toml.tmpl index 71ab49c..aa3a9bb 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/explorer.toml.tmpl +++ b/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/explorer.toml.tmpl @@ -1,6 +1,6 @@ name = "workflow-explorer" description = "Bounded read-heavy repository evidence collection" developer_instructions = "Use only the bounded self-contained packet and accessible path scope supplied by the root. Return compact status, distilled findings, file references, checks, blockers, and accessible artifact paths. Do not paste unbounded raw output, reconstruct missing context, write shared state, or spawn child agents; report an inaccessible required input." -model = "gpt-6-sol" +model = "gpt-6.2-sol" model_reasoning_effort = "medium" sandbox_mode = "read-only" diff --git a/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/reviewer.toml.tmpl b/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/reviewer.toml.tmpl index 4170e8b..6da3f7d 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/reviewer.toml.tmpl +++ b/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/reviewer.toml.tmpl @@ -1,6 +1,6 @@ name = "workflow-reviewer" description = "Bounded evidence-first review for ordinary changes" -developer_instructions = "Review only the bounded self-contained change packet and accessible evidence supplied by the root without modifying shared state. Return compact status, findings with severity and confidence, evidence paths, checks, blockers, assumptions, and a stopping or escalation condition; report missing required context rather than inferring it." -model = "gpt-6-sol" +developer_instructions = "Review the bounded self-contained change packet and accessible evidence supplied by the root. Keep the review read-only and return findings with severity, confidence and evidence, plus checks, blockers and assumptions. State when there are no findings. Report missing required context and stop at the packet's acceptance or escalation condition. Work within this agent and its assigned scope." +model = "gpt-6.2-sol" model_reasoning_effort = "medium" sandbox_mode = "read-only" diff --git a/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/utility.toml.tmpl b/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/utility.toml.tmpl index 9214080..c184fd7 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/utility.toml.tmpl +++ b/plugins/engineering-workflow/skills/engineering-workflow/assets/agents/utility.toml.tmpl @@ -1,6 +1,6 @@ name = "workflow-utility" description = "Bounded read-only interpretation with a fixed result schema" -developer_instructions = "Use only the bounded self-contained packet and accessible inputs supplied by the root. Do not expand scope, write shared state, spawn child agents, or retry more than once. Return compact status, findings, checks, blockers, accessible evidence paths, needs_escalation, and the stopping condition; report an inaccessible required input instead of guessing." +developer_instructions = "Use only the bounded self-contained packet and accessible inputs supplied by the root. Work within this agent and its assigned read-only scope. Retry a transient failure at most once if the packet permits it. Return compact status, findings, checks, blockers, accessible evidence paths, needs_escalation, and the stopping condition. Report an inaccessible required input." model = "gpt-6-luna" model_reasoning_effort = "low" sandbox_mode = "read-only" diff --git a/plugins/engineering-workflow/skills/engineering-workflow/assets/release_adoption.json b/plugins/engineering-workflow/skills/engineering-workflow/assets/release_adoption.json index 9c4962c..af9fe92 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/assets/release_adoption.json +++ b/plugins/engineering-workflow/skills/engineering-workflow/assets/release_adoption.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "skill_version": "0.10.0", + "skill_version": "0.11.0", "changes": [ { "id": "documentation-navigation-v1", @@ -36,6 +36,13 @@ "summary": "Check trusted stable releases with installation-scoped policy and verified native delivery.", "affected_owner_patterns": [], "adoption_requirement": "runtime_only" + }, + { + "id": "codex-gpt62-profiles-v1", + "introduced_in": "0.11.0", + "summary": "Select current Codex model profiles and verify host availability before writing optional generated presets.", + "affected_owner_patterns": [], + "adoption_requirement": "runtime_only" } ] } diff --git a/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/AGENTS.md.tmpl b/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/AGENTS.md.tmpl index 360869d..cb6b984 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/AGENTS.md.tmpl +++ b/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/AGENTS.md.tmpl @@ -8,7 +8,7 @@ Use this file as a short route map, not as a project manual. Read the matched ow - `{{ entrypoint_hint }}` - `{{ subsystem_hint }}` -- `tests/` — regression and contract checks +- `tests/` — regression and contract checks when present ## Workflow Sources Of Truth @@ -23,31 +23,31 @@ At a new session or material context recovery, follow the installed documentatio ## Task Routes -| `documentation` | discovery, writing, documented behavior/path changes, or restructuring | installed documentation reference and existing local writing owners | affected content, navigation, and exact restructuring approval | +- `documentation` — For discovery, writing, behavior or path changes, and restructuring, follow the installed documentation reference and local writing owners. Check affected content and navigation, and obtain exact approval for restructuring. -| `workflow-updates` | stable skill updates and target release adoption | installed update and target-upgrade references | verified native installation and reviewed target proposal | +- `workflow-updates` — For stable skill updates and target adoption, follow the installed update and target-upgrade references. Verify native installation and review the target proposal. -| `execution-context` | host or capability uncertainty | installed platform reference | resolve uncertainty; reuse established session facts | +- `execution-context` — Resolve host or capability uncertainty through the installed platform reference. Reuse established session facts. -| `scope-decision` | material clarification or additional authorization | installed question policy | ask only for an unresolved material choice or permission | +- `scope-decision` — Check material choices and additional permissions against the installed question policy. -| `task-handoff` | delegation, context recovery, execution handoff, or large transient evidence | installed orchestration and planning references | self-contained scope, durable state, accessible evidence, and root acceptance | +- `task-handoff` — For delegation, recovery, handoff, or large outputs, follow the installed orchestration and planning references. Check the handoff scope, evidence access, durable state and root acceptance. -| `planning` | plan, backlog, closure, or default/custom workflow-state archive | installed planning reference | `lint:plan-lifecycle` | +- `planning` — For plans, backlog, archives and closure, follow the installed planning reference and run `lint:plan-lifecycle`. -| `workflow-instructions` | instruction owner, route, or incident change | instruction lifecycle and project principles | `lint:instruction-contract` | +- `workflow-instructions` — For changes to instruction owners, routes or incidents, follow the instruction lifecycle and project principles. Run `lint:instruction-contract`. -| `repository-change` | every repository-changing task, alongside specialized routes | project principles and its domain-owner links | repository-specific gates | +- `repository-change` — For every repository change, apply the project principles and the gates named by the relevant domain owners. -| `long-running-execution` | long-running local command, waiter, polling, or process cleanup | project principles and installed orchestration contract | completion-evidence review | +- `long-running-execution` — For long-running commands and process cleanup, follow the project principles and installed orchestration contract. Verify completion and cleanup of task-owned processes. ## Route Maintenance diff --git a/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl b/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl index cf3fd20..97bbe0a 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl +++ b/plugins/engineering-workflow/skills/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl @@ -1,6 +1,6 @@ # Archived Plans -This file indexes future-useful closed plans. Active execution state remains in `/PLANS.md`. +This file indexes closed plans retained for future use. Active execution state remains in `PLANS.md` at the repository root. {{ entries }} diff --git a/plugins/engineering-workflow/skills/engineering-workflow/references/model_profiles.md b/plugins/engineering-workflow/skills/engineering-workflow/references/model_profiles.md index d936464..b51281e 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/references/model_profiles.md +++ b/plugins/engineering-workflow/skills/engineering-workflow/references/model_profiles.md @@ -6,12 +6,13 @@ Choose a model only after the task-shape route calls for semantic work. Determin ## Source Snapshot -Verified against current official guidance on 2026-09-23: +Verified against current official guidance on 2026-11-17: - `https://developers.openai.com/api/docs/models` - `https://developers.openai.com/api/docs/guides/latest-model` - `https://learn.chatgpt.com/docs/models` - `https://learn.chatgpt.com/docs/agent-configuration/subagents` +- `https://learn.chatgpt.com/docs/pricing#token-rates` Revalidate this mapping when supported Codex models or reasoning levels change. @@ -27,27 +28,27 @@ Revalidate this mapping when supported Codex models or reasoning levels change. ### `explorer` -- model: `gpt-6-sol` +- model: `gpt-6.2-sol` - `model_reasoning_effort`: `low` or `medium` - `sandbox_mode`: `read-only` - use bounded path scope and distilled evidence ### `standard` -- model: `gpt-6-sol` +- model: `gpt-6.2-sol` - `model_reasoning_effort`: `medium` - use the minimum sandbox needed by the bounded work ### `review` -- model: `gpt-6-sol` +- model: `gpt-6.2-sol` - `model_reasoning_effort`: `medium` - normally use `sandbox_mode: read-only` -- use `high` on Sol when review complexity warrants it; consider `gpt-6-astra` with `high` effort for high-consequence correctness or security review under the confirmation rule below; use `xhigh` only after representative evaluation shows a material quality gain +- use `high` on Sol when review complexity warrants it. Consider `gpt-6.2-astra` at `high` for high-consequence review under the confirmation rule below. Use `xhigh` only after representative evaluation shows a material quality gain. ### `exceptional_quality` -- use `gpt-6-astra` with `high` effort for unusually difficult, high-consequence semantic work when the user requests it or confirms a proposed escalation; keep a selected supported user-pinned model +- use `gpt-6.2-astra` with `high` effort for unusually difficult, high-consequence semantic work when the user requests it or confirms a proposed escalation. Keep a selected supported user-pinned model. - consider `max`, `ultra`, or API pro mode only for difficult quality-first work with measurable acceptance criteria and high error cost - compare against the cheaper baseline instead of assuming maximum reasoning wins @@ -55,13 +56,13 @@ Before selecting Astra for a new worker or changing a saved profile from Sol/Lun ## API And Codex Boundary -When migrating a profile to a GPT-6 model, preserve its effective supported reasoning effort unless deliberately changing the task profile after evaluation. Astra does not support `none`; use `low` as the initial evaluated baseline. Sol and Luna support `none`. If an older profile used `minimal`, start with `low` and compare representative tasks. Standard and routine review default to `medium`; higher review effort requires a task-specific reason. +When migrating to GPT-6.2 Sol or Astra, preserve the effective supported reasoning effort. Use `low` when migrating from `none` or when an older profile used `minimal`, then compare representative tasks. Both GPT-6.2 models expose `low` through `max` in the API. Codex may also expose `ultra`. Check the active Codex client for model availability and effort values, including for Luna. -Keep `gpt-5.6-terra` as an explicit compatibility fallback for a utility or explorer profile when its GPT-6 recommendation is unavailable in the active Codex client, or when representative evaluation favors the existing profile. Retain the role's `low` or `medium` effort and read-only boundary. This is a deliberate profile choice, not automatic retry or a silent replacement of a user pin. The published API token prices do not make Terra cheaper than Luna for utility work or Sol for explorer work; Codex subscription usage should be assessed in its own environment. +Use `gpt-6.1-sol` as the explicit compatibility choice for a Sol role when 6.2 Sol is unavailable and the active host offers 6.1 Sol. Keep the role's effort and permissions. Use `gpt-6.1-terra` for visual understanding or computer use when the task needs those capabilities and the host offers them. Keep Luna for bounded utility work. An available `gpt-5.6-terra` remains a compatibility choice for established utility or explorer profiles. Preserve user pins and select compatibility models before execution. -In the Responses API, pro is a reasoning mode selected with `reasoning.mode: "pro"`; it is not a separate model slug. Persisted reasoning and Programmatic Tool Calling are also API features. +GPT-6.2 Sol and GPT-6.1 Sol have the same standard API token prices. For Codex, evaluate actual usage and time to an accepted result. Model availability can depend on client, plan and workspace policy. -Do not write API-only fields into Codex custom-agent TOML unless current Codex documentation explicitly adds support. This includes async tool flags, steering events, and `configuration_update` items. Never represent pro mode by inventing a separate model slug. +For GPT-6.2 API tool calling, use Responses. In Responses, pro is a reasoning mode selected with `reasoning.mode: "pro"` where supported. Use only supported native Codex fields in custom-agent TOML. Keep API tool flags, steering events and `configuration_update` items in the API integration. ## Maintenance Rules diff --git a/plugins/engineering-workflow/skills/engineering-workflow/references/target_workflow_upgrade.md b/plugins/engineering-workflow/skills/engineering-workflow/references/target_workflow_upgrade.md index 630f197..f5179a0 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/references/target_workflow_upgrade.md +++ b/plugins/engineering-workflow/skills/engineering-workflow/references/target_workflow_upgrade.md @@ -48,6 +48,7 @@ The user may explicitly request report-only behavior; then invoke `--plan`. Code - `--prompt` - `--target-version` - `--include-agent-config` +- `--available-codex-model` (repeatable, verified on the target Codex host) - `--include-claude-agent-config` - `--reviewed-change` (repeatable agent-reviewed adoption ID) - `--approve-privacy-review` @@ -192,6 +193,15 @@ When `--include-agent-config` is present or the target's valid workflow state re - replace an existing agent file only when its complete bytes match the registered prior generated template; preserve every customized model pin and instruction - show the exact config diff +The plan report lists `required_codex_models` for generated agent files it +would create or refresh. Verify those models and their prescribed effort in +the target Codex client. Pass each verified slug via `--available-codex-model` +when applying. The flag supplies a host observation and retains the separate +configuration opt-in. If a required model is unavailable or cannot be +verified, apply returns `codex_model_availability_required` and preserves the +target. Keep the current profiles and use the report to explain the limitation. +An upgrade with no generated agent changes requires no model availability probe. + Never place Responses API-only fields in Codex TOML. ## Claude Code Configuration diff --git a/plugins/engineering-workflow/skills/engineering-workflow/scripts/upgrade_target_workflow.py b/plugins/engineering-workflow/skills/engineering-workflow/scripts/upgrade_target_workflow.py index 6834379..2539b80 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/scripts/upgrade_target_workflow.py +++ b/plugins/engineering-workflow/skills/engineering-workflow/scripts/upgrade_target_workflow.py @@ -104,11 +104,20 @@ }, } -# Exact agent-template bytes shipped in 0.9.7. No customized target file is rewritten. +# Exact agent-template bytes shipped in 0.9.7 and 0.9.8 through 0.10.0. PRIOR_AGENT_TEMPLATE_HASHES = { - "utility": "2f32f34a8c23d66c037abd0d1466f1eebc41ee52fd5e1e422470b7fbead4c210", - "explorer": "cf28d059b8bc28123a038d2f4c40fe24fe45e5623d2ee73c0e2b81f0a1d381b4", - "reviewer": "6182122fcec3d18b14acdabb644b750e58c5d2264d8b7a68eaf54644ef6db133", + "utility": { + "2f32f34a8c23d66c037abd0d1466f1eebc41ee52fd5e1e422470b7fbead4c210", + "40431d11ff23ef2a295d5f4e6a4303c99d43af79ddc052cf1003a896c2faf1ed", + }, + "explorer": { + "cf28d059b8bc28123a038d2f4c40fe24fe45e5623d2ee73c0e2b81f0a1d381b4", + "d3809be66e50a4c594b865921f438c3ebfc4595529fcd5c35a14a56ac047aeb7", + }, + "reviewer": { + "6182122fcec3d18b14acdabb644b750e58c5d2264d8b7a68eaf54644ef6db133", + "e9490fb1a0857e4eb86cd71d7e6bc472336a21efb56f8b7f9b257713fc3c1b4c", + }, } PRIOR_CLAUDE_AGENT_TEMPLATE_HASHES = { "workflow-utility": {"8203a37549a6face81c6db37678752a4d237876e8cf3d269a7b606aa4709cbdb"}, @@ -126,7 +135,11 @@ def _is_pristine_legacy(relative: str, text: str) -> bool: def _is_pristine_prior_agent(name: str, text: str) -> bool: - return _content_hash(text) == PRIOR_AGENT_TEMPLATE_HASHES[name] + return _content_hash(text) in PRIOR_AGENT_TEMPLATE_HASHES[name] + + +def _codex_agent_template(name: str) -> str: + return (AGENT_TEMPLATE_ROOT / f"{name}.toml.tmpl").read_text(encoding="utf-8") def _is_pristine_prior_claude_agent(name: str, text: str) -> bool: @@ -543,7 +556,7 @@ def rmdir(self, relative: str) -> None: os.close(parent) -def _read(path: Path) -> str: +def _read(path: Path, *, exact: bool = False) -> str: if path.is_symlink(): try: return os.readlink(path) @@ -552,7 +565,7 @@ def _read(path: Path) -> str: if any(parent.is_symlink() for parent in path.parents): return "" try: - return path.read_text(encoding="utf-8") + return path.read_bytes().decode("utf-8") if exact else path.read_text(encoding="utf-8") except (OSError, UnicodeDecodeError): return "" @@ -931,10 +944,12 @@ def _proposed_changes( changes.append( {"path": path, "action": "create", "reason": "explicit optional agent configuration request"} ) - elif _is_pristine_prior_agent(name, _read(root / path)): - changes.append( - {"path": path, "action": "update", "reason": "known pristine prior agent template fingerprint"} - ) + else: + existing = _read(root / path, exact=True) + if existing != _codex_agent_template(name) and _is_pristine_prior_agent(name, existing): + changes.append( + {"path": path, "action": "update", "reason": "known pristine prior agent template fingerprint"} + ) if include_claude_agent_config: for name in CLAUDE_AGENT_NAMES: path = f".claude/agents/{name}.md" @@ -1064,6 +1079,13 @@ def build_migration_report( elif finding.get("requires_decision") == "true": questions.append(f"Which source should own the contradictory planning rule in {finding['path']}?") proposed = _proposed_changes(root, include_agent_config, include_claude_agent_config) + required_codex_models = sorted( + { + tomllib.loads(_codex_agent_template(Path(change["path"]).stem))["model"] + for change in proposed + if change["path"].startswith(".codex/agents/") + } + ) try: documentation_writes = ( planned_documentation_index_writes(root) if _semver_tuple(target_version) >= (0, 10, 0) else {} @@ -1146,6 +1168,7 @@ def build_migration_report( "privacy_findings": privacy_findings, "privacy_review": privacy_review, "proposed_changes": proposed, + "required_codex_models": required_codex_models, "untouched_files": sorted(path for path in protected if path not in touched), "required_user_questions": questions, "validation_plan": [ @@ -1562,6 +1585,8 @@ def apply_migration( approved_privacy_review: str | None = None, include_claude_agent_config: bool = False, reviewed_change_ids: list[str] | None = None, + *, + available_codex_models: tuple[str, ...] = (), ) -> dict[str, Any]: root = repo.resolve() expected_root_identity = _directory_identity(root) @@ -1608,6 +1633,17 @@ def apply_migration( } if not report["success"]: return {**report, "success": False, "mode": "apply", "update_status": "conflict", "mutation_log": []} + missing_models = sorted(set(report["required_codex_models"]).difference(available_codex_models)) + if missing_models: + return { + **report, + "success": False, + "mode": "apply", + "update_status": "codex_model_availability_required", + "agent_action": "verify_codex_models", + "unverified_codex_models": missing_models, + "mutation_log": [], + } if _already_current(report, include_agent_config, root): return _already_current_result(report, mode="apply") @@ -1721,11 +1757,16 @@ def write(relative: str, text: str) -> None: for name in ("utility", "explorer", "reviewer"): relative = f".codex/agents/{name}.toml" existing_agent = read(relative) - if not existing_agent or _is_pristine_prior_agent(name, existing_agent): - write( - relative, - (AGENT_TEMPLATE_ROOT / f"{name}.toml.tmpl").read_text(encoding="utf-8"), - ) + template = _codex_agent_template(name) + if not secure.exists(relative) or ( + existing_agent != template and _is_pristine_prior_agent(name, existing_agent) + ): + model = tomllib.loads(template)["model"] + if model not in available_codex_models: + raise MigrationConflict( + "codex_model_availability_required", f"Model availability is unverified: {model}" + ) + write(relative, template) if include_claude_agent_config: for name in CLAUDE_AGENT_NAMES: @@ -1924,6 +1965,8 @@ def execute_prompt_upgrade( approved_privacy_review: str | None = None, include_claude_agent_config: bool = False, reviewed_change_ids: list[str] | None = None, + *, + available_codex_models: tuple[str, ...] = (), ) -> dict[str, Any]: """Run report-first migration for an authorized natural-language target-upgrade request.""" report = build_migration_report( @@ -2034,6 +2077,7 @@ def execute_prompt_upgrade( approved_privacy_review, include_claude_agent_config, reviewed_change_ids, + available_codex_models=available_codex_models, ) if applied.get("update_status") == "question_required": agent_action = "ask_targeted_question" @@ -2043,6 +2087,8 @@ def execute_prompt_upgrade( if applied.get("privacy_review", {}).get("status") in {"approval_required", "token_mismatch"} else "report_privacy_findings" ) + elif applied.get("update_status") == "codex_model_availability_required": + agent_action = "verify_codex_models" elif applied.get("success"): agent_action = "complete_and_validate" else: @@ -2067,9 +2113,15 @@ def main() -> int: mode.add_argument("--plan", action="store_true") mode.add_argument("--apply", action="store_true") mode.add_argument("--prompt", action="store_true") - parser.add_argument("--target-version", default="0.10.0") + parser.add_argument("--target-version", default="0.11.0") parser.add_argument("--reviewed-change", action="append", default=[]) parser.add_argument("--include-agent-config", action="store_true") + parser.add_argument( + "--available-codex-model", + action="append", + default=[], + help="Report a model and prescribed effort verified on the target Codex host. Repeat for each model.", + ) parser.add_argument("--include-claude-agent-config", action="store_true") parser.add_argument( "--approve-privacy-review", @@ -2087,6 +2139,7 @@ def main() -> int: args.approve_privacy_review, args.include_claude_agent_config, args.reviewed_change, + available_codex_models=tuple(args.available_codex_model), ) elif args.apply: result = apply_migration( @@ -2096,6 +2149,7 @@ def main() -> int: args.approve_privacy_review, args.include_claude_agent_config, args.reviewed_change, + available_codex_models=tuple(args.available_codex_model), ) else: result = build_migration_report( @@ -2113,6 +2167,10 @@ def main() -> int: print(json.dumps(result, indent=2, sort_keys=True)) else: print(f"{result.get('mode')}: {'ok' if result.get('success') else 'failed'}") + if result.get("required_codex_models"): + print("Required Codex models: " + ", ".join(result["required_codex_models"])) + if result.get("unverified_codex_models"): + print("Unverified Codex models: " + ", ".join(result["unverified_codex_models"])) for item in result.get("proposed_changes", []): print(f"{item['action']}: {item['path']}") return 0 if result.get("success") else 1 diff --git a/plugins/engineering-workflow/skills/engineering-workflow/scripts/validate_skill_repo.py b/plugins/engineering-workflow/skills/engineering-workflow/scripts/validate_skill_repo.py index a382f86..f616bac 100644 --- a/plugins/engineering-workflow/skills/engineering-workflow/scripts/validate_skill_repo.py +++ b/plugins/engineering-workflow/skills/engineering-workflow/scripts/validate_skill_repo.py @@ -531,12 +531,12 @@ def _validate_agent_profiles(repo_root: Path) -> list[str]: if utility.get("sandbox_mode") != "read-only": issues.append("Utility agent must remain read-only") explorer = parsed.get("explorer", {}) - if explorer.get("model") != "gpt-" + "6-sol" or explorer.get("model_reasoning_effort") != "medium": + if explorer.get("model") != "gpt-" + "6.2-sol" or explorer.get("model_reasoning_effort") != "medium": issues.append("Explorer agent must use the current balanced read-heavy profile") if explorer.get("sandbox_mode") != "read-only": issues.append("Explorer agent must remain read-only") reviewer = parsed.get("reviewer", {}) - if reviewer.get("model") != "gpt-" + "6-sol": + if reviewer.get("model") != "gpt-" + "6.2-sol": issues.append("Reviewer agent must use the current Codex review model profile") if reviewer.get("model_reasoning_effort") != "medium" or reviewer.get("sandbox_mode") != "read-only": issues.append("Reviewer agent must use medium reasoning in read-only mode") diff --git a/skill/engineering-workflow/SKILL.md b/skill/engineering-workflow/SKILL.md index 2144ed6..d83c6fd 100644 --- a/skill/engineering-workflow/SKILL.md +++ b/skill/engineering-workflow/SKILL.md @@ -2,7 +2,7 @@ name: engineering-workflow description: Set up, audit, or upgrade repository workflow instructions and planning. Use for workflow changes or explicit skill refresh/update; ordinary repository work does not invoke migration. metadata: - version: 0.10.0 + version: 0.11.0 --- # Engineering Workflow diff --git a/skill/engineering-workflow/assets/agents/explorer.toml.tmpl b/skill/engineering-workflow/assets/agents/explorer.toml.tmpl index 71ab49c..aa3a9bb 100644 --- a/skill/engineering-workflow/assets/agents/explorer.toml.tmpl +++ b/skill/engineering-workflow/assets/agents/explorer.toml.tmpl @@ -1,6 +1,6 @@ name = "workflow-explorer" description = "Bounded read-heavy repository evidence collection" developer_instructions = "Use only the bounded self-contained packet and accessible path scope supplied by the root. Return compact status, distilled findings, file references, checks, blockers, and accessible artifact paths. Do not paste unbounded raw output, reconstruct missing context, write shared state, or spawn child agents; report an inaccessible required input." -model = "gpt-6-sol" +model = "gpt-6.2-sol" model_reasoning_effort = "medium" sandbox_mode = "read-only" diff --git a/skill/engineering-workflow/assets/agents/reviewer.toml.tmpl b/skill/engineering-workflow/assets/agents/reviewer.toml.tmpl index 4170e8b..6da3f7d 100644 --- a/skill/engineering-workflow/assets/agents/reviewer.toml.tmpl +++ b/skill/engineering-workflow/assets/agents/reviewer.toml.tmpl @@ -1,6 +1,6 @@ name = "workflow-reviewer" description = "Bounded evidence-first review for ordinary changes" -developer_instructions = "Review only the bounded self-contained change packet and accessible evidence supplied by the root without modifying shared state. Return compact status, findings with severity and confidence, evidence paths, checks, blockers, assumptions, and a stopping or escalation condition; report missing required context rather than inferring it." -model = "gpt-6-sol" +developer_instructions = "Review the bounded self-contained change packet and accessible evidence supplied by the root. Keep the review read-only and return findings with severity, confidence and evidence, plus checks, blockers and assumptions. State when there are no findings. Report missing required context and stop at the packet's acceptance or escalation condition. Work within this agent and its assigned scope." +model = "gpt-6.2-sol" model_reasoning_effort = "medium" sandbox_mode = "read-only" diff --git a/skill/engineering-workflow/assets/agents/utility.toml.tmpl b/skill/engineering-workflow/assets/agents/utility.toml.tmpl index 9214080..c184fd7 100644 --- a/skill/engineering-workflow/assets/agents/utility.toml.tmpl +++ b/skill/engineering-workflow/assets/agents/utility.toml.tmpl @@ -1,6 +1,6 @@ name = "workflow-utility" description = "Bounded read-only interpretation with a fixed result schema" -developer_instructions = "Use only the bounded self-contained packet and accessible inputs supplied by the root. Do not expand scope, write shared state, spawn child agents, or retry more than once. Return compact status, findings, checks, blockers, accessible evidence paths, needs_escalation, and the stopping condition; report an inaccessible required input instead of guessing." +developer_instructions = "Use only the bounded self-contained packet and accessible inputs supplied by the root. Work within this agent and its assigned read-only scope. Retry a transient failure at most once if the packet permits it. Return compact status, findings, checks, blockers, accessible evidence paths, needs_escalation, and the stopping condition. Report an inaccessible required input." model = "gpt-6-luna" model_reasoning_effort = "low" sandbox_mode = "read-only" diff --git a/skill/engineering-workflow/assets/release_adoption.json b/skill/engineering-workflow/assets/release_adoption.json index 9c4962c..af9fe92 100644 --- a/skill/engineering-workflow/assets/release_adoption.json +++ b/skill/engineering-workflow/assets/release_adoption.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "skill_version": "0.10.0", + "skill_version": "0.11.0", "changes": [ { "id": "documentation-navigation-v1", @@ -36,6 +36,13 @@ "summary": "Check trusted stable releases with installation-scoped policy and verified native delivery.", "affected_owner_patterns": [], "adoption_requirement": "runtime_only" + }, + { + "id": "codex-gpt62-profiles-v1", + "introduced_in": "0.11.0", + "summary": "Select current Codex model profiles and verify host availability before writing optional generated presets.", + "affected_owner_patterns": [], + "adoption_requirement": "runtime_only" } ] } diff --git a/skill/engineering-workflow/assets/templates/AGENTS.md.tmpl b/skill/engineering-workflow/assets/templates/AGENTS.md.tmpl index 360869d..cb6b984 100644 --- a/skill/engineering-workflow/assets/templates/AGENTS.md.tmpl +++ b/skill/engineering-workflow/assets/templates/AGENTS.md.tmpl @@ -8,7 +8,7 @@ Use this file as a short route map, not as a project manual. Read the matched ow - `{{ entrypoint_hint }}` - `{{ subsystem_hint }}` -- `tests/` — regression and contract checks +- `tests/` — regression and contract checks when present ## Workflow Sources Of Truth @@ -23,31 +23,31 @@ At a new session or material context recovery, follow the installed documentatio ## Task Routes -| `documentation` | discovery, writing, documented behavior/path changes, or restructuring | installed documentation reference and existing local writing owners | affected content, navigation, and exact restructuring approval | +- `documentation` — For discovery, writing, behavior or path changes, and restructuring, follow the installed documentation reference and local writing owners. Check affected content and navigation, and obtain exact approval for restructuring. -| `workflow-updates` | stable skill updates and target release adoption | installed update and target-upgrade references | verified native installation and reviewed target proposal | +- `workflow-updates` — For stable skill updates and target adoption, follow the installed update and target-upgrade references. Verify native installation and review the target proposal. -| `execution-context` | host or capability uncertainty | installed platform reference | resolve uncertainty; reuse established session facts | +- `execution-context` — Resolve host or capability uncertainty through the installed platform reference. Reuse established session facts. -| `scope-decision` | material clarification or additional authorization | installed question policy | ask only for an unresolved material choice or permission | +- `scope-decision` — Check material choices and additional permissions against the installed question policy. -| `task-handoff` | delegation, context recovery, execution handoff, or large transient evidence | installed orchestration and planning references | self-contained scope, durable state, accessible evidence, and root acceptance | +- `task-handoff` — For delegation, recovery, handoff, or large outputs, follow the installed orchestration and planning references. Check the handoff scope, evidence access, durable state and root acceptance. -| `planning` | plan, backlog, closure, or default/custom workflow-state archive | installed planning reference | `lint:plan-lifecycle` | +- `planning` — For plans, backlog, archives and closure, follow the installed planning reference and run `lint:plan-lifecycle`. -| `workflow-instructions` | instruction owner, route, or incident change | instruction lifecycle and project principles | `lint:instruction-contract` | +- `workflow-instructions` — For changes to instruction owners, routes or incidents, follow the instruction lifecycle and project principles. Run `lint:instruction-contract`. -| `repository-change` | every repository-changing task, alongside specialized routes | project principles and its domain-owner links | repository-specific gates | +- `repository-change` — For every repository change, apply the project principles and the gates named by the relevant domain owners. -| `long-running-execution` | long-running local command, waiter, polling, or process cleanup | project principles and installed orchestration contract | completion-evidence review | +- `long-running-execution` — For long-running commands and process cleanup, follow the project principles and installed orchestration contract. Verify completion and cleanup of task-owned processes. ## Route Maintenance diff --git a/skill/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl b/skill/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl index cf3fd20..97bbe0a 100644 --- a/skill/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl +++ b/skill/engineering-workflow/assets/templates/indexes/archive_plans_README.md.tmpl @@ -1,6 +1,6 @@ # Archived Plans -This file indexes future-useful closed plans. Active execution state remains in `/PLANS.md`. +This file indexes closed plans retained for future use. Active execution state remains in `PLANS.md` at the repository root. {{ entries }} diff --git a/skill/engineering-workflow/references/model_profiles.md b/skill/engineering-workflow/references/model_profiles.md index d936464..b51281e 100644 --- a/skill/engineering-workflow/references/model_profiles.md +++ b/skill/engineering-workflow/references/model_profiles.md @@ -6,12 +6,13 @@ Choose a model only after the task-shape route calls for semantic work. Determin ## Source Snapshot -Verified against current official guidance on 2026-09-23: +Verified against current official guidance on 2026-11-17: - `https://developers.openai.com/api/docs/models` - `https://developers.openai.com/api/docs/guides/latest-model` - `https://learn.chatgpt.com/docs/models` - `https://learn.chatgpt.com/docs/agent-configuration/subagents` +- `https://learn.chatgpt.com/docs/pricing#token-rates` Revalidate this mapping when supported Codex models or reasoning levels change. @@ -27,27 +28,27 @@ Revalidate this mapping when supported Codex models or reasoning levels change. ### `explorer` -- model: `gpt-6-sol` +- model: `gpt-6.2-sol` - `model_reasoning_effort`: `low` or `medium` - `sandbox_mode`: `read-only` - use bounded path scope and distilled evidence ### `standard` -- model: `gpt-6-sol` +- model: `gpt-6.2-sol` - `model_reasoning_effort`: `medium` - use the minimum sandbox needed by the bounded work ### `review` -- model: `gpt-6-sol` +- model: `gpt-6.2-sol` - `model_reasoning_effort`: `medium` - normally use `sandbox_mode: read-only` -- use `high` on Sol when review complexity warrants it; consider `gpt-6-astra` with `high` effort for high-consequence correctness or security review under the confirmation rule below; use `xhigh` only after representative evaluation shows a material quality gain +- use `high` on Sol when review complexity warrants it. Consider `gpt-6.2-astra` at `high` for high-consequence review under the confirmation rule below. Use `xhigh` only after representative evaluation shows a material quality gain. ### `exceptional_quality` -- use `gpt-6-astra` with `high` effort for unusually difficult, high-consequence semantic work when the user requests it or confirms a proposed escalation; keep a selected supported user-pinned model +- use `gpt-6.2-astra` with `high` effort for unusually difficult, high-consequence semantic work when the user requests it or confirms a proposed escalation. Keep a selected supported user-pinned model. - consider `max`, `ultra`, or API pro mode only for difficult quality-first work with measurable acceptance criteria and high error cost - compare against the cheaper baseline instead of assuming maximum reasoning wins @@ -55,13 +56,13 @@ Before selecting Astra for a new worker or changing a saved profile from Sol/Lun ## API And Codex Boundary -When migrating a profile to a GPT-6 model, preserve its effective supported reasoning effort unless deliberately changing the task profile after evaluation. Astra does not support `none`; use `low` as the initial evaluated baseline. Sol and Luna support `none`. If an older profile used `minimal`, start with `low` and compare representative tasks. Standard and routine review default to `medium`; higher review effort requires a task-specific reason. +When migrating to GPT-6.2 Sol or Astra, preserve the effective supported reasoning effort. Use `low` when migrating from `none` or when an older profile used `minimal`, then compare representative tasks. Both GPT-6.2 models expose `low` through `max` in the API. Codex may also expose `ultra`. Check the active Codex client for model availability and effort values, including for Luna. -Keep `gpt-5.6-terra` as an explicit compatibility fallback for a utility or explorer profile when its GPT-6 recommendation is unavailable in the active Codex client, or when representative evaluation favors the existing profile. Retain the role's `low` or `medium` effort and read-only boundary. This is a deliberate profile choice, not automatic retry or a silent replacement of a user pin. The published API token prices do not make Terra cheaper than Luna for utility work or Sol for explorer work; Codex subscription usage should be assessed in its own environment. +Use `gpt-6.1-sol` as the explicit compatibility choice for a Sol role when 6.2 Sol is unavailable and the active host offers 6.1 Sol. Keep the role's effort and permissions. Use `gpt-6.1-terra` for visual understanding or computer use when the task needs those capabilities and the host offers them. Keep Luna for bounded utility work. An available `gpt-5.6-terra` remains a compatibility choice for established utility or explorer profiles. Preserve user pins and select compatibility models before execution. -In the Responses API, pro is a reasoning mode selected with `reasoning.mode: "pro"`; it is not a separate model slug. Persisted reasoning and Programmatic Tool Calling are also API features. +GPT-6.2 Sol and GPT-6.1 Sol have the same standard API token prices. For Codex, evaluate actual usage and time to an accepted result. Model availability can depend on client, plan and workspace policy. -Do not write API-only fields into Codex custom-agent TOML unless current Codex documentation explicitly adds support. This includes async tool flags, steering events, and `configuration_update` items. Never represent pro mode by inventing a separate model slug. +For GPT-6.2 API tool calling, use Responses. In Responses, pro is a reasoning mode selected with `reasoning.mode: "pro"` where supported. Use only supported native Codex fields in custom-agent TOML. Keep API tool flags, steering events and `configuration_update` items in the API integration. ## Maintenance Rules diff --git a/skill/engineering-workflow/references/target_workflow_upgrade.md b/skill/engineering-workflow/references/target_workflow_upgrade.md index 630f197..f5179a0 100644 --- a/skill/engineering-workflow/references/target_workflow_upgrade.md +++ b/skill/engineering-workflow/references/target_workflow_upgrade.md @@ -48,6 +48,7 @@ The user may explicitly request report-only behavior; then invoke `--plan`. Code - `--prompt` - `--target-version` - `--include-agent-config` +- `--available-codex-model` (repeatable, verified on the target Codex host) - `--include-claude-agent-config` - `--reviewed-change` (repeatable agent-reviewed adoption ID) - `--approve-privacy-review` @@ -192,6 +193,15 @@ When `--include-agent-config` is present or the target's valid workflow state re - replace an existing agent file only when its complete bytes match the registered prior generated template; preserve every customized model pin and instruction - show the exact config diff +The plan report lists `required_codex_models` for generated agent files it +would create or refresh. Verify those models and their prescribed effort in +the target Codex client. Pass each verified slug via `--available-codex-model` +when applying. The flag supplies a host observation and retains the separate +configuration opt-in. If a required model is unavailable or cannot be +verified, apply returns `codex_model_availability_required` and preserves the +target. Keep the current profiles and use the report to explain the limitation. +An upgrade with no generated agent changes requires no model availability probe. + Never place Responses API-only fields in Codex TOML. ## Claude Code Configuration diff --git a/skill/engineering-workflow/scripts/upgrade_target_workflow.py b/skill/engineering-workflow/scripts/upgrade_target_workflow.py index 6834379..2539b80 100644 --- a/skill/engineering-workflow/scripts/upgrade_target_workflow.py +++ b/skill/engineering-workflow/scripts/upgrade_target_workflow.py @@ -104,11 +104,20 @@ }, } -# Exact agent-template bytes shipped in 0.9.7. No customized target file is rewritten. +# Exact agent-template bytes shipped in 0.9.7 and 0.9.8 through 0.10.0. PRIOR_AGENT_TEMPLATE_HASHES = { - "utility": "2f32f34a8c23d66c037abd0d1466f1eebc41ee52fd5e1e422470b7fbead4c210", - "explorer": "cf28d059b8bc28123a038d2f4c40fe24fe45e5623d2ee73c0e2b81f0a1d381b4", - "reviewer": "6182122fcec3d18b14acdabb644b750e58c5d2264d8b7a68eaf54644ef6db133", + "utility": { + "2f32f34a8c23d66c037abd0d1466f1eebc41ee52fd5e1e422470b7fbead4c210", + "40431d11ff23ef2a295d5f4e6a4303c99d43af79ddc052cf1003a896c2faf1ed", + }, + "explorer": { + "cf28d059b8bc28123a038d2f4c40fe24fe45e5623d2ee73c0e2b81f0a1d381b4", + "d3809be66e50a4c594b865921f438c3ebfc4595529fcd5c35a14a56ac047aeb7", + }, + "reviewer": { + "6182122fcec3d18b14acdabb644b750e58c5d2264d8b7a68eaf54644ef6db133", + "e9490fb1a0857e4eb86cd71d7e6bc472336a21efb56f8b7f9b257713fc3c1b4c", + }, } PRIOR_CLAUDE_AGENT_TEMPLATE_HASHES = { "workflow-utility": {"8203a37549a6face81c6db37678752a4d237876e8cf3d269a7b606aa4709cbdb"}, @@ -126,7 +135,11 @@ def _is_pristine_legacy(relative: str, text: str) -> bool: def _is_pristine_prior_agent(name: str, text: str) -> bool: - return _content_hash(text) == PRIOR_AGENT_TEMPLATE_HASHES[name] + return _content_hash(text) in PRIOR_AGENT_TEMPLATE_HASHES[name] + + +def _codex_agent_template(name: str) -> str: + return (AGENT_TEMPLATE_ROOT / f"{name}.toml.tmpl").read_text(encoding="utf-8") def _is_pristine_prior_claude_agent(name: str, text: str) -> bool: @@ -543,7 +556,7 @@ def rmdir(self, relative: str) -> None: os.close(parent) -def _read(path: Path) -> str: +def _read(path: Path, *, exact: bool = False) -> str: if path.is_symlink(): try: return os.readlink(path) @@ -552,7 +565,7 @@ def _read(path: Path) -> str: if any(parent.is_symlink() for parent in path.parents): return "" try: - return path.read_text(encoding="utf-8") + return path.read_bytes().decode("utf-8") if exact else path.read_text(encoding="utf-8") except (OSError, UnicodeDecodeError): return "" @@ -931,10 +944,12 @@ def _proposed_changes( changes.append( {"path": path, "action": "create", "reason": "explicit optional agent configuration request"} ) - elif _is_pristine_prior_agent(name, _read(root / path)): - changes.append( - {"path": path, "action": "update", "reason": "known pristine prior agent template fingerprint"} - ) + else: + existing = _read(root / path, exact=True) + if existing != _codex_agent_template(name) and _is_pristine_prior_agent(name, existing): + changes.append( + {"path": path, "action": "update", "reason": "known pristine prior agent template fingerprint"} + ) if include_claude_agent_config: for name in CLAUDE_AGENT_NAMES: path = f".claude/agents/{name}.md" @@ -1064,6 +1079,13 @@ def build_migration_report( elif finding.get("requires_decision") == "true": questions.append(f"Which source should own the contradictory planning rule in {finding['path']}?") proposed = _proposed_changes(root, include_agent_config, include_claude_agent_config) + required_codex_models = sorted( + { + tomllib.loads(_codex_agent_template(Path(change["path"]).stem))["model"] + for change in proposed + if change["path"].startswith(".codex/agents/") + } + ) try: documentation_writes = ( planned_documentation_index_writes(root) if _semver_tuple(target_version) >= (0, 10, 0) else {} @@ -1146,6 +1168,7 @@ def build_migration_report( "privacy_findings": privacy_findings, "privacy_review": privacy_review, "proposed_changes": proposed, + "required_codex_models": required_codex_models, "untouched_files": sorted(path for path in protected if path not in touched), "required_user_questions": questions, "validation_plan": [ @@ -1562,6 +1585,8 @@ def apply_migration( approved_privacy_review: str | None = None, include_claude_agent_config: bool = False, reviewed_change_ids: list[str] | None = None, + *, + available_codex_models: tuple[str, ...] = (), ) -> dict[str, Any]: root = repo.resolve() expected_root_identity = _directory_identity(root) @@ -1608,6 +1633,17 @@ def apply_migration( } if not report["success"]: return {**report, "success": False, "mode": "apply", "update_status": "conflict", "mutation_log": []} + missing_models = sorted(set(report["required_codex_models"]).difference(available_codex_models)) + if missing_models: + return { + **report, + "success": False, + "mode": "apply", + "update_status": "codex_model_availability_required", + "agent_action": "verify_codex_models", + "unverified_codex_models": missing_models, + "mutation_log": [], + } if _already_current(report, include_agent_config, root): return _already_current_result(report, mode="apply") @@ -1721,11 +1757,16 @@ def write(relative: str, text: str) -> None: for name in ("utility", "explorer", "reviewer"): relative = f".codex/agents/{name}.toml" existing_agent = read(relative) - if not existing_agent or _is_pristine_prior_agent(name, existing_agent): - write( - relative, - (AGENT_TEMPLATE_ROOT / f"{name}.toml.tmpl").read_text(encoding="utf-8"), - ) + template = _codex_agent_template(name) + if not secure.exists(relative) or ( + existing_agent != template and _is_pristine_prior_agent(name, existing_agent) + ): + model = tomllib.loads(template)["model"] + if model not in available_codex_models: + raise MigrationConflict( + "codex_model_availability_required", f"Model availability is unverified: {model}" + ) + write(relative, template) if include_claude_agent_config: for name in CLAUDE_AGENT_NAMES: @@ -1924,6 +1965,8 @@ def execute_prompt_upgrade( approved_privacy_review: str | None = None, include_claude_agent_config: bool = False, reviewed_change_ids: list[str] | None = None, + *, + available_codex_models: tuple[str, ...] = (), ) -> dict[str, Any]: """Run report-first migration for an authorized natural-language target-upgrade request.""" report = build_migration_report( @@ -2034,6 +2077,7 @@ def execute_prompt_upgrade( approved_privacy_review, include_claude_agent_config, reviewed_change_ids, + available_codex_models=available_codex_models, ) if applied.get("update_status") == "question_required": agent_action = "ask_targeted_question" @@ -2043,6 +2087,8 @@ def execute_prompt_upgrade( if applied.get("privacy_review", {}).get("status") in {"approval_required", "token_mismatch"} else "report_privacy_findings" ) + elif applied.get("update_status") == "codex_model_availability_required": + agent_action = "verify_codex_models" elif applied.get("success"): agent_action = "complete_and_validate" else: @@ -2067,9 +2113,15 @@ def main() -> int: mode.add_argument("--plan", action="store_true") mode.add_argument("--apply", action="store_true") mode.add_argument("--prompt", action="store_true") - parser.add_argument("--target-version", default="0.10.0") + parser.add_argument("--target-version", default="0.11.0") parser.add_argument("--reviewed-change", action="append", default=[]) parser.add_argument("--include-agent-config", action="store_true") + parser.add_argument( + "--available-codex-model", + action="append", + default=[], + help="Report a model and prescribed effort verified on the target Codex host. Repeat for each model.", + ) parser.add_argument("--include-claude-agent-config", action="store_true") parser.add_argument( "--approve-privacy-review", @@ -2087,6 +2139,7 @@ def main() -> int: args.approve_privacy_review, args.include_claude_agent_config, args.reviewed_change, + available_codex_models=tuple(args.available_codex_model), ) elif args.apply: result = apply_migration( @@ -2096,6 +2149,7 @@ def main() -> int: args.approve_privacy_review, args.include_claude_agent_config, args.reviewed_change, + available_codex_models=tuple(args.available_codex_model), ) else: result = build_migration_report( @@ -2113,6 +2167,10 @@ def main() -> int: print(json.dumps(result, indent=2, sort_keys=True)) else: print(f"{result.get('mode')}: {'ok' if result.get('success') else 'failed'}") + if result.get("required_codex_models"): + print("Required Codex models: " + ", ".join(result["required_codex_models"])) + if result.get("unverified_codex_models"): + print("Unverified Codex models: " + ", ".join(result["unverified_codex_models"])) for item in result.get("proposed_changes", []): print(f"{item['action']}: {item['path']}") return 0 if result.get("success") else 1 diff --git a/skill/engineering-workflow/scripts/validate_skill_repo.py b/skill/engineering-workflow/scripts/validate_skill_repo.py index a382f86..f616bac 100644 --- a/skill/engineering-workflow/scripts/validate_skill_repo.py +++ b/skill/engineering-workflow/scripts/validate_skill_repo.py @@ -531,12 +531,12 @@ def _validate_agent_profiles(repo_root: Path) -> list[str]: if utility.get("sandbox_mode") != "read-only": issues.append("Utility agent must remain read-only") explorer = parsed.get("explorer", {}) - if explorer.get("model") != "gpt-" + "6-sol" or explorer.get("model_reasoning_effort") != "medium": + if explorer.get("model") != "gpt-" + "6.2-sol" or explorer.get("model_reasoning_effort") != "medium": issues.append("Explorer agent must use the current balanced read-heavy profile") if explorer.get("sandbox_mode") != "read-only": issues.append("Explorer agent must remain read-only") reviewer = parsed.get("reviewer", {}) - if reviewer.get("model") != "gpt-" + "6-sol": + if reviewer.get("model") != "gpt-" + "6.2-sol": issues.append("Reviewer agent must use the current Codex review model profile") if reviewer.get("model_reasoning_effort") != "medium" or reviewer.get("sandbox_mode") != "read-only": issues.append("Reviewer agent must use medium reasoning in read-only mode") diff --git a/tests/fixtures/legacy_instructions/AGENTS_0_9_6.md.tmpl b/tests/fixtures/legacy_instructions/AGENTS_0_9_6.md.tmpl new file mode 100644 index 0000000..35d9da4 --- /dev/null +++ b/tests/fixtures/legacy_instructions/AGENTS_0_9_6.md.tmpl @@ -0,0 +1,46 @@ +# Agent Instructions + +instruction_contract_version: 3 + +Use this file as a short route map, not as a project manual. Read the matched owners before changing the routed path and run the named guards before closure. All matching routes apply, including the general repository-change route for specialized changes, but one current owner or unchanged-state guard is not repeated merely because several routes reference it. + +## Repo Map + +- `{{ entrypoint_hint }}` +- `{{ subsystem_hint }}` +- `tests/` — regression and contract checks + +## Workflow Sources Of Truth + +- `PLANS.md` — full active plans and durable recent outcomes; follow plan schema version 2 from the installed `engineering-workflow` planning reference. +- `docs/codex/TASKS_BACKLOG.md` — inactive future work. +- `docs/engineering/project_principles.md` — stable cross-cutting rules and ownership boundaries. +- `docs/codex/AGENT_EXECUTION_PITFALLS.md` — non-normative incident classes and evidence links. +- `docs/codex/ENGINEERING_WORKFLOW_STATE.yaml` — workflow ownership and applied-version record. + +## Task Routes + + +| `execution-context` | host or capability uncertainty | installed platform reference | resolve uncertainty; reuse established session facts | + + +| `scope-decision` | material clarification or additional authorization | installed question policy | ask only for an unresolved material choice or permission | + + +| `task-handoff` | delegation, context recovery, execution handoff, or large transient evidence | installed orchestration and planning references | self-contained scope, durable state, accessible evidence, and root acceptance | + + +| `planning` | plan, backlog, closure, or default/custom workflow-state archive | installed planning reference | `lint:plan-lifecycle` | + + +| `workflow-instructions` | instruction owner, route, or incident change | instruction lifecycle and project principles | `lint:instruction-contract` | + + +| `repository-change` | every repository-changing task, alongside specialized routes | project principles and its domain-owner links | repository-specific gates | + + +| `long-running-execution` | long-running local command, waiter, polling, or process cleanup | project principles and installed orchestration contract | completion-evidence review | + +## Route Maintenance + +Add a route when a domain owner cannot otherwise be discovered from the changed path. Keep normative requirements in the owner and keep incident history in the catalog. diff --git a/tests/test_agent_orchestration.py b/tests/test_agent_orchestration.py index 75597b1..35a3e28 100644 --- a/tests/test_agent_orchestration.py +++ b/tests/test_agent_orchestration.py @@ -117,9 +117,9 @@ def test_optional_profiles_use_expected_safety_defaults(self): self.assertEqual(utility["model_reasoning_effort"], "low") self.assertEqual(utility["sandbox_mode"], "read-only") self.assertEqual(explorer["sandbox_mode"], "read-only") - self.assertEqual(explorer["model"], "gpt-" + "6-sol") + self.assertEqual(explorer["model"], "gpt-" + "6.2-sol") self.assertEqual(explorer["model_reasoning_effort"], "medium") - self.assertEqual(reviewer["model"], "gpt-" + "6-sol") + self.assertEqual(reviewer["model"], "gpt-" + "6.2-sol") self.assertEqual(reviewer["model_reasoning_effort"], "medium") self.assertEqual(reviewer["sandbox_mode"], "read-only") for profile in (utility, explorer, reviewer): diff --git a/tests/test_claude_agent_upgrade.py b/tests/test_claude_agent_upgrade.py index 406eb4f..dd38fe9 100644 --- a/tests/test_claude_agent_upgrade.py +++ b/tests/test_claude_agent_upgrade.py @@ -24,7 +24,9 @@ def test_codex_opt_in_does_not_install_claude_agents(self): settings.parent.mkdir(parents=True) settings.write_text('{"model":"team-owned"}\n', encoding="utf-8") - result = migrator.apply_migration(root, "0.9.10", include_agent_config=True) + result = migrator.apply_migration( + root, "0.9.10", include_agent_config=True, available_codex_models=("gpt-6-luna", "gpt-6.2-sol") + ) self.assertTrue(result["success"], result) self.assertFalse(result["include_claude_agent_config"]) diff --git a/tests/test_marketplace_package.py b/tests/test_marketplace_package.py index f19d6d3..348ac10 100644 --- a/tests/test_marketplace_package.py +++ b/tests/test_marketplace_package.py @@ -30,7 +30,7 @@ def test_repository_package_matches_deterministic_builder(self): result = json.loads(completed.stdout) self.assertEqual(completed.returncode, 0, completed.stderr) self.assertTrue(result["success"], result) - self.assertEqual(result["version"], "0.10.0") + self.assertEqual(result["version"], "0.11.0") self.assertEqual(result["drift"], []) def test_check_detects_packaged_skill_byte_drift(self): @@ -111,7 +111,7 @@ def test_manifests_declare_only_self_contained_skill_capability(self): (REPO_ROOT / "plugins/engineering-workflow/.claude-plugin/plugin.json").read_text(encoding="utf-8") ) for manifest in (codex, claude): - self.assertEqual(manifest["version"], "0.10.0") + self.assertEqual(manifest["version"], "0.11.0") self.assertEqual(manifest["repository"], builder.REPOSITORY_URL) self.assertNotIn("mcpServers", manifest) self.assertNotIn("apps", manifest) diff --git a/tests/test_release_adoption_upgrade.py b/tests/test_release_adoption_upgrade.py index 0e22609..8a95e11 100644 --- a/tests/test_release_adoption_upgrade.py +++ b/tests/test_release_adoption_upgrade.py @@ -17,13 +17,14 @@ def test_generated_target_adopts_all_current_capabilities_and_is_idempotent(self with tempfile.TemporaryDirectory() as tmp: root = Path(tmp) make_target(root) - result = migrator.execute_prompt_upgrade(root, "0.10.0") + active_release = adoption.load_descriptor()["skill_version"] + result = migrator.execute_prompt_upgrade(root, active_release) self.assertTrue(result["success"], result) state = (root / migrator.STATE_MANIFEST_PATH).read_text() for change in adoption.load_descriptor()["changes"]: self.assertIn(change["id"], state) before = snapshot(root) - current = migrator.execute_prompt_upgrade(root, "0.10.0") + current = migrator.execute_prompt_upgrade(root, active_release) self.assertEqual(current["update_status"], "already_current", current) self.assertEqual(snapshot(root), before) diff --git a/tests/test_skill_repo_validation.py b/tests/test_skill_repo_validation.py index e43afaf..29f4ebf 100644 --- a/tests/test_skill_repo_validation.py +++ b/tests/test_skill_repo_validation.py @@ -13,7 +13,7 @@ validate_skill_repo = load_script_module("validate_skill_repo") REPO_ROOT = Path(__file__).resolve().parents[1] -CURRENT_VERSION = "0.10.0" +CURRENT_VERSION = "0.11.0" class SkillRepoValidationTests(unittest.TestCase): @@ -58,7 +58,7 @@ def test_release_adoption_descriptor_must_match_active_version(self): self._copy_repo_subset(root) path = root / "skill/engineering-workflow/assets/release_adoption.json" descriptor = json.loads(path.read_text()) - descriptor["skill_version"] = "0.11.0" + descriptor["skill_version"] = "0.12.0" path.write_text(json.dumps(descriptor)) result = validate_skill_repo.validate_skill_repo(root) self.assertFalse(result["success"]) @@ -259,7 +259,7 @@ def test_profile_drift_and_unsupported_reviewer_effort_are_rejected(self): reviewer = agents / "reviewer.toml.tmpl" original = reviewer.read_text(encoding="utf-8") variants = ( - original.replace("gpt-" + "6-sol", "gpt-" + "5.6-terra"), + original.replace("gpt-" + "6.2-sol", "gpt-" + "5.6-terra"), original.replace('model_reasoning_effort = "medium"', 'model_reasoning_effort = "none"'), original.replace('model_reasoning_effort = "medium"', 'model_reasoning_effort = "minimal"'), ) @@ -404,8 +404,8 @@ def test_ci_uses_bounded_full_gate_with_bytecode_disabled(self): def test_ci_actions_use_node24_majors(self): workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(encoding="utf-8") - self.assertIn("actions/checkout@v6", workflow) - self.assertIn("actions/setup-python@v6", workflow) + self.assertIn("actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1", workflow) + self.assertIn("actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0", workflow) self.assertNotIn("actions/checkout@v4", workflow) self.assertNotIn("actions/setup-python@v5", workflow) diff --git a/tests/test_update_installed_skill.py b/tests/test_update_installed_skill.py index 5fbf223..fdc687d 100644 --- a/tests/test_update_installed_skill.py +++ b/tests/test_update_installed_skill.py @@ -45,6 +45,10 @@ def write_candidate(repo: Path, version: str, name: str = "engineering-workflow" local_descriptor = Path(updater.__file__).resolve().parents[1] / "assets" / "release_adoption.json" descriptor = json.loads(local_descriptor.read_text()) descriptor["skill_version"] = version + descriptor["changes"] = [ + change for change in descriptor["changes"] + if updater._semver_key(change["introduced_in"]) <= updater._semver_key(version) + ] (skill / "assets" / "release_adoption.json").write_text(json.dumps(descriptor)) (skill / "references" / "documentation_navigation.md").write_text("Fixture navigation contract\n") for name in ("documentation_navigation", "documentation_restructure", "release_adoption", "workflow_updates"): diff --git a/tests/test_upgrade_target_workflow.py b/tests/test_upgrade_target_workflow.py index bd84b01..aecf82d 100644 --- a/tests/test_upgrade_target_workflow.py +++ b/tests/test_upgrade_target_workflow.py @@ -17,6 +17,33 @@ migrator = load_script_module("upgrade_target_workflow") lifecycle = load_script_module("plan_lifecycle") LEGACY_INSTRUCTIONS = Path(__file__).resolve().parent / "fixtures/legacy_instructions" +AVAILABLE_CODEX_MODELS = ("gpt-6-luna", "gpt-6.2-sol") +PRIOR_CODEX_INSTRUCTIONS = { + "utility": ( + "Use only the bounded self-contained packet and accessible inputs supplied by the root. " + "Do not expand scope, write shared state, spawn child agents, or retry more than once. " + "Return compact status, findings, checks, blockers, accessible evidence paths, needs_escalation, " + "and the stopping condition; report an inaccessible required input instead of guessing." + ), + "reviewer": ( + "Review only the bounded self-contained change packet and accessible evidence supplied by the root " + "without modifying shared state. Return compact status, findings with severity and confidence, " + "evidence paths, checks, blockers, assumptions, and a stopping or escalation condition; " + "report missing required context rather than inferring it." + ), +} + + +def released_codex_agent(role: str) -> str: + text = (migrator.AGENT_TEMPLATE_ROOT / f"{role}.toml.tmpl").read_text(encoding="utf-8") + if role in PRIOR_CODEX_INSTRUCTIONS: + text = "\n".join( + f'developer_instructions = "{PRIOR_CODEX_INSTRUCTIONS[role]}"' + if line.startswith("developer_instructions = ") + else line + for line in text.split("\n") + ) + return text.replace('model = "gpt-6.2-sol"', 'model = "gpt-6-sol"') def make_target(root: Path) -> None: @@ -36,14 +63,12 @@ def snapshot(root: Path) -> dict[str, bytes]: return {path.relative_to(root).as_posix(): path.read_bytes() for path in root.rglob("*") if path.is_file()} -def prior_router(current: str) -> str: - """Keep historical fingerprint fixtures independent of newly added router sections.""" - start = current.index("\nAt a new session or material context recovery,") - end = current.index("\n## Task Routes", start) - current = current[:start] + current[end:] - start = current.index('