Shared utilities and tooling for the HomericIntelligence ecosystem
Project description
ProjectHephaestus
Shared utilities and tooling for the HomericIntelligence ecosystem, powered by Pixi for environment management.
Overview
ProjectHephaestus provides standardized utility functions and tools that can be shared across all HomericIntelligence repositories. Following the principles in CLAUDE.md, this project emphasizes:
- Modularity: Well-defined, reusable components
- Simplicity: KISS (Keep It Simple, Stupid) principle
- Consistency: Standardized interfaces and patterns
- Reliability: Comprehensive testing and error handling
Project Status: See docs/ROADMAP.md for the public roadmap and current focus areas.
Directory Structure
ProjectHephaestus/
├── pixi.toml # Pixi configuration
├── pyproject.toml # Python package configuration
├── hephaestus/ # Main package
│ ├── __init__.py
│ ├── agents/ # Agent frontmatter + loader + runtime
│ ├── automation/ # Issue planning / implementation / PR review pipeline
│ ├── benchmarks/ # Benchmark comparison utilities
│ ├── ci/ # CI helpers (precommit, workflows, docker timing)
│ ├── cli/ # CLI helpers (argument parsing, output formatting)
│ ├── config/ # Configuration utilities (YAML, JSON, env vars)
│ ├── datasets/ # Dataset downloading utilities
│ ├── discovery/ # Discovery of agents, skills, and code blocks
│ ├── forensics/ # Coredump capture + gdb post-mortem runner
│ ├── github/ # GitHub automation (PR merging, fleet sync, tidy, stats)
│ ├── io/ # I/O utilities (read, write, safe_write, load/save data)
│ ├── logging/ # Logging utilities (ContextLogger, setup_logging)
│ ├── markdown/ # Markdown linting and link fixing
│ ├── nats/ # NATS JetStream subscriber (event-driven workflows)
│ ├── resilience/ # Circuit breaker + retry + subprocess resilience primitives
│ ├── system/ # System information collection
│ ├── utils/ # General utility functions (slugify, retry, subprocess)
│ ├── validation/ # README, schema, and structural validation
│ └── version/ # Version management (hatch-vcs + consistency checks)
├── tests/ # Unit tests
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── README.md # This file
Getting Started with Pixi
This project uses Pixi for environment management, which automatically handles dependencies and creates isolated environments.
Prerequisites
Install Pixi by following the official installation guide.
Setup Development Environment
# Install dependencies and create environment
pixi install
# Activate the environment (optional, as pixi runs commands in the environment automatically)
pixi shell
Running Tests
# Run tests using the test feature
pixi run test
# Or run tests directly with pytest
pixi run pytest
Development Commands
# Format code with ruff
pixi run format
# Lint code with ruff
pixi run lint
Usage
As a Package
After installing with Pixi:
from hephaestus import slugify, human_readable_size, retry_with_backoff
# Convert text to URL-friendly slug
project_slug = slugify("My Project Name")
print(project_slug) # Output: my-project-name
# Convert bytes to human readable size
size_str = human_readable_size(1048576)
print(size_str) # Output: 1.0 MB
As a Claude Code Plugin
ProjectHephaestus also ships as a Claude Code plugin, providing slash commands for repository auditing, agent orchestration, and knowledge management.
claude plugin install HomericIntelligence/ProjectHephaestus
Then enable it in your project's .claude/settings.json:
{
"enabledPlugins": {
"hephaestus@ProjectHephaestus": true
}
}
See docs/plugin-installation.md for the full installation guide and skill reference.
Installing in Another Project
ProjectHephaestus is published to PyPI as homericintelligence-hephaestus.
Using pip:
pip install homericintelligence-hephaestus
Using Pixi:
Add to pyproject.toml:
[project]
dependencies = [
"homericintelligence-hephaestus>=0.6.0,<2",
]
Or add a PyPI entry to pixi.toml:
[pypi-dependencies]
homericintelligence-hephaestus = ">=0.6.0,<2"
Then run pixi install to resolve the dependency.
For local development (path dependency):
[pypi-dependencies]
homericintelligence-hephaestus = { path = "../ProjectHephaestus", editable = true }
Key Features
General Utilities (hephaestus.utils)
slugify(text): Convert text to URL-friendly slugretry_with_backoff(func): Decorator for exponential backoff retrieshuman_readable_size(bytes): Convert bytes to human readable formatflatten_dict(dict): Flatten nested dictionariesrun_subprocess(cmd): Execute shell commands with error handlingget_setting(config, key_path): Get nested dict values with dot notation
Configuration (hephaestus.config)
load_config(path): Load YAML or JSON configuration filesget_setting(config, key_path): Dot-notation config accessmerge_configs(*configs): Deep-merge multiple configuration dictsmerge_with_env(config, prefix): Overlay environment variables onto config
Environment Variable Convention
merge_with_env maps environment variables to config keys using double underscore (__) as the nesting delimiter. Single underscores are preserved as part of the key name.
| Environment Variable | Config Key |
|---|---|
HEPHAESTUS_DATABASE__HOST |
{"database": {"host": ...}} |
HEPHAESTUS_MAX_CONNECTIONS |
{"max_connections": ...} |
HEPHAESTUS_DATABASE__MAX_RETRIES |
{"database": {"max_retries": ...}} |
Numeric strings are automatically converted to int or float. To also convert boolean-like strings (true/false/yes/no/on/off) to Python bool, pass convert_bools=True:
from hephaestus.config.utils import merge_with_env
# HEPHAESTUS_DEBUG=true → {"debug": True} (not the string "true")
config = merge_with_env({}, convert_bools=True)
I/O Utilities (hephaestus.io)
read_file(path)/write_file(path, content): Simple file I/Oload_data(path)/save_data(path, data): Structured data (JSON/YAML)
CLI Commands
41 console scripts are installed when you install the package. Run any command
with --help to see full usage.
Automation
| Command | Description |
|---|---|
hephaestus-automation-loop |
Multi-repo 6-phase automation pipeline (plan → review-plans → implement → review-prs → address-review → drive-green) |
hephaestus-plan-issues |
Bulk issue planning using Claude Code or Codex |
hephaestus-implement-issues |
Bulk issue implementation using Claude Code or Codex in parallel worktrees |
hephaestus-review-prs |
Read-only PR review automation using Claude Code or Codex in parallel worktrees |
hephaestus-agent-stage |
Run one Claude or Codex automation stage with prompt and skill context |
GitHub
| Command | Description |
|---|---|
hephaestus-fleet-sync |
Sync all PRs across the HomericIntelligence fleet |
hephaestus-github-stats |
GitHub contribution statistics via the gh CLI |
hephaestus-merge-prs |
Merge open PRs with successful CI/CD using GitHub API |
hephaestus-tidy |
Single-repo gh-tidy wrapper with Myrmidon swarm for conflict resolution |
System & Data
| Command | Description |
|---|---|
hephaestus-agent-stats |
Agent statistics aggregation and reporting |
hephaestus-download-dataset |
Dataset downloading utilities for ProjectHephaestus |
hephaestus-system-info |
System information collection utilities for ProjectHephaestus |
Debugging & Forensics
| Command | Description |
|---|---|
hephaestus-coredump-handler |
Kernel pipe-mode core_pattern handler for capturing cores from containerized crashes |
hephaestus-run-under-gdb |
Run any command under gdb -batch to capture a real core before a runtime's own signal handler swallows the fault |
Validation
| Command | Description |
|---|---|
hephaestus-audit-doc-policy |
Audit documentation command examples for policy violations |
hephaestus-check-complexity |
Check cyclomatic complexity against a threshold |
hephaestus-check-coverage |
Check test coverage against configurable thresholds |
hephaestus-check-doc-config |
Enforce consistency between documentation metric values and authoritative config sources |
hephaestus-check-docstrings |
Check Python docstrings for genuine sentence fragments |
hephaestus-check-python-version |
Check Python version consistency across project configuration files |
hephaestus-check-readmes |
Markdown validation utilities for HomericIntelligence projects |
hephaestus-check-stale-scripts |
Detect scripts in scripts/ with no references in CI configs or other scripts |
hephaestus-check-test-structure |
Validate unit test directory structure |
hephaestus-check-tier-labels |
Enforce tier label consistency across all project Markdown files |
hephaestus-check-type-aliases |
Detect type alias shadowing patterns in Python code |
hephaestus-filter-audit |
Filter pip-audit JSON output to fail only on HIGH/CRITICAL severity vulnerabilities |
hephaestus-mypy-each-file |
Run mypy on each file individually to avoid duplicate-module-name errors |
hephaestus-validate-agents |
YAML frontmatter extraction and validation for agent markdown files |
hephaestus-validate-links |
Markdown validation utilities for HomericIntelligence projects |
hephaestus-validate-schemas |
Validate YAML configuration files against JSON schemas |
Markdown
| Command | Description |
|---|---|
hephaestus-check-links |
Fix or validate invalid absolute path links in markdown files |
hephaestus-fix-markdown |
Markdown linting fixer utilities for ProjectHephaestus |
hephaestus-validate-anchors |
Validate anchor fragments in markdown links against actual headings |
CI / Pre-commit
| Command | Description |
|---|---|
hephaestus-bench-precommit |
Pre-commit CI utilities for GitHub Actions integration (benchmark) |
hephaestus-check-precommit-versions |
Pre-commit CI utilities for GitHub Actions integration (version check) |
hephaestus-check-workflow-inventory |
GitHub Actions workflow validation utilities (inventory check) |
hephaestus-validate-workflow-checkout |
GitHub Actions workflow validation utilities (checkout validation) |
Configuration & Dependencies
| Command | Description |
|---|---|
hephaestus-check-dep-sync |
Validate and synchronize dependency declarations across project config files |
hephaestus-sync-requirements |
Synchronize dependency declarations across project config files |
Version Management
| Command | Description |
|---|---|
hephaestus-bump-version |
Version consistency checks and atomic version bumping |
hephaestus-check-package-versions |
Check package version consistency across config files |
hephaestus-check-version-consistency |
Version consistency checks across config files |
Examples
# Collect system info (JSON output)
hephaestus-system-info --json
# Collect system info without tool version checks
hephaestus-system-info --no-tools
# Download a dataset
hephaestus-download-dataset --help
# Merge open PRs
hephaestus-merge-prs --help
# Run all validation checks
hephaestus-check-coverage --help
hephaestus-check-complexity --help
Development Guidelines
- Follow the principles in CLAUDE.md
- Write comprehensive unit tests for all new functionality
- Document all public functions with Google-style docstrings
- Use type hints for all function parameters and return values
- Keep functions small and focused (single responsibility principle)
Contributing
The main branch is protected; all changes go through a pull request. CI enforces
three rules — a PR that violates any of them is blocked:
- Create a feature branch named
<issue-number>-description(git checkout -b 123-amazing-feature). - Commit your changes signed (
git commit -S -m "feat(scope): add amazing feature"), using conventional commit messages. - Push the branch (
git push -u origin 123-amazing-feature). - Open a pull request whose body contains the literal line
Closes #123(capitalC, no colon, on its own line —Fixes/Resolvesare not accepted). - Enable auto-merge:
gh pr merge --auto.
See CONTRIBUTING.md for the full process.
Pixi Environments
This project defines multiple environments in pixi.toml:
- default: Basic runtime environment
- dev: Development environment with linting and formatting tools
- lint: Linting-only environment
Switch environments with:
pixi shell -e dev
pixi shell -e lint
Adding New Dependencies
Add new dependencies to pixi.toml:
For conda packages:
[dependencies]
numpy = "*"
For PyPI packages:
[pypi-dependencies]
requests = "*"
Then run:
pixi install
License
BSD 3-Clause License — see LICENSE for the full text, and NOTICE for third-party dependency licenses and compatibility notes.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file homericintelligence_hephaestus-0.9.2.tar.gz.
File metadata
- Download URL: homericintelligence_hephaestus-0.9.2.tar.gz
- Upload date:
- Size: 300.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e15ff69876d82ffa8ccd7e5f9dfd0b15bb20a16a643a4ba25eada32ab61b653d
|
|
| MD5 |
385247aa01f77fe624964aea55566154
|
|
| BLAKE2b-256 |
93efbd536e765ae44b226c7db5f795f996af35c75b85a7248c46c403769830e7
|
Provenance
The following attestation bundles were made for homericintelligence_hephaestus-0.9.2.tar.gz:
Publisher:
release.yml on HomericIntelligence/ProjectHephaestus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
homericintelligence_hephaestus-0.9.2.tar.gz -
Subject digest:
e15ff69876d82ffa8ccd7e5f9dfd0b15bb20a16a643a4ba25eada32ab61b653d - Sigstore transparency entry: 1650745630
- Sigstore integration time:
-
Permalink:
HomericIntelligence/ProjectHephaestus@99ec870de577c346a2ed23331fbcde65c99586c5 -
Branch / Tag:
refs/tags/v0.9.2 - Owner: https://github.com/HomericIntelligence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99ec870de577c346a2ed23331fbcde65c99586c5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file homericintelligence_hephaestus-0.9.2-py3-none-any.whl.
File metadata
- Download URL: homericintelligence_hephaestus-0.9.2-py3-none-any.whl
- Upload date:
- Size: 377.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c73fdcaa5f21ee7d0460c6c8314c794fad955c0c12f1f22f36bd0e598d35c2a
|
|
| MD5 |
4913662153b7a51fe6cfc84bafa81faf
|
|
| BLAKE2b-256 |
cd41039391262d706f8eeb12fb8f6ca93cd98e43a50fef84ba76e4b35c352622
|
Provenance
The following attestation bundles were made for homericintelligence_hephaestus-0.9.2-py3-none-any.whl:
Publisher:
release.yml on HomericIntelligence/ProjectHephaestus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
homericintelligence_hephaestus-0.9.2-py3-none-any.whl -
Subject digest:
0c73fdcaa5f21ee7d0460c6c8314c794fad955c0c12f1f22f36bd0e598d35c2a - Sigstore transparency entry: 1650745647
- Sigstore integration time:
-
Permalink:
HomericIntelligence/ProjectHephaestus@99ec870de577c346a2ed23331fbcde65c99586c5 -
Branch / Tag:
refs/tags/v0.9.2 - Owner: https://github.com/HomericIntelligence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99ec870de577c346a2ed23331fbcde65c99586c5 -
Trigger Event:
push
-
Statement type: