Skip to content

🔄 5. Workflows & Lifecycle

This section describes the primary user flows from a technical perspective.

📝 5.1 Requirement Lifecycle

  1. Submission (Customer)
    • Customer fills form -> submitRequirement Server Action.
    • Action calls AI.validateRequirement().
      • If Invalid: Rejects immediately. Logs Violation. Returns error to user.
      • If Valid: Saves to DB with status PENDING_REVIEW and phase UI_UX.
  2. Review (Manager)
    • Manager views "Pending" list.
    • Action: approveRequirement or rejectRequirement.
    • If Approved, status -> APPROVED.
  3. 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).
  4. Phase Progression (Automated & Manual)
    • As Jobs are completed and URLs are submitted via Kanban, the Requirement phase advances automatically (UI_UX -> DESIGN_APPROVAL -> CI_CD -> DEVELOPMENT -> TESTING -> COMPLETED).

🔨 5.2 Development Lifecycle

  1. Job Pickup (Employee)
    • Employee views Job Pool (Filter: Status OPEN).
    • Clicks "Accept Job".
    • Action assigns job.assigneeId = currentUser.id and sets status ASSIGNED.
  2. 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").
  3. Execution & Assets (Kanban)
    • Employee moves Tasks: TODO -> IN_PROGRESS -> REVIEW -> DONE.
    • Progress bar updates automatically based on % of completed tasks.
    • For specific jobs, employee submits a Design URL or Repo URL via modal prompts on the Kanban Board. This submission is mandatory on initial completion, but users can skip it during rework if the URL is already present.
    • QA Phase: Employees or automated runners can submit raw testing logs for AI parsing to determine pass/fail confidence.
  4. Completion & Deployment
    • When all Tasks are DONE, the Job is marked COMPLETED.
    • When all Jobs for a Requirement are COMPLETED, the Requirement is fulfilled.
    • During the CI_CD phase, deployments can be simulated through triggerDeploymentAction replicating webhook operations tracked actively via Audit Logs.

🏃 5.3 Scrum Lifecycle

  1. Sprint Creation (Admin/Manager)
    • Admin or Manager creates a new Sprint (e.g., "Sprint 1") from the Review Tasks page with start/end dates.
  2. Sprint Planning (Review Tasks Page)
    • Managers review "Backlog" tasks and "Active/Completed" tasks.
    • Action: Assign approved tasks to the active Sprint.
    • Action: Edit or Delete Sprints as necessary from the Sprint configuration modal.
  3. Sprint Start
    • Manager clicks Start Sprint in Scrum Manager.
    • The startDate is dynamically updated to the exact moment the sprint kicks off, ensuring accurate timeframe tracking.
    • The Kanban board filters to show only tasks in this Active Sprint.
  4. Execution & Closure
    • Team works on tasks.
    • Manager clicks End Sprint.
    • The AI automatically generates a Sprint Retrospective, storing achievements and bottlenecks actively in the Audit Logs. Incomplete tasks are returned to the Backlog.

🛡️ 5.4 Security Incident Lifecycle (Automated)

  1. Trigger: User submits "I want a script to hack Facebook".
  2. Detection: AI.validateRequirement flags as ILLEGAL.
  3. Enforcement:
    • DB: Insert ViolationLog.
    • DB: Update User.violationCount += 1.
    • Logic:
      • If Count == 3: Create AccountSuspension (24h).
      • If Count == 6: Create AccountSuspension (1 Week).
      • If Count >= 9: Create AccountSuspension (Indefinite).
  4. Lockout:
    • Next time user tries to log in or submit, isSuspended() check fails.
    • User sees "Account Suspended until [Date]" message.

Next: Deployment ➡️