Skip to content

docs(agents): document per-harness model values workarounds - #3645

Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-docs-per-harness-model-values
Nov 12, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-docs-per-harness-model-values

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

TL;DR — Adds a short Per-harness model values note to the agents authoring page and the apm-usage package-authoring guide. It records the #3324 maintainer decision: APM writes model: verbatim, adds no per-target model map, and lists the three supported workarounds plus the upstream path.

Problem (WHY)

Approach (WHAT) — additive docs only:

File Change
docs/src/content/docs/producer/author-primitives/instructions-and-agents.md New ### Per-harness model values under Agents, before Body conventions
packages/apm-guide/.apm/skills/apm-usage/package-authoring.md Matching #### Per-harness model values after the Codex native-model-settings section

Content in both: vendor ownership of agent files/model ids; model written verbatim; no per-target map or codex: block; the three workarounds (omit model; split per target with a common package; post-install / post-update lifecycle script with the apm audit --ci drift caveat, not recommended for CI-gated teams); raise it upstream with Claude Code or Codex.

Trade-offs

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

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Note

Local preflight skipped by maintainer instruction (2026-11-12); CI is the gate.

Validation evidence
$ PYTHONPATH=src python -m pytest tests/unit/test_triage_advisory.py::test_local_package_snapshots_match_lockfile -q -p no:xdist
.                                                                        [100%]
1 passed in 3.40s
  • apm-guide is not a locked local package in apm.lock.yaml, so no content_hash update was needed; the test above confirms all locked package snapshots still match.
  • Printable-ASCII check over both touched files: no characters above U+007E.
  • Relative link ../../../enterprise/lifecycle-scripts/ resolves to docs/src/content/docs/enterprise/lifecycle-scripts.md (same depth as the page's existing ../../../concepts/... link).
  • Local astro build + check-links.mjs was not run: no matching docs/node_modules in this worktree. CI's docs build runs the link checker.

How to test

Spec conformance (OpenAPM v0.1)

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C
    row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

Co-authored-by: Copilot [email protected]

Refs #3324
Partial: docs for the #3324 decision (issue closed not planned)

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]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (Daniel Meppiel (@danielmeppiel), 2026-11-12): approve for merge. This documents the workarounds named in the #3324 decision: per-target model values were declined because that format is vendor-owned. The workarounds are to omit model, split packages by target, or use a lifecycle script (with the audit-drift caveat). Documentation only; this comment is the scope decision for this PR.


Posted with AI assistance on behalf of Daniel Meppiel (@danielmeppiel).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 model values 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

@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_with_followups

Documents the #3324 not-planned decision with three workarounds for per-harness model values, keeping APM out of the vendor-alias business.

panel-mode=lean; personas=doc-writer,apm-ceo

cc Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Scope authority: maintainer decision comment #3645 (comment) (docs only; records the #3324 decision).

Panel signals converge cleanly. The doc-writer raised three recommended findings on a docs-only PR that faithfully records the #3324 closure and its workarounds. Two hold up; the third does not.

Finding 1 (verbatim-to-every-target wording) is accepted: the page already says Windsurf and Gemini receive no agent files and Codex drops non-string model values, so an unqualified "every target" contradicts it. Tighten in both copies.

Finding 2 (lifecycle-script location) is accepted: lifecycle-scripts.md defines only admin, user, and project tiers, and project scripts need apm lifecycle trust. One clause naming the consuming project removes the ambiguity.

Finding 3 (remove "no other tool could read it") is not taken: the clause echoes the #3324 maintainer closing comment nearly verbatim.

Dissent. The doc-writer's finding 3 was based on a grounding judgment the orchestrator overturned with a direct quote from #3324. The clause is sourced and stays.

Aligned with: Portable by manifest -- agent files belong to harness vendors, and a proprietary map would break portability for non-APM consumers. Multi-harness -- the workarounds give authors multi-harness strategies without APM taking sides. Pragmatic -- three concrete workarounds instead of a new config surface. Community-driven -- a closed-not-planned decision documented with issue links, rationale, and upstream pointers.

Panel summary

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

  1. [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.
  2. [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 string model value verbatim to every target that receives agent files, so a Claude alias such as sonnet also 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 until apm lifecycle trust.
    Suggested: A post-install / post-update lifecycle script in the consuming project (trusted with apm lifecycle trust) that sets model in the generated .codex/agents/*.toml.
  • [recommended] 'no other tool could read it' is not the reason [FEATURE] Allow different model values per target in one .agent.md (Claude vs Codex) #3324 gives. at docs/src/content/docs/producer/author-primitives/instructions-and-agents.md:240
    Orchestrator fact-check: the [FEATURE] Allow different model values 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]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_now

Docs-only PR recording the #3324 decision is clean after fold; both prior follow-ups resolved, no regressions.

panel-mode=delta; personas=doc-writer,apm-ceo

cc Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Scope authority: maintainer decision comment #3645 (comment) (docs only; records the #3324 decision). Closing reference: Refs #3324 plus Partial: docs for the #3324 decision (issue closed not planned) -- a deliberate partial, since #3324 is already closed not planned.

Material delta since the last advisory (6831266536): fold commit bd9af8b addressed both open follow-ups: (1) "every target" is now "every target that receives agent files" in both copies, and (2) workaround 3 now says the lifecycle script lives in the consuming project's apm.yml, trusted via apm lifecycle trust, and that a dependency package cannot ship one. The doc-writer delta confirms both edits are accurate with no voice regressions. The merge of main at f3d6465 touches neither PR file.

The single new finding is optional: lifecycle-scripts.md has no standalone sentence saying dependencies cannot ship lifecycle scripts. The orchestrator fact-check confirms the claim in source (src/apm_cli/core/lifecycle_scripts.py reads exactly three tiers, none at dependency scope), and the page's exhaustive three-tier list already implies it. Adding text to the enterprise lifecycle page widens this PR beyond the two decision-record sections; a separate docs sweep is the right vehicle if wanted.

The prior not-taken item (removing "no other tool could read it") stays not taken -- the clause quotes the #3324 decision.

Aligned with: Governed by policy -- the lifecycle-script trust boundary (project-only, never dependency) is now stated in both doc copies. Multi-harness -- per-harness model workarounds are documented with accurate scope.

Panel summary

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 model verbatim 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 #3324 and an explicit Partial: 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)

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.

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit da0dafe into main Nov 12, 2026
25 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-docs-per-harness-model-values branch November 12, 2026 18:47
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 12, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants