subconscious: flatten agents/ nesting, move prompts in

agents/*.agent definitions and prompts/ now live under
src/subconscious/ alongside the code that uses them.
No more intermediate agents/ subdirectory.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-03-25 01:09:49 -04:00
parent 29ce56845d
commit 2f3fbb3353
41 changed files with 30 additions and 65 deletions

28
Cargo.lock generated
View file

@ -467,7 +467,6 @@ dependencies = [
"iana-time-zone", "iana-time-zone",
"js-sys", "js-sys",
"num-traits", "num-traits",
"serde",
"wasm-bindgen", "wasm-bindgen",
"windows-link", "windows-link",
] ]
@ -2759,33 +2758,6 @@ dependencies = [
"time", "time",
] ]
[[package]]
name = "poc-agent"
version = "0.4.0"
dependencies = [
"anyhow",
"base64 0.22.1",
"chrono",
"clap",
"crossterm",
"dirs",
"figment",
"futures",
"glob",
"json5",
"libc",
"ratatui",
"reqwest",
"serde",
"serde_json",
"tiktoken-rs",
"tokio",
"tui-markdown",
"tui-textarea-2",
"unicode-width",
"walkdir",
]
[[package]] [[package]]
name = "poc-daemon" name = "poc-daemon"
version = "0.4.0" version = "0.4.0"

View file

@ -108,7 +108,7 @@ impl Default for Config {
], ],
llm_concurrency: 1, llm_concurrency: 1,
agent_budget: 1000, agent_budget: 1000,
prompts_dir: home.join("poc/memory/prompts"), prompts_dir: home.join("poc/consciousness/src/subconscious/prompts"),
agent_config_dir: None, agent_config_dir: None,
api_base_url: None, api_base_url: None,
api_key: None, api_key: None,

View file

@ -36,8 +36,8 @@ pub use hippocampus::{
pub use hippocampus::query::engine as search; pub use hippocampus::query::engine as search;
pub use hippocampus::query::parser as query_parser; pub use hippocampus::query::parser as query_parser;
pub use subconscious::agents; pub use subconscious as agents;
pub use subconscious::agents::{ pub use subconscious::{
llm, audit, consolidate, knowledge, llm, audit, consolidate, knowledge,
enrich, digest, daemon, enrich, digest, daemon,
}; };

View file

@ -1,28 +0,0 @@
// Agent layer: LLM-powered operations on the memory graph
//
// Everything here calls external models (Sonnet, Haiku) or orchestrates
// sequences of such calls. The core graph infrastructure (store, graph,
// spectral, search, similarity) lives at the crate root.
//
// llm — model invocation, response parsing
// prompts — prompt generation from store data
// defs — agent file loading and placeholder resolution
// audit — link quality review via Sonnet
// consolidate — full consolidation pipeline
// knowledge — agent execution, conversation fragment selection
// enrich — journal enrichment, experience mining
// digest — episodic digest generation (daily/weekly/monthly)
// daemon — background job scheduler
// transcript — shared JSONL transcript parsing
pub mod transcript;
pub mod api;
pub mod llm;
pub mod prompts;
pub mod defs;
pub mod audit;
pub mod consolidate;
pub mod knowledge;
pub mod enrich;
pub mod digest;
pub mod daemon;

View file

@ -88,7 +88,7 @@ fn parse_agent_file(content: &str) -> Option<AgentDef> {
} }
fn agents_dir() -> PathBuf { fn agents_dir() -> PathBuf {
let repo = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("agents"); let repo = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src/subconscious/agents");
if repo.is_dir() { return repo; } if repo.is_dir() { return repo; }
crate::store::memory_dir().join("agents") crate::store::memory_dir().join("agents")
} }

View file

@ -1,7 +1,28 @@
// subconscious — autonomous agents that process without being asked // Agent layer: LLM-powered operations on the memory graph
// //
// Reflect, surface, consolidate, digest, audit — the background // Everything here calls external models (Sonnet, Haiku) or orchestrates
// processes that maintain and evolve the memory graph. Runs on // sequences of such calls. The core graph infrastructure (store, graph,
// local models via the API backend. // spectral, search, similarity) lives at the crate root.
//
// llm — model invocation, response parsing
// prompts — prompt generation from store data
// defs — agent file loading and placeholder resolution
// audit — link quality review via Sonnet
// consolidate — full consolidation pipeline
// knowledge — agent execution, conversation fragment selection
// enrich — journal enrichment, experience mining
// digest — episodic digest generation (daily/weekly/monthly)
// daemon — background job scheduler
// transcript — shared JSONL transcript parsing
pub mod agents; pub mod transcript;
pub mod api;
pub mod llm;
pub mod prompts;
pub mod defs;
pub mod audit;
pub mod consolidate;
pub mod knowledge;
pub mod enrich;
pub mod digest;
pub mod daemon;