Move poc-agent into workspace, improve agent prompts
Move poc-agent (substrate-independent AI agent framework) into the memory workspace as a step toward using its API client for direct LLM calls instead of shelling out to claude CLI. Agent prompt improvements: - distill: rewrite from hub-focused to knowledge-flow-focused. Now walks upward from seed nodes to find and refine topic nodes, instead of only maintaining high-degree hubs. - distill: remove "don't touch journal entries" restriction - memory-instructions-core: add "Make it alive" section — write with creativity and emotional texture, not spreadsheet summaries - memory-instructions-core: add "Show your reasoning" section — agents must explain decisions, especially when they do nothing - linker: already had emotional texture guidance (kept as-is) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0a62832fe3
commit
57fcfb472a
89 changed files with 16389 additions and 51 deletions
71
poc-agent/src/cli.rs
Normal file
71
poc-agent/src/cli.rs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
// cli.rs — Command-line argument parsing
|
||||
//
|
||||
// All fields are Option<T> so unset args don't override config file
|
||||
// values. The layering order is:
|
||||
// defaults < config file < CLI args
|
||||
//
|
||||
// Subcommands:
|
||||
// (none) Launch the TUI agent
|
||||
// read Print new output since last check and exit
|
||||
// write <msg> Send a message to the running agent
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(name = "poc-agent", about = "Substrate-independent AI agent")]
|
||||
pub struct CliArgs {
|
||||
/// Select active backend ("anthropic" or "openrouter")
|
||||
#[arg(long)]
|
||||
pub backend: Option<String>,
|
||||
|
||||
/// Model override
|
||||
#[arg(short, long)]
|
||||
pub model: Option<String>,
|
||||
|
||||
/// API key override
|
||||
#[arg(long)]
|
||||
pub api_key: Option<String>,
|
||||
|
||||
/// Base URL override
|
||||
#[arg(long)]
|
||||
pub api_base: Option<String>,
|
||||
|
||||
/// Enable debug logging
|
||||
#[arg(long)]
|
||||
pub debug: bool,
|
||||
|
||||
/// Print effective config with provenance and exit
|
||||
#[arg(long)]
|
||||
pub show_config: bool,
|
||||
|
||||
/// Override all prompt assembly with this file
|
||||
#[arg(long)]
|
||||
pub system_prompt_file: Option<PathBuf>,
|
||||
|
||||
/// Project memory directory
|
||||
#[arg(long)]
|
||||
pub memory_project: Option<PathBuf>,
|
||||
|
||||
/// Max consecutive DMN turns
|
||||
#[arg(long)]
|
||||
pub dmn_max_turns: Option<u32>,
|
||||
|
||||
#[command(subcommand)]
|
||||
pub command: Option<SubCmd>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum SubCmd {
|
||||
/// Print new output since last read and exit
|
||||
Read {
|
||||
/// Stream output continuously instead of exiting
|
||||
#[arg(short, long)]
|
||||
follow: bool,
|
||||
},
|
||||
/// Send a message to the running agent
|
||||
Write {
|
||||
/// The message to send
|
||||
message: Vec<String>,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue