# Hedl: Deterministic Completion Gating Workflow for AI-Assisted Programming

> Hedl is an iterative layer designed for AI-assisted coding. It enables consistent quality checks between local environments and CI through deterministic completion gating scripts, and supports optional layers for adversarial review and phase discipline.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-06-01T21:44:48.000Z
- 最近活动: 2026-06-01T21:50:13.946Z
- 热度: 150.9
- 关键词: AI coding, completion gate, CI/CD, code review, workflow, agent skill, deterministic checks, software quality
- 页面链接: https://www.zingnex.cn/en/forum/thread/hedl-ai
- Canonical: https://www.zingnex.cn/forum/thread/hedl-ai
- Markdown 来源: floors_fallback

---

## Hedl Project Core Overview

Hedl is an iterative layer designed for AI-assisted coding, focusing on solving the core question of 'whether a task is truly completed'. Key features include:
1. **Deterministic completion gate**: A script (`am_i_done.py`) ensuring consistent checks locally and in CI.
2. **Layered adoption**: Three tiers (gate-only, lightweight, team) for progressive use.
3. **Optional enhancements**: Adversarial review and phase discipline.
4. **Invisible mode**: Trial in others' repos without write access.
5. **Tool integration**: Works with existing tools like GitHub Issues instead of replacing them.

## Background & Problem Solving

Hedl addresses the subjective nature of 'task completion' in AI coding, eliminating guesswork. It draws inspiration from mcp-cli's `am-i-done` concept but uses pure Python (no JavaScript/Bun). Core problem solved: Ensuring local-CI consistency to avoid 'it works on my machine' issues.

## Core Design & Methods

### Deterministic Gate
- Local checks: Clean worktree, branch naming, code/type checks, tests.
- CI checks: Superset (PR template validity, outdated work items, unresolved reviews, Dependabot alerts).
- No AI inference: Objective script-based decisions.

### Layered Adoption
1. **Gate-only**: 2-minute setup with `am_i_done.py`.
2. **Lightweight**: Adds phase discipline, adversarial review, 5 slash commands.
3. **Team**: Full features (Claude Code integration, parallel worktree checks, GitHub Issues backend).

### Invisible Mode
Install via `install.py --invisible <tier>` (git-ignored artifacts). Switch to visible with `--make-visible`.

## Key Features

#### Adversarial Review
- **Scheduler**: Auto-selects minimal reviewers via `am_i_done.py --check dispatch`.
- **Agents**: Predefined roles (security, performance, maintainability, API design).
- **Prompt Library**: Composable prompts for custom review depth.

#### Phase Tracking
- `.work/` state files: Single task principle, phase discipline (planning → implementation → validation → completion), full traceability.

#### Tool-Agnostic Core
- Pure Python gate script, JSON/plain text state, Markdown docs, adapters for Claude Code/Copilot/OpenCode.

## Adoption Scenarios

### Suitable
- Teams needing deterministic checks for AI-generated work.
- Users wanting optional adversarial review/phase discipline.
- Those integrating with existing PM tools.
- Developers trialing personal workflows in others' repos.

### Unsuitable
- Small/disposable projects.
- Independent devs without traceability needs.
- Users satisfied with native Claude Code workflows.
- Zero Python dependency projects.
- Teams needing full PM systems (Jira, Linear).

## CI/CD Integration

Hedl provides SHA-fixed GitHub Actions:
- **Completion Gate**: Runs on every PR.
- **CodeQL**: Security scans for Python/Actions.
- **Dependabot**: Dependency update monitoring.

Note: Gate is advisory until branch protection is configured—PRs can merge despite failures without proper CI context.

## Practical Significance & Takeaways

### Significance
- **Shift Left**: Catches issues pre-submission, reducing CI loops.
- **Deterministic Validation**: Eliminates guesswork.
- **Progressive Adoption**: Start simple, add complexity.
- **Team-Friendly**: Invisible mode enables personal trial before team adoption.

### Takeaways
- Core value: Subjective 'done' → objective checks.
- Local-CI consistency reduces machine-specific issues.
- Layered design/invisible mode respects existing workflows.
