Skip to main content

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 TypeBest FormatExample
Implicit Tasks (Dashboard, Semaphores, Auto-reminders)GherkinFee Lifecycle rules
Process Workflows (State machines, Request lifecycles)State Diagram + Transition TableScholarship Request
Explicit Tasks (Human-computer interaction)Use CaseAssign Callback
Validation Rules (Constraints, Policies)Business Rule IndexBR-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:

  1. User clicks "Create Callback"
  2. System prompts for "Target User" and "Reason"
  3. User selects "Sales Team"
  4. 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

  1. Discovery: Identify target "God Method" (see /extract_spec workflow)
  2. Extraction: Use templates from .agent/skills/specification_extraction/templates/
  3. Validation: Request USER review via notify_user
  4. Promotion: Move from draft/ to current/