remove Category from the type system

Category was a manually-assigned label with no remaining functional
purpose (decay was the only behavior it drove, and that's gone).
Remove the enum, its methods, category_counts, the --category search
filter, and all category display. The field remains in the capnp
schema for backwards compatibility but is no longer read or written.

Status and health reports now show NodeType breakdown (semantic,
episodic, daily, weekly, monthly) instead of categories.

Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-03-08 20:33:03 -04:00
parent ba30f5b3e4
commit 488fd5a0aa
7 changed files with 45 additions and 120 deletions

View file

@ -12,7 +12,7 @@
// Old files are preserved as backup. Run once.
use crate::store::{
self, Store, Node, Category, NodeType, Provenance, RelationType,
self, Store, Node, NodeType, Provenance, RelationType,
parse_units, new_relation,
};
@ -108,16 +108,6 @@ fn default_0_3() -> f64 { 0.3 }
fn default_3() -> u32 { 3 }
fn default_0_05() -> f64 { 0.05 }
fn parse_old_category(s: &str) -> Category {
match s {
"Core" | "core" => Category::Core,
"Technical" | "technical" | "tech" => Category::Technical,
"Observation" | "observation" | "obs" => Category::Observation,
"Task" | "task" => Category::Task,
_ => Category::General,
}
}
pub fn migrate() -> Result<(), String> {
let weights_path = home().join(".claude/memory/weights.json");
let memory_dir = home().join(".claude/memory");
@ -207,7 +197,6 @@ pub fn migrate() -> Result<(), String> {
key: key.clone(),
content,
weight: old_entry.weight as f32,
category: parse_old_category(&old_entry.category),
emotion: 0.0,
deleted: false,
source_ref: String::new(),
@ -247,7 +236,6 @@ pub fn migrate() -> Result<(), String> {
key: key.clone(),
content: unit.content.clone(),
weight: 0.7,
category: Category::General,
emotion: 0.0,
deleted: false,
source_ref: String::new(),