Skip to main content

Proof of concept, not a product. This library belongs to the earlier Python research prototype (Socrates) and is not maintained as a product. The current products are listed at nireus79.github.io. Contact: Hermes_creative@proton.me.

Socratic Analyzer

Status: Independent library extracted from Socrates monolith (v0.1.5)

Code analysis and workflow optimization library for project development, quality assessment, and architectural insights. Part of the Socratic Ecosystem.

Python 3.9+ MIT License Code Quality

Overview

Socratic Analyzer provides tools for analyzing project workflows, assessing code complexity, tracking maturity, and identifying optimization opportunities.

Key Capabilities

  • Workflow Analysis - Analyze project workflows and process paths
  • Complexity Metrics - Calculate workflow costs and identify bottlenecks
  • Code Validation - Validate dependencies, syntax, and test execution
  • Project Context - Model projects with phases, team structure, and maturity tracking
  • Quality Assessment - Track project maturity across phases and categories
  • Insight Categorization - Categorize insights and recommendations by workflow phase

Architecture

Core Modules

Workflow Analysis:

  • WorkflowCostCalculator - Calculate execution costs of workflow paths
  • WorkflowPathFinder - Discover optimal workflow paths
  • WorkflowRiskCalculator - Assess risks in workflow execution

Code Quality:

  • InsightCategorizer - Categorize insights by phase and workflow
  • DependencyValidator - Validate project dependencies
  • SyntaxValidator - Validate code syntax
  • TestExecutor - Execute and track test results

Data Models:

  • ProjectContext - Complete project information and state
  • TeamMemberRole - Team member roles and skills
  • WorkflowDefinition - Workflow paths and execution states

Analytics:

  • AnalyticsCalculator - Calculate metrics from project data
  • MaturityCalculator - Assess project maturity
  • TokenUsage - Track LLM usage and costs

Installation

# Basic installation
pip install socratic-analyzer

# With framework integrations
pip install socratic-analyzer[langchain]
pip install socratic-analyzer[nexus]

# Development
pip install socratic-analyzer[dev]

Dependencies

Core:

  • socratic-maturity>=0.1.1 - Maturity tracking and assessment
  • socratic-nexus>=0.3.6 - Multi-provider LLM integration

Optional:

  • langchain>=0.1.0 - LangChain integration
  • langgraph>=0.0.1 - Graph-based workflows

Quick Start

Analyze a Project

from socratic_analyzer.models import ProjectContext
from socratic_analyzer.core import WorkflowCostCalculator

# Create project context
project = ProjectContext(
    project_id="proj-123",
    name="MyProject",
    owner="user@example.com",
    phase="analysis",
    created_at=datetime.now(),
    updated_at=datetime.now()
)

# Analyze workflow costs
calculator = WorkflowCostCalculator()
costs = calculator.calculate_workflow_costs(project)
print(f"Estimated cost: {costs}")

Validate Code Dependencies

from socratic_analyzer.utils.validators import DependencyValidator

validator = DependencyValidator()

# Check dependency compatibility
issues = validator.validate_dependencies("./requirements.txt")
for issue in issues:
    print(f"Issue: {issue['type']} - {issue['message']}")

Track Project Maturity

from socratic_analyzer.maturity_calculator import MaturityCalculator

calculator = MaturityCalculator()

# Calculate overall maturity
maturity = calculator.calculate_maturity(project)
print(f"Project maturity: {maturity.overall_score}%")
print(f"Phase scores: {maturity.phase_maturity_scores}")

Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=src/socratic_analyzer

# Run specific tests
pytest tests/test_module_imports.py -v

Code Quality

All checks passing:

  • ✅ Black formatting
  • ✅ Ruff linting
  • ✅ Mypy type checking (pragmatic for extracted library)

Configuration Examples

Workflow Analysis

from socratic_analyzer.models import WorkflowDefinition, WorkflowNode, WorkflowEdge

# Define workflow
workflow = WorkflowDefinition(
    workflow_id="wf-123",
    name="Analysis Workflow",
    description="Project analysis process",
    nodes=[
        WorkflowNode(id="start", name="Start", node_type="start"),
        WorkflowNode(id="analysis", name="Analysis", node_type="process"),
        WorkflowNode(id="review", name="Review", node_type="process"),
        WorkflowNode(id="end", name="End", node_type="end"),
    ],
    edges=[
        WorkflowEdge(source="start", target="analysis", cost=10),
        WorkflowEdge(source="analysis", target="review", cost=15),
        WorkflowEdge(source="review", target="end", cost=5),
    ]
)

Documentation

Part of the Socratic Ecosystem

Socratic Analyzer integrates with:

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License - See LICENSE for details.

Support


Built as part of the Socratic ecosystem

Made by @Nireus79


Origin

This package comes from the Socrates research prototype, which is not maintained as a product. Status: alpha. Written by Efthimios Angelopoulos with AI coding assistants (Claude Code); I design, review and test it. Contact: Hermes_creative@proton.me.

Use This Package Standalone:

pip install socratic-analyzer

Or As Part of Socrates Platform:

pip install socrates-ai  # the earlier research prototype that uses this package

Integration Example:

More Information:


Metadata

Release files for socratic-analyzer 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socratic-analyzer 0.1.9
File Size Uploaded Provenance Actions
socratic_analyzer-0.1.9.tar.gz 60.4 kB Without provenance Details for socratic_analyzer-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for socratic-analyzer 0.1.9
File Interpreter ABI Platform Actions
socratic_analyzer-0.1.9-py3-none-any.whl Python 3 none any Details for socratic_analyzer-0.1.9-py3-none-any.whl

Total release size: 130.5 kB

Release files / socratic_analyzer-0.1.9.tar.gz

Download URL socratic_analyzer-0.1.9.tar.gz
Size 60.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b1e56631438583493a59b6eeb37567572f583ad80cba8c5cc7059eca78c2fb56
BLAKE2b-256 checksum
How to use checksums
5e69822464582615307da97143815d1afe99bd69a2031e3014c352aa7dae41cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / socratic_analyzer-0.1.9-py3-none-any.whl

Download URL socratic_analyzer-0.1.9-py3-none-any.whl
Size 70.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb45cc98239eb1fef60f4790605e671affa29340ac39729b7ab418b2ae0d6782
BLAKE2b-256 checksum
How to use checksums
5020171bf2d76a682e4d00f51b85e82b963650567b2e1ee4efc03e51ce07e9a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for socratic-analyzer 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page