Dialectic-Driven Development workflow orchestration
This plugin is not yet in any themed marketplace. To install it, you'll need to add it from GitHub directly.
Choose your preferred installation method below
A marketplace is a collection of plugins. Every plugin gets an auto-generated marketplace JSON for individual installation, plus inclusion in category and themed collections. Add a marketplace once (step 1), then install any plugin from it (step 2).
One-time setup for access to all plugins
When to use: If you plan to install multiple plugins now or later
Step 1: Add the marketplace (one-time)
/plugin marketplace add https://claudepluginhub.com/marketplaces/all.json
Run this once to access all plugins
Step 2: Install this plugin
/plugin install hegel@all
Use this plugin's auto-generated marketplace JSON for individual installation
When to use: If you only want to try this specific plugin
Step 1: Add this plugin's marketplace
/plugin marketplace add https://claudepluginhub.com/marketplaces/plugins/hegel.json
Step 2: Install the plugin
/plugin install hegel@hegel
Thesis. Antithesis. Synthesis.
A command-line tool for orchestrating Dialectic-Driven Development workflows. Hegel guides you through structured development cycles with state-based workflow management.
Designed for AI agents, ergonomic for humans. Hegel is primarily an agent-facing CLI that provides deterministic workflow guardrails for AI-assisted development. It's also comfortable for direct human use.
cargo build --release
The binary will be available at ./target/release/hegel
.
Before starting any workflow, declare which meta-mode pattern you're following:
# For greenfield learning projects
hegel meta learning
# For standard feature development
hegel meta standard
This automatically starts the appropriate initial workflow for your meta-mode.
Available meta-modes:
learning
- Greenfield learning project (Research ↔ Discovery loop, starts with research)standard
- Feature development with known patterns (Discovery ↔ Execution, starts with discovery)View current meta-mode:
hegel meta
After declaring your meta-mode, transition between workflows:
# Transition to next workflow in your meta-mode
hegel start discovery # When in learning mode after research complete
hegel start execution # When transitioning to production
Available workflows:
research
- External knowledge gathering (PLAN → STUDY → ASSESS → QUESTIONS)discovery
- Optimized for learning density (SPEC → PLAN → CODE → LEARNINGS → README)execution
- Optimized for production deliveryminimal
- Simplified workflow for quick iterationsHegel provides ergonomic commands for common workflow transitions:
# Happy path: advance to next phase
hegel next
# Repeat current phase (e.g., after addressing feedback)
hegel repeat
# Restart workflow cycle (return to SPEC phase)
hegel restart
Advanced usage:
For custom transitions, provide explicit claims:
hegel next '{"spec_complete": true}'
hegel next '{"custom_claim": true}'
The next
command automatically infers the happy-path claim ({"{current_phase}_complete": true}
) when no claim is provided
View your current workflow position:
hegel status
Shows:
Clear all workflow state:
hegel reset
Hegel uses YAML-based workflow definitions to guide you through development cycles. State is stored locally in .hegel/state.json
(in your current working directory), making it a fully offline tool with no API keys or external dependencies required.
Each workflow defines:
Hegel implements the Dialectic-Driven Development methodology across three operational modes:
Use for: Pre-implementation knowledge building, unfamiliar domains, systematic study of external sources
Use for: Validating uncertainties, prototype implementations, answering questions from Research
Similar cycle to Discovery but with production-grade rigor, comprehensive error handling, and mandatory code review phase.
Use for: Building production features with validated patterns from Discovery
This methodology treats artifacts as disposable fuel while preserving clarity and constraints as durable value.
Hegel is a general workflow orchestration tool. The DDD-opinionated guides included in this project (SPEC_WRITING, PLAN_WRITING, etc.) are defaults, not requirements.
Use full DDD workflows for:
Skip DDD overhead for:
The workflow steps and accompanying token usage are designed for problems that need that rigor. Many projects don't.
hegel-cli/
├── src/
│ ├── main.rs # CLI entry point
│ ├── commands/ # Command implementations
│ ├── engine/ # Workflow state machine
│ └── storage/ # File-based state persistence
├── workflows/ # YAML workflow definitions
└── guides/ # Writing guides for documentation
All state is stored in .hegel/state.json
(current working directory) with atomic writes to prevent corruption. The state file contains:
By default, Hegel uses .hegel/
in the current working directory for state storage. You can override this:
Via command-line flag:
hegel --state-dir /tmp/my-project start discovery
Via environment variable:
export HEGEL_STATE_DIR=/tmp/my-project
hegel start discovery
Precedence: CLI flag > environment variable > default (.hegel/
in cwd)
Use cases:
Note: The default behavior (.hegel/
in current working directory) ensures state is session-local and project-specific. Each project directory gets its own workflow state, aligning with the design philosophy that sessions and workflows are coupled to the working directory where Claude Code is running.
Hegel integrates with Claude Code to capture development activity as you work. This enables metrics collection and workflow analysis.
The hegel hook
command processes Claude Code hook events:
# Typically configured in .claude/settings.json
hegel hook PostToolUse < event.json
Hook events are logged to .hegel/hooks.jsonl
with timestamps. Each workflow session is assigned a unique workflow_id
(ISO 8601 timestamp) when you run hegel start
, enabling correlation between workflow phases and development activity.
View captured development activity and metrics:
hegel analyze
Shows:
Launch a real-time TUI dashboard:
hegel top
Features:
.hegel/*.jsonl
files changeKeyboard shortcuts:
q
- QuitTab
/ BackTab
- Navigate tabs↑↓
/ j
/k
- Scrollg
/ G
- Jump to top/bottomr
- Reload metrics manuallyWhat's tracked:
Configuration:
See .claude/settings.json
in this repository for an example hook configuration. Hook events are optional—Hegel works without them, but metrics features require hook data.
Hegel can wrap dangerous commands with safety guardrails and audit logging. Commands are configured in .hegel/guardrails.yaml
and automatically become available as hegel <command>
.
Create .hegel/guardrails.yaml
:
git:
blocked:
- pattern: "clean -fd"
reason: "Destructive: removes untracked files/directories"
- pattern: "reset --hard"
reason: "Destructive: permanently discards uncommitted changes"
- pattern: "commit.*--no-verify"
reason: "Bypasses pre-commit hooks"
- pattern: "push.*--force"
reason: "Force push can overwrite remote history"
docker:
blocked:
- pattern: "rm -f"
reason: "Force remove containers blocked"
- pattern: "system prune -a"
reason: "Destructive: removes all unused containers, networks, images"
# Run git through Hegel's guardrails
hegel git status # ✓ Allowed
hegel git reset --hard # ✗ Blocked with reason
# Run docker through guardrails
hegel docker ps # ✓ Allowed
hegel docker rm -f my-container # ✗ Blocked
# All commands are logged to .hegel/command_log.jsonl
cat .hegel/command_log.jsonl
Features:
guardrails.yaml
(currently supports: git
, docker
)When blocked, Hegel exits with code 1 and prints:
Search and rewrite code using AST patterns (wraps ast-grep
):
# Search for patterns
hegel astq -p 'pub fn $FUNC' src/
# Replace code patterns
hegel astq -p 'println!($X)' -r 'log::info!($X)' src/
# Show help
hegel astq --help
Powered by ast-grep, a fast AST-based search and rewrite tool. First run automatically builds from vendor.
Launch ephemeral GUI for reviewing Markdown artifacts:
# Single file review
hegel reflect SPEC.md
# Multiple files
hegel reflect SPEC.md PLAN.md
# With output directory
hegel reflect SPEC.md --out-dir .reviews/
# Headless mode (testing)
hegel reflect SPEC.md --headless
Powered by mirror, a zero-friction Markdown review UI. Requires mirror
binary built and available (adjacent repo or in PATH).
Review workflow:
.ddd/<filename>.review.N
git commit
)HEGEL_SESSION_ID
For AI agents or developers working on Hegel (not just using it), see CLAUDE.md
for project structure, development guidelines, and contribution workflow.
Server Side Public License v1 (SSPL)
Visit dialectician.ai for more information about Dialectic-Driven Development.
0.1.0