# Module Completeness Challenge Reference

> **Purpose:** Industry-standard module expectations per application type.
> Used by step-01 (competitive challenge), step-02 (module completeness validation),
> and step-03 (section completeness per module).
> This is a FALLBACK when WebSearch is unavailable and a VALIDATION reference when it is.

---

## Application Archetypes

### HR / Human Resources

**Minimum modules: 3**

| Module | Classification | Standard Sections | Key Entities |
|--------|---------------|-------------------|-------------|
| Employees | CORE | list, detail(tabs: info, contracts, documents, history), dashboard | Employee, Department, Position |
| Absences/Leave | CORE | list, detail, calendar, approve, open-requests, rejected, history, my-balance | Absence, AbsenceType, AbsenceBalance |
| Documents | STANDARD | list, detail, upload, my-documents | EmployeeDocument, DocumentType |
| Evaluations | OPTIONAL | list, detail, campaign, my-evaluation | Evaluation, EvaluationCriteria, Campaign |
| Organization | OPTIONAL | orgchart, departments | Department (hierarchy) |

**Standard business rules (Absences — domain-specific, NOT generic CRUD):**
- Half-day absences (morning/afternoon selection)
- Minimum notice period for planned leave (e.g., 48h for non-urgent)
- Team capacity limit (max % of team absent simultaneously)
- Probation period restrictions (limited leave types during probation)
- Carry-over limits and expiry dates (unused days expire after date X)
- Medical certificate required for absences exceeding N days
- Holiday calendar integration (exclude public holidays from business days)
- Consecutive day limits (max N consecutive days for certain leave types)
- Manager cannot approve their own absences (separation of duties)
- Balance recalculation on approval/cancellation

---

### CRM

**Minimum modules: 3**

| Module | Classification | Standard Sections | Key Entities |
|--------|---------------|-------------------|-------------|
| Accounts/Clients | CORE | list, detail(tabs: info, contacts, opportunities, documents, history), dashboard | Client, Contact, Address |
| Opportunities | CORE | list, detail, kanban/pipeline, dashboard, my-opportunities | Opportunity, PipelineStage, Activity |
| Quotes/Proposals | CORE | list, detail(tabs: info, lines, history) | Quote, QuoteLine |
| Activities/Tasks | STANDARD | list, detail, calendar, my-activities | Activity, ActivityType |
| Campaigns | OPTIONAL | list, detail, dashboard, targeting | Campaign, CampaignTarget |
| Products/Catalog | OPTIONAL | list, detail | Product, ProductCategory |

**Standard business rules (Opportunities — domain-specific):**
- Probability auto-updates based on pipeline stage
- Mandatory reason when moving to "Lost" stage
- Close date validation (cannot be in the past for active opps)
- Weighted pipeline calculation (amount * probability)
- Stage-gate validation (mandatory fields per stage)

---

### Billing / Invoicing

**Minimum modules: 3**

| Module | Classification | Standard Sections | Why CORE/STANDARD |
|--------|---------------|-------------------|-------------------|
| Invoices (Factures) | CORE | list, detail(tabs: info, lines, payments, history), generate, dashboard, overdue | Base entity — invoice lifecycle |
| Credit Notes (Avoirs) | CORE | list, detail(tabs: info, lines, history) | **Legally required** to correct/cancel invoices. Cannot have invoicing without credit notes. |
| Payment Tracking (Paiements) | CORE | list, detail, reconciliation, overdue, my-payments | **The whole point of invoicing** — who paid? who didn't? Partial payments? |
| Dunning/Collections (Relances) | STANDARD | list, detail, schedule, history, overdue-dashboard | Automated follow-up on unpaid invoices |
| Reporting | STANDARD | dashboard, export, period-comparison | Financial analysis, tax declarations |
| Configuration | OPTIONAL | invoice-templates, tax-rates, numbering-rules, payment-terms | Advanced setup |

