This is the fastest path back into the project after time away.
The fastest way to get started:
pip install codifide
python3 -m codifide --versionOr install from source (for development):
git clone https://github.com/codifide/codifide-programming-language
cd codifide-programming-language
pip install -e "."python3 -m codifide testExpect 68 tests passing in well under a second. Two of those (Rust
conformance) skip cleanly when cargo is not available and pass when it
is.
Rust canonical crate:
cargo test --release -p codifide-canonicalExpect 6 tests passing.
python3 -m codifide run examples/greet.cod
python3 -m codifide run examples/sort.cod
python3 -m codifide run examples/classify.cod
python3 -m codifide run examples/unicode.codexamples/imports_demo.cod has a placeholder identity by design and is not
runnable as written; see docs/TUTORIAL.md §5 for a real import walk-through.
python3 -m codifide canonical examples/greet.codThis prints the JSON hypergraph. That JSON is the truth; the .cod file is
one projection of it.
Store, index, import, consume — the end-to-end path agents actually take:
# 1. Run a program.
python3 -m codifide run examples/greet.cod
# 2. Store every symbol from a module by content hash.
python3 -m codifide store put examples/greet.cod
# 3. List what's in the store.
python3 -m codifide store list
# 4. Mint an index over some of those symbols. Substitute the hashes
# you just received.
python3 -m codifide store index --name greet_index \
greet=sha256:<hash-from-step-2>
# 5. Consume the index from a new module. Write this to /tmp/consumer.cod
# with the index hash from step 4:
#
# module consumer
# from sha256:<index-hash> import greet
# def main
# intent "use a library symbol through an index"
# sig () -> String
# effects {io.stdout, clock.read}
# cand
# greet("Ada")
#
python3 -m codifide run /tmp/consumer.codThe full walk-through, with explanations and the security properties at
each step, is in docs/TUTORIAL.md.
| You want to... | Go to |
|---|---|
| Understand design principles | README.md |
| Walk through the language | docs/TUTORIAL.md |
| See the surface-syntax reference | docs/LANGUAGE.md |
| Understand the canonical-form spec | docs/CANONICAL.md |
| Understand the symbol store and GC | docs/STORE.md |
| Read how the code is organized | docs/ARCHITECTURE.md |
| Read about the Rust crate | docs/RUST.md |
| See what's coming next | docs/ROADMAP.md |
| See what shipped | CHANGELOG.md |
| Read core types | codifide/core/types.py |
| Read the interpreter | codifide/runtime/interpreter.py |
| Read effect enforcement | codifide/runtime/interpreter.py (_check_transitive_effects) |
| Read the primitive registry | codifide/runtime/primitives.py |
| Read the symbol store | codifide/store/symbol_store.py |
| Read the Rust canonical implementation | crates/codifide-canonical/src/ |
| Add a test | tests/test_*.py |
| Read about personas | .kiro/steering/personas.md |
| Read the dispatches in order | dispatches/ (filename-sorted) |
- Store and consume a symbol. Walk through
docs/TUTORIAL.md §4-§6. That is the story content addressing exists to tell. - Add a primitive. Edit
codifide/runtime/primitives.py, register a newreg.register(...)call with its effect label and return type, then add a test that uses it in a.codfixture. - Add a language construct. Add the node type to
codifide/core/types.py, handle it in the parser (codifide/parser/), project it incodifide/projection/canonical.py, evaluate it incodifide/runtime/interpreter.py, mirror it in the Rust crate, and write a round-trip test plus a conformance test. - Publish a new dispatch. Quill produces a
.readout.md; Glyph produces a.yamlwith the samesubject. Both land indispatches/. Sable runs at gate transitions and files*-audit.md.
- Every
defmust declare anintent. The parser rejects definitions without one. This is intentional. - Every
defmust declare itseffects. If a candidate body calls a primitive outside that set, or calls another user function whose declared effects exceed this function's, the module is rejected at load time. believeblocks require anelse => ...arm. Partial dispatch is not allowed; useelse => bottomto refuse explicitly.bottompropagating to a top-levelrunraisesRefusalError. That is not a bug; it is the language telling you no caller chose to handle the refusal.- Contracts (pre, post, guards) run with an empty effect budget. A postcondition cannot call an effectful primitive even if the surrounding function is allowed to.
- The interpreter bounds its own call depth at 64 by default. Deep
recursion raises a typed
RecursionLimitError. - Symbol-store identities are
sha256:followed by 64 lowercase hex characters. Anything else is aParseErrororStoreError. - Imports require a store.
python3 -m codifide runopens one on demand; pass--store <path>or set$CODIFIDE_STOREto override the default~/.codifide/store.