Development Workspace

Last updated 2026-05-26 · Codex

Overview

Digital Product Factory uses one shared development workspace per install.

That means:

The platform is designed so that authoring can happen in more than one interface without creating multiple drifting source trees.

Mode 1 vs Mode 2

Both install modes support self-development and later contribution choices in the portal.

The difference is the interface surface:

Contribution policy is configured later in the portal for both modes.

Policy States

Every self-developing install begins in policy_pending.

policy_pending

private

contributing

This lets people begin working before they have decided how their install should participate in the Hive Mind.

Contributions carry a stable pseudonym (dpf-agent-<shortId>) that is the same across every commit, PR, and issue raised by the install. Real identity (name, email, hostname) stays on the local install and never reaches the upstream repository. The pseudonym lets the community recognize repeat contributors without exposing anyone’s personal identity. Admins can see their install’s pseudonym on the Platform Development page.

Shared Workspace

The shared workspace is the local code truth for the installation.

It is:

The recommended branch pattern is:

Platform Updates And Notifications

The portal has two related update paths, and they answer different questions.

Shared-workspace update banner

The banner at the top of the portal is the operator-facing signal that a newer platform image is present but the install’s shared workspace still needs attention.

On portal bootstrap, the runtime compares:

If the versions match, nothing is shown. If the image is newer and the shared workspace has no user changes, the bootstrap refreshes the managed source workspace from the image and clears the pending-update flag.

If the image is newer and the shared workspace has local/source changes, the bootstrap does not overwrite them. Instead it writes PlatformDevConfig.updatePending = true and stores the image version in PlatformDevConfig.pendingVersion. Users with manage_platform see a portal banner that links to Admin > Platform Development, where the Apply update panel merges the new platform source into the install’s my-changes branch.

The apply action preserves customisations. A clean merge writes the new .dpf-version value and clears the banner. If Git reports conflicts, the merge pauses in the shared workspace and the panel lists the conflicted files for review instead of guessing a resolution.

This banner is not a browser polling loop. It reflects the latest server-side platform-development state whenever the shell renders. The state is normally changed by bootstrap/redeploy work, or by the apply action clearing a completed update.

Governed self-upgrade runner

The operations self-upgrade path is separate from the shared-workspace banner. It lives at /ops/self-upgrade and records SelfUpgradeRun history for governed portal upgrades.

When scheduled Inngest functions are enabled for the install and PlatformConfig["self_upgrade"].enabled is true, the ops/self-upgrade-scheduled function runs hourly. Each run checks the configured target branch, skips when the install is disabled, outside its maintenance window, already up to date, missing a target, or already running an upgrade, and otherwise runs the same quiescence, promotion, health, and rollback path used by manual self-upgrade requests.

The manual operation uses the ops/self-upgrade.run event and the same runner. This path answers “can the running portal upgrade itself under governed operations controls?” The shared-workspace banner answers “does the local install workspace need to merge newer platform source?”

Production, Development, And Validation Data

One shared codebase does not mean one shared mutable database.

This keeps debugging realistic without corrupting production records.

Build Studio And VS Code

Build Studio is responsible for

VS Code is responsible for

The key point is that these are two interfaces over one workspace, not two development systems.

Architecture Diagram

flowchart TD
    installer[Installer provisions self-development workspace] --> workspace[Shared install workspace]
    installer --> portal[Portal runtime]
    installer --> pending[Policy state: policy_pending]

    workspace --> bs[Build Studio]
    workspace --> vscode[VS Code in Mode 2]

    workspace --> validate[Validation runner]
    validate --> devdb[Development or validation data]

    portal --> setup[Portal setup captures contribution mode]
    pending --> setup
    setup --> private[Private mode]
    setup --> contributing[Contributing mode]

    bs --> review[Governed review and release workflow]
    vscode --> review

    review --> prod[Promote to production runtime]
    contributing --> pr[Optional upstream PR / Hive Mind contribution]

    prod -. uses .-> proddb[Production database]