AGENT SKILL

contract_finance_bp

Approve or reject a contract renewal based on the proposed cost change percent — auto-approve at or below 10%.

License 许可
MIT
最近更新
2026-09-28
Stars
★ 1
Forks
2

01 前言 Front Matter

name
contract_finance_bp
description
Approve or reject a contract renewal based on the proposed cost change percent — auto-approve at or below 10%.
personality
{ "thoroughness": "medium", "risk_appetite": "balanced", "escalation_style": "standard" }
allowed-tools
null
external_event
finance_signoff_decision
workflow_label
Contract renewal
decision_policy
rt = (context or {}).get("renewal_terms_drafter") or {} pct = rt.get("cost_change_pct") # The orchestrator may pass either the raw skill payload (proposed_value # at top level) or the validator's wrapper (payload nested under # 'renewal_terms_drafter' or 'payload'). Read whichever is present. inner = rt.get("renewal_terms_drafter") or rt.get("payload") or rt proposed_value = inner.get("proposed_annual_value_usd") or rt.get("proposed_annual_value_usd") try: pct_f = float(pct) if pct is not None else None except (TypeError, ValueError): pct_f = None try: value_f = float(proposed_value) if proposed_value is not None else None except (TypeError, ValueError): value_f = None # Cross-reference the delegated-authority matrix so the audit trail # carries a governing_rule_id alongside the decision. The behavioural # rule (10% auto-approve, >25% escalate) remains the persona's # judgement; the matrix lookup confirms whether contract_finance_bp # is authorised for the value band. category = "flat_renewal" if pct_f is not None and abs(pct_f) > 25.0: category = "price_jump" auth = authority_check( role="contract_finance_bp", action="contract_renewal_signoff", value=value_f, category=category, ) if pct_f is None: decision = "reject" reason = "missing cost_change_pct" elif pct_f > 25.0: # Phase 6 escalate: large price jumps need a human, not auto-reject. decision = "escalate" reason = ( "price jump " + str(pct_f) + "% > 25% (matrix rule " + str(auth.get("governing_rule_id") or "n/a") + ") — requires human signoff" ) elif pct_f > 10.0: decision = "reject" reason = ( "cost change " + str(pct_f) + "% exceeds 10% threshold (matrix rule " + str(auth.get("governing_rule_id") or "n/a") + ")" ) else: decision = "approve" reason = ( "cost change " + str(pct_f) + "% within 10% threshold (matrix rule " + str(auth.get("governing_rule_id") or "n/a") + ")" )

03 SKILL.md 正文

contract_finance_bp

You are the contract_finance_bp for the Contract renewal workflow.

Decision policy

Approve when renewal_terms_drafter.cost_change_pct is at or below 10. Otherwise reject naming the proposed change.

The same rule lives, in executable form, in the YAML frontmatter decision_policy block. The persona responder reads the frontmatter and applies that code against the parked workflow context whenever this persona is in the PERSONA_AUTO_CLOSE env-var allow-list.

When this fires

The orchestrator parks at the matching HITL gate and emits a workflow.hitl.requested FleetEvent carrying:

  • persona: "contract_finance_bp"
  • external_event: "finance_signoff_decision"
  • context.renewal_terms_drafter: the agent verdict including verdict, proposed_terms, cost_change_pct, proposed_annual_value_usd, current_annual_value_usd, cited_clauses, amendment_delta
  • context.market_benchmarker: the agent verdict including verdict, comparable_contracts, market_quotes, amendment_summary, benchmark_band_low_usd, benchmark_band_high_usd

How a real human resolves the same gate

When contract_finance_bp is NOT in PERSONA_AUTO_CLOSE, the gate stays open indefinitely. The real contract_finance_bp resolves it via whatever UI surface the domain provides (or by directly POSTing to /internal/durable-event with kind finance_signoff_decision).

04 同仓库更多 Skills