Institutional Memory-01

v0.4.4

Three-view hypothesis history page (expandable grid, list, table) with parent-controlled view switching and an optional slot-based dialog.

View as Markdown

Preview

Open full page ↗

Install & usage

npx shadcn@latest add @signalos/institutional-memory-01

Pulls the page source plus its widget dependencies (@signalos/tokens, @signalos/utils, @signalos/badge, @signalos/dialog, @signalos/table, @signalos/expandable-list, @signalos/page-header, @signalos/view-controler, @signalos/button, @signalos/card, @signalos/skeleton, @signalos/circular-progress, @signalos/activity-timeline, @signalos/data-table, @signalos/status-badge, @signalos/switch, @signalos/filter-toolbar, @signalos/metric-tile, @signalos/pagination) into your app - you own the copy. Requires access.

usage
// after: npx shadcn@latest add @signalos/institutional-memory-01
// mount the pulled page in a route, e.g. src/app/institutional/page.tsx
import InstitutionalMemory01 from "@/components/blocks/institutional-memory-01/InstitutionalMemory01"

export default function Page() {
  return <InstitutionalMemory01 />
}

Props

EvidenceItem

PropTypeDefaultDescription
typestring | undefined-
signal_idstring | undefined-
metric_idstring | undefined-
labelstring | undefined-
baseline_idstring | undefined-
deviation_stdnumber | undefined-
sourcestring | undefined-

Signal

PropTypeDefaultDescription
id*string-
signal_id*string-
domain*string-
cluster*string-
metric_id*string-
signal_type*string-
crlb_score*number-
initial_crlb_score*number-
reinforcement_term*number-
decay_lambda*number-
deviation_std*number-
source_connector_id*string | null-
source_connector_type*string | null-
severity*Severity-
payload*Record<string, unknown>-
observation_ids*string[]-
baseline_id*string | null-
dimension_key*Record<string, unknown>-
target_roles*string[]-
tags*string[]-
embedding*number[] | null-
fired_at*string-
expires_at*string | null-
status*"active" | "decayed"-
confidence_current*number-

Hypothesis

PropTypeDefaultDescription
id*string-
label*string-
description*string-
domain*string-
cluster*string-
signal_ids*string[]-
cagg*number-
sufficiency_score*number-
evidence*EvidenceItem[]-
routed*boolean-
routed_to*string | null-
status*HypothesisStatus-
created_at*string-
updated_at*string-
confidence_initial*number-
decay_lambda*number-
severity*Severity-
target_roles*string[]-
suggested_actions*string[]-
tags*string[]-
decayed_at*string | null-
expire_reason*string | null-
confidence_current*number-
refined_by_llmboolean | undefined-
refinement_confidencenumber | null | undefined-
refinement_reasoningstring | null | undefined-
refinement_dropped_signal_idsstring[] | null | undefined-
refinement_dropped_reasoningRecord<string, unknown> | null | undefined-
refinement_modelstring | null | undefined-
act_by_deadlinestring | null | undefined-
act_by_sourcestring | null | undefined-
act_by_reasonstring | null | undefined-
act_by_confidencenumber | null | undefined-

Decision

PropTypeDefaultDescription
id*string-
hypothesis_id*string-
action*string-
rationale*string-
resolution*string | null-
expected_outcome*string-
expected_outcome_by*string-
decided_at*string-
confidence_at_decision*number-
priority_score_at_decision*number-
role*string | null-
user_id*string-
dismiss_reason*string | null-

DecisionLogEvent

PropTypeDefaultDescription
event_type*string-
occurred_at*string-
actor_id*string | null-
summary*string-
payload*Record<string, unknown>-

DecisionLogGroup

PropTypeDefaultDescription
hypothesis*Hypothesis-
events*DecisionLogEvent[]-

HypothesisFeedback

PropTypeDefaultDescription
id*string-
hypothesis_id*string-
user_id*string-
feedback_text*string-
vote*FeedbackVote-
created_at*string-
updated_at*string-

DecisionSearchResult

PropTypeDefaultDescription
id*string-
hypothesis_idstring | null | undefined-
hypothesis_labelstring | null | undefined-
user_idstring | null | undefined-
rolestring | null | undefined-
actionstring | null | undefined-
statusstring | null | undefined-
rationalestring | null | undefined-
expected_outcomestring | null | undefined-
resolutionstring | null | undefined-
dismiss_reasonstring | null | undefined-
confidence_at_decisionnumber | null | undefined-
priority_score_at_decisionnumber | null | undefined-
decided_atstring | null | undefined-
scorenumber | null | undefined-
vec_similaritynumber | null | undefined-
keyword_ranknumber | null | undefined-

