Inspiration
I wanted to explore a problem that often gets overlooked when building software: what happens when an action goes wrong?
Many tools can execute an action, but fewer can prove what happened, recover safely, or explain why an operation cannot be reversed. I wanted to build something around that missing layer of trust.
That idea became BONES: a small, reusable Python skeleton for making actions safer.
What it does
BONES provides safety controls based on how reversible an action really is.
I built two independent applications on top of the same skeleton:
- ORBIT: A file organizer that turns a plain-language goal into a reviewable plan. Before execution, I let the user inspect the changes. Afterward, the journal supports verified undo, including checks for unexpected changes to files.
- Staged Pay: A payment-flow demonstration that separates authorization, holding, cancellation, and capture. A payment can be cancelled during its allowed window, but once captured, it requires a refund rather than pretending it can be undone.
BONES also blocks dangerous operations such as shell commands, permanent deletion, and network writes.
The central idea is simple: an action should only be reversible when the system can actually verify that reversal.
How I built it
I built BONES using Kiro and a spec-first, test-first workflow. I started by defining the shared runtime and the two applications separately, then developed their behavior around explicit safety rules.
The shared skeleton handles the common safety logic, while ORBIT and Staged Pay remain independent applications. I used Python, FastAPI, JSON Schema, pytest, and Hypothesis to build and test the system.
I also added adversarial test tools, randomized scenarios, failure simulations, and an MCP server with read-only verification tools. These help inspect plans, simulate operations, verify journals, and test the safety boundaries.
I deployed both applications as separate services on Render, using separate Dockerfiles and application folders in one public repository.
Challenges I ran into
The hardest part was making the word "undo" mean something real.
Restoring a file is not enough if another process has changed it since the original operation. I had to make the journal preserve recovery information, verify restored content, and stop safely when unexpected changes appear.
The payment application presented a different challenge. Cancelling an authorized payment and reversing a captured payment are not the same operation. I had to keep that distinction explicit rather than claim that every payment could be undone.
I also encountered compatibility and deployment issues while getting both applications running independently. Testing and fixing those issues helped me make the final deployment more reliable.
Accomplishments that I'm proud of
I'm proud that BONES is more than a demonstration of two interfaces. Both applications use the same reusable safety runtime while solving different problems.
I'm especially proud of the verified file-recovery approach, the explicit distinction between cancellation and refunds, and the adversarial tests designed to challenge the system rather than only demonstrate successful cases.
I also got both applications deployed independently and made their limitations visible instead of hiding simulated behavior behind claims of real-world functionality.
What I learned
I learned that safety cannot depend only on a planner making good decisions. The execution layer must enforce its own rules.
I also learned that reversibility is not a universal feature. Some operations can be verified and restored; others can only be cancelled before a point of no return; and some should simply be blocked.
Most importantly, I learned to treat evidence as part of the product. A system should explain what it did, what it verified, and where recovery stopped.
What's next for BONES
I want to expand the skeleton with more reusable safety patterns and additional independent applications.
My next focus is improving the verification tools, exploring more real-world integrations, and making the recovery evidence easier to inspect. I also want to test the optional PayPal Sandbox integration more thoroughly before making stronger claims about it.
My long-term goal is to make BONES a practical foundation for applications where safe execution, accountability, and honest recovery matter.