mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
feat(vault): Obsidian vault V2 — janitor, archival, weekly report, KB ingest, Bases + sync runbook (#482)
* feat(vault): V2 — create-seam + drift janitor, archival, weekly org-report, KB ingest, Bases views + sync runbook Implements the vault V2 canonical spec end to end (the splice guard shipped separately and is reused at KB-ingest time): - materialize-on-create: TaskService.create writes each task's note best-effort from the moment it exists; the transition-touch stops no-oping on live work - drift janitor (services/vault_janitor.py + hourly _vault_janitor_loop): daily changed-task re-projection, random drift sample, archival pass — restart-proof via RoboCo/_meta/.janitor_state.json, 200/cycle caps, per-item isolation, processed-only resume markers, self-repairing state file - archival: vault_archive_days (30, 0=off) moves old terminal tasks' notes to RoboCo/Archive/<year>/Tasks/<project>/ — one write_task code path for janitor and rebuild, id8 lookup across Tasks/+Archive/, alias links keep moves safe - weekly org-report: VaultWriter.write_org_report renders Reports/<ISO-week>.md from MetricsService/UsageService (numbers duplicated into frontmatter for trend queries), once per ISO week, with a best-effort CEO notification - KB ingest: IndexType.VAULT_NOTES + VaultNotesIndexPlugin + _vault_kb_loop embed the CEO's RoboCo/Notes into the RAG corpus — injection guard as a hard gate (flagged notes quarantined with an idempotent callout), traversal- and symlink-contained at both config and engine layers, content-hash dedup, 50-ingest/cycle cap, frontmatter stripped; reaches roboco_kb_search, the mentor default domain, claim-time briefings (kind vault_note), and the panel KB browser; no migration (chunks table auto-creates; migration 030's CHUNK_TABLES tuple appended per the chunks_playbooks precedent) - Bases views (Task Board.base, Reports.base — schema verified against the Obsidian docs) + the Mac sync runbook vault asset - config/flags/compose: vault_archive_days, vault_report_enabled (flags card), vault_kb_enabled (flags card; NAS compose arms it, registry ships it off), vault_kb_dirs (+ overlap/traversal validator), vault_kb_interval_seconds - e2e smoke (tests/e2e_smoke/test_vault_v2.py): real create-seam, real janitor cycle incl. archival + state, real KB engine + real guard * docs: vault V2 sweep — map, RAG corpus, CLAUDE.md - docs/map/vault.md: V1+V2 — janitor/archival/report/KB data flows, new files, config, health posture - docs/map/orchestrator.md + task-service.md: the two new loops, the create seam, the three janitor queries - docs/rag/architecture/obsidian-vault.md: agent-facing what-changed (notes from creation, archive link-safety, CEO notes retrievable, weekly report) - docs/rag/architecture/config-reference.md: the five new settings - CLAUDE.md: vault paragraph covers V1+V2; flags-card list mentions the vault report/KB flags --------- Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
ClipboardCheck,
|
||||
Lightbulb,
|
||||
ScrollText,
|
||||
StickyNote,
|
||||
} from "lucide-react";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -66,6 +67,11 @@ const categoryConfig: Record<
|
||||
description: "Curated, reusable procedures",
|
||||
icon: <ScrollText className="h-5 w-5 text-emerald-500" />,
|
||||
},
|
||||
[KBIndexType.VAULT_NOTES]: {
|
||||
label: "Vault Notes",
|
||||
description: "Human-authored notes from the Obsidian vault",
|
||||
icon: <StickyNote className="h-5 w-5 text-violet-500" />,
|
||||
},
|
||||
};
|
||||
|
||||
interface KBCategoryNavProps {
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
ClipboardCheck,
|
||||
Lightbulb,
|
||||
ScrollText,
|
||||
StickyNote,
|
||||
} from "lucide-react";
|
||||
|
||||
const indexTypeConfig: Record<
|
||||
@@ -55,6 +56,10 @@ const indexTypeConfig: Record<
|
||||
label: "Playbooks",
|
||||
icon: <ScrollText className="h-4 w-4 text-emerald-500" />,
|
||||
},
|
||||
[KBIndexType.VAULT_NOTES]: {
|
||||
label: "Vault Notes",
|
||||
icon: <StickyNote className="h-4 w-4 text-violet-500" />,
|
||||
},
|
||||
};
|
||||
|
||||
interface KBFiltersProps {
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
ClipboardCheck,
|
||||
Lightbulb,
|
||||
ScrollText,
|
||||
StickyNote,
|
||||
} from "lucide-react";
|
||||
|
||||
const indexTypeConfig: Record<
|
||||
@@ -67,6 +68,12 @@ const indexTypeConfig: Record<
|
||||
"bg-emerald-100 text-emerald-700 dark:bg-emerald-900 dark:text-emerald-300",
|
||||
icon: <ScrollText className="h-3 w-3" />,
|
||||
},
|
||||
[KBIndexType.VAULT_NOTES]: {
|
||||
label: "Vault Notes",
|
||||
color:
|
||||
"bg-violet-100 text-violet-700 dark:bg-violet-900 dark:text-violet-300",
|
||||
icon: <StickyNote className="h-3 w-3" />,
|
||||
},
|
||||
};
|
||||
|
||||
interface KBIndexTypeBadgeProps {
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
ClipboardCheck,
|
||||
Lightbulb,
|
||||
ScrollText,
|
||||
StickyNote,
|
||||
} from "lucide-react";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
|
||||
@@ -29,6 +30,7 @@ const indexIcons: Record<KBIndexType, React.ReactNode> = {
|
||||
[KBIndexType.REVIEWS]: <ClipboardCheck className="h-4 w-4 text-pink-500" />,
|
||||
[KBIndexType.LEARNINGS]: <Lightbulb className="h-4 w-4 text-yellow-500" />,
|
||||
[KBIndexType.PLAYBOOKS]: <ScrollText className="h-4 w-4 text-emerald-500" />,
|
||||
[KBIndexType.VAULT_NOTES]: <StickyNote className="h-4 w-4 text-violet-500" />,
|
||||
};
|
||||
|
||||
const indexLabels: Record<KBIndexType, string> = {
|
||||
@@ -41,6 +43,7 @@ const indexLabels: Record<KBIndexType, string> = {
|
||||
[KBIndexType.REVIEWS]: "Reviews",
|
||||
[KBIndexType.LEARNINGS]: "Learnings",
|
||||
[KBIndexType.PLAYBOOKS]: "Playbooks",
|
||||
[KBIndexType.VAULT_NOTES]: "Vault Notes",
|
||||
};
|
||||
|
||||
interface KBStatsCardProps {
|
||||
|
||||
@@ -74,6 +74,7 @@ const INDEX_LABELS: Record<KBIndexType, string> = {
|
||||
[KBIndexType.REVIEWS]: "Code Reviews",
|
||||
[KBIndexType.LEARNINGS]: "Learnings",
|
||||
[KBIndexType.PLAYBOOKS]: "Playbooks",
|
||||
[KBIndexType.VAULT_NOTES]: "Vault Notes",
|
||||
};
|
||||
|
||||
// Valid KB index types for URL param validation
|
||||
@@ -87,6 +88,7 @@ const VALID_INDEX_TYPES: KBIndexType[] = [
|
||||
KBIndexType.REVIEWS,
|
||||
KBIndexType.LEARNINGS,
|
||||
KBIndexType.PLAYBOOKS,
|
||||
KBIndexType.VAULT_NOTES,
|
||||
];
|
||||
|
||||
function KnowledgeBaseBrowserContent() {
|
||||
|
||||
@@ -85,6 +85,10 @@ const FLAG_DESCRIPTIONS: Record<string, string> = {
|
||||
"Also open a video-authoring task when a release publishes. Off by default even with video_engine_enabled on.",
|
||||
video_on_spotlight:
|
||||
"Also open a video-authoring task when you approve a feature-spotlight draft that requests one. Off by default even with video_engine_enabled on.",
|
||||
vault_report_enabled:
|
||||
"Materialize a weekly org-report note (velocity, cycle time, rework, cost) in the vault's Reports/ folder and notify you — deterministic numbers, no LLM. Needs the Obsidian vault projection on.",
|
||||
vault_kb_enabled:
|
||||
"Index your own vault notes (default RoboCo/Notes/) into the knowledge base so the fleet can retrieve what you write — every note is screened for injection attempts before it's indexed. Needs the Obsidian vault projection on.",
|
||||
};
|
||||
|
||||
export function FeatureFlagsCard() {
|
||||
|
||||
@@ -649,6 +649,7 @@ export enum KBIndexType {
|
||||
REVIEWS = "reviews",
|
||||
LEARNINGS = "learnings",
|
||||
PLAYBOOKS = "playbooks",
|
||||
VAULT_NOTES = "vault_notes",
|
||||
}
|
||||
|
||||
export interface KBSearchRequest {
|
||||
|
||||
Reference in New Issue
Block a user