
Tool Chain
AI-Driven Agile Development Methodology Based on ApiHug
Updated on 2026-01-03
ApiHug BMAD - Breakthrough Method for Agile AI Driven Development
ApiHug AI-driven agile development methodology is base on BMAD (Breakthrough Method for Agile AI Driven Development), implementing automated generation from requirements to code through Agents (intelligent agents) and Workflows (workflows).
Core Capabilities:
Prerequisites: Must install ApiHug REPL first
# 1. Start REPL
./apihug
# 2. Execute installation command
apihug> install
Guided Installation Process:
install --help
NAME
install - Install or update BMAD core agents and tools
SYNOPSIS
install [OPTIONS]
OPTIONS
--directory <String>
Installation directory path
[Default: . (current directory)]
--quick-update <boolean>
Quick update mode (preserve existing configuration)
[Default: false]
--compile-agents <boolean>
Only recompile Agents (do not modify configuration)
[Default: false]
--modify <boolean>
Modify existing BMAD installation
[Default: false]
--enable-tts <boolean>
Enable TTS text-to-speech
[Default: false]
--ides <String>
Specify IDE list (comma-separated)
Supported: cursor,codex,windsurf,claude
[Example: --ides cursor,codex]
Common Installation Scenarios:
# Full installation (interactive)
install
# Specify directory and IDE
install --directory ~/projects/my-api --ides cursor
# Quick update (preserve configuration)
install --quick-update true
# Only recompile Agents
install --compile-agents true
| Workflow Path | Function Description | Use Case |
|---|---|---|
/bmad:bmw:workflows:apihug-proto-design | Proto design workflow | Automatically generate API/Domain/Enum proto files based on requirements |
/bmad:bmw:workflows:apihug-end-to-end | End-to-end development process | Complete process from requirement analysis to code implementation |
/bmad:bmw:workflows:apihug-project-review | Project review workflow | Code specification check, architecture optimization suggestions |
/bmad:bmw:workflows:apihug-app-implement | Application implementation workflow | Generate Service layer business code based on proto |
Trigger Method: Enter /bmad:bmw:workflows:apihug-proto-design in IDE
Input:
Requirement: User management module
- Need user registration interface
- Need user login interface
- Need user information query interface
- User status includes: active, disabled, deleted
Output:
// Automatically generate API layer
service UserService {
option (hope.swagger.svc) = {path: "/user"};
rpc Register(RegisterRequest) returns (UserResponse) {...}
rpc Login(LoginRequest) returns (TokenResponse) {...}
rpc GetUser(GetUserRequest) returns (UserResponse) {...}
}
// Automatically generate Domain layer
message UserEntity {
option (hope.persistence.table) = {
name: "USER",
wires: [IDENTIFIABLE, AUDITABLE]
};
// ...
}
// Automatically generate Enum layer
enum UserStatus {
ACTIVE = 0 [(hope.constant.field) = {code: 1, message: "Active"}];
DISABLED = 1 [(hope.constant.field) = {code: 2, message: "Disabled"}];
DELETED = 2 [(hope.constant.field) = {code: 3, message: "Deleted"}];
}
Use Case: Complete feature module development
Process Steps:
Check Items:
Path: /bmad:bmw:agents:apihug
Functions:
Usage Example:
User: Help me create an order management API
Agent: I will create an order management API for you, including the following content:
1. Service definition (OrderService)
2. Request/Response messages (CreateOrderRequest/OrderResponse)
3. Order status enum (OrderStatus)
4. Order entity (OrderEntity)
Do you need to include the following functions?
- Order creation
- Order query
- Order cancellation
- Order status update
User: Yes, include all
Agent: [Automatically generate complete proto files]
BMAD is based on ApiHug’s three-layer specification system, ensuring consistency and accuracy of generated code.
| Specification | Scope | Documentation Link |
|---|---|---|
| API Directive Specification | Service/Method/Message/Field | View Details |
| Database Directive Specification | Entity/Column | View Details |
| Enum Type Specification | Enum/EnumValue | View Details |
Forbid Cross-layer References:
// ❌ Wrong: API layer referencing Domain layer
import "com/example/domain/entities/user.proto";
// ✅ Correct: API layer referencing Infra layer enums
import "com/example/infra/constants/user_constant.proto";
Forbid Wrapper Types:
// ❌ Wrong
google.protobuf.Int32Value user_id = 1;
// ✅ Correct
int32 user_id = 1;
New feature development → apihug-end-to-end
API design only → apihug-proto-design
Code refactoring → apihug-project-review
Business logic implementation → apihug-app-implement
Interactive writing → apihug agent
Q1: Generated code from Workflow doesn’t meet expectations?
A1: Use apihug-project-review for review, adjust according to suggestions
Q2: How to customize Workflow behavior?
A2: Use install --modify true to modify configuration
Q3: Which IDEs are supported? A3: Cursor, Codex, Windsurf, Claude Desktop and other IDEs that support MCP
# Quick update (preserve configuration)
apihug> install --quick-update true
# Complete reinstallation
apihug> install --modify true
# Only recompile Agents (configuration unchanged)
apihug> install --compile-agents true