# fixp

[![Build and test](https://github.com/lmodel/fixp/actions/workflows/main.yaml/badge.svg)](https://github.com/lmodel/fixp/actions/workflows/main.yaml)
[![Licence](https://img.shields.io/github/license/lmodel/fixp?label=licence)](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/LICENSE)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/lmodel/fixp/badge)](https://scorecard.dev/viewer/?uri=github.com/lmodel/fixp)
[![KTL scorecard](https://img.shields.io/endpoint?url=https://lmodel.github.io/fixp/badge.json)](https://lmodel.github.io/fixp/health/)

FIX Performance Session Layer (FIXP) 1.0 (LinkML)

> **Only want to ask?** Install `ktl-docent` into any agent you use, by a route from [the install page](https://w3id.org/ktl/docs/install/), and ask it about this project. It answers from the bundle and says how far each answer has been checked.
>
> **Agents:** if `.lokf/knowledge/index.md` exists, read it first. `llms.txt` says how to weigh it.

## Documentation Website

[https://lmodel.github.io/fixp](https://lmodel.github.io/fixp)

## What it models

The schema renders the [FIX Performance Session Layer](https://github.com/FIXTradingCommunity/fixp-specification) 1.0, the Technical Standard of April 2021. It covers each FIXP message by its fields, whatever the encoding; a run of messages on one session, checked against the protocol's rules; and the rules of engagement two parties agree on.

`upstream/` holds FIXP's three resource files, pinned by hash, and the tests hold the schema to them. [docs/about.md](https://lmodel.github.io/fixp/docs/about/) says how the schema reads FIXP and what it leaves out.

## Mappings

* **[lmodel/fix-sbe](https://github.com/lmodel/fix-sbe)** and **[lmodel/fix-orchestra](https://github.com/lmodel/fix-orchestra)**: `FixpMessage` is related to `SbeMessageV1` and `OrchestraMessageV10`, the classes of the files that define each message. `tests/test_mappings.py` checks the targets, and the SBE and FIX datatype names, against their released copies.

The five SSSOM sets are gone: their rows were the project's guesses, not FIX's statements, and most named classes that no longer exist.

## Repository Structure

* [docs/](https://lmodel.github.io/fixp/docs/): the website's own pages
* [project/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/project): generated project files (do not edit them)
* [scripts/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/scripts): the upstream watch
* [src/fixp/schema/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/src/fixp/schema): the LinkML schema, which you edit
* [src/fixp/datamodel/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/src/fixp/datamodel): the generated Python datamodel
* [tests/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/tests): Python tests, with example data in [data/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/tests/data) and the neighbours' adapt copies in [neighbours/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/tests/neighbours)
* [upstream/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/upstream): FIXP 1.0's resource files and their licence, unchanged
* [website/](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/website): the Hugo site built from the README, `docs/`, the schema's pages and the knowledge bundle

## Developer Tools

Run `just` to list the project's [just](https://github.com/casey/just/) recipes.

## Knowledge Trust Ladder (KTL)

`.lokf/` holds this project's [KTL](https://w3id.org/ktl/) knowledge bundle. Its domain schema, `.lokf/schema/fixp.yaml`, is the copy `just lokf-adapt` writes from `src/fixp/schema/fixp.yaml`, and `just lokf-adapt-check` says when it is stale. Edit the source, never the copy.

The copy roots an exchange and a rules-of-engagement record on `Concept`. An exchange's messages stay values inside it. In Obsidian, add these to the KTL plugins' *Known LOKF types* setting:

```text
FixpExchange, FixpRulesOfEngagement
```

The copy drops `id` for LOKF's, folds `description` into LOKF's, and keeps `message_kind` as a plain key, so inside a concept a message is matched by its fields. `tests/test_schema_rules.py` keeps the copy's keys apart from LOKF and the released copies in `tests/neighbours/`.

## License

The schema and the code are under the Apache License 2.0 ([LICENSE](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/LICENSE)), and the knowledge bundle in [.lokf/knowledge/](https://lmodel.github.io/fixp/knowledge/) is under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).

FIX's files in `upstream/` keep their licence, CC BY-ND 4.0. [NOTICE](https://github.com/lmodel/fixp/tree/2065b2eef132462f79978b432fb77ef15f34cdd2/NOTICE) states the position, and this project is not endorsed by FIX Protocol Limited.

## Contributing and security

[CONTRIBUTING.md](https://github.com/lmodel/fixp/blob/2065b2eef132462f79978b432fb77ef15f34cdd2/CONTRIBUTING.md) is the checklist for pull requests and
releases, [AI_COVENANT.md](https://github.com/lmodel/fixp/blob/2065b2eef132462f79978b432fb77ef15f34cdd2/AI_COVENANT.md) sets the rules for AI-assisted work,
[SECURITY.md](https://github.com/lmodel/fixp/blob/2065b2eef132462f79978b432fb77ef15f34cdd2/SECURITY.md) says how to report a vulnerability, and
[CHANGELOG.md](https://lmodel.github.io/fixp/changelog/) records the changes.

## Credits

Built from the [linkml-project-copier](https://github.com/linkml/linkml-project-copier) template ([doi:10.5281/zenodo.15163584](https://doi.org/10.5281/zenodo.15163584)).
