Skip to content

Spec 14: Lifecycle & Versioning

DWS Spec 14: Lifecycle & Versioning

Digital Worker Standard — DWS Specification

Version: 1.0 Tier: 4 — Governance Status: Release Candidate Dependencies: Spec 0 (Project Structure), Spec 1 (Worker Identity), Spec 2 (Knowledge Schema)


1. Overview

This specification formalises the lifecycle of a digital worker from creation through retirement. Every human employee has a lifecycle: hired, onboarded, probation, active employment, performance review, promotion, departure. Digital workers are no different.

Lifecycle management matters for three reasons:

  1. Safety. A worker in testing should not receive production intents.
  2. Accountability. A worker in production has an auditable history of how it got there.
  3. Marketplace. When you acquire a worker from the marketplace, its lifecycle stage and version history tell you what you’re getting.

2. Lifecycle Stages

StageDescriptionCan Receive Intents?Knowledge Persists?
draftInitial definition. Under active authoring.NoNo
testingRunning against test intents in a sandboxed environment.Test intents onlySession-scoped only
stagingRunning against production-like intents with human oversight.Staging intents onlyYes, tagged as staging
productionLive, receiving and executing real work.YesYes
deprecatedStill operational but scheduled for replacement. New deployments should use the replacement.Yes (with warnings)Yes
retiredNo longer executes. Knowledge and event history preserved for audit.NoArchived, read-only

2.1 Stage Transitions

draft -> testing -> staging -> production -> deprecated -> retired
| ^
+--- (hotfix) -----------+
TransitionTriggered ByRequirements
draft -> testingWorker authordws validate passes. All required fields present.
testing -> stagingWorker author or CIMinimum test run count met. Verification pass rate above threshold.
staging -> productionHuman approverStaging period completed. Approval gate passed.
production -> deprecatedWorker authorReplacement worker specified. Migration guide provided.
deprecated -> retiredAutomated or humanSunset date reached. All active intents reassigned.
production -> retiredHuman (emergency)Bypass deprecation for urgent removal. Requires explicit justification.

2.2 Promotion Criteria

Each transition MAY define promotion criteria that must be met:

{
"lifecycle": {
"stage": "testing",
"promotion_criteria": {
"testing_to_staging": {
"min_test_runs": 50,
"min_verification_pass_rate": 0.95,
"min_test_duration": "P7D",
"requires_human_approval": false
},
"staging_to_production": {
"min_staging_runs": 20,
"min_verification_pass_rate": 0.98,
"min_staging_duration": "P14D",
"requires_human_approval": true,
"approver_role": "engineering-lead"
}
}
}
}

Promotion criteria are RECOMMENDED but not REQUIRED. Organisations without formal promotion processes can transition stages manually.


3. Version History

3.1 Version Record

Every version of a worker descriptor is a git-tagged artifact. The version history provides a complete record of how the worker has evolved.

{
"version_history": [
{
"version": "1.0.0",
"released_at": "2026-03-01T00:00:00Z",
"stage_at_release": "production",
"changelog": "Initial production release.",
"git_tag": "worker/contract-reviewer/v1.0.0"
},
{
"version": "1.1.0",
"released_at": "2026-04-01T00:00:00Z",
"stage_at_release": "production",
"changelog": "Added indemnification clause analysis skill.",
"git_tag": "worker/contract-reviewer/v1.1.0"
}
]
}

3.2 Employment Record

For marketplace workers, the version history is combined with execution metrics to form an employment record: a verifiable history of the worker’s performance across deployments.

MetricDescription
total_runsTotal number of intent executions.
verification_pass_rateProportion of runs that passed verification.
average_execution_timeMean time to complete an intent.
escalation_rateProportion of runs that required escalation.
knowledge_entries_accumulatedNumber of institutional knowledge entries created.
active_sinceDate the worker first entered production.

This record is what distinguishes a marketplace worker from a template. A worker with 1,000 successful runs and a 98% verification pass rate is meaningfully different from a freshly created definition.


4. Upgrade and Migration

4.1 Major Version Upgrades

When a worker undergoes a major version upgrade (e.g., v1.x to v2.0):

  1. The new version starts at testing stage regardless of the old version’s stage.
  2. Knowledge transfer follows the rules in Spec 2, Section 5.5.
  3. The old version transitions to deprecated with the new version as replacement.
  4. Active intents are not automatically reassigned. The runtime continues to route to the old version until explicitly switched.

4.2 Minor Version Upgrades

Minor version upgrades (e.g., v1.0 to v1.1) may be promoted directly to the same stage as the current version, provided:

  • The upgrade is non-breaking (see Spec 1, Section 5.3).
  • The worker passes validation at the current stage.
  • The runtime supports hot-swapping (implementation-specific).

4.3 Rollback

Rollback is a git revert of the worker descriptor to a previous version tag. The rolled-back version inherits the lifecycle stage of the version it replaces. Knowledge entries created during the rolled-back version’s tenure are flagged for review but not automatically deleted.


5. Marketplace Lifecycle

Workers published to the marketplace carry their lifecycle metadata:

FieldDescription
published_versionThe version published to the marketplace.
lifecycle_stageMust be production to publish.
employment_recordAggregated performance metrics (Section 3.2).
provenanceAuthor, organisation, publication date (Spec 3, Section 2.1).
knowledge_exportExportable knowledge entries (Spec 2, Section 5.4).

Workers in draft, testing, or staging MUST NOT be published to the marketplace. Workers in deprecated or retired MUST be flagged accordingly in marketplace listings.


6. References

  • Spec 0: Project Structure — Lifecycle stage declared in jobspec.json manifest.
  • Spec 1: Worker Identity — Versioning and deprecation protocol for worker descriptors.
  • Spec 2: Knowledge Schema — Knowledge transfer between worker versions. Knowledge export for marketplace.
  • Spec 12: Compliance & Governance — Lifecycle stage determines applicable compliance requirements.