One contract. Four backends.
34 shared test cases. A CI workflow that runs them against the TypeScript, Python, Rust and C++ todo backends.
Commands are the product.
Ready to take a turn.
Ready.
Different surfaces. One shared state.It's what those buttons do. Put that capability in a command, and a screen becomes a choice. So does a terminal. So does an agent.
Keep business logic out of the screen. Don't build a second API just to let an agent in.
An agent shouldn't have to pretend to be a person clicking a button. Give it the same capability, directly.
Scripted agent. Real commands. No model or account needed.
“Give me a capability.
I'll take it from here.”
todo-list
Read the shared state.
todo-create
Create the requested task.
todo-list
Verify the result.
Waiting for your handoff.
Back to the shared listA person gets labels, feedback and a chance to change their mind. An agent deserves the same care in its command contract.
Know what a command takes, what it does and whether it changes state before calling it.
todo-list
Reasoning explains the outcome. Confidence is a signal, not permission to act.
todo-clearDESTRUCTIVEDelete the shared demo tasks in this tab. No undo.
No deletion requested.
This caller asks before execution. Destructive metadata describes risk; it doesn't enforce authorization.
“Something went wrong” isn't an answer. A useful error tells the next operator what to do.
{ "title": "", "priority": "high" }
// No title. No task.
// The command will explain what's missing.
An error can be the next step, not the last one.
“If it can’t be done via CLI, the architecture is wrong.”
One rule, applied to every feature. No UI-only code paths.
Build the capability.
Prove the job works.
Then design the interface.
A coding agent can implement a typed command, call it from the terminal and verify the result before a single component exists. The UI comes after the behavior is real.
Read the AFD skill
todo-create
takes a title and priority, returns a structured result, and rejects missing
input.
Call the command with an empty title, then a valid one. Verify the error is actionable and the task is created.
Create a task, list it, check the outcome. A scenario tests the user's goal across commands.
Connect the form to the proven command. Keep the rules in the command layer, not in the component.
34 shared test cases. A CI workflow that runs them against the TypeScript, Python, Rust and C++ todo backends.
Readable YAML scenarios express a goal, command steps and expected outcomes. Start with creating and verifying a task.
Read the scenarioAlfred checks AFD architecture, language parity and command quality through CLI and MCP, returning CommandResult.
Meet AlfredPackages, not a platform. Add AFD to your stack, one capability at a time.
npm install @lushly-dev/afd-server @lushly-dev/afd-cli zod
pip install afd
cargo add afd
include(FetchContent)
FetchContent_Declare(afd GIT_REPOSITORY https://github.com/lushly-dev/afd.git
GIT_TAG cpp-v0.1.0 SOURCE_SUBDIR packages/cpp)
FetchContent_MakeAvailable(afd)
target_link_libraries(my_app PRIVATE afd::afd)
Add the AFD skill to your project: command design, validation and the define-validate-surface workflow.
npx degit lushly-dev/afd/.claude/skills/afd .claude/skills/afd