SimilarDecision

PropTypeDefaultDescription
id*string-
hypothesis_idstring | null | undefined-
hypothesis_labelstring | null | undefined-
actionstring | null | undefined-
statusstring | null | undefined-
rationalestring | null | undefined-
resolutionstring | null | undefined-
decided_atstring | null | undefined-
vec_similarity*number-

PaginationConfig

PropTypeDefaultDescription
page*number-
pageSize*number-
total*number-
totalPages*number-
pageSizeOptionsnumber[] | undefined-
onPageChange*(page: number) => void-
onPageSizeChange*(pageSize: number) => void-

DecisionLogDetailDialogProps

PropTypeDefaultDescription
group*DecisionLogGroup | null-
open*boolean-
onOpenChange*(open: boolean) => void-
decisionsDecision[] | undefined-
feedbackHypothesisFeedback[] | undefined-
signalsSignal[] | undefined-
searchResultsDecisionSearchResult[] | undefined-
searchTotalnumber | undefined-
isSearchingboolean | undefined-
searchErrorstring | undefined-
onSearch((query: string, mode: DecisionSearchMode) => void) | undefined-
onSearchReset(() => void) | undefined-
similarDecisionsSimilarDecision[] | undefined-
isSimilarLoadingboolean | undefined-
similarErrorstring | undefined-

DecisionLogSummary

PropTypeDefaultDescription
total_hypotheses*number-
needs_routing*number-
high_severity*number-
deadline_within_24h*number-

InstitutionalMemory01Filters

PropTypeDefaultDescription
searchstring | undefined-
sortByDecisionLogSortByFilter | undefined-
severityDecisionLogSeverityFilter | undefined-
deadlineDecisionLogDeadlineFilter | undefined-

InstitutionalMemory01Props

PropTypeDefaultDescription
entries*DecisionLogGroup[]-Hypothesis groups to display, each pairing a hypothesis with its event log.
view*InstitutionalMemory01View-Currently active view mode. Controlled by the parent.
onViewChange*(view: InstitutionalMemory01View) => void-Called when the user switches view mode.
isLoadingboolean | undefined-When true, the list and metric tiles render in a loading skeleton state.
pagination*PaginationConfig-Pagination state and handlers. Always required — pass a no-op config when pagination is not needed.
dialogDecisionLogDetailDialogProps | undefined-Props for the optional detail dialog. Omit to disable the dialog entirely.
onViewDetail((group: DecisionLogGroup) => void) | undefined-Called when the user activates "view detail" on a hypothesis row. Omit to hide the affordance.
decisionsMapRecord<string, Decision[]> | undefined-Per-hypothesis decisions, keyed by hypothesis id. Managed by the container.
onExpand((hypothesisId: string) => void) | undefined-Called when a hypothesis row is expanded; container should fetch and store decisions.
titlestring | undefined"Institutional Memory"Page heading.
descriptionstring | undefined-Subheading shown below the title.
tableData*ColumnDef<DecisionLogGroup, unknown>[]-Column definitions for the table view. Required even if the table view is not the default.
summary*DecisionLogSummary | null-Metric tile summary values. Pass null to render tiles in loading state.
filtersInstitutionalMemory01Filters | undefined-Current toolbar filter values. Only include fields you want to control.
onFiltersChange((patch: Partial<InstitutionalMemory01Filters>) => void) | undefined-Called with a partial patch whenever the user changes a filter. Merging is the container's responsibility.
onRefresh(() => void) | undefined-Called when the user clicks the refresh button in the toolbar. Omit to hide the button.
isRefreshingboolean | undefined-When true, the refresh button shows a spinner.
filterSelectsreadonly FilterSelectGroup[] | undefined-Generic select dropdowns injected by the parent (e.g. owner, status).
activeMetricDecisionLogMetricFilter | null | undefined-Currently active metric tile filter (null = no filter).
onMetricClick((metric: DecisionLogMetricFilter | null) => void) | undefined-Called when a metric tile is clicked; container fetches filtered data.
toolbarExtrasReactNode-Additional content rendered inside the FilterToolbar (e.g. action buttons, toggles, badges).

Supporting types

export type InstitutionalMemory01View = "grid" | "list" | "table"
export type Severity = "info" | "low" | "medium" | "high" | "critical"
export type HypothesisStatus =
  "FORMING" | "SUFFICIENT" | "ROUTED" | "DECIDED" | "EXPIRED"
export type DecisionAction =
  "resolve" | "dismissed" | "escalate" | "schedule" | string
