agentleFS
nordinitnordinit/agent-hq/skills/task-routing-rules/SKILL.md

task-routing-rules

Skill1 starsChanged 48 days agoMITView on GitHub

Create, edit, delete, or verify Agent HQ Assignment Rules (formerly Task Routing rules) and related routing configuration.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 18 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Agent HQ MCP routing tools only.

    line 27
  2. Distinctive:

    Do not use raw API for Assignment Rules config changes.

    line 28
  3. Distinctive:

    Do not use direct SQL for Assignment Rules config changes.

    line 29
  4. Distinctive:

    Before writing, decide the intended scope explicitly:

    line 37
  5. Distinctive:

    Do not create a workflow override when the user asked for a reusable default.

    line 42
  6. Distinctive:

    Do not edit a default when the user asked for one workflow only.

    line 43
  7. Distinctive:

    Read existing assignment rules for the exact target scope.

    line 48
  8. Distinctive:

    Read inherited/default assignment rules if the change should override or reorder existing behavior.

    line 49
  9. Distinctive:

    Read back the exact target scope after the write.

    line 51
  10. Distinctive:

    Verify the effective order:

    line 52
  11. Distinctive:

    Do not guess priority semantics.

    line 60
  12. Distinctive:

    Avoid negative priorities unless intentionally making a rule lower priority than zero.

    line 66
  13. Distinctive:

    If the UI copy, docs, or memory conflict with this, trust the dispatcher/routing policy implementation:

    line 68
  14. Distinctive:

    Delete only the requested scope.

    line 75
  15. Distinctive:

    After deletion, verify the remaining rules in both override and default scopes when relevant.

    line 76
  16. Distinctive:

    Check for an existing equivalent rule to avoid duplicate behavior.

    line 79
  17. Distinctive:

    If reordering two agents, update priority deliberately instead of adding ambiguous duplicates.

    line 80
  18. Distinctive:

    Do not silently retarget the agent.

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Assignment Rules (Task Routing)

Assignment rules are the renamed product surface for task routing rules. Use this whenever changing Agent HQ Assignment Rules configuration on the Routing page:

  • assignment rules
  • workflow-type default assignment rules
  • workflow override assignment rules
  • routing transitions when they are part of the same Routing page workflow

Naming Compatibility

  • The UI label is Assignment Rules (Routing page → Assignment Rules tab).
  • MCP tools use the assignment_rules naming (for example agent_hq_list_assignment_rules). Each tool has exactly one name; the agent_hq_*_routing_rule* spellings have been removed.
  • Preferred REST paths are /api/v1/routing/assignment-rules (legacy /api/v1/routing/rules still works).
  • The backing table is still workflow_task_routing_rules during the compatibility window, and payload fields still use workflow_* machine-readable names.

Core Facts

  • Use Agent HQ MCP routing tools only.
  • Do not use raw API for Assignment Rules config changes.
  • Do not use direct SQL for Assignment Rules config changes.
  • Assignment rule priority is numeric and sorted descending: higher number wins.
  • Workflow overrides are considered before workflow-type defaults.
  • More specific task-type matches beat task_type = null catch-all rules.
  • Stable tiebreaker is rule id ascending after scope, specificity, and priority.

Scope Decision

Before writing, decide the intended scope explicitly:

  • workflow_type_default: reusable default for a project + workflow type. This is the current machine-readable scope key.
  • workflow_override: one workflow-specific exception. This is the current machine-readable scope key.

Do not create a workflow override when the user asked for a reusable default. Do not edit a default when the user asked for one workflow only.

Workflow

  1. Resolve the target project, workflow, workflow type, status, task type, and agent ids.
  2. Read existing assignment rules for the exact target scope.
  3. Read inherited/default assignment rules if the change should override or reorder existing behavior.
  4. Apply the smallest necessary create/update/delete through Agent HQ MCP routing tools only.
  5. Read back the exact target scope after the write.
  6. Verify the effective order:
    • workflow override before workflow-type default
    • exact task type before catch-all
    • higher priority before lower priority
  7. Report rule id, scope, status, task type, agent, priority, and what remains inherited.

Priority Rules

Do not guess priority semantics.

  • Higher number = higher assignment-rule priority.
  • Examples:
    • primary 120, secondary 100
    • workflow override 100, default 0
  • Avoid negative priorities unless intentionally making a rule lower priority than zero.

If the UI copy, docs, or memory conflict with this, trust the dispatcher/routing policy implementation:

  • ORDER BY ... priority DESC, id ASC

Safety Checks

Before deleting:

  • Confirm whether the visible rules are actual workflow_override rows or inherited defaults.
  • Delete only the requested scope.
  • After deletion, verify the remaining rules in both override and default scopes when relevant.

Before adding:

  • Check for an existing equivalent rule to avoid duplicate behavior.
  • If reordering two agents, update priority deliberately instead of adding ambiguous duplicates.

Before editing:

  • Preserve project_id, workflow_id, workflow_type, status, and task_type unless the user asked to change them. workflow_id and workflow_type are currently the compatibility field names for workflow id and workflow type.
  • Do not silently retarget the agent.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.