feat(agentic-shared-framework): resolve consumer apm.yml per gh-aw invocation via aw-resolve-apm-assets#1077
Open
fr4nc1sc0-r4m0n wants to merge 11 commits into
Open
feat(agentic-shared-framework): resolve consumer apm.yml per gh-aw invocation via aw-resolve-apm-assets#1077fr4nc1sc0-r4m0n wants to merge 11 commits into
fr4nc1sc0-r4m0n wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for resolving consumer-provided “agentic assets” from apm.yml (via x-oblt-aw) inside aw-prelude, then propagates the resolved instructions into downstream gh-aw-* workflow calls. This lets the control plane apply a platform baseline plus repo/workflow-specific overrides consistently across wrapper workflows.
Changes:
- Introduces
scripts/apm_agentic_assets.py+scripts/resolve_apm_agentic_assets.pyand unit tests to resolvex-oblt-awblocks (common vs per-workflow override) and merge platform inputs/instructions. - Extends
aw-prelude.ymlwith anapm-assetsjob to optionally runapm installand emitresolved-*outputs used by downstream jobs. - Updates multiple
oblt-aw-*anddocs-aw-*workflows to pass platform baselines through the prelude and consumeneeds.prelude.outputs.resolved-additional-instructions.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_apm_agentic_assets.py |
Adds unit tests covering asset-block selection, file inputs, and platform/APM merge behavior. |
scripts/apm_agentic_assets.py |
Core resolver: parses apm.yml, selects common vs workflow blocks, loads file-backed inputs, merges inputs, composes instructions. |
scripts/resolve_apm_agentic_assets.py |
CLI entrypoint for GitHub Actions to output resolved instructions/inputs/setup commands. |
scripts/validate_aw_workflow_prelude.py |
Excludes trg-* client templates from prelude enforcement. |
requirements-ci.txt |
Adds PyYAML for CI test execution. |
config/schema/apm-agentic-workflows.schema.json |
Defines JSON Schema for x-oblt-aw extension in apm.yml. |
docs/architecture/apm-agentic-assets.md |
Documents precedence/behavior and runtime flow through aw-prelude. |
docs/examples/consumer-apm.yml.example |
Provides a consumer-facing apm.yml example using x-oblt-aw. |
docs/architecture/overview.md |
Mentions APM asset resolution as part of the prelude. |
.github/workflows/aw-prelude.yml |
Adds platform-* inputs, apm-assets job, and new outputs (resolved-*, manifest/extension presence, asset source). |
.github/workflows/oblt-aw-security-triage.yml |
Moves baseline instructions into platform-additional-instructions; uses resolved-additional-instructions downstream. |
.github/workflows/oblt-aw-security-fixer.yml |
Same: baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-resource-not-accessible-by-integration-triage.yml |
Same: baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-resource-not-accessible-by-integration-fixer.yml |
Same: baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-resource-not-accessible-by-integration-detector.yml |
Same: baseline into prelude; downstream uses resolved instructions; adjusts needs. |
.github/workflows/oblt-aw-mention-in-issue.yml |
Passes resolved instructions to upstream gh-aw-mention-in-issue. |
.github/workflows/oblt-aw-issue-triage.yml |
Passes resolved instructions to upstream gh-aw-issue-triage. |
.github/workflows/oblt-aw-issue-fixer.yml |
Moves baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-estc-pr-buildkite-detective.yml |
Moves baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-duplicate-issue-detector.yml |
Passes resolved instructions to upstream detector workflow. |
.github/workflows/oblt-aw-dependency-review.yml |
Moves baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-automerge.yml |
Moves baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-autodoc.yml |
Moves baseline into prelude; downstream uses resolved instructions. |
.github/workflows/oblt-aw-agent-suggestions.yml |
Moves baseline into prelude; downstream uses resolved instructions. |
.github/workflows/docs-aw-pr-ai-menu.yml |
Moves baseline into prelude; ensures run-docs-review is gated by prelude proceed + uses resolved instructions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Why: Repositories need common vs per-workflow agentic configuration without duplicating control-plane workflow YAML. What: Add x-oblt-aw extension resolution (workflow override over common), APM install in prelude, and wire oblt-aw-* jobs to resolved additional-instructions. Validation: pytest tests/test_apm_agentic_assets.py; validate_aw_workflow_prelude.py
2831751 to
9974a12
Compare
4 tasks
Wire KNOWN_REGISTRY_IDS into registry loading so ruff no longer flags it as unused and repeated validation avoids redundant disk reads. Co-authored-by: Cursor <cursoragent@cursor.com>
… cast to dict[str, Any]
… and SHA256 verification
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
Resolved all merge conflicts in commit
|
Move apm install and apm.yml merging out of aw-prelude into a dedicated reusable workflow called immediately before each gh-aw-* job with matching gates. Add CI validation and docs for the new contract. Co-authored-by: Cursor <cursoragent@cursor.com>
Split runtime PyYAML deps from CI test requirements and use pip cache in aw-resolve-apm-assets and all control-plane setup-python jobs. Co-authored-by: Cursor <cursoragent@cursor.com>
mallendem
approved these changes
Jun 2, 2026
Multi-org consumer apm.yml now uses x-oblt-aw.<org-key>.common and workflows; flat top-level common/workflows are rejected with a clear error. Co-authored-by: Cursor <cursoragent@cursor.com>
Allow setup-commands as string or list with multiline split, optional setup-commands-file, and document inline shell vs script paths. Co-authored-by: Cursor <cursoragent@cursor.com>
Document that x-oblt-aw is a vendor extension and point readers to Microsoft's apm.yml manifest schema alongside the local JSON Schema. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces a shared agentic assets framework for consumer repositories. Repositories opt in by adding an
apm.ymlmanifest (standard APM dependencies plus anx-oblt-awextension). The control plane resolves those assets inaw-resolve-apm-assets.ymlimmediately before eachgh-aw-*job (not inaw-prelude), so teams can define repository-wide and per-workflow AI configuration without forkingelastic/oblt-awworkflow YAML.The design separates four concerns:
aw-prelude.ymlaw-resolve-apm-assets.ymlapm install, mergex-oblt-awassets with platform baselines.elastic/oblt-awplatform-additional-instructions/platform-inputs-jsonon each resolve job.apm.ymlapm install.Workflow ids under
x-oblt-aw.workflowsmatchidinconfig/<org-key>/workflow-registry.json(for exampleagent-suggestions,autodoc). Dashboard gating continues to use compound ids (obs:agent-suggestions).Architecture diagram
flowchart TB subgraph consumer["Consumer repository"] TRG["trigger-oblt-aw-*.yml"] APM["apm.yml"] X_OBLT["x-oblt-aw: common | workflows.<id>"] APM --> X_OBLT end subgraph control_plane["elastic/oblt-aw"] OBLT["oblt-aw-*.yml / docs-aw-*.yml"] PRELUDE["aw-prelude.yml"] RESOLVE_WF["aw-resolve-apm-assets.yml"] DASH["get-enabled-workflows"] end subgraph upstream["Upstream agentic engine"] GHAW["gh-aw-*.lock.yml"] end TRG --> OBLT OBLT --> PRELUDE PRELUDE -->|proceed| RESOLVE_WF X_OBLT -.->|read at runtime| RESOLVE_WF RESOLVE_WF -->|resolved-additional-instructions| OBLT OBLT --> GHAW PRELUDE --> DASHPer-invocation resolve flow
flowchart TD START([Wrapper triggered]) --> PRELUDE[aw-prelude: dashboard gate] PRELUDE -->|proceed false| SKIP([Agent jobs skipped]) PRELUDE -->|proceed true| GATES[Optional upstream gates e.g. verify, discover, evaluate-trigger] GATES --> RESOLVE[aw-resolve-apm-assets for this gh-aw job] RESOLVE --> MANIFEST{apm.yml present?} MANIFEST -->|yes| INSTALL[apm install + resolve x-oblt-aw] MANIFEST -->|no| PLATFORM[Platform baseline only] INSTALL --> MERGE[Merge platform + APM outputs] PLATFORM --> MERGE MERGE --> GHAW([gh-aw-* workflow_call])Each
resolve-apm-assetsjob uses the sameifexpression as thegh-aw-*job it feeds, and runs immediately before that agent job (after any prerequisite gates such as automerge verify or resource detector discover).Multi-agent wrappers call resolve once per agent step (for example
oblt-aw-autodoc: audit vs fix with differentplatform-additional-instructions).Precedence rules
Platform vs repository (
x-oblt-aw)platform-additional-instructionson the resolve job) is prepended; repository text from the selected asset block is appended.platform-inputs-jsondefaults; APMinputsoverride per key.Common vs workflow-specific
workflows.<registry-id>exists, that block is used andcommonis ignored entirely (override, not merge).commonexists, it applies to all workflows without a workflow block.Control-plane changes
aw-prelude.ymlaw-resolve-apm-assets.ymlrequirements-runtime.txt+ pip cache, optionalapm install, asset resolution.scripts/apm_agentic_assets.pyscripts/resolve_apm_agentic_assets.pyoblt-aw-*/docs-aw-*gh-aw-*call with matchingif/needs.scripts/validate_aw_workflow_resolve_apm_assets.pygh-aw-*wrapper must callaw-resolve-apm-assets.yml.docs/architecture/apm-agentic-assets.md,docs/workflows/aw-resolve-apm-assets.md,docs/examples/consumer-apm.yml.example.Wrappers without agents (for example
oblt-aw-security-detector) call prelude only.Test plan
pytest tests/test_apm_agentic_assets.pypython scripts/validate_aw_workflow_prelude.pypython scripts/validate_aw_workflow_resolve_apm_assets.pyapm.ymlwithx-oblt-awto a consumer repo; confirm resolve job logsasset-sourceand agent receives expectedresolved-additional-instructionsRelated issue: https://github.com/elastic/observability-robots/issues/3674