An agent-first coding workflow with Wysna
Trace a change across three targets, inspect a structured compiler error, and test and apply a two-file patch with the Wysna 1.1.0 Native SDK.
An AI coding agent is asked to raise the quantity limit of a quote from 1,000 to 1,200. In the shared-browser-app example, the same validation function serves a native CLI, a WebAssembly target, and a service. The agent queries the compiler to find those dependencies and checks the proposed change together with its test.
The commands below use the Wysna 1.1.0 Native SDK, Git, curl, and a POSIX shell such as Bash or zsh. On Windows, use Git Bash or WSL with the corresponding SDK. Start from a fresh checkout in a scratch directory.
git clone --depth 1 --branch v1.1.0 https://github.com/WashingtonYandun/Wysna.git wysna-workflowcd wysna-workflow/examples/shared-browser-app-
Find what the change affects.
Terminal window wysna graph --manifest wysna.toml --symbol quote_validation_code --rel impact --output-format=json-v1In
result.entries,app,web,serviceandshared-pricing-contractare all markedaffected. The report also records boundaries it cannot follow, such as JavaScript on the web target and C FFI in the service. -
Read a compiler error. In a separate file, try the new limit as a string.
Terminal window sed 's/quantity > 1000/quantity > "1200"/' src/pricing.wysna > ../../pricing-invalid.wysnawysna check --output-format=json-v1 ../../pricing-invalid.wysnaThis check is expected to fail. The diagnostic contains code
W2001, the byte span of the incorrect operand, and the types the agent needs to repair it:{"code": "W2001","data": { "kind": "type_mismatch", "expected": "int", "found": "str" }} -
Preview and test a two-file patch. The JSON patch uses the integer
1200and updates the test boundaries to accept1200and reject1201.Terminal window curl -fsSL https://wysna.wysofia.com/agent-workflow/edit.json -o ../../edit.jsonwysna patch --manifest wysna.toml --edits ../../edit.json --test --output-format=json-v1Review
result.changesandresult.test_verification. The compiler reportedstatus: "passed"fortest:shared-pricing-contractandwritten: falsein the preview. -
Apply the plan and run the project test. Replace
PASTE_PLAN_HASHwith the value ofresult.plan_hashfrom your preview.Terminal window PLAN_HASH=PASTE_PLAN_HASHwysna patch --manifest wysna.toml --edits ../../edit.json --test --expect-plan-hash "$PLAN_HASH" --apply --output-format=json-v1wysna project test --manifest wysna.tomlgit diff -- src/pricing.wysna tests/pricing.wysnaThe apply step checks the same plan and runs the test again. A successful apply reports
written: true. If an input has changed, preview again to obtain a current plan.
This run verifies the shared pricing test. The JavaScript host, C adapter, and deployed service require their own tests.
Connect your coding agent
Section titled “Connect your coding agent”The MCP guide shows how to expose graph queries, diagnostics and patches to a compatible client. Use the capability reference to understand compiler reports and runtime boundaries. The benchmark methodology documents the models, tasks and limitations of the separate AI evaluations.