Functional Specification Strategy: WEP Task Architecture
This document provides a high-level overview of the Hybrid Strategy for documenting WEP business logic. For detailed extraction instructions, templates, and best practices, refer to the Specification Extraction Skill.
[!TIP] Detailed Instructions: See Specification Extraction Skill for step-by-step guidance, templates, and examples.
The Hybrid Approach
The WEP system is a composite of three distinct "Behavioral Drivers". A single specification format would be inefficient.
| Logic Type | Best Format | Example |
|---|---|---|
| Implicit Tasks (Dashboard, Semaphores, Auto-reminders) | Gherkin | Fee Lifecycle rules |
| Process Workflows (State machines, Request lifecycles) | State Diagram + Transition Table | Scholarship Request |
| Explicit Tasks (Human-computer interaction) | Use Case | Assign Callback |
| Validation Rules (Constraints, Policies) | Business Rule Index | BR-OMGT-001 |
Quick Reference
Implicit Tasks → Gherkin
Feature: Order Worklist - Payment Reminders
Scenario: Application Fee is overdue for First Reminder
Given an Order exists with Status "VALIDATED"
And the Order "ValidatedOn" date is >= 5 days ago
And the "Application Fee" is NOT marked as PAID
When the "Dashboard Worklist" is calculated
Then the Order should appear in the "To Chase" widget
Process Workflows → State Diagram
Explicit Tasks → Use Case
Use Case: UC-001 Assign Callback
Actor: Operator
Main Success Scenario:
- User clicks "Create Callback"
- System prompts for "Target User" and "Reason"
- User selects "Sales Team"
- System notifies Sales Team via socket/email
Folder Structure
docs/architecture/specs/
├── draft/[module]/ # Work-in-progress (either format)
├── current/[module]/ # Validated specifications
│ ├── dashboard_logic/ # Gherkin (Implicit Tasks)
│ ├── request_workflows/ # State Diagrams
│ └── user_tasks/ # Use Cases
└── proposals/ # Architectural proposals
Workflow
- Discovery: Identify target "God Method" (see
/extract_specworkflow) - Extraction: Use templates from
.agent/skills/specification_extraction/templates/ - Validation: Request USER review via
notify_user - Promotion: Move from
draft/tocurrent/
Related Resources
- Skill: Specification Extraction
- Workflow: /extract_spec
- Rule: Path Conventions
- Example: OrderFee Module