Skip to main content

mempal_runtime/
field_taxonomy.rs

1#![warn(clippy::all)]
2
3use serde::Serialize;
4
5#[derive(Debug, Clone, Serialize)]
6pub struct FieldTaxonomyEntry {
7    pub field: &'static str,
8    pub domains: &'static [&'static str],
9    pub description: &'static str,
10    pub examples: &'static [&'static str],
11}
12
13pub fn field_taxonomy() -> Vec<FieldTaxonomyEntry> {
14    FIELD_TAXONOMY.to_vec()
15}
16
17const FIELD_TAXONOMY: &[FieldTaxonomyEntry] = &[
18    FieldTaxonomyEntry {
19        field: "general",
20        domains: &["project", "agent", "skill", "global"],
21        description: "Default fallback when no narrower field is known.",
22        examples: &["project decision", "miscellaneous operational note"],
23    },
24    FieldTaxonomyEntry {
25        field: "epistemics",
26        domains: &["global"],
27        description: "Cross-domain reasoning rules about evidence, uncertainty, and belief updates.",
28        examples: &[
29            "evidence precedes assertion",
30            "distinguish observation from inference",
31        ],
32    },
33    FieldTaxonomyEntry {
34        field: "software-engineering",
35        domains: &["project", "skill"],
36        description: "General software construction principles and project engineering constraints.",
37        examples: &[
38            "prefer executable feedback",
39            "avoid changing unrelated behavior",
40        ],
41    },
42    FieldTaxonomyEntry {
43        field: "debugging",
44        domains: &["project", "skill"],
45        description: "Fault isolation, reproduction, diagnostics, and verification workflows.",
46        examples: &[
47            "reproduce before patching",
48            "verify the specific failure path",
49        ],
50    },
51    FieldTaxonomyEntry {
52        field: "tooling",
53        domains: &["project", "agent", "skill"],
54        description: "Concrete tool behavior, CLI usage, environment constraints, and version notes.",
55        examples: &["cargo clippy invocation", "MCP client startup behavior"],
56    },
57    FieldTaxonomyEntry {
58        field: "research",
59        domains: &["project", "agent", "global"],
60        description: "External information gathering, source evaluation, and evidence organization.",
61        examples: &["research-rs workflow", "source-backed literature summary"],
62    },
63    FieldTaxonomyEntry {
64        field: "writing",
65        domains: &["project", "skill"],
66        description: "Technical writing, documentation structure, and explanation style.",
67        examples: &["design doc structure", "concise PR summary"],
68    },
69    FieldTaxonomyEntry {
70        field: "diary",
71        domains: &["agent"],
72        description: "Agent diary rollups and session-level behavior memory.",
73        examples: &["daily agent rollup", "session handoff note"],
74    },
75];