moai-workflow-spec
Orchestrates SPEC workflows using EARS/GEARS. Standardizes requirements, acceptance criteria, and project planning.
Install
mkdir -p .claude/skills/moai-workflow-spec && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4275" && unzip -o skill.zip -d .claude/skills/moai-workflow-spec && rm skill.zipInstalls to .claude/skills/moai-workflow-spec
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
SPEC workflow orchestration with EARS format, requirement clarification, and Plan-Run-Sync integration for MoAI-ADK development methodologyKey capabilities
- →Generates requirements using GEARS notation
- →Validates acceptance criteria using the TRUST 5 framework
- →Formats specifications into spec.md, plan.md, and acceptance.md
- →Maps legacy EARS patterns to current requirements
- →Integrates specification documentation with the Plan-Run-Sync workflow
How it works
It applies requirement engineering templates to user input, applying linting rules and structural constraints to ensure GEARS compliance.
Inputs & outputs
When to use moai-workflow-spec
- →Draft project specifications
- →Define acceptance criteria
- →Manage requirements gathering
- →Format user stories
About this skill
SPEC Workflow Management
Quick Reference
SPEC Workflow Orchestration using GEARS notation (current) — backed by the EARS legacy backward-compatibility window — for systematic requirement definition and Plan-Run-Sync workflow integration.
Lint behavior canonicalized per the GEARS migration policy.
Core Capabilities:
- GEARS-Format Specifications (current): Five requirement patterns with the unified compound clause
[Where ...][While ...][When ...] The <subject> shall <behavior>and a generalized<subject>(any noun, not only "the system") - EARS Legacy Reference: All EARS patterns preserved per the lint engine's backward-compatibility policy to keep pre-v3 SPECs (those authored before GEARS became canonical) readable
- Requirement Clarification: Four-step systematic process with assumption analysis
- SPEC Document Templates: Standardized 3-file structure (spec.md / plan.md / acceptance.md)
- Plan-Run-Sync Integration: Seamless workflow connection
- Parallel Development: Git Worktree-based SPEC isolation
- Quality Gates: TRUST 5 framework validation
GEARS Five Patterns (current notation):
| Pattern | GEARS form (current) | EARS form (legacy) | Notes |
|---|---|---|---|
| Ubiquitous | "The <subject> shall <behavior>" | "The system shall <behavior>" | <subject> may be any noun: system, component, service, agent, function, artifact |
| Event-driven | "When <event-detected>, the <subject> shall <behavior>" | "WHEN <event>, the system shall <action>" | Unchanged trigger semantics |
| State-driven | "While <state>, the <subject> shall <behavior>" | "WHILE <state>, the system shall <action>" | Unchanged — promoted as a first-class pattern |
| Capability gate | "Where <capability / feature flag / static config>, the <subject> shall <behavior>" | "WHERE <feature exists>, the system shall <action>" | Reframed — represents capability gate / feature flag / static config (no longer "Optional") |
| Event-detected (replaces IF/THEN) | "When <undesired-condition-detected>, the <subject> shall <response>" | IF <condition> THEN <action> [DEPRECATED — use WHEN <event-detected>] | The IF/THEN modality was removed; describe the same intent as a detected event |
Unified compound clause: **Where** <precondition> **While** <state> **When** <event> the <subject> shall <behavior> — any subset of the three modifiers may chain.
IF/THEN deprecated callout: Authoring guidance previously used
IF <condition> THEN <action>to describe state-conditioned behavior. In GEARS that intent is expressed asWhen <condition-detected>(event-detected form). The lint engine emits aLegacyEARSKeywordwarning (non-strict) or error (moai spec lint --strict) on residualIF/THENin new SPECs. The 6-month backward-compatibility window remains active for legacy SPECs.
Generalized subject substitution: GEARS replaces the hardcoded "the system" subject with <subject>, which may be any noun. Authors writing NEW SPECs MAY use the generalized form. Examples of valid non-"the system" subjects:
- "The skill shall present GEARS as the primary notation." (Ubiquitous,
<subject>= skill) - "The agent shall return a blocker report instead of prompting the user." (Ubiquitous,
<subject>= agent) - "When a SPEC author opens the file, the component shall display the deprecation banner." (Event-driven,
<subject>= component)
Pre-v3 SPECs (those authored before GEARS became canonical) keep "The system" as the default subject for readability; existing readers do not need to relearn the canonical phrase.
EARS Five Patterns (legacy — 6-month backward-compatibility window):
| Pattern | Format | Use |
|---|---|---|
| Ubiquitous | "The system shall always X" | Always active |
| Event-Driven | "WHEN event THEN action" | Trigger-response |
| State-Driven | "WHILE state, the system shall ..." | Conditional behavior (use WHILE, not legacy IF/THEN) |
| Unwanted | "The system shall not X" | Prohibition |
| Optional | "Where possible, provide X" | Nice-to-have |
The legacy IF/THEN modality is replaced by GEARS When <event-detected> — see callout above.
When to Use:
- Feature planning and requirement definition
- SPEC document creation and maintenance
- Parallel feature development coordination
- Quality assurance and validation planning
- Requirements gathering from user story narratives
Quick Commands:
/moai:1-plan "user authentication system" # Create new SPEC
/moai:1-plan "login" "signup" # Parallel SPECs
/moai:1-plan "payment processing" --branch # New branch
/moai:1-plan SPEC-001 "add OAuth support" # Update existing
Implementation Guide
Core Concepts
SPEC-First Development Philosophy:
- EARS format ensures unambiguous requirements
- Requirement clarification prevents scope creep
- Systematic validation through test scenarios
- Integration with DDD workflow for implementation
- Quality gates enforce completion criteria
- Constitution reference ensures project-wide consistency
Constitution Reference (SDD 2025 Standard)
Constitution defines the project DNA that all SPECs must respect. Before creating any SPEC, verify alignment with .moai/project/tech.md.
Constitution Components: Technology Stack, Naming Conventions, Forbidden Libraries, Architectural Patterns, Security Standards, Logging Standards.
Constitution Verification: All SPEC technology choices align with Constitution stack versions, no forbidden libraries, naming conventions respected, architectural boundaries preserved.
WHY: Constitution prevents architectural drift and ensures maintainability.
SPEC Workflow Stages
| Stage | Activity |
|---|---|
| 1 | User Input Analysis — parse natural-language feature description |
| 2 | Requirement Clarification — 4-step systematic process |
| 3 | EARS Pattern Application — structure requirements using five patterns |
| 4 | Success Criteria Definition — establish completion metrics |
| 5 | Test Scenario Generation — create verification test cases |
| 6 | SPEC Document Generation — produce standardized markdown |
GEARS Format (current)
GEARS (Generalized EARS) is the canonical SPEC notation as of v3.0.0. It preserves Ubiquitous / When (event-driven) / While (state-driven) and reframes Where as a capability gate. The legacy IF/THEN modality is replaced by When <event-detected>.
GEARS notation is exhaustively described in docs-site GEARS notation reference and the canonical GEARS migration policy record.
Compound clause example (with non-"the system" subject):
Where the project is initialized While strict mode is active When a SPEC author runs
moai spec lint, the lint engine shall emit aLegacyEARSKeywordfinding for every residualIF/THENmodality.
This example chains all three GEARS modifiers (Where, While, When) and uses <subject> = "lint engine" rather than "the system".
EARS Format (legacy — 6-month backward-compatibility window)
Five patterns cover all requirement types. Each pattern has a specific use case and test strategy. Pre-v3 SPECs (those authored before GEARS became canonical) continue to use EARS notation and remain valid per the lint engine's backward-compatibility policy.
See EARS deep dive with examples per pattern for use cases, examples, and test strategies for Ubiquitous, Event-Driven, State-Driven, Unwanted, and Optional requirements.
Requirement Clarification Process
5-step systematic process:
- Step 0: Assumption Analysis (Philosopher Framework) — surface technical, business, team, integration assumptions
- Step 0.5: Root Cause Analysis (Five Whys) — surface problem to root cause for problem-driven SPECs
- Step 1: Scope Definition — supported methods, validation rules, failure handling, session management
- Step 2: Constraint Extraction — performance, security, compatibility, scalability
- Step 3: Success Criteria — coverage targets, response time percentiles, functional completion, quality gates
- Step 4: Test Scenario Creation — normal, error, edge, security cases
See requirement clarification detailed workflow for assumption documentation templates and Five Whys application.
[NEEDS CLARIFICATION] Marker Convention
[NEEDS CLARIFICATION: <topic>] markers identify unresolved questions in plan.md and research.md that MUST be settled before Implementation Kickoff Approval (plan→run HUMAN GATE).
Placement: ONLY in plan.md and research.md (NEVER in spec.md or acceptance.md).
Format:
[NEEDS CLARIFICATION: <specific topic>]— inline marker for open questions- Each marker MUST be addressable via orchestrator AskUserQuestion before run-phase entry
- plan-auditor detects unclarified markers and flags as "clarification gate" finding
3-Layer Distinction:
[NEEDS CLARIFICATION: <topic>]— plan/research artifact blocker (user Q required)TODO— code-level implementation debt (no user Q needed)@MX:TODO— code-level annotation for untested/incomplete code
Processing:
- plan-auditor scans for
[NEEDS CLARIFICATION]markers during audit - If any remain, plan-auditor recommends resolution before Implementation Kickoff Approval
- Orchestrator runs AskUserQuestion rounds to resolve each marked topic
- Implementation Kickoff Approval (mandatory human gate) proceeds only after all clarifications are resolved
Plan-Run-Sync Workflow Integration
PLAN (/moai:1-plan): manager-spec analyzes input → EARS requirements → clarification → SPEC creation in .moai/specs/ → optional --branch.
RUN (/moai:2-run): manager-develop loads SPEC → ANALYZE-PRESERVE-IMPROV
Content truncated.
When not to use it
- →For exploratory coding without formal requirements
- →For minor bug fixes not requiring architectural documentation
Prerequisites
Limitations
- →Restricted to standardized GEARS requirement patterns
- →High token usage during progressive disclosure phases
How it compares
It formalizes requirement gathering into a multi-file structural artifact, whereas a generic assistant treats specs as simple text.
Compared to similar skills
moai-workflow-spec side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| moai-workflow-spec (this skill) | 1 | 2mo | Review | Intermediate |
| planning-with-files | 233 | 6mo | Review | Intermediate |
| trello | 41 | 2mo | Review | Beginner |
| pmbok-project-management | 38 | 9mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by modu-ai
View all by modu-ai →You might also like
planning-with-files
davila7
Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.
trello
openclaw
Manage Trello boards, lists, and cards via the Trello REST API.
pmbok-project-management
jgtolentino
Comprehensive PMP/PMBOK project management methodologies and best practices. Use this skill when users need guidance on project management processes, templates, knowledge areas, process groups, tools, techniques, or certification preparation. Covers all 10 PMBOK Knowledge Areas and 5 Process Groups with practical templates, frameworks, and industry-standard approaches. Includes risk management, stakeholder engagement, schedule management, cost control, quality assurance, and resource planning.
clickup
civitai
Interact with ClickUp tasks and documents - get task details, view comments, create and manage tasks, create and edit docs. Use when working with ClickUp task/doc URLs or IDs.
ma-playbook
alirezarezvani
M&A strategy for acquiring companies or being acquired. Due diligence, valuation, integration, and deal structure. Use when evaluating acquisitions, preparing for acquisition, M&A due diligence, integration planning, or deal negotiation.
create-plan
antinomyhq
Generate detailed implementation plans for complex tasks. Creates comprehensive strategic plans in Markdown format with objectives, step-by-step implementation tasks using checkbox format, verification criteria, risk assessments, and alternative approaches. Use when users need thorough analysis and structured planning before implementation, when breaking down complex features into actionable steps, or when they explicitly ask for a plan, roadmap, or strategy. Strictly planning-focused with no code modifications.