Knowledge routing

Route one question or source event through a supplied knowledge catalog to validated source, owner, escalation, and follow-up skill references. Use for evidence discovery and ownership routing, not broad business-action fanout or answering the question itself.

You’re reading version sha-4d35cbef7a49. Go to the current version

Overview

Produce a validated retrieval and ownership route from a bounded source catalog. This skill decides where evidence should come from and who owns the answer; it does not answer the question or perform the follow-up operation.

knowledge-router resolves references inside an explicit knowledge catalog. Its deterministic validator rejects invented sources, owners, and skills.

In the manual

Runner

  • route

Declared by its execution profile. Read the profile

SKILL.md

Knowledge Router

Produce a validated retrieval and ownership route from a bounded source catalog. This skill decides where evidence should come from and who owns the answer; it does not answer the question or perform the follow-up operation.

knowledge-router resolves references inside an explicit knowledge catalog. Its deterministic validator rejects invented sources, owners, and skills.

Source catalog

Supply:

json
{
  "sources": [
    {"id": "auth-docs", "kind": "docs", "summary": "API authentication and key scopes"}
  ],
  "owners": [
    {"id": "security-team", "domains": ["authentication"]}
  ],
  "skills": [
    {"id": "research", "purpose": "Resolve a bounded source-backed question"}
  ]
}

Every selected reference must exist in the corresponding catalog collection. The route may return no follow-up skill when more context or manual review is the honest outcome.

Procedure

  1. Match the question or event to supplied source summaries and owner domains.
  2. Propose the smallest source set needed to resolve the question.
  3. Select an owner only when the catalog supports the ownership relationship.
  4. Select a follow-up skill only when its declared purpose matches the next job.
  5. Use manual_review for consequential legal, billing, security, privacy, or destructive decisions—not merely because the topic belongs to those teams.
  6. Validate every source, owner, and skill reference deterministically.
  7. Return needs_more_context when no supported route exists.

Output

  • route: domain, rationale, and validated source references.
  • source_matches: validated source references and matching signals.
  • owner_recommendation: validated owner reference, rationale, and escalation posture, or null.
  • next_skill: validated skill reference and rationale, or null.
  • verdict: routed, needs_more_context, manual_review, or the deterministic validator's refused result for an invented reference.
  • validation: catalog digest inputs, invalid-reference findings, and result.

Inputs

  • question (required): question, event, or thread summary to route.
  • available_sources (required): explicit sources, owners, and skills collections.
  • constraints (optional): allowed sources, sensitivity, excluded systems, or preferred owners. Constraints are not authority.

Agent task contracts

knowledge-router-propose

Route the question through only the supplied knowledge catalog. Return route_proposal with verdict, route, source_matches, owner_recommendation, and next_skill. Every selected source_ref, owner_ref, and skill_ref must exactly match a supplied id. Choose the smallest useful source set. Use needs_more_context with no selected refs when the catalog cannot support a route. Use manual_review for consequential legal, billing, security, privacy, or destructive decisions, not merely because the topic belongs to those domains. Do not answer the question or perform the follow-up skill.

Published execution profile

The execution profile published with sha-4d35cbef7a49, shown as its exact bytes.

Runner
  • route
Profile digestsha256:71deda7df284aca048e438db5b3f23e503b51ad5b7bba2fa68f48c358c269742
skill: knowledge-router
version: "0.2.9"

catalog:
  kind: graph
  audience: operator
  visibility: public
  role: context
  execution: plan
  completion: runtime_receipt
  approval: none
  category: ops