export type DecisionSearchMode = "hybrid" | "vector" | "keyword"
export type FeedbackVote = "agree" | "disagree" | "neutral"
export type DecisionLogEventType =
  | "hypothesis.created"
  | "hypothesis.routed"
  | "hypothesis.expired"
  | "signal.fired"
  | "decision.created"
  | "feedback.submitted"
  | string
export type DecisionLogSortByFilter =
  "newest" | "urgency" | "deadline" | "confidence" | "severity"
export type DecisionLogSeverityFilter = "high" | "medium" | "low" | ""
export type DecisionLogDeadlineFilter = "24" | "48" | "72" | ""
export type DecisionLogMetricFilter =
  "total_hypotheses" | "needs_routing" | "high_severity" | "deadline_within_24h"

Changelog

0.4.4

  • Initial full implementation: InstitutionalMemory01 block with DecisionLogDetailDialog, DecisionLogSidebarPanels, FeedbackTimeline, FeedbackCard, FeedbackError, EvidenceCardWithClick, HypothesisDecisionSearch, SignalDetailMiniDialog, SimilarDecisionsPanel, and TableView subcomponents.
  • Add DecisionLogEvent / DecisionLogEventType types and events, act_by_reason, act_by_deadline fields to InstitutionalMemory01.types.ts.

0.4.3

  • Fix cross-item imports to use canonical @/components paths; add missing signalos.category to manifests.

institutional-memory-01

0.4.2

  • Replace raw scale tokens with semantic tokens.

0.4.1

  • Updated component content.

0.4.0

  • Wire onMetricClick and activeMetric props to MetricTile onClick handlers; metric tiles now toggle the active filter correctly instead of doing nothing.
  • Fix dead onViewDetail fallbacks in grid and list views — affordance is now hidden (passes undefined) when the callback is not provided.
  • Fix TableView pagination type mismatch: local PaginationConfig with onRowsPerPageChange replaced by the shared type from InstitutionalMemory01.types.ts (onPageSizeChange); page-size changes now reach DataTable.
  • Replace all raw Tailwind palette classes in InstitutionalMemory01.utils.ts (bg-red-600/15, text-red-500, bg-amber-500/20, text-success-500, bg-error-500, etc.) with semantic tokens (bg-bg-error, text-text-error, bg-bg-warning, text-text-warning, text-text-success, bg-status-error, bg-status-warning).
  • Remove duplicate inline constant arrays from InstitutionalMemory01.tsx; import SORT_BY_OPTIONS, SEVERITY_OPTIONS, DEADLINE_OPTIONS from InstitutionalMemory01.constants.ts. Add InstitutionalMemory01.constants.ts to shipped files[].
  • Add JSDoc to all previously undocumented props in InstitutionalMemory01Props.
  • Expand test suite: add coverage for isLoading state, onFiltersChange, onRefresh, onMetricClick fire, and onMetricClick toggle-off.

0.3.4

  • Unit test case issue fix

0.3.3

  • Added @signalos/switch registry dependency; preview toolbar uses Switch component.

0.3.1

  • Refactored to fully presentational: block now accepts entries: DecisionLogGroup[] instead of ExpandableListDefaultItem[], converting to list items internally.
  • All API types (blackboard, hypothesis, signal, decision, feedback, search) moved into InstitutionalMemory01.types.ts; removed all backend/Redux dependencies.
  • DecisionLogDetailDialog receives all data via props: decisions, feedback, signals, searchResults, similarDecisions, and loading/error states.
  • HypothesisDecisionSearch manages its own input/mode state; fires onSearch/onReset callbacks to parent.
  • SimilarDecisionsPanel is now fully prop-driven (results, isLoading, error).
  • EvidenceCardWithClick accepts signal prop directly instead of reading from a Redux selector.
  • FeedbackCard / HypothesisFeedbackPanel removed hypothesisId requirement; accepts decisions array only.
  • Removed ScrollArea dependency (replaced with native overflow scroll); no new registry deps added.
  • InstitutionalMemory01.utils.ts no longer imports backend types; severity helpers are self-contained.
  • Preview updated with realistic mock DecisionLogGroup data.

0.2.0

  • Refactored to be fully prop-driven: items, view, onViewChange, onViewDetail, and dialog all passed from parent.
  • Added list view (simple bordered rows with category/severity badges).
  • Added table view (ID, title, category, severity, status columns).
  • Added parent-controlled slot-based dialog (open, onOpenChange, title, ReactNode content).
  • Extracted InstitutionalMemory01.types.ts with typed interfaces for all props.

0.1.0

  • Initial release: centered-card sign-in page composed from @signalos primitives (input, label, checkbox, button) with error/loading states and brand/footer slots.