-
Notifications
You must be signed in to change notification settings - Fork 0
Phases
The 10-phase workflow of HES.
ZERO → DISCOVERY → SPEC → DESIGN → DATA → RED → GREEN → SECURITY → REVIEW → DONE
Each phase has:
- A skill file (
skills/XX-name.md) - A gate (condition that must be met before advancing)
- Artifacts (files that must be created)
- A step budget (maximum actions before escalation)
Purpose: Bootstrap the project
Skill: 00-bootstrap.md
Gate: .hes/ directory exists with valid current.json
Artifacts:
.hes/state/current.json.hes/agents/registry.json.hes/schemas/*.json
Purpose: Elicit business rules and requirements
Skill: 01-discovery.md
Gate: docs/discovery.md exists with business rules
Artifacts:
-
docs/discovery.md— Business rules -
docs/business-rules.md— Formal business rules
Activities:
- Interview stakeholders
- Identify actors and use cases
- Document business rules
- Validate with stakeholders
Purpose: Write BDD scenarios and API contracts
Skill: 02-spec.md
Gate: docs/spec.md exists with BDD scenarios
Artifacts:
-
docs/spec.md— BDD scenarios -
docs/api-contracts.md— API contracts (if applicable)
Activities:
- Convert business rules to BDD scenarios
- Define API contracts
- Validate scenarios with stakeholders
Purpose: Make architecture decisions
Skill: 03-design.md
Gate: docs/design.md exists with ADRs
Artifacts:
-
docs/design.md— Architecture Decision Records
Activities:
- Identify architectural drivers
- Make design decisions
- Document ADRs
- Validate with team
Purpose: Design data model and migrations
Skill: 04-data.md
Gate: docs/data.md exists with data model
Artifacts:
-
docs/data.md— Data model -
migrations/— SQL migrations (if applicable)
Activities:
- Design entity-relationship diagram
- Define schema
- Write migrations
- Validate with stakeholders
Purpose: Write tests first (TDD)
Skill: 05-tests.md
Gate: Tests are written and failing
Artifacts:
- Test files (failing)
Activities:
- Write unit tests
- Write integration tests
- Verify tests fail (RED)
Purpose: Implement code to make tests pass
Skill: 06-implementation.md
Gate: All tests pass
Artifacts:
- Implementation code
- All tests passing
Activities:
- Implement minimal code to pass tests
- Refactor as needed
- Verify all tests pass (GREEN)
Purpose: Run security scans
Skill: 10-security.md
Gate: No critical/high findings
Artifacts:
- Security scan reports
Activities:
- Run Bandit (Python)
- Run Semgrep (multi-language)
- Review findings
- Fix critical/high issues
Purpose: Code review
Skill: 07-review.md
Gate: Review checklist completed
Artifacts:
- Review checklist (completed)
Activities:
- Review code quality
- Review architecture
- Review security
- Review documentation
- Approve or request changes
Purpose: Feature complete
Skill: None (terminal state)
Gate: All previous gates satisfied
Artifacts:
- Feature branch ready for merge
Activities:
- Final verification
- Create PR
- Merge to main
/hes next
The agent will:
- Check if the current phase gate is satisfied
- If yes, advance to the next phase
- If no, explain what's missing
/hes skip --reason "justification"
Requires a valid justification. The skip is logged.
/hes undo
Rolls back to the previous phase.
Last updated: June 2026