Skip to content

feat(agent-platform): add GitOps AgentDefinition and ExecutionProfile catalog #950

Closed

Description

@mashkovd

Parent epic

Depends on

Implementation may prepare fixtures/validation plumbing while the ADR is reviewed, but the public schema and catalog layout must not be finalized ahead of the architecture decision.

Existing baseline

This issue must integrate those components. It must not create a parallel registry or duplicate existing release history.

Goal

Define and implement the GitOps-managed catalog representation for approved AgentDefinition and reusable ExecutionProfile resources, with schema/reference validation, safe defaults, lifecycle/versioning and reversible rollout.

Scope

  • Define versioned schemas for AgentDefinition and ExecutionProfile according to fix(mctl-telegram): force client-side apply for oauth ExternalSecret #226.
  • Choose and document canonical GitOps paths and ownership conventions for definitions, profiles and environment activation/release references.
  • Provide initial definitions/profiles that map the current investigator, implementer and shepherd without behavior changes.
  • Validate local and cross-resource references, including:
    • definition → execution profile;
    • model/profile identifiers;
    • skills/prompt sources;
    • tool/MCP allow-lists;
    • policy, budget, timeout and runtime/sandbox profiles;
    • Argo ClusterWorkflowTemplate references;
    • owner and lifecycle metadata.
  • Define safe defaults. Missing or ambiguous security-sensitive fields must fail closed rather than expand access.
  • Validate lifecycle transitions, immutable published versions and compatibility with the existing mctl-api registry.
  • Define promotion, deprecation, disablement and rollback behavior without losing immutable execution provenance.
  • Add CI/render validation and representative positive/negative fixtures.
  • Document migration/import from current agents/_manifests and existing registry versions.

Safe-default requirements

At minimum, the design must explicitly decide and test defaults for:

  • no implicit write tools or production mutations;
  • no unbounded budget or timeout;
  • no runtime without an approved sandbox/template;
  • owner required;
  • unknown model, skill, tool, policy or profile reference rejected;
  • disabled/deprecated definition behavior;
  • rollback to an exact previously published compatible version.

Non-goals

  • Replacing the Postgres-backed registry or Temporal/Argo.
  • Adding mctl-api catalog UI/MCP features beyond integration required for validation/publishing.
  • Implementing the generic runtime resolver.
  • Activating unreviewed definitions directly from a model action.
  • Migrating every existing agent before the three-agent compatibility slice is proven.

Acceptance criteria

  • Versioned schemas validate the contract approved in fix(mctl-telegram): force client-side apply for oauth ExternalSecret #226.
  • Canonical GitOps catalog paths, owners and source-of-truth boundaries are documented.
  • Investigator, implementer and shepherd fixtures/definitions validate and preserve their current effective model/tools/budget/runtime settings.
  • All cross-resource references are checked deterministically in CI.
  • Missing owner, unknown references, write-capable implicit defaults, unbounded budget/timeout and unsafe runtime configuration are rejected by tests.
  • Lifecycle transitions and immutable version rules are enforced.
  • Publish/promotion integrates with the existing mctl-api registry rather than creating a second release database.
  • Rollback restores an exact prior compatible definition/profile set and preserves audit history.
  • Existing AgentManifest/registry data has a documented, tested migration or compatibility path.
  • Validation includes positive fixtures plus negative tests for broken references, incompatible versions and unsafe defaults.

Activity

  1. mashkovd commented on Aug 29, 2026

    @mashkovd
    MemberAuthor

    ADR 007 contract circulation

    Cross-check completed against the accepted contract in mctlhq/mctl-agents#228 (head c9cda989).

    This issue is aligned with the normative decisions:

    • v1alpha2 splits AgentDefinition from ExecutionProfile;
    • profiles require explicit policy/permissions, bounded budget/timeout, and approved runtime;
    • definition and profile versions are published independently but activated as one atomic environment ReleaseBinding;
    • lifecycle belongs to Git draft, registry versions, and per-environment binding rather than one global resource flag;
    • unknown, disabled, ambiguous, incompatible, or unsafe v1alpha2 references fail closed;
    • rollback restores the exact prior compatible pair;
    • v1alpha1 compatibility data remains valid.

    Canonical directory/schema syntax remains an implementation detail of this issue, but it must preserve those semantics and integrate with the existing mctl-api registry rather than create a second release database.

    No ownership, lifecycle, rollback, or fail-safe decision remains open for this issue.

  2. mctl-agents commented on Aug 29, 2026

    @mctl-agents
    Contributor

    mctl-agents issue-investigator has analyzed this issue and created a proposal:

    https://github.com/mctlhq/mctl-gitops/tree/main/platform-gitops/agents-state/mctl-gitops/proposals/issue-950-feat-agent-platform-add-gitops-agentdefi/

    Status: proposed — pending human approval. Review requirements.md, design.md and tasks.md, then approve: signal this issue's DevLoopWorkflow (mctl-api POST /api/v1/agents/dev-loop/dev-loop-mctlhq-mctl-gitops-950/approve, or python -m orchestrator.temporal.cli approve dev-loop-mctlhq-mctl-gitops-950) — the workflow flips .status.yaml to accepted via the mctl-agents-approve operation and runs the Tier 2 implementer. If no DevLoopWorkflow is running for this issue (pre-Temporal proposal), run the mctl-agents-approve operation directly with service=mctl-gitops slug=issue-950-feat-agent-platform-add-gitops-agentdefi.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions