Repository navigation
docs(agents): document per-harness model values workarounds - #3645
Daniel Meppiel (danielmeppiel) merged 3 commits into
Conversation
Agent files and model ids belong to each harness vendor; APM writes model verbatim and adds no per-target map. Document the three workarounds from the #3324 maintainer decision. Refs #3324 Co-authored-by: Copilot App <[email protected]>
|
Maintainer decision (Daniel Meppiel (@danielmeppiel), 2026-11-12): approve for merge. This documents the workarounds named in the #3324 decision: per-target Posted with AI assistance on behalf of Daniel Meppiel (@danielmeppiel). |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for this documentation-only clarification of harness-specific model handling and available workarounds.
No open issues 🎉
What changed in this PR
Documents the #3324 decision to leave model identifiers under harness-vendor control, with matching guidance in the authoring docs and bundled apm-usage guide. This is a documentation-only change.
Changes:
- Clarifies that APM preserves
modelvalues verbatim without per-target overrides, while the Codex warning remains tracked in #3477. - Lists three workarounds: omit
model, split packages by target, or rewrite generated output through lifecycle scripts, including the audit-drift caveat. - Directs requests for a portable solution upstream to Claude Code or Codex.
| File | Description |
|---|---|
packages/apm-guide/.apm/skills/apm-usage/package-authoring.md |
Adds per-harness model guidance and workarounds to the bundled authoring guide. |
docs/src/content/docs/producer/author-primitives/instructions-and-agents.md |
Adds matching guidance with links to lifecycle documentation and upstream issue trackers. |
Review effort: Balanced
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Doc Writer | 0 | 3 | 0 | Accurate on the #3324 decision and matches the page voice. Two fixes: limit 'verbatim to every target' to targets that get agent files, and say the lifecycle script runs in the consuming project. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 2 follow-ups
- [Doc Writer] Tighten 'every target' to 'every target that receives agent files' in both the docs page and the apm-guide copy. -- The page's preceding paragraphs say Windsurf/Gemini receive no agent files and Codex drops non-string model values; the fix is a single clause in two files.
- [Doc Writer] Clarify that workaround 3's lifecycle script lives in the consuming project's apm.yml (trusted via
apm lifecycle trust), not in the dependency package. -- lifecycle-scripts.md defines three tiers, none of which let a dependency ship executable hooks.
Recommendation
Merge after folding the two accepted doc-writer edits (tighten the 'every target' qualifier, clarify lifecycle-script location). Both are single-clause fixes in two files. Track #3477 (Codex warning for Claude-specific model values) separately. The merge worker folds both into this PR next.
Full per-persona findings
Doc Writer
- [recommended] 'APM writes model verbatim to every target' contradicts the paragraphs just above it. at
docs/src/content/docs/producer/author-primitives/instructions-and-agents.md:235
The same page says Windsurf and Gemini do not receive .agent.md files at all, and that Codex drops non-string model values with a warning.
Suggested: APM writes a stringmodelvalue verbatim to every target that receives agent files, so a Claude alias such assonnetalso lands in the Codex TOML. Same fix in the apm-guide copy. - [recommended] Workaround 3 does not say the lifecycle script lives in the consuming project and needs trust, not in the package. at
docs/src/content/docs/producer/author-primitives/instructions-and-agents.md:247
lifecycle-scripts.md defines scripts only in the project apm.yml, the user ~/.apm/apm.yml, or the admin policy.d directory; project scripts do not run untilapm lifecycle trust.
Suggested: Apost-install/post-updatelifecycle script in the consuming project (trusted withapm lifecycle trust) that setsmodelin the generated.codex/agents/*.toml. - [recommended] 'no other tool could read it' is not the reason [FEATURE] Allow different
modelvalues per target in one.agent.md(Claude vs Codex) #3324 gives. atdocs/src/content/docs/producer/author-primitives/instructions-and-agents.md:240
Orchestrator fact-check: the [FEATURE] Allow differentmodelvalues per target in one.agent.md(Claude vs Codex) #3324 closing comment says "A per-target map would only work through APM, no other tool could read it"; the CEO did not take this finding.
Suggested: Delete ': no other tool could read it'.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.
The new per-harness model section said APM writes `model` verbatim to "every target", which contradicted the page's own target rules (Windsurf and Gemini receive no agent files; Codex drops non-string values). It also left workaround 3 ambiguous about where the lifecycle script lives: only the consuming project's apm.yml (trusted via `apm lifecycle trust`), user, or admin tiers can define one; a dependency package cannot. Addresses lean-panel doc-writer follow-ups 1 and 2 on #3645. Co-authored-by: Copilot App <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Doc Writer | 0 | 1 | 0 | Both follow-ups resolved accurately in both copies; no voice regressions. One optional anchor: lifecycle page does not state the dependency limit. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Recommendation
Both prior follow-ups are resolved and verified; the single new finding is optional, outside this PR's scope, and already implied by the lifecycle page's exhaustive tier list. The maintainer can merge once f3d6465 checks are green (they are; see CI below).
Folded in this run
- (panel: doc-writer) Scope "writes
modelverbatim to every target" to string values and targets that receive agent files, in both copies -- resolved in bd9af8b. - (panel: doc-writer) Say workaround 3's lifecycle script lives in the consuming project's apm.yml (trusted via
apm lifecycle trust), not a dependency -- resolved in bd9af8b. - (merge-worker) Append
Refs #3324and an explicitPartial:line to the PR body (append-only).
Copilot signals reviewed
- (overview review on 9ba394a) -- NOT-LEGIT as an action item: approval recommended with zero inline comments; nothing to fold. No new Copilot review on later pushes (drained).
Deferred (out-of-scope follow-ups)
- (panel: doc-writer) Optional sentence on enterprise/lifecycle-scripts.md stating dependencies cannot declare lifecycle scripts -- scope boundary: edits the enterprise lifecycle page outside this PR's two [FEATURE] Allow different
modelvalues per target in one.agent.md(Claude vs Codex) #3324 decision-record sections; claim already implied by the page's exhaustive tier list and confirmed in source.
Lint contract
ruff check and ruff format --check (ruff 0.15.12, CI paths) silent; pylint R0801 10.00/10; scripts/lint-auth-signals.sh clean; scripts/lint-architecture-boundaries.sh exit 0. Owner-touch gate: no canonical owner touched (docs-only). tests/unit/test_triage_advisory.py: 22 passed (apm-guide snapshot vs apm.lock.yaml).
CI
All 25 checks green at f3d6465 (incl. license/cla SUCCESS) (after 0 CI fix iteration(s)).
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #3645 | f3d6465 | ship_now | 2 | 2 | 1 | 2 | green | MERGEABLE | BLOCKED | pending required review |
Full per-persona findings
Doc Writer
- [recommended] The 'a dependency package cannot ship one' claim has no explicit source sentence in the linked lifecycle-scripts page at
docs/src/content/docs/enterprise/lifecycle-scripts.md:231
The Trust model lists three script sources (policy, user, project) but never says lifecycle: blocks in dependency packages are ignored.
Suggested: Optional: add "Only the consuming project's apm.yml can declare a lifecycle: block; APM does not run lifecycle: blocks from dependency packages." Otherwise keep the two current clauses as they are.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.
Clean merge of eight main commits (#3408, #2231, #2602, #3640, #3611, #3645, #3602, #3646); no lockfile or autopilot package conflicts and apm audit --ci passes with no drift. Co-authored-by: sergio-sisternes-epam <[email protected]> Co-authored-by: Copilot App <[email protected]>
Description
TL;DR — Adds a short Per-harness model values note to the agents authoring page and the
apm-usagepackage-authoring guide. It records the #3324 maintainer decision: APM writesmodel:verbatim, adds no per-target model map, and lists the three supported workarounds plus the upstream path.Problem (WHY)
.agent.md; a Claude alias such asmodel: sonnetlands verbatim in.codex/agents/<name>.toml, which Codex rejects.modelvalues per target in one.agent.md(Claude vs Codex) #3324 asked for a per-targetmodelmap orcodex:override; it was closed as not planned because agent files and model ids belong to each harness vendor. Users had no doc telling them what to do instead.Approach (WHAT) — additive docs only:
docs/src/content/docs/producer/author-primitives/instructions-and-agents.md### Per-harness model valuesunder Agents, before Body conventionspackages/apm-guide/.apm/skills/apm-usage/package-authoring.md#### Per-harness model valuesafter the Codex native-model-settings sectionContent in both: vendor ownership of agent files/model ids;
modelwritten verbatim; no per-target map orcodex:block; the three workarounds (omitmodel; split per target with a common package;post-install/post-updatelifecycle script with theapm audit --cidrift caveat, not recommended for CI-gated teams); raise it upstream with Claude Code or Codex.Trade-offs
modelvalues per target in one.agent.md(Claude vs Codex) #3324 closing comment says APM "warns when a Claude-specific value reaches Codex output (Codex agent compile copies Claude model aliases verbatim (model: opus->model = "opus") #3477)". That warning is approved scope but not yet onmain(Codex agent compile copies Claude model aliases verbatim (model: opus->model = "opus") #3477 is open). The docs say the warning "is tracked in Codex agent compile copies Claude model aliases verbatim (model: opus->model = "opus") #3477" so they stay truthful today; once Codex agent compile copies Claude model aliases verbatim (model: opus->model = "opus") #3477 lands, a follow-up can drop "tracked in".Issue and approved scope
Issue: Refs #3324
Human scope-approval comment: trivial-documentation standing preapproval — Daniel Meppiel (@danielmeppiel) on 2026-11-12, relayed by the coordinator session: "add a short 'Per-harness model values' note to the agents authoring docs + apm-usage package-authoring guide listing the three workarounds and the upstream rationale exactly as in #3324's closing comment; Refs #3324". Source decision: the maintainer closing comment on #3324.
Does this PR complete the issue, or what remains? #3324 is already closed as not planned; this PR documents that decision. Nothing remains for #3324. The Codex warning itself is #3477.
Type of change
Testing
Note
Local preflight skipped by maintainer instruction (2026-11-12); CI is the gate.
Validation evidence
apm-guideis not a locked local package inapm.lock.yaml, so nocontent_hashupdate was needed; the test above confirms all locked package snapshots still match.../../../enterprise/lifecycle-scripts/resolves todocs/src/content/docs/enterprise/lifecycle-scripts.md(same depth as the page's existing../../../concepts/...link).astro build+check-links.mjswas not run: no matchingdocs/node_modulesin this worktree. CI's docs build runs the link checker.How to test
modelvalues per target in one.agent.md(Claude vs Codex) #3324.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.
Co-authored-by: Copilot [email protected]
Refs #3324
Partial: docs for the #3324 decision (issue closed not planned)