LAYER 02 · Learn the composition grammar

Profiles, bundles, patches, and the boot tree

How the same plugins become Web, Headless, or your own product

18 min3 source anchorsupstream@47f9438
bundle layers → profile patch → home patch → CLI overlay
The question this chapter resolves

How do you replace models, sandboxing, or tools without forking upstream?

Build intuition

A bundle is a distributable parts kit, a profile is a named build recipe, and a patch is an overlay note. The bootloader layers them in a fixed order into the final manifest.

MECHANISM

Mechanism

dsh-base provides common capabilities while web-app/headless add surfaces. Profile package.json files list bundles through dsh.profile; bundles point to configuration through dsh.bundle.

Patches replace an entire config row by stable id or insert a new row. --dump-config is the authoritative view of the actual runtime tree.

Step 1 of 5

Discover profile

Resolve named compositions from Harness home and shipped templates.

INVARIANTS

What extensions must preserve

  • Patches depend on stable config ids, not array position
  • Bundles remain patchable by upper layers
  • Boot failure must roll back unpublished composition
FAILURE MODES

The tempting wrong turns

  • ×Editing dsh-base for local customization
  • ×Treating a profile as cwd or a security sandbox
  • ×Reading static files without inspecting dump-config
VERIFY IN SOURCE

Do not trust the conclusion—verify it

These anchors are pinned to official deepseek-harness@47f9438; account for later breaking changes when reading current upstream.

KNOWLEDGE CHECK

Pause for ten seconds before revealing

Why does a patch replace a whole config row instead of arbitrary deep merge?

Why the next chapter follows

With the tree assembled, we trace the runtime spine from agent creation, ownership, and disposal.

Learn DeepSeek Harness

An independent learning project. Explanations derive from source; upstream remains authoritative.