Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions LifeOS/install/LIFEOS/TOOLS/GenerateKnowledgeSchemaDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function render(): string {
L.push(`| \`${t}\` | ${extra.length ? extra.map((k) => `\`${k}\``).join(", ") : "— (envelope only)"} |`);
}
L.push("");
L.push("**Waived for internal notes.** A note with `source_kind: internal` has no external origin — it *is* the primary artifact (an own-prose capture, a design decision, a corpus this system built). Demanding a `source_url` of it asks for a URL that cannot exist, so `source_*` requirements above are skipped when `source_kind` is `internal`. Externally-sourced notes still must carry their provenance.");
L.push("");
L.push("A note missing an optional per-type source field (e.g. a research note with no `source_url`) is **envelope-conformant but incomplete** — Lint reports it as an enrichment gap, not a schema failure.");
L.push("");

Expand Down
7 changes: 7 additions & 0 deletions LifeOS/install/LIFEOS/TOOLS/KnowledgeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,14 @@ export function validate(parsed: ParsedNote, _slug: string, dirType: CanonicalTy

// per-type required (present AND non-empty)
const effType = ((CANONICAL_TYPES as readonly string[]).includes(t ?? "") ? t : dirType) as CanonicalType;
// `source_kind: internal` means the note has no external origin — it IS the
// primary artifact (a LifeOS corpus, a design decision, an own-prose capture).
// Demanding a source_url of it asks for a URL that cannot exist, so the
// source_* requirements are waived for internal notes. Externally-sourced
// notes still must carry their provenance.
const isInternal = deq(get("source_kind")) === "internal";
for (const key of PER_TYPE_REQUIRED[effType] ?? []) {
if (isInternal && key.startsWith("source_")) continue;
if (missingOrEmpty(key)) v.push({ key, problem: `required for type ${effType}` });
}

Expand Down