Shape, Spec and Measure a Workflow Agent Slice
Pick a real recurring workflow, shape it into an outcome, assumptions, slice, spec and pre-registered metrics, then build a read-only agent slice, replay it on 20+ real cases and make an honest go, revise or stop decision.
Lessons this project uses
- 1Define the Outcome Before You Choose the OutputPhase 14: Agent engineering
- 2Discover the Workflow People Actually PerformPhase 14: Agent engineering
- 3Map Assumptions and Resolve the Riskiest One FirstPhase 14: Agent engineering
- 4Choose the Smallest Slice That Can Change the DecisionPhase 14: Agent engineering
- 5Write Specifications That Preserve JudgmentPhase 14: Agent engineering
- 6Design Success Metrics Before the Result ExistsPhase 14: Agent engineering
- 7Choose Prototype, Pilot, or Production DeliberatelyPhase 14: Agent engineering
- 8Build a Feedback Ratchet with Ownership and RetirementPhase 14: Agent engineering
What You'll Build
You take one real, recurring workflow (yours, a colleague's, a small business's, or a public proxy such as issue triage on an open-source repo you use) and decide whether an agent should touch it at all. You produce the shaping artifacts from the product-judgment lessons, commit a measurement plan before any result exists, then build the smallest slice that can change the decision: a propose-only agent that never writes, replayed against at least 20 real historical cases next to a baseline. Most of the grade is for judgment and evidence, not for agent sophistication.
Requirements
- Outcome frame in
shaping/outcome-frame.jsonwith all six parts: user, situation, current behavior, desired outcome, constraints, non-goals. Write a validator that flags solution leakage (a product form, model, framework or interface named in the desired outcome) and a test proving it flags a deliberately leaky variant. - Workflow evidence in
shaping/workflow-evidence.json: at least 6 ordered steps, each with actor, trigger, action, input, output, friction, authority and evidence, and an evidence level ofdirect,artifact,reportedorinference. Include at least one exception path, one authority boundary and the computed direct-evidence ratio. The evidence must come from a real source you name (logs, tickets, email threads, a timed run of yourself doing the task). - Assumption map in
shaping/assumption-map.json: at least 5 falsifiable assumptions covering at least the value, feasibility and safety classes, each scored 1 to 5 for impact, uncertainty and irreversibility. Identify the highest open risk and design its experiment: claim, sample, observable, threshold, and the next decision for pass, fail and ambiguous. - Slice decision in
shaping/slice-decision.json: at least 3 candidate slices, the required proof set, which candidates fail the eligibility gate and why, the chosen slice, and a stop rule that does not end in "keep building". - Specification in
shaping/spec.json: outcome, invariants (at least one authority invariant such as "the agent never sends, edits or deletes"), examples (normal, edge, failure, forbidden), non-goals, a decision policy that marks each decisionlocked,boundedordelegatedwith a reason, and the proof required for each invariant. - Measurement plan in
shaping/measurement-plan.json, committed to git before the replay results file exists: a goal, questions, and at least one outcome metric, one guardrail and one counter-metric, each with name, direction (at-leastorat-most), threshold, window, source and population, plus written pass, fail and ambiguous rules. - The slice. An agent that takes one case and returns a structured proposal validated against a JSON schema. Tools are read-only; any write is expressed only as a proposal. Use any OpenAI-compatible endpoint (including the KatalockAi API) or a local model. Also implement a baseline: the recorded human decisions and times, or a simple rule-based heuristic.
- Replay. Run the agent and the baseline over at least 20 real, anonymized historical cases with ground truth (what the human actually decided). Log every tool call to an audit log and check the guardrail automatically (for example, zero side-effecting calls). Compute every metric in the plan and write
results/measurement-report.jsonwith value, threshold, pass or fail per metric and the decision the pre-written rules produce. Do not edit thresholds after the run; if you believe one was wrong, say so in the README and leave it. - Stage decision in
shaping/stage-decision.json: prototype, pilot or production, with the controls required and exit criteria for expand, revise or stop, consistent with your actual results. - Feedback ratchet in
shaping/feedback-backlog.json: at least 4 signals from the replay (wrong answers, near misses, slow cases), each routed to the owning layer (evaluation or test, context, policy, runtime, backlog) with owner, priority, artifact to change, verification and retirement condition. Implement at least one action, for example turning a failed case into a regression test that now runs in the replay. - Tests for each artifact validator, including the leaky-outcome test and a test that a measurement plan without a guardrail is rejected.
Constraints
- CPU only. A local 1B to 8B model through Ollama or llama.cpp is enough, or any OpenAI-compatible endpoint. No specific commercial provider is required. Cap tokens per call and cache responses so the replay can be re-scored offline.
- Data must be real but anonymized; never commit personal data, customer names or credentials. If your workflow is confidential, use a public proxy with real ground truth, such as label triage on public GitHub issues or answered threads from a public support forum.
- The agent must not have write access to any real system during the replay. The read-only boundary must be enforced in code, not only in the prompt.
Stretch Goals
- Run a bounded pilot for a few days with one real user, with a named owner and a rollback path, and report what the offline replay missed.
- Compare two prompts or two models on the same replay without touching thresholds, and report whether the decision changes.
- Have a second person label a subset of cases and report agreement with your ground truth.
How to Submit
Public repo with: README.md, shaping/ (all JSON artifacts above), agent/ (agent, tools, schema, baseline), replay.py, tests/, data/cases/ (anonymized cases or a script that fetches the public proxy), results/measurement-report.json, results/audit-log.jsonl. The README must explain the workflow and why you chose it, how to run the replay, the results table against thresholds, the decision and stage, the riskiest assumption and what the evidence said about it, and the limitations of a 20-case replay. Paste the outputs listed under evidence.
How It's Reviewed
Professor Katalock reads your repository and the evidence you paste, and scores each criterion out of 100. You pass with a weighted total of 70 or more and no criterion below 40. A copied or padded submission is flagged and fails.
Submit
Push your work to a public GitHub repository with a README that explains how to run it, then paste the evidence below. Up to 3 reviews a day, free.
- Output of git log --format='%h %ad %s' --date=iso -- shaping/measurement-plan.json results/measurement-report.json
- Full terminal output of python replay.py (or your equivalent command)
- Contents of results/measurement-report.json
- Full output of your test run
- Model and endpoint used (local or hosted) and a one-paragraph description of your data source and how it was anonymized
- A short reflection: your riskiest assumption, whether the evidence supported it, and one case the agent got wrong
Reviews are done by AI against the rubric above. They check the evidence in your repository; they are not a substitute for a human code review, and a review can be wrong. If you think it is, improve the README so the evidence is unmistakable and resubmit.