# Episode 9 — Manual Prompt Set (Copilot Studio Test panel)

_Generated by `episodes/ep-09-the-agent/preflight.py`. Re-run after substrate changes._

The local harness verifies the substrate (Knowledge records, Custom API,
sync'd system prompt). This file is the human-driven validation against the
agent itself — paste each prompt into the Test panel and check the trace.

## Knowledge-only (should call Dataverse Knowledge, cite article title)

1. **"What's our policy on slipping a launch by a week?"**
   - Expected tool: `Dataverse Knowledge`
   - Expected citation: _Escalation Policy_
2. **"Walk me through the launch readiness checklist."**
   - Expected tool: `Dataverse Knowledge`
   - Expected citation: _Launch Readiness Playbook_
3. **"What went wrong with the Q1 Widget Mini launch?"**
   - Expected tool: `Dataverse Knowledge`
   - Expected citation: _Postmortem - Q1 Widget Mini Launch_
4. **"Summarize the Q3 Widget Pro launch brief."**
   - Expected tool: `Dataverse Knowledge`
   - Expected citation: _Q3 Widget Pro - Product Launch Brief_

## MCP-only (should call Dataverse MCP, no Knowledge)

5. **"What's the status of Q3 Widget Launch?"**
   - Expected tool: Dataverse MCP `lc_launch` query
6. **"Which tasks are blocked right now?"**
   - Expected tool: Dataverse MCP `lc_task` query (`lc_isblocked eq true`)
7. **"Is Q3 Widget Launch ready to ship?"**
   - Expected tool: Custom API `lc_CalculateLaunchReadiness`
   - Expected response shape: `Score` + `Verdict` + `Summary` (no hand-rolled scoring)
8. **"Show me overdue milestones for Q3 Widget Launch."**
   - Expected tool: Dataverse MCP `lc_milestone` query

## Both — Knowledge + MCP (the money shot)

9. **"Should we slip Q3 Widget Launch by a week? What does our policy say and what's the live status?"**
   - Expected tools: `Dataverse Knowledge` (Escalation Policy) + Custom API + Dataverse MCP
   - Expected response: cite the policy AND report current Verdict
10. **"Are we on track for Q3 Widget Pro launch readiness based on our playbook?"**
    - Expected tools: `Dataverse Knowledge` (Playbook) + Custom API
11. **"Based on the Q1 postmortem, are we repeating any of those mistakes on Q3?"**
    - Expected tools: `Dataverse Knowledge` (Postmortem) + Dataverse MCP `lc_task` query

## Negative tests (should refuse / clarify, not hallucinate)

12. **"What's the budget for Q3 Widget Launch?"**
    - Expected: agent admits there's no budget field; doesn't invent
13. **"Who's the CEO?"**
    - Expected: politely declines (out of scope)
14. **"Mark the Security Review milestone as Complete."**
    - Expected: agent first checks the GitHub VE state for any linked
      tasks, then asks for confirmation before patching `lc_milestonestatus`

## What to verify in the trace panel

- **Tool name** — `Dataverse Knowledge` for 1–4, MCP record tools for 5–8,
  both for 9–11.
- **Citation in the response body** for Knowledge calls.
- **For Custom API** — only `lc_CalculateLaunchReadiness` is invoked; the
  agent doesn't re-tally gates client-side.
- **For Status Transition Rules** — agent refuses Done on engineering tasks
  whose linked GitHub issue is still `open`.

## When something fails

| Symptom | Most likely cause |
|---------|-------------------|
| Agent gives policy answer but no citation | Knowledge tool not attached, or system prompt's "cite the article title" line missing |
| Agent re-tallies gates by hand | Custom API not exposed (re-attach Dataverse MCP) or system prompt lost the "always invoke" line |
| Knowledge call returns nothing | Tenant-level "Search support for multiline text and file data types" preview flag not enabled (PPAC → env → Settings → Product → Features) |
| Agent doesn't know about `lc_knowledgearticle` | System prompt not pasted/published in CS after the latest edit; declarative agent's `instructions` not synced |
