Skip to main content
Loading navigation

Build a Plant Equipment Commissioning Acceptance Audit Packager — implementation

Prompt source

implementation103 lines11 sectionsNo variables1 code block
## Build
Cross-reference factory acceptance test checklists with simulated Sparkplug B device birth data and sensor ranges. Assemble audit-ready commissioning documentation for client handover.

## User
Industrial Project Engineer

## Workflow
1. Parse NBIRTH payloads and device metric definitions from simulated Sparkplug B streams.
2. Verify that instrument engineering units and metric ranges meet acceptance criteria.
3. Flag unannounced or missing device metrics required by contractual commissioning specs.
4. Synthesize a client-ready equipment commissioning acceptance summary packet.

## Interface
Web view showing contractual commissioning criteria, live metric bindings, and acceptance packet download button.

## Data
JSON dumps representing Sparkplug B NBIRTH templates, metric properties, and contract specification tables.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Eclipse Sparkplug](https://raw.githubusercontent.com/eclipse-sparkplug/sparkplug/master/README.md)
Implements Sparkplug B NBIRTH metric metadata and property fields (e.g., engineering units, min/max limits).

## Tools
pydantic-ai, fastapi, jinja2.
Pydantic AI cleanly validates Sparkplug metric property types against contractual commissioning schemas.
Local or hosted LLM with strong schema enforcement and contract parsing capabilities.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Flags metric range definitions that do not match project specification sheets.
- Validates presence of all mandatory Sparkplug B birth metadata properties.
- Outputs a valid equipment acceptance certificate in JSON format.

## Starter Examples
```json
[
  {
    "input": {
      "contract_id": "CTR-9012",
      "device_id": "CHILLER-EDGE-01",
      "required_metrics": [
        {
          "name": "SupplyTemp",
          "unit": "degC",
          "min": -10,
          "max": 50
        }
      ],
      "nbirth_payload": {
        "metrics": [
          {
            "name": "SupplyTemp",
            "properties": {
              "eng_unit": "degC",
              "eng_min": -10,
              "eng_max": 50
            }
          }
        ]
      }
    },
    "expected_output": {
      "contract_id": "CTR-9012",
      "device_id": "CHILLER-EDGE-01",
      "acceptance_passed": true,
      "discrepancies": [],
      "certificate_status": "READY_FOR_SIGNATURE"
    }
  },
  {
    "input": {
      "contract_id": "CTR-9012",
      "device_id": "CHILLER-EDGE-02",
      "required_metrics": [
        {
          "name": "SupplyTemp",
          "unit": "degC",
          "min": -10,
          "max": 50
        }
      ],
      "nbirth_payload": {
        "metrics": [
          {
            "name": "SupplyTemp",
            "properties": {
              "eng_unit": "degF",
              "eng_min": 14,
              "eng_max": 122
            }
          }
        ]
      }
    },
    "expected_output": {
      "contract_id": "CTR-9012",
      "device_id": "CHILLER-EDGE-02",
      "acceptance_passed": false,
      "discrepancies": [
        "Unit mismatch on SupplyTemp: expected degC, found degF"
      ],
      "certificate_status": "REJECTED"
    }
  }
]
```

## Safety
Audit compilation only; does not transmit actuation or write commands to edge controllers.
Use mock external writes. Require human review before any real deployment.