Skip to content

166. Descriptor-driven planning workloads ​

Date: 2026-11-30

Status ​

Accepted

Context ​

Epic Creator decomposes approved strategies into implementation epics. Today its shared discovery, decomposition, review, revision and Jira submission stages wire RHAI planning behavior directly into the pipeline: the source strategy contract, epic templates, decomposition rules, review gate and submission policy are all fixed along the way. Adding a new source of work — RHAI Initiatives being the first — means editing every stage, and any per-workload fork replicates each fix across copies.

The peer creators (RFE Creator, Strategy Creator) are separate pipelines that share descriptor vocabulary, not code, and gate evaluation stays in the consuming pipeline. Related, ADR 0176 decides how resolved repositories split epics; this ADR decides where each stage's workload behavior comes from.

This ADR aims to let Epic Creator take on new planning workloads by configuration — a validated workload descriptor — instead of per-workload code, while preserving the existing RHAISTRAT Feature behavior as a compatibility path.

Options ​

  • Fork per workload — rejected: every fix and policy change must be replicated across forks.
  • Branch on workload in shared code — rejected: scattering if workload == ... dispatch through the stages keeps workload-specific logic embedded in shared code; every new workload touches every stage.
  • Wait for a shared planning engine — rejected: the upstream designs keep the creators as separate peer pipelines and the descriptor contract is the agreed integration point; deferring blocks RHAI Initiatives now.

Decision ​

We adopt a descriptor-driven consuming architecture: one pipeline whose stages resolve workload behavior from a validated, versioned descriptor, selected once at entry.

A workload is defined by a versioned descriptor registered in an in-repo registry. The descriptor names the source strategy contract, epic template and decomposition rules, review policy and scoring gate, components, tracker destination, labels and relationships. It is data that references reviewed in-repo policies — it does not load executable plugins. Descriptor selection resolves once at entry (--workload ID; omission preserves the legacy RHAISTRAT invocation) and persists in pipeline state. Opt-in Jira intake resolves the descriptor's (project, issue_type) binding, then validates the source key and approval evidence; conflicting or unknown identities fail before decomposition or any Jira write.

Every stage — fetch, decompose, review, revise, submit — resolves its behavior from the selected descriptor. Shared stages keep only stage procedure, artifact locations, and safety and validation instructions. Generated artifacts carry the workload identity, the canonical descriptor digest, referenced policy digests and source provenance forward; stage boundaries validate these bindings, and changed descriptors, policies or bound source revisions reject resume.

Submission is a separate explicit command per workload. It validates the full artifact set, ordered review scores against the selected gate, components and the dependency graph before the first Jira write, then rechecks live source approval and strategy freshness. It writes through stable identity labels and reviewed-plan fingerprints backed by an atomically persisted, locally locked intent journal: intent is saved before creation, reruns recover known effects and reconcile missing relationships, ambiguous creates are never blindly retried, and the source is marked processed only after all phases succeed.

The descriptors and registry live in the consuming repository (epic-creator); where they move if more consumers appear is decided with the maintainers, as with the resolution skill in ADR 0176. The implementation is tracked in AISDLC-61 and reviewed in epic-creator #40.

Forge scope ​

Forge-neutral. Workload descriptors configure Jira-backed planning — projects, issue types, labels, relationships — and the pipeline reads source content through the same generic fetch mechanics it already uses. Nothing in this decision depends on GitHub, GitLab or Forgejo specifics.

Consequences ​

  • Adding a workload means adding a validated descriptor and its policies, not forking the pipeline or editing shared stages.
  • Descriptor validation rejects missing fields, duplicate IDs, unsafe paths and unsupported policy references before a run starts.
  • The existing RHAISTRAT Feature discovery, artifact, DAG, review and submission behavior is preserved as a compatibility path.
  • Gate evaluation stays in the consuming pipeline, consistent with the peer-pipeline design; the descriptor is not an executable gate interface.
  • Recovery depends on retaining the artifact directory and journal; a lost journal plus an invisible or unindexed Jira issue cannot guarantee duplicate prevention.
  • Changes to planning prompts and policies require model-quality evaluation against the existing corpus, in addition to deterministic orchestration tests.

Open questions ​

  • Whether the descriptor schema grows a workload inputs: field for cross-stage handoff vocabulary, versioned so stations can evolve without lockstep releases.
  • Production discovery configuration (JQL selection) for Initiative intake, which stays with the caller and outside the descriptor.