e-naxosMAF COURSE / COURS
Français

MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1

Analysis and action: Start/End

Compare valid analysis with an action-ready draft, without writing to a database.

Objectives

Working files and prerequisites

Prerequisites: Demo050 and Demo080. Work in a complete distribution copy with exercises/Actionability/Start, End and shared/Maf.Backlog. Only this exercise distributes Start/End completion; no model or state file is required.

Two projects, one shared contract
ProjectRole
Start/Actionability.Start.csprojIntentionally incomplete version; exit code 2
End/Actionability.End.csprojSolution checking three counts; exit code 0 if matched
shared/Maf.BacklogShared validation to preserve unchanged
using Maf.Backlog;

var draft = new BacklogDraft("CSV export", "Bug", "high", "Reporting",
    "Large CSV exports freeze the UI.", ["Which dataset size reproduces the issue?"]);
Console.WriteLine("Exercise incomplete: implement the read-only analysis/action comparison.");
Console.WriteLine($"Analysis errors: {draft.Validate(forAction: false).Length}");
return 2;

exercises/Actionability/Start/Program.cs · L1–L7 · 9a895c94534c

Source code · Actionability · Folder

Your task

dotnet build BaseTechnique.slnx -m:1 -c Release
dotnet run --project exercises/Actionability/Start/Actionability.Start.csproj -c Release --no-build

In Start, call Validate(forAction: false) then Validate(forAction: true) on the initial draft. Create a copy with an empty ClarifyingQuestions array and validate that copy for action. Print all three error counts. Do not add persistence or permission, or change the shared validator.

What to explain

The initial draft contains an open question about dataset size. It can be acceptable for analysis while still blocked for action. Removing that question in a controlled fixture does not prove that a real user answered it.

Hints before the correction

Compare Validate(forAction: false) with Validate(forAction: true). Use with to create a new draft; leave the shared validator unchanged. Print all three counts and return a code checking their values.

Compare with End

dotnet run --project exercises/Actionability/End/Actionability.End.csproj -c Release --no-build

Expected results from the End file: Analysis errors: 0; Action errors before clarification: 1; Action errors after clarification: 0. End checks all three values and exits 0 if matched, otherwise 1. No new execution of this exercise is claimed here.

using Maf.Backlog;

var draft = new BacklogDraft("CSV export", "Bug", "high", "Reporting",
    "Large CSV exports freeze the UI.", ["Which dataset size reproduces the issue?"]);
int analysisErrors = draft.Validate(forAction: false).Length;
int actionErrors = draft.Validate(forAction: true).Length;
var clarified = draft with { ClarifyingQuestions = [] };
int clarifiedErrors = clarified.Validate(forAction: true).Length;
Console.WriteLine($"Analysis errors: {analysisErrors}");
Console.WriteLine($"Action errors before clarification: {actionErrors}");
Console.WriteLine($"Action errors after clarification: {clarifiedErrors}");
Console.WriteLine("Validation does not grant permission or approval. No business write was attempted.");
return analysisErrors == 0 && actionErrors == 1 && clarifiedErrors == 0 ? 0 : 1;

exercises/Actionability/End/Program.cs · L1–L13 · 9a895c94534c

Source code · Actionability · Folder

A validation boundary

Return to the reasoning

Prerequisites

Continue reading

lot014-consolidation-1 · 2026-10-24 · 9a895c94534cd5fc6f3da883e37e5f7856e588c1