dimagi-internal/ace/opp-closeout

Claude Code and agent skill by dimagi-internal/ace

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Close out a completed opportunity: pull its Connect invoices and open a Jira ticket to pay the LLO.

Install

npx vskill@latest install dimagi-internal/ace/opp-closeout

SKILL.md

The same SKILL.md was published earlier as dimagi-internal/ace/opp-closeout.

Opportunity Closeout

Process the financial closeout of a completed opportunity. Works on any Connect opportunity: one ACE built in a run, or a live program's opportunity named by its program context doc.

Inputs

ParameterUsed forResolver
opportunity_idthe opportunity whose invoices are pulledexplicit arg; default: runs/<run-id>/4-connect/connect-opp-setup.md; Phase 9's partner opportunity is phases.solicitation-management.products.selected_llo.opportunity_id. A multi-role run (skills/_worker-roles.md) has one opportunity per worker role — close out EACH: the primary's above, plus every phases.connect-setup.products.connect.role_opportunities.<key>.opportunity.id and any per-role partner opportunity the Phase 9 summary lists
organization_slugorg URL the invoice pages are read atexplicit arg; default: the run's holding org (runConnectOrgs()); else the program context doc
llo_name, llo_org_slugwho is paid (Jira summary, banking reference)explicit arg; default: run_state selected_llo; else the program context doc
run_idrun-bound mode: closeout record path + decisions rowsoptional; absent = live-program mode
out_folder_idwhere the closeout record goes in live-program modeexplicit arg when run_id is absent

Live-program mode (no run_id): Step 1 reads the opportunity live (connect_get_opportunity, connect_list_payment_units) instead of the run file; Step 4 writes the record to out_folder_id and logs it in the program context doc's Decisions. The decisions-log rows below are run-only.

Process

  1. Read opportunity details:
  • Run mode: opportunity config from ACE/<opp-name>/runs/<run-id>/4-connect/connect-opp-setup.md
  • Live-program mode: connect_get_opportunity({organization_slug, opportunity_id})

and connect_list_payment_units

  • Delivery/payment unit config
  1. Pull invoices from Connect for this opportunity via

connect_list_invoices (and connect_get_invoice for any that need detail hydration). Invoice atoms are conservative in 0.8.1 — they return empty/stub records for opps that haven't been billed yet.

  • Get auto-generated invoices based on verified deliveries
  • Calculate total payment amount
  • **If the invoice list is empty AND the opportunity has completed

deliveries**, the invoice page shape may have evolved since 0.8.1's probe — re-run scripts/probe-connect-invoice.ts to update the parser, or fall back to manual UI export until then.

  1. Create Jira ticket for payment processing:
  • Project: appropriate Jira project for Connect payments
  • Summary: "Payment: [Opportunity Name] — [LLO Name]"
  • Description: invoice details, amount, LLO banking info reference
  • Attach invoice documents
  1. Write closeout record to ACE/<opp-name>/runs/<run-id>/10-closeout/opp-closeout_invoices.md

(live-program mode: out_folder_id):

  • Invoice details
  • Total amount
  • Jira ticket link

MCP Tools Used

  • Google Drive: drive_read_file, drive_create_file
  • Connect (ace-connect MCP, 0.8.1+):
  • connect_list_invoices — pull invoices for the opportunity
  • connect_get_invoice — hydrate invoice detail
  • Jira (Atlassian MCP): createJiraIssue

Mode Behavior

  • Auto: Pull invoices, create Jira ticket, proceed
  • Review: Present invoice details for verification before creating ticket

Dry-Run Behavior

When --dry-run is active:

  • Write the Jira ticket specification (project, summary, description, attachments) and invoice details to comms-log/dry-run-opp-closeout.md
  • Do not create the Jira ticket or pull invoices from Connect
  • State tracks as dry-run-success

Decisions Log

Review fields (schema v6 — REQUIRED). The decisions log is the run's review artifact (the build memo is retired). Every row this skill appends carries plain — one plain-language line for a programme partner who has never seen ACE — and, where the choice is visible somewhere a reviewer can open, check_at + correct_looks_like. The atom rejects a partner-facing row without plain, or with jargon in it. Rules, a worked row and the review_ask semantics: `skills/_decisions-review-fields.md`; field contract: docs/decisions-contract.md.

This skill writes load-bearing defaults to the per-run ACE/<opp-name>/runs/<run-id>/decisions.yaml. The bar criterion and schema live in skills/idea-to-pdd/SKILL.md § Decisions Log Convention (canonical authority). The list below catalogs decisions that commonly qualify under the bar for this phase — a working template, not a required set. The skill applies the bar criterion and emits whatever rows meet it; the catalog is a teaching device that improves over time.

Common load-bearing decisions for Phase 10
IDQuestionMap to surface
closeout-depthStandard summary vs. deep retrospective with cycle-grade re-anchor?cycle-grade-eval rubric input
learnings-summary-scopePer-opp only, or cross-opp pattern aggregation?learnings-summary skill output; ACE-wide pattern catalogue

The orchestrator's Phase Write-Back Verifier (agents/ace-orchestrator.md § Phase Write-Back Contract § Decisions log clause) enforces the contract; the renderer (skills/decisions-render) regenerates the gdoc at end of every phase.

Each row this skill writes uses phase: 10-closeout and skill: opp-closeout.

Terminology

The platform is `Connect`, never `CommCare Connect` — in every word this skill puts in front of a human. The full rule, including the carve-outs for CommCare the mobile app, CommCare HQ and code-level identifiers, is `skills/_terminology.md`. Read it before writing prose; it is binding on this skill's output.

Change Log

DateChangeAuthor
2026-04-28Replace HITL workaround with connect_list_invoices + connect_get_invoice (ace-connect 0.8.1). Note: invoice page shape was not yet probed at 0.8.1 ship; atoms return conservative defaults until the page has been observed liveACE team
2026-10-18Add ## Inputs as parameters (opportunity_id, organization_slug, LLO) with run defaults; live-program mode reads the opportunity live and records outside the run. ace#3148.ACE (build-vs-maintain audit)
2026-05-08Add ## Decisions Log section: 2 anchor rows (closeout-depth, learnings-summary-scope) + bar-criterion reference. Pairs with decisions-log PR #4 (Phase 3-10 writes).ACE team (decisions-log PR #4)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dimagi-internal/ace/opp-closeout/badge)](https://verified-skill.com/skills/dimagi-internal/ace/opp-closeout)

Something wrong with this skill or its page? Tell us.