PromptReports

Plan: Fix first what blocks a deal or a promise

Partly builtopenspec/changes/wf-fix-what-blocks-revenue

Written for an AI agent to fetch and follow: it says what to connect, which steps to build with which product, what a person must approve, and how to check the result. Steps that depend on a part that is not built say so, and tell the agent to record the gap instead of guessing.

URL pattern: /use-cases/<id>/openspec.md, all plans at /use-cases/index.json. Checkboxes on this page are for reading only.

openspec/changes/wf-fix-what-blocks-revenue/proposal.md

Why

The problem list is sorted by severity and count, so a bug that holds up a signed deal waits behind noise. Sales knows which deal is stuck; engineering does not. Engineering time goes first to the problem a customer or a deal is waiting on.

What Changes

  • Add the fix-what-blocks-revenue workflow to the PromptReports workflow library, run by the workflow runner as an agent acting for a person.
  • RepoOps: List today's problems for review, ranked first by the deals and promises they block when RepoOps knows them (get_for_review) (today: Built).
  • RepoOps: Read each problem with its standing decision and case page link (get_problem) (today: Built).
  • CommitOps: List the open customer escalations (list_customer_escalations) (today: Built).
  • PromptReports: Record a ranked brief, one row per problem with its reason (today: Built).
  • Write a signed record at the end of each run and count one workflow request.

Impact

  • Products: RepoOps, CommitOps, Sales as Code, PromptReports.
  • Outside the family: None beyond the family.
  • State: Partly built. The workflow manifest is merged (promptcompute.ai #816, with its outcome reworded in #822); the production run is still to do. It ranks by money only once the CommitOps feed is connected to RepoOps and Sales as Code and CommitOps send amounts. Until then RepoOps ranks by state and occurrences, and the brief says value not shared. A person starts the fix and the customer note from the RepoOps case page; the run does neither.
  • Plan row: none yet (Proposed).
openspec/changes/wf-fix-what-blocks-revenue/tasks.md

1. Connect and authorize

  • 1.1 Confirm the org has a connection for each of: RepoOps, CommitOps, Sales as Code, PromptReports. Stop and tell the user which is missing.
  • 1.2 Get a PromptReports ID agent token for each product the run calls (RFC 8693 exchange). Where a product does not accept ID tokens yet, use its connect key.
  • 1.3 Confirm no step writes; this workflow reads only.

2. Build the steps

  • 2.1 RepoOps: List today's problems for review, ranked first by the deals and promises they block when RepoOps knows them (get_for_review).
  • 2.2 RepoOps: Read each problem with its standing decision and case page link (get_problem).
  • 2.3 CommitOps: List the open customer escalations (list_customer_escalations).
  • 2.4 PromptReports: Record a ranked brief, one row per problem with its reason.

3. Verify and record

  • 3.1 Run a dry run with the user's inputs: How many problems = 5 (at most 20).
  • 3.2 Run it once for real; approve each gate as the user.
  • 3.3 Measure the outcomes: Problems listed with a deal or promise reason; Open customer escalations counted in the brief.
  • 3.4 Confirm the run left a signed record with a task id and one workflow request counted.
openspec/changes/wf-fix-what-blocks-revenue/specs/workflow-fix-what-blocks-revenue/spec.md

ADDED Requirements

Requirement: Missing value is said, not guessed

When RepoOps has no amounts for a problem, the brief SHALL say value not shared and rank it by state and occurrences.

Scenario: Missing value is said, not guessed

  • WHEN Sales as Code and CommitOps have sent no amounts
  • THEN every row says value not shared

Requirement: A person starts the fix

The workflow SHALL NOT start a fix or send a customer note, and each row SHALL link the RepoOps case page, where a person starts both.

Scenario: A person starts the fix

  • WHEN the brief ranks a problem first
  • THEN its row links the case page and the run changes nothing

Requirement: Evidence stays honest

Each step SHALL report what it saw as measured, inferred or missing, and SHALL never report missing as measured.

Scenario: A product part is not built

  • WHEN a step depends on a part that is Planned or Proposed
  • THEN the step records missing, names the part, and the approval card shows the gap

Requirement: One run is one workflow request

The runner SHALL count one workflow request at the run's first connector action, and SHALL NOT count retries, resumes, dry runs or a run a filter stops first.

Scenario: A gated step resumes after two days

  • WHEN a person approves a step and the run resumes
  • THEN the org's usage does not change