Skip to content

ddev/ai: replace agent YAML block with Markdown front matter files#24183

Draft
lucia-sb wants to merge 10 commits into
loa/openmetrics-ai-genfrom
lucia-sb/change-agent-config
Draft

ddev/ai: replace agent YAML block with Markdown front matter files#24183
lucia-sb wants to merge 10 commits into
loa/openmetrics-ai-genfrom
lucia-sb/change-agent-config

Conversation

@lucia-sb

Copy link
Copy Markdown
Contributor

What does this PR do?

Replaces the two-part agent configuration (an agents: block in flow.yaml plus a separate prompts/{name}.md system-prompt file) with self-contained Markdown files that use YAML front matter for config and a plain-text body for the prompt.

Two file types are introduced:

  • agents/{name}.md — front matter holds agent config (provider, model, max_tokens, tools); the body is the system prompt.
  • prompts/{name}.mdtype: prompt for task prompts, type: goal for goal verification text. Tasks reference them by name via prompt_ref / goal_ref.

FlowConfig.from_yaml() scans both directories eagerly, validates all cross-references, and surfaces agents, prompts, and goals dictionaries to the runtime. ResourceProvider gains prompt(name) and goal(name) methods. render_prompt() (path-based) is removed; everything uses render_inline().

Motivation

Having agent config split across flow.yaml and a loose .md file made it awkward to move or rename an agent. A single self-contained .md file per agent keeps all its configuration co-located, is easier to read, and aligns with how prompt files already work.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@lucia-sb lucia-sb added the qa/skip-qa Automatically skip this PR for the next QA label Jun 25, 2026
@dd-octo-sts dd-octo-sts Bot added the ddev label Jun 25, 2026
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jun 25, 2026

Copy link
Copy Markdown

Pipelines  Tests  Code Coverage

Fix all issues with BitsAI

⚠️ Warnings

🚦 7 Pipeline jobs failed

PR | test / test (linux, ubuntu-22.04, ddev, ddev on Linux) / ddev on Linux   View in Datadog   GitHub Actions

PR | test / test (windows, windows-2022, ddev, ddev on Windows) / ddev on Windows   View in Datadog   GitHub Actions

PR | test / test-minimum-base-package (linux, ubuntu-22.04, ddev, ddev on Linux) / minimum-base-package-ddev on Linux   View in Datadog   GitHub Actions

View all 7 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 88.50%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2fb3f67 | Docs | Datadog PR Page | Give us feedback!

@lucia-sb lucia-sb changed the base branch from master to loa/openmetrics-ai-gen June 25, 2026 13:25
lucia-sb and others added 6 commits June 25, 2026 15:52
Replace goal_path with goal_ref in TaskConfig to align with the prompt/prompt_ref
pattern. Update validators to check goal_ref, skip task-level goal validation in
_validate_files (deferred to Task 3), and update tests accordingly. All 40 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lucia-sb lucia-sb force-pushed the lucia-sb/change-agent-config branch from 13975b7 to 0205992 Compare June 25, 2026 14:06
lucia-sb and others added 4 commits June 25, 2026 17:36
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dd-octo-sts

dd-octo-sts Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ddev qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant