GitHub - pixel-1998/axis-protocol: The Protocol is the Contract. Everything else is implementation. State -> Transform -> State. · GitHub
/" data-turbo-transient="true" />
Transform -> State. - pixel-1998/axis-protocol">
Transform -> State." /> Transform -> State. - pixel-1998/axis-protocol" /><br>Transform -> State. - pixel-1998/axis-protocol" /> Transform -> State." /> Transform -> State. - pixel-1998/axis-protocol" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
pixel-1998
axis-protocol
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>13 Commits<br>13 Commits
tests
tests
LICENSE
LICENSE
README.md
README.md
SPEC.md
SPEC.md
axis.py
axis.py
View all files
Repository files navigation
AXIS Protocol
The Protocol is the Contract. Everything else is implementation.
The Specification
State<br>Transform<br>State
Mathematically: Sₙ₊₁ = T(Sₙ)
The Only Laws
Every Transform receives a State.
Every Transform returns a State.
The Kernel never interprets the State.
The Kernel never knows the Transform.
Any future technology must implement only: State -> State.
A Transform may terminate the pipeline early by producing a final State instead of continuing composition. Remaining Transforms do not execute.
Why This Exists
This is an experiment in finding the smallest possible contract for orchestrating state transformations.
It will not survive because someone believed in it. It will survive because people can implement it, extend it, and use it to solve real problems without changing this minimal contract.
That is what makes a protocol last.
Use It
Basic pipeline
from axis import Axis, Transform
class MyTransform(Transform):<br>def __call__(self, state):<br>state["result"] = "done"<br>return state
axis = Axis()<br>axis.use(MyTransform())<br>final_state = axis.run({"start": True})
Early termination (Law 6)
from axis import Axis, Transform, StopPipeline
class CheckLimit(Transform):<br>def __call__(self, state):<br>if state.get("rate_limited"):<br>raise StopPipeline(state)<br>return state
class Process(Transform):<br>def __call__(self, state):<br>state["processed"] = True<br>return state
axis = Axis().use(CheckLimit()).use(Process())<br>result = axis.run({"rate_limited": True}) # Skips Process<br># result == {"rate_limited": True}
For the formal specification, see SPEC.md.
Licensed under the MIT License. See LICENSE for details.
About
The Protocol is the Contract. Everything else is implementation. State -> Transform -> State.
Resources
Readme
License
MIT license
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
stars
Watchers
watching
Forks
forks
Report repository
Releases
No releases published
Packages
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Python<br>100.0%
You can’t perform that action at this time.