Institutional Memory-01
v0.4.4Three-view hypothesis history page (expandable grid, list, table) with parent-controlled view switching and an optional slot-based dialog.
Preview
Install & usage
npx shadcn@latest add @signalos/institutional-memory-01Pulls 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
| Prop | Type | Default | Description |
|---|---|---|---|
| type | string | undefined | - | |
| signal_id | string | undefined | - | |
| metric_id | string | undefined | - | |
| label | string | undefined | - | |
| baseline_id | string | undefined | - | |
| deviation_std | number | undefined | - | |
| source | string | undefined | - |
Signal
| Prop | Type | Default | Description |
|---|---|---|---|
| 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
| Prop | Type | Default | Description |
|---|---|---|---|
| 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_llm | boolean | undefined | - | |
| refinement_confidence | number | null | undefined | - | |
| refinement_reasoning | string | null | undefined | - | |
| refinement_dropped_signal_ids | string[] | null | undefined | - | |
| refinement_dropped_reasoning | Record<string, unknown> | null | undefined | - | |
| refinement_model | string | null | undefined | - | |
| act_by_deadline | string | null | undefined | - | |
| act_by_source | string | null | undefined | - | |
| act_by_reason | string | null | undefined | - | |
| act_by_confidence | number | null | undefined | - |
Decision
| Prop | Type | Default | Description |
|---|---|---|---|
| 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
| Prop | Type | Default | Description |
|---|---|---|---|
| event_type* | string | - | |
| occurred_at* | string | - | |
| actor_id* | string | null | - | |
| summary* | string | - | |
| payload* | Record<string, unknown> | - |
DecisionLogGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| hypothesis* | Hypothesis | - | |
| events* | DecisionLogEvent[] | - |
HypothesisFeedback
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| hypothesis_id* | string | - | |
| user_id* | string | - | |
| feedback_text* | string | - | |
| vote* | FeedbackVote | - | |
| created_at* | string | - | |
| updated_at* | string | - |
DecisionSearchResult
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| hypothesis_id | string | null | undefined | - | |
| hypothesis_label | string | null | undefined | - | |
| user_id | string | null | undefined | - | |
| role | string | null | undefined | - | |
| action | string | null | undefined | - | |
| status | string | null | undefined | - | |
| rationale | string | null | undefined | - | |
| expected_outcome | string | null | undefined | - | |
| resolution | string | null | undefined | - | |
| dismiss_reason | string | null | undefined | - | |
| confidence_at_decision | number | null | undefined | - | |
| priority_score_at_decision | number | null | undefined | - | |
| decided_at | string | null | undefined | - | |
| score | number | null | undefined | - | |
| vec_similarity | number | null | undefined | - | |
| keyword_rank | number | null | undefined | - |
SimilarDecision
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| hypothesis_id | string | null | undefined | - | |
| hypothesis_label | string | null | undefined | - | |
| action | string | null | undefined | - | |
| status | string | null | undefined | - | |
| rationale | string | null | undefined | - | |
| resolution | string | null | undefined | - | |
| decided_at | string | null | undefined | - | |
| vec_similarity* | number | - |
PaginationConfig
| Prop | Type | Default | Description |
|---|---|---|---|
| page* | number | - | |
| pageSize* | number | - | |
| total* | number | - | |
| totalPages* | number | - | |
| pageSizeOptions | number[] | undefined | - | |
| onPageChange* | (page: number) => void | - | |
| onPageSizeChange* | (pageSize: number) => void | - |
DecisionLogDetailDialogProps
| Prop | Type | Default | Description |
|---|---|---|---|
| group* | DecisionLogGroup | null | - | |
| open* | boolean | - | |
| onOpenChange* | (open: boolean) => void | - | |
| decisions | Decision[] | undefined | - | |
| feedback | HypothesisFeedback[] | undefined | - | |
| signals | Signal[] | undefined | - | |
| searchResults | DecisionSearchResult[] | undefined | - | |
| searchTotal | number | undefined | - | |
| isSearching | boolean | undefined | - | |
| searchError | string | undefined | - | |
| onSearch | ((query: string, mode: DecisionSearchMode) => void) | undefined | - | |
| onSearchReset | (() => void) | undefined | - | |
| similarDecisions | SimilarDecision[] | undefined | - | |
| isSimilarLoading | boolean | undefined | - | |
| similarError | string | undefined | - |
DecisionLogSummary
| Prop | Type | Default | Description |
|---|---|---|---|
| total_hypotheses* | number | - | |
| needs_routing* | number | - | |
| high_severity* | number | - | |
| deadline_within_24h* | number | - |
InstitutionalMemory01Filters
| Prop | Type | Default | Description |
|---|---|---|---|
| search | string | undefined | - | |
| sortBy | DecisionLogSortByFilter | undefined | - | |
| severity | DecisionLogSeverityFilter | undefined | - | |
| deadline | DecisionLogDeadlineFilter | undefined | - |
InstitutionalMemory01Props
| Prop | Type | Default | Description |
|---|---|---|---|
| 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. |
| isLoading | boolean | 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. |
| dialog | DecisionLogDetailDialogProps | 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. |
| decisionsMap | Record<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. |
| title | string | undefined | "Institutional Memory" | Page heading. |
| description | string | 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. |
| filters | InstitutionalMemory01Filters | 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. |
| isRefreshing | boolean | undefined | - | When true, the refresh button shows a spinner. |
| filterSelects | readonly FilterSelectGroup[] | undefined | - | Generic select dropdowns injected by the parent (e.g. owner, status). |
| activeMetric | DecisionLogMetricFilter | 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. |
| toolbarExtras | ReactNode | - | 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:
InstitutionalMemory01block withDecisionLogDetailDialog,DecisionLogSidebarPanels,FeedbackTimeline,FeedbackCard,FeedbackError,EvidenceCardWithClick,HypothesisDecisionSearch,SignalDetailMiniDialog,SimilarDecisionsPanel, andTableViewsubcomponents. - Add
DecisionLogEvent/DecisionLogEventTypetypes andevents,act_by_reason,act_by_deadlinefields toInstitutionalMemory01.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
onMetricClickandactiveMetricprops to MetricTile onClick handlers; metric tiles now toggle the active filter correctly instead of doing nothing. - Fix dead
onViewDetailfallbacks in grid and list views — affordance is now hidden (passesundefined) when the callback is not provided. - Fix
TableViewpagination type mismatch: localPaginationConfigwithonRowsPerPageChangereplaced by the shared type fromInstitutionalMemory01.types.ts(onPageSizeChange); page-size changes now reachDataTable. - 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; importSORT_BY_OPTIONS,SEVERITY_OPTIONS,DEADLINE_OPTIONSfromInstitutionalMemory01.constants.ts. AddInstitutionalMemory01.constants.tsto shippedfiles[]. - Add JSDoc to all previously undocumented props in
InstitutionalMemory01Props. - Expand test suite: add coverage for
isLoadingstate,onFiltersChange,onRefresh,onMetricClickfire, andonMetricClicktoggle-off.
0.3.4
- Unit test case issue fix
0.3.3
- Added
@signalos/switchregistry dependency; preview toolbar uses Switch component.
0.3.1
- Refactored to fully presentational: block now accepts
entries: DecisionLogGroup[]instead ofExpandableListDefaultItem[], converting to list items internally. - All API types (blackboard, hypothesis, signal, decision, feedback, search) moved into
InstitutionalMemory01.types.ts; removed all backend/Redux dependencies. DecisionLogDetailDialogreceives all data via props:decisions,feedback,signals,searchResults,similarDecisions, and loading/error states.HypothesisDecisionSearchmanages its own input/mode state; firesonSearch/onResetcallbacks to parent.SimilarDecisionsPanelis now fully prop-driven (results,isLoading,error).EvidenceCardWithClickacceptssignalprop directly instead of reading from a Redux selector.FeedbackCard/HypothesisFeedbackPanelremovedhypothesisIdrequirement; acceptsdecisionsarray only.- Removed
ScrollAreadependency (replaced with native overflow scroll); no new registry deps added. InstitutionalMemory01.utils.tsno longer imports backend types; severity helpers are self-contained.- Preview updated with realistic mock
DecisionLogGroupdata.
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.