Skip to content

Create resolve_domain_owner plugin tool for Divisor domain ownership lookup #672

Open

Description

@jflowers

Parent: #659 (Phase 2 — Config Lookup Tools)

Problem

Divisor agent domain ownership (which agent reviews security, which reviews architecture, etc.) is encoded as inline prose across agent files and command files (~250 tokens). When commands need to route a finding to the right Divisor persona, the LLM reads and matches domain descriptions.

Proposed Solution

Extract Divisor domain ownership to structured YAML config → Create resolve_domain_owner plugin tool in uf-workflow plugin.

Instead of extracting to YAML (which the LLM still reads), the tool answers domain ownership questions deterministically. The LLM never parses config.

resolve_domain_owner Tool

resolve_domain_owner: tool({
  description: "Resolve which Divisor agent owns a given domain or concern area.",
  args: {
    domain: z.string().describe("Domain or concern area (e.g. 'security', 'architecture', 'testing', 'documentation', 'operations')")
  },
  execute(args): ToolResult<{ agent: string; description: string }> { ... }
})
  • Success: { status: "ok", data: { agent: "divisor-adversary", description: "Security and resilience" } }
  • Unknown: { status: "ok", data: { agent: "divisor-guard", description: "General intent alignment (fallback)" } }

Domain ownership mappings live as code constants inside the tool — sourced from the reviewer manifest.

Acceptance Criteria

  • Tool added to uf-workflow plugin (both copies)
  • All domain ownership mappings from agent files encoded in tool
  • Tool reads .uf/reviewer-capabilities.yaml manifest for authoritative mappings
  • Tests cover all known domains + unknown fallback
  • make plugin-test passes

Estimated Token Savings

~250 tokens (inline domain descriptions removed from command/agent files, plus LLM never interprets ownership config).

Activity

  1. added
    enhancement
    refactor
    on Oct 5, 2026
  2. self-assigned this
    on Oct 5, 2026
  3. changed the title [-]Extract Divisor domain ownership to structured YAML config[/-] [+]Create resolve_domain_owner plugin tool for Divisor domain ownership lookup[/+] on Oct 7, 2026
  4. jflowers commented on Nov 2, 2026

    @jflowers
    ContributorAuthor

    Triage Result: VALID — Enhancement (objective)

    The Divisor review panel assessed this issue across six personas. All six vote VALID (6/6); the consolidated classification is enhancement, objectivity objective.

    Why the classification holds

    One design fork for the clarify phase

    Four personas with parseable assessment reasoning (adversary, curator, guard, sre) independently flag the same tension: the solution prose says mappings "live as code constants inside the tool — sourced from the reviewer manifest," while acceptance criterion 3 requires the tool to "read .uf/reviewer-capabilities.yaml manifest for authoritative mappings." These are different architectures with different failure modes — constants need drift-detection tests against the canonical file; runtime reads need error paths for a missing or malformed manifest. Two repository facts bear on the choice:

    1. The manifest is a project-owned extension point (Spec 005 FR-023, the only reviewer eligibility source; local reviewers: entries survive uf init re-runs). Baked-in constants would make project-registered Divisor agents invisible to domain routing.
    2. The manifest's current v1.0.0 schema (additionalProperties: false) carries agent/capability/scopes as many-to-many eligibility categories, not a one-owner-per-domain mapping, and some example domains in this issue (architecture, operations) are not manifest scopes. The one-owner mapping the issue's examples promise lives in agent files and specs/019-divisor-council-refinement/data-model.md; satisfying criterion 3 literally requires a manifest schema extension (with scaffold asset sync and drift tests) or an explicitly chosen alternative source of truth.

    The acceptance criteria govern the contract; the spec phase should pick the source of truth deliberately before implementation.

    Next steps

    • Proceed through the spec workflow under parent Epic: Token Reduction for Command & Agent Files (~47-60% savings) #659 (Phase 2 — Config Lookup Tools).
    • Resolve the constants-vs-manifest-read fork and the manifest schema gap during clarify.
    • Scope the ~250-token prose removal into the acceptance criteria (preserving one or two output-format examples near consuming decision points, per DE-002) or defer it to a tracked follow-up — the savings are unrealized while the prose remains.
    • The implementing PR carries the documentation gate: a CHANGELOG.md entry and a docs issue before merge.

    This triage was performed by the Divisor review panel.

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

Metadata

Metadata

Assignees

Labels

enhancementrefactor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions