Skip to content

Latest commit

Β 

History

95 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SynTechRev-PolyCodCal

CI codecov

Polymathic CodCal - A feedback monitoring system with sliding-window aggregation and alerting, including legal data ingestion and processing capabilities.

Install & CLI Quickstart

Install from PyPI (example)

Replace syntechrev-polycodcal with the actual package name if different.

pip install syntechrev-polycodcal

CLI Quickstart

The package provides three command-line entry points:

  • syntech-monitor β€” monitor & feedback tooling
  • genesis-gateway β€” gateway interface
  • legal-generator β€” legal data generator CLI

Try the built-in help:

syntech-monitor --help
genesis-gateway --help
legal-generator --help

Example: run a quick help check locally (after installing dev deps)

git checkout main
git pull origin main
python -m venv .venv
.\.venv\Scripts\Activate.ps1    # Windows PowerShell
pip install -e ".[dev]"
syntech-monitor --help

πŸ“¦ Installation

From Source (Development)

git clone https://github.com/SynTechRev/SynTechRev-PolyCodCal.git
cd SynTechRev-PolyCodCal
pip install -e .

From PyPI (Coming Soon - Phase 7)

pip install syntechrev-polycodcal

πŸš€ Quick Start

⚠️ Having VS Code sync issues? See Environment Reset Guide for restoring a clean local state aligned with main.

New to the project? Start here:

Quick Setup

Set up the workspace virtual environment (we use .venv):

python -m venv .venv

# On Windows
.venv\Scripts\Activate.ps1

# On macOS/Linux
source .venv/bin/activate

pip install -r dev-requirements.txt

Run tests:

# The src directory is automatically added to PYTHONPATH in VS Code
# For command-line testing:
PYTHONPATH=src pytest -v

Run pre-commit hooks locally:

pre-commit run --all-files

VS Code Setup (Recommended)

This project is fully configured for VS Code with GitHub Copilot:

  1. Open in VS Code: code . or code SynTechRev-PolyCodCal.code-workspace
  2. Install Extensions: Click "Install All" when prompted
  3. Select Interpreter: Choose .venv interpreter
  4. Start Coding: PYTHONPATH is automatically configured!

See GETTING_STARTED.md for detailed instructions.

FeedbackMonitor usage

The repository includes a small FeedbackMonitor utility in src/syntechrev_polycodcal/feedback_monitor.py.

Example (programmatic):

from syntechrev_polycodcal.feedback_monitor import FeedbackMonitor

mon = FeedbackMonitor(window_seconds=60, threshold=0.2)
mon.ingest({"timestamp": None, "outcome": "ok"})
alert = mon.check()
if alert:
	print("Alert:", alert)

CLI example (one-off processing of newline-delimited JSON):

# Using the installed console script (after pip install)
syntech-monitor examples/events.jsonl

# Or directly via Python
python scripts/feedback_monitor.py examples/events.jsonl

Console Scripts

After installation, the following console scripts are available:

  • syntech-monitor - Feedback monitoring CLI
  • genesis-gateway - Genesis Gateway processing pipeline
  • legal-generator - Legal data ingestion and query tool
# View help for each command
syntech-monitor --help
genesis-gateway --help
legal-generator --help

Development

Contributing

We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines on:

  • Setting up your development environment
  • Code standards and style guide
  • Testing requirements
  • Pull request process

Code Quality

This project maintains high code quality standards:

  • Testing: 100% code coverage with pytest
  • Linting: Enforced with ruff and black
  • Type Checking: Static analysis with mypy
  • CI/CD: Automated testing on Python 3.11, 3.12, and 3.13

Development Workflow

  1. Clone the repository
  2. Create a virtual environment
  3. Install dependencies: pip install -r dev-requirements.txt
  4. Install pre-commit hooks: pre-commit install
  5. Make your changes
  6. Run tests: pytest -v
  7. Check code quality:
    black src tests scripts
    ruff check .
    mypy src
  8. Submit a pull request

Code Repair Strategy

For detailed information on our systematic approach to maintaining and repairing code quality, see CODE_REPAIR_STRATEGY.md. This document covers:

  • Assessment and issue identification
  • Prioritization methodology
  • Systematic repair process
  • Verification and testing
  • Best practices and common solutions

Environment Reset

Having issues with your development environment or VSCode integration? See docs/ENVIRONMENT_RESET.md for:

  • Quick environment reset procedures
  • VSCode integration troubleshooting
  • Cross-platform compatibility fixes
  • GitHub sync and merge conflict resolution
  • GitHub Copilot setup verification

Agent Collaboration

Working with multiple AI agents or coordinating automated tasks? See docs/AGENT_COLLABORATION.md for:

  • Cross-platform communication protocols
  • Task coordination between agents
  • Quality standards and handoff procedures
  • GitHub Copilot integration patterns
  • Conflict resolution strategies

Project Structure

SynTechRev-PolyCodCal/
β”œβ”€β”€ src/
β”‚   └── syntechrev_polycodcal/
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ core.py
β”‚       └── feedback_monitor.py
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_core.py
β”‚   β”œβ”€β”€ test_feedback_monitor.py
β”‚   └── test_feedback_monitor_extra.py
β”œβ”€β”€ scripts/
β”‚   └── feedback_monitor.py
β”œβ”€β”€ examples/
β”‚   └── events.jsonl
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci.yml
β”œβ”€β”€ CODE_REPAIR_STRATEGY.md
β”œβ”€β”€ CONTRIBUTING.md
└── README.md

VS Code & GitHub Copilot Integration

This project includes comprehensive VS Code and GitHub Copilot integration:

πŸ€– AI-Assisted Development: GitHub Copilot integration with project-specific instructions

  • Open SynTechRev-PolyCodCal.code-workspace for optimal setup
  • Copilot understands project standards (100% coverage, type hints, Black formatting)
  • Real-time type checking with Pylance (no mypy CLI required)

See COPILOT_INTEGRATION.md for complete setup and usage guide.

βš™οΈ Pre-configured VS Code Settings:

  • Auto-format on save (Black)
  • Integrated testing (pytest)
  • Type checking (Pylance)
  • One-click quality checks (Ctrl+Shift+B)

See .vscode/README.md for VS Code configuration details.

Resources

Getting Started

Development

Tools & IDE

Reference

Roadmap

See the evolving project roadmap in ROADMAP.md for phased enhancements (hysteresis thresholds, batched ingest, metrics extensibility, CLI tooling, and more).

Phase 5: AI Legal Data Generator Framework

Phase 5 introduces a lightweight AI generator for legal data augmentation:

  • LegalDataGenerator – produces ai_summary, ai_primary_doctrine, and ai_embedding
  • Integration via load_legal_records(augment=True)
  • See docs: AI_LEGAL_DATA_GENERATOR_OVERVIEW.md

About

Codical Calculus and Lattice Environment for PolyCodCal Curriculum Builder

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages