8.7 KiB
Ecosystem Shared Artifact Schema
Status: Hardened baseline Owner:
learning_ai_common_platPurpose: Define the canonical cross-product artifact model so notes, transcripts, plans, memories, trails, routes, and agent outputs can interoperate cleanly.
1. Problem
Multiple repos produce durable user-value objects:
- LysnrAI transcripts
- NoteLett notes
- MindLyst memory entries
- FlowMonk plans
- ChronoMind routines
- ActionTrail audit records
- PeakPulse sessions
- Cowork generated reports and file outputs
Today these are product-local objects. The ecosystem needs one canonical artifact shape so:
- artifacts can be linked, searched, and retrieved consistently
- provenance can be preserved
- agent outputs can become user-editable assets
- one user action can create downstream value across products
2. Goals
- Define one envelope schema shared across all products.
- Preserve product-specific payloads inside a canonical wrapper.
- Support provenance, lineage, and visibility rules.
- Support human-created, machine-created, and mixed artifacts.
- Support cloud-first and local-first storage models.
3. Non-Goals
- Replacing product-local domain schemas entirely.
- Forcing one storage backend for all products.
- Removing product-specific UX or metadata.
4. Proposed Canonical Shape
Every artifact should include:
idartifactTypeproductIdsourceSurfacetitlesummarycreatedAtupdatedAtcreatedByownershipvisibilitystatustagslinksprovenancepayload
Example types:
transcriptnotememoryplanroutinehabit-checkintrail-reportroute-sessionagent-outputdocumentdigest
5. Minimum Envelope Fields
type ArtifactEnvelope = {
id: string;
artifactType: string;
productId: string;
sourceSurface: string;
title: string | null;
summary: string | null;
createdAt: string;
updatedAt: string;
createdBy: {
actorType: 'user' | 'agent' | 'system' | 'mixed';
actorId: string | null;
};
ownership: {
userId: string;
orgId?: string | null;
};
visibility: {
scope: 'private' | 'org' | 'shared' | 'local-only';
allowedProducts?: string[];
};
status: string;
tags: string[];
links: ArtifactLink[];
provenance: ArtifactProvenance;
payload: Record<string, unknown>;
};
type ArtifactLink = {
relation:
| 'derived-from'
| 'summarizes'
| 'generated-task'
| 'generated-routine'
| 'generated-memory'
| 'evidence-for'
| 'review-of'
| 'attached-to';
targetArtifactId: string;
};
type ArtifactProvenance = {
originProductId: string;
originActionId?: string | null;
sessionId?: string | null;
runId?: string | null;
approvalId?: string | null;
lineage: Array<{
stepType: string;
productId: string;
actorType: 'user' | 'agent' | 'system';
timestamp: string;
}>;
};
6. First Adopters
Phase 1 adopters:
learning_voice_ai_agentlearning_ai_noteslearning_multimodal_memory_agentslearning_ai_flowmonklearning_ai_trailsoss/learning_ai_claw-cowork
Phase 2 adopters:
learning_ai_clocklearning_ai_efforise
7. Storage And Lifecycle Rules
The canonical envelope does not force one backend, but it does require consistent lifecycle semantics.
7.1 Storage classes
Every artifact should be classified into one of these storage classes:
primary-record- the canonical user-facing artifact record
- examples: note, plan, memory, routine
derived-record- generated from other artifacts or events but still retained as a first-class object
- examples: trail-report, digest, agent-output
ephemeral-cache- regenerable helper artifact that may be dropped without lineage loss
- examples: intermediate summaries, transient extraction output
binary-attachment- large file/blob stored through metadata indirection
- examples: audio, screenshots, exported reports
7.2 Retention rules
primary-record- retain until user deletion, legal deletion requirement, or explicit archival policy
derived-record- retain while upstream artifacts still exist unless product policy intentionally purges it
ephemeral-cache- safe to expire automatically if provenance and regeneration inputs remain
binary-attachment- may use external blob storage, but the artifact envelope must retain the reference metadata
7.3 Versioning rules
- the envelope may evolve independently from product payload versions
payloadshould carry a product-local version when the artifact type is likely to evolve incompatibly- migrations must preserve:
idartifactTypeownershipprovenancelinks
7.4 Binary attachment rules
Binary artifacts should not inline the binary content in the canonical envelope. Instead:
- store file metadata in
payloadorlinks - include:
- content type
- logical filename
- byte size when known
- blob/storage reference
- integrity hash when feasible
- preserve enough metadata for downstream access control and audit
7.5 Deletion and archival rules
- deleting an artifact should not silently delete downstream lineage evidence
- tombstones or archived metadata should preserve:
idartifactTypeproductIdownership- minimal provenance
- archival may hide payload details while keeping the lineage graph intact
8. Migration Strategy For First Adopters
Phase-based migration should be incremental, not all-or-nothing.
- wrap product-local objects in the canonical envelope without replacing local schemas
- emit canonical links and provenance first
- backfill stable artifact IDs only when needed for downstream consumers
- move binary/file references behind metadata indirection where needed
- only after that, tighten product-local persistence or indexing around the shared model
First-adopter guidance:
- LysnrAI
- transcript artifact is the canonical record; audio remains a binary attachment reference
- NoteLett
- note remains the primary record; transcript and trail relationships are represented through links
- MindLyst
- memory proposal is a derived record until accepted into a stronger user-owned memory shape
- FlowMonk, ChronoMind, EffoRise
- plan, routine, and habit remain product-local domain records wrapped in canonical artifact envelopes
- ActionTrail
- trail-report remains a derived record with strong provenance back to Cowork audit actions
- Cowork
- generated report or exported file should use
agent-outputplus attachment metadata when file-backed
- generated report or exported file should use
9. Key Open Decisions
- Should artifact IDs be globally unique UUIDs or product-prefixed IDs?
- Which fields belong in the envelope vs product payload?
- Should
payloadbe versioned per artifact type? - How should local-only artifacts from
learning_ai_local_memory_gptbe represented without leaking sync assumptions? - What is the minimum tombstone shape when a user deletes a previously linked artifact?
10. Acceptance Criteria
- A LysnrAI transcript can be wrapped as an artifact without losing transcript-specific metadata.
- A NoteLett note can link back to a transcript artifact.
- A MindLyst memory can record provenance to source transcript/note artifacts.
- A Cowork output can be stored as an
agent-outputartifact and later opened in NoteLett. - ActionTrail can render provenance from the envelope alone.
- Products can classify artifacts by storage class without changing the envelope shape.
- Binary artifacts can be referenced without embedding raw file contents in the envelope.
11. Implementation Checklist
- finalize canonical envelope field names and required/optional splits
- define first 8 artifact types in stable form
- define link relation vocabulary
- define provenance minimum payload
- define storage/binary attachment rules
- define migration strategy for first adopters
- add examples for LysnrAI, NoteLett, and MindLyst
- add contract-backed examples for FlowMonk, ChronoMind, and EffoRise
- add examples for Cowork and ActionTrail
Current implementation location:
Commits:
eae3409drafted the initial stub76f1b47added Phase 1 artifact schemas and canonical fixtures78918fbadded Phase 2 artifact schemas forplan,routine, andhabite6b58b7added Phase 3trail-reportschema coverage and examples for Cowork/ActionTrailab50831tracked artifact lifecycle hardening as remaining work