harness:
  files: [fixtures/support/composed.graph]
  cases:
    - name: knowledge-router-validates-source-owner-and-skill
      operator_journeys:
        - mode: standalone
          confusors: [research, deep-research]
          request: Route this question to the validated knowledge source, owner, and next skill.
          expected_outcome: Return exact source, ownership, escalation, and follow-up references from the supplied catalog.
        - mode: composed
          request: Route this source event using the knowledge catalog already attached to the case.
          expected_outcome: Reuse the supplied catalog and event without broad discovery or inventing owners.
          prior_evidence:
            - The knowledge catalog, question, and source event supplied in the fixture.
          must_not_repeat:
            - Do not search outside the supplied catalog.
            - Do not re-resolve an owner or source already validated in the packet.
      inputs:
        question: Can API keys be scoped to read-only campaign analytics?
        available_sources:
          sources:
            - id: auth-docs
              kind: docs
              summary: Authentication and API key scopes.
            - id: campaigns-docs
              kind: docs
              summary: Campaign analytics fields and export limits.
          owners:
            - id: security-team
              domains:
                - authentication
            - id: growth-team
              domains:
                - campaigns
          skills:
            - id: research
              purpose: Resolve a bounded source-backed question.
      caller:
        answers:
          propose:
            route_proposal:
              verdict: routed
              route:
                domain: authentication
                rationale: The question joins API-key scope policy with analytics access.
                source_refs:
                  - auth-docs
                  - campaigns-docs
              source_matches:
                - source_ref: auth-docs
                  matching_signal: API keys scoped to read-only
                  reason: Defines key scope behavior.
                - source_ref: campaigns-docs
                  matching_signal: campaign analytics
                  reason: Defines the requested read surface.
              owner_recommendation:
                owner_ref: security-team
                rationale: Authentication scope ownership is primary.
                escalation_required: false
              next_skill:
                skill_ref: research
                rationale: Resolve the bounded answer from both validated sources.
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
        steps:
          - digest
          - propose
          - validate
        step_outputs:
          validate:
            subset:
              knowledge_route:
                data:
                  verdict: routed
                  route:
                    domain: authentication
                    source_refs:
                      - auth-docs
                      - campaigns-docs
                  owner_recommendation:
                    owner_ref: security-team
                  next_skill:
                    skill_ref: research
                  validation:
                    valid: true
                    invalid_refs: []

    - name: knowledge-router-rejects-invented-reference
      inputs:
        question: Where is the retention policy documented?
        available_sources:
          sources:
            - id: policy-docs
              kind: docs
              summary: Product policy documentation.
          owners: []
          skills: []
      caller:
        answers:
          propose:
            route_proposal:
              verdict: routed
              route:
                domain: policy
                rationale: Use the retention documentation.
                source_refs:
                  - invented-docs
              source_matches:
                - source_ref: invented-docs
                  matching_signal: retention policy
                  reason: Invented source must be rejected.
              owner_recommendation: {}
              next_skill: {}
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
        steps:
          - digest
          - propose
          - validate

    - name: knowledge-router-needs-sources
      inputs:
        question: Where should this go?
      expect:
        status: failure

