Human guided · AI assisted · Traceable engineering
Specs first. Every step traced. Nothing drifts.
hGATE is a manual, guided workflow for specification-driven development with an AI coding agent — domain-driven design, behavior-driven development, and test-driven development, connected by a traceability chain from spec to generated code to test to shipped change, so nothing can drift without leaving a trace.
Eight markdown skills + deterministic verifiers + a session-start sync protocol · MIT License
How it works
Three rules, all the way through.
The agent recommends and executes one specialist skill at a time. Humans confirm requirements, boundaries, plans, and every workflow transition.
01
Spec before code
Every stage traces back to an approved specification, not an improvised prompt. Generation never runs ahead of what's been agreed.
02
Domain boundaries hold
Bounded contexts (BCs) are established before behavior is written. Review checks that nothing generated implements behavior outside an approved spec.
03
Traced end to end
Every stage leaves a record — spec, decision, test, shipped code — reconciled by a mandatory session-start protocol before new work continues, so nothing can drift without leaving a trace.
What actually happens
One recommended skill at a time.
hgate-guide inspects your artifacts and recommends exactly one next skill —
it never starts that skill or advances lifecycle state on its own.
A BC's first pass only needs a spec that covers what's shipping now — not
a complete, permanent one. bc-enhancement below is how it deepens from
there; most BCs go through several rounds of it as understanding grows.
→
→
→
→
→
VERIFY
Cross-BC Validation
ITERATE
bc-enhancement loops back into an already-shipped BC to add a new capability slice or change existing behavior. This is the normal way a BC matures — not a bug-fix exception — and every pass still closes with a full BC review.
Starting from an existing codebase
rather than a blank one? domain-exploration and
bc-refinement can read your existing code, APIs, and schemas as evidence
to produce a first-draft spec — then bc-review full surfaces where the
spec and the code have already drifted apart.
Every lifecycle step, not just the reviews, passes named gates — a human sign-off,
a deterministic tool result, or both — recorded as evidence in the BC's own
status.md. See where every BC stands.
Already know your domain boundaries? architecture-decision-exploration
handles a cross-system technical decision on its own, without repeating domain mapping.
Lifecycle & status
See where every bounded context stands.
A tech lead or PM can answer "is this BC really done, and what changed since it was signed off?" in five minutes — without asking the agent, and without trusting its word.
GATES
Lifecycle gates with named sign-offs
A BC enters a state only through that transition's gates: a named human approval, a deterministic
tool result, or a recorded fact. Each result lands in the BC's gate evidence with who signed it and
when, and verify:spec fails when a BC claims a state its gates don't support.
BOARD
A status board, one card per BC
Lifecycle swimlanes from Discovered to Verified. Each card shows its next skill, blockers, and how many required gates are met — with the unmet ones listed, in red. Tooltips, legends and a built-in reading guide explain every badge.
GAPS & DRIFT
Gaps and drift you can't miss
Open questions shared across the domain map, context map and BCs roll up into one gap ledger that turns red when something needs action, amber when it's pending, and folds away when all is resolved. If two documents disagree, a warning banner sits on every tab and can't be dismissed.
HISTORY
What changed since the last sign-off
Read from git history: a timeline of every transition with its commit, gates and signers, and what changed in the spec since the last transition, since the previous commit, and in uncommitted work — down to individual scenarios, rules and decisions.
All of it is deterministic — generated
by plain scripts (project:sync, project:status) and
read in a local, dependency-free viewer. No LLM tokens, and the same repository always gives the same
board. Read the viewer guide →
What you actually get
Not process for its own sake — checkable artifacts.
Every guardrail below produces something you can point at, not just a convention everyone's supposed to remember.
ADR
Architecture Decision Records
Every non-trivial technical or domain decision gets a durable record — context, alternatives considered, and consequences — not just the decision that won.
GHOST CHECK
Ghost-behavior detection
Review flags any generated code implementing behavior that isn't traceable to an approved spec line. The agent doesn't get to quietly add scope.
TRACE
Scenario-to-test traceability
Every BDD scenario is linked to a real test. No orphaned tests, no untested scenarios sitting
in a spec no one implemented. A deterministic verifier (verify:bdd) checks
scenario IDs against Jest tests, and a BDD-to-TDD human sign-off loop records approval. Browse any BC's scenarios directly with the built-in Gherkin
viewer instead of parsing raw Markdown by eye.
FAST PATH
Trivial-change fast path
A conservative triviality gate lets no-spec-impact changes — a rename, a perf tweak — skip the full pipeline. It still leaves an audit entry; it's a fast path, not a bypass.
PER-BC
Per-BC decision & status logs
Decisions and lifecycle status live next to the bounded context they describe, not in one global file every parallel agent collides on.
ACL
Anti-corruption layers
Each bounded context gets an explicit ACL at its integration points, so an external system's model can't quietly leak into yours.
PROPERTY
Property based testing
Test the rules, not just the examples. Example scenarios only cover the cases someone thought of. For the business rules that must always hold, hGATE can check them across thousands of generated cases and flag any that break. Optional, and added where the risk justifies it.
SIGN-OFF
Human sign-off
A person reviews and approves the behavior examples and the business rules separately, and each approval is kept as a permanent record. Passing tests never replace that judgment.
VERIFY-SPEC
Automatic spec checks
Routine consistency checks on your specifications run automatically and report only what's wrong, with the exact file and line. The AI saves its effort for the questions that need judgment.
PROJECTION
Always-current project map
The project overview behind the viewer and the status board is generated from your specs, so it never goes stale or gets edited by hand. CI tells you if it falls out of date.
Skill catalog
Eight skills. Each with one job.
Every skill produces a specific, checkable artifact — never just code. Skills are split into phases with on-demand references to keep agent context small.
| Skill | Use it when | Main output |
|---|---|---|
| hgate-guide | You don't know the next workflow step | One recommended skill, never auto-started |
| domain-exploration | Problem, language, or BC boundaries are unclear | Confirmed domain map and context map |
| architecture-decision-exploration | A cross-system technical decision is unresolved | An ADR (Architecture Decision Record) or design report |
| bc-refinement | One BC needs an approved specification | Domain model, BDD scenarios, decisions, ACLs (anti-corruption layers) |
| bc-review | One BC needs a read-only audit | Evidence-based findings, saved as a review report that backs the BC's lifecycle gate |
| bc-implementation | A refined BC has no material implementation | Tested implementation, traceability report, sign-off; optional property verification |
| bc-enhancement | A BC needs a new capability slice, a changed rule, or a bug fixed | Synchronized spec + code, ghost behavior removed; optional property verification |
| cross-bc-validation | A completed journey crosses several implemented BCs | Feature-local contract + validation report |
Who it's for
The workflow doesn't change. The ceremony does.
Startup, scale-up, or enterprise client — the same eight skills apply. What flexes is how much gets formally signed off.
Startup
Move fast, keep the gates
Compress documentation and skip formal sign-off meetings.
- Session-start sync stays mandatory
- BC review still gates every merge
- Lighter artifacts for throwaway prototype code
Scale-up
Full catalog, async
Every skill in play, without scheduled ceremony.
- Specs live in the repo next to the code
- Gates exist but run on pull requests, not meetings
- Decision and status artifacts stay per-BC
Enterprise
Full ceremony, audited
Traceability treated as a compliance artifact, not a courtesy.
- Independent review required before lifecycle transitions
- Decision and status artifacts audited on a cadence
- Scenario-to-test traceability checked, not assumed
Quickstart
Three steps. Then talk to your agent.
Copy the skills and verifiers in, install the session-start protocol, then hand it to your AI agent.
1
Add hGATE to your project
mkdir -p /path/to/your-project/.github/skills cp -R skills/* /path/to/your-project/.github/skills/ mkdir -p /path/to/your-project/tools cp -R tools/. /path/to/your-project/tools/ # copies every verifier, generator and the viewer, plus tools/shared # preserve each skill's SKILL.md, assets/, references/, decisions.md # optional Goal 3: install fast-check for tools/business-verification # add .hgate/ to .gitignore (the derived status report lives there)
2
Install the project instructions
cp templates/CLAUDE.hgate.md /path/to/your-project/CLAUDE.md
# already have a CLAUDE.md? append the template, keep your conventions
3
Start with the guide
Use hgate-guide. I want to start using hGATE for this project.