Metadata-Version: 2.5
Name: scriber-core
Version: 1.0.0
Summary: Deterministic workspace baseline, styling tokens, and visualization rules for scientific and development agents.
Project-URL: Homepage, https://github.com/eigenscribe/scriber-core
Project-URL: Repository, https://github.com/eigenscribe/scriber-core
Project-URL: Documentation, https://scriber-core.readthedocs.io
Project-URL: Bug Tracker, https://github.com/eigenscribe/scriber-core/issues
Project-URL: Changelog, https://github.com/eigenscribe/scriber-core/blob/main/CHANGELOG.md
Author: Scriber Labs & Eigenscribe Inc.
Maintainer: Scriber Labs & Eigenscribe Inc.
License: MIT
License-File: LICENSE
Keywords: cli,design-tokens,gradients,scientific-computing,styling,visualization
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Requires-Dist: click>=8.0.0
Requires-Dist: ipykernel>=7.3.0
Requires-Dist: matplotlib>=3.8.0
Requires-Dist: networkx>=3.2.0
Requires-Dist: numpy>=2.0.0
Requires-Dist: pyfiglet>=1.0.4
Requires-Dist: scipy>=1.11.0
Requires-Dist: seaborn>=0.13.0
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: ipykernel>=6.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: twine>=5.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# 🧿 Scriber Labs: Agent Workspace Index