**Why 1-module Billing is ALWAYS wrong:**
- Credit notes are legally required in most jurisdictions (EU, US, etc.)
- Payment tracking is the core purpose of invoicing (receivables management)
- Without dunning/collections, overdue invoices are invisible to the business
- A billing app without these is just a CRUD form, not a billing system
- Any web search for "billing software features" confirms these as table stakes

**Standard business rules (Invoices — domain-specific):**
- Sequential invoice numbering (no gaps, legally required)
- Immutability of sent invoices (cannot modify after sending)
- Credit note must reference original invoice
- Auto-transition to "Overdue" when dueDate passes and status != Paid
- Partial payment support (remainingAmount = total - paidAmount)
- Auto-generate from timesheet data (T&M projects)
- PDF generation on send (with legal mentions)
- Tax calculation rules (VAT, withholding, multi-rate)

---

### Project Management

**Minimum modules: 3**

| Module | Classification | Standard Sections | Key Entities |
|--------|---------------|-------------------|-------------|
| Projects | CORE | list, detail(tabs: info, tasks, team, budget, milestones, history), dashboard | Project, ProjectMember, ProjectBudget |
| Tasks | CORE | list, detail, kanban, my-tasks | Task, TaskAssignment |
| Time Tracking | STANDARD | list, timesheet, approve, my-entries | TimeEntry, TimeValidation |
| Milestones | STANDARD | list, timeline | Milestone |
| Resources/Team | OPTIONAL | list, allocation, availability | Resource, Allocation |
| Reports | OPTIONAL | dashboard, export | (aggregation views) |

**Standard business rules (Time Tracking — domain-specific):**
- Cannot log time on closed/completed projects
- Cannot log more than N hours per day
- Cannot log time in the future
- Timesheet submission deadline (e.g., end of week)
- Manager approval required before invoicing
- Rate calculation based on employee level/project rate
- Billable vs non-billable hours tracking

---

### E-commerce / Orders

**Minimum modules: 3**

| Module | Classification | Standard Sections |
|--------|---------------|-------------------|
| Products | CORE | list, detail(tabs: info, variants, pricing, stock), dashboard |
| Orders | CORE | list, detail(tabs: info, lines, payments, shipping, history), dashboard |
| Customers | CORE | list, detail(tabs: info, addresses, orders, history) |
| Inventory | STANDARD | list, movements, alerts |
| Shipping | STANDARD | list, detail, tracking |
| Returns | OPTIONAL | list, detail |

---

### Support / Ticketing

**Minimum modules: 3**

| Module | Classification | Standard Sections |
|--------|---------------|-------------------|
| Tickets | CORE | list, detail, dashboard, my-tickets, unassigned |
| Knowledge Base | CORE | list, detail, search |
| SLA Management | STANDARD | list, detail, dashboard |
| Categories | STANDARD | list, detail (hierarchy) |
| Reports | OPTIONAL | dashboard, export |

---

## Section Archetypes Per Module Pattern

### Workflow Module (approval pattern)
**MANDATORY sections:** list, detail, approve
**STANDARD contextual views:** open-requests, rejected, history, my-{entity}
**OPTIONAL:** dashboard, calendar

### Data-Centric Module (CRUD)
**MANDATORY sections:** list, detail
**STANDARD:** dashboard (if > 100 records/month), import, export
**OPTIONAL:** merge (deduplication)

### Dashboard Module (reporting)
**MANDATORY sections:** dashboard
**STANDARD:** export, period-comparison
**OPTIONAL:** alerts, scheduled-reports

---

## Usage Protocol

1. **step-01 (cadrage):** Use competitive research + this reference to challenge scope BEFORE scope lock
2. **step-02 (structure):** Compare identified modules against archetype for EACH application
   - CORE missing = **BLOCKING** AskUserQuestion (add / integrate / exclude with justification)
   - STANDARD missing = WARNING + proactive suggestion
   - Module count below minimum = **BLOCKING** challenge
3. **step-03 (specify):** Compare sections against archetype for EACH module
   - Propose missing standard sections via AskUserQuestion (multiSelect)
   - Propose domain-specific business rules from archetype
4. **step-04 (consolidate):** Verify all CORE modules accounted for (present or excluded with justification)
