# Library Context

### Job this is for

Review an AI workflow before publication and after changes to prompts, models, tools, retrieval, memory, approval rules, or failure logs.

### When to use it

- a reusable Skill or workflow needs eval cases before publication
- a workflow reads untrusted content before acting
- a model, prompt, tool, memory path, or approval rule changes
- a Skill needs create, validate, publish, monitor, update, deprecate, or retire decision
- an agent self-review proposes changing memory, a Skill, an automation, or a workflow rule

### Inputs needed

- workflow contract and intended behavior
- blocked behavior and unsafe examples
- golden task set and expected behavior
- proposed change and reason
- failure evidence and frequency
- owner and publication decision route

### Expected output

- negative eval cases
- prompt-injection test plan
- regression replay result
- lifecycle decision
- self-review writeback decision
- publication, update, deprecate, retire, or block recommendation

### What good looks like

- every workflow has normal, messy, sensitive, unsupported, and hostile-input evals
- untrusted input is tested before tool access or memory writeback
- regressions are replayed before publication or update
- lifecycle decisions name evidence, owner, and next review date
- self-review writebacks cannot silently rewrite memory or skills

### Operating steps

1. Capture the workflow contract and intended behavior.
2. Write positive and negative eval cases before publication.
3. Test prompt injection where the workflow reads untrusted content.
4. Replay golden tasks when models, prompts, tools, memory, retrieval, or approvals change.
5. Decide whether to publish, update, deprecate, retire, or block the workflow.
6. Route self-review writebacks through human approval before changing memory or automation rules.
7. Record the lifecycle decision and next review date.

### Operator run sheet

| Step | Owner                        | Action                                     | Required input                                        | Data class   | Approved tool path      | Approval gate                              | System of record | Done when                                                         |
| ---- | ---------------------------- | ------------------------------------------ | ----------------------------------------------------- | ------------ | ----------------------- | ------------------------------------------ | ---------------- | ----------------------------------------------------------------- |
| 1    | Workflow Owner               | Define eval coverage and blocked behaviors | workflow contract, intended behavior, unsafe examples | internal     | approved eval workspace | owner before publication                   | eval registry    | eval set is complete                                              |
| 2    | AI Ops or Security           | Run prompt injection and regression checks | untrusted sources, golden tasks, proposed change      | confidential | approved test runner    | security when tools or memory are affected | test run log     | critical failures are zero or release is blocked                  |
| 3    | Enablement or Workflow Owner | Make lifecycle decision                    | eval results, usage evidence, failure evidence        | internal     | review channel          | owner approval                             | lifecycle log    | publish, update, deprecate, retire, or block decision is recorded |

This run sheet is the part a manager can operationalize. If the team cannot identify eval owner, approval gate, and lifecycle system of record, the workflow is not ready to publish.