Skip to main content

Project lifecycle management and codebase analysis toolkit

Project description

Organon

def: An instrument for acquiring knowledge or achieving a goal; a body of principles for scientific investigation.

Organon is a disciplined and structured approach to collaborative human and AI software development. The primary goal is to find optimal workflows for highly efficient, predictable and enjoyable collaboration - to harness the power of Agents within a highly structured environment under the guidance of an experienced software engineer. The engineer controls the architecture and design and the Agents execute tasks such as writing code and documentation, researching and summarizing, and fixing defects.

Quick Start

When first working in this workspace:

# Install organon package from repository root
uv sync

# Verify installation
uv run organon --help

# Initialize organon in your project (includes MCP setup)
organon init

# Skip MCP setup if needed
organon init --no-mcp

CLI Tool

Organon provides a unified CLI tool for project lifecycle management:

# Admin commands
organon admin scan [path]              # Build codebase index
organon admin validate [path]          # Validate project structure (uses dynamic rules)
organon admin validate [path] --config FILE  # Use specific config file
organon admin validate-templates [path] # Validate document content
organon admin update-defaults          # Update .organon/defaults from package

# Spec alignment
organon admin align-scan [path]        # Run alignment scan (specs vs code vs tests)
organon admin align-scan . --format json  # JSON output
organon admin status [path]            # Project health summary

# Dynamic rule validation
organon admin rules list               # List available rules
organon admin rules list -v            # Show rule details
organon admin rules validate           # Validate rule definitions

# Structure generation
organon admin structure generate <path> # Generate STRUCTURE.md
organon admin structure update <path>   # Update existing STRUCTURE.md

# Project management
organon projects list                  # List project templates

# Sprint management
organon sprints create <name>          # Create new sprint
organon sprints list [--status]        # List sprints
organon sprints update-status <path> <status>

# Logging and metrics
organon logs stream                    # Stream Claude Code conversation logs
organon logs metrics [--by-operation]  # View token savings
organon logs metrics clear             # Clear metrics log
organon logs insights timeline --session ID # Unified session timeline
organon logs insights analyze LOG      # Analyze with efficiency

UI Testing Framework

Organon provides a comprehensive Playwright-based UI testing framework for AI agents:

# Install Playwright browsers
playwright install chromium

# Run UI tests
pytest tests/ -v

# Run with visual regression
pytest tests/ --update-snapshots

# Run with log forwarding
pytest tests/ --ctrf --loki-url=http://localhost:3100

Core Capabilities:

  • Element Interaction - Playwright wrappers for clicks, typing, navigation
  • Log Capture - Browser console logs, page errors, network events
  • Visual Regression - Screenshot comparison with baseline management
  • Page State Capture - Accessibility tree, DOM snapshots for agent analysis
  • Workflow Orchestration - Multi-page state persistence
  • Backend Integration - Testcontainers and LiveServer fixtures

Key Features:

  • Automatic log correlation with correlation IDs
  • Cross-browser testing (Chromium, Firefox, WebKit)
  • Parallel test execution with pytest-xdist
  • CTRF (Common Test Report Format) export
  • Optional Grafana Loki integration

See UI Testing User Guide for complete documentation.

MCP Server

For AI agent integration with intelligent query tools:

# Start MCP server
uv run organon-mcp

# Or configure in ~/.config/claude/claude_desktop_config.json:
{
  "mcpServers": {
    "organon": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/organon", "organon-mcp"]
    }
  }
}

Available MCP Tools:

  • Sprint management: create_sprint, list_sprints, update_sprint_status
  • Template queries: query_workflows, query_tasks (96-99% token savings)
  • Sprint queries: get_all_sprints_summary, get_current_sprint_context (60-96% savings)
  • Log analysis: analyze_workflow_logs, analyze_conversations

Efficiency Tracking:

  • All MCP query tools automatically log efficiency metrics to .organon/efficiency.jsonl
  • Read tool usage is tracked via post-tool-use hook with MCP tool suggestions
  • See Efficiency Tracking Reference for details

Documentation

