Metadata-Version: 2.4
Name: my-arch
Version: 1.0.0
Summary: An architectonic framework for building cognitive software.
Author: Robb Doering
Author-email: Robb Doering <robb@doering.ai>
License-Expression: MPL-2.0
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: asyncpg>=0.30.0
Requires-Dist: coverage>=7.10.5
Requires-Dist: gitpython>=3.1.45
Requires-Dist: greenlet>=3.2.4
Requires-Dist: jinja2>=3.1.6
Requires-Dist: logfire>=4.0.0
Requires-Dist: more-itertools>=10.7.0
Requires-Dist: my-basis>=1.0.0
Requires-Dist: pandas>=2.3.1
Requires-Dist: mypy>=1.17.1
Requires-Dist: pydantic>=2.11.7
Requires-Dist: regex>=2025.7.34
Requires-Dist: sqlmodel>=0.0.39
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: yapf>=0.43.0
Requires-Dist: dspy>=2.5.0 ; extra == 'assay'
Requires-Dist: pyratatui>=0.2.9 ; extra == 'terminal'
Requires-Python: >=3.14
Provides-Extra: assay
Provides-Extra: terminal
Description-Content-Type: text/markdown

![logo](assets/logo_512.png)

# myArch: _A Systematic Development Framework_

![Pipeline Status](https://img.shields.io/gitlab/pipeline-status/doering-ai/libs/arch?branch=main) ![Test Coverage](https://img.shields.io/gitlab/pipeline-coverage/doering-ai/libs/arch?branch=main) [![License](https://img.shields.io/gitlab/license/doering-ai/libs/arch)](/LICENSE) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) [![pyrefly](https://img.shields.io/endpoint?url=https://pyrefly.org/badge.json)](https://github.com/facebook/pyrefly) [![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

`myArch` has two deliberately distinct index domains:

- `arch.Quad` is the preferred name for the original fixed, four-place architectonic address.
  `arch.Idx` remains its compatibility name.
- `arch.idx.Idx` is the definitive arbitrary-depth document index: numeric, alphabetic, Roman,
  symbolic, dotted or compact, optionally marked and wrapped.

They are not subtypes of one another.
A Quad admits the empty root and abstract `a` / `b` halves and has a special four-branch ancestry; a document idx is a non-empty, arbitrary-depth sequence whose rendering policy is independent of its place.
Keeping them separate makes those invariants visible instead of weakening either model.

The `arch` executable is both an agent-oriented linter and a human-oriented terminal workspace.
Arguments select a deterministic CLI operation; bare `arch` on a real terminal opens the PyRatatui browser.

```console
$ arch check docs src
$ arch --json plan docs | jq '.plans[] | select(.changed)'
$ arch apply --dry-run --diff docs
$ arch apply docs
$ arch                         # TUI when stdin/stdout are terminals

$ arch format --check src docs # report non-canonical configured header blocks
$ arch format --diff src docs  # print patches, never write
$ arch format src docs         # atomically format them
$ arch spec --input headers.yaml --output headers.yaml
```

The safety rule is structural: a file containing no recognized idx is never modified, even by `--operation reindex --insertion all`.
In a partially indexed file, the default `observed` insertion scope fills only hierarchy depths already represented in that file.
Every write is planned first, content-hash checked, and atomically replaced without normalizing newlines or the final newline.

Configuration is layered as command flags, an explicit `--config`, the nearest `.arch.yaml`, `~/.config/my/arch.yaml`, then built-ins.
Higher-precedence path rules are tried first:

```yaml
default_spec: decimal
insertion: observed

specs:
  decimal:
    styles: [number]
    separator: '.'
  doctrine:
    styles: [number, alpha-lower, roman-lower]
    separator: '.'
    marker: '.'
    max_depth: 6

paths:
  - path: /absolute/path/to/canon.md
    spec: doctrine
  - regex: '^journal/[0-9]{4}/'
    spec: doctrine
  - glob: 'docs/**'
    spec: decimal

ignore:
  - 'vendor/**'
```

See the [idx guide](docs/idx.md), [design explanation](docs/idx-design.md), and [rendered API page](docs/idx-api.md) for document indexes; see the [Header formatting guide](docs/headers.md) for `HeaderSpec`, `arch format`, and the keyboard-first profile editor.

______________________________________________________________________
