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
- Compare three validations.
- Explain why validation does not grant authorization.
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.
| Project | Role |
|---|---|
| Start/Actionability.Start.csproj | Intentionally incomplete version; exit code 2 |
| End/Actionability.End.csproj | Solution checking three counts; exit code 0 if matched |
| shared/Maf.Backlog | Shared 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;
Your task
dotnet build BaseTechnique.slnx -m:1 -c Release
dotnet run --project exercises/Actionability/Start/Actionability.Start.csproj -c Release --no-buildIn 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-buildExpected 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;
