diff --git a/crates/tracedecay-agent-hosts/src/agents/chatgpt.rs b/crates/tracedecay-agent-hosts/src/agents/chatgpt.rs index 8489ef7a5a..2e92733e8f 100644 --- a/crates/tracedecay-agent-hosts/src/agents/chatgpt.rs +++ b/crates/tracedecay-agent-hosts/src/agents/chatgpt.rs @@ -116,9 +116,7 @@ impl AgentIntegration for ChatGptIntegration { } } -// --------------------------------------------------------------------------- // Staged source helpers -// --------------------------------------------------------------------------- /// The staged portable bundle the ChatGPT host flow consumes. pub(crate) fn chatgpt_staged_plugin_dir(home: &Path) -> PathBuf { @@ -151,9 +149,7 @@ pub(crate) fn rendered_plugin_files(tracedecay_bin: &str) -> Result std::result::Result Result { super::plugin_bundle::set_mcp_command(raw, tracedecay_bin) } -// --------------------------------------------------------------------------- // Shared install helpers (permissions + CLAUDE.md) -// --------------------------------------------------------------------------- fn ensure_claude_dir(claude_dir: &Path) -> Result<()> { std::fs::create_dir_all(claude_dir).map_err(|e| TraceDecayError::Config { @@ -1020,9 +1016,7 @@ fn uninstall_claude_md_rules(claude_md_path: &Path) -> Result<()> { }) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- /// Check the deployed plugin bundle, marketplace registration, and enablement. fn doctor_check_plugin(dc: &mut DoctorCounters, home: &Path) { diff --git a/crates/tracedecay-agent-hosts/src/agents/cline.rs b/crates/tracedecay-agent-hosts/src/agents/cline.rs index bd9dfb1ea7..d50a910044 100644 --- a/crates/tracedecay-agent-hosts/src/agents/cline.rs +++ b/crates/tracedecay-agent-hosts/src/agents/cline.rs @@ -121,9 +121,7 @@ impl AgentIntegration for ClineIntegration { } } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) { let settings_path = cline_mcp_settings_path(home); diff --git a/crates/tracedecay-agent-hosts/src/agents/codex.rs b/crates/tracedecay-agent-hosts/src/agents/codex.rs index 975ea1e337..6fc0d9c19d 100644 --- a/crates/tracedecay-agent-hosts/src/agents/codex.rs +++ b/crates/tracedecay-agent-hosts/src/agents/codex.rs @@ -459,9 +459,7 @@ impl AgentIntegration for CodexIntegration { } } -// --------------------------------------------------------------------------- // Install helpers -// --------------------------------------------------------------------------- /// The Codex plugin's composed deploy set, sourced from the shared `plugin/` /// tree via [`crate::agents::plugin_bundle::codex_files`]. Each entry is @@ -2078,9 +2076,7 @@ fn group_has_subcommand(group: &serde_json::Value, subcommand: &str) -> bool { }) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_plugin(dc: &mut DoctorCounters, profile_root: &Path, home: &Path) { match codex_foreign_bundle_entrypoints(profile_root, home) { diff --git a/crates/tracedecay-agent-hosts/src/agents/copilot.rs b/crates/tracedecay-agent-hosts/src/agents/copilot.rs index 529fe3cc7e..305d9bbeb9 100644 --- a/crates/tracedecay-agent-hosts/src/agents/copilot.rs +++ b/crates/tracedecay-agent-hosts/src/agents/copilot.rs @@ -253,9 +253,7 @@ fn vscode_mcp_servers_has_tracedecay(settings_path: &Path) -> bool { .is_some() } -// --------------------------------------------------------------------------- // Registration paths -// --------------------------------------------------------------------------- /// VS Code user settings. Neither a host CLI nor TraceDecay writes this /// file; see the module documentation. @@ -306,9 +304,7 @@ fn copilot_context_mcp_registration_state( } } -// --------------------------------------------------------------------------- // Host-CLI-driven MCP registry lifecycle -// --------------------------------------------------------------------------- /// Resolve Copilot's own CLI, or fail with the typed requirement. /// @@ -431,9 +427,7 @@ fn run_mcp_registry_step(copilot_cli: &Path, args: &[&str], home: &Path) -> Resu ) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- /// True when a registered server's `args` array carries every argument in /// [`MCP_SERVER_ARGS`]. diff --git a/crates/tracedecay-agent-hosts/src/agents/cursor.rs b/crates/tracedecay-agent-hosts/src/agents/cursor.rs index f347fbd2a4..fc42aeae84 100644 --- a/crates/tracedecay-agent-hosts/src/agents/cursor.rs +++ b/crates/tracedecay-agent-hosts/src/agents/cursor.rs @@ -162,9 +162,7 @@ impl AgentIntegration for CursorIntegration { } } -// --------------------------------------------------------------------------- // Plugin install helpers -// --------------------------------------------------------------------------- /// The Cursor plugin's composed deploy set, sourced from the shared /// `plugin/` tree via [`crate::agents::plugin_bundle::cursor_files`]. @@ -329,9 +327,7 @@ fn cursor_plugin_hooks(raw: &str, tracedecay_bin: &str) -> Result { Ok(rendered) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_plugin(dc: &mut DoctorCounters, home: &Path) { let plugin_dir = cursor_plugin_install_dir(home); diff --git a/crates/tracedecay-agent-hosts/src/agents/droid.rs b/crates/tracedecay-agent-hosts/src/agents/droid.rs index 5683a02122..bbc0e8755b 100644 --- a/crates/tracedecay-agent-hosts/src/agents/droid.rs +++ b/crates/tracedecay-agent-hosts/src/agents/droid.rs @@ -386,9 +386,7 @@ impl AgentIntegration for DroidIntegration { } } -// --------------------------------------------------------------------------- // Host-CLI-driven MCP registry lifecycle -// --------------------------------------------------------------------------- /// Resolve Droid's own CLI, or fail with the typed requirement. Droid owns /// `~/.factory/mcp.json` through `droid mcp`; its CLI is a hard requirement @@ -488,9 +486,7 @@ fn droid_mcp_remove_with(droid_cli: &Path, home: &Path) -> Result<()> { ) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- /// True when a registered server's `args` array carries every argument in /// [`MCP_SERVER_ARGS`]. Binding the doctor's expectation to the same constant diff --git a/crates/tracedecay-agent-hosts/src/agents/gemini.rs b/crates/tracedecay-agent-hosts/src/agents/gemini.rs index e3d8c17d0e..3cf012844c 100644 --- a/crates/tracedecay-agent-hosts/src/agents/gemini.rs +++ b/crates/tracedecay-agent-hosts/src/agents/gemini.rs @@ -202,9 +202,7 @@ impl AgentIntegration for GeminiIntegration { } } -// --------------------------------------------------------------------------- // Lifecycle state -// --------------------------------------------------------------------------- fn selects_extension(components: &[HostComponentV1]) -> bool { components.iter().any(|component| { @@ -235,9 +233,7 @@ fn gemini_extension_registration_state( } } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_staged_extension(dc: &mut DoctorCounters, home: &Path) { let stage_dir = extension_stage_dir(home); diff --git a/crates/tracedecay-agent-hosts/src/agents/gemini/extension.rs b/crates/tracedecay-agent-hosts/src/agents/gemini/extension.rs index df99e677bf..d7dd50f629 100644 --- a/crates/tracedecay-agent-hosts/src/agents/gemini/extension.rs +++ b/crates/tracedecay-agent-hosts/src/agents/gemini/extension.rs @@ -85,9 +85,7 @@ const EXTENSION_MANIFEST_TEMPLATE: &str = r#"{ } "#; -// --------------------------------------------------------------------------- // Paths -// --------------------------------------------------------------------------- /// TraceDecay's own Gemini profile root. Every path below is derived from the /// admitted `home` rather than an ambient environment variable, because the @@ -138,9 +136,7 @@ pub(super) fn settings_path(home: &Path) -> PathBuf { gemini_home(home).join("settings.json") } -// --------------------------------------------------------------------------- // Staging -// --------------------------------------------------------------------------- /// Every file the staged extension consists of, already rendered. /// @@ -219,9 +215,7 @@ pub(super) fn stage_dir_is_tracedecay(stage_dir: &Path) -> bool { == Some(EXTENSION_NAME) } -// --------------------------------------------------------------------------- // Installed-extension observation -// --------------------------------------------------------------------------- /// What TraceDecay can actually see of the host's installed extension. /// @@ -314,9 +308,7 @@ pub(super) fn installed_extension_is_present(home: &Path) -> bool { installed_extension_dir(home).exists() } -// --------------------------------------------------------------------------- // Host CLI lifecycle -// --------------------------------------------------------------------------- /// Resolve Gemini CLI's own binary, or fail with the typed requirement. /// diff --git a/crates/tracedecay-agent-hosts/src/agents/host_config_io.rs b/crates/tracedecay-agent-hosts/src/agents/host_config_io.rs index f07176f2aa..bb13269e5c 100644 --- a/crates/tracedecay-agent-hosts/src/agents/host_config_io.rs +++ b/crates/tracedecay-agent-hosts/src/agents/host_config_io.rs @@ -696,9 +696,7 @@ pub(super) fn persist_host_config_remove_intent(path: &Path) -> Result<()> { }) } -// --------------------------------------------------------------------------- // Shared MCP server registration -// --------------------------------------------------------------------------- // // Every JSON/JSONC-configured host registers tracedecay the same way: one // entry named `tracedecay` under a root key (`mcpServers` for the Cline @@ -1136,6 +1134,4 @@ fn parse_toml_config(path: &Path, contents: &str) -> Result { Ok(toml::Value::Table(table)) } -// --------------------------------------------------------------------------- // Git post-commit hook -// --------------------------------------------------------------------------- diff --git a/crates/tracedecay-agent-hosts/src/agents/kilo.rs b/crates/tracedecay-agent-hosts/src/agents/kilo.rs index 7493acd661..d65e936098 100644 --- a/crates/tracedecay-agent-hosts/src/agents/kilo.rs +++ b/crates/tracedecay-agent-hosts/src/agents/kilo.rs @@ -142,9 +142,7 @@ impl AgentIntegration for KiloIntegration { } } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) { doctor_check_mcp_registration( diff --git a/crates/tracedecay-agent-hosts/src/agents/kimi.rs b/crates/tracedecay-agent-hosts/src/agents/kimi.rs index e6a3cb3942..1b82afae14 100644 --- a/crates/tracedecay-agent-hosts/src/agents/kimi.rs +++ b/crates/tracedecay-agent-hosts/src/agents/kimi.rs @@ -313,9 +313,7 @@ impl AgentIntegration for KimiIntegration { } } -// --------------------------------------------------------------------------- // Kimi Code CLI native plugin helpers -// --------------------------------------------------------------------------- /// Resolve the Kimi Code CLI home: `$KIMI_CODE_HOME` when set, non-empty, and /// under the admitted `home`; otherwise `~/.kimi-code`. @@ -556,9 +554,7 @@ fn render_kimi_hook_commands(raw: &str, tracedecay_bin: &str) -> Result Ok(rendered) } -// --------------------------------------------------------------------------- // Install helpers -// --------------------------------------------------------------------------- /// Install-or-refresh prompt rules in AGENTS.md. fn install_prompt_rules(agents_md: &Path) -> Result<()> { @@ -571,18 +567,14 @@ fn install_prompt_rules(agents_md: &Path) -> Result<()> { super::prompt_rules::reconcile_prompt_rules(agents_md, PROMPT_RULE_MARKER, &block) } -// --------------------------------------------------------------------------- // Uninstall helpers -// --------------------------------------------------------------------------- /// Remove tracedecay rules from AGENTS.md. fn uninstall_prompt_rules(agents_md: &Path) -> Result<()> { super::prompt_rules::remove_standard_prompt_rules(agents_md) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- /// Check the Kimi Code CLI native plugin: registered in `installed.json` and /// its host-managed bundle matches the staged source. Like the other diff --git a/crates/tracedecay-agent-hosts/src/agents/kiro.rs b/crates/tracedecay-agent-hosts/src/agents/kiro.rs index a1d4f215ec..5b6a0256d2 100644 --- a/crates/tracedecay-agent-hosts/src/agents/kiro.rs +++ b/crates/tracedecay-agent-hosts/src/agents/kiro.rs @@ -428,9 +428,7 @@ fn mcp_registry_has_tracedecay(path: &Path) -> bool { mcp_config_has_tracedecay(path, "mcpServers", load_json_file) } -// --------------------------------------------------------------------------- // Install helpers -// --------------------------------------------------------------------------- fn mcp_server_entry(tracedecay_bin: &str) -> serde_json::Value { json!({ @@ -574,9 +572,7 @@ missing decision or an external or destructive action outside that authority.", ) } -// --------------------------------------------------------------------------- // Uninstall helpers -// --------------------------------------------------------------------------- fn uninstall_mcp_server(path: &Path) -> Result<()> { uninstall_mcp_server_entry(path, "mcpServers", JsonConfigDialect::Json) @@ -662,9 +658,7 @@ fn owned_steering_ranges(contents: &str) -> Vec> { }) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_mcp_config(dc: &mut DoctorCounters, home: &Path) -> Option { let path = mcp_config_path(home); diff --git a/crates/tracedecay-agent-hosts/src/agents/mod.rs b/crates/tracedecay-agent-hosts/src/agents/mod.rs index b894facaba..e3815ad45e 100644 --- a/crates/tracedecay-agent-hosts/src/agents/mod.rs +++ b/crates/tracedecay-agent-hosts/src/agents/mod.rs @@ -271,9 +271,7 @@ pub fn export_managed_skills_to_agent_hosts( reports } -// --------------------------------------------------------------------------- // AgentIntegration trait -// --------------------------------------------------------------------------- /// What [`AgentIntegration::require_host`] proved about the host. #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -644,9 +642,7 @@ pub(crate) enum InstallScope { ProjectLocal, } -// --------------------------------------------------------------------------- // Registry -// --------------------------------------------------------------------------- /// Returns the agent matching `id`, or an error if unknown. pub fn get_integration(id: &str) -> Result> { @@ -800,9 +796,7 @@ pub fn inspect_receipt_backed_host_components( ) } -// --------------------------------------------------------------------------- // DoctorCounters -// --------------------------------------------------------------------------- /// Diagnostic counters for doctor checks, plus every check line in order so /// `tracedecay doctor --json` carries exactly what the terminal showed. @@ -902,9 +896,7 @@ impl DoctorCounters { } } -// --------------------------------------------------------------------------- // Shared helpers -// --------------------------------------------------------------------------- #[macro_export] macro_rules! cli_fallback_args_invocation_lit { diff --git a/crates/tracedecay-agent-hosts/src/agents/opencode.rs b/crates/tracedecay-agent-hosts/src/agents/opencode.rs index 9a8b27d9d6..b9c83764d3 100644 --- a/crates/tracedecay-agent-hosts/src/agents/opencode.rs +++ b/crates/tracedecay-agent-hosts/src/agents/opencode.rs @@ -396,9 +396,7 @@ fn config_has_tracedecay(config: &Value) -> bool { .is_some() } -// --------------------------------------------------------------------------- // Config path resolution -// --------------------------------------------------------------------------- /// Honors the profile's absolute `$XDG_CONFIG_HOME` only inside `home`. /// @@ -636,9 +634,7 @@ fn remove_opencode_plugin(path: &Path) -> Result<()> { }) } -// --------------------------------------------------------------------------- // Install helpers -// --------------------------------------------------------------------------- /// Merge TraceDecay's MCP registration into `opencode.json`. /// @@ -758,9 +754,7 @@ fn install_prompt_rules(prompt_path: &Path) -> Result<()> { super::prompt_rules::reconcile_prompt_rules(prompt_path, PROMPT_RULE_MARKER, &block) } -// --------------------------------------------------------------------------- // Uninstall helpers -// --------------------------------------------------------------------------- /// Outcome of the uninstall transform, reported after publication. enum OpenCodeRegistrationRemoval { @@ -876,9 +870,7 @@ fn uninstall_prompt_rules(prompt_path: &Path) -> Result<()> { super::prompt_rules::remove_standard_prompt_rules(prompt_path) } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_config(dc: &mut DoctorCounters, home: &Path, profile: &ProfileRoot) { let config_path = opencode_config_path(home, profile); diff --git a/crates/tracedecay-agent-hosts/src/agents/roo_code.rs b/crates/tracedecay-agent-hosts/src/agents/roo_code.rs index 00ab0fdaa2..7c47cb86d0 100644 --- a/crates/tracedecay-agent-hosts/src/agents/roo_code.rs +++ b/crates/tracedecay-agent-hosts/src/agents/roo_code.rs @@ -118,9 +118,7 @@ impl AgentIntegration for RooCodeIntegration { } } -// --------------------------------------------------------------------------- // Healthcheck helpers -// --------------------------------------------------------------------------- fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) { let settings_path = roo_settings_path(home); diff --git a/crates/tracedecay-automation-runtime/src/automation/skill_materialization.rs b/crates/tracedecay-automation-runtime/src/automation/skill_materialization.rs index add092fb47..b6933b1e63 100644 --- a/crates/tracedecay-automation-runtime/src/automation/skill_materialization.rs +++ b/crates/tracedecay-automation-runtime/src/automation/skill_materialization.rs @@ -218,9 +218,7 @@ impl ReconcileReport { } } -// --------------------------------------------------------------------------- // Provenance parsing / fork detection -// --------------------------------------------------------------------------- /// The provenance a materialized file carries in its frontmatter. struct FileProvenance { @@ -1038,9 +1036,7 @@ fn initial_support_path_conflicts( Ok(false) } -// --------------------------------------------------------------------------- // Single-skill operations -// --------------------------------------------------------------------------- /// Materializes one active skill into one scope. Never clobbers a foreign or /// user-forked file. Idempotent: an already-current managed file is left as @@ -1283,9 +1279,7 @@ fn prune_skill_dir(scope: &MaterializationScope, slug: &str) { let _ = fs::remove_dir(dir); } -// --------------------------------------------------------------------------- // Scope reconciliation -// --------------------------------------------------------------------------- /// Short, stable disambiguator derived from a full skill id, used to suffix a /// host slug when two distinct ids collide on the same base slug. @@ -1403,9 +1397,7 @@ fn managed_slugs_in_scope(scope: &MaterializationScope) -> Result) { let name = find_direct_child_by_kind(node, "dotted_identifier_list").map_or_else( @@ -258,9 +256,7 @@ impl DartExtractor { } } - // ---------------------------------- // Imports - // ---------------------------------- fn visit_import(state: &mut ExtractionState, node: TsNode<'_>) { let text = state.node_text(node); @@ -336,9 +332,7 @@ impl DartExtractor { text.trim().to_string() } - // ---------------------------------- // Top-level function - // ---------------------------------- /// Visit a top-level function. In Dart's grammar, `function_signature` and /// `function_body` are siblings at the program level. @@ -436,9 +430,7 @@ impl DartExtractor { Self::extract_annotations_from_modifiers(state, sig_node, &id); } - // ---------------------------------- // Class - // ---------------------------------- fn visit_class(state: &mut ExtractionState, node: TsNode<'_>) { let is_abstract = find_direct_child_by_kind(node, "abstract").is_some(); @@ -528,9 +520,7 @@ impl DartExtractor { } } - // ---------------------------------- // Mixin - // ---------------------------------- fn visit_mixin(state: &mut ExtractionState, node: TsNode<'_>) { let name = find_direct_child_by_kind(node, "identifier").map_or_else( @@ -602,9 +592,7 @@ impl DartExtractor { } } - // ---------------------------------- // Extension - // ---------------------------------- fn visit_extension(state: &mut ExtractionState, node: TsNode<'_>) { let name = find_direct_child_by_kind(node, "identifier").map_or_else( @@ -674,9 +662,7 @@ impl DartExtractor { } } - // ---------------------------------- // Enum - // ---------------------------------- fn visit_enum(state: &mut ExtractionState, node: TsNode<'_>) { let name = node.child_by_field_name("name").map_or_else( @@ -817,9 +803,7 @@ impl DartExtractor { } } - // ---------------------------------- // Type alias - // ---------------------------------- fn visit_type_alias(state: &mut ExtractionState, node: TsNode<'_>) { let name = find_direct_child_by_kind(node, "type_identifier") @@ -882,9 +866,7 @@ impl DartExtractor { } } - // ---------------------------------- // Class body - // ---------------------------------- fn visit_class_body(state: &mut ExtractionState, body: TsNode<'_>) { Self::visit_body_members(state, body); @@ -1014,9 +996,7 @@ impl DartExtractor { } } - // ---------------------------------- // Declarations (inside class bodies and top-level) - // ---------------------------------- fn visit_declaration(state: &mut ExtractionState, node: TsNode<'_>) { // A "declaration" node wraps various things. @@ -1169,9 +1149,7 @@ impl DartExtractor { } } - // ---------------------------------- // Constructor - // ---------------------------------- fn visit_constructor(state: &mut ExtractionState, decl_node: TsNode<'_>, sig_node: TsNode<'_>) { let name = Self::extract_constructor_name(state, sig_node); @@ -1256,9 +1234,7 @@ impl DartExtractor { } } - // ---------------------------------- // Getter / Setter - // ---------------------------------- fn visit_getter_or_setter( state: &mut ExtractionState, @@ -1340,9 +1316,7 @@ impl DartExtractor { } } - // ---------------------------------- // Operator - // ---------------------------------- fn visit_operator(state: &mut ExtractionState, decl_node: TsNode<'_>, _sig_node: TsNode<'_>) { let text = state.node_text(decl_node); @@ -1427,9 +1401,7 @@ impl DartExtractor { } } - // ---------------------------------- // Fields - // ---------------------------------- /// Visit `initialized_variable_definition`: `Type name = value;` fn visit_initialized_var_def( @@ -1555,9 +1527,7 @@ impl DartExtractor { } } - // ---------------------------- // Call site extraction - // ---------------------------- /// Recursively find call expressions inside a given node and create unresolved Calls references. /// Dart AST structure for calls: `identifier` followed by `selector` siblings containing @@ -1692,9 +1662,7 @@ impl DartExtractor { } } - // ---------------------------- // Helper extraction methods - // ---------------------------- /// Extract a signature by slicing to the body child, else the first `{`. fn extract_signature_to_brace(state: &ExtractionState, node: TsNode<'_>) -> String { diff --git a/crates/tracedecay-code-extraction/src/nix_extractor.rs b/crates/tracedecay-code-extraction/src/nix_extractor.rs index 2616b46dc4..9132bb925d 100644 --- a/crates/tracedecay-code-extraction/src/nix_extractor.rs +++ b/crates/tracedecay-code-extraction/src/nix_extractor.rs @@ -480,9 +480,7 @@ impl NixExtractor { } } - // ---------------------------- // Classification helpers - // ---------------------------- /// Classify a binding's value expression. fn classify_expression(node: TsNode<'_>) -> BindingKind { @@ -690,9 +688,7 @@ impl NixExtractor { } } - // ---------------------------- // Name/signature extraction - // ---------------------------- /// Extract the name from a binding's attrpath. fn extract_binding_name(state: &ExtractionState, node: TsNode<'_>) -> Option { diff --git a/crates/tracedecay-code-extraction/src/python_extractor.rs b/crates/tracedecay-code-extraction/src/python_extractor.rs index 5399c6fe6a..0e74a2c6b2 100644 --- a/crates/tracedecay-code-extraction/src/python_extractor.rs +++ b/crates/tracedecay-code-extraction/src/python_extractor.rs @@ -821,9 +821,7 @@ impl PythonExtractor { } } - // ---------------------------- // Helper extraction methods - // ---------------------------- /// Extract base classes from a class definition's `argument_list`. fn extract_base_classes(state: &mut ExtractionState<'_>, node: TsNode<'_>, class_id: &str) { diff --git a/crates/tracedecay-code-extraction/src/typescript_extractor.rs b/crates/tracedecay-code-extraction/src/typescript_extractor.rs index b7991bdfc0..7bf6a106fe 100644 --- a/crates/tracedecay-code-extraction/src/typescript_extractor.rs +++ b/crates/tracedecay-code-extraction/src/typescript_extractor.rs @@ -1338,9 +1338,7 @@ impl TypeScriptExtractor { } } - // ---------------------------- // Helper extraction methods - // ---------------------------- /// Extract the leading decorators of a class or field declaration. Their /// call sites are left to the caller. diff --git a/crates/tracedecay-global-db/src/project_registry.rs b/crates/tracedecay-global-db/src/project_registry.rs index 93e490d2a3..30e472b313 100644 --- a/crates/tracedecay-global-db/src/project_registry.rs +++ b/crates/tracedecay-global-db/src/project_registry.rs @@ -16,9 +16,7 @@ use super::{ #[cfg(test)] mod tests; -// --------------------------------------------------------------------------- // Registry reap contract -// --------------------------------------------------------------------------- // // `plan_registry_reap` below is the only producer of these values, so the // contract lives beside its producer. The root re-exports these names through diff --git a/crates/tracedecay-mcp/src/jsonrpc.rs b/crates/tracedecay-mcp/src/jsonrpc.rs index 80477d885f..5ee646f8d0 100644 --- a/crates/tracedecay-mcp/src/jsonrpc.rs +++ b/crates/tracedecay-mcp/src/jsonrpc.rs @@ -254,9 +254,7 @@ impl ErrorCode { } } -// --------------------------------------------------------------------------- // Transport abstraction (zero-cost via monomorphization) -// --------------------------------------------------------------------------- /// Implementations are monomorphized at each call site, no dyn dispatch. pub trait McpTransport { diff --git a/crates/tracedecay-project/src/runtime_ports.rs b/crates/tracedecay-project/src/runtime_ports.rs index 4579fcecb5..9d1d2b394c 100644 --- a/crates/tracedecay-project/src/runtime_ports.rs +++ b/crates/tracedecay-project/src/runtime_ports.rs @@ -69,9 +69,7 @@ pub(crate) fn require_runtime_ports() -> Result { }) } -// --------------------------------------------------------------------------- // tracedecay_sessions::host_ports -// --------------------------------------------------------------------------- fn register_session_ports() { use tracedecay_sessions::host_ports; @@ -99,9 +97,7 @@ fn unregistered_admission( Box::new(HostAdmissionFacade::new(authorities)) } -// --------------------------------------------------------------------------- // tracedecay_agent_hosts::ports -// --------------------------------------------------------------------------- fn register_agent_host_ports() { use tracedecay_automation_runtime::ports as automation_ports; diff --git a/crates/tracedecay-query/src/bin/tracedecay_index_bench.rs b/crates/tracedecay-query/src/bin/tracedecay_index_bench.rs index dc76ae530f..808ba92665 100644 --- a/crates/tracedecay-query/src/bin/tracedecay_index_bench.rs +++ b/crates/tracedecay-query/src/bin/tracedecay_index_bench.rs @@ -340,9 +340,7 @@ impl CodeIndexExecutionControlV1 for CancelledControl { false } } -// --------------------------------------------------------------------------- // Workload -// --------------------------------------------------------------------------- struct GenerationRun { generation: Arc, @@ -989,9 +987,7 @@ fn exact_clone_lookup( }) } -// --------------------------------------------------------------------------- // Scratch directory -// --------------------------------------------------------------------------- /// A self-created scratch directory. `tempfile` is a dev-dependency of this /// crate and a binary cannot use dev-dependencies, so the few lines are @@ -1024,9 +1020,7 @@ impl Scratch { .map_err(|error| format!("remove scratch {}: {error}", self.path.display())) } } -// --------------------------------------------------------------------------- // Summary -// --------------------------------------------------------------------------- struct BodyRefreshMetrics { state: &'static str, diff --git a/crates/tracedecay-query/src/bin/tracedecay_search_bench.rs b/crates/tracedecay-query/src/bin/tracedecay_search_bench.rs index 0ecc20eca9..bb831e954b 100644 --- a/crates/tracedecay-query/src/bin/tracedecay_search_bench.rs +++ b/crates/tracedecay-query/src/bin/tracedecay_search_bench.rs @@ -300,9 +300,7 @@ impl RetrievalExecutionControl for ActiveControl { 0 } } -// --------------------------------------------------------------------------- // Workload -// --------------------------------------------------------------------------- fn run(options: &Options) -> Result { let started = Instant::now(); @@ -788,9 +786,7 @@ fn ingest_artifact( } } -// --------------------------------------------------------------------------- // Scratch directory -// --------------------------------------------------------------------------- struct Scratch { path: PathBuf, diff --git a/crates/tracedecay-query/src/retrieval/lexical/projection/artifact/row_codec.rs b/crates/tracedecay-query/src/retrieval/lexical/projection/artifact/row_codec.rs index 73a3c85bac..876ac5ab22 100644 --- a/crates/tracedecay-query/src/retrieval/lexical/projection/artifact/row_codec.rs +++ b/crates/tracedecay-query/src/retrieval/lexical/projection/artifact/row_codec.rs @@ -348,9 +348,7 @@ pub(super) fn decode_artifact_row( decode_binary(generation, chunk_id, bytes, text, dictionary) } -// --------------------------------------------------------------------------- // Binary row with a per-file / per-symbol dictionary -// --------------------------------------------------------------------------- // // In order: // ref file entry · symbol tag [ref symbol entry [ref display entry]] diff --git a/crates/tracedecay-runtime-core/src/db/sql.rs b/crates/tracedecay-runtime-core/src/db/sql.rs index 2346e95c80..ffd21c0dcd 100644 --- a/crates/tracedecay-runtime-core/src/db/sql.rs +++ b/crates/tracedecay-runtime-core/src/db/sql.rs @@ -1,9 +1,7 @@ use crate::db::engine::{Error, Row, Value}; use tracedecay_domain::errors::{Result, TraceDecayError}; -// --------------------------------------------------------------------------- // Helper: build SQL placeholder string `?, ?, ?, …` in one allocation. -// --------------------------------------------------------------------------- /// Returns a SQL placeholder string of `n` anonymous `?` markers separated by /// `, `. Used to construct `IN ($qmarks)` clauses without allocating one @@ -21,9 +19,7 @@ pub fn build_qmark_placeholders(n: usize) -> String { s } -// --------------------------------------------------------------------------- // Shared helpers -// --------------------------------------------------------------------------- /// Rows requested per keyset page of a whole-table scan. /// diff --git a/crates/tracedecay-runtime-core/src/runtime_telemetry.rs b/crates/tracedecay-runtime-core/src/runtime_telemetry.rs index 3355c6d66d..97b876a1db 100644 --- a/crates/tracedecay-runtime-core/src/runtime_telemetry.rs +++ b/crates/tracedecay-runtime-core/src/runtime_telemetry.rs @@ -557,9 +557,7 @@ fn process_snapshot_text_block( ) } -// --------------------------------------------------------------------------- // Process sampling -// --------------------------------------------------------------------------- pub fn unix_epoch_secs() -> Result { Ok(std::time::SystemTime::now() @@ -886,9 +884,7 @@ fn sample_process_with_window(cpu_sample_window: Duration) -> Result DirtyMarkerSnapshot { @@ -945,9 +941,7 @@ pub fn with_suffix(path: &Path, suffix: &str) -> PathBuf { PathBuf::from(s) } -// --------------------------------------------------------------------------- // Helpers -// --------------------------------------------------------------------------- /// Format a byte count as a short human-readable string (`353.2 MB`). fn bytes_human(n: u64) -> String { diff --git a/crates/tracedecay-sessions/src/runtime/hosts/cursor_composer/store.rs b/crates/tracedecay-sessions/src/runtime/hosts/cursor_composer/store.rs index 1eb3ee1dda..f3c32a0535 100644 --- a/crates/tracedecay-sessions/src/runtime/hosts/cursor_composer/store.rs +++ b/crates/tracedecay-sessions/src/runtime/hosts/cursor_composer/store.rs @@ -437,9 +437,7 @@ async fn walk_store_blob_bounded( } } -// --------------------------------------------------------------------------- // store.db blob-DAG reader (SQL length-gated, reachable-only) -// --------------------------------------------------------------------------- pub(super) struct StoreMeta { pub agent_id: String, diff --git a/crates/tracedecay-sessions/src/runtime/workflow/workflow_ingest.rs b/crates/tracedecay-sessions/src/runtime/workflow/workflow_ingest.rs index eaff787bd5..c9afdc3b31 100644 --- a/crates/tracedecay-sessions/src/runtime/workflow/workflow_ingest.rs +++ b/crates/tracedecay-sessions/src/runtime/workflow/workflow_ingest.rs @@ -403,9 +403,7 @@ fn read_run_meta(path: &Path) -> Option { serde_json::from_str(&text).ok() } -// --------------------------------------------------------------------------- // Pure parsing (unit-tested; no disk access below this line). -// --------------------------------------------------------------------------- /// Build a [`WorkflowRun`] and its agent roster from a parsed run-meta JSON /// (`workflows/.json`). @@ -609,9 +607,7 @@ fn ms_field_to_secs(value: &Value, key: &str) -> Option { value.get(key).and_then(Value::as_i64).map(|ms| ms / 1000) } -// --------------------------------------------------------------------------- // Agent transcript + journal parsing. -// --------------------------------------------------------------------------- /// Fill in an agent's transcript-derived fields from /// `agent-.jsonl` when that file exists: absolute `transcript_path`, diff --git a/crates/tracedecay/src/daemon/pr_autotrack.rs b/crates/tracedecay/src/daemon/pr_autotrack.rs index e275c41a39..6a0db70b12 100644 --- a/crates/tracedecay/src/daemon/pr_autotrack.rs +++ b/crates/tracedecay/src/daemon/pr_autotrack.rs @@ -108,9 +108,7 @@ impl<'a> PrStoreAdministration<'a> { /// 100 open PRs ramps up gradually instead of forking 100 syncs at once. const MAX_NEW_TRACKS_PER_CYCLE: usize = 10; -// --------------------------------------------------------------------------- // Lifecycle reconciliation -// --------------------------------------------------------------------------- /// Logs a `pr_autotrack` "skipped" daemon event with the optional branch label /// and PR number. Every skip path (persistence failure, track failure, fork, diff --git a/dashboard/codegen/src/generate.ts b/dashboard/codegen/src/generate.ts index 11ab62c764..516d852b3a 100644 --- a/dashboard/codegen/src/generate.ts +++ b/dashboard/codegen/src/generate.ts @@ -158,13 +158,11 @@ function isTaggedUnion(schema: JsonSchema): boolean { return schema.oneOf.every((v) => discriminantOf(v) !== null); } -// --------------------------------------------------------------------------- // Type/decoder resolution for a single (possibly nested) schema. // Returns the structural type, the decoder expression, and a shallow // annotation so checkers do not infer the expression. // `generic` supplies the payload param name + schema identifier when inside a // generic type (DashboardEnvelope). -// --------------------------------------------------------------------------- interface ResolveCtx { genericParam?: string; @@ -366,9 +364,7 @@ function resolveObject(schema: JsonSchema, ctx: ResolveCtx): Resolved { return { ts, zod, ann }; } -// --------------------------------------------------------------------------- // Tagged union: discriminated + exhaustive. -// --------------------------------------------------------------------------- function resolveTaggedUnion(schema: JsonSchema, ctx: ResolveCtx): Resolved { const variants = (schema.oneOf ?? []) @@ -391,9 +387,7 @@ function resolveTaggedUnion(schema: JsonSchema, ctx: ResolveCtx): Resolved { return { ts, zod, ann: "" }; } -// --------------------------------------------------------------------------- // Named def emission. -// --------------------------------------------------------------------------- interface EmittedDef { typeName: string; @@ -447,9 +441,7 @@ function emitAlias(desc: string, name: string, ann: string, zod: string, ts: str }; } -// --------------------------------------------------------------------------- // Bundle -> files. -// --------------------------------------------------------------------------- export function generateContracts(bundles: JsonSchema[]): GeneratedContracts { const defs: Array<[string, JsonSchema]> = []; diff --git a/dashboard/src/workspaces/observatory/EvidenceSummaries.tsx b/dashboard/src/workspaces/observatory/EvidenceSummaries.tsx index 980a9bf9b2..bbbf77e9b3 100644 --- a/dashboard/src/workspaces/observatory/EvidenceSummaries.tsx +++ b/dashboard/src/workspaces/observatory/EvidenceSummaries.tsx @@ -106,10 +106,6 @@ function Kicker({ children, tone }: { children: ReactNode; tone?: string }) { ); } -// --------------------------------------------------------------------------- -// Plan 26 dimension bands (adoption, retrieval, budgets) -// --------------------------------------------------------------------------- - function dimensionRows( dimensions: readonly PlanDimension[], anchors: ReadAnchors, @@ -260,9 +256,7 @@ export function BudgetsBody({ ); } -// --------------------------------------------------------------------------- // Doctor -// --------------------------------------------------------------------------- export function DoctorBody({ summary, @@ -392,9 +386,7 @@ function FindingRows({ ); } -// --------------------------------------------------------------------------- // Code-index pipeline -// --------------------------------------------------------------------------- const PHASES: readonly CodeIndexBuildProgressV1['phase'][] = [ 'source_scan', @@ -520,9 +512,7 @@ function WorktreeRail({ worktree }: { worktree: CodeIndexWorktreeFreshnessV1 }) ); } -// --------------------------------------------------------------------------- // Hook hints / rejected arguments -// --------------------------------------------------------------------------- export function HooksBody({ summary, @@ -596,9 +586,7 @@ export function HooksBody({ ); } -// --------------------------------------------------------------------------- // Execution topology -// --------------------------------------------------------------------------- export function TopologyBody({ summary, @@ -642,9 +630,7 @@ export function TopologyBody({ ); } -// --------------------------------------------------------------------------- // Analytics controls -// --------------------------------------------------------------------------- export function AnalyticsBody({ summary, @@ -706,9 +692,7 @@ export function AnalyticsBody({ ); } -// --------------------------------------------------------------------------- // Storage telemetry -// --------------------------------------------------------------------------- export function TelemetryBody({ summary, @@ -755,9 +739,7 @@ export function TelemetryBody({ ); } -// --------------------------------------------------------------------------- // Storage findings -// --------------------------------------------------------------------------- export function FindingsBody({ summary, diff --git a/dashboard/src/workspaces/observatory/evidence.ts b/dashboard/src/workspaces/observatory/evidence.ts index d5205b320f..74c9b21b00 100644 --- a/dashboard/src/workspaces/observatory/evidence.ts +++ b/dashboard/src/workspaces/observatory/evidence.ts @@ -459,9 +459,7 @@ function gradeDetail(grade: EvidenceState, wire: DashboardDomainStateV1): string } } -// --------------------------------------------------------------------------- // Per-source summaries -// --------------------------------------------------------------------------- export function observationsSummary(read: EvidenceRead): EvidenceSummary { return envelopeSummary(SOURCE_IDENTITY.observations, read, (model) => ({ @@ -774,9 +772,7 @@ export function diagnosticsWindowWord( }; } -// --------------------------------------------------------------------------- // Timeline -// --------------------------------------------------------------------------- export interface TimelineMark { id: EvidenceSourceId; diff --git a/mockups/ui-concept-v2/app/src/brain/BrainCanvas.tsx b/mockups/ui-concept-v2/app/src/brain/BrainCanvas.tsx index 6e98bf7215..654b3b2d00 100644 --- a/mockups/ui-concept-v2/app/src/brain/BrainCanvas.tsx +++ b/mockups/ui-concept-v2/app/src/brain/BrainCanvas.tsx @@ -189,9 +189,7 @@ function drawSynapsePath( ctx.restore(); } -// --------------------------------------------------------------------------- // repository neighborhood -// --------------------------------------------------------------------------- const orbCache = new Map(); @@ -304,9 +302,7 @@ function drawRepo( ctx.restore(); } -// --------------------------------------------------------------------------- // scoped: what the project knows -// --------------------------------------------------------------------------- function mix(hex: string, toward: string, k: number) { const a = parseInt(hex.slice(1), 16); diff --git a/plugin/pi/index.ts b/plugin/pi/index.ts index 8e184950c0..ab935c8ce0 100644 --- a/plugin/pi/index.ts +++ b/plugin/pi/index.ts @@ -33,9 +33,7 @@ export const DAEMON_UNREACHABLE_EXIT_CODE = 69; /** Catalog tool names are fixed identifiers; nothing else may reach argv. */ const TOOL_NAME = /^tracedecay_[a-z0-9_]+$/; -// --------------------------------------------------------------------------- // Process helpers -// --------------------------------------------------------------------------- export interface RunResult { /** Process exit status; `null` when the child was killed or never spawned. */ @@ -93,9 +91,7 @@ function truncateOutput(text: string): string { ); } -// --------------------------------------------------------------------------- // Catalog tools -// --------------------------------------------------------------------------- /** One entry of the installer-generated `schemas.json`. */ export interface CatalogToolSchema { @@ -225,9 +221,7 @@ export function registerCatalogTools( } } -// --------------------------------------------------------------------------- // Lifecycle hooks -// --------------------------------------------------------------------------- export type PiLifecycleEvent = "session_start" | "agent_end"; @@ -260,9 +254,7 @@ export async function dispatchLifecycle( return result.code === 0 && guidance.length > 0 ? guidance : undefined; } -// --------------------------------------------------------------------------- // Extension factory -// --------------------------------------------------------------------------- export default function tracedecayExtension(pi: ExtensionAPI) { void TD_EXTENSION_MARKER;