{
  "name": "node-starter-validation",
  "version": "1.0.0",
  "description": "A practical validation workflow for a fresh Node.js installation.",
  "checks": [
    {
      "name": "runtime_versions",
      "description": "Confirm that node and npm are available and return version strings.",
      "commands": [
        "node -v",
        "npm -v"
      ],
      "expected": {
        "node": "A semantic version string such as v20.x.x",
        "npm": "A semantic version string such as 10.x.x"
      }
    },
    {
      "name": "executable_paths",
      "description": "Confirm which binaries your shell is using.",
      "commands_by_platform": {
        "posix": [
          "which node",
          "which npm"
        ],
        "windows": [
          "where node",
          "where npm"
        ]
      },
      "expected": {
        "result": "Paths resolve to the intended installation"
      }
    },
    {
      "name": "first_script",
      "description": "Create and run a minimal JavaScript file.",
      "file": {
        "path": "hello.js",
        "content": "console.log('Node.js is working');\n"
      },
      "commands": [
        "node hello.js"
      ],
      "expected": {
        "output": "Node.js is working"
      }
    },
    {
      "name": "package_workflow",
      "description": "Verify that npm can initialize a project skeleton.",
      "commands": [
        "mkdir node-starter",
        "cd node-starter",
        "npm init -y"
      ],
      "expected": {
        "artifact": "package.json"
      }
    },
    {
      "name": "runtime_details",
      "description": "Capture runtime metadata that matters for compatibility checks.",
      "commands": [
        "node -p \"process.version\"",
        "node -p \"process.platform\"",
        "node -p \"process.arch\""
      ]
    },
    {
      "name": "dependency_install_test",
      "description": "Validate package installation and lockfile generation in a controlled way.",
      "commands": [
        "npm install lodash --save-exact"
      ],
      "notes": [
        "Replace lodash with a non-production test dependency if your organization requires a specific validation package.",
        "Run this only in an isolated starter directory.",
        "Confirm registry, proxy, and certificate settings before retrying on failure."
      ]
    }
  ],
  "project_structure": [
    "node-starter/",
    "├── package.json",
    "└── hello.js"
  ],
  "package_json_example": {
    "name": "node-starter",
    "version": "1.0.0",
    "scripts": {
      "start": "node hello.js"
    }
  },
  "rollback_checklist": [
    "Capture current node and npm versions before making changes.",
    "Record the resolved binary paths for node and npm.",
    "Remove the newly added runtime using the same installation method that installed it.",
    "Restore the previous supported version or approved package source.",
    "Open a new terminal session and re-run the version checks after rollback."
  ],
  "validation_tips": [
    "If node is not found, verify PATH and installation completion.",
    "If node works but npm does not, reinstall the distribution or package manager component.",
    "If the wrong version resolves, inspect executable paths before changing anything else.",
    "Avoid bypassing TLS verification unless your security policy explicitly allows it."
  ]
}