use crate::session::types::{ItemRef, NestingPolicy};
use crate::workspace::Workspace;
use crate::CliResult;
pub trait SessionKind {
#[allow(
dead_code,
reason = "consumed by per-kind diagnostics + status integration in step 9"
)]
fn name(&self) -> &'static str;
#[allow(dead_code, reason = "consumed once nesting opens (design Q4)")]
fn nesting_policy(&self) -> NestingPolicy {
NestingPolicy::Disallow
}
fn on_accept(&self, item_ref: &ItemRef, note: Option<&str>, ws: &Workspace) -> CliResult<()>;
fn on_reject(
&self,
item_ref: &ItemRef,
note: Option<&str>,
ws: &Workspace,
) -> CliResult<serde_json::Value>;
fn on_pending(
&self,
item_ref: &ItemRef,
note: Option<&str>,
ws: &Workspace,
) -> CliResult<serde_json::Value>;
#[allow(
dead_code,
reason = "consumed by per-kind skill-body seeding in step 7+"
)]
fn matches_prior_rejection(
&self,
item_ref: &ItemRef,
prior_fingerprint: &serde_json::Value,
) -> bool;
}
pub fn kind_for(name: &str) -> Option<Box<dyn SessionKind>> {
match name {
"critique-review" => Some(Box::new(
crate::commands::critique::session_kind::CritiqueReviewSession,
)),
"proof-review" => Some(Box::new(
crate::commands::verify::session_kind::ProofReviewSession,
)),
_ => None,
}
}