feat: add budget-negotiator skill for L3 autonomous negotiation - #400
Conversation
cobusgreyling
left a comment
There was a problem hiding this comment.
Review
Interesting L3 idea (negotiate instead of silent death at the token cap), but the PR is not merge-ready as packaged.
Issue counts
- bugs / correctness: 2
- process / checklist: 2
- suggestions: 3
Must fix
-
[bug] Conflicts with existing
skills/loop-budgetwithout integration
loop-budgetalready defines the budget contract: ≥80% → report-only; ≥100% or pause → exit immediately with a one-line STATE note. This skill tells the agent to keep going into negotiation at ≥90% and invent aWAITING_FOR_BUDGETinternal state. Without cross-links and an explicit precedence rule (e.g. “budget-negotiator only runs when loop-budget would otherwise hard-exit, and only for High Priority remaining work”), agents will thrash between the two skills. -
[bug] Safety / human-gate gaps for L3 content
CONTRIBUTING requires safety-sensitive content to referencedocs/safety.md. Negotiating higher autonomous spend is safety-adjacent (L3 budget expansion). Missing:- link to
docs/safety.md - explicit human must edit
loop-budget.mdbefore resume (not just “read it later”) - what happens if the human declines (clear the
[BUDGET NEGOTIATION]line? keep report-only?) - do not allow the agent to self-raise caps
- link to
-
[process] Checklist is inaccurate
PR body checks “New pattern… + updatedregistry.yaml” and “All required sections present for patterns” — this is a skill, not a pattern, andregistry.yamlis untouched. Please uncheck / correct the checklist so review can trust it. -
[process] Discoverability
Skill is added underskills/budget-negotiator/and mirrored totemplates/SKILL.md.budget-negotiator(good mirror shape), but nothing indexes it: no README/skills index link, no mention fromloop-budgetskill ordocs/operating-loops.md/ budget docs. Dead skill files don’t get adopted.
Suggestions
- De-dupe protocol: template and skill are byte-identical today — fine if install scripts copy template → skill; document that relationship like other skills.
- ROI metrics: “PRs merged / bugs fixed” is vague vs structured
loop-run-log.mdfields (actions_taken,outcome,tokens_estimate). Prefer counting log entries for the active pattern today. - Cap the ask: e.g. max +20% or +50k per negotiation, one negotiation per day, to avoid runaway bump requests.
Nits
- Example uses absolute “150k” without tying to
loop-budget.mdfield names. - Trailing whitespace on blank lines in the skill body.
Decision: request changes. Integrate with loop-budget, add safety/human-gate language + docs/safety.md link, fix checklist, and link from at least one index or the parent budget skill.
Triage status (2026-07-27)Maintainer triage cycle complete for this PR. Status: changes requested (see formal review above). Highest-priority follow-ups before re-review:
Happy to re-review once those land. |
cobusgreyling
left a comment
There was a problem hiding this comment.
Re-review (post-fix 64b8170)
Must-fix items from the prior review are largely addressed:
- Integration with
loop-budget— parent skill yields to budget-negotiator at ≥90% when High Priority remains; negotiator documents precedence. - Safety / human gates —
docs/safety.mdlink, hard ban on self-raising caps, human must editloop-budget.md, decline path (report-only, no re-ask today), ask capped at +20%/+50k and once/day. - Discoverability — linked from
skills/loop-budget/SKILL.md(parent index).
Nits (non-blocking; follow-ups welcome):
- PR checklist still claims pattern/
registry.yamlwork — skill-only PRs should mark the skill/template boxes only. - HTML “mirror of skills/budget-negotiator” comment is on the skill itself; keep that note on the template only.
Merge. Thanks @THRISHAL12345.
Summary
Introduces the
budget-negotiatorskill, allowing L3 autonomous loops to proactively analyze their ROI using structuredloop-run-log.mddata and formally request a token cap extension from human maintainers instead of silently dying when hitting their limits. Integrated explicitly withloop-budgetsafety protocols.Changes
templates/pattern-template.md+ updatedregistry.yaml)Checklist (from CONTRIBUTING)
STATE.md*examples use.examplesuffixdocs/safety.mdnode tools/loop-audit/dist/cli.js .(or on the starter) and addressed findingsTesting / Dogfood
loop-auditpasses on affected starters or this repoScreenshots / Examples (if UI or command output)
Example Negotiation Output in
STATE.md: