Artifact Output Destinations
Canonical storage, optional provider-native presentation, precedence, and provenance
ADR: Canonical and provider-native artifact destinations
- Status: Accepted
- Date: 2026-08-20
- Issue: #2122
Context
Provider releases can add artifact or design surfaces whose defaults are outside AIWG's release cycle. Allowing such a default to relocate an AIWG plan or review changes persistence, review workflow, provenance, and potentially the project's data boundary.
Decision
`.aiwg/aiwg.config` owns a provider-neutral `artifact_outputs` policy. `canonical: aiwg` identifies the durable source of truth. `provider_native` is `explicit-only` by default, may be disabled, and may become `project-default` only through an intentional project change. Claude presentation destinations are `claude-code.design` and `claude-desktop.artifact` (published Claude Artifacts); entries declare whether they are enabled and when they may be used. Registration does not select a destination or supply a publishing capability.
Resolution applies this precedence and authority model:
1. Higher-authority safety, privacy, and project policy form an unbreakable ceiling. 2. An explicit per-task request may select an enabled, supported destination within that ceiling. 3. A user preference may contribute only where project policy permits a default. 4. A provider default is lowest authority and cannot select an explicit-only destination.
Unknown destinations fail safe. Legacy or absent configuration migrates behaviorally to `canonical: aiwg` and `provider_native: explicit-only`; tools preserve the absent block until an intentional config write or initialization adds the visible default.
For dual output, the canonical artifact is written first. A presentation/export records its canonical path, destination, provider reference, selection authority, and timestamp in `provenance/artifact-outputs.jsonl` under the resolved artifact root. The presentation is never a competing source of truth.
Claude adapters use `writeClaudeArtifactOutputs` in `src/artifacts/output-policy.ts`, which delegates to the shared `writeArtifactOutputs` lifecycle and existing resolver/provenance writer. The caller supplies the resolved writable root and a canonical writer; only after that writer succeeds can a selected presentation callback run. A successful callback supplies the actual provider reference for the provenance row. Refused destinations produce diagnostics without invoking the callback; failed canonical writes prevent presentation, and failed presentations leave the canonical source intact without a success row. Provider-native prompt/tool workflows follow this same ordering and provenance contract; this API does not implement a provider publishing transport.
`claude-desktop.doc` is not registered for #2634: no existing first-party docs-connector output contract requires a separate destination. It remains unknown/unsupported rather than an alias that could weaken policy. A future connector with distinct persistence or permissions must define its own contract before registration.
For example, an explicit-only project can allow the Artifact destination with:
{
"artifact_outputs": {
"canonical": "aiwg",
"provider_native": "explicit-only",
"destinations": {
"claude-desktop.artifact": { "enabled": true, "use_when": "user-requested" }
}
}
}
Degraded mode
AIWG governs its own prompts, rules, tools and workflow writes. It cannot guarantee suppression of provider behaviour above those surfaces. When enforcement is unavailable, adapters state that limitation, still persist the canonical artifact, and report any unexpected provider-native output rather than claiming prevention.
Consequences
Claude Design remains available on explicit request without bypassing canonical persistence. Provider-default changes cannot silently opt projects in. Workflows gain a small policy-resolution and provenance obligation, and provider adapters require conformance tests for their supported destination IDs.
Cockpit parity decision (#2634 G3)
- Status: Proposed for the operator (2026-12-02); the accepted destination policy above is unchanged.
- Options: add a Cockpit-to-Artifact export target; treat Artifacts as a competing presentation surface; or keep direct Artifact publishing out of Cockpit's scope.
- Recommendation: the smallest option is out of scope for now. Cockpit is a local session-control surface over the CLI and executor, with browser, VS Code and Tauri shells. It can observe a session that produces governed artifacts without owning the provider's publishing tools.
- Consequence: add no publishing dependency, credentials, UI or duplicate artifact store to `apps/cockpit`. Claude sessions continue using the shared artifact policy and provenance contract. If an operator later needs a Cockpit export action, propose it separately as a derived export using this policy, with canonical storage retained; do not make either desktop surface depend on the other.