nex-programming
NEX programming
When the task includes a Native NEX project context card, use its supplied source and shell template immediately. Run the edit and real checks together. Look up additional code only when the card omits something the change needs.
Edit an app. At the project root, python3 <skill-dir>/scripts/api.py --project reads the manifest entry and its launcher together. If the affected source and launcher are already in context, edit directly. Mirror their imports, calls and run command. Request module.member,member only for operations the change introduces. For a large entry or a failing test, use symbol context and repair.
Create an app. Run nex init . --quiet and python3 <skill-dir>/scripts/api.py --start MODULE ... in one tool call. Select the operations you need. For a file-to-file app append --sample INPUT OUTPUT with its actual relative filenames. The lookup prints the entry, caller, signatures and a runnable check. Implement the entry starting with module app; and run the printed check in the same call as the edit. SDK 1.1 provides csv for streams, decimal for integers, file_io for complete writes, insertion_ordered_map for insertion order and ordered_map for sorted keys.
Write and run. Type each local, e.g. var i: i64 = 0;. Use while condition { ... } and exit via its condition or a return. Construct struct Span { first: i64; last: i64; } with Span(2, 7). Collection updates return the new value. Run from the project root. For a POSIX file writer use NEX_FILES_ROOT="$PWD" NEX_FILES_WRITE=1 nex run --quiet in the launcher. SDK setup
File examples. Feed your JSON pairs [["input text","expected text"]] on stdin to the printed nex sample command. It builds once and checks bytes in fresh directories. Give the tool an initial wait long enough for native compilation, e.g. 30 seconds on a small project. Use the project launcher in a temporary copy when the SDK lacks sample. Run any separately requested tests.