🔄 5. Workflows & Lifecycle
This section describes the primary user flows from a technical perspective.
📝 5.1 Requirement Lifecycle
- Submission (Customer)
- Customer fills form ->
submitRequirementServer Action. - Action calls
AI.validateRequirement().- If Invalid: Rejects immediately. Logs Violation. Returns error to user.
- If Valid: Saves to DB with status
PENDING_REVIEW.
- Customer fills form ->
- Review (Manager)
- Manager views "Pending" list.
- Action:
approveRequirementorrejectRequirement. - If Approved, status ->
APPROVED.
- Job Generation (Manager)
- Manager clicks "Generate Jobs" on an Approved Requirement.
- Action calls
AI.generateJobsFromRequirement(). - AI returns a list of Job objects.
- Jobs are saved to DB with status
OPEN(Available in Job Pool).
🔨 5.2 Development Lifecycle
- Job Pickup (Employee)
- Employee views Job Pool (Filter: Status
OPEN). - Clicks "Accept Job".
- Action assigns
job.assigneeId = currentUser.idand sets statusASSIGNED.
- Employee views Job Pool (Filter: Status
- Task Breakdown (Employee)
- Employee can manually create tasks OR click "AI Breakdown".
AI.breakdownJobIntoTasks()creates 3-5 sub-tasks (e.g., "Setup DB", "Create UI").
- Execution (Kanban)
- Employee moves Tasks:
TODO->IN_PROGRESS->DONE. - Progress bar updates automatically based on % of completed tasks.
- Employee moves Tasks:
- Completion
- When all Tasks are
DONE, the Job is markedCOMPLETED. - When all Jobs for a Requirement are
COMPLETED, the Requirement is fulfilled.
- When all Tasks are
🏃 5.3 Scrum Lifecycle
- Sprint Creation (Scrum Manager)
- Admin/Manager creates a new Sprint (e.g., "Sprint 1") with start/end dates.
- Sprint Planning (Reviews Page)
- Managers review "Backlog" tasks.
- Action: Assign approved tasks to the "Planned" Sprint.
- Sprint Start
- Manager clicks Start Sprint in Scrum Manager.
- The Kanban board now filters to show only tasks in this Active Sprint.
- Execution & Closure
- Team works on tasks.
- Manager clicks End Sprint.
- AI generates a summary. Incomplete tasks are moved to the Backlog or next Sprint.
🛡️ 5.4 Security Incident Lifecycle (Automated)
- Trigger: User submits "I want a script to hack Facebook".
- Detection:
AI.validateRequirementflags asILLEGAL. - Enforcement:
- DB: Insert
ViolationLog. - DB: Update
User.violationCount += 1. - Logic:
- If Count == 1: Create
AccountSuspension(24h). - If Count == 3: Create
AccountSuspension(Indefinite).
- If Count == 1: Create
- DB: Insert
- Lockout:
- Next time user tries to log in or submit,
isSuspended()check fails. - User sees "Account Suspended until [Date]" message.
- Next time user tries to log in or submit,