Skip to content

Commit e03d895

Browse files
claudetikazyq
authored andcommitted
chore: remove AI session/chat/sync code and MCP references (#168)
Strip out all AI-agent infrastructure that is not part of the spec coding framework: - Delete core modules: sessions, ai, ai_native, models_registry, db - Delete storage chat modules: chat_store, chat_config - Delete CLI commands: agent, session, runner, skill - Remove AI tool detection and MCP config from init command - Delete HTTP handlers: sessions, chat, models_registry, sync - Remove sync_state cloud sync from projects handler - Remove database dependency (sqlx) and AI provider deps (anthropic, async-openai, reqwest, schemars) - Simplify AppState to only hold config, registry, watcher - Update Cargo.toml features: remove ai, sessions; keep storage, git - Remove session/runner TypeScript bindings export - Mark removed-feature init tests as ignored https://claude.ai/code/session_01UoFkEEoLCMScjTLESGdtri
1 parent 39bd6c9 commit e03d895

76 files changed

Lines changed: 138 additions & 93309 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

rust/Cargo.lock

Lines changed: 100 additions & 1645 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/leanspec-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ clap.workspace = true
1919
colored.workspace = true
2020
dialoguer.workspace = true
2121
indicatif.workspace = true
22-
leanspec-core = {path = "../leanspec-core", features = ["sessions", "storage", "git"]}
22+
leanspec-core = {path = "../leanspec-core", features = ["storage", "git"]}
2323
notify = "6"
2424
ratatui.workspace = true
2525
serde.workspace = true

rust/leanspec-cli/src/cli_args.rs

Lines changed: 0 additions & 284 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,6 @@ pub(crate) struct Cli {
2727

2828
#[derive(Subcommand)]
2929
pub(crate) enum Commands {
30-
/// Dispatch specs to AI coding agents
31-
Agent {
32-
/// Action: run, list, status, config
33-
#[arg(default_value = "help")]
34-
action: String,
35-
36-
/// Specs to dispatch (for run action)
37-
specs: Option<Vec<String>>,
38-
39-
/// Agent type (claude, copilot, aider, gemini, cursor, continue)
40-
#[arg(long, default_value = "claude")]
41-
agent: Option<String>,
42-
43-
/// Create worktrees for parallel implementation
44-
#[arg(long)]
45-
parallel: bool,
46-
47-
/// Do not update spec status to in-progress
48-
#[arg(long)]
49-
no_status_update: bool,
50-
51-
/// Preview without making changes
52-
#[arg(long)]
53-
dry_run: bool,
54-
},
55-
5630
/// Analyze spec complexity and structure
5731
Analyze {
5832
/// Spec path or number
@@ -246,85 +220,6 @@ pub(crate) enum Commands {
246220
/// Initialize an example project
247221
#[arg(long)]
248222
example: Option<String>,
249-
250-
/// Skip AI tool configuration (symlinks)
251-
#[arg(long)]
252-
no_ai_tools: bool,
253-
254-
/// Install LeanSpec agent skills (project-level default)
255-
#[arg(long)]
256-
skill: bool,
257-
258-
/// Install skills to .github/skills/
259-
#[arg(long)]
260-
skill_github: bool,
261-
262-
/// Install skills to .claude/skills/
263-
#[arg(long)]
264-
skill_claude: bool,
265-
266-
/// Install skills to .cursor/skills/
267-
#[arg(long)]
268-
skill_cursor: bool,
269-
270-
/// Install skills to .codex/skills/
271-
#[arg(long)]
272-
skill_codex: bool,
273-
274-
/// Install skills to .gemini/skills/
275-
#[arg(long)]
276-
skill_gemini: bool,
277-
278-
/// Install skills to .vscode/skills/
279-
#[arg(long)]
280-
skill_vscode: bool,
281-
282-
/// Install skills to user-level directories (e.g., ~/.copilot/skills)
283-
#[arg(long)]
284-
skill_user: bool,
285-
286-
/// Skip skill installation entirely
287-
#[arg(long)]
288-
no_skill: bool,
289-
},
290-
291-
/// Run a configured runner from the current project
292-
Run {
293-
/// Inline prompt to send to the runner
294-
#[arg(short = 'p', long)]
295-
prompt: Option<String>,
296-
297-
/// Spec IDs to attach as context (repeatable: --spec 028 --spec 320)
298-
#[arg(long, action = clap::ArgAction::Append)]
299-
spec: Vec<String>,
300-
301-
/// Runner ID to use (defaults to configured default runner)
302-
#[arg(long)]
303-
runner: Option<String>,
304-
305-
/// Override the runner model if supported
306-
#[arg(long)]
307-
model: Option<String>,
308-
309-
/// Show the composed command without executing it
310-
#[arg(long)]
311-
dry_run: bool,
312-
313-
/// Force ACP protocol for this invocation
314-
#[arg(long)]
315-
acp: bool,
316-
317-
/// Run the session inside a dedicated git worktree
318-
#[arg(long)]
319-
worktree: bool,
320-
321-
/// Run each provided spec in parallel worktrees
322-
#[arg(long)]
323-
parallel: bool,
324-
325-
/// Merge strategy to use for worktree sessions
326-
#[arg(long)]
327-
merge_strategy: Option<String>,
328223
},
329224

330225
/// List all specs with optional filtering
@@ -615,18 +510,6 @@ pub(crate) enum Commands {
615510
#[arg(long)]
616511
raw: bool,
617512
},
618-
619-
/// Manage AI coding sessions
620-
Session {
621-
#[command(subcommand)]
622-
action: SessionSubcommand,
623-
},
624-
625-
/// Manage AI runner configurations
626-
Runner {
627-
#[command(subcommand)]
628-
action: RunnerSubcommand,
629-
},
630513
}
631514

632515
#[derive(Subcommand)]
@@ -655,170 +538,3 @@ pub(crate) enum GitSubcommand {
655538
name: Option<String>,
656539
},
657540
}
658-
659-
#[derive(Subcommand)]
660-
pub(crate) enum SessionSubcommand {
661-
Create {
662-
#[arg(long)]
663-
project_path: String,
664-
665-
/// Spec IDs to attach as context (repeatable: --spec 028 --spec 320)
666-
#[arg(long, action = clap::ArgAction::Append)]
667-
spec: Vec<String>,
668-
669-
/// Optional custom prompt/instructions for the session
670-
#[arg(long)]
671-
prompt: Option<String>,
672-
673-
#[arg(long)]
674-
runner: Option<String>,
675-
676-
#[arg(long)]
677-
model: Option<String>,
678-
679-
#[arg(long)]
680-
acp: bool,
681-
682-
#[arg(long)]
683-
worktree: bool,
684-
685-
#[arg(long)]
686-
merge_strategy: Option<String>,
687-
688-
#[arg(long, default_value = "autonomous")]
689-
mode: String,
690-
},
691-
Run {
692-
#[arg(long)]
693-
project_path: String,
694-
695-
/// Spec IDs to attach as context (repeatable: --spec 028 --spec 320)
696-
#[arg(long, action = clap::ArgAction::Append)]
697-
spec: Vec<String>,
698-
699-
/// Optional custom prompt/instructions for the session
700-
#[arg(long)]
701-
prompt: Option<String>,
702-
703-
#[arg(long)]
704-
runner: Option<String>,
705-
706-
#[arg(long)]
707-
model: Option<String>,
708-
709-
#[arg(long)]
710-
acp: bool,
711-
712-
#[arg(long)]
713-
worktree: bool,
714-
715-
#[arg(long)]
716-
parallel: bool,
717-
718-
#[arg(long)]
719-
merge_strategy: Option<String>,
720-
721-
#[arg(long, default_value = "autonomous")]
722-
mode: String,
723-
},
724-
Start {
725-
session_id: String,
726-
},
727-
Pause {
728-
session_id: String,
729-
},
730-
Resume {
731-
session_id: String,
732-
},
733-
Stop {
734-
session_id: String,
735-
},
736-
Archive {
737-
session_id: String,
738-
739-
#[arg(long)]
740-
output_dir: Option<String>,
741-
742-
#[arg(long, default_value_t = false)]
743-
compress: bool,
744-
},
745-
RotateLogs {
746-
session_id: String,
747-
748-
#[arg(long, default_value_t = 10_000)]
749-
keep: usize,
750-
},
751-
Delete {
752-
session_id: String,
753-
},
754-
View {
755-
session_id: String,
756-
},
757-
List {
758-
#[arg(long)]
759-
spec: Option<String>,
760-
#[arg(long)]
761-
status: Option<String>,
762-
#[arg(long)]
763-
runner: Option<String>,
764-
},
765-
Logs {
766-
session_id: String,
767-
},
768-
Worktrees {
769-
#[arg(long)]
770-
all: bool,
771-
},
772-
Merge {
773-
session_id: String,
774-
775-
#[arg(long)]
776-
strategy: Option<String>,
777-
778-
#[arg(long)]
779-
resolve: bool,
780-
},
781-
Cleanup {
782-
session_id: String,
783-
784-
#[arg(long)]
785-
keep_branch: bool,
786-
},
787-
Gc,
788-
}
789-
790-
#[derive(Subcommand)]
791-
pub(crate) enum RunnerSubcommand {
792-
/// List configured runners
793-
List {
794-
/// Optional project path (defaults to current directory)
795-
#[arg(long)]
796-
project_path: Option<String>,
797-
},
798-
/// Show a runner configuration
799-
Show {
800-
runner_id: String,
801-
802-
/// Optional project path (defaults to current directory)
803-
#[arg(long)]
804-
project_path: Option<String>,
805-
},
806-
/// Validate runners by checking command availability
807-
Validate {
808-
runner_id: Option<String>,
809-
810-
/// Optional project path (defaults to current directory)
811-
#[arg(long)]
812-
project_path: Option<String>,
813-
},
814-
/// Open runners config file
815-
Config {
816-
/// Use global config instead of project config
817-
#[arg(long)]
818-
global: bool,
819-
820-
/// Optional project path (defaults to current directory)
821-
#[arg(long)]
822-
project_path: Option<String>,
823-
},
824-
}

0 commit comments

Comments
 (0)