ENع
PHASE 3 — DAY 08

Build a Guarded Workflow

Translate one low-risk SOP into a proposal-only assistant, define its contract, and earn confidence through external tests.

SELF-PACED LABSYNTHETIC DATAHANDS-ON

This lesson produces a local prototype, not a production service. Use fictional fixtures, keep external writes disabled, and require a person to approve any consequential output. Legal, financial, health, employment, access-control, and safety decisions need qualified owners and domain-specific review.

Part 1: Choose an Eligible Task

Start with a narrow, reversible task where an error is easy to see and correct: normalize a fictional inventory file, classify synthetic support messages, or draft a report from made-up metrics. Do not start with payments, ad spend, hiring decisions, customer messages, account changes, or regulated advice.

1
Clear input — a documented schema and a synthetic fixture can represent the task.
2
Clear output — the result can be validated before anyone uses it.
3
Reversible effect — the lab writes only a draft to a dedicated output folder.
4
Named reviewer — a competent person owns the accept/reject decision.

Part 2: Write the Workflow Contract

An SOP explains how work is normally done. A workflow contract adds machine-checkable limits. Write the contract before asking for implementation.

Minimum contract

Use deterministic code where it is stronger

Arithmetic, schema validation, deduplication, date parsing, permissions, and policy rules should normally be implemented as deterministic checks. Reserve the model for work that benefits from language interpretation. A smaller, testable workflow is often safer than a chain of model calls.

Part 3: Build in Proposal Mode

Read WORKFLOW.md and the synthetic fixtures in fixtures/. Do not implement yet. Produce: 1. A threat model: untrusted input, prompt injection, path traversal, dependency risk, data leakage, and unintended writes. 2. A file-by-file implementation plan. 3. Input and output schemas. 4. Tests for normal, boundary, malformed, duplicate, empty, and adversarial fixtures. 5. An allowlist of required local tools. Network access is denied. 6. A rollback plan. Do not add dependencies without naming the package, publisher, version, license, purpose, and safer alternatives. Keep permission prompts enabled. Wait for my review.

After reviewing the proposal, approve the smallest coherent change. Inspect every file. Reject code that hides errors, accepts unknown fields, follows instructions embedded in data, reads outside the workspace, logs sensitive values, or performs external actions.

Part 4: Treat Skills and MCP Servers as Software

A skill, script, plugin, dependency, or MCP server may add code execution, file access, network access, or third-party data handling. A polished description is not a security review. Add one only when the workflow needs it and after inspecting its provenance and behavior.

Supply-chain review

Handle credentials deliberately

Do not paste secrets into a chat, prompt, source file, log, screenshot, or repository. Environment variables are convenient but are not automatically a secret-management boundary. For shared or hosted systems, use an appropriate managed secret store, narrowly scoped credentials, rotation, audit logs, and separate test accounts. Credential handling and retention depend on every tool and service in the path; verify their current terms and architecture.

Part 5: Evaluate With External Evidence

Create expected outputs before running the workflow. Include representative synthetic cases plus malformed and adversarial cases. Compare actual results with the expected result using deterministic checks and human review. Model confidence scores do not establish correctness.

A
Case ID and fixture — versioned, synthetic, and reproducible.
B
Expected behavior — including rejection and stop behavior.
C
Observed behavior — output, logs, latency, cost, and tool calls.
D
Decision — pass, fail, or needs review, with a named reviewer.

Part 6: Shadow Before Action

A passing lab does not justify production access. The next possible stage is a separately authorized sandbox or shadow run: the workflow observes an approved, minimized data feed and drafts a result while the existing process remains authoritative. No message, update, purchase, budget change, or account action occurs. Promotion requires project-specific thresholds, security review, privacy and legal approval, an incident owner, and a tested rollback.

Day 8 Completion Checklist

Complete before moving on