[![Publish to PyPI](https://github.com/eigenscribe/scriber-core/actions/workflows/publish.yml/badge.svg)](https://github.com/eigenscribe/scriber-core/actions/workflows/publish.yml)
[![PyPI version](https://img.shields.io/pypi/v/scriber-core.svg)](https://pypi.org/project/scriber-core/)
[![Python versions](https://img.shields.io/pypi/pyversions/scriber-core.svg)](https://pypi.org/project/scriber-core/)

Welcome to the canonical environment index for autonomous development agents. This workspace enforces strict structural layout layering, deterministic mathematical simulation profiling, uncompromising code verification rules, and automated workspace consistency.

## 🧭 System Onboarding Directory

```text
├── docs/
│   ├── workspace-setup-guide.md        # Multi-project distribution & setup guide (Submodules / Templates / Packaging)
│   └── COOP_blog/                      # Reference archive of CERFACS COOP software standards
├── house-rules/
│   ├── python-rules.md               # Mathematical typography, packaging hygiene & consistency rules
│   └── css-rules.md                  # Glassmorphic visual layout layering standards
├── boilerplates/
│   ├── css/
│   │   └── tse-boilerplate.css         # Eigenscribe signature high-contrast layout blueprint
│   ├── mermaid/
│   │   └── boilerplate_diagram.mmd     # Dark-mode Mermaid diagram architecture template
│   ├── notebooks/
│   │   └── visuals-boilerplate.ipynb   # Visualizations, NetworkX topologies & color palettes template
│   └── python/
│       ├── gold-standard.py            # Gold standard numeric integration template
│       └── visualization_boilerplate.py # Matplotlib, Seaborn & Plotly theme bootstrap template
├── src/
│   └── scriber_core/                 # 📦 Single top-level package (frontend + cli subpackages)
│       ├── __init__.py               # Exports __version__; re-exports frontend & cli subpackages
│       ├── cli/                      # 💻 Primary Scriber Core CLI suite & TrueColor tools
│       │   ├── __init__.py           # CLI package exports & public API
│       │   ├── __main__.py           # Package execution entry point (`python -m scriber_core.cli`)
│       │   ├── main.py               # Command router, gradient banners, and command catalog
│       │   ├── messaging.py          # Semantic status alerts, ANSI 256 palette & banner generator
│       │   └── colors_table.py       # COLOR_PALETTE table renderer with TrueColor swatches
│       └── frontend/                 # 🎨 Frontend, design tokens & styling subsystem
│           ├── __init__.py
│           ├── colors.py             # Canonical palette (COLOR_PALETTE), semantic/CLI/EIGEN roles, RGB, hex_to_rgb
│           ├── gradients.py          # Golden ratio TrueColor multi-stop gradient engine (GRADIENT_PRESETS)
│           └── the_scriber_experience/   # 🔱 The Scriber Experience (TSE) styling subsystems
│               ├── __init__.py
│               ├── plots/            # Scientific plotting themes & colormaps
│               │   ├── __init__.py
│               │   └── theme.py      # Theme engine for Matplotlib, Pyplot, Seaborn, Plotly
│               └── mermaid/          # Dark-mode Mermaid.js diagram theme engine & preview
│                   ├── __init__.py
│                   └── theme.py      # Class definitions, directives & HTML preview renderer
├── sublime-theme/
│   ├── EigenScribe/                  # Sublime Text 4 package (theme, color scheme, PreTeXt syntax & snippets)
│   ├── install.sh                    # Bash installer (macOS / Linux, copy or symlink mode)
│   ├── install.ps1                   # PowerShell installer (Windows)
│   └── README.md                     # Package documentation, installation, and configuration guide
├── .junie/
│   ├── AGENTS.md                     # Canonical agent guidelines & workspace directives
│   └── skills/
│       └── cosmic-visual-styling/    # Workspace skill for EIGEN / cosmic visual themes & styling
├── pyproject.toml                    # PyPI packaging & uv dependency configuration (v1.0.0)
└── README.md                         # Master onboarding index (This file)
```

## 🛠️ Infrastructure & Tooling Lock-ins

- **Package & Environment Manager**: `uv` (Deterministic synchronization via `uv sync`).
- **Target Runtime Engine**: Python 3.11+
- **Primary IDE Workspace**: JetBrains PyCharm Professional / IntelliJ IDEA.

## 💻 Scriber Core CLI Suite (`python -m scriber_core.cli`)

`scriber-core` provides a unified, color-coded CLI suite in `src/scriber_core/cli/` featuring signature TrueColor gradient banners, golden ratio-proportioned gradient text, interactive palette tables, and structured command catalogs:

```bash
# Sync dependencies and development tools
uv sync --extra dev

# Run default CLI entry point (prints SECONDARY_GRADIENT banner & color-coded command catalog)
uv run python -m scriber_core.cli

# Display the high-contrast ADHD-optimized command catalog
uv run python -m scriber_core.cli commands

# Render the signature TrueColor block text banner (or custom text)
uv run python -m scriber_core.cli banner "SCRIBER-CORE"

# Inspect the canonical COLOR_PALETTE with TrueColor swatch blocks, hex, RGB, and ANSI escapes
uv run python -m scriber_core.cli colors-table
uv run python -m scriber_core.cli.colors_table --block-width 6 --sort hue

# Render TrueColor multi-stop gradients with Golden Ratio keyframe scaling
uv run python -m scriber_core.cli gradient "Deterministic Autonomous Agent Baseline" --preset eigenscribe

# Display architecture telemetry, active token counts, and gradient presets
uv run python -m scriber_core.cli info

# Run built-in self-diagnostics and CLI smoke tests
uv run python -m scriber_core.cli smoke-test
```

### 🎯 Cognitive Load & ADHD Semantic Color Coding

The command directory and CLI outputs implement an ergonomic visual hierarchy to eliminate reading fatigue and accelerate command scanning:
- **`PRIMARY_GRADIENT` (`#00e8ff` → `#008eff` → `#6f78fa` → `#5e17eb`)**: Section headers, category titles, and diagnostic headers proportioned with Golden Ratio decay ($\phi \approx 1.618$).
- **`SECONDARY_GRADIENT` (`#00a6ff` → `#7952f5` → `#a855f7` → `#ff28a2`)**: Block text banners, subtitles, and decorative framing.
- **Electric Cyan (`#00e8ff`) & Vivid Sky Blue (`#14b5ff`)**: Primary focal points, actionable command names, and interactive targets.
- **Pale Lilac (`#d8b4fe`)**: Command arguments, flags, and syntax options.
- **High-Luminance Ice Blue (`#b8f6ff`)**: Command descriptions and contextual documentation.
- **Periwinkle Blue (`#5280ff`)**: Structural box-drawing borders and grid dividers.
- **Status Badges**: `success_emerald` (`#10b981`), `midwest_indigo` (`#6f78fa`), `vivid_pink` (`#f72585`), and `warning_amber` (`#f7c548`).

---

## 🎨 Repo-Wide Hex Color Standard & Design Token Architecture

To ensure strict visual fidelity across CLI TrueColor output, Matplotlib/Seaborn plotting themes, dark-mode Mermaid diagrams, and CSS tokens, `scriber-core` enforces a mandatory repo-wide color standard:

1. **Single Source of Truth (`COLOR_PALETTE`)**:
   - `COLOR_PALETTE` in `src/scriber_core/frontend/colors.py` is the canonical dictionary for all named color variables across the repository.
2. **Repo-Wide Hex Constraint**:
   - **All color variables must be converted to / defined as canonical 6-digit hex format (`#rrggbb`)**, or reference valid key names from `COLOR_PALETTE` in `src/scriber_core/frontend/colors.py`.
   - Never hardcode raw or inconsistent RGB values in downstream modules without a canonical hex reference.
3. **Deterministic RGB Normalization**:
   - The `hex_to_rgb(hex_code)` utility in `src/scriber_core/frontend/colors.py` provides deterministic conversion from hex strings to `(R, G, B)` integer tuples for ANSI escape sequence generation (`\033[38;2;R;G;Bm`).
4. **Golden Ratio Multi-Stop Gradient Interpolation**:
   - Multi-stop gradients computed via `multi_gradient()` scale keyframe segment lengths according to the Golden Ratio ($\phi \approx 1.618$, $w_k = (1/\phi)^k$).
   - Segments taper smoothly from dominant blues and cyans on the left to violets, purples, and magentas on the right.

---

## 🔱 Legacy Eigenscribe CLI Tooling (`eigenscribe`)

For backward compatibility with standalone design token inspection, the `eigenscribe` console script remains registered under `[project.scripts]`:

```bash
# Run legacy design system diagnostics & theme exports
uv run eigenscribe doctor
uv run eigenscribe theme --format css
uv run eigenscribe mermaid --sample
```

## 📦 Cross-Project Distribution & Package Setup

`scriber-core` serves as the single source of truth across all **Eigenscribe Inc.** and **Scriber Labs** projects. There are three core ways to utilize and package this workspace:

1. **Git Submodule (Existing Projects)**:
   - Link this workspace into target repositories:
     ```bash
     git submodule add <SCRIBER_CORE_REPO_URL> .scriber-core
     ```
   - Connect guidelines via `.junie/AGENTS.md` bridging to `.scriber-core/house-rules/...`.
   - Update anytime with: `git submodule update --remote --merge`.

2. **Template Repository (Green-field Projects)**:
   - Enable template mode in repository settings and click **"Use this template"**.
   - Cloned projects inherit the canonical directory structure (`house-rules/`, `boilerplates/`, `.junie/AGENTS.md`).

3. **Installable Python Package Configuration (`src/` Layout)**:
   - To configure consumer projects as installable Python libraries using `uv`:
     - Adopt standard layout: `src/<package_name>/__init__.py` and `src/<package_name>/core.py`.
     - Configure `pyproject.toml` with `[build-system]` (`hatchling`) and `[tool.uv]` (`package = true`).
     - Install and sync in editable mode with `uv sync` or `uv pip install -e .`.

### 🚀 Automated PyPI Release & Consumption

Releases are published automatically by the [`.github/workflows/publish.yml`](.github/workflows/publish.yml) GitHub Actions workflow, which tests (Python 3.10–3.12), builds with `uv build`, and uploads to PyPI via **Trusted Publishing (OIDC — no stored tokens)** whenever a `vX.Y.Z` SemVer tag is pushed. Manual `workflow_dispatch` runs can also target TestPyPI. See `docs/workspace-setup-guide.md` (Section 11) for the release protocol and the one-time PyPI Trusted Publisher setup.

Once published, bootstrap any other project with the shared workspace, CLI, and styling tokens:

```bash
# Add as a dependency (uv) or install directly (pip)
uv add scriber-core          # or: pip install scriber-core

# Use the bundled CLI...
eigenscribe --help

# ...and import the canonical design tokens from your own code
python -c "from scriber_core.frontend import COLOR_PALETTE, GRADIENT_PRESETS; print(len(COLOR_PALETTE))"
```

For detailed, step-by-step walkthroughs, see [`docs/workspace-setup-guide.md`](docs/workspace-setup-guide.md).

## 🎛️ Agent Execution House Rules & End-of-Run Consistency

Before executing any generation loop, training pass, or asset construction, agents must ingest and strictly conform to the sub-system specifications:

1. **Python Rules (`/house-rules/python-rules.md`)**: Forces explicit LaTeX/text derivations, checks array dimensionality boundaries to eliminate silent broadcasting traps, binds modern `np.random.default_rng()` constraints, and mandates explicit `__all__` exports.
2. **CSS Rules (`/house-rules/css-rules.md`)**: Dictates strict, predictable flex/grid container scaffolds using the Eigenscribe high-contrast token spectrum.
3. **End-of-Run File Consistency & Hygiene**:
   - At the conclusion of every development pass or agent run, **all project files must be audited for mutual consistency**.
   - When new source files, modules, CLI flags, or packages are introduced or modified, corresponding configuration files (`pyproject.toml`, `.gitignore`), documentation (`README.md`, setup guides), docstrings, and tests **must be updated immediately**.
   - No orphan, out-of-sync, or undocumented artifacts may remain at the end of a run.

For each repository, establish:

- What the project actually does.
- What has been implemented and tested.
- What the figures and results genuinely demonstrate.
- What remains speculative or unfinished.
- Where the relevant mathematical reasoning lives.

## 🏛️ Standards & References

Packaging, versioning, branching, CLI architecture, and scientific parameter validation standards are synthesized from modern PEP 517/518/621 declarative tooling (`uv`, `hatchling`) and the CERFACS COOP software engineering standards:

- **COOP Gold Standard**: Dauptain, Antoine. *"Python packages: the COOP gold standard"*, The COOP Blog, CERFACS (Feb 21, 2022). [Web](https://cerfacs.fr/coop/coop-standard-on-python-pkges) | Local: [`docs/COOP_blog/Python packages_ the COOP gold standard · The COOP Blog.html`](docs/COOP_blog/Python%20packages_%20the%20COOP%20gold%C2%A0standard%20%C2%B7%20The%20COOP%20Blog.html)
- **COOP Packaging Guide**: *"Packaging guide"*, The COOP Blog, CERFACS. [Web](https://cerfacs.fr/coop/packaging-guide) | Local: [`docs/COOP_blog/Packaging guide · The COOP Blog.html`](docs/COOP_blog/Packaging%C2%A0guide%20%C2%B7%20The%20COOP%20Blog.html)
- **COOP Click CLI Architecture**: *"The COOP Click Command line interfaces"*, The COOP Blog, CERFACS. [Web](https://cerfacs.fr/coop/the-coop-click-command-line-interfaces) | Local: [`docs/COOP_blog/The COOP Click Command line interfaces · The COOP Blog.html`](docs/COOP_blog/The%20COOP%20Click%20Command%20line%C2%A0interfaces%20%C2%B7%20The%20COOP%20Blog.html)
- **COOP Cactus Branching Model**: *"The Coop Cactus branching model"*, The COOP Blog, CERFACS. [Web](https://cerfacs.fr/coop/the-coop-cactus-branching-model) | Local: [`docs/COOP_blog/The Coop Cactus branching model · The COOP Blog.html`](docs/COOP_blog/The%20Coop%20Cactus%20branching%C2%A0model%20%C2%B7%20The%20COOP%20Blog.html)
- **JSON Schema for Scientific Applications**: *"Using the json-SCHEMA standard for scientific applications"*, The COOP Blog, CERFACS. [Web](https://cerfacs.fr/coop/using-the-json-schema-standard-for-scientific-applications) | Local: [`docs/COOP_blog/Using the json-SCHEMA standard for scientific applications_ · The COOP Blog.html`](docs/COOP_blog/Using%20the%20json-SCHEMA%20standard%20for%20scientific%C2%A0applications_%20%C2%B7%20The%20COOP%20Blog.html)

For exhaustive architecture specifications and step-by-step guides, consult [`docs/workspace-setup-guide.md`](docs/workspace-setup-guide.md).

---
🔬 *Eigenscribe Inc. 2025-2026. Part of the Scriber Labs Research Framework.*
