{
  "initiative": {
    "name": "PBSC DSAI Ideation Support Initiative",
    "codename": "Build-Present-Initiative",
    "version": "1.0.0",
    "tagline": "Build the software in less time, spend the saved time on the presentation.",
    "live": "https://srs-pbsc.netlify.app/",
    "hub": "index.html",
    "explainer": "ideation-support.html",
    "license": "MIT + CC BY"
  },

  "buildbot": {
    "name": "AutoBuilder (Build Bot)",
    "aliases": ["buildbot", "project-builder", "docs-to-code-engine"],
    "engine": "LLM-assisted docs-to-code generation pipeline",
    "description": "Automatically scaffolds a runnable project from documentation — README, SRS, and COMMANDS become modules, routes, UI, scripts, and verified commands.",
    "inputs": {
      "primary": ["README.md", "SRS.md", "COMMANDS.md"],
      "optional": ["architecture.ascii", "requirements.txt", "API spec (OpenAPI)", "dataset scripts", "wireframe HTML"],
      "reference_build": "PassiveGuard-AI (SIH-145)"
    },
    "pipeline": {
      "stages": [
        { "id": "parse",  "name": "Document Parse",       "action": "Extract pitch, architecture, modules, features, FR/NF ids from README/SRS/COMMANDS" },
        { "id": "plan",   "name": "Build Plan",           "action": "Map documentation sections to concrete files, routes, and commands; compute complexity (0-250) and level" },
        { "id": "scaffold", "name": "Scaffold Generator", "action": "Emit package structure, entrypoint, requirements.txt, launcher scripts (.bat), and dataset/script stubs" },
        { "id": "implement", "name": "Module Implementation", "action": "Write real modules (Flow Engine, Feature Engine, Detection, Alerts, Report) and FastAPI routes with measured data" },
        { "id": "ui",     "name": "Frontend & Dashboards", "action": "Generate live dashboard (Chart.js), presentation page, and printable report template" },
        { "id": "verify", "name": "Verification Pass", "action": "Run self-test, offline demo, API smoke checks (/api/health, /api/metrics), and README/COMMANDS consistency check" },
        { "id": "document", "name": "Docs & Explain",     "action": "Produce README.md, COMMANDS.md, architecture notes, and 30-second viva pitch" }
      ]
    },
    "outputs": {
      "project_structure": "backend/{collectors, flow_engine, feature_engine, detection, alerts, report} + frontend/{dashboard, presentation} + scripts/ + datasets/ + tests/",
      "artifacts": ["setup.bat", "run.bat", "demo.bat", "demo_offline.bat", "test.bat", "report.bat", "model.pkl", "report.html", "report.json"],
      "verification": "node/JSON schema check, python tests\\run_test.py, GET /api/validate"
    },
    "controls": {
      "honesty_guard": "All dashboard metrics must be measured (time.perf_counter latency, ingest_timestamps flows/sec), never hard-coded or simulated.",
      "non_negotiable": [
        "No fabricated accuracy claims — label ML as prototype unless trained on real data",
        "Blockchain = SHA-256 commitment (off critical path) unless a real chain is integrated",
        "Every command in COMMANDS.md must be runnable from the project root",
        "Offline fallback must exist for any live demo"
      ],
      "thresholds": {
        "min_project_points": 100,
        "max_project_points": 250,
        "flagship_points": 250,
        "cardinality": {
          "features_min": 3,
          "features_max": 7,
          "tech_min": 1,
          "tech_max": 26
        }
      },
      "human_gate": "Mentor approval (5-step workflow) required before a generated project is accepted into the hub showcase."
    }
  },

  "components": [
    { "id": "hub",              "name": "Ideation Hub",              "role": "Browse 387+ ideas, complexity scoring (0-250), SRS/UML generation, mentor approval",     "artifact": "index.html",                     "status": "live" },
    { "id": "explainer",        "name": "Ideation Support Explainer", "role": "Explains the initiative: build software faster, invest saved time in presentation",       "artifact": "ideation-support.html",          "status": "live" },
    { "id": "buildbot",         "name": "AutoBuilder (Build Bot)",    "role": "Docs-to-code engine that scaffolds runnable projects from README/SRS/COMMANDS",           "artifact": "buildbot.config.json",           "status": "configured" },
    { "id": "reference_build",  "name": "PassiveGuard-AI (SIH-145)",  "role": "Completed reference build proving the pipeline; passive AI threat detection with evidence", "artifact": "projects_data.js -> PassiveGuard-AI", "status": "complete" },
    { "id": "project_database", "name": "Project Database",           "role": "Single JS data source regenerated daily (+10 ideas/day), feeds hub explorer",                "artifact": "projects_data.js",               "status": "live" },
    { "id": "templates",        "name": "Resource Templates",         "role": "15 reusable documents (SRS, proposal, rubrics, checklists) in .md/.docx/.pdf",              "artifact": "resources/",                     "status": "live" },
    { "id": "mentor_workflow",  "name": "Mentor Workflow",            "role": "5-step SRS approval and 6-item review checklist for human-in-the-loop gating",               "artifact": "index.html#mentor",               "status": "live" },
    { "id": "security_eval",    "name": "Security Evaluation",        "role": "Strix + ExploitDB pass on generated code before showcase acceptance",                        "artifact": "pending",                        "status": "planned" }
  ]
}