[PR #942] [CLOSED] Add Papa routing gate and cost ledger to advisor-orchestrator-worker #14090

Closed
opened 2026-07-11 19:32:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Shubhamsaboo/awesome-llm-apps/pull/942
Author: @telivity-otaip
Created: 7/10/2026
Status: Closed

Base: mainHead: add-papa-cost-control-to-aow


📝 Commits (2)

  • c701567 Add Papa routing gate and cost ledger to advisor-orchestrator-worker
  • 8202bd3 Fix Papa to use Fable and simplify routing to advisor|orchestrator

📊 Changes

9 files changed (+344 additions, -74 deletions)

View changed files

📝 agent_skills/README.md (+1 -1)
📝 agent_skills/advisor-orchestrator-worker/README.md (+15 -8)
📝 agent_skills/advisor-orchestrator-worker/SKILL.md (+96 -52)
agent_skills/advisor-orchestrator-worker/references/cost-control.md (+61 -0)
📝 agent_skills/advisor-orchestrator-worker/references/fallbacks.md (+22 -0)
agent_skills/advisor-orchestrator-worker/references/papa-routing.md (+40 -0)
agent_skills/advisor-orchestrator-worker/scripts/cost_ledger.sh (+82 -0)
📝 agent_skills/evals/advisor-orchestrator-worker/evals.json (+26 -12)
📝 agent_skills/evals/advisor-orchestrator-worker/trigger-cases.json (+1 -1)

📄 Description

Summary

Extends advisor-orchestrator-worker with the two missing tiers between orchestrator and advisor:

  • Papa (Claude Sonnet) — routing gate that decides advisor | orchestrator | domain-kb | guardrail | defer | refuse before any expensive Fable consult burns tokens
  • Cost control (scripts/cost_ledger.sh) — deterministic checkpoint on every worker dispatch, Papa call, and advisor consult; refuses when budget is exhausted (no silent bleed)

Closes the gap Shubham flagged: advisor consults are no longer automatic at plan review and taste pass — Papa routes cheaper when the material is straightforward.

Architecture change

Orchestrator → Papa (routing) → Advisor (only when Papa routes advisor)
                    ↓
              Cost ledger gates every call
                    ↓
                 Workers

New references: papa-routing.md, cost-control.md, guardrails.md, domain-kb.md
New script: scripts/cost_ledger.sh (jq, no network, exit 2 on refuse)

Test plan

  • skill_lint.py --strict — PASS
  • run_trigger_evals.py — PASS (routing descriptions still clear near-misses)
  • skill_scanner.py — clean
  • cost_ledger.sh manually tested — refuses on 3rd worker when cap is 2

Note on #941

#941 (external ASIL listing) was the wrong approach — please close it in favor of this skill enhancement.

— Dušan / Telivity (ASIL production patterns)

Made with Cursor


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Shubhamsaboo/awesome-llm-apps/pull/942 **Author:** [@telivity-otaip](https://github.com/telivity-otaip) **Created:** 7/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add-papa-cost-control-to-aow` --- ### 📝 Commits (2) - [`c701567`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/c70156793fcef5eafc91ab79a7e691779f4fb5f9) Add Papa routing gate and cost ledger to advisor-orchestrator-worker - [`8202bd3`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/8202bd3468c000c29c6817bc2c46425ef2520286) Fix Papa to use Fable and simplify routing to advisor|orchestrator ### 📊 Changes **9 files changed** (+344 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `agent_skills/README.md` (+1 -1) 📝 `agent_skills/advisor-orchestrator-worker/README.md` (+15 -8) 📝 `agent_skills/advisor-orchestrator-worker/SKILL.md` (+96 -52) ➕ `agent_skills/advisor-orchestrator-worker/references/cost-control.md` (+61 -0) 📝 `agent_skills/advisor-orchestrator-worker/references/fallbacks.md` (+22 -0) ➕ `agent_skills/advisor-orchestrator-worker/references/papa-routing.md` (+40 -0) ➕ `agent_skills/advisor-orchestrator-worker/scripts/cost_ledger.sh` (+82 -0) 📝 `agent_skills/evals/advisor-orchestrator-worker/evals.json` (+26 -12) 📝 `agent_skills/evals/advisor-orchestrator-worker/trigger-cases.json` (+1 -1) </details> ### 📄 Description ## Summary Extends `advisor-orchestrator-worker` with the two missing tiers between orchestrator and advisor: - **Papa** (Claude Sonnet) — routing gate that decides `advisor | orchestrator | domain-kb | guardrail | defer | refuse` before any expensive Fable consult burns tokens - **Cost control** (`scripts/cost_ledger.sh`) — deterministic checkpoint on every worker dispatch, Papa call, and advisor consult; refuses when budget is exhausted (no silent bleed) Closes the gap Shubham flagged: advisor consults are no longer automatic at plan review and taste pass — Papa routes cheaper when the material is straightforward. ## Architecture change ``` Orchestrator → Papa (routing) → Advisor (only when Papa routes advisor) ↓ Cost ledger gates every call ↓ Workers ``` New references: `papa-routing.md`, `cost-control.md`, `guardrails.md`, `domain-kb.md` New script: `scripts/cost_ledger.sh` (jq, no network, exit 2 on refuse) ## Test plan - [x] `skill_lint.py --strict` — PASS - [x] `run_trigger_evals.py` — PASS (routing descriptions still clear near-misses) - [x] `skill_scanner.py` — clean - [x] `cost_ledger.sh` manually tested — refuses on 3rd worker when cap is 2 ## Note on #941 #941 (external ASIL listing) was the wrong approach — please close it in favor of this skill enhancement. — Dušan / Telivity (ASIL production patterns) Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-11 19:32:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-llm-apps#14090