The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
LingoLOGOS codex-python topology
An external Python programming package and six-node topology built on top of the LingoLOGOS
codex kernel, a kernel this folder neither modifies nor carries. This dataset is that folder
published as it stands: the package under lingologos_python/, the six node folders with their grammar,
ontology and seed envelope, the one executable the six roles share, the two fixtures under
fixtures/ (a small package, and the pattern laboratory the catalog is measured on), the generated
cases under patterns/, the tests, the gate runner and the publisher, and this card in place of the
folder README. The kernel is a separate dataset at
https://huggingface.co/datasets/tailot/lingologos-codex, and the section
"What this bundle needs from the codex kernel" below says how the two find each other.
It provides everything needed to inspect, edit, test, and transactionally commit changes in a
Python repository through the codex assurance rules (VERIFIED, SINGLE_PROVER, UNKNOWN).
python -B tools/run_gates.py
GATES: CONFIRMED (9 gates: 9 CONFIRMED, 0 REJECTED, 0 ABSTAIN)
The gate runner is where this bundle states its numbers out loud: 9 gates, 77 tests across 9 files,
18 files under nodes/, and a kernel it does not carry. tools/publish_dataset.py re-derives every
one of those numbers from the tree it is standing in and stops the upload when the card and the code
beside it disagree.
Contents
lingologos_python/_codex_bridge.py: finds the kernel without copying it: an already importablelingologos_codex, thenLINGOLOGOS_CODEX_ROOT, then a siblingcodex/ordatasets/codex/among the ancestors.
lingologos_python/adapter.py:PythonLanguageAdapterandStrictPythonLanguageAdapterimplementing the five-methodlingologos_codex.adapter_contract.LanguageAdaptercontract.
lingologos_python/ast_graph.py: AST symbol, method, inheritance, relative/absolute import, and call graph extraction (discover_python_files,extract_python_graph).lingologos_python/test_selector.py: import-aware Python test selection (select_python_tests).lingologos_python/gates.py: bytecode-freeast.parse+ in-memorycompilegate, optional static checkers (mypy,ruff,pyright,flake8) that returnABSTAINwhen missing, andpytest/unittesttest runner with failed-target parsing.lingologos_python/rules.py: five shape rules over a named function. Each rule reads the function through its syntax tree, refuses with a named reason code when the shape is not the one it claims, and returns the edit texts when it is (RULES,RULE_IDS,open_target).
lingologos_python/patterns.py: the catalog above the rules. A card states the shape it claims, why that shape is worth changing, what must hold before the rule runs, what test locks the change, and the reason codes it answers with when it refuses (PATTERNS,pattern_card,scan_pattern,plan_pattern).
lingologos_python/session.py:PythonWorkspaceSessionfor safe staged verification and atomic disk commits vialingologos_codex.fsadapter(verify,edit_file,create_file,delete_file,apply_pattern,run_retry_loop, andrun_topology_subprocesses).lingologos_python/cli.py:lingologos_pythonCLI (verify,edit,create,symbols,select-tests,patterns list|show|scan|apply,check-adapter).
fixtures/pattern_lab/: a small package with one function planted in the shape of each card and one planted to be refused, used by the tests and by the coverage counts.patterns/pattern_cases.jsonl,patterns/coverage.json: the generated case corpus (one accepted and one refused case per card) and the coverage statement, whose denominator is that fixture.topology.json,agents/python_agent.py,nodes/<role>/: external six-node topology using thecodexkernel as its base. The six executables it names are written relative todatasets/, so in a standalone copy that leading name is simply the folder you are standing in.codex.python.json: declarativeCommandLanguageAdaptertemplate for Python projects.
The pattern catalog
Five cards, one per shape this bundle can actually carry out:
| Card | Shape it claims | Family |
|---|---|---|
annotate-literal-defaults |
a default that is a string, number or None literal and states no type |
typing |
mutable-default-to-none |
a [] or {} default, which is one object shared by every call |
mutation |
chain-to-registry |
an if/elif chain dispatching on one name, ending in a refusal |
shape |
open-to-context-manager |
a file handle opened in a function body and closed by hand | resources |
bare-assert-to-explicit-raise |
a bare assert as the guard of a function, which vanishes under -O |
contracts |
A card is not a prompt: it names a syntax-tree shape, and lingologos_python/rules.py refuses anything
that is not that shape. chain-to-registry refuses a chain whose branches take different kinds of
arguments (BRANCH_SHAPE_MISMATCH), open-to-context-manager refuses a handle that escapes the function
it opened (HANDLE_ESCAPE), mutable-default-to-none refuses a default that already carries an
annotation (ANNOTATED_MUTABLE_DEFAULT). A refusal is an answer, not a failure: it names the reason code
and writes nothing.
Every change this bundle makes is a pair. The rule returns two edits, the change in the source file
and a lock test appended to the test file paired with it, and apply_pattern puts both in one
transaction: the pair commits together, or nothing is written. The lock test is what makes the
second run honest. Run chain-to-registry on src/registry.py::render and the lock asserts that
the mapping is there, that each kind reaches its handler, that the chain is gone, and that the
refusal still refuses; take only the lock test and leave the source alone, and the test suite fails.
The pair then goes through the six nodes of the kernel as any other change does: the proposing roles
claim it, gate_checker runs the syntax gate and the selected tests, adversary reproduces the
result by another path, and the arbiter returns VERIFIED with assurance 3 only when both trusted
roles agree. --dry-run runs all of that against a copy and leaves the workspace byte for byte as it
was. A card that refuses never reaches the nodes, and a path policy that blocks the lock test blocks
the source edit with it.
This is a catalog of patterns this bundle has carried out and can re-derive, not a claim that it can
change Python in general. patterns/coverage.json says what has been shown and names its denominator:
the five cards over the five source files and fifteen module level functions of
fixtures/pattern_lab/, not over Python and not over any corpus of real repositories.
The corpus is generated, like the kernel's own:
python -B tools/build_patterns.py --check
PATTERNS: CONFIRMED (10 rows over 5 cards, 15 module level functions in the fixture)
Each row is a work case in the schema lingologos_codex/casecorpus.py defines, so the kernel can check
the shape of a claim about a Python file without reading a byte of Python: case_id, the language tag,
the family, the intent tags, the edits, the verdict the run must reach, and for a refusal the reason code.
patterns/ is a generated folder, so edit tools/build_patterns.py and let --check say so.
Working the fixture from the command line
The commands below were run against fixtures/pattern_lab/ as published, and what follows is what
came back. The first one answers before anything is asked to change:
$ python -B -m lingologos_python symbols --workspace fixtures/pattern_lab --limit 5
files=10 symbols=29 edges=29
0.0942 src/registry.py::render
0.0838 src/tokens.py::count_words
0.0669 src/guards.py::open_ticket
0.0572 src/registry.py::format_short
0.0481 src/registry.py::format_json
The ranking is PageRank over the call and import graph, and the three highest ranked functions here are three of the five the catalog claims: the dispatcher, the annotatable default, the bare guard. To know which tests a change is answerable to:
$ python -B -m lingologos_python select-tests --workspace fixtures/pattern_lab --files src/registry.py
tests/test_registry.py
A card states its terms before you use it. This transcript is abridged to the lines a decision turns on, and the two long lines are wrapped here for width:
$ python -B -m lingologos_python patterns show --pattern open-to-context-manager
open-to-context-manager
family resources
shape a module level function that opens a file into a name and closes that name itself
why a close that is not tied to the scope is skipped by the one path that raises on the way
out, and the reader has to trace every exit to believe the handle is closed.
needs
- the name is used only inside that function and never stored or returned
lock the source opens inside a with block and never calls close, and a file written in a
temporary directory is read back through the rewritten function
refuses ALREADY_SCOPED, NO_BARE_OPEN, HANDLE_ESCAPE, NOT_A_MODULE_FUNCTION
needs assurance >= 3 to commit
To find out whether a workspace really holds the shape, rather than guessing:
$ python -B -m lingologos_python patterns scan --workspace fixtures/pattern_lab \
--pattern chain-to-registry
chain-to-registry: 1 hit(s) in this workspace
src/registry.py::render
src/registry.py dispatch registry of 'render'
tests/test_registry.py lock test 'test_render_dispatches_through_a_registry' appended after 'test_render_rejects_an_unknown_kind'
why: the branch for 'short' returns format_short
why: the branch for 'long' returns format_long
why: the branch for 'json' returns format_json
The hit names the function, and under it the two edits the card would apply: the chain of if and elif
that becomes a mapping of handlers, and the lock test appended to tests/test_registry.py. --json
prints the same answer as data, with the search and replace text of every edit beside it.
render_pair, in the same file, is not listed: its chain is not in the shape the card claims, and a
card that does not claim a shape does not touch it.
The pair, verified and not committed:
$ python -B -m lingologos_python patterns apply --workspace fixtures/pattern_lab \
--pattern chain-to-registry --target src/registry.py::render --dry-run
VERIFIED (assurance 3, committed=False) OK_DUAL_CONFIRMATION: confirmed by adversary, gate_checker
The same command without --dry-run writes both files in one transaction. Ask for the function whose
shape is wrong and the answer is a refusal with a reason, an exit code of 1, and a workspace that did
not move by a byte:
$ python -B -m lingologos_python patterns apply --workspace fixtures/pattern_lab \
--pattern chain-to-registry --target src/registry.py::render_pair --dry-run
REFUSED (assurance 0, committed=False) BRANCH_SHAPE_MISMATCH: the chain in 'render_pair' tests more
than one name against text literals, its branches do not take the same arguments, or its last branch
does not raise
nothing was written; the card named this reason before any node ran
A change of your own goes through the same six nodes, as a search and replace you wrote:
python -B -m lingologos_python edit --workspace repo --file src/x.py \
--search "def load(path):" --replace "def load(path: Path) -> dict:" --dry-run
and so does create --file ... --content-file .... The command line has no delete verb: deleting is a
delete_file transaction on the session and on the kernel, exercised in tests/test_session.py, and it
is not offered as a command from here. verify --file ... reports a verdict for a file without asking
for a change. With --strict-tools the run demands mypy and ruff: a gate that cannot run abstains,
and the session answers UNKNOWN with the reason GATE_ABSTAIN instead of reporting a check that never
happened.
check-adapter says whether the Python adapter holds the contract of the kernel, and exits non-zero
when it does not.
tests/test_cli.py runs the documented commands as separate processes and asserts their exit codes and
their answers, because a documented command that crashes breaks a promise even when every library call
beside it is correct.
Running
From the folder of this dataset, with LINGOLOGOS_CODEX_ROOT pointing at the folder of the kernel
dataset:
python -B -m pytest -p no:cacheprovider tests -q
python -B tools/run_gates.py
python -B -m lingologos_python check-adapter --workspace fixtures/sample_pkg
python -B -m lingologos_python verify --workspace fixtures/sample_pkg --file src/mathops.py
python -B -m lingologos_python patterns list
python -B -m lingologos_python patterns show --pattern chain-to-registry
python -B -m lingologos_python patterns scan --workspace fixtures/pattern_lab \
--pattern chain-to-registry
python -B -m lingologos_python patterns apply --workspace fixtures/pattern_lab \
--pattern chain-to-registry --target src/registry.py::render --dry-run
patterns apply without --dry-run commits, and only on a verdict the kernel accepts: it commits
when the assurance reaches the higher of the session floor and the card's own floor, and reports a
refusal with the reason code of the rule that stopped it. fixtures/pattern_lab/ is a copy candidate:
the commands above either read it or verify against a copy, and the tests copy it to a temporary folder
before writing, so the folder as published keeps the exact shape the coverage numbers were counted on.
What this revision renamed
The two letter prefix is gone. The package is lingologos_python, where an earlier published revision
had lgpython; the kernel it resolves is lingologos_codex, where that revision had lgcodex; the
environment handle the bridge reads is LINGOLOGOS_CODEX_ROOT, where it was LGCODEX_ROOT; and the
command line is python -B -m lingologos_python, the same name the console script of pyproject.toml
carries. What did not move: the five adapter methods, the envelope kind string, the entry point group
lingologos.codex.adapters, the work case schema version, and the ten rows of
patterns/pattern_cases.jsonl, which are byte for byte what that revision published. The six seed
envelopes under nodes/ do carry the adapter under its new dotted path, because naming a module that no
longer exists would make those files disagree with the code beside them. The dataset keeps its name,
tailot/codex-python.
What this bundle needs from the codex kernel
lingologos_python imports lingologos_codex, and lingologos_python/_codex_bridge.py resolves that
import in one step: an already importable lingologos_codex, then the folder named by
LINGOLOGOS_CODEX_ROOT, then a sibling codex/ or a datasets/codex/ among the ancestors of the
package. Downloaded from here the two orders are the same folder, and the resolution is:
pip install -r requirements.txt
git clone https://huggingface.co/datasets/tailot/lingologos-codex
LINGOLOGOS_CODEX_ROOT=/path/to/lingologos-codex python -B -m pytest -p no:cacheprovider tests -q
Nothing in this bundle downloads anything at run time: the kernel is a second download you make once, and the tests fail with a named reason when it is missing rather than passing without it. The kernel never imports this folder, so the dependency has exactly one direction, and one copy of the kernel can serve any number of workspaces.
The ten pattern cases
patterns/pattern_cases.jsonl holds 10 rows, one accepted and one refused for each of the five cards
of the catalog: case_id, language, family, intent_tags, the edits the rule returned (the
source edit and the test that locks it), the verdict the run must reach, and for a refusal the
reason_code the rule answered with. A row is a work case in the schema the kernel dataset defines in
lingologos_codex/casecorpus.py, so its shape is checkable without a Python file in sight.
tools/build_patterns.py derives the rows by running each rule over fixtures/pattern_lab/, and
--check re-derives them and compares the bytes: a row is never edited by hand. The same tool writes
patterns/coverage.json, which states what the ten rows cover and names its own denominator, the
fixture. Ten rows are five cards carried end to end, not a benchmark: the fixture is small and was
written for this bundle, and nothing here counts coverage of real repositories.
Rights
The dataset is published by the author of LingoLOGOS under the same account, tailot. The source tree
is the codex-python/ folder of https://github.com/tailot/LingoLOGOS, where the project states its own
terms. Neither that repository root nor this folder carries a LICENSE file, so no license is claimed
here beyond what the publisher states on the repository and on this dataset page; ask there before
reusing the code. The fixture package under fixtures/sample_pkg/ and the pattern laboratory under
fixtures/pattern_lab/ were written for this dataset and are not taken from a third-party project.
Citation
@misc{lingologos_codex_python,
title = {LingoLOGOS codex-python: a Python programming layer over the codex kernel},
author = {{LingoLOGOS}},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/tailot/codex-python}},
}
- Downloads last month
- -