1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Clap types for the context-gate and context-plan (GH-934) commands.
use clap::{Args, Subcommand};
#[derive(Subcommand)]
pub(in crate::cli) enum ContextGateAction {
/// Show recent read-only context injection rows.
Status {
/// Restrict rows to one project path.
#[arg(long, short)]
project: Option<String>,
/// Restrict rows to one host session ID.
#[arg(long)]
session: Option<String>,
/// Maximum recent rows to show.
#[arg(long, short = 'n', default_value = "20")]
limit: i64,
/// Emit a single JSON object with stable fields for scripts.
#[arg(long)]
json: bool,
},
}
/// Arguments for `remem context-plan` (GH-934 debug surface): compile a
/// deterministic task-aware retrieval plan. Prints the plan only, never
/// memory contents; no database, LLM, or network access.
#[derive(Args)]
pub(in crate::cli) struct ContextPlanArgs {
/// Task description used for intent resolution and plan compilation.
#[arg(long)]
pub(in crate::cli) task: String,
/// Explicit intent (wins over keyword resolution): resume-work,
/// explain-decision, debug-failure, apply-preference, review-change,
/// or explore-history.
#[arg(long)]
pub(in crate::cli) intent: Option<String>,
/// Project key override; defaults to the project derived from --cwd.
#[arg(long)]
pub(in crate::cli) project: Option<String>,
/// Working directory used to derive the project key.
#[arg(long)]
pub(in crate::cli) cwd: Option<String>,
/// Branch scope filter.
#[arg(long)]
pub(in crate::cli) branch: Option<String>,
/// Agent role: coder, reviewer, planner, or researcher.
#[arg(long, default_value = "coder")]
pub(in crate::cli) role: String,
/// Risk class: low, medium, or high.
#[arg(long, default_value = "medium")]
pub(in crate::cli) risk: String,
/// Total token budget for the compiled plan.
#[arg(long, default_value_t = 4000)]
pub(in crate::cli) token_budget: u32,
/// Allow superseded memories in scope.
#[arg(long)]
pub(in crate::cli) include_superseded: bool,
/// As-of epoch-seconds scope pin; 0 means no pin.
#[arg(long, default_value_t = 0)]
pub(in crate::cli) as_of_epoch: i64,
/// Emit the full plan as JSON.
#[arg(long)]
pub(in crate::cli) json: bool,
}