Task Verification & Assignment Guide

Learn how to assign tasks with automated test rules and verify them in real-time across React, Next.js, Angular, Node.js, Python, and Machine Learning using thinknsh submit <task-id>.

1. The Verification Lifecycle

ThinkNCollab uses a Deterministic Judge Engine. Rather than manual checking, every task can have an objective, machine-executable acceptance test (testConfig).

1
Assign with Criteria
Manager creates a task on the board, assigns a teammate, and attaches a testConfig (API status, browser flow, or ML metric).
2
Write Code & Run Server
Developer writes the implementation locally and starts their development server (e.g. localhost:3000).
3
Run Submit Command
Developer opens thinknsh terminal shell and runs submit <task-id>. Test executes automatically.
4
Auto-Done on Board
Upon passing, the local runner syncs the verdict to ThinkNCollab server, moving the card to Completed ✅.
2. How to Assign a Task (Team Lead / Manager)

Assigning a task with verification takes less than 30 seconds on the Board:

  1. Go to your Board and click "+ Add Task" in any column.
  2. Enter the Task Title (e.g. "Build User Login Route").
  3. Choose the Assignee from your room members dropdown (e.g. Rahul Singh).
  4. Under Verification Strategy, choose HTTP, Browser, Build, or Custom JSON.
  5. Click Create Task. The developer instantly gets notified on their terminal and dashboard!
💡 CLI Alternative: You can also assign from your terminal by opening thinknsh and running create-task.
3. How to Submit & Verify (Developer Guide)

Jab aapka code taiyar ho jaye, verification execute karne ka tareeka:

thinknsh terminal verification session
raman@thinknsh:~ $ thinknsh
raman@thinknsh:~ $ join 672...a9b
✅ Joined room: "Alpha Project"

raman@thinknsh:~ $ submit 6724a1b098f4
── Submitting: "Build User Profile API" ──────────────────────
Type : http
Target : GET http://localhost:3000/api/profile
→ Status : 200
→ Body : {"success":true,"user":{"name":"Rahul","email":"rahul@...

──────────────────────────────────────────────────
PASS Build User Profile API
Result : All checks passed
──────────────────────────────────────────────────
Syncing verdict with Server-Side Judge...
[OK] Verdict verified & saved on ThinkNCollab Server!
4. Multi-Stack Test Config Templates

Select your framework below to view and copy the exact JSON to paste into your task's testConfig:

React (Vite / CRA): Uses headless Chromium to open the SPA, click buttons, fill forms, and assert rendered DOM elements.

testConfig (React Browser Test)
{
  "type": "browser",
  "url": "http://localhost:5173",
  "flow": [
    { "action": "fill", "selector": "#task-input", "value": "Finish TNC Documentation" },
    { "action": "click", "selector": "#add-btn" },
    { "action": "waitForElement", "selector": ".task-item" }
  ],
  "expect": {
    "element": ".task-item",
    "text": "Finish TNC Documentation"
  }
}

Next.js (App Router / SSR): Verifies pages, routes, or full production builds.

Option A: Next.js Production Build & TypeCheck (exitCode)
{
  "type": "exitCode",
  "command": "npx next build",
  "value": 0
}
Option B: Next.js Route & Page Verification (browser)
{
  "type": "browser",
  "url": "http://localhost:3000/dashboard",
  "expect": {
    "element": "h1",
    "text": "Welcome to Dashboard"
  }
}

Angular: Verifies dynamic Angular components, forms, or Karma test runners.

Option A: Angular Component & Form Test (browser)
{
  "type": "browser",
  "url": "http://localhost:4200",
  "flow": [
    { "action": "fill", "selector": "#user-email", "value": "test@user.com" },
    { "action": "click", "selector": "#submit-btn" },
    { "action": "waitForElement", "selector": ".alert-success" }
  ],
  "expect": {
    "element": ".alert-success",
    "text": "Saved Successfully"
  }
}
Option B: Karma / Jasmine Headless Runner (exitCode)
{
  "type": "exitCode",
  "command": "npx ng test --watch=false --browsers=ChromeHeadless",
  "value": 0
}

Plain HTML / Vanilla JS: Simple static sites or local frontend prototypes.

testConfig (HTML UI verification)
{
  "type": "browser",
  "url": "http://localhost:8080/index.html",
  "flow": [
    { "action": "click", "selector": "#theme-toggle-btn" }
  ],
  "expect": {
    "element": "body.dark-mode"
  }
}

Node.js / Express: Probes live REST API endpoints and checks JSON body values.

testConfig (REST API Endpoint Check)
{
  "type": "http",
  "baseUrl": "http://localhost:3000",
  "endpoint": "/api/users",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {
    "email": "raman@thinkncollab.com",
    "name": "Raman"
  },
  "expect": {
    "status": 201,
    "body": {
      "success": { "eq": true },
      "user.email": { "eq": "raman@thinkncollab.com" },
      "user.id": { "exists": true }
    }
  }
}

Python (FastAPI / Flask / Django): Run PyTest test suites or probe live API endpoints.

Option A: PyTest Test Suite (exitCode)
{
  "type": "exitCode",
  "command": "pytest tests/ -v",
  "value": 0
}
Option B: FastAPI Endpoint Check (http)
{
  "type": "http",
  "baseUrl": "http://localhost:8000",
  "endpoint": "/health",
  "method": "GET",
  "expect": {
    "status": 200,
    "body": {
      "status": { "eq": "healthy" }
    }
  }
}

Machine Learning (PyTorch / Scikit-Learn): Condition-based thresholds (gte, lte).

Your Python evaluation script outputs JSON metrics:

evaluate.py
import json
# Evaluation logic...
print(json.dumps({"accuracy": 0.89, "loss": 0.14, "f1_score": 0.87}))
testConfig (Threshold Benchmarks)
{
  "type": "json",
  "command": "python evaluate.py",
  "condition": {
    "accuracy": { "gte": 0.85 },
    "loss": { "lte": 0.20 },
    "f1_score": { "gte": 0.80 }
  }
}

Local CI/CD Pipeline (TNC Build): Runs sequential steps from .tnc/workflows/tnc-ci.yml.

testConfig
{
  "type": "tnc-build"
}
.tnc/workflows/tnc-ci.yml
name: Full Project Pipeline
steps:
  - name: Install Dependencies
    run: npm install
  - name: Type Check & Lint
    run: npm run lint
  - name: Run Test Suite
    run: npm test -- --watchAll=false
  - name: Compile Production Build
    run: npm run build
5. Troubleshooting & Frequently Asked Questions

Q: Playwright error: "Executable doesn't exist"

Terminal me Chromium download karein: npx playwright install chromium.

Q: "Connection Refused at localhost:3000"

Aapka frontend ya backend server doosre terminal window me running hona chahiye tabhi submit use probe kar payega.

Q: PyTest ya Jest ka test loop khatam nahi ho raha?

Interactive watch mode disable karein: npm test -- --watchAll=false ya CI=true npm test.