runners:
  route:
    default: true
    inputs:
      question:
        type: string
        required: true
        description: Question, source event, or thread summary to route.
      available_sources:
        type: json
        required: true
        description: Explicit sources, owners, and skills collections.
      constraints:
        type: json
        required: false
        description: Allowed sources, sensitivity, excluded systems, and preferred owners.
    result_from: [validate]
    steps:
      - id: digest
        tool: data.digest
        inputs:
          value: $input.available_sources

      - id: propose
        label: propose bounded knowledge route
        agent: { role: router, task: knowledge-router-propose }
        inputs: $input
        outputs:
          route_proposal: object
        artifacts:
          named_emits:
            route_proposal: route_proposal
      - id: validate
        label: validate all catalog references
        inputs:
          available_sources: $input.available_sources
          constraints: $input.constraints
          route_proposal: $steps.propose.route_proposal
          catalog_digest: $steps.digest.digest_result.digest
        tool: { module: knowledge-router.mjs }
        outputs:
          knowledge_route:
            type: object
            schema:
              required: [schema, verdict, route, source_matches, owner_recommendation, next_skill, validation]
              additionalProperties: false
              properties:
                schema: { const: runx.ops.knowledge_route.v1 }
                verdict: { type: string, enum: [routed, needs_more_context, manual_review, refused] }
                route:
                  type: object
                  required: [domain, rationale, source_refs]
                  additionalProperties: false
                  properties:
                    domain: { type: [string, 'null'], maxLength: 500 }
                    rationale: { type: string, minLength: 1, maxLength: 4000 }
                    source_refs: { type: array, maxItems: 500, uniqueItems: true, items: { type: string, minLength: 1, maxLength: 1000 } }
                source_matches:
                  type: array
                  maxItems: 500
                  items:
                    type: object
                    required: [source_ref, matching_signal, reason]
                    additionalProperties: false
                    properties:
                      source_ref: { type: string, minLength: 1, maxLength: 1000 }
                      matching_signal: { type: string, maxLength: 4000 }
                      reason: { type: string, maxLength: 4000 }
                owner_recommendation:
                  type: [object, 'null']
                  required: [owner_ref, rationale, escalation_required]
                  additionalProperties: false
                  properties:
                    owner_ref: { type: string, minLength: 1, maxLength: 1000 }
                    rationale: { type: string, maxLength: 4000 }
                    escalation_required: { type: boolean }
                next_skill:
                  type: [object, 'null']
                  required: [skill_ref, rationale]
                  additionalProperties: false
                  properties:
                    skill_ref: { type: string, minLength: 1, maxLength: 1000 }
                    rationale: { type: string, maxLength: 4000 }
                validation:
                  type: object
                  required: [valid, catalog_digest, invalid_refs, constraints_applied]
                  additionalProperties: false
                  properties:
                    valid: { type: boolean }
                    catalog_digest: { type: [string, 'null'], pattern: '^sha256:[0-9a-f]{64}$' }
                    invalid_refs:
                      type: array
                      maxItems: 1000
                      items:
                        type: object
                        required: [kind, ref]
                        additionalProperties: false
                        properties:
                          kind: { type: string, enum: [source, owner, skill] }
                          ref: { type: string, minLength: 1, maxLength: 1000 }
                    constraints_applied: {}
        artifacts:
          named_emits:
            knowledge_route: knowledge_route
          packets:
            knowledge_route: runx.ops.knowledge_route.v1

Published package and test evidence.

This exact version passed its recorded harness run: 4 checks passed · 0 failed.

Test result

Harness resultPassed
Tested versionsha-4d35cbef7a49
Recorded result4 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Declared cases3
Test recordOpen the recorded run
Inspect receipt referencessha256:3fcbb3f59282651bad7b323fb90af21cbddacff4321dba6e6282c02976d94407sha256:78b5d228a996d0a3c8ba5b183978bea681986a8970f7898de2e9336b6b9796e5sha256:f655afdb2a0a001db3606b3a45a173c2b1fc5414829afd7cec34e6f9db1c5bdesha256:e2d7f3c02fda5c1bbaae78f64f70e867520d1546d66a21066acdebccf3ea2c1b

Package identity

Published revisionsha-4d35cbef7a49
Content digestsha256:4d35cbef7a493b0ff32bbeeb6f87ca343819ea299507bc5e7749362946a64ab9
SKILL.md digestsha256:809a157147fb0dbd0fd479970b2f749a9ebe51dd1ed4e7590b525c53db92a8b8
Execution profile digestsha256:71deda7df284aca048e438db5b3f23e503b51ad5b7bba2fa68f48c358c269742
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.2.12Content digest sha256:a4d83046f14da7268853405e58fe6251a031781d54f43c1773b3dfbb9f8c4f93
  2. sha-c29a99b69b31Content digest sha256:c29a99b69b31335c022462cb688e36161b91f1fbe0ccf1f335624923b8a09314
  3. sha-0c61cb4770cbContent digest sha256:0c61cb4770cbba0d102ad3b3a699f94064feced9129527ddd1f072b51c329dae
  4. sha-4d35cbef7a49ViewingContent digest sha256:4d35cbef7a493b0ff32bbeeb6f87ca343819ea299507bc5e7749362946a64ab9
  5. sha-1622a574b3b1Content digest sha256:c9eee04d070d83dcf50ea6437cc3da415401bc8d54facae6ae1a78022d01f420
  6. sha-3cad8b59c700Content digest sha256:748cb217d53dbd424927cc2139558bb15d6a0573d2b0f2fa02155abd4945f138