Zing Forum

Reading

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.

AI codingcompletion gateCI/CDcode reviewworkflowagent skilldeterministic checkssoftware quality
Published 2026-06-02 05:44Recent activity 2026-06-02 05:50Estimated read 6 min
Hedl: Deterministic Completion Gating Workflow for AI-Assisted Programming
1

Section 01

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.
2

Section 02

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.

3

Section 03

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.

4

Section 04

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.
5

Section 05

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).
6

Section 06

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.

7

Section 07

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.