S ddd distribute

From xg-gh-25/SwarmAI · View interactive version

S ddd distribute is an AI agent skill from the GitHub repository xg-gh-25/SwarmAI. Package a DDD as an Open-Plugins plugin and/or an internal package (e.g. AIM) within its declared reach. TRIGGER: \"distribute this ddd\", \"package ddd\", \"make a plugin from this ddd\". NOT FOR: creating a DDD (s_project-manager).

How to use this skill

Skill file

DDD Distribute (s_ddd-distribute) — the distribution step of the DDD lifecycle

Render a grown DDD into a distributable capability package so another agent

host (Claude Code, Kiro, a public consumer, ...) can install and use it: an **Open-Plugins

plugin** (target open-plugin) and/or a package for an internal package manager (e.g. AIM)

(target aim-capabilities).

This skill is a thin human-in-the-loop wrapper — all packaging logic lives in

core/ddd_packager.py and the reach policy in core/ddd_distribution_policy.py.

The skill's job is: read the declaration → confirm the target subset with the human

→ call the packager → surface warnings and the built path.

The reach model (READ BEFORE RUNNING)

A DDD declares its own reach in its aim.json:

"distribution": {
  "targets": ["open-plugin", "aim-capabilities"],   // the CEILING (0..2)
  "visibility": "internal"                            // internal | external
}

you may NEVER add an undeclared target or raise visibility. To widen reach, the

DDD owner edits the declaration first (a separate, deliberate change).

distributable. Nothing leaves by inference.

private install, but the public-publish step is refused until visibility is

explicitly external (a human-gated change).

Workflow (HITL)

  1. Locate the DDD — resolve <workspace>/Projects/<name>/ (the DDD dir).
  2. Read the declaration — call the packager's policy; show the human the

declared targets + visibility + any warnings (e.g. an unknown target token).

  1. Confirm the subset — ask the human WHICH declared target(s) to emit now, and

whether this is an emit-only pass or an external publish. Never propose a target

the DDD didn't declare.

  1. Render — run scripts/distribute.py with the confirmed subset. The packager:

emits each target tree, runs the content-safety scan over the EMITTED tree, and

aborts (fail-closed) on any secret / host-path (any target) or internal-string

(external publish).

  1. Return the path(s) — report the built package dir(s) + any scan warnings +

which skills were included (class-B domain) vs excluded (class-A enablement /

unclassified). Point the human at the install command:

plugin install command)

manager's install command (e.g. aim plugins install <Pkg>)

Invocation

# Read-only staleness check — run this FIRST when a package already exists:
"$SWARM_BACKEND_BIN" py scripts/distribute.py --ddd <path/to/Projects/NAME> --out <out_dir> --check-stale

# Emit:
"$SWARM_BACKEND_BIN" py scripts/distribute.py --ddd <path/to/Projects/NAME> --out <out_dir> \
  [--targets open-plugin,aim-capabilities] [--publish]

Exit codes: 0 = at least one target checked and all fresh · 1 = at least one target

is stale (re-emit) · 2 = nothing was checked (no emitted target under --out, or a

typo'd path — deliberately NOT 0, so a CI/job cannot read "checked nothing" as green).

Run it before emitting: a package built before a source fix stays wrong indefinitely and

nothing else reports it — that silence is the failure this flag exists to break.

What this skill does NOT do

package is the human's step (crosses auth + build-duration walls).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.