All contracts

Planning and generation / JSON Schema

Infra Plan V1

Defines the versioned infra plan v1 boundary used by Workspai and its consumers.

Schema version
rapidkit.infra-plan.v1
Contract path
contracts/infra-plan.v1.json
Publication
json-schema
Defined fields
28
Artifact bindings
1

Why this contract exists

Architecture role

Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.

Consumption boundary

  • Workspai CLI
  • Contract-aware integrations

Related commands

Commands are linked only when the runtime contract identifies a direct production relationship. Supporting contracts may be consumed without having a single producer command.

Produced artifacts

These durable files are emitted by registered commands and validated against this contract.

Artifact pathSchemaProducer
.workspai/reports/infra-plan.jsonrapidkit.infra-plan.v1
workspai infra plan

Field reference

Every declared schema property or published capability path is listed here. Required means the contract declares or publishes that field at the shown boundary.

Field pathTypeRequiredMeaningConstraints
composePathstringYesDefines the composepath value at this contract boundary.minLength: 1
connectionEnvobjectYesDefines the connectionenv value at this contract boundary.
contractPathstringNoDefines the contractpath value at this contract boundary.minLength: 1
envExamplePathstringYesDefines the envexamplepath value at this contract boundary.minLength: 1
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "rapidkit.infra-plan.v1"
serviceEnvOverridesobjectNoDefines the serviceenvoverrides value at this contract boundary.
servicesarrayYesDefines the services value at this contract boundary.
services[].categorystringYesDefines the category value at this contract boundary.minLength: 1
services[].displayNamestringYesDefines the displayname value at this contract boundary.minLength: 1
services[].idstringYesDefines the id value at this contract boundary.minLength: 1
services[].imagestringYesDefines the image value at this contract boundary.minLength: 1
services[].portsarrayYesDefines the ports value at this contract boundary.
services[].ports[].containerintegerYesDefines the container value at this contract boundary.minimum: 1 · maximum: 65535
services[].ports[].hostintegerYesDefines the host value at this contract boundary.minimum: 1 · maximum: 65535
services[].ports[].namestringYesDefines the name value at this contract boundary.minLength: 1
services[].sourcesarrayYesDefines the sources value at this contract boundary.
services[].sources[].kindenumYesDefines the kind value at this contract boundary.enum: module, env-var, override, contract-env
services[].sources[].projectstringNoDefines the project value at this contract boundary.minLength: 1
services[].sources[].valuestringYesDefines the value value at this contract boundary.minLength: 1
sourcesobjectYesDefines the sources value at this contract boundary.additionalProperties: false
sources.envVarsarrayYesDefines the envvars value at this contract boundary.
sources.modulesarrayYesDefines the modules value at this contract boundary.
sources.overridesarrayYesDefines the overrides value at this contract boundary.
strategystringYesDefines the strategy value at this contract boundary.const: "sidecar"
warningsarrayYesDefines the warnings value at this contract boundary.
workspaceNamestringNoDefines the workspacename value at this contract boundary.minLength: 1
workspacePathstringYesDefines the workspacepath value at this contract boundary.minLength: 1

Canonical machine-readable definition

The raw synchronized contract remains authoritative. The educational sections above are projections of this definition.

Show raw JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "workspacePath",
    "strategy",
    "composePath",
    "envExamplePath",
    "services",
    "connectionEnv",
    "sources",
    "warnings"
  ],
  "properties": {
    "schemaVersion": {
      "const": "rapidkit.infra-plan.v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "workspacePath": {
      "type": "string",
      "minLength": 1
    },
    "workspaceName": {
      "type": "string",
      "minLength": 1
    },
    "contractPath": {
      "type": "string",
      "minLength": 1
    },
    "strategy": {
      "const": "sidecar"
    },
    "composePath": {
      "type": "string",
      "minLength": 1
    },
    "envExamplePath": {
      "type": "string",
      "minLength": 1
    },
    "services": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "displayName",
          "category",
          "image",
          "ports",
          "sources"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "type": "string",
            "minLength": 1
          },
          "image": {
            "type": "string",
            "minLength": 1
          },
          "ports": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "host",
                "container"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "host": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 65535
                },
                "container": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 65535
                }
              },
              "additionalProperties": false
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "value"
              ],
              "properties": {
                "kind": {
                  "enum": [
                    "module",
                    "env-var",
                    "override",
                    "contract-env"
                  ]
                },
                "value": {
                  "type": "string",
                  "minLength": 1
                },
                "project": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      }
    },
    "connectionEnv": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "sources": {
      "type": "object",
      "required": [
        "modules",
        "envVars",
        "overrides"
      ],
      "properties": {
        "modules": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "envVars": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "overrides": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "serviceEnvOverrides": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      }
    }
  },
  "additionalProperties": true
}