Skip to content

Contributing Extensions ​

The devkit core stays framework-free: everything that knows a stack (Nuxt, Shopware, Laravel …) or an optional tool (Pen first) lives in an extension that anyone on the team can contribute to. This page is for internal onedot teams who add or maintain one. Contributions arrive as pull requests on this repository from a branch, never a fork, and need no CLA.

Contracts stay in their own files; this page links to them and does not restate their fields.

Extension kinds ​

KindPathSelected byContract
stackcontent/stacks/<id>/extension.jsondetect-stack matches exports.detectionStack Packs
integrationcontent/integrations/<id>/extension.jsonper project: .agents/extensions.json, else a present probedevkit/specs/961-pen-integration-extension.md > Contract items 1–3, devkit/research/pen-integration-extension-contract.md items 4–9
overlay.agents/stacks/<id>/extension.json in a target projectdevkit stack trustStack Packs > Gates and overlays; lives in the project, never contributed here

Every manifest is {schema: 1, id, kind, core_api: 1, exports} with a kebab-case id; unknown fields and versions reject. Integrations are central only and never take part in stack detection, overlays or stack trust.

The integration kind is a draft: Spec 961 builds it with Pen as the first case. Until its Slice 1 lands, no integration loader, no devkit extension command and no content/integrations/ directory exist.

The Python extensions/<name>/extension.json of .agents/context/CONVENTIONS.md > Runtime & Naming is unrelated: another directory, another schema.

Ownership ​

Extensions have no per-pack owner: anyone on the team can contribute to any stack pack or integration. A core maintainer reviews every extension pull request; .github/CODEOWNERS requests one through the core fallbacks /content/stacks/ and /content/integrations/, which cover every extension. A per-extension CODEOWNERS line would replace that fallback, so none is added.

An extension that needs a core change (a new export, a new predicate, a loader field) is two pull requests: the core change first, reviewed by a core maintainer alone, then the extension change on top. A pure pack change touches no Rust source under rust/devkit/src/, only test registrations and fixtures; Spec 821's unseen-stack proof holds this line for stacks.

Scaffold ​

  • Stack: devkit maint stack-new <id> [dir], run against a sample project, prints a draft manifest. It refuses a taken id (STACK_NEW_ID_TAKEN), a directory an existing pack already matches (STACK_NEW_MATCHED: extend that pack or write a project overlay) and a directory without a known manifest (STACK_NEW_NO_MANIFEST). Save the draft as content/stacks/<id>/extension.json. The command ships in the maintainer satellite, so it needs a checkout build from devkit maint dev-sync.
  • Integration: no scaffold exists yet. Copy content/integrations/pen/extension.json once Spec 961 Slice 1 has landed; the todo integration-scaffold-and-check-commands proposes a scaffold and a check.

What a pull request must carry ​

EvidenceStackIntegration
Manifest loads under the installed catalogyesyes
Fixture project and frozen snapshotsrust/devkit/tests/fixtures/stack_parity/<id>/, FIXTURES entry in stack_parity.rs, expected output under _expected/<id>/enablement cases per Spec 961 Step 2 (enablement_* unit tests)
Routing rows in tests/affected-map.txtcontent/stacks/<id>/** stack_parity (plus the suites the pack's exports feed)content/integrations/** extension_cmd
Latency verdictonly when hooks or delivery changeLATENCY_VERDICT lands from devkit maint latency --verdict on every slice (Spec 962)
Changelogdocs/changelog.md ## Unreleased when users notice the changesame

Drivers are .mjs files under driver/ and edit formatters .cjs under gates/. devkit maint rust-only exempts them only while a valid manifest of the same pack references them; any other non-Rust executable fails the check.

An integration must cost a project that has it disabled nothing: no process on a hook path, no skill or MCP tokens (contract items 2 and 9). The latency verdict is the proof, run through Spec 962's Protocol with its case manifest and ledger; a slice without LATENCY_VERDICT lands does not merge.

Migrating legacy graph exports ​

The retired exports.import_graph field is rejected, even when its value is empty or null. Remove it and declare exports.index.graph with driver, output and sources instead; do not move the old graph discriminator value into the new field. The driver implements the graph protocol, and sources declares the source directories and extensions it reads. See Stack Packs — Manifest and Graph drivers for the manifest shape and protocol.

Versioning and compatibility ​

An extension has no version of its own. It ships inside the release payload (content/ is copied whole into every release archive) and carries that release's version.

core_api is the compatibility line: the loader rejects any value other than the one the running core provides (unsupported core_api …). Raising it is a core-maintainer decision, and the same pull request migrates every extension in the central catalog, because all of them ship together.

An integration's optional binary component is signed per release tag with the same version as the core (contract item 7); a mismatched component is refused, never loaded.

From merge to developers ​

  1. Try the change before merging: devkit maint dev-sync --worktree builds the working tree into the runtime, effective in the next session.
  2. Merge to main after a core maintainer's approval and a green CI.
  3. A user-visible change gets an entry under ## Unreleased in docs/changelog.md.
  4. A core maintainer tags the next release; CI builds, signs and publishes it (PUBLISH).
  5. Developers receive it with their next devkit sync. There is no separate extension release.

Agent checklist ​

  • Kind → contract: stack → docs/reference/stack-packs.md; integration → Spec 961 Contract 1–3 + devkit/research/pen-integration-extension-contract.md 4–9. Never copy contract text into another file.
  • Pack-only diff: content/stacks/<id>/, its fixture dir, stack_parity.rs FIXTURES, tests/affected-map.txt, docs/changelog.md. A path under rust/devkit/src/ in the diff → split out a core PR.
  • Checks: devkit maint rust-only, devkit test-prep --affected-only (Rust targets on spark via devkit maint ci-cleanroom --worktree <cargo test args>), devkit quality-gate; snapshots re-bless with STACK_PARITY_BLESS=$(git rev-parse HEAD) in a commit that names the behaviour change.
  • Integration slice: no merge without LATENCY_VERDICT lands; quote the verdict line in the pull request.
  • Pull request body from .github/PULL_REQUEST_TEMPLATE/extension.md: an agent passes gh pr create --title <t> --body-file .github/PULL_REQUEST_TEMPLATE/extension.md and fills it in; --template extension.md only seeds the interactive prompt; on the web, append ?template=extension.md to the compare URL.
  • Skill changes add devkit maint skill-lint. Run every check from a dev-synced build, because devkit maint resolves to the installed runtime, not the working tree.

Internal docs — onedot-devkit · devkit

devkitdevkit syncdevkit statusdevkit doctordevkit helpInternal docs · ONEDOT digital crew