For complete documentation, see:

  • User Guide - Installation, CLI usage, workflows, examples
  • Developer Guide - Contributing, architecture, adding features
  • Design - Core principles and architecture decisions
  • Reference - CLI, MCP, templates, schemas, and rules

Workflow Logging

Organon includes an automatic workflow logging system that tracks all agent interactions:

How it works:

  1. Agent updates context when workflow/task changes via update_workflow_context MCP tool
  2. Context is stored in .organon/current-context.json
  3. Claude Code hooks automatically read context and append to .organon/workflow-log.jsonl
  4. Every user message and assistant response is logged with full context

Log format:

{
  "timestamp": "2025-10-15T15:55:10Z",
  "session_id": "93c50738-f992-4876-8698-a5cef7dc16b3",
  "event": "user_message",
  "workflow": "one-off-task",
  "sprint_id": "Fix Session ID Logging",
  "task_type": "fix",
  "task_description": "Extract session_id from hook events"
}

Setup: The hooks (.claude/hooks/user-prompt-submit and .claude/hooks/assistant-stop) are already configured in this project. They automatically:

  • Extract session_id from Claude Code hook events
  • Read workflow context from state file
  • Append structured log entries to .organon/workflow-log.jsonl

Stream logs:

organon logs stream  # Stream Claude Code conversation logs with formatting

Additional Tools

  • LLM Context Capture (scripts/llm_capture/) - Capture and analyze Claude Code API requests

    • Intercept requests via mitmproxy to see complete LLM context
    • Extract tool definitions, system prompts, conversation history
    • Analyze token usage patterns and find optimization opportunities
    • Inspect large messages to identify inefficiencies
    • See scripts/llm_capture/README.md for full guide
  • workflow-insights (tools/workflow-insights) - Claude Code log analysis (future integration)

Core idea

Organan is a disciplined and structured approach to collaborative human and AI software development. The primary goal is to find optimal workflows for highly efficient, predictable and enjoyable collaboration - to harness the power of Agents under the guidance of an experienced software engineer. Finding optimal workflows is a process that requires the developer to learn new patterns of working and collaborating with agents to achieve familiar goals but learning new methods and engaging in different modalities that work to the strength of the developer and to the agents.

The engineer controls the architecture and design and the Agents execute tasks such as writing code and documentation, researching and summarizing, and fixing defects. As of October of 2025, this seems to me the only way to get orders of magnitude gains in productivity in a consistent and predictable manner. The expectation is that this will be changing, possibly rather rapidly, as models and agents continue to improve. The intention is for this to be an evolving set of principles and tools, eventually evolving under the guidance of agents.

Fundamental features for working with agents

  1. Predictability a. Navigation - Progressive disclosure b. Workflows c. Validation tools
  2. Quality control a. Active human feedback and review
    1. UI b. Validation tools
  3. Observability a. UI testing tools for agents

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

organon-0.4.3.tar.gz (5.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

organon-0.4.3-py3-none-any.whl (740.6 kB view details)

Uploaded Python 3

File details

Details for the file organon-0.4.3.tar.gz.

File metadata

  • Download URL: organon-0.4.3.tar.gz
  • Upload date:
  • Size: 5.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for organon-0.4.3.tar.gz
Algorithm Hash digest
SHA256 aab9cafa2d417c50fef3b639554fcf9b390fbe921bdd8cbe3c5c2d6e949d4b36
MD5 1a727b0c6da8976383a126caca569f2b
BLAKE2b-256 106b223512c1382b4f755a9590b5d5672612c78c67f4f1f6b9b761be03ae282a

See more details on using hashes here.

Provenance

The following attestation bundles were made for organon-0.4.3.tar.gz:

Publisher: publish.yml on pjsulin/organon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file organon-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: organon-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 740.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for organon-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 28655070b019d2979645c1e1d85083d9b0314d176336639ef26ec63e71cdb1af
MD5 5ee5740cf6656e7d46645a928782f723
BLAKE2b-256 aa24705919df89988e941ccac95b91775ec76e043b409795ffd65017d2fe720d

See more details on using hashes here.

Provenance

The following attestation bundles were made for organon-0.4.3-py3-none-any.whl:

Publisher: publish.yml on pjsulin/organon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page